@absolutejs/absolute 0.5.1 → 0.5.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/index.js CHANGED
@@ -222,3 +222,6 @@ export {
222
222
  HOURS_IN_A_DAY,
223
223
  DEFAULT_PORT
224
224
  };
225
+
226
+ //# debugId=99CA190BCF91F46D64756E2164756E21
227
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,15 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/constants.ts", "../src/core/build.ts", "../src/utils/updateScriptTags.ts", "../src/core/pageHandlers.ts", "../src/plugins/networkingPlugin.ts", "../src/utils/networking.ts"],
4
+ "sourcesContent": [
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_A_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_A_DAY;\nexport const TIME_PRECISION = 2;\nexport const DEFAULT_PORT = 3000;\n",
6
+ "import { rm, mkdir, writeFile } from \"node:fs/promises\";\nimport { join, basename } from \"node:path\";\nimport { cwd, exit } from \"node:process\";\nimport { $, build as bunBuild, Glob } from \"bun\";\nimport {\n\tMILLISECONDS_IN_A_MINUTE,\n\tMILLISECONDS_IN_A_SECOND,\n\tTIME_PRECISION\n} from \"../constants\";\nimport { updateScriptTags } from \"../utils/updateScriptTags\";\nimport { BuildConfig } from \"../types\";\n\nexport const build = async ({\n\tbuildDirectory = \"build\",\n\tassetsDirectory,\n\treactDirectory,\n\thtml,\n\thtmxDirectory,\n\ttailwind\n}: BuildConfig) => {\n\tconst start = performance.now();\n\n\tconst projectRoot = cwd();\n\tconst buildDirAbsolute = join(projectRoot, buildDirectory);\n\tconst assetsDirAbsolute =\n\t\tassetsDirectory && join(projectRoot, assetsDirectory);\n\tconst reactIndexDirAbsolute =\n\t\treactDirectory && join(projectRoot, reactDirectory, \"indexes\");\n\tconst reactPagesDirAbsolute =\n\t\treactDirectory && join(projectRoot, reactDirectory, \"pages\");\n\tconst htmlDirAbsolute = html?.directory\n\t\t? join(projectRoot, html.directory)\n\t\t: undefined;\n\n\tconst htmxDirAbsolute = htmxDirectory && join(projectRoot, htmxDirectory);\n\n\tawait rm(buildDirAbsolute, { force: true, recursive: true });\n\tawait mkdir(buildDirAbsolute);\n\n\treactPagesDirAbsolute &&\n\t\treactIndexDirAbsolute &&\n\t\t(await generateReactIndexFiles(\n\t\t\treactPagesDirAbsolute,\n\t\t\treactIndexDirAbsolute\n\t\t));\n\n\tconst reactEntryPaths =\n\t\treactIndexDirAbsolute &&\n\t\t(await scanEntryPoints(reactIndexDirAbsolute, \"*.tsx\"));\n\n\tconst entryPaths = [...(reactEntryPaths ?? [])];\n\n\tif (entryPaths.length === 0) {\n\t\tconsole.warn(\"No entry points found, skipping build\");\n\t\treturn null;\n\t}\n\n\tconst { logs, outputs } = await bunBuild({\n\t\tentrypoints: entryPaths,\n\t\tformat: \"esm\",\n\t\tnaming: `[dir]/[name].[hash].[ext]`,\n\t\toutdir: buildDirAbsolute,\n\t\ttarget: \"bun\"\n\t}).catch((error) => {\n\t\tconsole.error(\"Build failed:\", error);\n\t\texit(1);\n\t});\n\n\tlogs.forEach((log) => {\n\t\tif (log.level === \"error\") console.error(log);\n\t\telse if (log.level === \"warning\") console.warn(log);\n\t\telse if (log.level === \"info\" || log.level === \"debug\")\n\t\t\tconsole.info(log);\n\t});\n\n\tassetsDirAbsolute &&\n\t\t(await $`cp -R ${assetsDirAbsolute} ${buildDirAbsolute}`);\n\n\tif (htmlDirAbsolute) {\n\t\tawait mkdir(join(buildDirAbsolute, \"html\"));\n\t\tawait $`cp -R ${htmlDirAbsolute} ${join(buildDirAbsolute)}`;\n\t}\n\n\tif (htmxDirAbsolute) {\n\t\tawait mkdir(join(buildDirAbsolute, \"htmx\"));\n\t\tawait $`cp -R ${htmxDirAbsolute} ${join(buildDirAbsolute)}`;\n\t}\n\n\tif (tailwind) {\n\t\tawait $`tailwindcss -i ${tailwind.input} -o ${join(buildDirAbsolute, tailwind.output)}`;\n\t}\n\n\tconst manifest = outputs.reduce<Record<string, string>>((acc, artifact) => {\n\t\tlet relativePath = artifact.path;\n\n\t\tif (relativePath.startsWith(buildDirAbsolute)) {\n\t\t\trelativePath = relativePath.slice(buildDirAbsolute.length);\n\t\t}\n\n\t\trelativePath = relativePath.replace(/^\\/+/, \"\");\n\n\t\tconst baseName = relativePath.split(\"/\").pop();\n\t\tif (!baseName) return acc;\n\n\t\tconst hashDelimiter = `.${artifact.hash}.`;\n\t\tif (!baseName.includes(hashDelimiter)) {\n\t\t\tthrow new Error(\n\t\t\t\t`Expected hash delimiter ${hashDelimiter} in ${baseName}`\n\t\t\t);\n\t\t}\n\n\t\tconst [fileName] = baseName.split(hashDelimiter);\n\t\tacc[fileName] = \"/\" + relativePath;\n\t\treturn acc;\n\t}, {});\n\n\thtmlDirAbsolute && (await updateScriptTags(manifest, htmlDirAbsolute));\n\n\tconst end = performance.now();\n\tconst durationMs = end - start;\n\tlet duration;\n\tif (durationMs < MILLISECONDS_IN_A_SECOND) {\n\t\tduration = `${durationMs.toFixed(TIME_PRECISION)}ms`;\n\t} else if (durationMs < MILLISECONDS_IN_A_MINUTE) {\n\t\tduration = `${(durationMs / MILLISECONDS_IN_A_SECOND).toFixed(TIME_PRECISION)}s`;\n\t} else {\n\t\tduration = `${(durationMs / MILLISECONDS_IN_A_MINUTE).toFixed(TIME_PRECISION)}m`;\n\t}\n\tconsole.log(`Build completed in ${duration}`);\n\n\treturn manifest;\n};\n\nconst generateReactIndexFiles = async (\n\treactPagesDirAbsolute: string,\n\treactIndexDirAbsolute: string\n) => {\n\tawait rm(reactIndexDirAbsolute, { force: true, recursive: true });\n\tawait mkdir(reactIndexDirAbsolute);\n\n\tconst pagesGlob = new Glob(\"*.*\");\n\tconst files: string[] = [];\n\tfor await (const file of pagesGlob.scan({ cwd: reactPagesDirAbsolute })) {\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 { ${componentName} } from '../pages/${componentName}';\\n`,\n\t\t\t`hydrateRoot(document, <${componentName} />);`\n\t\t].join(\"\\n\");\n\n\t\treturn writeFile(\n\t\t\tjoin(reactIndexDirAbsolute, `${componentName}Index.tsx`),\n\t\t\tcontent\n\t\t);\n\t});\n\tawait Promise.all(promises);\n};\n\nconst 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\treturn entryPaths;\n};\n",
7
+ "// TODO : this script seems to only work after building twice maybe due to the async nature of it\n\nimport { readFile, writeFile } from \"node:fs/promises\";\nimport { Glob } from \"bun\";\n\n/**\n * Updates <script> tags in all HTML files within htmlDir.\n * For each script tag whose src file base (with or without a hash) is a key in the manifest,\n * the src attribute is replaced with the new hashed file path.\n *\n * @param manifest - An object mapping script base names to the new file path.\n * @param htmlDir - The directory that contains the HTML files.\n */\nexport const updateScriptTags = async (\n\tmanifest: Record<string, string>,\n\thtmlDir: string\n) => {\n\t// Use Glob to find all HTML files in the specified directory\n\tconst htmlGlob = new Glob(\"*.html\");\n\tconst htmlFiles: string[] = [];\n\tfor await (const file of htmlGlob.scan({\n\t\tcwd: htmlDir,\n\t\tabsolute: true\n\t})) {\n\t\thtmlFiles.push(file);\n\t}\n\n\t// Process each HTML file\n\tfor (const filePath of htmlFiles) {\n\t\tlet content = await readFile(filePath, \"utf8\");\n\n\t\t// For each script in the manifest, update matching <script> tags\n\t\tfor (const [scriptName, newPath] of Object.entries(manifest)) {\n\t\t\t// Escape special regex characters in the scriptName\n\t\t\tconst escapedScriptName = scriptName.replace(\n\t\t\t\t/[.*+?^${}()|[\\]\\\\]/g,\n\t\t\t\t\"\\\\$&\"\n\t\t\t);\n\t\t\t// The regex explanation:\n\t\t\t// (1) (<script[^>]+src=[\"']) — capture the opening of the script tag up to the src attribute value\n\t\t\t// (2) (\\/?(?:.*\\\\/)?${escapedScriptName}) — capture any preceding path and the base script name\n\t\t\t// (3) (?:\\.[^.\"'/]+)? — optionally capture a dot and hash (if already hashed)\n\t\t\t// (4) (\\.js) — then capture the js extension\n\t\t\t// (5) ([\"'][^>]*>) — capture the closing quote and remainder of the script tag\n\t\t\tconst regex = new RegExp(\n\t\t\t\t`(<script[^>]+src=[\"'])(\\/?(?:.*\\\\/)?${escapedScriptName})(?:\\\\.[^.\"'/]+)?(\\\\.js)([\"'][^>]*>)`,\n\t\t\t\t\"g\"\n\t\t\t);\n\t\t\t// Replace the matched src attribute with the new value from the manifest\n\t\t\tcontent = content.replace(\n\t\t\t\tregex,\n\t\t\t\t(_, prefix, _oldBase, _ext, suffix) => {\n\t\t\t\t\treturn `${prefix}${newPath}${suffix}`;\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\n\t\tawait writeFile(filePath, content, \"utf8\");\n\t}\n};\n",
8
+ "import { ComponentType, createElement } from \"react\";\n//@ts-expect-error - TODO: Remove this when we upgrade to React 19\nimport { renderToReadableStream } from \"react-dom/server.browser\";\n\nexport const handleReactPageRequest = async (\n\tpageComponent: ComponentType,\n\tindex: string\n) => {\n\tconst page = createElement(pageComponent);\n\tconst stream = await renderToReadableStream(page, {\n\t\tbootstrapModules: [index]\n\t});\n\n\treturn new Response(stream, {\n\t\theaders: { \"Content-Type\": \"text/html\" }\n\t});\n};\n\nexport const handleHTMLPageRequest = (html: string) => Bun.file(html);\n",
9
+ "import { argv } from \"node:process\";\nimport { env } from \"bun\";\nimport { Elysia } from \"elysia\";\nimport { getLocalIPAddress } from \"../utils/networking\";\nimport { DEFAULT_PORT } from \"../constants\";\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",
10
+ "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"
11
+ ],
12
+ "mappings": ";;AAAO,IAAM,sBAAsB;AAC5B,IAAM,2BAA2B;AACjC,IAAM,2BACZ,2BAA2B;AACrB,IAAM,qBAAqB;AAC3B,IAAM,iBAAiB;AACvB,IAAM,wBACZ,2BACA,sBACA,qBACA;AACM,IAAM,iBAAiB;AACvB,IAAM,eAAe;;ACZ5B,iCAAoB;AACpB;AACA;AACA;;;ACDA;AACA;AAUO,IA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AO,OAAO,UAAU,EACxC,KAAK,EACL,OACA,CAAC,UAA4C,UAAU,SACxD;AAAA,EACD,MAAM,YAAY,UAAU,KAC3B,CAAC,UAAU,MAAM,WAAW,WAAW,MAAM,QAC9C;AAAA,EAEA,IAAI;AAAA,IAAW,OAAO,UAAU;AAAA,EAEhC,QAAQ,KAAK,gDAAgD;AAAA,EAE7D,OAAO;AAAA;;;ADXR,IAAI,OAAO,IAAI,QAAQ;AACvB,IAAM,OAAO,IAAI,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;",
13
+ "debugId": "99CA190BCF91F46D64756E2164756E21",
14
+ "names": []
15
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@absolutejs/absolute",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "description": "A fullstack meta-framework for building web applications with TypeScript",
5
5
  "repository": {
6
6
  "type": "git",
@@ -11,7 +11,7 @@
11
11
  "license": "CC BY-NC 4.0",
12
12
  "author": "Alex Kahn",
13
13
  "scripts": {
14
- "build": "rm -rf dist && bun build src/index.ts --outdir dist --target=bun --external react --external react-dom --external elysia && tsc --emitDeclarationOnly --project tsconfig.json",
14
+ "build": "rm -rf dist && bun build src/index.ts --outdir dist --sourcemap --target=bun --external react --external react-dom --external elysia && tsc --emitDeclarationOnly --project tsconfig.json",
15
15
  "test": "echo \"Error: no test specified\" && exit 1",
16
16
  "format": "prettier --write \"./**/*.{js,jsx,ts,tsx,css,json}\"",
17
17
  "dev": "bun run --watch example/server.ts",