@windwalker-io/fusion-next 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +19 -19
- package/dist/index.cjs +12 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +12 -8
- package/dist/index.js.map +1 -1
- package/jest.config.ts +214 -214
- package/package.json +54 -54
- package/resources/img/credit.txt +2 -2
- package/types/vue/global.d.ts +14 -14
- package/types/vue/shims-vue.d.ts +5 -5
- package/types/vue/vue-runtime.d.ts +16 -16
- package/vite.config.ts +71 -71
package/dist/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { Plugin as Plugin_2 } from 'vite';
|
|
|
7
7
|
import { PluginOption } from 'vite';
|
|
8
8
|
import { PreRenderedAsset } from 'rollup';
|
|
9
9
|
import { PreRenderedChunk } from 'rollup';
|
|
10
|
+
import { ResolvedConfig } from 'vite';
|
|
10
11
|
import { UserConfig } from 'vite';
|
|
11
12
|
import { ViteDevServer } from 'vite';
|
|
12
13
|
|
|
@@ -61,6 +62,7 @@ export declare class ConfigBuilder {
|
|
|
61
62
|
copyTasks: FileTasks;
|
|
62
63
|
linkTasks: FileTasks<'link'>;
|
|
63
64
|
postBuildCallbacks: ((options: NormalizedOutputOptions, bundle: OutputBundle) => MaybePromise<void>)[];
|
|
65
|
+
serverStopCallbacks: ((config: ResolvedConfig, server: ViteDevServer) => MaybePromise<void>)[];
|
|
64
66
|
resolveIdCallbacks: Exclude<Plugin_2['resolveId'], undefined>[];
|
|
65
67
|
loadCallbacks: Exclude<Plugin_2['load'], undefined>[];
|
|
66
68
|
watches: WatchTask[];
|
package/dist/index.js
CHANGED
|
@@ -2027,6 +2027,7 @@ class ConfigBuilder {
|
|
|
2027
2027
|
copyTasks = [];
|
|
2028
2028
|
linkTasks = [];
|
|
2029
2029
|
postBuildCallbacks = [];
|
|
2030
|
+
serverStopCallbacks = [];
|
|
2030
2031
|
resolveIdCallbacks = [];
|
|
2031
2032
|
loadCallbacks = [];
|
|
2032
2033
|
// fileNameMap: Record<string, string> = {};
|
|
@@ -2849,8 +2850,8 @@ is not a problem with esbuild. You need to fix your environment instead.
|
|
|
2849
2850
|
if (isFirstPacket) {
|
|
2850
2851
|
isFirstPacket = false;
|
|
2851
2852
|
let binaryVersion = String.fromCharCode(...bytes);
|
|
2852
|
-
if (binaryVersion !== "0.25.
|
|
2853
|
-
throw new Error(`Cannot start service: Host version "${"0.25.
|
|
2853
|
+
if (binaryVersion !== "0.25.10") {
|
|
2854
|
+
throw new Error(`Cannot start service: Host version "${"0.25.10"}" does not match binary version ${quote(binaryVersion)}`);
|
|
2854
2855
|
}
|
|
2855
2856
|
return;
|
|
2856
2857
|
}
|
|
@@ -3976,7 +3977,7 @@ for your current platform.`);
|
|
|
3976
3977
|
"node_modules",
|
|
3977
3978
|
".cache",
|
|
3978
3979
|
"esbuild",
|
|
3979
|
-
`pnpapi-${pkg.replace("/", "-")}-${"0.25.
|
|
3980
|
+
`pnpapi-${pkg.replace("/", "-")}-${"0.25.10"}-${path.basename(subpath)}`
|
|
3980
3981
|
);
|
|
3981
3982
|
if (!fs.existsSync(binTargetPath)) {
|
|
3982
3983
|
fs.mkdirSync(path.dirname(binTargetPath), { recursive: true });
|
|
@@ -4011,7 +4012,7 @@ for your current platform.`);
|
|
|
4011
4012
|
}
|
|
4012
4013
|
}
|
|
4013
4014
|
var _a;
|
|
4014
|
-
var isInternalWorkerThread = ((_a = worker_threads == null ? void 0 : worker_threads.workerData) == null ? void 0 : _a.esbuildVersion) === "0.25.
|
|
4015
|
+
var isInternalWorkerThread = ((_a = worker_threads == null ? void 0 : worker_threads.workerData) == null ? void 0 : _a.esbuildVersion) === "0.25.10";
|
|
4015
4016
|
var esbuildCommandAndArgs = () => {
|
|
4016
4017
|
if ((!ESBUILD_BINARY_PATH || false) && (path2.basename(__filename) !== "main.js" || path2.basename(__dirname) !== "lib")) {
|
|
4017
4018
|
throw new Error(
|
|
@@ -4076,7 +4077,7 @@ for your current platform.`);
|
|
|
4076
4077
|
}
|
|
4077
4078
|
}
|
|
4078
4079
|
};
|
|
4079
|
-
var version = "0.25.
|
|
4080
|
+
var version = "0.25.10";
|
|
4080
4081
|
var build = (options) => ensureServiceIsRunning().build(options);
|
|
4081
4082
|
var context = (buildOptions) => ensureServiceIsRunning().context(buildOptions);
|
|
4082
4083
|
var transform = (input, options) => ensureServiceIsRunning().transform(input, options);
|
|
@@ -4179,7 +4180,7 @@ for your current platform.`);
|
|
|
4179
4180
|
var ensureServiceIsRunning = () => {
|
|
4180
4181
|
if (longLivedService) return longLivedService;
|
|
4181
4182
|
let [command, args] = esbuildCommandAndArgs();
|
|
4182
|
-
let child = child_process.spawn(command, args.concat(`--service=${"0.25.
|
|
4183
|
+
let child = child_process.spawn(command, args.concat(`--service=${"0.25.10"}`, "--ping"), {
|
|
4183
4184
|
windowsHide: true,
|
|
4184
4185
|
stdio: ["pipe", "pipe", "inherit"],
|
|
4185
4186
|
cwd: defaultWD
|
|
@@ -4283,7 +4284,7 @@ for your current platform.`);
|
|
|
4283
4284
|
esbuild: node_exports
|
|
4284
4285
|
});
|
|
4285
4286
|
callback(service);
|
|
4286
|
-
let stdout = child_process.execFileSync(command, args.concat(`--service=${"0.25.
|
|
4287
|
+
let stdout = child_process.execFileSync(command, args.concat(`--service=${"0.25.10"}`), {
|
|
4287
4288
|
cwd: defaultWD,
|
|
4288
4289
|
windowsHide: true,
|
|
4289
4290
|
input: stdin,
|
|
@@ -4303,7 +4304,7 @@ for your current platform.`);
|
|
|
4303
4304
|
var startWorkerThreadService = (worker_threads2) => {
|
|
4304
4305
|
let { port1: mainPort, port2: workerPort } = new worker_threads2.MessageChannel();
|
|
4305
4306
|
let worker = new worker_threads2.Worker(__filename, {
|
|
4306
|
-
workerData: { workerPort, defaultWD, esbuildVersion: "0.25.
|
|
4307
|
+
workerData: { workerPort, defaultWD, esbuildVersion: "0.25.10" },
|
|
4307
4308
|
transferList: [workerPort],
|
|
4308
4309
|
// From node's documentation: https://nodejs.org/api/worker_threads.html
|
|
4309
4310
|
//
|
|
@@ -8921,6 +8922,9 @@ function useFusion(fusionOptions = {}, tasks) {
|
|
|
8921
8922
|
writeFileSync(resolve(server.config.root, serverFile), url);
|
|
8922
8923
|
if (!exitHandlersBound) {
|
|
8923
8924
|
process.on("exit", () => {
|
|
8925
|
+
for (const callback of builder.serverStopCallbacks) {
|
|
8926
|
+
callback(resolvedConfig, server);
|
|
8927
|
+
}
|
|
8924
8928
|
if (fs$1.existsSync(serverFile)) {
|
|
8925
8929
|
fs$1.rmSync(serverFile);
|
|
8926
8930
|
}
|