From 536f9226a84b3cd2a58ca048a63d4839a09631a8 Mon Sep 17 00:00:00 2001 From: Nhan Lam Date: Mon, 29 Apr 2024 21:53:49 +0700 Subject: [PATCH 01/11] Fix builders and defu --- .../tinijs.dev/app/public/images/featured.jpg | Bin 25202 -> 25427 bytes packages/cli/cli/utils/cli.ts | 10 ++++------ packages/parcel-builder/lib/index.ts | 10 +++++----- packages/project/lib/classes/project.ts | 2 +- packages/project/lib/utils/module.ts | 2 +- packages/ui/cli/utils/build.ts | 4 ++-- packages/vite-builder/lib/index.ts | 10 +++++----- packages/webpack-builder/lib/index.ts | 3 ++- 8 files changed, 20 insertions(+), 21 deletions(-) diff --git a/apps/tinijs.dev/app/public/images/featured.jpg b/apps/tinijs.dev/app/public/images/featured.jpg index a30c928facc5dccf9b2e434c5abceace562068bb..0039b130935dcff90be675984ebc7030bccaf438 100644 GIT binary patch literal 25427 zcmb8Xc_39^+dsTb5t&LV;~_GHN<|qDm5LHFMNw!lMVY6ZlvE-~B;=SfWJsjJR0)+5 zNoI;9iOP`B@Lp@}!`=Nn&-=%3eeb>Z8unhF>-t>7T6-Vee_Q{)Blz_7w(Aj0Oa#FM z{}F#Xh)o0+JI8zucCPvJ=P%&m;^q_L=i}w&qbymvNN9zmtn3O&X({>Dnrr11H!4X< zuiv(QqqffGEt}=m8W`#8?$X?}SqDwR#I;}n9}k~6Kfkz+g0zCp|8x2KnBeDN-M~&` zVd5v4`I%Vwnf^W@M3AV=EJ)tj!o)U@nU$S|14f0JU;qaH9c5-^o5#Zbx1CtP0#EX> z@WFHAT#SbW;0lK<8*XzlQ3-+*SLtv@$Nw%g=nAEvewc}sprINER0t|m(D6^9LtOx7 zB&RomsSzN7U3gNL2`A zcL3tR3ZW`Uj|E3$0}84mL=Gb~FAe%+DbP)YE_C36rl8N}BRZW7Hc$+a#ZZAH4Bw4U zG<3%K6Wf>qEjXwQ-Dp@TDsVbl(0Dr+t4Wb03$Ev^p=}K%AR(u!eg$jx$0pJ?TN=GXw<_L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6ASsv-u zRq$LKJn0a2wG3{ri9*b49i`EOG+9Z>;NX|Yl_HR2s;2o^U2D9d>;R)n3lTyWt2}_=xC4U?{5gePAR53^% zfa;g0-v5+hM{|s~M_oTWHm#}~wG}DY1E`pgC_ZOs(IS95^%lfUG)<_3uR4v^Rq8af z;Cw!0bFN=URnB|BGQ{S(MXggZDsz(Lw4mP~z~jJTJ$~T&MJ-HKSNr4I7sySt z8!cqwmv%4Zy$$Ny6XpgKU!QrnT0g!pRHoq9^q@=tb4?8H79|WQG2|;CpF95EY3~Wo zc*5L>#p|;mT4C0WN0XVGCu>D;TLUj9F}+P(d~)OiWM~skAJ!Fj@_M$UUI^~w$E0Pp zE+?E?)Ja7jaVqDO5Xe-9e^h6CR9PNj!8d-s)8aZlPUI%@I$Vu*a*yuy0~`9FZYYef zFrZnnF5=aYtgHj`+F@`$!AT+{xafnrh?jM)xPVrk2+_ zOX&F%g*?!i%dtk;JWJYQk4DI+q;HaEt-vy++L8Al)sojARgMCmz9{e?x!W& zCgN0n_38Z)ce*LF%`?I9%M(paqkirf?Y_36a&k>+s;-A}yszy??-rnz6Fy06iBOP| zGmHcx1#t+XFY%s<^O{}4VQrp~DHuCQjYQ{7Q*L!bG)h0o22)VLC#HRVxis=#DjJph zfu`m-*GJia63P*e5J3c`F^uO*2A!p&wBo5tjhhHzurjj!7SV!XJXQ6q;$6CW`XCxp;!So`0=X6E43-OU}n*eH*{Vko3a3{zIs;>3ntZ=PaJ-@s=p*Eb+&O}DXmES`X zt31=@9ZFBy4ps2Qu7wPujENI~-u#LJ-^P+=w_mQf_;n3Ko{I2w(localOrVendor); + : await loadVendorCLIExpansion(localOrVendor); if (expansionConfig) { (expansionConfig as any).context = { options, @@ -191,7 +191,7 @@ export async function setupCLIExpansion< const commands: SubCommandsDef = !expansionConfig ? {} : await expansionConfig.setup( - defu(expansionConfig.defaults, options), + defu(options, expansionConfig.defaults), tiniProject ); // merge commands @@ -203,10 +203,8 @@ export async function setupCLIExpansion< return expandableCommands; } -export async function loadVendorCLIExpansion< - Options extends Record = {}, ->(packageName: string) { +export async function loadVendorCLIExpansion(packageName: string) { const {default: defaulExport} = await import(`${packageName}/cli-expansion`); if (!defaulExport?.meta || !defaulExport?.setup) return null; - return defaulExport as CLIExpansionConfig; + return defaulExport as CLIExpansionConfig; } diff --git a/packages/parcel-builder/lib/index.ts b/packages/parcel-builder/lib/index.ts index b7362602..167f40d7 100644 --- a/packages/parcel-builder/lib/index.ts +++ b/packages/parcel-builder/lib/index.ts @@ -1,6 +1,7 @@ import {pathExistsSync} from 'fs-extra/esm'; import { TiniProject, + getProjectDirs, type Builder, type CommonBuildOptions, } from '@tinijs/project'; @@ -37,11 +38,10 @@ export class ParcelBuilder implements Builder { } private get commands() { - const {srcDir, compileDir, outDir, compile} = this.tiniProject.config; + const {entryDir, outDir} = getProjectDirs(this.tiniProject.config); const {configPath, devCommand, devHost, devPort, buildCommand, sourcemap} = this.options; - const indexFilePath = - compile === false ? `${srcDir}/index.html` : `${compileDir}/index.html`; + const entryFilePath = `${entryDir}/index.html`; const configArgs = [ '--config', configPath || @@ -57,7 +57,7 @@ export class ParcelBuilder implements Builder { devCommand || [ 'parcel', - indexFilePath, + entryFilePath, ...configArgs, ...outDirArgs, ...hostArgs, @@ -68,7 +68,7 @@ export class ParcelBuilder implements Builder { [ 'parcel', 'build', - indexFilePath, + entryFilePath, ...configArgs, ...outDirArgs, ...sourcemapArgs, diff --git a/packages/project/lib/classes/project.ts b/packages/project/lib/classes/project.ts index 69bd7bfe..780a5b0e 100644 --- a/packages/project/lib/classes/project.ts +++ b/packages/project/lib/classes/project.ts @@ -85,7 +85,7 @@ export async function loadTiniConfig(dir?: string) { )) as { default?: TiniConfig; }; - return defu(defaultConfig, fileConfig); + return defu(fileConfig, defaultConfig); } export async function getTiniProject(dir?: string) { diff --git a/packages/project/lib/utils/module.ts b/packages/project/lib/utils/module.ts index 9816d5ce..ef2de764 100644 --- a/packages/project/lib/utils/module.ts +++ b/packages/project/lib/utils/module.ts @@ -19,7 +19,7 @@ export async function setupModules(tiniProject: TiniProject) { ? localOrVendor : await loadVendorModule(localOrVendor); await moduleConfig?.setup( - defu(moduleConfig.defaults, options), + defu(options, moduleConfig.defaults), tiniProject ); } diff --git a/packages/ui/cli/utils/build.ts b/packages/ui/cli/utils/build.ts index 33e0d7a6..bd0f1271 100644 --- a/packages/ui/cli/utils/build.ts +++ b/packages/ui/cli/utils/build.ts @@ -410,14 +410,14 @@ return initUI({ : '{...availableSkins, ...customConfig.skins}' }, shares: defu( - availableBases, Object.entries(customConfig.shares || {}).reduce( (result, [key, value]) => { result[key] = listify(value); return result; }, {} as Record - ) + ), + availableBases, ), options: customConfig.options, }); diff --git a/packages/vite-builder/lib/index.ts b/packages/vite-builder/lib/index.ts index 9a5ff4c9..f6e9af2e 100644 --- a/packages/vite-builder/lib/index.ts +++ b/packages/vite-builder/lib/index.ts @@ -2,6 +2,7 @@ import {pathExistsSync} from 'fs-extra/esm'; import {relative} from 'pathe'; import { TiniProject, + getProjectDirs, type Builder, type CommonBuildOptions, } from '@tinijs/project'; @@ -39,23 +40,22 @@ export class ViteBuilder implements Builder { } private get commands() { - const {srcDir, compileDir, outDir, compile} = this.tiniProject.config; + const {entryDir, outDir} = getProjectDirs(this.tiniProject.config); const {configPath, devCommand, devHost, devPort, buildCommand} = this.options; - const inputDir = compile === false ? srcDir : compileDir; const configArgs = [ '--config', configPath || this.LOCAL_VITE_CONFIG_FILE || this.DEFAULT_VITE_CONFIG_FILE, ]; - const outDirArgs = ['--outDir', relative(inputDir, outDir)]; + const outDirArgs = ['--outDir', relative(entryDir, outDir)]; const hostArgs = !devHost ? [] : ['--host', devHost]; const portArgs = ['--port', `${devPort || '3000'}`]; return { devCommand: devCommand || - ['vite', inputDir, ...configArgs, ...hostArgs, ...portArgs].filter( + ['vite', entryDir, ...configArgs, ...hostArgs, ...portArgs].filter( Boolean ), buildCommand: @@ -63,7 +63,7 @@ export class ViteBuilder implements Builder { [ 'vite', 'build', - inputDir, + entryDir, ...configArgs, ...outDirArgs, '--emptyOutDir', diff --git a/packages/webpack-builder/lib/index.ts b/packages/webpack-builder/lib/index.ts index 49ceb0a0..d982963b 100644 --- a/packages/webpack-builder/lib/index.ts +++ b/packages/webpack-builder/lib/index.ts @@ -1,6 +1,7 @@ import {pathExistsSync} from 'fs-extra/esm'; import { TiniProject, + getProjectDirs, type Builder, type CommonBuildOptions, } from '@tinijs/project'; @@ -37,7 +38,7 @@ export class WebpackBuilder implements Builder { } private get commands() { - const {outDir} = this.tiniProject.config; + const {outDir} = getProjectDirs(this.tiniProject.config); const {configPath, devCommand, devHost, devPort, buildCommand} = this.options; const configArgs = [ From 3d7ec7c94561c32f6d640247cb3390eb7626ea43 Mon Sep 17 00:00:00 2001 From: Nhan Lam Date: Mon, 29 Apr 2024 22:23:36 +0700 Subject: [PATCH 02/11] Implement server module --- .eslintrc.json | 3 +- .../cli-posts/102 - expansion/index.md | 6 +- apps/tinijs.dev/package.json | 1 + package-lock.json | 2318 +++++++++++++++-- packages/cli/cli/commands/build.ts | 14 +- packages/cli/cli/commands/compile.ts | 25 +- packages/cli/cli/commands/dev.ts | 16 +- packages/cli/cli/commands/docs.ts | 2 +- packages/cli/cli/commands/generate.ts | 6 +- packages/cli/cli/commands/info.ts | 2 +- packages/cli/cli/commands/module-add.ts | 10 +- packages/cli/cli/commands/module.ts | 2 +- packages/cli/cli/commands/new.ts | 10 +- packages/cli/cli/commands/preview.ts | 2 +- packages/cli/cli/commands/watch.ts | 87 + packages/cli/cli/index.ts | 2 + packages/cli/cli/utils/build.ts | 4 +- packages/cli/cli/utils/cli.ts | 2 +- packages/cli/cli/utils/message.ts | 32 +- packages/cli/cli/utils/modify.ts | 23 +- packages/content/cli/commands/content.ts | 2 +- packages/content/cli/expand.ts | 4 +- packages/parcel-builder/lib/index.ts | 27 +- packages/project/lib/classes/project.ts | 6 + packages/project/lib/types/build.ts | 8 + packages/project/lib/types/cli.ts | 1 + packages/pwa/module/index.ts | 6 +- packages/server/assets/.gitignore | 2 + packages/server/assets/api/index.ts | 3 + packages/server/assets/app.ts | 3 + packages/server/assets/nitro.config.ts | 7 + packages/server/assets/routes/[...].ts | 5 + packages/server/assets/routes/index.ts | 5 + packages/server/assets/tsconfig.json | 4 + packages/server/cli/commands/server-build.ts | 30 + packages/server/cli/commands/server-dev.ts | 56 + .../server/cli/commands/server-preview.ts | 25 + packages/server/cli/commands/server.ts | 15 + packages/server/cli/expand.spec.ts | 5 + packages/server/cli/expand.ts | 19 + packages/server/cli/public-api.ts | 1 + packages/server/cli/utils/build.ts | 39 + packages/server/cli/utils/nitro.ts | 25 + packages/server/lib/classes/app.ts | 32 + packages/server/lib/public-api.ts | 2 + packages/server/module/index.ts | 44 + packages/server/module/public-api.ts | 3 + packages/server/module/utils/init.ts | 21 + packages/server/package.json | 18 +- packages/server/tsconfig.json | 5 + packages/ui/cli/commands/ui.ts | 2 +- packages/ui/cli/expand.ts | 4 +- packages/vite-builder/lib/index.ts | 27 +- packages/webpack-builder/lib/index.ts | 26 +- 54 files changed, 2753 insertions(+), 296 deletions(-) create mode 100644 packages/cli/cli/commands/watch.ts create mode 100644 packages/server/assets/.gitignore create mode 100644 packages/server/assets/api/index.ts create mode 100644 packages/server/assets/app.ts create mode 100644 packages/server/assets/nitro.config.ts create mode 100644 packages/server/assets/routes/[...].ts create mode 100644 packages/server/assets/routes/index.ts create mode 100644 packages/server/assets/tsconfig.json create mode 100644 packages/server/cli/commands/server-build.ts create mode 100644 packages/server/cli/commands/server-dev.ts create mode 100644 packages/server/cli/commands/server-preview.ts create mode 100644 packages/server/cli/commands/server.ts create mode 100644 packages/server/cli/expand.spec.ts create mode 100644 packages/server/cli/expand.ts create mode 100644 packages/server/cli/public-api.ts create mode 100644 packages/server/cli/utils/build.ts create mode 100644 packages/server/cli/utils/nitro.ts create mode 100644 packages/server/lib/classes/app.ts create mode 100644 packages/server/module/index.ts create mode 100644 packages/server/module/public-api.ts create mode 100644 packages/server/module/utils/init.ts diff --git a/.eslintrc.json b/.eslintrc.json index 38c0b563..8c46c934 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -7,6 +7,7 @@ }, "ignorePatterns": [ "**/dist", - "**/build" + "**/build", + "**/server/public" ] } diff --git a/apps/tinijs.dev/content/cli-posts/102 - expansion/index.md b/apps/tinijs.dev/content/cli-posts/102 - expansion/index.md index ee601822..e7f1cee2 100644 --- a/apps/tinijs.dev/content/cli-posts/102 - expansion/index.md +++ b/apps/tinijs.dev/content/cli-posts/102 - expansion/index.md @@ -71,11 +71,13 @@ Use can also create an expansion in a exisiting package in 3 steps: ```ts import {defineTiniCLIExpansion, resolveCommand} from '@tinijs/cli'; -export default defineTiniCLIExpansion({ +export type MyCLIExpansionOptions = {}; + +export default defineTiniCLIExpansion({ meta: { name: 'some-name', }, - setup() { + setup(options, tini) { return { xxx: () => import('./commands/xxx.js').then(resolveCommand), }; diff --git a/apps/tinijs.dev/package.json b/apps/tinijs.dev/package.json index 0fec404e..1416ebe5 100644 --- a/apps/tinijs.dev/package.json +++ b/apps/tinijs.dev/package.json @@ -25,6 +25,7 @@ "@tinijs/core": "*", "@tinijs/meta": "*", "@tinijs/router": "*", + "@tinijs/server": "*", "@tinijs/store": "*", "@tinijs/ui-bootstrap": "*", "highlight.js": "^11.9.0", diff --git a/package-lock.json b/package-lock.json index ccdbf50e..240fca93 100644 --- a/package-lock.json +++ b/package-lock.json @@ -46,6 +46,7 @@ "@tinijs/core": "*", "@tinijs/meta": "*", "@tinijs/router": "*", + "@tinijs/server": "*", "@tinijs/store": "*", "@tinijs/ui-bootstrap": "*", "highlight.js": "^11.9.0", @@ -2074,6 +2075,17 @@ "node": ">=6.9.0" } }, + "node_modules/@cloudflare/kv-asset-handler": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@cloudflare/kv-asset-handler/-/kv-asset-handler-0.3.2.tgz", + "integrity": "sha512-EeEjMobfuJrwoctj7FA1y1KEbM0+Q1xSjobIEyie9k4haVEBB7vkDvsasw1pM3rO39mL2akxIAzLMUAtrMHZhA==", + "dependencies": { + "mime": "^3.0.0" + }, + "engines": { + "node": ">=16.13" + } + }, "node_modules/@discoveryjs/json-ext": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", @@ -2483,6 +2495,14 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, + "node_modules/@fastify/busboy": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz", + "integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==", + "engines": { + "node": ">=14" + } + }, "node_modules/@humanwhocodes/config-array": { "version": "0.11.14", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", @@ -2530,11 +2550,15 @@ "resolved": "https://registry.npmjs.org/@iarna/toml/-/toml-2.2.5.tgz", "integrity": "sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg==" }, + "node_modules/@ioredis/commands": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ioredis/commands/-/commands-1.2.0.tgz", + "integrity": "sha512-Sx1pU8EM64o2BrqNpEO1CNLtKQwyhuXuqyfH7oGKCk+1a33d2r5saW8zNwm3j6BTExtjrv2BxTgzzkMwts6vGg==" + }, "node_modules/@isaacs/cliui": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", - "devOptional": true, "dependencies": { "string-width": "^5.1.2", "string-width-cjs": "npm:string-width@^4.2.0", @@ -2551,7 +2575,6 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", - "devOptional": true, "engines": { "node": ">=12" }, @@ -2562,14 +2585,12 @@ "node_modules/@isaacs/cliui/node_modules/emoji-regex": { "version": "9.2.2", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "devOptional": true + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==" }, "node_modules/@isaacs/cliui/node_modules/string-width": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "devOptional": true, "dependencies": { "eastasianwidth": "^0.2.0", "emoji-regex": "^9.2.2", @@ -2586,7 +2607,6 @@ "version": "7.1.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", - "devOptional": true, "dependencies": { "ansi-regex": "^6.0.1" }, @@ -3177,6 +3197,164 @@ "win32" ] }, + "node_modules/@mapbox/node-pre-gyp": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.11.tgz", + "integrity": "sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==", + "dependencies": { + "detect-libc": "^2.0.0", + "https-proxy-agent": "^5.0.0", + "make-dir": "^3.1.0", + "node-fetch": "^2.6.7", + "nopt": "^5.0.0", + "npmlog": "^5.0.1", + "rimraf": "^3.0.2", + "semver": "^7.3.5", + "tar": "^6.1.11" + }, + "bin": { + "node-pre-gyp": "bin/node-pre-gyp" + } + }, + "node_modules/@mapbox/node-pre-gyp/node_modules/abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" + }, + "node_modules/@mapbox/node-pre-gyp/node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/@mapbox/node-pre-gyp/node_modules/are-we-there-yet": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz", + "integrity": "sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==", + "dependencies": { + "delegates": "^1.0.0", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@mapbox/node-pre-gyp/node_modules/gauge": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-3.0.2.tgz", + "integrity": "sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==", + "dependencies": { + "aproba": "^1.0.3 || ^2.0.0", + "color-support": "^1.1.2", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.1", + "object-assign": "^4.1.1", + "signal-exit": "^3.0.0", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wide-align": "^1.1.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@mapbox/node-pre-gyp/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@mapbox/node-pre-gyp/node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/@mapbox/node-pre-gyp/node_modules/make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dependencies": { + "semver": "^6.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@mapbox/node-pre-gyp/node_modules/make-dir/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@mapbox/node-pre-gyp/node_modules/nopt": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", + "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", + "dependencies": { + "abbrev": "1" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@mapbox/node-pre-gyp/node_modules/npmlog": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-5.0.1.tgz", + "integrity": "sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==", + "dependencies": { + "are-we-there-yet": "^2.0.0", + "console-control-strings": "^1.1.0", + "gauge": "^3.0.0", + "set-blocking": "^2.0.0" + } + }, + "node_modules/@mapbox/node-pre-gyp/node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/@mischnic/json-sourcemap": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/@mischnic/json-sourcemap/-/json-sourcemap-0.1.1.tgz", @@ -3262,6 +3440,37 @@ "win32" ] }, + "node_modules/@netlify/functions": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@netlify/functions/-/functions-2.6.0.tgz", + "integrity": "sha512-vU20tij0fb4nRGACqb+5SQvKd50JYyTyEhQetCMHdakcJFzjLDivvRR16u1G2Oy4A7xNAtGJF1uz8reeOtTVcQ==", + "dependencies": { + "@netlify/serverless-functions-api": "1.14.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@netlify/node-cookies": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@netlify/node-cookies/-/node-cookies-0.1.0.tgz", + "integrity": "sha512-OAs1xG+FfLX0LoRASpqzVntVV/RpYkgpI0VrUnw2u0Q1qiZUzcPffxRK8HF3gc4GjuhG5ahOEMJ9bswBiZPq0g==", + "engines": { + "node": "^14.16.0 || >=16.0.0" + } + }, + "node_modules/@netlify/serverless-functions-api": { + "version": "1.14.0", + "resolved": "https://registry.npmjs.org/@netlify/serverless-functions-api/-/serverless-functions-api-1.14.0.tgz", + "integrity": "sha512-HUNETLNvNiC2J+SB/YuRwJA9+agPrc0azSoWVk8H85GC+YE114hcS5JW+dstpKwVerp2xILE3vNWN7IMXP5Q5Q==", + "dependencies": { + "@netlify/node-cookies": "^0.1.0", + "urlpattern-polyfill": "8.0.2" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + } + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -5732,6 +5941,31 @@ "url": "https://opencollective.com/parcel" } }, + "node_modules/@parcel/watcher-wasm": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-wasm/-/watcher-wasm-2.4.1.tgz", + "integrity": "sha512-/ZR0RxqxU/xxDGzbzosMjh4W6NdYFMqq2nvo2b8SLi7rsl/4jkL8S5stIikorNkdR50oVDvqb/3JT05WM+CRRA==", + "bundleDependencies": [ + "napi-wasm" + ], + "dependencies": { + "is-glob": "^4.0.3", + "micromatch": "^4.0.5", + "napi-wasm": "^1.1.0" + }, + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-wasm/node_modules/napi-wasm": { + "version": "1.1.0", + "inBundle": true, + "license": "MIT" + }, "node_modules/@parcel/watcher-win32-arm64": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-arm64/-/watcher-win32-arm64-2.4.1.tgz", @@ -5882,7 +6116,6 @@ "version": "0.11.0", "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", - "dev": true, "optional": true, "engines": { "node": ">=14" @@ -5937,23 +6170,18 @@ "node": ">=12" } }, - "node_modules/@rollup/plugin-node-resolve": { - "version": "15.2.3", - "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.2.3.tgz", - "integrity": "sha512-j/lym8nf5E21LwBT4Df1VD6hRO2L2iwUeUmP7litikRsVp1H6NWx20NEp0Y7su+7XGc476GnXXc4kFeZNGmaSQ==", + "node_modules/@rollup/plugin-alias": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-alias/-/plugin-alias-5.1.0.tgz", + "integrity": "sha512-lpA3RZ9PdIG7qqhEfv79tBffNaoDuukFDrmhLqg9ifv99u/ehn+lOg30x2zmhf8AQqQUZaMk/B9fZraQ6/acDQ==", "dependencies": { - "@rollup/pluginutils": "^5.0.1", - "@types/resolve": "1.20.2", - "deepmerge": "^4.2.2", - "is-builtin-module": "^3.2.1", - "is-module": "^1.0.0", - "resolve": "^1.22.1" + "slash": "^4.0.0" }, "engines": { "node": ">=14.0.0" }, "peerDependencies": { - "rollup": "^2.78.0||^3.0.0||^4.0.0" + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" }, "peerDependenciesMeta": { "rollup": { @@ -5961,89 +6189,255 @@ } } }, - "node_modules/@rollup/plugin-terser": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/@rollup/plugin-terser/-/plugin-terser-0.4.4.tgz", - "integrity": "sha512-XHeJC5Bgvs8LfukDwWZp7yeqin6ns8RTl2B9avbejt6tZqsqvVoWI7ZTQrcNsfKEDWBTnTxM8nMDkO2IFFbd0A==", - "dependencies": { - "serialize-javascript": "^6.0.1", - "smob": "^1.0.0", - "terser": "^5.17.4" - }, + "node_modules/@rollup/plugin-alias/node_modules/slash": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz", + "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==", "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "rollup": "^2.0.0||^3.0.0||^4.0.0" + "node": ">=12" }, - "peerDependenciesMeta": { - "rollup": { - "optional": true - } + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@rollup/plugin-typescript": { - "version": "11.1.6", - "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-11.1.6.tgz", - "integrity": "sha512-R92yOmIACgYdJ7dJ97p4K69I8gg6IEHt8M7dUBxN3W6nrO8uUxX5ixl0yU/N3aZTi8WhPuICvOHXQvF6FaykAA==", + "node_modules/@rollup/plugin-commonjs": { + "version": "25.0.7", + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-25.0.7.tgz", + "integrity": "sha512-nEvcR+LRjEjsaSsc4x3XZfCCvZIaSMenZu/OiwOKGN2UhQpAYI7ru7czFvyWbErlpoGjnSX3D5Ch5FcMA3kRWQ==", "dependencies": { - "@rollup/pluginutils": "^5.1.0", - "resolve": "^1.22.1" + "@rollup/pluginutils": "^5.0.1", + "commondir": "^1.0.1", + "estree-walker": "^2.0.2", + "glob": "^8.0.3", + "is-reference": "1.2.1", + "magic-string": "^0.30.3" }, "engines": { "node": ">=14.0.0" }, "peerDependencies": { - "rollup": "^2.14.0||^3.0.0||^4.0.0", - "tslib": "*", - "typescript": ">=3.7.0" + "rollup": "^2.68.0||^3.0.0||^4.0.0" }, "peerDependenciesMeta": { "rollup": { "optional": true - }, - "tslib": { - "optional": true } } }, - "node_modules/@rollup/pluginutils": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.1.0.tgz", - "integrity": "sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==", + "node_modules/@rollup/plugin-commonjs/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dependencies": { - "@types/estree": "^1.0.0", - "estree-walker": "^2.0.2", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" - }, - "peerDependenciesMeta": { - "rollup": { - "optional": true - } + "balanced-match": "^1.0.0" } }, - "node_modules/@rollup/pluginutils/node_modules/estree-walker": { + "node_modules/@rollup/plugin-commonjs/node_modules/estree-walker": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==" }, - "node_modules/@rollup/pluginutils/node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, + "node_modules/@rollup/plugin-commonjs/node_modules/glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@rollup/plugin-commonjs/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@rollup/plugin-inject": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/@rollup/plugin-inject/-/plugin-inject-5.0.5.tgz", + "integrity": "sha512-2+DEJbNBoPROPkgTDNe8/1YXWcqxbN5DTjASVIOx8HS+pITXushyNiBV56RB08zuptzz8gT3YfkqriTBVycepg==", + "dependencies": { + "@rollup/pluginutils": "^5.0.1", + "estree-walker": "^2.0.2", + "magic-string": "^0.30.3" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/plugin-inject/node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==" + }, + "node_modules/@rollup/plugin-json": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-json/-/plugin-json-6.1.0.tgz", + "integrity": "sha512-EGI2te5ENk1coGeADSIwZ7G2Q8CJS2sF120T7jLw4xFw9n7wIOXHo+kIYRAoVpJAN+kmqZSoO3Fp4JtoNF4ReA==", + "dependencies": { + "@rollup/pluginutils": "^5.1.0" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/plugin-node-resolve": { + "version": "15.2.3", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.2.3.tgz", + "integrity": "sha512-j/lym8nf5E21LwBT4Df1VD6hRO2L2iwUeUmP7litikRsVp1H6NWx20NEp0Y7su+7XGc476GnXXc4kFeZNGmaSQ==", + "dependencies": { + "@rollup/pluginutils": "^5.0.1", + "@types/resolve": "1.20.2", + "deepmerge": "^4.2.2", + "is-builtin-module": "^3.2.1", + "is-module": "^1.0.0", + "resolve": "^1.22.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^2.78.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/plugin-replace": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/@rollup/plugin-replace/-/plugin-replace-5.0.5.tgz", + "integrity": "sha512-rYO4fOi8lMaTg/z5Jb+hKnrHHVn8j2lwkqwyS4kTRhKyWOLf2wST2sWXr4WzWiTcoHTp2sTjqUbqIj2E39slKQ==", + "dependencies": { + "@rollup/pluginutils": "^5.0.1", + "magic-string": "^0.30.3" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/plugin-terser": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/@rollup/plugin-terser/-/plugin-terser-0.4.4.tgz", + "integrity": "sha512-XHeJC5Bgvs8LfukDwWZp7yeqin6ns8RTl2B9avbejt6tZqsqvVoWI7ZTQrcNsfKEDWBTnTxM8nMDkO2IFFbd0A==", + "dependencies": { + "serialize-javascript": "^6.0.1", + "smob": "^1.0.0", + "terser": "^5.17.4" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^2.0.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/plugin-typescript": { + "version": "11.1.6", + "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-11.1.6.tgz", + "integrity": "sha512-R92yOmIACgYdJ7dJ97p4K69I8gg6IEHt8M7dUBxN3W6nrO8uUxX5ixl0yU/N3aZTi8WhPuICvOHXQvF6FaykAA==", + "dependencies": { + "@rollup/pluginutils": "^5.1.0", + "resolve": "^1.22.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^2.14.0||^3.0.0||^4.0.0", + "tslib": "*", + "typescript": ">=3.7.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + }, + "tslib": { + "optional": true + } + } + }, + "node_modules/@rollup/pluginutils": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.1.0.tgz", + "integrity": "sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==", + "dependencies": { + "@types/estree": "^1.0.0", + "estree-walker": "^2.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/pluginutils/node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==" + }, + "node_modules/@rollup/pluginutils/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/@rollup/rollup-android-arm-eabi": { "version": "4.14.1", "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.14.1.tgz", @@ -7446,6 +7840,86 @@ "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", "dev": true }, + "node_modules/@vercel/nft": { + "version": "0.26.4", + "resolved": "https://registry.npmjs.org/@vercel/nft/-/nft-0.26.4.tgz", + "integrity": "sha512-j4jCOOXke2t8cHZCIxu1dzKLHLcFmYzC3yqAK6MfZznOL1QIJKd0xcFsXK3zcqzU7ScsE2zWkiMMNHGMHgp+FA==", + "dependencies": { + "@mapbox/node-pre-gyp": "^1.0.5", + "@rollup/pluginutils": "^4.0.0", + "acorn": "^8.6.0", + "acorn-import-attributes": "^1.9.2", + "async-sema": "^3.1.1", + "bindings": "^1.4.0", + "estree-walker": "2.0.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.2", + "node-gyp-build": "^4.2.2", + "resolve-from": "^5.0.0" + }, + "bin": { + "nft": "out/cli.js" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/@vercel/nft/node_modules/@rollup/pluginutils": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.2.1.tgz", + "integrity": "sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==", + "dependencies": { + "estree-walker": "^2.0.1", + "picomatch": "^2.2.2" + }, + "engines": { + "node": ">= 8.0.0" + } + }, + "node_modules/@vercel/nft/node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==" + }, + "node_modules/@vercel/nft/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@vercel/nft/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/@vercel/nft/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "engines": { + "node": ">=8" + } + }, "node_modules/@vitest/expect": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-1.4.0.tgz", @@ -7797,6 +8271,17 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, + "node_modules/abort-controller": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", + "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", + "dependencies": { + "event-target-shim": "^5.0.0" + }, + "engines": { + "node": ">=6.5" + } + }, "node_modules/abortcontroller-polyfill": { "version": "1.7.5", "resolved": "https://registry.npmjs.org/abortcontroller-polyfill/-/abortcontroller-polyfill-1.7.5.tgz", @@ -7833,6 +8318,14 @@ "acorn": "^8" } }, + "node_modules/acorn-import-attributes": { + "version": "1.9.5", + "resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz", + "integrity": "sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==", + "peerDependencies": { + "acorn": "^8" + } + }, "node_modules/acorn-jsx": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", @@ -7972,7 +8465,6 @@ "version": "4.1.3", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", - "dev": true, "engines": { "node": ">=6" } @@ -8072,22 +8564,152 @@ "node": ">= 8" } }, - "node_modules/anymatch/node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "engines": { - "node": ">=8.6" + "node_modules/anymatch/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/aproba": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", + "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==" + }, + "node_modules/archiver": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/archiver/-/archiver-7.0.1.tgz", + "integrity": "sha512-ZcbTaIqJOfCc03QwD468Unz/5Ir8ATtvAHsK+FdXbDIbGfihqh9mrvdcYunQzqn4HrvWWaFyaxJhGZagaJJpPQ==", + "dependencies": { + "archiver-utils": "^5.0.2", + "async": "^3.2.4", + "buffer-crc32": "^1.0.0", + "readable-stream": "^4.0.0", + "readdir-glob": "^1.1.2", + "tar-stream": "^3.0.0", + "zip-stream": "^6.0.1" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/archiver-utils": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/archiver-utils/-/archiver-utils-5.0.2.tgz", + "integrity": "sha512-wuLJMmIBQYCsGZgYLTy5FIB2pF6Lfb6cXMSF8Qywwk3t20zWnAi7zLcQFdKQmIB8wyZpY5ER38x08GbwtR2cLA==", + "dependencies": { + "glob": "^10.0.0", + "graceful-fs": "^4.2.0", + "is-stream": "^2.0.1", + "lazystream": "^1.0.0", + "lodash": "^4.17.15", + "normalize-path": "^3.0.0", + "readable-stream": "^4.0.0" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/archiver-utils/node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/archiver-utils/node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/archiver-utils/node_modules/readable-stream": { + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.5.2.tgz", + "integrity": "sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g==", + "dependencies": { + "abort-controller": "^3.0.0", + "buffer": "^6.0.3", + "events": "^3.3.0", + "process": "^0.11.10", + "string_decoder": "^1.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/archiver/node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/archiver/node_modules/readable-stream": { + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.5.2.tgz", + "integrity": "sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g==", + "dependencies": { + "abort-controller": "^3.0.0", + "buffer": "^6.0.3", + "events": "^3.3.0", + "process": "^0.11.10", + "string_decoder": "^1.3.0" }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "node_modules/aproba": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", - "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==", - "dev": true + "node_modules/archiver/node_modules/tar-stream": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.7.tgz", + "integrity": "sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==", + "dependencies": { + "b4a": "^1.6.4", + "fast-fifo": "^1.2.0", + "streamx": "^2.15.0" + } }, "node_modules/are-we-there-yet": { "version": "3.0.1", @@ -8229,6 +8851,11 @@ "resolved": "https://registry.npmjs.org/async/-/async-3.2.5.tgz", "integrity": "sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==" }, + "node_modules/async-sema": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/async-sema/-/async-sema-3.1.1.tgz", + "integrity": "sha512-tLRNUXati5MFePdAk8dw7Qt7DpxPB60ofAgn8WRhW6a2rcimZnYBP9oxHiv0OHy+Wz7kPMG+t4LGdt31+4EmGg==" + }, "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -8469,6 +9096,14 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "dependencies": { + "file-uri-to-path": "1.0.0" + } + }, "node_modules/bl": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", @@ -8681,6 +9316,14 @@ "ieee754": "^1.1.13" } }, + "node_modules/buffer-crc32": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-1.0.0.tgz", + "integrity": "sha512-Db1SbgBS/fg/392AblrMJk97KggmvYhr4pB5ZIMTWtaivCPMWLkmb7m21cJvpvgK+J3nsU2CmmixNBZx4vFj/w==", + "engines": { + "node": ">=8.0.0" + } + }, "node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", @@ -8737,6 +9380,36 @@ "node": ">= 0.8" } }, + "node_modules/c12": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/c12/-/c12-1.10.0.tgz", + "integrity": "sha512-0SsG7UDhoRWcuSvKWHaXmu5uNjDCDN3nkQLRL4Q42IlFy+ze58FcCoI3uPwINXinkz7ZinbhEgyzYFw9u9ZV8g==", + "dependencies": { + "chokidar": "^3.6.0", + "confbox": "^0.1.3", + "defu": "^6.1.4", + "dotenv": "^16.4.5", + "giget": "^1.2.1", + "jiti": "^1.21.0", + "mlly": "^1.6.1", + "ohash": "^1.1.3", + "pathe": "^1.1.2", + "perfect-debounce": "^1.0.0", + "pkg-types": "^1.0.3", + "rc9": "^2.1.1" + } + }, + "node_modules/c12/node_modules/dotenv": { + "version": "16.4.5", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", + "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, "node_modules/cac": { "version": "6.7.14", "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", @@ -9008,7 +9681,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", - "devOptional": true, "engines": { "node": ">=10" } @@ -9113,6 +9785,22 @@ "node": ">= 10" } }, + "node_modules/clipboardy": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/clipboardy/-/clipboardy-4.0.0.tgz", + "integrity": "sha512-5mOlNS0mhX0707P2I0aZ2V/cmHUEO/fL7VFLqszkhUsxt7RwnmrInf/eEQKlf5GzvYeHIjT+Ov1HRfNmymlG0w==", + "dependencies": { + "execa": "^8.0.1", + "is-wsl": "^3.1.0", + "is64bit": "^2.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/cliui": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", @@ -9175,6 +9863,14 @@ "node": ">=0.10.0" } }, + "node_modules/cluster-key-slot": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/cluster-key-slot/-/cluster-key-slot-1.1.2.tgz", + "integrity": "sha512-RMr0FhtfXemyinomL4hrWcYJxmX6deFdCxpJzhDttxgO1+bcCnkk+9drydLVDmAMG7NE6aN/fl4F7ucU/90gAA==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/cmd-shim": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/cmd-shim/-/cmd-shim-6.0.1.tgz", @@ -9225,7 +9921,6 @@ "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", - "dev": true, "bin": { "color-support": "bin.js" } @@ -9272,6 +9967,11 @@ "node": ">=4.0.0" } }, + "node_modules/commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==" + }, "node_modules/compare-func": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/compare-func/-/compare-func-2.0.0.tgz", @@ -9282,6 +9982,70 @@ "dot-prop": "^5.1.0" } }, + "node_modules/compress-commons": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/compress-commons/-/compress-commons-6.0.2.tgz", + "integrity": "sha512-6FqVXeETqWPoGcfzrXb37E50NP0LXT8kAMu5ooZayhWWdgEY4lBEEcbQNXtkuKQsGduxiIcI4gOTsxTmuq/bSg==", + "dependencies": { + "crc-32": "^1.2.0", + "crc32-stream": "^6.0.0", + "is-stream": "^2.0.1", + "normalize-path": "^3.0.0", + "readable-stream": "^4.0.0" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/compress-commons/node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/compress-commons/node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/compress-commons/node_modules/readable-stream": { + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.5.2.tgz", + "integrity": "sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g==", + "dependencies": { + "abort-controller": "^3.0.0", + "buffer": "^6.0.3", + "events": "^3.3.0", + "process": "^0.11.10", + "string_decoder": "^1.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, "node_modules/compressible": { "version": "2.0.18", "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", @@ -9388,6 +10152,11 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, + "node_modules/confbox": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.1.7.tgz", + "integrity": "sha512-uJcB/FKZtBMCJpK8MQji6bJHgu1tixKPxRLeGkNzBoOZzpnZUJm0jm2/sBDWcuBx1dYgxV4JU+g5hmNxCyAmdA==" + }, "node_modules/config-chain": { "version": "1.1.13", "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz", @@ -9528,8 +10297,7 @@ "node_modules/console-control-strings": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==", - "dev": true + "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==" }, "node_modules/constantinople": { "version": "4.0.1", @@ -10213,6 +10981,11 @@ "node": ">= 0.6" } }, + "node_modules/cookie-es": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/cookie-es/-/cookie-es-1.1.0.tgz", + "integrity": "sha512-L2rLOcK0wzWSfSDA33YR+PUHDG10a8px7rUHKWbGLP4YfbsMed2KFUw5fczvDPbT98DDe3LEzviswl810apTEw==" + }, "node_modules/cookie-signature": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", @@ -10373,6 +11146,75 @@ } } }, + "node_modules/crc-32": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz", + "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==", + "bin": { + "crc32": "bin/crc32.njs" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/crc32-stream": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/crc32-stream/-/crc32-stream-6.0.0.tgz", + "integrity": "sha512-piICUB6ei4IlTv1+653yq5+KoqfBYmj9bw6LqXoOneTMDXk5nM1qt12mFW1caG3LlJXEKW1Bp0WggEmIfQB34g==", + "dependencies": { + "crc-32": "^1.2.0", + "readable-stream": "^4.0.0" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/crc32-stream/node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/crc32-stream/node_modules/readable-stream": { + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.5.2.tgz", + "integrity": "sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g==", + "dependencies": { + "abort-controller": "^3.0.0", + "buffer": "^6.0.3", + "events": "^3.3.0", + "process": "^0.11.10", + "string_decoder": "^1.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/croner": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/croner/-/croner-8.0.2.tgz", + "integrity": "sha512-HgSdlSUX8mIgDTTiQpWUP4qY4IFRMsduPCYdca34Pelt8MVdxdaDOzreFtCscA6R+cRZd7UbD1CD3uyx6J3X1A==", + "engines": { + "node": ">=18.0" + } + }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -10386,6 +11228,19 @@ "node": ">= 8" } }, + "node_modules/crossws": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/crossws/-/crossws-0.2.4.tgz", + "integrity": "sha512-DAxroI2uSOgUKLz00NX6A8U/8EE3SZHmIND+10jkVSaypvyt57J5JEOxAQOL6lQxyzi/wZbTIwssU1uy69h5Vg==", + "peerDependencies": { + "uWebSockets.js": "*" + }, + "peerDependenciesMeta": { + "uWebSockets.js": { + "optional": true + } + } + }, "node_modules/crypto-random-string": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", @@ -10656,6 +11511,27 @@ "node": "*" } }, + "node_modules/db0": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/db0/-/db0-0.1.4.tgz", + "integrity": "sha512-Ft6eCwONYxlwLjBXSJxw0t0RYtA5gW9mq8JfBXn9TtC0nDPlqePAhpv9v4g9aONBi6JI1OXHTKKkUYGd+BOrCA==", + "peerDependencies": { + "@libsql/client": "^0.5.2", + "better-sqlite3": "^9.4.3", + "drizzle-orm": "^0.29.4" + }, + "peerDependenciesMeta": { + "@libsql/client": { + "optional": true + }, + "better-sqlite3": { + "optional": true + }, + "drizzle-orm": { + "optional": true + } + } + }, "node_modules/debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -10917,8 +11793,15 @@ "node_modules/delegates": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==", - "dev": true + "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==" + }, + "node_modules/denque": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz", + "integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==", + "engines": { + "node": ">=0.10" + } }, "node_modules/depd": { "version": "2.0.0", @@ -11160,8 +12043,7 @@ "node_modules/eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", - "devOptional": true + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==" }, "node_modules/ee-first": { "version": "1.1.1", @@ -11800,7 +12682,6 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", - "dev": true, "dependencies": { "@types/estree": "^1.0.0" } @@ -11832,6 +12713,14 @@ "node": ">= 0.6" } }, + "node_modules/event-target-shim": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", + "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", + "engines": { + "node": ">=6" + } + }, "node_modules/eventemitter3": { "version": "4.0.7", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", @@ -12174,6 +13063,11 @@ "node": "^10.12.0 || >=12.0.0" } }, + "node_modules/file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" + }, "node_modules/filelist": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", @@ -12348,7 +13242,6 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", - "devOptional": true, "dependencies": { "cross-spawn": "^7.0.0", "signal-exit": "^4.0.1" @@ -12364,7 +13257,6 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "devOptional": true, "engines": { "node": ">=14" }, @@ -12650,6 +13542,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/get-port-please": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/get-port-please/-/get-port-please-3.1.2.tgz", + "integrity": "sha512-Gxc29eLs1fbn6LQ4jSU4vXjlwyZhF5HsGuMAa7gqBP4Rw4yxxltyDUuF5MBclFzDTXO+ACchGQoeela4DSfzdQ==" + }, "node_modules/get-stream": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", @@ -12685,8 +13582,83 @@ "dependencies": { "resolve-pkg-maps": "^1.0.0" }, - "funding": { - "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + "funding": { + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + } + }, + "node_modules/giget": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/giget/-/giget-1.2.3.tgz", + "integrity": "sha512-8EHPljDvs7qKykr6uw8b+lqLiUc/vUg+KVTI0uND4s63TdsZM2Xus3mflvF0DDG9SiM4RlCkFGL+7aAjRmV7KA==", + "dependencies": { + "citty": "^0.1.6", + "consola": "^3.2.3", + "defu": "^6.1.4", + "node-fetch-native": "^1.6.3", + "nypm": "^0.3.8", + "ohash": "^1.1.3", + "pathe": "^1.1.2", + "tar": "^6.2.0" + }, + "bin": { + "giget": "dist/cli.mjs" + } + }, + "node_modules/giget/node_modules/fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/giget/node_modules/fs-minipass/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/giget/node_modules/minipass": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", + "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/giget/node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/giget/node_modules/tar": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz", + "integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==", + "dependencies": { + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^5.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" } }, "node_modules/git-raw-commits": { @@ -13131,7 +14103,6 @@ "version": "10.3.12", "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.12.tgz", "integrity": "sha512-TCNv8vJ+xz4QiqTpfOJA7HvYv+tNIRHKfUWw/q+v2jdgN4ebz+KY9tGx5J4rHP0o84mNP+ApH66HRX8us3Khqg==", - "devOptional": true, "dependencies": { "foreground-child": "^3.1.0", "jackspeak": "^2.3.6", @@ -13184,7 +14155,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "devOptional": true, "dependencies": { "balanced-match": "^1.0.0" } @@ -13193,7 +14163,6 @@ "version": "9.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", - "devOptional": true, "dependencies": { "brace-expansion": "^2.0.1" }, @@ -13507,6 +14476,42 @@ } } }, + "node_modules/gzip-size": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-7.0.0.tgz", + "integrity": "sha512-O1Ld7Dr+nqPnmGpdhzLmMTQ4vAsD+rHwMm1NLUmoUFFymBOMKxCCrtDxqdBRYXdeEPEi3SyoR4TizJLQrnKBNA==", + "dependencies": { + "duplexer": "^0.1.2" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/gzip-size/node_modules/duplexer": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", + "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==" + }, + "node_modules/h3": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/h3/-/h3-1.11.1.tgz", + "integrity": "sha512-AbaH6IDnZN6nmbnJOH72y3c5Wwh9P97soSVdGSBbcDACRdkC0FEWf25pzx4f/NuOCK6quHmW18yF2Wx+G4Zi1A==", + "dependencies": { + "cookie-es": "^1.0.0", + "crossws": "^0.2.2", + "defu": "^6.1.4", + "destr": "^2.0.3", + "iron-webcrypto": "^1.0.0", + "ohash": "^1.1.3", + "radix3": "^1.1.0", + "ufo": "^1.4.0", + "uncrypto": "^0.1.3", + "unenv": "^1.9.0" + } + }, "node_modules/hamljs": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/hamljs/-/hamljs-0.6.2.tgz", @@ -13612,8 +14617,7 @@ "node_modules/has-unicode": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==", - "dev": true + "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==" }, "node_modules/has-yarn": { "version": "2.1.0", @@ -14043,6 +15047,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/http-shutdown": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/http-shutdown/-/http-shutdown-1.2.2.tgz", + "integrity": "sha512-S9wWkJ/VSY9/k4qcjG318bqJNruzE4HySUhFYknwmu6LBP97KLLfwNf+n4V1BHurvFNkSKLFnK/RsuUnRTf9Vw==", + "engines": { + "iojs": ">= 1.0.0", + "node": ">= 0.12.0" + } + }, "node_modules/https-proxy-agent": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz", @@ -14055,6 +15068,11 @@ "node": ">= 14" } }, + "node_modules/httpxy": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/httpxy/-/httpxy-0.1.5.tgz", + "integrity": "sha512-hqLDO+rfststuyEUTWObQK6zHEEmZ/kaIP2/zclGGZn6X8h/ESTWg+WKecQ/e5k4nPswjzZD+q2VqZIbr15CoQ==" + }, "node_modules/human-signals": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", @@ -14387,6 +15405,29 @@ "node": ">=10.13.0" } }, + "node_modules/ioredis": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/ioredis/-/ioredis-5.4.1.tgz", + "integrity": "sha512-2YZsvl7jopIa1gaePkeMtd9rAcSjOOjPtpcLlOeusyO+XH2SK5ZcT+UCrElPP+WVIInh2TzeI4XW9ENaSLVVHA==", + "dependencies": { + "@ioredis/commands": "^1.1.1", + "cluster-key-slot": "^1.1.0", + "debug": "^4.3.4", + "denque": "^2.1.0", + "lodash.defaults": "^4.2.0", + "lodash.isarguments": "^3.1.0", + "redis-errors": "^1.2.0", + "redis-parser": "^3.0.0", + "standard-as-callback": "^2.1.0" + }, + "engines": { + "node": ">=12.22.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/ioredis" + } + }, "node_modules/ip-address": { "version": "9.0.5", "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", @@ -14408,6 +15449,14 @@ "node": ">= 10" } }, + "node_modules/iron-webcrypto": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/iron-webcrypto/-/iron-webcrypto-1.1.1.tgz", + "integrity": "sha512-5xGwQUWHQSy039rFr+5q/zOmj7GP0Ypzvo34Ep+61bPIhaLduEDp/PvLGlU3awD2mzWUR0weN2vJ1mILydFPEg==", + "funding": { + "url": "https://github.com/sponsors/brc-dd" + } + }, "node_modules/is-alphabetical": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.4.tgz", @@ -14781,11 +15830,27 @@ "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==" }, + "node_modules/is-primitive": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-3.0.1.tgz", + "integrity": "sha512-GljRxhWvlCNRfZyORiH77FwdFwGcMO620o37EOYC0ORWdq+WYNVqW0w2Juzew4M+L81l6/QS3t5gkkihyRqv9w==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/is-promise": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==" }, + "node_modules/is-reference": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz", + "integrity": "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==", + "dependencies": { + "@types/estree": "*" + } + }, "node_modules/is-regex": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", @@ -14949,6 +16014,20 @@ "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz", "integrity": "sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw==" }, + "node_modules/is64bit": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is64bit/-/is64bit-2.0.0.tgz", + "integrity": "sha512-jv+8jaWCl0g2lSBkNSVXdzfBA0npK1HGC2KtWM9FumFRoGS94g3NbCCLVnCYHLjp4GrW2KZeeSTMo5ddtznmGw==", + "dependencies": { + "system-architecture": "^0.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/isarray": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", @@ -15001,7 +16080,6 @@ "version": "2.3.6", "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz", "integrity": "sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==", - "devOptional": true, "dependencies": { "@isaacs/cliui": "^8.0.2" }, @@ -15269,8 +16347,7 @@ "node_modules/jsonc-parser": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", - "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==", - "dev": true + "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==" }, "node_modules/jsonfile": { "version": "6.1.0", @@ -15357,6 +16434,14 @@ "node": ">=6" } }, + "node_modules/klona": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/klona/-/klona-2.0.6.tgz", + "integrity": "sha512-dhG34DXATL5hSxJbIexCft8FChFXtmskoZYnoPWjXQuebWYCNkVeV3KkGegCK9CP1oswI/vQibS2GY7Em/sJJA==", + "engines": { + "node": ">= 8" + } + }, "node_modules/knitwork": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/knitwork/-/knitwork-1.1.0.tgz", @@ -15371,6 +16456,49 @@ "shell-quote": "^1.8.1" } }, + "node_modules/lazystream": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.1.tgz", + "integrity": "sha512-b94GiNHQNy6JNTrt5w6zNyffMrNkXZb3KTkCZJb2V1xaEGCk093vkZ2jk3tpaeP33/OiXC+WvK9AxUebnf5nbw==", + "dependencies": { + "readable-stream": "^2.0.5" + }, + "engines": { + "node": ">= 0.6.3" + } + }, + "node_modules/lazystream/node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" + }, + "node_modules/lazystream/node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/lazystream/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "node_modules/lazystream/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, "node_modules/lerna": { "version": "8.1.2", "resolved": "https://registry.npmjs.org/lerna/-/lerna-8.1.2.tgz", @@ -16143,6 +17271,35 @@ "resolved": "https://registry.npmjs.org/list-to-array/-/list-to-array-1.1.0.tgz", "integrity": "sha512-+dAZZ2mM+/m+vY9ezfoueVvrgnHIGi5FvgSymbIgJOFwiznWyA59mav95L+Mc6xPtL3s9gm5eNTlNtxJLbNM1g==" }, + "node_modules/listhen": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/listhen/-/listhen-1.7.2.tgz", + "integrity": "sha512-7/HamOm5YD9Wb7CFgAZkKgVPA96WwhcTQoqtm2VTZGVbVVn3IWKRBTgrU7cchA3Q8k9iCsG8Osoi9GX4JsGM9g==", + "dependencies": { + "@parcel/watcher": "^2.4.1", + "@parcel/watcher-wasm": "^2.4.1", + "citty": "^0.1.6", + "clipboardy": "^4.0.0", + "consola": "^3.2.3", + "crossws": "^0.2.0", + "defu": "^6.1.4", + "get-port-please": "^3.1.2", + "h3": "^1.10.2", + "http-shutdown": "^1.2.2", + "jiti": "^1.21.0", + "mlly": "^1.6.1", + "node-forge": "^1.3.1", + "pathe": "^1.1.2", + "std-env": "^3.7.0", + "ufo": "^1.4.0", + "untun": "^0.1.3", + "uqr": "^0.1.2" + }, + "bin": { + "listen": "bin/listhen.mjs", + "listhen": "bin/listhen.mjs" + } + }, "node_modules/lit": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/lit/-/lit-3.1.2.tgz", @@ -16231,7 +17388,6 @@ "version": "0.5.0", "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-0.5.0.tgz", "integrity": "sha512-ok6z3qlYyCDS4ZEU27HaU6x/xZa9Whf8jD4ptH5UZTQYZVYeb9bnZ3ojVhiJNLiXK1Hfc0GNbLXcmZ5plLDDBg==", - "dev": true, "dependencies": { "mlly": "^1.4.2", "pkg-types": "^1.0.3" @@ -16286,6 +17442,16 @@ "resolved": "https://registry.npmjs.org/lodash.deburr/-/lodash.deburr-4.1.0.tgz", "integrity": "sha512-m/M1U1f3ddMCs6Hq2tAsYThTBDaAKFDX3dwDo97GEYzamXi9SqUpjWi/Rrj/gf3X2n8ktwgZrlP1z6E3v/IExQ==" }, + "node_modules/lodash.defaults": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz", + "integrity": "sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ==" + }, + "node_modules/lodash.isarguments": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", + "integrity": "sha512-chi4NHZlZqZD18a0imDHnZPrDeBbTtVN7GXMwuGdRH9qotxAjYs3aVLKc7zNOG9eddR5Ksd8rvFEBc9SsggPpg==" + }, "node_modules/lodash.ismatch": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz", @@ -16381,7 +17547,6 @@ "version": "0.30.9", "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.9.tgz", "integrity": "sha512-S1+hd+dIrC8EZqKyT9DstTH/0Z+f76kmmvZnkfQVmOpDEF9iVgdYif3Q/pIWHmCoo59bQVGW0kVL3e2nl+9+Sw==", - "dev": true, "dependencies": { "@jridgewell/sourcemap-codec": "^1.4.15" }, @@ -16906,7 +18071,6 @@ "version": "7.0.4", "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", - "devOptional": true, "engines": { "node": ">=16 || 14 >=14.17" } @@ -17043,7 +18207,6 @@ "version": "2.1.2", "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", - "devOptional": true, "dependencies": { "minipass": "^3.0.0", "yallist": "^4.0.0" @@ -17056,7 +18219,6 @@ "version": "3.3.6", "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", - "devOptional": true, "dependencies": { "yallist": "^4.0.0" }, @@ -17084,7 +18246,6 @@ "version": "1.6.1", "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.6.1.tgz", "integrity": "sha512-vLgaHvaeunuOXHSmEbZ9izxPx3USsk8KCQ8iC+aTlp5sKRSoZvwhHh5L9VbKSaVC6sJDqbyohIS76E2VmHIPAA==", - "dev": true, "dependencies": { "acorn": "^8.11.3", "pathe": "^1.1.2", @@ -17154,7 +18315,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz", "integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==", - "dev": true, "engines": { "node": ">=4" } @@ -17262,61 +18422,263 @@ "integrity": "sha512-nO1xXxfh/RWNxfd/XPfbIfFk5vgLsAxUR9y5O0cHMJu/AW9U95JLXqthYHjEp+8gQ5p96K9jUp8nbVOxCdRbtw==", "optional": true }, - "node_modules/nanoid": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", - "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "node_modules/nanoid": { + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/napi-build-utils": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", + "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==" + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true + }, + "node_modules/natural-compare-lite": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", + "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", + "dev": true + }, + "node_modules/ncp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ncp/-/ncp-2.0.0.tgz", + "integrity": "sha512-zIdGUrPRFTUELUvr3Gmc7KZ2Sw/h1PiVM0Af/oHB6zgnV1ikqSfRk+TOufi79aHYCW3NiOXmr1BP5nWbzojLaA==", + "dev": true, + "bin": { + "ncp": "bin/ncp" + } + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==" + }, + "node_modules/nitropack": { + "version": "2.9.6", + "resolved": "https://registry.npmjs.org/nitropack/-/nitropack-2.9.6.tgz", + "integrity": "sha512-HP2PE0dREcDIBVkL8Zm6eVyrDd10/GI9hTL00PHvjUM8I9Y/2cv73wRDmxNyInfrx/CJKHATb2U/pQrqpzJyXA==", + "dependencies": { + "@cloudflare/kv-asset-handler": "^0.3.1", + "@netlify/functions": "^2.6.0", + "@rollup/plugin-alias": "^5.1.0", + "@rollup/plugin-commonjs": "^25.0.7", + "@rollup/plugin-inject": "^5.0.5", + "@rollup/plugin-json": "^6.1.0", + "@rollup/plugin-node-resolve": "^15.2.3", + "@rollup/plugin-replace": "^5.0.5", + "@rollup/plugin-terser": "^0.4.4", + "@rollup/pluginutils": "^5.1.0", + "@types/http-proxy": "^1.17.14", + "@vercel/nft": "^0.26.4", + "archiver": "^7.0.1", + "c12": "^1.10.0", + "chalk": "^5.3.0", + "chokidar": "^3.6.0", + "citty": "^0.1.6", + "consola": "^3.2.3", + "cookie-es": "^1.1.0", + "croner": "^8.0.1", + "crossws": "^0.2.4", + "db0": "^0.1.4", + "defu": "^6.1.4", + "destr": "^2.0.3", + "dot-prop": "^8.0.2", + "esbuild": "^0.20.2", + "escape-string-regexp": "^5.0.0", + "etag": "^1.8.1", + "fs-extra": "^11.2.0", + "globby": "^14.0.1", + "gzip-size": "^7.0.0", + "h3": "^1.11.1", + "hookable": "^5.5.3", + "httpxy": "^0.1.5", + "ioredis": "^5.3.2", + "is-primitive": "^3.0.1", + "jiti": "^1.21.0", + "klona": "^2.0.6", + "knitwork": "^1.1.0", + "listhen": "^1.7.2", + "magic-string": "^0.30.8", + "mime": "^4.0.1", + "mlly": "^1.6.1", + "mri": "^1.2.0", + "node-fetch-native": "^1.6.4", + "ofetch": "^1.3.4", + "ohash": "^1.1.3", + "openapi-typescript": "^6.7.5", + "pathe": "^1.1.2", + "perfect-debounce": "^1.0.0", + "pkg-types": "^1.0.3", + "pretty-bytes": "^6.1.1", + "radix3": "^1.1.2", + "rollup": "^4.13.2", + "rollup-plugin-visualizer": "^5.12.0", + "scule": "^1.3.0", + "semver": "^7.6.0", + "serve-placeholder": "^2.0.1", + "serve-static": "^1.15.0", + "std-env": "^3.7.0", + "ufo": "^1.5.3", + "uncrypto": "^0.1.3", + "unctx": "^2.3.1", + "unenv": "^1.9.0", + "unimport": "^3.7.1", + "unstorage": "^1.10.2", + "unwasm": "^0.3.9" + }, + "bin": { + "nitro": "dist/cli/index.mjs", + "nitropack": "dist/cli/index.mjs" + }, + "engines": { + "node": "^16.11.0 || >=17.0.0" + }, + "peerDependencies": { + "xml2js": "^0.6.2" + }, + "peerDependenciesMeta": { + "xml2js": { + "optional": true + } + } + }, + "node_modules/nitropack/node_modules/chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/nitropack/node_modules/dot-prop": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-8.0.2.tgz", + "integrity": "sha512-xaBe6ZT4DHPkg0k4Ytbvn5xoxgpG0jOS1dYxSOwAHPuNLjP3/OzN0gH55SrLqpx8cBfSaVt91lXYkApjb+nYdQ==", + "dependencies": { + "type-fest": "^3.8.0" + }, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/nitropack/node_modules/escape-string-regexp": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", + "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/nitropack/node_modules/globby": { + "version": "14.0.1", + "resolved": "https://registry.npmjs.org/globby/-/globby-14.0.1.tgz", + "integrity": "sha512-jOMLD2Z7MAhyG8aJpNOpmziMOP4rPLcc95oQPKXBazW82z+CEgPFBQvEpRUa1KeIMUJo4Wsm+q6uzO/Q/4BksQ==", + "dependencies": { + "@sindresorhus/merge-streams": "^2.1.0", + "fast-glob": "^3.3.2", + "ignore": "^5.2.4", + "path-type": "^5.0.0", + "slash": "^5.1.0", + "unicorn-magic": "^0.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/nitropack/node_modules/mime": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/mime/-/mime-4.0.3.tgz", + "integrity": "sha512-KgUb15Oorc0NEKPbvfa0wRU+PItIEZmiv+pyAO2i0oTIVTJhlzMclU7w4RXWQrSOVH5ax/p/CkIO7KI4OyFJTQ==", "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } + "https://github.com/sponsors/broofa" ], "bin": { - "nanoid": "bin/nanoid.cjs" + "mime": "bin/cli.js" }, "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + "node": ">=16" } }, - "node_modules/napi-build-utils": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", - "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==" - }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true - }, - "node_modules/natural-compare-lite": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", - "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", - "dev": true + "node_modules/nitropack/node_modules/path-type": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-5.0.0.tgz", + "integrity": "sha512-5HviZNaZcfqP95rwpv+1HDgUamezbqdSYTyzjTvwtJSnIH+3vnbmWsItli8OFEndS984VT55M3jduxZbX351gg==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, - "node_modules/ncp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ncp/-/ncp-2.0.0.tgz", - "integrity": "sha512-zIdGUrPRFTUELUvr3Gmc7KZ2Sw/h1PiVM0Af/oHB6zgnV1ikqSfRk+TOufi79aHYCW3NiOXmr1BP5nWbzojLaA==", - "dev": true, - "bin": { - "ncp": "bin/ncp" + "node_modules/nitropack/node_modules/pretty-bytes": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-6.1.1.tgz", + "integrity": "sha512-mQUvGU6aUFQ+rNvTIAcZuWGRT9a6f6Yrg9bHs4ImKF+HZCEK+plBvnAZYSIQztknZF2qnzNtr6F8s0+IuptdlQ==", + "engines": { + "node": "^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/negotiator": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", - "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "node_modules/nitropack/node_modules/slash": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-5.1.0.tgz", + "integrity": "sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==", "engines": { - "node": ">= 0.6" + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/neo-async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==" + "node_modules/nitropack/node_modules/type-fest": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.13.1.tgz", + "integrity": "sha512-tLq3bSNx+xSpwvAJnzrK0Ep5CLNWjvFTOp71URMaAEWBfRb9nnJiBoUe0tF8bI4ZFO3omgBR6NvnbzVUT3Ly4g==", + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, "node_modules/no-case": { "version": "2.3.2", @@ -17398,6 +18760,16 @@ "node": "^16.14.0 || >=18.0.0" } }, + "node_modules/node-gyp-build": { + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.0.tgz", + "integrity": "sha512-u6fs2AEUljNho3EYTJNBfImO5QTo/J/1Etd+NVdCj7qWKUSN/bSLkZwhDv7I+w/MSC6qJ4cknepkAYykDdK8og==", + "bin": { + "node-gyp-build": "bin.js", + "node-gyp-build-optional": "optional.js", + "node-gyp-build-test": "build-test.js" + } + }, "node_modules/node-gyp-build-optional-packages": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/node-gyp-build-optional-packages/-/node-gyp-build-optional-packages-5.1.1.tgz", @@ -18125,6 +19497,24 @@ "node": ">=14.14" } }, + "node_modules/nypm": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/nypm/-/nypm-0.3.8.tgz", + "integrity": "sha512-IGWlC6So2xv6V4cIDmoV0SwwWx7zLG086gyqkyumteH2fIgCAM4nDVFB2iDRszDvmdSVW9xb1N+2KjQ6C7d4og==", + "dependencies": { + "citty": "^0.1.6", + "consola": "^3.2.3", + "execa": "^8.0.1", + "pathe": "^1.1.2", + "ufo": "^1.4.0" + }, + "bin": { + "nypm": "dist/cli.mjs" + }, + "engines": { + "node": "^14.16.0 || >=16.10.0" + } + }, "node_modules/object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", @@ -18181,6 +19571,11 @@ "ufo": "^1.5.3" } }, + "node_modules/ohash": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/ohash/-/ohash-1.1.3.tgz", + "integrity": "sha512-zuHHiGTYTA1sYJ/wZN+t5HKZaH23i4yI1HMwbuXm24Nid7Dv0KcuRlKoNKS9UNfAVSBlnGLcuQrnOKWOZoEGaw==" + }, "node_modules/on-finished": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", @@ -18239,6 +19634,33 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/openapi-typescript": { + "version": "6.7.5", + "resolved": "https://registry.npmjs.org/openapi-typescript/-/openapi-typescript-6.7.5.tgz", + "integrity": "sha512-ZD6dgSZi0u1QCP55g8/2yS5hNJfIpgqsSGHLxxdOjvY7eIrXzj271FJEQw33VwsZ6RCtO/NOuhxa7GBWmEudyA==", + "dependencies": { + "ansi-colors": "^4.1.3", + "fast-glob": "^3.3.2", + "js-yaml": "^4.1.0", + "supports-color": "^9.4.0", + "undici": "^5.28.2", + "yargs-parser": "^21.1.1" + }, + "bin": { + "openapi-typescript": "bin/cli.js" + } + }, + "node_modules/openapi-typescript/node_modules/supports-color": { + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-9.4.0.tgz", + "integrity": "sha512-VL+lNrEoIXww1coLPOmiEmK/0sGigko5COxI09KzHc2VJXJsQ37UaQ+8quuxjDeA7+KnLGTWRyOXSLLR2Wb4jw==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, "node_modules/optionator": { "version": "0.9.3", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", @@ -18978,7 +20400,6 @@ "version": "1.10.2", "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.2.tgz", "integrity": "sha512-7xTavNy5RQXnsjANvVvMkEjvloOinkAjv/Z6Ildz9v2RinZ4SBKTWFOVRbaF8p0vpHnyjV/UwNDdKuUv6M5qcA==", - "devOptional": true, "dependencies": { "lru-cache": "^10.2.0", "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" @@ -18994,7 +20415,6 @@ "version": "10.2.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.0.tgz", "integrity": "sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==", - "devOptional": true, "engines": { "node": "14 || >=16.14" } @@ -19026,6 +20446,11 @@ "node": "*" } }, + "node_modules/perfect-debounce": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/perfect-debounce/-/perfect-debounce-1.0.0.tgz", + "integrity": "sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA==" + }, "node_modules/picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", @@ -19117,7 +20542,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.0.3.tgz", "integrity": "sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==", - "dev": true, "dependencies": { "jsonc-parser": "^3.2.0", "mlly": "^1.2.0", @@ -19498,7 +20922,6 @@ "version": "0.11.10", "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", - "dev": true, "engines": { "node": ">= 0.6.0" } @@ -19846,6 +21269,11 @@ "node": ">=8" } }, + "node_modules/radix3": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/radix3/-/radix3-1.1.2.tgz", + "integrity": "sha512-b484I/7b8rDEdSDKckSSBA8knMpcdsXudlE/LNL639wFoHKwLbEkQFZHWEYwDC0wa0FKUcCY+GAF73Z7wxNVFA==" + }, "node_modules/randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", @@ -19906,6 +21334,15 @@ "node": ">=0.10.0" } }, + "node_modules/rc9": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/rc9/-/rc9-2.1.2.tgz", + "integrity": "sha512-btXCnMmRIBINM2LDZoEmOogIZU7Qe7zn4BpomSKZ/ykbLObuBdvG+mFq11DL6fjH1DRwHhrlgtYWG96bJiC7Cg==", + "dependencies": { + "defu": "^6.1.4", + "destr": "^2.0.3" + } + }, "node_modules/re2": { "version": "1.20.10", "resolved": "https://registry.npmjs.org/re2/-/re2-1.20.10.tgz", @@ -20270,6 +21707,33 @@ "node": ">= 6" } }, + "node_modules/readdir-glob": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/readdir-glob/-/readdir-glob-1.1.3.tgz", + "integrity": "sha512-v05I2k7xN8zXvPD9N+z/uhXPaj0sUFCe2rcWZIpBsqxfP7xXFQ0tipAd/wjj1YxWyWtUS5IDJpOG82JKt2EAVA==", + "dependencies": { + "minimatch": "^5.1.0" + } + }, + "node_modules/readdir-glob/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/readdir-glob/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", @@ -20389,6 +21853,25 @@ "node": ">=8" } }, + "node_modules/redis-errors": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/redis-errors/-/redis-errors-1.2.0.tgz", + "integrity": "sha512-1qny3OExCf0UvUV/5wpYKf2YwPcOqXzkwKKSmKHiE6ZMQs5heeE/c8eXK+PNllPvmjgAbfnsbpkGZWy8cBpn9w==", + "engines": { + "node": ">=4" + } + }, + "node_modules/redis-parser": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/redis-parser/-/redis-parser-3.0.0.tgz", + "integrity": "sha512-DJnGAeenTdpMEH6uAJRK/uiyEIH9WVsUmoLwzudwGJUwZPp80PDBWPHXSAGNPwNvIXAbe7MSUB1zQFugFml66A==", + "dependencies": { + "redis-errors": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/regenerate": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", @@ -20616,55 +22099,148 @@ "node": ">=0.10.0" } }, - "node_modules/rimraf": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.5.tgz", - "integrity": "sha512-CqDakW+hMe/Bz202FPEymy68P+G50RfMQK+Qo5YUqc9SPipvbGjCGKd0RSKEelbsfQuw3g5NZDSrlZZAJurH1A==", - "dev": true, + "node_modules/rimraf": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.5.tgz", + "integrity": "sha512-CqDakW+hMe/Bz202FPEymy68P+G50RfMQK+Qo5YUqc9SPipvbGjCGKd0RSKEelbsfQuw3g5NZDSrlZZAJurH1A==", + "dev": true, + "dependencies": { + "glob": "^10.3.7" + }, + "bin": { + "rimraf": "dist/esm/bin.mjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rollup": { + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.14.1.tgz", + "integrity": "sha512-4LnHSdd3QK2pa1J6dFbfm1HN0D7vSK/ZuZTsdyUAlA6Rr1yTouUTL13HaDOGJVgby461AhrNGBS7sCGXXtT+SA==", + "dependencies": { + "@types/estree": "1.0.5" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.14.1", + "@rollup/rollup-android-arm64": "4.14.1", + "@rollup/rollup-darwin-arm64": "4.14.1", + "@rollup/rollup-darwin-x64": "4.14.1", + "@rollup/rollup-linux-arm-gnueabihf": "4.14.1", + "@rollup/rollup-linux-arm64-gnu": "4.14.1", + "@rollup/rollup-linux-arm64-musl": "4.14.1", + "@rollup/rollup-linux-powerpc64le-gnu": "4.14.1", + "@rollup/rollup-linux-riscv64-gnu": "4.14.1", + "@rollup/rollup-linux-s390x-gnu": "4.14.1", + "@rollup/rollup-linux-x64-gnu": "4.14.1", + "@rollup/rollup-linux-x64-musl": "4.14.1", + "@rollup/rollup-win32-arm64-msvc": "4.14.1", + "@rollup/rollup-win32-ia32-msvc": "4.14.1", + "@rollup/rollup-win32-x64-msvc": "4.14.1", + "fsevents": "~2.3.2" + } + }, + "node_modules/rollup-plugin-visualizer": { + "version": "5.12.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-visualizer/-/rollup-plugin-visualizer-5.12.0.tgz", + "integrity": "sha512-8/NU9jXcHRs7Nnj07PF2o4gjxmm9lXIrZ8r175bT9dK8qoLlvKTwRMArRCMgpMGlq8CTLugRvEmyMeMXIU2pNQ==", + "dependencies": { + "open": "^8.4.0", + "picomatch": "^2.3.1", + "source-map": "^0.7.4", + "yargs": "^17.5.1" + }, + "bin": { + "rollup-plugin-visualizer": "dist/bin/cli.js" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "rollup": "2.x || 3.x || 4.x" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/rollup-plugin-visualizer/node_modules/define-lazy-prop": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", + "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==", + "engines": { + "node": ">=8" + } + }, + "node_modules/rollup-plugin-visualizer/node_modules/is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/rollup-plugin-visualizer/node_modules/is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dependencies": { + "is-docker": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/rollup-plugin-visualizer/node_modules/open": { + "version": "8.4.2", + "resolved": "https://registry.npmjs.org/open/-/open-8.4.2.tgz", + "integrity": "sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==", "dependencies": { - "glob": "^10.3.7" - }, - "bin": { - "rimraf": "dist/esm/bin.mjs" + "define-lazy-prop": "^2.0.0", + "is-docker": "^2.1.1", + "is-wsl": "^2.2.0" }, "engines": { - "node": ">=14" + "node": ">=12" }, "funding": { - "url": "https://github.com/sponsors/isaacs" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/rollup": { - "version": "4.14.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.14.1.tgz", - "integrity": "sha512-4LnHSdd3QK2pa1J6dFbfm1HN0D7vSK/ZuZTsdyUAlA6Rr1yTouUTL13HaDOGJVgby461AhrNGBS7sCGXXtT+SA==", - "dependencies": { - "@types/estree": "1.0.5" - }, - "bin": { - "rollup": "dist/bin/rollup" - }, + "node_modules/rollup-plugin-visualizer/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "engines": { - "node": ">=18.0.0", - "npm": ">=8.0.0" + "node": ">=8.6" }, - "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.14.1", - "@rollup/rollup-android-arm64": "4.14.1", - "@rollup/rollup-darwin-arm64": "4.14.1", - "@rollup/rollup-darwin-x64": "4.14.1", - "@rollup/rollup-linux-arm-gnueabihf": "4.14.1", - "@rollup/rollup-linux-arm64-gnu": "4.14.1", - "@rollup/rollup-linux-arm64-musl": "4.14.1", - "@rollup/rollup-linux-powerpc64le-gnu": "4.14.1", - "@rollup/rollup-linux-riscv64-gnu": "4.14.1", - "@rollup/rollup-linux-s390x-gnu": "4.14.1", - "@rollup/rollup-linux-x64-gnu": "4.14.1", - "@rollup/rollup-linux-x64-musl": "4.14.1", - "@rollup/rollup-win32-arm64-msvc": "4.14.1", - "@rollup/rollup-win32-ia32-msvc": "4.14.1", - "@rollup/rollup-win32-x64-msvc": "4.14.1", - "fsevents": "~2.3.2" + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/rollup-plugin-visualizer/node_modules/source-map": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz", + "integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==", + "engines": { + "node": ">= 8" } }, "node_modules/router": { @@ -20902,6 +22478,11 @@ "url": "https://opencollective.com/webpack" } }, + "node_modules/scule": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/scule/-/scule-1.3.0.tgz", + "integrity": "sha512-6FtHJEvt+pVMIB9IBY+IcCJ6Z5f1iQnytgyfKMhDKgmzYG+TeH/wx1y3l27rshSbLiSanrR9ffZDrEsmjlQF2g==" + }, "node_modules/section-matter": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/section-matter/-/section-matter-1.0.0.tgz", @@ -21099,6 +22680,14 @@ "node": ">= 0.6" } }, + "node_modules/serve-placeholder": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/serve-placeholder/-/serve-placeholder-2.0.1.tgz", + "integrity": "sha512-rUzLlXk4uPFnbEaIz3SW8VISTxMuONas88nYWjAWaM2W9VDbt9tyFOr3lq8RhVOFrT3XISoBw8vni5una8qMnQ==", + "dependencies": { + "defu": "^6.0.0" + } + }, "node_modules/serve-static": { "version": "1.15.0", "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", @@ -21116,8 +22705,7 @@ "node_modules/set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", - "dev": true + "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==" }, "node_modules/set-function-length": { "version": "1.2.2", @@ -21750,6 +23338,11 @@ "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", "dev": true }, + "node_modules/standard-as-callback": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/standard-as-callback/-/standard-as-callback-2.1.0.tgz", + "integrity": "sha512-qoRRSyROncaz1z0mvYqIE4lCd9p2R90i6GxW3uZv5ucSu8tU7B5HXUP1gG8pVZsYNVaXjk8ClXHPttLyxAL48A==" + }, "node_modules/statuses": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", @@ -21761,8 +23354,7 @@ "node_modules/std-env": { "version": "3.7.0", "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.7.0.tgz", - "integrity": "sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==", - "dev": true + "integrity": "sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==" }, "node_modules/stdin-discarder": { "version": "0.2.2", @@ -21813,7 +23405,6 @@ "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "devOptional": true, "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -21931,7 +23522,6 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "devOptional": true, "dependencies": { "ansi-regex": "^5.0.1" }, @@ -22178,6 +23768,17 @@ "url": "https://opencollective.com/unts" } }, + "node_modules/system-architecture": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/system-architecture/-/system-architecture-0.1.0.tgz", + "integrity": "sha512-ulAk51I9UVUyJgxlv9M6lFot2WP3e7t8Kz9+IS6D4rVba1tR9kON+Ey69f+1R4Q8cd45Lod6a4IcJIxnzGc/zA==", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/tapable": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", @@ -22190,7 +23791,6 @@ "version": "6.1.11", "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz", "integrity": "sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==", - "devOptional": true, "dependencies": { "chownr": "^2.0.0", "fs-minipass": "^2.0.0", @@ -22245,7 +23845,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", - "devOptional": true, "dependencies": { "minipass": "^3.0.0" }, @@ -22257,7 +23856,6 @@ "version": "3.3.6", "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", - "devOptional": true, "dependencies": { "yallist": "^4.0.0" }, @@ -22269,7 +23867,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "devOptional": true, "bin": { "mkdirp": "bin/cmd.js" }, @@ -23511,11 +25108,50 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/uncrypto": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/uncrypto/-/uncrypto-0.1.3.tgz", + "integrity": "sha512-Ql87qFHB3s/De2ClA9e0gsnS6zXG27SkTiSJwjCc9MebbfapQfuPzumMIUMi38ezPZVNFcHI9sUIepeQfw8J8Q==" + }, + "node_modules/unctx": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/unctx/-/unctx-2.3.1.tgz", + "integrity": "sha512-PhKke8ZYauiqh3FEMVNm7ljvzQiph0Mt3GBRve03IJm7ukfaON2OBK795tLwhbyfzknuRRkW0+Ze+CQUmzOZ+A==", + "dependencies": { + "acorn": "^8.8.2", + "estree-walker": "^3.0.3", + "magic-string": "^0.30.0", + "unplugin": "^1.3.1" + } + }, + "node_modules/undici": { + "version": "5.28.4", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.4.tgz", + "integrity": "sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==", + "dependencies": { + "@fastify/busboy": "^2.0.0" + }, + "engines": { + "node": ">=14.0" + } + }, "node_modules/undici-types": { "version": "5.26.5", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" }, + "node_modules/unenv": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/unenv/-/unenv-1.9.0.tgz", + "integrity": "sha512-QKnFNznRxmbOF1hDgzpqrlIf6NC5sbZ2OJ+5Wl3OX8uM+LUJXbj4TXvLJCtwbPTmbMHCLIz6JLKNinNsMShK9g==", + "dependencies": { + "consola": "^3.2.3", + "defu": "^6.1.3", + "mime": "^3.0.0", + "node-fetch-native": "^1.6.1", + "pathe": "^1.1.1" + } + }, "node_modules/unicode-canonical-property-names-ecmascript": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", @@ -23563,6 +25199,48 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/unimport": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/unimport/-/unimport-3.7.1.tgz", + "integrity": "sha512-V9HpXYfsZye5bPPYUgs0Otn3ODS1mDUciaBlXljI4C2fTwfFpvFZRywmlOu943puN9sncxROMZhsZCjNXEpzEQ==", + "dependencies": { + "@rollup/pluginutils": "^5.1.0", + "acorn": "^8.11.2", + "escape-string-regexp": "^5.0.0", + "estree-walker": "^3.0.3", + "fast-glob": "^3.3.2", + "local-pkg": "^0.5.0", + "magic-string": "^0.30.5", + "mlly": "^1.4.2", + "pathe": "^1.1.1", + "pkg-types": "^1.0.3", + "scule": "^1.1.1", + "strip-literal": "^1.3.0", + "unplugin": "^1.5.1" + } + }, + "node_modules/unimport/node_modules/escape-string-regexp": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", + "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/unimport/node_modules/strip-literal": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-1.3.0.tgz", + "integrity": "sha512-PugKzOsyXpArk0yWmUwqOZecSO0GH0bPoctLcqNDH9J04pVW3lflYE0ujElBGTloevcxF5MofAOZ7C5l2b+wLg==", + "dependencies": { + "acorn": "^8.10.0" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, "node_modules/unique-filename": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-3.0.0.tgz", @@ -23620,6 +25298,127 @@ "node": ">= 0.8" } }, + "node_modules/unplugin": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/unplugin/-/unplugin-1.10.1.tgz", + "integrity": "sha512-d6Mhq8RJeGA8UfKCu54Um4lFA0eSaRa3XxdAJg8tIdxbu1ubW0hBCZUL7yI2uGyYCRndvbK8FLHzqy2XKfeMsg==", + "dependencies": { + "acorn": "^8.11.3", + "chokidar": "^3.6.0", + "webpack-sources": "^3.2.3", + "webpack-virtual-modules": "^0.6.1" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/unstorage": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/unstorage/-/unstorage-1.10.2.tgz", + "integrity": "sha512-cULBcwDqrS8UhlIysUJs2Dk0Mmt8h7B0E6mtR+relW9nZvsf/u4SkAYyNliPiPW7XtFNb5u3IUMkxGxFTTRTgQ==", + "dependencies": { + "anymatch": "^3.1.3", + "chokidar": "^3.6.0", + "destr": "^2.0.3", + "h3": "^1.11.1", + "listhen": "^1.7.2", + "lru-cache": "^10.2.0", + "mri": "^1.2.0", + "node-fetch-native": "^1.6.2", + "ofetch": "^1.3.3", + "ufo": "^1.4.0" + }, + "peerDependencies": { + "@azure/app-configuration": "^1.5.0", + "@azure/cosmos": "^4.0.0", + "@azure/data-tables": "^13.2.2", + "@azure/identity": "^4.0.1", + "@azure/keyvault-secrets": "^4.8.0", + "@azure/storage-blob": "^12.17.0", + "@capacitor/preferences": "^5.0.7", + "@netlify/blobs": "^6.5.0 || ^7.0.0", + "@planetscale/database": "^1.16.0", + "@upstash/redis": "^1.28.4", + "@vercel/kv": "^1.0.1", + "idb-keyval": "^6.2.1", + "ioredis": "^5.3.2" + }, + "peerDependenciesMeta": { + "@azure/app-configuration": { + "optional": true + }, + "@azure/cosmos": { + "optional": true + }, + "@azure/data-tables": { + "optional": true + }, + "@azure/identity": { + "optional": true + }, + "@azure/keyvault-secrets": { + "optional": true + }, + "@azure/storage-blob": { + "optional": true + }, + "@capacitor/preferences": { + "optional": true + }, + "@netlify/blobs": { + "optional": true + }, + "@planetscale/database": { + "optional": true + }, + "@upstash/redis": { + "optional": true + }, + "@vercel/kv": { + "optional": true + }, + "idb-keyval": { + "optional": true + }, + "ioredis": { + "optional": true + } + } + }, + "node_modules/unstorage/node_modules/lru-cache": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.2.tgz", + "integrity": "sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==", + "engines": { + "node": "14 || >=16.14" + } + }, + "node_modules/untun": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/untun/-/untun-0.1.3.tgz", + "integrity": "sha512-4luGP9LMYszMRZwsvyUd9MrxgEGZdZuZgpVQHEEX0lCYFESasVRvZd0EYpCkOIbJKHMuv0LskpXc/8Un+MJzEQ==", + "dependencies": { + "citty": "^0.1.5", + "consola": "^3.2.3", + "pathe": "^1.1.1" + }, + "bin": { + "untun": "bin/untun.mjs" + } + }, + "node_modules/unwasm": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/unwasm/-/unwasm-0.3.9.tgz", + "integrity": "sha512-LDxTx/2DkFURUd+BU1vUsF/moj0JsoTvl+2tcg2AUOiEzVturhGGx17/IMgGvKUYdZwr33EJHtChCJuhu9Ouvg==", + "dependencies": { + "knitwork": "^1.0.0", + "magic-string": "^0.30.8", + "mlly": "^1.6.1", + "pathe": "^1.1.2", + "pkg-types": "^1.0.3", + "unplugin": "^1.10.0" + } + }, "node_modules/upath": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/upath/-/upath-2.0.1.tgz", @@ -23706,6 +25505,11 @@ "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz", "integrity": "sha512-WRbjgmYzgXkCV7zNVpy5YgrHgbBv126rMALQQMrmzOVC4GM2waQ9x7xtm8VU+1yF2kWyPzI9zbZ48n4vSxwfSA==" }, + "node_modules/uqr": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/uqr/-/uqr-0.1.2.tgz", + "integrity": "sha512-MJu7ypHq6QasgF5YRTjqscSzQp/W11zoUk6kvmlH+fmWEs63Y0Eib13hYFwAzagRJcVY8WVnlV+eBDUGMJ5IbA==" + }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -23736,6 +25540,11 @@ "requires-port": "^1.0.0" } }, + "node_modules/urlpattern-polyfill": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-8.0.2.tgz", + "integrity": "sha512-Qp95D4TPJl1kC9SKigDcqgyM2VDVO4RiJc2d4qe5GrYm+zbIQCWWKAFaJNQ4BhdFeDGwBmAxqJBwWSJDb9T3BQ==" + }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -24408,6 +26217,11 @@ "node": ">=10.13.0" } }, + "node_modules/webpack-virtual-modules": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/webpack-virtual-modules/-/webpack-virtual-modules-0.6.1.tgz", + "integrity": "sha512-poXpCylU7ExuvZK8z+On3kX+S8o/2dQ/SVYueKA0D4WEMXROXgY8Ez50/bQEUmvoSMMrWcrJqCHuhAbsiwg7Dg==" + }, "node_modules/websocket-driver": { "version": "0.7.4", "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz", @@ -24540,7 +26354,6 @@ "version": "1.1.5", "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", - "dev": true, "dependencies": { "string-width": "^1.0.2 || 2 || 3 || 4" } @@ -24972,7 +26785,6 @@ "version": "8.1.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", - "devOptional": true, "dependencies": { "ansi-styles": "^6.1.0", "string-width": "^5.0.1", @@ -24990,7 +26802,6 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "devOptional": true, "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -25007,7 +26818,6 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", - "devOptional": true, "engines": { "node": ">=12" }, @@ -25019,7 +26829,6 @@ "version": "6.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", - "devOptional": true, "engines": { "node": ">=12" }, @@ -25030,14 +26839,12 @@ "node_modules/wrap-ansi/node_modules/emoji-regex": { "version": "9.2.2", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "devOptional": true + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==" }, "node_modules/wrap-ansi/node_modules/string-width": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "devOptional": true, "dependencies": { "eastasianwidth": "^0.2.0", "emoji-regex": "^9.2.2", @@ -25054,7 +26861,6 @@ "version": "7.1.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", - "devOptional": true, "dependencies": { "ansi-regex": "^6.0.1" }, @@ -25276,6 +27082,57 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/zip-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-6.0.1.tgz", + "integrity": "sha512-zK7YHHz4ZXpW89AHXUPbQVGKI7uvkd3hzusTdotCg1UxyaVtg0zFJSTfW/Dq5f7OBBVnq6cZIaC8Ti4hb6dtCA==", + "dependencies": { + "archiver-utils": "^5.0.0", + "compress-commons": "^6.0.2", + "readable-stream": "^4.0.0" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/zip-stream/node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/zip-stream/node_modules/readable-stream": { + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.5.2.tgz", + "integrity": "sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g==", + "dependencies": { + "abort-controller": "^3.0.0", + "buffer": "^6.0.3", + "events": "^3.3.0", + "process": "^0.11.10", + "string_decoder": "^1.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, "packages/cli": { "name": "@tinijs/cli", "version": "0.17.0", @@ -25887,7 +27744,16 @@ "version": "0.0.0", "license": "MIT", "dependencies": { - "@tinijs/project": "*" + "@tinijs/cli": "*", + "@tinijs/project": "*", + "chokidar": "^3.6.0", + "colorette": "^2.0.20", + "concurrently": "^8.2.2", + "consola": "^3.2.3", + "execa": "^8.0.1", + "fs-extra": "^11.2.0", + "nitropack": "^2.9.6", + "pathe": "^1.1.2" }, "engines": { "node": ">=18.0.0" @@ -25903,7 +27769,7 @@ }, "packages/toolbox": { "name": "@tinijs/toolbox", - "version": "0.0.0", + "version": "0.17.0", "license": "MIT", "dependencies": { "@sindresorhus/slugify": "^2.2.1", diff --git a/packages/cli/cli/commands/build.ts b/packages/cli/cli/commands/build.ts index 043e5367..7284baae 100644 --- a/packages/cli/cli/commands/build.ts +++ b/packages/cli/cli/commands/build.ts @@ -4,7 +4,7 @@ import {consola} from 'consola'; import {gray} from 'colorette'; import {remove} from 'fs-extra/esm'; -import {getTiniProject} from '@tinijs/project'; +import {getTiniProject, getProjectDirs} from '@tinijs/project'; import {exposeEnvs, loadCompiler, loadBuilder} from '../utils/build.js'; import {createCLICommand} from '../utils/cli.js'; @@ -19,19 +19,25 @@ export const buildCommand = createCLICommand( target: { alias: 't', type: 'string', - description: 'Target: production (default), qa1, any, ...', + description: 'Target: production (default), stage, qa, ...', + }, + clean: { + alias: 'c', + type: 'boolean', + description: 'Clean the output dir.', }, }, }, async (args, callbacks) => { const tiniProject = await getTiniProject(); const {config: tiniConfig, hooks} = tiniProject; + const {outDir} = getProjectDirs(tiniConfig); // preparation exposeEnvs(tiniConfig, args.target || 'production'); const compiler = await loadCompiler(tiniProject); const builder = await loadBuilder(tiniProject); // clean - await remove(resolve(tiniConfig.outDir)); + if (args.clean) await remove(resolve(outDir)); // start build await hooks.callHook('build:before'); if (builder.build instanceof Function) { @@ -45,7 +51,7 @@ export const buildCommand = createCLICommand( typeof buildCommand !== 'string' ? buildCommand : buildCommand.split(' '); - callbacks?.onShowDebug(`${cmd} ${args.join(' ')}`); + callbacks?.onShowDebug?.(`${cmd} ${args.join(' ')}`); await execa(cmd, args, {stdio: 'inherit'}); } await hooks.callHook('build:after'); diff --git a/packages/cli/cli/commands/compile.ts b/packages/cli/cli/commands/compile.ts index 900a7376..87a3469b 100644 --- a/packages/cli/cli/commands/compile.ts +++ b/packages/cli/cli/commands/compile.ts @@ -25,13 +25,18 @@ export const compileCommand = createCLICommand( watch: { alias: 'w', type: 'boolean', - description: 'Also watch for changes.', + description: 'Compile and watch for changes.', }, target: { alias: 't', type: 'string', description: 'Target: development (default), production, ...', }, + lazy: { + alias: 'l', + type: 'boolean', + description: 'No initial compile, only watch for changes.', + }, }, }, async (args, callbacks) => { @@ -47,23 +52,27 @@ export const compileCommand = createCLICommand( const compiler = await loadCompiler(tiniProject, true); // compile if (!compiler) { - callbacks?.onUnavailable(); + callbacks?.onUnavailable?.(); } else { - await compiler.compile(); + // initial compile + if (!args.watch || !args.lazy) { + await compiler.compile(); + } + // watch or done if (!args.watch) { - callbacks?.onSingleCompile(compileDir); + callbacks?.onSingleCompile?.(compileDir); } else { watch(resolve(srcDir), {ignoreInitial: true}) .on('add', path => { - callbacks?.onCompileFile('add', path); + callbacks?.onCompileFile?.('add', path); compiler.compileFile(resolve(path)); }) .on('change', path => { - callbacks?.onCompileFile('change', path); + callbacks?.onCompileFile?.('change', path); compiler.compileFile(resolve(path)); }) .on('unlink', async path => { - callbacks?.onCompileFile('unlink', path); + callbacks?.onCompileFile?.('unlink', path); const ignoreMatcher = !compileOptions.ignorePatterns ? undefined : picomatch(compileOptions.ignorePatterns); @@ -77,7 +86,7 @@ export const compileCommand = createCLICommand( await remove(context.outPath); await hooks.callHook('compile:afterRemoveFile', context); }); - callbacks?.onCompileAndWatch(compileDir); + callbacks?.onCompileAndWatch?.(compileDir); } } }, diff --git a/packages/cli/cli/commands/dev.ts b/packages/cli/cli/commands/dev.ts index fd231bc4..ff60f381 100644 --- a/packages/cli/cli/commands/dev.ts +++ b/packages/cli/cli/commands/dev.ts @@ -5,7 +5,7 @@ import {blueBright, gray} from 'colorette'; import {getTiniProject} from '@tinijs/project'; -import {exposeEnvs, loadBuilder} from '../utils/build.js'; +import {exposeEnvs, loadCompiler, loadBuilder} from '../utils/build.js'; import {createCLICommand} from '../utils/cli.js'; export const devCommand = createCLICommand( @@ -20,6 +20,7 @@ export const devCommand = createCLICommand( const {config: tiniConfig, hooks} = tiniProject; // preparation exposeEnvs(tiniConfig, 'development'); + const compiler = await loadCompiler(tiniProject); const builder = await loadBuilder(tiniProject); // start dev await hooks.callHook('dev:before'); @@ -28,15 +29,20 @@ export const devCommand = createCLICommand( } else { const devCommand = builder.dev.command; if (tiniConfig.compile !== false) { - const compileCmd = 'tini compile --watch'; + // initial compile + await compiler?.compile(); + // run compile and dev concurrently + const compileCmd = 'tini compile --watch --lazy'; const devCmd = typeof devCommand === 'string' ? devCommand : devCommand.join(' '); concurrently([{command: compileCmd}, {command: devCmd}]); - callbacks?.onShowDebug([compileCmd, devCmd]); + callbacks?.onShowDebug?.([compileCmd, devCmd]); + // server start const customOnServerStart = builder.dev.onServerStart; setTimeout( - () => callbacks?.onServerStart(builder.options, customOnServerStart), - 2000 + () => + callbacks?.onServerStart?.(builder.options, customOnServerStart), + 3000 ); } else { const [cmd, ...args] = diff --git a/packages/cli/cli/commands/docs.ts b/packages/cli/cli/commands/docs.ts index 46c8f722..2a5ac558 100644 --- a/packages/cli/cli/commands/docs.ts +++ b/packages/cli/cli/commands/docs.ts @@ -14,7 +14,7 @@ export const docsCommand = createCLICommand( }, }, (args, callbacks) => { - callbacks?.onOpen(HOME_URL); + callbacks?.onOpen?.(HOME_URL); open(HOME_URL); }, { diff --git a/packages/cli/cli/commands/generate.ts b/packages/cli/cli/commands/generate.ts index bb67dadc..1d6876ea 100644 --- a/packages/cli/cli/commands/generate.ts +++ b/packages/cli/cli/commands/generate.ts @@ -52,7 +52,7 @@ export const generateCommand = createCLICommand( }; const generator = availableGenerators[args.type]; if (!generator) { - return callbacks?.onInvalid(args.type, availableGenerators); + return callbacks?.onInvalid?.(args.type, availableGenerators); } const templates = await generator( { @@ -67,13 +67,13 @@ export const generateCommand = createCLICommand( ); const {fullPath: mainFullPath} = templates[0]; if (pathExistsSync(mainFullPath)) { - return callbacks?.onExists(args.type, templates[0]); + return callbacks?.onExists?.(args.type, templates[0]); } // save files for (let i = 0; i < templates.length; i++) { const {fullPath, content} = templates[i]; await outputFile(fullPath, content); - callbacks?.onOutput(templates[i]); + callbacks?.onOutput?.(templates[i]); } }, { diff --git a/packages/cli/cli/commands/info.ts b/packages/cli/cli/commands/info.ts index 4115d652..a26e794f 100644 --- a/packages/cli/cli/commands/info.ts +++ b/packages/cli/cli/commands/info.ts @@ -42,7 +42,7 @@ Working directory: ${blueBright(cwd)} 👉 Suggest an improvement: ${blueBright('https://discord.gg/EABbZVbPAb')} 👉 Read documentation: ${blueBright(HOME_URL)} `; - callbacks?.onPrint(info); + callbacks?.onPrint?.(info); }, { onPrint: (info: string) => console.log(info), diff --git a/packages/cli/cli/commands/module-add.ts b/packages/cli/cli/commands/module-add.ts index 972ca629..960c1a7d 100644 --- a/packages/cli/cli/commands/module-add.ts +++ b/packages/cli/cli/commands/module-add.ts @@ -40,28 +40,28 @@ export const moduleAddCommand = createCLICommand( await installPackage(args.packageName, args.version); // handle init - callbacks?.onStart(args.packageName); + callbacks?.onStart?.(args.packageName); const moduleConfig = await loadVendorModule(args.packageName); if (moduleConfig?.init) { const {copy, scripts, buildCommand, run} = moduleConfig.init(tiniConfig); // copy assets if (copy) { - callbacks?.onCopyAssets(); + callbacks?.onCopyAssets?.(); await copyAssets(args.packageName, copy); } // add scripts if (scripts) { - callbacks?.onUpdateScripts(); + callbacks?.onUpdateScripts?.(); await updateScripts(scripts, buildCommand); } // run if (run) { - callbacks?.onInitRun(); + callbacks?.onInitRun?.(); await initRun(run); } } // done - callbacks?.onEnd(args.packageName); + callbacks?.onEnd?.(args.packageName); }, { onStart: (packageName: string) => { diff --git a/packages/cli/cli/commands/module.ts b/packages/cli/cli/commands/module.ts index 4aed6045..9318a26a 100644 --- a/packages/cli/cli/commands/module.ts +++ b/packages/cli/cli/commands/module.ts @@ -3,7 +3,7 @@ import {createCLICommand, resolveCommand} from '../utils/cli.js'; export const moduleCommand = createCLICommand({ meta: { name: 'module', - description: 'Tools for the working with extendable modules.', + description: 'Working with extendable modules.', }, subCommands: { add: () => import('./module-add.js').then(resolveCommand), diff --git a/packages/cli/cli/commands/new.ts b/packages/cli/cli/commands/new.ts index c26c3d26..996b6637 100644 --- a/packages/cli/cli/commands/new.ts +++ b/packages/cli/cli/commands/new.ts @@ -58,7 +58,7 @@ export const newCommand = createCLICommand( .replace(/ /g, '-'); const projectPath = resolve(projectName); if (pathExistsSync(projectPath)) { - return callbacks?.onProjectExists(projectName); + return callbacks?.onProjectExists?.(projectName); } // process template const template = args.template || 'bare'; @@ -66,14 +66,14 @@ export const newCommand = createCLICommand( ? template : `tinijs/${template}-starter`; const tag = args.version || (await fetchLatestReleaseTag(repo)); - if (!tag) return callbacks?.onInvalidTag(repo); + if (!tag) return callbacks?.onInvalidTag?.(repo); // download and unzip const resourceUrl = `https://api.github.com/repos/${repo}/zipball/${tag}`; - callbacks?.onBeforeCreate(projectName, resourceUrl); + callbacks?.onBeforeCreate?.(projectName, resourceUrl); try { await downloadAndUnzip(resourceUrl, projectPath + '/download.zip'); } catch (error) { - return callbacks?.onCorruptedResource(); + return callbacks?.onCorruptedResource?.(); } // post process const execaOptions = { @@ -91,7 +91,7 @@ export const newCommand = createCLICommand( // instruction const {version: tiniVersion} = await loadCLIPackageJSON(); const tiniConfigPath = getTiniConfigFilePath(projectPath); - callbacks?.onEnd(projectName, tiniVersion, tiniConfigPath); + callbacks?.onEnd?.(projectName, tiniVersion, tiniConfigPath); }, { onProjectExists: (projectName: string) => diff --git a/packages/cli/cli/commands/preview.ts b/packages/cli/cli/commands/preview.ts index 3bc662e4..780514b5 100644 --- a/packages/cli/cli/commands/preview.ts +++ b/packages/cli/cli/commands/preview.ts @@ -52,7 +52,7 @@ export const previewCommand = createCLICommand( config, debug: false, }) - .listen(() => callbacks?.onServerStart(hostname, port)); + .listen(() => callbacks?.onServerStart?.(hostname, port)); }, { onServerStart: (hostname: string, port: number) => diff --git a/packages/cli/cli/commands/watch.ts b/packages/cli/cli/commands/watch.ts new file mode 100644 index 00000000..f790ceaa --- /dev/null +++ b/packages/cli/cli/commands/watch.ts @@ -0,0 +1,87 @@ +import {resolve} from 'pathe'; +import {execa} from 'execa'; +import {consola} from 'consola'; +import {gray, green} from 'colorette'; +import {remove} from 'fs-extra/esm'; +import {concurrently} from 'concurrently'; + +import {getTiniProject, getProjectDirs} from '@tinijs/project'; + +import {exposeEnvs, loadCompiler, loadBuilder} from '../utils/build.js'; +import {createCLICommand} from '../utils/cli.js'; + +export const watchCommand = createCLICommand( + { + meta: { + name: 'watch', + description: 'Watch and build the app.', + }, + args: { + lazy: { + alias: 'l', + type: 'boolean', + description: 'No initial actions, only watch for changes.', + }, + clean: { + alias: 'c', + type: 'boolean', + description: 'Clean the output dir.', + }, + }, + }, + async (args, callbacks) => { + const tiniProject = await getTiniProject(); + const {config: tiniConfig, hooks} = tiniProject; + const {entryDir, outDir} = getProjectDirs(tiniConfig); + // preparation + exposeEnvs(tiniConfig, 'development'); + const compiler = await loadCompiler(tiniProject); + const builder = await loadBuilder(tiniProject); + // clean + if (args.clean) await remove(resolve(outDir)); + // start watch + await hooks.callHook('watch:before'); + if (builder.watch instanceof Function) { + await builder.watch(); + } else { + const watchCommand = builder.watch.command; + if (tiniConfig.compile !== false) { + // initial actions + if (!args.lazy) { + await hooks.callHook('dev:before'); + await compiler?.compile(); + } + // run compile and watch concurrently + const compileCmd = 'tini compile --watch --lazy'; + const watchCmd = + typeof watchCommand === 'string' + ? watchCommand + : watchCommand.join(' '); + concurrently([{command: compileCmd}, {command: watchCmd}]); + callbacks?.onShowDebug?.([compileCmd, watchCmd]); + // watch start + callbacks?.onWatchStart?.(entryDir, outDir); + } else { + const [cmd, ...args] = + typeof watchCommand !== 'string' + ? watchCommand + : watchCommand.split(' '); + await execa(cmd, args, {stdio: 'inherit'}); + } + } + }, + { + onShowDebug: (commands: string[]) => + consola.info( + `Concurrently running ${commands + .map(command => gray(command)) + .join(' & ')}` + ), + onWatchStart: (entryDir: string, outDir: string) => + consola.info( + `Watch ${green(entryDir)} and build app to ${green(outDir)}.` + ), + } +); + +export default watchCommand; diff --git a/packages/cli/cli/index.ts b/packages/cli/cli/index.ts index 848ab51c..8baf7efb 100644 --- a/packages/cli/cli/index.ts +++ b/packages/cli/cli/index.ts @@ -25,6 +25,8 @@ async function getCommands(tiniProject: TiniProject) { import('./commands/compile.js').then(resolveCommand); if (!noBuiltins && cliConfig?.dev !== false) commands.dev = () => import('./commands/dev.js').then(resolveCommand); + if (!noBuiltins && cliConfig?.watch !== false) + commands.watch = () => import('./commands/watch.js').then(resolveCommand); if (!noBuiltins && cliConfig?.build !== false) commands.build = () => import('./commands/build.js').then(resolveCommand); if (!noBuiltins && cliConfig?.preview !== false) diff --git a/packages/cli/cli/utils/build.ts b/packages/cli/cli/utils/build.ts index 6e032f41..d57b1cc8 100644 --- a/packages/cli/cli/utils/build.ts +++ b/packages/cli/cli/utils/build.ts @@ -80,9 +80,7 @@ export async function parseCompileFileContext( ); const isAppEntry = path.endsWith(`${srcDir}/index.html`); const isAppRoot = path.endsWith(`${srcDir}/app.ts`); - const isActiveConfig = path.endsWith( - `${srcDir}/${dirs.configs}/${process.env.TARGET_ENV}.ts` - ); + const isActiveConfig = path.endsWith(`${srcDir}/${dirs.configs}/${env}.ts`); return { env, isDevelopment, diff --git a/packages/cli/cli/utils/cli.ts b/packages/cli/cli/utils/cli.ts index 68c38d46..52c7d1c9 100644 --- a/packages/cli/cli/utils/cli.ts +++ b/packages/cli/cli/utils/cli.ts @@ -22,7 +22,7 @@ import {loadProjectPackageJSON} from './project.js'; // @ts-ignore const jiti = initJiti(import.meta.url) as JITI; -const OFFICIAL_EXPANSIONS = ['@tinijs/content', '@tinijs/ui']; +const OFFICIAL_EXPANSIONS = ['@tinijs/content', '@tinijs/ui', '@tinijs/server']; export function resolveCommand(m: any) { return m.default.def as Promise; diff --git a/packages/cli/cli/utils/message.ts b/packages/cli/cli/utils/message.ts index 0325eca0..20bda5bd 100644 --- a/packages/cli/cli/utils/message.ts +++ b/packages/cli/cli/utils/message.ts @@ -14,18 +14,34 @@ export function infoRunHook(sourceName: string, hookName: string) { consola.info(`[${magenta(sourceName)}] Run hook ${green(hookName)}`); } -export function warnManualRegisterModule(moduleName: string) { - consola.warn( - 'Unable to modify Tini config, please add the following code manually:' - ); +export function warnManualConfig( + code: string, + text?: string, + blocks?: [string, string?] +) { + text ||= `Unable to modify ${blueBright( + TINI_CONFIG_TS_FILE + )}, please add the following code:`; + const [beginBLock = 'export default defineTiniConfig({', endBlock = '});'] = + blocks || []; + consola.warn(text); consola.box( - `// File: ${blueBright(TINI_CONFIG_TS_FILE)}\n -${gray('export default defineTiniConfig({')} - modules: [${green(`'${moduleName}'`)}] -${gray('});')}` + `${gray(beginBLock)} +${code} +${gray(endBlock)}` ); } +export function warnManualConfigWithoutTiniApp(content: string, text?: string) { + text ||= + "It seems like you're using one or more features provided by the Tini Platform without a Tini app. If so, please config:"; + consola.warn(`${text}\n${content}`); +} + +export function warnManualRegisterModule(moduleName: string) { + warnManualConfig(` modules: [${green(`'${moduleName}'`)}]`); +} + export function errorModuleRequireTiniApp(moduleName: string) { consola.error( `Module ${blueBright(moduleName)} requires a valid Tini app to work.` diff --git a/packages/cli/cli/utils/modify.ts b/packages/cli/cli/utils/modify.ts index 2d773703..c0d081f8 100644 --- a/packages/cli/cli/utils/modify.ts +++ b/packages/cli/cli/utils/modify.ts @@ -9,7 +9,7 @@ import { } from 'cheerio'; import type {Options as PrettierOptions} from 'prettier'; import type {Promisable} from 'type-fest'; -import {getTiniConfigFilePath} from '@tinijs/project'; +import {getTiniConfigFilePathOrThrow} from '@tinijs/project'; import {formatHTML, formatTS} from './format.js'; @@ -180,8 +180,15 @@ export class ModifyConfigAlike { return this as ModifyConfigAlike; } + setOption(optionKey: string, value: string) { + if (!this.content.includes(`\n ${optionKey}: `)) { + return this.addOption(`${optionKey}: ${value},`); + } + return this as ModifyConfigAlike; + } + addObjectEntry(optionKey: string, value: string) { - const optionKeyMatching = `${optionKey}: {`; + const optionKeyMatching = `\n ${optionKey}: {`; if (!this.content.includes(optionKeyMatching)) { return this.addOption(`${optionKey}: {${value}},`); } else { @@ -194,7 +201,7 @@ export class ModifyConfigAlike { } addArrayItem(optionKey: string, value: string) { - const optionKeyMatching = `${optionKey}: [`; + const optionKeyMatching = `\n ${optionKey}: [`; if (!this.content.includes(optionKeyMatching)) { return this.addOption(`${optionKey}: [${value}],`); } else { @@ -231,10 +238,14 @@ export async function modifyConfigAlikeFile( ); } +export async function setTiniConfigOption(optionKey: string, value: string) { + return modifyConfigAlikeFile(getTiniConfigFilePathOrThrow(), modify => + modify.setOption(optionKey, value) + ); +} + export async function registerTiniConfigModule(moduleName: string) { - const tiniConfigPath = getTiniConfigFilePath(); - if (!tiniConfigPath) throw new Error('Cannot find a valid Tini config file!'); - return modifyConfigAlikeFile(tiniConfigPath, modify => + return modifyConfigAlikeFile(getTiniConfigFilePathOrThrow(), modify => modify.addArrayItem('modules', `'${moduleName}'`) ); } diff --git a/packages/content/cli/commands/content.ts b/packages/content/cli/commands/content.ts index 43ef5bcf..75f52b8d 100644 --- a/packages/content/cli/commands/content.ts +++ b/packages/content/cli/commands/content.ts @@ -3,7 +3,7 @@ import {createCLICommand, resolveCommand} from '@tinijs/cli'; export const contentCommand = createCLICommand({ meta: { name: 'content', - description: 'Tools for the content module.', + description: 'Tools for Tini Content.', }, subCommands: { build: () => import('./content-build.js').then(resolveCommand), diff --git a/packages/content/cli/expand.ts b/packages/content/cli/expand.ts index 4342275d..1d2d4dbb 100644 --- a/packages/content/cli/expand.ts +++ b/packages/content/cli/expand.ts @@ -2,7 +2,9 @@ import {defineTiniCLIExpansion, resolveCommand} from '@tinijs/cli'; import {PACKAGE_NAME} from '../lib/consts/common.js'; -export default defineTiniCLIExpansion({ +export type ContentCLIExpansionOptions = {}; + +export default defineTiniCLIExpansion({ meta: { name: PACKAGE_NAME, }, diff --git a/packages/parcel-builder/lib/index.ts b/packages/parcel-builder/lib/index.ts index 167f40d7..9c3b725d 100644 --- a/packages/parcel-builder/lib/index.ts +++ b/packages/parcel-builder/lib/index.ts @@ -31,6 +31,12 @@ export class ParcelBuilder implements Builder { }; } + get watch() { + return { + command: this.commands.watchCommand, + }; + } + get build() { return { command: this.commands.buildCommand, @@ -39,8 +45,15 @@ export class ParcelBuilder implements Builder { private get commands() { const {entryDir, outDir} = getProjectDirs(this.tiniProject.config); - const {configPath, devCommand, devHost, devPort, buildCommand, sourcemap} = - this.options; + const { + configPath, + devCommand, + devHost, + devPort, + watchCommand, + buildCommand, + sourcemap, + } = this.options; const entryFilePath = `${entryDir}/index.html`; const configArgs = [ '--config', @@ -63,6 +76,16 @@ export class ParcelBuilder implements Builder { ...hostArgs, ...portArgs, ].filter(Boolean), + watchCommand: + watchCommand || + [ + 'parcel', + 'watch', + entryFilePath, + ...configArgs, + ...outDirArgs, + ...sourcemapArgs, + ].filter(Boolean), buildCommand: buildCommand || [ diff --git a/packages/project/lib/classes/project.ts b/packages/project/lib/classes/project.ts index 780a5b0e..c305ee6b 100644 --- a/packages/project/lib/classes/project.ts +++ b/packages/project/lib/classes/project.ts @@ -69,6 +69,12 @@ export function getTiniConfigFilePath(dir = '.') { return configFilePath; } +export function getTiniConfigFilePathOrThrow(dir?: string) { + const tiniConfigPath = getTiniConfigFilePath(dir); + if (!tiniConfigPath) throw new Error('No valid Tini config file found!'); + return tiniConfigPath; +} + export async function loadTiniConfig(dir?: string) { const defaultConfig: TiniConfig = { srcDir: DEFAULT_SRC_DIR, diff --git a/packages/project/lib/types/build.ts b/packages/project/lib/types/build.ts index bdaf1bde..e80253f8 100644 --- a/packages/project/lib/types/build.ts +++ b/packages/project/lib/types/build.ts @@ -9,6 +9,8 @@ export interface CommonBuildOptions { devPort?: number; devHost?: string; onDevServerStart?: () => void; + // watch + watchCommand?: string | string[]; // build buildCommand?: string | string[]; } @@ -21,6 +23,11 @@ export interface Builder { command: string | string[]; onServerStart?: () => void; }; + watch: + | (() => Promise) + | { + command: string | string[]; + }; build: | (() => Promise) | { @@ -37,6 +44,7 @@ export type CustomBuildConfig = (tiniProject: TiniProject) => Builder; export interface BuildHooks { 'dev:before': () => ReturnType; + 'watch:before': () => ReturnType; 'build:before': () => ReturnType; 'build:after': () => ReturnType; } diff --git a/packages/project/lib/types/cli.ts b/packages/project/lib/types/cli.ts index 42656efe..b15b4601 100644 --- a/packages/project/lib/types/cli.ts +++ b/packages/project/lib/types/cli.ts @@ -28,6 +28,7 @@ export interface CLIConfig { generate?: false | CLIGenerateCommandConfig; compile?: false; dev?: false; + watch?: false; build?: false; preview?: false; module?: false; diff --git a/packages/pwa/module/index.ts b/packages/pwa/module/index.ts index a02717a5..4193f5d1 100644 --- a/packages/pwa/module/index.ts +++ b/packages/pwa/module/index.ts @@ -17,11 +17,11 @@ import {PACKAGE_NAME} from '../lib/consts.js'; import {injectMetaTags, injectServiceWorker} from './utils/init.js'; import {processSW} from './utils/setup.js'; -export interface PWAModuleOptions { +export type PWAModuleOptions = { precaching?: false | Partial; -} +}; -export default defineTiniModule({ +export default defineTiniModule({ meta: { name: PACKAGE_NAME, }, diff --git a/packages/server/assets/.gitignore b/packages/server/assets/.gitignore new file mode 100644 index 00000000..e55fdae4 --- /dev/null +++ b/packages/server/assets/.gitignore @@ -0,0 +1,2 @@ +.nitro +public diff --git a/packages/server/assets/api/index.ts b/packages/server/assets/api/index.ts new file mode 100644 index 00000000..f1f8659e --- /dev/null +++ b/packages/server/assets/api/index.ts @@ -0,0 +1,3 @@ +export default eventHandler(() => { + return {apiRoute: true}; +}); diff --git a/packages/server/assets/app.ts b/packages/server/assets/app.ts new file mode 100644 index 00000000..9b04f3a3 --- /dev/null +++ b/packages/server/assets/app.ts @@ -0,0 +1,3 @@ +import {createServerApp} from '@tinijs/server'; + +export const app = createServerApp(); diff --git a/packages/server/assets/nitro.config.ts b/packages/server/assets/nitro.config.ts new file mode 100644 index 00000000..11d87a0a --- /dev/null +++ b/packages/server/assets/nitro.config.ts @@ -0,0 +1,7 @@ +//https://nitro.unjs.io/config +export default defineNitroConfig({ + serveStatic: true, + output: { + dir: '../.output', + }, +}); diff --git a/packages/server/assets/routes/[...].ts b/packages/server/assets/routes/[...].ts new file mode 100644 index 00000000..f2701126 --- /dev/null +++ b/packages/server/assets/routes/[...].ts @@ -0,0 +1,5 @@ +import {app} from '../app.js'; + +export default eventHandler(() => { + return app.serve(); +}); diff --git a/packages/server/assets/routes/index.ts b/packages/server/assets/routes/index.ts new file mode 100644 index 00000000..f2701126 --- /dev/null +++ b/packages/server/assets/routes/index.ts @@ -0,0 +1,5 @@ +import {app} from '../app.js'; + +export default eventHandler(() => { + return app.serve(); +}); diff --git a/packages/server/assets/tsconfig.json b/packages/server/assets/tsconfig.json new file mode 100644 index 00000000..d32e2ef7 --- /dev/null +++ b/packages/server/assets/tsconfig.json @@ -0,0 +1,4 @@ +// https://nitro.unjs.io/guide/typescript +{ + "extends": "./.nitro/types/tsconfig.json" +} diff --git a/packages/server/cli/commands/server-build.ts b/packages/server/cli/commands/server-build.ts new file mode 100644 index 00000000..31a2c455 --- /dev/null +++ b/packages/server/cli/commands/server-build.ts @@ -0,0 +1,30 @@ +import {execa} from 'execa'; +import {getProjectDirs} from '@tinijs/project'; +import {createCLICommand} from '@tinijs/cli'; + +import serverCLIExpansion from '../expand.js'; + +import {loadNitroConfig} from '../utils/nitro.js'; +import {buildApp, preNitroBuild, postNitroBuild} from '../utils/build.js'; + +export const serverBuildCommand = createCLICommand( + { + meta: { + name: 'build', + description: 'Build the server.', + }, + }, + async () => { + const {options, tiniProject} = serverCLIExpansion.context; + const {outDir: appOutDir} = getProjectDirs(tiniProject.config); + const {output: nitroOutput} = await loadNitroConfig(); + // build client app + await buildApp(options.appBuildCommand); + // build using Nitro + const indexHTMLContent = await preNitroBuild(appOutDir); + await execa('nitro', ['build', '--dir', 'server'], {stdio: 'inherit'}); + await postNitroBuild(nitroOutput.dir, indexHTMLContent); + } +); + +export default serverBuildCommand; diff --git a/packages/server/cli/commands/server-dev.ts b/packages/server/cli/commands/server-dev.ts new file mode 100644 index 00000000..620e4e31 --- /dev/null +++ b/packages/server/cli/commands/server-dev.ts @@ -0,0 +1,56 @@ +import {resolve} from 'pathe'; +import {gray, blueBright} from 'colorette'; +import {consola} from 'consola'; +import {concurrently} from 'concurrently'; +import {watch} from 'chokidar'; +import {createCLICommand, exposeEnvs, loadCompiler} from '@tinijs/cli'; + +import serverCLIExpansion from '../expand.js'; + +import {onServerPublicChange} from '../utils/build.js'; + +export const serverDevCommand = createCLICommand( + { + meta: { + name: 'dev', + description: 'Start the development server.', + }, + }, + async (args, callbacks) => { + const {options, tiniProject} = serverCLIExpansion.context; + const {config: tiniConfig, hooks} = tiniProject; + const {appBuildCommand, appWatchCommand} = options; + // preparation + exposeEnvs(tiniConfig, 'development'); + const compiler = await loadCompiler(tiniProject); + // initial actions + await hooks.callHook('dev:before'); + await compiler?.compile(); + // watch for index.html changes + watch(resolve('server', 'public'), {ignoreInitial: true}) + .on('add', onServerPublicChange) + .on('change', onServerPublicChange); + // watch client app and start Nitro dev server + const watchCmd = !appWatchCommand + ? 'tini watch --lazy' + : typeof appWatchCommand === 'string' + ? appWatchCommand + : appWatchCommand.join(' '); + const nitroDevCmd = 'nitro dev --dir server --port 3000'; + concurrently([{command: watchCmd}, {command: nitroDevCmd}]); + callbacks?.onShowDebug?.([watchCmd, nitroDevCmd]); + setTimeout(() => callbacks?.onServerStart?.(), 3000); + }, + { + onShowDebug: (commands: string[]) => + consola.info( + `Concurrently running ${commands + .map(command => gray(command)) + .join(' & ')}` + ), + onServerStart: () => + consola.info(`Server running at: ${blueBright('http://localhost:3000')}`), + } +); + +export default serverDevCommand; diff --git a/packages/server/cli/commands/server-preview.ts b/packages/server/cli/commands/server-preview.ts new file mode 100644 index 00000000..2e38990b --- /dev/null +++ b/packages/server/cli/commands/server-preview.ts @@ -0,0 +1,25 @@ +import {relative, resolve} from 'pathe'; +import {execa} from 'execa'; +import {createCLICommand} from '@tinijs/cli'; + +import {loadNitroConfig} from '../utils/nitro.js'; + +export const serverDevCommand = createCLICommand( + { + meta: { + name: 'preview', + description: 'Preview the production build.', + }, + }, + async () => { + const {output: nitroOutput} = await loadNitroConfig(); + const serverIndex = resolve( + relative('.', nitroOutput.dir), + 'server', + 'index.mjs' + ); + execa('node', [serverIndex], {stdio: 'inherit'}); + } +); + +export default serverDevCommand; diff --git a/packages/server/cli/commands/server.ts b/packages/server/cli/commands/server.ts new file mode 100644 index 00000000..42f1bad1 --- /dev/null +++ b/packages/server/cli/commands/server.ts @@ -0,0 +1,15 @@ +import {createCLICommand, resolveCommand} from '@tinijs/cli'; + +export const serverCommand = createCLICommand({ + meta: { + name: 'server', + description: 'Tools for Tini Server.', + }, + subCommands: { + dev: () => import('./server-dev.js').then(resolveCommand), + build: () => import('./server-build.js').then(resolveCommand), + preview: () => import('./server-preview.js').then(resolveCommand), + }, +}); + +export default serverCommand; diff --git a/packages/server/cli/expand.spec.ts b/packages/server/cli/expand.spec.ts new file mode 100644 index 00000000..a8527ea3 --- /dev/null +++ b/packages/server/cli/expand.spec.ts @@ -0,0 +1,5 @@ +import {test, expect} from 'vitest'; + +test('should pass', async () => { + expect(1 + 1).toBe(2); +}); diff --git a/packages/server/cli/expand.ts b/packages/server/cli/expand.ts new file mode 100644 index 00000000..1e08c840 --- /dev/null +++ b/packages/server/cli/expand.ts @@ -0,0 +1,19 @@ +import {defineTiniCLIExpansion, resolveCommand} from '@tinijs/cli'; + +import {PACKAGE_NAME} from '../lib/consts/common.js'; + +export type ServerCLIExpansionOptions = { + appWatchCommand?: string | string[]; + appBuildCommand?: string | string[]; +}; + +export default defineTiniCLIExpansion({ + meta: { + name: PACKAGE_NAME, + }, + setup() { + return { + server: () => import('./commands/server.js').then(resolveCommand), + }; + }, +}); diff --git a/packages/server/cli/public-api.ts b/packages/server/cli/public-api.ts new file mode 100644 index 00000000..038982d2 --- /dev/null +++ b/packages/server/cli/public-api.ts @@ -0,0 +1 @@ +export * from './commands/server-build.js'; diff --git a/packages/server/cli/utils/build.ts b/packages/server/cli/utils/build.ts new file mode 100644 index 00000000..e93e3f2b --- /dev/null +++ b/packages/server/cli/utils/build.ts @@ -0,0 +1,39 @@ +import {readFile} from 'node:fs/promises'; +import {remove, outputFile, copy} from 'fs-extra/esm'; +import {execa} from 'execa'; +import {resolve} from 'pathe'; + +import type {ServerCLIExpansionOptions} from '../expand.js'; + +export async function buildApp( + appBuildCommand: ServerCLIExpansionOptions['appBuildCommand'], + quietly = false +) { + const [appBuildCmd, ...appBuildArgs] = !appBuildCommand + ? ['tini', 'build'] + : appBuildCommand instanceof Array + ? appBuildCommand + : appBuildCommand.split(' '); + await execa( + appBuildCmd, + appBuildArgs, + quietly ? undefined : {stdio: 'inherit'} + ); +} + +export async function preNitroBuild(appOutDir: string) { + const indexHTMLPath = resolve(appOutDir, 'index.html'); + const indexHTMLContent = await readFile(indexHTMLPath, 'utf8'); + await remove(indexHTMLPath); + return indexHTMLContent; +} + +export async function postNitroBuild(outDir: string, indexHTMLContent: string) { + return outputFile(resolve(outDir, 'server', 'index.html'), indexHTMLContent); +} + +export async function onServerPublicChange(path: string) { + if (!path.endsWith('/server/public/index.html')) return; + await copy(path, resolve('server', '.nitro', 'dev', 'index.html')); + await remove(path); +} diff --git a/packages/server/cli/utils/nitro.ts b/packages/server/cli/utils/nitro.ts new file mode 100644 index 00000000..65ebedff --- /dev/null +++ b/packages/server/cli/utils/nitro.ts @@ -0,0 +1,25 @@ +// @ts-ignore +import {createNitro} from 'nitropack'; + +// https://github.com/unjs/nitro/blob/main/src/types/nitro.ts +export interface Nitro { + options: NitroConfig; +} + +export interface NitroConfig { + output: { + dir: string; + }; +} + +export async function loadNitro() { + return createNitro({ + rootDir: 'server', + dev: false, + }) as Nitro; +} + +export async function loadNitroConfig() { + const {options: nitroConfig} = await loadNitro(); + return nitroConfig; +} diff --git a/packages/server/lib/classes/app.ts b/packages/server/lib/classes/app.ts new file mode 100644 index 00000000..0490bff2 --- /dev/null +++ b/packages/server/lib/classes/app.ts @@ -0,0 +1,32 @@ +import {resolve, parse} from 'node:path'; +import {fileURLToPath} from 'node:url'; +import {readFile} from 'node:fs/promises'; + +export type AppOptions = {}; + +export function createServerApp(entryURL: string, options?: AppOptions) { + return new ServerApp(entryURL, options); +} + +export class ServerApp { + private entryPath = fileURLToPath(this.entryURL); + private isDevelopment = this.entryPath.includes('/.nitro/dev/'); + private originalIndexHTML?: string; + + constructor( + private entryURL: string, + public readonly options: AppOptions = {} + ) {} + + private async readIndexHtml() { + const read = async () => + readFile(resolve(parse(this.entryPath).dir, 'index.html'), 'utf8'); + return this.isDevelopment + ? await read() + : (this.originalIndexHTML ||= await read()); + } + + async serve() { + return this.readIndexHtml(); + } +} diff --git a/packages/server/lib/public-api.ts b/packages/server/lib/public-api.ts index 47309456..7206a533 100644 --- a/packages/server/lib/public-api.ts +++ b/packages/server/lib/public-api.ts @@ -1 +1,3 @@ export * from './consts/common.js'; + +export * from './classes/app.js'; diff --git a/packages/server/module/index.ts b/packages/server/module/index.ts new file mode 100644 index 00000000..91993603 --- /dev/null +++ b/packages/server/module/index.ts @@ -0,0 +1,44 @@ +import {defineTiniModule, checkPotentialTiniApp} from '@tinijs/project'; +import {setTiniConfigOption} from '@tinijs/cli'; + +import {PACKAGE_NAME} from '../lib/consts/common.js'; +import { + prepareNitro, + showConfigInstruction, + showConfigInstructionWithoutTiniApp, +} from './utils/init.js'; + +export type ServerModuleOptions = {}; + +export default defineTiniModule({ + meta: { + name: PACKAGE_NAME, + }, + init(tiniConfig) { + return { + copy: { + assets: 'server', + }, + scripts: { + dev: 'tini server dev', + build: 'tini server build', + preview: 'tini server preview', + }, + async run() { + await prepareNitro(); + if (checkPotentialTiniApp(tiniConfig)) { + try { + await setTiniConfigOption('outDir', './server/public'); + } catch (error) { + setTimeout(() => showConfigInstruction(), 300); + } + } else { + showConfigInstructionWithoutTiniApp(); + } + }, + }; + }, + setup() { + // eslint-disable-next-line no-empty + }, +}); diff --git a/packages/server/module/public-api.ts b/packages/server/module/public-api.ts new file mode 100644 index 00000000..f6b6802a --- /dev/null +++ b/packages/server/module/public-api.ts @@ -0,0 +1,3 @@ +export * from './utils/init.js'; + +export * from './index.js'; diff --git a/packages/server/module/utils/init.ts b/packages/server/module/utils/init.ts new file mode 100644 index 00000000..07b93c9f --- /dev/null +++ b/packages/server/module/utils/init.ts @@ -0,0 +1,21 @@ +import {execa} from 'execa'; +import {green, blueBright} from 'colorette'; +import {TINI_CONFIG_TS_FILE} from '@tinijs/project'; +import {warnManualConfig, warnManualConfigWithoutTiniApp} from '@tinijs/cli'; + +export async function prepareNitro() { + return execa('nitro', ['prepare', '--dir', 'server']); +} + +export function showConfigInstruction() { + warnManualConfig( + ` outDir: ${green("'./server/public'")}`, + `Please set the client app output in ${blueBright(TINI_CONFIG_TS_FILE)}:` + ); +} + +export function showConfigInstructionWithoutTiniApp() { + warnManualConfigWithoutTiniApp( + ` + Set the client app output to ${green('server/public')}` + ); +} diff --git a/packages/server/package.json b/packages/server/package.json index e95ade96..8ad6ced5 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -14,9 +14,14 @@ }, "type": "module", "exports": { - ".": "./dist/public-api.js" + ".": "./dist/public-api.js", + "./cli": "./dist/cli/public-api.js", + "./cli-expansion": "./dist/cli/expand.js", + "./module": "./dist/module/public-api.js", + "./module-loader": "./dist/module/index.js" }, "files": [ + "assets", "dist", "!**/*.spec.*" ], @@ -34,6 +39,15 @@ "url": "https://github.com/tinijs/tinijs/issues" }, "dependencies": { - "@tinijs/project": "*" + "@tinijs/cli": "*", + "@tinijs/project": "*", + "chokidar": "^3.6.0", + "colorette": "^2.0.20", + "concurrently": "^8.2.2", + "consola": "^3.2.3", + "execa": "^8.0.1", + "fs-extra": "^11.2.0", + "nitropack": "^2.9.6", + "pathe": "^1.1.2" } } diff --git a/packages/server/tsconfig.json b/packages/server/tsconfig.json index cc28376e..e6d298f3 100644 --- a/packages/server/tsconfig.json +++ b/packages/server/tsconfig.json @@ -7,4 +7,9 @@ "include": [ "**/*" ], + "exclude": [ + "node_modules", + "dist", + "assets" + ] } diff --git a/packages/ui/cli/commands/ui.ts b/packages/ui/cli/commands/ui.ts index 15abc4e0..039935a9 100644 --- a/packages/ui/cli/commands/ui.ts +++ b/packages/ui/cli/commands/ui.ts @@ -3,7 +3,7 @@ import {createCLICommand, resolveCommand} from '@tinijs/cli'; export const uiCommand = createCLICommand({ meta: { name: 'ui', - description: 'Tools for the Tini UI.', + description: 'Tools for Tini UI.', }, subCommands: { build: () => import('./ui-build.js').then(resolveCommand), diff --git a/packages/ui/cli/expand.ts b/packages/ui/cli/expand.ts index 087572df..350752b6 100644 --- a/packages/ui/cli/expand.ts +++ b/packages/ui/cli/expand.ts @@ -2,7 +2,9 @@ import {defineTiniCLIExpansion, resolveCommand} from '@tinijs/cli'; import {PACKAGE_NAME} from '../lib/consts/common.js'; -export default defineTiniCLIExpansion({ +export type UICLIExpansionOptions = {}; + +export default defineTiniCLIExpansion({ meta: { name: PACKAGE_NAME, }, diff --git a/packages/vite-builder/lib/index.ts b/packages/vite-builder/lib/index.ts index f6e9af2e..b4fe1c66 100644 --- a/packages/vite-builder/lib/index.ts +++ b/packages/vite-builder/lib/index.ts @@ -33,6 +33,12 @@ export class ViteBuilder implements Builder { }; } + get watch() { + return { + command: this.commands.watchCommand, + }; + } + get build() { return { command: this.commands.buildCommand, @@ -41,8 +47,14 @@ export class ViteBuilder implements Builder { private get commands() { const {entryDir, outDir} = getProjectDirs(this.tiniProject.config); - const {configPath, devCommand, devHost, devPort, buildCommand} = - this.options; + const { + configPath, + devCommand, + devHost, + devPort, + watchCommand, + buildCommand, + } = this.options; const configArgs = [ '--config', configPath || @@ -58,6 +70,17 @@ export class ViteBuilder implements Builder { ['vite', entryDir, ...configArgs, ...hostArgs, ...portArgs].filter( Boolean ), + watchCommand: + watchCommand || + [ + 'vite', + 'build', + entryDir, + ...configArgs, + ...outDirArgs, + '--watch', + '--emptyOutDir', + ].filter(Boolean), buildCommand: buildCommand || [ diff --git a/packages/webpack-builder/lib/index.ts b/packages/webpack-builder/lib/index.ts index d982963b..54926250 100644 --- a/packages/webpack-builder/lib/index.ts +++ b/packages/webpack-builder/lib/index.ts @@ -31,6 +31,12 @@ export class WebpackBuilder implements Builder { }; } + get watch() { + return { + command: this.commands.watchCommand, + }; + } + get build() { return { command: this.commands.buildCommand, @@ -39,8 +45,14 @@ export class WebpackBuilder implements Builder { private get commands() { const {outDir} = getProjectDirs(this.tiniProject.config); - const {configPath, devCommand, devHost, devPort, buildCommand} = - this.options; + const { + configPath, + devCommand, + devHost, + devPort, + watchCommand, + buildCommand, + } = this.options; const configArgs = [ '--config', configPath || @@ -63,6 +75,16 @@ export class WebpackBuilder implements Builder { '--mode', 'development', ].filter(Boolean), + watchCommand: + watchCommand || + [ + 'webpack', + 'watch', + ...configArgs, + ...outDirArgs, + '--mode', + 'development', + ].filter(Boolean), buildCommand: buildCommand || [ From d826d0731b2742b7f51cee01f5459a5f844c5b1f Mon Sep 17 00:00:00 2001 From: Nhan Lam Date: Wed, 1 May 2024 00:49:54 +0700 Subject: [PATCH 03/11] Update modules --- packages/cli/cli/commands/module-add.ts | 21 ++++++++----- packages/cli/cli/utils/module.ts | 41 +++++++++++++++++++------ packages/content/module/index.ts | 1 + packages/project/lib/classes/project.ts | 1 + packages/project/lib/types/module.ts | 1 + packages/pwa/module/index.ts | 1 + packages/server/assets/app.ts | 2 +- packages/server/lib/classes/app.ts | 4 +-- packages/server/module/index.ts | 4 ++- scripts/release-ui.mts | 1 + 10 files changed, 57 insertions(+), 20 deletions(-) diff --git a/packages/cli/cli/commands/module-add.ts b/packages/cli/cli/commands/module-add.ts index 960c1a7d..0cd57d39 100644 --- a/packages/cli/cli/commands/module-add.ts +++ b/packages/cli/cli/commands/module-add.ts @@ -1,4 +1,5 @@ -import {blueBright} from 'colorette'; +import {green, blueBright} from 'colorette'; +import {consola} from 'consola'; import ora from 'ora'; import {getTiniProject, loadVendorModule} from '@tinijs/project'; @@ -43,7 +44,8 @@ export const moduleAddCommand = createCLICommand( callbacks?.onStart?.(args.packageName); const moduleConfig = await loadVendorModule(args.packageName); if (moduleConfig?.init) { - const {copy, scripts, buildCommand, run} = moduleConfig.init(tiniConfig); + const {copy, scripts, devCommand, buildCommand, run} = + moduleConfig.init(tiniConfig); // copy assets if (copy) { callbacks?.onCopyAssets?.(); @@ -52,7 +54,7 @@ export const moduleAddCommand = createCLICommand( // add scripts if (scripts) { callbacks?.onUpdateScripts?.(); - await updateScripts(scripts, buildCommand); + await updateScripts(scripts, devCommand, buildCommand); } // run if (run) { @@ -61,19 +63,24 @@ export const moduleAddCommand = createCLICommand( } } // done - callbacks?.onEnd?.(args.packageName); + callbacks?.onEnd?.(args.packageName, moduleConfig?.meta.url); }, { onStart: (packageName: string) => { SPINNER.start( - `Load initial instruction for module ${blueBright(packageName)}.` + `Load initial instruction for module ${green(packageName)}.` ); }, onCopyAssets: () => (SPINNER.text = 'Copy assets.'), onUpdateScripts: () => (SPINNER.text = 'Update scripts.'), onInitRun: () => (SPINNER.text = 'Run initial tasks.'), - onEnd: (packageName: string) => - SPINNER.succeed(`Add module ${blueBright(packageName)} successfully.\n`), + onEnd: (packageName: string, url?: string) => { + SPINNER.succeed(`Add ${green(packageName)} successfully.`); + if (url) { + consola.info(`For usage detail, please visit: ${blueBright(url)}`); + } + console.log(''); + }, } ); diff --git a/packages/cli/cli/utils/module.ts b/packages/cli/cli/utils/module.ts index d632c260..e15f2cdf 100644 --- a/packages/cli/cli/utils/module.ts +++ b/packages/cli/cli/utils/module.ts @@ -7,12 +7,16 @@ import type {ModuleInit} from '@tinijs/project'; import {modifyProjectPackageJSON} from './project.js'; export async function installPackage(packageName: string, version?: string) { - return execa('npm', [ - 'i', - `${packageName}${!version ? '' : `@${version}`}`, - '--loglevel', - 'error', - ]); + return execa( + 'npm', + [ + 'i', + `${packageName}${!version ? '' : `@${version}`}`, + '--loglevel', + 'error', + ], + {stdio: 'inherit'} + ); } export async function copyAssets( @@ -30,22 +34,41 @@ export async function copyAssets( export async function updateScripts( scripts: NonNullable, + devCommand?: ModuleInit['devCommand'], buildCommand?: ModuleInit['buildCommand'] ) { - return modifyProjectPackageJSON(async data => { + let multipleDevCommands = false; + await modifyProjectPackageJSON(async data => { + // scripts.dev + const devCommands = [ + (data.scripts as any).dev, + !devCommand ? undefined : devCommand, + ].filter(Boolean); + multipleDevCommands = devCommands.length > 1; + const dev = !multipleDevCommands + ? devCommands[0] + : `concurrently ${devCommands.map(item => `"${item}"`).join(' ')}`; + // scripts.build const build = [ (data.scripts as any).build, - !buildCommand ? undefined : `npm run ${buildCommand}`, + !buildCommand ? undefined : buildCommand, ] .filter(Boolean) .join(' && '); + // update scripts data.scripts = { - ...scripts, ...data.scripts, + ...(!dev ? {} : {dev}), ...(!build ? {} : {build}), + ...scripts, }; + // save updated package.json return data; }); + // install concurrently + if (multipleDevCommands) { + await installPackage('concurrently'); + } } export async function initRun(run: NonNullable) { diff --git a/packages/content/module/index.ts b/packages/content/module/index.ts index 6d44d79e..77634dd2 100644 --- a/packages/content/module/index.ts +++ b/packages/content/module/index.ts @@ -14,6 +14,7 @@ export type ContentModuleOptions = Parameters[0]; export default defineTiniModule({ meta: { name: PACKAGE_NAME, + url: 'https://tinijs.dev/module/content', }, init(tiniConfig) { return { diff --git a/packages/project/lib/classes/project.ts b/packages/project/lib/classes/project.ts index c305ee6b..250deb13 100644 --- a/packages/project/lib/classes/project.ts +++ b/packages/project/lib/classes/project.ts @@ -25,6 +25,7 @@ const jiti = initJiti(import.meta.url) as JITI; export interface TiniIntegrationMeta { name: string; + url?: string; } export type TiniIntegration< diff --git a/packages/project/lib/types/module.ts b/packages/project/lib/types/module.ts index 9fbd535d..d2695753 100644 --- a/packages/project/lib/types/module.ts +++ b/packages/project/lib/types/module.ts @@ -9,6 +9,7 @@ import type { export interface ModuleInit { copy?: Record; scripts?: Record; + devCommand?: string; buildCommand?: string; run?: string | (() => Promisable); } diff --git a/packages/pwa/module/index.ts b/packages/pwa/module/index.ts index 4193f5d1..209a4633 100644 --- a/packages/pwa/module/index.ts +++ b/packages/pwa/module/index.ts @@ -24,6 +24,7 @@ export type PWAModuleOptions = { export default defineTiniModule({ meta: { name: PACKAGE_NAME, + url: 'https://tinijs.dev/module/pwa', }, init(tiniConfig) { if (!checkPotentialTiniApp(tiniConfig)) { diff --git a/packages/server/assets/app.ts b/packages/server/assets/app.ts index 9b04f3a3..090fab7b 100644 --- a/packages/server/assets/app.ts +++ b/packages/server/assets/app.ts @@ -1,3 +1,3 @@ import {createServerApp} from '@tinijs/server'; -export const app = createServerApp(); +export const app = createServerApp(import.meta.url); diff --git a/packages/server/lib/classes/app.ts b/packages/server/lib/classes/app.ts index 0490bff2..c1369d77 100644 --- a/packages/server/lib/classes/app.ts +++ b/packages/server/lib/classes/app.ts @@ -11,7 +11,7 @@ export function createServerApp(entryURL: string, options?: AppOptions) { export class ServerApp { private entryPath = fileURLToPath(this.entryURL); private isDevelopment = this.entryPath.includes('/.nitro/dev/'); - private originalIndexHTML?: string; + private indexHTMLContent?: string; constructor( private entryURL: string, @@ -23,7 +23,7 @@ export class ServerApp { readFile(resolve(parse(this.entryPath).dir, 'index.html'), 'utf8'); return this.isDevelopment ? await read() - : (this.originalIndexHTML ||= await read()); + : (this.indexHTMLContent ||= await read()); } async serve() { diff --git a/packages/server/module/index.ts b/packages/server/module/index.ts index 91993603..71594e92 100644 --- a/packages/server/module/index.ts +++ b/packages/server/module/index.ts @@ -13,6 +13,7 @@ export type ServerModuleOptions = {}; export default defineTiniModule({ meta: { name: PACKAGE_NAME, + url: 'https://tinijs.dev/server', }, init(tiniConfig) { return { @@ -20,6 +21,7 @@ export default defineTiniModule({ assets: 'server', }, scripts: { + 'dev:app': 'tini dev', dev: 'tini server dev', build: 'tini server build', preview: 'tini server preview', @@ -28,7 +30,7 @@ export default defineTiniModule({ await prepareNitro(); if (checkPotentialTiniApp(tiniConfig)) { try { - await setTiniConfigOption('outDir', './server/public'); + await setTiniConfigOption('outDir', "'./server/public'"); } catch (error) { setTimeout(() => showConfigInstruction(), 300); } diff --git a/scripts/release-ui.mts b/scripts/release-ui.mts index e712f2f2..6e1b1599 100644 --- a/scripts/release-ui.mts +++ b/scripts/release-ui.mts @@ -68,6 +68,7 @@ class ReleaseUI { for (const availablePackage of availablePackages) { await this.syncVersionAndTiniDependencies(availablePackage); await execa('npm', ['publish', '--access', 'public'], { + stdio: 'inherit', cwd: availablePackage.dirPath, }); } From 94d60c23881fafb382c15b615e1d1e9db8393536 Mon Sep 17 00:00:00 2001 From: Nhan Lam Date: Wed, 1 May 2024 09:13:46 +0700 Subject: [PATCH 04/11] Add server doc --- .../cli-posts/102 - expansion/index.md | 2 + .../content/cli-posts/206 - build/index.md | 15 ----- .../content/cli-posts/206 - watch/index.md | 22 +++++++ .../content/cli-posts/207 - build/index.md | 22 +++++++ .../{207 - preview => 208 - preview}/index.md | 0 .../index.md | 8 ++- .../content/cli-posts/302 - server/index.md | 23 +++++++ .../cli-posts/{302 - ui => 303 - ui}/index.md | 0 .../module-posts/102 - author-guide/index.md | 1 + .../content/module-posts/301 - pwa/index.md | 2 +- .../server-posts/101 - get-started/index.md | 64 ++++++++++++++++++- .../content/server-posts/102 - cli/index.md | 33 ++++++++++ 12 files changed, 174 insertions(+), 18 deletions(-) delete mode 100644 apps/tinijs.dev/content/cli-posts/206 - build/index.md create mode 100644 apps/tinijs.dev/content/cli-posts/206 - watch/index.md create mode 100644 apps/tinijs.dev/content/cli-posts/207 - build/index.md rename apps/tinijs.dev/content/cli-posts/{207 - preview => 208 - preview}/index.md (100%) rename apps/tinijs.dev/content/cli-posts/{208 - module-add => 209 - module-add}/index.md (67%) create mode 100644 apps/tinijs.dev/content/cli-posts/302 - server/index.md rename apps/tinijs.dev/content/cli-posts/{302 - ui => 303 - ui}/index.md (100%) create mode 100644 apps/tinijs.dev/content/server-posts/102 - cli/index.md diff --git a/apps/tinijs.dev/content/cli-posts/102 - expansion/index.md b/apps/tinijs.dev/content/cli-posts/102 - expansion/index.md index e7f1cee2..80146c3c 100644 --- a/apps/tinijs.dev/content/cli-posts/102 - expansion/index.md +++ b/apps/tinijs.dev/content/cli-posts/102 - expansion/index.md @@ -50,6 +50,7 @@ You can either start a new expansion or add to an existing project. Examples: - Tini Content CLI: + - Tini Server CLI: - Tini UI CLI: #### Start a new expansion @@ -76,6 +77,7 @@ export type MyCLIExpansionOptions = {}; export default defineTiniCLIExpansion({ meta: { name: 'some-name', + url: 'url-to-usage', // optional usage url }, setup(options, tini) { return { diff --git a/apps/tinijs.dev/content/cli-posts/206 - build/index.md b/apps/tinijs.dev/content/cli-posts/206 - build/index.md deleted file mode 100644 index 21606130..00000000 --- a/apps/tinijs.dev/content/cli-posts/206 - build/index.md +++ /dev/null @@ -1,15 +0,0 @@ -+++json -{ - "status": "publish", - "title": "build", - "category": "commands" -} -+++ - -Build the project. - -```bash -npx tini build -``` - -**TODO**: Add instructions for configuration. diff --git a/apps/tinijs.dev/content/cli-posts/206 - watch/index.md b/apps/tinijs.dev/content/cli-posts/206 - watch/index.md new file mode 100644 index 00000000..caea5835 --- /dev/null +++ b/apps/tinijs.dev/content/cli-posts/206 - watch/index.md @@ -0,0 +1,22 @@ ++++json +{ + "status": "publish", + "title": "watch", + "category": "commands" +} ++++ + +Watch for changes and rebuild without development server. + +```bash +npx tini watch +``` + +## Options + +| Option | Description | +| --- | --- | +| `--lazy` or `-l` | No initial build, only build for new changes. | +| `--clean` or `-c` | Clean the output dir before build. | + +**TODO**: Add instructions for configuation. diff --git a/apps/tinijs.dev/content/cli-posts/207 - build/index.md b/apps/tinijs.dev/content/cli-posts/207 - build/index.md new file mode 100644 index 00000000..e046a2cd --- /dev/null +++ b/apps/tinijs.dev/content/cli-posts/207 - build/index.md @@ -0,0 +1,22 @@ ++++json +{ + "status": "publish", + "title": "build", + "category": "commands" +} ++++ + +Build the project. + +```bash +npx tini build +``` + +## Options + +| Option | Description | +| --- | --- | +| `--target ` or `-t` | Target environment: production (default), stage, qa, ... | +| `--clean` or `-c` | Clean the output dir before build. | + +**TODO**: Add instructions for configuration. diff --git a/apps/tinijs.dev/content/cli-posts/207 - preview/index.md b/apps/tinijs.dev/content/cli-posts/208 - preview/index.md similarity index 100% rename from apps/tinijs.dev/content/cli-posts/207 - preview/index.md rename to apps/tinijs.dev/content/cli-posts/208 - preview/index.md diff --git a/apps/tinijs.dev/content/cli-posts/208 - module-add/index.md b/apps/tinijs.dev/content/cli-posts/209 - module-add/index.md similarity index 67% rename from apps/tinijs.dev/content/cli-posts/208 - module-add/index.md rename to apps/tinijs.dev/content/cli-posts/209 - module-add/index.md index 4c9f4927..5b4d6d42 100644 --- a/apps/tinijs.dev/content/cli-posts/208 - module-add/index.md +++ b/apps/tinijs.dev/content/cli-posts/209 - module-add/index.md @@ -12,7 +12,13 @@ Add a Tini Module to the project. Before add a module, you need to **commit or stash** any change in your project. ```bash -npx tini module add +npx tini module add ``` +## Options + +| Option | Description | +| --- | --- | +| `--version ` or `-v` | Use a custom version. | + Please see [modules page](/module) for more information. diff --git a/apps/tinijs.dev/content/cli-posts/302 - server/index.md b/apps/tinijs.dev/content/cli-posts/302 - server/index.md new file mode 100644 index 00000000..3ebc8eeb --- /dev/null +++ b/apps/tinijs.dev/content/cli-posts/302 - server/index.md @@ -0,0 +1,23 @@ ++++json +{ + "status": "publish", + "title": "server", + "category": "official-expansions" +} ++++ + +Expandable commands provided by the [Tini Server](/server). + + +```bash +# run development server +npx tini server dev + +# build production +npx tini server build + +# preview production +npx tini server preview +``` + +Please see more detail at [Server page](/server/cli). diff --git a/apps/tinijs.dev/content/cli-posts/302 - ui/index.md b/apps/tinijs.dev/content/cli-posts/303 - ui/index.md similarity index 100% rename from apps/tinijs.dev/content/cli-posts/302 - ui/index.md rename to apps/tinijs.dev/content/cli-posts/303 - ui/index.md diff --git a/apps/tinijs.dev/content/module-posts/102 - author-guide/index.md b/apps/tinijs.dev/content/module-posts/102 - author-guide/index.md index d1d54d8b..c1b6bb9d 100644 --- a/apps/tinijs.dev/content/module-posts/102 - author-guide/index.md +++ b/apps/tinijs.dev/content/module-posts/102 - author-guide/index.md @@ -34,6 +34,7 @@ export type MyModuleOptions = { export default defineTiniModule({ meta: { name: 'my-module', + url: 'url-to-usage', // optional usage url }, init() { return { diff --git a/apps/tinijs.dev/content/module-posts/301 - pwa/index.md b/apps/tinijs.dev/content/module-posts/301 - pwa/index.md index cdc31cca..3c4f4d8c 100644 --- a/apps/tinijs.dev/content/module-posts/301 - pwa/index.md +++ b/apps/tinijs.dev/content/module-posts/301 - pwa/index.md @@ -1,7 +1,7 @@ +++json { "status": "publish", - "title": "Get Started", + "title": "Install and Usage", "category": "pwa" } +++ diff --git a/apps/tinijs.dev/content/server-posts/101 - get-started/index.md b/apps/tinijs.dev/content/server-posts/101 - get-started/index.md index b9468053..e31f81fd 100644 --- a/apps/tinijs.dev/content/server-posts/101 - get-started/index.md +++ b/apps/tinijs.dev/content/server-posts/101 - get-started/index.md @@ -6,4 +6,66 @@ } +++ -**TODO**: Implement @tinijs/server. +**Tini Server** offers you an optional [Nitro](https://nitro.unjs.io/) server for server/API routes and other server stuffs. For now, beside the server/API routes usage, it will just serve the client app `index.html` like it is a single page app (no SSR just yet). + +To add Tini Server to an TiniJS project, you can use the [Tini CLI](/cli) (make sure you have it installed, if not run `npm i -D @tinijs/cli`). + +And commit or stage any changes you have made to your project. + +Then run the following command: + +```bash +npx tini module add @tinijs/server +``` + +The above command does the following: +- Install the `@tinijs/server` package +- Copy starter assets to the `server` folder +- Config client app output and prepare Nitro +- Update `dev` and `build` scripts to `tini server dev` and `tini server build` + +You can now run `npm run dev` to start the server and open your browser to `http://localhost:3000` to see your app. + +Please note, by running `npm run dev` it will use `tini server dev` without hot reload for the client app during development, we must refresh browser after changes are made to the `app` folder. Therefore, you will likely want to run `npm run dev:app` during development instead, because it uses `tini dev` to serve and hot reload the client app. + +To build the server for production, run `npm run build` and optionally run `npm run preview` to preview the production build. + +The production build will be in the `.output` folder, depends on the deploy pipeline you are using, you can deploy the `.output` folder to your server and run `node server/index.mjs` or using [PM2](https://pm2.keymetrics.io/). + +## CLI Expansion + +The above `tini server ...` commands are available via [Tini CLI](/cli) expandable architect. Please see [Tini Server CLI expansion](/server/cli) for more details. + +## Server Routes + +Server routes are defined in the `server/routes` folder. + +For example, create `server/routes/hello.ts` with the following content: + +```ts +export default eventHandler(() => { + return 'Hello World!'; +}); +``` + +Now new route is available at `http://localhost:3000/hello`. + +## API Routes + +Similar to server routes, API routes are defined in the `server/api` folder. + +For example, create `server/api/hello.ts` with the following content: + +```ts +export default eventHandler(() => { + return { + message: 'Hello World!' + }; +}); +``` + +Now new API route is available at `http://localhost:3000/api/hello`. + +## More + +For details how to config Nitro and other server stuffs, please visit . diff --git a/apps/tinijs.dev/content/server-posts/102 - cli/index.md b/apps/tinijs.dev/content/server-posts/102 - cli/index.md new file mode 100644 index 00000000..7bb4d4c4 --- /dev/null +++ b/apps/tinijs.dev/content/server-posts/102 - cli/index.md @@ -0,0 +1,33 @@ ++++json +{ + "status": "publish", + "title": "CLI expansion", + "category": "uncategorized" +} ++++ + +Expand [Tini CLI](/cli) with more server related commands. + +## `server dev` + +Run development server. + +```bash +npx tini server dev +``` + +## `server build` + +Build the server for production. + +```bash +npx tini server build +``` + +## `server preview` + +Preview the production build. + +```bash +npx tini server preview +``` From 0fb02a9d6f91844a80bf081b8dec8d35dd522d5d Mon Sep 17 00:00:00 2001 From: Nhan Lam Date: Wed, 1 May 2024 10:05:25 +0700 Subject: [PATCH 05/11] Generate contexts --- .../content/cli-posts/204 - generate/index.md | 5 +-- packages/cli/cli/utils/generate.ts | 34 +++++++++++++++++++ packages/project/lib/types/app.ts | 7 ++-- packages/project/lib/utils/dir.ts | 3 +- 4 files changed, 43 insertions(+), 6 deletions(-) diff --git a/apps/tinijs.dev/content/cli-posts/204 - generate/index.md b/apps/tinijs.dev/content/cli-posts/204 - generate/index.md index 374d73ad..e35988f9 100644 --- a/apps/tinijs.dev/content/cli-posts/204 - generate/index.md +++ b/apps/tinijs.dev/content/cli-posts/204 - generate/index.md @@ -16,6 +16,7 @@ Support these types: - `const` - Shared constants. - `store` - Stores for global states management. +- `context` - Consumable contexts. - `class` - Constructors which are intended to be used to construct objects. - `service` - Groups of similar utilities, you can either import or inject them. - `layout` - Layouts for pages. @@ -30,6 +31,6 @@ Support these types: | Option | Description | | --- | --- | -| `--dir ` or `-d` | Custom srcDir, default to `app`. | +| `--dir ` or `-d` | Custom client app srcDir, default to `app`. | | `--typePrefixed` or `-t` | Use format `name.type.ext`. | -| `--nested` or `-n` | Nested under a folder. | +| `--nested` or `-n` | Nested under the folder with the same name. | diff --git a/packages/cli/cli/utils/generate.ts b/packages/cli/cli/utils/generate.ts index 22a90aa1..66c11aab 100644 --- a/packages/cli/cli/utils/generate.ts +++ b/packages/cli/cli/utils/generate.ts @@ -28,6 +28,7 @@ export interface GeneratedTemplate { enum BuiltinTypes { Const = 'const', Store = 'store', + Context = 'context', Class = 'class', Service = 'service', Layout = 'layout', @@ -42,46 +43,62 @@ enum BuiltinTypes { export const BUILTIN_GENERATORS: Record = { [BuiltinTypes.Const]: async (context, tiniConfig) => { const mainTemplate = await generateBuiltinMainTemplate(context, tiniConfig); + // TODO: generate spec file return [mainTemplate]; }, [BuiltinTypes.Store]: async (context, tiniConfig) => { const mainTemplate = await generateBuiltinMainTemplate(context, tiniConfig); + // TODO: generate spec file + return [mainTemplate]; + }, + [BuiltinTypes.Context]: async (context, tiniConfig) => { + const mainTemplate = await generateBuiltinMainTemplate(context, tiniConfig); + // TODO: generate spec file return [mainTemplate]; }, [BuiltinTypes.Class]: async (context, tiniConfig) => { const mainTemplate = await generateBuiltinMainTemplate(context, tiniConfig); + // TODO: generate spec file return [mainTemplate]; }, [BuiltinTypes.Service]: async (context, tiniConfig) => { const mainTemplate = await generateBuiltinMainTemplate(context, tiniConfig); + // TODO: generate spec file return [mainTemplate]; }, [BuiltinTypes.Layout]: async (context, tiniConfig) => { const mainTemplate = await generateBuiltinMainTemplate(context, tiniConfig); + // TODO: generate spec file return [mainTemplate]; }, [BuiltinTypes.Page]: async (context, tiniConfig) => { const mainTemplate = await generateBuiltinMainTemplate(context, tiniConfig); + // TODO: generate spec file return [mainTemplate]; }, [BuiltinTypes.Component]: async (context, tiniConfig) => { const mainTemplate = await generateBuiltinMainTemplate(context, tiniConfig); + // TODO: generate spec file return [mainTemplate]; }, [BuiltinTypes.Icon]: async (context, tiniConfig) => { const mainTemplate = await generateBuiltinMainTemplate(context, tiniConfig); + // TODO: generate spec file return [mainTemplate]; }, [BuiltinTypes.Partial]: async (context, tiniConfig) => { const mainTemplate = await generateBuiltinMainTemplate(context, tiniConfig); + // TODO: generate spec file return [mainTemplate]; }, [BuiltinTypes.Util]: async (context, tiniConfig) => { const mainTemplate = await generateBuiltinMainTemplate(context, tiniConfig); + // TODO: generate spec file return [mainTemplate]; }, [BuiltinTypes.Type]: async (context, tiniConfig) => { const mainTemplate = await generateBuiltinMainTemplate(context, tiniConfig); + // TODO: generate spec file return [mainTemplate]; }, }; @@ -125,6 +142,7 @@ async function generateBuiltinMainTemplate( { [BuiltinTypes.Const]: dirs.consts, [BuiltinTypes.Store]: dirs.stores, + [BuiltinTypes.Context]: dirs.contexts, [BuiltinTypes.Class]: dirs.classes, [BuiltinTypes.Service]: dirs.services, [BuiltinTypes.Layout]: dirs.layouts, @@ -154,6 +172,9 @@ async function generateBuiltinMainTemplate( case BuiltinTypes.Store: content = getStoreMainContent(names); break; + case BuiltinTypes.Context: + content = getContextMainContent(names); + break; case BuiltinTypes.Class: content = getClassMainContent(names); break; @@ -205,6 +226,19 @@ export const ${varName}Store = createStore({ });\n`; } +function getContextMainContent({varName, className, tagName}: Names) { + return `import {createContext} from '@lit/context'; + +export interface ${className}Context { + foo?: string; +} + +export const ${varName}Context = createContext<${className}Context>( + Symbol('${tagName}-context') +); +`; +} + function getClassMainContent({className}: Names) { return `export class ${className} {}\n`; } diff --git a/packages/project/lib/types/app.ts b/packages/project/lib/types/app.ts index 8a51f56b..07216b8d 100644 --- a/packages/project/lib/types/app.ts +++ b/packages/project/lib/types/app.ts @@ -7,15 +7,16 @@ export interface AppDirs { assets?: string; configs?: string; consts?: string; + contexts?: string; + stores?: string; classes?: string; - components?: string; - icons?: string; layouts?: string; pages?: string; + components?: string; + icons?: string; partials?: string; services?: string; utils?: string; - stores?: string; types?: string; public?: string; vendor?: string; diff --git a/packages/project/lib/utils/dir.ts b/packages/project/lib/utils/dir.ts index c0229fc2..31c006f5 100644 --- a/packages/project/lib/utils/dir.ts +++ b/packages/project/lib/utils/dir.ts @@ -22,6 +22,8 @@ export function getProjectDirs({ assets: dirs?.assets || 'assets', configs: dirs?.configs || 'configs', consts: dirs?.consts || 'consts', + stores: dirs?.stores || 'stores', + contexts: dirs?.contexts || 'contexts', classes: dirs?.classes || 'classes', services: dirs?.services || 'services', layouts: dirs?.layouts || 'layouts', @@ -30,7 +32,6 @@ export function getProjectDirs({ icons: dirs?.icons || 'icons', partials: dirs?.partials || 'partials', utils: dirs?.utils || 'utils', - stores: dirs?.stores || 'stores', types: dirs?.types || 'types', public: dirs?.public || 'public', vendor: dirs?.vendor || 'vendor', From 23d34f77767f3b413f897179fb90977a11a69be2 Mon Sep 17 00:00:00 2001 From: Nhan Lam Date: Wed, 1 May 2024 11:47:04 +0700 Subject: [PATCH 06/11] Support debug for concurrently commands --- apps/tinijs.dev/app/pages/server.ts | 13 +--- .../content/cli-posts/205 - dev/index.md | 8 +++ .../content/cli-posts/206 - watch/index.md | 5 +- .../content/cli-posts/207 - build/index.md | 2 + .../content/server-posts/102 - cli/index.md | 6 ++ packages/cli/cli/commands/build.ts | 29 ++++++-- packages/cli/cli/commands/dev.ts | 70 ++++++++++++++----- packages/cli/cli/commands/watch.ts | 47 ++++++++++--- packages/project/lib/types/build.ts | 6 +- packages/server/cli/commands/server-dev.ts | 46 +++++++++--- 10 files changed, 176 insertions(+), 56 deletions(-) diff --git a/apps/tinijs.dev/app/pages/server.ts b/apps/tinijs.dev/app/pages/server.ts index 918618d4..edf8a2ad 100644 --- a/apps/tinijs.dev/app/pages/server.ts +++ b/apps/tinijs.dev/app/pages/server.ts @@ -32,17 +32,8 @@ export class AppPageServer extends TiniComponent { return html`

Tini Server

- The @tinijs/server package is for running TiniJS apps from - Node servers in case you need server/API routes and other server stuffs - in contrast to static hosts. -

-

- It is NOT available yet! It will be implemented at - packages/server. + Running TiniJS apps from Node servers in case you need server/API routes + and other server stuffs in contrast to static hosts.

`; } diff --git a/apps/tinijs.dev/content/cli-posts/205 - dev/index.md b/apps/tinijs.dev/content/cli-posts/205 - dev/index.md index 15b7d767..0e5c46ff 100644 --- a/apps/tinijs.dev/content/cli-posts/205 - dev/index.md +++ b/apps/tinijs.dev/content/cli-posts/205 - dev/index.md @@ -12,4 +12,12 @@ Start a development server for the current project. npx tini dev ``` +## Options + +| Option | Description | +| --- | --- | +| `--debug` or `-d` | When using a compiler, log output from all commands. | + +## Configuration + **TODO**: Add instructions for configuation. diff --git a/apps/tinijs.dev/content/cli-posts/206 - watch/index.md b/apps/tinijs.dev/content/cli-posts/206 - watch/index.md index caea5835..c5e5eab5 100644 --- a/apps/tinijs.dev/content/cli-posts/206 - watch/index.md +++ b/apps/tinijs.dev/content/cli-posts/206 - watch/index.md @@ -16,7 +16,10 @@ npx tini watch | Option | Description | | --- | --- | -| `--lazy` or `-l` | No initial build, only build for new changes. | | `--clean` or `-c` | Clean the output dir before build. | +| `--lazy` or `-l` | No initial build, only build for new changes. | +| `--debug` or `-d` | When using a compiler, log output from all commands. | + +## Configuration **TODO**: Add instructions for configuation. diff --git a/apps/tinijs.dev/content/cli-posts/207 - build/index.md b/apps/tinijs.dev/content/cli-posts/207 - build/index.md index e046a2cd..265bb302 100644 --- a/apps/tinijs.dev/content/cli-posts/207 - build/index.md +++ b/apps/tinijs.dev/content/cli-posts/207 - build/index.md @@ -19,4 +19,6 @@ npx tini build | `--target ` or `-t` | Target environment: production (default), stage, qa, ... | | `--clean` or `-c` | Clean the output dir before build. | +## Configuration + **TODO**: Add instructions for configuration. diff --git a/apps/tinijs.dev/content/server-posts/102 - cli/index.md b/apps/tinijs.dev/content/server-posts/102 - cli/index.md index 7bb4d4c4..6014fe85 100644 --- a/apps/tinijs.dev/content/server-posts/102 - cli/index.md +++ b/apps/tinijs.dev/content/server-posts/102 - cli/index.md @@ -16,6 +16,12 @@ Run development server. npx tini server dev ``` +### Options + +| Option | Description | +| --- | --- | +| `--debug` or `-d` | Log output from all commands. | + ## `server build` Build the server for production. diff --git a/packages/cli/cli/commands/build.ts b/packages/cli/cli/commands/build.ts index 7284baae..7113d687 100644 --- a/packages/cli/cli/commands/build.ts +++ b/packages/cli/cli/commands/build.ts @@ -1,7 +1,7 @@ import {resolve} from 'pathe'; import {execa} from 'execa'; import {consola} from 'consola'; -import {gray} from 'colorette'; +import {gray, green} from 'colorette'; import {remove} from 'fs-extra/esm'; import {getTiniProject, getProjectDirs} from '@tinijs/project'; @@ -31,7 +31,7 @@ export const buildCommand = createCLICommand( async (args, callbacks) => { const tiniProject = await getTiniProject(); const {config: tiniConfig, hooks} = tiniProject; - const {outDir} = getProjectDirs(tiniConfig); + const {srcDir, compileDir, outDir} = getProjectDirs(tiniConfig); // preparation exposeEnvs(tiniConfig, args.target || 'production'); const compiler = await loadCompiler(tiniProject); @@ -51,14 +51,33 @@ export const buildCommand = createCLICommand( typeof buildCommand !== 'string' ? buildCommand : buildCommand.split(' '); - callbacks?.onShowDebug?.(`${cmd} ${args.join(' ')}`); + callbacks?.onShowInfo?.(`${cmd} ${args.join(' ')}`, { + yes: tiniConfig.compile !== false, + srcDir, + compileDir, + }); await execa(cmd, args, {stdio: 'inherit'}); } await hooks.callHook('build:after'); }, { - onShowDebug: (command: string) => - consola.info(`Compiled and run ${gray(command)}`), + onShowInfo: ( + command: string, + compile: { + yes: boolean; + srcDir: string; + compileDir: string; + } + ) => { + if (compile.yes) { + consola.info( + `Compile app from ${green(compile.srcDir)} to ${green( + compile.compileDir + )}.` + ); + } + consola.info(`Build app using ${gray(command)}`); + }, } ); diff --git a/packages/cli/cli/commands/dev.ts b/packages/cli/cli/commands/dev.ts index ff60f381..444635cf 100644 --- a/packages/cli/cli/commands/dev.ts +++ b/packages/cli/cli/commands/dev.ts @@ -1,9 +1,8 @@ -import {concurrently} from 'concurrently'; import {consola} from 'consola'; import {execa} from 'execa'; import {blueBright, gray} from 'colorette'; -import {getTiniProject} from '@tinijs/project'; +import {getTiniProject, type OnDevServerStartContext} from '@tinijs/project'; import {exposeEnvs, loadCompiler, loadBuilder} from '../utils/build.js'; import {createCLICommand} from '../utils/cli.js'; @@ -14,6 +13,13 @@ export const devCommand = createCLICommand( name: 'dev', description: 'Start the dev server.', }, + args: { + debug: { + alias: '-d', + type: 'boolean', + description: 'Log output from all commands (only if using a compiler).', + }, + }, }, async (args, callbacks) => { const tiniProject = await getTiniProject(); @@ -29,20 +35,39 @@ export const devCommand = createCLICommand( } else { const devCommand = builder.dev.command; if (tiniConfig.compile !== false) { + const debugMode = !!args.debug; // initial compile await compiler?.compile(); // run compile and dev concurrently const compileCmd = 'tini compile --watch --lazy'; const devCmd = typeof devCommand === 'string' ? devCommand : devCommand.join(' '); - concurrently([{command: compileCmd}, {command: devCmd}]); - callbacks?.onShowDebug?.([compileCmd, devCmd]); + execa( + 'concurrently', + [ + `"${compileCmd}"`, + `"${devCmd}"`, + '--names', + 'COMPILE,DEV', + '--prefix-colors', + 'bgMagenta,bgBlue', + '--kill-others', + ], + !debugMode ? undefined : {stdio: 'inherit'} + ); + callbacks?.onShowInfo?.([compileCmd, devCmd], debugMode); // server start const customOnServerStart = builder.dev.onServerStart; setTimeout( () => - callbacks?.onServerStart?.(builder.options, customOnServerStart), - 3000 + callbacks?.onServerStart?.( + { + ...builder.options, + debugMode, + }, + customOnServerStart + ), + 2000 ); } else { const [cmd, ...args] = @@ -52,23 +77,32 @@ export const devCommand = createCLICommand( } }, { - onShowDebug: (commands: string[]) => + onShowInfo: (commands: string[], debugMode: boolean) => { consola.info( `Concurrently running ${commands .map(command => gray(command)) .join(' & ')}` - ), + ); + if (!debugMode) { + consola.info( + `Optionally use the flag ${gray('--debug')} to log all detail.` + ); + } + }, onServerStart: ( - {devHost, devPort}: Record, - customCallback?: () => void - ) => - customCallback - ? customCallback() - : consola.info( - `Server running at: ${blueBright( - `http://${devHost || 'localhost'}:${devPort || '3000'}` - )}` - ), + context: OnDevServerStartContext, + customCallback?: (context: OnDevServerStartContext) => void + ) => { + if (customCallback) return customCallback(context); + if (context.debugMode) return; + consola.info( + `Server running at: ${blueBright( + `http://${context.devHost || 'localhost'}:${ + context.devPort || '3000' + }` + )}` + ); + }, } ); diff --git a/packages/cli/cli/commands/watch.ts b/packages/cli/cli/commands/watch.ts index f790ceaa..9646b592 100644 --- a/packages/cli/cli/commands/watch.ts +++ b/packages/cli/cli/commands/watch.ts @@ -3,7 +3,6 @@ import {execa} from 'execa'; import {consola} from 'consola'; import {gray, green} from 'colorette'; import {remove} from 'fs-extra/esm'; -import {concurrently} from 'concurrently'; import {getTiniProject, getProjectDirs} from '@tinijs/project'; @@ -17,15 +16,20 @@ export const watchCommand = createCLICommand( description: 'Watch and build the app.', }, args: { + clean: { + alias: 'c', + type: 'boolean', + description: 'Clean the output dir.', + }, lazy: { alias: 'l', type: 'boolean', description: 'No initial actions, only watch for changes.', }, - clean: { - alias: 'c', + debug: { + alias: '-d', type: 'boolean', - description: 'Clean the output dir.', + description: 'Log output from all commands (only if using a compiler).', }, }, }, @@ -46,6 +50,7 @@ export const watchCommand = createCLICommand( } else { const watchCommand = builder.watch.command; if (tiniConfig.compile !== false) { + const debugMode = !!args.debug; // initial actions if (!args.lazy) { await hooks.callHook('dev:before'); @@ -57,10 +62,22 @@ export const watchCommand = createCLICommand( typeof watchCommand === 'string' ? watchCommand : watchCommand.join(' '); - concurrently([{command: compileCmd}, {command: watchCmd}]); - callbacks?.onShowDebug?.([compileCmd, watchCmd]); + execa( + 'concurrently', + [ + `"${compileCmd}"`, + `"${watchCmd}"`, + '--names', + 'COMPILE,WATCH', + '--prefix-colors', + 'bgMagenta,bgBlue', + '--kill-others', + ], + !debugMode ? undefined : {stdio: 'inherit'} + ); + callbacks?.onShowInfo?.([compileCmd, watchCmd], debugMode); // watch start - callbacks?.onWatchStart?.(entryDir, outDir); + callbacks?.onWatchStart?.(entryDir, outDir, debugMode); } else { const [cmd, ...args] = typeof watchCommand !== 'string' @@ -71,16 +88,24 @@ export const watchCommand = createCLICommand( } }, { - onShowDebug: (commands: string[]) => + onShowInfo: (commands: string[], debugMode: boolean) => { consola.info( `Concurrently running ${commands .map(command => gray(command)) .join(' & ')}` - ), - onWatchStart: (entryDir: string, outDir: string) => + ); + if (!debugMode) { + consola.info( + `Optionally use the flag ${gray('--debug')} to log all detail.` + ); + } + }, + onWatchStart: (entryDir: string, outDir: string, debugMode: boolean) => { + if (debugMode) return; consola.info( `Watch ${green(entryDir)} and build app to ${green(outDir)}.` - ), + ); + }, } ); diff --git a/packages/project/lib/types/build.ts b/packages/project/lib/types/build.ts index e80253f8..080c1c99 100644 --- a/packages/project/lib/types/build.ts +++ b/packages/project/lib/types/build.ts @@ -21,7 +21,7 @@ export interface Builder { | (() => Promise) | { command: string | string[]; - onServerStart?: () => void; + onServerStart?: (context: OnDevServerStartContext) => void; }; watch: | (() => Promise) @@ -35,6 +35,10 @@ export interface Builder { }; } +export interface OnDevServerStartContext extends Record { + debugMode?: boolean; +} + export interface BuildConfig { builder?: string; options?: Record; diff --git a/packages/server/cli/commands/server-dev.ts b/packages/server/cli/commands/server-dev.ts index 620e4e31..8ff60eb7 100644 --- a/packages/server/cli/commands/server-dev.ts +++ b/packages/server/cli/commands/server-dev.ts @@ -1,8 +1,8 @@ import {resolve} from 'pathe'; import {gray, blueBright} from 'colorette'; import {consola} from 'consola'; -import {concurrently} from 'concurrently'; import {watch} from 'chokidar'; +import {execa} from 'execa'; import {createCLICommand, exposeEnvs, loadCompiler} from '@tinijs/cli'; import serverCLIExpansion from '../expand.js'; @@ -15,11 +15,19 @@ export const serverDevCommand = createCLICommand( name: 'dev', description: 'Start the development server.', }, + args: { + debug: { + alias: '-d', + type: 'boolean', + description: 'Log output from all commands.', + }, + }, }, async (args, callbacks) => { const {options, tiniProject} = serverCLIExpansion.context; const {config: tiniConfig, hooks} = tiniProject; - const {appBuildCommand, appWatchCommand} = options; + const {appWatchCommand} = options; + const debugMode = !!args.debug; // preparation exposeEnvs(tiniConfig, 'development'); const compiler = await loadCompiler(tiniProject); @@ -37,19 +45,39 @@ export const serverDevCommand = createCLICommand( ? appWatchCommand : appWatchCommand.join(' '); const nitroDevCmd = 'nitro dev --dir server --port 3000'; - concurrently([{command: watchCmd}, {command: nitroDevCmd}]); - callbacks?.onShowDebug?.([watchCmd, nitroDevCmd]); - setTimeout(() => callbacks?.onServerStart?.(), 3000); + execa( + 'concurrently', + [ + `"${watchCmd}"`, + `"${nitroDevCmd}"`, + '--names', + 'COMPILE,DEV', + '--prefix-colors', + 'bgMagenta,bgBlue', + '--kill-others', + ], + !debugMode ? undefined : {stdio: 'inherit'} + ); + callbacks?.onShowInfo?.([watchCmd, nitroDevCmd], debugMode); + setTimeout(() => callbacks?.onServerStart?.(debugMode), 2000); }, { - onShowDebug: (commands: string[]) => + onShowInfo: (commands: string[], debugMode: boolean) => { consola.info( `Concurrently running ${commands .map(command => gray(command)) .join(' & ')}` - ), - onServerStart: () => - consola.info(`Server running at: ${blueBright('http://localhost:3000')}`), + ); + if (!debugMode) { + consola.info( + `Optionally use the flag ${gray('--debug')} to log all detail.` + ); + } + }, + onServerStart: (debugMode: boolean) => { + if (debugMode) return; + consola.info(`Server running at: ${blueBright('http://localhost:3000')}`); + }, } ); From 41df8ccb23ed07ccfa2edf1218cc3ed0befdad3e Mon Sep 17 00:00:00 2001 From: Nhan Lam Date: Wed, 1 May 2024 13:44:48 +0700 Subject: [PATCH 07/11] Optimize and refactor content --- .../module-posts/201 - content/index.md | 5 +- .../module-posts/202 - content-cli/index.md | 5 +- packages/content/11ty/base.config.cjs | 7 +- .../content/cli/commands/content-build.ts | 162 +++++++++++------- packages/content/lib/utils/instance.ts | 2 +- 5 files changed, 108 insertions(+), 73 deletions(-) diff --git a/apps/tinijs.dev/content/module-posts/201 - content/index.md b/apps/tinijs.dev/content/module-posts/201 - content/index.md index 1b3ae468..feecc4b0 100644 --- a/apps/tinijs.dev/content/module-posts/201 - content/index.md +++ b/apps/tinijs.dev/content/module-posts/201 - content/index.md @@ -54,8 +54,9 @@ export default defineTiniConfig({ [ '@tinijs/content', { - dir: 'app-content', // default is 'content' - outDir: 'public', // default is 'app/public' + dir?: string, // default is 'content' + stagingDir?: string, // default is '.content' + outDir?: string, // default is 'app/public' } as ContentModuleOptions ] diff --git a/apps/tinijs.dev/content/module-posts/202 - content-cli/index.md b/apps/tinijs.dev/content/module-posts/202 - content-cli/index.md index d9d7e59e..9eb62748 100644 --- a/apps/tinijs.dev/content/module-posts/202 - content-cli/index.md +++ b/apps/tinijs.dev/content/module-posts/202 - content-cli/index.md @@ -18,5 +18,6 @@ npx tini content build | Option | Description | | --- | --- | -| `--dir ` or `-d` | Custom source dir, default to `content`. | -| `--outDir ` or `-o` | Custom out dir, default to `app/public`. | +| `--dir ` or `-d` | Custom content dir, default is `content`. | +| `--stagingDir ` or `-s` | Custom staging dir for 11ty, default is `.content`. | +| `--outDir ` or `-o` | Custom output dir, default is `app/public`. | diff --git a/packages/content/11ty/base.config.cjs b/packages/content/11ty/base.config.cjs index b1365598..993351c3 100644 --- a/packages/content/11ty/base.config.cjs +++ b/packages/content/11ty/base.config.cjs @@ -9,6 +9,7 @@ const pluginImage = require('./image.plugin.cjs'); const pluginElem = require('./elem.plugin.cjs'); module.exports = function (eleventyConfig, options) { + const {TINI_11TY_SRC = 'content', TINI_11TY_DEST = '.content'} = process.env; const { useCopy, useImagePlugin, @@ -33,7 +34,7 @@ module.exports = function (eleventyConfig, options) { */ if (useCopy !== false) { - eleventyConfig.addPassthroughCopy(useCopy || 'content/**/uploads/**/*'); + eleventyConfig.addPassthroughCopy(useCopy || `${TINI_11TY_SRC}/**/uploads/**/*`); } /* @@ -104,8 +105,8 @@ module.exports = function (eleventyConfig, options) { markdownTemplateEngine: 'njk', htmlTemplateEngine: 'njk', dir: { - input: 'content', - output: '.content', + input: TINI_11TY_SRC, + output: TINI_11TY_DEST, }, pathPrefix: '/tini-content/', ...(eleventyOptions || {}), diff --git a/packages/content/cli/commands/content-build.ts b/packages/content/cli/commands/content-build.ts index 0f3fa13f..dd9ac796 100644 --- a/packages/content/cli/commands/content-build.ts +++ b/packages/content/cli/commands/content-build.ts @@ -82,45 +82,64 @@ export const contentBuildCommand = createCLICommand( dir: { alias: 'd', type: 'string', - description: 'The source directory.', + description: 'The content directory.', + }, + stagingDir: { + alias: 's', + type: 'string', + description: 'The staging directory for 11ty.', }, outDir: { alias: 'o', type: 'string', description: 'The output directory.', }, + debug: { + alias: 'd', + type: 'boolean', + description: 'Show 11ty logs.', + }, }, }, async (args, callbacks) => { - const contentDirName = args.dir || 'content'; - const eleventyConfigPath = resolve(contentDirName, 'eleventy.config.cjs'); + const debugMode = !!args.debug; + const contentDir = args.dir || 'content'; + const eleventyConfigPath = resolve(contentDir, 'eleventy.config.cjs'); if (!pathExistsSync(eleventyConfigPath)) { - return callbacks?.onInvalidProject?.(contentDirName); + return callbacks?.onInvalidProject?.(contentDir); } const {config: tiniConfig} = await getTiniProject(); const {srcDir, dirs} = getProjectDirs(tiniConfig); - const stagingContentDir = '.content'; - const tiniContentDir = `${ - args.outDir || `${srcDir}/${dirs.public}` - }/tini-content`; - const srcPath = resolve(stagingContentDir); - const outPath = resolve(tiniContentDir); - // clear the staging and tini-content dir - await cleanDir(srcPath); - await cleanDir(outPath); + const stagingDir = args.stagingDir || '.content'; + const outDir = `${args.outDir || `${srcDir}/${dirs.public}`}/tini-content`; + const stagingDirPath = resolve(stagingDir); + const outDirPath = resolve(outDir); + + // read cache digests + const cachedFile = '_cached.json'; + const cachedPath = resolve(stagingDir, cachedFile); + const cacheDigests: Record = !pathExistsSync(cachedPath) + ? {} + : await readJSON(cachedPath); - // 11ty render - callbacks?.onStart?.(stagingContentDir); + // compile using 11ty + callbacks?.onStart?.(stagingDir, debugMode); + await cleanDir(stagingDirPath); await execa('npx', ['@11ty/eleventy', '--config', eleventyConfigPath], { - stdio: 'ignore', + env: { + TINI_11TY_SRC: contentDir, + TINI_11TY_DEST: stagingDir, + }, + stdio: !debugMode ? undefined : 'inherit', }); // read content - const {copyPaths, buildPaths} = (await listDir(srcPath)).reduce( + const {copyPaths, buildPaths} = (await listDir(stagingDirPath)).reduce( (result, item) => { + if (item === cachedPath) return result; if ( ~item.indexOf('/uploads/') || - ~item.indexOf(`/${stagingContentDir}/images/`) || + ~item.indexOf(`/${stagingDir}/images/`) || !item.endsWith('.html') ) { result.copyPaths.push(item); @@ -138,7 +157,7 @@ export const contentBuildCommand = createCLICommand( // copy await Promise.all( copyPaths.map(async path => { - const filePath = path.replace(stagingContentDir, tiniContentDir); + const filePath = path.replace(stagingDir, outDir); await ensureDir(filePath.replace(/\/[^/]+$/, '')); return copyFile(path, filePath); }) @@ -147,15 +166,16 @@ export const contentBuildCommand = createCLICommand( // build const indexRecord = {} as Record; const collectionRecord = {} as Record; - const fulltextSearchRecord = {} as Record>; + const extraSearchRecord = {} as Record>; const collectedTagsRecord = {} as Record>; - - let buildCount = 0; const collectionOptionsCache = {} as Record; + const updatedCacheDigests = {} as Record; + let buildCount = 0; + let cachedCount = 0; for (let i = 0; i < buildPaths.length; i++) { const path = buildPaths[i]; const [collection, name] = path - .split(`/${stagingContentDir}/`) + .split(`/${stagingDir}/`) .pop()! .replace(/\/[^/]+$/, '') .split('/'); @@ -163,7 +183,6 @@ export const contentBuildCommand = createCLICommand( ? ['', name] : name.split(' - '); const order = isNaN(+orderStr) ? undefined : +orderStr; - callbacks?.onBuildItem?.(collection, name); // process raw content @@ -178,12 +197,21 @@ export const contentBuildCommand = createCLICommand( toml: toml.parse.bind(toml), }, }); + const previousDigest = cacheDigests[path]; + const currentDigest = createHash('sha256') + .update(rawContent) + .digest('base64url'); + updatedCacheDigests[path] = currentDigest; + if (previousDigest === currentDigest) { + cachedCount++; + continue; + } if (data.status && data.status !== 'publish' && data.status !== 'archive') continue; // load build options const collectionOptionsPath = resolve( - contentDirName, + contentDir, collection, '$build.json' ); @@ -199,13 +227,11 @@ export const contentBuildCommand = createCLICommand( delete data.$build; // item - const digest = createHash('sha256') - .update(rawContent) - .digest('base64url'); + const docId = currentDigest; const detail = { ...data, ...data.moredata, - id: digest, + id: docId, slug, content: minify(content, { html5: true, @@ -223,14 +249,14 @@ export const contentBuildCommand = createCLICommand( if (detail.order === undefined && order !== undefined) { detail.order = order; } - await outputJSON(resolve(outPath, `${digest}.json`), detail); - indexRecord[`${collection}/${slug}`] = digest; + await outputJSON(resolve(outDirPath, `${docId}.json`), detail); + indexRecord[`${collection}/${slug}`] = docId; // collection collectionRecord[collection] ||= []; const item = { ...data, - id: digest, + id: docId, slug, } as Record; delete item.moredata; @@ -239,12 +265,9 @@ export const contentBuildCommand = createCLICommand( } collectionRecord[collection].push(item); - // fulltext search - fulltextSearchRecord[collection] ||= {}; - fulltextSearchRecord[collection][slug] = buildSearchContent( - content, - data - ); + // extra search + extraSearchRecord[collection] ||= {}; + extraSearchRecord[collection][slug] = buildSearchContent(content, data); // collect tags if ( @@ -288,65 +311,74 @@ export const contentBuildCommand = createCLICommand( // collections for (const [collection, items] of Object.entries(collectionRecord)) { - const digest = createHash('sha256') + const collectionId = createHash('sha256') .update(JSON.stringify(items)) .digest('base64url'); - await outputJSON(resolve(outPath, `${digest}.json`), items); - indexRecord[collection] = digest; + await outputJSON(resolve(outDirPath, `${collectionId}.json`), items); + indexRecord[collection] = collectionId; } // search - for (const [collection, items] of Object.entries(fulltextSearchRecord)) { - const digest = createHash('sha256') + for (const [collection, items] of Object.entries(extraSearchRecord)) { + const searchId = createHash('sha256') .update(JSON.stringify(items)) .digest('base64url'); - await outputJSON(resolve(outPath, `${digest}.json`), items); - indexRecord[`${collection}-search`] = digest; + await outputJSON(resolve(outDirPath, `${searchId}.json`), items); + indexRecord[`search-${collection}`] = searchId; } // tags if (Object.keys(collectedTagsRecord).length) { for (const [collection, record] of Object.entries(collectedTagsRecord)) { const items = Object.values(record); - const digest = createHash('sha256') + const tagId = createHash('sha256') .update(JSON.stringify(items)) .digest('base64url'); - await outputJSON(resolve(outPath, `${digest}.json`), items); - indexRecord[collection] = digest; + await outputJSON(resolve(outDirPath, `${tagId}.json`), items); + indexRecord[collection] = tagId; } } // index - await outputJSON(resolve(outPath, 'index.json'), indexRecord); + await outputJSON(resolve(outDirPath, 'index.json'), indexRecord); + + // update cache digests + await outputJSON(cachedPath, updatedCacheDigests); // done - callbacks?.onDone?.(tiniContentDir, copyPaths, buildPaths, buildCount); + callbacks?.onDone?.(outDir, copyPaths, buildPaths, buildCount, cachedCount); }, { - onInvalidProject: (contentDirName: string) => + onInvalidProject: (contentDir: string) => consola.error( - `Invalid content project (no ${contentDirName}/eleventy.config.cjs found).` + `Invalid content project (no ${contentDir}/eleventy.config.cjs found).` ), - onStart: (tempDir: string) => { + onStart: (stagingDir: string, debugMode: boolean) => { + if (debugMode) return; SPINNER.start( - `Compile content using ${green('11ty')} to ${gray(tempDir)}.` + `Compile content using ${green('11ty')} to ${gray(stagingDir)}.` ); }, - onBuildItem: (collection: string, name: string) => - (SPINNER.text = `Build: ${green(`${collection}/${name}`)}`), + onBuildItem: (collection: string, name: string) => { + if (!SPINNER.isSpinning) SPINNER.start(); + SPINNER.text = `Build document: ${green(`${collection}/${name}`)}`; + }, onDone: ( - destDir: string, + outDir: string, copyPaths: any[], buildPaths: any[], - buildCount: number - ) => + buildCount: number, + cachedCount: number + ) => { + if (!SPINNER.isSpinning) SPINNER.start(); SPINNER.succeed( - `Success! Copy ${blueBright( - copyPaths.length - )} items and build ${blueBright(buildCount)}/${ - buildPaths.length - } items to ${gray(destDir)}.\n` - ), + `Success! Copy ${green(copyPaths.length)} items and build ${green( + buildCount + )}/${buildPaths.length} items${ + !cachedCount ? '' : ` (${green(cachedCount)} cached)` + } to ${gray(outDir)}.\n` + ); + }, } ); diff --git a/packages/content/lib/utils/instance.ts b/packages/content/lib/utils/instance.ts index d99116c8..73849930 100644 --- a/packages/content/lib/utils/instance.ts +++ b/packages/content/lib/utils/instance.ts @@ -63,7 +63,7 @@ export class ContentInstance { private async getExtraSearchUrl() { const rootIndex = await this.retrieveRootIndex(); - const id = rootIndex[`${this.collectionName}-search`]; + const id = rootIndex[`search-${this.collectionName}`]; if (!id) throw new Error(`No extra search found for ${this.collectionName}`); return `${this.baseUrl}/${id}.json`; From 1e6c7f98047c89dbb0ad166e66933560c07616b0 Mon Sep 17 00:00:00 2001 From: Nhan Lam Date: Wed, 1 May 2024 14:07:05 +0700 Subject: [PATCH 08/11] Fix sectionRender --- .../framework-posts/206 - async/index.md | 6 +-- packages/core/lib/directives/render.ts | 45 ++++++++++--------- 2 files changed, 27 insertions(+), 24 deletions(-) diff --git a/apps/tinijs.dev/content/framework-posts/206 - async/index.md b/apps/tinijs.dev/content/framework-posts/206 - async/index.md index d5f22adb..8a6768c7 100644 --- a/apps/tinijs.dev/content/framework-posts/206 - async/index.md +++ b/apps/tinijs.dev/content/framework-posts/206 - async/index.md @@ -48,10 +48,10 @@ For more detail, please see ## Section render Similar to Task Render, Section Render renders a section of a page based on **the values of local states**. There are 4 render states: -- `loading`: all dependencies are `undefined` -- `empty`: all are `null` or `[]` or `{}` or zero-size Map +- `main`: all are not `undefined` and not empty (`null` or `[]` or `{}` or zero-size Map) - `error`: any instanceof Error -- `main`: fulfilled scenario +- `empty`: all are empty +- `loading`: else ```ts import {sectionRender, type SectionRenderData} from '@tinijs/core'; diff --git a/packages/core/lib/directives/render.ts b/packages/core/lib/directives/render.ts index d6ba0462..77d5b1dc 100644 --- a/packages/core/lib/directives/render.ts +++ b/packages/core/lib/directives/render.ts @@ -2,10 +2,10 @@ import {nothing, type TemplateResult} from 'lit'; import {cache} from 'lit/directives/cache.js'; export enum SectionRenderStatuses { - Loading = 'loading', - Empty = 'empty', - Error = 'error', Fulfilled = 'fulfilled', + Error = 'error', + Empty = 'empty', + Loading = 'loading', } export type SectionRenderData = Type | null | undefined; @@ -14,33 +14,36 @@ export interface SectionRenderTemplates< Dependencies extends SectionRenderDataOrError[], Template = TemplateResult | typeof nothing, > { - loading?: () => Template; - empty?: () => Template; - error?: (dependencies: Dependencies) => Template; main: (dependencies: Dependencies) => Template; + error?: (dependencies: Dependencies) => Template; + empty?: () => Template; + loading?: () => Template; +} + +function isEmptyItem(item: any) { + return ( + item === null || + (item instanceof Array && !item.length) || + (item instanceof Map && !item.size) || + (item instanceof Object && !Object.keys(item).length) + ); } export function sectionRender< Dependencies extends SectionRenderDataOrError[], >(dependencies: Dependencies, templates: SectionRenderTemplates) { const main = templates.main; - const loading = templates.loading || nothing; - const empty = templates.empty || nothing; const error = templates.error || nothing; + const empty = templates.empty || nothing; + const loading = templates.loading || nothing; // check status - const status = dependencies.every(item => item === undefined) - ? SectionRenderStatuses.Loading - : dependencies.every( - item => - item === null || - (item instanceof Array && !item.length) || - (item instanceof Map && !item.size) || - (item instanceof Object && !Object.keys(item).length) - ) - ? SectionRenderStatuses.Empty - : dependencies.some(item => item instanceof Error) - ? SectionRenderStatuses.Error - : SectionRenderStatuses.Fulfilled; + const status = dependencies.some(item => item instanceof Error) + ? SectionRenderStatuses.Error + : dependencies.every(item => item !== undefined && !isEmptyItem(item)) + ? SectionRenderStatuses.Fulfilled + : dependencies.every(item => isEmptyItem(item)) + ? SectionRenderStatuses.Empty + : SectionRenderStatuses.Loading; // render template accordingly return cache( status === SectionRenderStatuses.Loading From 85f635996b5c6f11c00bb0de33b3b475e5d2b49f Mon Sep 17 00:00:00 2001 From: Nhan Lam Date: Wed, 1 May 2024 14:52:20 +0700 Subject: [PATCH 09/11] Update docs --- apps/tinijs.dev/app/components/header.ts | 6 -- apps/tinijs.dev/app/pages/home.ts | 2 +- apps/tinijs.dev/app/pages/server.ts | 42 -------- apps/tinijs.dev/app/routes.ts | 5 - apps/tinijs.dev/app/services/content.ts | 8 -- .../content/cli-posts/302 - server/index.md | 4 +- .../4 - backend}/index.md | 2 +- .../index.md | 0 .../framework-posts/102 - starter/index.md | 2 +- .../103 - folder-structure/index.md | 2 +- .../framework-posts/104 - compile/index.md | 4 +- .../framework-posts/105 - dev-build/index.md | 99 ++++++++++--------- .../205 - page-layout/index.md | 4 +- .../301 - router-overview/index.md | 24 ----- .../index.md | 16 +++ .../index.md | 0 .../401 - backend-official/index.md | 12 +++ .../402 - backend-firebase-supabase/index.md | 11 +++ .../403 - backend-headless-cms/index.md | 11 +++ .../404 - backend-node/index.md | 11 +++ .../405 - backend-rust/index.md | 11 +++ .../index.md | 2 +- .../index.md | 0 .../index.md | 0 .../index.md | 0 .../{3 - pwa => 2 - pwa}/index.md | 0 .../{2 - content => 3 - content}/index.md | 0 .../module-categories/4 - server/index.md | 6 ++ .../module-posts/101 - introduction/index.md | 13 +++ .../module-posts/101 - overview/index.md | 13 --- .../{301 - pwa => 201 - pwa}/index.md | 0 .../{201 - content => 301 - content}/index.md | 0 .../index.md | 0 .../index.md | 2 +- .../index.md | 0 .../index.md | 0 .../index.md | 0 .../index.md | 0 .../index.md | 0 .../index.md | 0 .../index.md | 0 .../index.md | 0 .../index.md | 0 .../401 - server}/index.md | 4 +- .../402 - server-cli}/index.md | 2 +- .../toolbox-posts/101 - get-started/index.md | 2 +- .../toolbox-posts/201 - common-util/index.md | 2 +- .../202 - common-service/index.md | 2 +- .../toolbox-posts/301 - app-util/index.md | 2 +- .../toolbox-posts/302 - app-service/index.md | 2 +- .../toolbox-posts/401 - fetch-util/index.md | 2 +- .../402 - fetch-service/index.md | 2 +- .../501 - localstorage-util/index.md | 2 +- .../502 - localstorage-service/index.md | 2 +- 54 files changed, 168 insertions(+), 168 deletions(-) delete mode 100644 apps/tinijs.dev/app/pages/server.ts rename apps/tinijs.dev/content/{server-categories/1 - uncategorized => framework-categories/4 - backend}/index.md (59%) rename apps/tinijs.dev/content/framework-categories/{4 - distribution => 5 - distribution}/index.md (100%) delete mode 100644 apps/tinijs.dev/content/framework-posts/301 - router-overview/index.md rename apps/tinijs.dev/content/framework-posts/{302 - router-usage => 301 - router}/index.md (96%) rename apps/tinijs.dev/content/framework-posts/{303 - router-meta => 302 - meta}/index.md (100%) create mode 100644 apps/tinijs.dev/content/framework-posts/401 - backend-official/index.md create mode 100644 apps/tinijs.dev/content/framework-posts/402 - backend-firebase-supabase/index.md create mode 100644 apps/tinijs.dev/content/framework-posts/403 - backend-headless-cms/index.md create mode 100644 apps/tinijs.dev/content/framework-posts/404 - backend-node/index.md create mode 100644 apps/tinijs.dev/content/framework-posts/405 - backend-rust/index.md rename apps/tinijs.dev/content/framework-posts/{401 - distribution-web => 501 - distribution-web}/index.md (88%) rename apps/tinijs.dev/content/framework-posts/{402 - distribution-pwa => 502 - distribution-pwa}/index.md (100%) rename apps/tinijs.dev/content/framework-posts/{403 - distribution-desktop => 503 - distribution-desktop}/index.md (100%) rename apps/tinijs.dev/content/framework-posts/{404 - distribution-mobile => 504 - distribution-mobile}/index.md (100%) rename apps/tinijs.dev/content/module-categories/{3 - pwa => 2 - pwa}/index.md (100%) rename apps/tinijs.dev/content/module-categories/{2 - content => 3 - content}/index.md (100%) create mode 100644 apps/tinijs.dev/content/module-categories/4 - server/index.md create mode 100644 apps/tinijs.dev/content/module-posts/101 - introduction/index.md delete mode 100644 apps/tinijs.dev/content/module-posts/101 - overview/index.md rename apps/tinijs.dev/content/module-posts/{301 - pwa => 201 - pwa}/index.md (100%) rename apps/tinijs.dev/content/module-posts/{201 - content => 301 - content}/index.md (100%) rename apps/tinijs.dev/content/module-posts/{202 - content-cli => 302 - content-cli}/index.md (100%) rename apps/tinijs.dev/content/module-posts/{203 - content-11ty => 303 - content-11ty}/index.md (100%) rename apps/tinijs.dev/content/module-posts/{204 - content-manage => 304 - content-manage}/index.md (100%) rename apps/tinijs.dev/content/module-posts/{205 - content-schema => 305 - content-schema}/index.md (100%) rename apps/tinijs.dev/content/module-posts/{206 - content-access => 306 - content-access}/index.md (100%) rename apps/tinijs.dev/content/module-posts/{207 - content-utils => 307 - content-utils}/index.md (100%) rename apps/tinijs.dev/content/module-posts/{208 - content-no-framework => 308 - content-no-framework}/index.md (100%) rename apps/tinijs.dev/content/module-posts/{209 - content-vue => 309 - content-vue}/index.md (100%) rename apps/tinijs.dev/content/module-posts/{210 - content-react => 310 - content-react}/index.md (100%) rename apps/tinijs.dev/content/module-posts/{211 - content-angular => 311 - content-angular}/index.md (100%) rename apps/tinijs.dev/content/module-posts/{212 - content-svelte => 312 - content-svelte}/index.md (100%) rename apps/tinijs.dev/content/{server-posts/101 - get-started => module-posts/401 - server}/index.md (97%) rename apps/tinijs.dev/content/{server-posts/102 - cli => module-posts/402 - server-cli}/index.md (94%) diff --git a/apps/tinijs.dev/app/components/header.ts b/apps/tinijs.dev/app/components/header.ts index f7bea426..3b3969fd 100644 --- a/apps/tinijs.dev/app/components/header.ts +++ b/apps/tinijs.dev/app/components/header.ts @@ -131,12 +131,6 @@ export class HeaderComponent @click=${this._closeMobileMenu} >Toolbox - Server -
  • this.router.go('/server')}> +
  • this.router.go('/module/server')}>
    🎛️

    Server

    diff --git a/apps/tinijs.dev/app/pages/server.ts b/apps/tinijs.dev/app/pages/server.ts deleted file mode 100644 index edf8a2ad..00000000 --- a/apps/tinijs.dev/app/pages/server.ts +++ /dev/null @@ -1,42 +0,0 @@ -import {html, css} from 'lit'; - -import {Page, TiniComponent} from '@tinijs/core'; - -import {GITHUB_CONTENT_PATH} from '../consts/common.js'; - -import {serverCategoryService, serverPostService} from '../services/content.js'; - -import {AppDocPageComponent} from '../components/doc-page/index.js'; - -@Page({ - name: 'app-page-server', - components: [AppDocPageComponent], -}) -export class AppPageServer extends TiniComponent { - protected render() { - return html` - - `; - } - - private _getHomeTemplate() { - return html` -

    Tini Server

    -

    - Running TiniJS apps from Node servers in case you need server/API routes - and other server stuffs in contrast to static hosts. -

    - `; - } - - static styles = css``; -} diff --git a/apps/tinijs.dev/app/routes.ts b/apps/tinijs.dev/app/routes.ts index 6071ccb2..fea0e640 100644 --- a/apps/tinijs.dev/app/routes.ts +++ b/apps/tinijs.dev/app/routes.ts @@ -30,11 +30,6 @@ export const routes: Route[] = [ component: 'app-page-toolbox', action: () => import('./pages/toolbox.js'), }, - { - path: 'server/:slug?', - component: 'app-page-server', - action: () => import('./pages/server.js'), - }, { path: 'cli/:slug?', component: 'app-page-cli', diff --git a/apps/tinijs.dev/app/services/content.ts b/apps/tinijs.dev/app/services/content.ts index 00c018f3..ee381cb7 100644 --- a/apps/tinijs.dev/app/services/content.ts +++ b/apps/tinijs.dev/app/services/content.ts @@ -51,14 +51,6 @@ export const toolboxPostService = new ContentService( 'toolbox-posts' ); -export const serverCategoryService = new ContentService< - DocCategory, - DocCategoryDetail ->('server-categories'); -export const serverPostService = new ContentService( - 'server-posts' -); - export const cliCategoryService = new ContentService< DocCategory, DocCategoryDetail diff --git a/apps/tinijs.dev/content/cli-posts/302 - server/index.md b/apps/tinijs.dev/content/cli-posts/302 - server/index.md index 3ebc8eeb..79d32630 100644 --- a/apps/tinijs.dev/content/cli-posts/302 - server/index.md +++ b/apps/tinijs.dev/content/cli-posts/302 - server/index.md @@ -6,7 +6,7 @@ } +++ -Expandable commands provided by the [Tini Server](/server). +Expandable commands provided by the [Tini Server](/module/server). ```bash @@ -20,4 +20,4 @@ npx tini server build npx tini server preview ``` -Please see more detail at [Server page](/server/cli). +Please see more detail at [Server page](/module/server-cli). diff --git a/apps/tinijs.dev/content/server-categories/1 - uncategorized/index.md b/apps/tinijs.dev/content/framework-categories/4 - backend/index.md similarity index 59% rename from apps/tinijs.dev/content/server-categories/1 - uncategorized/index.md rename to apps/tinijs.dev/content/framework-categories/4 - backend/index.md index ce6d9d6e..feb1f3fe 100644 --- a/apps/tinijs.dev/content/server-categories/1 - uncategorized/index.md +++ b/apps/tinijs.dev/content/framework-categories/4 - backend/index.md @@ -1,6 +1,6 @@ +++json { "status": "publish", - "title": "Uncategorized" + "title": "Backends" } +++ diff --git a/apps/tinijs.dev/content/framework-categories/4 - distribution/index.md b/apps/tinijs.dev/content/framework-categories/5 - distribution/index.md similarity index 100% rename from apps/tinijs.dev/content/framework-categories/4 - distribution/index.md rename to apps/tinijs.dev/content/framework-categories/5 - distribution/index.md diff --git a/apps/tinijs.dev/content/framework-posts/102 - starter/index.md b/apps/tinijs.dev/content/framework-posts/102 - starter/index.md index 14cce509..b001e78a 100644 --- a/apps/tinijs.dev/content/framework-posts/102 - starter/index.md +++ b/apps/tinijs.dev/content/framework-posts/102 - starter/index.md @@ -1,7 +1,7 @@ +++json { "status": "publish", - "title": "Starters", + "title": "Starter templates", "category": "uncategorized" } +++ diff --git a/apps/tinijs.dev/content/framework-posts/103 - folder-structure/index.md b/apps/tinijs.dev/content/framework-posts/103 - folder-structure/index.md index a641fd07..5bafe184 100644 --- a/apps/tinijs.dev/content/framework-posts/103 - folder-structure/index.md +++ b/apps/tinijs.dev/content/framework-posts/103 - folder-structure/index.md @@ -2,7 +2,7 @@ { "status": "publish", "title": "Folder Structure", - "category": "uncategorized" + "category": "core" } +++ diff --git a/apps/tinijs.dev/content/framework-posts/104 - compile/index.md b/apps/tinijs.dev/content/framework-posts/104 - compile/index.md index 8b3263f5..84b8aec9 100644 --- a/apps/tinijs.dev/content/framework-posts/104 - compile/index.md +++ b/apps/tinijs.dev/content/framework-posts/104 - compile/index.md @@ -2,11 +2,11 @@ { "status": "publish", "title": "Compile", - "category": "uncategorized" + "category": "core" } +++ -Compile is an optional but recommended step in the dev/build workflow for TiniJS apps. You can think of it as a transformation step that takes the source code and transforms it before forwarding the code to the build tool. +Compile is an **optional but recommended** step in the dev/build workflow for TiniJS apps. You can think of it as a transformation step that takes the source code and transforms it before forwarding the code to the build tool. With the **Default Compiler**, you can use these features: - Support `SCSS` in `` css`...` `` diff --git a/apps/tinijs.dev/content/framework-posts/105 - dev-build/index.md b/apps/tinijs.dev/content/framework-posts/105 - dev-build/index.md index 7e59e26b..a11fa261 100644 --- a/apps/tinijs.dev/content/framework-posts/105 - dev-build/index.md +++ b/apps/tinijs.dev/content/framework-posts/105 - dev-build/index.md @@ -2,7 +2,7 @@ { "status": "publish", "title": "Dev and Build", - "category": "uncategorized" + "category": "core" } +++ @@ -10,30 +10,24 @@ The **development and build workflow** of TiniJS are backed by any of your favor In theory, you can use any other tools (Turbo Pack, Gulp, ...). But I don't have time to try them, it is opened up for community contribution. -## Vite (default, recommended) +## Via Tini CLI -Homepage: +Using [Tini CLI](/cli) and official builders is the **recommended** way to setup development and build workflow. + +### Vite (default, recommended) -### Setup +Homepage: -**Option 1**: Via **Tini CLI** (recommended) +#### Setup 1. Install: `npm i -D @tinijs/cli @tinijs/vite-builder` 2. Add scripts: - **dev**: `tini dev` - **build**: `tini build` -**Option 2**: Or, manually +#### Config -1. Install: `npm i -D vite` -2. Add scripts: - - **dev**: `vite app` - - **build**: `vite build app --outDir www` - -### Config - - -When use [Tini CLI](/cli) (option 1), you can provide options via `tini.config.ts`. +The Vite builder supports basic configuration, you can provide options in `tini.config.ts`. ```ts import type {BuildOptions} from '@tinijs/vite-builder'; @@ -47,7 +41,7 @@ export default defineTiniConfig({ devCommand?: string | string[]; devPort?: number; devHost?: string; - onDevServerStart?: () => void; + onDevServerStart?: (context) => void; // build buildCommand?: string | string[]; // optimazations @@ -59,13 +53,13 @@ export default defineTiniConfig({ }); ``` -## Parcel +By default, Vite builder using [this default config](https://github.com/tinijs/tinijs/blob/main/packages/vite-builder/vite.config.js), you can create `vite.config.ts` in your project root to with advanced configuration. You can also use the `configPath` option to point to a config file some where else. -Homepage: +### Parcel -### Setup +Homepage: -**Option 1**: Via **Tini CLI** (recommended) +#### Setup 1. Install: `npm i -D @tinijs/cli @tinijs/parcel-builder` 2. Config _tini.config.ts_, set **build.builder** to `@tinijs/parcel-builder` @@ -73,14 +67,7 @@ Homepage: - **dev**: `tini dev` - **build**: `tini build` -**Option 2**: Or, manually - -1. Install: `npm i -D parcel @parcel/config-default` -2. Add scripts: - - **dev**: `parcel app/index.html --dist-dir www` - - **build**: `parcel build app/index.html --dist-dir www` - -### Additional setup +#### Additional setup Either using Tini CLI or setup manually, you need to do these additional setup. @@ -94,9 +81,9 @@ Either using Tini CLI or setup manually, you need to do these additional setup. } ``` -### Config +#### Config -When use [Tini CLI](/cli) (option 1), you can provide options via `tini.config.ts`. +The Parcel builder supports basic configuration, you can provide options in `tini.config.ts`. ```ts import type {BuildOptions} from '@tinijs/parcel-builder'; @@ -111,7 +98,7 @@ export default defineTiniConfig({ devCommand?: string | string[]; devPort?: number; devHost?: string; - onDevServerStart?: () => void; + onDevServerStart?: (context) => void; // build buildCommand?: string | string[]; // optimazations @@ -122,13 +109,13 @@ export default defineTiniConfig({ }); ``` -## Webpack +By default, Parcel builder using [this default config](https://github.com/tinijs/tinijs/blob/main/packages/parcel-builder/.parcelrc), you can create `.parcelrc` in your project root to with advanced configuration. You can also use the `configPath` option to point to a config file some where else. -Homepage: +### Webpack -### Setup +Homepage: -**Option 1**: Via **Tini CLI** (recommended) +#### Setup 1. Install: `npm i -D @tinijs/cli @tinijs/webpack-builder` 2. Config _tini.config.ts_, set **build.builder** to `@tinijs/webpack-builder` @@ -136,17 +123,9 @@ Homepage: - **dev**: `tini dev` - **build**: `tini build` -**Option 2**: Or, manually +#### Config -1. Install: `npm i -D webpack webpack-cli webpack-dev-server html-bundler-webpack-plugin ts-loader` -2. Add _webpack.config.js_, please see [example](https://github.com/tinijs/tinijs/blob/main/packages/webpack-builder/webpack.config.js). -3. Add scripts: - - **dev**: `webpack serve --history-api-fallback --mode development` - - **build**: `webpack build --mode production` - -### Config - -When use [Tini CLI](/cli) (option 1), you can provide options via `tini.config.ts`. +The Webpack builder supports basic configuration, you can provide options in `tini.config.ts`. ```ts import type {BuildOptions} from '@tinijs/webpack-builder'; @@ -161,7 +140,7 @@ export default defineTiniConfig({ devCommand?: string | string[]; devPort?: number; devHost?: string; - onDevServerStart?: () => void; + onDevServerStart?: (context) => void; // build buildCommand?: string | string[]; // optimazations @@ -171,3 +150,31 @@ export default defineTiniConfig({ }); ``` + +By default, Webpack builder using [this default config](https://github.com/tinijs/tinijs/blob/main/packages/webpack-builder/webpack.config.js), you can create `webpack.config.js` in your project root to with advanced configuration. You can also use the `configPath` option to point to a config file some where else. + +## Manual setup + +If you prefer to setup manually, you can follow these steps for each tools. + +### Vite + +1. Install: `npm i -D vite` +2. Add scripts: + - **dev**: `vite app` + - **build**: `vite build app --outDir www` + +### Parcel + +1. Install: `npm i -D parcel @parcel/config-default` +2. Add scripts: + - **dev**: `parcel app/index.html --dist-dir www` + - **build**: `parcel build app/index.html --dist-dir www` + +### Webpack + +1. Install: `npm i -D webpack webpack-cli webpack-dev-server html-bundler-webpack-plugin ts-loader` +2. Add _webpack.config.js_, please see [example](https://github.com/tinijs/tinijs/blob/main/packages/webpack-builder/webpack.config.js). +3. Add scripts: + - **dev**: `webpack serve --history-api-fallback --mode development` + - **build**: `webpack build --mode production` diff --git a/apps/tinijs.dev/content/framework-posts/205 - page-layout/index.md b/apps/tinijs.dev/content/framework-posts/205 - page-layout/index.md index 297e73ff..c6ae08e4 100644 --- a/apps/tinijs.dev/content/framework-posts/205 - page-layout/index.md +++ b/apps/tinijs.dev/content/framework-posts/205 - page-layout/index.md @@ -35,7 +35,7 @@ export class AppPageXXX extends TiniComponent { } ``` -Beside the `@Page()` decorator, everything else would work the same as any component. But, please note the `name: 'app-page-xxx'` property, it plays a role later when we setup the [Tini Router](https://tinijs.dev/framework/router-overview). +Beside the `@Page()` decorator, everything else would work the same as any component. But, please note the `name: 'app-page-xxx'` property, it plays a role later when we setup the [Tini Router](https://tinijs.dev/framework/router). ## Layouts @@ -72,4 +72,4 @@ export class AppLayoutXXX extends TiniComponent { } ``` -Beside the `@Layout()` decorator and the `` in the template, everything else would work the same as any component. But, please note the `name: 'app-layout-xxx'` property, it plays a role later when we setup the [Tini Router](https://tinijs.dev/framework/router-overview). +Beside the `@Layout()` decorator and the `` in the template, everything else would work the same as any component. But, please note the `name: 'app-layout-xxx'` property, it plays a role later when we setup the [Tini Router](https://tinijs.dev/framework/router). diff --git a/apps/tinijs.dev/content/framework-posts/301 - router-overview/index.md b/apps/tinijs.dev/content/framework-posts/301 - router-overview/index.md deleted file mode 100644 index 105ea8ea..00000000 --- a/apps/tinijs.dev/content/framework-posts/301 - router-overview/index.md +++ /dev/null @@ -1,24 +0,0 @@ -+++json -{ - "status": "publish", - "title": "Overview", - "category": "router" -} -+++ - -**Tini Router** is a way to add routing capability to TiniJS apps. It has several useful features: - -- **Bundle** or **lazy load** pages -- Routes with **layouts** -- Many **param patterns** -- Navigate using the `a` tag -- Route **guards** -- **404** pages -- _And more_ - - -To get started, install: - -```bash -npm i @tinijs/router -``` diff --git a/apps/tinijs.dev/content/framework-posts/302 - router-usage/index.md b/apps/tinijs.dev/content/framework-posts/301 - router/index.md similarity index 96% rename from apps/tinijs.dev/content/framework-posts/302 - router-usage/index.md rename to apps/tinijs.dev/content/framework-posts/301 - router/index.md index 3b76251b..d7b4dc2b 100644 --- a/apps/tinijs.dev/content/framework-posts/302 - router-usage/index.md +++ b/apps/tinijs.dev/content/framework-posts/301 - router/index.md @@ -6,6 +6,22 @@ } +++ +**Tini Router** is a way to add routing capability to TiniJS apps. It has several useful features: + +- **Bundle** or **lazy load** pages +- Routes with **layouts** +- Many **param patterns** +- Navigate using the `a` tag +- Route **guards** +- **404** pages +- _And more_ + +To get started, install: + +```bash +npm i @tinijs/router +``` + ## Define routes To define routes, we create the file `./app/routes.ts` and add the route entries, for example: diff --git a/apps/tinijs.dev/content/framework-posts/303 - router-meta/index.md b/apps/tinijs.dev/content/framework-posts/302 - meta/index.md similarity index 100% rename from apps/tinijs.dev/content/framework-posts/303 - router-meta/index.md rename to apps/tinijs.dev/content/framework-posts/302 - meta/index.md diff --git a/apps/tinijs.dev/content/framework-posts/401 - backend-official/index.md b/apps/tinijs.dev/content/framework-posts/401 - backend-official/index.md new file mode 100644 index 00000000..ab4a686f --- /dev/null +++ b/apps/tinijs.dev/content/framework-posts/401 - backend-official/index.md @@ -0,0 +1,12 @@ ++++json +{ + "status": "publish", + "title": "Content and Server", + "category": "backend" +} ++++ + +TiniJS provides 2 official backend solutions: + +- [Tini Content](/module/content) - a file-based content management system for public content without a server or database +- [Tini Server](/module/server) - an optional Nitro server for server/API routes and other server stuffs. diff --git a/apps/tinijs.dev/content/framework-posts/402 - backend-firebase-supabase/index.md b/apps/tinijs.dev/content/framework-posts/402 - backend-firebase-supabase/index.md new file mode 100644 index 00000000..aff5f4f8 --- /dev/null +++ b/apps/tinijs.dev/content/framework-posts/402 - backend-firebase-supabase/index.md @@ -0,0 +1,11 @@ ++++json +{ + "status": "publish", + "title": "Firebase and Supabase", + "category": "backend" +} ++++ + +Contribution welcome! 😍 + +**TODO**: write recipe for intergrating Firebase and Supabase. diff --git a/apps/tinijs.dev/content/framework-posts/403 - backend-headless-cms/index.md b/apps/tinijs.dev/content/framework-posts/403 - backend-headless-cms/index.md new file mode 100644 index 00000000..dd5c5dbf --- /dev/null +++ b/apps/tinijs.dev/content/framework-posts/403 - backend-headless-cms/index.md @@ -0,0 +1,11 @@ ++++json +{ + "status": "publish", + "title": "Headless CMS", + "category": "backend" +} ++++ + +Contribution welcome! 😍 + +**TODO**: write recipe for intergrating Strapi and other headless CMS. diff --git a/apps/tinijs.dev/content/framework-posts/404 - backend-node/index.md b/apps/tinijs.dev/content/framework-posts/404 - backend-node/index.md new file mode 100644 index 00000000..2e369802 --- /dev/null +++ b/apps/tinijs.dev/content/framework-posts/404 - backend-node/index.md @@ -0,0 +1,11 @@ ++++json +{ + "status": "publish", + "title": "Node servers", + "category": "backend" +} ++++ + +Contribution welcome! 😍 + +**TODO**: write recipe for intergrating tRPC, NestJS and other Node servers. diff --git a/apps/tinijs.dev/content/framework-posts/405 - backend-rust/index.md b/apps/tinijs.dev/content/framework-posts/405 - backend-rust/index.md new file mode 100644 index 00000000..fa5fbdef --- /dev/null +++ b/apps/tinijs.dev/content/framework-posts/405 - backend-rust/index.md @@ -0,0 +1,11 @@ ++++json +{ + "status": "publish", + "title": "Rust servers", + "category": "backend" +} ++++ + +Contribution welcome! 😍 + +**TODO**: write recipe for intergrating Axum, Rocket and other Rust servers. diff --git a/apps/tinijs.dev/content/framework-posts/401 - distribution-web/index.md b/apps/tinijs.dev/content/framework-posts/501 - distribution-web/index.md similarity index 88% rename from apps/tinijs.dev/content/framework-posts/401 - distribution-web/index.md rename to apps/tinijs.dev/content/framework-posts/501 - distribution-web/index.md index 567690b9..e7ee505c 100644 --- a/apps/tinijs.dev/content/framework-posts/401 - distribution-web/index.md +++ b/apps/tinijs.dev/content/framework-posts/501 - distribution-web/index.md @@ -8,7 +8,7 @@ A TiniJS app can be started as a static web no matter big or small without a need of a server or database. You can always use SaaS services for almost any backend needs. -An [optional Nitro server](/server) for server/API routes and other server stuffs if you need to handle backend tasks and refer to serve the web app from a Node server instead of a static host. +An [optional Nitro server](/module/server) for server/API routes and other server stuffs if you need to handle backend tasks and refer to serve the web app from a Node server instead of a static host. This guide will focus on distributing a TiniJS web app as a static web. After you have built your web app, you can run `npm run build` to generate the distribution files. The distribution files are located by default in the `.output` folder. You can now upload the files to a static web host like GitHub Pages, Cloudflare Pages, Netlify, Firebase Hosting, etc. diff --git a/apps/tinijs.dev/content/framework-posts/402 - distribution-pwa/index.md b/apps/tinijs.dev/content/framework-posts/502 - distribution-pwa/index.md similarity index 100% rename from apps/tinijs.dev/content/framework-posts/402 - distribution-pwa/index.md rename to apps/tinijs.dev/content/framework-posts/502 - distribution-pwa/index.md diff --git a/apps/tinijs.dev/content/framework-posts/403 - distribution-desktop/index.md b/apps/tinijs.dev/content/framework-posts/503 - distribution-desktop/index.md similarity index 100% rename from apps/tinijs.dev/content/framework-posts/403 - distribution-desktop/index.md rename to apps/tinijs.dev/content/framework-posts/503 - distribution-desktop/index.md diff --git a/apps/tinijs.dev/content/framework-posts/404 - distribution-mobile/index.md b/apps/tinijs.dev/content/framework-posts/504 - distribution-mobile/index.md similarity index 100% rename from apps/tinijs.dev/content/framework-posts/404 - distribution-mobile/index.md rename to apps/tinijs.dev/content/framework-posts/504 - distribution-mobile/index.md diff --git a/apps/tinijs.dev/content/module-categories/3 - pwa/index.md b/apps/tinijs.dev/content/module-categories/2 - pwa/index.md similarity index 100% rename from apps/tinijs.dev/content/module-categories/3 - pwa/index.md rename to apps/tinijs.dev/content/module-categories/2 - pwa/index.md diff --git a/apps/tinijs.dev/content/module-categories/2 - content/index.md b/apps/tinijs.dev/content/module-categories/3 - content/index.md similarity index 100% rename from apps/tinijs.dev/content/module-categories/2 - content/index.md rename to apps/tinijs.dev/content/module-categories/3 - content/index.md diff --git a/apps/tinijs.dev/content/module-categories/4 - server/index.md b/apps/tinijs.dev/content/module-categories/4 - server/index.md new file mode 100644 index 00000000..dc63b946 --- /dev/null +++ b/apps/tinijs.dev/content/module-categories/4 - server/index.md @@ -0,0 +1,6 @@ ++++json +{ + "status": "publish", + "title": "Server" +} ++++ diff --git a/apps/tinijs.dev/content/module-posts/101 - introduction/index.md b/apps/tinijs.dev/content/module-posts/101 - introduction/index.md new file mode 100644 index 00000000..40d3181d --- /dev/null +++ b/apps/tinijs.dev/content/module-posts/101 - introduction/index.md @@ -0,0 +1,13 @@ ++++json +{ + "status": "publish", + "title": "Introduction", + "category": "uncategorized" +} ++++ + +**Tini Modules** are a way to extend the functionalities of TiniJS apps. A module can contains [library code](/toolbox), [CLI expansion](/cli), assets or anything else. + +You can using modules to tap into the workflow of TiniJS apps to add functionalities or modify behaviors. + +**TODO**: Add more detail. diff --git a/apps/tinijs.dev/content/module-posts/101 - overview/index.md b/apps/tinijs.dev/content/module-posts/101 - overview/index.md deleted file mode 100644 index e534c44d..00000000 --- a/apps/tinijs.dev/content/module-posts/101 - overview/index.md +++ /dev/null @@ -1,13 +0,0 @@ -+++json -{ - "status": "publish", - "title": "Overview", - "category": "uncategorized" -} -+++ - -Tini Modules are special types of package where you can tap into the workflow of an TiniJS app to add functionalities or modify behaviors. - -Beside the main loader, a module can also contain CLI expansion and library code. - -**TODO**: Add more detail. diff --git a/apps/tinijs.dev/content/module-posts/301 - pwa/index.md b/apps/tinijs.dev/content/module-posts/201 - pwa/index.md similarity index 100% rename from apps/tinijs.dev/content/module-posts/301 - pwa/index.md rename to apps/tinijs.dev/content/module-posts/201 - pwa/index.md diff --git a/apps/tinijs.dev/content/module-posts/201 - content/index.md b/apps/tinijs.dev/content/module-posts/301 - content/index.md similarity index 100% rename from apps/tinijs.dev/content/module-posts/201 - content/index.md rename to apps/tinijs.dev/content/module-posts/301 - content/index.md diff --git a/apps/tinijs.dev/content/module-posts/202 - content-cli/index.md b/apps/tinijs.dev/content/module-posts/302 - content-cli/index.md similarity index 100% rename from apps/tinijs.dev/content/module-posts/202 - content-cli/index.md rename to apps/tinijs.dev/content/module-posts/302 - content-cli/index.md diff --git a/apps/tinijs.dev/content/module-posts/203 - content-11ty/index.md b/apps/tinijs.dev/content/module-posts/303 - content-11ty/index.md similarity index 100% rename from apps/tinijs.dev/content/module-posts/203 - content-11ty/index.md rename to apps/tinijs.dev/content/module-posts/303 - content-11ty/index.md index ee371eeb..f859e846 100644 --- a/apps/tinijs.dev/content/module-posts/203 - content-11ty/index.md +++ b/apps/tinijs.dev/content/module-posts/303 - content-11ty/index.md @@ -21,9 +21,9 @@ The configuration for Eleventy is in the `content/eleventy.config.cjs`. The defa - `parseTOML/stringifyTOML` for working with TOML data. - `image/imageUrl/imageData` for working with images. - Plugins, libraries, shortcodes: - - **Image**: shortcodes for working with images - [link](https://www.11ty.dev/docs/plugins/image/) - **App**: shortcode for working with app components - **Tini**: shortcode for working with Tini UI components + - **Image**: shortcodes for working with images - [link](https://www.11ty.dev/docs/plugins/image/) - **Render**: render template inside another template - [link](https://www.11ty.dev/docs/plugins/render/) - **Hightlight**: code highlighting - [link](https://www.11ty.dev/docs/plugins/syntaxhighlight/) - **Bundle**: working with inline CSS and JS - [link](https://github.com/11ty/eleventy-plugin-bundle) diff --git a/apps/tinijs.dev/content/module-posts/204 - content-manage/index.md b/apps/tinijs.dev/content/module-posts/304 - content-manage/index.md similarity index 100% rename from apps/tinijs.dev/content/module-posts/204 - content-manage/index.md rename to apps/tinijs.dev/content/module-posts/304 - content-manage/index.md diff --git a/apps/tinijs.dev/content/module-posts/205 - content-schema/index.md b/apps/tinijs.dev/content/module-posts/305 - content-schema/index.md similarity index 100% rename from apps/tinijs.dev/content/module-posts/205 - content-schema/index.md rename to apps/tinijs.dev/content/module-posts/305 - content-schema/index.md diff --git a/apps/tinijs.dev/content/module-posts/206 - content-access/index.md b/apps/tinijs.dev/content/module-posts/306 - content-access/index.md similarity index 100% rename from apps/tinijs.dev/content/module-posts/206 - content-access/index.md rename to apps/tinijs.dev/content/module-posts/306 - content-access/index.md diff --git a/apps/tinijs.dev/content/module-posts/207 - content-utils/index.md b/apps/tinijs.dev/content/module-posts/307 - content-utils/index.md similarity index 100% rename from apps/tinijs.dev/content/module-posts/207 - content-utils/index.md rename to apps/tinijs.dev/content/module-posts/307 - content-utils/index.md diff --git a/apps/tinijs.dev/content/module-posts/208 - content-no-framework/index.md b/apps/tinijs.dev/content/module-posts/308 - content-no-framework/index.md similarity index 100% rename from apps/tinijs.dev/content/module-posts/208 - content-no-framework/index.md rename to apps/tinijs.dev/content/module-posts/308 - content-no-framework/index.md diff --git a/apps/tinijs.dev/content/module-posts/209 - content-vue/index.md b/apps/tinijs.dev/content/module-posts/309 - content-vue/index.md similarity index 100% rename from apps/tinijs.dev/content/module-posts/209 - content-vue/index.md rename to apps/tinijs.dev/content/module-posts/309 - content-vue/index.md diff --git a/apps/tinijs.dev/content/module-posts/210 - content-react/index.md b/apps/tinijs.dev/content/module-posts/310 - content-react/index.md similarity index 100% rename from apps/tinijs.dev/content/module-posts/210 - content-react/index.md rename to apps/tinijs.dev/content/module-posts/310 - content-react/index.md diff --git a/apps/tinijs.dev/content/module-posts/211 - content-angular/index.md b/apps/tinijs.dev/content/module-posts/311 - content-angular/index.md similarity index 100% rename from apps/tinijs.dev/content/module-posts/211 - content-angular/index.md rename to apps/tinijs.dev/content/module-posts/311 - content-angular/index.md diff --git a/apps/tinijs.dev/content/module-posts/212 - content-svelte/index.md b/apps/tinijs.dev/content/module-posts/312 - content-svelte/index.md similarity index 100% rename from apps/tinijs.dev/content/module-posts/212 - content-svelte/index.md rename to apps/tinijs.dev/content/module-posts/312 - content-svelte/index.md diff --git a/apps/tinijs.dev/content/server-posts/101 - get-started/index.md b/apps/tinijs.dev/content/module-posts/401 - server/index.md similarity index 97% rename from apps/tinijs.dev/content/server-posts/101 - get-started/index.md rename to apps/tinijs.dev/content/module-posts/401 - server/index.md index e31f81fd..455cc42d 100644 --- a/apps/tinijs.dev/content/server-posts/101 - get-started/index.md +++ b/apps/tinijs.dev/content/module-posts/401 - server/index.md @@ -2,7 +2,7 @@ { "status": "publish", "title": "Get Started", - "category": "uncategorized" + "category": "server" } +++ @@ -34,7 +34,7 @@ The production build will be in the `.output` folder, depends on the deploy pipe ## CLI Expansion -The above `tini server ...` commands are available via [Tini CLI](/cli) expandable architect. Please see [Tini Server CLI expansion](/server/cli) for more details. +The above `tini server ...` commands are available via [Tini CLI](/cli) expandable architect. Please see [Tini Server CLI expansion](/module/server-cli) for more details. ## Server Routes diff --git a/apps/tinijs.dev/content/server-posts/102 - cli/index.md b/apps/tinijs.dev/content/module-posts/402 - server-cli/index.md similarity index 94% rename from apps/tinijs.dev/content/server-posts/102 - cli/index.md rename to apps/tinijs.dev/content/module-posts/402 - server-cli/index.md index 6014fe85..c4cc45f5 100644 --- a/apps/tinijs.dev/content/server-posts/102 - cli/index.md +++ b/apps/tinijs.dev/content/module-posts/402 - server-cli/index.md @@ -2,7 +2,7 @@ { "status": "publish", "title": "CLI expansion", - "category": "uncategorized" + "category": "server" } +++ diff --git a/apps/tinijs.dev/content/toolbox-posts/101 - get-started/index.md b/apps/tinijs.dev/content/toolbox-posts/101 - get-started/index.md index 9a2c2105..02b4ca7c 100644 --- a/apps/tinijs.dev/content/toolbox-posts/101 - get-started/index.md +++ b/apps/tinijs.dev/content/toolbox-posts/101 - get-started/index.md @@ -6,7 +6,7 @@ } +++ -Tini Toolbox is a collection of commonly used utilities and services for building web applications. It is aimed to provide every useful tools from a wide range of categories in a unified place. +**Tini Toolbox** is a collection of commonly used utilities and services for building web applications. It is aimed to provide every useful tools from a wide range of categories in a unified place. The utils and services can be used with TiniJS framework and other frameworks or no framework. diff --git a/apps/tinijs.dev/content/toolbox-posts/201 - common-util/index.md b/apps/tinijs.dev/content/toolbox-posts/201 - common-util/index.md index 4c44fcf5..67fa852c 100644 --- a/apps/tinijs.dev/content/toolbox-posts/201 - common-util/index.md +++ b/apps/tinijs.dev/content/toolbox-posts/201 - common-util/index.md @@ -1,7 +1,7 @@ +++json { "status": "publish", - "title": "Utils", + "title": "Common utils", "category": "common" } +++ diff --git a/apps/tinijs.dev/content/toolbox-posts/202 - common-service/index.md b/apps/tinijs.dev/content/toolbox-posts/202 - common-service/index.md index 7a0ad5f8..9b4b7450 100644 --- a/apps/tinijs.dev/content/toolbox-posts/202 - common-service/index.md +++ b/apps/tinijs.dev/content/toolbox-posts/202 - common-service/index.md @@ -1,7 +1,7 @@ +++json { "status": "publish", - "title": "Services", + "title": "Common services", "category": "common" } +++ diff --git a/apps/tinijs.dev/content/toolbox-posts/301 - app-util/index.md b/apps/tinijs.dev/content/toolbox-posts/301 - app-util/index.md index 4bb7b99e..5304ce9f 100644 --- a/apps/tinijs.dev/content/toolbox-posts/301 - app-util/index.md +++ b/apps/tinijs.dev/content/toolbox-posts/301 - app-util/index.md @@ -1,7 +1,7 @@ +++json { "status": "publish", - "title": "Utils", + "title": "App utils", "category": "app" } +++ diff --git a/apps/tinijs.dev/content/toolbox-posts/302 - app-service/index.md b/apps/tinijs.dev/content/toolbox-posts/302 - app-service/index.md index fbc418e2..c0658565 100644 --- a/apps/tinijs.dev/content/toolbox-posts/302 - app-service/index.md +++ b/apps/tinijs.dev/content/toolbox-posts/302 - app-service/index.md @@ -1,7 +1,7 @@ +++json { "status": "publish", - "title": "Services", + "title": "App services", "category": "app" } +++ diff --git a/apps/tinijs.dev/content/toolbox-posts/401 - fetch-util/index.md b/apps/tinijs.dev/content/toolbox-posts/401 - fetch-util/index.md index 253f0234..9a672830 100644 --- a/apps/tinijs.dev/content/toolbox-posts/401 - fetch-util/index.md +++ b/apps/tinijs.dev/content/toolbox-posts/401 - fetch-util/index.md @@ -1,7 +1,7 @@ +++json { "status": "publish", - "title": "Utils", + "title": "Fetch utils", "category": "fetch" } +++ diff --git a/apps/tinijs.dev/content/toolbox-posts/402 - fetch-service/index.md b/apps/tinijs.dev/content/toolbox-posts/402 - fetch-service/index.md index 17426529..d32358e9 100644 --- a/apps/tinijs.dev/content/toolbox-posts/402 - fetch-service/index.md +++ b/apps/tinijs.dev/content/toolbox-posts/402 - fetch-service/index.md @@ -1,7 +1,7 @@ +++json { "status": "publish", - "title": "Services", + "title": "Fetch services", "category": "fetch" } +++ diff --git a/apps/tinijs.dev/content/toolbox-posts/501 - localstorage-util/index.md b/apps/tinijs.dev/content/toolbox-posts/501 - localstorage-util/index.md index 4886a7c1..566559cd 100644 --- a/apps/tinijs.dev/content/toolbox-posts/501 - localstorage-util/index.md +++ b/apps/tinijs.dev/content/toolbox-posts/501 - localstorage-util/index.md @@ -1,7 +1,7 @@ +++json { "status": "publish", - "title": "Utils", + "title": "Localstorage utils", "category": "localstorage" } +++ diff --git a/apps/tinijs.dev/content/toolbox-posts/502 - localstorage-service/index.md b/apps/tinijs.dev/content/toolbox-posts/502 - localstorage-service/index.md index c5b12365..3a654ca1 100644 --- a/apps/tinijs.dev/content/toolbox-posts/502 - localstorage-service/index.md +++ b/apps/tinijs.dev/content/toolbox-posts/502 - localstorage-service/index.md @@ -1,7 +1,7 @@ +++json { "status": "publish", - "title": "Services", + "title": "Localstorage services", "category": "localstorage" } +++ From 8542ea9f631afab79311343aa77b704abbf8ef85 Mon Sep 17 00:00:00 2001 From: Nhan Lam Date: Wed, 1 May 2024 18:12:51 +0700 Subject: [PATCH 10/11] Fix content build --- .../module-posts/301 - content/index.md | 7 +- .../module-posts/302 - content-cli/index.md | 2 + packages/content/11ty/base.config.cjs | 10 +- .../content/cli/commands/content-build.ts | 121 ++++++++---------- 4 files changed, 61 insertions(+), 79 deletions(-) diff --git a/apps/tinijs.dev/content/module-posts/301 - content/index.md b/apps/tinijs.dev/content/module-posts/301 - content/index.md index feecc4b0..fb809bfe 100644 --- a/apps/tinijs.dev/content/module-posts/301 - content/index.md +++ b/apps/tinijs.dev/content/module-posts/301 - content/index.md @@ -54,9 +54,10 @@ export default defineTiniConfig({ [ '@tinijs/content', { - dir?: string, // default is 'content' - stagingDir?: string, // default is '.content' - outDir?: string, // default is 'app/public' + dir?: string, // conten folder, default is 'content' + stagingDir?: string, // 11ty output dir, default is '.content' + outDir?: string, // build output, default is 'app/public' + clean?: boolean, // clean staging and out dir, default is false } as ContentModuleOptions ] diff --git a/apps/tinijs.dev/content/module-posts/302 - content-cli/index.md b/apps/tinijs.dev/content/module-posts/302 - content-cli/index.md index 9eb62748..da6caa93 100644 --- a/apps/tinijs.dev/content/module-posts/302 - content-cli/index.md +++ b/apps/tinijs.dev/content/module-posts/302 - content-cli/index.md @@ -21,3 +21,5 @@ npx tini content build | `--dir ` or `-d` | Custom content dir, default is `content`. | | `--stagingDir ` or `-s` | Custom staging dir for 11ty, default is `.content`. | | `--outDir ` or `-o` | Custom output dir, default is `app/public`. | +| `--clean` or `-c` | Clean staging and out dir before build. | +| `--debug` or `-d` | Show 11ty logs. | diff --git a/packages/content/11ty/base.config.cjs b/packages/content/11ty/base.config.cjs index 993351c3..99baeede 100644 --- a/packages/content/11ty/base.config.cjs +++ b/packages/content/11ty/base.config.cjs @@ -9,7 +9,7 @@ const pluginImage = require('./image.plugin.cjs'); const pluginElem = require('./elem.plugin.cjs'); module.exports = function (eleventyConfig, options) { - const {TINI_11TY_SRC = 'content', TINI_11TY_DEST = '.content'} = process.env; + const {TINI_11TY_INPUT, TINI_11TY_OUTPUT} = process.env; const { useCopy, useImagePlugin, @@ -33,8 +33,8 @@ module.exports = function (eleventyConfig, options) { * Copy */ - if (useCopy !== false) { - eleventyConfig.addPassthroughCopy(useCopy || `${TINI_11TY_SRC}/**/uploads/**/*`); + if (useCopy) { + eleventyConfig.addPassthroughCopy(useCopy); } /* @@ -105,8 +105,8 @@ module.exports = function (eleventyConfig, options) { markdownTemplateEngine: 'njk', htmlTemplateEngine: 'njk', dir: { - input: TINI_11TY_SRC, - output: TINI_11TY_DEST, + input: TINI_11TY_INPUT, + output: TINI_11TY_OUTPUT, }, pathPrefix: '/tini-content/', ...(eleventyOptions || {}), diff --git a/packages/content/cli/commands/content-build.ts b/packages/content/cli/commands/content-build.ts index dd9ac796..8196693e 100644 --- a/packages/content/cli/commands/content-build.ts +++ b/packages/content/cli/commands/content-build.ts @@ -1,7 +1,7 @@ import {resolve} from 'pathe'; -import {green, blueBright, gray} from 'colorette'; -import {copyFile, readFile} from 'node:fs/promises'; -import {pathExistsSync, ensureDir, readJSON, outputJSON} from 'fs-extra/esm'; +import {green, gray, blueBright} from 'colorette'; +import {readFile} from 'node:fs/promises'; +import {pathExistsSync, readJSON, outputJSON, copy} from 'fs-extra/esm'; import {createHash} from 'node:crypto'; import {decodeHTML} from 'entities'; import {minify} from 'html-minifier'; @@ -13,9 +13,11 @@ import slugify from '@sindresorhus/slugify'; import {execa} from 'execa'; import {consola} from 'consola'; import {defu} from 'defu'; -import {getTiniProject, getProjectDirs} from '@tinijs/project'; +import {getProjectDirs} from '@tinijs/project'; import {cleanDir, listDir, createCLICommand} from '@tinijs/cli'; +import contentCLIExpansion from '../expand.js'; + interface BuildOptions { collectTags?: false | {collection: string; field?: string}; } @@ -94,6 +96,11 @@ export const contentBuildCommand = createCLICommand( type: 'string', description: 'The output directory.', }, + clean: { + alias: 'c', + type: 'boolean', + description: 'Clean staging dir and out dir before build.', + }, debug: { alias: 'd', type: 'boolean', @@ -104,79 +111,64 @@ export const contentBuildCommand = createCLICommand( async (args, callbacks) => { const debugMode = !!args.debug; const contentDir = args.dir || 'content'; + const contentDirPath = resolve(contentDir); const eleventyConfigPath = resolve(contentDir, 'eleventy.config.cjs'); if (!pathExistsSync(eleventyConfigPath)) { return callbacks?.onInvalidProject?.(contentDir); } - const {config: tiniConfig} = await getTiniProject(); - const {srcDir, dirs} = getProjectDirs(tiniConfig); + const {tiniProject} = contentCLIExpansion.context; + const {srcDir, dirs} = getProjectDirs(tiniProject.config); const stagingDir = args.stagingDir || '.content'; - const outDir = `${args.outDir || `${srcDir}/${dirs.public}`}/tini-content`; const stagingDirPath = resolve(stagingDir); + const outDir = `${args.outDir || `${srcDir}/${dirs.public}`}/tini-content`; const outDirPath = resolve(outDir); + callbacks?.onStart?.(stagingDir, debugMode); - // read cache digests - const cachedFile = '_cached.json'; - const cachedPath = resolve(stagingDir, cachedFile); - const cacheDigests: Record = !pathExistsSync(cachedPath) - ? {} - : await readJSON(cachedPath); + // clean dirs + if (args.clean) { + await cleanDir(stagingDirPath); + await cleanDir(outDirPath); + } // compile using 11ty - callbacks?.onStart?.(stagingDir, debugMode); - await cleanDir(stagingDirPath); await execa('npx', ['@11ty/eleventy', '--config', eleventyConfigPath], { env: { - TINI_11TY_SRC: contentDir, - TINI_11TY_DEST: stagingDir, + TINI_11TY_INPUT: contentDir, + TINI_11TY_OUTPUT: stagingDir, }, stdio: !debugMode ? undefined : 'inherit', }); - // read content - const {copyPaths, buildPaths} = (await listDir(stagingDirPath)).reduce( - (result, item) => { - if (item === cachedPath) return result; - if ( - ~item.indexOf('/uploads/') || - ~item.indexOf(`/${stagingDir}/images/`) || - !item.endsWith('.html') - ) { - result.copyPaths.push(item); - } else { - result.buildPaths.push(item); - } - return result; - }, - { - copyPaths: [] as string[], - buildPaths: [] as string[], - } - ); - - // copy - await Promise.all( - copyPaths.map(async path => { - const filePath = path.replace(stagingDir, outDir); - await ensureDir(filePath.replace(/\/[^/]+$/, '')); - return copyFile(path, filePath); - }) + // copy uploads & images + const copyPaths = (await listDir(contentDirPath)).filter(path => + path.includes('/uploads/') ); + for (const path of copyPaths) { + const destPath = resolve( + outDir, + path.replace(`${contentDirPath}/`, '').replace(/\/\d+ - /, '/') + ); + await copy(path, destPath); + } + const imagesPath = resolve(stagingDirPath, 'images'); + if (pathExistsSync(imagesPath)) { + await copy(imagesPath, resolve(outDirPath, 'images')); + } // build + const buildPaths = (await listDir(stagingDirPath)).filter(path => + path.endsWith('/index.html') + ); const indexRecord = {} as Record; const collectionRecord = {} as Record; const extraSearchRecord = {} as Record>; const collectedTagsRecord = {} as Record>; const collectionOptionsCache = {} as Record; - const updatedCacheDigests = {} as Record; let buildCount = 0; - let cachedCount = 0; for (let i = 0; i < buildPaths.length; i++) { const path = buildPaths[i]; const [collection, name] = path - .split(`/${stagingDir}/`) - .pop()! + .replace(`${stagingDirPath}/`, '') .replace(/\/[^/]+$/, '') .split('/'); const [orderStr, slug] = !/^\d+ - /.test(name) @@ -185,7 +177,7 @@ export const contentBuildCommand = createCLICommand( const order = isNaN(+orderStr) ? undefined : +orderStr; callbacks?.onBuildItem?.(collection, name); - // process raw content + // load and process raw content let rawContent = await readFile(path, 'utf8'); rawContent = rawContent.replace(/(

    \+\+\+)|(\+\+\+<\/p>)/g, '+++'); const matterMatching = rawContent.match(/\+\+\+([\s\S]*?)\+\+\+/); @@ -197,15 +189,6 @@ export const contentBuildCommand = createCLICommand( toml: toml.parse.bind(toml), }, }); - const previousDigest = cacheDigests[path]; - const currentDigest = createHash('sha256') - .update(rawContent) - .digest('base64url'); - updatedCacheDigests[path] = currentDigest; - if (previousDigest === currentDigest) { - cachedCount++; - continue; - } if (data.status && data.status !== 'publish' && data.status !== 'archive') continue; @@ -227,7 +210,7 @@ export const contentBuildCommand = createCLICommand( delete data.$build; // item - const docId = currentDigest; + const docId = createHash('sha256').update(rawContent).digest('base64url'); const detail = { ...data, ...data.moredata, @@ -342,21 +325,20 @@ export const contentBuildCommand = createCLICommand( // index await outputJSON(resolve(outDirPath, 'index.json'), indexRecord); - // update cache digests - await outputJSON(cachedPath, updatedCacheDigests); - // done - callbacks?.onDone?.(outDir, copyPaths, buildPaths, buildCount, cachedCount); + callbacks?.onDone?.(outDir, copyPaths, buildPaths, buildCount); }, { onInvalidProject: (contentDir: string) => consola.error( - `Invalid content project (no ${contentDir}/eleventy.config.cjs found).` + `Invalid content project (no ${blueBright( + `${contentDir}/eleventy.config.cjs` + )} found).` ), onStart: (stagingDir: string, debugMode: boolean) => { if (debugMode) return; SPINNER.start( - `Compile content using ${green('11ty')} to ${gray(stagingDir)}.` + `Compile content using ${green('11ty')} to ${gray(stagingDir)}` ); }, onBuildItem: (collection: string, name: string) => { @@ -367,16 +349,13 @@ export const contentBuildCommand = createCLICommand( outDir: string, copyPaths: any[], buildPaths: any[], - buildCount: number, - cachedCount: number + buildCount: number ) => { if (!SPINNER.isSpinning) SPINNER.start(); SPINNER.succeed( `Success! Copy ${green(copyPaths.length)} items and build ${green( buildCount - )}/${buildPaths.length} items${ - !cachedCount ? '' : ` (${green(cachedCount)} cached)` - } to ${gray(outDir)}.\n` + )}/${buildPaths.length} items to ${gray(outDir)}.\n` ); }, } From da64efa79c57f9965d477514b40c3f7fd61b16df Mon Sep 17 00:00:00 2001 From: Nhan Lam Date: Wed, 1 May 2024 19:45:01 +0700 Subject: [PATCH 11/11] Fixes --- .../app/components/doc-page/index.ts | 9 ++ .../app/components/doc-page/menu.ts | 83 ++++++++++--------- .../tinijs.dev/app/components/doc-page/toc.ts | 54 ++++++------ .../101 - get-started/index.md | 2 +- .../module-posts/301 - content/index.md | 4 +- package.json | 2 +- packages/content/module/index.ts | 3 +- packages/default-compiler/lib/index.ts | 25 ++++-- packages/server/package.json | 3 +- packages/ui/app/pages/get-started.ts | 2 +- packages/webpack-builder/package.json | 1 - 11 files changed, 108 insertions(+), 80 deletions(-) diff --git a/apps/tinijs.dev/app/components/doc-page/index.ts b/apps/tinijs.dev/app/components/doc-page/index.ts index c2ac2133..bf3869e0 100644 --- a/apps/tinijs.dev/app/components/doc-page/index.ts +++ b/apps/tinijs.dev/app/components/doc-page/index.ts @@ -279,6 +279,10 @@ export class AppDocPageComponent min-height: calc(var(--page-height) - var(--toolbar-height)); } + .content { + width: 100vw; + } + @media (min-width: 992px) { .container { display: grid; @@ -293,6 +297,7 @@ export class AppDocPageComponent .content { grid-area: content; + width: calc(100vw - 250px); } } @@ -306,6 +311,10 @@ export class AppDocPageComponent app-doc-page-toc { grid-area: toc; } + + .content { + width: calc(100vw - 500px); + } } `; } diff --git a/apps/tinijs.dev/app/components/doc-page/menu.ts b/apps/tinijs.dev/app/components/doc-page/menu.ts index ca6e705a..90adbe9f 100644 --- a/apps/tinijs.dev/app/components/doc-page/menu.ts +++ b/apps/tinijs.dev/app/components/doc-page/menu.ts @@ -99,11 +99,11 @@ export class AppDocPageMenuComponent extends TiniComponent { transform 0.2s ease, opacity 0.2s ease; z-index: 800; - } - .menu.mobile-opened { - opacity: 1; - transform: translateX(0); + &.mobile-opened { + opacity: 1; + transform: translateX(0); + } } .title { @@ -115,13 +115,15 @@ export class AppDocPageMenuComponent extends TiniComponent { gap: var(--size-space); font-weight: bold; font-size: 1.2rem; - } - .title icon-home { - transform: translateY(-2px); - } - .title:hover { - text-decoration: none; - color: var(--color-tertiary); + + icon-home { + transform: translateY(-2px); + } + + &:hover { + text-decoration: none; + color: var(--color-tertiary); + } } ul { @@ -133,34 +135,38 @@ export class AppDocPageMenuComponent extends TiniComponent { display: flex; flex-flow: column; gap: var(--size-space-0_25x); - } - ul li strong { - display: block; - margin-top: var(--size-space-1_5x); - padding-top: var(--size-space); - padding-bottom: var(--size-space-0_25x); - font-size: 1.1rem; - border-top: 1px solid var(--color-background-shade); - } - - ul li:first-child strong { - margin-top: 0; - border-top: none; - padding-top: 0; - } - - ul li tini-link::part(root) { - color: var(--color-medium); - text-decoration: none; - } - ul li tini-link:hover::part(root) { - color: var(--color-text); - } - ul li tini-link::part(active) { - color: var(--color-text); - cursor: default; - pointer-events: none; + li { + strong { + display: block; + margin-top: var(--size-space-1_5x); + padding-top: var(--size-space); + padding-bottom: var(--size-space-0_25x); + font-size: 1.1rem; + border-top: 1px solid var(--color-background-shade); + } + + &:first-child strong { + margin-top: 0; + border-top: none; + padding-top: 0; + } + + tini-link::part(root) { + color: var(--color-medium); + text-decoration: none; + } + + tini-link:hover::part(root) { + color: var(--color-text); + } + + tini-link::part(active) { + color: var(--color-text); + cursor: default; + pointer-events: none; + } + } } @media (min-width: 992px) { @@ -171,6 +177,7 @@ export class AppDocPageMenuComponent extends TiniComponent { left: 0; background: var(--color-background); border-right: none; + padding-bottom: var(--footer-height); } .title { diff --git a/apps/tinijs.dev/app/components/doc-page/toc.ts b/apps/tinijs.dev/app/components/doc-page/toc.ts index f665ac65..f7590245 100644 --- a/apps/tinijs.dev/app/components/doc-page/toc.ts +++ b/apps/tinijs.dev/app/components/doc-page/toc.ts @@ -80,13 +80,13 @@ export class AppDocPageTOCComponent extends TiniComponent { width: calc(100% - var(--size-space-2x)); max-width: var(--wide-ss); z-index: 800; - } - .toc.mobile-opened { - border: 1px solid var(--color-background-shade); - height: auto; - opacity: 1; - transform: translateY(0); + &.mobile-opened { + border: 1px solid var(--color-background-shade); + height: auto; + opacity: 1; + transform: translateY(0); + } } .return-top { @@ -110,26 +110,29 @@ export class AppDocPageTOCComponent extends TiniComponent { margin: 0; border-top: 1px solid var(--color-background-shade); padding: var(--size-space-0_5x) 0; - } - ul li.level-3 { - padding-left: var(--size-space); - } - ul li.level-4 { - padding-left: var(--size-space-2x); - } - ul li.level-5 { - padding-left: var(--size-space-3x); - } - - ul li a { - display: block; - padding: var(--size-space-0_25x) var(--size-space); - color: var(--color-medium); - } - ul li a:hover { - text-decoration: none; - color: var(--color-text); + li { + &.level-3 { + padding-left: var(--size-space); + } + &.level-4 { + padding-left: var(--size-space-2x); + } + &.level-5 { + padding-left: var(--size-space-3x); + } + + a { + display: block; + padding: var(--size-space-0_25x) var(--size-space); + color: var(--color-medium); + + &:hover { + text-decoration: none; + color: var(--color-text); + } + } + } } @media (min-width: 1200px) { @@ -149,6 +152,7 @@ export class AppDocPageTOCComponent extends TiniComponent { right: 0; top: var(--header-height); transform: translateX(1px); + padding-bottom: var(--footer-height); } .return-top { diff --git a/apps/tinijs.dev/content/framework-posts/101 - get-started/index.md b/apps/tinijs.dev/content/framework-posts/101 - get-started/index.md index a566501a..cc777417 100644 --- a/apps/tinijs.dev/content/framework-posts/101 - get-started/index.md +++ b/apps/tinijs.dev/content/framework-posts/101 - get-started/index.md @@ -9,7 +9,7 @@ To quickly create a TiniJS project, you can use the [Tini CLI](/cli) to initialize a template. ```bash -npx @tinijs/cli@latest new my-app -l +npx @tinijs/cli@latest new my-app ``` The above command creates an app by downloading the **Bare** template. In the future, I would like to provide several starter templates. You can also create your own templates and share them with the community or for your own private use. Currently, these templates available at [Starters page](/framework/starter). diff --git a/apps/tinijs.dev/content/module-posts/301 - content/index.md b/apps/tinijs.dev/content/module-posts/301 - content/index.md index fb809bfe..0da028c8 100644 --- a/apps/tinijs.dev/content/module-posts/301 - content/index.md +++ b/apps/tinijs.dev/content/module-posts/301 - content/index.md @@ -87,7 +87,9 @@ Or, add scripts to `package.json`: } ``` -Please note, for now, there is **NO WATCH** for change, please run the command manually when you update the `content` folder. For detail command usage, please see the [Content CLI expansions](/module/content-cli) page. +Future improvements: +- Please note, there is **NO WATCH** for change for now, please run the command manually when you update the `content` folder. For detail command usage, please see the [Content CLI expansions](/module/content-cli) page. +- There is **NO CACHE** also, all files will be re-processed every time you run the command. ## Frameworks diff --git a/package.json b/package.json index f9c65e4c..45cbc27e 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "test": "lerna run test", "lint": "lerna run lint", "fix": "lerna run fix", - "release": "lerna publish --no-private --force-publish && tsx ./scripts/release-ui.mts" + "release": "lerna publish --no-private --force-publish --conventional-commit && tsx ./scripts/release-ui.mts" }, "repository": { "type": "git", diff --git a/packages/content/module/index.ts b/packages/content/module/index.ts index 77634dd2..b4f0f741 100644 --- a/packages/content/module/index.ts +++ b/packages/content/module/index.ts @@ -36,7 +36,8 @@ export default defineTiniModule({ contentBuildCommand(options, { onStart: () => infoRunHook(PACKAGE_NAME, hookName), }); - tini.hook('dev:before', buildContent('dev:before')); + // TODO: enable 'dev:before' hook when caching is implemented + // tini.hook('dev:before', buildContent('dev:before')); tini.hook('build:before', buildContent('build:before')); }, }); diff --git a/packages/default-compiler/lib/index.ts b/packages/default-compiler/lib/index.ts index 34d4f488..26edcb88 100644 --- a/packages/default-compiler/lib/index.ts +++ b/packages/default-compiler/lib/index.ts @@ -154,15 +154,22 @@ export class DefaultCompiler implements Compiler { let originalValue = matchedCSS.replace('css`', ''); originalValue = originalValue.substring(0, originalValue.length - 2); // compile scss - const compiledValue = ( - await compileStringAsync(originalValue, { - loadPaths: ['node_modules', this.projectDirs.srcDir], - ...options, - style: 'compressed', - }) - ).css; - // replacing original with compiled - context.content = context.content!.replace(originalValue, compiledValue); + try { + const compiledValue = ( + await compileStringAsync(originalValue, { + loadPaths: ['node_modules', this.projectDirs.srcDir], + ...options, + style: 'compressed', + }) + ).css; + // replacing original with compiled + context.content = context.content!.replace( + originalValue, + compiledValue + ); + } catch (error) { + // eslint-disable-next-line no-empty + } } } } diff --git a/packages/server/package.json b/packages/server/package.json index 8ad6ced5..652f1916 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,6 @@ { - "private": true, "name": "@tinijs/server", - "version": "0.0.0", + "version": "0.17.0", "description": "TiniJS server.", "author": "Nhan Lam", "homepage": "https://tinijs.dev", diff --git a/packages/ui/app/pages/get-started.ts b/packages/ui/app/pages/get-started.ts index 78e80472..cada6e7a 100644 --- a/packages/ui/app/pages/get-started.ts +++ b/packages/ui/app/pages/get-started.ts @@ -57,7 +57,7 @@ export class AppPageGetStarted extends TiniComponent {

    To create a new TiniJS app, run:

    The Starter app comes with a default theme diff --git a/packages/webpack-builder/package.json b/packages/webpack-builder/package.json index 6638f379..f88eda73 100644 --- a/packages/webpack-builder/package.json +++ b/packages/webpack-builder/package.json @@ -1,5 +1,4 @@ { - "private": true, "name": "@tinijs/webpack-builder", "version": "0.17.0", "description": "Build TiniJS app using Webpack.",