@contentstack/cli-config 1.4.12 → 1.4.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -18,7 +18,7 @@ $ npm install -g @contentstack/cli-config
18
18
  $ csdx COMMAND
19
19
  running command...
20
20
  $ csdx (--version)
21
- @contentstack/cli-config/1.4.12 linux-x64 node-v18.18.0
21
+ @contentstack/cli-config/1.4.14 linux-x64 node-v18.18.2
22
22
  $ csdx --help [COMMAND]
23
23
  USAGE
24
24
  $ csdx COMMAND
@@ -1,12 +1,11 @@
1
1
  import { Command } from '@contentstack/cli-command';
2
- import { ArgInput, FlagInput, Interfaces, LoggerService } from '@contentstack/cli-utilities';
2
+ import { ArgInput, Interfaces, LoggerService } from '@contentstack/cli-utilities';
3
3
  export type Args<T extends typeof Command> = Interfaces.InferredArgs<T['args']>;
4
4
  export type Flags<T extends typeof Command> = Interfaces.InferredFlags<(typeof BaseCommand)['baseFlags'] & T['flags']>;
5
5
  export declare abstract class BaseCommand<T extends typeof Command> extends Command {
6
6
  logger: LoggerService;
7
7
  protected args: Args<T>;
8
8
  protected flags: Flags<T>;
9
- static baseFlags: FlagInput;
10
9
  static args: ArgInput<{
11
10
  [arg: string]: any;
12
11
  }>;
@@ -10,14 +10,6 @@ class BaseCommand extends cli_command_1.Command {
10
10
  */
11
11
  async init() {
12
12
  await super.init();
13
- const { args, flags } = await this.parse({
14
- flags: this.ctor.flags,
15
- baseFlags: super.ctor.baseFlags,
16
- args: this.ctor.args,
17
- strict: this.ctor.strict,
18
- });
19
- this.flags = flags;
20
- this.args = args;
21
13
  // Init logger
22
14
  this.logger = new cli_utilities_1.LoggerService(process.cwd(), 'cli-log');
23
15
  }
@@ -47,5 +39,3 @@ class BaseCommand extends cli_command_1.Command {
47
39
  }
48
40
  }
49
41
  exports.BaseCommand = BaseCommand;
50
- // NOTE define flags that canin be inherited by any command that extends BaseCommand
51
- BaseCommand.baseFlags = {};
@@ -2,13 +2,15 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const cli_utilities_1 = require("@contentstack/cli-utilities");
4
4
  function validURL(str) {
5
- const pattern = new RegExp('^(https:\\/\\/)?' + // protocol
6
- '((([a-z0-9A-Z]*)[\\. |-]([a-z0-9A-Z]*))[\\.|-]([a-z0-9]{2,})+(\\.[a-z]{2,}\\.([a-z]{2,})|\\.([a-z]{2,}))|' + // domain name
7
- '((\\d{1,3}\\.){3}\\d{1,3}))' + // OR ip (v4) address
8
- '(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*' + // port and path
9
- '(\\?[;&a-z\\d%_.~+=-]*)?' + // query string
10
- '(\\#[-a-z\\d_]*)?$', 'i');
11
- return Boolean(pattern.test(str));
5
+ const pattern = new RegExp('^(https?:\\/\\/)?' + // protocol (http or https)
6
+ '([a-zA-Z0-9.-]+|' + // domain name
7
+ '((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))' + // IP address
8
+ '(:\\d+)?' + // port
9
+ '(/[-a-zA-Z0-9_.~+-]*)*' + // path
10
+ '(\\?[;&a-zA-Z0-9_.~+=-]*)?' + // query string
11
+ '(\\#[-a-zA-Z0-9_]*)?$', // fragment
12
+ 'i');
13
+ return pattern.test(str);
12
14
  }
13
15
  // Available region list
14
16
  const regions = {
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.4.12",
2
+ "version": "1.4.14",
3
3
  "commands": {
4
4
  "config:get:base-branch": {
5
5
  "id": "config:get:base-branch",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@contentstack/cli-config",
3
3
  "description": "Contentstack CLI plugin for configuration",
4
- "version": "1.4.12",
4
+ "version": "1.4.14",
5
5
  "author": "Contentstack",
6
6
  "scripts": {
7
7
  "build": "npm run clean && npm run compile",
@@ -21,8 +21,8 @@
21
21
  "test:unit:report": "nyc --extension .ts mocha --forbid-only \"test/unit/**/*.test.ts\""
22
22
  },
23
23
  "dependencies": {
24
- "@contentstack/cli-command": "~1.2.13",
25
- "@contentstack/cli-utilities": "~1.5.3",
24
+ "@contentstack/cli-command": "~1.2.15",
25
+ "@contentstack/cli-utilities": "~1.5.5",
26
26
  "chalk": "^4.0.0",
27
27
  "debug": "^4.1.1",
28
28
  "mkdirp": "^1.0.4",