@jsonpages/cli 3.0.29 → 3.0.32
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/src_tenant_alpha.sh +789 -1001
- package/package.json +29 -29
- package/src/index.js +10 -8
package/package.json
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@jsonpages/cli",
|
|
3
|
-
"version": "3.0.
|
|
4
|
-
"description": "JsonPages CLI - Sovereign Projection Engine",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"bin": {
|
|
7
|
-
"jsonpages": "./src/index.js"
|
|
8
|
-
},
|
|
9
|
-
"files": [
|
|
10
|
-
"src",
|
|
11
|
-
"assets/src_tenant_alpha.sh"
|
|
12
|
-
],
|
|
13
|
-
"scripts": {
|
|
14
|
-
"build": "tsc -p ."
|
|
15
|
-
},
|
|
16
|
-
"dependencies": {
|
|
17
|
-
"@jsonpages/stack": "^1.0.0",
|
|
18
|
-
"chalk": "^5.3.0",
|
|
19
|
-
"commander": "^12.1.0",
|
|
20
|
-
"execa": "^9.0.2",
|
|
21
|
-
"fs-extra": "^11.2.0",
|
|
22
|
-
"ora": "^8.0.1"
|
|
23
|
-
},
|
|
24
|
-
"devDependencies": {
|
|
25
|
-
"@types/fs-extra": "^11.0.4",
|
|
26
|
-
"@types/node": "^22.13.1",
|
|
27
|
-
"typescript": "^5.7.3"
|
|
28
|
-
}
|
|
29
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@jsonpages/cli",
|
|
3
|
+
"version": "3.0.32",
|
|
4
|
+
"description": "JsonPages CLI - Sovereign Projection Engine",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"jsonpages": "./src/index.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"src",
|
|
11
|
+
"assets/src_tenant_alpha.sh"
|
|
12
|
+
],
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "tsc -p ."
|
|
15
|
+
},
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@jsonpages/stack": "^1.0.0",
|
|
18
|
+
"chalk": "^5.3.0",
|
|
19
|
+
"commander": "^12.1.0",
|
|
20
|
+
"execa": "^9.0.2",
|
|
21
|
+
"fs-extra": "^11.2.0",
|
|
22
|
+
"ora": "^8.0.1"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@types/fs-extra": "^11.0.4",
|
|
26
|
+
"@types/node": "^22.13.1",
|
|
27
|
+
"typescript": "^5.7.3"
|
|
28
|
+
}
|
|
29
|
+
}
|
package/src/index.js
CHANGED
|
@@ -171,22 +171,24 @@ async function injectInfraFiles(targetDir, name) {
|
|
|
171
171
|
};
|
|
172
172
|
await fs.writeJson(path.join(targetDir, 'package.json'), pkg, { spaces: 2 });
|
|
173
173
|
|
|
174
|
-
|
|
175
|
-
|
|
174
|
+
// Vite config with dev server API: /api/save-to-file, /api/upload-asset, /api/list-assets
|
|
175
|
+
const viteTemplatePath = path.join(__dirname, '..', 'assets', 'vite.config.tenant.ts');
|
|
176
|
+
const viteConfig = fs.existsSync(viteTemplatePath)
|
|
177
|
+
? await fs.readFile(viteTemplatePath, 'utf8')
|
|
178
|
+
: `import { defineConfig } from 'vite';
|
|
176
179
|
import react from '@vitejs/plugin-react';
|
|
177
180
|
import tailwindcss from '@tailwindcss/vite';
|
|
178
181
|
import path from 'path';
|
|
179
|
-
|
|
180
182
|
export default defineConfig({
|
|
181
183
|
plugins: [react(), tailwindcss()],
|
|
182
|
-
resolve: {
|
|
183
|
-
alias: {
|
|
184
|
-
'@': path.resolve(__dirname, './src'),
|
|
185
|
-
},
|
|
186
|
-
},
|
|
184
|
+
resolve: { alias: { '@': path.resolve(__dirname, './src') } },
|
|
187
185
|
});`;
|
|
188
186
|
await fs.writeFile(path.join(targetDir, 'vite.config.ts'), viteConfig.trim());
|
|
189
187
|
|
|
188
|
+
await fs.ensureDir(path.join(targetDir, 'public', 'assets', 'images'));
|
|
189
|
+
await fs.ensureDir(path.join(targetDir, 'src', 'data', 'config'));
|
|
190
|
+
await fs.ensureDir(path.join(targetDir, 'src', 'data', 'pages'));
|
|
191
|
+
|
|
190
192
|
const tsConfig = `
|
|
191
193
|
{
|
|
192
194
|
"compilerOptions": {
|