@constructor-io/constructorio-connect-cli 1.15.4 → 1.15.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/README.md +10 -11
- package/boilerplate-repo/package.json +2 -1
- package/dist/commands/deploy.d.ts +1 -1
- package/dist/commands/deploy.d.ts.map +1 -1
- package/dist/commands/deploy.js +3 -6
- package/dist/commands/execute.d.ts +1 -1
- package/dist/commands/execute.d.ts.map +1 -1
- package/dist/commands/execute.js +2 -2
- package/dist/commands/generate-fixture.d.ts +1 -1
- package/dist/commands/generate-fixture.d.ts.map +1 -1
- package/dist/commands/generate-fixture.js +3 -7
- package/dist/commands/{refresh-connections-command.d.ts → refresh-connections.d.ts} +2 -1
- package/dist/commands/refresh-connections.d.ts.map +1 -0
- package/dist/commands/{refresh-connections-command.js → refresh-connections.js} +5 -2
- package/dist/commands/trigger-catalog-sync.d.ts +1 -1
- package/dist/commands/trigger-catalog-sync.d.ts.map +1 -1
- package/dist/commands/trigger-catalog-sync.js +3 -6
- package/dist/helpers/lint-config-file.d.ts.map +1 -1
- package/dist/helpers/lint-config-file.js +22 -21
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/oclif.manifest.json +8 -7
- package/package.json +3 -3
- package/dist/commands/refresh-connections-command.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -38,12 +38,12 @@ With the new repository initialized, you can start developing your catalog integ
|
|
|
38
38
|
* [`constructorio-connect-cli generate-fixture`](#constructorio-connect-cli-generate-fixture)
|
|
39
39
|
* [`constructorio-connect-cli help [COMMAND]`](#constructorio-connect-cli-help-command)
|
|
40
40
|
* [`constructorio-connect-cli init NAME`](#constructorio-connect-cli-init-name)
|
|
41
|
-
* [`constructorio-connect-cli refresh-connections
|
|
41
|
+
* [`constructorio-connect-cli refresh-connections`](#constructorio-connect-cli-refresh-connections)
|
|
42
42
|
* [`constructorio-connect-cli trigger-catalog-sync`](#constructorio-connect-cli-trigger-catalog-sync)
|
|
43
43
|
|
|
44
44
|
## `constructorio-connect-cli deploy ENV`
|
|
45
45
|
|
|
46
|
-
Deploys all templates defined on the `connectrc.js` file to the specified environment, after running tests ('--force' to skip).
|
|
46
|
+
Deploys all templates defined on the `connectrc.js` file to the specified environment, after running tests ('--force' to skip).
|
|
47
47
|
|
|
48
48
|
```
|
|
49
49
|
USAGE
|
|
@@ -56,7 +56,6 @@ FLAGS
|
|
|
56
56
|
-f, --force Skip tests before deploying
|
|
57
57
|
|
|
58
58
|
DESCRIPTION
|
|
59
|
-
|
|
60
59
|
Deploys all templates defined on the `connectrc.js` file to the specified environment, after running tests ('--force'
|
|
61
60
|
to skip).
|
|
62
61
|
|
|
@@ -118,17 +117,13 @@ USAGE
|
|
|
118
117
|
$ constructorio-connect-cli generate-fixture
|
|
119
118
|
|
|
120
119
|
DESCRIPTION
|
|
121
|
-
|
|
122
120
|
This command will fetch one fixture from the server and save it into a specified file. This fixture file will be an
|
|
123
121
|
example of how the data would be passed to the connector when executing the templates.
|
|
124
|
-
|
|
125
122
|
You are expected to customize this file to match the data you expect to cover in a template execution (e.g. an item
|
|
126
123
|
with stock, a variation with missing data), etc. Note that you can have multiple fixtures of the same type to cover
|
|
127
124
|
different scenarios.
|
|
128
|
-
|
|
129
125
|
Finally, if the file already exists you'll be prompted to overwrite it.
|
|
130
126
|
|
|
131
|
-
|
|
132
127
|
EXAMPLES
|
|
133
128
|
$ constructorio-connect-cli generate-fixture
|
|
134
129
|
```
|
|
@@ -174,24 +169,28 @@ EXAMPLES
|
|
|
174
169
|
```
|
|
175
170
|
|
|
176
171
|
|
|
177
|
-
## `constructorio-connect-cli refresh-connections
|
|
172
|
+
## `constructorio-connect-cli refresh-connections`
|
|
173
|
+
|
|
174
|
+
Refresh the connections list
|
|
178
175
|
|
|
179
176
|
```
|
|
180
177
|
USAGE
|
|
181
|
-
$ constructorio-connect-cli refresh-connections
|
|
178
|
+
$ constructorio-connect-cli refresh-connections
|
|
179
|
+
|
|
180
|
+
DESCRIPTION
|
|
181
|
+
Refresh the connections list
|
|
182
182
|
```
|
|
183
183
|
|
|
184
184
|
|
|
185
185
|
## `constructorio-connect-cli trigger-catalog-sync`
|
|
186
186
|
|
|
187
|
-
Triggers a catalog sync for selected connection.
|
|
187
|
+
Triggers a catalog sync for selected connection.
|
|
188
188
|
|
|
189
189
|
```
|
|
190
190
|
USAGE
|
|
191
191
|
$ constructorio-connect-cli trigger-catalog-sync
|
|
192
192
|
|
|
193
193
|
DESCRIPTION
|
|
194
|
-
|
|
195
194
|
Triggers a catalog sync for selected connection.
|
|
196
195
|
|
|
197
196
|
The script will use the `CONNECT_AUTH_TOKEN` environment variable to authenticate with Constructor.
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
"execute": "constructorio-connect-cli execute",
|
|
10
10
|
"deploy": "constructorio-connect-cli deploy",
|
|
11
11
|
"generate-fixture": "constructorio-connect-cli generate-fixture",
|
|
12
|
-
"trigger-catalog-sync": "constructorio-connect-cli trigger-catalog-sync"
|
|
12
|
+
"trigger-catalog-sync": "constructorio-connect-cli trigger-catalog-sync",
|
|
13
|
+
"refresh": "constructorio-connect-cli refresh-connections"
|
|
13
14
|
},
|
|
14
15
|
"devDependencies": {
|
|
15
16
|
"@babel/preset-env": "^7.26.9",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RefreshConnectionsCommand } from "./refresh-connections
|
|
1
|
+
import { RefreshConnectionsCommand } from "./refresh-connections";
|
|
2
2
|
export default class Deploy extends RefreshConnectionsCommand {
|
|
3
3
|
static args: {
|
|
4
4
|
env: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/commands/deploy.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,yBAAyB,EAAE,MAAM
|
|
1
|
+
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/commands/deploy.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAElE,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,yBAAyB;IAC3D,MAAM,CAAC,IAAI;;MAMT;IAEF,MAAM,CAAC,KAAK;;MAKV;IAEF,MAAM,CAAC,WAAW,SAC0N;IAE5O,MAAM,CAAC,QAAQ,WAKb;IAEI,UAAU,IAAI,OAAO,CAAC,GAAG,CAAC;CA+DjC"}
|
package/dist/commands/deploy.js
CHANGED
|
@@ -12,9 +12,9 @@ const template_source_code_1 = require("../customer/template-source-code");
|
|
|
12
12
|
const ux_action_1 = require("../helpers/ux-action");
|
|
13
13
|
const deploy_request_1 = require("../http/deploy-request");
|
|
14
14
|
const render_tip_1 = require("../rendering/render-tip");
|
|
15
|
-
const
|
|
15
|
+
const refresh_connections_1 = require("./refresh-connections");
|
|
16
16
|
const child_process_1 = require("child_process");
|
|
17
|
-
class Deploy extends
|
|
17
|
+
class Deploy extends refresh_connections_1.RefreshConnectionsCommand {
|
|
18
18
|
static args = {
|
|
19
19
|
env: core_1.Args.string({
|
|
20
20
|
options: ["development", "qa", "production", "demo"],
|
|
@@ -28,10 +28,7 @@ class Deploy extends refresh_connections_command_1.RefreshConnectionsCommand {
|
|
|
28
28
|
description: "Skip tests before deploying",
|
|
29
29
|
}),
|
|
30
30
|
};
|
|
31
|
-
static description = `
|
|
32
|
-
Deploys all templates defined on the \`connectrc.js\` file to the specified environment, after running tests ('--force' to skip).
|
|
33
|
-
|
|
34
|
-
The script will use the \`CONNECT_AUTH_TOKEN\` environment variable to authenticate with Constructor.`;
|
|
31
|
+
static description = "Deploys all templates defined on the `connectrc.js` file to the specified environment, after running tests ('--force' to skip). \n\nThe script will use the `CONNECT_AUTH_TOKEN` environment variable to authenticate with Constructor.";
|
|
35
32
|
static examples = [
|
|
36
33
|
"$ <%= config.bin %> deploy development",
|
|
37
34
|
"$ <%= config.bin %> deploy qa",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RefreshConnectionsCommand } from "./refresh-connections
|
|
1
|
+
import { RefreshConnectionsCommand } from "./refresh-connections";
|
|
2
2
|
export declare const executePromptMessages: {
|
|
3
3
|
readonly template: "Select a template to execute";
|
|
4
4
|
readonly fixture: "Select a catalog fixture to run the template against";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execute.d.ts","sourceRoot":"","sources":["../../src/commands/execute.ts"],"names":[],"mappings":"AAyBA,OAAO,EAAE,yBAAyB,EAAE,MAAM
|
|
1
|
+
{"version":3,"file":"execute.d.ts","sourceRoot":"","sources":["../../src/commands/execute.ts"],"names":[],"mappings":"AAyBA,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAElE,eAAO,MAAM,qBAAqB;;;;;CAKxB,CAAC;AAEX;;;GAGG;AACH,UAAU,iBAAiB;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAYD,qBAAa,OAAQ,SAAQ,yBAAyB;IACpD,MAAM,CAAC,KAAK;;;;;MAgBV;IAEF,MAAM,CAAC,WAAW,SACkK;IAEpL,MAAM,CAAC,QAAQ,WAOb;IAEF,KAAK,EAAE,iBAAiB,CAAM;IAExB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;YAkCnB,UAAU;YAsBV,oBAAoB;YAoDpB,wBAAwB;YA2BxB,wBAAwB;CAevC"}
|
package/dist/commands/execute.js
CHANGED
|
@@ -19,14 +19,14 @@ const template_source_code_1 = require("../customer/template-source-code");
|
|
|
19
19
|
const ux_action_1 = require("../helpers/ux-action");
|
|
20
20
|
const print_warnings_1 = require("../helpers/print-warnings");
|
|
21
21
|
const extract_template_type_1 = require("../helpers/extract-template-type");
|
|
22
|
-
const
|
|
22
|
+
const refresh_connections_1 = require("./refresh-connections");
|
|
23
23
|
exports.executePromptMessages = {
|
|
24
24
|
template: "Select a template to execute",
|
|
25
25
|
fixture: "Select a catalog fixture to run the template against",
|
|
26
26
|
external: "Select external data to run the template against",
|
|
27
27
|
connection: "Select a connection to execute templates against",
|
|
28
28
|
};
|
|
29
|
-
class Execute extends
|
|
29
|
+
class Execute extends refresh_connections_1.RefreshConnectionsCommand {
|
|
30
30
|
static flags = {
|
|
31
31
|
"template-path": core_1.Flags.string({
|
|
32
32
|
description: "The path to the template to execute. Must be in the 'src/templates' directory.",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-fixture.d.ts","sourceRoot":"","sources":["../../src/commands/generate-fixture.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"generate-fixture.d.ts","sourceRoot":"","sources":["../../src/commands/generate-fixture.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAElE,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,yBAAyB;IACpE,MAAM,CAAC,IAAI,KAAM;IAEjB,MAAM,CAAC,WAAW,SACsgB;IAExhB,MAAM,CAAC,QAAQ,WAA4C;IAErD,UAAU,IAAI,OAAO,CAAC,GAAG,CAAC;IA2DhC,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;CAU9C"}
|
|
@@ -16,14 +16,10 @@ const render_tip_1 = require("../rendering/render-tip");
|
|
|
16
16
|
const types_1 = require("../types");
|
|
17
17
|
const check_if_connection_needs_mapping_1 = require("../helpers/check-if-connection-needs-mapping");
|
|
18
18
|
const select_connections_1 = require("../prompt-data/select-connections");
|
|
19
|
-
const
|
|
20
|
-
class GenerateFixture extends
|
|
19
|
+
const refresh_connections_1 = require("./refresh-connections");
|
|
20
|
+
class GenerateFixture extends refresh_connections_1.RefreshConnectionsCommand {
|
|
21
21
|
static args = {};
|
|
22
|
-
static description =
|
|
23
|
-
This command will fetch one fixture from the server and save it into a specified file. This fixture file will be an example of how the data would be passed to the connector when executing the templates.\n
|
|
24
|
-
You are expected to customize this file to match the data you expect to cover in a template execution (e.g. an item with stock, a variation with missing data), etc. Note that you can have multiple fixtures of the same type to cover different scenarios.\n
|
|
25
|
-
Finally, if the file already exists you'll be prompted to overwrite it.
|
|
26
|
-
`;
|
|
22
|
+
static description = "This command will fetch one fixture from the server and save it into a specified file. This fixture file will be an example of how the data would be passed to the connector when executing the templates.\n You are expected to customize this file to match the data you expect to cover in a template execution (e.g. an item with stock, a variation with missing data), etc. Note that you can have multiple fixtures of the same type to cover different scenarios.\n Finally, if the file already exists you'll be prompted to overwrite it.";
|
|
27
23
|
static examples = ["$ <%= config.bin %> generate-fixture"];
|
|
28
24
|
async runCommand() {
|
|
29
25
|
const connection = await (0, select_connections_1.selectConnections)("Choose the connection to generate the fixture for");
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Command } from "@oclif/core";
|
|
2
2
|
export declare abstract class RefreshConnectionsCommand extends Command {
|
|
3
|
+
static description: string;
|
|
3
4
|
abstract runCommand(): Promise<any>;
|
|
4
5
|
run(): Promise<any>;
|
|
5
6
|
/**
|
|
@@ -12,4 +13,4 @@ export declare abstract class RefreshConnectionsCommand extends Command {
|
|
|
12
13
|
*/
|
|
13
14
|
private shouldAutoRefreshConnections;
|
|
14
15
|
}
|
|
15
|
-
//# sourceMappingURL=refresh-connections
|
|
16
|
+
//# sourceMappingURL=refresh-connections.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refresh-connections.d.ts","sourceRoot":"","sources":["../../src/commands/refresh-connections.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAKtC,8BAAsB,yBAA0B,SAAQ,OAAO;IAC7D,MAAM,CAAC,WAAW,SAAkC;IAEpD,QAAQ,CAAC,UAAU,IAAI,OAAO,CAAC,GAAG,CAAC;IAE7B,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC;IASzB;;;;;;;OAOG;IACH,OAAO,CAAC,4BAA4B;CAerC"}
|
|
@@ -2,14 +2,17 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.RefreshConnectionsCommand = void 0;
|
|
4
4
|
const core_1 = require("@oclif/core");
|
|
5
|
-
const refresh_connections_list_1 = require("../helpers/refresh-connections-list");
|
|
6
5
|
const prepend_file_sync_1 = require("../helpers/prepend-file-sync");
|
|
6
|
+
const refresh_connections_list_1 = require("../helpers/refresh-connections-list");
|
|
7
7
|
class RefreshConnectionsCommand extends core_1.Command {
|
|
8
|
+
static description = "Refresh the connections list";
|
|
8
9
|
async run() {
|
|
9
10
|
if (this.shouldAutoRefreshConnections()) {
|
|
10
11
|
await (0, refresh_connections_list_1.refreshConnectionsList)();
|
|
11
12
|
}
|
|
12
|
-
|
|
13
|
+
if (this.runCommand) {
|
|
14
|
+
return await this.runCommand();
|
|
15
|
+
}
|
|
13
16
|
}
|
|
14
17
|
/**
|
|
15
18
|
* Checks if the connections list should be automatically refreshed if
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trigger-catalog-sync.d.ts","sourceRoot":"","sources":["../../src/commands/trigger-catalog-sync.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,yBAAyB,EAAE,MAAM
|
|
1
|
+
{"version":3,"file":"trigger-catalog-sync.d.ts","sourceRoot":"","sources":["../../src/commands/trigger-catalog-sync.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAElE,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,yBAAyB;IACvE,MAAM,CAAC,IAAI,KAAM;IAEjB,MAAM,CAAC,WAAW,SAC2I;IAE7J,MAAM,CAAC,QAAQ,WAA2B;IAEpC,UAAU,IAAI,OAAO,CAAC,GAAG,CAAC;CASjC"}
|
|
@@ -3,13 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const trigger_catalog_sync_1 = require("../http/trigger-catalog-sync");
|
|
4
4
|
const select_connections_1 = require("../prompt-data/select-connections");
|
|
5
5
|
const render_tip_1 = require("../rendering/render-tip");
|
|
6
|
-
const
|
|
7
|
-
class TriggerCatalogSync extends
|
|
6
|
+
const refresh_connections_1 = require("./refresh-connections");
|
|
7
|
+
class TriggerCatalogSync extends refresh_connections_1.RefreshConnectionsCommand {
|
|
8
8
|
static args = {};
|
|
9
|
-
static description = `
|
|
10
|
-
Triggers a catalog sync for selected connection.
|
|
11
|
-
|
|
12
|
-
The script will use the \`CONNECT_AUTH_TOKEN\` environment variable to authenticate with Constructor.`;
|
|
9
|
+
static description = "Triggers a catalog sync for selected connection. \n\nThe script will use the `CONNECT_AUTH_TOKEN` environment variable to authenticate with Constructor.";
|
|
13
10
|
static examples = ["$ <%= config.bin %>"];
|
|
14
11
|
async runCommand() {
|
|
15
12
|
const connection = await (0, select_connections_1.selectConnections)("Choose the connection to a trigger catalog sync");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lint-config-file.d.ts","sourceRoot":"","sources":["../../src/helpers/lint-config-file.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"lint-config-file.d.ts","sourceRoot":"","sources":["../../src/helpers/lint-config-file.ts"],"names":[],"mappings":"AAcA;;GAEG;AACH,wBAAsB,cAAc,kBAenC;AAED;;;;;GAKG;AACH,wBAAsB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,iBAkBpD"}
|
|
@@ -39,14 +39,27 @@ const child_process_1 = require("child_process");
|
|
|
39
39
|
const fs_1 = require("fs");
|
|
40
40
|
const fs = __importStar(require("fs/promises"));
|
|
41
41
|
const path_1 = require("../customer/path");
|
|
42
|
+
/**
|
|
43
|
+
* Gets the eslint config file path
|
|
44
|
+
*/
|
|
45
|
+
function getEslintConfigPath() {
|
|
46
|
+
return (0, fs_1.existsSync)("eslint.config.js")
|
|
47
|
+
? "eslint.config.js"
|
|
48
|
+
: "eslint.config.mjs";
|
|
49
|
+
}
|
|
42
50
|
/**
|
|
43
51
|
* Adds rules to the eslint config file and then executes npm run lint
|
|
44
52
|
*/
|
|
45
53
|
async function lintConfigFile() {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
54
|
+
const eslintConfigPath = getEslintConfigPath();
|
|
55
|
+
const rulePrefix = eslintConfigPath.endsWith(".mjs")
|
|
56
|
+
? "@stylistic"
|
|
57
|
+
: "@stylistic/js";
|
|
58
|
+
const rules = [
|
|
59
|
+
`'${rulePrefix}/quote-props': ['error', 'as-needed']`,
|
|
60
|
+
`'${rulePrefix}/comma-dangle': ['error', 'always-multiline']`,
|
|
61
|
+
];
|
|
62
|
+
await addRuleToConfig(rules);
|
|
50
63
|
const repoPath = (0, path_1.getCustomerOSSpecificPath)("");
|
|
51
64
|
(0, child_process_1.execSync)(`(cd ${repoPath} && eslint . --fix)`);
|
|
52
65
|
}
|
|
@@ -57,27 +70,15 @@ async function lintConfigFile() {
|
|
|
57
70
|
* where '@stylistic/js/quote-props' is in single quotes
|
|
58
71
|
*/
|
|
59
72
|
async function addRuleToConfig(rules) {
|
|
60
|
-
|
|
61
|
-
// It will either be eslint.config.js or eslint.config.mjs
|
|
62
|
-
const eslintConfigPath = (0, fs_1.existsSync)("eslint.config.js")
|
|
63
|
-
? "eslint.config.js"
|
|
64
|
-
: "eslint.config.mjs";
|
|
73
|
+
const eslintConfigPath = getEslintConfigPath();
|
|
65
74
|
const eslintConfig = await fs.readFile(eslintConfigPath, "utf-8");
|
|
66
75
|
const missingRules = rules.filter((rule) => {
|
|
67
|
-
// Extract rule names (part between single quotes, eg: "@stylistic/js/quote-props")
|
|
68
|
-
// to check for existence
|
|
69
76
|
const ruleNameMatch = rule.match(/^'([^']+)'/);
|
|
70
|
-
|
|
71
|
-
if (!ruleNameMatch)
|
|
72
|
-
return false;
|
|
73
|
-
const ruleName = ruleNameMatch[1];
|
|
74
|
-
return !eslintConfig.includes(ruleName);
|
|
77
|
+
return ruleNameMatch && !eslintConfig.includes(ruleNameMatch[1]);
|
|
75
78
|
});
|
|
76
|
-
if (missingRules.length === 0)
|
|
79
|
+
if (missingRules.length === 0)
|
|
77
80
|
return;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
const rulesString = missingRules.map((rule) => `${rule},`).join("\n ");
|
|
81
|
-
const updatedConfig = eslintConfig.replace(/(rules:\s*\{\s*)/, `$1${rulesString}\n `);
|
|
81
|
+
const rulesString = missingRules.map((rule) => ` ${rule},`).join("\n");
|
|
82
|
+
const updatedConfig = eslintConfig.replace(/(rules:\s*\{\s*)/, `$1\n${rulesString}\n`);
|
|
82
83
|
await fs.writeFile(eslintConfigPath, updatedConfig, "utf-8");
|
|
83
84
|
}
|
package/dist/version.d.ts
CHANGED
package/dist/version.js
CHANGED
package/oclif.manifest.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"required": true
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
|
-
"description": "
|
|
18
|
+
"description": "Deploys all templates defined on the `connectrc.js` file to the specified environment, after running tests ('--force' to skip). \n\nThe script will use the `CONNECT_AUTH_TOKEN` environment variable to authenticate with Constructor.",
|
|
19
19
|
"examples": [
|
|
20
20
|
"$ <%= config.bin %> deploy development",
|
|
21
21
|
"$ <%= config.bin %> deploy qa",
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
"generate-fixture": {
|
|
107
107
|
"aliases": [],
|
|
108
108
|
"args": {},
|
|
109
|
-
"description": "
|
|
109
|
+
"description": "This command will fetch one fixture from the server and save it into a specified file. This fixture file will be an example of how the data would be passed to the connector when executing the templates.\n You are expected to customize this file to match the data you expect to cover in a template execution (e.g. an item with stock, a variation with missing data), etc. Note that you can have multiple fixtures of the same type to cover different scenarios.\n Finally, if the file already exists you'll be prompted to overwrite it.",
|
|
110
110
|
"examples": [
|
|
111
111
|
"$ <%= config.bin %> generate-fixture"
|
|
112
112
|
],
|
|
@@ -156,13 +156,14 @@
|
|
|
156
156
|
"init.js"
|
|
157
157
|
]
|
|
158
158
|
},
|
|
159
|
-
"refresh-connections
|
|
159
|
+
"refresh-connections": {
|
|
160
160
|
"aliases": [],
|
|
161
161
|
"args": {},
|
|
162
|
+
"description": "Refresh the connections list",
|
|
162
163
|
"flags": {},
|
|
163
164
|
"hasDynamicHelp": false,
|
|
164
165
|
"hiddenAliases": [],
|
|
165
|
-
"id": "refresh-connections
|
|
166
|
+
"id": "refresh-connections",
|
|
166
167
|
"pluginAlias": "@constructor-io/constructorio-connect-cli",
|
|
167
168
|
"pluginName": "@constructor-io/constructorio-connect-cli",
|
|
168
169
|
"pluginType": "core",
|
|
@@ -172,13 +173,13 @@
|
|
|
172
173
|
"relativePath": [
|
|
173
174
|
"dist",
|
|
174
175
|
"commands",
|
|
175
|
-
"refresh-connections
|
|
176
|
+
"refresh-connections.js"
|
|
176
177
|
]
|
|
177
178
|
},
|
|
178
179
|
"trigger-catalog-sync": {
|
|
179
180
|
"aliases": [],
|
|
180
181
|
"args": {},
|
|
181
|
-
"description": "
|
|
182
|
+
"description": "Triggers a catalog sync for selected connection. \n\nThe script will use the `CONNECT_AUTH_TOKEN` environment variable to authenticate with Constructor.",
|
|
182
183
|
"examples": [
|
|
183
184
|
"$ <%= config.bin %>"
|
|
184
185
|
],
|
|
@@ -199,5 +200,5 @@
|
|
|
199
200
|
]
|
|
200
201
|
}
|
|
201
202
|
},
|
|
202
|
-
"version": "1.15.
|
|
203
|
+
"version": "1.15.5"
|
|
203
204
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@constructor-io/constructorio-connect-cli",
|
|
3
|
-
"version": "1.15.
|
|
3
|
+
"version": "1.15.5",
|
|
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",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"@types/fs-extra": "^11.0.4",
|
|
83
83
|
"@types/jest": "^29.5.12",
|
|
84
84
|
"@types/mock-fs": "^4.13.4",
|
|
85
|
-
"cross-env": "^
|
|
85
|
+
"cross-env": "^10.0.0",
|
|
86
86
|
"eslint": "^9.25.0",
|
|
87
87
|
"eslint-plugin-prettier": "^5.2.6",
|
|
88
88
|
"eslint-plugin-promise": "^6.6.0",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"jest": "^29.7.0",
|
|
91
91
|
"license-checker": "^25.0.1",
|
|
92
92
|
"mock-fs": "^5.2.0",
|
|
93
|
-
"nock": "14.0.
|
|
93
|
+
"nock": "14.0.8",
|
|
94
94
|
"oclif": "^4.17.42",
|
|
95
95
|
"prettier": "^3.2.5",
|
|
96
96
|
"prettier-2": "npm:prettier@^2.8.8",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"refresh-connections-command.d.ts","sourceRoot":"","sources":["../../src/commands/refresh-connections-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAKtC,8BAAsB,yBAA0B,SAAQ,OAAO;IAC7D,QAAQ,CAAC,UAAU,IAAI,OAAO,CAAC,GAAG,CAAC;IAE7B,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC;IAOzB;;;;;;;OAOG;IACH,OAAO,CAAC,4BAA4B;CAerC"}
|