diff --git a/README.md b/README.md index ba74f63..4b53148 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ $ npm install -g @contentstack/apps-cli $ csdx COMMAND running command... $ csdx (--version|-v) -@contentstack/apps-cli/1.2.0 darwin-arm64 node-v18.20.2 +@contentstack/apps-cli/1.2.1 darwin-arm64 node-v18.20.2 $ csdx --help [COMMAND] USAGE $ csdx COMMAND @@ -67,7 +67,7 @@ EXAMPLES $ csdx app:reinstall ``` -_See code: [src/commands/app/index.ts](https://github.com/contentstack/apps-cli/blob/v1.2.0/src/commands/app/index.ts)_ +_See code: [src/commands/app/index.ts](https://github.com/contentstack/apps-cli/blob/v1.2.1/src/commands/app/index.ts)_ ## `csdx app:create` @@ -97,7 +97,7 @@ EXAMPLES $ csdx app:create --name App-3 --app-type organization --org -d ./boilerplate -c ./external-config.json ``` -_See code: [src/commands/app/create.ts](https://github.com/contentstack/apps-cli/blob/v1.2.0/src/commands/app/create.ts)_ +_See code: [src/commands/app/create.ts](https://github.com/contentstack/apps-cli/blob/v1.2.1/src/commands/app/create.ts)_ ## `csdx app:delete` @@ -121,7 +121,7 @@ EXAMPLES $ csdx app:delete --app-uid --org -d ./boilerplate ``` -_See code: [src/commands/app/delete.ts](https://github.com/contentstack/apps-cli/blob/v1.2.0/src/commands/app/delete.ts)_ +_See code: [src/commands/app/delete.ts](https://github.com/contentstack/apps-cli/blob/v1.2.1/src/commands/app/delete.ts)_ ## `csdx app:deploy` @@ -158,7 +158,7 @@ EXAMPLES $ csdx app:deploy --org --app-uid --hosting-type --launch-project --config ``` -_See code: [src/commands/app/deploy.ts](https://github.com/contentstack/apps-cli/blob/v1.2.0/src/commands/app/deploy.ts)_ +_See code: [src/commands/app/deploy.ts](https://github.com/contentstack/apps-cli/blob/v1.2.1/src/commands/app/deploy.ts)_ ## `csdx app:get` @@ -187,7 +187,7 @@ EXAMPLES $ csdx app:get --org --app-uid --app-type organization ``` -_See code: [src/commands/app/get.ts](https://github.com/contentstack/apps-cli/blob/v1.2.0/src/commands/app/get.ts)_ +_See code: [src/commands/app/get.ts](https://github.com/contentstack/apps-cli/blob/v1.2.1/src/commands/app/get.ts)_ ## `csdx app:install` @@ -212,7 +212,7 @@ EXAMPLES $ csdx app:install --org --app-uid --stack-api-key ``` -_See code: [src/commands/app/install.ts](https://github.com/contentstack/apps-cli/blob/v1.2.0/src/commands/app/install.ts)_ +_See code: [src/commands/app/install.ts](https://github.com/contentstack/apps-cli/blob/v1.2.1/src/commands/app/install.ts)_ ## `csdx app:reinstall` @@ -237,7 +237,7 @@ EXAMPLES $ csdx app:reinstall --org --app-uid --stack-api-key ``` -_See code: [src/commands/app/reinstall.ts](https://github.com/contentstack/apps-cli/blob/v1.2.0/src/commands/app/reinstall.ts)_ +_See code: [src/commands/app/reinstall.ts](https://github.com/contentstack/apps-cli/blob/v1.2.1/src/commands/app/reinstall.ts)_ ## `csdx app:uninstall` @@ -263,7 +263,7 @@ EXAMPLES $ csdx app:uninstall --org --app-uid --installation-uid ``` -_See code: [src/commands/app/uninstall.ts](https://github.com/contentstack/apps-cli/blob/v1.2.0/src/commands/app/uninstall.ts)_ +_See code: [src/commands/app/uninstall.ts](https://github.com/contentstack/apps-cli/blob/v1.2.1/src/commands/app/uninstall.ts)_ ## `csdx app:update` @@ -285,5 +285,5 @@ EXAMPLES $ csdx app:update --app-manifest ./boilerplate/manifest.json ``` -_See code: [src/commands/app/update.ts](https://github.com/contentstack/apps-cli/blob/v1.2.0/src/commands/app/update.ts)_ +_See code: [src/commands/app/update.ts](https://github.com/contentstack/apps-cli/blob/v1.2.1/src/commands/app/update.ts)_ diff --git a/package-lock.json b/package-lock.json index 615c53a..e508ad7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@contentstack/apps-cli", - "version": "1.2.0", + "version": "1.2.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@contentstack/apps-cli", - "version": "1.2.0", + "version": "1.2.1", "license": "MIT", "dependencies": { "@contentstack/cli-command": "^1.2.18", diff --git a/package.json b/package.json index 948e954..72b113b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@contentstack/apps-cli", - "version": "1.2.0", + "version": "1.2.1", "description": "App ClI", "author": "Contentstack CLI", "homepage": "https://github.com/contentstack/contentstack-apps-cli", diff --git a/src/messages/index.ts b/src/messages/index.ts index 9395b83..7af4132 100644 --- a/src/messages/index.ts +++ b/src/messages/index.ts @@ -152,7 +152,8 @@ const $t = (msg: string, args: Record): string => { for (const key of Object.keys(args)) { const escapedKey = key.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); - msg = msg.replace(new RegExp(`{${escapedKey}}`, "g"), args[key]); + const placeholder = `{${escapedKey}}`; + msg = msg.split(placeholder).join(args[key]); } return msg;