@ossy/app 1.13.4 → 1.13.5

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/cli/build.js CHANGED
@@ -501,7 +501,20 @@ export function pageRouteFromSource (pageAbsPath, srcDir) {
501
501
  const after = src.slice(metaIdx)
502
502
  const id = after.match(/\bid\s*:\s*['"]([^'"]+)['"]/)?.[1] ?? derived.id
503
503
  const strPath = after.match(/\bpath\s*:\s*['"]([^'"]+)['"]/)?.[1]
504
- return { id, path: strPath ?? derived.path }
504
+ if (strPath) {
505
+ return { id, path: strPath }
506
+ }
507
+ const pathObjBody = after.match(/\bpath\s*:\s*\{([\s\S]*?)\}/)?.[1]
508
+ if (pathObjBody) {
509
+ const languagePathEntries = [...pathObjBody.matchAll(/([A-Za-z0-9_]+)\s*:\s*['"]([^'"]+)['"]/g)]
510
+ if (languagePathEntries.length > 0) {
511
+ return {
512
+ id,
513
+ path: Object.fromEntries(languagePathEntries.map(([, language, routePath]) => [language, routePath])),
514
+ }
515
+ }
516
+ }
517
+ return { id, path: derived.path }
505
518
  } catch {
506
519
  return derived
507
520
  }
@@ -562,7 +575,7 @@ export function generateHydrateEntry ({ pageFiles, srcDir, stubAbsPath }) {
562
575
  }
563
576
  seenIds.add(hydrateId)
564
577
  const rel = relToGeneratedImport(stubAbsPath, f)
565
- pageLines.push(` '${hydrateId}': () => import('./${rel}'),`)
578
+ pageLines.push(` ${JSON.stringify(hydrateId)}: () => import('./${rel}'),`)
566
579
  }
567
580
 
568
581
  return [
@@ -637,8 +650,8 @@ export function generateSsrEntry ({ pageFiles, srcDir, stubAbsPath }) {
637
650
  }
638
651
  seenIds.add(id)
639
652
  const rel = relToGeneratedImport(stubAbsPath, f)
640
- pagesLiteral.push(` { id: '${id}', path: '${routePath}' },`)
641
- pageModuleLines.push(` '${id}': () => import('./${rel}'),`)
653
+ pagesLiteral.push(` { id: ${JSON.stringify(id)}, path: ${JSON.stringify(routePath)} },`)
654
+ pageModuleLines.push(` ${JSON.stringify(id)}: () => import('./${rel}'),`)
642
655
  }
643
656
 
644
657
  return [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ossy/app",
3
- "version": "1.13.4",
3
+ "version": "1.13.5",
4
4
  "description": "",
5
5
  "source": "./src/index.js",
6
6
  "main": "./src/index.js",
@@ -27,14 +27,14 @@
27
27
  "@babel/eslint-parser": "^7.15.8",
28
28
  "@babel/preset-react": "^7.26.3",
29
29
  "@babel/register": "^7.25.9",
30
- "@ossy/connected-components": "^1.13.4",
31
- "@ossy/design-system": "^1.13.4",
32
- "@ossy/pages": "^1.13.4",
33
- "@ossy/router": "^1.13.4",
34
- "@ossy/router-react": "^1.13.4",
35
- "@ossy/sdk": "^1.13.4",
36
- "@ossy/sdk-react": "^1.13.4",
37
- "@ossy/themes": "^1.13.4",
30
+ "@ossy/connected-components": "^1.13.5",
31
+ "@ossy/design-system": "^1.13.5",
32
+ "@ossy/pages": "^1.13.5",
33
+ "@ossy/router": "^1.13.5",
34
+ "@ossy/router-react": "^1.13.5",
35
+ "@ossy/sdk": "^1.13.5",
36
+ "@ossy/sdk-react": "^1.13.5",
37
+ "@ossy/themes": "^1.13.5",
38
38
  "@rollup/plugin-alias": "^6.0.0",
39
39
  "@rollup/plugin-babel": "6.1.0",
40
40
  "@rollup/plugin-commonjs": "^29.0.0",
@@ -67,5 +67,5 @@
67
67
  "README.md",
68
68
  "tsconfig.json"
69
69
  ],
70
- "gitHead": "c2640eba775b192c34a888bae8add3c3461305ee"
70
+ "gitHead": "6c3b6ef26328e2227ee96f830138250fc1db1126"
71
71
  }
package/src/index.js CHANGED
@@ -4,4 +4,3 @@ export {
4
4
  resourceTemplatesDir,
5
5
  OSSY_RESOURCE_TEMPLATES_OUT,
6
6
  } from '../cli/build.js'
7
- export { dev } from '../cli/dev.js'