@trayio/cdk-cli 2.23.0 → 3.0.0

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.
Files changed (56) hide show
  1. package/README.md +87 -87
  2. package/dist/commands/connector/add-operation.d.ts.map +1 -0
  3. package/dist/commands/{add-operation.js → connector/add-operation.js} +2 -2
  4. package/dist/commands/connector/add-operation.unit.test.d.ts.map +1 -0
  5. package/dist/commands/{build.d.ts → connector/build.d.ts} +1 -1
  6. package/dist/commands/connector/build.d.ts.map +1 -0
  7. package/dist/commands/{build.js → connector/build.js} +4 -4
  8. package/dist/commands/{import-openapi-spec.d.ts → connector/import.d.ts} +2 -2
  9. package/dist/commands/connector/import.d.ts.map +1 -0
  10. package/dist/commands/{import-openapi-spec.js → connector/import.js} +5 -5
  11. package/dist/commands/connector/init.d.ts.map +1 -0
  12. package/dist/commands/{init.js → connector/init.js} +2 -2
  13. package/dist/commands/connector/init.unit.test.d.ts.map +1 -0
  14. package/dist/commands/connector/test.d.ts.map +1 -0
  15. package/dist/commands/{deploy.d.ts → deployment/create.d.ts} +2 -2
  16. package/dist/commands/deployment/create.d.ts.map +1 -0
  17. package/dist/commands/{deploy.js → deployment/create.js} +12 -13
  18. package/dist/commands/deployment/create.unit.test.d.ts +2 -0
  19. package/dist/commands/deployment/create.unit.test.d.ts.map +1 -0
  20. package/dist/commands/deployment/create.unit.test.js +95 -0
  21. package/dist/commands/{deployment-status.d.ts → deployment/get.d.ts} +2 -2
  22. package/dist/commands/deployment/get.d.ts.map +1 -0
  23. package/dist/commands/{deployment-status.js → deployment/get.js} +7 -7
  24. package/dist/commands/deployment/get.unit.test.d.ts +2 -0
  25. package/dist/commands/deployment/get.unit.test.d.ts.map +1 -0
  26. package/dist/commands/{deployment-status.unit.test.js → deployment/get.unit.test.js} +5 -5
  27. package/dist/commands/{share.d.ts → permissions/add.d.ts} +2 -2
  28. package/dist/commands/permissions/add.d.ts.map +1 -0
  29. package/dist/commands/{share.js → permissions/add.js} +8 -8
  30. package/dist/commands/permissions/add.unit.test.d.ts +2 -0
  31. package/dist/commands/permissions/add.unit.test.d.ts.map +1 -0
  32. package/dist/commands/{share.unit.test.js → permissions/add.unit.test.js} +3 -3
  33. package/oclif.manifest.json +103 -95
  34. package/package.json +19 -8
  35. package/dist/commands/add-operation.d.ts.map +0 -1
  36. package/dist/commands/add-operation.unit.test.d.ts.map +0 -1
  37. package/dist/commands/build.d.ts.map +0 -1
  38. package/dist/commands/deploy.d.ts.map +0 -1
  39. package/dist/commands/deployment-status.d.ts.map +0 -1
  40. package/dist/commands/deployment-status.unit.test.d.ts +0 -2
  41. package/dist/commands/deployment-status.unit.test.d.ts.map +0 -1
  42. package/dist/commands/import-openapi-spec.d.ts.map +0 -1
  43. package/dist/commands/init.d.ts.map +0 -1
  44. package/dist/commands/init.unit.test.d.ts.map +0 -1
  45. package/dist/commands/share.d.ts.map +0 -1
  46. package/dist/commands/share.unit.test.d.ts +0 -2
  47. package/dist/commands/share.unit.test.d.ts.map +0 -1
  48. package/dist/commands/test.d.ts.map +0 -1
  49. /package/dist/commands/{add-operation.d.ts → connector/add-operation.d.ts} +0 -0
  50. /package/dist/commands/{add-operation.unit.test.d.ts → connector/add-operation.unit.test.d.ts} +0 -0
  51. /package/dist/commands/{add-operation.unit.test.js → connector/add-operation.unit.test.js} +0 -0
  52. /package/dist/commands/{init.d.ts → connector/init.d.ts} +0 -0
  53. /package/dist/commands/{init.unit.test.d.ts → connector/init.unit.test.d.ts} +0 -0
  54. /package/dist/commands/{init.unit.test.js → connector/init.unit.test.js} +0 -0
  55. /package/dist/commands/{test.d.ts → connector/test.d.ts} +0 -0
  56. /package/dist/commands/{test.js → connector/test.js} +0 -0
@@ -13,9 +13,9 @@ const core_1 = require("@oclif/core");
13
13
  const AxiosHttpClient_1 = require("@trayio/axios/http/AxiosHttpClient");
14
14
  const ConnectorDeploymentHttpClient_1 = require("@trayio/tray-client/connector/deployment/ConnectorDeploymentHttpClient");
15
15
  const ConnectorDeploymentApi_1 = require("@trayio/tray-api/connector/deployment/ConnectorDeploymentApi");
16
- const colorizeString_1 = require("../utils/colorizeString");
17
- const check_env_1 = require("../utils/check-env");
18
- class GetDeploymentStatus extends core_1.Command {
16
+ const colorizeString_1 = require("../../utils/colorizeString");
17
+ const check_env_1 = require("../../utils/check-env");
18
+ class Get extends core_1.Command {
19
19
  constructor() {
20
20
  super(...arguments);
21
21
  this.connectorDeployment = new ConnectorDeploymentHttpClient_1.ConnectorDeploymentHttpClient({
@@ -25,7 +25,7 @@ class GetDeploymentStatus extends core_1.Command {
25
25
  run() {
26
26
  return __awaiter(this, void 0, void 0, function* () {
27
27
  (0, check_env_1.checkEnv)();
28
- const { args } = yield this.parse(GetDeploymentStatus);
28
+ const { args } = yield this.parse(Get);
29
29
  const TRAY_API_TOKEN = process.env.TRAY_API_TOKEN;
30
30
  const input = {
31
31
  connectorName: args.connectorName,
@@ -59,8 +59,8 @@ class GetDeploymentStatus extends core_1.Command {
59
59
  });
60
60
  }
61
61
  }
62
- GetDeploymentStatus.description = 'Retrieves the status of a connector deployment';
63
- GetDeploymentStatus.args = {
62
+ Get.description = 'Retrieves the status of a connector deployment';
63
+ Get.args = {
64
64
  connectorName: core_1.Args.string({
65
65
  name: 'Connector Name',
66
66
  required: true,
@@ -77,4 +77,4 @@ GetDeploymentStatus.args = {
77
77
  description: 'The UUID of the deployment, this is included in the tray-cdk deploy output',
78
78
  }),
79
79
  };
80
- exports.default = GetDeploymentStatus;
80
+ exports.default = Get;
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=get.unit.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get.unit.test.d.ts","sourceRoot":"","sources":["../../../src/commands/deployment/get.unit.test.ts"],"names":[],"mappings":""}
@@ -15,7 +15,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
15
15
  const stdout_stderr_1 = require("stdout-stderr");
16
16
  const ConnectorDeploymentApi_1 = require("@trayio/tray-api/connector/deployment/ConnectorDeploymentApi");
17
17
  const ConnectorDeploymentHttpClient_1 = require("@trayio/tray-client/connector/deployment/ConnectorDeploymentHttpClient");
18
- const deployment_status_1 = __importDefault(require("./deployment-status"));
18
+ const get_1 = __importDefault(require("./get"));
19
19
  jest.mock('@trayio/tray-client/connector/deployment/ConnectorDeploymentHttpClient', () => ({
20
20
  ConnectorDeploymentHttpClient: jest.fn(),
21
21
  }));
@@ -51,21 +51,21 @@ describe('GetDeploymentStatus', () => {
51
51
  it('should log success message when connector is deployed', () => __awaiter(void 0, void 0, void 0, function* () {
52
52
  status = ConnectorDeploymentApi_1.ConnectorDeploymentStatus.Deployed;
53
53
  stdout_stderr_1.stdout.start();
54
- yield deployment_status_1.default.run([connectorName, connectorVersion, uuid]);
54
+ yield get_1.default.run([connectorName, connectorVersion, uuid]);
55
55
  stdout_stderr_1.stdout.stop();
56
56
  expect(stdout_stderr_1.stdout.output).toEqual(expect.stringContaining('Connector Deployed Successfully!'));
57
57
  }));
58
58
  it('should log failed message when connector failed to deploy', () => __awaiter(void 0, void 0, void 0, function* () {
59
59
  status = ConnectorDeploymentApi_1.ConnectorDeploymentStatus.Failed;
60
60
  stdout_stderr_1.stdout.start();
61
- yield deployment_status_1.default.run([connectorName, connectorVersion, uuid]);
61
+ yield get_1.default.run([connectorName, connectorVersion, uuid]);
62
62
  stdout_stderr_1.stdout.stop();
63
63
  expect(stdout_stderr_1.stdout.output).toEqual(expect.stringContaining('Connector Deploy Failed, please try again or contact support'));
64
64
  }));
65
65
  it('should log connector is still deploying message when deploying', () => __awaiter(void 0, void 0, void 0, function* () {
66
66
  status = ConnectorDeploymentApi_1.ConnectorDeploymentStatus.Deploying;
67
67
  stdout_stderr_1.stdout.start();
68
- yield deployment_status_1.default.run([connectorName, connectorVersion, uuid]);
68
+ yield get_1.default.run([connectorName, connectorVersion, uuid]);
69
69
  stdout_stderr_1.stdout.stop();
70
70
  expect(stdout_stderr_1.stdout.output).toEqual(expect.stringContaining('Connector is currently being deployed, this could take a few minutes. Please check the connector status again later.'));
71
71
  }));
@@ -74,7 +74,7 @@ describe('GetDeploymentStatus', () => {
74
74
  failure = true;
75
75
  status = ConnectorDeploymentApi_1.ConnectorDeploymentStatus.Failed;
76
76
  stdout_stderr_1.stdout.start();
77
- yield deployment_status_1.default.run([connectorName, connectorVersion, uuid]);
77
+ yield get_1.default.run([connectorName, connectorVersion, uuid]);
78
78
  stdout_stderr_1.stdout.stop();
79
79
  expect(stdout_stderr_1.stdout.output).toEqual(expect.stringContaining('Connector Deploy Failed, please try again or contact support'));
80
80
  expect(stdout_stderr_1.stdout.output).toEqual(expect.stringContaining('There was an error fetching deployment status'));
@@ -1,5 +1,5 @@
1
1
  import { Command } from '@oclif/core';
2
- export default class Share extends Command {
2
+ export default class Add extends Command {
3
3
  static description: string;
4
4
  static examples: string[];
5
5
  static args: {
@@ -16,4 +16,4 @@ export default class Share extends Command {
16
16
  private splitList;
17
17
  private truncateVersion;
18
18
  }
19
- //# sourceMappingURL=share.d.ts.map
19
+ //# sourceMappingURL=add.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add.d.ts","sourceRoot":"","sources":["../../../src/commands/permissions/add.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,OAAO,EAAa,MAAM,aAAa,CAAC;AAWvD,MAAM,CAAC,OAAO,OAAO,GAAI,SAAQ,OAAO;IACvC,MAAM,CAAC,WAAW,SACoD;IAEtE,MAAM,CAAC,QAAQ,WAQb;IAEF,MAAM,CAAC,IAAI;;;MAWT;IAEF,MAAM,CAAC,KAAK;;MAYV;IAEF,OAAO,CAAC,oBAAoB,CAK1B;IAEW,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;YA4EnB,kBAAkB;YA+BlB,sBAAsB;IAoCpC,OAAO,CAAC,SAAS;IAOjB,OAAO,CAAC,eAAe;CAGvB"}
@@ -16,12 +16,12 @@ const core_1 = require("@oclif/core");
16
16
  const inquirer_1 = __importDefault(require("inquirer"));
17
17
  const AxiosHttpClient_1 = require("@trayio/axios/http/AxiosHttpClient");
18
18
  const ConnectorPermissionsHttpClient_1 = require("@trayio/tray-client/connector/permissions/ConnectorPermissionsHttpClient");
19
- const colorizeString_1 = require("../utils/colorizeString");
19
+ const colorizeString_1 = require("../../utils/colorizeString");
20
20
  /*
21
21
  * Note: the workspaces feature is commented due to security concerns
22
22
  * We might want to revisit this in the future to implement it
23
23
  */
24
- class Share extends core_1.Command {
24
+ class Add extends core_1.Command {
25
25
  constructor() {
26
26
  super(...arguments);
27
27
  this.connectorPermissions = new ConnectorPermissionsHttpClient_1.ConnectorPermissionsHttpClient({
@@ -30,7 +30,7 @@ class Share extends core_1.Command {
30
30
  }
31
31
  run() {
32
32
  return __awaiter(this, void 0, void 0, function* () {
33
- const { args, flags } = yield this.parse(Share);
33
+ const { args, flags } = yield this.parse(Add);
34
34
  const TRAY_API_TOKEN = process.env.TRAY_API_TOKEN;
35
35
  const promptRes = yield inquirer_1.default.prompt([
36
36
  {
@@ -148,8 +148,8 @@ class Share extends core_1.Command {
148
148
  return version.split('.').slice(0, 2).join('.');
149
149
  }
150
150
  }
151
- Share.description = 'Share your connector version with other users in your organization';
152
- Share.examples = [
151
+ Add.description = 'Share your connector version with other users in your organization';
152
+ Add.examples = [
153
153
  '<%= config.bin %> <%= command.id %>',
154
154
  '<%= config.bin %> <%= command.id %> my-connector',
155
155
  '<%= config.bin %> <%= command.id %> my-connector 1.0',
@@ -158,7 +158,7 @@ Share.examples = [
158
158
  // '<%= config.bin %> <%= command.id %> my-connector 1.0 --workspace="<workspace-id>, <another-workspace-id>"',
159
159
  // '<%= config.bin %> <%= command.id %> my-connector 1.0 -w="<workspace-id>, <another-workspace-id>"',
160
160
  ];
161
- Share.args = {
161
+ Add.args = {
162
162
  connectorName: core_1.Args.string({
163
163
  name: 'Connector Name',
164
164
  required: false,
@@ -170,7 +170,7 @@ Share.args = {
170
170
  description: 'The version of the connector',
171
171
  }),
172
172
  };
173
- Share.flags = {
173
+ Add.flags = {
174
174
  email: core_1.Flags.string({
175
175
  char: 'e',
176
176
  aliases: ['emails', 'email'],
@@ -183,4 +183,4 @@ Share.flags = {
183
183
  // 'Share with the emails of users in a workspace by providing a list of workspace IDs',
184
184
  // }),
185
185
  };
186
- exports.default = Share;
186
+ exports.default = Add;
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=add.unit.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add.unit.test.d.ts","sourceRoot":"","sources":["../../../src/commands/permissions/add.unit.test.ts"],"names":[],"mappings":""}
@@ -14,7 +14,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  const stdout_stderr_1 = require("stdout-stderr");
16
16
  const ConnectorPermissionsHttpClient_1 = require("@trayio/tray-client/connector/permissions/ConnectorPermissionsHttpClient");
17
- const share_1 = __importDefault(require("./share"));
17
+ const add_1 = __importDefault(require("./add"));
18
18
  jest.mock('@trayio/tray-client/connector/permissions/ConnectorPermissionsHttpClient', () => ({
19
19
  ConnectorPermissionsHttpClient: jest.fn(),
20
20
  }));
@@ -69,7 +69,7 @@ describe('Share', () => {
69
69
  it('should log success message when connector is shared by email', () => __awaiter(void 0, void 0, void 0, function* () {
70
70
  success = true;
71
71
  stdout_stderr_1.stdout.start();
72
- yield share_1.default.run([connectorName, connectorVersion, `--email='${emails}'`]);
72
+ yield add_1.default.run([connectorName, connectorVersion, `--email='${emails}'`]);
73
73
  stdout_stderr_1.stdout.stop();
74
74
  expect(mockedShareWithEmailsSuccess).toHaveBeenCalledWith({
75
75
  connectorName,
@@ -82,7 +82,7 @@ describe('Share', () => {
82
82
  it('should log error messages when share with emails fails', () => __awaiter(void 0, void 0, void 0, function* () {
83
83
  success = false;
84
84
  stdout_stderr_1.stdout.start();
85
- yield share_1.default.run([connectorName, connectorVersion, `--emails='${emails}'`]);
85
+ yield add_1.default.run([connectorName, connectorVersion, `--emails='${emails}'`]);
86
86
  stdout_stderr_1.stdout.stop();
87
87
  expect(stdout_stderr_1.stdout.output).toEqual(expect.stringContaining('Connector Share By Email Failed, please try again or contact support'));
88
88
  expect(stdout_stderr_1.stdout.output).toEqual(expect.stringContaining(`The connector (Left(some-connector-name~1.1)) was not found or you don't have permission to access it`));
@@ -1,6 +1,23 @@
1
1
  {
2
2
  "commands": {
3
- "add-operation": {
3
+ ".": {
4
+ "aliases": [],
5
+ "args": {},
6
+ "flags": {},
7
+ "hasDynamicHelp": false,
8
+ "hiddenAliases": [],
9
+ "id": ".",
10
+ "pluginAlias": "@trayio/cdk-cli",
11
+ "pluginName": "@trayio/cdk-cli",
12
+ "pluginType": "core",
13
+ "isESM": false,
14
+ "relativePath": [
15
+ "dist",
16
+ "commands",
17
+ "index.js"
18
+ ]
19
+ },
20
+ "connector:add-operation": {
4
21
  "aliases": [],
5
22
  "args": {
6
23
  "operationName": {
@@ -22,7 +39,7 @@
22
39
  "flags": {},
23
40
  "hasDynamicHelp": false,
24
41
  "hiddenAliases": [],
25
- "id": "add-operation",
42
+ "id": "connector:add-operation",
26
43
  "pluginAlias": "@trayio/cdk-cli",
27
44
  "pluginName": "@trayio/cdk-cli",
28
45
  "pluginType": "core",
@@ -32,17 +49,18 @@
32
49
  "relativePath": [
33
50
  "dist",
34
51
  "commands",
52
+ "connector",
35
53
  "add-operation.js"
36
54
  ]
37
55
  },
38
- "build": {
56
+ "connector:build": {
39
57
  "aliases": [],
40
58
  "args": {},
41
59
  "description": "Builds a connector project",
42
60
  "flags": {},
43
61
  "hasDynamicHelp": false,
44
62
  "hiddenAliases": [],
45
- "id": "build",
63
+ "id": "connector:build",
46
64
  "pluginAlias": "@trayio/cdk-cli",
47
65
  "pluginName": "@trayio/cdk-cli",
48
66
  "pluginType": "core",
@@ -52,17 +70,29 @@
52
70
  "relativePath": [
53
71
  "dist",
54
72
  "commands",
73
+ "connector",
55
74
  "build.js"
56
75
  ]
57
76
  },
58
- "deploy": {
77
+ "connector:import": {
59
78
  "aliases": [],
60
- "args": {},
61
- "description": "Deploys a connector project",
79
+ "args": {
80
+ "openApiSpec": {
81
+ "description": "Location of the OpenAPI specification file",
82
+ "name": "openApiSpec",
83
+ "required": false
84
+ },
85
+ "connectorName": {
86
+ "description": "The name of the connector",
87
+ "name": "connectorName",
88
+ "required": false
89
+ }
90
+ },
91
+ "description": "Create a connector from an OpenAPI specification: Command is still in BETA",
62
92
  "flags": {},
63
93
  "hasDynamicHelp": false,
64
94
  "hiddenAliases": [],
65
- "id": "deploy",
95
+ "id": "connector:import",
66
96
  "pluginAlias": "@trayio/cdk-cli",
67
97
  "pluginName": "@trayio/cdk-cli",
68
98
  "pluginType": "core",
@@ -72,33 +102,32 @@
72
102
  "relativePath": [
73
103
  "dist",
74
104
  "commands",
75
- "deploy.js"
105
+ "connector",
106
+ "import.js"
76
107
  ]
77
108
  },
78
- "deployment-status": {
109
+ "connector:init": {
79
110
  "aliases": [],
80
111
  "args": {
81
112
  "connectorName": {
82
- "description": "The name of the connector",
113
+ "description": "Connector directory name to generate template files",
83
114
  "name": "connectorName",
84
- "required": true
85
- },
86
- "connectorVersion": {
87
- "description": "The version of the connector",
88
- "name": "connectorVersion",
89
- "required": true
90
- },
91
- "uuid": {
92
- "description": "The UUID of the deployment, this is included in the tray-cdk deploy output",
93
- "name": "uuid",
94
- "required": true
115
+ "required": false
116
+ }
117
+ },
118
+ "description": "Initialize a connector project",
119
+ "flags": {
120
+ "install": {
121
+ "char": "i",
122
+ "description": "Runs `npm install` after successful generation",
123
+ "name": "install",
124
+ "allowNo": false,
125
+ "type": "boolean"
95
126
  }
96
127
  },
97
- "description": "Retrieves the status of a connector deployment",
98
- "flags": {},
99
128
  "hasDynamicHelp": false,
100
129
  "hiddenAliases": [],
101
- "id": "deployment-status",
130
+ "id": "connector:init",
102
131
  "pluginAlias": "@trayio/cdk-cli",
103
132
  "pluginName": "@trayio/cdk-cli",
104
133
  "pluginType": "core",
@@ -108,28 +137,32 @@
108
137
  "relativePath": [
109
138
  "dist",
110
139
  "commands",
111
- "deployment-status.js"
140
+ "connector",
141
+ "init.js"
112
142
  ]
113
143
  },
114
- "import-openapi-spec": {
144
+ "connector:test": {
115
145
  "aliases": [],
116
146
  "args": {
117
- "openApiSpec": {
118
- "description": "Location of the OpenAPI specification file",
119
- "name": "openApiSpec",
120
- "required": false
121
- },
122
- "connectorName": {
123
- "description": "The name of the connector",
124
- "name": "connectorName",
147
+ "operationName": {
148
+ "description": "Operation name to run the test against",
149
+ "name": "operationName",
125
150
  "required": false
126
151
  }
127
152
  },
128
- "description": "Create a connector from an OpenAPI specification: Command is still in BETA",
129
- "flags": {},
153
+ "description": "Build and test connector project or an operation",
154
+ "flags": {
155
+ "verbose": {
156
+ "char": "v",
157
+ "description": "Logs the input and output of an operation, requires operation name argument to be specified",
158
+ "name": "verbose",
159
+ "allowNo": false,
160
+ "type": "boolean"
161
+ }
162
+ },
130
163
  "hasDynamicHelp": false,
131
164
  "hiddenAliases": [],
132
- "id": "import-openapi-spec",
165
+ "id": "connector:test",
133
166
  "pluginAlias": "@trayio/cdk-cli",
134
167
  "pluginName": "@trayio/cdk-cli",
135
168
  "pluginType": "core",
@@ -139,48 +172,55 @@
139
172
  "relativePath": [
140
173
  "dist",
141
174
  "commands",
142
- "import-openapi-spec.js"
175
+ "connector",
176
+ "test.js"
143
177
  ]
144
178
  },
145
- ".": {
179
+ "deployment:create": {
146
180
  "aliases": [],
147
181
  "args": {},
182
+ "description": "Creates a new deployment for a connector project",
148
183
  "flags": {},
149
184
  "hasDynamicHelp": false,
150
185
  "hiddenAliases": [],
151
- "id": ".",
186
+ "id": "deployment:create",
152
187
  "pluginAlias": "@trayio/cdk-cli",
153
188
  "pluginName": "@trayio/cdk-cli",
154
189
  "pluginType": "core",
190
+ "strict": true,
191
+ "enableJsonFlag": false,
155
192
  "isESM": false,
156
193
  "relativePath": [
157
194
  "dist",
158
195
  "commands",
159
- "index.js"
196
+ "deployment",
197
+ "create.js"
160
198
  ]
161
199
  },
162
- "init": {
200
+ "deployment:get": {
163
201
  "aliases": [],
164
202
  "args": {
165
203
  "connectorName": {
166
- "description": "Connector directory name to generate template files",
204
+ "description": "The name of the connector",
167
205
  "name": "connectorName",
168
- "required": false
169
- }
170
- },
171
- "description": "Initialize a connector project",
172
- "flags": {
173
- "install": {
174
- "char": "i",
175
- "description": "Runs `npm install` after successful generation",
176
- "name": "install",
177
- "allowNo": false,
178
- "type": "boolean"
206
+ "required": true
207
+ },
208
+ "connectorVersion": {
209
+ "description": "The version of the connector",
210
+ "name": "connectorVersion",
211
+ "required": true
212
+ },
213
+ "uuid": {
214
+ "description": "The UUID of the deployment, this is included in the tray-cdk deploy output",
215
+ "name": "uuid",
216
+ "required": true
179
217
  }
180
218
  },
219
+ "description": "Retrieves the status of a connector deployment",
220
+ "flags": {},
181
221
  "hasDynamicHelp": false,
182
222
  "hiddenAliases": [],
183
- "id": "init",
223
+ "id": "deployment:get",
184
224
  "pluginAlias": "@trayio/cdk-cli",
185
225
  "pluginName": "@trayio/cdk-cli",
186
226
  "pluginType": "core",
@@ -190,10 +230,11 @@
190
230
  "relativePath": [
191
231
  "dist",
192
232
  "commands",
193
- "init.js"
233
+ "deployment",
234
+ "get.js"
194
235
  ]
195
236
  },
196
- "share": {
237
+ "permissions:add": {
197
238
  "aliases": [],
198
239
  "args": {
199
240
  "connectorName": {
@@ -231,41 +272,7 @@
231
272
  },
232
273
  "hasDynamicHelp": false,
233
274
  "hiddenAliases": [],
234
- "id": "share",
235
- "pluginAlias": "@trayio/cdk-cli",
236
- "pluginName": "@trayio/cdk-cli",
237
- "pluginType": "core",
238
- "strict": true,
239
- "enableJsonFlag": false,
240
- "isESM": false,
241
- "relativePath": [
242
- "dist",
243
- "commands",
244
- "share.js"
245
- ]
246
- },
247
- "test": {
248
- "aliases": [],
249
- "args": {
250
- "operationName": {
251
- "description": "Operation name to run the test against",
252
- "name": "operationName",
253
- "required": false
254
- }
255
- },
256
- "description": "Build and test connector project or an operation",
257
- "flags": {
258
- "verbose": {
259
- "char": "v",
260
- "description": "Logs the input and output of an operation, requires operation name argument to be specified",
261
- "name": "verbose",
262
- "allowNo": false,
263
- "type": "boolean"
264
- }
265
- },
266
- "hasDynamicHelp": false,
267
- "hiddenAliases": [],
268
- "id": "test",
275
+ "id": "permissions:add",
269
276
  "pluginAlias": "@trayio/cdk-cli",
270
277
  "pluginName": "@trayio/cdk-cli",
271
278
  "pluginType": "core",
@@ -275,7 +282,8 @@
275
282
  "relativePath": [
276
283
  "dist",
277
284
  "commands",
278
- "test.js"
285
+ "permissions",
286
+ "add.js"
279
287
  ]
280
288
  },
281
289
  "permissions:list": {
@@ -316,5 +324,5 @@
316
324
  ]
317
325
  }
318
326
  },
319
- "version": "2.23.0"
327
+ "version": "3.0.0"
320
328
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trayio/cdk-cli",
3
- "version": "2.23.0",
3
+ "version": "3.0.0",
4
4
  "description": "A CLI for connector development",
5
5
  "exports": {
6
6
  "./*": "./dist/*.js"
@@ -19,12 +19,12 @@
19
19
  "@oclif/plugin-help": "6.0.12",
20
20
  "@oclif/plugin-version": "2.0.11",
21
21
  "@oclif/test": "3.1.12",
22
- "@trayio/axios": "2.23.0",
23
- "@trayio/cdk-build": "2.23.0",
24
- "@trayio/commons": "2.23.0",
25
- "@trayio/generator": "2.23.0",
26
- "@trayio/tray-client": "2.23.0",
27
- "@trayio/tray-openapi": "2.23.0",
22
+ "@trayio/axios": "3.0.0",
23
+ "@trayio/cdk-build": "3.0.0",
24
+ "@trayio/commons": "3.0.0",
25
+ "@trayio/generator": "3.0.0",
26
+ "@trayio/tray-client": "3.0.0",
27
+ "@trayio/tray-openapi": "3.0.0",
28
28
  "@types/inquirer": "8.2.6",
29
29
  "chalk": "4.1.2",
30
30
  "inquirer": "8.2.5"
@@ -60,7 +60,18 @@
60
60
  ],
61
61
  "additionalVersionFlags": [
62
62
  "-v"
63
- ]
63
+ ],
64
+ "topics": {
65
+ "connector": {
66
+ "description": "Commands for managing connector development"
67
+ },
68
+ "deployment": {
69
+ "description": "Commands for managing connector deployments"
70
+ },
71
+ "permissions": {
72
+ "description": "Commands for managing connector permissions"
73
+ }
74
+ }
64
75
  },
65
76
  "scripts": {
66
77
  "oclif:clean": "rm -f oclif.manifest.json",
@@ -1 +0,0 @@
1
- {"version":3,"file":"add-operation.d.ts","sourceRoot":"","sources":["../../src/commands/add-operation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAQ,MAAM,aAAa,CAAC;AAqB5C,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,OAAO;IAChD,MAAM,CAAC,WAAW,SAA2C;IAE7D,MAAM,CAAC,IAAI;;;MAYT;IAEF,OAAO,CAAC,SAAS,CAAyB;IAEpC,GAAG;CAqDT"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"add-operation.unit.test.d.ts","sourceRoot":"","sources":["../../src/commands/add-operation.unit.test.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/commands/build.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAItC,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,OAAO;IAClD,MAAM,CAAC,WAAW,SAAgC;IAElD,MAAM,CAAC,IAAI,KAAM;IAEjB,OAAO,CAAC,gBAAgB,CAA0B;IAE5C,GAAG;CAMT"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/commands/deploy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAM,MAAM,aAAa,CAAC;AAW1C,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,OAAO;IACnD,MAAM,CAAC,WAAW,SAAiC;IAEnD,MAAM,CAAC,IAAI,KAAM;IAEjB,OAAO,CAAC,mBAAmB,CAKzB;IAEI,GAAG;CA2DT"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"deployment-status.d.ts","sourceRoot":"","sources":["../../src/commands/deployment-status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,aAAa,CAAC;AAOhD,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,OAAO;IACvD,MAAM,CAAC,WAAW,SAAoD;IAEtE,MAAM,CAAC,IAAI;;;;MAiBT;IAEF,OAAO,CAAC,mBAAmB,CAKzB;IAEI,GAAG;CAyDT"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=deployment-status.unit.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"deployment-status.unit.test.d.ts","sourceRoot":"","sources":["../../src/commands/deployment-status.unit.test.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"import-openapi-spec.d.ts","sourceRoot":"","sources":["../../src/commands/import-openapi-spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAQ,MAAM,aAAa,CAAC;AAS5C,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,OAAO;IACrD,MAAM,CAAC,WAAW,SAC4D;IAE9E,MAAM,CAAC,IAAI;;;MAWT;IAEI,GAAG;CAiET"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAmB,MAAM,aAAa,CAAC;AAUvD,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,OAAO;IACxC,MAAM,CAAC,WAAW,SAAoC;IAEtD,MAAM,CAAC,IAAI;;MAMT;IAEF,MAAM,CAAC,KAAK;;MAKV;IAEF,OAAO,CAAC,SAAS,CAAyB;IAEpC,GAAG;CAiDT"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"init.unit.test.d.ts","sourceRoot":"","sources":["../../src/commands/init.unit.test.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"share.d.ts","sourceRoot":"","sources":["../../src/commands/share.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,OAAO,EAAa,MAAM,aAAa,CAAC;AAWvD,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,OAAO;IACzC,MAAM,CAAC,WAAW,SACoD;IAEtE,MAAM,CAAC,QAAQ,WAQb;IAEF,MAAM,CAAC,IAAI;;;MAWT;IAEF,MAAM,CAAC,KAAK;;MAYV;IAEF,OAAO,CAAC,oBAAoB,CAK1B;IAEW,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;YA4EnB,kBAAkB;YA+BlB,sBAAsB;IAoCpC,OAAO,CAAC,SAAS;IAOjB,OAAO,CAAC,eAAe;CAGvB"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=share.unit.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"share.unit.test.d.ts","sourceRoot":"","sources":["../../src/commands/share.unit.test.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"test.d.ts","sourceRoot":"","sources":["../../src/commands/test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAe,MAAM,aAAa,CAAC;AAMnD,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,OAAO;IACxC,MAAM,CAAC,WAAW,SAAsD;IAExE,MAAM,CAAC,IAAI;;MAMT;IAEF,MAAM,CAAC,KAAK;;MAMV;IAEI,GAAG;CAwBT"}