vite-ssg-optimized 0.24.2-optimized.16 → 0.24.2-optimized.17
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/node/cli.cjs +1 -1
- package/dist/node/cli.mjs +1 -1
- package/dist/node.cjs +1 -1
- package/dist/node.mjs +1 -1
- package/dist/shared/build.worker.cjs +1 -1
- package/dist/shared/build.worker.mjs +1 -1
- package/dist/shared/{vite-ssg-optimized.d34b1123.mjs → vite-ssg-optimized.b7ba09da.mjs} +1 -1
- package/dist/shared/{vite-ssg-optimized.8b0fd17c.cjs → vite-ssg-optimized.fd4c7acc.cjs} +3 -3
- package/package.json +1 -1
package/dist/node/cli.cjs
CHANGED
|
@@ -4,7 +4,7 @@ const process = require('node:process');
|
|
|
4
4
|
const kolorist = require('kolorist');
|
|
5
5
|
const yargs = require('yargs');
|
|
6
6
|
const helpers = require('yargs/helpers');
|
|
7
|
-
const node = require('../shared/vite-ssg-optimized.
|
|
7
|
+
const node = require('../shared/vite-ssg-optimized.fd4c7acc.cjs');
|
|
8
8
|
require('node:module');
|
|
9
9
|
require('node:path');
|
|
10
10
|
require('@unhead/ssr');
|
package/dist/node/cli.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import process from 'node:process';
|
|
|
2
2
|
import { gray, bold, red, reset, underline } from 'kolorist';
|
|
3
3
|
import yargs from 'yargs';
|
|
4
4
|
import { hideBin } from 'yargs/helpers';
|
|
5
|
-
import { b as build } from '../shared/vite-ssg-optimized.
|
|
5
|
+
import { b as build } from '../shared/vite-ssg-optimized.b7ba09da.mjs';
|
|
6
6
|
import 'node:module';
|
|
7
7
|
import 'node:path';
|
|
8
8
|
import '@unhead/ssr';
|
package/dist/node.cjs
CHANGED
package/dist/node.mjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const node_module = require('node:module');
|
|
4
4
|
const node_worker_threads = require('node:worker_threads');
|
|
5
|
-
const node = require('./vite-ssg-optimized.
|
|
5
|
+
const node = require('./vite-ssg-optimized.fd4c7acc.cjs');
|
|
6
6
|
const kolorist = require('kolorist');
|
|
7
7
|
const vite = require('vite');
|
|
8
8
|
require('node:path');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createRequire } from 'node:module';
|
|
2
2
|
import { parentPort, workerData } from 'node:worker_threads';
|
|
3
|
-
import { g as getBeastiesOrCritters, e as executeTaskFn } from './vite-ssg-optimized.
|
|
3
|
+
import { g as getBeastiesOrCritters, e as executeTaskFn } from './vite-ssg-optimized.b7ba09da.mjs';
|
|
4
4
|
import { gray, blue, red, yellow } from 'kolorist';
|
|
5
5
|
import { resolveConfig } from 'vite';
|
|
6
6
|
import 'node:path';
|
|
@@ -1247,7 +1247,7 @@ async function build(ssgOptions = {}, viteConfig = {}) {
|
|
|
1247
1247
|
let workersInUse = /* @__PURE__ */ new Map();
|
|
1248
1248
|
const selectWorker = async () => {
|
|
1249
1249
|
const workerTasksRunning = (w) => workersInUse.get(w)?.length || 0;
|
|
1250
|
-
const worker = workers.
|
|
1250
|
+
const worker = workers.filter((w) => workerTasksRunning(w) < maxTasksPerWorker).sort((a, b) => workerTasksRunning(a) - workerTasksRunning(b))[0];
|
|
1251
1251
|
if (!worker) {
|
|
1252
1252
|
await Promise.race(Array.from(workersInUse.values()).flat());
|
|
1253
1253
|
return selectWorker();
|
|
@@ -1193,7 +1193,7 @@ async function build(ssgOptions = {}, viteConfig = {}) {
|
|
|
1193
1193
|
const prefix = format === "esm" && process__default.platform === "win32" ? "file://" : "";
|
|
1194
1194
|
const ext = format === "esm" ? ".mjs" : ".cjs";
|
|
1195
1195
|
const serverEntry = prefix + node_path.join(ssgOut, node_path.parse(ssrEntry).name + ext).replace(/\\/g, "/");
|
|
1196
|
-
const _require = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('shared/vite-ssg-optimized.
|
|
1196
|
+
const _require = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('shared/vite-ssg-optimized.fd4c7acc.cjs', document.baseURI).href)));
|
|
1197
1197
|
const { createApp, includedRoutes: serverEntryIncludedRoutes } = format === "esm" ? await import(serverEntry) : _require(serverEntry);
|
|
1198
1198
|
const includedRoutes = serverEntryIncludedRoutes || configIncludedRoutes;
|
|
1199
1199
|
const { routes } = await createApp(false);
|
|
@@ -1220,7 +1220,7 @@ async function build(ssgOptions = {}, viteConfig = {}) {
|
|
|
1220
1220
|
const queue = new PQueue({ concurrency });
|
|
1221
1221
|
const workerExt = format === "esm" ? ".mjs" : ".cjs";
|
|
1222
1222
|
const createProxy = (index) => {
|
|
1223
|
-
const workerProxy = new BuildWorkerProxy(new URL(`./build.worker${workerExt}`, (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('shared/vite-ssg-optimized.
|
|
1223
|
+
const workerProxy = new BuildWorkerProxy(new URL(`./build.worker${workerExt}`, (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('shared/vite-ssg-optimized.fd4c7acc.cjs', document.baseURI).href))), {
|
|
1224
1224
|
env: process__default.env,
|
|
1225
1225
|
workerData: {
|
|
1226
1226
|
workerId: index,
|
|
@@ -1256,7 +1256,7 @@ async function build(ssgOptions = {}, viteConfig = {}) {
|
|
|
1256
1256
|
let workersInUse = /* @__PURE__ */ new Map();
|
|
1257
1257
|
const selectWorker = async () => {
|
|
1258
1258
|
const workerTasksRunning = (w) => workersInUse.get(w)?.length || 0;
|
|
1259
|
-
const worker = workers.
|
|
1259
|
+
const worker = workers.filter((w) => workerTasksRunning(w) < maxTasksPerWorker).sort((a, b) => workerTasksRunning(a) - workerTasksRunning(b))[0];
|
|
1260
1260
|
if (!worker) {
|
|
1261
1261
|
await Promise.race(Array.from(workersInUse.values()).flat());
|
|
1262
1262
|
return selectWorker();
|