@primitivedotdev/cli 0.25.0 → 0.25.1

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.
@@ -18,7 +18,18 @@ import { Args, Command, Errors, Flags } from "@oclif/core";
18
18
  // the CLI's own @primitivedotdev/sdk dep range in cli-node/package.json
19
19
  // so scaffolded projects use the same SDK version the CLI was built
20
20
  // and tested against.
21
- const SDK_VERSION_RANGE = "^0.23.0";
21
+ const SDK_VERSION_RANGE = "^0.25.0";
22
+ // The CLI version range that ships in the scaffolded devDependencies.
23
+ // Pinned separately from SDK_VERSION_RANGE because @primitivedotdev/cli
24
+ // and @primitivedotdev/sdk are independent packages on independent
25
+ // release cadences. Coupling them silently breaks `npm install` in
26
+ // every scaffolded project the day we bump one without publishing the
27
+ // other. Must include this CLI's own version: a `primitive
28
+ // functions:init` run from CLI v1.2.3 should scaffold a project that
29
+ // resolves at least v1.2.3, so the user does not silently downgrade
30
+ // the bin under themselves. The lockstep test in functions-init.test.ts
31
+ // enforces that invariant.
32
+ const CLI_VERSION_RANGE = "^0.25.0";
22
33
  // esbuild version range. Pinned to the latest stable major used
23
34
  // elsewhere in the Primitive codebase for bundling Workers-style
24
35
  // handlers. Caret range so patch fixes flow in automatically.
@@ -111,6 +122,15 @@ export function renderPackageJson(name) {
111
122
  "@primitivedotdev/sdk": SDK_VERSION_RANGE,
112
123
  },
113
124
  devDependencies: {
125
+ // @primitivedotdev/cli ships the primitive bin. Including it as
126
+ // a devDep here means `node_modules/.bin/primitive` resolves to
127
+ // the real CLI inside the scaffolded project; otherwise the
128
+ // bin falls through to @primitivedotdev/sdk's deprecated CLI
129
+ // alias and every `npm run deploy` invocation prints the
130
+ // "CLI moved" stderr banner. Pinned via CLI_VERSION_RANGE, a
131
+ // dedicated constant so the version is decoupled from the SDK
132
+ // range and bumps are explicit on both ends.
133
+ "@primitivedotdev/cli": CLI_VERSION_RANGE,
114
134
  esbuild: ESBUILD_VERSION_RANGE,
115
135
  typescript: "^5.7.2",
116
136
  },
@@ -3611,7 +3611,7 @@
3611
3611
  "functions:test-function": {
3612
3612
  "aliases": [],
3613
3613
  "args": {},
3614
- "description": "Sends a real test email from a Primitive-controlled sender to a\nsynthetic local-part on one of the org's verified inbound\ndomains. The function fires through the normal MX delivery\npath, so reply / send-mail calls from inside the handler\nagainst the inbound's `email.id` work the same as in\nproduction. Returns immediately after the send is queued; the\ninvocation appears on the function's invocations list within a\nfew seconds.\n\nRequires that the function is currently `deployed`. Returns 422\nif the function is in `pending` or `failed` state, or if the\norg has no verified inbound domain to receive the test mail.\n",
3614
+ "description": "Sends a real test email from a Primitive-controlled sender to a\nlocal-part on one of the org's verified inbound domains. By\ndefault the recipient is a synthetic\n`__primitive_function_test+<random>@<domain>` address that\nevery handler's catch-all routing receives identically; pass\n`local_part` to override and exercise routing logic that\nbranches on a specific recipient (the common pattern when one\nfunction handles multiple inboxes like `summarize@` and\n`action@`). The function fires through the normal MX delivery\npath, so reply / send-mail calls from inside the handler\nagainst the inbound's `email.id` work the same as in\nproduction. Returns immediately after the send is queued; the\ninvocation appears on the function's invocations list within a\nfew seconds.\n\nRequires that the function is currently `deployed`. Returns 422\nif the function is in `pending` or `failed` state, or if the\norg has no verified inbound domain to receive the test mail.\nReturns 400 if `local_part` is set to a value that does not\nmatch the local-part character set.\n",
3615
3615
  "flags": {
3616
3616
  "api-key": {
3617
3617
  "description": "Primitive API key (defaults to PRIMITIVE_API_KEY or saved `primitive login` credentials)",
@@ -3652,6 +3652,27 @@
3652
3652
  "hasDynamicHelp": false,
3653
3653
  "multiple": false,
3654
3654
  "type": "option"
3655
+ },
3656
+ "raw-body": {
3657
+ "description": "Full request body as raw JSON. Escape hatch for nested or complex fields (e.g. arrays); prefer per-field flags (e.g. --to, --from, --body-text) when available.",
3658
+ "name": "raw-body",
3659
+ "hasDynamicHelp": false,
3660
+ "multiple": false,
3661
+ "type": "option"
3662
+ },
3663
+ "body-file": {
3664
+ "description": "Path to a JSON file used as the request body. Same role as --raw-body for callers passing a saved payload.",
3665
+ "name": "body-file",
3666
+ "hasDynamicHelp": false,
3667
+ "multiple": false,
3668
+ "type": "option"
3669
+ },
3670
+ "local-part": {
3671
+ "description": "Override the synthetic local-part. When set, the test email is sent to `<local_part>@<picked-domain>` instead of the default `__primitive_function_test+<random>@<picked-domain>`. Must start with an alphanumeric and contain only letters, digits, dots, plus signs, hyphens, or underscores; 1-64 characters total.",
3672
+ "name": "local-part",
3673
+ "hasDynamicHelp": false,
3674
+ "multiple": false,
3675
+ "type": "option"
3655
3676
  }
3656
3677
  },
3657
3678
  "hasDynamicHelp": false,
@@ -4329,5 +4350,5 @@
4329
4350
  "enableJsonFlag": false
4330
4351
  }
4331
4352
  },
4332
- "version": "0.25.0"
4353
+ "version": "0.25.1"
4333
4354
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primitivedotdev/cli",
3
- "version": "0.25.0",
3
+ "version": "0.25.1",
4
4
  "description": "Official Primitive CLI: deploy Primitive Functions, send and inspect mail, manage endpoints, all from the terminal. Wraps the @primitivedotdev/sdk runtime client with one-shot commands.",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -92,7 +92,7 @@
92
92
  "@oclif/core": "^4.10.5",
93
93
  "@oclif/plugin-autocomplete": "^3.2.45",
94
94
  "@oclif/plugin-help": "^6.2.44",
95
- "@primitivedotdev/sdk": "^0.23.0"
95
+ "@primitivedotdev/sdk": "^0.25.0"
96
96
  },
97
97
  "devDependencies": {
98
98
  "@biomejs/biome": "^2.4.10",