@mapl/web 0.2.0-alpha.1 → 0.2.0-alpha.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.
- package/README.md +135 -100
- package/compiler/aot-loader.d.ts +1 -0
- package/compiler/aot-loader.js +1 -0
- package/compiler/aot.js +1 -1
- package/compiler/config.d.ts +1 -1
- package/compiler/config.js +1 -1
- package/compiler/index.d.ts +11 -0
- package/compiler/index.js +1 -0
- package/compiler/jit.d.ts +1 -0
- package/compiler/jit.js +1 -1
- package/constants.d.ts +1 -0
- package/constants.js +1 -1
- package/core/handler.js +1 -1
- package/package.json +7 -5
package/README.md
CHANGED
|
@@ -54,24 +54,30 @@ import { compileToString } from '@mapl/web/compiler/jit';
|
|
|
54
54
|
|
|
55
55
|
import { rolldown } from 'rolldown';
|
|
56
56
|
import { minifySync } from '@swc/core';
|
|
57
|
-
import { writeFileSync
|
|
57
|
+
import { writeFileSync } from 'node:fs';
|
|
58
58
|
|
|
59
|
-
|
|
59
|
+
// Output file
|
|
60
|
+
const ENTRY = ...;
|
|
60
61
|
|
|
61
62
|
writeFileSync(
|
|
62
63
|
ENTRY,
|
|
63
64
|
`
|
|
64
|
-
import
|
|
65
|
+
import "@mapl/web/compiler/aot-loader";
|
|
66
|
+
|
|
67
|
+
import app from '${import.meta.resolve('./main.js')}';
|
|
65
68
|
import hydrate from '@mapl/web/compiler/aot';
|
|
66
69
|
|
|
67
|
-
// Compatible with Bun, Deno, Cloudflare, ...
|
|
68
70
|
export default {
|
|
69
71
|
fetch: (${compileToString(app)})(...hydrate(app))
|
|
70
72
|
};
|
|
71
|
-
|
|
73
|
+
`,
|
|
72
74
|
);
|
|
73
75
|
const input = await rolldown({
|
|
74
76
|
input: ENTRY,
|
|
77
|
+
treeshake: {
|
|
78
|
+
propertyReadSideEffects: false,
|
|
79
|
+
moduleSideEffects: false,
|
|
80
|
+
},
|
|
75
81
|
transform: {
|
|
76
82
|
typescript: {
|
|
77
83
|
rewriteImportExtensions: true,
|
|
@@ -79,128 +85,148 @@ const input = await rolldown({
|
|
|
79
85
|
},
|
|
80
86
|
});
|
|
81
87
|
const output = await input.generate();
|
|
82
|
-
const code = minifySync(output.output[0].code, {
|
|
88
|
+
const code = minifySync(output.output[0].code, {
|
|
89
|
+
module: true,
|
|
90
|
+
mangle: false,
|
|
91
|
+
}).code;
|
|
92
|
+
|
|
83
93
|
writeFileSync(ENTRY, code);
|
|
84
94
|
```
|
|
85
95
|
|
|
86
|
-
Example output
|
|
96
|
+
Example output:
|
|
87
97
|
```js
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
0 ===
|
|
98
|
-
|
|
99
|
-
var r = e(
|
|
98
|
+
var core_default = (middlewares, handlers, children) => [
|
|
99
|
+
middlewares,
|
|
100
|
+
handlers,
|
|
101
|
+
,
|
|
102
|
+
children,
|
|
103
|
+
];
|
|
104
|
+
let attach = (prop, f) => [1, f, prop],
|
|
105
|
+
noType = { type: null },
|
|
106
|
+
mergeData = (...dat) =>
|
|
107
|
+
0 === dat.length ? noType : Object.assign({ type: null }, ...dat);
|
|
108
|
+
var main_default = core_default(
|
|
100
109
|
[
|
|
101
|
-
// inlined layer.tap()
|
|
102
110
|
[
|
|
103
111
|
0,
|
|
104
|
-
(
|
|
105
|
-
console.log(
|
|
112
|
+
(c) => {
|
|
113
|
+
console.log(c.req);
|
|
106
114
|
},
|
|
107
115
|
],
|
|
108
|
-
|
|
109
|
-
|
|
116
|
+
attach('id', () => performance.now()),
|
|
117
|
+
],
|
|
118
|
+
[
|
|
119
|
+
((path, handler, ...dat) => ['', path, handler, mergeData(...dat)])(
|
|
120
|
+
'/path',
|
|
121
|
+
(c) => c.id,
|
|
122
|
+
),
|
|
110
123
|
],
|
|
111
|
-
// handle.any()
|
|
112
|
-
[((...e) => n("", ...e))("/path", (e) => e.id)],
|
|
113
124
|
{
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
[
|
|
117
|
-
|
|
118
|
-
|
|
125
|
+
'/api': core_default(
|
|
126
|
+
[attach('body', async (c) => c.req.text())],
|
|
127
|
+
[
|
|
128
|
+
((path, handler, ...dat) => ['POST', path, handler, mergeData(...dat)])(
|
|
129
|
+
'/body',
|
|
130
|
+
(c) => c.body,
|
|
131
|
+
),
|
|
132
|
+
],
|
|
119
133
|
),
|
|
120
134
|
},
|
|
121
135
|
);
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
136
|
+
let AsyncFunction = (async () => {}).constructor,
|
|
137
|
+
compilerState = [, , , , ,],
|
|
138
|
+
compileErrorHandler$1 = (scope) =>
|
|
139
|
+
(scope[3] ??= compilerState[4](scope[2][0], scope[2][1], scope)),
|
|
140
|
+
clearErrorHandler = (scope) => {
|
|
141
|
+
null != scope[2] && (scope[3] = null);
|
|
126
142
|
},
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
null !=
|
|
138
|
-
for (let
|
|
139
|
-
let
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
-1 ===
|
|
143
|
-
?
|
|
144
|
-
: (
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
1 ===
|
|
148
|
-
?
|
|
149
|
-
: 2 ===
|
|
150
|
-
? (
|
|
151
|
-
: 3 ===
|
|
143
|
+
createContext = (scope) =>
|
|
144
|
+
scope[1]
|
|
145
|
+
? ''
|
|
146
|
+
: ((scope[1] = !0), clearErrorHandler(scope), compilerState[2]),
|
|
147
|
+
createAsyncScope = (scope) =>
|
|
148
|
+
scope[0]
|
|
149
|
+
? ''
|
|
150
|
+
: ((scope[0] = !0), clearErrorHandler(scope), 'return (async()=>{'),
|
|
151
|
+
setTmp = (scope) => (scope[4] ? 't' : ((scope[4] = !0), 'let t')),
|
|
152
|
+
hydrateDependency = (group, scope, prefix) => {
|
|
153
|
+
null != group[2] && ((scope[2] = group[2]), (scope[3] = null));
|
|
154
|
+
for (let i = 0, middlewares = group[0]; i < middlewares.length; i++) {
|
|
155
|
+
let middleware = middlewares[i],
|
|
156
|
+
fn = middleware[1],
|
|
157
|
+
id = middleware[0];
|
|
158
|
+
-1 === id
|
|
159
|
+
? fn(scope)
|
|
160
|
+
: (compilerState[1].push(fn),
|
|
161
|
+
fn.length > 0 && createContext(scope),
|
|
162
|
+
fn instanceof AsyncFunction && createAsyncScope(scope),
|
|
163
|
+
1 === id
|
|
164
|
+
? createContext(scope)
|
|
165
|
+
: 2 === id
|
|
166
|
+
? (setTmp(scope), compileErrorHandler$1(scope))
|
|
167
|
+
: 3 === id &&
|
|
168
|
+
(setTmp(scope),
|
|
169
|
+
compileErrorHandler$1(scope),
|
|
170
|
+
createContext(scope)));
|
|
152
171
|
}
|
|
153
|
-
for (let
|
|
154
|
-
let
|
|
155
|
-
|
|
156
|
-
|
|
172
|
+
for (let i = 0, handlers = group[1]; i < handlers.length; i++) {
|
|
173
|
+
let handler = handlers[i];
|
|
174
|
+
compilerState[3](
|
|
175
|
+
handler[2],
|
|
176
|
+
handler[3],
|
|
177
|
+
prefix + ('/' === handler[1] || '' !== prefix ? '' : handler[1]),
|
|
178
|
+
scope,
|
|
179
|
+
);
|
|
157
180
|
}
|
|
158
|
-
let
|
|
159
|
-
if (null !=
|
|
181
|
+
let childGroups = group[3];
|
|
182
|
+
if (null != childGroups)
|
|
183
|
+
for (let childPrefix in childGroups)
|
|
184
|
+
hydrateDependency(
|
|
185
|
+
childGroups[childPrefix],
|
|
186
|
+
scope.slice(),
|
|
187
|
+
'/' === childPrefix ? prefix : prefix + childPrefix,
|
|
188
|
+
);
|
|
160
189
|
},
|
|
161
|
-
|
|
162
|
-
var
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
[
|
|
167
|
-
[
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
let r = t(e);
|
|
190
|
+
_ = Symbol.for('@safe-std/error');
|
|
191
|
+
var aot_default = {
|
|
192
|
+
fetch: ((me, mwc, f1, f2, f3, f4, f5) => {
|
|
193
|
+
var t = ['text/html', 'application/json'].map((c) => ['Content-Type', c]),
|
|
194
|
+
[mwh, mwj] = t,
|
|
195
|
+
[mwoh, mwoj] = t.map((c) => ({ headers: [c] })),
|
|
196
|
+
[mwn, mwb] = [404, 400].map((s) => new Response(null, { status: s }));
|
|
197
|
+
return (r) => {
|
|
198
|
+
let u = r.url,
|
|
199
|
+
s = u.indexOf('/', 12) + 1,
|
|
200
|
+
e = u.indexOf('?', s),
|
|
201
|
+
p = -1 === e ? u.slice(s) : u.slice(s, e);
|
|
202
|
+
if ('POST' === r.method && 'api' === p) {
|
|
203
|
+
let c = mwc(r);
|
|
176
204
|
return (
|
|
177
|
-
|
|
178
|
-
(
|
|
179
|
-
(async () => ((
|
|
205
|
+
f1(c),
|
|
206
|
+
(c.id = f2()),
|
|
207
|
+
(async () => ((c.body = await f4(c)), new Response(f5(c), c)))()
|
|
180
208
|
);
|
|
181
209
|
}
|
|
182
|
-
if (
|
|
183
|
-
let
|
|
184
|
-
return (
|
|
210
|
+
if ('path' === p) {
|
|
211
|
+
let c = mwc(r);
|
|
212
|
+
return f1(c), (c.id = f2()), new Response(f3(c), c);
|
|
185
213
|
}
|
|
186
|
-
return
|
|
214
|
+
return mwn;
|
|
187
215
|
};
|
|
188
216
|
})(
|
|
189
|
-
...((
|
|
190
|
-
(
|
|
191
|
-
(
|
|
192
|
-
(
|
|
193
|
-
(
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
// inject dependencies
|
|
217
|
+
...((compilerState[0] = {}),
|
|
218
|
+
(compilerState[1] = []),
|
|
219
|
+
(compilerState[2] = ''),
|
|
220
|
+
(compilerState[3] = (fn) => (compilerState[1].push(fn), '')),
|
|
221
|
+
(compilerState[4] = (fn) => (compilerState[1].push(fn), '')),
|
|
222
|
+
hydrateDependency(main_default, [!1, !1, , '', !1], ''),
|
|
197
223
|
[
|
|
198
|
-
(
|
|
199
|
-
(
|
|
200
|
-
].concat(
|
|
224
|
+
(u) => Array.isArray(u) && u[0] === _,
|
|
225
|
+
(r) => ({ status: 200, req: r, headers: [] }),
|
|
226
|
+
].concat(compilerState[1])),
|
|
201
227
|
),
|
|
202
228
|
};
|
|
203
|
-
export {
|
|
229
|
+
export { aot_default as default };
|
|
204
230
|
```
|
|
205
231
|
|
|
206
232
|
### Hydration
|
|
@@ -212,3 +238,12 @@ import { isHydrating } from '@mapl/web/compiler/config';
|
|
|
212
238
|
// Use this to for minifiedrs to eliminate unused code path in final output
|
|
213
239
|
isHydrating();
|
|
214
240
|
```
|
|
241
|
+
|
|
242
|
+
### Compiling external dependencies
|
|
243
|
+
```ts
|
|
244
|
+
import { injectLocalDependency, localDependency } from '@mapl/web/compiler';
|
|
245
|
+
|
|
246
|
+
const hello = injectLocalDependency<() => void>(`() => console.log('hello')`);
|
|
247
|
+
// After compiler is executed
|
|
248
|
+
localDependency(hello)();
|
|
249
|
+
```
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{hydrating}from"./config.js";hydrating();
|
package/compiler/aot.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{hydrateDependency,
|
|
1
|
+
import{hydrateDependency,externalDependencies,setHooks}from"@mapl/framework";import{isErr}from"@safe-std/error";import createContext from"../core/context.js";import{compiledDeps}from"./index.js";export default router=>{externalDependencies.length=0;let hook=fn=>{externalDependencies.push(fn);return``};setHooks({compileHandler:hook,compileErrorHandler:hook});hydrateDependency(router,[false,false,,``,false],``);return[isErr,createContext,compiledDeps].concat(externalDependencies)};
|
package/compiler/config.d.ts
CHANGED
package/compiler/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
let hydrateDependency=
|
|
1
|
+
let hydrateDependency=false;export let isHydrating=()=>hydrateDependency;export let hydrating=()=>{hydrateDependency=true};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type LocalDependency<T = unknown> = number & [T];
|
|
2
|
+
declare let;
|
|
3
|
+
/**
|
|
4
|
+
* Inject a dependency
|
|
5
|
+
*/
|
|
6
|
+
export declare const injectLocalDependency: <T>(val: string) => LocalDependency<T>;
|
|
7
|
+
/**
|
|
8
|
+
* Get local dependency value
|
|
9
|
+
* @param i
|
|
10
|
+
*/
|
|
11
|
+
export declare const localDependency: <T>(i: LocalDependency<T>) => T;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{externalDependencies}from"@mapl/framework";import{isHydrating}from"./config.js";export let compiledDeps=[];let localDeps=``,localDepsCnt=0;export let injectLocalDependency=val=>{if(!isHydrating())localDeps+=`mwl.push(`+val+`);`;return localDepsCnt++};export let localDependencies=()=>localDeps;export let localDependency=i=>compiledDeps[i];export let stateToArgs=()=>{let depsString=`me,mwc,mwl`;for(let i=0;i<externalDependencies.length;i++)depsString+=`,f`+(i+1);return depsString};
|
package/compiler/jit.d.ts
CHANGED
package/compiler/jit.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{compileGroup,createArgSet,AsyncFunction,
|
|
1
|
+
import{compileGroup,createArgSet,AsyncFunction,setHooks,externalDependencies,contextInit,setContextInit}from"@mapl/framework";import compile from"@mapl/router/method/compiler";import{countParams}from"@mapl/router/path";import{insertItem}from"@mapl/router/method";import{isErr}from"@safe-std/error";import createContext from"../core/context.js";import{compiledDeps,localDependencies,stateToArgs}from"./index.js";let urlRouter;let paramArgs=createArgSet(new Array(16).fill(0).map((_1,i)=>`q`+i));let compileReturn=(dat,fnAsync,scopeAsync,contextCreated,result)=>{let typ=dat.type;if(typ===`raw`)return`return `+result;fnAsync&&(result=`await `+result);let str=typ==null?`return new Response(`+result+(contextCreated?`,c)`:`)`):contextCreated?`c.headers.push(`+(typ===`json`?`mwj`:`mwh`)+`);return new Response(`+(typ===`json`?`JSON.stringify(`+result+`)`:result)+`,c)`:`return new Response(`+(typ===`json`?`JSON.stringify(`+result+`),mwoj`:result+`,mwoh`)+`)`;return fnAsync&&!scopeAsync?`return (async()=>{`+str+`})()`:str};let compileToState=router=>{urlRouter={};externalDependencies.length=0;setHooks({compileHandler:(fn,dat,path,scope)=>{let call=`f`+externalDependencies.push(fn)+`(`;let paramCount=countParams(path);paramCount>0&&(call+=paramArgs[paramCount]);if(fn.length>paramCount){call+=paramCount===0?`c`:`,c`;if(!scope[1])return contextInit()+compileReturn(dat,fn instanceof AsyncFunction,scope[0],true,call+`)`)}return compileReturn(dat,fn instanceof AsyncFunction,scope[0],scope[1],call+`)`)},compileErrorHandler:(fn,dat,scope)=>{let call=`f`+externalDependencies.push(fn)+`(t`;if(fn.length>1){call+=`,c`;if(!scope[1])return contextInit()+compileReturn(dat,fn instanceof AsyncFunction,scope[0],true,call+`)`)}return compileReturn(dat,fn instanceof AsyncFunction,scope[0],scope[1],call+`)`)},registerCompiled:(method,path,content)=>insertItem(urlRouter,method,path,content)});setContextInit(`let c=mwc(r);`);compileGroup(router,[false,false,,`return mwb`,false],``,``)};export let stateToString=()=>`"use strict";var t=["text/html","application/json"].map(c=>["Content-Type",c]),[mwh,mwj]=t,[mwoh,mwoj]=t.map(c=>({headers:[c]})),[mwn,mwb]=[404,400].map(s=>new Response(null,{status:s}));`+localDependencies()+`return(r)=>{`+compile(urlRouter,`r.method`,`let u=r.url,s=u.indexOf("/",12)+1,e=u.indexOf("?",s),p=e===-1?u.slice(s):u.slice(s,e);`,1)+`return mwn}`;export let compileToString=router=>{compileToState(router);return`(`+stateToArgs()+`)=>{`+stateToString()+`}`};export let compileToHandler=router=>{compileToState(router);return Function(stateToArgs(),stateToString())(isErr,createContext,compiledDeps,...externalDependencies)};
|
package/constants.d.ts
CHANGED
package/constants.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{MAPL,CTX,PATH,REQ,URL,PATH_START,PATH_END,TMP}from"@mapl/framework/constants";export*from"@mapl/framework/constants";export let WEB=MAPL+`w`;export let CTX_FN=WEB+`c`;export let CTX_INIT=`let `+CTX+`=`+CTX_FN+`(`+REQ+`);`;export let PARSE_PATH=`let `+URL+`=`+REQ+`.url,`+PATH_START+`=`+URL+`.indexOf("/",12)+1,`+PATH_END+`=`+URL+`.indexOf("?",`+PATH_START+`),`+PATH+`=`+PATH_END+`===-1?`+URL+`.slice(`+PATH_START+`):`+URL+`.slice(`+PATH_START+`,`+PATH_END+`);`;export let CHTML=WEB+`h`;export let CJSON=WEB+`j`;export let OHTML=WEB+`oh`;export let OJSON=WEB+`oj`;export let R404=WEB+`n`;export let R400=WEB+`b`;export let GLOBALS=`var `+TMP+`=["text/html","application/json"].map(c=>["Content-Type",c]),[`+CHTML+`,`+CJSON+`]=`+TMP+`,[`+OHTML+`,`+OJSON+`]=`+TMP+`.map(c=>({headers:[c]})),[`+R404+`,`+R400+`]=[404,400].map(s=>new Response(null,{status:s}))
|
|
1
|
+
import{MAPL,CTX,PATH,REQ,URL,PATH_START,PATH_END,TMP}from"@mapl/framework/constants";export*from"@mapl/framework/constants";export let WEB=MAPL+`w`;export let LOCAL_DEPS=WEB+`l`;export let CTX_FN=WEB+`c`;export let CTX_INIT=`let `+CTX+`=`+CTX_FN+`(`+REQ+`);`;export let PARSE_PATH=`let `+URL+`=`+REQ+`.url,`+PATH_START+`=`+URL+`.indexOf("/",12)+1,`+PATH_END+`=`+URL+`.indexOf("?",`+PATH_START+`),`+PATH+`=`+PATH_END+`===-1?`+URL+`.slice(`+PATH_START+`):`+URL+`.slice(`+PATH_START+`,`+PATH_END+`);`;export let CHTML=WEB+`h`;export let CJSON=WEB+`j`;export let OHTML=WEB+`oh`;export let OJSON=WEB+`oj`;export let R404=WEB+`n`;export let R400=WEB+`b`;export let GLOBALS=`var `+TMP+`=["text/html","application/json"].map(c=>["Content-Type",c]),[`+CHTML+`,`+CJSON+`]=`+TMP+`,[`+OHTML+`,`+OJSON+`]=`+TMP+`.map(c=>({headers:[c]})),[`+R404+`,`+R400+`]=[404,400].map(s=>new Response(null,{status:s}));`;
|
package/core/handler.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export let json={type:`json`};export let html={type:`html`};export let raw={type:`raw`};let noType={type:null};export let error=(r,f,...dat)=>{r[2]=[f,dat.length===0?noType:Object.assign({type:null},...dat)];return r};
|
|
1
|
+
export let json={type:`json`};export let html={type:`html`};export let raw={type:`raw`};let noType={type:null};export let error=(r,f,...dat)=>{r[2]=[f,dat.length===0?noType:Object.assign({type:null},...dat)];return r};let mergeData=(...dat)=>dat.length===0?noType:Object.assign({type:null},...dat);export let route=(method,path,handler,...dat)=>[method,path,handler,mergeData(...dat)];export let any=(path,handler,...dat)=>[``,path,handler,mergeData(...dat)];export let get=(path,handler,...dat)=>[`GET`,path,handler,mergeData(...dat)];export let post=(path,handler,...dat)=>[`POST`,path,handler,mergeData(...dat)];export let put=(path,handler,...dat)=>[`PUT`,path,handler,mergeData(...dat)];export let del=(path,handler,...dat)=>[`DELETE`,path,handler,mergeData(...dat)];export let patch=(path,handler,...dat)=>[`PATCH`,path,handler,mergeData(...dat)];export let options=(path,handler,...dat)=>[`OPTIONS`,path,handler,mergeData(...dat)];export let trace=(path,handler,...dat)=>[`TRACE`,path,handler,mergeData(...dat)];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mapl/web",
|
|
3
|
-
"version": "0.2.0-alpha.
|
|
3
|
+
"version": "0.2.0-alpha.3",
|
|
4
4
|
"description": "A compiled web framework for all runtimes",
|
|
5
5
|
"keywords": ["fast", "lightweight", "cross-runtime", "framework", "web", "backend"],
|
|
6
6
|
"repository": {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"main": "./index.js",
|
|
13
13
|
"types": "./index.d.ts",
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@mapl/framework": "^0.3.
|
|
15
|
+
"@mapl/framework": "^0.3.7",
|
|
16
16
|
"@mapl/router": "^0.6.2",
|
|
17
17
|
"@safe-std/error": "^1.0.1"
|
|
18
18
|
},
|
|
@@ -20,17 +20,19 @@
|
|
|
20
20
|
"secure-headers": "^0.0.6"
|
|
21
21
|
},
|
|
22
22
|
"exports": {
|
|
23
|
-
"./constants": "./constants.js",
|
|
24
23
|
".": "./index.js",
|
|
24
|
+
"./constants": "./constants.js",
|
|
25
25
|
"./core/utils": "./core/utils.js",
|
|
26
26
|
"./core/middleware": "./core/middleware.js",
|
|
27
|
-
"./core": "./core/index.js",
|
|
28
27
|
"./utils/cors": "./utils/cors.js",
|
|
29
|
-
"./core
|
|
28
|
+
"./core": "./core/index.js",
|
|
30
29
|
"./core/context": "./core/context.js",
|
|
30
|
+
"./core/handler": "./core/handler.js",
|
|
31
31
|
"./utils/headers": "./utils/headers.js",
|
|
32
32
|
"./compiler/aot": "./compiler/aot.js",
|
|
33
33
|
"./compiler/jit": "./compiler/jit.js",
|
|
34
|
+
"./compiler": "./compiler/index.js",
|
|
35
|
+
"./compiler/aot-loader": "./compiler/aot-loader.js",
|
|
34
36
|
"./utils/secure-headers": "./utils/secure-headers.js",
|
|
35
37
|
"./compiler/config": "./compiler/config.js"
|
|
36
38
|
}
|