@webflow/webflow-cli 2.1.0 → 2.2.0-next.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/CHANGELOG.md +8 -0
- package/README.md +52 -0
- package/dist/cloud-scaffolds/fetcher.ts +5 -1
- package/dist/cloud-scaffolds/registry.ts +10 -0
- package/dist/cloud-scaffolds/types.ts +6 -0
- package/dist/index.js +117 -109
- package/dist/index.js.map +1 -1
- package/dist/templates/astro/v7/astro.config.mjs.template +34 -0
- package/dist/templates/astro/v7/webflow-loader.ts +122 -0
- package/dist/templates/astro/v7/wrangler.json +9 -0
- package/package.json +4 -4
- package/dist/extension-scaffolds/default/.eslintrc +0 -25
- package/dist/extension-scaffolds/react/.eslintrc +0 -25
- package/dist/extension-scaffolds/typescript-alt/.eslintrc +0 -25
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @webflow/webflow-cli
|
|
2
2
|
|
|
3
|
+
## 2.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 15b87be: CLD-1629: send framework + framework_version in CLI deploy payload so Webflow Cloud SLOs and dashboards can split metrics by framework and version. No user-facing behavior change.
|
|
8
|
+
- 8988847: security: bump tar to 7.5.16 to address known vulnerabilities
|
|
9
|
+
- 043e99d: security: pin transitive dependencies axios, fast-uri, and tmp to address known vulnerabilities
|
|
10
|
+
|
|
3
11
|
## 2.1.0
|
|
4
12
|
|
|
5
13
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -18,6 +18,7 @@ npm install -g @webflow/webflow-cli
|
|
|
18
18
|
- [DevLink Import (Code Components)](#devlink-import-code-components)
|
|
19
19
|
- [DevLink Export](#devlink-export)
|
|
20
20
|
- [Designer Extensions](#designer-extensions)
|
|
21
|
+
- [Apps (Webflow Cloud)](#apps-webflow-cloud)
|
|
21
22
|
- [Global Options](#global-options)
|
|
22
23
|
|
|
23
24
|
---
|
|
@@ -234,6 +235,57 @@ webflow extension bundle # Build and package for upload (outputs bundle.z
|
|
|
234
235
|
|
|
235
236
|
---
|
|
236
237
|
|
|
238
|
+
## Apps (Webflow Cloud)
|
|
239
|
+
|
|
240
|
+
Manage Webflow Cloud app environment variables non-interactively. `--app-id` and
|
|
241
|
+
`--environment-id` default from `webflow.json` (`cloud.app_id` / `cloud.environment_id`)
|
|
242
|
+
when omitted.
|
|
243
|
+
|
|
244
|
+
```shell
|
|
245
|
+
webflow apps env-vars list --app-id <appId> --environment-id <envId> # List variables
|
|
246
|
+
webflow apps env-vars set <key> <value> --app-id <appId> --environment-id <envId> # Create or update (plaintext; for secrets use stdin/prompt below)
|
|
247
|
+
webflow apps env-vars set <key> --secret # Prompt (hidden) for a secret value
|
|
248
|
+
printf %s "$VALUE" | webflow apps env-vars set <key> --secret # Read a secret from stdin
|
|
249
|
+
webflow apps env-vars delete <key> --app-id <appId> --environment-id <envId> # Delete a variable
|
|
250
|
+
webflow apps env-vars import .env --app-id <appId> --environment-id <envId> # Bulk import from a .env file
|
|
251
|
+
webflow apps env-vars import .env.secrets --secret # Import every key as a secret
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
Secret values are encrypted server-side and are never displayed: reads return
|
|
255
|
+
them masked, and `set` / `import` never echo values to stdout, logs, or
|
|
256
|
+
telemetry.
|
|
257
|
+
|
|
258
|
+
For `set`, the value is optional: omit it to read from piped **stdin** or to be
|
|
259
|
+
prompted with hidden input. Prefer this for secrets — passing a value as a
|
|
260
|
+
command-line argument leaves it in your shell history and the process list
|
|
261
|
+
(`set` warns when you do so with `--secret`).
|
|
262
|
+
|
|
263
|
+
### `env-vars list` options
|
|
264
|
+
|
|
265
|
+
| Flag | Description |
|
|
266
|
+
| ----------------------- | ------------------------------------------------------------------------------------------------- |
|
|
267
|
+
| `--app-id <id>` | Cloud app ID (default: `cloud.app_id` in `webflow.json`) |
|
|
268
|
+
| `--environment-id <id>` | Environment ID (default: `cloud.environment_id` in `webflow.json`) |
|
|
269
|
+
| `--fields <fields>` | Comma-separated columns (key, isSecret, value, id, environmentId). `value` is excluded by default |
|
|
270
|
+
| `--json` | Output as JSON |
|
|
271
|
+
|
|
272
|
+
### `env-vars set` / `delete` / `import` options
|
|
273
|
+
|
|
274
|
+
| Flag | Description |
|
|
275
|
+
| ----------------------- | ------------------------------------------------------------------ |
|
|
276
|
+
| `--app-id <id>` | Cloud app ID (default: `cloud.app_id` in `webflow.json`) |
|
|
277
|
+
| `--environment-id <id>` | Environment ID (default: `cloud.environment_id` in `webflow.json`) |
|
|
278
|
+
| `--secret` | (`set`, `import`) Mark the variable(s) as an encrypted secret |
|
|
279
|
+
| `--dry-run` | Preview without making any API calls |
|
|
280
|
+
| `--json` | Output as JSON |
|
|
281
|
+
|
|
282
|
+
A plain `set` on an existing secret preserves its secrecy (it never silently
|
|
283
|
+
downgrades a secret to plaintext). `import` reports a per-key
|
|
284
|
+
created/updated/skipped/errors breakdown and exits non-zero if any key fails
|
|
285
|
+
(e.g. a reserved or invalid name). The bulk import is capped at 100 variables.
|
|
286
|
+
|
|
287
|
+
---
|
|
288
|
+
|
|
237
289
|
## Global Options
|
|
238
290
|
|
|
239
291
|
Available on all commands:
|
|
@@ -7,6 +7,7 @@ import { getFrameworkDefinition, toMinimalScaffoldId } from "./registry";
|
|
|
7
7
|
import type { ScaffoldContent } from "./types";
|
|
8
8
|
import { ScaffoldError } from "./types";
|
|
9
9
|
import logger from "../../utils/logger";
|
|
10
|
+
import { isBetaBuild } from "../../utils/release-tag";
|
|
10
11
|
|
|
11
12
|
const GITHUB_TARBALL_BASE = "https://github.com";
|
|
12
13
|
|
|
@@ -87,7 +88,10 @@ async function fetchScaffoldFromGitHub(
|
|
|
87
88
|
);
|
|
88
89
|
}
|
|
89
90
|
|
|
90
|
-
const ref =
|
|
91
|
+
const ref =
|
|
92
|
+
(isBetaBuild() ? def.source.betaRef : undefined) ??
|
|
93
|
+
def.source.ref ??
|
|
94
|
+
"main";
|
|
91
95
|
const tarballUrl = `${GITHUB_TARBALL_BASE}/${def.source.repo}/archive/${ref}.tar.gz`;
|
|
92
96
|
|
|
93
97
|
const extractDir = await fs.promises.mkdtemp(
|
|
@@ -24,6 +24,14 @@ import { ScaffoldError } from "./types";
|
|
|
24
24
|
* ships the breaking change.
|
|
25
25
|
*
|
|
26
26
|
* Old `vN` branches stay frozen — we don't backport fixes.
|
|
27
|
+
*
|
|
28
|
+
* Exception: the `astro-minimal`/`astro` entries additionally set `betaRef`
|
|
29
|
+
* to a framework-version branch name (`astro7`) rather than the next `vN`.
|
|
30
|
+
* `betaRef` is only used on beta (`@next`) builds — see `isBetaBuild()` and
|
|
31
|
+
* `fetcher.ts` — so `cloud init` keeps scaffolding Astro 6 (`ref: "v2"`) on
|
|
32
|
+
* stable until Astro 7 support lands on the cosmic-builder side (CLD-2148)
|
|
33
|
+
* and the CLI's own E2E coverage (CLD-2216) is green, at which point `betaRef`
|
|
34
|
+
* is promoted to `ref`.
|
|
27
35
|
*/
|
|
28
36
|
export const FRAMEWORK_REGISTRY: Record<string, FrameworkDefinition> = {
|
|
29
37
|
"astro-minimal": {
|
|
@@ -33,6 +41,7 @@ export const FRAMEWORK_REGISTRY: Record<string, FrameworkDefinition> = {
|
|
|
33
41
|
type: "github",
|
|
34
42
|
repo: "Webflow-Examples/hello-world-astro",
|
|
35
43
|
ref: "v2",
|
|
44
|
+
betaRef: "astro7",
|
|
36
45
|
},
|
|
37
46
|
},
|
|
38
47
|
"nextjs-minimal": {
|
|
@@ -51,6 +60,7 @@ export const FRAMEWORK_REGISTRY: Record<string, FrameworkDefinition> = {
|
|
|
51
60
|
type: "github",
|
|
52
61
|
repo: "Webflow-Examples/hello-world-astro-devlink",
|
|
53
62
|
ref: "v2",
|
|
63
|
+
betaRef: "astro7",
|
|
54
64
|
},
|
|
55
65
|
},
|
|
56
66
|
nextjs: {
|
|
@@ -8,6 +8,12 @@ export interface GitHubScaffoldSource {
|
|
|
8
8
|
repo: string;
|
|
9
9
|
/** Branch or tag. Default: "main" */
|
|
10
10
|
ref?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Branch or tag used instead of `ref` on beta (`@next`) builds — see
|
|
13
|
+
* `isBetaBuild()`. Lets a scaffold's contract move ahead on the pre-release
|
|
14
|
+
* channel before it's promoted to `ref` for stable.
|
|
15
|
+
*/
|
|
16
|
+
betaRef?: string;
|
|
11
17
|
}
|
|
12
18
|
|
|
13
19
|
/**
|