@jsonpages/cli 3.0.44 → 3.0.45
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/assets/vercel.json +1 -0
- package/package.json +3 -2
- package/src/index.js +6 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"rewrites":[{"source":"/(.*)","destination":"/index.html"}],"headers":[{"source":"/assets/(.*)","headers":[{"key":"Cache-Control","value":"public, max-age=31536000, immutable"}]}]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jsonpages/cli",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.45",
|
|
4
4
|
"description": "The Sovereign CLI Engine for JsonPages.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
},
|
|
9
9
|
"files": [
|
|
10
10
|
"src",
|
|
11
|
-
"assets/src_tenant_alpha.sh"
|
|
11
|
+
"assets/src_tenant_alpha.sh",
|
|
12
|
+
"assets/vercel.json"
|
|
12
13
|
],
|
|
13
14
|
"author": "JsonPages Team",
|
|
14
15
|
"license": "MIT",
|
package/src/index.js
CHANGED
|
@@ -335,6 +335,12 @@ async function injectInfraFiles(targetDir, name) {
|
|
|
335
335
|
}
|
|
336
336
|
};
|
|
337
337
|
await fs.writeJson(path.join(targetDir, 'components.json'), shadcnConfig, { spaces: 2 });
|
|
338
|
+
|
|
339
|
+
// Vercel deploy config (SPA rewrites + asset cache)
|
|
340
|
+
const vercelJsonPath = path.resolve(__dirname, '../assets/vercel.json');
|
|
341
|
+
if (fs.existsSync(vercelJsonPath)) {
|
|
342
|
+
await fs.copy(vercelJsonPath, path.join(targetDir, 'vercel.json'));
|
|
343
|
+
}
|
|
338
344
|
}
|
|
339
345
|
|
|
340
346
|
program.parse();
|