@decocms/start 0.42.1 → 0.42.2

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/start",
3
- "version": "0.42.1",
3
+ "version": "0.42.2",
4
4
  "type": "module",
5
5
  "description": "Deco framework for TanStack Start - CMS bridge, admin protocol, hooks, schema generation",
6
6
  "main": "./src/index.ts",
@@ -173,14 +173,14 @@ const checks: Check[] = [
173
173
  },
174
174
  },
175
175
  {
176
- name: "No site/ imports (should be ~/)",
176
+ name: "No site/ or $store/ imports (should be ~/)",
177
177
  severity: "warning",
178
178
  fn: (ctx) => {
179
179
  const srcDir = path.join(ctx.sourceDir, "src");
180
180
  if (!fs.existsSync(srcDir)) return true;
181
- const bad = findFilesWithPattern(srcDir, /from\s+["']site\//);
181
+ const bad = findFilesWithPattern(srcDir, /from\s+["'](site\/|\$store\/)/);
182
182
  if (bad.length > 0) {
183
- console.log(` Still has site/ imports: ${bad.join(", ")}`);
183
+ console.log(` Still has site/ or $store/ imports: ${bad.join(", ")}`);
184
184
  return false;
185
185
  }
186
186
  return true;
@@ -49,6 +49,14 @@ const IMPORT_RULES: Array<[RegExp, string | null]> = [
49
49
  [/^"site\/sdk\/useVariantPossiblities(?:\.tsx?)?.*"$/, `"@decocms/apps/commerce/sdk/useVariantPossibilities"`],
50
50
  [/^"site\/sdk\/usePlatform(?:\.tsx?)?.*"$/, null],
51
51
 
52
+ // $store/ → ~/ (common Deno import map alias for project root)
53
+ [/^"\$store\/sdk\/clx(?:\.tsx?)?.*"$/, `"@decocms/start/sdk/clx"`],
54
+ [/^"\$store\/sdk\/useId(?:\.tsx?)?.*"$/, `"react"`],
55
+ [/^"\$store\/sdk\/useOffer(?:\.tsx?)?.*"$/, `"@decocms/apps/commerce/sdk/useOffer"`],
56
+ [/^"\$store\/sdk\/useVariantPossiblities(?:\.tsx?)?.*"$/, `"@decocms/apps/commerce/sdk/useVariantPossibilities"`],
57
+ [/^"\$store\/sdk\/usePlatform(?:\.tsx?)?.*"$/, null],
58
+ [/^"\$store\/(.+)"$/, `"~/$1"`],
59
+
52
60
  // site/ → ~/
53
61
  [/^"site\/(.+)"$/, `"~/$1"`],
54
62
  ];