vite-ssg-optimized 0.24.2-optimized.30 → 0.24.2-optimized.32

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 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.3c973855.cjs');
7
+ const node = require('../shared/vite-ssg-optimized.a7858429.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.7b0cf7d1.mjs';
5
+ import { b as build } from '../shared/vite-ssg-optimized.15723e40.mjs';
6
6
  import 'node:module';
7
7
  import 'node:path';
8
8
  import '@unhead/ssr';
package/dist/node.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const node = require('./shared/vite-ssg-optimized.3c973855.cjs');
3
+ const node = require('./shared/vite-ssg-optimized.a7858429.cjs');
4
4
  require('node:module');
5
5
  require('node:path');
6
6
  require('node:process');
package/dist/node.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { b as build } from './shared/vite-ssg-optimized.7b0cf7d1.mjs';
1
+ export { b as build } from './shared/vite-ssg-optimized.15723e40.mjs';
2
2
  import 'node:module';
3
3
  import 'node:path';
4
4
  import 'node:process';
@@ -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.3c973855.cjs');
5
+ const node = require('./vite-ssg-optimized.a7858429.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 { p as plainify, e as executeTaskFn, a as buildClient, c as buildServer } from './vite-ssg-optimized.7b0cf7d1.mjs';
3
+ import { p as plainify, e as executeTaskFn, a as buildClient, c as buildServer } from './vite-ssg-optimized.15723e40.mjs';
4
4
  import { red, gray, blue } from 'kolorist';
5
5
  import { resolveConfig } from 'vite';
6
6
  import 'node:path';
@@ -1023,7 +1023,7 @@ class BuildWorkerProxy {
1023
1023
  const fn = console[level]?.bind(console);
1024
1024
  const workerId = options.workerData.workerId;
1025
1025
  const [first, ...rest] = args;
1026
- const msg = typeof first === "string" ? first.replace(/\n$/g, "") : void 0;
1026
+ const msg = typeof first === "string" ? first.replace(/^(?:\r?\n?)([\s\S]+?)(?:\r?\n?)$/, "$1") : void 0;
1027
1027
  const last = rest[rest.length - 1];
1028
1028
  const endMsg = last === void 0 ? reset("") : "";
1029
1029
  fn?.(`[woker #${workerId}] ${msg}${endMsg}`, msg, ...rest.slice(0, -1));
@@ -1032,7 +1032,7 @@ class BuildWorkerProxy {
1032
1032
  const fn = console[level]?.bind(console);
1033
1033
  const workerId = options.workerData.workerId;
1034
1034
  const [first, ...rest] = args;
1035
- const msg = typeof first === "string" ? first.replace(/\n$/g, "") : void 0;
1035
+ const msg = typeof first === "string" ? first.replace(/^(?:\r?\n?)([\s\S]+?)(?:\r?\n?)$/, "$1") : void 0;
1036
1036
  const last = rest[rest.length - 1];
1037
1037
  const endMsg = last === void 0 ? kolorist.reset("") : "";
1038
1038
  fn?.(`[woker #${workerId}] ${msg}${endMsg}`, msg, ...rest.slice(0, -1));
@@ -1126,7 +1126,7 @@ async function buildServer(config, viteConfig, { ssrEntry, ssgOut, format, mock
1126
1126
  }
1127
1127
  function createProxy(options) {
1128
1128
  const workerExt = options.format === "esm" ? ".mjs" : ".cjs";
1129
- 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.3c973855.cjs', document.baseURI).href))), {
1129
+ 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.a7858429.cjs', document.baseURI).href))), {
1130
1130
  env: process__default.env,
1131
1131
  workerData: options
1132
1132
  });
@@ -1234,7 +1234,7 @@ async function build(ssgOptions = {}, viteConfig = {}) {
1234
1234
  return worker;
1235
1235
  };
1236
1236
  const serverEntry = prefix + node_path.join(ssgOut, node_path.parse(ssrEntry).name + ext).replace(/\\/g, "/");
1237
- 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.3c973855.cjs', document.baseURI).href)));
1237
+ 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.a7858429.cjs', document.baseURI).href)));
1238
1238
  const { createApp, includedRoutes: serverEntryIncludedRoutes } = format === "esm" ? await import(serverEntry) : _require(serverEntry);
1239
1239
  const includedRoutes = serverEntryIncludedRoutes || configIncludedRoutes;
1240
1240
  const { routes } = await createApp(false);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-ssg-optimized",
3
- "version": "0.24.2-optimized.30",
3
+ "version": "0.24.2-optimized.32",
4
4
  "description": "Server-side generation for Vite",
5
5
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
6
6
  "license": "MIT",