@commercelayer/cli-plugin-triggers 1.3.1 → 2.0.5

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/bin/dev ADDED
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env node
2
+
3
+ const oclif = require('@oclif/core')
4
+
5
+ const path = require('path')
6
+ const project = path.join(__dirname, '..', 'tsconfig.json')
7
+
8
+ // In dev mode -> use ts-node and dev plugins
9
+ process.env.NODE_ENV = 'development'
10
+
11
+ // eslint-disable-next-line node/no-unpublished-require
12
+ require('ts-node').register({project})
13
+
14
+ // In dev mode, always show stack traces
15
+ oclif.settings.debug = true
16
+
17
+ // Start the CLI
18
+ oclif.run().then(oclif.flush).catch(oclif.Errors.handle)
package/bin/dev.cmd ADDED
@@ -0,0 +1,3 @@
1
+ @echo off
2
+
3
+ node "%~dp0\dev" %*
package/bin/run CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- require('@oclif/command').run()
4
- .then(require('@oclif/command/flush'))
5
- .catch(require('@oclif/errors/handle'))
3
+ const oclif = require('@oclif/core')
4
+
5
+ oclif.run().then(require('@oclif/core/flush')).catch(require('@oclif/core/handle'))
package/lib/base.js CHANGED
@@ -11,7 +11,7 @@ const pkg = require('../package.json');
11
11
  class default_1 extends command_1.default {
12
12
  // INIT (override)
13
13
  async init() {
14
- cli_core_1.update.checkUpdate(pkg);
14
+ cli_core_1.clUpdate.checkUpdate(pkg);
15
15
  return super.init();
16
16
  }
17
17
  async catch(error) {
@@ -26,13 +26,13 @@ class default_1 extends command_1.default {
26
26
  this.error(chalk_1.default.bgRed(`${err.title}: ${err.detail}`), { suggestions: [`Execute login with sufficient privileges to get access to the organization's resources${res ? ` of type ${chalk_1.default.bold(res)}` : ''}`] });
27
27
  }
28
28
  else
29
- this.error(cli_core_1.output.formatError(error, flags));
29
+ this.error(cli_core_1.clOutput.formatError(error, flags));
30
30
  }
31
31
  else
32
32
  throw error;
33
33
  }
34
34
  printOutput(res, flags) {
35
- this.log(cli_core_1.output.formatOutput(res, flags));
35
+ this.log(cli_core_1.clOutput.formatOutput(res, flags));
36
36
  }
37
37
  successMessage(resource, action, id) {
38
38
  this.log(`\nAction ${chalk_1.default.italic.cyanBright(action)} executed without errors on ${resource.replace(/_/g, ' ')} ${chalk_1.default.yellowBright(id)}\n`);
@@ -74,5 +74,5 @@ default_1.flags = {
74
74
  }),
75
75
  };
76
76
  default_1.args = [
77
- { name: 'id', description: 'the unique ID of the resource', required: true },
77
+ { name: 'id', description: 'the unique id of the resource', required: true },
78
78
  ];