Skip to content

Commit

Permalink
Merge pull request #174 from contentstack/fix/sre
Browse files Browse the repository at this point in the history
SRE fixes
  • Loading branch information
cs-raj authored Jan 9, 2024
2 parents e2a6cf6 + c0e077a commit ed063bf
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 15 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 Contentstack
Copyright (c) 2024 Contentstack

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
42 changes: 35 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ $ npm install -g @contentstack/apps-cli
$ csdx COMMAND
running command...
$ csdx (--version|-v)
@contentstack/apps-cli/1.0.3 darwin-arm64 node-v20.3.1
@contentstack/apps-cli/1.0.4 darwin-arm64 node-v20.10.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand All @@ -30,13 +30,41 @@ USAGE

# Commands
<!-- commands -->
* [`csdx app`](#csdx-app)
* [`csdx app:create`](#csdx-appcreate)
* [`csdx app:delete`](#csdx-appdelete)
* [`csdx app:get`](#csdx-appget)
* [`csdx app:install`](#csdx-appinstall)
* [`csdx app:uninstall`](#csdx-appuninstall)
* [`csdx app:update`](#csdx-appupdate)

## `csdx app`

Apps CLI plugin

```
USAGE
$ csdx app
DESCRIPTION
Apps CLI plugin
EXAMPLES
$ csdx app:create
$ csdx app:get
$ csdx app:update
$ csdx app:delete
$ csdx app:install
$ csdx app:uninstall
```

_See code: [src/commands/app/index.ts](https://github.com/contentstack/apps-cli/blob/v1.0.4/src/commands/app/index.ts)_

## `csdx app:create`

Create a new app in Developer Hub and optionally clone a boilerplate locally.
Expand Down Expand Up @@ -66,7 +94,7 @@ EXAMPLES
$ csdx app:create --name App-3 --app-type organization --org <UID> -d ./boilerplate -c ./external-config.json
```

_See code: [src/commands/app/create.ts](https://github.com/contentstack/apps-cli/blob/v1.0.3/src/commands/app/create.ts)_
_See code: [src/commands/app/create.ts](https://github.com/contentstack/apps-cli/blob/v1.0.4/src/commands/app/create.ts)_

## `csdx app:delete`

Expand All @@ -91,7 +119,7 @@ EXAMPLES
$ csdx app:delete --app-uid <value> --org <value> -d ./boilerplate
```

_See code: [src/commands/app/delete.ts](https://github.com/contentstack/apps-cli/blob/v1.0.3/src/commands/app/delete.ts)_
_See code: [src/commands/app/delete.ts](https://github.com/contentstack/apps-cli/blob/v1.0.4/src/commands/app/delete.ts)_

## `csdx app:get`

Expand Down Expand Up @@ -121,7 +149,7 @@ EXAMPLES
$ csdx app:get --org <value> --app-uid <value> --app-type organization
```

_See code: [src/commands/app/get.ts](https://github.com/contentstack/apps-cli/blob/v1.0.3/src/commands/app/get.ts)_
_See code: [src/commands/app/get.ts](https://github.com/contentstack/apps-cli/blob/v1.0.4/src/commands/app/get.ts)_

## `csdx app:install`

Expand All @@ -147,7 +175,7 @@ EXAMPLES
$ csdx app:install --org <UID> --app-uid <APP-UID-1> --stack-api-key <STACK-API-KEY-1>
```

_See code: [src/commands/app/install.ts](https://github.com/contentstack/apps-cli/blob/v1.0.3/src/commands/app/install.ts)_
_See code: [src/commands/app/install.ts](https://github.com/contentstack/apps-cli/blob/v1.0.4/src/commands/app/install.ts)_

## `csdx app:uninstall`

Expand All @@ -174,7 +202,7 @@ EXAMPLES
$ csdx app:uninstall --org <UID> --app-uid <APP-UID-1> --installation-uid <INSTALLATION-UID-1>
```

_See code: [src/commands/app/uninstall.ts](https://github.com/contentstack/apps-cli/blob/v1.0.3/src/commands/app/uninstall.ts)_
_See code: [src/commands/app/uninstall.ts](https://github.com/contentstack/apps-cli/blob/v1.0.4/src/commands/app/uninstall.ts)_

## `csdx app:update`

Expand All @@ -197,5 +225,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.0.3/src/commands/app/update.ts)_
_See code: [src/commands/app/update.ts](https://github.com/contentstack/apps-cli/blob/v1.0.4/src/commands/app/update.ts)_
<!-- commandsstop -->
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/messages/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ const $t = (msg: string, args: Record<string, string>): string => {
if (!msg) return "";

for (const key of Object.keys(args)) {
msg = msg.replace(new RegExp(`{${key}}`, 'g'), args[key]);
const escapedKey = key.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
msg = msg.replace(new RegExp(`{${escapedKey}}`, "g"), args[key]);
}

return msg;
Expand Down

0 comments on commit ed063bf

Please sign in to comment.