@constructor-io/constructorio-connect-cli 1.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.
- package/LICENSE +21 -0
- package/README.md +184 -0
- package/bin/dev.cmd +3 -0
- package/bin/dev.js +16 -0
- package/bin/run.cmd +3 -0
- package/bin/run.js +10 -0
- package/boilerplate-repo/.env.example +1 -0
- package/boilerplate-repo/.eslintrc.json +11 -0
- package/boilerplate-repo/.vscode/extensions.json +5 -0
- package/boilerplate-repo/.vscode/launch.json +13 -0
- package/boilerplate-repo/.vscode/tasks.json +20 -0
- package/boilerplate-repo/LICENSE +21 -0
- package/boilerplate-repo/README.md +650 -0
- package/boilerplate-repo/connectrc.js +7 -0
- package/boilerplate-repo/package.json +21 -0
- package/boilerplate-repo/src/fixtures/item/item.json +39 -0
- package/boilerplate-repo/src/fixtures/item_group/item_group.json +22 -0
- package/boilerplate-repo/src/fixtures/mapping/mapping.json +26 -0
- package/boilerplate-repo/src/fixtures/variation/variation.json +11 -0
- package/boilerplate-repo/src/templates/grouping/grouping.jsonata +37 -0
- package/boilerplate-repo/src/templates/helpers.jsonata +3 -0
- package/boilerplate-repo/src/templates/item/item.jsonata +26 -0
- package/boilerplate-repo/src/templates/item_group/item_group.jsonata +4 -0
- package/boilerplate-repo/src/templates/mapping/mapping.jsonata +34 -0
- package/boilerplate-repo/src/templates/variation/variation.jsonata +26 -0
- package/dist/commands/deploy.d.ts +10 -0
- package/dist/commands/deploy.d.ts.map +1 -0
- package/dist/commands/deploy.js +64 -0
- package/dist/commands/execute.d.ts +35 -0
- package/dist/commands/execute.d.ts.map +1 -0
- package/dist/commands/execute.js +145 -0
- package/dist/commands/init.d.ts +18 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +172 -0
- package/dist/customer/config.d.ts +6 -0
- package/dist/customer/config.d.ts.map +1 -0
- package/dist/customer/config.js +40 -0
- package/dist/customer/get-connect-token.d.ts +15 -0
- package/dist/customer/get-connect-token.d.ts.map +1 -0
- package/dist/customer/get-connect-token.js +69 -0
- package/dist/customer/path.d.ts +26 -0
- package/dist/customer/path.d.ts.map +1 -0
- package/dist/customer/path.js +48 -0
- package/dist/customer/template-source-code.d.ts +12 -0
- package/dist/customer/template-source-code.d.ts.map +1 -0
- package/dist/customer/template-source-code.js +42 -0
- package/dist/helpers/build-config-file.d.ts +13 -0
- package/dist/helpers/build-config-file.d.ts.map +1 -0
- package/dist/helpers/build-config-file.js +62 -0
- package/dist/helpers/file-loaders.d.ts +19 -0
- package/dist/helpers/file-loaders.d.ts.map +1 -0
- package/dist/helpers/file-loaders.js +45 -0
- package/dist/helpers/find-deep-files.d.ts +7 -0
- package/dist/helpers/find-deep-files.d.ts.map +1 -0
- package/dist/helpers/find-deep-files.js +27 -0
- package/dist/helpers/generate-command-input.d.ts +19 -0
- package/dist/helpers/generate-command-input.d.ts.map +1 -0
- package/dist/helpers/generate-command-input.js +51 -0
- package/dist/helpers/is-git-repo-initialized.d.ts +5 -0
- package/dist/helpers/is-git-repo-initialized.d.ts.map +1 -0
- package/dist/helpers/is-git-repo-initialized.js +24 -0
- package/dist/helpers/ux-action.d.ts +2 -0
- package/dist/helpers/ux-action.d.ts.map +1 -0
- package/dist/helpers/ux-action.js +31 -0
- package/dist/http/deploy-request.d.ts +16 -0
- package/dist/http/deploy-request.d.ts.map +1 -0
- package/dist/http/deploy-request.js +45 -0
- package/dist/http/execute-templates-request.d.ts +10 -0
- package/dist/http/execute-templates-request.d.ts.map +1 -0
- package/dist/http/execute-templates-request.js +28 -0
- package/dist/http/get-connections-request.d.ts +18 -0
- package/dist/http/get-connections-request.d.ts.map +1 -0
- package/dist/http/get-connections-request.js +24 -0
- package/dist/http/http-client.d.ts +6 -0
- package/dist/http/http-client.d.ts.map +1 -0
- package/dist/http/http-client.js +57 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -0
- package/dist/prompt-data/filter-connections-by-template.d.ts +4 -0
- package/dist/prompt-data/filter-connections-by-template.d.ts.map +1 -0
- package/dist/prompt-data/filter-connections-by-template.js +30 -0
- package/dist/prompt-data/get-candidate-fixtures.d.ts +3 -0
- package/dist/prompt-data/get-candidate-fixtures.d.ts.map +1 -0
- package/dist/prompt-data/get-candidate-fixtures.js +49 -0
- package/dist/prompt-data/get-external-data-files.d.ts +3 -0
- package/dist/prompt-data/get-external-data-files.d.ts.map +1 -0
- package/dist/prompt-data/get-external-data-files.js +28 -0
- package/dist/prompt-data/get-template-files.d.ts +7 -0
- package/dist/prompt-data/get-template-files.d.ts.map +1 -0
- package/dist/prompt-data/get-template-files.js +50 -0
- package/dist/prompt-data/render-prompt.d.ts +9 -0
- package/dist/prompt-data/render-prompt.d.ts.map +1 -0
- package/dist/prompt-data/render-prompt.js +16 -0
- package/dist/rendering/render-repeat-input.d.ts +14 -0
- package/dist/rendering/render-repeat-input.d.ts.map +1 -0
- package/dist/rendering/render-repeat-input.js +25 -0
- package/dist/rendering/render-template-result.d.ts +2 -0
- package/dist/rendering/render-template-result.d.ts.map +1 -0
- package/dist/rendering/render-template-result.js +60 -0
- package/dist/rendering/render-tip.d.ts +6 -0
- package/dist/rendering/render-tip.d.ts.map +1 -0
- package/dist/rendering/render-tip.js +22 -0
- package/dist/types.d.ts +40 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/oclif.manifest.json +129 -0
- package/package.json +98 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render-repeat-input.d.ts","sourceRoot":"","sources":["../../src/rendering/render-repeat-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAM,MAAM,aAAa,CAAC;AAK/C;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,QAQnC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.renderRepeatInput = void 0;
|
|
7
|
+
const core_1 = require("@oclif/core");
|
|
8
|
+
const kleur_1 = __importDefault(require("kleur"));
|
|
9
|
+
const generate_command_input_1 = require("../helpers/generate-command-input");
|
|
10
|
+
/**
|
|
11
|
+
* Prints the text of the command you would need to put into the terminal in order to replicate
|
|
12
|
+
* the previously executed command, but with awareness of inputs provided during the execution
|
|
13
|
+
* of the command itself (through a select prompt for example).
|
|
14
|
+
*
|
|
15
|
+
* This extra awareness is provided through the `inputFlags` parameter which you can use
|
|
16
|
+
* to specify the specific values of each flag in order to replicate the current command.
|
|
17
|
+
*
|
|
18
|
+
* @param commandName Name of the command that should be printed.
|
|
19
|
+
* @param inputFlags A map of flag names to the values that should be printed in the command.
|
|
20
|
+
*/
|
|
21
|
+
function renderRepeatInput(command, inputFlags) {
|
|
22
|
+
core_1.ux.log(kleur_1.default.bold(`\nInput to replicate this command ⬇️\n`) +
|
|
23
|
+
kleur_1.default.magenta((0, generate_command_input_1.generateCommandInput)({ commandName: command.id ?? "", inputFlags })));
|
|
24
|
+
}
|
|
25
|
+
exports.renderRepeatInput = renderRepeatInput;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render-template-result.d.ts","sourceRoot":"","sources":["../../src/rendering/render-template-result.ts"],"names":[],"mappings":"AASA,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,GAAG,QAO/C"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.renderTemplateResult = void 0;
|
|
7
|
+
const core_1 = require("@oclif/core");
|
|
8
|
+
const kleur_1 = __importDefault(require("kleur"));
|
|
9
|
+
const cli_highlight_1 = __importDefault(require("cli-highlight"));
|
|
10
|
+
const json_stringify_pretty_compact_1 = __importDefault(require("json-stringify-pretty-compact"));
|
|
11
|
+
const render_tip_1 = require("./render-tip");
|
|
12
|
+
function renderTemplateResult(result) {
|
|
13
|
+
if (isTemplateFailure(result)) {
|
|
14
|
+
renderTemplateError(result);
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
renderTemplateSuccess(result);
|
|
18
|
+
}
|
|
19
|
+
exports.renderTemplateResult = renderTemplateResult;
|
|
20
|
+
function isTemplateFailure(result) {
|
|
21
|
+
return !!result.error;
|
|
22
|
+
}
|
|
23
|
+
function renderTemplateSuccess(result) {
|
|
24
|
+
core_1.ux.log(kleur_1.default.bold(kleur_1.default.green("🏁 Template executed successfully! 🏁 ") + "⬇️ Result ⬇️") + `\n\n${(0, cli_highlight_1.default)((0, json_stringify_pretty_compact_1.default)(result.data), { language: "json" })}\n`);
|
|
25
|
+
}
|
|
26
|
+
function renderTemplateError(result) {
|
|
27
|
+
core_1.ux.log(kleur_1.default.bold(kleur_1.default.red("💥 Error while executing your template: ") + "⬇️ Error ⬇️"));
|
|
28
|
+
core_1.ux.log();
|
|
29
|
+
if (result.error.message) {
|
|
30
|
+
core_1.ux.log(kleur_1.default.red("Error Message: "), kleur_1.default.yellow(result.error.message));
|
|
31
|
+
}
|
|
32
|
+
if (result.error.line) {
|
|
33
|
+
core_1.ux.log(kleur_1.default.red("Line number: "), kleur_1.default.yellow(result.error.line));
|
|
34
|
+
}
|
|
35
|
+
if (result.error.token) {
|
|
36
|
+
core_1.ux.log(kleur_1.default.red("Token: "), kleur_1.default.yellow(result.error.token));
|
|
37
|
+
}
|
|
38
|
+
if (result.error.snippet) {
|
|
39
|
+
let highlightedSnippet = (0, cli_highlight_1.default)(result.error.snippet?.join("\n"), {
|
|
40
|
+
language: "javascript",
|
|
41
|
+
});
|
|
42
|
+
// 5 lines => 3 of offset
|
|
43
|
+
// 6 lines => 3 of offset
|
|
44
|
+
const snippetOffset = Math.ceil(result.error.snippet.length / 2);
|
|
45
|
+
const startLine = (result.error.line ?? snippetOffset) - snippetOffset;
|
|
46
|
+
// add line numbers to the snippet
|
|
47
|
+
highlightedSnippet = highlightedSnippet
|
|
48
|
+
.split("\n")
|
|
49
|
+
.map((line, i) => kleur_1.default.gray(`${i + 1 + startLine} `) + line)
|
|
50
|
+
.join("\n");
|
|
51
|
+
core_1.ux.log(highlightedSnippet);
|
|
52
|
+
core_1.ux.log("\n");
|
|
53
|
+
(0, render_tip_1.renderTip)([
|
|
54
|
+
"The above snippet shows the built template, so line numbers can have a slight offset depending on the provided helpers.",
|
|
55
|
+
]);
|
|
56
|
+
(0, render_tip_1.renderTip)(["Check for missing ';' or trailing ',' in the above lines."]);
|
|
57
|
+
core_1.ux.log();
|
|
58
|
+
}
|
|
59
|
+
core_1.ux.log(kleur_1.default.bold(kleur_1.default.red("💥 Error while executing your template: ") + "⬆️ Error ⬆️"));
|
|
60
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render-tip.d.ts","sourceRoot":"","sources":["../../src/rendering/render-tip.ts"],"names":[],"mappings":"AAQA;;;GAGG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,QAMxC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.renderTip = void 0;
|
|
7
|
+
const core_1 = require("@oclif/core");
|
|
8
|
+
const kleur_1 = __importDefault(require("kleur"));
|
|
9
|
+
/**
|
|
10
|
+
* New line character with the necessary spacing to align the text on the terminal.
|
|
11
|
+
*/
|
|
12
|
+
const NEW_LINE_WITH_SPACING = "\n ";
|
|
13
|
+
/**
|
|
14
|
+
* Prints a tip to the user to provide helpful information.
|
|
15
|
+
* It'll automatically insert the tip emoji (💡) and auto align the lines on the terminal.
|
|
16
|
+
*/
|
|
17
|
+
function renderTip(lines) {
|
|
18
|
+
lines[0] = `💡 ${lines[0]}`;
|
|
19
|
+
const message = lines.join(NEW_LINE_WITH_SPACING);
|
|
20
|
+
core_1.ux.log(kleur_1.default.gray(message));
|
|
21
|
+
}
|
|
22
|
+
exports.renderTip = renderTip;
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export interface Config {
|
|
2
|
+
template_repository_version: "1.0.0";
|
|
3
|
+
helpers: string | undefined;
|
|
4
|
+
environments: Array<{
|
|
5
|
+
environment: string;
|
|
6
|
+
templates: Array<{
|
|
7
|
+
paths: {
|
|
8
|
+
item?: string;
|
|
9
|
+
variation?: string;
|
|
10
|
+
item_group?: string;
|
|
11
|
+
grouping?: string;
|
|
12
|
+
mapping?: string;
|
|
13
|
+
};
|
|
14
|
+
connection_ids: string[];
|
|
15
|
+
}>;
|
|
16
|
+
}>;
|
|
17
|
+
}
|
|
18
|
+
export type ConnectionConfigDict = Record<string, {
|
|
19
|
+
id: string;
|
|
20
|
+
slug: string;
|
|
21
|
+
environment: string;
|
|
22
|
+
}>;
|
|
23
|
+
export type PromptChoices<T> = Array<{
|
|
24
|
+
name: string;
|
|
25
|
+
value: T;
|
|
26
|
+
}>;
|
|
27
|
+
interface TemplateError {
|
|
28
|
+
code: "TEMPLATE_ERROR";
|
|
29
|
+
message?: string;
|
|
30
|
+
line?: number;
|
|
31
|
+
position?: number;
|
|
32
|
+
token?: string;
|
|
33
|
+
snippet?: string[];
|
|
34
|
+
}
|
|
35
|
+
export interface TemplateExecutionErrorResponse {
|
|
36
|
+
success: false;
|
|
37
|
+
error: TemplateError;
|
|
38
|
+
}
|
|
39
|
+
export {};
|
|
40
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,MAAM;IACrB,2BAA2B,EAAE,OAAO,CAAC;IACrC,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,YAAY,EAAE,KAAK,CAAC;QAClB,WAAW,EAAE,MAAM,CAAC;QACpB,SAAS,EAAE,KAAK,CAAC;YACf,KAAK,EAAE;gBACL,IAAI,CAAC,EAAE,MAAM,CAAC;gBACd,SAAS,CAAC,EAAE,MAAM,CAAC;gBACnB,UAAU,CAAC,EAAE,MAAM,CAAC;gBACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;gBAClB,OAAO,CAAC,EAAE,MAAM,CAAC;aAClB,CAAC;YACF,cAAc,EAAE,MAAM,EAAE,CAAC;SAC1B,CAAC,CAAC;KACJ,CAAC,CAAC;CACJ;AAED,MAAM,MAAM,oBAAoB,GAAG,MAAM,CACvC,MAAM,EACN;IACE,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACrB,CACF,CAAC;AAEF,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,CAAC,CAAA;CAAE,CAAC,CAAC;AAEjE,UAAU,aAAa;IACrB,IAAI,EAAE,gBAAgB,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,MAAM,WAAW,8BAA8B;IAC7C,OAAO,EAAE,KAAK,CAAC;IACf,KAAK,EAAE,aAAa,CAAC;CACtB"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
{
|
|
2
|
+
"commands": {
|
|
3
|
+
"deploy": {
|
|
4
|
+
"aliases": [],
|
|
5
|
+
"args": {
|
|
6
|
+
"env": {
|
|
7
|
+
"description": "The target Constructor environment to deploy to.",
|
|
8
|
+
"name": "env",
|
|
9
|
+
"options": [
|
|
10
|
+
"development",
|
|
11
|
+
"qa",
|
|
12
|
+
"production",
|
|
13
|
+
"demo"
|
|
14
|
+
],
|
|
15
|
+
"required": true
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"description": "\n Deploys all templates defined on the `connectrc.js` file to the specified environment.\n\n The script will use the `CONNECT_AUTH_TOKEN` environment variable to authenticate with Constructor.",
|
|
19
|
+
"examples": [
|
|
20
|
+
"$ <%= config.bin %> deploy development",
|
|
21
|
+
"$ <%= config.bin %> deploy qa",
|
|
22
|
+
"$ <%= config.bin %> deploy production"
|
|
23
|
+
],
|
|
24
|
+
"flags": {},
|
|
25
|
+
"hasDynamicHelp": false,
|
|
26
|
+
"hiddenAliases": [],
|
|
27
|
+
"id": "deploy",
|
|
28
|
+
"pluginAlias": "@constructor-io/constructorio-connect-cli",
|
|
29
|
+
"pluginName": "@constructor-io/constructorio-connect-cli",
|
|
30
|
+
"pluginType": "core",
|
|
31
|
+
"strict": true,
|
|
32
|
+
"enableJsonFlag": false,
|
|
33
|
+
"isESM": false,
|
|
34
|
+
"relativePath": [
|
|
35
|
+
"dist",
|
|
36
|
+
"commands",
|
|
37
|
+
"deploy.js"
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
"execute": {
|
|
41
|
+
"aliases": [],
|
|
42
|
+
"args": {},
|
|
43
|
+
"description": "Execute a template against a connection and fixture to see the resulting transformed data. Each value not provided as a flag will be prompted for when the command is executed.",
|
|
44
|
+
"examples": [
|
|
45
|
+
"$ <%= config.bin %> execute",
|
|
46
|
+
"$ <%= config.bin %> execute --template-path=item/item.jsonata",
|
|
47
|
+
"$ <%= config.bin %> execute --template-path=variation/variation.jsonata",
|
|
48
|
+
"$ <%= config.bin %> execute --template-path=item_group/item_group.jsonata --fixture-path=item_group.json",
|
|
49
|
+
"$ <%= config.bin %> execute --template-path=grouping/grouping.jsonata --connection-id=example-connection-id",
|
|
50
|
+
"$ <%= config.bin %> execute --template-path=mapping/mapping.jsonata"
|
|
51
|
+
],
|
|
52
|
+
"flags": {
|
|
53
|
+
"template-path": {
|
|
54
|
+
"description": "The path to the template to execute. Must be in the 'src/templates' directory.",
|
|
55
|
+
"name": "template-path",
|
|
56
|
+
"hasDynamicHelp": false,
|
|
57
|
+
"multiple": false,
|
|
58
|
+
"type": "option"
|
|
59
|
+
},
|
|
60
|
+
"fixture-path": {
|
|
61
|
+
"description": "The path to the fixture to execute the template against. Must be in the 'src/fixtures' directory.",
|
|
62
|
+
"name": "fixture-path",
|
|
63
|
+
"hasDynamicHelp": false,
|
|
64
|
+
"multiple": false,
|
|
65
|
+
"type": "option"
|
|
66
|
+
},
|
|
67
|
+
"external-data-path": {
|
|
68
|
+
"description": "The path to the external data to execute the template against. Must be in the 'src/fixtures/external_data' directory.",
|
|
69
|
+
"name": "external-data-path",
|
|
70
|
+
"hasDynamicHelp": false,
|
|
71
|
+
"multiple": false,
|
|
72
|
+
"type": "option"
|
|
73
|
+
},
|
|
74
|
+
"connection-id": {
|
|
75
|
+
"description": "The ID of the connection to execute the template against.",
|
|
76
|
+
"name": "connection-id",
|
|
77
|
+
"hasDynamicHelp": false,
|
|
78
|
+
"multiple": false,
|
|
79
|
+
"type": "option"
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"hasDynamicHelp": false,
|
|
83
|
+
"hiddenAliases": [],
|
|
84
|
+
"id": "execute",
|
|
85
|
+
"pluginAlias": "@constructor-io/constructorio-connect-cli",
|
|
86
|
+
"pluginName": "@constructor-io/constructorio-connect-cli",
|
|
87
|
+
"pluginType": "core",
|
|
88
|
+
"strict": true,
|
|
89
|
+
"enableJsonFlag": false,
|
|
90
|
+
"isESM": false,
|
|
91
|
+
"relativePath": [
|
|
92
|
+
"dist",
|
|
93
|
+
"commands",
|
|
94
|
+
"execute.js"
|
|
95
|
+
]
|
|
96
|
+
},
|
|
97
|
+
"init": {
|
|
98
|
+
"aliases": [],
|
|
99
|
+
"args": {
|
|
100
|
+
"name": {
|
|
101
|
+
"description": "name of the new folder",
|
|
102
|
+
"name": "name",
|
|
103
|
+
"required": true
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"description": "Bootstrap a new Constructor.io Connect CLI repository.",
|
|
107
|
+
"examples": [
|
|
108
|
+
"<%= config.bin %> <%= command.id %>",
|
|
109
|
+
"<%= config.bin %> <%= command.id %> new-repo-name"
|
|
110
|
+
],
|
|
111
|
+
"flags": {},
|
|
112
|
+
"hasDynamicHelp": false,
|
|
113
|
+
"hiddenAliases": [],
|
|
114
|
+
"id": "init",
|
|
115
|
+
"pluginAlias": "@constructor-io/constructorio-connect-cli",
|
|
116
|
+
"pluginName": "@constructor-io/constructorio-connect-cli",
|
|
117
|
+
"pluginType": "core",
|
|
118
|
+
"strict": true,
|
|
119
|
+
"enableJsonFlag": false,
|
|
120
|
+
"isESM": false,
|
|
121
|
+
"relativePath": [
|
|
122
|
+
"dist",
|
|
123
|
+
"commands",
|
|
124
|
+
"init.js"
|
|
125
|
+
]
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"version": "1.0.0"
|
|
129
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@constructor-io/constructorio-connect-cli",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "CLI tool to enable users to interface with the Constructor Connect Ecosystem",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"/bin",
|
|
9
|
+
"/dist",
|
|
10
|
+
"/boilerplate-repo",
|
|
11
|
+
"/npm-shrinkwrap.json",
|
|
12
|
+
"/oclif.manifest.json"
|
|
13
|
+
],
|
|
14
|
+
"bin": {
|
|
15
|
+
"constructorio-connect-cli": "bin/run.js"
|
|
16
|
+
},
|
|
17
|
+
"scripts": {
|
|
18
|
+
"dev": "bin/dev.js",
|
|
19
|
+
"dev:debug": "node --inspect-brk bin/dev.js",
|
|
20
|
+
"prod": "npm run build && bin/run.js",
|
|
21
|
+
"generate-readme": "oclif readme && git add README.md",
|
|
22
|
+
"prepare": "npm run build",
|
|
23
|
+
"build": "tsc --project tsconfig.production.json",
|
|
24
|
+
"prebuild": "shx rm -rf dist",
|
|
25
|
+
"type-check": "tsc --noemit",
|
|
26
|
+
"test": "TZ=UTC jest",
|
|
27
|
+
"test:debug": "TZ=UTC node --inspect-brk -r ts-node/register node_modules/.bin/jest --runInBand",
|
|
28
|
+
"test:watch": "TZ=UTC jest --watch",
|
|
29
|
+
"test:cov": "TZ=UTC jest --coverage",
|
|
30
|
+
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\"",
|
|
31
|
+
"lint:fix": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
|
|
32
|
+
"license-check": "license-checker --production --onlyAllow 'Apache-2.0;BSD-3-Clause;BSD-2-Clause;ISC;MIT;0BSD'",
|
|
33
|
+
"postpack": "shx rm -f oclif.manifest.json",
|
|
34
|
+
"prepack": "npm run build && oclif manifest && oclif readme"
|
|
35
|
+
},
|
|
36
|
+
"oclif": {
|
|
37
|
+
"dirname": "constructorio-connect-cli",
|
|
38
|
+
"bin": "constructorio-connect-cli",
|
|
39
|
+
"commands": "./dist/commands",
|
|
40
|
+
"plugins": [
|
|
41
|
+
"@oclif/plugin-help"
|
|
42
|
+
],
|
|
43
|
+
"topicSeparator": ":",
|
|
44
|
+
"topics": {}
|
|
45
|
+
},
|
|
46
|
+
"repository": {
|
|
47
|
+
"type": "git",
|
|
48
|
+
"url": "git+https://github.com/Constructor-io/constructorio-connect-cli.git"
|
|
49
|
+
},
|
|
50
|
+
"keywords": [
|
|
51
|
+
"cli",
|
|
52
|
+
"connect",
|
|
53
|
+
"constructorio",
|
|
54
|
+
"constructor"
|
|
55
|
+
],
|
|
56
|
+
"author": "constructor.io",
|
|
57
|
+
"license": "MIT",
|
|
58
|
+
"bugs": {
|
|
59
|
+
"url": "https://github.com/Constructor-io/constructorio-connect-cli/issues"
|
|
60
|
+
},
|
|
61
|
+
"homepage": "https://github.com/Constructor-io/constructorio-connect-cli#readme",
|
|
62
|
+
"dependencies": {
|
|
63
|
+
"@inquirer/prompts": "^5.0.2",
|
|
64
|
+
"@oclif/core": "3.25.3",
|
|
65
|
+
"@oclif/plugin-help": "^6.0.21",
|
|
66
|
+
"axios": "^1.6.8",
|
|
67
|
+
"cli-highlight": "^2.1.11",
|
|
68
|
+
"fs-extra": "^11.2.0",
|
|
69
|
+
"json-stringify-pretty-compact": "^3.0.0",
|
|
70
|
+
"kleur": "^4.1.5",
|
|
71
|
+
"replace-in-file": "^7.1.0"
|
|
72
|
+
},
|
|
73
|
+
"devDependencies": {
|
|
74
|
+
"@oclif/test": "^3.2.6",
|
|
75
|
+
"@types/fs-extra": "^11.0.4",
|
|
76
|
+
"@types/jest": "^29.5.12",
|
|
77
|
+
"@types/mock-fs": "^4.13.4",
|
|
78
|
+
"dotenv": "^16.4.5",
|
|
79
|
+
"eslint": "^8.57.0",
|
|
80
|
+
"eslint-config-prettier": "^9.1.0",
|
|
81
|
+
"eslint-config-standard-with-typescript": "^43.0.1",
|
|
82
|
+
"eslint-plugin-import": "^2.29.1",
|
|
83
|
+
"eslint-plugin-prettier": "^5.1.3",
|
|
84
|
+
"eslint-plugin-promise": "^6.1.1",
|
|
85
|
+
"jest": "^29.7.0",
|
|
86
|
+
"license-checker": "^25.0.1",
|
|
87
|
+
"mock-fs": "^5.2.0",
|
|
88
|
+
"nock": "^13.5.4",
|
|
89
|
+
"oclif": "^4.6.3",
|
|
90
|
+
"prettier": "^3.2.5",
|
|
91
|
+
"prettier-2": "npm:prettier@^2.8.8",
|
|
92
|
+
"shx": "^0.3.4",
|
|
93
|
+
"stdout-stderr": "^0.1.13",
|
|
94
|
+
"ts-jest": "^29.1.2",
|
|
95
|
+
"ts-node": "^10.9.2",
|
|
96
|
+
"typescript": "^5.4.5"
|
|
97
|
+
}
|
|
98
|
+
}
|