@ossy/app 1.16.2 → 1.16.4

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.
@@ -123,6 +123,17 @@ export function manifestPlugin ({ entriesByStub, srcDir, staticOutDir, configVal
123
123
  const pagePath = rawMeta.path !== undefined ? rawMeta.path : defaultPageRoute(id)
124
124
  entries.push({ type: 'page', id, path: pagePath, title: rawMeta.title, entry: url })
125
125
  } else if (entryInfo.kind === 'api') {
126
+ // APIs have no sensible default route (unlike pages where we can
127
+ // derive `/<id>`). Failing here surfaces a missing `metadata.path`
128
+ // at build time instead of letting it 500 the router on first
129
+ // request — `OssyRouter.getPageByUrl` does `Object.entries(path)`
130
+ // and crashes when `path` is undefined.
131
+ if (rawMeta.path === undefined || rawMeta.path === null) {
132
+ this.error(
133
+ `[@ossy/app][build] api entry "${id}" (${entryInfo.sourcePath}) is missing metadata.path. ` +
134
+ `Add a \`path\` to the metadata or default-export object (e.g. \`path: '/api/${id}'\`).`,
135
+ )
136
+ }
126
137
  entries.push({ type: 'api', id, path: rawMeta.path, entry: url })
127
138
  } else {
128
139
  entries.push({ type: 'task', id, entry: url })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ossy/app",
3
- "version": "1.16.2",
3
+ "version": "1.16.4",
4
4
  "description": "",
5
5
  "source": "./src/index.js",
6
6
  "main": "./src/index.js",
@@ -33,15 +33,15 @@
33
33
  "@babel/eslint-parser": "^7.15.8",
34
34
  "@babel/preset-react": "^7.26.3",
35
35
  "@babel/register": "^7.25.9",
36
- "@ossy/connected-components": "^1.16.2",
37
- "@ossy/design-system": "^1.16.2",
38
- "@ossy/pages": "^1.16.2",
39
- "@ossy/platform": "^1.15.2",
40
- "@ossy/router": "^1.16.2",
41
- "@ossy/router-react": "^1.16.2",
42
- "@ossy/sdk": "^1.16.2",
43
- "@ossy/sdk-react": "^1.16.2",
44
- "@ossy/themes": "^1.16.2",
36
+ "@ossy/connected-components": "^1.16.4",
37
+ "@ossy/design-system": "^1.16.4",
38
+ "@ossy/pages": "^1.16.4",
39
+ "@ossy/platform": "^1.15.4",
40
+ "@ossy/router": "^1.16.4",
41
+ "@ossy/router-react": "^1.16.4",
42
+ "@ossy/sdk": "^1.16.4",
43
+ "@ossy/sdk-react": "^1.16.4",
44
+ "@ossy/themes": "^1.16.4",
45
45
  "@rollup/plugin-alias": "^6.0.0",
46
46
  "@rollup/plugin-babel": "6.1.0",
47
47
  "@rollup/plugin-commonjs": "^29.0.0",
@@ -75,5 +75,5 @@
75
75
  "README.md",
76
76
  "tsconfig.json"
77
77
  ],
78
- "gitHead": "00aca40bd8fcf8510c4a854cb388a780ddb751f7"
78
+ "gitHead": "982c7c2c2dfeeb043b5ccc4d71118a026a86fc3d"
79
79
  }