@chuckcchen/vite-plugin 1.0.3 → 1.0.4
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/bundler.d.ts +2 -44
- package/dist/bundler.d.ts.map +1 -1
- package/dist/bundler.js +29 -170
- package/dist/bundler.js.map +1 -1
- package/dist/factory.d.ts +8 -45
- package/dist/factory.d.ts.map +1 -1
- package/dist/factory.js +28 -93
- package/dist/factory.js.map +1 -1
- package/dist/index.d.ts +4 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +16 -6
- package/dist/index.js.map +1 -1
- package/dist/utils.d.ts +57 -125
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +182 -170
- package/dist/utils.js.map +1 -1
- package/package.json +1 -1
package/dist/factory.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Adapter Factory - Simplifies the creation of framework adapters
|
|
3
3
|
*
|
|
4
|
-
* Provides factory functions and preset configurations to reduce boilerplate code
|
|
4
|
+
* Provides factory functions and preset configurations to reduce boilerplate code
|
|
5
5
|
*/
|
|
6
6
|
import path from "path";
|
|
7
|
-
import { detectConfigFile, detectBuildDir, detectServerEntry, generateServerWrapperCode, createDefaultMeta, logBuildArtifacts, } from "./
|
|
8
|
-
import { pathExists, readFile } from "./utils.js";
|
|
7
|
+
import { pathExists, readFile, detectConfigFile, detectBuildDir, detectServerEntry, generateServerWrapperCode, createDefaultMeta, logBuildArtifacts, } from "./utils.js";
|
|
9
8
|
/**
|
|
10
9
|
* Built-in server wrapper presets
|
|
11
10
|
*/
|
|
@@ -58,7 +57,6 @@ const requestHandler = createRequestHandler(buildConfig);`.trim(),
|
|
|
58
57
|
viteSSR: {
|
|
59
58
|
requiresHtmlTemplate: true,
|
|
60
59
|
handlerSetup: `
|
|
61
|
-
// Get render function from server build
|
|
62
60
|
const renderFn = typeof render === 'function'
|
|
63
61
|
? render
|
|
64
62
|
: (typeof module !== 'undefined' && typeof module.render === 'function' ? module.render : null);
|
|
@@ -72,10 +70,7 @@ async function handleSSRRequest(request) {
|
|
|
72
70
|
const pathname = url.pathname;
|
|
73
71
|
|
|
74
72
|
try {
|
|
75
|
-
// Call render function
|
|
76
73
|
const rendered = await renderFn(pathname);
|
|
77
|
-
|
|
78
|
-
// Inject rendered content into template
|
|
79
74
|
let html = __HTML_TEMPLATE__
|
|
80
75
|
.replace('<!--app-head-->', rendered.head ?? '')
|
|
81
76
|
.replace('<!--app-html-->', rendered.html ?? '');
|
|
@@ -97,24 +92,10 @@ async function handleSSRRequest(request) {
|
|
|
97
92
|
};
|
|
98
93
|
/**
|
|
99
94
|
* Create a framework adapter
|
|
100
|
-
*
|
|
101
|
-
* @example
|
|
102
|
-
* ```ts
|
|
103
|
-
* const adapter = createFrameworkAdapter({
|
|
104
|
-
* name: "my-framework",
|
|
105
|
-
* configFiles: ["my-framework.config.ts", "my-framework.config.js"],
|
|
106
|
-
* buildDirs: {
|
|
107
|
-
* client: ["dist/client", "dist"],
|
|
108
|
-
* server: ["dist/server"],
|
|
109
|
-
* },
|
|
110
|
-
* serverWrapper: "generic",
|
|
111
|
-
* });
|
|
112
|
-
* ```
|
|
113
95
|
*/
|
|
114
96
|
export function createFrameworkAdapter(config, options = {}, overrides) {
|
|
115
97
|
const { name, configFiles, buildDirs, serverEntryFiles = ["index.js", "index.mjs", "entry.js", "main.js"], serverWrapper = "generic", defaultRoutes = ["/"], ssrExtraRoutes = [], ssr404, htmlTemplatePaths = ["dist/client/index.html", "dist/index.html"], } = config;
|
|
116
98
|
const { clientBuildDir, serverBuildDir, serverEntry, routes = defaultRoutes, } = options;
|
|
117
|
-
// Resolve server wrapper configuration
|
|
118
99
|
const wrapperConfig = typeof serverWrapper === "string"
|
|
119
100
|
? SERVER_WRAPPER_PRESETS[serverWrapper]
|
|
120
101
|
: serverWrapper;
|
|
@@ -126,18 +107,13 @@ export function createFrameworkAdapter(config, options = {}, overrides) {
|
|
|
126
107
|
},
|
|
127
108
|
async getBuildArtifacts(context) {
|
|
128
109
|
const { projectRoot, isSSR, logger } = context;
|
|
129
|
-
// Detect client directory
|
|
130
110
|
let clientDir = null;
|
|
131
111
|
if (clientBuildDir) {
|
|
132
112
|
clientDir = path.join(projectRoot, clientBuildDir);
|
|
133
113
|
}
|
|
134
114
|
else {
|
|
135
|
-
|
|
136
|
-
? buildDirs.client
|
|
137
|
-
: buildDirs.client;
|
|
138
|
-
clientDir = await detectBuildDir(projectRoot, candidates);
|
|
115
|
+
clientDir = await detectBuildDir(projectRoot, buildDirs.client);
|
|
139
116
|
}
|
|
140
|
-
// Detect server directory and entry
|
|
141
117
|
let serverDir = null;
|
|
142
118
|
let serverEntryPath = null;
|
|
143
119
|
if (isSSR && buildDirs.server) {
|
|
@@ -173,7 +149,6 @@ export function createFrameworkAdapter(config, options = {}, overrides) {
|
|
|
173
149
|
isStatic: !context.isSSR,
|
|
174
150
|
srcRoute: route,
|
|
175
151
|
}));
|
|
176
|
-
// Add extra routes for SSR mode
|
|
177
152
|
if (context.isSSR && ssrExtraRoutes.length > 0) {
|
|
178
153
|
ssrExtraRoutes.forEach((route) => {
|
|
179
154
|
routeList.push({ path: route, isStatic: false, srcRoute: route });
|
|
@@ -183,7 +158,6 @@ export function createFrameworkAdapter(config, options = {}, overrides) {
|
|
|
183
158
|
},
|
|
184
159
|
async generateMeta(context, routeList) {
|
|
185
160
|
const meta = createDefaultMeta(routeList, { isSSR: context.isSSR });
|
|
186
|
-
// Custom ssr404 handling
|
|
187
161
|
if (ssr404 !== undefined) {
|
|
188
162
|
meta.conf.ssr404 = typeof ssr404 === "function"
|
|
189
163
|
? ssr404(context.isSSR)
|
|
@@ -193,10 +167,8 @@ export function createFrameworkAdapter(config, options = {}, overrides) {
|
|
|
193
167
|
},
|
|
194
168
|
async generateServerWrapper(context, wrapperCfg) {
|
|
195
169
|
let handlerSetup = wrapperConfig.handlerSetup;
|
|
196
|
-
// Handle HTML template injection for viteSSR preset
|
|
197
170
|
if (wrapperConfig.requiresHtmlTemplate) {
|
|
198
171
|
const { projectRoot, outputDir, logger } = context;
|
|
199
|
-
// Try to read HTML template
|
|
200
172
|
let htmlTemplate = "";
|
|
201
173
|
const templateCandidates = [
|
|
202
174
|
...htmlTemplatePaths.map(p => path.join(projectRoot, p)),
|
|
@@ -213,9 +185,8 @@ export function createFrameworkAdapter(config, options = {}, overrides) {
|
|
|
213
185
|
logger.warn("HTML template not found, using default template");
|
|
214
186
|
htmlTemplate = "<!DOCTYPE html><html><head><!--app-head--></head><body><div id=\"app\"><!--app-html--></div></body></html>";
|
|
215
187
|
}
|
|
216
|
-
// Prepend HTML template definition
|
|
217
188
|
const escapedTemplate = JSON.stringify(htmlTemplate);
|
|
218
|
-
handlerSetup =
|
|
189
|
+
handlerSetup = `const __HTML_TEMPLATE__ = ${escapedTemplate};\n\n${handlerSetup}`;
|
|
219
190
|
}
|
|
220
191
|
return generateServerWrapperCode({
|
|
221
192
|
serverEntryPath: wrapperCfg.serverEntryPath,
|
|
@@ -226,83 +197,60 @@ export function createFrameworkAdapter(config, options = {}, overrides) {
|
|
|
226
197
|
},
|
|
227
198
|
},
|
|
228
199
|
};
|
|
229
|
-
// Merge user overrides
|
|
230
200
|
if (overrides) {
|
|
231
|
-
return
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
* Merge adapter configurations
|
|
237
|
-
*/
|
|
238
|
-
function mergeAdapter(base, overrides) {
|
|
239
|
-
const merged = {
|
|
240
|
-
...base,
|
|
241
|
-
...overrides,
|
|
242
|
-
name: overrides.name || base.name,
|
|
243
|
-
};
|
|
244
|
-
// Merge hooks
|
|
245
|
-
if (base.hooks || overrides.hooks) {
|
|
246
|
-
merged.hooks = {
|
|
247
|
-
...base.hooks,
|
|
248
|
-
...overrides.hooks,
|
|
201
|
+
return {
|
|
202
|
+
...baseAdapter,
|
|
203
|
+
...overrides,
|
|
204
|
+
name: overrides.name || baseAdapter.name,
|
|
205
|
+
hooks: { ...baseAdapter.hooks, ...overrides.hooks },
|
|
249
206
|
};
|
|
250
207
|
}
|
|
251
|
-
return
|
|
208
|
+
return baseAdapter;
|
|
252
209
|
}
|
|
253
210
|
/**
|
|
254
|
-
* Create a stateful adapter
|
|
255
|
-
* Used for complex adapters that need to share state between different hooks
|
|
211
|
+
* Create a stateful adapter (for complex adapters needing shared state)
|
|
256
212
|
*/
|
|
257
213
|
export function createStatefulAdapter(initialState, factory) {
|
|
258
|
-
|
|
259
|
-
return factory(state);
|
|
214
|
+
return factory({ ...initialState });
|
|
260
215
|
}
|
|
261
216
|
/**
|
|
262
|
-
*
|
|
217
|
+
* Combine multiple detector functions (returns true if any matches)
|
|
263
218
|
*/
|
|
264
|
-
export function
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
219
|
+
export function combineDetectors(...detectors) {
|
|
220
|
+
return async (context) => {
|
|
221
|
+
for (const detector of detectors) {
|
|
222
|
+
if (await detector(context)) {
|
|
223
|
+
return true;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
return false;
|
|
227
|
+
};
|
|
272
228
|
}
|
|
273
229
|
/**
|
|
274
|
-
* Create
|
|
230
|
+
* Create detector based on config files
|
|
275
231
|
*/
|
|
276
232
|
export function createConfigDetector(configFiles) {
|
|
277
233
|
return async (context) => {
|
|
278
|
-
|
|
279
|
-
return configPath !== null;
|
|
234
|
+
return (await detectConfigFile(context.projectRoot, configFiles)) !== null;
|
|
280
235
|
};
|
|
281
236
|
}
|
|
282
237
|
/**
|
|
283
|
-
* Create
|
|
238
|
+
* Create detector based on build directories
|
|
284
239
|
*/
|
|
285
240
|
export function createBuildDirDetector(buildDirs) {
|
|
286
241
|
return async (context) => {
|
|
287
|
-
|
|
288
|
-
if (await pathExists(path.join(context.projectRoot, dir))) {
|
|
289
|
-
return true;
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
return false;
|
|
242
|
+
return (await detectBuildDir(context.projectRoot, buildDirs)) !== null;
|
|
293
243
|
};
|
|
294
244
|
}
|
|
295
245
|
/**
|
|
296
|
-
* Create
|
|
246
|
+
* Create detector based on package.json dependencies
|
|
297
247
|
*/
|
|
298
248
|
export function createDependencyDetector(dependencies) {
|
|
299
249
|
return async (context) => {
|
|
300
250
|
const packageJsonPath = path.join(context.projectRoot, "package.json");
|
|
301
|
-
if (!await pathExists(packageJsonPath))
|
|
251
|
+
if (!await pathExists(packageJsonPath))
|
|
302
252
|
return false;
|
|
303
|
-
}
|
|
304
253
|
try {
|
|
305
|
-
const { readFile } = await import("./utils.js");
|
|
306
254
|
const content = await readFile(packageJsonPath);
|
|
307
255
|
const packageJson = JSON.parse(content);
|
|
308
256
|
const deps = { ...packageJson.dependencies, ...packageJson.devDependencies };
|
|
@@ -313,17 +261,4 @@ export function createDependencyDetector(dependencies) {
|
|
|
313
261
|
}
|
|
314
262
|
};
|
|
315
263
|
}
|
|
316
|
-
/**
|
|
317
|
-
* Combine multiple detector functions (returns true if any matches)
|
|
318
|
-
*/
|
|
319
|
-
export function combineDetectors(...detectors) {
|
|
320
|
-
return async (context) => {
|
|
321
|
-
for (const detector of detectors) {
|
|
322
|
-
if (await detector(context)) {
|
|
323
|
-
return true;
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
return false;
|
|
327
|
-
};
|
|
328
|
-
}
|
|
329
264
|
//# sourceMappingURL=factory.js.map
|
package/dist/factory.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factory.js","sourceRoot":"","sources":["../src/factory.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,IAAI,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"factory.js","sourceRoot":"","sources":["../src/factory.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,IAAI,MAAM,MAAM,CAAC;AASxB,OAAO,EACL,UAAU,EACV,QAAQ,EAC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,CAAC,YAAsB;IAC7D,OAAO,KAAK,EAAE,OAAqB,EAAoB,EAAE;QACvD,MAAM,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC;QACvE,IAAI,CAAC,MAAM,UAAU,CAAC,eAAe,CAAC;YAAE,OAAO,KAAK,CAAC;QAErD,IAAI,CAAC;YACH,MAAM,OAAO,GAAG,MAAM,QAAQ,CAAC,eAAe,CAAC,CAAC;YAChD,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YACxC,MAAM,IAAI,GAAG,EAAE,GAAG,WAAW,CAAC,YAAY,EAAE,GAAG,WAAW,CAAC,eAAe,EAAE,CAAC;YAC7E,OAAO,YAAY,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,IAAI,IAAI,CAAC,CAAC;QACjD,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC,CAAC;AACJ,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -3,11 +3,10 @@
|
|
|
3
3
|
* Core adapter plugin for EdgeOne platform
|
|
4
4
|
*/
|
|
5
5
|
export { createCoreAdapter, default } from "./core.js";
|
|
6
|
-
export { bundleServerCode, createServerWrapper, cleanupWrapper,
|
|
7
|
-
export { createLogger,
|
|
8
|
-
export {
|
|
9
|
-
export { createFrameworkAdapter, createStatefulAdapter, composeHooks, createConfigDetector, createBuildDirDetector, createDependencyDetector, combineDetectors, SERVER_WRAPPER_PRESETS, } from "./factory.js";
|
|
6
|
+
export { bundleServerCode, createServerWrapper, cleanupWrapper, } from "./bundler.js";
|
|
7
|
+
export { createLogger, logBuildArtifacts, pathExists, copyDirectory, ensureDirectory, readFile, writeFile, deleteFile, listFiles, detectConfigFile, detectBuildDir, detectServerEntry, loadConfigFile, normalizeRoutePath, createDefaultMeta, NODE_REQUEST_CONVERTER_CODE, generateServerWrapperCode, } from "./utils.js";
|
|
8
|
+
export { createFrameworkAdapter, createStatefulAdapter, combineDetectors, createConfigDetector, createBuildDirDetector, createDependencyDetector, SERVER_WRAPPER_PRESETS, } from "./factory.js";
|
|
10
9
|
export type { RouteInfo, MetaConfig, HeaderRule, RedirectRule, RewriteRule, CacheRule, BuildContext, Logger, BuildArtifacts, ServerWrapperConfig, ServerBundleConfig, BeforeBuildHook, AfterBuildHook, BeforeBundleHook, AfterBundleHook, GenerateRoutesHook, GenerateMetaHook, GenerateServerWrapperHook, AdapterHooks, FrameworkAdapter, CoreAdapterOptions, ViteAdapterOptions, ReactRouterAdapterOptions, TanStackStartAdapterOptions, CreateAdapterPlugin, } from "./types.js";
|
|
11
|
-
export type { ServerWrapperGeneratorOptions } from "./
|
|
10
|
+
export type { ServerWrapperGeneratorOptions } from "./utils.js";
|
|
12
11
|
export type { ServerWrapperPreset, BuildDirConfig, AdapterFactoryConfig, AdapterFactoryOptions, } from "./factory.js";
|
|
13
12
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGvD,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGvD,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,cAAc,GACf,MAAM,cAAc,CAAC;AAGtB,OAAO,EAEL,YAAY,EACZ,iBAAiB,EAEjB,UAAU,EACV,aAAa,EACb,eAAe,EACf,QAAQ,EACR,SAAS,EACT,UAAU,EACV,SAAS,EAET,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,cAAc,EAEd,kBAAkB,EAElB,iBAAiB,EAEjB,2BAA2B,EAC3B,yBAAyB,GAC1B,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,sBAAsB,EACtB,qBAAqB,EACrB,gBAAgB,EAChB,oBAAoB,EACpB,sBAAsB,EACtB,wBAAwB,EACxB,sBAAsB,GACvB,MAAM,cAAc,CAAC;AAGtB,YAAY,EACV,SAAS,EACT,UAAU,EACV,UAAU,EACV,YAAY,EACZ,WAAW,EACX,SAAS,EACT,YAAY,EACZ,MAAM,EACN,cAAc,EACd,mBAAmB,EACnB,kBAAkB,EAClB,eAAe,EACf,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,gBAAgB,EAChB,yBAAyB,EACzB,YAAY,EACZ,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,EAClB,yBAAyB,EACzB,2BAA2B,EAC3B,mBAAmB,GACpB,MAAM,YAAY,CAAC;AAEpB,YAAY,EAAE,6BAA6B,EAAE,MAAM,YAAY,CAAC;AAEhE,YAAY,EACV,mBAAmB,EACnB,cAAc,EACd,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,cAAc,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -5,11 +5,21 @@
|
|
|
5
5
|
// Core
|
|
6
6
|
export { createCoreAdapter, default } from "./core.js";
|
|
7
7
|
// Bundler
|
|
8
|
-
export { bundleServerCode, createServerWrapper, cleanupWrapper,
|
|
9
|
-
// Utils
|
|
10
|
-
export {
|
|
11
|
-
//
|
|
12
|
-
|
|
8
|
+
export { bundleServerCode, createServerWrapper, cleanupWrapper, } from "./bundler.js";
|
|
9
|
+
// Utils (merged from helpers.js)
|
|
10
|
+
export {
|
|
11
|
+
// Logging
|
|
12
|
+
createLogger, logBuildArtifacts,
|
|
13
|
+
// File system
|
|
14
|
+
pathExists, copyDirectory, ensureDirectory, readFile, writeFile, deleteFile, listFiles,
|
|
15
|
+
// Detection
|
|
16
|
+
detectConfigFile, detectBuildDir, detectServerEntry, loadConfigFile,
|
|
17
|
+
// Route helpers
|
|
18
|
+
normalizeRoutePath,
|
|
19
|
+
// Meta
|
|
20
|
+
createDefaultMeta,
|
|
21
|
+
// Server wrapper
|
|
22
|
+
NODE_REQUEST_CONVERTER_CODE, generateServerWrapperCode, } from "./utils.js";
|
|
13
23
|
// Factory
|
|
14
|
-
export { createFrameworkAdapter, createStatefulAdapter,
|
|
24
|
+
export { createFrameworkAdapter, createStatefulAdapter, combineDetectors, createConfigDetector, createBuildDirDetector, createDependencyDetector, SERVER_WRAPPER_PRESETS, } from "./factory.js";
|
|
15
25
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO;AACP,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEvD,UAAU;AACV,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO;AACP,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEvD,UAAU;AACV,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,cAAc,GACf,MAAM,cAAc,CAAC;AAEtB,iCAAiC;AACjC,OAAO;AACL,UAAU;AACV,YAAY,EACZ,iBAAiB;AACjB,cAAc;AACd,UAAU,EACV,aAAa,EACb,eAAe,EACf,QAAQ,EACR,SAAS,EACT,UAAU,EACV,SAAS;AACT,YAAY;AACZ,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,cAAc;AACd,gBAAgB;AAChB,kBAAkB;AAClB,OAAO;AACP,iBAAiB;AACjB,iBAAiB;AACjB,2BAA2B,EAC3B,yBAAyB,GAC1B,MAAM,YAAY,CAAC;AAEpB,UAAU;AACV,OAAO,EACL,sBAAsB,EACtB,qBAAqB,EACrB,gBAAgB,EAChB,oBAAoB,EACpB,sBAAsB,EACtB,wBAAwB,EACxB,sBAAsB,GACvB,MAAM,cAAc,CAAC"}
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,164 +1,96 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* EdgeOne Vite Plugin Adapter - Utility Functions Module
|
|
3
3
|
*
|
|
4
|
-
* This module provides
|
|
4
|
+
* This module provides utility functions for:
|
|
5
5
|
* - Logging
|
|
6
|
-
* - File system operations
|
|
6
|
+
* - File system operations
|
|
7
7
|
* - Path detection
|
|
8
|
-
* -
|
|
9
|
-
* -
|
|
8
|
+
* - Config file loading
|
|
9
|
+
* - Server wrapper generation
|
|
10
|
+
* - Meta configuration
|
|
10
11
|
*/
|
|
11
|
-
import type { Logger } from "./types.js";
|
|
12
|
+
import type { Logger, RouteInfo, MetaConfig } from "./types.js";
|
|
12
13
|
/**
|
|
13
14
|
* Create logger instance
|
|
14
|
-
*
|
|
15
|
-
* @param verbose - Enable verbose logging mode, default is false
|
|
16
|
-
* @returns Logger object with log, verbose, warn, error methods
|
|
17
|
-
*
|
|
18
|
-
* @example
|
|
19
|
-
* const logger = createLogger(true);
|
|
20
|
-
* logger.verbose("This message only shows in verbose mode");
|
|
21
|
-
* logger.warn("This is a warning message");
|
|
22
15
|
*/
|
|
23
16
|
export declare function createLogger(verbose?: boolean): Logger;
|
|
24
17
|
/**
|
|
25
18
|
* Check if specified path exists
|
|
26
|
-
*
|
|
27
|
-
* @param filePath - File or directory path to check
|
|
28
|
-
* @returns True if path exists, false otherwise
|
|
29
|
-
*
|
|
30
|
-
* @example
|
|
31
|
-
* if (await pathExists('/path/to/file')) {
|
|
32
|
-
* console.log('File exists');
|
|
33
|
-
* }
|
|
34
19
|
*/
|
|
35
20
|
export declare function pathExists(filePath: string): Promise<boolean>;
|
|
36
|
-
/**
|
|
37
|
-
* Find first existing path from candidate list
|
|
38
|
-
*
|
|
39
|
-
* @param candidates - Candidate paths array, sorted by priority
|
|
40
|
-
* @returns First existing path, or null if none exist
|
|
41
|
-
*
|
|
42
|
-
* @example
|
|
43
|
-
* const buildDir = await findExistingPath([
|
|
44
|
-
* '/project/dist',
|
|
45
|
-
* '/project/build',
|
|
46
|
-
* '/project/output'
|
|
47
|
-
* ]);
|
|
48
|
-
*/
|
|
49
|
-
export declare function findExistingPath(candidates: string[]): Promise<string | null>;
|
|
50
21
|
/**
|
|
51
22
|
* Recursively copy directory
|
|
52
|
-
* Copy all contents from source directory to destination directory
|
|
53
|
-
*
|
|
54
|
-
* @param src - Source directory path
|
|
55
|
-
* @param dest - Destination directory path
|
|
56
|
-
*
|
|
57
|
-
* @example
|
|
58
|
-
* await copyDirectory('dist/client', '.edgeone/assets');
|
|
59
23
|
*/
|
|
60
24
|
export declare function copyDirectory(src: string, dest: string): Promise<void>;
|
|
61
25
|
/**
|
|
62
|
-
*
|
|
63
|
-
* Used to ensure directory is in a clean empty state
|
|
64
|
-
*
|
|
65
|
-
* @param dir - Directory path to clean
|
|
66
|
-
*
|
|
67
|
-
* @example
|
|
68
|
-
* await cleanDirectory('.edgeone');
|
|
69
|
-
*/
|
|
70
|
-
export declare function cleanDirectory(dir: string): Promise<void>;
|
|
71
|
-
/**
|
|
72
|
-
* Ensure directory exists
|
|
73
|
-
* Recursively create if directory doesn't exist
|
|
74
|
-
*
|
|
75
|
-
* @param dir - Directory path
|
|
76
|
-
*
|
|
77
|
-
* @example
|
|
78
|
-
* await ensureDirectory('.edgeone/server-handler');
|
|
26
|
+
* Ensure directory exists (creates recursively if needed)
|
|
79
27
|
*/
|
|
80
28
|
export declare function ensureDirectory(dir: string): Promise<void>;
|
|
81
29
|
/**
|
|
82
30
|
* Read file content as string
|
|
83
|
-
*
|
|
84
|
-
* @param filePath - File path
|
|
85
|
-
* @returns File content string (UTF-8 encoded)
|
|
86
|
-
*
|
|
87
|
-
* @example
|
|
88
|
-
* const content = await readFile('dist/server/index.js');
|
|
89
31
|
*/
|
|
90
32
|
export declare function readFile(filePath: string): Promise<string>;
|
|
91
33
|
/**
|
|
92
|
-
* Write content to file
|
|
93
|
-
* Automatically creates parent directory if it doesn't exist
|
|
94
|
-
*
|
|
95
|
-
* @param filePath - File path
|
|
96
|
-
* @param content - Content to write
|
|
97
|
-
*
|
|
98
|
-
* @example
|
|
99
|
-
* await writeFile('.edgeone/meta.json', JSON.stringify(config));
|
|
34
|
+
* Write content to file (auto-creates parent directory)
|
|
100
35
|
*/
|
|
101
36
|
export declare function writeFile(filePath: string, content: string): Promise<void>;
|
|
102
37
|
/**
|
|
103
38
|
* Delete file
|
|
104
|
-
*
|
|
105
|
-
* @param filePath - File path to delete
|
|
106
|
-
*
|
|
107
|
-
* @example
|
|
108
|
-
* await deleteFile('server-wrapper.temp.js');
|
|
109
39
|
*/
|
|
110
40
|
export declare function deleteFile(filePath: string): Promise<void>;
|
|
111
41
|
/**
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
* @param bytes - Number of bytes
|
|
115
|
-
* @returns Formatted string, e.g. "1.5 KB", "2.3 MB"
|
|
116
|
-
*
|
|
117
|
-
* @example
|
|
118
|
-
* formatSize(1536); // "1.5 KB"
|
|
119
|
-
* formatSize(2457600); // "2.34 MB"
|
|
42
|
+
* List files in directory
|
|
120
43
|
*/
|
|
121
|
-
export declare function
|
|
44
|
+
export declare function listFiles(dir: string): Promise<string[]>;
|
|
122
45
|
/**
|
|
123
|
-
*
|
|
124
|
-
* Used to wait for async operations to complete, like file writes
|
|
125
|
-
*
|
|
126
|
-
* @param condition - Async condition function returning boolean
|
|
127
|
-
* @param options - Configuration options
|
|
128
|
-
* @param options.maxRetries - Maximum retry count, default 15
|
|
129
|
-
* @param options.delay - Delay between retries in milliseconds, default 300ms
|
|
130
|
-
* @returns True if condition met, false if timeout
|
|
131
|
-
*
|
|
132
|
-
* @example
|
|
133
|
-
* const ready = await waitFor(
|
|
134
|
-
* async () => await pathExists('dist/index.html'),
|
|
135
|
-
* { maxRetries: 10, delay: 500 }
|
|
136
|
-
* );
|
|
137
|
-
*/
|
|
138
|
-
export declare function waitFor(condition: () => Promise<boolean>, options?: {
|
|
139
|
-
maxRetries?: number;
|
|
140
|
-
delay?: number;
|
|
141
|
-
}): Promise<boolean>;
|
|
142
|
-
/**
|
|
143
|
-
* List files and subdirectory names in directory
|
|
144
|
-
*
|
|
145
|
-
* @param dir - Directory path
|
|
146
|
-
* @returns Array of file and directory names, empty array if directory doesn't exist
|
|
147
|
-
*
|
|
148
|
-
* @example
|
|
149
|
-
* const files = await listFiles('dist/client');
|
|
150
|
-
* // ['index.html', 'assets', 'favicon.ico']
|
|
46
|
+
* Detect config file from candidate list
|
|
151
47
|
*/
|
|
152
|
-
export declare function
|
|
48
|
+
export declare function detectConfigFile(projectRoot: string, patterns: string[]): Promise<string | null>;
|
|
153
49
|
/**
|
|
154
|
-
*
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
*
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
50
|
+
* Detect build directory from candidate list
|
|
51
|
+
*/
|
|
52
|
+
export declare function detectBuildDir(projectRoot: string, candidates: string[]): Promise<string | null>;
|
|
53
|
+
/**
|
|
54
|
+
* Detect server entry file from candidate list
|
|
55
|
+
*/
|
|
56
|
+
export declare function detectServerEntry(serverDir: string, candidates?: string[]): Promise<string | null>;
|
|
57
|
+
/**
|
|
58
|
+
* Dynamically import config file
|
|
59
|
+
*/
|
|
60
|
+
export declare function loadConfigFile<T = unknown>(configPath: string): Promise<T | null>;
|
|
61
|
+
/**
|
|
62
|
+
* Normalize route path
|
|
63
|
+
*/
|
|
64
|
+
export declare function normalizeRoutePath(routePath: string): string;
|
|
65
|
+
/**
|
|
66
|
+
* Create default meta configuration
|
|
67
|
+
*/
|
|
68
|
+
export declare function createDefaultMeta(routes: RouteInfo[], options?: {
|
|
69
|
+
isSSR?: boolean;
|
|
70
|
+
has404?: boolean;
|
|
71
|
+
}): MetaConfig;
|
|
72
|
+
/** Node.js IncomingMessage to Web Request converter code */
|
|
73
|
+
export declare const NODE_REQUEST_CONVERTER_CODE: string;
|
|
74
|
+
/** Server wrapper generator options */
|
|
75
|
+
export interface ServerWrapperGeneratorOptions {
|
|
76
|
+
serverEntryPath: string;
|
|
77
|
+
handlerSetup?: string;
|
|
78
|
+
handlerCall: string;
|
|
79
|
+
imports?: string;
|
|
80
|
+
needsNodeRequestConversion?: boolean;
|
|
81
|
+
mode?: "inline" | "import";
|
|
82
|
+
additionalExports?: string[];
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Generate server wrapper code
|
|
86
|
+
*/
|
|
87
|
+
export declare function generateServerWrapperCode(options: ServerWrapperGeneratorOptions): Promise<string>;
|
|
88
|
+
/**
|
|
89
|
+
* Log build artifacts info
|
|
162
90
|
*/
|
|
163
|
-
export declare function
|
|
91
|
+
export declare function logBuildArtifacts(logger: Logger, adapterName: string, artifacts: {
|
|
92
|
+
clientDir?: string | null;
|
|
93
|
+
serverDir?: string | null;
|
|
94
|
+
serverEntry?: string | null;
|
|
95
|
+
}): void;
|
|
164
96
|
//# sourceMappingURL=utils.d.ts.map
|
package/dist/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAKH,OAAO,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAMhE;;GAEG;AACH,wBAAgB,YAAY,CAAC,OAAO,GAAE,OAAe,GAAG,MAAM,CAiB7D;AAMD;;GAEG;AACH,wBAAsB,UAAU,CAAC,QAAQ,EAAE,MAA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