@absolutejs/absolute 0.8.12 → 0.8.14
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/index.js +36 -20
- package/dist/index.js.map +16 -16
- package/dist/src/build/generateManifest.d.ts +2 -2
- package/dist/src/core/build.d.ts +1 -1
- package/dist/src/core/index.d.ts +2 -2
- package/dist/src/core/pageHandlers.d.ts +2 -2
- package/dist/src/index.d.ts +4 -4
- package/dist/src/plugins/index.d.ts +2 -2
- package/dist/src/plugins/networkingPlugin.d.ts +1 -1
- package/dist/src/svelte/renderToPipeableStream.d.ts +2 -2
- package/dist/src/svelte/renderToReadableStream.d.ts +1 -1
- package/dist/src/svelte/renderToString.d.ts +1 -1
- package/dist/src/utils/index.d.ts +2 -2
- package/eslint.config.mjs +121 -117
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -17,25 +17,27 @@ import { cwd, exit } from "process";
|
|
|
17
17
|
var {$, build: bunBuild } = globalThis.Bun;
|
|
18
18
|
|
|
19
19
|
// src/build/generateManifest.ts
|
|
20
|
-
var generateManifest = (outputs, buildDirectoryAbsolute) => {
|
|
21
|
-
const
|
|
20
|
+
var generateManifest = (outputs, buildDirectoryAbsolute, svelteDirName) => {
|
|
21
|
+
const prefix = svelteDirName ? `(?:${svelteDirName}/)?` : "";
|
|
22
|
+
const pagesRegex = new RegExp(`^${prefix}pages/`);
|
|
23
|
+
const indexesRegex = new RegExp(`^${prefix}indexes/`);
|
|
24
|
+
return outputs.reduce((manifest, artifact) => {
|
|
22
25
|
let relativePath = artifact.path.startsWith(buildDirectoryAbsolute) ? artifact.path.slice(buildDirectoryAbsolute.length) : artifact.path;
|
|
23
26
|
relativePath = relativePath.replace(/^\/+/, "");
|
|
24
27
|
const segments = relativePath.split("/");
|
|
25
|
-
const fileWithHash = segments
|
|
28
|
+
const fileWithHash = segments.pop();
|
|
26
29
|
if (!fileWithHash)
|
|
27
|
-
return
|
|
30
|
+
return manifest;
|
|
28
31
|
const [baseName] = fileWithHash.split(`.${artifact.hash}.`);
|
|
29
|
-
if (
|
|
30
|
-
|
|
31
|
-
} else if (
|
|
32
|
-
|
|
32
|
+
if (indexesRegex.test(relativePath)) {
|
|
33
|
+
manifest[`${baseName}Index`] = `/${relativePath}`;
|
|
34
|
+
} else if (pagesRegex.test(relativePath)) {
|
|
35
|
+
manifest[baseName] = artifact.path;
|
|
33
36
|
} else {
|
|
34
|
-
|
|
37
|
+
manifest[baseName] = `/${relativePath}`;
|
|
35
38
|
}
|
|
36
|
-
return
|
|
39
|
+
return manifest;
|
|
37
40
|
}, {});
|
|
38
|
-
return manifest;
|
|
39
41
|
};
|
|
40
42
|
|
|
41
43
|
// src/build/generateReactIndexes.ts
|
|
@@ -199,6 +201,17 @@ var build = async ({
|
|
|
199
201
|
const htmlPagesPath = htmlDirectoryPath && join3(htmlDirectoryPath, "pages");
|
|
200
202
|
const htmlScriptsPath = htmlDirectoryPath && join3(htmlDirectoryPath, "scripts");
|
|
201
203
|
const sveltePagesPath = svelteDirectoryPath && join3(svelteDirectoryPath, "pages");
|
|
204
|
+
const isSingleFrontend = [
|
|
205
|
+
reactDirectoryPath,
|
|
206
|
+
htmlDirectoryPath,
|
|
207
|
+
htmxPath,
|
|
208
|
+
svelteDirectoryPath
|
|
209
|
+
].filter(Boolean).length === 1;
|
|
210
|
+
const isSvelteOnly = isSingleFrontend && svelteDirectoryPath !== undefined;
|
|
211
|
+
const serverOutDir = isSvelteOnly ? join3(buildPath, "pages") : buildPath;
|
|
212
|
+
const serverRoot = isSvelteOnly ? join3(svelteDirectoryPath, "pages") : undefined;
|
|
213
|
+
const svelteOutDir = isSingleFrontend ? buildPath : join3(buildPath, basename3(svelteDirectoryPath ?? ""));
|
|
214
|
+
const svelteDirName = svelteDirectoryPath && basename3(svelteDirectoryPath);
|
|
202
215
|
await rm2(buildPath, { force: true, recursive: true });
|
|
203
216
|
await mkdir3(buildPath);
|
|
204
217
|
if (reactIndexesPath && reactPagesPath) {
|
|
@@ -224,7 +237,11 @@ var build = async ({
|
|
|
224
237
|
const svelteEntryPoints = sveltePagesPath ? await scanEntryPoints(sveltePagesPath, "*.svelte") : [];
|
|
225
238
|
const htmlEntryPoints = htmlScriptsPath ? await scanEntryPoints(htmlScriptsPath, "*.{js,ts}") : [];
|
|
226
239
|
const { svelteServerPaths, svelteClientPaths } = svelteDirectoryPath ? await compileSvelte(svelteEntryPoints, svelteDirectoryPath) : { svelteClientPaths: [], svelteServerPaths: [] };
|
|
227
|
-
const serverEntryPoints =
|
|
240
|
+
const serverEntryPoints = [
|
|
241
|
+
...reactEntryPoints,
|
|
242
|
+
...htmlEntryPoints,
|
|
243
|
+
...svelteServerPaths
|
|
244
|
+
];
|
|
228
245
|
if (serverEntryPoints.length === 0) {
|
|
229
246
|
console.warn("No server entry points found, skipping manifest generation");
|
|
230
247
|
return null;
|
|
@@ -233,7 +250,8 @@ var build = async ({
|
|
|
233
250
|
entrypoints: serverEntryPoints,
|
|
234
251
|
format: "esm",
|
|
235
252
|
naming: `[dir]/[name].[hash].[ext]`,
|
|
236
|
-
outdir:
|
|
253
|
+
outdir: serverOutDir,
|
|
254
|
+
root: serverRoot,
|
|
237
255
|
target: "bun"
|
|
238
256
|
}).catch((error) => {
|
|
239
257
|
console.error("Server build failed:", error);
|
|
@@ -246,7 +264,7 @@ var build = async ({
|
|
|
246
264
|
entrypoints: svelteClientPaths,
|
|
247
265
|
format: "esm",
|
|
248
266
|
naming: `[dir]/[name].[hash].[ext]`,
|
|
249
|
-
outdir:
|
|
267
|
+
outdir: svelteOutDir,
|
|
250
268
|
root: svelteDirectoryPath,
|
|
251
269
|
target: "browser"
|
|
252
270
|
}).catch((error) => {
|
|
@@ -256,7 +274,7 @@ var build = async ({
|
|
|
256
274
|
clientLogs = logs;
|
|
257
275
|
clientOutputs = outputs;
|
|
258
276
|
}
|
|
259
|
-
serverLogs
|
|
277
|
+
[...serverLogs, ...clientLogs].forEach((log) => {
|
|
260
278
|
if (log.level === "error")
|
|
261
279
|
console.error(log);
|
|
262
280
|
else if (log.level === "warning")
|
|
@@ -264,8 +282,7 @@ var build = async ({
|
|
|
264
282
|
else
|
|
265
283
|
console.info(log);
|
|
266
284
|
});
|
|
267
|
-
const
|
|
268
|
-
const manifest = generateManifest(allOutputs, buildPath);
|
|
285
|
+
const manifest = generateManifest([...serverOutputs, ...clientOutputs], buildPath, svelteDirName);
|
|
269
286
|
if (htmlDirectoryPath && htmlPagesPath) {
|
|
270
287
|
const outputHtmlPages = join3(buildPath, basename3(htmlDirectoryPath), "pages");
|
|
271
288
|
await mkdir3(outputHtmlPages, { recursive: true });
|
|
@@ -289,8 +306,7 @@ var build = async ({
|
|
|
289
306
|
if (!options?.preserveIntermediateFiles && reactIndexesPath) {
|
|
290
307
|
await rm2(reactIndexesPath, { force: true, recursive: true });
|
|
291
308
|
}
|
|
292
|
-
|
|
293
|
-
console.log(`Build completed in ${getDurationString(buildDuration)}`);
|
|
309
|
+
console.log(`Build completed in ${getDurationString(performance.now() - buildStart)}`);
|
|
294
310
|
return manifest;
|
|
295
311
|
};
|
|
296
312
|
// src/core/pageHandlers.ts
|
|
@@ -445,5 +461,5 @@ export {
|
|
|
445
461
|
DEFAULT_CHUNK_SIZE
|
|
446
462
|
};
|
|
447
463
|
|
|
448
|
-
//# debugId=
|
|
464
|
+
//# debugId=F0D0DE61A724A5EB64756E2164756E21
|
|
449
465
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -3,22 +3,22 @@
|
|
|
3
3
|
"sources": ["../src/constants.ts", "../src/core/build.ts", "../src/build/generateManifest.ts", "../src/build/generateReactIndexes.ts", "../src/build/scanEntryPoints.ts", "../src/build/updateScriptTags.ts", "../src/svelte/compileSvelte.ts", "../src/utils/getDurationString.ts", "../src/utils/validateSafePath.ts", "../src/core/pageHandlers.ts", "../src/svelte/renderToReadableStream.ts", "../src/utils/escapeScriptContent.ts", "../src/plugins/networkingPlugin.ts", "../src/utils/networking.ts", "../src/plugins/pageRouterPlugin.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
5
|
"export const SECONDS_IN_A_MINUTE = 60;\nexport const MILLISECONDS_IN_A_SECOND = 1000;\nexport const MILLISECONDS_IN_A_MINUTE =\n\tMILLISECONDS_IN_A_SECOND * SECONDS_IN_A_MINUTE;\nexport const MINUTES_IN_AN_HOUR = 60;\nexport const HOURS_IN_DAY = 24;\nexport const MILLISECONDS_IN_A_DAY =\n\tMILLISECONDS_IN_A_SECOND *\n\tSECONDS_IN_A_MINUTE *\n\tMINUTES_IN_AN_HOUR *\n\tHOURS_IN_DAY;\nexport const TIME_PRECISION = 2;\nexport const TWO_THIRDS = 2 / 3;\nexport const DEFAULT_PORT = 3000;\nexport const DEFAULT_CHUNK_SIZE = 16_384;\n",
|
|
6
|
-
"import { rm, mkdir, cp } from
|
|
7
|
-
"import { BuildArtifact } from
|
|
8
|
-
"import { mkdir, rm, writeFile } from
|
|
9
|
-
"import { Glob } from
|
|
10
|
-
"import { readFile, writeFile } from
|
|
11
|
-
"import { mkdir } from
|
|
12
|
-
"import {\n\tMILLISECONDS_IN_A_SECOND,\n\tTIME_PRECISION,\n\tMILLISECONDS_IN_A_MINUTE\n} from
|
|
13
|
-
"import { resolve, relative, sep } from
|
|
14
|
-
"import { file } from
|
|
15
|
-
"import type { Component } from
|
|
16
|
-
"const ESCAPE_LOOKUP: Record<string, string> = {\n\t
|
|
17
|
-
"import { argv } from
|
|
18
|
-
"import os from
|
|
19
|
-
"export const pageRouterPlugin = () => {\n\tconsole.log(
|
|
6
|
+
"import { rm, mkdir, cp } from 'node:fs/promises';\nimport { basename, join } from 'node:path';\nimport { cwd, exit } from 'node:process';\nimport { $, BuildArtifact, build as bunBuild } from 'bun';\nimport { generateManifest } from '../build/generateManifest';\nimport { generateReactIndexFiles } from '../build/generateReactIndexes';\nimport { scanEntryPoints } from '../build/scanEntryPoints';\nimport { updateScriptTags } from '../build/updateScriptTags';\nimport { compileSvelte } from '../svelte/compileSvelte';\nimport { BuildConfig } from '../types';\nimport { getDurationString } from '../utils/getDurationString';\nimport { validateSafePath } from '../utils/validateSafePath';\n\nexport const build = async ({\n\tbuildDirectory = 'build',\n\tassetsDirectory,\n\treactDirectory,\n\thtmlDirectory,\n\thtmxDirectory,\n\tsvelteDirectory,\n\ttailwind,\n\toptions\n}: BuildConfig) => {\n\tconst buildStart = performance.now();\n\tconst projectRoot = cwd();\n\n\tconst buildPath = validateSafePath(buildDirectory, projectRoot);\n\tconst assetsPath =\n\t\tassetsDirectory && validateSafePath(assetsDirectory, projectRoot);\n\tconst reactDirectoryPath =\n\t\treactDirectory && validateSafePath(reactDirectory, projectRoot);\n\tconst htmlDirectoryPath =\n\t\thtmlDirectory && validateSafePath(htmlDirectory, projectRoot);\n\tconst htmxPath =\n\t\thtmxDirectory && validateSafePath(htmxDirectory, projectRoot);\n\tconst svelteDirectoryPath =\n\t\tsvelteDirectory && validateSafePath(svelteDirectory, projectRoot);\n\n\tconst reactIndexesPath =\n\t\treactDirectoryPath && join(reactDirectoryPath, 'indexes');\n\tconst reactPagesPath =\n\t\treactDirectoryPath && join(reactDirectoryPath, 'pages');\n\tconst htmlPagesPath = htmlDirectoryPath && join(htmlDirectoryPath, 'pages');\n\tconst htmlScriptsPath =\n\t\thtmlDirectoryPath && join(htmlDirectoryPath, 'scripts');\n\tconst sveltePagesPath =\n\t\tsvelteDirectoryPath && join(svelteDirectoryPath, 'pages');\n\n\tconst isSingleFrontend =\n\t\t[\n\t\t\treactDirectoryPath,\n\t\t\thtmlDirectoryPath,\n\t\t\thtmxPath,\n\t\t\tsvelteDirectoryPath\n\t\t].filter(Boolean).length === 1;\n\tconst isSvelteOnly = isSingleFrontend && svelteDirectoryPath !== undefined;\n\n\tconst serverOutDir = isSvelteOnly ? join(buildPath, 'pages') : buildPath;\n\tconst serverRoot = isSvelteOnly\n\t\t? join(svelteDirectoryPath, 'pages')\n\t\t: undefined;\n\tconst svelteOutDir = isSingleFrontend\n\t\t? buildPath\n\t\t: join(buildPath, basename(svelteDirectoryPath ?? ''));\n\tconst svelteDirName = svelteDirectoryPath && basename(svelteDirectoryPath);\n\n\tawait rm(buildPath, { force: true, recursive: true });\n\tawait mkdir(buildPath);\n\n\tif (reactIndexesPath && reactPagesPath) {\n\t\tawait generateReactIndexFiles(reactPagesPath, reactIndexesPath);\n\t}\n\n\tif (assetsPath) {\n\t\tawait cp(assetsPath, join(buildPath, 'assets'), {\n\t\t\tforce: true,\n\t\t\trecursive: true\n\t\t});\n\t}\n\n\tif (htmxPath) {\n\t\tawait mkdir(join(buildPath, 'htmx'));\n\t\tawait cp(htmxPath, join(buildPath, 'htmx'), {\n\t\t\tforce: true,\n\t\t\trecursive: true\n\t\t});\n\t}\n\n\tif (tailwind) {\n\t\tawait $`bunx @tailwindcss/cli -i ${tailwind.input} -o ${join(buildPath, tailwind.output)}`;\n\t}\n\n\tconst reactEntryPoints = reactIndexesPath\n\t\t? await scanEntryPoints(reactIndexesPath, '*.tsx')\n\t\t: [];\n\tconst svelteEntryPoints = sveltePagesPath\n\t\t? await scanEntryPoints(sveltePagesPath, '*.svelte')\n\t\t: [];\n\tconst htmlEntryPoints = htmlScriptsPath\n\t\t? await scanEntryPoints(htmlScriptsPath, '*.{js,ts}')\n\t\t: [];\n\n\tconst { svelteServerPaths, svelteClientPaths } = svelteDirectoryPath\n\t\t? await compileSvelte(svelteEntryPoints, svelteDirectoryPath)\n\t\t: { svelteClientPaths: [], svelteServerPaths: [] };\n\n\tconst serverEntryPoints = [\n\t\t...reactEntryPoints,\n\t\t...htmlEntryPoints,\n\t\t...svelteServerPaths\n\t];\n\n\tif (serverEntryPoints.length === 0) {\n\t\tconsole.warn(\n\t\t\t'No server entry points found, skipping manifest generation'\n\t\t);\n\n\t\treturn null;\n\t}\n\n\tconst { logs: serverLogs, outputs: serverOutputs } = await bunBuild({\n\t\tentrypoints: serverEntryPoints,\n\t\tformat: 'esm',\n\t\tnaming: `[dir]/[name].[hash].[ext]`,\n\t\toutdir: serverOutDir,\n\t\troot: serverRoot,\n\t\ttarget: 'bun'\n\t}).catch((error) => {\n\t\tconsole.error('Server build failed:', error);\n\t\texit(1);\n\t});\n\n\tlet clientLogs: (BuildMessage | ResolveMessage)[] = [];\n\tlet clientOutputs: BuildArtifact[] = [];\n\n\tif (svelteDirectoryPath) {\n\t\tconst { logs, outputs } = await bunBuild({\n\t\t\tentrypoints: svelteClientPaths,\n\t\t\tformat: 'esm',\n\t\t\tnaming: `[dir]/[name].[hash].[ext]`,\n\t\t\toutdir: svelteOutDir,\n\t\t\troot: svelteDirectoryPath,\n\t\t\ttarget: 'browser'\n\t\t}).catch((error) => {\n\t\t\tconsole.error('Client build failed:', error);\n\t\t\texit(1);\n\t\t});\n\n\t\tclientLogs = logs;\n\t\tclientOutputs = outputs;\n\t}\n\n\t[...serverLogs, ...clientLogs].forEach((log) => {\n\t\tif (log.level === 'error') console.error(log);\n\t\telse if (log.level === 'warning') console.warn(log);\n\t\telse console.info(log);\n\t});\n\n\tconst manifest = generateManifest(\n\t\t[...serverOutputs, ...clientOutputs],\n\t\tbuildPath,\n\t\tsvelteDirName\n\t);\n\n\tif (htmlDirectoryPath && htmlPagesPath) {\n\t\tconst outputHtmlPages = join(\n\t\t\tbuildPath,\n\t\t\tbasename(htmlDirectoryPath),\n\t\t\t'pages'\n\t\t);\n\t\tawait mkdir(outputHtmlPages, { recursive: true });\n\t\tawait cp(htmlPagesPath, outputHtmlPages, {\n\t\t\tforce: true,\n\t\t\trecursive: true\n\t\t});\n\t\tawait updateScriptTags(manifest, outputHtmlPages);\n\t}\n\n\tif (!options?.preserveIntermediateFiles && svelteDirectoryPath) {\n\t\tawait rm(join(svelteDirectoryPath, 'indexes'), {\n\t\t\tforce: true,\n\t\t\trecursive: true\n\t\t});\n\t\tawait rm(join(svelteDirectoryPath, 'client'), {\n\t\t\tforce: true,\n\t\t\trecursive: true\n\t\t});\n\t\tawait Promise.all(\n\t\t\tsvelteServerPaths.map((filePath) => rm(filePath, { force: true }))\n\t\t);\n\t}\n\n\tif (!options?.preserveIntermediateFiles && reactIndexesPath) {\n\t\tawait rm(reactIndexesPath, { force: true, recursive: true });\n\t}\n\n\tconsole.log(\n\t\t`Build completed in ${getDurationString(performance.now() - buildStart)}`\n\t);\n\n\treturn manifest;\n};\n",
|
|
7
|
+
"import { BuildArtifact } from 'bun';\n\nexport const generateManifest = (\n\toutputs: BuildArtifact[],\n\tbuildDirectoryAbsolute: string,\n\tsvelteDirName?: string\n) => {\n\tconst prefix = svelteDirName ? `(?:${svelteDirName}/)?` : '';\n\tconst pagesRegex = new RegExp(`^${prefix}pages/`);\n\tconst indexesRegex = new RegExp(`^${prefix}indexes/`);\n\n\treturn outputs.reduce<Record<string, string>>((manifest, artifact) => {\n\t\tlet relativePath = artifact.path.startsWith(buildDirectoryAbsolute)\n\t\t\t? artifact.path.slice(buildDirectoryAbsolute.length)\n\t\t\t: artifact.path;\n\t\trelativePath = relativePath.replace(/^\\/+/, '');\n\t\tconst segments = relativePath.split('/');\n\t\tconst fileWithHash = segments.pop();\n\t\tif (!fileWithHash) return manifest;\n\t\tconst [baseName] = fileWithHash.split(`.${artifact.hash}.`);\n\n\t\tif (indexesRegex.test(relativePath)) {\n\t\t\tmanifest[`${baseName}Index`] = `/${relativePath}`;\n\t\t} else if (pagesRegex.test(relativePath)) {\n\t\t\tmanifest[baseName] = artifact.path;\n\t\t} else {\n\t\t\tmanifest[baseName] = `/${relativePath}`;\n\t\t}\n\n\t\treturn manifest;\n\t}, {});\n};\n",
|
|
8
|
+
"import { mkdir, rm, writeFile } from 'fs/promises';\nimport { basename, join } from 'path';\nimport { Glob } from 'bun';\n\nexport const generateReactIndexFiles = async (\n\treactPagesDirectory: string,\n\treactIndexesDirectory: string\n) => {\n\tawait rm(reactIndexesDirectory, { force: true, recursive: true });\n\tawait mkdir(reactIndexesDirectory);\n\n\tconst pagesGlob = new Glob('*.*');\n\tconst files: string[] = [];\n\tfor await (const file of pagesGlob.scan({ cwd: reactPagesDirectory })) {\n\t\tfiles.push(file);\n\t}\n\tconst promises = files.map(async (file) => {\n\t\tconst fileName = basename(file);\n\t\tconst [componentName] = fileName.split('.');\n\t\tconst content = [\n\t\t\t`import { hydrateRoot } from 'react-dom/client';`,\n\t\t\t`import type { ComponentType } from 'react'`,\n\t\t\t`import { ${componentName} } from '../pages/${componentName}';\\n`,\n\t\t\t`type PropsOf<C> = C extends ComponentType<infer P> ? P : never;\\n`,\n\t\t\t`declare global {`,\n\t\t\t`\\tinterface Window {`,\n\t\t\t`\\t\\t__INITIAL_PROPS__: PropsOf<typeof ${componentName}>`,\n\t\t\t`\\t}`,\n\t\t\t`}\\n`,\n\t\t\t`hydrateRoot(document, <${componentName} {...window.__INITIAL_PROPS__} />);`\n\t\t].join('\\n');\n\n\t\treturn writeFile(\n\t\t\tjoin(reactIndexesDirectory, `${componentName}Index.tsx`),\n\t\t\tcontent\n\t\t);\n\t});\n\tawait Promise.all(promises);\n};\n",
|
|
9
|
+
"import { Glob } from 'bun';\n\nexport const scanEntryPoints = async (dir: string, pattern: string) => {\n\tconst entryPaths: string[] = [];\n\tconst glob = new Glob(pattern);\n\tfor await (const file of glob.scan({ absolute: true, cwd: dir })) {\n\t\tentryPaths.push(file);\n\t}\n\n\treturn entryPaths;\n};\n",
|
|
10
|
+
"import { readFile, writeFile } from 'node:fs/promises';\nimport { scanEntryPoints } from './scanEntryPoints';\n\nexport const updateScriptTags = async (\n\tmanifest: Record<string, string>,\n\thtmlDir: string\n) => {\n\tconst htmlFiles = await scanEntryPoints(htmlDir, '*.html');\n\n\tconst tasks = htmlFiles.map(async (filePath) => {\n\t\tconst original = await readFile(filePath, 'utf8');\n\t\tconst updated = Object.entries(manifest).reduce(\n\t\t\t(html, [scriptName, newPath]) => {\n\t\t\t\tconst esc = scriptName.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n\t\t\t\tconst regex = new RegExp(\n\t\t\t\t\t`(<script[^>]+src=[\"'])(/?(?:.*/)?${esc})(?:\\\\.[^.\"'/]+)?(\\\\.js)([\"'][^>]*>)`,\n\t\t\t\t\t'g'\n\t\t\t\t);\n\n\t\t\t\treturn html.replace(\n\t\t\t\t\tregex,\n\t\t\t\t\t(_, prefix, __, ___, suffix) =>\n\t\t\t\t\t\t`${prefix}${newPath}${suffix}`\n\t\t\t\t);\n\t\t\t},\n\t\t\toriginal\n\t\t);\n\n\t\tawait writeFile(filePath, updated, 'utf8');\n\t});\n\n\tawait Promise.all(tasks);\n};\n",
|
|
11
|
+
"import { mkdir } from 'node:fs/promises';\nimport { basename, join } from 'node:path';\nimport { env } from 'node:process';\nimport { write, file } from 'bun';\nimport { compile, preprocess } from 'svelte/compiler';\n\nexport const compileSvelte = async (\n\tentryPoints: string[],\n\toutputDirectory: string\n) => {\n\tconst pagesDir = join(outputDirectory, 'pages');\n\tconst clientDir = join(outputDirectory, 'client');\n\tconst indexesDir = join(outputDirectory, 'indexes');\n\n\tawait Promise.all([\n\t\tmkdir(clientDir, { recursive: true }),\n\t\tmkdir(indexesDir, { recursive: true })\n\t]);\n\n\tconst isDev = env.NODE_ENV === 'development';\n\n\tconst builds = await Promise.all(\n\t\tentryPoints.map(async (entry) => {\n\t\t\tconst source = await file(entry).text();\n\t\t\tconst { code: pre } = await preprocess(source, {});\n\n\t\t\tconst name = basename(entry, '.svelte');\n\n\t\t\tconst { js: ssrJs } = compile(pre, {\n\t\t\t\tcss: 'injected',\n\t\t\t\tdev: isDev,\n\t\t\t\tfilename: entry,\n\t\t\t\tgenerate: 'server'\n\t\t\t});\n\t\t\tconst ssrPath = join(pagesDir, `${name}.js`);\n\n\t\t\tconst { js: clientJs } = compile(pre, {\n\t\t\t\tcss: 'injected',\n\t\t\t\tdev: isDev,\n\t\t\t\tfilename: entry,\n\t\t\t\tgenerate: 'client'\n\t\t\t});\n\t\t\tconst clientComponentPath = join(clientDir, `${name}.js`);\n\n\t\t\tconst bootstrap = `import Component from \"../client/${name}.js\";\nimport { hydrate } from \"svelte\";\nhydrate(Component,{target:document.body,props:window.__INITIAL_PROPS__??{}});`;\n\t\t\tconst clientIndexPath = join(indexesDir, `${name}.js`);\n\n\t\t\tawait Promise.all([\n\t\t\t\twrite(ssrPath, ssrJs.code),\n\t\t\t\twrite(clientComponentPath, clientJs.code),\n\t\t\t\twrite(clientIndexPath, bootstrap)\n\t\t\t]);\n\n\t\t\treturn { clientIndexPath, ssrPath };\n\t\t})\n\t);\n\n\treturn {\n\t\tsvelteClientPaths: builds.map(({ clientIndexPath }) => clientIndexPath),\n\t\tsvelteServerPaths: builds.map(({ ssrPath }) => ssrPath)\n\t};\n};\n",
|
|
12
|
+
"import {\n\tMILLISECONDS_IN_A_SECOND,\n\tTIME_PRECISION,\n\tMILLISECONDS_IN_A_MINUTE\n} from '../constants';\n\nexport const getDurationString = (duration: number) => {\n\tlet durationString;\n\n\tif (duration < MILLISECONDS_IN_A_SECOND) {\n\t\tdurationString = `${duration.toFixed(TIME_PRECISION)}ms`;\n\t} else if (duration < MILLISECONDS_IN_A_MINUTE) {\n\t\tdurationString = `${(duration / MILLISECONDS_IN_A_SECOND).toFixed(TIME_PRECISION)}s`;\n\t} else {\n\t\tdurationString = `${(duration / MILLISECONDS_IN_A_MINUTE).toFixed(TIME_PRECISION)}m`;\n\t}\n\n\treturn durationString;\n};\n",
|
|
13
|
+
"import { resolve, relative, sep } from 'node:path';\n\nexport const validateSafePath = (targetPath: string, baseDirectory: string) => {\n\tconst absoluteBase = resolve(baseDirectory);\n\tconst absoluteTarget = resolve(baseDirectory, targetPath);\n\tif (relative(absoluteBase, absoluteTarget).startsWith(`..${sep}`)) {\n\t\tthrow new Error(`Unsafe path: ${targetPath}`);\n\t}\n\n\treturn absoluteTarget;\n};\n",
|
|
14
|
+
"import { file } from 'bun';\nimport { ComponentType, createElement } from 'react';\nimport { renderToReadableStream as renderReactToReadableStream } from 'react-dom/server';\nimport { Component } from 'svelte';\nimport { renderToReadableStream as renderSvelteToReadableStream } from '../svelte/renderToReadableStream';\n\nexport const handleReactPageRequest = async <\n\tProps extends Record<string, unknown> = Record<never, never>\n>(\n\tpageComponent: ComponentType<Props>,\n\tindex: string,\n\t...props: keyof Props extends never ? [] : [props: Props]\n) => {\n\tconst [maybeProps] = props;\n\tconst element =\n\t\tmaybeProps !== undefined\n\t\t\t? createElement(pageComponent, maybeProps)\n\t\t\t: createElement(pageComponent);\n\n\tconst stream = await renderReactToReadableStream(element, {\n\t\tbootstrapModules: [index],\n\t\tbootstrapScriptContent: maybeProps\n\t\t\t? `window.__INITIAL_PROPS__=${JSON.stringify(maybeProps)}`\n\t\t\t: undefined\n\t});\n\n\treturn new Response(stream, {\n\t\theaders: { 'Content-Type': 'text/html' }\n\t});\n};\n\n// Declare overloads matching Svelte’s own component API to preserve correct type inference\ntype HandleSveltePageRequest = {\n\t(\n\t\tPageComponent: Component<Record<string, never>>,\n\t\tmanifest: Record<string, string>\n\t): Promise<Response>;\n\t<P extends Record<string, unknown>>(\n\t\tPageComponent: Component<P>,\n\t\tmanifest: Record<string, string>,\n\t\tprops: P\n\t): Promise<Response>;\n};\n\nexport const handleSveltePageRequest: HandleSveltePageRequest = async <\n\tP extends Record<string, unknown>\n>(\n\tPageComponent: Component<P>,\n\tmanifest: Record<string, string>,\n\tprops?: P\n) => {\n\tconst componentPath = PageComponent.toString();\n\tconst pathSegments = componentPath.split('/');\n\tconst lastSegment = pathSegments[pathSegments.length - 1] ?? '';\n\tconst componentName = lastSegment.replace(/\\.svelte$/, '');\n\n\tconst pagePath = manifest[componentName];\n\tconst indexPath = manifest[`${componentName}Index`];\n\n\tconst { default: ImportedPageComponent } = await import(pagePath);\n\n\tconst stream = await renderSvelteToReadableStream(\n\t\tImportedPageComponent,\n\t\tprops,\n\t\t{\n\t\t\tbootstrapModules: [indexPath],\n\t\t\tbootstrapScriptContent: `window.__INITIAL_PROPS__=${JSON.stringify(\n\t\t\t\tprops\n\t\t\t)}`\n\t\t}\n\t);\n\n\treturn new Response(stream, {\n\t\theaders: { 'Content-Type': 'text/html' }\n\t});\n};\n\nexport const handleHTMLPageRequest = (html: string) => file(html);\n",
|
|
15
|
+
"import type { Component } from 'svelte';\nimport { render } from 'svelte/server';\nimport { DEFAULT_CHUNK_SIZE } from '../constants';\nimport { escapeScriptContent } from '../utils/escapeScriptContent';\n\nexport type RenderStreamOptions = {\n\tbootstrapScriptContent?: string;\n\tbootstrapScripts?: string[];\n\tbootstrapModules?: string[];\n\tnonce?: string;\n\tonError?: (error: unknown) => void;\n\tprogressiveChunkSize?: number;\n\tsignal?: AbortSignal;\n};\n\nexport const renderToReadableStream = async <\n\tProps extends Record<string, unknown> = Record<string, never>\n>(\n\tcomponent: Component<Props>,\n\tprops?: Props,\n\t{\n\t\tbootstrapScriptContent,\n\t\tbootstrapScripts = [],\n\t\tbootstrapModules = [],\n\t\tnonce,\n\t\tonError = console.error,\n\t\tprogressiveChunkSize = DEFAULT_CHUNK_SIZE,\n\t\tsignal\n\t}: RenderStreamOptions = {}\n) => {\n\ttry {\n\t\tconst { head, body } =\n\t\t\ttypeof props === 'undefined'\n\t\t\t\t? // @ts-expect-error Svelte's render function can't determine which overload to choose when the component is generic\n\t\t\t\t\trender(component)\n\t\t\t\t: render(component, { props });\n\t\tconst nonceAttr = nonce ? ` nonce=\"${nonce}\"` : '';\n\t\tconst scripts =\n\t\t\t(bootstrapScriptContent\n\t\t\t\t? `<script${nonceAttr}>${escapeScriptContent(bootstrapScriptContent)}</script>`\n\t\t\t\t: '') +\n\t\t\tbootstrapScripts\n\t\t\t\t.map((src) => `<script${nonceAttr} src=\"${src}\"></script>`)\n\t\t\t\t.join('') +\n\t\t\tbootstrapModules\n\t\t\t\t.map(\n\t\t\t\t\t(src) =>\n\t\t\t\t\t\t`<script${nonceAttr} type=\"module\" src=\"${src}\"></script>`\n\t\t\t\t)\n\t\t\t\t.join('');\n\t\tconst encoder = new TextEncoder();\n\t\t// Warning: this encodes the entire document into memory in one buffer\n\t\tconst full = encoder.encode(\n\t\t\t`<!DOCTYPE html><html lang=\"en\"><head>${head}</head><body>${body}${scripts}</body></html>`\n\t\t);\n\n\t\tlet offset = 0;\n\n\t\treturn new ReadableStream<Uint8Array>({\n\t\t\ttype: 'bytes',\n\t\t\tcancel(reason) {\n\t\t\t\tonError?.(reason);\n\t\t\t},\n\t\t\tpull(controller) {\n\t\t\t\tif (signal?.aborted) {\n\t\t\t\t\tcontroller.close();\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (offset >= full.length) {\n\t\t\t\t\tcontroller.close();\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst end = Math.min(\n\t\t\t\t\toffset + progressiveChunkSize,\n\t\t\t\t\tfull.length\n\t\t\t\t);\n\t\t\t\tcontroller.enqueue(full.subarray(offset, end));\n\t\t\t\toffset = end;\n\t\t\t}\n\t\t});\n\t} catch (error) {\n\t\tonError?.(error);\n\t\tthrow error;\n\t}\n};\n",
|
|
16
|
+
"const ESCAPE_LOOKUP: Record<string, string> = {\n\t'\\u2028': '\\\\u2028',\n\t'\\u2029': '\\\\u2029',\n\t'&': '\\\\u0026',\n\t'<': '\\\\u003C',\n\t'>': '\\\\u003E'\n};\n\nconst ESCAPE_REGEX = /[&><\\u2028\\u2029]/g;\n\nexport const escapeScriptContent = (content: string) =>\n\tcontent.replace(ESCAPE_REGEX, (char) => ESCAPE_LOOKUP[char]);\n",
|
|
17
|
+
"import { argv } from 'node:process';\nimport { env } from 'bun';\nimport { Elysia } from 'elysia';\nimport { DEFAULT_PORT } from '../constants';\nimport { getLocalIPAddress } from '../utils/networking';\n\nlet host = env.HOST ?? 'localhost';\nconst port = env.PORT ?? DEFAULT_PORT;\nlet localIP: string | undefined;\n\nconst args = argv;\nconst hostFlag = args.includes('--host');\n\nif (hostFlag) {\n\tlocalIP = getLocalIPAddress();\n\thost = '0.0.0.0';\n}\n\nexport const networkingPlugin = (app: Elysia) =>\n\tapp.listen(\n\t\t{\n\t\t\thostname: host,\n\t\t\tport: port\n\t\t},\n\t\t() => {\n\t\t\t//TODO: I dont think this works properly\n\t\t\tif (hostFlag) {\n\t\t\t\tconsole.log(`Server started on http://localhost:${port}`);\n\t\t\t\tconsole.log(\n\t\t\t\t\t`Server started on network: http://${localIP}:${port}`\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tconsole.log(`Server started on http://${host}:${port}`);\n\t\t\t}\n\t\t}\n\t);\n",
|
|
18
|
+
"import os from 'os';\n\nexport const getLocalIPAddress = () => {\n\tconst interfaces = os.networkInterfaces();\n\tconst addresses = Object.values(interfaces)\n\t\t.flat()\n\t\t.filter(\n\t\t\t(iface): iface is os.NetworkInterfaceInfo => iface !== undefined\n\t\t);\n\tconst ipAddress = addresses.find(\n\t\t(iface) => iface.family === 'IPv4' && !iface.internal\n\t);\n\n\tif (ipAddress) return ipAddress.address; // Return the first non-internal IPv4 address\n\n\tconsole.warn('No IP address found, falling back to localhost');\n\n\treturn 'localhost'; // Fallback to localhost if no IP found\n};\n",
|
|
19
|
+
"export const pageRouterPlugin = () => {\n\tconsole.log('Page Router Plugin Not Implemented Yet');\n};\n"
|
|
20
20
|
],
|
|
21
|
-
"mappings": ";;AAAO,IAAM,sBAAsB;AAC5B,IAAM,2BAA2B;AACjC,IAAM,2BACZ,2BAA2B;AACrB,IAAM,qBAAqB;AAC3B,IAAM,eAAe;AACrB,IAAM,wBACZ,2BACA,sBACA,qBACA;AACM,IAAM,iBAAiB;AACvB,IAAM,aAAa,IAAI;AACvB,IAAM,eAAe;AACrB,IAAM,qBAAqB;;ACdlC,eAAS,cAAI;AACb,qBAAS,mBAAU;AACnB;AACA;;;ACDO,IAAM,mBAAmB,CAC9B,SACA,2BACG;AAAA,EACH,MAAM,WAAW,QAAQ,OAA+B,CAAC,aAAa,aAAa;AAAA,IACjF,IAAI,eAAe,SAAS,KAAK,WAAW,sBAAsB,IAC9D,SAAS,KAAK,MAAM,uBAAuB,MAAM,IACjD,SAAS;AAAA,IACb,eAAe,aAAa,QAAQ,QAAQ,EA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AAO,KAAI,QAAQ;AACvB,IAAM,OAAO,KAAI,QAAQ;AACzB,IAAI;AAEJ,IAAM,OAAO;AACb,IAAM,WAAW,KAAK,SAAS,QAAQ;AAEvC,IAAI,UAAU;AAAA,EACb,UAAU,kBAAkB;AAAA,EAC5B,OAAO;AACR;AAEO,IAAM,mBAAmB,CAAC,QAChC,IAAI,OACH;AAAA,EACC,UAAU;AAAA,EACV;AACD,GACA,MAAM;AAAA,EAEL,IAAI,UAAU;AAAA,IACb,QAAQ,IAAI,sCAAsC,MAAM;AAAA,IACxD,QAAQ,IACP,qCAAqC,WAAW,MACjD;AAAA,EACD,EAAO;AAAA,IACN,QAAQ,IAAI,4BAA4B,QAAQ,MAAM;AAAA;AAAA,CAGzD;;AEnCM,IAAM,mBAAmB,MAAM;AAAA,EACrC,QAAQ,IAAI,wCAAwC;AAAA;",
|
|
22
|
+
"debugId": "F0D0DE61A724A5EB64756E2164756E21",
|
|
23
23
|
"names": []
|
|
24
24
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { BuildArtifact } from
|
|
2
|
-
export declare const generateManifest: (outputs: BuildArtifact[], buildDirectoryAbsolute: string) => Record<string, string>;
|
|
1
|
+
import { BuildArtifact } from 'bun';
|
|
2
|
+
export declare const generateManifest: (outputs: BuildArtifact[], buildDirectoryAbsolute: string, svelteDirName?: string) => Record<string, string>;
|
package/dist/src/core/build.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { BuildConfig } from
|
|
1
|
+
import { BuildConfig } from '../types';
|
|
2
2
|
export declare const build: ({ buildDirectory, assetsDirectory, reactDirectory, htmlDirectory, htmxDirectory, svelteDirectory, tailwind, options }: BuildConfig) => Promise<Record<string, string> | null>;
|
package/dist/src/core/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
1
|
+
export * from './build';
|
|
2
|
+
export * from './pageHandlers';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ComponentType } from
|
|
2
|
-
import { Component } from
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
import { Component } from 'svelte';
|
|
3
3
|
export declare const handleReactPageRequest: <Props extends Record<string, unknown> = Record<never, never>>(pageComponent: ComponentType<Props>, index: string, ...props: keyof Props extends never ? [] : [props: Props]) => Promise<Response>;
|
|
4
4
|
type HandleSveltePageRequest = {
|
|
5
5
|
(PageComponent: Component<Record<string, never>>, manifest: Record<string, string>): Promise<Response>;
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
1
|
+
export * from './constants';
|
|
2
|
+
export * from './core/index';
|
|
3
|
+
export * from './plugins/index';
|
|
4
|
+
export * from './utils/index';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
1
|
+
export * from './networkingPlugin';
|
|
2
|
+
export * from './pageRouterPlugin';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Readable } from
|
|
2
|
-
import type { Component } from
|
|
1
|
+
import { Readable } from 'node:stream';
|
|
2
|
+
import type { Component } from 'svelte';
|
|
3
3
|
export type RenderPipeableOptions = {
|
|
4
4
|
bootstrapScriptContent?: string;
|
|
5
5
|
bootstrapScripts?: string[];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
1
|
+
export * from './networking';
|
|
2
|
+
export * from '../build/updateScriptTags';
|
package/eslint.config.mjs
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
// eslint.config.mjs
|
|
2
|
-
import { dirname } from
|
|
3
|
-
import { fileURLToPath } from
|
|
4
|
-
import pluginJs from
|
|
5
|
-
import stylisticTs from
|
|
6
|
-
import tsParser from
|
|
7
|
-
import { defineConfig } from
|
|
8
|
-
import absolutePlugin from
|
|
9
|
-
import importPlugin from
|
|
10
|
-
import promisePlugin from
|
|
11
|
-
import securityPlugin from
|
|
12
|
-
import globals from
|
|
13
|
-
import tseslint from
|
|
2
|
+
import { dirname } from 'path';
|
|
3
|
+
import { fileURLToPath } from 'url';
|
|
4
|
+
import pluginJs from '@eslint/js';
|
|
5
|
+
import stylisticTs from '@stylistic/eslint-plugin-ts';
|
|
6
|
+
import tsParser from '@typescript-eslint/parser';
|
|
7
|
+
import { defineConfig } from 'eslint/config';
|
|
8
|
+
import absolutePlugin from 'eslint-plugin-absolute';
|
|
9
|
+
import importPlugin from 'eslint-plugin-import';
|
|
10
|
+
import promisePlugin from 'eslint-plugin-promise';
|
|
11
|
+
import securityPlugin from 'eslint-plugin-security';
|
|
12
|
+
import globals from 'globals';
|
|
13
|
+
import tseslint from 'typescript-eslint';
|
|
14
14
|
|
|
15
15
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
16
16
|
|
|
17
17
|
export default defineConfig([
|
|
18
18
|
{
|
|
19
19
|
ignores: [
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
20
|
+
'dist/**',
|
|
21
|
+
'example/build/**',
|
|
22
|
+
'example/svelte/indexes/',
|
|
23
|
+
'example/svelte/client/',
|
|
24
|
+
'example/svelte/pages/*.js',
|
|
25
|
+
'tailwind.config.ts',
|
|
26
|
+
'postcss.config.ts'
|
|
27
27
|
]
|
|
28
28
|
},
|
|
29
29
|
|
|
@@ -32,30 +32,34 @@ export default defineConfig([
|
|
|
32
32
|
...tseslint.configs.recommended,
|
|
33
33
|
|
|
34
34
|
{
|
|
35
|
-
files: [
|
|
35
|
+
files: ['**/*.{ts,tsx}'],
|
|
36
36
|
languageOptions: {
|
|
37
|
-
globals:
|
|
37
|
+
globals: {
|
|
38
|
+
...globals.browser,
|
|
39
|
+
BuildMessage: 'readonly',
|
|
40
|
+
ResolveMessage: 'readonly'
|
|
41
|
+
},
|
|
38
42
|
parser: tsParser,
|
|
39
43
|
parserOptions: {
|
|
40
44
|
createDefaultProgram: true,
|
|
41
|
-
project:
|
|
45
|
+
project: './tsconfig.json',
|
|
42
46
|
tsconfigRootDir: __dirname
|
|
43
47
|
}
|
|
44
48
|
},
|
|
45
|
-
plugins: {
|
|
49
|
+
plugins: { '@stylistic/ts': stylisticTs },
|
|
46
50
|
rules: {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
{ blankLine:
|
|
51
|
+
'@stylistic/ts/padding-line-between-statements': [
|
|
52
|
+
'error',
|
|
53
|
+
{ blankLine: 'always', next: 'return', prev: '*' }
|
|
50
54
|
],
|
|
51
55
|
|
|
52
|
-
|
|
56
|
+
'@typescript-eslint/no-unnecessary-type-assertion': 'error'
|
|
53
57
|
}
|
|
54
58
|
},
|
|
55
59
|
|
|
56
60
|
{
|
|
57
|
-
files: [
|
|
58
|
-
ignores: [
|
|
61
|
+
files: ['**/*.{js,mjs,cjs,ts,tsx,jsx}'],
|
|
62
|
+
ignores: ['node_modules/**'],
|
|
59
63
|
plugins: {
|
|
60
64
|
absolute: absolutePlugin,
|
|
61
65
|
import: importPlugin,
|
|
@@ -63,139 +67,139 @@ export default defineConfig([
|
|
|
63
67
|
security: securityPlugin
|
|
64
68
|
},
|
|
65
69
|
rules: {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
{ allowedVars: [
|
|
70
|
+
'absolute/explicit-object-types': 'error',
|
|
71
|
+
'absolute/localize-react-props': 'error',
|
|
72
|
+
'absolute/max-depth-extended': ['error', 1],
|
|
73
|
+
'absolute/max-jsxnesting': ['error', 5],
|
|
74
|
+
'absolute/min-var-length': [
|
|
75
|
+
'error',
|
|
76
|
+
{ allowedVars: ['_', 'id', 'db', 'OK'], minLength: 3 }
|
|
73
77
|
],
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
+
'absolute/no-explicit-return-type': 'error',
|
|
79
|
+
'absolute/no-useless-function': 'error',
|
|
80
|
+
'absolute/sort-exports': [
|
|
81
|
+
'error',
|
|
78
82
|
{
|
|
79
83
|
caseSensitive: true,
|
|
80
84
|
natural: true,
|
|
81
|
-
order:
|
|
85
|
+
order: 'asc',
|
|
82
86
|
variablesBeforeFunctions: true
|
|
83
87
|
}
|
|
84
88
|
],
|
|
85
|
-
|
|
86
|
-
|
|
89
|
+
'absolute/sort-keys-fixable': [
|
|
90
|
+
'error',
|
|
87
91
|
{
|
|
88
92
|
caseSensitive: true,
|
|
89
93
|
natural: true,
|
|
90
|
-
order:
|
|
94
|
+
order: 'asc',
|
|
91
95
|
variablesBeforeFunctions: true
|
|
92
96
|
}
|
|
93
97
|
],
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
eqeqeq:
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
'arrow-body-style': ['error', 'as-needed'],
|
|
99
|
+
'consistent-return': 'error',
|
|
100
|
+
eqeqeq: 'error',
|
|
101
|
+
'func-style': [
|
|
102
|
+
'error',
|
|
103
|
+
'expression',
|
|
100
104
|
{ allowArrowFunctions: true }
|
|
101
105
|
],
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
106
|
+
'import/no-cycle': 'error',
|
|
107
|
+
'import/no-default-export': 'error',
|
|
108
|
+
'import/no-relative-packages': 'error',
|
|
109
|
+
'import/no-unused-modules': ['error', { missingExports: true }],
|
|
110
|
+
'import/order': ['error', { alphabetize: { order: 'asc' } }],
|
|
111
|
+
'no-await-in-loop': 'error',
|
|
112
|
+
'no-debugger': 'error',
|
|
113
|
+
'no-duplicate-case': 'error',
|
|
114
|
+
'no-duplicate-imports': 'error',
|
|
115
|
+
'no-else-return': 'error',
|
|
116
|
+
'no-empty-function': 'error',
|
|
117
|
+
'no-empty-pattern': 'error',
|
|
118
|
+
'no-empty-static-block': 'error',
|
|
119
|
+
'no-fallthrough': 'error',
|
|
120
|
+
'no-floating-decimal': 'error',
|
|
121
|
+
'no-global-assign': 'error',
|
|
122
|
+
'no-implicit-coercion': 'error',
|
|
123
|
+
'no-implicit-globals': 'error',
|
|
124
|
+
'no-loop-func': 'error',
|
|
125
|
+
'no-magic-numbers': [
|
|
126
|
+
'warn',
|
|
123
127
|
{ detectObjects: false, enforceConst: true, ignore: [0, 1, 2] }
|
|
124
128
|
],
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
129
|
+
'no-misleading-character-class': 'error',
|
|
130
|
+
'no-nested-ternary': 'error',
|
|
131
|
+
'no-new-native-nonconstructor': 'error',
|
|
132
|
+
'no-new-wrappers': 'error',
|
|
133
|
+
'no-param-reassign': 'error',
|
|
134
|
+
'no-restricted-imports': [
|
|
135
|
+
'error',
|
|
132
136
|
{
|
|
133
137
|
paths: [
|
|
134
138
|
{
|
|
135
|
-
importNames: [
|
|
139
|
+
importNames: ['default'],
|
|
136
140
|
message:
|
|
137
|
-
|
|
138
|
-
name:
|
|
141
|
+
'Import only named React exports for tree-shaking.',
|
|
142
|
+
name: 'react'
|
|
139
143
|
},
|
|
140
144
|
{
|
|
141
|
-
importNames: [
|
|
142
|
-
message:
|
|
143
|
-
name:
|
|
145
|
+
importNames: ['default'],
|
|
146
|
+
message: 'Import only the required Bun exports.',
|
|
147
|
+
name: 'bun'
|
|
144
148
|
}
|
|
145
149
|
]
|
|
146
150
|
}
|
|
147
151
|
],
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
152
|
+
'no-return-await': 'error',
|
|
153
|
+
'no-shadow': 'error',
|
|
154
|
+
'no-undef': 'error',
|
|
155
|
+
'no-unneeded-ternary': 'error',
|
|
156
|
+
'no-unreachable': 'error',
|
|
157
|
+
'no-useless-assignment': 'error',
|
|
158
|
+
'no-useless-concat': 'error',
|
|
159
|
+
'no-useless-return': 'error',
|
|
160
|
+
'no-var': 'error',
|
|
161
|
+
'prefer-arrow-callback': 'error',
|
|
162
|
+
'prefer-const': 'error',
|
|
163
|
+
'prefer-destructuring': [
|
|
164
|
+
'error',
|
|
161
165
|
{ array: true, object: true },
|
|
162
166
|
{ enforceForRenamedProperties: false }
|
|
163
167
|
],
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
168
|
+
'prefer-template': 'error',
|
|
169
|
+
'promise/always-return': 'warn',
|
|
170
|
+
'promise/avoid-new': 'warn',
|
|
171
|
+
'promise/catch-or-return': 'error',
|
|
172
|
+
'promise/no-callback-in-promise': 'warn',
|
|
173
|
+
'promise/no-nesting': 'warn',
|
|
174
|
+
'promise/no-promise-in-callback': 'warn',
|
|
175
|
+
'promise/no-return-wrap': 'error',
|
|
176
|
+
'promise/param-names': 'error'
|
|
173
177
|
}
|
|
174
178
|
},
|
|
175
179
|
|
|
176
180
|
{
|
|
177
|
-
files: [
|
|
181
|
+
files: ['eslint.config.mjs', 'src/constants.ts'],
|
|
178
182
|
rules: {
|
|
179
|
-
|
|
183
|
+
'no-magic-numbers': 'off'
|
|
180
184
|
}
|
|
181
185
|
},
|
|
182
186
|
{
|
|
183
|
-
files: [
|
|
187
|
+
files: ['eslint.config.mjs'],
|
|
184
188
|
rules: {
|
|
185
|
-
|
|
189
|
+
'import/no-default-export': 'off'
|
|
186
190
|
}
|
|
187
191
|
},
|
|
188
192
|
{
|
|
189
193
|
files: [
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
194
|
+
'src/utils/index.ts',
|
|
195
|
+
'src/plugins/index.ts',
|
|
196
|
+
'src/core/index.ts',
|
|
197
|
+
'src/index.ts',
|
|
198
|
+
'example/**/indexes/*',
|
|
199
|
+
'example/html/scripts/*'
|
|
196
200
|
],
|
|
197
201
|
rules: {
|
|
198
|
-
|
|
202
|
+
'import/no-unused-modules': 'off'
|
|
199
203
|
}
|
|
200
204
|
}
|
|
201
205
|
]);
|