create-gardener 2.1.0 → 2.1.2
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 +1 -1
- package/template/build/backend/controllers/gardener/addPage.d.ts.map +1 -1
- package/template/build/backend/controllers/gardener/addPage.js +31 -21
- package/template/build/backend/controllers/gardener/addPage.js.map +1 -1
- package/template/build/backend/controllers/gardener/createStatic.d.ts.map +1 -1
- package/template/build/backend/controllers/gardener/createStatic.js +3 -1
- package/template/build/backend/controllers/gardener/createStatic.js.map +1 -1
- package/template/build/backend/libs/generateWebp.d.ts.map +1 -1
- package/template/build/backend/libs/generateWebp.js +0 -2
- package/template/build/backend/libs/generateWebp.js.map +1 -1
- package/template/build/backend/routes/gardener.route.js +5 -0
- package/template/build/backend/routes/gardener.route.js.map +1 -1
- package/template/build/frontend/static/bundle/bundle._.js +1 -0
- package/template/build/frontend/static/bundle/bundle._about.js +1 -0
- package/template/build/frontend/static/bundle/bundle._kartik.js +1 -0
- package/template/build/frontend/static/bundle/bundle._new.js +1 -0
- package/template/build/frontend/static/bundle/bundle._ritish.js +1 -0
- package/template/build/frontend/static/cache/gardener_100x100.webp +0 -0
- package/template/build/frontend/static/components/copybtn.js +16 -3
- package/template/build/frontend/static/components/footer.js +33 -0
- package/template/build/frontend/static/components/gardener/errorBox.js +47 -0
- package/template/build/frontend/static/components/gardener/hotReloadbtn.js +82 -0
- package/template/build/frontend/static/components/gardener/pageOverlayBtn.js +138 -0
- package/template/build/frontend/static/components/gardener/parserWindow.js +159 -0
- package/template/build/frontend/static/components/nonui/api.js +15 -2
- package/template/build/frontend/static/components/nonui/navigation.js +2 -2
- package/template/build/frontend/static/components/notification.js +1 -1
- package/template/build/frontend/static/gardener.js +129 -58
- package/template/build/frontend/static/gardenerConfig.js +1 -1
- package/template/build/frontend/static/gardenerDev.js +67 -401
- package/template/build/frontend/static/global.js +2 -2
- package/template/build/frontend/static/pages/pages._.js +7 -2
- package/template/build/frontend/static/pages/pages._about.js +2 -0
- package/template/build/frontend/static/pages/pages._kartik.js +2 -0
- package/template/build/frontend/static/pages/pages._new.js +2 -0
- package/template/build/frontend/static/pages/pages._ritish.js +2 -0
- package/template/build/frontend/static/style.css +1 -1
- package/template/build/frontend/static/style2.css +2 -2
- package/template/build/frontend/views/_.ejs +6 -2
- package/template/build/frontend/views/_about.ejs +126 -0
- package/template/build/frontend/views/_kartik.ejs +126 -0
- package/template/build/frontend/views/_new.ejs +126 -0
- package/template/build/frontend/views/_ritish.ejs +126 -0
- package/template/buildHelper.js +33 -2
- package/template/package.json +2 -1
- package/template/pnpm-lock.yaml +271 -0
- package/template/src/backend/controllers/gardener/addPage.ts +7 -1
- package/template/src/backend/controllers/gardener/createStatic.ts +94 -59
- package/template/src/backend/controllers/gardener/index.ts +0 -1
- package/template/src/backend/routes/gardener.route.ts +1 -2
- package/template/src/frontend/bundle/bundle._.js +2 -0
- package/template/src/frontend/bundle/bundle._about.js +1 -0
- package/template/src/frontend/bundle/bundle._kartik.js +1 -0
- package/template/src/frontend/bundle/bundle._new.js +1 -0
- package/template/src/frontend/bundle/bundle._ritish.js +1 -0
- package/template/src/frontend/static/components/nonui/navigation.js +2 -2
- package/template/src/frontend/static/components/notification.js +1 -1
- package/template/src/frontend/static/gardenerDev.js +2 -2
- package/template/src/frontend/static/global.js +1 -1
- package/template/src/frontend/static/pages/pages._.js +2 -2
- package/template/src/frontend/static/style.css +61 -31
- package/template/src/frontend/template/template._.ejs +5 -1
- package/template/src/frontend/views/_.ejs +6 -2
- package/template/build/frontend/static/gardener.test.js +0 -364
- package/template/build/frontend/static/zod.js +0 -8
- package/template/buildHelper.test.js +0 -78
- package/template/jest.config.js +0 -13
- package/template/src/frontend/static/gardener.test.js +0 -364
- package/template/src/frontend/static/zod.js +0 -8
package/template/buildHelper.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import fs from 'fs/promises';
|
|
2
2
|
import path from 'path';
|
|
3
|
+
import { build } from 'esbuild';
|
|
3
4
|
|
|
4
5
|
export default async function buildHelper() {
|
|
5
6
|
const src = path.resolve('src', 'frontend');
|
|
@@ -7,13 +8,43 @@ export default async function buildHelper() {
|
|
|
7
8
|
|
|
8
9
|
await fs.cp(src, dest, { recursive: true });
|
|
9
10
|
|
|
10
|
-
await fs.writeFile(
|
|
11
|
+
await fs.writeFile(
|
|
12
|
+
path.join(dest, 'static', 'gardenerConfig.js'),
|
|
13
|
+
"export const mode = 'prod';",
|
|
14
|
+
'utf8'
|
|
15
|
+
);
|
|
11
16
|
|
|
12
17
|
await fs.rm(path.join(dest, 'template'), { recursive: true });
|
|
13
18
|
|
|
19
|
+
// 👇 bundle all files inside bundle folder
|
|
20
|
+
|
|
21
|
+
const bundleDir = path.join(dest, 'static', 'bundle');
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
await fs.mkdir(bundleDir, { recursive: true });
|
|
25
|
+
const files = await fs.readdir(path.join(dest, 'bundle'));
|
|
26
|
+
|
|
27
|
+
for (const file of files) {
|
|
28
|
+
|
|
29
|
+
// const stat = await fs.stat(fullPath);
|
|
30
|
+
// sf (!stat.isFile()) continue;
|
|
31
|
+
const destBundleFile = path.join(bundleDir, file); // overwrite same file
|
|
32
|
+
// await fs.writeFile(destBundleFile, '', 'utf8');
|
|
33
|
+
|
|
34
|
+
await build({
|
|
35
|
+
entryPoints: [path.join(dest, 'bundle', file)],
|
|
36
|
+
bundle: true,
|
|
37
|
+
minify: true,
|
|
38
|
+
format: 'esm',
|
|
39
|
+
outfile: destBundleFile
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
await fs.rm(path.join(dest, 'bundle'), { recursive: true });
|
|
45
|
+
|
|
14
46
|
}
|
|
15
47
|
|
|
16
48
|
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
17
49
|
buildHelper();
|
|
18
50
|
}
|
|
19
|
-
|
package/template/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"start": "cross-env NODE_ENV=production node build/backend/server.js",
|
|
8
8
|
"dev": "concurrently \"cross-env NODE_ENV=development tsx watch src/backend/server.ts\" \"tailwindcss -w -i src/frontend/tailwind.css -o src/frontend/static/style.css\"",
|
|
9
9
|
"build": "tailwindcss -i src/frontend/tailwind.css -o src/frontend/static/style.css --minify && tsc && node buildHelper.js",
|
|
10
|
-
"
|
|
10
|
+
"static": "cross-env NODE_ENV=production tsx src/backend/controllers/gardener/createStatic.ts"
|
|
11
11
|
},
|
|
12
12
|
"keywords": [],
|
|
13
13
|
"author": "ritishDas",
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@jest/globals": "^30.3.0",
|
|
25
|
+
"esbuild": "^0.28.0",
|
|
25
26
|
"@types/ejs": "^3.1.5",
|
|
26
27
|
"@types/express": "^5.0.6",
|
|
27
28
|
"@types/node": "^25.0.2",
|
package/template/pnpm-lock.yaml
CHANGED
|
@@ -45,6 +45,9 @@ importers:
|
|
|
45
45
|
cross-env:
|
|
46
46
|
specifier: ^10.1.0
|
|
47
47
|
version: 10.1.0
|
|
48
|
+
esbuild:
|
|
49
|
+
specifier: ^0.28.0
|
|
50
|
+
version: 0.28.0
|
|
48
51
|
jest:
|
|
49
52
|
specifier: ^30.3.0
|
|
50
53
|
version: 30.3.0(@types/node@25.2.3)
|
|
@@ -277,156 +280,312 @@ packages:
|
|
|
277
280
|
cpu: [ppc64]
|
|
278
281
|
os: [aix]
|
|
279
282
|
|
|
283
|
+
'@esbuild/aix-ppc64@0.28.0':
|
|
284
|
+
resolution: {integrity: sha512-lhRUCeuOyJQURhTxl4WkpFTjIsbDayJHih5kZC1giwE+MhIzAb7mEsQMqMf18rHLsrb5qI1tafG20mLxEWcWlA==}
|
|
285
|
+
engines: {node: '>=18'}
|
|
286
|
+
cpu: [ppc64]
|
|
287
|
+
os: [aix]
|
|
288
|
+
|
|
280
289
|
'@esbuild/android-arm64@0.27.3':
|
|
281
290
|
resolution: {integrity: sha512-YdghPYUmj/FX2SYKJ0OZxf+iaKgMsKHVPF1MAq/P8WirnSpCStzKJFjOjzsW0QQ7oIAiccHdcqjbHmJxRb/dmg==}
|
|
282
291
|
engines: {node: '>=18'}
|
|
283
292
|
cpu: [arm64]
|
|
284
293
|
os: [android]
|
|
285
294
|
|
|
295
|
+
'@esbuild/android-arm64@0.28.0':
|
|
296
|
+
resolution: {integrity: sha512-+WzIXQOSaGs33tLEgYPYe/yQHf0WTU0X42Jca3y8NWMbUVhp7rUnw+vAsRC/QiDrdD31IszMrZy+qwPOPjd+rw==}
|
|
297
|
+
engines: {node: '>=18'}
|
|
298
|
+
cpu: [arm64]
|
|
299
|
+
os: [android]
|
|
300
|
+
|
|
286
301
|
'@esbuild/android-arm@0.27.3':
|
|
287
302
|
resolution: {integrity: sha512-i5D1hPY7GIQmXlXhs2w8AWHhenb00+GxjxRncS2ZM7YNVGNfaMxgzSGuO8o8SJzRc/oZwU2bcScvVERk03QhzA==}
|
|
288
303
|
engines: {node: '>=18'}
|
|
289
304
|
cpu: [arm]
|
|
290
305
|
os: [android]
|
|
291
306
|
|
|
307
|
+
'@esbuild/android-arm@0.28.0':
|
|
308
|
+
resolution: {integrity: sha512-wqh0ByljabXLKHeWXYLqoJ5jKC4XBaw6Hk08OfMrCRd2nP2ZQ5eleDZC41XHyCNgktBGYMbqnrJKq/K/lzPMSQ==}
|
|
309
|
+
engines: {node: '>=18'}
|
|
310
|
+
cpu: [arm]
|
|
311
|
+
os: [android]
|
|
312
|
+
|
|
292
313
|
'@esbuild/android-x64@0.27.3':
|
|
293
314
|
resolution: {integrity: sha512-IN/0BNTkHtk8lkOM8JWAYFg4ORxBkZQf9zXiEOfERX/CzxW3Vg1ewAhU7QSWQpVIzTW+b8Xy+lGzdYXV6UZObQ==}
|
|
294
315
|
engines: {node: '>=18'}
|
|
295
316
|
cpu: [x64]
|
|
296
317
|
os: [android]
|
|
297
318
|
|
|
319
|
+
'@esbuild/android-x64@0.28.0':
|
|
320
|
+
resolution: {integrity: sha512-+VJggoaKhk2VNNqVL7f6S189UzShHC/mR9EE8rDdSkdpN0KflSwWY/gWjDrNxxisg8Fp1ZCD9jLMo4m0OUfeUA==}
|
|
321
|
+
engines: {node: '>=18'}
|
|
322
|
+
cpu: [x64]
|
|
323
|
+
os: [android]
|
|
324
|
+
|
|
298
325
|
'@esbuild/darwin-arm64@0.27.3':
|
|
299
326
|
resolution: {integrity: sha512-Re491k7ByTVRy0t3EKWajdLIr0gz2kKKfzafkth4Q8A5n1xTHrkqZgLLjFEHVD+AXdUGgQMq+Godfq45mGpCKg==}
|
|
300
327
|
engines: {node: '>=18'}
|
|
301
328
|
cpu: [arm64]
|
|
302
329
|
os: [darwin]
|
|
303
330
|
|
|
331
|
+
'@esbuild/darwin-arm64@0.28.0':
|
|
332
|
+
resolution: {integrity: sha512-0T+A9WZm+bZ84nZBtk1ckYsOvyA3x7e2Acj1KdVfV4/2tdG4fzUp91YHx+GArWLtwqp77pBXVCPn2We7Letr0Q==}
|
|
333
|
+
engines: {node: '>=18'}
|
|
334
|
+
cpu: [arm64]
|
|
335
|
+
os: [darwin]
|
|
336
|
+
|
|
304
337
|
'@esbuild/darwin-x64@0.27.3':
|
|
305
338
|
resolution: {integrity: sha512-vHk/hA7/1AckjGzRqi6wbo+jaShzRowYip6rt6q7VYEDX4LEy1pZfDpdxCBnGtl+A5zq8iXDcyuxwtv3hNtHFg==}
|
|
306
339
|
engines: {node: '>=18'}
|
|
307
340
|
cpu: [x64]
|
|
308
341
|
os: [darwin]
|
|
309
342
|
|
|
343
|
+
'@esbuild/darwin-x64@0.28.0':
|
|
344
|
+
resolution: {integrity: sha512-fyzLm/DLDl/84OCfp2f/XQ4flmORsjU7VKt8HLjvIXChJoFFOIL6pLJPH4Yhd1n1gGFF9mPwtlN5Wf82DZs+LQ==}
|
|
345
|
+
engines: {node: '>=18'}
|
|
346
|
+
cpu: [x64]
|
|
347
|
+
os: [darwin]
|
|
348
|
+
|
|
310
349
|
'@esbuild/freebsd-arm64@0.27.3':
|
|
311
350
|
resolution: {integrity: sha512-ipTYM2fjt3kQAYOvo6vcxJx3nBYAzPjgTCk7QEgZG8AUO3ydUhvelmhrbOheMnGOlaSFUoHXB6un+A7q4ygY9w==}
|
|
312
351
|
engines: {node: '>=18'}
|
|
313
352
|
cpu: [arm64]
|
|
314
353
|
os: [freebsd]
|
|
315
354
|
|
|
355
|
+
'@esbuild/freebsd-arm64@0.28.0':
|
|
356
|
+
resolution: {integrity: sha512-l9GeW5UZBT9k9brBYI+0WDffcRxgHQD8ShN2Ur4xWq/NFzUKm3k5lsH4PdaRgb2w7mI9u61nr2gI2mLI27Nh3Q==}
|
|
357
|
+
engines: {node: '>=18'}
|
|
358
|
+
cpu: [arm64]
|
|
359
|
+
os: [freebsd]
|
|
360
|
+
|
|
316
361
|
'@esbuild/freebsd-x64@0.27.3':
|
|
317
362
|
resolution: {integrity: sha512-dDk0X87T7mI6U3K9VjWtHOXqwAMJBNN2r7bejDsc+j03SEjtD9HrOl8gVFByeM0aJksoUuUVU9TBaZa2rgj0oA==}
|
|
318
363
|
engines: {node: '>=18'}
|
|
319
364
|
cpu: [x64]
|
|
320
365
|
os: [freebsd]
|
|
321
366
|
|
|
367
|
+
'@esbuild/freebsd-x64@0.28.0':
|
|
368
|
+
resolution: {integrity: sha512-BXoQai/A0wPO6Es3yFJ7APCiKGc1tdAEOgeTNy3SsB491S3aHn4S4r3e976eUnPdU+NbdtmBuLncYir2tMU9Nw==}
|
|
369
|
+
engines: {node: '>=18'}
|
|
370
|
+
cpu: [x64]
|
|
371
|
+
os: [freebsd]
|
|
372
|
+
|
|
322
373
|
'@esbuild/linux-arm64@0.27.3':
|
|
323
374
|
resolution: {integrity: sha512-sZOuFz/xWnZ4KH3YfFrKCf1WyPZHakVzTiqji3WDc0BCl2kBwiJLCXpzLzUBLgmp4veFZdvN5ChW4Eq/8Fc2Fg==}
|
|
324
375
|
engines: {node: '>=18'}
|
|
325
376
|
cpu: [arm64]
|
|
326
377
|
os: [linux]
|
|
327
378
|
|
|
379
|
+
'@esbuild/linux-arm64@0.28.0':
|
|
380
|
+
resolution: {integrity: sha512-RVyzfb3FWsGA55n6WY0MEIEPURL1FcbhFE6BffZEMEekfCzCIMtB5yyDcFnVbTnwk+CLAgTujmV/Lgvih56W+A==}
|
|
381
|
+
engines: {node: '>=18'}
|
|
382
|
+
cpu: [arm64]
|
|
383
|
+
os: [linux]
|
|
384
|
+
|
|
328
385
|
'@esbuild/linux-arm@0.27.3':
|
|
329
386
|
resolution: {integrity: sha512-s6nPv2QkSupJwLYyfS+gwdirm0ukyTFNl3KTgZEAiJDd+iHZcbTPPcWCcRYH+WlNbwChgH2QkE9NSlNrMT8Gfw==}
|
|
330
387
|
engines: {node: '>=18'}
|
|
331
388
|
cpu: [arm]
|
|
332
389
|
os: [linux]
|
|
333
390
|
|
|
391
|
+
'@esbuild/linux-arm@0.28.0':
|
|
392
|
+
resolution: {integrity: sha512-CjaaREJagqJp7iTaNQjjidaNbCKYcd4IDkzbwwxtSvjI7NZm79qiHc8HqciMddQ6CKvJT6aBd8lO9kN/ZudLlw==}
|
|
393
|
+
engines: {node: '>=18'}
|
|
394
|
+
cpu: [arm]
|
|
395
|
+
os: [linux]
|
|
396
|
+
|
|
334
397
|
'@esbuild/linux-ia32@0.27.3':
|
|
335
398
|
resolution: {integrity: sha512-yGlQYjdxtLdh0a3jHjuwOrxQjOZYD/C9PfdbgJJF3TIZWnm/tMd/RcNiLngiu4iwcBAOezdnSLAwQDPqTmtTYg==}
|
|
336
399
|
engines: {node: '>=18'}
|
|
337
400
|
cpu: [ia32]
|
|
338
401
|
os: [linux]
|
|
339
402
|
|
|
403
|
+
'@esbuild/linux-ia32@0.28.0':
|
|
404
|
+
resolution: {integrity: sha512-KBnSTt1kxl9x70q+ydterVdl+Cn0H18ngRMRCEQfrbqdUuntQQ0LoMZv47uB97NljZFzY6HcfqEZ2SAyIUTQBQ==}
|
|
405
|
+
engines: {node: '>=18'}
|
|
406
|
+
cpu: [ia32]
|
|
407
|
+
os: [linux]
|
|
408
|
+
|
|
340
409
|
'@esbuild/linux-loong64@0.27.3':
|
|
341
410
|
resolution: {integrity: sha512-WO60Sn8ly3gtzhyjATDgieJNet/KqsDlX5nRC5Y3oTFcS1l0KWba+SEa9Ja1GfDqSF1z6hif/SkpQJbL63cgOA==}
|
|
342
411
|
engines: {node: '>=18'}
|
|
343
412
|
cpu: [loong64]
|
|
344
413
|
os: [linux]
|
|
345
414
|
|
|
415
|
+
'@esbuild/linux-loong64@0.28.0':
|
|
416
|
+
resolution: {integrity: sha512-zpSlUce1mnxzgBADvxKXX5sl8aYQHo2ezvMNI8I0lbblJtp8V4odlm3Yzlj7gPyt3T8ReksE6bK+pT3WD+aJRg==}
|
|
417
|
+
engines: {node: '>=18'}
|
|
418
|
+
cpu: [loong64]
|
|
419
|
+
os: [linux]
|
|
420
|
+
|
|
346
421
|
'@esbuild/linux-mips64el@0.27.3':
|
|
347
422
|
resolution: {integrity: sha512-APsymYA6sGcZ4pD6k+UxbDjOFSvPWyZhjaiPyl/f79xKxwTnrn5QUnXR5prvetuaSMsb4jgeHewIDCIWljrSxw==}
|
|
348
423
|
engines: {node: '>=18'}
|
|
349
424
|
cpu: [mips64el]
|
|
350
425
|
os: [linux]
|
|
351
426
|
|
|
427
|
+
'@esbuild/linux-mips64el@0.28.0':
|
|
428
|
+
resolution: {integrity: sha512-2jIfP6mmjkdmeTlsX/9vmdmhBmKADrWqN7zcdtHIeNSCH1SqIoNI63cYsjQR8J+wGa4Y5izRcSHSm8K3QWmk3w==}
|
|
429
|
+
engines: {node: '>=18'}
|
|
430
|
+
cpu: [mips64el]
|
|
431
|
+
os: [linux]
|
|
432
|
+
|
|
352
433
|
'@esbuild/linux-ppc64@0.27.3':
|
|
353
434
|
resolution: {integrity: sha512-eizBnTeBefojtDb9nSh4vvVQ3V9Qf9Df01PfawPcRzJH4gFSgrObw+LveUyDoKU3kxi5+9RJTCWlj4FjYXVPEA==}
|
|
354
435
|
engines: {node: '>=18'}
|
|
355
436
|
cpu: [ppc64]
|
|
356
437
|
os: [linux]
|
|
357
438
|
|
|
439
|
+
'@esbuild/linux-ppc64@0.28.0':
|
|
440
|
+
resolution: {integrity: sha512-bc0FE9wWeC0WBm49IQMPSPILRocGTQt3j5KPCA8os6VprfuJ7KD+5PzESSrJ6GmPIPJK965ZJHTUlSA6GNYEhg==}
|
|
441
|
+
engines: {node: '>=18'}
|
|
442
|
+
cpu: [ppc64]
|
|
443
|
+
os: [linux]
|
|
444
|
+
|
|
358
445
|
'@esbuild/linux-riscv64@0.27.3':
|
|
359
446
|
resolution: {integrity: sha512-3Emwh0r5wmfm3ssTWRQSyVhbOHvqegUDRd0WhmXKX2mkHJe1SFCMJhagUleMq+Uci34wLSipf8Lagt4LlpRFWQ==}
|
|
360
447
|
engines: {node: '>=18'}
|
|
361
448
|
cpu: [riscv64]
|
|
362
449
|
os: [linux]
|
|
363
450
|
|
|
451
|
+
'@esbuild/linux-riscv64@0.28.0':
|
|
452
|
+
resolution: {integrity: sha512-SQPZOwoTTT/HXFXQJG/vBX8sOFagGqvZyXcgLA3NhIqcBv1BJU1d46c0rGcrij2B56Z2rNiSLaZOYW5cUk7yLQ==}
|
|
453
|
+
engines: {node: '>=18'}
|
|
454
|
+
cpu: [riscv64]
|
|
455
|
+
os: [linux]
|
|
456
|
+
|
|
364
457
|
'@esbuild/linux-s390x@0.27.3':
|
|
365
458
|
resolution: {integrity: sha512-pBHUx9LzXWBc7MFIEEL0yD/ZVtNgLytvx60gES28GcWMqil8ElCYR4kvbV2BDqsHOvVDRrOxGySBM9Fcv744hw==}
|
|
366
459
|
engines: {node: '>=18'}
|
|
367
460
|
cpu: [s390x]
|
|
368
461
|
os: [linux]
|
|
369
462
|
|
|
463
|
+
'@esbuild/linux-s390x@0.28.0':
|
|
464
|
+
resolution: {integrity: sha512-SCfR0HN8CEEjnYnySJTd2cw0k9OHB/YFzt5zgJEwa+wL/T/raGWYMBqwDNAC6dqFKmJYZoQBRfHjgwLHGSrn3Q==}
|
|
465
|
+
engines: {node: '>=18'}
|
|
466
|
+
cpu: [s390x]
|
|
467
|
+
os: [linux]
|
|
468
|
+
|
|
370
469
|
'@esbuild/linux-x64@0.27.3':
|
|
371
470
|
resolution: {integrity: sha512-Czi8yzXUWIQYAtL/2y6vogER8pvcsOsk5cpwL4Gk5nJqH5UZiVByIY8Eorm5R13gq+DQKYg0+JyQoytLQas4dA==}
|
|
372
471
|
engines: {node: '>=18'}
|
|
373
472
|
cpu: [x64]
|
|
374
473
|
os: [linux]
|
|
375
474
|
|
|
475
|
+
'@esbuild/linux-x64@0.28.0':
|
|
476
|
+
resolution: {integrity: sha512-us0dSb9iFxIi8srnpl931Nvs65it/Jd2a2K3qs7fz2WfGPHqzfzZTfec7oxZJRNPXPnNYZtanmRc4AL/JwVzHQ==}
|
|
477
|
+
engines: {node: '>=18'}
|
|
478
|
+
cpu: [x64]
|
|
479
|
+
os: [linux]
|
|
480
|
+
|
|
376
481
|
'@esbuild/netbsd-arm64@0.27.3':
|
|
377
482
|
resolution: {integrity: sha512-sDpk0RgmTCR/5HguIZa9n9u+HVKf40fbEUt+iTzSnCaGvY9kFP0YKBWZtJaraonFnqef5SlJ8/TiPAxzyS+UoA==}
|
|
378
483
|
engines: {node: '>=18'}
|
|
379
484
|
cpu: [arm64]
|
|
380
485
|
os: [netbsd]
|
|
381
486
|
|
|
487
|
+
'@esbuild/netbsd-arm64@0.28.0':
|
|
488
|
+
resolution: {integrity: sha512-CR/RYotgtCKwtftMwJlUU7xCVNg3lMYZ0RzTmAHSfLCXw3NtZtNpswLEj/Kkf6kEL3Gw+BpOekRX0BYCtklhUw==}
|
|
489
|
+
engines: {node: '>=18'}
|
|
490
|
+
cpu: [arm64]
|
|
491
|
+
os: [netbsd]
|
|
492
|
+
|
|
382
493
|
'@esbuild/netbsd-x64@0.27.3':
|
|
383
494
|
resolution: {integrity: sha512-P14lFKJl/DdaE00LItAukUdZO5iqNH7+PjoBm+fLQjtxfcfFE20Xf5CrLsmZdq5LFFZzb5JMZ9grUwvtVYzjiA==}
|
|
384
495
|
engines: {node: '>=18'}
|
|
385
496
|
cpu: [x64]
|
|
386
497
|
os: [netbsd]
|
|
387
498
|
|
|
499
|
+
'@esbuild/netbsd-x64@0.28.0':
|
|
500
|
+
resolution: {integrity: sha512-nU1yhmYutL+fQ71Kxnhg8uEOdC0pwEW9entHykTgEbna2pw2dkbFSMeqjjyHZoCmt8SBkOSvV+yNmm94aUrrqw==}
|
|
501
|
+
engines: {node: '>=18'}
|
|
502
|
+
cpu: [x64]
|
|
503
|
+
os: [netbsd]
|
|
504
|
+
|
|
388
505
|
'@esbuild/openbsd-arm64@0.27.3':
|
|
389
506
|
resolution: {integrity: sha512-AIcMP77AvirGbRl/UZFTq5hjXK+2wC7qFRGoHSDrZ5v5b8DK/GYpXW3CPRL53NkvDqb9D+alBiC/dV0Fb7eJcw==}
|
|
390
507
|
engines: {node: '>=18'}
|
|
391
508
|
cpu: [arm64]
|
|
392
509
|
os: [openbsd]
|
|
393
510
|
|
|
511
|
+
'@esbuild/openbsd-arm64@0.28.0':
|
|
512
|
+
resolution: {integrity: sha512-cXb5vApOsRsxsEl4mcZ1XY3D4DzcoMxR/nnc4IyqYs0rTI8ZKmW6kyyg+11Z8yvgMfAEldKzP7AdP64HnSC/6g==}
|
|
513
|
+
engines: {node: '>=18'}
|
|
514
|
+
cpu: [arm64]
|
|
515
|
+
os: [openbsd]
|
|
516
|
+
|
|
394
517
|
'@esbuild/openbsd-x64@0.27.3':
|
|
395
518
|
resolution: {integrity: sha512-DnW2sRrBzA+YnE70LKqnM3P+z8vehfJWHXECbwBmH/CU51z6FiqTQTHFenPlHmo3a8UgpLyH3PT+87OViOh1AQ==}
|
|
396
519
|
engines: {node: '>=18'}
|
|
397
520
|
cpu: [x64]
|
|
398
521
|
os: [openbsd]
|
|
399
522
|
|
|
523
|
+
'@esbuild/openbsd-x64@0.28.0':
|
|
524
|
+
resolution: {integrity: sha512-8wZM2qqtv9UP3mzy7HiGYNH/zjTA355mpeuA+859TyR+e+Tc08IHYpLJuMsfpDJwoLo1ikIJI8jC3GFjnRClzA==}
|
|
525
|
+
engines: {node: '>=18'}
|
|
526
|
+
cpu: [x64]
|
|
527
|
+
os: [openbsd]
|
|
528
|
+
|
|
400
529
|
'@esbuild/openharmony-arm64@0.27.3':
|
|
401
530
|
resolution: {integrity: sha512-NinAEgr/etERPTsZJ7aEZQvvg/A6IsZG/LgZy+81wON2huV7SrK3e63dU0XhyZP4RKGyTm7aOgmQk0bGp0fy2g==}
|
|
402
531
|
engines: {node: '>=18'}
|
|
403
532
|
cpu: [arm64]
|
|
404
533
|
os: [openharmony]
|
|
405
534
|
|
|
535
|
+
'@esbuild/openharmony-arm64@0.28.0':
|
|
536
|
+
resolution: {integrity: sha512-FLGfyizszcef5C3YtoyQDACyg95+dndv79i2EekILBofh5wpCa1KuBqOWKrEHZg3zrL3t5ouE5jgr94vA+Wb2w==}
|
|
537
|
+
engines: {node: '>=18'}
|
|
538
|
+
cpu: [arm64]
|
|
539
|
+
os: [openharmony]
|
|
540
|
+
|
|
406
541
|
'@esbuild/sunos-x64@0.27.3':
|
|
407
542
|
resolution: {integrity: sha512-PanZ+nEz+eWoBJ8/f8HKxTTD172SKwdXebZ0ndd953gt1HRBbhMsaNqjTyYLGLPdoWHy4zLU7bDVJztF5f3BHA==}
|
|
408
543
|
engines: {node: '>=18'}
|
|
409
544
|
cpu: [x64]
|
|
410
545
|
os: [sunos]
|
|
411
546
|
|
|
547
|
+
'@esbuild/sunos-x64@0.28.0':
|
|
548
|
+
resolution: {integrity: sha512-1ZgjUoEdHZZl/YlV76TSCz9Hqj9h9YmMGAgAPYd+q4SicWNX3G5GCyx9uhQWSLcbvPW8Ni7lj4gDa1T40akdlw==}
|
|
549
|
+
engines: {node: '>=18'}
|
|
550
|
+
cpu: [x64]
|
|
551
|
+
os: [sunos]
|
|
552
|
+
|
|
412
553
|
'@esbuild/win32-arm64@0.27.3':
|
|
413
554
|
resolution: {integrity: sha512-B2t59lWWYrbRDw/tjiWOuzSsFh1Y/E95ofKz7rIVYSQkUYBjfSgf6oeYPNWHToFRr2zx52JKApIcAS/D5TUBnA==}
|
|
414
555
|
engines: {node: '>=18'}
|
|
415
556
|
cpu: [arm64]
|
|
416
557
|
os: [win32]
|
|
417
558
|
|
|
559
|
+
'@esbuild/win32-arm64@0.28.0':
|
|
560
|
+
resolution: {integrity: sha512-Q9StnDmQ/enxnpxCCLSg0oo4+34B9TdXpuyPeTedN/6+iXBJ4J+zwfQI28u/Jl40nOYAxGoNi7mFP40RUtkmUA==}
|
|
561
|
+
engines: {node: '>=18'}
|
|
562
|
+
cpu: [arm64]
|
|
563
|
+
os: [win32]
|
|
564
|
+
|
|
418
565
|
'@esbuild/win32-ia32@0.27.3':
|
|
419
566
|
resolution: {integrity: sha512-QLKSFeXNS8+tHW7tZpMtjlNb7HKau0QDpwm49u0vUp9y1WOF+PEzkU84y9GqYaAVW8aH8f3GcBck26jh54cX4Q==}
|
|
420
567
|
engines: {node: '>=18'}
|
|
421
568
|
cpu: [ia32]
|
|
422
569
|
os: [win32]
|
|
423
570
|
|
|
571
|
+
'@esbuild/win32-ia32@0.28.0':
|
|
572
|
+
resolution: {integrity: sha512-zF3ag/gfiCe6U2iczcRzSYJKH1DCI+ByzSENHlM2FcDbEeo5Zd2C86Aq0tKUYAJJ1obRP84ymxIAksZUcdztHA==}
|
|
573
|
+
engines: {node: '>=18'}
|
|
574
|
+
cpu: [ia32]
|
|
575
|
+
os: [win32]
|
|
576
|
+
|
|
424
577
|
'@esbuild/win32-x64@0.27.3':
|
|
425
578
|
resolution: {integrity: sha512-4uJGhsxuptu3OcpVAzli+/gWusVGwZZHTlS63hh++ehExkVT8SgiEf7/uC/PclrPPkLhZqGgCTjd0VWLo6xMqA==}
|
|
426
579
|
engines: {node: '>=18'}
|
|
427
580
|
cpu: [x64]
|
|
428
581
|
os: [win32]
|
|
429
582
|
|
|
583
|
+
'@esbuild/win32-x64@0.28.0':
|
|
584
|
+
resolution: {integrity: sha512-pEl1bO9mfAmIC+tW5btTmrKaujg3zGtUmWNdCw/xs70FBjwAL3o9OEKNHvNmnyylD6ubxUERiEhdsL0xBQ9efw==}
|
|
585
|
+
engines: {node: '>=18'}
|
|
586
|
+
cpu: [x64]
|
|
587
|
+
os: [win32]
|
|
588
|
+
|
|
430
589
|
'@img/colour@1.0.0':
|
|
431
590
|
resolution: {integrity: sha512-A5P/LfWGFSl6nsckYtjw9da+19jB8hkJ6ACTGcDfEJ0aE+l2n2El7dsVM7UVHZQ9s2lmYMWlrS21YLy2IR1LUw==}
|
|
432
591
|
engines: {node: '>=18'}
|
|
@@ -1345,6 +1504,11 @@ packages:
|
|
|
1345
1504
|
engines: {node: '>=18'}
|
|
1346
1505
|
hasBin: true
|
|
1347
1506
|
|
|
1507
|
+
esbuild@0.28.0:
|
|
1508
|
+
resolution: {integrity: sha512-sNR9MHpXSUV/XB4zmsFKN+QgVG82Cc7+/aaxJ8Adi8hyOac+EXptIp45QBPaVyX3N70664wRbTcLTOemCAnyqw==}
|
|
1509
|
+
engines: {node: '>=18'}
|
|
1510
|
+
hasBin: true
|
|
1511
|
+
|
|
1348
1512
|
escalade@3.2.0:
|
|
1349
1513
|
resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==}
|
|
1350
1514
|
engines: {node: '>=6'}
|
|
@@ -2626,81 +2790,159 @@ snapshots:
|
|
|
2626
2790
|
'@esbuild/aix-ppc64@0.27.3':
|
|
2627
2791
|
optional: true
|
|
2628
2792
|
|
|
2793
|
+
'@esbuild/aix-ppc64@0.28.0':
|
|
2794
|
+
optional: true
|
|
2795
|
+
|
|
2629
2796
|
'@esbuild/android-arm64@0.27.3':
|
|
2630
2797
|
optional: true
|
|
2631
2798
|
|
|
2799
|
+
'@esbuild/android-arm64@0.28.0':
|
|
2800
|
+
optional: true
|
|
2801
|
+
|
|
2632
2802
|
'@esbuild/android-arm@0.27.3':
|
|
2633
2803
|
optional: true
|
|
2634
2804
|
|
|
2805
|
+
'@esbuild/android-arm@0.28.0':
|
|
2806
|
+
optional: true
|
|
2807
|
+
|
|
2635
2808
|
'@esbuild/android-x64@0.27.3':
|
|
2636
2809
|
optional: true
|
|
2637
2810
|
|
|
2811
|
+
'@esbuild/android-x64@0.28.0':
|
|
2812
|
+
optional: true
|
|
2813
|
+
|
|
2638
2814
|
'@esbuild/darwin-arm64@0.27.3':
|
|
2639
2815
|
optional: true
|
|
2640
2816
|
|
|
2817
|
+
'@esbuild/darwin-arm64@0.28.0':
|
|
2818
|
+
optional: true
|
|
2819
|
+
|
|
2641
2820
|
'@esbuild/darwin-x64@0.27.3':
|
|
2642
2821
|
optional: true
|
|
2643
2822
|
|
|
2823
|
+
'@esbuild/darwin-x64@0.28.0':
|
|
2824
|
+
optional: true
|
|
2825
|
+
|
|
2644
2826
|
'@esbuild/freebsd-arm64@0.27.3':
|
|
2645
2827
|
optional: true
|
|
2646
2828
|
|
|
2829
|
+
'@esbuild/freebsd-arm64@0.28.0':
|
|
2830
|
+
optional: true
|
|
2831
|
+
|
|
2647
2832
|
'@esbuild/freebsd-x64@0.27.3':
|
|
2648
2833
|
optional: true
|
|
2649
2834
|
|
|
2835
|
+
'@esbuild/freebsd-x64@0.28.0':
|
|
2836
|
+
optional: true
|
|
2837
|
+
|
|
2650
2838
|
'@esbuild/linux-arm64@0.27.3':
|
|
2651
2839
|
optional: true
|
|
2652
2840
|
|
|
2841
|
+
'@esbuild/linux-arm64@0.28.0':
|
|
2842
|
+
optional: true
|
|
2843
|
+
|
|
2653
2844
|
'@esbuild/linux-arm@0.27.3':
|
|
2654
2845
|
optional: true
|
|
2655
2846
|
|
|
2847
|
+
'@esbuild/linux-arm@0.28.0':
|
|
2848
|
+
optional: true
|
|
2849
|
+
|
|
2656
2850
|
'@esbuild/linux-ia32@0.27.3':
|
|
2657
2851
|
optional: true
|
|
2658
2852
|
|
|
2853
|
+
'@esbuild/linux-ia32@0.28.0':
|
|
2854
|
+
optional: true
|
|
2855
|
+
|
|
2659
2856
|
'@esbuild/linux-loong64@0.27.3':
|
|
2660
2857
|
optional: true
|
|
2661
2858
|
|
|
2859
|
+
'@esbuild/linux-loong64@0.28.0':
|
|
2860
|
+
optional: true
|
|
2861
|
+
|
|
2662
2862
|
'@esbuild/linux-mips64el@0.27.3':
|
|
2663
2863
|
optional: true
|
|
2664
2864
|
|
|
2865
|
+
'@esbuild/linux-mips64el@0.28.0':
|
|
2866
|
+
optional: true
|
|
2867
|
+
|
|
2665
2868
|
'@esbuild/linux-ppc64@0.27.3':
|
|
2666
2869
|
optional: true
|
|
2667
2870
|
|
|
2871
|
+
'@esbuild/linux-ppc64@0.28.0':
|
|
2872
|
+
optional: true
|
|
2873
|
+
|
|
2668
2874
|
'@esbuild/linux-riscv64@0.27.3':
|
|
2669
2875
|
optional: true
|
|
2670
2876
|
|
|
2877
|
+
'@esbuild/linux-riscv64@0.28.0':
|
|
2878
|
+
optional: true
|
|
2879
|
+
|
|
2671
2880
|
'@esbuild/linux-s390x@0.27.3':
|
|
2672
2881
|
optional: true
|
|
2673
2882
|
|
|
2883
|
+
'@esbuild/linux-s390x@0.28.0':
|
|
2884
|
+
optional: true
|
|
2885
|
+
|
|
2674
2886
|
'@esbuild/linux-x64@0.27.3':
|
|
2675
2887
|
optional: true
|
|
2676
2888
|
|
|
2889
|
+
'@esbuild/linux-x64@0.28.0':
|
|
2890
|
+
optional: true
|
|
2891
|
+
|
|
2677
2892
|
'@esbuild/netbsd-arm64@0.27.3':
|
|
2678
2893
|
optional: true
|
|
2679
2894
|
|
|
2895
|
+
'@esbuild/netbsd-arm64@0.28.0':
|
|
2896
|
+
optional: true
|
|
2897
|
+
|
|
2680
2898
|
'@esbuild/netbsd-x64@0.27.3':
|
|
2681
2899
|
optional: true
|
|
2682
2900
|
|
|
2901
|
+
'@esbuild/netbsd-x64@0.28.0':
|
|
2902
|
+
optional: true
|
|
2903
|
+
|
|
2683
2904
|
'@esbuild/openbsd-arm64@0.27.3':
|
|
2684
2905
|
optional: true
|
|
2685
2906
|
|
|
2907
|
+
'@esbuild/openbsd-arm64@0.28.0':
|
|
2908
|
+
optional: true
|
|
2909
|
+
|
|
2686
2910
|
'@esbuild/openbsd-x64@0.27.3':
|
|
2687
2911
|
optional: true
|
|
2688
2912
|
|
|
2913
|
+
'@esbuild/openbsd-x64@0.28.0':
|
|
2914
|
+
optional: true
|
|
2915
|
+
|
|
2689
2916
|
'@esbuild/openharmony-arm64@0.27.3':
|
|
2690
2917
|
optional: true
|
|
2691
2918
|
|
|
2919
|
+
'@esbuild/openharmony-arm64@0.28.0':
|
|
2920
|
+
optional: true
|
|
2921
|
+
|
|
2692
2922
|
'@esbuild/sunos-x64@0.27.3':
|
|
2693
2923
|
optional: true
|
|
2694
2924
|
|
|
2925
|
+
'@esbuild/sunos-x64@0.28.0':
|
|
2926
|
+
optional: true
|
|
2927
|
+
|
|
2695
2928
|
'@esbuild/win32-arm64@0.27.3':
|
|
2696
2929
|
optional: true
|
|
2697
2930
|
|
|
2931
|
+
'@esbuild/win32-arm64@0.28.0':
|
|
2932
|
+
optional: true
|
|
2933
|
+
|
|
2698
2934
|
'@esbuild/win32-ia32@0.27.3':
|
|
2699
2935
|
optional: true
|
|
2700
2936
|
|
|
2937
|
+
'@esbuild/win32-ia32@0.28.0':
|
|
2938
|
+
optional: true
|
|
2939
|
+
|
|
2701
2940
|
'@esbuild/win32-x64@0.27.3':
|
|
2702
2941
|
optional: true
|
|
2703
2942
|
|
|
2943
|
+
'@esbuild/win32-x64@0.28.0':
|
|
2944
|
+
optional: true
|
|
2945
|
+
|
|
2704
2946
|
'@img/colour@1.0.0': {}
|
|
2705
2947
|
|
|
2706
2948
|
'@img/sharp-darwin-arm64@0.34.5':
|
|
@@ -3638,6 +3880,35 @@ snapshots:
|
|
|
3638
3880
|
'@esbuild/win32-ia32': 0.27.3
|
|
3639
3881
|
'@esbuild/win32-x64': 0.27.3
|
|
3640
3882
|
|
|
3883
|
+
esbuild@0.28.0:
|
|
3884
|
+
optionalDependencies:
|
|
3885
|
+
'@esbuild/aix-ppc64': 0.28.0
|
|
3886
|
+
'@esbuild/android-arm': 0.28.0
|
|
3887
|
+
'@esbuild/android-arm64': 0.28.0
|
|
3888
|
+
'@esbuild/android-x64': 0.28.0
|
|
3889
|
+
'@esbuild/darwin-arm64': 0.28.0
|
|
3890
|
+
'@esbuild/darwin-x64': 0.28.0
|
|
3891
|
+
'@esbuild/freebsd-arm64': 0.28.0
|
|
3892
|
+
'@esbuild/freebsd-x64': 0.28.0
|
|
3893
|
+
'@esbuild/linux-arm': 0.28.0
|
|
3894
|
+
'@esbuild/linux-arm64': 0.28.0
|
|
3895
|
+
'@esbuild/linux-ia32': 0.28.0
|
|
3896
|
+
'@esbuild/linux-loong64': 0.28.0
|
|
3897
|
+
'@esbuild/linux-mips64el': 0.28.0
|
|
3898
|
+
'@esbuild/linux-ppc64': 0.28.0
|
|
3899
|
+
'@esbuild/linux-riscv64': 0.28.0
|
|
3900
|
+
'@esbuild/linux-s390x': 0.28.0
|
|
3901
|
+
'@esbuild/linux-x64': 0.28.0
|
|
3902
|
+
'@esbuild/netbsd-arm64': 0.28.0
|
|
3903
|
+
'@esbuild/netbsd-x64': 0.28.0
|
|
3904
|
+
'@esbuild/openbsd-arm64': 0.28.0
|
|
3905
|
+
'@esbuild/openbsd-x64': 0.28.0
|
|
3906
|
+
'@esbuild/openharmony-arm64': 0.28.0
|
|
3907
|
+
'@esbuild/sunos-x64': 0.28.0
|
|
3908
|
+
'@esbuild/win32-arm64': 0.28.0
|
|
3909
|
+
'@esbuild/win32-ia32': 0.28.0
|
|
3910
|
+
'@esbuild/win32-x64': 0.28.0
|
|
3911
|
+
|
|
3641
3912
|
escalade@3.2.0: {}
|
|
3642
3913
|
|
|
3643
3914
|
escape-html@1.0.3: {}
|
|
@@ -61,6 +61,7 @@ export async function addPage(req: Request, res: Response) {
|
|
|
61
61
|
const routePath = path.resolve(__dirname, '..', '..', 'routes', 'gardener.route.ts');
|
|
62
62
|
const jsDir = path.join(frontendDir, 'static/pages');
|
|
63
63
|
const jsFilePath = path.join(jsDir, `pages.${name}.js`);
|
|
64
|
+
const bundleDir = path.join(frontendDir, 'bundle')
|
|
64
65
|
|
|
65
66
|
const templateContent = await fsp.readFile(templatePath, 'utf8');
|
|
66
67
|
await fsp.writeFile(viewPath, templateContent, "utf8");
|
|
@@ -71,9 +72,14 @@ export async function addPage(req: Request, res: Response) {
|
|
|
71
72
|
await fsp.appendFile(routePath, routeEntry, "utf8");
|
|
72
73
|
|
|
73
74
|
await fsp.mkdir(jsDir, { recursive: true });
|
|
74
|
-
const jsContent = 'import { gardener, fetchElement, replaceElement, appendElement } from "
|
|
75
|
+
const jsContent = 'import { gardener, fetchElement, replaceElement, appendElement } from "../gardener.js";\n import {log, parser, addEl, State} from "../gardenerDev.js"';
|
|
75
76
|
await fsp.writeFile(jsFilePath, jsContent, "utf8");
|
|
76
77
|
|
|
78
|
+
await fsp.mkdir(bundleDir, { recursive: true });
|
|
79
|
+
const bundleContent = `import '../static/global.js';import '../static/pages/pages.${name}.js'; `
|
|
80
|
+
await fsp.writeFile(path.join(bundleDir, `bundle.${name}.js`), bundleContent, "utf8");
|
|
81
|
+
|
|
82
|
+
|
|
77
83
|
res.json({ success: true });
|
|
78
84
|
} catch (err) {
|
|
79
85
|
const error = err as Error;
|