@vesk/compiler 0.0.1
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 +23 -0
- package/dist/acorn-ts-plugin/index.d.ts +482 -0
- package/dist/acorn-ts-plugin/index.d.ts.map +1 -0
- package/dist/acorn-ts-plugin/index.js +5028 -0
- package/dist/actions.d.ts +22 -0
- package/dist/actions.d.ts.map +1 -0
- package/dist/actions.js +167 -0
- package/dist/api-routes.d.ts +30 -0
- package/dist/api-routes.d.ts.map +1 -0
- package/dist/api-routes.js +350 -0
- package/dist/client-codegen.d.ts +19 -0
- package/dist/client-codegen.d.ts.map +1 -0
- package/dist/client-codegen.js +1523 -0
- package/dist/config.d.ts +6 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +106 -0
- package/dist/errors.d.ts +33 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +210 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/ir-generator.d.ts +10 -0
- package/dist/ir-generator.d.ts.map +1 -0
- package/dist/ir-generator.js +1062 -0
- package/dist/ir.d.ts +160 -0
- package/dist/ir.d.ts.map +1 -0
- package/dist/ir.js +219 -0
- package/dist/middleware.d.ts +15 -0
- package/dist/middleware.d.ts.map +1 -0
- package/dist/middleware.js +183 -0
- package/dist/package.json +15 -0
- package/dist/parser.d.ts +38 -0
- package/dist/parser.d.ts.map +1 -0
- package/dist/parser.js +242 -0
- package/dist/router.d.ts +31 -0
- package/dist/router.d.ts.map +1 -0
- package/dist/router.js +451 -0
- package/dist/scan.d.ts +106 -0
- package/dist/scan.d.ts.map +1 -0
- package/dist/scan.js +438 -0
- package/dist/server-codegen.d.ts +5 -0
- package/dist/server-codegen.d.ts.map +1 -0
- package/dist/server-codegen.js +4 -0
- package/dist/server-cookies.d.ts +2 -0
- package/dist/server-cookies.d.ts.map +1 -0
- package/dist/server-cookies.js +15 -0
- package/dist/server-head.d.ts +10 -0
- package/dist/server-head.d.ts.map +1 -0
- package/dist/server-head.js +289 -0
- package/dist/server-jsgen.d.ts +6 -0
- package/dist/server-jsgen.d.ts.map +1 -0
- package/dist/server-jsgen.js +446 -0
- package/dist/server-render.d.ts +16 -0
- package/dist/server-render.d.ts.map +1 -0
- package/dist/server-render.js +397 -0
- package/dist/server-utils.d.ts +93 -0
- package/dist/server-utils.d.ts.map +1 -0
- package/dist/server-utils.js +747 -0
- package/dist/ssr-store.d.ts +4 -0
- package/dist/ssr-store.d.ts.map +1 -0
- package/dist/ssr-store.js +29 -0
- package/dist/strip-ts.d.ts +25 -0
- package/dist/strip-ts.d.ts.map +1 -0
- package/dist/strip-ts.js +171 -0
- package/dist/tokens.d.ts +50 -0
- package/dist/tokens.d.ts.map +1 -0
- package/dist/tokens.js +334 -0
- package/dist/typecheck.d.ts +19 -0
- package/dist/typecheck.d.ts.map +1 -0
- package/dist/typecheck.js +365 -0
- package/dist/types.d.ts +147 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +13 -0
- package/dist/vesk-plugin.d.ts +53 -0
- package/dist/vesk-plugin.d.ts.map +1 -0
- package/dist/vesk-plugin.js +413 -0
- package/dist/vsk-imports.d.ts +30 -0
- package/dist/vsk-imports.d.ts.map +1 -0
- package/dist/vsk-imports.js +141 -0
- package/dist/vsk-tsx.d.ts +3 -0
- package/dist/vsk-tsx.d.ts.map +1 -0
- package/dist/vsk-tsx.js +604 -0
- package/package.json +52 -0
package/dist/ir.d.ts
ADDED
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import type { Node as ESTreeNode } from 'estree';
|
|
2
|
+
export declare class Expression {
|
|
3
|
+
raw: string;
|
|
4
|
+
ast: ESTreeNode | null;
|
|
5
|
+
source: string | null;
|
|
6
|
+
deps: string[];
|
|
7
|
+
constructor(raw: string, deps?: string[], ast?: ESTreeNode | null, source?: string | null);
|
|
8
|
+
}
|
|
9
|
+
export declare class IRRoot {
|
|
10
|
+
components: ComponentIR[];
|
|
11
|
+
imports: string[];
|
|
12
|
+
importedNames: Set<string>;
|
|
13
|
+
staticProps: string | null;
|
|
14
|
+
loadFn: string | null;
|
|
15
|
+
topLevelCode: string[];
|
|
16
|
+
constructor(components: ComponentIR[], imports?: string[], importedNames?: Set<string>, staticProps?: string | null, loadFn?: string | null, topLevelCode?: string[]);
|
|
17
|
+
}
|
|
18
|
+
export declare class ComponentIR {
|
|
19
|
+
name: string;
|
|
20
|
+
paramNames: string[];
|
|
21
|
+
propsType: string | null;
|
|
22
|
+
isClient: boolean;
|
|
23
|
+
isAsync: boolean;
|
|
24
|
+
ssrAwait: boolean;
|
|
25
|
+
mode: 'expression' | 'statement';
|
|
26
|
+
body: IRNode[];
|
|
27
|
+
style: string | null;
|
|
28
|
+
exported: boolean;
|
|
29
|
+
defaultExport: boolean;
|
|
30
|
+
constructor(name: string, paramNames: string[], body: IRNode[], opts?: {
|
|
31
|
+
isClient?: boolean;
|
|
32
|
+
isAsync?: boolean;
|
|
33
|
+
ssrAwait?: boolean;
|
|
34
|
+
mode?: 'expression' | 'statement';
|
|
35
|
+
exported?: boolean;
|
|
36
|
+
defaultExport?: boolean;
|
|
37
|
+
propsType?: string | null;
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
export declare class StaticNode {
|
|
41
|
+
tag: string;
|
|
42
|
+
attributes: {
|
|
43
|
+
name: string;
|
|
44
|
+
value: string;
|
|
45
|
+
}[];
|
|
46
|
+
children: IRNode[];
|
|
47
|
+
selfClosing: boolean;
|
|
48
|
+
keyExpr: Expression | null;
|
|
49
|
+
constructor(tag: string, attributes: {
|
|
50
|
+
name: string;
|
|
51
|
+
value: string;
|
|
52
|
+
}[], children: IRNode[], keyExpr?: Expression | null);
|
|
53
|
+
}
|
|
54
|
+
export declare class TextNode {
|
|
55
|
+
value: string;
|
|
56
|
+
constructor(value: string);
|
|
57
|
+
}
|
|
58
|
+
export declare class DynamicBinding {
|
|
59
|
+
kind: 'text' | 'attribute';
|
|
60
|
+
target: string | null;
|
|
61
|
+
expression: Expression;
|
|
62
|
+
constructor(expression: Expression, kind?: 'text' | 'attribute', target?: string | null);
|
|
63
|
+
}
|
|
64
|
+
export declare class OpaqueDynamicRegion {
|
|
65
|
+
condition: Expression;
|
|
66
|
+
consequentNodes: IRNode[];
|
|
67
|
+
alternateNodes: IRNode[];
|
|
68
|
+
constructor(condition: Expression, consequentNodes: IRNode[], alternateNodes?: IRNode[]);
|
|
69
|
+
}
|
|
70
|
+
export declare class MapRegion {
|
|
71
|
+
expression: Expression;
|
|
72
|
+
itemVariable: string;
|
|
73
|
+
indexVariable: string | null;
|
|
74
|
+
bodyTemplate: IRNode[];
|
|
75
|
+
keyExpr: Expression | null;
|
|
76
|
+
alternateNodes: IRNode[];
|
|
77
|
+
constructor(expression: Expression, itemVariable: string, bodyTemplate: IRNode[], keyExpr?: Expression | null, indexVariable?: string | null, alternateNodes?: IRNode[]);
|
|
78
|
+
}
|
|
79
|
+
export declare class ComponentRef {
|
|
80
|
+
componentName: string;
|
|
81
|
+
constructor(componentName: string);
|
|
82
|
+
}
|
|
83
|
+
export declare class ComponentCall {
|
|
84
|
+
componentName: string;
|
|
85
|
+
props: {
|
|
86
|
+
name: string;
|
|
87
|
+
value: Expression;
|
|
88
|
+
}[];
|
|
89
|
+
spreadProps: Expression[];
|
|
90
|
+
children: IRNode[];
|
|
91
|
+
start: number;
|
|
92
|
+
constructor(componentName: string, props: {
|
|
93
|
+
name: string;
|
|
94
|
+
value: Expression;
|
|
95
|
+
}[], children?: IRNode[], spreadProps?: Expression[], start?: number);
|
|
96
|
+
}
|
|
97
|
+
export declare class SlotNode {
|
|
98
|
+
constructor();
|
|
99
|
+
}
|
|
100
|
+
export declare class WhileLoop {
|
|
101
|
+
condition: Expression;
|
|
102
|
+
bodyTemplate: IRNode[];
|
|
103
|
+
isDoWhile: boolean;
|
|
104
|
+
constructor(condition: Expression, bodyTemplate: IRNode[], isDoWhile?: boolean);
|
|
105
|
+
}
|
|
106
|
+
export declare class SwitchCase {
|
|
107
|
+
body: IRNode[];
|
|
108
|
+
constructor(body: IRNode[]);
|
|
109
|
+
}
|
|
110
|
+
export declare class SwitchBlock {
|
|
111
|
+
discriminant: Expression;
|
|
112
|
+
cases: Array<{
|
|
113
|
+
test: Expression | null;
|
|
114
|
+
body: IRNode[];
|
|
115
|
+
}>;
|
|
116
|
+
constructor(discriminant: Expression, cases: Array<{
|
|
117
|
+
test: Expression | null;
|
|
118
|
+
body: IRNode[];
|
|
119
|
+
}>);
|
|
120
|
+
}
|
|
121
|
+
export declare class TryCatch {
|
|
122
|
+
bodyTemplate: IRNode[];
|
|
123
|
+
catchBody: IRNode[];
|
|
124
|
+
catchParamName: string | null;
|
|
125
|
+
constructor(bodyTemplate: IRNode[], catchBody: IRNode[], catchParamName?: string | null);
|
|
126
|
+
}
|
|
127
|
+
export declare class TrackDecl {
|
|
128
|
+
name: string;
|
|
129
|
+
rawName: string | null;
|
|
130
|
+
init: string;
|
|
131
|
+
constructor(name: string, init: string, rawName: string | null);
|
|
132
|
+
}
|
|
133
|
+
export declare class RuntimeStatement {
|
|
134
|
+
raw: string;
|
|
135
|
+
ast: ESTreeNode | null;
|
|
136
|
+
source: string | null;
|
|
137
|
+
constructor(raw: string, ast?: ESTreeNode | null, source?: string | null);
|
|
138
|
+
}
|
|
139
|
+
export declare class ForLoop {
|
|
140
|
+
init: string;
|
|
141
|
+
condition: Expression;
|
|
142
|
+
update: string;
|
|
143
|
+
bodyTemplate: IRNode[];
|
|
144
|
+
kind: 'for' | 'for-in';
|
|
145
|
+
constructor(init: string, condition: Expression, update: string, bodyTemplate: IRNode[], kind?: 'for' | 'for-in');
|
|
146
|
+
}
|
|
147
|
+
export declare class ServerBlock {
|
|
148
|
+
children: IRNode[];
|
|
149
|
+
constructor(children: IRNode[]);
|
|
150
|
+
}
|
|
151
|
+
export declare class ClientBlock {
|
|
152
|
+
children: IRNode[];
|
|
153
|
+
constructor(children: IRNode[]);
|
|
154
|
+
}
|
|
155
|
+
export declare class HeadBlock {
|
|
156
|
+
children: IRNode[];
|
|
157
|
+
constructor(children: IRNode[]);
|
|
158
|
+
}
|
|
159
|
+
export type IRNode = StaticNode | TextNode | DynamicBinding | OpaqueDynamicRegion | MapRegion | WhileLoop | SwitchBlock | TryCatch | ForLoop | TrackDecl | RuntimeStatement | ComponentRef | ComponentCall | ServerBlock | ClientBlock | HeadBlock | SlotNode;
|
|
160
|
+
//# sourceMappingURL=ir.d.ts.map
|
package/dist/ir.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ir.d.ts","sourceRoot":"","sources":["../src/ir.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEjD,qBAAa,UAAU;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,UAAU,GAAG,IAAI,CAAC;IACvB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,IAAI,EAAE,MAAM,EAAE,CAAC;gBAEH,GAAG,EAAE,MAAM,EAAE,IAAI,GAAE,MAAM,EAAO,EAAE,GAAG,GAAE,UAAU,GAAG,IAAW,EAAE,MAAM,GAAE,MAAM,GAAG,IAAW;CAM1G;AAED,qBAAa,MAAM;IACjB,UAAU,EAAE,WAAW,EAAE,CAAC;IAC1B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC3B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,YAAY,EAAE,MAAM,EAAE,CAAC;gBAGrB,UAAU,EAAE,WAAW,EAAE,EACzB,OAAO,GAAE,MAAM,EAAO,EACtB,aAAa,GAAE,GAAG,CAAC,MAAM,CAAa,EACtC,WAAW,GAAE,MAAM,GAAG,IAAW,EACjC,MAAM,GAAE,MAAM,GAAG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X,WAAW,GACX,SAAS,GACT,QAAQ,CAAC"}
|
package/dist/ir.js
ADDED
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
export class Expression {
|
|
2
|
+
raw;
|
|
3
|
+
ast;
|
|
4
|
+
source;
|
|
5
|
+
deps;
|
|
6
|
+
constructor(raw, deps = [], ast = null, source = null) {
|
|
7
|
+
this.raw = raw;
|
|
8
|
+
this.deps = deps;
|
|
9
|
+
this.ast = ast;
|
|
10
|
+
this.source = source;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export class IRRoot {
|
|
14
|
+
components;
|
|
15
|
+
imports;
|
|
16
|
+
importedNames;
|
|
17
|
+
staticProps;
|
|
18
|
+
loadFn;
|
|
19
|
+
topLevelCode;
|
|
20
|
+
constructor(components, imports = [], importedNames = new Set(), staticProps = null, loadFn = null, topLevelCode = []) {
|
|
21
|
+
this.components = components;
|
|
22
|
+
this.imports = imports;
|
|
23
|
+
this.importedNames = importedNames;
|
|
24
|
+
this.staticProps = staticProps;
|
|
25
|
+
this.loadFn = loadFn;
|
|
26
|
+
this.topLevelCode = topLevelCode;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
export class ComponentIR {
|
|
30
|
+
name;
|
|
31
|
+
paramNames;
|
|
32
|
+
propsType;
|
|
33
|
+
isClient;
|
|
34
|
+
isAsync;
|
|
35
|
+
ssrAwait;
|
|
36
|
+
mode;
|
|
37
|
+
body;
|
|
38
|
+
style;
|
|
39
|
+
exported;
|
|
40
|
+
defaultExport;
|
|
41
|
+
constructor(name, paramNames, body, opts = {}) {
|
|
42
|
+
this.name = name;
|
|
43
|
+
this.paramNames = paramNames;
|
|
44
|
+
this.body = body;
|
|
45
|
+
this.isClient = opts.isClient ?? false;
|
|
46
|
+
this.isAsync = opts.isAsync ?? false;
|
|
47
|
+
this.ssrAwait = opts.ssrAwait ?? false;
|
|
48
|
+
this.mode = opts.mode ?? 'expression';
|
|
49
|
+
this.style = null;
|
|
50
|
+
this.exported = opts.exported ?? false;
|
|
51
|
+
this.defaultExport = opts.defaultExport ?? false;
|
|
52
|
+
this.propsType = opts.propsType ?? null;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
export class StaticNode {
|
|
56
|
+
tag;
|
|
57
|
+
attributes;
|
|
58
|
+
children;
|
|
59
|
+
selfClosing;
|
|
60
|
+
keyExpr;
|
|
61
|
+
constructor(tag, attributes, children, keyExpr = null) {
|
|
62
|
+
this.tag = tag;
|
|
63
|
+
this.attributes = attributes;
|
|
64
|
+
this.children = children;
|
|
65
|
+
this.selfClosing = false;
|
|
66
|
+
this.keyExpr = keyExpr;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
export class TextNode {
|
|
70
|
+
value;
|
|
71
|
+
constructor(value) {
|
|
72
|
+
this.value = value;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
export class DynamicBinding {
|
|
76
|
+
kind;
|
|
77
|
+
target;
|
|
78
|
+
expression;
|
|
79
|
+
constructor(expression, kind = 'text', target = null) {
|
|
80
|
+
this.expression = expression;
|
|
81
|
+
this.kind = kind;
|
|
82
|
+
this.target = target;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
export class OpaqueDynamicRegion {
|
|
86
|
+
condition;
|
|
87
|
+
consequentNodes;
|
|
88
|
+
alternateNodes;
|
|
89
|
+
constructor(condition, consequentNodes, alternateNodes = []) {
|
|
90
|
+
this.condition = condition;
|
|
91
|
+
this.consequentNodes = consequentNodes;
|
|
92
|
+
this.alternateNodes = alternateNodes;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
export class MapRegion {
|
|
96
|
+
expression;
|
|
97
|
+
itemVariable;
|
|
98
|
+
indexVariable;
|
|
99
|
+
bodyTemplate;
|
|
100
|
+
keyExpr;
|
|
101
|
+
alternateNodes;
|
|
102
|
+
constructor(expression, itemVariable, bodyTemplate, keyExpr = null, indexVariable = null, alternateNodes = []) {
|
|
103
|
+
this.expression = expression;
|
|
104
|
+
this.itemVariable = itemVariable;
|
|
105
|
+
this.indexVariable = indexVariable;
|
|
106
|
+
this.bodyTemplate = bodyTemplate;
|
|
107
|
+
this.keyExpr = keyExpr;
|
|
108
|
+
this.alternateNodes = alternateNodes;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
export class ComponentRef {
|
|
112
|
+
componentName;
|
|
113
|
+
constructor(componentName) {
|
|
114
|
+
this.componentName = componentName;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
export class ComponentCall {
|
|
118
|
+
componentName;
|
|
119
|
+
props;
|
|
120
|
+
spreadProps;
|
|
121
|
+
children;
|
|
122
|
+
start;
|
|
123
|
+
constructor(componentName, props, children = [], spreadProps = [], start = -1) {
|
|
124
|
+
this.componentName = componentName;
|
|
125
|
+
this.props = props;
|
|
126
|
+
this.children = children;
|
|
127
|
+
this.spreadProps = spreadProps;
|
|
128
|
+
this.start = start;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
export class SlotNode {
|
|
132
|
+
constructor() { }
|
|
133
|
+
}
|
|
134
|
+
export class WhileLoop {
|
|
135
|
+
condition;
|
|
136
|
+
bodyTemplate;
|
|
137
|
+
isDoWhile;
|
|
138
|
+
constructor(condition, bodyTemplate, isDoWhile = false) {
|
|
139
|
+
this.condition = condition;
|
|
140
|
+
this.bodyTemplate = bodyTemplate;
|
|
141
|
+
this.isDoWhile = isDoWhile;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
export class SwitchCase {
|
|
145
|
+
body;
|
|
146
|
+
constructor(body) {
|
|
147
|
+
this.body = body;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
export class SwitchBlock {
|
|
151
|
+
discriminant;
|
|
152
|
+
cases;
|
|
153
|
+
constructor(discriminant, cases) {
|
|
154
|
+
this.discriminant = discriminant;
|
|
155
|
+
this.cases = cases;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
export class TryCatch {
|
|
159
|
+
bodyTemplate;
|
|
160
|
+
catchBody;
|
|
161
|
+
catchParamName;
|
|
162
|
+
constructor(bodyTemplate, catchBody, catchParamName = null) {
|
|
163
|
+
this.bodyTemplate = bodyTemplate;
|
|
164
|
+
this.catchBody = catchBody;
|
|
165
|
+
this.catchParamName = catchParamName;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
export class TrackDecl {
|
|
169
|
+
name;
|
|
170
|
+
rawName;
|
|
171
|
+
init;
|
|
172
|
+
constructor(name, init, rawName) {
|
|
173
|
+
this.name = name;
|
|
174
|
+
this.init = init;
|
|
175
|
+
this.rawName = rawName || null;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
export class RuntimeStatement {
|
|
179
|
+
raw;
|
|
180
|
+
ast;
|
|
181
|
+
source;
|
|
182
|
+
constructor(raw, ast = null, source = null) {
|
|
183
|
+
this.raw = raw;
|
|
184
|
+
this.ast = ast;
|
|
185
|
+
this.source = source;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
export class ForLoop {
|
|
189
|
+
init;
|
|
190
|
+
condition;
|
|
191
|
+
update;
|
|
192
|
+
bodyTemplate;
|
|
193
|
+
kind;
|
|
194
|
+
constructor(init, condition, update, bodyTemplate, kind = 'for') {
|
|
195
|
+
this.init = init;
|
|
196
|
+
this.condition = condition;
|
|
197
|
+
this.update = update;
|
|
198
|
+
this.bodyTemplate = bodyTemplate;
|
|
199
|
+
this.kind = kind;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
export class ServerBlock {
|
|
203
|
+
children;
|
|
204
|
+
constructor(children) {
|
|
205
|
+
this.children = children;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
export class ClientBlock {
|
|
209
|
+
children;
|
|
210
|
+
constructor(children) {
|
|
211
|
+
this.children = children;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
export class HeadBlock {
|
|
215
|
+
children;
|
|
216
|
+
constructor(children) {
|
|
217
|
+
this.children = children;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { RouteNode } from '@vesk/compiler/src/types';
|
|
2
|
+
import type { MiddlewareChainOptions } from '@vesk/compiler/src/types';
|
|
3
|
+
export interface MiddlewareEntry {
|
|
4
|
+
sourcePath: string;
|
|
5
|
+
node: RouteNode;
|
|
6
|
+
}
|
|
7
|
+
export declare function collectMiddlewareChain(routeTree: RouteNode[], url: string, appDir: string): MiddlewareEntry[];
|
|
8
|
+
export declare function loadMiddleware(sourcePath: string): Promise<((ctx: any, next: any) => any) | null>;
|
|
9
|
+
export declare function executeMiddlewareChain(chain: MiddlewareEntry[], request: Request, params: Record<string, string>, options?: MiddlewareChainOptions): Promise<{
|
|
10
|
+
response: Response | null;
|
|
11
|
+
redirected: boolean;
|
|
12
|
+
locals: Record<string, unknown>;
|
|
13
|
+
rewriteUrl: string | null;
|
|
14
|
+
}>;
|
|
15
|
+
//# sourceMappingURL=middleware.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"middleware.d.ts","sourceRoot":"","sources":["../src/middleware.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,EAAiC,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAEtG,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,SAAS,CAAC;CACjB;AAED,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,SAAS,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,eAAe,EAAE,CAsE7G;AAED,wBAAsB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,KAAK,GAAG,CAAC,GAAG,IAAI,CAAC,CAevG;AAED,wBAAsB,sBAAsB,CAC1C,KAAK,EAAE,eAAe,EAAE,EACxB,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC9B,OAAO,GAAE,sBAA2B,GACnC,OAAO,CAAC;IAAE,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAC;IAAC,UAAU,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAC,CAoGzH"}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import { existsSync } from 'fs';
|
|
2
|
+
import { resolve } from 'path';
|
|
3
|
+
import { extractMiddleware } from '@vesk/compiler/src/router';
|
|
4
|
+
import { parseCookies } from '@vesk/compiler/src/api-routes';
|
|
5
|
+
export function collectMiddlewareChain(routeTree, url, appDir) {
|
|
6
|
+
const parts = url.split('/').filter(Boolean);
|
|
7
|
+
const chain = [];
|
|
8
|
+
function walk(nodes, depth) {
|
|
9
|
+
for (const node of nodes) {
|
|
10
|
+
if (node.isGroup) {
|
|
11
|
+
if (walk(node.children, depth))
|
|
12
|
+
return true;
|
|
13
|
+
continue;
|
|
14
|
+
}
|
|
15
|
+
if (node.fullPath === '/') {
|
|
16
|
+
collectForNode(node);
|
|
17
|
+
return walk(node.children, depth);
|
|
18
|
+
}
|
|
19
|
+
if (depth >= parts.length) {
|
|
20
|
+
if (node.page) {
|
|
21
|
+
collectForNode(node);
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
continue;
|
|
25
|
+
}
|
|
26
|
+
const part = parts[depth];
|
|
27
|
+
if (node.isCatchAll) {
|
|
28
|
+
collectForNode(node);
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
if (node.isDynamic) {
|
|
32
|
+
if (tryCollectAndRecurse(node, depth))
|
|
33
|
+
return true;
|
|
34
|
+
continue;
|
|
35
|
+
}
|
|
36
|
+
if (node.path === part) {
|
|
37
|
+
if (tryCollectAndRecurse(node, depth))
|
|
38
|
+
return true;
|
|
39
|
+
continue;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
function collectForNode(node) {
|
|
45
|
+
if (node.hasMiddleware) {
|
|
46
|
+
const mwPath = resolve(appDir, node.sourceDir, 'middleware.ts');
|
|
47
|
+
if (existsSync(mwPath)) {
|
|
48
|
+
chain.push({ sourcePath: mwPath, node });
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function tryCollectAndRecurse(node, depth) {
|
|
53
|
+
collectForNode(node);
|
|
54
|
+
if (node.children.length > 0) {
|
|
55
|
+
return walk(node.children, depth + 1);
|
|
56
|
+
}
|
|
57
|
+
return !!node.page;
|
|
58
|
+
}
|
|
59
|
+
const root = routeTree.find(n => n.fullPath === '/');
|
|
60
|
+
if (root) {
|
|
61
|
+
collectForNode(root);
|
|
62
|
+
walk(root.children, 0);
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
walk(routeTree, 0);
|
|
66
|
+
}
|
|
67
|
+
return chain;
|
|
68
|
+
}
|
|
69
|
+
export async function loadMiddleware(sourcePath) {
|
|
70
|
+
if (sourcePath.endsWith('.vsk')) {
|
|
71
|
+
const src = extractMiddleware(sourcePath);
|
|
72
|
+
if (!src)
|
|
73
|
+
return null;
|
|
74
|
+
return eval(`(${src})`);
|
|
75
|
+
}
|
|
76
|
+
if (sourcePath.endsWith('.js') || sourcePath.endsWith('.ts')) {
|
|
77
|
+
try {
|
|
78
|
+
const mod = await import(sourcePath);
|
|
79
|
+
return (mod.middleware || mod.default || null);
|
|
80
|
+
}
|
|
81
|
+
catch {
|
|
82
|
+
return null;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return null;
|
|
86
|
+
}
|
|
87
|
+
export async function executeMiddlewareChain(chain, request, params, options = {}) {
|
|
88
|
+
const { onLast, plugins } = options;
|
|
89
|
+
const url = new URL(request.url, 'http://localhost');
|
|
90
|
+
const locals = {};
|
|
91
|
+
const cookies = parseCookies(request.headers?.get('cookie') || '');
|
|
92
|
+
const ctx = new Proxy({
|
|
93
|
+
request,
|
|
94
|
+
params,
|
|
95
|
+
url,
|
|
96
|
+
locals,
|
|
97
|
+
cookies,
|
|
98
|
+
set(key, value) {
|
|
99
|
+
locals[key] = value;
|
|
100
|
+
},
|
|
101
|
+
get(key) {
|
|
102
|
+
return locals[key];
|
|
103
|
+
},
|
|
104
|
+
}, {
|
|
105
|
+
get(target, prop) {
|
|
106
|
+
if (prop in target)
|
|
107
|
+
return target[prop];
|
|
108
|
+
return locals[prop];
|
|
109
|
+
},
|
|
110
|
+
});
|
|
111
|
+
if (plugins && plugins.length > 0) {
|
|
112
|
+
for (const plugin of plugins) {
|
|
113
|
+
if (plugin.provides) {
|
|
114
|
+
for (const [key, factory] of Object.entries(plugin.provides)) {
|
|
115
|
+
if (typeof factory === 'function' && !(factory instanceof RegExp)) {
|
|
116
|
+
try {
|
|
117
|
+
ctx.set(key, await factory());
|
|
118
|
+
}
|
|
119
|
+
catch {
|
|
120
|
+
// factory failed — skip this provide
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
ctx.set(key, factory);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
if (typeof plugin.onRequest === 'function') {
|
|
129
|
+
await plugin.onRequest(ctx);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
let rewriteUrl = null;
|
|
134
|
+
if (chain.length === 0) {
|
|
135
|
+
return { response: null, redirected: false, locals, rewriteUrl: null };
|
|
136
|
+
}
|
|
137
|
+
async function runMiddleware(index) {
|
|
138
|
+
if (index >= chain.length) {
|
|
139
|
+
if (onLast) {
|
|
140
|
+
return onLast(rewriteUrl);
|
|
141
|
+
}
|
|
142
|
+
return new Response(null, { status: 204 });
|
|
143
|
+
}
|
|
144
|
+
const { sourcePath } = chain[index];
|
|
145
|
+
const fn = await loadMiddleware(sourcePath);
|
|
146
|
+
if (!fn) {
|
|
147
|
+
return runMiddleware(index + 1);
|
|
148
|
+
}
|
|
149
|
+
async function next(rewrite) {
|
|
150
|
+
if (rewrite) {
|
|
151
|
+
rewriteUrl = rewrite;
|
|
152
|
+
try {
|
|
153
|
+
const newUrl = new URL(rewrite, 'http://localhost');
|
|
154
|
+
ctx.url = newUrl;
|
|
155
|
+
}
|
|
156
|
+
catch {
|
|
157
|
+
const base = new URL(request.url, 'http://localhost');
|
|
158
|
+
ctx.url = new URL(rewrite, base.origin);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
return runMiddleware(index + 1);
|
|
162
|
+
}
|
|
163
|
+
try {
|
|
164
|
+
const result = await fn(ctx, next);
|
|
165
|
+
if (result instanceof Response) {
|
|
166
|
+
return result;
|
|
167
|
+
}
|
|
168
|
+
return new Response(null, { status: 204 });
|
|
169
|
+
}
|
|
170
|
+
catch (e) {
|
|
171
|
+
const err = e;
|
|
172
|
+
if (err.name === 'Redirect') {
|
|
173
|
+
return new Response(null, {
|
|
174
|
+
status: err.status || 302,
|
|
175
|
+
headers: { Location: err.url || '' },
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
throw e;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
const response = await runMiddleware(0);
|
|
182
|
+
return { response, redirected: response?.status >= 300 && response?.status < 400, locals, rewriteUrl };
|
|
183
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@vesk/compiler",
|
|
3
|
+
"version": "0.1.10",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "./index.js",
|
|
6
|
+
"types": "./index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./index.d.ts",
|
|
10
|
+
"default": "./index.js"
|
|
11
|
+
},
|
|
12
|
+
"./src/*": "./*.js",
|
|
13
|
+
"./package.json": "./package.json"
|
|
14
|
+
}
|
|
15
|
+
}
|
package/dist/parser.d.ts
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import * as acorn from 'acorn';
|
|
2
|
+
import type { Program } from 'estree';
|
|
3
|
+
export interface ParseOptions {
|
|
4
|
+
filename?: string;
|
|
5
|
+
[key: string]: unknown;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Compiler annotations discovered while preprocessing the source.
|
|
9
|
+
* `for (...; key X)` and `for (...; index i)` clauses are blanked out
|
|
10
|
+
* (replaced with spaces to preserve all source offsets) so the plain
|
|
11
|
+
* JS parser accepts the loop; the annotation records the original
|
|
12
|
+
* ranges so the IR generator can recover the key/index clauses.
|
|
13
|
+
*/
|
|
14
|
+
export interface VeskAnnotation {
|
|
15
|
+
kind: 'for-clause';
|
|
16
|
+
/** Absolute position of the `for` keyword. */
|
|
17
|
+
forStart: number;
|
|
18
|
+
/** Absolute start of the `; key ...` / `; index ...` clause. */
|
|
19
|
+
clauseStart: number;
|
|
20
|
+
/** Absolute end of the clause (exclusive). */
|
|
21
|
+
clauseEnd: number;
|
|
22
|
+
/** Range of the key expression within the clause, when `key` was used. */
|
|
23
|
+
keyRange?: [number, number];
|
|
24
|
+
/** The index variable name, when `index` was used. */
|
|
25
|
+
indexName?: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Scans the source and blanks `; key <expr>` / `; index <ident>` clauses
|
|
29
|
+
* found in `for (...)` headers, returning the rewritten code (same length
|
|
30
|
+
* as the input, so every source offset is preserved) plus annotations.
|
|
31
|
+
*/
|
|
32
|
+
export declare function preprocessForClauses(source: string): {
|
|
33
|
+
code: string;
|
|
34
|
+
annotations: VeskAnnotation[];
|
|
35
|
+
};
|
|
36
|
+
export declare function createBaseParser(): typeof acorn.Parser;
|
|
37
|
+
export declare function parse(source: string, options?: ParseOptions): Program;
|
|
38
|
+
//# sourceMappingURL=parser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../src/parser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAKtC,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,YAAY,CAAC;IACnB,8CAA8C;IAC9C,QAAQ,EAAE,MAAM,CAAC;IACjB,gEAAgE;IAChE,WAAW,EAAE,MAAM,CAAC;IACpB,8CAA8C;IAC9C,SAAS,EAAE,MAAM,CAAC;IAClB,0EAA0E;IAC1E,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5B,sDAAsD;IACtD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAYD;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,cAAc,EAAE,CAAA;CAAE,CA0KpG;AAED,wBAAgB,gBAAgB,IAAI,OAAO,KAAK,CAAC,MAAM,CAEtD;AAED,wBAAgB,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,GAAE,YAAiB,GAAG,OAAO,CAczE"}
|