@decocms/blocks-cli 7.72.0 → 7.72.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decocms/blocks-cli",
3
- "version": "7.72.0",
3
+ "version": "7.72.1",
4
4
  "type": "module",
5
5
  "description": "Deco codegen (generate-blocks, generate-schema, generate-invoke) and Fresh-to-TanStack migration tooling",
6
6
  "repository": {
@@ -33,7 +33,7 @@
33
33
  "lint:unused": "knip"
34
34
  },
35
35
  "dependencies": {
36
- "@decocms/blocks": "7.72.0",
36
+ "@decocms/blocks": "7.72.1",
37
37
  "ts-morph": "^27.0.0",
38
38
  "tsx": "^4.22.5"
39
39
  },
@@ -82,7 +82,7 @@ Options:
82
82
  --help, -h Show this help
83
83
 
84
84
  The output is read-only. Codemods that rewrite htmx to React are a
85
- planned follow-up — see the deco-to-tanstack-migration skill for the
85
+ planned follow-up — see the source-deco-fresh skill (decocms/migrations) for the
86
86
  per-pattern rewrite recipes.
87
87
  `);
88
88
  }
@@ -732,7 +732,7 @@ export function analyze(ctx: MigrationContext): void {
732
732
  }
733
733
  }
734
734
  console.log(
735
- " See: deco-to-tanstack-migration skill, 'useComponent / partial sections' section",
735
+ " See: source-deco-fresh skill (decocms/migrations), 'useComponent / partial sections' section",
736
736
  );
737
737
  }
738
738
 
@@ -12,7 +12,7 @@ const CSS_REVIEW_KEYWORDS = [
12
12
  "tailwind.config.ts",
13
13
  "safelist",
14
14
  "oklch",
15
- "css-styling.md",
15
+ "styling.md",
16
16
  "@theme",
17
17
  "@apply",
18
18
  "@utility",
@@ -178,7 +178,7 @@ export function transform(ctx: MigrationContext): void {
178
178
  " </button>\n" +
179
179
  " )}\n\n" +
180
180
  "Add \"use client\" to the top of the file. " +
181
- "See deco-to-tanstack-migration skill, 'Ver mais / Load More' section.",
181
+ "See source-deco-fresh skill (decocms/migrations), 'Ver mais / Load More' section.",
182
182
  severity: "warning",
183
183
  });
184
184
  }
@@ -209,7 +209,7 @@ export function transform(ctx: MigrationContext): void {
209
209
  "(a) local React state for client-side toggles, " +
210
210
  "(b) `createServerFn` + `useMutation` for server actions, or " +
211
211
  "(c) a direct `invoke` call (`~/server/invoke`) for ad-hoc loaders. " +
212
- "See: deco-to-tanstack-migration skill, 'useComponent / partial sections' section.",
212
+ "See: source-deco-fresh skill (decocms/migrations), 'useComponent / partial sections' section.",
213
213
  severity: "error",
214
214
  });
215
215
  }
@@ -2,7 +2,8 @@
2
2
  * Post-migration cleanup audit — rule implementations.
3
3
  *
4
4
  * Each rule mirrors a section in
5
- * `.agents/skills/deco-to-tanstack-migration/references/post-migration-cleanup.md`.
5
+ * the `target-tanstack-deco` skill in decocms/migrations
6
+ * (`references/post-migration-cleanup.md`).
6
7
  * The intent is to take the human checklist and make it programmatically
7
8
  * detectable so future migrations get the same scrubbing automatically.
8
9
  *
@@ -1234,7 +1235,7 @@ const ruleHtmxResidue: Rule = {
1234
1235
  severity: "warning",
1235
1236
  file: `${rel}:${firstLine}`,
1236
1237
  message: `${occurrences.length} hx-* element(s) — ${catSummary}`,
1237
- fix: `Rewrite per .agents/skills/deco-to-tanstack-migration/references/htmx-rewrite.md (run \`deco-htmx-analyze\` for the per-category breakdown)`,
1238
+ fix: `Rewrite per the source-deco-fresh skill (decocms/migrations), references/htmx-rewrite.md (run \`deco-htmx-analyze\` for the per-category breakdown)`,
1238
1239
  meta: {
1239
1240
  total: occurrences.length,
1240
1241
  byCategory: Object.fromEntries(byCat),
@@ -38,8 +38,8 @@ alwaysApply: true
38
38
  https://github.com/decocms/blocks/blob/main/.cursor/rules/migration-tooling-policy.mdc
39
39
  - **Plan (living tracker, decisions + waves):**
40
40
  https://github.com/decocms/blocks/blob/main/MIGRATION_TOOLING_PLAN.md
41
- - **Migration skill (phase playbook):**
42
- https://github.com/decocms/blocks/blob/main/.agents/skills/deco-to-tanstack-migration/SKILL.md
41
+ - **Migration skills (phase playbook):** \`source-deco-fresh\` and
42
+ \`target-tanstack-deco\` in \`decocms/migrations\` (internal; referred to by name)
43
43
 
44
44
  ## What you need to know in this site
45
45
 
@@ -52,7 +52,7 @@ const STUB =
52
52
  "[deco-migrate] \`~/lib/vtex-transform.toProduct\` is a generated stub. " +
53
53
  "Replace with: import { toProduct } from '@decocms/apps-vtex/utils/transform' " +
54
54
  "(canonical signature: \`toProduct(product, sku, level, options)\`). " +
55
- "Run \`deco-post-cleanup --fix\` or see the deco-to-tanstack-migration skill " +
55
+ "Run \`deco-post-cleanup --fix\` or see the target-tanstack-deco skill " +
56
56
  "(post-migration-cleanup § 5).";
57
57
 
58
58
  export function toProduct(_vtexProduct: any, ..._rest: any[]): Product {
@@ -68,7 +68,7 @@ const STUB_GET_IS_COOKIES =
68
68
  "[deco-migrate] \`~/lib/vtex-intelligent-search.getISCookiesFromBag\` is a " +
69
69
  "generated stub. Refactor: extract IS cookies from " +
70
70
  "\`request.headers.get('cookie')\` directly. The bag-based lookup mechanism " +
71
- "does not exist on TanStack Start. See the deco-to-tanstack-migration " +
71
+ "does not exist on TanStack Start. See the target-tanstack-deco " +
72
72
  "skill (post-migration-cleanup § 5).";
73
73
 
74
74
  export function getISCookiesFromBag(_req?: any): Record<string, string> {
@@ -127,7 +127,7 @@ const STUB_WITH_SEGMENT_COOKIE =
127
127
  "stub. Replace with: import { withSegmentCookie } from " +
128
128
  "'@decocms/apps-vtex/utils/segment' (canonical signature: " +
129
129
  "\`withSegmentCookie(segment, headers?)\`). Run \`deco-post-cleanup --fix\` " +
130
- "or see the deco-to-tanstack-migration skill.";
130
+ "or see the target-tanstack-deco skill.";
131
131
 
132
132
  export function getSegmentFromBag(_req?: any): Record<string, unknown> | null {
133
133
  throw new Error(STUB_GET_SEGMENT_FROM_BAG);
@@ -3,7 +3,7 @@
3
3
  * source site's custom CSS before it's appended to the generated
4
4
  * `src/styles/app.css` (see templates/app-css.ts).
5
5
  *
6
- * Covers two gotchas from the migration skill (references/css-styling.md):
6
+ * Covers two gotchas from the migration skill (target-tanstack-deco, references/styling.md):
7
7
  * - the v3 `theme()` CSS helper function is gone in v4 — CSS-first config
8
8
  * means theme values live as custom properties, so `theme(colors.x.y)`
9
9
  * must become `var(--color-x-y)` (gotcha referenced alongside #48).
@@ -73,7 +73,7 @@ const TODO_BLOCK = `${TODO_MARKER}
73
73
  // Fresh-only globals like \`globalThis.window.STOREFRONT\` or
74
74
  // \`useScript(...)\`. Verify each handler matches a TanStack Start
75
75
  // equivalent (state hook, platform hook, or server function) — see
76
- // .agents/skills/deco-to-tanstack-migration/references/htmx-rewrite.md
76
+ // the source-deco-fresh skill (decocms/migrations), references/htmx-rewrite.md
77
77
  // § Pattern 1 (event-handler).`;
78
78
 
79
79
  /**
@@ -90,7 +90,7 @@ const IMPORT_RULES: Array<[RegExp, string | null]> = [
90
90
  // no src/hooks/ dir and no ./hooks/* export; verified via `git log
91
91
  // --diff-filter=A -- '**/shopify/hooks/**'` returning nothing across all
92
92
  // history). The legacy migration reference
93
- // (.agents/skills/deco-to-tanstack-migration/references/platform-hooks/README.md)
93
+ // (`target-tanstack-deco` skill in decocms/migrations, references/platform-hooks.md)
94
94
  // confirms Shopify's useCart/useUser/useWishlist were always meant to be
95
95
  // site-local no-op stubs, and templates/hooks.ts's generateHooks() still
96
96
  // scaffolds them at src/hooks/use{Cart,User,Wishlist}.ts for every
@@ -145,7 +145,7 @@ export const TEXT_SIZE_MAP: Record<string, string> = {
145
145
  };
146
146
 
147
147
  export interface GotchaFinding {
148
- /** Gotcha number in the deco-to-tanstack-migration skill's css-styling.md */
148
+ /** Gotcha number in the target-tanstack-deco skill's references/styling.md (decocms/migrations) */
149
149
  gotcha: number;
150
150
  message: string;
151
151
  }
@@ -165,7 +165,7 @@ export function detectDaisyUiV5StructuralIssues(content: string): GotchaFinding[
165
165
  gotcha: 37,
166
166
  message:
167
167
  "DaisyUI .collapse usage found — its expand/collapse chain breaks under Tailwind v4. " +
168
- "Replace with native <details>/<summary> (see skill css-styling.md #37).",
168
+ "Replace with native <details>/<summary> (see target-tanstack-deco skill, references/styling.md #37).",
169
169
  });
170
170
  }
171
171
 
@@ -248,7 +248,7 @@ export function detectLogicalPropertyConflict(classes: string[]): GotchaFinding[
248
248
  message:
249
249
  `Mixed "${shorthand}-*" with "${sides[0]}-*"/"${sides[1]}-*" in the same className — ` +
250
250
  `Tailwind v4's logical properties (padding-inline vs padding-inline-start) don't cascade the same as v3's physical properties. ` +
251
- `Replace the shorthand with explicit longhand at every breakpoint (see skill css-styling.md #42).`,
251
+ `Replace the shorthand with explicit longhand at every breakpoint (see target-tanstack-deco skill, references/styling.md #42).`,
252
252
  });
253
253
  break; // one finding per className string is enough signal
254
254
  }
@@ -4,7 +4,8 @@
4
4
  *
5
5
  * Read-only audit that scans a migrated site for dead code and obsolete
6
6
  * boilerplate that the framework now owns. Mirrors the human checklist at
7
- * `.agents/skills/deco-to-tanstack-migration/references/post-migration-cleanup.md`
7
+ * the `target-tanstack-deco` skill in decocms/migrations
8
+ * (`references/post-migration-cleanup.md`)
8
9
  * but turns it into something CI can actually run.
9
10
  *
10
11
  * Usage (from a migrated site directory):
@@ -93,7 +94,7 @@ function showHelp() {
93
94
  npx -p @decocms/blocks-cli deco-post-cleanup --fix
94
95
  npx -p @decocms/blocks-cli deco-post-cleanup --fix --strict # fail CI if anything left
95
96
 
96
- See: .agents/skills/deco-to-tanstack-migration/references/post-migration-cleanup.md
97
+ See: the target-tanstack-deco skill in decocms/migrations (references/post-migration-cleanup.md)
97
98
  `);
98
99
  }
99
100
 
@@ -298,7 +298,10 @@ function bootstrap(ctx: { sourceDir: string }) {
298
298
  /** A site slug: lower-case, the shape SITE_CREATE itself enforces. */
299
299
  const SITE_SLUG = /^[a-z0-9][a-z0-9._-]*$/;
300
300
 
301
- const CONTROL_PLANE_URL = "https://control-plane.decocms.com";
301
+ // control-plane.decocms.com has no DNS record; with it as the default, provisioning
302
+ // failed on every run that did not override DECO_CONTROL_PLANE_URL, as a fetch error the
303
+ // phase prints as a warning and moves past. This is the host that serves /mcp.
304
+ const CONTROL_PLANE_URL = "https://control-plane.infra.deco.cx";
302
305
 
303
306
  /** `owner/name` of the repo in `dir`, from its `origin` remote, or null. */
304
307
  function repoFullName(dir: string): string | null {