@commercetools/cli-topic-integration-layer 0.0.0 → 0.2.2

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 (84) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +64 -0
  3. package/dist/commands/integration-layer/config/get.d.ts +9 -0
  4. package/dist/commands/integration-layer/config/get.js +22 -0
  5. package/dist/commands/integration-layer/config/get.js.map +1 -0
  6. package/dist/commands/integration-layer/config/list.d.ts +6 -0
  7. package/dist/commands/integration-layer/config/list.js +20 -0
  8. package/dist/commands/integration-layer/config/list.js.map +1 -0
  9. package/dist/commands/integration-layer/config/set.d.ts +13 -0
  10. package/dist/commands/integration-layer/config/set.js +29 -0
  11. package/dist/commands/integration-layer/config/set.js.map +1 -0
  12. package/dist/commands/integration-layer/config/unset.d.ts +9 -0
  13. package/dist/commands/integration-layer/config/unset.js +18 -0
  14. package/dist/commands/integration-layer/config/unset.js.map +1 -0
  15. package/dist/commands/integration-layer/extension/build.d.ts +12 -0
  16. package/dist/commands/integration-layer/extension/build.js +40 -0
  17. package/dist/commands/integration-layer/extension/build.js.map +1 -0
  18. package/dist/commands/integration-layer/extension/delete.d.ts +9 -0
  19. package/dist/commands/integration-layer/extension/delete.js +39 -0
  20. package/dist/commands/integration-layer/extension/delete.js.map +1 -0
  21. package/dist/commands/integration-layer/extension/invoke.d.ts +13 -0
  22. package/dist/commands/integration-layer/extension/invoke.js +89 -0
  23. package/dist/commands/integration-layer/extension/invoke.js.map +1 -0
  24. package/dist/commands/integration-layer/extension/push.d.ts +28 -0
  25. package/dist/commands/integration-layer/extension/push.js +217 -0
  26. package/dist/commands/integration-layer/extension/push.js.map +1 -0
  27. package/dist/commands/integration-layer/extension/serve.d.ts +37 -0
  28. package/dist/commands/integration-layer/extension/serve.js +528 -0
  29. package/dist/commands/integration-layer/extension/serve.js.map +1 -0
  30. package/dist/commands/integration-layer/extension/status.d.ts +6 -0
  31. package/dist/commands/integration-layer/extension/status.js +28 -0
  32. package/dist/commands/integration-layer/extension/status.js.map +1 -0
  33. package/dist/commands/integration-layer/extension/validate.d.ts +15 -0
  34. package/dist/commands/integration-layer/extension/validate.js +98 -0
  35. package/dist/commands/integration-layer/extension/validate.js.map +1 -0
  36. package/dist/commands/integration-layer/hello.d.ts +6 -0
  37. package/dist/commands/integration-layer/hello.js +10 -0
  38. package/dist/commands/integration-layer/hello.js.map +1 -0
  39. package/dist/commands/integration-layer/init.d.ts +13 -0
  40. package/dist/commands/integration-layer/init.js +279 -0
  41. package/dist/commands/integration-layer/init.js.map +1 -0
  42. package/dist/commands/integration-layer/schema/fetch.d.ts +9 -0
  43. package/dist/commands/integration-layer/schema/fetch.js +27 -0
  44. package/dist/commands/integration-layer/schema/fetch.js.map +1 -0
  45. package/dist/index.d.ts +1 -0
  46. package/dist/index.js +5 -0
  47. package/dist/index.js.map +1 -0
  48. package/dist/lib/awaitBundleState.d.ts +33 -0
  49. package/dist/lib/awaitBundleState.js +77 -0
  50. package/dist/lib/awaitBundleState.js.map +1 -0
  51. package/dist/lib/base.d.ts +50 -0
  52. package/dist/lib/base.js +85 -0
  53. package/dist/lib/base.js.map +1 -0
  54. package/dist/lib/ilClient.d.ts +93 -0
  55. package/dist/lib/ilClient.js +120 -0
  56. package/dist/lib/ilClient.js.map +1 -0
  57. package/dist/lib/sourceRevision.d.ts +39 -0
  58. package/dist/lib/sourceRevision.js +95 -0
  59. package/dist/lib/sourceRevision.js.map +1 -0
  60. package/dist/lib/tooling/apiExtension.d.ts +31 -0
  61. package/dist/lib/tooling/apiExtension.js +39 -0
  62. package/dist/lib/tooling/apiExtension.js.map +1 -0
  63. package/dist/lib/tooling/build.d.ts +18 -0
  64. package/dist/lib/tooling/build.js +54 -0
  65. package/dist/lib/tooling/build.js.map +1 -0
  66. package/dist/lib/tooling/compose.d.ts +28 -0
  67. package/dist/lib/tooling/compose.js +48 -0
  68. package/dist/lib/tooling/compose.js.map +1 -0
  69. package/dist/lib/tooling/extensions.d.ts +77 -0
  70. package/dist/lib/tooling/extensions.js +209 -0
  71. package/dist/lib/tooling/extensions.js.map +1 -0
  72. package/dist/lib/tooling/gateway.d.ts +21 -0
  73. package/dist/lib/tooling/gateway.js +65 -0
  74. package/dist/lib/tooling/gateway.js.map +1 -0
  75. package/dist/lib/tooling/loadBundle.d.ts +10 -0
  76. package/dist/lib/tooling/loadBundle.js +27 -0
  77. package/dist/lib/tooling/loadBundle.js.map +1 -0
  78. package/dist/lib/tooling/staticAnalysis.d.ts +11 -0
  79. package/dist/lib/tooling/staticAnalysis.js +167 -0
  80. package/dist/lib/tooling/staticAnalysis.js.map +1 -0
  81. package/dist/lib/tooling/validateBundle.d.ts +19 -0
  82. package/dist/lib/tooling/validateBundle.js +144 -0
  83. package/dist/lib/tooling/validateBundle.js.map +1 -0
  84. package/package.json +47 -5
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) commercetools GmbH
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,64 @@
1
+ # @commercetools/cli-topic-integration-layer
2
+
3
+ A [commercetools CLI](https://github.com/commercetools/cli) plugin that adds the
4
+ `integration-layer` topic. It is published to the public npm registry and installed on
5
+ demand as a runtime oclif plugin — it is never bundled into the base `@commercetools/cli`.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ # Public CLI. NB: use @dev for now — the `plugins` command (@oclif/plugin-plugins)
11
+ # is only in the CLI's dev prerelease; @latest (0.0.17) predates it. Drop to
12
+ # @latest once plugin-plugins is promoted to the latest release.
13
+ npm install -g @commercetools/cli@dev
14
+
15
+ # Opt in to the integration-layer topic (public npm — no auth needed)
16
+ commercetools plugins install @commercetools/cli-topic-integration-layer
17
+ ```
18
+
19
+ ## Commands
20
+
21
+ ```bash
22
+ commercetools integration-layer init <DIR> # scaffold an extension project [local]
23
+
24
+ commercetools integration-layer extension build # bundle src/extension.ts -> dist [local]
25
+ commercetools integration-layer extension validate # local checks + remote compose/breaking gate
26
+ commercetools integration-layer extension push [--force] # build + validate + upload the bundle
27
+ [--source-revision <rev> | --no-source-revision] # provenance; default: detected from git
28
+ commercetools integration-layer extension status # show the project's stored bundle
29
+ commercetools integration-layer extension delete [--yes] # remove the extension subgraph
30
+
31
+ commercetools integration-layer schema fetch [--out f] # print the project's core-subgraph SDL
32
+
33
+ commercetools integration-layer config list # config entries (secrets masked)
34
+ commercetools integration-layer config get <KEY>
35
+ commercetools integration-layer config set <KEY> <VALUE> [--secret]
36
+ commercetools integration-layer config unset <KEY>
37
+ ```
38
+
39
+ Authenticated commands present the token from `commercetools auth login` (a
40
+ `manage_project` bearer) and resolve the integration-layer edge from
41
+ `--integration-layer-url` / `INTEGRATION_LAYER_URL` (a region-implied URL is a TODO).
42
+ `build` / `init` are local and need no login. See
43
+ [`integration-layer-cli-command-structure.md`](../../integration-layer-cli-command-structure.md)
44
+ for the full command → route mapping.
45
+
46
+ ## Develop
47
+
48
+ This package lives in the octolog monorepo as the `integration-layer-cli` domain
49
+ (pnpm workspace, member `app/`). From the repo root:
50
+
51
+ ```bash
52
+ pnpm ilc:install # install
53
+ pnpm ilc:build # tsc -> dist/
54
+ pnpm ilc:typecheck # tsc --noEmit (src + tests)
55
+ pnpm ilc:lint # eslint
56
+ pnpm ilc:test # vitest
57
+
58
+ # Run the built command directly against the public CLI's runner:
59
+ # commercetools plugins link . (from app/, after build)
60
+ ```
61
+
62
+ ## License
63
+
64
+ MIT — see [LICENSE](LICENSE).
@@ -0,0 +1,9 @@
1
+ import { IntegrationLayerCommand } from "../../../lib/base.js";
2
+ export default class ConfigGet extends IntegrationLayerCommand {
3
+ static description: string;
4
+ static examples: string[];
5
+ static args: {
6
+ key: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
7
+ };
8
+ run(): Promise<void>;
9
+ }
@@ -0,0 +1,22 @@
1
+ import { Args } from "@oclif/core";
2
+ import { listConfig } from "../../../lib/ilClient.js";
3
+ import { IntegrationLayerCommand } from "../../../lib/base.js";
4
+ export default class ConfigGet extends IntegrationLayerCommand {
5
+ static description = "Print one extension config entry (secret values masked)";
6
+ static examples = ["<%= config.bin %> integration-layer config get ALGOLIA_APP_ID"];
7
+ static args = {
8
+ key: Args.string({ description: "the config entry key", required: true }),
9
+ };
10
+ async run() {
11
+ const { args, flags } = await this.parse(ConfigGet);
12
+ const { baseUrl, projectKey, token } = await this.resolveIlContext(flags);
13
+ const entries = await listConfig(baseUrl, projectKey, token);
14
+ const entry = entries.find((e) => e.key === args.key);
15
+ if (!entry) {
16
+ this.error(`No config entry '${args.key}' for '${projectKey}'.`);
17
+ }
18
+ const value = entry.secret ? "•••••• (secret)" : String(entry.value ?? "");
19
+ this.log(`${entry.key} = ${value}`);
20
+ }
21
+ }
22
+ //# sourceMappingURL=get.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get.js","sourceRoot":"","sources":["../../../../src/commands/integration-layer/config/get.ts"],"names":[],"mappings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GAAG,MAAM,KAAK,EAAE,CAAC,CAAC;IACtC,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { IntegrationLayerCommand } from "../../../lib/base.js";
2
+ export default class ConfigList extends IntegrationLayerCommand {
3
+ static description: string;
4
+ static examples: string[];
5
+ run(): Promise<void>;
6
+ }
@@ -0,0 +1,20 @@
1
+ import { listConfig } from "../../../lib/ilClient.js";
2
+ import { IntegrationLayerCommand } from "../../../lib/base.js";
3
+ export default class ConfigList extends IntegrationLayerCommand {
4
+ static description = "List the project's extension config entries (secret values masked)";
5
+ static examples = ["<%= config.bin %> integration-layer config list"];
6
+ async run() {
7
+ const { flags } = await this.parse(ConfigList);
8
+ const { baseUrl, projectKey, token } = await this.resolveIlContext(flags);
9
+ const entries = await listConfig(baseUrl, projectKey, token);
10
+ if (entries.length === 0) {
11
+ this.log(`No extension config entries for '${projectKey}'.`);
12
+ return;
13
+ }
14
+ for (const e of entries) {
15
+ const value = e.secret ? "•••••• (secret)" : String(e.value ?? "");
16
+ this.log(`${e.key} = ${value}`);
17
+ }
18
+ }
19
+ }
20
+ //# sourceMappingURL=list.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.js","sourceRoot":"","sources":["../../../../src/commands/integration-layer/config/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,uBAAuB;IAC7D,MAAM,CAAU,WAAW,GAAG,oEAAoE,CAAC;IAEnG,MAAM,CAAU,QAAQ,GAAG,CAAC,iDAAiD,CAAC,CAAC;IAE/E,KAAK,CAAC,GAAG;QACP,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;QAC/C,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;QAC1E,MAAM,OAAO,GAAG,MAAM,UAAU,CAAC,OAAO,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC;QAC7D,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACzB,IAAI,CAAC,GAAG,CAAC,oCAAoC,UAAU,IAAI,CAAC,CAAC;YAC7D,OAAO;QACT,CAAC;QACD,KAAK,MAAM,CAAC,IAAI,OAAO,EAAE,CAAC;YACxB,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC;YACnE,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,KAAK,EAAE,CAAC,CAAC;QAClC,CAAC;IACH,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { IntegrationLayerCommand } from "../../../lib/base.js";
2
+ export default class ConfigSet extends IntegrationLayerCommand {
3
+ static description: string;
4
+ static examples: string[];
5
+ static args: {
6
+ key: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
7
+ value: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
8
+ };
9
+ static flags: {
10
+ secret: import("@oclif/core/interfaces").BooleanFlag<boolean>;
11
+ };
12
+ run(): Promise<void>;
13
+ }
@@ -0,0 +1,29 @@
1
+ import { Args, Flags } from "@oclif/core";
2
+ import { patchConfig } from "../../../lib/ilClient.js";
3
+ import { IntegrationLayerCommand } from "../../../lib/base.js";
4
+ export default class ConfigSet extends IntegrationLayerCommand {
5
+ static description = "Create or update an extension config entry";
6
+ static examples = [
7
+ "<%= config.bin %> integration-layer config set ALGOLIA_APP_ID abc123",
8
+ "<%= config.bin %> integration-layer config set ALGOLIA_API_KEY s3cr3t --secret",
9
+ ];
10
+ static args = {
11
+ key: Args.string({ description: "the config entry key", required: true }),
12
+ value: Args.string({ description: "the value to store", required: true }),
13
+ };
14
+ static flags = {
15
+ secret: Flags.boolean({
16
+ description: "seal the value (write-only thereafter, encrypted at rest)",
17
+ default: false,
18
+ }),
19
+ };
20
+ async run() {
21
+ const { args, flags } = await this.parse(ConfigSet);
22
+ const { baseUrl, projectKey, token } = await this.resolveIlContext(flags);
23
+ await patchConfig(baseUrl, projectKey, token, [
24
+ { key: args.key, value: args.value, secret: flags.secret },
25
+ ]);
26
+ this.log(`✓ set '${args.key}'${flags.secret ? " (secret)" : ""} for '${projectKey}'.`);
27
+ }
28
+ }
29
+ //# sourceMappingURL=set.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"set.js","sourceRoot":"","sources":["../../../../src/commands/integration-layer/config/set.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,uBAAuB;IAC5D,MAAM,CAAU,WAAW,GAAG,4CAA4C,CAAC;IAE3E,MAAM,CAAU,QAAQ,GAAG;QACzB,sEAAsE;QACtE,gFAAgF;KACjF,CAAC;IAEF,MAAM,CAAU,IAAI,GAAG;QACrB,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,sBAAsB,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;QACzE,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,oBAAoB,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;KAC1E,CAAC;IAEF,MAAM,CAAU,KAAK,GAAG;QACtB,MAAM,EAAE,KAAK,CAAC,OAAO,CAAC;YACpB,WAAW,EAAE,2DAA2D;YACxE,OAAO,EAAE,KAAK;SACf,CAAC;KACH,CAAC;IAEF,KAAK,CAAC,GAAG;QACP,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QACpD,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;QAC1E,MAAM,WAAW,CAAC,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE;YAC5C,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE;SAC3D,CAAC,CAAC;QACH,IAAI,CAAC,GAAG,CAAC,UAAU,IAAI,CAAC,GAAG,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,SAAS,UAAU,IAAI,CAAC,CAAC;IACzF,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { IntegrationLayerCommand } from "../../../lib/base.js";
2
+ export default class ConfigUnset extends IntegrationLayerCommand {
3
+ static description: string;
4
+ static examples: string[];
5
+ static args: {
6
+ key: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
7
+ };
8
+ run(): Promise<void>;
9
+ }
@@ -0,0 +1,18 @@
1
+ import { Args } from "@oclif/core";
2
+ import { patchConfig } from "../../../lib/ilClient.js";
3
+ import { IntegrationLayerCommand } from "../../../lib/base.js";
4
+ export default class ConfigUnset extends IntegrationLayerCommand {
5
+ static description = "Remove an extension config entry";
6
+ static examples = ["<%= config.bin %> integration-layer config unset ALGOLIA_APP_ID"];
7
+ static args = {
8
+ key: Args.string({ description: "the config entry key", required: true }),
9
+ };
10
+ async run() {
11
+ const { args, flags } = await this.parse(ConfigUnset);
12
+ const { baseUrl, projectKey, token } = await this.resolveIlContext(flags);
13
+ // A PATCH entry with `value: null` deletes that key (integration layer contract).
14
+ await patchConfig(baseUrl, projectKey, token, [{ key: args.key, value: null }]);
15
+ this.log(`✓ removed '${args.key}' from '${projectKey}'.`);
16
+ }
17
+ }
18
+ //# sourceMappingURL=unset.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unset.js","sourceRoot":"","sources":["../../../../src/commands/integration-layer/config/unset.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,uBAAuB;IAC9D,MAAM,CAAU,WAAW,GAAG,kCAAkC,CAAC;IAEjE,MAAM,CAAU,QAAQ,GAAG,CAAC,iEAAiE,CAAC,CAAC;IAE/F,MAAM,CAAU,IAAI,GAAG;QACrB,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,sBAAsB,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;KAC1E,CAAC;IAEF,KAAK,CAAC,GAAG;QACP,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;QACtD,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;QAC1E,kFAAkF;QAClF,MAAM,WAAW,CAAC,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;QAChF,IAAI,CAAC,GAAG,CAAC,cAAc,IAAI,CAAC,GAAG,WAAW,UAAU,IAAI,CAAC,CAAC;IAC5D,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { Command } from "@oclif/core";
2
+ export default class ExtensionBuild extends Command {
3
+ static description: string;
4
+ static examples: string[];
5
+ static flags: {
6
+ entry: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
7
+ out: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
8
+ all: import("@oclif/core/interfaces").BooleanFlag<boolean>;
9
+ "extensions-dir": import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
10
+ };
11
+ run(): Promise<void>;
12
+ }
@@ -0,0 +1,40 @@
1
+ import { Command, Flags } from "@oclif/core";
2
+ import { defaultEntry, defaultOutfile } from "../../../lib/tooling/build.js";
3
+ import { bundleForFlags } from "../../../lib/tooling/extensions.js";
4
+ export default class ExtensionBuild extends Command {
5
+ static description = "Bundle src/extension.ts into a single self-contained CommonJS artifact";
6
+ static examples = [
7
+ "<%= config.bin %> integration-layer extension build",
8
+ "<%= config.bin %> integration-layer extension build --entry src/extension.ts --out dist/extension.js",
9
+ "<%= config.bin %> integration-layer extension build --all",
10
+ ];
11
+ static flags = {
12
+ entry: Flags.string({ description: "extension entry source file", default: defaultEntry() }),
13
+ out: Flags.string({ description: "bundle output file", default: defaultOutfile() }),
14
+ all: Flags.boolean({
15
+ description: "merge every extension under ./extensions/* into ONE combined bundle (the single artifact a project deploys)",
16
+ default: false,
17
+ }),
18
+ "extensions-dir": Flags.string({
19
+ description: "directory holding the extension packages (used with --all)",
20
+ default: "extensions",
21
+ }),
22
+ };
23
+ async run() {
24
+ const { flags } = await this.parse(ExtensionBuild);
25
+ let built;
26
+ try {
27
+ built = await bundleForFlags({
28
+ all: flags.all,
29
+ extensionsDir: flags["extensions-dir"],
30
+ entry: flags.entry,
31
+ out: flags.out,
32
+ });
33
+ }
34
+ catch (err) {
35
+ this.error(err.message);
36
+ }
37
+ this.log(`✓ bundled ${built.describe} → ${built.outfile}`);
38
+ }
39
+ }
40
+ //# sourceMappingURL=build.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build.js","sourceRoot":"","sources":["../../../../src/commands/integration-layer/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OAAO,GAAG,EAAE,CAAC;YACb,IAAI,CAAC,KAAK,CAAE,GAAa,CAAC,OAAO,CAAC,CAAC;QACrC,CAAC;QACD,IAAI,CAAC,GAAG,CAAC,aAAa,KAAK,CAAC,QAAQ,MAAM,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;IAC7D,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { IntegrationLayerCommand } from "../../../lib/base.js";
2
+ export default class ExtensionDelete extends IntegrationLayerCommand {
3
+ static description: string;
4
+ static examples: string[];
5
+ static flags: {
6
+ yes: import("@oclif/core/interfaces").BooleanFlag<boolean>;
7
+ };
8
+ run(): Promise<void>;
9
+ }
@@ -0,0 +1,39 @@
1
+ import { createInterface } from "node:readline/promises";
2
+ import { stdin, stdout } from "node:process";
3
+ import { Flags } from "@oclif/core";
4
+ import { deleteExtensionSubgraph } from "../../../lib/ilClient.js";
5
+ import { IntegrationLayerCommand } from "../../../lib/base.js";
6
+ async function confirm(question) {
7
+ const rl = createInterface({ input: stdin, output: stdout });
8
+ try {
9
+ const answer = (await rl.question(`${question} `)).trim().toLowerCase();
10
+ return answer === "y" || answer === "yes";
11
+ }
12
+ finally {
13
+ rl.close();
14
+ }
15
+ }
16
+ export default class ExtensionDelete extends IntegrationLayerCommand {
17
+ static description = "Remove the extension subgraph from the project's published graph";
18
+ static examples = [
19
+ "<%= config.bin %> integration-layer extension delete",
20
+ "<%= config.bin %> integration-layer extension delete --yes",
21
+ ];
22
+ static flags = {
23
+ yes: Flags.boolean({ char: "y", description: "skip the confirmation prompt", default: false }),
24
+ };
25
+ async run() {
26
+ const { flags } = await this.parse(ExtensionDelete);
27
+ const { baseUrl, projectKey, token } = await this.resolveIlContext(flags);
28
+ if (!flags.yes) {
29
+ const confirmed = await confirm(`Remove the extension subgraph for '${projectKey}' from the published graph? (y/N)`);
30
+ if (!confirmed) {
31
+ this.log("Aborted.");
32
+ return;
33
+ }
34
+ }
35
+ await deleteExtensionSubgraph(baseUrl, projectKey, token);
36
+ this.log(`✓ removed the extension subgraph for '${projectKey}'.`);
37
+ }
38
+ }
39
+ //# sourceMappingURL=delete.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete.js","sourceRoot":"","sources":["../../../../src/commands/integration-layer/extension/delete.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,KAAK,UAAU,OAAO,CAAC,QAAgB;IACrC,MAAM,EAAE,GAAG,eAAe,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IAC7D,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,GAAG,QAAQ,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;QACxE,OAAO,MAAM,KAAK,GAAG,IAAI,MAAM,KAAK,KAAK,CAAC;IAC5C,CAAC;YAAS,CAAC;QACT,EAAE,CAAC,KAAK,EAAE,CAAC;IACb,CAAC;AACH,CAAC;AAED,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,uBAAuB;IAClE,MAAM,CAAU,WAAW,GAAG,kEAAkE,CAAC;IAEjG,MAAM,CAAU,QAAQ,GAAG;QACzB,sDAAsD;QACtD,4DAA4D;KAC7D,CAAC;IAEF,MAAM,CAAU,KAAK,GAAG;QACtB,GAAG,EAAE,KAAK,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,WAAW,EAAE,8BAA8B,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;KAC/F,CAAC;IAEF,KAAK,CAAC,GAAG;QACP,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;QACpD,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;QAE1E,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;YACf,MAAM,SAAS,GAAG,MAAM,OAAO,CAC7B,sCAAsC,UAAU,mCAAmC,CACpF,CAAC;YACF,IAAI,CAAC,SAAS,EAAE,CAAC;gBACf,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;gBACrB,OAAO;YACT,CAAC;QACH,CAAC;QAED,MAAM,uBAAuB,CAAC,OAAO,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC;QAC1D,IAAI,CAAC,GAAG,CAAC,yCAAyC,UAAU,IAAI,CAAC,CAAC;IACpE,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { Command } from "@oclif/core";
2
+ export default class ExtensionInvoke extends Command {
3
+ static description: string;
4
+ static examples: string[];
5
+ static flags: {
6
+ entry: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
7
+ out: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
8
+ action: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
9
+ sku: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
10
+ config: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
11
+ };
12
+ run(): Promise<void>;
13
+ }
@@ -0,0 +1,89 @@
1
+ import { readFile } from "node:fs/promises";
2
+ import { Command, Flags } from "@oclif/core";
3
+ import { buildBundle, defaultEntry, defaultOutfile } from "../../../lib/tooling/build.js";
4
+ import { loadBundleSource } from "../../../lib/tooling/loadBundle.js";
5
+ /** A sample commercetools cart callback payload. */
6
+ function sampleCartInput(action, sku) {
7
+ // A minimal sample callback for local testing. The real payload is the SDK's
8
+ // ExtensionInput (resource: a full Cart Reference); we send just the fields a
9
+ // cart handler reads, cast to the SDK type.
10
+ return {
11
+ action,
12
+ resource: {
13
+ typeId: "cart",
14
+ id: "sample-cart",
15
+ obj: {
16
+ id: "sample-cart",
17
+ lineItems: [{ id: "sample-line-item", quantity: 1, variant: { sku } }],
18
+ },
19
+ },
20
+ };
21
+ }
22
+ function describeResult(result) {
23
+ if (result && typeof result === "object") {
24
+ if (Array.isArray(result.errors) && result.errors.length > 0) {
25
+ return `BLOCK — ${result.errors.map((e) => `${e.code}: ${e.message}`).join("; ")}`;
26
+ }
27
+ if (Array.isArray(result.actions) && result.actions.length > 0) {
28
+ return `MODIFY — ${JSON.stringify(result.actions)}`;
29
+ }
30
+ }
31
+ return "APPROVE";
32
+ }
33
+ export default class ExtensionInvoke extends Command {
34
+ static description = "Fire a sample commercetools cart callback at the bundle's API-Extension handlers";
35
+ static examples = [
36
+ "<%= config.bin %> integration-layer extension invoke",
37
+ "<%= config.bin %> integration-layer extension invoke --action Update --sku BLOCKED-SKU",
38
+ "<%= config.bin %> integration-layer extension invoke --config MAX_QTY=5 --config REGION=eu",
39
+ ];
40
+ static flags = {
41
+ entry: Flags.string({ description: "extension entry source file", default: defaultEntry() }),
42
+ out: Flags.string({ description: "bundle output file", default: defaultOutfile() }),
43
+ action: Flags.string({
44
+ description: "the trigger action",
45
+ options: ["Create", "Update"],
46
+ default: "Create",
47
+ }),
48
+ sku: Flags.string({
49
+ description: "SKU on the sample cart's line item",
50
+ default: "BLOCKED-SKU",
51
+ }),
52
+ config: Flags.string({
53
+ description: "a ctx.config entry as KEY=VALUE (repeatable)",
54
+ multiple: true,
55
+ delimiter: ",",
56
+ }),
57
+ };
58
+ async run() {
59
+ const { flags } = await this.parse(ExtensionInvoke);
60
+ const config = {};
61
+ for (const pair of flags.config ?? []) {
62
+ const eq = pair.indexOf("=");
63
+ if (eq > 0)
64
+ config[pair.slice(0, eq)] = pair.slice(eq + 1);
65
+ }
66
+ const { outfile } = await buildBundle(flags.entry, flags.out);
67
+ const mod = loadBundleSource(await readFile(outfile, "utf8"));
68
+ const handlers = Array.isArray(mod.apiExtensions)
69
+ ? mod.apiExtensions
70
+ : [];
71
+ if (handlers.length === 0) {
72
+ this.error("this bundle declares no `apiExtensions`.");
73
+ }
74
+ const action = flags.action;
75
+ const input = sampleCartInput(action, flags.sku);
76
+ const ctx = { now: () => Date.now(), config };
77
+ this.log(`Invoking ${handlers.length} handler(s) with a ${input.action} on cart ` +
78
+ `(line item SKU '${flags.sku}')`);
79
+ for (const h of handlers) {
80
+ if (h.resourceTypeId !== input.resource.typeId || !h.actions.includes(action)) {
81
+ this.log(` · ${h.key}: skipped (does not trigger on cart/${action})`);
82
+ continue;
83
+ }
84
+ const result = await h.handler(input, ctx);
85
+ this.log(` → ${h.key}: ${describeResult(result)}`);
86
+ }
87
+ }
88
+ }
89
+ //# sourceMappingURL=invoke.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"invoke.js","sourceRoot":"","sources":["../../../../src/commands/integration-layer/extension/invoke.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC1F,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAQtE,oDAAoD;AACpD,SAAS,eAAe,CAAC,MAA0B,EAAE,GAAW;IAC9D,6EAA6E;IAC7E,8EAA8E;IAC9E,4CAA4C;IAC5C,OAAO;QACL,MAAM;QACN,QAAQ,EAAE;YACR,MAAM,EAAE,MAAM;YACd,EAAE,EAAE,aAAa;YACjB,GAAG,EAAE;gBACH,EAAE,EAAE,aAAa;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E,CAAC;QACP,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC1B,IAAI,CAAC,KAAK,CAAC,0CAA0C,CAAC,CAAC;QACzD,CAAC;QAED,MAAM,MAAM,GAAG,KAAK,CAAC,MAA4B,CAAC;QAClD,MAAM,KAAK,GAAG,eAAe,CAAC,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;QACjD,MAAM,GAAG,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,EAAE,MAAM,EAAE,CAAC;QAC9C,IAAI,CAAC,GAAG,CACN,YAAY,QAAQ,CAAC,MAAM,sBAAsB,KAAK,CAAC,MAAM,WAAW;YACtE,mBAAmB,KAAK,CAAC,GAAG,IAAI,CACnC,CAAC;QAEF,KAAK,MAAM,CAAC,IAAI,QAAQ,EAAE,CAAC;YACzB,IAAI,CAAC,CAAC,cAAc,KAAK,KAAK,CAAC,QAAQ,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;gBAC9E,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,GAAG,uCAAuC,MAAM,GAAG,CAAC,CAAC;gBACvE,SAAS;YACX,CAAC;YACD,MAAM,MAAM,GAAG,MAAM,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;YAC3C,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,GAAG,KAAK,cAAc,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QACtD,CAAC;IACH,CAAC"}
@@ -0,0 +1,28 @@
1
+ import { IntegrationLayerCommand } from "../../../lib/base.js";
2
+ export default class ExtensionPush extends IntegrationLayerCommand {
3
+ static description: string;
4
+ static examples: string[];
5
+ static flags: {
6
+ entry: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
7
+ out: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
8
+ all: import("@oclif/core/interfaces").BooleanFlag<boolean>;
9
+ "extensions-dir": import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
10
+ force: import("@oclif/core/interfaces").BooleanFlag<boolean>;
11
+ "source-revision": import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
12
+ "no-source-revision": import("@oclif/core/interfaces").BooleanFlag<boolean>;
13
+ wait: import("@oclif/core/interfaces").BooleanFlag<boolean>;
14
+ "wait-timeout": import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
15
+ };
16
+ /**
17
+ * Report how the pushed version fared and say whether the command should fail.
18
+ *
19
+ * Only a genuine `failed` verdict is an error. Not being ABLE to find out — an
20
+ * older integration layer, an extension that isn't deployed, a metadata read that
21
+ * errored — is reported honestly and left as a success, because the push itself
22
+ * did land and failing it would break workflows that never had this signal.
23
+ */
24
+ private reportOutcome;
25
+ /** True when the remote result should abort the push. */
26
+ private reportRemote;
27
+ run(): Promise<void>;
28
+ }