@decocms/blocks-cli 7.11.2 → 7.12.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decocms/blocks-cli",
3
- "version": "7.11.2",
3
+ "version": "7.12.0",
4
4
  "type": "module",
5
5
  "description": "Deco codegen (generate-blocks, generate-schema, generate-invoke) and Fresh-to-TanStack migration tooling",
6
6
  "repository": {
@@ -8,7 +8,7 @@
8
8
  "url": "https://github.com/decocms/blocks.git",
9
9
  "directory": "packages/blocks-cli"
10
10
  },
11
- "main": "./scripts/generate-blocks.ts",
11
+ "main": "./scripts/generate.ts",
12
12
  "bin": {
13
13
  "deco-migrate": "./scripts/migrate.ts",
14
14
  "deco-post-cleanup": "./scripts/migrate-post-cleanup.ts",
@@ -18,16 +18,10 @@
18
18
  "deco-migrate-blocks-to-kv": "./scripts/migrate-blocks-to-kv.ts",
19
19
  "deco-sync-blocks-to-kv": "./scripts/sync-blocks-to-kv.ts"
20
20
  },
21
+ "//exports": "Deliberately narrow. ./generate is the ONE public module entry (unified orchestrator); ./generate-blocks stays only because @decocms/tanstack's vite plugin tsImports it (readBlockDelta + programmatic generateBlocks) — each surviving entry must name its consumer here. The other scripts remain shipped FILES (the orchestrator spawns them; sites' existing `tsx node_modules/@decocms/blocks-cli/scripts/generate-*.ts` invocations keep working) but are internal implementation details of ./generate, not module subpaths. CLIs are exposed via bin, not exports.",
21
22
  "exports": {
22
- "./generate-app-schemas": "./scripts/generate-app-schemas.ts",
23
- "./generate-blocks": "./scripts/generate-blocks.ts",
24
- "./generate-blocks-manifest": "./scripts/generate-blocks-manifest.ts",
25
- "./generate-schema": "./scripts/generate-schema.ts",
26
- "./generate-invoke": "./scripts/generate-invoke.ts",
27
- "./migrate": "./scripts/migrate.ts",
28
- "./migrate-post-cleanup": "./scripts/migrate-post-cleanup.ts",
29
- "./migrate-to-cf-observability": "./scripts/migrate-to-cf-observability.ts",
30
- "./tailwind-lint": "./scripts/tailwind-lint.ts"
23
+ "./generate": "./scripts/generate.ts",
24
+ "./generate-blocks": "./scripts/generate-blocks.ts"
31
25
  },
32
26
  "scripts": {
33
27
  "build": "tsc",
@@ -36,7 +30,7 @@
36
30
  "lint:unused": "knip"
37
31
  },
38
32
  "dependencies": {
39
- "@decocms/blocks": "7.11.2",
33
+ "@decocms/blocks": "7.12.0",
40
34
  "ts-morph": "^27.0.0",
41
35
  "tsx": "^4.22.5"
42
36
  },
@@ -1,4 +1,9 @@
1
1
  #!/usr/bin/env tsx
2
+ /**
3
+ * Internal implementation detail of generate.ts (the unified orchestrator)
4
+ * -- invoke `generate` instead; direct invocation remains possible but
5
+ * undocumented.
6
+ */
2
7
  /**
3
8
  * Reads .deco/blocks/*.json and emits blocksManifest.gen.ts — a module that
4
9
  * STATICALLY imports every block file and re-exports them as one
@@ -1,4 +1,12 @@
1
1
  #!/usr/bin/env tsx
2
+ /**
3
+ * Internal implementation detail of generate.ts (the unified orchestrator)
4
+ * -- invoke `generate` instead; direct invocation remains possible but
5
+ * undocumented. Exception to the exports-map narrowing: this file keeps
6
+ * its `@decocms/blocks-cli/generate-blocks` subpath export because
7
+ * @decocms/tanstack's vite plugin tsImports it (programmatic
8
+ * generateBlocks on bootstrap, readBlockDelta on live edits).
9
+ */
2
10
  /**
3
11
  * Reads .deco/blocks/*.json and emits:
4
12
  * 1. blocks.gen.json — compact JSON data (the source of truth)
@@ -1,4 +1,9 @@
1
1
  #!/usr/bin/env tsx
2
+ /**
3
+ * Internal implementation detail of generate.ts (the unified orchestrator)
4
+ * -- invoke `generate` instead; direct invocation remains possible but
5
+ * undocumented.
6
+ */
2
7
  /**
3
8
  * Scans @decocms/apps-vtex's invoke.ts and generates a site-local invoke file
4
9
  * with top-level createServerFn declarations.
@@ -1,4 +1,9 @@
1
1
  #!/usr/bin/env tsx
2
+ /**
3
+ * Internal implementation detail of generate.ts (the unified orchestrator)
4
+ * -- invoke `generate` instead; direct invocation remains possible but
5
+ * undocumented.
6
+ */
2
7
  /**
3
8
  * Scans site loader and action files and generates a registry map
4
9
  * for COMMERCE_LOADERS pass-through entries.
@@ -1,4 +1,9 @@
1
1
  #!/usr/bin/env tsx
2
+ /**
3
+ * Internal implementation detail of generate.ts (the unified orchestrator)
4
+ * -- invoke `generate` instead; direct invocation remains possible but
5
+ * undocumented.
6
+ */
2
7
  import fs from "node:fs";
3
8
  import path from "node:path";
4
9
  import { fileURLToPath } from "node:url";
@@ -1,4 +1,9 @@
1
1
  #!/usr/bin/env tsx
2
+ /**
3
+ * Internal implementation detail of generate.ts (the unified orchestrator)
4
+ * -- invoke `generate` instead; direct invocation remains possible but
5
+ * undocumented.
6
+ */
2
7
  /**
3
8
  * Scans site section files and extracts convention-based metadata:
4
9
  * - export const eager = true → alwaysEager