@erdoai/cli 0.264.0 → 0.272.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 (2) hide show
  1. package/dist/index.js +8 -8
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -4055,11 +4055,11 @@ id: ${o.id}`);
4055
4055
  }
4056
4056
  });
4057
4057
  managed.command("adopt [token]").description(
4058
- "Take over an existing org: redeem a one-time consent token, or --from-org <slug> for an org you own yourself (no token needed)"
4059
- ).option("--from-org <slug>", "slug of an org you are an owner of, adopted directly").action(async (token, opts) => {
4058
+ "Take over an existing org: redeem a one-time consent token, or --from-org <slug> for an org you administer yourself (no token needed)"
4059
+ ).option("--from-org <slug>", "slug of an org you are an owner or admin of, adopted directly").action(async (token, opts) => {
4060
4060
  try {
4061
4061
  if (!token && !opts.fromOrg) {
4062
- fail(new Error("provide a consent token, or --from-org <slug> for an org you own"));
4062
+ fail(new Error("provide a consent token, or --from-org <slug> for an org you administer"));
4063
4063
  }
4064
4064
  if (token && opts.fromOrg) {
4065
4065
  fail(new Error("provide a token or --from-org, not both"));
@@ -9259,8 +9259,8 @@ function readSchemaFile(path) {
9259
9259
  return schema;
9260
9260
  }
9261
9261
  datasetsCmd.command("create <name>").description(
9262
- "Create an empty dataset with its columns declared up front. Every write is checked against the schema, which is set now rather than taken from the first rows. --schema is required unless the purpose is one whose columns Erdo defines (page events, widget events, widget leads)."
9263
- ).option("--schema <file>", "JSON file containing { columns: [...] } or a columns array").option("--purpose <purpose>", "the dataset's role in the org vocabulary, e.g. leads (see `erdo datasets purposes`)").option("--purpose-description <text>", "what writes and reads this purpose").option("--description <text>", "what the dataset holds").option("--separate", "deliberately create a second dataset for a purpose the org already has").action(async (name, opts) => {
9262
+ "Create an empty dataset with its columns declared up front. Every write is checked against the schema, which is set now rather than taken from the first rows. Schema columns support allowed_values, integer, and minimum; constraints support immutable_groups, required_together, server stamps, and less_or_equal numeric pairs. --schema is required unless the purpose is one whose columns Erdo defines (page events, widget events, widget leads)."
9263
+ ).option("--schema <file>", "JSON columns array or { columns, constraints } schema object").option("--purpose <purpose>", "the dataset's role in the org vocabulary, e.g. leads (see `erdo datasets purposes`)").option("--purpose-description <text>", "what writes and reads this purpose").option("--description <text>", "what the dataset holds").option("--separate", "deliberately create a second dataset for a purpose the org already has").action(async (name, opts) => {
9264
9264
  try {
9265
9265
  const result = await new ErdoClient().createDataset({
9266
9266
  name,
@@ -9293,8 +9293,8 @@ datasetViewCmd.command("create <source>").description(
9293
9293
  }
9294
9294
  });
9295
9295
  datasetsCmd.command("ensure <purpose>").description(
9296
- "Create or reuse the one dataset for a purpose and verify its declared producer contract. Refuses legacy splits and incompatible populated datasets instead of choosing silently."
9297
- ).requiredOption("--schema <file>", "JSON file containing { columns: [...] } or a columns array").option("--name <name>", "dataset name when creation is required").option("--description <text>", "dataset description when creation is required").option("--purpose-description <text>", "what writes and reads this purpose").option("--preferred-dataset <slug>", "existing bound dataset slug or id to adopt").option("--reviewed-optional-addition <name>", "producer-reviewed optional column to add atomically; repeat for multiple columns", (value, previous = []) => [...previous, value], []).option("--email-column <name>", "for a leads purpose: which declared column holds the email (default email)").option("--phone-column <name>", "for a leads purpose: which declared column holds the phone (default phone)").action(async (purpose, opts) => {
9296
+ "Create or reuse the one dataset for a purpose and verify its declared producer contract. Schema columns support allowed_values, integer, and minimum; constraints support immutable_groups, required_together, server stamps, and less_or_equal numeric pairs. Refuses legacy splits and incompatible populated datasets instead of choosing silently."
9297
+ ).requiredOption("--schema <file>", "JSON columns array or { columns, constraints } schema object").option("--name <name>", "dataset name when creation is required").option("--description <text>", "dataset description when creation is required").option("--purpose-description <text>", "what writes and reads this purpose").option("--preferred-dataset <slug>", "existing bound dataset slug or id to adopt").option("--reviewed-optional-addition <name>", "producer-reviewed optional column to add atomically; repeat for multiple columns", (value, previous = []) => [...previous, value], []).option("--email-column <name>", "for a leads purpose: which declared column holds the email (default email)").option("--phone-column <name>", "for a leads purpose: which declared column holds the phone (default phone)").action(async (purpose, opts) => {
9298
9298
  try {
9299
9299
  const declaredSchema = readSchemaFile(opts.schema);
9300
9300
  const result = await new ErdoClient().ensureDataset({
@@ -9313,7 +9313,7 @@ datasetsCmd.command("ensure <purpose>").description(
9313
9313
  fail(e);
9314
9314
  }
9315
9315
  });
9316
- datasetsCmd.command("update-schema <slug>").description("Evolve an existing dataset's column contract. For populated lead-identity datasets, use add_column operations only; existing rows and lead ids are preserved.").requiredOption("--input <file>", "JSON request containing operations and optional class/purpose/owner/record/provenance changes").action(async (slug, opts) => {
9316
+ datasetsCmd.command("update-schema <slug>").description("Evolve an existing dataset's column contract. declare_schema columns support allowed_values, integer, and minimum; constraints support immutable_groups, required_together, server stamps, and less_or_equal numeric pairs. For populated lead-identity datasets, use add_column operations only; existing rows and lead ids are preserved.").requiredOption("--input <file>", "JSON request containing operations and optional class/purpose/owner/record/provenance changes").action(async (slug, opts) => {
9317
9317
  try {
9318
9318
  const input = JSON.parse(readFileSync5(opts.input, "utf8"));
9319
9319
  if (!input || typeof input !== "object" || Array.isArray(input)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@erdoai/cli",
3
- "version": "0.264.0",
3
+ "version": "0.272.0",
4
4
  "description": "Erdo CLI \u2014 drive datasets, pages, and evals from the terminal or CI",
5
5
  "type": "module",
6
6
  "bin": {