From 4bf2b2095255bf97d03a5ec10e3854ed2f8cdfe3 Mon Sep 17 00:00:00 2001 From: shulandmimi Date: Fri, 9 Aug 2024 11:10:49 +0800 Subject: [PATCH] fix: custom input & upgrade @farmfe/core --- .changeset/silver-jobs-fix.md | 5 + .vscode/settings.json | 3 + biome.json | 6 + packages/core/farm.config.ts | 1 + packages/core/package.json | 19 +- .../core/src/config/normalize/find-entry.ts | 47 ++-- packages/core/src/config/normalize/index.ts | 5 +- packages/core/src/plugins/auto-execute.ts | 2 +- packages/core/src/types/options.ts | 2 +- pnpm-lock.yaml | 210 +++++++++++++++--- 10 files changed, 247 insertions(+), 53 deletions(-) create mode 100644 .changeset/silver-jobs-fix.md diff --git a/.changeset/silver-jobs-fix.md b/.changeset/silver-jobs-fix.md new file mode 100644 index 0000000..f86c665 --- /dev/null +++ b/.changeset/silver-jobs-fix.md @@ -0,0 +1,5 @@ +--- +'farmup': patch +--- + +fix custom input & upgrade @farm/core diff --git a/.vscode/settings.json b/.vscode/settings.json index b65e04f..89f8887 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -2,5 +2,8 @@ "biome.enabled": true, "[javascript]": { "editor.defaultFormatter": "biomejs.biome" + }, + "[typescript]": { + "editor.defaultFormatter": "biomejs.biome" } } diff --git a/biome.json b/biome.json index c7f33a3..e1fa09b 100644 --- a/biome.json +++ b/biome.json @@ -24,5 +24,11 @@ "formatter": { "quoteStyle": "single" } + }, + "files": { + "include": [ + "*.ts", + "*.json" + ] } } \ No newline at end of file diff --git a/packages/core/farm.config.ts b/packages/core/farm.config.ts index 1d35497..808f8a6 100644 --- a/packages/core/farm.config.ts +++ b/packages/core/farm.config.ts @@ -11,6 +11,7 @@ export default defineConfig({ targetEnv: 'node', format: 'esm', }, + lazyCompilation: false, persistentCache: false, external: ['^@farmfe/core$'], minify: false, diff --git a/packages/core/package.json b/packages/core/package.json index 7b5162c..9925d21 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -13,20 +13,21 @@ "build": "farm build", "preview": "farm preview", "clean": "farm clean", - "farmup": "node ./bin/farmup.js --no-exec -w" + "farmup": "node ./bin/farmup.js --no-exec -w", + "prepublish": "mv ../../README.md ./" }, "bin": "./bin/farmup.js", "devDependencies": { - "@farmfe/cli": "^1.0.2", + "@farmfe/cli": "^1.0.3", "@types/fs-extra": "^11.0.4", "@types/lodash-es": "^4.17.12", "@types/node": "^20.12.7", - "typescript": "^5.4.5", "cac": "^6.7.14", "execa": "^8.0.1", "fs-extra": "^11.2.0", "glob": "^10.3.15", - "lodash-es": "^4.17.21" + "lodash-es": "^4.17.21", + "typescript": "^5.4.5" }, "exports": { ".": { @@ -39,6 +40,12 @@ "types": "./dist/plugin.d.ts" } }, + "files": [ + "dist", + "README.md", + "package.json", + "bin" + ], "keywords": [ "farm", "cli", @@ -56,6 +63,6 @@ "email": "sshuang141@163.com" }, "dependencies": { - "@farmfe/core": "^1.3.6" + "@farmfe/core": "^1.3.12" } -} +} \ No newline at end of file diff --git a/packages/core/src/config/normalize/find-entry.ts b/packages/core/src/config/normalize/find-entry.ts index d649cde..bd84961 100644 --- a/packages/core/src/config/normalize/find-entry.ts +++ b/packages/core/src/config/normalize/find-entry.ts @@ -4,8 +4,15 @@ import path from 'node:path'; import { ExecuteMode, type CommonOptions, type Format, type ResolvedCommonOptions } from '../../types/options'; import { isExists } from '../../util/file'; -const findEntryKeyFromObject = (input: Record) => { - return Object.keys(input)[0]; +const findEntryKeyFromObject = (input: Record) => { + let entry = null; + for (const key in input) { + if (input[key]) { + entry = key; + break; + } + } + return entry; }; const maybeEntryPrefix = ['src']; @@ -97,14 +104,24 @@ function normalizeCommonEntry(entries: CommonOptions['entry']): ResolvedCommonOp export async function tryFindEntryFromUserConfig(logger: Logger, config: UserConfig, options: CommonOptions) { const entriesFromOption = normalizeCommonEntry(options.entry); + const defaultCompilationInputKeys = Object.keys(config.compilation?.input ?? {}).reduce( + (res, key) => Object.assign(res, { [key]: null }), + {} as Record, + ); + + const clearDefault = (obj: Record) => ({ + ...defaultCompilationInputKeys, + ...obj, + }); + // cli option > config if (entriesFromOption) { - return entriesFromOption; + return clearDefault(entriesFromOption); } let findEntryKey = findEntryKeyFromObject(config.compilation?.input ?? {}); - if (findEntryKey) return config.compilation?.input!; + if (findEntryKey) return clearDefault({ [findEntryKey]: config.compilation?.input?.[findEntryKey] }); let findEntry: string | null = null; @@ -116,9 +133,7 @@ export async function tryFindEntryFromUserConfig(logger: Logger, config: UserCon } else { logger.info(`automatic find and use this entry: "${findEntry}"`); } - return { - [findEntryKey]: findEntry, - }; + return clearDefault({ [findEntryKey]: findEntry }); } const packageModuleValueMapFormat: Record = { @@ -151,19 +166,21 @@ export function pinOutputEntryFilename(options: ResolvedCommonOptions) { const executeMode = options.execute.type; - - if(options.target?.startsWith('browser')) { + if (options.target?.startsWith('browser')) { return; } - if ((executeMode === ExecuteMode.Custom || executeMode === ExecuteMode.Node) && !options.noExecute) { - options.entry = Object.entries(options.entry).reduce((res, [key, val]) => { - res[`${key}.${formatMapExt[options.format ?? 'cjs']}`] = val; - return res; - }, {} as Record); + if (executeMode === ExecuteMode.Node && !options.noExecute) { + options.entry = Object.entries(options.entry).reduce( + (res, [key, val]) => { + if (val) res[`${key}.${formatMapExt[options.format ?? 'cjs']}`] = val; + return res; + }, + {} as Record, + ); options.outputEntry = { - name: '[entryName]' + name: '[entryName]', }; } } diff --git a/packages/core/src/config/normalize/index.ts b/packages/core/src/config/normalize/index.ts index 23ad4b3..ede74d9 100644 --- a/packages/core/src/config/normalize/index.ts +++ b/packages/core/src/config/normalize/index.ts @@ -55,7 +55,7 @@ function normalizedExecuted(commonOption: CommonOptions, options: ResolvedCommon } } else { // from entry file ext - const entryFiles = Object.values(options.entry); + const entryFiles = Object.values(options.entry).filter(Boolean) as string[]; let res: ExecuteMode | undefined; for (const item of entryFiles) { const targetFromExt = extensionMapExecutedMode[path.extname(item).slice(1)]; @@ -128,7 +128,8 @@ export function normalizedTargetEnv( } else { let targetFromInput: TargetEnv | undefined; - for (const entryFile of Object.values(options.entry)) { + const entryFiles = Object.values(options.entry).filter(Boolean) as string[]; + for (const entryFile of entryFiles) { const ext = path.extname(entryFile).slice(1); if (extMapTargetEnv[ext]) { targetFromInput = extMapTargetEnv[ext]; diff --git a/packages/core/src/plugins/auto-execute.ts b/packages/core/src/plugins/auto-execute.ts index a10288e..a199ea4 100644 --- a/packages/core/src/plugins/auto-execute.ts +++ b/packages/core/src/plugins/auto-execute.ts @@ -57,7 +57,7 @@ export default function autoExecute(options: CommonOptions = {}, logger = defaul return { name: `${name}:execute`, - priority: Number.NEGATIVE_INFINITY, + priority: Number.MIN_SAFE_INTEGER, async config(config) { return await normalizeOption.config(config); }, diff --git a/packages/core/src/types/options.ts b/packages/core/src/types/options.ts index 937586f..413d150 100644 --- a/packages/core/src/types/options.ts +++ b/packages/core/src/types/options.ts @@ -72,7 +72,7 @@ export interface CommonOptions { } export interface ResolvedCommonOptions { - entry: Record; + entry: Record; args: string[]; execute: ExecuteOption; external: []; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0427d6a..53c4162 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -28,12 +28,12 @@ importers: packages/core: dependencies: '@farmfe/core': - specifier: ^1.3.6 - version: 1.3.6 + specifier: ^1.3.12 + version: 1.3.12 devDependencies: '@farmfe/cli': - specifier: ^1.0.2 - version: 1.0.2 + specifier: ^1.0.3 + version: 1.0.3 '@types/fs-extra': specifier: ^11.0.4 version: 11.0.4 @@ -112,28 +112,24 @@ packages: engines: {node: '>=14.21.3'} cpu: [arm64] os: [linux] - libc: [musl] '@biomejs/cli-linux-arm64@1.7.3': resolution: {integrity: sha512-phNTBpo7joDFastnmZsFjYcDYobLTx4qR4oPvc9tJ486Bd1SfEVPHEvJdNJrMwUQK56T+TRClOQd/8X1nnjA9w==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [linux] - libc: [glibc] '@biomejs/cli-linux-x64-musl@1.7.3': resolution: {integrity: sha512-UdEHKtYGWEX3eDmVWvQeT+z05T9/Sdt2+F/7zmMOFQ7boANeX8pcO6EkJPK3wxMudrApsNEKT26rzqK6sZRTRA==} engines: {node: '>=14.21.3'} cpu: [x64] os: [linux] - libc: [musl] '@biomejs/cli-linux-x64@1.7.3': resolution: {integrity: sha512-vnedYcd5p4keT3iD48oSKjOIRPYcjSNNbd8MO1bKo9ajg3GwQXZLAH+0Cvlr+eMsO67/HddWmscSQwTFrC/uPA==} engines: {node: '>=14.21.3'} cpu: [x64] os: [linux] - libc: [glibc] '@biomejs/cli-win32-arm64@1.7.3': resolution: {integrity: sha512-unNCDqUKjujYkkSxs7gFIfdasttbDC4+z0kYmcqzRk6yWVoQBL4dNLcCbdnJS+qvVDNdI9rHp2NwpQ0WAdla4Q==} @@ -393,48 +389,88 @@ packages: resolution: {integrity: sha512-y/pL7Zex8iHQ54qDYvg9oCiCgfZ9DAUTOI/VtPFVC+42JqLx6YufYxJS2uAsFlfAXIPiRV8qnnG6BHImD1Ix6g==} engines: {node: '>=18'} - '@farmfe/cli@1.0.2': - resolution: {integrity: sha512-ZZRmXOSLkA7kWzmj6IVSH5U4NimNzFSa9hI0rRlPbgNwsfBIooUfthMjMZPnMwnFD9SIxLurlMJkwKyb4wpDKQ==} + '@farmfe/cli@1.0.3': + resolution: {integrity: sha512-3n0GcaDRlKfWqLYPhgmzhx4PFUURMNq6fU0VsOnxHLAB6JhVOf+bRIQEyLMA5lEiBaFVtJqATCleOY4q1ERRCQ==} engines: {node: '>= 16'} hasBin: true + '@farmfe/core-darwin-arm64@1.3.12': + resolution: {integrity: sha512-K80mBxE4o5yTcuuMxDoUfay6N27tFHOy54tE4ybchrj2MLwStzhOhGhKaij2NLjK3UQGR5nYSWc0g55E8NwwQw==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [darwin] + '@farmfe/core-darwin-arm64@1.3.6': resolution: {integrity: sha512-lVs1ZirD/bchBfeQ0VLN+2m/9RfQiGZ1qlM6WKJE6l/bf9JSNesnbgs4NXOTYThEXLvrMEgBbfIk47ICo2nHjw==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] + '@farmfe/core-darwin-x64@1.3.12': + resolution: {integrity: sha512-GwW18zSPLPyUG1aBdoNXRxi5HzfM7VD6GM+wU3vuhSCEzoDbopoO0SCshzClHMeKTXhljwWGBN5GBJcQFb7jyw==} + engines: {node: '>= 10'} + cpu: [x64] + os: [darwin] + '@farmfe/core-darwin-x64@1.3.6': resolution: {integrity: sha512-hDIOyTTPtcWQ4QO29jQJ8XiMsGkroDgVZeVrFpGa0FATq95vXAXueyqslSpfD9byDsYtX6sP9bgoYdgKumd03Q==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] + '@farmfe/core-linux-arm64-gnu@1.3.12': + resolution: {integrity: sha512-Fc4FJtsr1ncdph0i1RHAVQwxdTLgCdY4f4LfhoS5LoiQV2DlN6hEhXMtBR/CBc2CIy8cPaFwzSSSr2XH/ZqXiA==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] + '@farmfe/core-linux-arm64-gnu@1.3.6': resolution: {integrity: sha512-riNYDmZXFTp/bw6dXnBA3KFw38dxjUfqeOQCdp0IE//itTcPLucHleOwY/mEvuNhzl5XYMJ7DrFgm4Emv6vJcg==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] + '@farmfe/core-linux-arm64-musl@1.3.12': + resolution: {integrity: sha512-1hehU4zI0yN5nuTBAB8J+GWLC+VOgVQdLiG21r8kKKDAzszAaT1PNTWitRAW1eI9NU8p4iyBSHSFk9mnj67kow==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] + '@farmfe/core-linux-arm64-musl@1.3.6': resolution: {integrity: sha512-2Xd6nxrZxlPNMTj7WbXXCoglmvDvIke3vzfVPtk0CV5STTbCfIfqdunRB7Di1OprMGtLZr5tlQIL7dX1To9JHg==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] + '@farmfe/core-linux-x64-gnu@1.3.12': + resolution: {integrity: sha512-QwlRErnzfpLDe9T+1xqDxvs5HLH0CVd0HTFukHW4+RwsoGJ4LNcti0u8VSeNyCYHczVw4sME9ksNh1OgYLi6OQ==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + '@farmfe/core-linux-x64-gnu@1.3.6': resolution: {integrity: sha512-hmLSB5aJzWt7HBF+Q/2TI2QN7VlFPqGbZf609lMkpdmBHBKqPKCw+ceuQKMa4EoZUzQ3YWEPN/e6wO278DX8gQ==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - libc: [glibc] + + '@farmfe/core-linux-x64-musl@1.3.12': + resolution: {integrity: sha512-7eBUeH/tYTZUQt5Cohq9ZgR8jVvzhKeg6mpxxESp3eYM7md7bXcuVFbF5tzT1as4MALJsKKTP0Kga/7Hlbddgw==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] '@farmfe/core-linux-x64-musl@1.3.6': resolution: {integrity: sha512-Fr2glqBQn0Oxf8onjO0Pi0Yv9NdUXPgSvzIJKCmF7udtRLFinhYr9aag8ZPcKeUlPqY5tqtqyXPm08fP4A7nvg==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - libc: [musl] + + '@farmfe/core-win32-arm64-msvc@1.3.12': + resolution: {integrity: sha512-OjdZoGaBMg5tOmDrO9tegQvrVY3QsNBxSq8TZtCmr4gyj+pPzlHwY6e99Wh9UwMPvCL7N9muXPGbLBQpfwkB+g==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [win32] '@farmfe/core-win32-arm64-msvc@1.3.6': resolution: {integrity: sha512-uilYGpZqK9SkrVujmMynAg3jrcYA4ki3i5Cc9rYMqJM63RH/NaT+A/Nguf/dByda0zrMf+1lCCtplgIqGPG/xQ==} @@ -442,18 +478,34 @@ packages: cpu: [arm64] os: [win32] + '@farmfe/core-win32-ia32-msvc@1.3.12': + resolution: {integrity: sha512-4bOEppvUNgpQ7YZ8lxZKzSuLBUb5WgTTL3bnF75Gi9pKemH70f9HvyF8VzagvtZskhBQIxFan9S4AqO88QUsxg==} + engines: {node: '>= 10'} + cpu: [ia32] + os: [win32] + '@farmfe/core-win32-ia32-msvc@1.3.6': resolution: {integrity: sha512-P9SSORdMxl07B+By3DQxeluP1XAxqmaP3CZQqlmjQc/kh1+AbqUCdbkK5wfDISjFLPf1ex3cT8WYAmDK97HsPw==} engines: {node: '>= 10'} cpu: [ia32] os: [win32] + '@farmfe/core-win32-x64-msvc@1.3.12': + resolution: {integrity: sha512-oWnBjR9aeoHRvuB/sPpsCBurIGlHAvc9+SXDbG2818t9ctZauJOYb5KNfIbmMt+m1AFryJqgz0+PcBaIizu2EA==} + engines: {node: '>= 10'} + cpu: [x64] + os: [win32] + '@farmfe/core-win32-x64-msvc@1.3.6': resolution: {integrity: sha512-qFAxd1lVwB7Ci1j/GtLtNImKtq92kYtwIAmQon1QMnV8tidFJZcLNkYngo0MYEopHhZPWYIxTw91dhfOn1w1Tg==} engines: {node: '>= 10'} cpu: [x64] os: [win32] + '@farmfe/core@1.3.12': + resolution: {integrity: sha512-TvW5iYTg/WMzwUT3d+03kDrriJQG4FXjnbIsRojsD992hZ4uapNRgrQAFkEBJFyeazCLE/F74b7fqrhfEhXI9w==} + engines: {node: '>=16.15.1'} + '@farmfe/core@1.3.6': resolution: {integrity: sha512-1WSbNHxygwQ59bOALQxcXJDe/Uen27BqcXMkRhewRWdu/bgYutbItSNLO9mNkmYcZRPCMuWQoIUMUNgl8iWTUg==} engines: {node: '>=16.15.1'} @@ -461,6 +513,9 @@ packages: '@farmfe/runtime-plugin-hmr@3.5.3': resolution: {integrity: sha512-42kifit+pDDgZmLtN45YTozHUgUpM84PRK7o9cBtLKxGYQlQpppAY4laEQLbvmcAMjgDrYNASDSJyV4M31VKkg==} + '@farmfe/runtime-plugin-hmr@3.5.5': + resolution: {integrity: sha512-MaCOS8w40STuSAfA23oEHPdvAGF2zxUbrtQZ0dxhrIdr5dVlrf87pTj7eqju2oTUCwcgceg8wZlJATDyY9K1Aw==} + '@farmfe/runtime-plugin-import-meta@0.2.2': resolution: {integrity: sha512-xrWJOHbmhVJX+a6LtRpv5wvj/uqpPQFZIKeHfT+mqybKRSC9+JxDgOySLzYUbT8beSTtXgcxGXf55EN3Byd0ng==} @@ -473,10 +528,6 @@ packages: '@farmfe/utils@0.1.0': resolution: {integrity: sha512-neNJQGqV7XL4XifG1uHOBFSFLy2yx1/DVZNRA7nfeEAXEksVZTwWA+fZrYEaI0w7Sw6K/9NYn9Jgpn+NAT0mcg==} - '@inquirer/figures@1.0.2': - resolution: {integrity: sha512-4F1MBwVr3c/m4bAUef6LgkvBfSjzwH+OfldgHqcuacWwSUetFebM2wi58WfG9uk1rR98U6GwLed4asLJbwdV5w==} - engines: {node: '>=18'} - '@isaacs/cliui@8.0.2': resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} engines: {node: '>=12'} @@ -1023,6 +1074,10 @@ packages: resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} engines: {node: '>=0.8.0'} + escape-string-regexp@5.0.0: + resolution: {integrity: sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==} + engines: {node: '>=12'} + esprima@4.0.1: resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} engines: {node: '>=4'} @@ -1071,21 +1126,18 @@ packages: engines: {node: '>= 10'} cpu: [arm64] os: [linux] - libc: [glibc] farm-plugin-replace-dirname-linux-arm64-musl@0.2.1: resolution: {integrity: sha512-m3gH8ggczbRYTHZSNp3LjIQIcqhvDO4O78bxXc8O1ozKD8M47/YfQLyQV06M7H4rZ8s6XV3Bb1kAcRAASp3M5A==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] - libc: [glibc] farm-plugin-replace-dirname-linux-x64-gnu@0.2.1: resolution: {integrity: sha512-MehKkoM2RFw3sCnEu9nCbXKjxtC3hfTad0h/dC+Z8iEBcLEReVLoNzHWWUa6BxkxqDtB82/BWO/ObSUj/VUnwQ==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - libc: [glibc] farm-plugin-replace-dirname-linux-x64-musl@0.2.1: resolution: {integrity: sha512-o1qPZi16N/sHOteZYJVv6UmZFK3QKpVQrywk/4spJI0mPH9A9Y+G6iBE2Tqjb3d+1Hb6phr++EBJHZ2x1ajtGQ==} @@ -1128,6 +1180,10 @@ packages: fastq@1.17.1: resolution: {integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==} + figures@5.0.0: + resolution: {integrity: sha512-ej8ksPF4x6e5wvK9yevct0UCXh8TTFlWGVLlgjZuoBH1HwjIfKE/IdL5mq89sFA7zELi1VhKpmtDnrs7zWyeyg==} + engines: {node: '>=14'} + file-entry-cache@8.0.0: resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} engines: {node: '>=16.0.0'} @@ -1371,9 +1427,9 @@ packages: resolution: {integrity: sha512-QQnnxNyfvmHFIsj7gkPcYymR8Jdw/o7mp5ZFihxn6h8Ci6fh3Dx4E1gPjpQEpIuPo9XVNY/ZUwh4BPMjGyL01g==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - inquirer@9.2.22: - resolution: {integrity: sha512-SqLLa/Oe5rZUagTR9z+Zd6izyatHglbmbvVofo1KzuVB54YHleWzeHNLoR7FOICGOeQSqeLh1cordb3MzhGcEw==} - engines: {node: '>=18'} + inquirer@9.2.12: + resolution: {integrity: sha512-mg3Fh9g2zfuVWJn6lhST0O7x4n03k7G8Tx5nvikJkbq8/CK47WDVm+UznF0G6s5Zi0KcyUisr6DU8T67N5U+1Q==} + engines: {node: '>=14.18.0'} internal-slot@1.0.7: resolution: {integrity: sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==} @@ -1507,6 +1563,10 @@ packages: resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} engines: {node: '>=10'} + is-unicode-supported@1.3.0: + resolution: {integrity: sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==} + engines: {node: '>=12'} + is-weakref@1.0.2: resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} @@ -2348,6 +2408,12 @@ packages: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} + zod-validation-error@1.5.0: + resolution: {integrity: sha512-/7eFkAI4qV0tcxMBB/3+d2c1P6jzzZYdYSlBuAklzMuCrJu5bzJfHS0yVAS87dRHVlhftd6RFJDIvv03JgkSbw==} + engines: {node: '>=16.0.0'} + peerDependencies: + zod: ^3.18.0 + zod-validation-error@3.3.0: resolution: {integrity: sha512-Syib9oumw1NTqEv4LT0e6U83Td9aVRk9iTXPUQr1otyV1PuXQKOvOwhMNqZIq5hluzHP2pMgnOmHEo7kPdI2mw==} engines: {node: '>=18.0.0'} @@ -2752,40 +2818,113 @@ snapshots: '@cspell/strong-weak-map@8.8.3': {} - '@farmfe/cli@1.0.2': + '@farmfe/cli@1.0.3': dependencies: cac: 6.7.14 cross-spawn: 7.0.3 - inquirer: 9.2.22 + inquirer: 9.2.12 walkdir: 0.4.1 + '@farmfe/core-darwin-arm64@1.3.12': + optional: true + '@farmfe/core-darwin-arm64@1.3.6': optional: true + '@farmfe/core-darwin-x64@1.3.12': + optional: true + '@farmfe/core-darwin-x64@1.3.6': optional: true + '@farmfe/core-linux-arm64-gnu@1.3.12': + optional: true + '@farmfe/core-linux-arm64-gnu@1.3.6': optional: true + '@farmfe/core-linux-arm64-musl@1.3.12': + optional: true + '@farmfe/core-linux-arm64-musl@1.3.6': optional: true + '@farmfe/core-linux-x64-gnu@1.3.12': + optional: true + '@farmfe/core-linux-x64-gnu@1.3.6': optional: true + '@farmfe/core-linux-x64-musl@1.3.12': + optional: true + '@farmfe/core-linux-x64-musl@1.3.6': optional: true + '@farmfe/core-win32-arm64-msvc@1.3.12': + optional: true + '@farmfe/core-win32-arm64-msvc@1.3.6': optional: true + '@farmfe/core-win32-ia32-msvc@1.3.12': + optional: true + '@farmfe/core-win32-ia32-msvc@1.3.6': optional: true + '@farmfe/core-win32-x64-msvc@1.3.12': + optional: true + '@farmfe/core-win32-x64-msvc@1.3.6': optional: true + '@farmfe/core@1.3.12': + dependencies: + '@farmfe/runtime': 0.12.1 + '@farmfe/runtime-plugin-hmr': 3.5.5 + '@farmfe/runtime-plugin-import-meta': 0.2.2 + '@farmfe/utils': 0.1.0 + '@koa/cors': 5.0.0 + '@swc/helpers': 0.5.11 + chokidar: 3.6.0 + deepmerge: 4.3.1 + dotenv: 16.4.5 + dotenv-expand: 11.0.6 + execa: 7.2.0 + farm-browserslist-generator: 1.0.0 + farm-plugin-replace-dirname: 0.2.1 + fast-glob: 3.3.2 + fs-extra: 11.2.0 + http-proxy-middleware: 3.0.0 + is-plain-object: 5.0.0 + koa: 2.15.3 + koa-compress: 5.1.1 + koa-connect: 2.1.0 + koa-static: 5.0.0 + lodash.debounce: 4.0.8 + loglevel: 1.9.1 + mime-types: 2.1.35 + open: 9.1.0 + slashes: 3.0.12 + ws: 8.17.0 + zod: 3.23.8 + zod-validation-error: 1.5.0(zod@3.23.8) + optionalDependencies: + '@farmfe/core-darwin-arm64': 1.3.12 + '@farmfe/core-darwin-x64': 1.3.12 + '@farmfe/core-linux-arm64-gnu': 1.3.12 + '@farmfe/core-linux-arm64-musl': 1.3.12 + '@farmfe/core-linux-x64-gnu': 1.3.12 + '@farmfe/core-linux-x64-musl': 1.3.12 + '@farmfe/core-win32-arm64-msvc': 1.3.12 + '@farmfe/core-win32-ia32-msvc': 1.3.12 + '@farmfe/core-win32-x64-msvc': 1.3.12 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + '@farmfe/core@1.3.6': dependencies: '@farmfe/runtime': 0.12.1 @@ -2836,6 +2975,10 @@ snapshots: dependencies: core-js: 3.37.1 + '@farmfe/runtime-plugin-hmr@3.5.5': + dependencies: + core-js: 3.37.1 + '@farmfe/runtime-plugin-import-meta@0.2.2': dependencies: core-js: 3.37.1 @@ -2848,8 +2991,6 @@ snapshots: '@farmfe/utils@0.1.0': {} - '@inquirer/figures@1.0.2': {} - '@isaacs/cliui@8.0.2': dependencies: string-width: 5.1.2 @@ -3488,6 +3629,8 @@ snapshots: escape-string-regexp@1.0.5: {} + escape-string-regexp@5.0.0: {} + esprima@4.0.1: {} eventemitter3@4.0.7: {} @@ -3608,6 +3751,11 @@ snapshots: dependencies: reusify: 1.0.4 + figures@5.0.0: + dependencies: + escape-string-regexp: 5.0.0 + is-unicode-supported: 1.3.0 + file-entry-cache@8.0.0: dependencies: flat-cache: 4.0.1 @@ -3847,15 +3995,15 @@ snapshots: ini@4.1.1: {} - inquirer@9.2.22: + inquirer@9.2.12: dependencies: - '@inquirer/figures': 1.0.2 '@ljharb/through': 2.3.13 ansi-escapes: 4.3.2 chalk: 5.3.0 cli-cursor: 3.1.0 cli-width: 4.1.0 external-editor: 3.1.0 + figures: 5.0.0 lodash: 4.17.21 mute-stream: 1.0.0 ora: 5.4.1 @@ -3972,6 +4120,8 @@ snapshots: is-unicode-supported@0.1.0: {} + is-unicode-supported@1.3.0: {} + is-weakref@1.0.2: dependencies: call-bind: 1.0.7 @@ -4816,6 +4966,10 @@ snapshots: yocto-queue@0.1.0: {} + zod-validation-error@1.5.0(zod@3.23.8): + dependencies: + zod: 3.23.8 + zod-validation-error@3.3.0(zod@3.23.8): dependencies: zod: 3.23.8