@absolutejs/absolute 0.1.1 → 0.1.3

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.
@@ -0,0 +1,2 @@
1
+ export * from "./build";
2
+ export * from "./pageHandlers";
@@ -0,0 +1,4 @@
1
+ export * from "./constants";
2
+ export * from "./core/index";
3
+ export * from "./plugins/index";
4
+ export * from "./utils/index";
@@ -0,0 +1,2 @@
1
+ export * from "./networkingPlugin";
2
+ export * from "./pageRouterPlugin";
@@ -0,0 +1,2 @@
1
+ export * from "./networking";
2
+ export * from "./updateScriptTags";
package/package.json CHANGED
@@ -1,34 +1,34 @@
1
1
  {
2
- "name": "@absolutejs/absolute",
3
- "version": "0.1.1",
4
- "description": "A fullstack meta-framework for building web applications with TypeScript",
5
- "repository": {
6
- "type": "git",
7
- "url": "https://github.com/alexkahndev/absolutejs.git"
8
- },
9
- "main": "./dist/index.js",
10
- "types": "./dist/index.d.ts",
11
- "license": "CC BY-NC 4.0",
12
- "author": "Alex Kahn",
13
- "scripts": {
14
- "build": "bun build src/**/* --outdir dist --minify --splitting --target=bun && tsc --emitDeclarationOnly --project tsconfig.json",
15
- "test": "echo \"Error: no test specified\" && exit 1",
16
- "format": "prettier --write \"./**/*.{js,jsx,ts,tsx,css}\"",
17
- "dev": "bun run --watch example/server.ts"
18
- },
19
- "dependencies": {
20
- "@elysiajs/static": "1.0.2",
21
- "elysia": "1.0.13",
22
- "react": "19.1.0",
23
- "react-dom": "19.1.0",
24
- "svelte": "4.2.15",
25
- "vue": "3.4.26"
26
- },
27
- "devDependencies": {
28
- "@types/bun": "1.1.1",
29
- "@types/react": "19.1.0",
30
- "@types/react-dom": "19.1.2",
31
- "@types/vue": "2.0.0",
32
- "typescript": "5.7.2"
33
- }
2
+ "name": "@absolutejs/absolute",
3
+ "version": "0.1.3",
4
+ "description": "A fullstack meta-framework for building web applications with TypeScript",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/alexkahndev/absolutejs.git"
8
+ },
9
+ "main": "./dist/index.js",
10
+ "types": "./dist/src/index.d.ts",
11
+ "license": "CC BY-NC 4.0",
12
+ "author": "Alex Kahn",
13
+ "scripts": {
14
+ "build": "rm -rf dist && bun build src/index.ts --outdir dist --minify --splitting --target=bun && tsc --emitDeclarationOnly --project tsconfig.json",
15
+ "test": "echo \"Error: no test specified\" && exit 1",
16
+ "format": "prettier --write \"./**/*.{js,jsx,ts,tsx,css,json}\"",
17
+ "dev": "bun run --watch example/server.ts"
18
+ },
19
+ "dependencies": {
20
+ "@elysiajs/static": "1.0.2",
21
+ "elysia": "1.0.13",
22
+ "react": "19.1.0",
23
+ "react-dom": "19.1.0",
24
+ "svelte": "4.2.15",
25
+ "vue": "3.4.26"
26
+ },
27
+ "devDependencies": {
28
+ "@types/bun": "1.1.1",
29
+ "@types/react": "19.1.0",
30
+ "@types/react-dom": "19.1.2",
31
+ "@types/vue": "2.0.0",
32
+ "typescript": "5.7.2"
33
+ }
34
34
  }
package/src/core/build.ts CHANGED
@@ -112,9 +112,6 @@ export const build = async () => {
112
112
  }
113
113
  console.log(`Build completed in ${duration}`);
114
114
 
115
- console.log("Outputs:", outputs);
116
- console.log("Manifest:", manifest);
117
-
118
115
  return manifest;
119
116
  };
120
117
 
package/tsconfig.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
- "compilerOptions": {
3
- "target": "ESNext",
2
+ "compilerOptions": {
3
+ "target": "ESNext",
4
4
  "module": "ESNext",
5
- "moduleResolution": "bundler",
6
- "jsx": "react-jsx",
7
- "esModuleInterop": true,
8
- "forceConsistentCasingInFileNames": true,
9
- "outDir": "dist",
10
- "strict": true,
11
- "declaration": true,
12
- "skipLibCheck": true,
13
- "lib": ["DOM", "DOM.Iterable", "ESNext"],
14
- },
15
- "include": ["src/**/*", "example/**/*"],
16
- "exclude": ["node_modules"]
5
+ "moduleResolution": "bundler",
6
+ "jsx": "react-jsx",
7
+ "esModuleInterop": true,
8
+ "forceConsistentCasingInFileNames": true,
9
+ "outDir": "dist",
10
+ "strict": true,
11
+ "declaration": true,
12
+ "skipLibCheck": true,
13
+ "lib": ["DOM", "DOM.Iterable", "ESNext"]
14
+ },
15
+ "include": ["src/**/*", "example/**/*"],
16
+ "exclude": ["node_modules"]
17
17
  }
@@ -1,2 +0,0 @@
1
- var _=1000,N=60000;var I=2,S=3000;
2
- export{_ as b,N as c,I as d,S as e};
@@ -1,2 +0,0 @@
1
- var g=Object.create;var{getPrototypeOf:h,defineProperty:f,getOwnPropertyNames:i}=Object;var j=Object.prototype.hasOwnProperty;var k=(a,b,c)=>{c=a!=null?g(h(a)):{};let d=b||!a||!a.__esModule?f(c,"default",{value:a,enumerable:!0}):c;for(let e of i(a))if(!j.call(d,e))f(d,e,{get:()=>a[e],enumerable:!0});return d};var l=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports);
2
- export{k as h,l as i};
@@ -1,5 +0,0 @@
1
- // @bun
2
- import{b as C,c as T,d as F}from"../build-241dg605.js";import{g as M}from"../utils/updateScriptTags.js";import"../build-azzc5a4m.js";import{rm as _,mkdir as v,writeFile as g}from"node:fs/promises";import{join as z,basename as f}from"node:path";import{exit as E}from"node:process";var{$:L,build:b,Glob:$}=globalThis.Bun;var J=z(import.meta.dir,"..",".."),H=z(J,"example/build"),N=z(J,"example/assets"),k=z(J,"example/react/indexes"),h=z(J,"example/javascript"),j=z(J,"example/typescript"),I=z(J,"example/react/pages"),D=z(J,"example/html"),o=async()=>{let A=performance.now();await _(H,{force:!0,recursive:!0}),await m();let X=new $("*.{tsx,jsx}"),Y=[];for await(let q of X.scan({absolute:!0,cwd:k}))Y.push(q);let V=new $("*.js"),Z=[];for await(let q of V.scan({absolute:!0,cwd:h}))Z.push(q);let Q=new $("*.ts"),B=[];for await(let q of Q.scan({absolute:!0,cwd:j}))B.push(q);let y=Y.concat(Z).concat(B),{logs:P,outputs:O}=await b({entrypoints:y,format:"esm",naming:"[dir]/[name].[hash].[ext]",outdir:H}).catch((q)=>{console.error("Build failed:",q),E(1)});P.forEach((q)=>{if(q.level==="error")console.error(q);else if(q.level==="warning")console.warn(q);else if(q.level==="info"||q.level==="debug")console.info(q)}),await u();let x=O.reduce((q,R)=>{let K=R.path;if(K.startsWith(H))K=K.slice(H.length);K=K.replace(/^\/+/,"");let w=K.split("/").pop();if(!w)return q;let G=`.${R.hash}.`;if(!w.includes(G))throw new Error(`Expected hash delimiter ${G} in ${w}`);let[S]=w.split(G);return q[S]="/"+K,q},{});await M(x,D);let W=performance.now()-A,U;if(W<C)U=`${W.toFixed(F)}ms`;else if(W<T)U=`${(W/C).toFixed(F)}s`;else U=`${(W/T).toFixed(F)}m`;return console.log(`Build completed in ${U}`),console.log("Outputs:",O),console.log("Manifest:",x),x},u=async()=>{await L`cp -R ${N} ${H}`,await v(z(H,"html")),await v(z(H,"htmx")),await L`cp -R ${z(J,"example/html")} ${z(H)}`,await L`cp -R ${z(J,"example/htmx")} ${z(H)}`},m=async()=>{await _(k,{force:!0,recursive:!0}),await v(k);let A=new $("*.*"),X=[];for await(let V of A.scan({cwd:I}))X.push(V);let Y=X.map(async(V)=>{let Z=f(V),[Q]=Z.split("."),B=["import { hydrateRoot } from 'react-dom/client';",`import { ${Q} } from '../pages/${Q}';
3
- `,`hydrateRoot(document, <${Q} />);`].join(`
4
- `);return g(z(k,`${Q}Index.tsx`),B)});await Promise.all(Y)};export{o as build};
5
- export{o as a};