@constructor-io/constructorio-connect-cli 1.12.5 → 1.13.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.
@@ -150,11 +150,10 @@ class Execute extends refresh_connections_command_1.RefreshConnectionsCommand {
150
150
  }
151
151
  async getConnectionForTemplate(templatePath, allConnections) {
152
152
  const choices = await (0, filter_connections_by_template_1.filterConnectionsByTemplate)(templatePath, allConnections);
153
- return await (0, render_prompt_1.renderPrompt)({
154
- choices,
155
- promptMessage: exports.executePromptMessages.connection,
156
- emptyMessage: "No mapped connections found for this template",
157
- });
153
+ if (choices.length === 0) {
154
+ throw new errors_1.CLIError(`No mapped connections found for this template`);
155
+ }
156
+ return choices[0];
158
157
  }
159
158
  }
160
159
  exports.Execute = Execute;
@@ -1,8 +1,8 @@
1
- import { type TemplatePath, type PromptChoices } from "../types";
1
+ import { type TemplatePath } from "../types";
2
2
  import { type ConnectionResponseDto } from "../http/get-connections-request";
3
3
  /**
4
4
  * Returns all connections that are associated with a template by checking
5
5
  * the config file.
6
6
  */
7
- export declare function filterConnectionsByTemplate(templatePath: TemplatePath, connections: ConnectionResponseDto[]): Promise<PromptChoices<ConnectionResponseDto>>;
7
+ export declare function filterConnectionsByTemplate(templatePath: TemplatePath, connections: ConnectionResponseDto[]): Promise<ConnectionResponseDto[]>;
8
8
  //# sourceMappingURL=filter-connections-by-template.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"filter-connections-by-template.d.ts","sourceRoot":"","sources":["../../src/prompt-data/filter-connections-by-template.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,aAAa,EAAE,MAAM,UAAU,CAAC;AACjE,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAG7E;;;GAGG;AACH,wBAAsB,2BAA2B,CAC/C,YAAY,EAAE,YAAY,EAC1B,WAAW,EAAE,qBAAqB,EAAE,GACnC,OAAO,CAAC,aAAa,CAAC,qBAAqB,CAAC,CAAC,CAoC/C"}
1
+ {"version":3,"file":"filter-connections-by-template.d.ts","sourceRoot":"","sources":["../../src/prompt-data/filter-connections-by-template.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAG7E;;;GAGG;AACH,wBAAsB,2BAA2B,CAC/C,YAAY,EAAE,YAAY,EAC1B,WAAW,EAAE,qBAAqB,EAAE,GACnC,OAAO,CAAC,qBAAqB,EAAE,CAAC,CA+BlC"}
@@ -24,10 +24,5 @@ async function filterConnectionsByTemplate(templatePath, connections) {
24
24
  return connectionIds;
25
25
  }, new Set());
26
26
  const filteredConnections = connections.filter((connection) => configConnectionIds.has(connection.id));
27
- return filteredConnections.map((connection) => {
28
- return {
29
- name: connection.name,
30
- value: connection,
31
- };
32
- });
27
+ return filteredConnections;
33
28
  }
package/dist/version.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- declare const _default: "1.12.5";
1
+ declare const _default: "1.13.0";
2
2
  export default _default;
3
3
  //# sourceMappingURL=version.d.ts.map
package/dist/version.js CHANGED
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = '1.12.5';
3
+ exports.default = '1.13.0';
@@ -190,5 +190,5 @@
190
190
  ]
191
191
  }
192
192
  },
193
- "version": "1.12.5"
193
+ "version": "1.13.0"
194
194
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@constructor-io/constructorio-connect-cli",
3
- "version": "1.12.5",
3
+ "version": "1.13.0",
4
4
  "description": "CLI tool to enable users to interface with the Constructor Connect Ecosystem",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",