@erdoai/cli 0.235.0 → 0.237.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +20 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1305,7 +1305,8 @@ var ErdoClient = class {
|
|
|
1305
1305
|
clonePage(id, input) {
|
|
1306
1306
|
return this.request("POST", "/v1/pages", {
|
|
1307
1307
|
clone_from_page_id: id,
|
|
1308
|
-
title: input?.title
|
|
1308
|
+
title: input?.title,
|
|
1309
|
+
target_organization: input?.target_organization
|
|
1309
1310
|
});
|
|
1310
1311
|
}
|
|
1311
1312
|
// --- workstreams ---
|
|
@@ -6802,7 +6803,10 @@ pagesCmd.command("deploy").description("Deploy a page (HTML/React); --html/--js/
|
|
|
6802
6803
|
).option(
|
|
6803
6804
|
"--meta-image-asset <attachmentId>",
|
|
6804
6805
|
"public share image: a Brand Style attachment id (og-image / hero photo) for the link-preview card"
|
|
6805
|
-
).option(
|
|
6806
|
+
).option(
|
|
6807
|
+
"--required-modules <csv>",
|
|
6808
|
+
"runtime modules the page needs (erdoui, landing); a page using the landing components renders blank without landing"
|
|
6809
|
+
).option("--robots-policy <policy>", "index_follow (the primary page of a custom host) or noindex_nofollow (ad variants)").option("--indexing-role <role>", "primary (the page a custom host should index) or variant (an A/B arm or angle sibling)").option("--structured-data <jsonOr@file>", "SEO structured data (schema.org JSON-LD): a JSON object with @type and name, or @path to a file").option("--datasets <csv>", "dataset slugs the page reads").option("--writable-datasets <csv>", "dataset slugs the page may write via erdo.insertRows").option("--kv <csv>", "named KV-store slugs the page reads").option("--writable-kv <csv>", "named KV-store slugs the page may write").option("--public", "make the page publicly viewable").action(
|
|
6806
6810
|
async (opts) => {
|
|
6807
6811
|
try {
|
|
6808
6812
|
const csv = (v) => v ? v.split(",").map((s) => s.trim()) : void 0;
|
|
@@ -6812,6 +6816,10 @@ pagesCmd.command("deploy").description("Deploy a page (HTML/React); --html/--js/
|
|
|
6812
6816
|
js: readMaybeFile(opts.js),
|
|
6813
6817
|
css: readMaybeFile(opts.css),
|
|
6814
6818
|
runtime: opts.runtime,
|
|
6819
|
+
required_modules: grantList(opts.requiredModules),
|
|
6820
|
+
robots_policy: opts.robotsPolicy,
|
|
6821
|
+
indexing_role: opts.indexingRole,
|
|
6822
|
+
structured_data: readMaybeFile(opts.structuredData),
|
|
6815
6823
|
meta_title: opts.metaTitle,
|
|
6816
6824
|
meta_description: opts.metaDescription,
|
|
6817
6825
|
meta_icon_asset_id: opts.metaIconAsset,
|
|
@@ -6849,7 +6857,7 @@ pagesCmd.command("update <id>").description(
|
|
|
6849
6857
|
).option(
|
|
6850
6858
|
"--required-modules <csv>",
|
|
6851
6859
|
'replacement runtime module list (comma-separated; "[]" clears)'
|
|
6852
|
-
).option("--datasets <csv>", 'replacement read-dataset slugs ("[]" clears)').option("--writable-datasets <csv>", 'replacement writable-dataset slugs ("[]" clears)').option("--kv <csv>", 'replacement read KV-store slugs ("[]" clears)').option("--writable-kv <csv>", 'replacement writable KV-store slugs ("[]" clears)').option("--public", "make the page publicly viewable").option("--private", "make the page private").option(
|
|
6860
|
+
).option("--robots-policy <policy>", "new robots policy: index_follow (the primary page of a custom host) or noindex_nofollow (ad variants)").option("--indexing-role <role>", "primary (the page a custom host should index) or variant (an A/B arm or angle sibling)").option("--structured-data <jsonOr@file>", "SEO structured data (schema.org JSON-LD): a JSON object with @type and name, or @path to a file").option("--datasets <csv>", 'replacement read-dataset slugs ("[]" clears)').option("--writable-datasets <csv>", 'replacement writable-dataset slugs ("[]" clears)').option("--kv <csv>", 'replacement read KV-store slugs ("[]" clears)').option("--writable-kv <csv>", 'replacement writable KV-store slugs ("[]" clears)').option("--public", "make the page publicly viewable").option("--private", "make the page private").option(
|
|
6853
6861
|
"--request-review",
|
|
6854
6862
|
"ask the judge lenses to review the page after this update and report findings -- for material edits to a LIVE page (layout, forms/CTA, legal/compliance copy, restructured sections), not cosmetic tweaks. First builds and full rewrites are already reviewed automatically"
|
|
6855
6863
|
).action(
|
|
@@ -6867,6 +6875,9 @@ pagesCmd.command("update <id>").description(
|
|
|
6867
6875
|
build_brief: readMaybeFile(opts.buildBrief),
|
|
6868
6876
|
artifact_kind: opts.kind,
|
|
6869
6877
|
required_modules: grantList(opts.requiredModules),
|
|
6878
|
+
robots_policy: opts.robotsPolicy,
|
|
6879
|
+
indexing_role: opts.indexingRole,
|
|
6880
|
+
structured_data: readMaybeFile(opts.structuredData),
|
|
6870
6881
|
dataset_slugs: grantList(opts.datasets),
|
|
6871
6882
|
writable_dataset_slugs: grantList(opts.writableDatasets),
|
|
6872
6883
|
kv_slugs: grantList(opts.kv),
|
|
@@ -6884,7 +6895,7 @@ pagesCmd.command("update <id>").description(
|
|
|
6884
6895
|
}
|
|
6885
6896
|
}
|
|
6886
6897
|
);
|
|
6887
|
-
pagesCmd.command("validate").description("Validate page content without deploying").requiredOption("--html <htmlOr@file>", "HTML (or @path)").option("--js <jsOr@file>", "JS/JSX (or @path)").option("--css <cssOr@file>", "CSS (or @path)").option("--runtime <runtime>", "react-tailwind (default) or none").option("--datasets <csv>", "read-dataset slugs referenced by this page (comma-separated)").action(async (opts) => {
|
|
6898
|
+
pagesCmd.command("validate").description("Validate page content without deploying").requiredOption("--html <htmlOr@file>", "HTML (or @path)").option("--js <jsOr@file>", "JS/JSX (or @path)").option("--css <cssOr@file>", "CSS (or @path)").option("--runtime <runtime>", "react-tailwind (default) or none").option("--datasets <csv>", "read-dataset slugs referenced by this page (comma-separated)").option("--required-modules <csv>", 'runtime modules the page will declare (erdoui, landing; "[]" for none)').action(async (opts) => {
|
|
6888
6899
|
try {
|
|
6889
6900
|
print(
|
|
6890
6901
|
await new ErdoClient().validatePage({
|
|
@@ -6892,7 +6903,8 @@ pagesCmd.command("validate").description("Validate page content without deployin
|
|
|
6892
6903
|
js: readMaybeFile(opts.js),
|
|
6893
6904
|
css: readMaybeFile(opts.css),
|
|
6894
6905
|
runtime: opts.runtime,
|
|
6895
|
-
dataset_slugs: grantList(opts.datasets)
|
|
6906
|
+
dataset_slugs: grantList(opts.datasets),
|
|
6907
|
+
required_modules: grantList(opts.requiredModules)
|
|
6896
6908
|
})
|
|
6897
6909
|
);
|
|
6898
6910
|
} catch (e) {
|
|
@@ -6965,10 +6977,10 @@ pagesCmd.command("monitor-get <id>").description("Read a page's monitoring contr
|
|
|
6965
6977
|
}
|
|
6966
6978
|
});
|
|
6967
6979
|
pagesCmd.command("clone <id>").description(
|
|
6968
|
-
"Copy a page. The copy is byte-identical and starts private (publish state is never inherited); the source's lead-form pipelines are duplicated onto it and the ids in its content rewritten, so it captures its own leads"
|
|
6969
|
-
).option("--title <title>", 'title for the copy (default: "Copy of <source title>")').option("--json", "print the full JSON, including the cloned pipelines and id rewrites").action(async (id, opts) => {
|
|
6980
|
+
"Copy a page. The copy is byte-identical (SEO structured data, indexing role and robots policy included) and starts private (publish state is never inherited); the source's lead-form pipelines are duplicated onto it and the ids in its content rewritten, so it captures its own leads. With --to-org the copy lands in another organization you belong to; pipelines, dataset grants and knowledge assets stay behind and are listed as notes"
|
|
6981
|
+
).option("--title <title>", 'title for the copy (default: "Copy of <source title>")').option("--to-org <slugOrId>", "copy into this other organization (you must be a member of it)").option("--json", "print the full JSON, including the cloned pipelines and id rewrites").action(async (id, opts) => {
|
|
6970
6982
|
try {
|
|
6971
|
-
const res = await new ErdoClient().clonePage(id, { title: opts.title });
|
|
6983
|
+
const res = await new ErdoClient().clonePage(id, { title: opts.title, target_organization: opts.toOrg });
|
|
6972
6984
|
if (opts.json) {
|
|
6973
6985
|
print(res);
|
|
6974
6986
|
return;
|