defuss-ssg 0.7.1 → 0.7.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/dist/cli.mjs +3 -3
- package/dist/content.d.cts +1 -1
- package/dist/content.d.mts +1 -1
- package/dist/content.mjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +3 -3
- package/dist/{path-CjHWUK8o.mjs → path-j0LJZE_u.mjs} +1 -1
- package/dist/{serve-D9WmL8BG.mjs → serve-qxXVqJiL.mjs} +1 -1
- package/dist/{types-CZSWRdQS.d.cts → types-Dh8AcW7C.d.cts} +1 -1
- package/dist/{types-CZSWRdQS.d.mts → types-Dh8AcW7C.d.mts} +1 -1
- package/dist/{vite-D43jxO3P.cjs → vite-CE8Q5aF_.cjs} +6 -6
- package/dist/{vite-CHuwyX4z.mjs → vite-bKsy4atm.mjs} +5 -5
- package/dist/vite.cjs +1 -1
- package/dist/vite.d.cts +1 -1
- package/dist/vite.d.mts +1 -1
- package/dist/vite.mjs +2 -2
- package/package.json +4 -4
package/dist/cli.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
2
|
+
import { B as readConfig, L as validateProjectDir, b as build } from './vite-bKsy4atm.mjs';
|
|
3
3
|
import { spawnSync, spawn } from 'node:child_process';
|
|
4
4
|
import { createHash } from 'node:crypto';
|
|
5
5
|
import { mkdtempSync, writeFileSync, rmSync, existsSync, readFileSync } from 'node:fs';
|
|
6
6
|
import { tmpdir } from 'node:os';
|
|
7
7
|
import { resolve, join, basename, dirname } from 'node:path';
|
|
8
8
|
import { fileURLToPath } from 'node:url';
|
|
9
|
-
import { d as dev, s as serve } from './serve-
|
|
9
|
+
import { d as dev, s as serve } from './serve-qxXVqJiL.mjs';
|
|
10
10
|
import 'fast-glob';
|
|
11
11
|
import 'node:fs/promises';
|
|
12
12
|
import 'defuss/server';
|
|
@@ -23,7 +23,7 @@ import 'remark-gfm';
|
|
|
23
23
|
import 'remark-parse';
|
|
24
24
|
import 'remark-rehype';
|
|
25
25
|
import 'remark-mdx-frontmatter';
|
|
26
|
-
import './path-
|
|
26
|
+
import './path-j0LJZE_u.mjs';
|
|
27
27
|
import 'node:process';
|
|
28
28
|
import 'defuss-express';
|
|
29
29
|
|
package/dist/content.d.cts
CHANGED
package/dist/content.d.mts
CHANGED
package/dist/content.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { resolve, relative, extname } from 'node:path';
|
|
|
3
3
|
import glob$1 from 'fast-glob';
|
|
4
4
|
import toml from 'toml';
|
|
5
5
|
import { parse } from 'yaml';
|
|
6
|
-
import { f as filePathToRoute } from './path-
|
|
6
|
+
import { f as filePathToRoute } from './path-j0LJZE_u.mjs';
|
|
7
7
|
import 'node:fs';
|
|
8
8
|
|
|
9
9
|
const PAGE_ROUTE_EXTENSIONS = /* @__PURE__ */ new Set([".html", ".md", ".mdx"]);
|
package/dist/index.cjs
CHANGED
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { n as SsgConfig, a as BuildOptions, p as Status, e as DevOptions, S as ServeOptions, E as EndpointRouteContext, g as EndpointRouteRegistrar } from './types-Dh8AcW7C.cjs';
|
|
2
|
+
export { B as BuildMode, C as ContainerRuntime, b as ContentEntry, c as ContentGlobOptions, D as DefussSsgViteOptions, d as DevChangeKind, f as EndpointRouteMethod, h as EndpointRouteResponder, P as PluginFn, i as PluginFnPageDom, j as PluginFnPageHtml, k as PluginFnPageVdom, l as PluginFnPrePost, R as RehypePlugins, m as RemarkPlugins, o as SsgPlugin, q as StatusCode } from './types-Dh8AcW7C.cjs';
|
|
3
3
|
import { Plugin } from 'rolldown';
|
|
4
4
|
import { InlineConfig } from 'vite';
|
|
5
5
|
export { glob } from './content.cjs';
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { n as SsgConfig, a as BuildOptions, p as Status, e as DevOptions, S as ServeOptions, E as EndpointRouteContext, g as EndpointRouteRegistrar } from './types-Dh8AcW7C.mjs';
|
|
2
|
+
export { B as BuildMode, C as ContainerRuntime, b as ContentEntry, c as ContentGlobOptions, D as DefussSsgViteOptions, d as DevChangeKind, f as EndpointRouteMethod, h as EndpointRouteResponder, P as PluginFn, i as PluginFnPageDom, j as PluginFnPageHtml, k as PluginFnPageVdom, l as PluginFnPrePost, R as RehypePlugins, m as RemarkPlugins, o as SsgPlugin, q as StatusCode } from './types-Dh8AcW7C.mjs';
|
|
3
3
|
import { Plugin } from 'rolldown';
|
|
4
4
|
import { InlineConfig } from 'vite';
|
|
5
5
|
export { glob } from './content.mjs';
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { H as HTTP_METHODS, S as SSG_CONFIG_MODULE_ID, a as applyConfigDefaults, b as build, c as buildEndpoints, d as clearVirtualConfigModuleState, e as cloneConfigValue, f as compileConfigModule, g as compileEndpoints, h as compileRpcModule, i as configDefaults, j as createConfigModulePlugin, k as createConfigModuleStateKey, l as createTaggedBaseViteConfig,
|
|
1
|
+
export { H as HTTP_METHODS, S as SSG_CONFIG_MODULE_ID, a as applyConfigDefaults, b as build, c as buildEndpoints, d as clearVirtualConfigModuleState, e as cloneConfigValue, f as compileConfigModule, g as compileEndpoints, h as compileRpcModule, i as configDefaults, j as createConfigModulePlugin, k as createConfigModuleStateKey, l as createTaggedBaseViteConfig, n as defussSsg, o as discoverEndpointSourceFiles, p as discoverRpcFile, q as endpointFileToRoute, r as handleEndpointRoute, s as handleRpcRequest, t as initializeRpc, u as isBareModuleId, v as isPlainObject, w as isTaggedBaseViteConfig, x as loadCompiledConfigModule, y as loadEndpointModule, z as matchRoutePattern, A as mergeUserViteConfig, B as readConfig, D as registerEndpoints, E as resolveConfigPath, F as resolveEndpoints, G as routeToExpressPattern, J as setVirtualConfigModuleState, K as stripBaseViteConfigMarker } from './vite-bKsy4atm.mjs';
|
|
2
2
|
export { glob } from './content.mjs';
|
|
3
|
-
export { d as dev, s as serve } from './serve-
|
|
3
|
+
export { d as dev, s as serve } from './serve-qxXVqJiL.mjs';
|
|
4
4
|
import 'fast-glob';
|
|
5
5
|
import 'node:fs';
|
|
6
6
|
import 'node:fs/promises';
|
|
@@ -22,7 +22,7 @@ import 'remark-gfm';
|
|
|
22
22
|
import 'remark-parse';
|
|
23
23
|
import 'remark-rehype';
|
|
24
24
|
import 'remark-mdx-frontmatter';
|
|
25
|
-
import './path-
|
|
25
|
+
import './path-j0LJZE_u.mjs';
|
|
26
26
|
import 'toml';
|
|
27
27
|
import 'yaml';
|
|
28
28
|
import 'node:process';
|
|
@@ -168,4 +168,4 @@ const filePathToRoute = (filePath, config, cwd) => {
|
|
|
168
168
|
return routePath;
|
|
169
169
|
};
|
|
170
170
|
|
|
171
|
-
export { resolvePreferredPageSourceForOutputPath as a,
|
|
171
|
+
export { resolvePreferredPageSourceForOutputPath as a, resolveSsgPaths as b, filePathToRoute as f, getPageSourceRootDir as g, pageSourceFileToOutputPath as p, resolvePageSourceFileForPath as r, selectPreferredPageSourceFiles as s };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import mdx from '@mdx-js/rollup';
|
|
2
2
|
import { createServer } from 'vite';
|
|
3
3
|
import defuss from 'defuss-vite';
|
|
4
|
-
import {
|
|
4
|
+
import { L as validateProjectDir, B as readConfig, n as defussSsg, A as mergeUserViteConfig, D as registerEndpoints, t as initializeRpc, C as readIncomingBody, m as createWebRequest, s as handleRpcRequest, I as sendWebResponse } from './vite-bKsy4atm.mjs';
|
|
5
5
|
import { existsSync } from 'node:fs';
|
|
6
6
|
import { join } from 'node:path';
|
|
7
7
|
import process from 'node:process';
|
|
@@ -7961,4 +7961,4 @@ interface SsgConfig {
|
|
|
7961
7961
|
viteConfig?: InlineConfig;
|
|
7962
7962
|
}
|
|
7963
7963
|
|
|
7964
|
-
export type {
|
|
7964
|
+
export type { BuildMode as B, ContainerRuntime as C, DefussSsgViteOptions as D, EndpointRouteContext as E, PluginFn as P, RehypePlugins as R, ServeOptions as S, BuildOptions as a, ContentEntry as b, ContentGlobOptions as c, DevChangeKind as d, DevOptions as e, EndpointRouteMethod as f, EndpointRouteRegistrar as g, EndpointRouteResponder as h, PluginFnPageDom as i, PluginFnPageHtml as j, PluginFnPageVdom as k, PluginFnPrePost as l, RemarkPlugins as m, SsgConfig as n, SsgPlugin as o, Status as p, StatusCode as q };
|
|
@@ -7961,4 +7961,4 @@ interface SsgConfig {
|
|
|
7961
7961
|
viteConfig?: InlineConfig;
|
|
7962
7962
|
}
|
|
7963
7963
|
|
|
7964
|
-
export type {
|
|
7964
|
+
export type { BuildMode as B, ContainerRuntime as C, DefussSsgViteOptions as D, EndpointRouteContext as E, PluginFn as P, RehypePlugins as R, ServeOptions as S, BuildOptions as a, ContentEntry as b, ContentGlobOptions as c, DevChangeKind as d, DevOptions as e, EndpointRouteMethod as f, EndpointRouteRegistrar as g, EndpointRouteResponder as h, PluginFnPageDom as i, PluginFnPageHtml as j, PluginFnPageVdom as k, PluginFnPrePost as l, RemarkPlugins as m, SsgConfig as n, SsgPlugin as o, Status as p, StatusCode as q };
|
|
@@ -239,7 +239,7 @@ const configDefaults = {
|
|
|
239
239
|
|
|
240
240
|
const CONTENT_MODULE_ID = "virtual:defuss-ssg/content";
|
|
241
241
|
const CONTENT_RESOLVED_ID = "\0virtual:defuss-ssg/content";
|
|
242
|
-
const __filename$2 = node_url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('vite-
|
|
242
|
+
const __filename$2 = node_url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('vite-CE8Q5aF_.cjs', document.baseURI).href)));
|
|
243
243
|
const __dirname$2 = node_path.dirname(__filename$2);
|
|
244
244
|
const resolveContentHelperFile = () => {
|
|
245
245
|
const candidates = [
|
|
@@ -733,7 +733,7 @@ const registerEndpoints = async (registrar, projectDir, _config, debug = false)
|
|
|
733
733
|
}
|
|
734
734
|
};
|
|
735
735
|
|
|
736
|
-
const __filename$1 = node_url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('vite-
|
|
736
|
+
const __filename$1 = node_url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('vite-CE8Q5aF_.cjs', document.baseURI).href)));
|
|
737
737
|
const __dirname$1 = node_path.dirname(__filename$1);
|
|
738
738
|
const isHtmlLikePageSource = (filePath) => {
|
|
739
739
|
const extension = node_path.extname(filePath).toLowerCase();
|
|
@@ -760,7 +760,7 @@ const resolveLocalHelperFile = (sourceRelativePath, builtRelativePath) => {
|
|
|
760
760
|
return node_path.resolve(__dirname$1, builtRelativePath);
|
|
761
761
|
};
|
|
762
762
|
const loadProjectTailwindVitePlugins = async (projectDir, debug) => {
|
|
763
|
-
const requireFromBuild = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('vite-
|
|
763
|
+
const requireFromBuild = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('vite-CE8Q5aF_.cjs', document.baseURI).href)));
|
|
764
764
|
try {
|
|
765
765
|
const resolvedPluginPath = requireFromBuild.resolve("@tailwindcss/vite", {
|
|
766
766
|
paths: [projectDir]
|
|
@@ -1118,10 +1118,10 @@ const build = async ({
|
|
|
1118
1118
|
}
|
|
1119
1119
|
timeDebug(`[build] page:${pageLabel} ssrLoadModule`);
|
|
1120
1120
|
const modulePath = `/${node_path.relative(config.tmp, inputFile).split(node_path.sep).join("/")}`;
|
|
1121
|
-
const exports
|
|
1121
|
+
const exports = await pageModuleServer.ssrLoadModule(modulePath);
|
|
1122
1122
|
timeEndDebug(`[build] page:${pageLabel} ssrLoadModule`);
|
|
1123
1123
|
timeDebug(`[build] page:${pageLabel} vdom`);
|
|
1124
|
-
let vdom = exports
|
|
1124
|
+
let vdom = exports.default(exports);
|
|
1125
1125
|
timeEndDebug(`[build] page:${pageLabel} vdom`);
|
|
1126
1126
|
vdom = applyAutoHydrate(
|
|
1127
1127
|
vdom,
|
|
@@ -1140,7 +1140,7 @@ const build = async ({
|
|
|
1140
1140
|
relativeOutputHtmlFilePath,
|
|
1141
1141
|
projectDir,
|
|
1142
1142
|
config,
|
|
1143
|
-
exports
|
|
1143
|
+
exports
|
|
1144
1144
|
);
|
|
1145
1145
|
timeEndDebug(`[build] page:${pageLabel} plugin:${plugin.name}`);
|
|
1146
1146
|
}
|
|
@@ -19,7 +19,7 @@ import remarkGfm from 'remark-gfm';
|
|
|
19
19
|
import remarkParse from 'remark-parse';
|
|
20
20
|
import remarkRehype from 'remark-rehype';
|
|
21
21
|
import remarkMdxFrontmatter from 'remark-mdx-frontmatter';
|
|
22
|
-
import {
|
|
22
|
+
import { b as resolveSsgPaths, g as getPageSourceRootDir, p as pageSourceFileToOutputPath, a as resolvePreferredPageSourceForOutputPath, s as selectPreferredPageSourceFiles, f as filePathToRoute, r as resolvePageSourceFileForPath } from './path-j0LJZE_u.mjs';
|
|
23
23
|
|
|
24
24
|
const defaultRemarkPlugins = [
|
|
25
25
|
remarkParse,
|
|
@@ -1115,10 +1115,10 @@ const build = async ({
|
|
|
1115
1115
|
}
|
|
1116
1116
|
timeDebug(`[build] page:${pageLabel} ssrLoadModule`);
|
|
1117
1117
|
const modulePath = `/${relative(config.tmp, inputFile).split(sep).join("/")}`;
|
|
1118
|
-
const exports
|
|
1118
|
+
const exports = await pageModuleServer.ssrLoadModule(modulePath);
|
|
1119
1119
|
timeEndDebug(`[build] page:${pageLabel} ssrLoadModule`);
|
|
1120
1120
|
timeDebug(`[build] page:${pageLabel} vdom`);
|
|
1121
|
-
let vdom = exports
|
|
1121
|
+
let vdom = exports.default(exports);
|
|
1122
1122
|
timeEndDebug(`[build] page:${pageLabel} vdom`);
|
|
1123
1123
|
vdom = applyAutoHydrate(
|
|
1124
1124
|
vdom,
|
|
@@ -1137,7 +1137,7 @@ const build = async ({
|
|
|
1137
1137
|
relativeOutputHtmlFilePath,
|
|
1138
1138
|
projectDir,
|
|
1139
1139
|
config,
|
|
1140
|
-
exports
|
|
1140
|
+
exports
|
|
1141
1141
|
);
|
|
1142
1142
|
timeEndDebug(`[build] page:${pageLabel} plugin:${plugin.name}`);
|
|
1143
1143
|
}
|
|
@@ -3009,4 +3009,4 @@ function defussSsg(options = {}) {
|
|
|
3009
3009
|
];
|
|
3010
3010
|
}
|
|
3011
3011
|
|
|
3012
|
-
export {
|
|
3012
|
+
export { mergeUserViteConfig as A, readConfig as B, readIncomingBody as C, registerEndpoints as D, resolveConfigPath as E, resolveEndpoints as F, routeToExpressPattern as G, HTTP_METHODS as H, sendWebResponse as I, setVirtualConfigModuleState as J, stripBaseViteConfigMarker as K, validateProjectDir as L, SSG_CONFIG_MODULE_ID as S, applyConfigDefaults as a, build as b, buildEndpoints as c, clearVirtualConfigModuleState as d, cloneConfigValue as e, compileConfigModule as f, compileEndpoints as g, compileRpcModule as h, configDefaults as i, createConfigModulePlugin as j, createConfigModuleStateKey as k, createTaggedBaseViteConfig as l, createWebRequest as m, defussSsg as n, discoverEndpointSourceFiles as o, discoverRpcFile as p, endpointFileToRoute as q, handleEndpointRoute as r, handleRpcRequest as s, initializeRpc as t, isBareModuleId as u, isPlainObject as v, isTaggedBaseViteConfig as w, loadCompiledConfigModule as x, loadEndpointModule as y, matchRoutePattern as z };
|
package/dist/vite.cjs
CHANGED
|
@@ -5,7 +5,7 @@ require('node:fs');
|
|
|
5
5
|
require('node:fs/promises');
|
|
6
6
|
require('node:path');
|
|
7
7
|
require('defuss/server');
|
|
8
|
-
var vite = require('./vite-
|
|
8
|
+
var vite = require('./vite-CE8Q5aF_.cjs');
|
|
9
9
|
require('./path-Br3DXScZ.cjs');
|
|
10
10
|
require('node:crypto');
|
|
11
11
|
require('@mdx-js/rollup');
|
package/dist/vite.d.cts
CHANGED
package/dist/vite.d.mts
CHANGED
package/dist/vite.mjs
CHANGED
|
@@ -3,8 +3,8 @@ import 'node:fs';
|
|
|
3
3
|
import 'node:fs/promises';
|
|
4
4
|
import 'node:path';
|
|
5
5
|
import 'defuss/server';
|
|
6
|
-
export {
|
|
7
|
-
import './path-
|
|
6
|
+
export { n as defussSsg } from './vite-bKsy4atm.mjs';
|
|
7
|
+
import './path-j0LJZE_u.mjs';
|
|
8
8
|
import 'node:crypto';
|
|
9
9
|
import '@mdx-js/rollup';
|
|
10
10
|
import 'vite';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "defuss-ssg",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -35,10 +35,10 @@
|
|
|
35
35
|
"cli-serve:mc": "node ./dist/cli.mjs serve ../../example-ssg/ --multicore",
|
|
36
36
|
"test:cli-dev:three": "bun run build && vitest run scripts/cli-dev-three.spec.ts",
|
|
37
37
|
"bench:rpc": "npx autocannon -p 256 -w 8 -c 1024 -d 30 -m POST -H 'content-type: application/json' -b '{\"className\":\"mathApi\",\"methodName\":\"add\",\"args\":[1,2]}' http://127.0.0.1:3000/rpc",
|
|
38
|
-
"test": "
|
|
38
|
+
"test": "bun run test:cli-dev:three",
|
|
39
39
|
"bench": "npx autocannon -p 32 -w 8 -c 200 -d 20 -m POST -H \"content-type: application/json\" -b '{\"hello\":\"world\"}' http://127.0.0.1:3000/body",
|
|
40
40
|
"start": "node ./dist/cli.mjs dev ../../example-ssg/",
|
|
41
|
-
"prepublishOnly": "bun run
|
|
41
|
+
"prepublishOnly": "bun run test"
|
|
42
42
|
},
|
|
43
43
|
"author": "Aron Homberg <info@aron-homberg.de>",
|
|
44
44
|
"sideEffects": false,
|
|
@@ -136,4 +136,4 @@
|
|
|
136
136
|
"typescript": "^5.9.3",
|
|
137
137
|
"vitest": "^4.0.17"
|
|
138
138
|
}
|
|
139
|
-
}
|
|
139
|
+
}
|