@commercetools/cli-topic-integration-layer 0.3.1 → 0.4.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/README.md
CHANGED
|
@@ -34,6 +34,8 @@ commercetools integration-layer config list # config entries (secr
|
|
|
34
34
|
commercetools integration-layer config get <KEY>
|
|
35
35
|
commercetools integration-layer config set <KEY> <VALUE> [--secret]
|
|
36
36
|
commercetools integration-layer config unset <KEY>
|
|
37
|
+
|
|
38
|
+
commercetools integration-layer --version # print the installed plugin version [local]
|
|
37
39
|
```
|
|
38
40
|
|
|
39
41
|
Authenticated commands present the token from `commercetools auth login` (a
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Command } from "@oclif/core";
|
|
2
|
+
export default class IntegrationLayer extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static flags: {
|
|
6
|
+
version: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
7
|
+
};
|
|
8
|
+
run(): Promise<void>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
2
|
+
import { Command, Flags } from "@oclif/core";
|
|
3
|
+
// The plugin's own package.json — three levels up from this command file both in
|
|
4
|
+
// `src/` (vitest/tsx) and the compiled `dist/` tree, since `tsc` preserves the
|
|
5
|
+
// `commands/integration-layer/` layout under `dist/`.
|
|
6
|
+
const pkg = JSON.parse(readFileSync(new URL("../../../package.json", import.meta.url), "utf8"));
|
|
7
|
+
// The topic's index command. Its only job is to mirror the root CLI's `--version`
|
|
8
|
+
// at the topic level (`commercetools integration-layer --version`); with no flag it
|
|
9
|
+
// just shows the topic help, so `commercetools integration-layer` behaves as before.
|
|
10
|
+
export default class IntegrationLayer extends Command {
|
|
11
|
+
static description = "The integration-layer extensions topic";
|
|
12
|
+
static examples = ["<%= config.bin %> integration-layer --version"];
|
|
13
|
+
static flags = {
|
|
14
|
+
version: Flags.boolean({
|
|
15
|
+
char: "v",
|
|
16
|
+
description: "print the installed integration-layer plugin version",
|
|
17
|
+
}),
|
|
18
|
+
};
|
|
19
|
+
async run() {
|
|
20
|
+
const { flags } = await this.parse(IntegrationLayer);
|
|
21
|
+
if (flags.version) {
|
|
22
|
+
this.log(`${pkg.name}/${pkg.version}`);
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
await this.config.runCommand("help", ["integration-layer"]);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/integration-layer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAE7C,iFAAiF;AACjF,+EAA+E;AAC/E,sDAAsD;AACtD,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CACpB,YAAY,CAAC,IAAI,GAAG,CAAC,uBAAuB,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,CACnC,CAAC;AAEvC,kFAAkF;AAClF,oFAAoF;AACpF,qFAAqF;AACrF,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,OAAO;IACnD,MAAM,CAAU,WAAW,GAAG,wCAAwC,CAAC;IAEvE,MAAM,CAAU,QAAQ,GAAG,CAAC,+CAA+C,CAAC,CAAC;IAE7E,MAAM,CAAU,KAAK,GAAG;QACtB,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC;YACrB,IAAI,EAAE,GAAG;YACT,WAAW,EAAE,sDAAsD;SACpE,CAAC;KACH,CAAC;IAEF,KAAK,CAAC,GAAG;QACP,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;QAErD,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC;YAClB,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,IAAI,IAAI,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;YACvC,OAAO;QACT,CAAC;QAED,MAAM,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,mBAAmB,CAAC,CAAC,CAAC;IAC9D,CAAC"}
|