@alokai/cli
2.2.2
Patch Changes
- FIXED Applying
patchesto the apps when runningalokai-cli store deploycommand
2.2.1
Patch Changes
- FIXED Mismatch warning in
alokai version upgradecommand. Now, it shows what dependencies are mismatching.
2.2.0
Minor Changes
- CHANGED
deploycommand of@alokai/clinow pushes the information about the Alokai version used in the project. Since this version, it's going to be visible also in the Alokai Console. - FEATURE Add unified lint command to Alokai CLI
Added a new alokai lint command that provides a unified way to run linting across the entire project, including both applications and stores.
Key features:
- Graceful error handling: Continues running all linting processes even if some fail, then exits with appropriate error code
- Unified linting: Single command to lint all applications (via Turbo) and stores
- Auto-fix support:
--fixflag to automatically fix linting issues - Flexible filtering:
--filterflag to include/exclude specific packages using Turbo patterns - Enhanced error reporting: Detailed failure information with failed application names
- Summary reporting: Clear success/failure summary at the end
- Silent mode: Integration-friendly mode for use within other commands
Usage examples:
# Run lint for entire project
alokai lint
# Run lint with auto-fix
alokai lint --fix
# Run lint with custom filter
alokai lint --filter=packages/my-package
# Exclude multiple patterns
alokai lint --filter='!packages/excluded !apps/test'
Store linting improvements:
- Enhanced error reporting with specific failed app information
- Improved ESLint output filtering to reduce noise
- Better error handling with proper exit codes
- ADDED
alokai versioncommand. It allows you to check the version of your Alokai project, update theversionfield inpackage.jsonfiles, and be informed about possible upgrades.
yarn alokai version
# Example output:
# The project is running on Alokai version: 1.3.0
# Versions in package.json files updated successfully.
# You are running the latest Alokai version.
- CHANGED Improved error handling for
@alokai/clipackage installation failures - Enhanced error messages: Added user-friendly error messages for package authentication and not found errors
Users will now receive helpful, actionable error messages when encountering package installation issues, with specific guidance for Alokai package authentication problems.
ADDED Support for --cwd flag and ALOKAI_CWD environment variable to run Alokai CLI commands from non-root directories.
This enhancement allows users to execute Alokai CLI commands from any directory by specifying the project root using either:
--cwdflag:alokai-cli store build --cwd=./path/to/alokai/projectALOKAI_CWDenvironment variable:ALOKAI_CWD=./path/to/alokai/project alokai-cli store build
Priority order:
--cwdflag (highest priority)ALOKAI_CWDenvironment variable (medium priority)process.cwd()(default behavior, maintains backward compatibility)
- ADDED
alokai version upgradecommand. Now, users are able to upgrade their dependencies to next Alokai version by running:yarn alokai version upgrade.
Patch Changes
- FIX Single store deployment framework auto detection. The try to call command without framework flag caused the following error:
TypeError: The "paths[1]" argument must be of type string. Received undefined
Code: ERR_INVALID_ARG_TYPE
- CHANGED
--verboseflag default value fordevcommand fromfalsetotrue - FIX
deployment-workflow.yml- now properly passes verbose flag to the command - FIX Fix typo in integration template default value
- Fixed typo in integration generate command: corrected default template value from
resti-apitorest-api - Updated README documentation to reflect the correct template name
- Improved README formatting with better table of contents structure
- FIXED The CLI now reads JSON files properly.
- FIXED Override playwright version in package.json, which was missing.
- FIXED ommited "scripts" property in deploy params
- CHANGED Improve Turborepo filter descriptions in store commands
Enhanced the --filter flag descriptions across store build, dev, and start commands to provide clearer guidance on how to use Turborepo package filters.
2.1.1
Patch Changes
FIX Integration generate command fails when using default template due to typo in template name
- Fixed typo in integration generate command: corrected default template value from
resti-apitorest-api - Updated README documentation to reflect the correct template name
- Improved README formatting with better table of contents structure
2.1.0
Minor Changes
ADDED Auto-imports for the Nuxt are now fully supported and will be automatically generated when the store is synced during the dev process or when the store is composed.
CHANGED Watch mode for dev will be now little bit more verbose, so the developer can easily tell when the process of synchronizing data is finished.
- ADDED
--templateflag toalokai-cli integration generatecommand, allowing to specify which integration boilerplate will be used. - ADDED New
extension generatecommand allowing to generate extensions (e.g. unified extension) for target integrations.
yarn alokai-cli extension generate --help
- CHANGED The
integration generatecommand no longer uses environment variables to pass arguments to plop generator. - ADDED
unified-cmsextension template toalokai-cli extension generatecommand - ADDED New integration boilerplate template:
sdk-proxy. It allows you to generate an integration that works as a proxy for external SDKs, exposing their methods through Alokai Middleware and enabling you to call them with Alokai SDK
Patch Changes
- FIXED Linting generated files in
alokai-cli store preparecommand - CHANGED Instead of general README, add a README specific to the integration template
- Updated dependencies:
- @vsf-enterprise/file-modifier@3.2.0
2.0.0
Major Changes
- ADDED Support for ignorePaths field handling in
alokai.config.json. - CHANGED BREAKING Deployable stores are now recognised by the fact they have "deployable" field instead of config at all, so that template stores can be parametrised in
alokai.config.json.
Migration path:
If you have stores with configs that you wish to keep as non templates and they don't have deployment field, you can add the field to the alokai.config.json file.
// alokai.config.json
{
"stores": {
...
"my-store": {
+ "deployment": {...},
}
}
}
Minor Changes
CHANGED Generation of tsconfig files. Previously, apps had private configuration that was replicated in each store. Now shared configuration will be inherited from the root config, reducing duplication and improving maintainability.
- ADDED A flag to the
integration generatecommand allowing to use local boilerplate code instead of a published version. - ADDED Linting generated integration files using the
lint:fixscript. - ADDED Add
renamecommand used to change store id. Example usage:
alokai-cli store rename
--store-id sapcc-b2c
--new-store-id sapcc-my-brand
- ADDED Added
store lintcommand. - ADDED New
store preparecommand for generating tsconfig files with resolved paths in stores. - CHANGED Newly added stores now have compilerOptions.composite set to
truein theirstorefront-middlewaretsconfig file. - CHANGED Newly added stores now have Project References resolved relatively to the parent store in their tsconfig file.
- CHANGED The
store testcommand now uses Turbo to run Playwright store tests. - ADDED Alokai CLI's
build,dev,startandtestcommands now support the--turbo-optionflag for passing custom options when running a Turbo task. - ADDED When composing a store, value of the
versionfield from .alokai/package.json or the root package.json is injected into .env file asNEXT_PUBLIC_ALOKAI_VERSIONinstorefront-unified-nuxtandNUXT_PUBLIC_ALOKAI_VERSIONinstorefront-unified-nextjsapp.
Patch Changes
- FIXED Removed the dotenv library from
@alokai/connect/loggerto allow using it in React Native projects. - FIXED
context.getApiClienttype. Now the type indicates that a promise is being returned. - CHANGED The
store preparecommand of@alokai/clinow generates theincludearray in store-specifictsconfig.jsonfiles to comply with the stricter file inclusion requirements enforced by thecompilerOptions.composite: truesetting. - FIXED Environment variable handling in Frontend app dev mode. URLs with suffixes (e.g.,
http://localhost:4000/api) for middleware API and SSR are now properly preserved. FIX IDE import resolution in apps, now aliased imports will work properly. - CHANGED Added retries for validating the docker prerequisites in
store deploycommand. - ADDED New stores created using the
store addcommand will now have the previously missingnext-env.d.tsfile in their NextJS apps. - Updated dependencies:
- @vsf-enterprise/file-modifier@3.1.0
1.0.1
Patch Changes
- FIX Allow deployment of middleware without requiring frontend components
1.0.0
Major Changes
- CHANGED Updated the package for compatibility with Node.js 22.
Key Updates:
- Upgraded to the latest version of Node.js 22
- Updated CI pipelines to use Node.js 22 for consistency.
- Updated
.nvmrcor.node-versionfiles to specify Node.js version22.14. - Upgraded
@types/nodeto version^22.13.17for compatibility with the latest Node.js features.
Recommendations:
- Use Node.js version
22.14.0or higher for optimal performance, security, and compatibility. - While Node.js 20 is technically supported, it is not recommended as it may cause compatibility issues with certain packages and has not been thoroughly tested.
Minor Changes
- ADDED Introduced additional options for the deployment command to enhance flexibility in deployment configurations.
Previously, the deployment command relied solely on the alokai.config.json file for configuration. With this update, you can now specify additional options directly via the command line. This provides greater control over the deployment process, making it easier to customize deployments for different environments or use cases.
New Options:
--framework: Define the framework to use for the deployment. This is particularly useful when working with multiple frameworks or switching between them frequently.--project-name: Specify the project name for the deployment. This is helpful when deploying the same store to different environments, such as staging or production.--cloud-region: Choose the cloud region for the deployment. This allows you to optimize deployments based on factors like latency, compliance, or geographic preferences.
Key Details:
- Command-line options take precedence over the corresponding settings in the
alokai.config.jsonfile. This means you can maintain a default configuration in the file and override it as needed for specific deployments. - These options are applicable only for single-store deployments. They are not supported when using the
--allflag for multi-store deployments. - ADDED Added a new flag
--deployablefor thechangedcommand that will allow to find changes only for deployable stores - ADDED Enhanced the
store deploycommand with prerequisite checks to report missing dependencies early in the process. - ADDED Creating .env from .env.example (when overriden in a store) in all apps when composing a store.
- ADDED Add
alokai store removecommand. - ADDED Added a way to pass playwright test options through the
--playwright-options(-p) flag in thestore testcommand.
alokai-cli store test --playwright-options="--project=nuxt-desktop --headed"
- FIXED Fixed randomly failing integration tests when running them for multiple stores using the
store testcommand. The issue was due to tests running in parallel through Turbo's pipeline. From now on, when running tests for multiple stores (using the--allflag or passing an array of store IDs via the--store-idflag), the tests will be run for each store consecutively.
Patch Changes
- CHANGED Guarantee compatibility with
@alokai/connectpackage. - FIXED
.envcomposition. Now the store composition logic also checks for the ancestor.envfiles, before using the.env.exampleas a fallback. - FIXED Add missing
defudependency - FIXED Store composition now properly inherits
.env.examplefiles from parent stores, ensuring consistent environment configuration across the store hierarchy. If a store doesn't have its own.env.example, it will be copied from its parent stores or the base apps. Switch tag to RC - FIXED Added symlinks to
node_modulesfor all apps insidestoresdirectory. It helps avoiding type issues - previously the base app used non-hoisted node_modules for few packages, and stores always used hoisted-ones. Now as the node_modules are symlinked, there won't be such desynchronization. - FIXED Deployment of nested stores.
- FIXED Disabled spinner in logs for
startandbuildcommands when run with the--verboseflag. Now a single log entry is displayed instead, ensuring logs are not obfuscated. - FIXED Respect
startscript when generating astart:standalonescript - FIXED Running
store testcommand with--uiflag. - FIXED
store testnow returns exit code 1 when it fails. - FIXED Add missing
get-port-pleasedependency
1.0.0-rc.11
Patch Changes
Switch tag to RC
1.0.0-next.10
Minor Changes
- ADDED Add
alokai store removecommand.
1.0.0-rc.9
Patch Changes
- FIXED Respect
startscript when generating astart:standalonescript - FIXED
store testnow returns exit code 1 when it fails.
1.0.0-rc.8
Patch Changes
- FIXED
.envcomposition. Now the store composition logic also checks for the ancestor.envfiles, before using the.env.exampleas a fallback.
1.0.0-rc.7
Patch Changes
- FIXED Add missing
get-port-pleasedependency
1.0.0-rc.6
Patch Changes
- FIXED Add missing
defudependency
1.0.0-rc.5
Patch Changes
- FIXED Store composition now properly inherits
.env.examplefiles from parent stores, ensuring consistent environment configuration across the store hierarchy. If a store doesn't have its own.env.example, it will be copied from its parent stores or the base apps.
1.0.0-rc.4
Minor Changes
- ADDED Creating .env from .env.example (when overriden in a store) in all apps when composing a store.
- ADDED Added a way to pass playwright test options through the
--playwright-options(-p) flag in thestore testcommand.
alokai-cli store test --playwright-options="--project=nuxt-desktop --headed"
- FIXED Fixed randomly failing integration tests when running them for multiple stores using the
store testcommand. The issue was due to tests running in parallel through Turbo's pipeline. From now on, when running tests for multiple stores (using the--allflag or passing an array of store IDs via the--store-idflag), the tests will be run for each store consecutively.
Patch Changes
- FIXED Deployment of nested stores.
- FIXED Running
store testcommand with--uiflag.
1.0.0-rc.3
Minor Changes
- ADDED Introduced additional options for the deployment command to enhance flexibility in deployment configurations.
Previously, the deployment command relied solely on the alokai.config.json file for configuration. With this update, you can now specify additional options directly via the command line. This provides greater control over the deployment process, making it easier to customize deployments for different environments or use cases.
New Options:
--framework: Define the framework to use for the deployment. This is particularly useful when working with multiple frameworks or switching between them frequently.--project-name: Specify the project name for the deployment. This is helpful when deploying the same store to different environments, such as staging or production.--cloud-region: Choose the cloud region for the deployment. This allows you to optimize deployments based on factors like latency, compliance, or geographic preferences.
Key Details:
- Command-line options take precedence over the corresponding settings in the
alokai.config.jsonfile. This means you can maintain a default configuration in the file and override it as needed for specific deployments. - These options are applicable only for single-store deployments. They are not supported when using the
--allflag for multi-store deployments.
1.0.0-rc.2
Major Changes
- CHANGED Updated the package for compatibility with Node.js 22.
Key Updates:
- Upgraded to the latest version of Node.js 22
- Updated CI pipelines to use Node.js 22 for consistency.
- Updated
.nvmrcor.node-versionfiles to specify Node.js version22.14. - Upgraded
@types/nodeto version^22.13.17for compatibility with the latest Node.js features.
Recommendations:
- Use Node.js version
22.14.0or higher for optimal performance, security, and compatibility. - While Node.js 20 is technically supported, it is not recommended as it may cause compatibility issues with certain packages and has not been thoroughly tested.
0.3.1
Patch Changes
- FIXED Environment variable handling in Frontend app dev mode. URLs with suffixes (e.g.,
http://localhost:4000/api) for middleware API and SSR are now properly preserved.
0.3.0
Minor Changes
ADDED: CLI is now able to use different CONSOLE_API_URL based on the environment variable.
Patch Changes
CHANGED deploy command will print more debug info in case of an error
0.3.0-rc.1
Minor Changes
ADDED: CLI is now able to use different CONSOLE_API_URL based on the environment variable.
0.2.1-rc.0
Patch Changes
CHANGED deploy command will print more debug info in case of an error
0.2.0
Minor Changes
- CHANGED output dir from
disttolib. - CHANGED Moved
alokaiConfigSchema.jsonto the package. You should now change$schemavalue inalokai.config.jsontonode_modules/@alokai/cli/lib/static/alokaiConfigSchema.jsonand remove.alokai/alokaiConfigSchema.jsonfrom your repository.
Patch Changes
- FIXED
store changedcommand when repository contains just a single commit - FIXED Support cross env variables for Windows. Make sure to add
cross-envlibrary to your project, you can do it by
yarn add cross-env -W -D
0.2.0-rc.2
Minor Changes
- CHANGED Moved
alokaiConfigSchema.jsonto the package. You should now change$schemavalue inalokai.config.jsontonode_modules/@alokai/cli/lib/static/alokaiConfigSchema.jsonand remove.alokai/alokaiConfigSchema.jsonfrom your repository.
0.1.2-rc.1
Patch Changes
- FIXED
store changedcommand when repository contains just a single commit - FIXED Support cross env variables for Windows. Make sure to add
cross-envlibrary to your project, you can do it by
yarn add cross-env -W -D
0.1.2-rc.0
Patch Changes
- FIXED
store changedcommand when repository contains just a single commit - FIXED Support cross env variables for Windows. Make sure to add
cross-envlibrary to your project, you can do it by
yarn add cross-env -W -D
0.1.1
Patch Changes
- FIXED Added missing ssr api url env to the composed package.json
- FIXED
buildcommand returns now exit code 1 when build fails
0.1.0
Minor Changes
- ADDED: Package created. Multistore functionality added.
Patch Changes
- CHANGED
deployment.frontendparameter todeployment.frameworkinalokai.config.json. - FIXED: Added missing lodash-es
0.1.0-rc.2
Patch Changes
- CHANGED
deployment.frontendparameter todeployment.frameworkinalokai.config.json.
0.1.0-rc.1
Patch Changes
- FIXED: Added missing lodash-es
0.1.0-rc.0
Minor Changes
- ADDED: Package created. Multistore functionality added.