@erdoai/cli 0.236.0 → 0.238.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 +40 -6
- 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 ---
|
|
@@ -1846,6 +1847,13 @@ var ErdoClient = class {
|
|
|
1846
1847
|
`/v1/datasets/${encodeURIComponent(datasetSlug)}/leads/${encodeURIComponent(lead)}`
|
|
1847
1848
|
);
|
|
1848
1849
|
}
|
|
1850
|
+
resolveLeadReferences(datasetSlug, leadRefs) {
|
|
1851
|
+
return this.request(
|
|
1852
|
+
"POST",
|
|
1853
|
+
`/v1/datasets/${encodeURIComponent(datasetSlug)}/lead-reference-resolutions`,
|
|
1854
|
+
{ lead_refs: leadRefs }
|
|
1855
|
+
);
|
|
1856
|
+
}
|
|
1849
1857
|
// The captures the platform refused to resolve: two leads sharing a contact
|
|
1850
1858
|
// detail, or a submission whose email and phone point at different leads.
|
|
1851
1859
|
listLeadMergeCandidates(datasetSlug, limit, traffic) {
|
|
@@ -6805,7 +6813,7 @@ pagesCmd.command("deploy").description("Deploy a page (HTML/React); --html/--js/
|
|
|
6805
6813
|
).option(
|
|
6806
6814
|
"--required-modules <csv>",
|
|
6807
6815
|
"runtime modules the page needs (erdoui, landing); a page using the landing components renders blank without landing"
|
|
6808
|
-
).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(
|
|
6816
|
+
).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(
|
|
6809
6817
|
async (opts) => {
|
|
6810
6818
|
try {
|
|
6811
6819
|
const csv = (v) => v ? v.split(",").map((s) => s.trim()) : void 0;
|
|
@@ -6816,6 +6824,9 @@ pagesCmd.command("deploy").description("Deploy a page (HTML/React); --html/--js/
|
|
|
6816
6824
|
css: readMaybeFile(opts.css),
|
|
6817
6825
|
runtime: opts.runtime,
|
|
6818
6826
|
required_modules: grantList(opts.requiredModules),
|
|
6827
|
+
robots_policy: opts.robotsPolicy,
|
|
6828
|
+
indexing_role: opts.indexingRole,
|
|
6829
|
+
structured_data: readMaybeFile(opts.structuredData),
|
|
6819
6830
|
meta_title: opts.metaTitle,
|
|
6820
6831
|
meta_description: opts.metaDescription,
|
|
6821
6832
|
meta_icon_asset_id: opts.metaIconAsset,
|
|
@@ -6853,7 +6864,7 @@ pagesCmd.command("update <id>").description(
|
|
|
6853
6864
|
).option(
|
|
6854
6865
|
"--required-modules <csv>",
|
|
6855
6866
|
'replacement runtime module list (comma-separated; "[]" clears)'
|
|
6856
|
-
).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(
|
|
6867
|
+
).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(
|
|
6857
6868
|
"--request-review",
|
|
6858
6869
|
"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"
|
|
6859
6870
|
).action(
|
|
@@ -6871,6 +6882,9 @@ pagesCmd.command("update <id>").description(
|
|
|
6871
6882
|
build_brief: readMaybeFile(opts.buildBrief),
|
|
6872
6883
|
artifact_kind: opts.kind,
|
|
6873
6884
|
required_modules: grantList(opts.requiredModules),
|
|
6885
|
+
robots_policy: opts.robotsPolicy,
|
|
6886
|
+
indexing_role: opts.indexingRole,
|
|
6887
|
+
structured_data: readMaybeFile(opts.structuredData),
|
|
6874
6888
|
dataset_slugs: grantList(opts.datasets),
|
|
6875
6889
|
writable_dataset_slugs: grantList(opts.writableDatasets),
|
|
6876
6890
|
kv_slugs: grantList(opts.kv),
|
|
@@ -6970,10 +6984,10 @@ pagesCmd.command("monitor-get <id>").description("Read a page's monitoring contr
|
|
|
6970
6984
|
}
|
|
6971
6985
|
});
|
|
6972
6986
|
pagesCmd.command("clone <id>").description(
|
|
6973
|
-
"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"
|
|
6974
|
-
).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) => {
|
|
6987
|
+
"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"
|
|
6988
|
+
).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) => {
|
|
6975
6989
|
try {
|
|
6976
|
-
const res = await new ErdoClient().clonePage(id, { title: opts.title });
|
|
6990
|
+
const res = await new ErdoClient().clonePage(id, { title: opts.title, target_organization: opts.toOrg });
|
|
6977
6991
|
if (opts.json) {
|
|
6978
6992
|
print(res);
|
|
6979
6993
|
return;
|
|
@@ -10042,6 +10056,26 @@ leadsCmd.command("get <dataset> <lead>").description(
|
|
|
10042
10056
|
fail(e);
|
|
10043
10057
|
}
|
|
10044
10058
|
});
|
|
10059
|
+
leadsCmd.command("resolve <dataset> <refs...>").description("Resolve many stored lead references to their surviving leads after merges").option("--json", "print the raw JSON result instead of a table").action(async (dataset, refs, opts) => {
|
|
10060
|
+
try {
|
|
10061
|
+
const res = await new ErdoClient().resolveLeadReferences(dataset, refs);
|
|
10062
|
+
if (opts.json) {
|
|
10063
|
+
print(res);
|
|
10064
|
+
return;
|
|
10065
|
+
}
|
|
10066
|
+
const rows = res.resolved.map((item) => [
|
|
10067
|
+
item.lead_ref,
|
|
10068
|
+
item.survivor_lead_ref,
|
|
10069
|
+
item.survivor_canonical_lead_id,
|
|
10070
|
+
item.merged ? "yes" : "no"
|
|
10071
|
+
]);
|
|
10072
|
+
if (rows.length) printAlignedTable(["input", "survivor", "survivor canonical id", "merged"], rows);
|
|
10073
|
+
if (res.not_found.length) console.log(`Not found: ${res.not_found.join(", ")}`);
|
|
10074
|
+
if (res.invalid.length) console.log(`Invalid: ${res.invalid.join(", ")}`);
|
|
10075
|
+
} catch (e) {
|
|
10076
|
+
fail(e);
|
|
10077
|
+
}
|
|
10078
|
+
});
|
|
10045
10079
|
leadsCmd.command("candidates <dataset>").description(
|
|
10046
10080
|
"List unresolved refused submissions and their candidate leads. Inspect the saved evidence before previewing an apply-to-lead or dismissal decision with leads resolve-capture."
|
|
10047
10081
|
).option("-l, --limit <n>", "maximum captures to return (default 50, maximum 200)", (v) => parseInt(v, 10)).addOption(new Option2("--traffic <kind>", "include real submissions, independently trusted tests, or both").choices(["real", "test", "all"])).option("--json", "print the raw JSON result instead of a table").action(async (dataset, opts) => {
|