@ecomweb/cli 0.6.0 → 0.7.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.
Files changed (126) hide show
  1. package/README.md +181 -10
  2. package/dist/commands/auth/login.js +3 -3
  3. package/dist/commands/auth/login.js.map +1 -1
  4. package/dist/commands/deploy.js +16 -3
  5. package/dist/commands/deploy.js.map +1 -1
  6. package/dist/commands/deployments/promote.js +1 -1
  7. package/dist/commands/deployments/promote.js.map +1 -1
  8. package/dist/commands/deployments/rollback.js +1 -1
  9. package/dist/commands/deployments/rollback.js.map +1 -1
  10. package/dist/commands/deployments/unpublish.js +1 -1
  11. package/dist/commands/deployments/unpublish.js.map +1 -1
  12. package/dist/commands/describe.d.ts +1 -1
  13. package/dist/commands/describe.js +4 -4
  14. package/dist/commands/describe.js.map +1 -1
  15. package/dist/commands/metafield-definitions/create.d.ts +20 -0
  16. package/dist/commands/metafield-definitions/create.js +34 -0
  17. package/dist/commands/metafield-definitions/create.js.map +1 -0
  18. package/dist/commands/metafield-definitions/delete.d.ts +21 -0
  19. package/dist/commands/metafield-definitions/delete.js +32 -0
  20. package/dist/commands/metafield-definitions/delete.js.map +1 -0
  21. package/dist/commands/metafield-definitions/get.d.ts +21 -0
  22. package/dist/commands/metafield-definitions/get.js +30 -0
  23. package/dist/commands/metafield-definitions/get.js.map +1 -0
  24. package/dist/commands/metafield-definitions/list.d.ts +19 -0
  25. package/dist/commands/metafield-definitions/list.js +35 -0
  26. package/dist/commands/metafield-definitions/list.js.map +1 -0
  27. package/dist/commands/metafield-definitions/update.d.ts +23 -0
  28. package/dist/commands/metafield-definitions/update.js +39 -0
  29. package/dist/commands/metafield-definitions/update.js.map +1 -0
  30. package/dist/commands/metafields/get.d.ts +19 -0
  31. package/dist/commands/metafields/get.js +32 -0
  32. package/dist/commands/metafields/get.js.map +1 -0
  33. package/dist/commands/metafields/set.d.ts +24 -0
  34. package/dist/commands/metafields/set.js +83 -0
  35. package/dist/commands/metafields/set.js.map +1 -0
  36. package/dist/commands/metaobject-definitions/create.d.ts +20 -0
  37. package/dist/commands/metaobject-definitions/create.js +33 -0
  38. package/dist/commands/metaobject-definitions/create.js.map +1 -0
  39. package/dist/commands/metaobject-definitions/delete.d.ts +21 -0
  40. package/dist/commands/metaobject-definitions/delete.js +32 -0
  41. package/dist/commands/metaobject-definitions/delete.js.map +1 -0
  42. package/dist/commands/metaobject-definitions/get.d.ts +21 -0
  43. package/dist/commands/metaobject-definitions/get.js +31 -0
  44. package/dist/commands/metaobject-definitions/get.js.map +1 -0
  45. package/dist/commands/metaobject-definitions/list.d.ts +20 -0
  46. package/dist/commands/metaobject-definitions/list.js +41 -0
  47. package/dist/commands/metaobject-definitions/list.js.map +1 -0
  48. package/dist/commands/metaobject-definitions/update.d.ts +23 -0
  49. package/dist/commands/metaobject-definitions/update.js +38 -0
  50. package/dist/commands/metaobject-definitions/update.js.map +1 -0
  51. package/dist/commands/metaobjects/create.d.ts +24 -0
  52. package/dist/commands/metaobjects/create.js +40 -0
  53. package/dist/commands/metaobjects/create.js.map +1 -0
  54. package/dist/commands/metaobjects/delete.d.ts +22 -0
  55. package/dist/commands/metaobjects/delete.js +34 -0
  56. package/dist/commands/metaobjects/delete.js.map +1 -0
  57. package/dist/commands/metaobjects/get.d.ts +22 -0
  58. package/dist/commands/metaobjects/get.js +32 -0
  59. package/dist/commands/metaobjects/get.js.map +1 -0
  60. package/dist/commands/metaobjects/list.d.ts +24 -0
  61. package/dist/commands/metaobjects/list.js +56 -0
  62. package/dist/commands/metaobjects/list.js.map +1 -0
  63. package/dist/commands/metaobjects/update.d.ts +27 -0
  64. package/dist/commands/metaobjects/update.js +45 -0
  65. package/dist/commands/metaobjects/update.js.map +1 -0
  66. package/dist/commands/storefront/init.d.ts +3 -1
  67. package/dist/commands/storefront/init.js +23 -2
  68. package/dist/commands/storefront/init.js.map +1 -1
  69. package/dist/commands/theme/create.d.ts +20 -0
  70. package/dist/commands/theme/create.js +40 -0
  71. package/dist/commands/theme/create.js.map +1 -0
  72. package/dist/commands/theme/duplicate.d.ts +22 -0
  73. package/dist/commands/theme/duplicate.js +34 -0
  74. package/dist/commands/theme/duplicate.js.map +1 -0
  75. package/dist/commands/theme/link.d.ts +24 -0
  76. package/dist/commands/theme/link.js +60 -0
  77. package/dist/commands/theme/link.js.map +1 -0
  78. package/dist/commands/theme/list.d.ts +18 -0
  79. package/dist/commands/theme/list.js +32 -0
  80. package/dist/commands/theme/list.js.map +1 -0
  81. package/dist/commands/theme/publish.d.ts +22 -0
  82. package/dist/commands/theme/publish.js +68 -0
  83. package/dist/commands/theme/publish.js.map +1 -0
  84. package/dist/commands/theme/schema/push.d.ts +20 -0
  85. package/dist/commands/theme/schema/push.js +61 -0
  86. package/dist/commands/theme/schema/push.js.map +1 -0
  87. package/dist/commands/theme/update.d.ts +23 -0
  88. package/dist/commands/theme/update.js +62 -0
  89. package/dist/commands/theme/update.js.map +1 -0
  90. package/dist/commands/theme/use.d.ts +23 -0
  91. package/dist/commands/theme/use.js +71 -0
  92. package/dist/commands/theme/use.js.map +1 -0
  93. package/dist/commands/theme/versions.d.ts +21 -0
  94. package/dist/commands/theme/versions.js +33 -0
  95. package/dist/commands/theme/versions.js.map +1 -0
  96. package/dist/lib/config.d.ts +1 -1
  97. package/dist/lib/config.js +4 -3
  98. package/dist/lib/config.js.map +1 -1
  99. package/dist/lib/custom-data.d.ts +42 -0
  100. package/dist/lib/custom-data.js +167 -0
  101. package/dist/lib/custom-data.js.map +1 -0
  102. package/dist/lib/deployments.d.ts +8 -1
  103. package/dist/lib/deployments.js +58 -11
  104. package/dist/lib/deployments.js.map +1 -1
  105. package/dist/lib/describe-metafields.d.ts +9 -0
  106. package/dist/lib/describe-metafields.js +213 -0
  107. package/dist/lib/describe-metafields.js.map +1 -0
  108. package/dist/lib/live-confirm.d.ts +11 -0
  109. package/dist/lib/live-confirm.js +34 -0
  110. package/dist/lib/live-confirm.js.map +1 -0
  111. package/dist/lib/project-setup.d.ts +1 -0
  112. package/dist/lib/project-setup.js +20 -0
  113. package/dist/lib/project-setup.js.map +1 -1
  114. package/dist/lib/template-scaffold.d.ts +1 -0
  115. package/dist/lib/template-scaffold.js +5 -2
  116. package/dist/lib/template-scaffold.js.map +1 -1
  117. package/dist/lib/theme-schema-export.d.ts +1 -1
  118. package/dist/lib/theme-schema-export.js +4 -5
  119. package/dist/lib/theme-schema-export.js.map +1 -1
  120. package/dist/lib/themes.d.ts +143 -0
  121. package/dist/lib/themes.js +277 -0
  122. package/dist/lib/themes.js.map +1 -0
  123. package/dist/lib/validators.js +16 -0
  124. package/dist/lib/validators.js.map +1 -1
  125. package/oclif.manifest.json +6600 -3469
  126. package/package.json +1 -1
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const core_1 = require("@oclif/core");
4
+ const base_command_1 = require("../../base-command");
5
+ const output_1 = require("../../lib/output");
6
+ const themes_1 = require("../../lib/themes");
7
+ const DEFAULT_NOTE = "Note: theme create adds the Default catalog theme (pick another with --from). For your own code, get it with ecomweb storefront init --theme <id>, then ecomweb deploy";
8
+ class ThemeCreate extends base_command_1.BaseCommand {
9
+ async run() {
10
+ const storeRef = this.requireStore();
11
+ const name = this.getFlag("name")?.trim() || undefined;
12
+ const from = this.getFlag("from")?.trim() || undefined;
13
+ if (name && !from && !this.getFlag("quiet")) {
14
+ process.stderr.write(`${DEFAULT_NOTE}\n`);
15
+ }
16
+ const input = { name, from };
17
+ if (this.isDryRun) {
18
+ this.outputResult((0, output_1.mutationEnvelope)("theme", "create (dry-run)", storeRef, (0, themes_1.createThemeBody)(input)));
19
+ return;
20
+ }
21
+ const row = (0, themes_1.themeRow)(await (0, themes_1.createTheme)(this.apiClient, input));
22
+ this.outputResult((0, output_1.mutationEnvelope)("theme", "create", storeRef, row, {
23
+ next: `ecomweb storefront init --theme ${row.id}`,
24
+ link: `ecomweb theme link ${row.id} --url <https url>`,
25
+ publish: `ecomweb theme publish ${row.id}`,
26
+ }));
27
+ }
28
+ }
29
+ ThemeCreate.description = "Add a theme from the theme store (--from, default: the Default theme), using its newest release. Put your own code on it with `ecomweb deploy --theme <id>`, or your own site with `ecomweb theme link`";
30
+ ThemeCreate.examples = [
31
+ "ecomweb theme create",
32
+ 'ecomweb theme create --from default --name "My code"',
33
+ ];
34
+ ThemeCreate.flags = {
35
+ ...base_command_1.BaseCommand.baseFlags,
36
+ from: core_1.Flags.string({ description: `The theme store's theme to add (default: ${themes_1.DEFAULT_CATALOG_THEME})` }),
37
+ name: core_1.Flags.string({ description: "The theme's name (default: the catalog theme's)" }),
38
+ };
39
+ exports.default = ThemeCreate;
40
+ //# sourceMappingURL=create.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create.js","sourceRoot":"","sources":["../../../src/commands/theme/create.ts"],"names":[],"mappings":";;AAAA,sCAAoC;AACpC,qDAAiD;AACjD,6CAAoD;AACpD,6CAAiG;AAEjG,MAAM,YAAY,GAChB,wKAAwK,CAAC;AAE3K,MAAqB,WAAY,SAAQ,0BAAW;IAelD,KAAK,CAAC,GAAG;QACP,MAAM,QAAQ,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;QACrC,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAqB,MAAM,CAAC,EAAE,IAAI,EAAE,IAAI,SAAS,CAAC;QAC3E,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAqB,MAAM,CAAC,EAAE,IAAI,EAAE,IAAI,SAAS,CAAC;QAC3E,IAAI,IAAI,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO,CAAU,OAAO,CAAC,EAAE,CAAC;YACrD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,YAAY,IAAI,CAAC,CAAC;QAC5C,CAAC;QACD,MAAM,KAAK,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;QAE7B,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAClB,IAAI,CAAC,YAAY,CAAC,IAAA,yBAAgB,EAAC,OAAO,EAAE,kBAAkB,EAAE,QAAQ,EAAE,IAAA,wBAAe,EAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YACnG,OAAO;QACT,CAAC;QAED,MAAM,GAAG,GAAG,IAAA,iBAAQ,EAAC,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC;QAC/D,IAAI,CAAC,YAAY,CACf,IAAA,yBAAgB,EAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,EAAE;YACjD,IAAI,EAAE,mCAAmC,GAAG,CAAC,EAAE,EAAE;YACjD,IAAI,EAAE,sBAAsB,GAAG,CAAC,EAAE,oBAAoB;YACtD,OAAO,EAAE,yBAAyB,GAAG,CAAC,EAAE,EAAE;SAC3C,CAAC,CACH,CAAC;IACJ,CAAC;;AApCM,uBAAW,GAChB,yMAAyM,CAAC;AAErM,oBAAQ,GAAG;IAChB,sBAAsB;IACtB,sDAAsD;CACvD,CAAC;AAEK,iBAAK,GAAG;IACb,GAAG,0BAAW,CAAC,SAAS;IACxB,IAAI,EAAE,YAAK,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,4CAA4C,8BAAqB,GAAG,EAAE,CAAC;IACzG,IAAI,EAAE,YAAK,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,iDAAiD,EAAE,CAAC;CACvF,CAAC;kBAbiB,WAAW"}
@@ -0,0 +1,22 @@
1
+ import { BaseCommand } from "../../base-command";
2
+ export default class ThemeDuplicate extends BaseCommand {
3
+ static description: string;
4
+ static examples: string[];
5
+ static args: {
6
+ id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
7
+ };
8
+ static flags: {
9
+ name: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
10
+ "store-ref": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
11
+ "api-key": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
12
+ "api-url": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
13
+ output: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
14
+ quiet: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
15
+ "dry-run": import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
16
+ profile: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
17
+ full: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
18
+ fields: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
19
+ exclude: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
20
+ };
21
+ run(): Promise<void>;
22
+ }
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const core_1 = require("@oclif/core");
4
+ const base_command_1 = require("../../base-command");
5
+ const output_1 = require("../../lib/output");
6
+ const themes_1 = require("../../lib/themes");
7
+ class ThemeDuplicate extends base_command_1.BaseCommand {
8
+ async run() {
9
+ const storeRef = this.requireStore();
10
+ const { args } = await this.parse(ThemeDuplicate);
11
+ const name = this.getFlag("name")?.trim() || undefined;
12
+ if (this.isDryRun) {
13
+ this.outputResult((0, output_1.mutationEnvelope)("theme", "duplicate (dry-run)", storeRef, { theme: args.id, ...(name && { name }) }));
14
+ return;
15
+ }
16
+ const row = (0, themes_1.themeRow)(await (0, themes_1.duplicateTheme)(this.apiClient, args.id, name));
17
+ this.outputResult((0, output_1.mutationEnvelope)("theme", "duplicate", storeRef, row, {
18
+ next: `ecomweb storefront init --theme ${row.id}`,
19
+ deploy: `ecomweb deploy --theme ${row.id}`,
20
+ publish: `ecomweb theme publish ${row.id}`,
21
+ }));
22
+ }
23
+ }
24
+ ThemeDuplicate.description = "Copy a theme: its settings, starting with the same version in use. Copy the live theme to change it (e.g. put your code on it) without touching your shop";
25
+ ThemeDuplicate.examples = ["ecomweb theme duplicate 1", 'ecomweb theme duplicate 1 --name "My code"'];
26
+ ThemeDuplicate.args = {
27
+ id: core_1.Args.string({ description: "The theme to copy (see ecomweb theme list)", required: true }),
28
+ };
29
+ ThemeDuplicate.flags = {
30
+ ...base_command_1.BaseCommand.baseFlags,
31
+ name: core_1.Flags.string({ description: 'The copy\'s name (default: "<name> (bản sao)")' }),
32
+ };
33
+ exports.default = ThemeDuplicate;
34
+ //# sourceMappingURL=duplicate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"duplicate.js","sourceRoot":"","sources":["../../../src/commands/theme/duplicate.ts"],"names":[],"mappings":";;AAAA,sCAA0C;AAC1C,qDAAiD;AACjD,6CAAoD;AACpD,6CAA4D;AAE5D,MAAqB,cAAe,SAAQ,0BAAW;IAerD,KAAK,CAAC,GAAG;QACP,MAAM,QAAQ,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;QACrC,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;QAClD,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAqB,MAAM,CAAC,EAAE,IAAI,EAAE,IAAI,SAAS,CAAC;QAC3E,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAClB,IAAI,CAAC,YAAY,CAAC,IAAA,yBAAgB,EAAC,OAAO,EAAE,qBAAqB,EAAE,QAAQ,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,EAAE,GAAG,CAAC,IAAI,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;YACzH,OAAO;QACT,CAAC;QACD,MAAM,GAAG,GAAG,IAAA,iBAAQ,EAAC,MAAM,IAAA,uBAAc,EAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC;QAC1E,IAAI,CAAC,YAAY,CACf,IAAA,yBAAgB,EAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,GAAG,EAAE;YACpD,IAAI,EAAE,mCAAmC,GAAG,CAAC,EAAE,EAAE;YACjD,MAAM,EAAE,0BAA0B,GAAG,CAAC,EAAE,EAAE;YAC1C,OAAO,EAAE,yBAAyB,GAAG,CAAC,EAAE,EAAE;SAC3C,CAAC,CACH,CAAC;IACJ,CAAC;;AA9BM,0BAAW,GAChB,2JAA2J,CAAC;AAEvJ,uBAAQ,GAAG,CAAC,2BAA2B,EAAE,4CAA4C,CAAC,CAAC;AAEvF,mBAAI,GAAG;IACZ,EAAE,EAAE,WAAI,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,4CAA4C,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;CAC/F,CAAC;AAEK,oBAAK,GAAG;IACb,GAAG,0BAAW,CAAC,SAAS;IACxB,IAAI,EAAE,YAAK,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,gDAAgD,EAAE,CAAC;CACtF,CAAC;kBAbiB,cAAc"}
@@ -0,0 +1,24 @@
1
+ import { BaseCommand } from "../../base-command";
2
+ export default class ThemeLink extends BaseCommand {
3
+ static description: string;
4
+ static examples: string[];
5
+ static args: {
6
+ id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
7
+ };
8
+ static flags: {
9
+ url: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
10
+ "allowed-origin": import("@oclif/core/lib/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
11
+ yes: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
12
+ "store-ref": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
13
+ "api-key": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
14
+ "api-url": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
15
+ output: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
16
+ quiet: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
17
+ "dry-run": import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
18
+ profile: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
19
+ full: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
20
+ fields: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
21
+ exclude: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
22
+ };
23
+ run(): Promise<void>;
24
+ }
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const core_1 = require("@oclif/core");
4
+ const base_command_1 = require("../../base-command");
5
+ const live_confirm_1 = require("../../lib/live-confirm");
6
+ const output_1 = require("../../lib/output");
7
+ const themes_1 = require("../../lib/themes");
8
+ class ThemeLink extends base_command_1.BaseCommand {
9
+ async run() {
10
+ const storeRef = this.requireStore();
11
+ const { args } = await this.parse(ThemeLink);
12
+ const id = args.id;
13
+ const url = this.getFlag("url").trim();
14
+ const allowedOrigins = this.getFlag("allowed-origin") ?? [];
15
+ const input = { url, allowedOrigins };
16
+ if (this.isDryRun) {
17
+ this.outputResult((0, output_1.mutationEnvelope)("theme", "link (dry-run)", storeRef, { theme: id, ...(0, themes_1.linkVersionBody)(input) }));
18
+ return;
19
+ }
20
+ const yes = this.getFlag("yes");
21
+ const origins = allowedOrigins.map((o) => ` --allowed-origin "${o}"`).join("");
22
+ const retry = `ecomweb theme link ${id} --url ${url}${origins} --yes`;
23
+ const theme = await (0, themes_1.getThemeForChange)(this.apiClient, id, { yes, retry });
24
+ const before = theme?.current_version?.id !== undefined ? String(theme.current_version.id) : undefined;
25
+ if (theme?.is_published) {
26
+ await (0, live_confirm_1.confirmLiveChange)({
27
+ yes,
28
+ question: `${theme.name} (${id}) is live: shoppers will see ${(0, themes_1.describeVersion)({ kind: "link", label: url, url })}, right away. Check that it opens your shop first. Link it?`,
29
+ required: `${theme.name} (${id}) is live: linking it sends shoppers to ${url} right away. Confirm it with --yes.`,
30
+ retry,
31
+ });
32
+ }
33
+ const added = await (0, themes_1.addLinkVersion)(this.apiClient, id, input);
34
+ const row = (0, themes_1.themeRow)(added.theme);
35
+ this.outputResult((0, output_1.mutationEnvelope)("theme", "link", storeRef, { ...row, version_id: String(added.version.id), url: added.version.link?.url ?? added.version.url ?? url }, {
36
+ next: `ecomweb theme schema push --theme ${id}`,
37
+ ...(before !== undefined && { undo: `ecomweb theme use ${id} ${before}` }),
38
+ ...(!row.live && { publish: `ecomweb theme publish ${id}` }),
39
+ }));
40
+ }
41
+ }
42
+ ThemeLink.description = "Connect a theme to your own site (headless): adds a link version and uses it, so the store's address sends shoppers there. ecomweb keeps managing its settings (push the schema with ecomweb theme schema push). On the live theme it asks first on a terminal; --yes skips that and is required in CI or without a terminal";
43
+ ThemeLink.examples = [
44
+ "ecomweb theme link 12 --url https://shop.example.com",
45
+ 'ecomweb theme link 12 --url https://shop.example.com --allowed-origin "https://shop-*-team.vercel.app"',
46
+ ];
47
+ ThemeLink.args = {
48
+ id: core_1.Args.string({ description: "The theme (see ecomweb theme list)", required: true }),
49
+ };
50
+ ThemeLink.flags = {
51
+ ...base_command_1.BaseCommand.baseFlags,
52
+ url: core_1.Flags.string({ description: "The https address of the site running the theme's code", required: true }),
53
+ "allowed-origin": core_1.Flags.string({
54
+ description: "Another origin the site runs on (e.g. previews: https://shop-*-team.vercel.app). Repeat for several",
55
+ multiple: true,
56
+ }),
57
+ yes: core_1.Flags.boolean({ char: "y", description: "On the live theme: link it without asking", default: false }),
58
+ };
59
+ exports.default = ThemeLink;
60
+ //# sourceMappingURL=link.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"link.js","sourceRoot":"","sources":["../../../src/commands/theme/link.ts"],"names":[],"mappings":";;AAAA,sCAA0C;AAC1C,qDAAiD;AACjD,yDAA2D;AAC3D,6CAAoD;AACpD,6CAAiH;AAEjH,MAAqB,SAAU,SAAQ,0BAAW;IAuBhD,KAAK,CAAC,GAAG;QACP,MAAM,QAAQ,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;QACrC,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QAC7C,MAAM,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC;QACnB,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAS,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC;QAC/C,MAAM,cAAc,GAAG,IAAI,CAAC,OAAO,CAAuB,gBAAgB,CAAC,IAAI,EAAE,CAAC;QAClF,MAAM,KAAK,GAAG,EAAE,GAAG,EAAE,cAAc,EAAE,CAAC;QACtC,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAClB,IAAI,CAAC,YAAY,CAAC,IAAA,yBAAgB,EAAC,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,GAAG,IAAA,wBAAe,EAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;YACnH,OAAO;QACT,CAAC;QAED,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAU,KAAK,CAAC,CAAC;QACzC,MAAM,OAAO,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,sBAAsB,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAC/E,MAAM,KAAK,G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,GAAG,CAAC,MAAM,KAAK,SAAS,IAAI,EAAE,IAAI,EAAE,qBAAqB,EAAE,IAAI,MAAM,EAAE,EAAE,CAAC;YAC1E,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,IAAI,EAAE,OAAO,EAAE,yBAAyB,EAAE,EAAE,EAAE,CAAC;SAC7D,CACF,CACF,CAAC;IACJ,CAAC;;AAhEM,qBAAW,GAChB,8TAA8T,CAAC;AAE1T,kBAAQ,GAAG;IAChB,sDAAsD;IACtD,wGAAwG;CACzG,CAAC;AAEK,cAAI,GAAG;IACZ,EAAE,EAAE,WAAI,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,oCAAoC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;CACvF,CAAC;AAEK,eAAK,GAAG;IACb,GAAG,0BAAW,CAAC,SAAS;IACxB,GAAG,EAAE,YAAK,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,wDAAwD,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC5G,gBAAgB,EAAE,YAAK,CAAC,MAAM,CAAC;QAC7B,WAAW,EAAE,qGAAqG;QAClH,QAAQ,EAAE,IAAI;KACf,CAAC;IACF,GAAG,EAAE,YAAK,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,WAAW,EAAE,2CAA2C,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;CAC5G,CAAC;kBArBiB,SAAS"}
@@ -0,0 +1,18 @@
1
+ import { BaseCommand } from "../../base-command";
2
+ export default class ThemeList extends BaseCommand {
3
+ static description: string;
4
+ static examples: string[];
5
+ static flags: {
6
+ "store-ref": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
7
+ "api-key": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
8
+ "api-url": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
9
+ output: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
10
+ quiet: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
11
+ "dry-run": import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
12
+ profile: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
13
+ full: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
14
+ fields: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
15
+ exclude: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
16
+ };
17
+ run(): Promise<void>;
18
+ }
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const base_command_1 = require("../../base-command");
4
+ const output_1 = require("../../lib/output");
5
+ const themes_1 = require("../../lib/themes");
6
+ class ThemeList extends base_command_1.BaseCommand {
7
+ async run() {
8
+ const storeRef = this.requireStore();
9
+ const rows = (await (0, themes_1.listThemes)(this.apiClient)).map(themes_1.themeRow);
10
+ this.outputResult((0, output_1.listEnvelope)("theme", storeRef, rows, { total: rows.length }, {
11
+ availableActions: ["create", "duplicate", "versions", "use", "link", "update", "publish", "schema push"],
12
+ hints: {
13
+ create: "ecomweb theme create [--from <catalog id>] [--name <name>]",
14
+ duplicate: "ecomweb theme duplicate <id> [--name <name>]",
15
+ versions: "ecomweb theme versions <id>",
16
+ use: "ecomweb theme use <id> <version id>",
17
+ link: "ecomweb theme link <id> --url <https url>",
18
+ update: "ecomweb theme update <id>",
19
+ publish: "ecomweb theme publish <id>",
20
+ schema_push: "ecomweb theme schema push --theme <id>",
21
+ deploy: "ecomweb deploy --theme <id>",
22
+ },
23
+ }));
24
+ }
25
+ }
26
+ ThemeList.description = "List the store's themes: id, name, mode (theme, custom or headless: the kind of the version in use), the version in use, which one is live, and a newer release to update to";
27
+ ThemeList.examples = ["ecomweb theme list", "ecomweb theme list --output table"];
28
+ ThemeList.flags = {
29
+ ...base_command_1.BaseCommand.baseFlags,
30
+ };
31
+ exports.default = ThemeList;
32
+ //# sourceMappingURL=list.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/commands/theme/list.ts"],"names":[],"mappings":";;AAAA,qDAAiD;AACjD,6CAAgD;AAChD,6CAAwD;AAExD,MAAqB,SAAU,SAAQ,0BAAW;IAUhD,KAAK,CAAC,GAAG;QACP,MAAM,QAAQ,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;QACrC,MAAM,IAAI,GAAG,CAAC,MAAM,IAAA,mBAAU,EAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,iBAAQ,CAAC,CAAC;QAC9D,IAAI,CAAC,YAAY,CACf,IAAA,qBAAY,EAAC,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,EAAE;YAC5D,gBAAgB,EAAE,CAAC,QAAQ,EAAE,WAAW,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,aAAa,CAAC;YACxG,KAAK,EAAE;gBACL,MAAM,EAAE,4DAA4D;gBACpE,SAAS,EAAE,8CAA8C;gBACzD,QAAQ,EAAE,6BAA6B;gBACvC,GAAG,EAAE,qCAAqC;gBAC1C,IAAI,EAAE,2CAA2C;gBACjD,MAAM,EAAE,2BAA2B;gBACnC,OAAO,EAAE,4BAA4B;gBACrC,WAAW,EAAE,wCAAwC;gBACrD,MAAM,EAAE,6BAA6B;aACtC;SACF,CAAC,CACH,CAAC;IACJ,CAAC;;AA5BM,qBAAW,GAChB,8KAA8K,CAAC;AAE1K,kBAAQ,GAAG,CAAC,oBAAoB,EAAE,mCAAmC,CAAC,CAAC;AAEvE,eAAK,GAAG;IACb,GAAG,0BAAW,CAAC,SAAS;CACzB,CAAC;kBARiB,SAAS"}
@@ -0,0 +1,22 @@
1
+ import { BaseCommand } from "../../base-command";
2
+ export default class ThemePublish extends BaseCommand {
3
+ static description: string;
4
+ static examples: string[];
5
+ static args: {
6
+ id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
7
+ };
8
+ static flags: {
9
+ yes: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
10
+ "store-ref": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
11
+ "api-key": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
12
+ "api-url": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
13
+ output: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
14
+ quiet: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
15
+ "dry-run": import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
16
+ profile: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
17
+ full: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
18
+ fields: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
19
+ exclude: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
20
+ };
21
+ run(): Promise<void>;
22
+ }
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const prompts_1 = require("@inquirer/prompts");
4
+ const core_1 = require("@oclif/core");
5
+ const base_command_1 = require("../../base-command");
6
+ const errors_1 = require("../../lib/errors");
7
+ const live_confirm_1 = require("../../lib/live-confirm");
8
+ const output_1 = require("../../lib/output");
9
+ const themes_1 = require("../../lib/themes");
10
+ class ThemePublish extends base_command_1.BaseCommand {
11
+ async run() {
12
+ const storeRef = this.requireStore();
13
+ const { args } = await this.parse(ThemePublish);
14
+ const id = args.id;
15
+ if (this.isDryRun) {
16
+ this.outputResult((0, output_1.mutationEnvelope)("theme", "publish (dry-run)", storeRef, { theme: id }));
17
+ return;
18
+ }
19
+ const interactive = (0, live_confirm_1.isInteractive)();
20
+ const yes = this.getFlag("yes");
21
+ if (!interactive && !yes) {
22
+ throw new errors_1.CliError("CONFIRMATION_REQUIRED", `Publishing makes theme ${id} live for shoppers right away: confirm it with --yes.`, errors_1.ExitCode.VALIDATION, { hint: `ecomweb theme publish ${id} --yes` });
23
+ }
24
+ const themes = await (0, themes_1.listThemes)(this.apiClient);
25
+ const target = themes.find((t) => String(t.id) === id);
26
+ if (!target) {
27
+ throw new errors_1.CliError("THEME_NOT_FOUND", `This store has no theme ${id}.`, errors_1.ExitCode.NOT_FOUND, {
28
+ hint: "List the store's themes with: ecomweb theme list",
29
+ });
30
+ }
31
+ const previous = themes.find((t) => t.is_published);
32
+ if (!yes && !target.is_published) {
33
+ const label = target.current_version?.label;
34
+ const shows = label ? `, using ${label}` : "";
35
+ const replaces = previous ? `: it replaces ${previous.name} for shoppers right away` : "";
36
+ let ok = false;
37
+ try {
38
+ ok = await (0, prompts_1.confirm)({ message: `Publish ${target.name} (${id})${shows}${replaces}. Publish it?`, default: false }, { output: process.stderr });
39
+ }
40
+ catch (error) {
41
+ if (!(0, live_confirm_1.promptCancelled)(error))
42
+ throw error;
43
+ }
44
+ if (!ok) {
45
+ throw new errors_1.CliError("CANCELLED", "Not published: the shop is unchanged.", errors_1.ExitCode.ERROR, {
46
+ hint: `ecomweb theme publish ${id} --yes`,
47
+ });
48
+ }
49
+ }
50
+ const row = (0, themes_1.themeRow)(await (0, themes_1.publishTheme)(this.apiClient, id));
51
+ const undo = previous && String(previous.id) !== row.id ? String(previous.id) : undefined;
52
+ this.outputResult((0, output_1.mutationEnvelope)("theme", "publish", storeRef, row, {
53
+ list: "ecomweb theme list",
54
+ ...(undo && { undo: `ecomweb theme publish ${undo}` }),
55
+ }));
56
+ }
57
+ }
58
+ ThemePublish.description = "Make a theme live: shoppers see its version in use (see ecomweb theme versions) right away. Asks first on a terminal; --yes skips that and is required in CI or without a terminal";
59
+ ThemePublish.examples = ["ecomweb theme publish 12", "ecomweb theme publish 12 --yes"];
60
+ ThemePublish.args = {
61
+ id: core_1.Args.string({ description: "The theme to publish (see ecomweb theme list)", required: true }),
62
+ };
63
+ ThemePublish.flags = {
64
+ ...base_command_1.BaseCommand.baseFlags,
65
+ yes: core_1.Flags.boolean({ char: "y", description: "Publish without asking", default: false }),
66
+ };
67
+ exports.default = ThemePublish;
68
+ //# sourceMappingURL=publish.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"publish.js","sourceRoot":"","sources":["../../../src/commands/theme/publish.ts"],"names":[],"mappings":";;AAAA,+CAA4C;AAC5C,sCAA0C;AAC1C,qDAAiD;AACjD,6CAAsD;AACtD,yDAAwE;AACxE,6CAAoD;AACpD,6CAAsE;AAEtE,MAAqB,YAAa,SAAQ,0BAAW;IAenD,KAAK,CAAC,GAAG;QACP,MAAM,QAAQ,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;QACrC,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;QAChD,MAAM,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC;QACnB,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAClB,IAAI,CAAC,YAAY,CAAC,IAAA,yBAAgB,EAAC,OAAO,EAAE,mBAAmB,EAAE,QAAQ,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;YAC3F,OAAO;QACT,CAAC;QAGD,MAAM,WAAW,GAAG,IAAA,4BAAa,GAAE,CAAC;QACpC,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAU,KAAK,CAAC,CAAC;QACzC,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G,CAAC;AAEK,kBAAK,GAAG;IACb,GAAG,0BAAW,CAAC,SAAS;IACxB,GAAG,EAAE,YAAK,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,WAAW,EAAE,wBAAwB,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;CACzF,CAAC;kBAbiB,YAAY"}
@@ -0,0 +1,20 @@
1
+ import { BaseCommand } from "../../../base-command";
2
+ export default class ThemeSchemaPush extends BaseCommand {
3
+ static description: string;
4
+ static examples: string[];
5
+ static flags: {
6
+ theme: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
7
+ dir: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
8
+ "store-ref": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
9
+ "api-key": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
10
+ "api-url": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
11
+ output: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
12
+ quiet: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
13
+ "dry-run": import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
14
+ profile: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
15
+ full: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
16
+ fields: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
17
+ exclude: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
18
+ };
19
+ run(): Promise<void>;
20
+ }
@@ -0,0 +1,61 @@
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
+ const node_path_1 = __importDefault(require("node:path"));
7
+ const core_1 = require("@oclif/core");
8
+ const base_command_1 = require("../../../base-command");
9
+ const custom_data_1 = require("../../../lib/custom-data");
10
+ const errors_1 = require("../../../lib/errors");
11
+ const output_1 = require("../../../lib/output");
12
+ const project_setup_1 = require("../../../lib/project-setup");
13
+ const theme_schema_export_1 = require("../../../lib/theme-schema-export");
14
+ const themes_1 = require("../../../lib/themes");
15
+ class ThemeSchemaPush extends base_command_1.BaseCommand {
16
+ async run() {
17
+ const dir = node_path_1.default.resolve(this.getFlag("dir"));
18
+ const storeRef = this.requireStore(dir);
19
+ const raw = this.getFlag("theme") ?? (0, project_setup_1.projectStoreThemeId)(dir);
20
+ if (!raw) {
21
+ throw new errors_1.CliError("THEME_REQUIRED", "Say which theme to push the schema to.", errors_1.ExitCode.VALIDATION, {
22
+ hint: "Run ecomweb theme schema push --theme <id> (see ecomweb theme list), set ECOMWEB_STORE_THEME_ID, or set storeThemeId in .ecomweb.json.",
23
+ });
24
+ }
25
+ const themeId = (0, custom_data_1.routeIdArg)(raw, "--theme");
26
+ const settingsSchema = await (0, theme_schema_export_1.exportThemeSchema)(dir, undefined, "push again");
27
+ if (settingsSchema === undefined) {
28
+ throw new errors_1.CliError("THEME_EXPORT_MISSING", `${dir} has no theme:export script to read its settings schema from.`, errors_1.ExitCode.VALIDATION, {
29
+ hint: "Add a theme:export script that prints the theme release JSON (the storefront template has one), or run this in your storefront project (--dir).",
30
+ });
31
+ }
32
+ if (this.isDryRun) {
33
+ this.outputResult((0, output_1.mutationEnvelope)("theme", "schema push (dry-run)", storeRef, { theme: themeId, settings_schema: settingsSchema }));
34
+ return;
35
+ }
36
+ const theme = await (0, themes_1.pushThemeSchema)(this.apiClient, themeId, settingsSchema);
37
+ this.outputResult((0, output_1.mutationEnvelope)("theme", "schema push", storeRef, {
38
+ ...(0, themes_1.themeRow)({ ...theme, id: theme?.id ?? themeId }),
39
+ sections: Array.isArray(settingsSchema) ? settingsSchema.length : undefined,
40
+ }));
41
+ }
42
+ }
43
+ ThemeSchemaPush.description = "Push the settings schema of a theme linked to your own site (ecomweb theme link), from the project's pnpm run theme:export, so its settings can be edited in the dashboard. Builds get theirs with each deploy";
44
+ ThemeSchemaPush.examples = [
45
+ "ecomweb theme schema push --theme 9",
46
+ "ECOMWEB_STORE_THEME_ID=9 ecomweb theme schema push",
47
+ "ecomweb theme schema push --dir ./my-storefront",
48
+ ];
49
+ ThemeSchemaPush.flags = {
50
+ ...base_command_1.BaseCommand.baseFlags,
51
+ theme: core_1.Flags.string({
52
+ description: "The theme that uses a link (its id from ecomweb theme list). Also ECOMWEB_STORE_THEME_ID or storeThemeId in .ecomweb.json",
53
+ env: "ECOMWEB_STORE_THEME_ID",
54
+ }),
55
+ dir: core_1.Flags.string({
56
+ description: "The storefront project whose schema to push",
57
+ default: ".",
58
+ }),
59
+ };
60
+ exports.default = ThemeSchemaPush;
61
+ //# sourceMappingURL=push.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"push.js","sourceRoot":"","sources":["../../../../src/commands/theme/schema/push.ts"],"names":[],"mappings":";;;;;AAAA,0DAA6B;AAC7B,sCAAoC;AACpC,wDAAoD;AACpD,0DAAsD;AACtD,gDAAyD;AACzD,gDAAuD;AACvD,8DAAiE;AACjE,0EAAqE;AACrE,gDAAgE;AAEhE,MAAqB,eAAgB,SAAQ,0BAAW;IAsBtD,KAAK,CAAC,GAAG;QACP,MAAM,GAAG,GAAG,mBAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAS,KAAK,CAAC,CAAC,CAAC;QAEtD,MAAM,QAAQ,GAAG,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;QACxC,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAqB,OAAO,CAAC,IAAI,IAAA,mCAAmB,EA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AC;IACJ,CAAC;;AAtDM,2BAAW,GAChB,gNAAgN,CAAC;AAE5M,wBAAQ,GAAG;IAChB,qCAAqC;IACrC,oDAAoD;IACpD,iDAAiD;CAClD,CAAC;AAEK,qBAAK,GAAG;IACb,GAAG,0BAAW,CAAC,SAAS;IACxB,KAAK,EAAE,YAAK,CAAC,MAAM,CAAC;QAClB,WAAW,EAAE,2HAA2H;QACxI,GAAG,EAAE,wBAAwB;KAC9B,CAAC;IACF,GAAG,EAAE,YAAK,CAAC,MAAM,CAAC;QAChB,WAAW,EAAE,6CAA6C;QAC1D,OAAO,EAAE,GAAG;KACb,CAAC;CACH,CAAC;kBApBiB,eAAe"}
@@ -0,0 +1,23 @@
1
+ import { BaseCommand } from "../../base-command";
2
+ export default class ThemeUpdate extends BaseCommand {
3
+ static description: string;
4
+ static examples: string[];
5
+ static args: {
6
+ id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
7
+ };
8
+ static flags: {
9
+ version: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
10
+ yes: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
11
+ "store-ref": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
12
+ "api-key": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
13
+ "api-url": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
14
+ output: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
15
+ quiet: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
16
+ "dry-run": import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
17
+ profile: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
18
+ full: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
19
+ fields: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
20
+ exclude: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
21
+ };
22
+ run(): Promise<void>;
23
+ }
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const core_1 = require("@oclif/core");
4
+ const base_command_1 = require("../../base-command");
5
+ const live_confirm_1 = require("../../lib/live-confirm");
6
+ const output_1 = require("../../lib/output");
7
+ const themes_1 = require("../../lib/themes");
8
+ class ThemeUpdate extends base_command_1.BaseCommand {
9
+ async run() {
10
+ const storeRef = this.requireStore();
11
+ const { args } = await this.parse(ThemeUpdate);
12
+ const id = args.id;
13
+ const version = this.getFlag("version")?.trim() || undefined;
14
+ if (this.isDryRun) {
15
+ this.outputResult((0, output_1.mutationEnvelope)("theme", "update (dry-run)", storeRef, { theme: id, ...(0, themes_1.releaseVersionBody)(version) }));
16
+ return;
17
+ }
18
+ const yes = this.getFlag("yes");
19
+ const retry = `ecomweb theme update ${id}${version ? ` --version ${version}` : ""} --yes`;
20
+ const theme = await (0, themes_1.getThemeForChange)(this.apiClient, id, { yes, retry });
21
+ const current = theme?.current_version;
22
+ const before = current?.id !== undefined ? String(current.id) : undefined;
23
+ const onRelease = current?.kind === "release";
24
+ const unchanged = version ? current?.release_version === version : !(0, themes_1.newerRelease)(theme ?? {});
25
+ if (theme && onRelease && unchanged) {
26
+ this.outputResult((0, output_1.mutationEnvelope)("theme", "update", storeRef, { ...(0, themes_1.themeRow)(theme), unchanged: true }, {
27
+ versions: `ecomweb theme versions ${id}`,
28
+ }));
29
+ return;
30
+ }
31
+ if (theme?.is_published) {
32
+ const target = version ?? theme.latest_release?.version;
33
+ const release = target ? `release ${target}` : "the newest release";
34
+ await (0, live_confirm_1.confirmLiveChange)({
35
+ yes,
36
+ question: `${theme.name} (${id}) is live: shoppers will see ${release} from the theme store, right away. Update it?`,
37
+ required: `${theme.name} (${id}) is live: updating it changes what shoppers see right away. Confirm it with --yes.`,
38
+ retry,
39
+ });
40
+ }
41
+ const added = await (0, themes_1.addReleaseVersion)(this.apiClient, id, version);
42
+ const row = (0, themes_1.themeRow)(added.theme);
43
+ const changed = before !== undefined && before !== String(added.version.id);
44
+ this.outputResult((0, output_1.mutationEnvelope)("theme", "update", storeRef, { ...row, version_id: String(added.version.id) }, {
45
+ versions: `ecomweb theme versions ${id}`,
46
+ ...(changed && { undo: `ecomweb theme use ${id} ${before}` }),
47
+ ...(!row.live && { publish: `ecomweb theme publish ${id}` }),
48
+ }));
49
+ }
50
+ }
51
+ ThemeUpdate.description = "Add a release of the theme's catalog theme (default: the newest) as a version, and use it. Settings stay with the theme. On the live theme it asks first on a terminal; --yes skips that and is required in CI or without a terminal";
52
+ ThemeUpdate.examples = ["ecomweb theme update 12", "ecomweb theme update 12 --version 1.1.0 --yes"];
53
+ ThemeUpdate.args = {
54
+ id: core_1.Args.string({ description: "The theme (see ecomweb theme list)", required: true }),
55
+ };
56
+ ThemeUpdate.flags = {
57
+ ...base_command_1.BaseCommand.baseFlags,
58
+ version: core_1.Flags.string({ description: "The release to add (default: the newest in the theme store)" }),
59
+ yes: core_1.Flags.boolean({ char: "y", description: "On the live theme: update it without asking", default: false }),
60
+ };
61
+ exports.default = ThemeUpdate;
62
+ //# sourceMappingURL=update.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update.js","sourceRoot":"","sources":["../../../src/commands/theme/update.ts"],"names":[],"mappings":";;AAAA,sCAA0C;AAC1C,qDAAiD;AACjD,yDAA2D;AAC3D,6CAAoD;AACpD,6CAAoH;AAEpH,MAAqB,WAAY,SAAQ,0BAAW;IAgBlD,KAAK,CAAC,GAAG;QACP,MAAM,QAAQ,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;QACrC,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CA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,EAAE,IAAI,MAAM,EAAE,EAAE,CAAC;YAC7D,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,IAAI,EAAE,OAAO,EAAE,yBAAyB,EAAE,EAAE,EAAE,CAAC;SAC7D,CAAC,CACH,CAAC;IACJ,CAAC;;AAjEM,uBAAW,GAChB,sOAAsO,CAAC;AAElO,oBAAQ,GAAG,CAAC,yBAAyB,EAAE,+CAA+C,CAAC,CAAC;AAExF,gBAAI,GAAG;IACZ,EAAE,EAAE,WAAI,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,oCAAoC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;CACvF,CAAC;AAEK,iBAAK,GAAG;IACb,GAAG,0BAAW,CAAC,SAAS;IACxB,OAAO,EAAE,YAAK,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,6DAA6D,EAAE,CAAC;IACrG,GAAG,EAAE,YAAK,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,WAAW,EAAE,6CAA6C,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;CAC9G,CAAC;kBAdiB,WAAW"}
@@ -0,0 +1,23 @@
1
+ import { BaseCommand } from "../../base-command";
2
+ export default class ThemeUse extends BaseCommand {
3
+ static description: string;
4
+ static examples: string[];
5
+ static args: {
6
+ id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
7
+ versionId: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
8
+ };
9
+ static flags: {
10
+ yes: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
11
+ "store-ref": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
12
+ "api-key": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
13
+ "api-url": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
14
+ output: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
15
+ quiet: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
16
+ "dry-run": import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
17
+ profile: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
18
+ full: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
19
+ fields: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
20
+ exclude: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
21
+ };
22
+ run(): Promise<void>;
23
+ }