@ikas/component-cli 1.4.0-beta.23 → 1.4.0-beta.231
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/dist/build-tools.d.ts +37 -0
- package/dist/build-tools.d.ts.map +1 -0
- package/dist/build-tools.js +36 -0
- package/dist/build-tools.js.map +1 -0
- package/dist/commands/add-sections-to-page.d.ts +3 -0
- package/dist/commands/add-sections-to-page.d.ts.map +1 -0
- package/dist/commands/add-sections-to-page.js +39 -0
- package/dist/commands/add-sections-to-page.js.map +1 -0
- package/dist/commands/add-to-page.js +1 -1
- package/dist/commands/add-to-page.js.map +1 -1
- package/dist/commands/add.d.ts.map +1 -1
- package/dist/commands/add.js +11 -2
- package/dist/commands/add.js.map +1 -1
- package/dist/commands/build.d.ts.map +1 -1
- package/dist/commands/build.js +23 -170
- package/dist/commands/build.js.map +1 -1
- package/dist/commands/config-texts.d.ts +39 -0
- package/dist/commands/config-texts.d.ts.map +1 -0
- package/dist/commands/config-texts.js +192 -0
- package/dist/commands/config-texts.js.map +1 -0
- package/dist/commands/config.d.ts +45 -0
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/config.js +1205 -154
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/create-design-tokens.d.ts +24 -0
- package/dist/commands/create-design-tokens.d.ts.map +1 -0
- package/dist/commands/create-design-tokens.js +388 -0
- package/dist/commands/create-design-tokens.js.map +1 -0
- package/dist/commands/create-global-variable.d.ts +3 -0
- package/dist/commands/create-global-variable.d.ts.map +1 -0
- package/dist/commands/create-global-variable.js +73 -0
- package/dist/commands/create-global-variable.js.map +1 -0
- package/dist/commands/create-page.d.ts +3 -0
- package/dist/commands/create-page.d.ts.map +1 -0
- package/dist/commands/create-page.js +31 -0
- package/dist/commands/create-page.js.map +1 -0
- package/dist/commands/delete-page.d.ts +3 -0
- package/dist/commands/delete-page.d.ts.map +1 -0
- package/dist/commands/delete-page.js +28 -0
- package/dist/commands/delete-page.js.map +1 -0
- package/dist/commands/delete-theme-globals.d.ts +4 -0
- package/dist/commands/delete-theme-globals.d.ts.map +1 -0
- package/dist/commands/delete-theme-globals.js +50 -0
- package/dist/commands/delete-theme-globals.js.map +1 -0
- package/dist/commands/dev.d.ts.map +1 -1
- package/dist/commands/dev.js +328 -39
- package/dist/commands/dev.js.map +1 -1
- package/dist/commands/enable-builtin-pages.d.ts +3 -0
- package/dist/commands/enable-builtin-pages.d.ts.map +1 -0
- package/dist/commands/enable-builtin-pages.js +28 -0
- package/dist/commands/enable-builtin-pages.js.map +1 -0
- package/dist/commands/get-component-props.d.ts +3 -0
- package/dist/commands/get-component-props.d.ts.map +1 -0
- package/dist/commands/get-component-props.js +32 -0
- package/dist/commands/get-component-props.js.map +1 -0
- package/dist/commands/get-page-by-type.d.ts +3 -0
- package/dist/commands/get-page-by-type.d.ts.map +1 -0
- package/dist/commands/get-page-by-type.js +25 -0
- package/dist/commands/get-page-by-type.js.map +1 -0
- package/dist/commands/get-section-values.d.ts +3 -0
- package/dist/commands/get-section-values.d.ts.map +1 -0
- package/dist/commands/get-section-values.js +43 -0
- package/dist/commands/get-section-values.js.map +1 -0
- package/dist/commands/import.js +1 -1
- package/dist/commands/import.js.map +1 -1
- package/dist/commands/list-builtin-pages.d.ts +3 -0
- package/dist/commands/list-builtin-pages.d.ts.map +1 -0
- package/dist/commands/list-builtin-pages.js +28 -0
- package/dist/commands/list-builtin-pages.js.map +1 -0
- package/dist/commands/list-entities.d.ts +3 -0
- package/dist/commands/list-entities.d.ts.map +1 -0
- package/dist/commands/list-entities.js +32 -0
- package/dist/commands/list-entities.js.map +1 -0
- package/dist/commands/list-imported.js +1 -1
- package/dist/commands/list-imported.js.map +1 -1
- package/dist/commands/list-page-sections.d.ts +3 -0
- package/dist/commands/list-page-sections.d.ts.map +1 -0
- package/dist/commands/list-page-sections.js +31 -0
- package/dist/commands/list-page-sections.js.map +1 -0
- package/dist/commands/list-pages.js +1 -1
- package/dist/commands/list-pages.js.map +1 -1
- package/dist/commands/list-theme-globals.d.ts +3 -0
- package/dist/commands/list-theme-globals.d.ts.map +1 -0
- package/dist/commands/list-theme-globals.js +22 -0
- package/dist/commands/list-theme-globals.js.map +1 -0
- package/dist/commands/list-translations.d.ts +3 -0
- package/dist/commands/list-translations.d.ts.map +1 -0
- package/dist/commands/list-translations.js +33 -0
- package/dist/commands/list-translations.js.map +1 -0
- package/dist/commands/move-page-section.d.ts +3 -0
- package/dist/commands/move-page-section.d.ts.map +1 -0
- package/dist/commands/move-page-section.js +62 -0
- package/dist/commands/move-page-section.js.map +1 -0
- package/dist/commands/publish-theme.d.ts +3 -0
- package/dist/commands/publish-theme.d.ts.map +1 -0
- package/dist/commands/publish-theme.js +29 -0
- package/dist/commands/publish-theme.js.map +1 -0
- package/dist/commands/publish.d.ts.map +1 -1
- package/dist/commands/publish.js +72 -3
- package/dist/commands/publish.js.map +1 -1
- package/dist/commands/remove-page-section.d.ts +3 -0
- package/dist/commands/remove-page-section.d.ts.map +1 -0
- package/dist/commands/remove-page-section.js +40 -0
- package/dist/commands/remove-page-section.js.map +1 -0
- package/dist/commands/search-products.d.ts +3 -0
- package/dist/commands/search-products.d.ts.map +1 -0
- package/dist/commands/search-products.js +40 -0
- package/dist/commands/search-products.js.map +1 -0
- package/dist/commands/translation-languages.d.ts +3 -0
- package/dist/commands/translation-languages.d.ts.map +1 -0
- package/dist/commands/translation-languages.js +43 -0
- package/dist/commands/translation-languages.js.map +1 -0
- package/dist/commands/update-builtin-page-prop.d.ts +3 -0
- package/dist/commands/update-builtin-page-prop.d.ts.map +1 -0
- package/dist/commands/update-builtin-page-prop.js +49 -0
- package/dist/commands/update-builtin-page-prop.js.map +1 -0
- package/dist/commands/update-global-variable.d.ts +3 -0
- package/dist/commands/update-global-variable.d.ts.map +1 -0
- package/dist/commands/update-global-variable.js +70 -0
- package/dist/commands/update-global-variable.js.map +1 -0
- package/dist/commands/update-page-sections.d.ts +3 -0
- package/dist/commands/update-page-sections.d.ts.map +1 -0
- package/dist/commands/update-page-sections.js +42 -0
- package/dist/commands/update-page-sections.js.map +1 -0
- package/dist/commands/update-section-prop.d.ts +3 -0
- package/dist/commands/update-section-prop.d.ts.map +1 -0
- package/dist/commands/update-section-prop.js +81 -0
- package/dist/commands/update-section-prop.js.map +1 -0
- package/dist/commands/update-translations.d.ts +3 -0
- package/dist/commands/update-translations.d.ts.map +1 -0
- package/dist/commands/update-translations.js +45 -0
- package/dist/commands/update-translations.js.map +1 -0
- package/dist/commands/upload-image.d.ts +3 -0
- package/dist/commands/upload-image.d.ts.map +1 -0
- package/dist/commands/upload-image.js +38 -0
- package/dist/commands/upload-image.js.map +1 -0
- package/dist/commands/upload-images.d.ts +3 -0
- package/dist/commands/upload-images.d.ts.map +1 -0
- package/dist/commands/upload-images.js +48 -0
- package/dist/commands/upload-images.js.map +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +66 -1
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +77 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/archive-project.d.ts +50 -0
- package/dist/utils/archive-project.d.ts.map +1 -0
- package/dist/utils/archive-project.js +178 -0
- package/dist/utils/archive-project.js.map +1 -0
- package/dist/utils/compile.d.ts +17 -2
- package/dist/utils/compile.d.ts.map +1 -1
- package/dist/utils/compile.js +742 -109
- package/dist/utils/compile.js.map +1 -1
- package/dist/utils/component-helpers.d.ts +236 -4
- package/dist/utils/component-helpers.d.ts.map +1 -1
- package/dist/utils/component-helpers.js +656 -37
- package/dist/utils/component-helpers.js.map +1 -1
- package/dist/utils/css-import-resolver.d.ts +4 -1
- package/dist/utils/css-import-resolver.d.ts.map +1 -1
- package/dist/utils/css-import-resolver.js +9 -1
- package/dist/utils/css-import-resolver.js.map +1 -1
- package/dist/utils/dev-server-auth.d.ts +28 -0
- package/dist/utils/dev-server-auth.d.ts.map +1 -0
- package/dist/utils/dev-server-auth.js +79 -0
- package/dist/utils/dev-server-auth.js.map +1 -0
- package/dist/utils/editor-action-client.d.ts +20 -3
- package/dist/utils/editor-action-client.d.ts.map +1 -1
- package/dist/utils/editor-action-client.js +81 -19
- package/dist/utils/editor-action-client.js.map +1 -1
- package/dist/utils/esm-transform.d.ts +30 -0
- package/dist/utils/esm-transform.d.ts.map +1 -1
- package/dist/utils/esm-transform.js +169 -2
- package/dist/utils/esm-transform.js.map +1 -1
- package/dist/utils/find-component-for-file.d.ts +12 -0
- package/dist/utils/find-component-for-file.d.ts.map +1 -0
- package/dist/utils/find-component-for-file.js +24 -0
- package/dist/utils/find-component-for-file.js.map +1 -0
- package/dist/utils/forbid-deep-imports.d.ts +3 -0
- package/dist/utils/forbid-deep-imports.d.ts.map +1 -0
- package/dist/utils/forbid-deep-imports.js +54 -0
- package/dist/utils/forbid-deep-imports.js.map +1 -0
- package/dist/utils/forbid-external-packages.d.ts +26 -0
- package/dist/utils/forbid-external-packages.d.ts.map +1 -0
- package/dist/utils/forbid-external-packages.js +99 -0
- package/dist/utils/forbid-external-packages.js.map +1 -0
- package/dist/utils/i18n.d.ts +98 -0
- package/dist/utils/i18n.d.ts.map +1 -0
- package/dist/utils/i18n.js +408 -0
- package/dist/utils/i18n.js.map +1 -0
- package/dist/utils/load-image.d.ts +16 -0
- package/dist/utils/load-image.d.ts.map +1 -0
- package/dist/utils/load-image.js +50 -0
- package/dist/utils/load-image.js.map +1 -0
- package/dist/utils/storefront-t.d.ts +17 -0
- package/dist/utils/storefront-t.d.ts.map +1 -0
- package/dist/utils/storefront-t.js +187 -0
- package/dist/utils/storefront-t.js.map +1 -0
- package/dist/utils/vendor-storefront.d.ts +13 -0
- package/dist/utils/vendor-storefront.d.ts.map +1 -0
- package/dist/utils/vendor-storefront.js +91 -0
- package/dist/utils/vendor-storefront.js.map +1 -0
- package/dist/utils/websocket-server.d.ts +165 -7
- package/dist/utils/websocket-server.d.ts.map +1 -1
- package/dist/utils/websocket-server.js +326 -45
- package/dist/utils/websocket-server.js.map +1 -1
- package/package.json +19 -2
- package/templates/add/section.css +11 -0
- package/dist/commands/create.d.ts +0 -4
- package/dist/commands/create.d.ts.map +0 -1
- package/dist/commands/create.js +0 -176
- package/dist/commands/create.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-builtin-page-prop.d.ts","sourceRoot":"","sources":["../../src/commands/update-builtin-page-prop.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAwDpC,wBAAgB,kCAAkC,IAAI,OAAO,CAmC5D"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
import { printErrorAndExit, printResultAndExit, runEditorAction, } from "../utils/editor-action-client.js";
|
|
3
|
+
async function runUpdateBuiltinPageProp(options) {
|
|
4
|
+
// Target/prop validation is the editor handler's job — one source of error truth.
|
|
5
|
+
let value;
|
|
6
|
+
if (options.value !== undefined) {
|
|
7
|
+
try {
|
|
8
|
+
value = JSON.parse(options.value);
|
|
9
|
+
}
|
|
10
|
+
catch {
|
|
11
|
+
// A bare string is the common case for TEXT props; keep it verbatim.
|
|
12
|
+
value = options.value;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
const port = options.port ? parseInt(options.port, 10) : undefined;
|
|
16
|
+
try {
|
|
17
|
+
const result = await runEditorAction("update-builtin-page-prop", {
|
|
18
|
+
...(options.pageType ? { pageType: options.pageType } : {}),
|
|
19
|
+
...(options.scopeId ? { scopeId: options.scopeId } : {}),
|
|
20
|
+
...(options.propId ? { propId: options.propId } : {}),
|
|
21
|
+
...(options.propName ? { propName: options.propName } : {}),
|
|
22
|
+
...(value !== undefined ? { value } : {}),
|
|
23
|
+
...(options.bindGlobal ? { bindGlobal: options.bindGlobal } : {}),
|
|
24
|
+
...(options.clear ? { clear: true } : {}),
|
|
25
|
+
...(options.sfRoutingId ? { sfRoutingId: options.sfRoutingId } : {}),
|
|
26
|
+
}, port !== undefined ? { port } : {});
|
|
27
|
+
printResultAndExit(result);
|
|
28
|
+
}
|
|
29
|
+
catch (e) {
|
|
30
|
+
printErrorAndExit(e);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
export function createUpdateBuiltinPagePropCommand() {
|
|
34
|
+
const cmd = new Command("update-builtin-page-prop");
|
|
35
|
+
cmd
|
|
36
|
+
.description('Set, bind, or clear one prop of an ikas-rendered built-in page (--page-type) or of a shared scope (--scope-id). Values are stored RAW — a TEXT prop takes the plain string, a COLOR takes "#rrggbb" or a {"patternValueId"} global-color binding, an IMAGE takes {"id"}. Get the schema and current values from list-builtin-pages.')
|
|
37
|
+
.option("--page-type <type>", "Built-in page type whose own prop to write (e.g. LOGIN)")
|
|
38
|
+
.option("--scope-id <id>", "Shared scope whose prop to write (reaches every page in its group)")
|
|
39
|
+
.option("--prop-id <id>", "Prop id (from list-builtin-pages)")
|
|
40
|
+
.option("--prop-name <name>", "Prop name (alternative to --prop-id)")
|
|
41
|
+
.option("--value <json>", "The raw value as JSON (a bare string is taken verbatim)")
|
|
42
|
+
.option("--bind-global <name>", "Bind the prop to a global variable (Theme Setting) instead of a static value — pass the global's name from list-theme-globals")
|
|
43
|
+
.option("--clear", "Delete the stored value so the prop falls back to the default")
|
|
44
|
+
.option("--sf-routing-id <id>", "Write one storefront routing's override (default: the base value)")
|
|
45
|
+
.option("--port <port>", "Dev server WebSocket port", "5201")
|
|
46
|
+
.action(runUpdateBuiltinPageProp);
|
|
47
|
+
return cmd;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=update-builtin-page-prop.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-builtin-page-prop.js","sourceRoot":"","sources":["../../src/commands/update-builtin-page-prop.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,GAChB,MAAM,kCAAkC,CAAC;AAc1C,KAAK,UAAU,wBAAwB,C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,CAAC,CAAC,EAAE,CAAC;YACjE,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACzC,GAAG,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACrE,EACD,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CACnC,CAAC;QACF,kBAAkB,CAAC,MAAM,CAAC,CAAC;IAC7B,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,iBAAiB,CAAC,CAAC,CAAC,CAAC;IACvB,CAAC;AACH,CAAC;AAED,MAAM,UAAU,kCAAkC;IAChD,MAAM,GAAG,GAAG,IAAI,OAAO,CAAC,0BAA0B,CAAC,CAAC;IACpD,GAAG;SACA,WAAW,CACV,qUAAqU,CACtU;SACA,MAAM,CACL,oBAAoB,EACpB,yDAAyD,CAC1D;SACA,MAAM,CACL,iBAAiB,EACjB,oEAAoE,CACrE;SACA,MAAM,CAAC,gBAAgB,EAAE,mCAAmC,CAAC;SAC7D,MAAM,CAAC,oBAAoB,EAAE,sCAAsC,CAAC;SACpE,MAAM,CACL,gBAAgB,EAChB,yDAAyD,CAC1D;SACA,MAAM,CACL,sBAAsB,EACtB,+HAA+H,CAChI;SACA,MAAM,CACL,SAAS,EACT,+DAA+D,CAChE;SACA,MAAM,CACL,sBAAsB,EACtB,mEAAmE,CACpE;SACA,MAAM,CAAC,eAAe,EAAE,2BAA2B,EAAE,MAAM,CAAC;SAC5D,MAAM,CAAC,wBAAwB,CAAC,CAAC;IACpC,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-global-variable.d.ts","sourceRoot":"","sources":["../../src/commands/update-global-variable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAuFpC,wBAAgB,iCAAiC,IAAI,OAAO,CAwB3D"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
import { printErrorAndExit, printResultAndExit, runEditorAction, } from "../utils/editor-action-client.js";
|
|
3
|
+
const VALID_TYPES = [
|
|
4
|
+
"TEXT",
|
|
5
|
+
"RICH_TEXT",
|
|
6
|
+
"IMAGE",
|
|
7
|
+
"COLOR",
|
|
8
|
+
"NUMBER",
|
|
9
|
+
"BOOLEAN",
|
|
10
|
+
"BORDER",
|
|
11
|
+
"SHADOW",
|
|
12
|
+
"ENUM",
|
|
13
|
+
];
|
|
14
|
+
function parseValue(raw) {
|
|
15
|
+
if (raw == null)
|
|
16
|
+
return undefined;
|
|
17
|
+
try {
|
|
18
|
+
return JSON.parse(raw);
|
|
19
|
+
}
|
|
20
|
+
catch {
|
|
21
|
+
return raw;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
async function runUpdateGlobalVariable(options) {
|
|
25
|
+
if (!options.name) {
|
|
26
|
+
printErrorAndExit(new Error("--name is required (the variable's runtime key, from list-theme-globals)"));
|
|
27
|
+
}
|
|
28
|
+
if (options.type && !VALID_TYPES.includes(options.type)) {
|
|
29
|
+
printErrorAndExit(new Error(`--type must be one of: ${VALID_TYPES.join(", ")}`));
|
|
30
|
+
}
|
|
31
|
+
// `--enum-type-id` alone re-points an existing ENUM global; with a type it must be ENUM.
|
|
32
|
+
if (options.enumTypeId && options.type && options.type !== "ENUM") {
|
|
33
|
+
printErrorAndExit(new Error("--enum-type-id is only valid for ENUM globals (--type ENUM, or omit --type)"));
|
|
34
|
+
}
|
|
35
|
+
const port = options.port ? parseInt(options.port, 10) : undefined;
|
|
36
|
+
try {
|
|
37
|
+
const result = await runEditorAction("update-global-variable", {
|
|
38
|
+
name: options.name,
|
|
39
|
+
...(options.displayName !== undefined
|
|
40
|
+
? { displayName: options.displayName }
|
|
41
|
+
: {}),
|
|
42
|
+
...(options.type !== undefined ? { type: options.type } : {}),
|
|
43
|
+
...(options.value !== undefined
|
|
44
|
+
? { value: parseValue(options.value) }
|
|
45
|
+
: {}),
|
|
46
|
+
...(options.enumTypeId !== undefined
|
|
47
|
+
? { enumTypeId: options.enumTypeId }
|
|
48
|
+
: {}),
|
|
49
|
+
}, port !== undefined ? { port } : {});
|
|
50
|
+
printResultAndExit(result);
|
|
51
|
+
}
|
|
52
|
+
catch (e) {
|
|
53
|
+
printErrorAndExit(e);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
export function createUpdateGlobalVariableCommand() {
|
|
57
|
+
const cmd = new Command("update-global-variable");
|
|
58
|
+
cmd
|
|
59
|
+
.description("Update a global variable's value, display name, type and/or enum in the connected editor. " +
|
|
60
|
+
"Changing the type or enum of a global that props are bound to is rejected — unbind them first.")
|
|
61
|
+
.requiredOption("--name <key>", "The variable's runtime key (from `list-theme-globals`)")
|
|
62
|
+
.option("--display-name <name>", "New human-facing label")
|
|
63
|
+
.option("--type <type>", `New value type: ${VALID_TYPES.join(" | ")}`)
|
|
64
|
+
.option("--value <json>", "New value (JSON for objects/null; plain string also accepted). ENUM: one of the enum's option VALUES, not a label")
|
|
65
|
+
.option("--enum-type-id <id>", "ENUM only: id of the project enum to select from (from `list-theme-globals` → enumTypes[]); may be passed without --type")
|
|
66
|
+
.option("--port <port>", "Dev server WebSocket port", "5201")
|
|
67
|
+
.action(runUpdateGlobalVariable);
|
|
68
|
+
return cmd;
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=update-global-variable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-global-variable.js","sourceRoot":"","sources":["../../src/commands/update-global-variable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,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eAAe,EAAE,2BAA2B,EAAE,MAAM,CAAC;SAC5D,MAAM,CAAC,uBAAuB,CAAC,CAAC;IACnC,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-page-sections.d.ts","sourceRoot":"","sources":["../../src/commands/update-page-sections.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAsDpC,wBAAgB,+BAA+B,IAAI,OAAO,CAmBzD"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
import { localeAction, printErrorAndExit, printResultAndExit, runEditorAction, withoutLocaleSupport, } from "../utils/editor-action-client.js";
|
|
3
|
+
async function runUpdatePageSections(options) {
|
|
4
|
+
if (!options.pageId || typeof options.pageId !== "string") {
|
|
5
|
+
printErrorAndExit(new Error("--page-id is required (use `ikas-component list-pages`)"));
|
|
6
|
+
}
|
|
7
|
+
if (options.sections === undefined) {
|
|
8
|
+
printErrorAndExit(new Error('--sections is required: a JSON array, e.g. \'[{"elementId":"<id>","updates":[{"propName":"heading","value":{"value":"Hi"}}]}]\''));
|
|
9
|
+
}
|
|
10
|
+
let sections;
|
|
11
|
+
try {
|
|
12
|
+
sections = JSON.parse(options.sections);
|
|
13
|
+
}
|
|
14
|
+
catch {
|
|
15
|
+
printErrorAndExit(new Error(`--sections must be valid JSON. Received: ${options.sections}`));
|
|
16
|
+
}
|
|
17
|
+
if (!Array.isArray(sections) || sections.length === 0) {
|
|
18
|
+
printErrorAndExit(new Error('--sections must be a non-empty JSON array of { elementId, updates: [...] } objects.'));
|
|
19
|
+
}
|
|
20
|
+
const port = options.port ? parseInt(options.port, 10) : undefined;
|
|
21
|
+
try {
|
|
22
|
+
const action = localeAction("update-page-sections", options);
|
|
23
|
+
const result = await runEditorAction(action.name, { pageId: options.pageId, sections, ...action.payload }, { ...(port !== undefined ? { port } : {}), timeoutMs: 30_000 });
|
|
24
|
+
printResultAndExit(options.locale || options.routing ? withoutLocaleSupport(result) : result);
|
|
25
|
+
}
|
|
26
|
+
catch (e) {
|
|
27
|
+
printErrorAndExit(e);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
export function createUpdatePageSectionsCommand() {
|
|
31
|
+
const cmd = new Command("update-page-sections");
|
|
32
|
+
cmd
|
|
33
|
+
.description("Fill MANY placed sections of a page in one call. --sections is a JSON array of { elementId, updates: [{ propId|propName, value }] }, each value using the same per-type shape as update-section-prop. All-or-nothing across the whole page: every value is resolved and validated before any is written. A COMMON (global) section among them — the theme's header/footer — is written to its one theme-wide record on the INDEX (Home) page, so it changes on every page (see the result's `common` block); a header/footer that is missing from the INDEX page rejects the whole call. --locale <code> writes the values of ONE language for these placements only, as update-section-prop --locale does (no ref/bindGlobal items then: a binding shows in every language); --routing <path|id> the values of ONE routing (see update-section-prop).")
|
|
34
|
+
.requiredOption("--page-id <id>", "Page id (from `ikas-component list-pages`)")
|
|
35
|
+
.requiredOption("--sections <json>", 'JSON array, e.g. \'[{"elementId":"<id>","updates":[{"propName":"heading","value":{"value":"Hi"}}]}]\'')
|
|
36
|
+
.option("--locale <code>", "A store language (en, de, ...): write that language's values of these placements")
|
|
37
|
+
.option("--routing <path|id>", "One routing of the store (/test2, or its id): as --locale, for that routing alone (a language several routings show)")
|
|
38
|
+
.option("--port <port>", "Dev server WebSocket port", "5201")
|
|
39
|
+
.action(runUpdatePageSections);
|
|
40
|
+
return cmd;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=update-page-sections.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-page-sections.js","sourceRoot":"","sources":["../../src/commands/update-page-sections.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,oBAAoB,GACrB,MAAM,kCAAkC,CA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AAC,CAAC,EAAE,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,CAC/D,CAAC;QACF,kBAAkB,CAAC,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;IAChG,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,iBAAiB,CAAC,CAAC,CAAC,CAAC;IACvB,CAAC;AACH,CAAC;AAED,MAAM,UAAU,+BAA+B;IAC7C,MAAM,GAAG,GAAG,IAAI,OAAO,CAAC,sBAAsB,CAAC,CAAC;IAChD,GAAG;SACA,WAAW,CACV,wzBAAwzB,CACzzB;SACA,cAAc,CAAC,gBAAgB,EAAE,4CAA4C,CAAC;SAC9E,cAAc,CACb,mBAAmB,EACnB,uGAAuG,CACxG;SACA,MAAM,CAAC,iBAAiB,EAAE,kFAAkF,CAAC;SAC7G,MAAM,CACL,qBAAqB,EACrB,sHAAsH,CACvH;SACA,MAAM,CAAC,eAAe,EAAE,2BAA2B,EAAE,MAAM,CAAC;SAC5D,MAAM,CAAC,qBAAqB,CAAC,CAAC;IACjC,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-section-prop.d.ts","sourceRoot":"","sources":["../../src/commands/update-section-prop.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAkFpC,wBAAgB,8BAA8B,IAAI,OAAO,CAiCxD"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
import { localeAction, printErrorAndExit, printResultAndExit, runEditorAction, withoutLocaleSupport, } from "../utils/editor-action-client.js";
|
|
3
|
+
async function runUpdateSectionProp(options) {
|
|
4
|
+
if (!options.pageId || typeof options.pageId !== "string") {
|
|
5
|
+
printErrorAndExit(new Error("--page-id is required (use `ikas-component list-pages` to discover ids)"));
|
|
6
|
+
}
|
|
7
|
+
if (!options.elementId || typeof options.elementId !== "string") {
|
|
8
|
+
printErrorAndExit(new Error("--element-id is required (use `ikas-component list-page-sections` to discover ids)"));
|
|
9
|
+
}
|
|
10
|
+
if (!options.propId && !options.propName) {
|
|
11
|
+
printErrorAndExit(new Error("Provide --prop-id or --prop-name (see `ikas-component list-page-sections`)"));
|
|
12
|
+
}
|
|
13
|
+
if (options.value === undefined && !options.bindGlobal) {
|
|
14
|
+
printErrorAndExit(new Error("Provide --value (JSON, e.g. '{\"value\":\"Hello\"}') or --bind-global <name> to bind a global variable"));
|
|
15
|
+
}
|
|
16
|
+
let value;
|
|
17
|
+
if (options.value !== undefined) {
|
|
18
|
+
try {
|
|
19
|
+
value = JSON.parse(options.value);
|
|
20
|
+
}
|
|
21
|
+
catch {
|
|
22
|
+
printErrorAndExit(new Error(`--value must be valid JSON (e.g. '{"value":"Hello"}'). Received: ${options.value}`));
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
let listPath;
|
|
26
|
+
if (options.listPath !== undefined) {
|
|
27
|
+
try {
|
|
28
|
+
listPath = JSON.parse(options.listPath);
|
|
29
|
+
}
|
|
30
|
+
catch {
|
|
31
|
+
printErrorAndExit(new Error(`--list-path must be valid JSON. Received: ${options.listPath}`));
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
const port = options.port ? parseInt(options.port, 10) : undefined;
|
|
35
|
+
try {
|
|
36
|
+
const result = await runEditorAction(localeAction("update-section-prop", options).name, {
|
|
37
|
+
pageId: options.pageId,
|
|
38
|
+
elementId: options.elementId,
|
|
39
|
+
...(options.propId ? { propId: options.propId } : {}),
|
|
40
|
+
...(options.propName ? { propName: options.propName } : {}),
|
|
41
|
+
...localeAction("update-section-prop", options).payload,
|
|
42
|
+
...(options.bindGlobal
|
|
43
|
+
? { bindGlobal: options.bindGlobal, ...(listPath ? { listPath } : {}) }
|
|
44
|
+
: { value }),
|
|
45
|
+
}, port !== undefined ? { port } : {});
|
|
46
|
+
printResultAndExit(options.locale || options.routing ? withoutLocaleSupport(result) : result);
|
|
47
|
+
}
|
|
48
|
+
catch (e) {
|
|
49
|
+
printErrorAndExit(e);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
export function createUpdateSectionPropCommand() {
|
|
53
|
+
const cmd = new Command("update-section-prop");
|
|
54
|
+
cmd
|
|
55
|
+
.description([
|
|
56
|
+
"Change a single prop value of a section placed on a page. Target the placement by its elementId (from `ikas-component list-page-sections`) and the prop by --prop-id or --prop-name.",
|
|
57
|
+
"--value is the JSON-encoded prop value. Shape depends on the prop type:",
|
|
58
|
+
" Scalars (TEXT/RICH_TEXT/BOOLEAN/NUMBER/COLOR/ENUM/DATE) are { \"value\": <scalar> } — e.g. '{\"value\":\"Hello\"}', '{\"value\":true}', '{\"value\":\"#FF0000\"}'.",
|
|
59
|
+
" Object props are NOT wrapped: IMAGE/VIDEO/SVG = '{\"id\":\"<asset-id>\",\"altText\":\"...\"}' (get id via `ikas-component upload-image`); PRODUCT = '{\"productId\":\"...\"}'.",
|
|
60
|
+
" LINK = a single link object needing id + linkType + label + subLinks: PAGE = '{\"id\":\"<unique>\",\"linkType\":\"PAGE\",\"label\":\"Home\",\"pageId\":\"<id>\",\"pageType\":\"INDEX\",\"subLinks\":[]}'; EXTERNAL = '{\"id\":\"<unique>\",\"linkType\":\"EXTERNAL\",\"label\":\"Docs\",\"externalLink\":\"https://...\",\"subLinks\":[]}'. (pageId/pageType from `list-pages`.) LIST_OF_LINK = '{\"links\":[<link>,...]}'. Optional on any link (sub-links too): \"translations\" = its label on the other routings, each shown as: that routing's own { \"locale\", \"label\", \"sfRoutingId\" }, else its language's { \"locale\", \"label\" }, else \"label\". Do not write them by hand: write the link's new label alone with --locale (every routing of that language) or --routing (one routing), and it becomes that label (no copy of the links); only an edit of more than labels gives the routing its own copy. A link sent without \"translations\" keeps its stored ones (matched by its id), so a link list can be resent with new links but without its labels; \"translations\":null drops them. Hand-written ones are checked: at most one per language and per routing, an sfRoutingId of a routing with a path whose language is the record's (the labels of a routing the store no longer has are dropped, see the result's removedRoutingLabels). On a PRODUCT/CATEGORY/BRAND link with itemId, \"useItemNameTranslations\":true shows that item's own name in each language instead, its translations never showing; the name is fetched when the page renders, not stored (the result's itemNamesNote says so).",
|
|
61
|
+
" COMPONENT_LIST = '{\"components\":[{\"id\":\"<unique>\",\"codeComponentId\":\"<child-id>\",\"propValues\":{\"<childProp>\":<value>}}]}' (single COMPONENT = one such entry). Each entry needs a unique id and codeComponentId (or componentId); child propValues use the same per-type shapes recursively.",
|
|
62
|
+
" The value REPLACES the whole prop — to edit a COMPONENT_LIST, read the current value from `list-page-sections` and resend the entire array. A translatable value may hold \"pinned\":true: the editor's mark that it is this placement's own and stays so when its language's default text changes — send it back as read. Wrong shapes are rejected with an error, not stored silently.",
|
|
63
|
+
"COMMON (global) sections — the theme's header/footer — share ONE set of prop values across every page, stored on the INDEX (Home) page's placement: the write lands there whatever --page-id you pass and changes that section on ALL pages (the result's `common` block says so, and the echoed value is read back from that canonical placement). Read the current values first (`get-section-values`) and change only what you mean to; if the INDEX page has no placement of the section, add it there first — otherwise the write is rejected.",
|
|
64
|
+
"--locale <code> writes the value of ONE language for THIS placement only (as the editor's canvas does with that language's routing selected): e.g. a section titled differently on the home page and the product page in English, or a link's label in one language (a LINK / LIST_OF_LINK, a list entry's too: send the value as `get-section-values --locale` shows it with only labels changed; any other change gives that language its own copy of the links, which stops following the base). Without --locale the base value is written: the base language's, and every language's that has no value of its own (a translatable prop then shows the section's translation in that language first — see update-translations). The base language itself takes no --locale. A prop bound to a global shows the binding in every language, so --locale refuses it. Read the language's current values with `get-section-values --locale`.",
|
|
65
|
+
"--routing <path|id> (e.g. /test2) does the same for ONE routing: a language several routings show (/en, /test2) gives each its own values, link labels included, and --locale writes to all of them. When `get-section-values --locale` answers with several `routings`, read with --routing and write back with the SAME --routing — writing those values with --locale replaces the other routings' own labels.",
|
|
66
|
+
"Instead of --value, use --bind-global <name> to bind the prop to a project GLOBAL variable (Theme Setting) as a live dynamic value — pass the global's `name` (variableName) from `ikas-component list-theme-globals`. Add --list-path to bind a prop of a COMPONENT_LIST child (then --prop-id is the child's prop id).",
|
|
67
|
+
].join("\n"))
|
|
68
|
+
.requiredOption("--page-id <id>", "Page id (from `ikas-component list-pages`)")
|
|
69
|
+
.requiredOption("--element-id <id>", "Placed section elementId (from `ikas-component list-page-sections`)")
|
|
70
|
+
.option("--prop-id <id>", "Blueprint prop id to update")
|
|
71
|
+
.option("--prop-name <name>", "Blueprint prop name to update (alternative to --prop-id)")
|
|
72
|
+
.option("--value <json>", 'JSON-encoded prop value, e.g. \'{"value":"Hello"}\' (omit when using --bind-global)')
|
|
73
|
+
.option("--bind-global <name>", "Bind the prop to a global variable (its name/variableName from list-theme-globals) instead of a static value")
|
|
74
|
+
.option("--list-path <json>", 'JSON [{ "propId", "index" }, ...] targeting a COMPONENT_LIST child when using --bind-global')
|
|
75
|
+
.option("--locale <code>", "A store language (en, de, ...): write that language's value of this placement")
|
|
76
|
+
.option("--routing <path|id>", "One routing of the store (/test2, or its id): as --locale, for that routing alone (a language several routings show)")
|
|
77
|
+
.option("--port <port>", "Dev server WebSocket port", "5201")
|
|
78
|
+
.action(runUpdateSectionProp);
|
|
79
|
+
return cmd;
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=update-section-prop.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-section-prop.js","sourceRoot":"","sources":["../../src/commands/update-section-prop.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,oBAAoB,GACrB,MAAM,kCAAkC,CAAC;AAe1C,KAAK,UAAU,oBAAoB,CAAC,OAAiC;IACnE,IAAI,CAAC,OAAO,CAAC,MAAM,IAAI,OAAO,OAAO,CAAC,MAAM,K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AM,GAAG,GAAG,IAAI,OAAO,CAAC,qBAAqB,CAAC,CAAC;IAC/C,GAAG;SACA,WAAW,CACV;QACE,sLAAsL;QACtL,yEAAyE;QACzE,sKAAsK;QACtK,kLAAkL;QAClL,4iDAA4iD;QAC5iD,8SAA8S;QAC9S,4XAA4X;QAC5X,qhBAAqhB;QACrhB,84BAA84B;QAC94B,mZAAmZ;QACnZ,0TAA0T;KAC3T,CAAC,IAAI,CAAC,IAAI,CAAC,CACb;SACA,cAAc,CAAC,gBAAgB,EAAE,4CAA4C,CAAC;SAC9E,cAAc,CAAC,mBAAmB,EAAE,qEAAqE,CAAC;SAC1G,MAAM,CAAC,gBAAgB,EAAE,6BAA6B,CAAC;SACvD,MAAM,CAAC,oBAAoB,EAAE,0DAA0D,CAAC;SACxF,MAAM,CAAC,gBAAgB,EAAE,qFAAqF,CAAC;SAC/G,MAAM,CAAC,sBAAsB,EAAE,8GAA8G,CAAC;SAC9I,MAAM,CAAC,oBAAoB,EAAE,6FAA6F,CAAC;SAC3H,MAAM,CAAC,iBAAiB,EAAE,+EAA+E,CAAC;SAC1G,MAAM,CACL,qBAAqB,EACrB,sHAAsH,CACvH;SACA,MAAM,CAAC,eAAe,EAAE,2BAA2B,EAAE,MAAM,CAAC;SAC5D,MAAM,CAAC,oBAAoB,CAAC,CAAC;IAChC,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-translations.d.ts","sourceRoot":"","sources":["../../src/commands/update-translations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA0DpC,wBAAgB,+BAA+B,IAAI,OAAO,CAoBzD"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
import * as fs from "fs";
|
|
3
|
+
import { printErrorAndExit, printResultAndExit, runEditorAction, } from "../utils/editor-action-client.js";
|
|
4
|
+
async function runUpdateTranslations(options) {
|
|
5
|
+
if (!options.edits === !options.editsFile) {
|
|
6
|
+
printErrorAndExit(new Error("Pass the edits with --edits <json> or --edits-file <path>, one of them."));
|
|
7
|
+
}
|
|
8
|
+
let edits;
|
|
9
|
+
try {
|
|
10
|
+
edits = JSON.parse(options.edits ?? fs.readFileSync(options.editsFile, "utf8"));
|
|
11
|
+
}
|
|
12
|
+
catch (e) {
|
|
13
|
+
printErrorAndExit(new Error(`The edits are not valid JSON: ${e.message}`));
|
|
14
|
+
}
|
|
15
|
+
const port = options.port ? parseInt(options.port, 10) : undefined;
|
|
16
|
+
try {
|
|
17
|
+
// Every edit is checked by the editor before anything is written.
|
|
18
|
+
const result = await runEditorAction("update-translations",
|
|
19
|
+
// The editor owns the emptying's consent gate (`--yes` is only forwarded)
|
|
20
|
+
{
|
|
21
|
+
mode: options.mode,
|
|
22
|
+
locale: options.locale,
|
|
23
|
+
edits,
|
|
24
|
+
confirmed: !!options.yes,
|
|
25
|
+
}, port !== undefined ? { port } : {});
|
|
26
|
+
printResultAndExit(result);
|
|
27
|
+
}
|
|
28
|
+
catch (e) {
|
|
29
|
+
printErrorAndExit(e);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
export function createUpdateTranslationsCommand() {
|
|
33
|
+
const cmd = new Command("update-translations");
|
|
34
|
+
cmd
|
|
35
|
+
.description('Write a batch of translations in one language through the editor\'s translations page: a JSON array of { "area", "item_id", "key", "value" } (or { ..., "reset": true } to put back a design asset\'s value). Keys and value kinds come from list-translations --item. An image\'s alt text alone in a language: { "altText": "..." } (the image stays the default\'s). Every edit is checked first (language, item, key, value shape, required default names); a batch with an error writes nothing. The batch is one undo step in the editor.')
|
|
36
|
+
.requiredOption("--mode <mode>", "store | editor")
|
|
37
|
+
.requiredOption("--locale <code>", '"default" (the base texts) or a language code')
|
|
38
|
+
.option("--edits <json>", "The edits as a JSON array")
|
|
39
|
+
.option("--edits-file <path>", "A JSON file holding the edits array")
|
|
40
|
+
.option("--yes", "The user agreed to empty fields that hold a value (edits with value null)")
|
|
41
|
+
.option("--port <port>", "Dev server WebSocket port", "5201")
|
|
42
|
+
.action(runUpdateTranslations);
|
|
43
|
+
return cmd;
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=update-translations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-translations.js","sourceRoot":"","sources":["../../src/commands/update-translations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AAEzB,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,GAChB,MAAM,kCAAkC,CAAC;AAW1C,KAAK,UAAU,qBAAqB,CAClC,OAAkC;IAElC,IAAI,CAAC,OAAO,CAAC,KAAK,KAAK,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC;QAC1C,iBAAiB,CACf,IAAI,KAAK,CACP,yEAAyE,CAC1E,CACF,CAAC;IACJ,CAAC;IACD,IAAI,KAAc,CAAC;IACnB,IAAI,CAAC;QACH,KAAK,GAAG,IAAI,CAAC,KAAK,CAChB,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC,YAAY,CAAC,OAAO,CAAC,SAAU,EAAE,MAAM,CAAC,CAC7D,CAAC;IACJ,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,iBAAiB,CACf,IAAI,KAAK,CAAC,iCAAkC,CAAW,CAAC,OAAO,EAAE,CAAC,CACnE,CAAC;IACJ,CAAC;IACD,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACnE,IAAI,CAAC;QACH,kEAAkE;QAClE,MAAM,MAAM,GAAG,MAAM,eAAe,CAClC,qBAAqB;QACrB,0EAA0E;QAC1E;YACE,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,KAAK;YACL,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG;SACzB,EACD,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CACnC,CAAC;QACF,kBAAkB,CAAC,MAAM,CAAC,CAAC;IAC7B,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,iBAAiB,CAAC,CAAC,CAAC,CAAC;IACvB,CAAC;AACH,CAAC;AAED,MAAM,UAAU,+BAA+B;IAC7C,MAAM,GAAG,GAAG,IAAI,OAAO,CAAC,qBAAqB,CAAC,CAAC;IAC/C,GAAG;SACA,WAAW,CACV,ihBAAihB,CAClhB;SACA,cAAc,CAAC,eAAe,EAAE,gBAAgB,CAAC;SACjD,cAAc,CACb,iBAAiB,EACjB,+CAA+C,CAChD;SACA,MAAM,CAAC,gBAAgB,EAAE,2BAA2B,CAAC;SACrD,MAAM,CAAC,qBAAqB,EAAE,qCAAqC,CAAC;SACpE,MAAM,CACL,OAAO,EACP,2EAA2E,CAC5E;SACA,MAAM,CAAC,eAAe,EAAE,2BAA2B,EAAE,MAAM,CAAC;SAC5D,MAAM,CAAC,qBAAqB,CAAC,CAAC;IACjC,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upload-image.d.ts","sourceRoot":"","sources":["../../src/commands/upload-image.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAyCpC,wBAAgB,wBAAwB,IAAI,OAAO,CAYlD"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
import { printErrorAndExit, printResultAndExit, runEditorAction, } from "../utils/editor-action-client.js";
|
|
3
|
+
import { loadImageSource } from "../utils/load-image.js";
|
|
4
|
+
async function runUploadImage(options) {
|
|
5
|
+
const port = options.port ? parseInt(options.port, 10) : undefined;
|
|
6
|
+
if (!options.file && !options.url) {
|
|
7
|
+
printErrorAndExit(new Error("Provide --file <path> or --url <url>"));
|
|
8
|
+
}
|
|
9
|
+
try {
|
|
10
|
+
const { base64, mimeType, fileName } = await loadImageSource({ file: options.file, url: options.url });
|
|
11
|
+
const result = await runEditorAction("upload-image", {
|
|
12
|
+
base64,
|
|
13
|
+
mimeType,
|
|
14
|
+
fileName,
|
|
15
|
+
...(options.alt ? { altText: options.alt } : {}),
|
|
16
|
+
isVideo: false,
|
|
17
|
+
},
|
|
18
|
+
// Uploads carry the full image payload and round-trip to the host, so give
|
|
19
|
+
// them a far more generous timeout than the default 10s.
|
|
20
|
+
{ ...(port !== undefined ? { port } : {}), timeoutMs: 60_000 });
|
|
21
|
+
printResultAndExit(result);
|
|
22
|
+
}
|
|
23
|
+
catch (e) {
|
|
24
|
+
printErrorAndExit(e);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
export function createUploadImageCommand() {
|
|
28
|
+
const cmd = new Command("upload-image");
|
|
29
|
+
cmd
|
|
30
|
+
.description("Upload an image to the connected editor's project and return its image id. Supply the image with --file (local path) or --url. The returned id can be used as the `id` of an IMAGE prop value via `ikas-component update-section-prop`. Requires the editor to be embedded in the ikas admin panel (the host performs the actual upload).")
|
|
31
|
+
.option("--file <path>", "Local image file path (.png, .jpg, .jpeg, .webp, .gif)")
|
|
32
|
+
.option("--url <url>", "Image URL to fetch and upload")
|
|
33
|
+
.option("--alt <text>", "Alt text for the image")
|
|
34
|
+
.option("--port <port>", "Dev server WebSocket port", "5201")
|
|
35
|
+
.action(runUploadImage);
|
|
36
|
+
return cmd;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=upload-image.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upload-image.js","sourceRoot":"","sources":["../../src/commands/upload-image.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CA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wBAAwB;IACtC,MAAM,GAAG,GAAG,IAAI,OAAO,CAAC,cAAc,CAAC,CAAC;IACxC,GAAG;SACA,WAAW,CACV,2UAA2U,CAC5U;SACA,MAAM,CAAC,eAAe,EAAE,wDAAwD,CAAC;SACjF,MAAM,CAAC,aAAa,EAAE,+BAA+B,CAAC;SACtD,MAAM,CAAC,cAAc,EAAE,wBAAwB,CAAC;SAChD,MAAM,CAAC,eAAe,EAAE,2BAA2B,EAAE,MAAM,CAAC;SAC5D,MAAM,CAAC,cAAc,CAAC,CAAC;IAC1B,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upload-images.d.ts","sourceRoot":"","sources":["../../src/commands/upload-images.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA8DpC,wBAAgB,yBAAyB,IAAI,OAAO,CAanD"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
import { printErrorAndExit, printResultAndExit, runEditorAction, } from "../utils/editor-action-client.js";
|
|
3
|
+
import { loadImageSource } from "../utils/load-image.js";
|
|
4
|
+
async function runUploadImages(options) {
|
|
5
|
+
if (options.manifest === undefined) {
|
|
6
|
+
printErrorAndExit(new Error('--manifest is required: a JSON array, e.g. \'[{"file":"/a.png","alt":"A"},{"url":"https://...","alt":"B"}]\''));
|
|
7
|
+
}
|
|
8
|
+
let manifest;
|
|
9
|
+
try {
|
|
10
|
+
manifest = JSON.parse(options.manifest);
|
|
11
|
+
}
|
|
12
|
+
catch {
|
|
13
|
+
printErrorAndExit(new Error(`--manifest must be valid JSON. Received: ${options.manifest}`));
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
if (!Array.isArray(manifest) || manifest.length === 0) {
|
|
17
|
+
printErrorAndExit(new Error("--manifest must be a non-empty JSON array of { file|url, alt? } objects."));
|
|
18
|
+
}
|
|
19
|
+
const port = options.port ? parseInt(options.port, 10) : undefined;
|
|
20
|
+
try {
|
|
21
|
+
// Read/encode all sources in parallel, then send one batch editor-action.
|
|
22
|
+
const images = await Promise.all(manifest.map(async (entry) => {
|
|
23
|
+
const { base64, mimeType, fileName } = await loadImageSource({ file: entry.file, url: entry.url });
|
|
24
|
+
return {
|
|
25
|
+
base64,
|
|
26
|
+
mimeType,
|
|
27
|
+
fileName,
|
|
28
|
+
...(entry.alt ? { altText: entry.alt } : {}),
|
|
29
|
+
isVideo: false,
|
|
30
|
+
};
|
|
31
|
+
}));
|
|
32
|
+
const result = await runEditorAction("upload-images", { images }, { ...(port !== undefined ? { port } : {}), timeoutMs: 60_000 });
|
|
33
|
+
printResultAndExit(result);
|
|
34
|
+
}
|
|
35
|
+
catch (e) {
|
|
36
|
+
printErrorAndExit(e);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
export function createUploadImagesCommand() {
|
|
40
|
+
const cmd = new Command("upload-images");
|
|
41
|
+
cmd
|
|
42
|
+
.description("Upload MANY images in one call (batch upload-image) and return their ids in order. --manifest is a JSON array of { file|url, alt? }. The host uploads them all in a single round-trip. Requires the editor embedded in the ikas admin panel.")
|
|
43
|
+
.requiredOption("--manifest <json>", 'JSON array, e.g. \'[{"file":"/a.png","alt":"A"},{"url":"https://x/b.jpg"}]\'')
|
|
44
|
+
.option("--port <port>", "Dev server WebSocket port", "5201")
|
|
45
|
+
.action(runUploadImages);
|
|
46
|
+
return cmd;
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=upload-images.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upload-images.js","sourceRoot":"","sources":["../../src/commands/upload-images.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,GAChB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,wBAA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,CAAC,EAAE,CAAC;gBAC5C,OAAO,EAAE,KAAK;aACf,CAAC;QACJ,CAAC,CAAC,CACH,CAAC;QACF,MAAM,MAAM,GAAG,MAAM,eAAe,CAClC,eAAe,EACf,EAAE,MAAM,EAAE,EACV,EAAE,GAAG,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,CAC/D,CAAC;QACF,kBAAkB,CAAC,MAAM,CAAC,CAAC;IAC7B,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,iBAAiB,CAAC,CAAC,CAAC,CAAC;IACvB,CAAC;AACH,CAAC;AAED,MAAM,UAAU,yBAAyB;IACvC,MAAM,GAAG,GAAG,IAAI,OAAO,CAAC,eAAe,CAAC,CAAC;IACzC,GAAG;SACA,WAAW,CACV,8OAA8O,CAC/O;SACA,cAAc,CACb,mBAAmB,EACnB,8EAA8E,CAC/E;SACA,MAAM,CAAC,eAAe,EAAE,2BAA2B,EAAE,MAAM,CAAC;SAC5D,MAAM,CAAC,eAAe,CAAC,CAAC;IAC3B,OAAO,GAAG,CAAC;AACb,CAAC"}
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA+
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA+GpC,wBAAgB,GAAG,qBAElB;AAED,cAAc,YAAY,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,14 +1,41 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
|
-
import {
|
|
2
|
+
import { createAddSectionsToPageCommand } from "./commands/add-sections-to-page.js";
|
|
3
3
|
import { createAddToPageCommand } from "./commands/add-to-page.js";
|
|
4
|
+
import { createAddCommand } from "./commands/add.js";
|
|
4
5
|
import { createBuildCommand } from "./commands/build.js";
|
|
5
6
|
import { createCheckCommand } from "./commands/check.js";
|
|
6
7
|
import { createConfigCommand } from "./commands/config.js";
|
|
8
|
+
import { createCreateBreakpointCommand, createCreateColorCommand, createCreateColorSchemeCommand, createCreateKeyframeCommand, createCreateTextStyleCommand, createRenameColorSchemeSlotCommand, createUpdateBreakpointCommand, createUpdateColorCommand, createUpdateColorSchemeCommand, createUpdateKeyframeCommand, createUpdateTextStyleCommand, } from "./commands/create-design-tokens.js";
|
|
9
|
+
import { createCreateGlobalVariableCommand } from "./commands/create-global-variable.js";
|
|
10
|
+
import { createCreatePageCommand } from "./commands/create-page.js";
|
|
11
|
+
import { createDeletePageCommand } from "./commands/delete-page.js";
|
|
12
|
+
import { createDeleteDesignTokenCommand, createDeleteGlobalVariableCommand, } from "./commands/delete-theme-globals.js";
|
|
7
13
|
import { createDevCommand } from "./commands/dev.js";
|
|
14
|
+
import { createGetComponentPropsCommand } from "./commands/get-component-props.js";
|
|
15
|
+
import { createEnableBuiltinPagesCommand } from "./commands/enable-builtin-pages.js";
|
|
16
|
+
import { createGetPageByTypeCommand } from "./commands/get-page-by-type.js";
|
|
17
|
+
import { createListBuiltinPagesCommand } from "./commands/list-builtin-pages.js";
|
|
18
|
+
import { createUpdateBuiltinPagePropCommand } from "./commands/update-builtin-page-prop.js";
|
|
19
|
+
import { createListTranslationsCommand } from "./commands/list-translations.js";
|
|
20
|
+
import { createUpdateTranslationsCommand } from "./commands/update-translations.js";
|
|
21
|
+
import { createTranslationLanguagesCommand } from "./commands/translation-languages.js";
|
|
22
|
+
import { createGetSectionValuesCommand } from "./commands/get-section-values.js";
|
|
8
23
|
import { createImportCommand } from "./commands/import.js";
|
|
24
|
+
import { createListEntitiesCommand } from "./commands/list-entities.js";
|
|
9
25
|
import { createListImportedCommand } from "./commands/list-imported.js";
|
|
26
|
+
import { createListPageSectionsCommand } from "./commands/list-page-sections.js";
|
|
27
|
+
import { createMovePageSectionCommand } from "./commands/move-page-section.js";
|
|
28
|
+
import { createRemovePageSectionCommand } from "./commands/remove-page-section.js";
|
|
10
29
|
import { createListPagesCommand } from "./commands/list-pages.js";
|
|
30
|
+
import { createListThemeGlobalsCommand } from "./commands/list-theme-globals.js";
|
|
31
|
+
import { createPublishThemeCommand } from "./commands/publish-theme.js";
|
|
11
32
|
import { createPublishCommand } from "./commands/publish.js";
|
|
33
|
+
import { createSearchProductsCommand } from "./commands/search-products.js";
|
|
34
|
+
import { createUpdateGlobalVariableCommand } from "./commands/update-global-variable.js";
|
|
35
|
+
import { createUpdatePageSectionsCommand } from "./commands/update-page-sections.js";
|
|
36
|
+
import { createUpdateSectionPropCommand } from "./commands/update-section-prop.js";
|
|
37
|
+
import { createUploadImageCommand } from "./commands/upload-image.js";
|
|
38
|
+
import { createUploadImagesCommand } from "./commands/upload-images.js";
|
|
12
39
|
const program = new Command();
|
|
13
40
|
program
|
|
14
41
|
.name("ikas-component")
|
|
@@ -25,6 +52,44 @@ program.addCommand(createListPagesCommand());
|
|
|
25
52
|
program.addCommand(createListImportedCommand());
|
|
26
53
|
program.addCommand(createImportCommand());
|
|
27
54
|
program.addCommand(createAddToPageCommand());
|
|
55
|
+
program.addCommand(createListThemeGlobalsCommand());
|
|
56
|
+
program.addCommand(createCreateGlobalVariableCommand());
|
|
57
|
+
program.addCommand(createCreateColorCommand());
|
|
58
|
+
program.addCommand(createUpdateColorCommand());
|
|
59
|
+
program.addCommand(createCreateTextStyleCommand());
|
|
60
|
+
program.addCommand(createUpdateTextStyleCommand());
|
|
61
|
+
program.addCommand(createCreateBreakpointCommand());
|
|
62
|
+
program.addCommand(createUpdateBreakpointCommand());
|
|
63
|
+
program.addCommand(createCreateKeyframeCommand());
|
|
64
|
+
program.addCommand(createUpdateKeyframeCommand());
|
|
65
|
+
program.addCommand(createCreateColorSchemeCommand());
|
|
66
|
+
program.addCommand(createUpdateColorSchemeCommand());
|
|
67
|
+
program.addCommand(createRenameColorSchemeSlotCommand());
|
|
68
|
+
program.addCommand(createUpdateGlobalVariableCommand());
|
|
69
|
+
program.addCommand(createDeleteGlobalVariableCommand());
|
|
70
|
+
program.addCommand(createDeleteDesignTokenCommand());
|
|
71
|
+
program.addCommand(createAddSectionsToPageCommand());
|
|
72
|
+
program.addCommand(createListPageSectionsCommand());
|
|
73
|
+
program.addCommand(createMovePageSectionCommand());
|
|
74
|
+
program.addCommand(createRemovePageSectionCommand());
|
|
75
|
+
program.addCommand(createGetSectionValuesCommand());
|
|
76
|
+
program.addCommand(createGetComponentPropsCommand());
|
|
77
|
+
program.addCommand(createGetPageByTypeCommand());
|
|
78
|
+
program.addCommand(createListBuiltinPagesCommand());
|
|
79
|
+
program.addCommand(createUpdateBuiltinPagePropCommand());
|
|
80
|
+
program.addCommand(createEnableBuiltinPagesCommand());
|
|
81
|
+
program.addCommand(createListTranslationsCommand());
|
|
82
|
+
program.addCommand(createUpdateTranslationsCommand());
|
|
83
|
+
program.addCommand(createTranslationLanguagesCommand());
|
|
84
|
+
program.addCommand(createCreatePageCommand());
|
|
85
|
+
program.addCommand(createDeletePageCommand());
|
|
86
|
+
program.addCommand(createPublishThemeCommand());
|
|
87
|
+
program.addCommand(createUpdateSectionPropCommand());
|
|
88
|
+
program.addCommand(createUpdatePageSectionsCommand());
|
|
89
|
+
program.addCommand(createUploadImageCommand());
|
|
90
|
+
program.addCommand(createUploadImagesCommand());
|
|
91
|
+
program.addCommand(createSearchProductsCommand());
|
|
92
|
+
program.addCommand(createListEntitiesCommand());
|
|
28
93
|
export function run() {
|
|
29
94
|
return program.parseAsync(process.argv);
|
|
30
95
|
}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WA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