@decocms/start 0.25.2 → 0.25.3

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.25.2",
3
+ "version": "0.25.3",
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",
@@ -22,7 +22,17 @@ const blocksDir = path.resolve(process.cwd(), arg("blocks-dir", ".deco/blocks"))
22
22
  const outFile = path.resolve(process.cwd(), arg("out-file", "src/server/cms/blocks.gen.ts"));
23
23
 
24
24
  function decodeBlockName(filename: string): string {
25
- return decodeURIComponent(decodeURIComponent(filename)).replace(/\.json$/, "");
25
+ let name = filename.replace(/\.json$/, "");
26
+ while (name.includes("%")) {
27
+ try {
28
+ const next = decodeURIComponent(name);
29
+ if (next === name) break;
30
+ name = next;
31
+ } catch {
32
+ break; // literal % in the decoded name — nothing left to decode
33
+ }
34
+ }
35
+ return name;
26
36
  }
27
37
 
28
38
  if (!fs.existsSync(blocksDir)) {