nitro-nightly 3.0.1-20260120-020848-6786d069 → 3.0.1-20260120-133205-cbfce96c
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_build/common.mjs +24931 -0
- package/dist/_build/rolldown.mjs +6 -11
- package/dist/_build/rollup.mjs +201 -0
- package/dist/_build/vite.build.mjs +1 -1
- package/dist/_chunks/dev.mjs +4 -6
- package/dist/_chunks/nitro.mjs +1183 -24
- package/dist/_chunks/nitro2.mjs +91 -248
- package/dist/_chunks/utils.mjs +254 -0
- package/dist/_common.mjs +45 -0
- package/dist/_libs/@hiogawa/vite-plugin-fullstack.mjs +652 -0
- package/dist/_libs/@jridgewell/gen-mapping.mjs +448 -0
- package/dist/_libs/@jridgewell/remapping.mjs +117 -0
- package/dist/_libs/@rollup/plugin-alias.mjs +64 -0
- package/dist/_libs/@rollup/plugin-commonjs.d.mts +241 -0
- package/dist/_libs/@rollup/plugin-commonjs.mjs +1300 -0
- package/dist/_libs/{plugin-alias+plugin-inject.mjs → @rollup/plugin-inject.mjs} +2 -65
- package/dist/_libs/@rollup/plugin-json.mjs +36 -0
- package/dist/_libs/@rollup/plugin-node-resolve.mjs +1972 -0
- package/dist/_libs/c12.d.mts +214 -0
- package/dist/_libs/{c12+dotenv+rc9.mjs → c12.mjs} +105 -12
- package/dist/_libs/{chokidar+readdirp.mjs → chokidar.mjs} +8 -1
- package/dist/_libs/compatx.d.mts +47 -0
- package/dist/_libs/confbox.mjs +2488 -70
- package/dist/_libs/esbuild.d.mts +20 -0
- package/dist/_libs/escape-string-regexp.mjs +8 -0
- package/dist/_libs/estree-walker.mjs +187 -0
- package/dist/_libs/giget.mjs +3550 -0
- package/dist/_libs/httpxy.d.mts +79 -0
- package/dist/_libs/httpxy.mjs +6 -1
- package/dist/_libs/klona.mjs +38 -0
- package/dist/_libs/magic-string.d.mts +220 -0
- package/dist/_libs/mlly.d.mts +57 -0
- package/dist/_libs/pkg-types.d.mts +23 -0
- package/dist/_libs/rou3.d.mts +43 -0
- package/dist/_libs/rou3.mjs +322 -0
- package/dist/_libs/std-env.d.mts +4 -0
- package/dist/_libs/tsconfck.mjs +832 -0
- package/dist/_libs/ultrahtml.mjs +138 -0
- package/dist/_libs/unimport.d.mts +426 -0
- package/dist/_libs/unimport.mjs +1781 -5
- package/dist/_libs/unwasm.d.mts +29 -0
- package/dist/_presets.mjs +3 -8
- package/dist/builder.mjs +6 -8
- package/dist/cli/_chunks/build.mjs +1 -1
- package/dist/cli/_chunks/dev.mjs +2 -3
- package/dist/cli/_chunks/list.mjs +1 -1
- package/dist/cli/_chunks/prepare.mjs +1 -1
- package/dist/cli/_chunks/run.mjs +1 -1
- package/dist/cli/_chunks/task.mjs +16 -0
- package/dist/cli/index.mjs +1 -1
- package/dist/presets/aws-lambda/runtime/_utils.d.mts +0 -5
- package/dist/presets/netlify/runtime/netlify-edge.d.mts +0 -1
- package/dist/presets/winterjs/runtime/winterjs.d.mts +0 -1
- package/dist/runtime/internal/error/dev.d.mts +0 -1
- package/dist/runtime/internal/route-rules.d.mts +0 -4
- package/dist/runtime/internal/routes/openapi.d.mts +0 -1
- package/dist/runtime/internal/routes/scalar.d.mts +0 -1
- package/dist/runtime/internal/routes/swagger.d.mts +0 -1
- package/dist/runtime/internal/runtime-config.d.mts +0 -1
- package/dist/runtime/nitro.d.mts +0 -3
- package/dist/runtime/virtual/renderer-template.d.mts +0 -1
- package/dist/types/index.d.mts +36 -1405
- package/dist/vite.mjs +18 -641
- package/package.json +2 -2
- package/dist/_chunks/nitro3.mjs +0 -2696
- package/dist/_chunks/nitro4.mjs +0 -176
- package/dist/_chunks/nitro5.mjs +0 -733
- package/dist/_chunks/nitro6.mjs +0 -1458
- package/dist/_chunks/nitro7.mjs +0 -7561
- package/dist/_chunks/nitro8.mjs +0 -3524
- package/dist/_chunks/nitro9.mjs +0 -1729
- package/dist/_libs/_.mjs +0 -3
- package/dist/_libs/_2.mjs +0 -3
- package/dist/_libs/_3.mjs +0 -4
- package/dist/_libs/_4.mjs +0 -6
- package/dist/_libs/_5.mjs +0 -3
- package/dist/_libs/_6.mjs +0 -3
- package/dist/_libs/acorn+confbox+js-tokens+magic-string+mlly+pkg-types+sourcemap-codec+strip-literal+unimport.mjs +0 -8900
- package/dist/_libs/confbox+exsolve+pkg-types.mjs +0 -1249
- package/dist/_libs/confbox2.mjs +0 -786
- package/dist/_libs/confbox3.mjs +0 -404
- package/dist/_libs/confbox4.mjs +0 -3
- package/dist/_libs/estree-walker+unimport.mjs +0 -378
- package/dist/_libs/fdir+picomatch+tinyglobby.mjs +0 -2471
- package/dist/_libs/gen-mapping+remapping+resolve-uri+trace-mapping+unimport+unplugin+unplugin-utils+webpack-virtual-modules.mjs +0 -2150
- package/dist/_libs/giget+node-fetch-native.mjs +0 -2692
- package/dist/_libs/local-pkg+quansync+unimport.mjs +0 -1526
- package/dist/_libs/nypm+tinyexec.mjs +0 -858
- package/dist/_libs/pathe.mjs +0 -164
- package/dist/_libs/perfect-debounce.mjs +0 -89
- package/dist/_libs/std-env.mjs +0 -158
- package/dist/_libs/vite-plugin-fullstack.mjs +0 -26
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
import { Stats } from "node:fs";
|
|
2
|
+
import { Jiti, JitiOptions } from "jiti";
|
|
3
|
+
import { EventEmitter } from "node:events";
|
|
4
|
+
import { Readable } from "node:stream";
|
|
5
|
+
import { diff } from "ohash/utils";
|
|
6
|
+
|
|
7
|
+
//#region node_modules/.pnpm/chokidar@5.0.0/node_modules/chokidar/index.d.ts
|
|
8
|
+
type AWF = {
|
|
9
|
+
stabilityThreshold: number;
|
|
10
|
+
pollInterval: number;
|
|
11
|
+
};
|
|
12
|
+
type BasicOpts = {
|
|
13
|
+
persistent: boolean;
|
|
14
|
+
ignoreInitial: boolean;
|
|
15
|
+
followSymlinks: boolean;
|
|
16
|
+
cwd?: string;
|
|
17
|
+
usePolling: boolean;
|
|
18
|
+
interval: number;
|
|
19
|
+
binaryInterval: number;
|
|
20
|
+
alwaysStat?: boolean;
|
|
21
|
+
depth?: number;
|
|
22
|
+
ignorePermissionErrors: boolean;
|
|
23
|
+
atomic: boolean | number;
|
|
24
|
+
};
|
|
25
|
+
type ChokidarOptions = Partial<BasicOpts & {
|
|
26
|
+
ignored: Matcher | Matcher[];
|
|
27
|
+
awaitWriteFinish: boolean | Partial<AWF>;
|
|
28
|
+
}>;
|
|
29
|
+
type MatchFunction = (val: string, stats?: Stats) => boolean;
|
|
30
|
+
interface MatcherObject {
|
|
31
|
+
path: string;
|
|
32
|
+
recursive?: boolean;
|
|
33
|
+
}
|
|
34
|
+
type Matcher = string | RegExp | MatchFunction | MatcherObject;
|
|
35
|
+
//#endregion
|
|
36
|
+
//#region node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/index.d.mts
|
|
37
|
+
interface TemplateInfo {
|
|
38
|
+
name: string;
|
|
39
|
+
tar: string;
|
|
40
|
+
version?: string;
|
|
41
|
+
subdir?: string;
|
|
42
|
+
url?: string;
|
|
43
|
+
defaultDir?: string;
|
|
44
|
+
headers?: Record<string, string | undefined>;
|
|
45
|
+
source?: never;
|
|
46
|
+
dir?: never;
|
|
47
|
+
[key: string]: any;
|
|
48
|
+
}
|
|
49
|
+
type TemplateProvider = (input: string, options: {
|
|
50
|
+
auth?: string;
|
|
51
|
+
}) => TemplateInfo | Promise<TemplateInfo> | null;
|
|
52
|
+
interface DownloadTemplateOptions {
|
|
53
|
+
provider?: string;
|
|
54
|
+
force?: boolean;
|
|
55
|
+
forceClean?: boolean;
|
|
56
|
+
offline?: boolean;
|
|
57
|
+
preferOffline?: boolean;
|
|
58
|
+
providers?: Record<string, TemplateProvider>;
|
|
59
|
+
dir?: string;
|
|
60
|
+
registry?: false | string;
|
|
61
|
+
cwd?: string;
|
|
62
|
+
auth?: string;
|
|
63
|
+
install?: boolean;
|
|
64
|
+
silent?: boolean;
|
|
65
|
+
}
|
|
66
|
+
//#endregion
|
|
67
|
+
//#region node_modules/.pnpm/c12@3.3.3_magicast@0.5.1/node_modules/c12/dist/index.d.mts
|
|
68
|
+
//#region src/dotenv.d.ts
|
|
69
|
+
interface DotenvOptions {
|
|
70
|
+
/**
|
|
71
|
+
* The project root directory (either absolute or relative to the current working directory).
|
|
72
|
+
*
|
|
73
|
+
* Defaults to `options.cwd` in `loadConfig` context, or `process.cwd()` when used as standalone.
|
|
74
|
+
*/
|
|
75
|
+
cwd?: string;
|
|
76
|
+
/**
|
|
77
|
+
* What file or files to look in for environment variables (either absolute or relative
|
|
78
|
+
* to the current working directory). For example, `.env`.
|
|
79
|
+
* With the array type, the order enforce the env loading priority (last one overrides).
|
|
80
|
+
*/
|
|
81
|
+
fileName?: string | string[];
|
|
82
|
+
/**
|
|
83
|
+
* Whether to interpolate variables within .env.
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* ```env
|
|
87
|
+
* BASE_DIR="/test"
|
|
88
|
+
* # resolves to "/test/further"
|
|
89
|
+
* ANOTHER_DIR="${BASE_DIR}/further"
|
|
90
|
+
* ```
|
|
91
|
+
*/
|
|
92
|
+
interpolate?: boolean;
|
|
93
|
+
/**
|
|
94
|
+
* An object describing environment variables (key, value pairs).
|
|
95
|
+
*/
|
|
96
|
+
env?: NodeJS.ProcessEnv;
|
|
97
|
+
}
|
|
98
|
+
declare global {
|
|
99
|
+
var __c12_dotenv_vars__: Map<Record<string, any>, Set<string>>;
|
|
100
|
+
} //#endregion
|
|
101
|
+
//#region src/types.d.ts
|
|
102
|
+
interface ConfigLayerMeta {
|
|
103
|
+
name?: string;
|
|
104
|
+
[key: string]: any;
|
|
105
|
+
}
|
|
106
|
+
type UserInputConfig = Record<string, any>;
|
|
107
|
+
interface C12InputConfig<T extends UserInputConfig = UserInputConfig, MT extends ConfigLayerMeta = ConfigLayerMeta> {
|
|
108
|
+
$test?: T;
|
|
109
|
+
$development?: T;
|
|
110
|
+
$production?: T;
|
|
111
|
+
$env?: Record<string, T>;
|
|
112
|
+
$meta?: MT;
|
|
113
|
+
}
|
|
114
|
+
interface SourceOptions<T extends UserInputConfig = UserInputConfig, MT extends ConfigLayerMeta = ConfigLayerMeta> {
|
|
115
|
+
/** Custom meta for layer */
|
|
116
|
+
meta?: MT;
|
|
117
|
+
/** Layer config overrides */
|
|
118
|
+
overrides?: T;
|
|
119
|
+
[key: string]: any;
|
|
120
|
+
/**
|
|
121
|
+
* Options for cloning remote sources
|
|
122
|
+
*
|
|
123
|
+
* @see https://giget.unjs.io
|
|
124
|
+
*/
|
|
125
|
+
giget?: DownloadTemplateOptions;
|
|
126
|
+
/**
|
|
127
|
+
* Install dependencies after cloning
|
|
128
|
+
*
|
|
129
|
+
* @see https://nypm.unjs.io
|
|
130
|
+
*/
|
|
131
|
+
install?: boolean;
|
|
132
|
+
/**
|
|
133
|
+
* Token for cloning private sources
|
|
134
|
+
*
|
|
135
|
+
* @see https://giget.unjs.io#providing-token-for-private-repositories
|
|
136
|
+
*/
|
|
137
|
+
auth?: string;
|
|
138
|
+
}
|
|
139
|
+
interface ConfigLayer<T extends UserInputConfig = UserInputConfig, MT extends ConfigLayerMeta = ConfigLayerMeta> {
|
|
140
|
+
config: T | null;
|
|
141
|
+
source?: string;
|
|
142
|
+
sourceOptions?: SourceOptions<T, MT>;
|
|
143
|
+
meta?: MT;
|
|
144
|
+
cwd?: string;
|
|
145
|
+
configFile?: string;
|
|
146
|
+
}
|
|
147
|
+
interface ResolvedConfig<T extends UserInputConfig = UserInputConfig, MT extends ConfigLayerMeta = ConfigLayerMeta> extends ConfigLayer<T, MT> {
|
|
148
|
+
config: T;
|
|
149
|
+
layers?: ConfigLayer<T, MT>[];
|
|
150
|
+
cwd?: string;
|
|
151
|
+
_configFile?: string;
|
|
152
|
+
}
|
|
153
|
+
type ConfigSource = "overrides" | "main" | "rc" | "packageJson" | "defaultConfig";
|
|
154
|
+
interface ConfigFunctionContext {
|
|
155
|
+
[key: string]: any;
|
|
156
|
+
}
|
|
157
|
+
interface ResolvableConfigContext<T extends UserInputConfig = UserInputConfig> {
|
|
158
|
+
configs: Record<ConfigSource, T | null | undefined>;
|
|
159
|
+
rawConfigs: Record<ConfigSource, ResolvableConfig<T> | null | undefined>;
|
|
160
|
+
}
|
|
161
|
+
type MaybePromise<T> = T | Promise<T>;
|
|
162
|
+
type ResolvableConfig<T extends UserInputConfig = UserInputConfig> = MaybePromise<T | null | undefined> | ((ctx: ResolvableConfigContext<T>) => MaybePromise<T | null | undefined>);
|
|
163
|
+
interface LoadConfigOptions<T extends UserInputConfig = UserInputConfig, MT extends ConfigLayerMeta = ConfigLayerMeta> {
|
|
164
|
+
name?: string;
|
|
165
|
+
cwd?: string;
|
|
166
|
+
configFile?: string;
|
|
167
|
+
rcFile?: false | string;
|
|
168
|
+
globalRc?: boolean;
|
|
169
|
+
dotenv?: boolean | DotenvOptions;
|
|
170
|
+
envName?: string | false;
|
|
171
|
+
packageJson?: boolean | string | string[];
|
|
172
|
+
defaults?: T;
|
|
173
|
+
defaultConfig?: ResolvableConfig<T>;
|
|
174
|
+
overrides?: ResolvableConfig<T>;
|
|
175
|
+
omit$Keys?: boolean;
|
|
176
|
+
/** Context passed to config functions */
|
|
177
|
+
context?: ConfigFunctionContext;
|
|
178
|
+
resolve?: (id: string, options: LoadConfigOptions<T, MT>) => null | undefined | ResolvedConfig<T, MT> | Promise<ResolvedConfig<T, MT> | undefined | null>;
|
|
179
|
+
jiti?: Jiti;
|
|
180
|
+
jitiOptions?: JitiOptions;
|
|
181
|
+
giget?: false | DownloadTemplateOptions;
|
|
182
|
+
merger?: (...sources: Array<T | null | undefined>) => T;
|
|
183
|
+
extend?: false | {
|
|
184
|
+
extendKey?: string | string[];
|
|
185
|
+
};
|
|
186
|
+
configFileRequired?: boolean;
|
|
187
|
+
}
|
|
188
|
+
//#endregion
|
|
189
|
+
//#region src/watch.d.ts
|
|
190
|
+
type DiffEntries = ReturnType<typeof diff>;
|
|
191
|
+
type ConfigWatcher<T extends UserInputConfig = UserInputConfig, MT extends ConfigLayerMeta = ConfigLayerMeta> = ResolvedConfig<T, MT> & {
|
|
192
|
+
watchingFiles: string[];
|
|
193
|
+
unwatch: () => Promise<void>;
|
|
194
|
+
};
|
|
195
|
+
interface WatchConfigOptions<T extends UserInputConfig = UserInputConfig, MT extends ConfigLayerMeta = ConfigLayerMeta> extends LoadConfigOptions<T, MT> {
|
|
196
|
+
chokidarOptions?: ChokidarOptions;
|
|
197
|
+
debounce?: false | number;
|
|
198
|
+
onWatch?: (event: {
|
|
199
|
+
type: "created" | "updated" | "removed";
|
|
200
|
+
path: string;
|
|
201
|
+
}) => void | Promise<void>;
|
|
202
|
+
acceptHMR?: (context: {
|
|
203
|
+
getDiff: () => DiffEntries;
|
|
204
|
+
newConfig: ResolvedConfig<T, MT>;
|
|
205
|
+
oldConfig: ResolvedConfig<T, MT>;
|
|
206
|
+
}) => void | boolean | Promise<void | boolean>;
|
|
207
|
+
onUpdate?: (context: {
|
|
208
|
+
getDiff: () => ReturnType<typeof diff>;
|
|
209
|
+
newConfig: ResolvedConfig<T, MT>;
|
|
210
|
+
oldConfig: ResolvedConfig<T, MT>;
|
|
211
|
+
}) => void | Promise<void>;
|
|
212
|
+
}
|
|
213
|
+
//#endregion
|
|
214
|
+
export { WatchConfigOptions as a, ResolvedConfig as i, ConfigWatcher as n, ChokidarOptions as o, DotenvOptions as r, C12InputConfig as t };
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { n as
|
|
2
|
-
import {
|
|
3
|
-
import { l as resolveModulePath, o as readPackageJSON, r as findWorkspaceDir } from "./confbox+exsolve+pkg-types.mjs";
|
|
4
|
-
import { t as debounce } from "./perfect-debounce.mjs";
|
|
1
|
+
import { i as __toESM, n as __exportAll, r as __require, t as __commonJSMin } from "../_common.mjs";
|
|
2
|
+
import { $ as resolveModulePath, Y as readPackageJSON, at as join$1, ct as resolve$1, nt as dirname$1, ot as normalize$1, q as findWorkspaceDir, rt as extname$1, tt as basename$1 } from "../_build/common.mjs";
|
|
5
3
|
import { existsSync, promises, readFileSync, statSync } from "node:fs";
|
|
6
4
|
import { readFile, rm } from "node:fs/promises";
|
|
7
5
|
import { pathToFileURL } from "node:url";
|
|
@@ -481,8 +479,103 @@ function readUser(options) {
|
|
|
481
479
|
return read(options);
|
|
482
480
|
}
|
|
483
481
|
|
|
482
|
+
//#endregion
|
|
483
|
+
//#region node_modules/.pnpm/perfect-debounce@2.0.0/node_modules/perfect-debounce/dist/index.mjs
|
|
484
|
+
const DEBOUNCE_DEFAULTS = { trailing: true };
|
|
485
|
+
/**
|
|
486
|
+
Debounce functions
|
|
487
|
+
@param fn - Promise-returning/async function to debounce.
|
|
488
|
+
@param wait - Milliseconds to wait before calling `fn`. Default value is 25ms
|
|
489
|
+
@returns A function that delays calling `fn` until after `wait` milliseconds have elapsed since the last time it was called.
|
|
490
|
+
@example
|
|
491
|
+
```
|
|
492
|
+
import { debounce } from 'perfect-debounce';
|
|
493
|
+
const expensiveCall = async input => input;
|
|
494
|
+
const debouncedFn = debounce(expensiveCall, 200);
|
|
495
|
+
for (const number of [1, 2, 3]) {
|
|
496
|
+
console.log(await debouncedFn(number));
|
|
497
|
+
}
|
|
498
|
+
//=> 1
|
|
499
|
+
//=> 2
|
|
500
|
+
//=> 3
|
|
501
|
+
```
|
|
502
|
+
*/
|
|
503
|
+
function debounce(fn, wait = 25, options = {}) {
|
|
504
|
+
options = {
|
|
505
|
+
...DEBOUNCE_DEFAULTS,
|
|
506
|
+
...options
|
|
507
|
+
};
|
|
508
|
+
if (!Number.isFinite(wait)) throw new TypeError("Expected `wait` to be a finite number");
|
|
509
|
+
let leadingValue;
|
|
510
|
+
let timeout;
|
|
511
|
+
let resolveList = [];
|
|
512
|
+
let currentPromise;
|
|
513
|
+
let trailingArgs;
|
|
514
|
+
const applyFn = (_this, args) => {
|
|
515
|
+
currentPromise = _applyPromised(fn, _this, args);
|
|
516
|
+
currentPromise.finally(() => {
|
|
517
|
+
currentPromise = null;
|
|
518
|
+
if (options.trailing && trailingArgs && !timeout) {
|
|
519
|
+
const promise = applyFn(_this, trailingArgs);
|
|
520
|
+
trailingArgs = null;
|
|
521
|
+
return promise;
|
|
522
|
+
}
|
|
523
|
+
});
|
|
524
|
+
return currentPromise;
|
|
525
|
+
};
|
|
526
|
+
const debounced = function(...args) {
|
|
527
|
+
if (options.trailing) trailingArgs = args;
|
|
528
|
+
if (currentPromise) return currentPromise;
|
|
529
|
+
return new Promise((resolve$2) => {
|
|
530
|
+
const shouldCallNow = !timeout && options.leading;
|
|
531
|
+
clearTimeout(timeout);
|
|
532
|
+
timeout = setTimeout(() => {
|
|
533
|
+
timeout = null;
|
|
534
|
+
const promise = options.leading ? leadingValue : applyFn(this, args);
|
|
535
|
+
trailingArgs = null;
|
|
536
|
+
for (const _resolve of resolveList) _resolve(promise);
|
|
537
|
+
resolveList = [];
|
|
538
|
+
}, wait);
|
|
539
|
+
if (shouldCallNow) {
|
|
540
|
+
leadingValue = applyFn(this, args);
|
|
541
|
+
resolve$2(leadingValue);
|
|
542
|
+
} else resolveList.push(resolve$2);
|
|
543
|
+
});
|
|
544
|
+
};
|
|
545
|
+
const _clearTimeout = (timer) => {
|
|
546
|
+
if (timer) {
|
|
547
|
+
clearTimeout(timer);
|
|
548
|
+
timeout = null;
|
|
549
|
+
}
|
|
550
|
+
};
|
|
551
|
+
debounced.isPending = () => !!timeout;
|
|
552
|
+
debounced.cancel = () => {
|
|
553
|
+
_clearTimeout(timeout);
|
|
554
|
+
resolveList = [];
|
|
555
|
+
trailingArgs = null;
|
|
556
|
+
};
|
|
557
|
+
debounced.flush = () => {
|
|
558
|
+
_clearTimeout(timeout);
|
|
559
|
+
if (!trailingArgs || currentPromise) return;
|
|
560
|
+
const args = trailingArgs;
|
|
561
|
+
trailingArgs = null;
|
|
562
|
+
return applyFn(this, args);
|
|
563
|
+
};
|
|
564
|
+
return debounced;
|
|
565
|
+
}
|
|
566
|
+
async function _applyPromised(fn, _this, args) {
|
|
567
|
+
return await fn.apply(_this, args);
|
|
568
|
+
}
|
|
569
|
+
|
|
484
570
|
//#endregion
|
|
485
571
|
//#region node_modules/.pnpm/c12@3.3.3_magicast@0.5.1/node_modules/c12/dist/index.mjs
|
|
572
|
+
var dist_exports = /* @__PURE__ */ __exportAll({
|
|
573
|
+
SUPPORTED_EXTENSIONS: () => SUPPORTED_EXTENSIONS,
|
|
574
|
+
loadConfig: () => loadConfig,
|
|
575
|
+
loadDotenv: () => loadDotenv,
|
|
576
|
+
setupDotenv: () => setupDotenv,
|
|
577
|
+
watchConfig: () => watchConfig
|
|
578
|
+
});
|
|
486
579
|
var import_main = /* @__PURE__ */ __toESM(require_main(), 1);
|
|
487
580
|
/**
|
|
488
581
|
* Load and interpolate environment variables into `process.env`.
|
|
@@ -560,11 +653,11 @@ function getDotEnvVars(targetEnvironment) {
|
|
|
560
653
|
}
|
|
561
654
|
const _normalize = (p) => p?.replace(/\\/g, "/");
|
|
562
655
|
const ASYNC_LOADERS = {
|
|
563
|
-
".yaml": () => import("./
|
|
564
|
-
".yml": () => import("./
|
|
565
|
-
".jsonc": () => import("./
|
|
566
|
-
".json5": () => import("./
|
|
567
|
-
".toml": () => import("./
|
|
656
|
+
".yaml": () => import("./confbox.mjs").then((n) => n.a).then((r) => r.parseYAML),
|
|
657
|
+
".yml": () => import("./confbox.mjs").then((n) => n.a).then((r) => r.parseYAML),
|
|
658
|
+
".jsonc": () => import("./confbox.mjs").then((n) => n.t).then((r) => r.parseJSONC),
|
|
659
|
+
".json5": () => import("./confbox.mjs").then((n) => n.o).then((r) => r.parseJSON5),
|
|
660
|
+
".toml": () => import("./confbox.mjs").then((n) => n.r).then((r) => r.parseTOML)
|
|
568
661
|
};
|
|
569
662
|
const SUPPORTED_EXTENSIONS = Object.freeze([
|
|
570
663
|
".js",
|
|
@@ -750,7 +843,7 @@ async function resolveConfig(source, options, sourceOptions = {}) {
|
|
|
750
843
|
const customProviderKeys = Object.keys(sourceOptions.giget?.providers || {}).map((key) => `${key}:`);
|
|
751
844
|
const gigetPrefixes = customProviderKeys.length > 0 ? [...new Set([...customProviderKeys, ...GIGET_PREFIXES])] : GIGET_PREFIXES;
|
|
752
845
|
if (options.giget !== false && gigetPrefixes.some((prefix) => source.startsWith(prefix))) {
|
|
753
|
-
const { downloadTemplate } = await import("./giget
|
|
846
|
+
const { downloadTemplate } = await import("./giget.mjs").then((n) => n.t);
|
|
754
847
|
const { digest } = await import("ohash");
|
|
755
848
|
const cloneName = source.replace(/\W+/g, "_").split("_").splice(0, 3).join("_") + "_" + digest(source).slice(0, 10).replace(/[-_]/g, "");
|
|
756
849
|
let cloneDir;
|
|
@@ -831,7 +924,7 @@ async function watchConfig(options) {
|
|
|
831
924
|
options.rcFile && resolve$1(l.cwd, typeof options.rcFile === "string" ? options.rcFile : `.${configName}rc`),
|
|
832
925
|
options.packageJson && resolve$1(l.cwd, "package.json")
|
|
833
926
|
]).filter(Boolean))];
|
|
834
|
-
const watch$1 = await import("./
|
|
927
|
+
const watch$1 = await import("./chokidar.mjs").then((n) => n.t).then((r) => r.watch || r.default || r);
|
|
835
928
|
const { diff } = await import("ohash/utils");
|
|
836
929
|
const _fswatcher = watch$1(watchingFiles, {
|
|
837
930
|
ignoreInitial: true,
|
|
@@ -876,4 +969,4 @@ async function watchConfig(options) {
|
|
|
876
969
|
}
|
|
877
970
|
|
|
878
971
|
//#endregion
|
|
879
|
-
export {
|
|
972
|
+
export { debounce as i, loadConfig as n, watchConfig as r, dist_exports as t };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { n as __exportAll } from "../_common.mjs";
|
|
1
2
|
import { Stats, stat, unwatchFile, watch, watchFile } from "node:fs";
|
|
2
3
|
import { lstat, open, readdir, realpath, stat as stat$1 } from "node:fs/promises";
|
|
3
4
|
import { type } from "node:os";
|
|
@@ -957,6 +958,12 @@ var NodeFsHandler = class {
|
|
|
957
958
|
//#endregion
|
|
958
959
|
//#region node_modules/.pnpm/chokidar@5.0.0/node_modules/chokidar/index.js
|
|
959
960
|
/*! chokidar - MIT License (c) 2012 Paul Miller (paulmillr.com) */
|
|
961
|
+
var chokidar_exports = /* @__PURE__ */ __exportAll({
|
|
962
|
+
FSWatcher: () => FSWatcher,
|
|
963
|
+
WatchHelper: () => WatchHelper,
|
|
964
|
+
default: () => chokidar_default,
|
|
965
|
+
watch: () => watch$1
|
|
966
|
+
});
|
|
960
967
|
const SLASH = "/";
|
|
961
968
|
const SLASH_SLASH = "//";
|
|
962
969
|
const ONE_DOT = ".";
|
|
@@ -1601,4 +1608,4 @@ var chokidar_default = {
|
|
|
1601
1608
|
};
|
|
1602
1609
|
|
|
1603
1610
|
//#endregion
|
|
1604
|
-
export { watch$1 as
|
|
1611
|
+
export { watch$1 as n, chokidar_exports as t };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
//#region node_modules/.pnpm/compatx@0.2.0/node_modules/compatx/dist/index.d.mts
|
|
2
|
+
/**
|
|
3
|
+
* Known platform names
|
|
4
|
+
*/
|
|
5
|
+
declare const platforms: readonly ["aws", "azure", "cloudflare", "deno", "firebase", "netlify", "vercel"];
|
|
6
|
+
/**
|
|
7
|
+
* Known platform name
|
|
8
|
+
*/
|
|
9
|
+
type PlatformName = typeof platforms[number] | string & {};
|
|
10
|
+
/**
|
|
11
|
+
* Normalize the compatibility dates from input config and defaults.
|
|
12
|
+
*/
|
|
13
|
+
type Year = `${number}${number}${number}${number}`;
|
|
14
|
+
type Month = `${"0" | "1"}${number}`;
|
|
15
|
+
type Day = `${"0" | "1" | "2" | "3"}${number}`;
|
|
16
|
+
/**
|
|
17
|
+
* Typed date string in `YYYY-MM-DD` format
|
|
18
|
+
*
|
|
19
|
+
* Empty string is used to represent an "unspecified" date.
|
|
20
|
+
*
|
|
21
|
+
* "latest" is used to represent the latest date available (date of today).
|
|
22
|
+
*/
|
|
23
|
+
type DateString = "" | "latest" | `${Year}-${Month}-${Day}`;
|
|
24
|
+
/**
|
|
25
|
+
* Last known compatibility dates for platforms
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* {
|
|
29
|
+
* "default": "2024-01-01",
|
|
30
|
+
* "cloudflare": "2024-03-01",
|
|
31
|
+
* }
|
|
32
|
+
*/
|
|
33
|
+
type CompatibilityDates = {
|
|
34
|
+
/**
|
|
35
|
+
* Default compatibility date for all unspecified platforms (required)
|
|
36
|
+
*/
|
|
37
|
+
default: DateString;
|
|
38
|
+
} & Partial<Record<PlatformName, DateString>>;
|
|
39
|
+
/**
|
|
40
|
+
* Last known compatibility date for the used platform
|
|
41
|
+
*/
|
|
42
|
+
type CompatibilityDateSpec = DateString | Partial<CompatibilityDates>;
|
|
43
|
+
/**
|
|
44
|
+
* Get compatibility updates applicable for the user given platform and date range.
|
|
45
|
+
*/
|
|
46
|
+
//#endregion
|
|
47
|
+
export { CompatibilityDates as n, DateString as r, CompatibilityDateSpec as t };
|