@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.
- package/dist/commands/execute.js +4 -5
- package/dist/prompt-data/filter-connections-by-template.d.ts +2 -2
- package/dist/prompt-data/filter-connections-by-template.d.ts.map +1 -1
- package/dist/prompt-data/filter-connections-by-template.js +1 -6
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
package/dist/commands/execute.js
CHANGED
|
@@ -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
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
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
|
|
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<
|
|
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,
|
|
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
|
|
28
|
-
return {
|
|
29
|
-
name: connection.name,
|
|
30
|
-
value: connection,
|
|
31
|
-
};
|
|
32
|
-
});
|
|
27
|
+
return filteredConnections;
|
|
33
28
|
}
|
package/dist/version.d.ts
CHANGED
package/dist/version.js
CHANGED
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED