elysia 2.0.0-exp.55 → 2.0.0-exp.57
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/adapter/bun/index.js +15 -16
- package/dist/adapter/bun/index.mjs +15 -16
- package/dist/base.js +15 -21
- package/dist/base.mjs +15 -21
- package/dist/package.js +1 -1
- package/dist/package.mjs +1 -1
- package/dist/route-table.d.ts +3 -0
- package/dist/route-table.js +15 -10
- package/dist/route-table.mjs +16 -11
- package/dist/type/constants.d.ts +1 -1
- package/package.json +1 -1
|
@@ -107,17 +107,20 @@ const BunAdapter = require_adapter_index.createAdapter({
|
|
|
107
107
|
listen(app, options, callback) {
|
|
108
108
|
const _config = app["~config"]?.serve;
|
|
109
109
|
const optionsIsObject = typeof options === "object";
|
|
110
|
+
let live;
|
|
111
|
+
const gatedFetch = (request, server) => live ? live(request, server) : Promise.resolve(ready).then(() => {
|
|
112
|
+
if (!live) throw new Error("[Elysia] Server was stopped before it was ready");
|
|
113
|
+
return live(request, server);
|
|
114
|
+
});
|
|
110
115
|
const _options = optionsIsObject ? { ...options } : {
|
|
111
116
|
port: +options,
|
|
112
|
-
fetch:
|
|
117
|
+
fetch: gatedFetch
|
|
113
118
|
};
|
|
114
|
-
if (optionsIsObject) _options.fetch =
|
|
119
|
+
if (optionsIsObject) _options.fetch = gatedFetch;
|
|
115
120
|
const serve = _config ? {
|
|
116
121
|
..._config,
|
|
117
122
|
..._options
|
|
118
123
|
} : _options;
|
|
119
|
-
const onSetup = app["~ext"]?.setup;
|
|
120
|
-
const needsGate = app.pending || !!onSetup?.length;
|
|
121
124
|
let ready;
|
|
122
125
|
const build = () => {
|
|
123
126
|
const fetch = app.fetch;
|
|
@@ -130,7 +133,7 @@ const BunAdapter = require_adapter_index.createAdapter({
|
|
|
130
133
|
let websocket;
|
|
131
134
|
if (app["~hasWS"]) {
|
|
132
135
|
const resolved = require_generation.resolvedWsOf(app);
|
|
133
|
-
if (!resolved) throw new Error("[Elysia] internal: WebSocket routes are present but no capability provider was resolved
|
|
136
|
+
if (!resolved) throw new Error("[Elysia] internal: WebSocket routes are present but no capability provider was resolved");
|
|
134
137
|
websocket = resolved.config ? Object.assign(resolved.provider.buildGlobalWSHandler(), resolved.config) : resolved.provider.buildGlobalWSHandler();
|
|
135
138
|
}
|
|
136
139
|
return {
|
|
@@ -140,9 +143,6 @@ const BunAdapter = require_adapter_index.createAdapter({
|
|
|
140
143
|
};
|
|
141
144
|
};
|
|
142
145
|
let built;
|
|
143
|
-
if (!needsGate) built = build();
|
|
144
|
-
if (needsGate) serve.fetch = (request, server) => ready.then(() => app.fetch(request, server));
|
|
145
|
-
else serve.fetch = withOrigin(built.fetch);
|
|
146
146
|
const server = app.server = Bun.serve(serve);
|
|
147
147
|
const reload = () => {
|
|
148
148
|
try {
|
|
@@ -190,10 +190,10 @@ const BunAdapter = require_adapter_index.createAdapter({
|
|
|
190
190
|
const publish = () => {
|
|
191
191
|
if (app.server !== server) return;
|
|
192
192
|
built ??= build();
|
|
193
|
-
serve.fetch = withOrigin(built.fetch);
|
|
193
|
+
live = serve.fetch = withOrigin(built.fetch);
|
|
194
194
|
if (built.websocket) serve.websocket = built.websocket;
|
|
195
195
|
if (built.routes) serve.routes = built.routes[0];
|
|
196
|
-
|
|
196
|
+
reload();
|
|
197
197
|
if (callback) callback(server);
|
|
198
198
|
};
|
|
199
199
|
const start = () => {
|
|
@@ -204,12 +204,11 @@ const BunAdapter = require_adapter_index.createAdapter({
|
|
|
204
204
|
};
|
|
205
205
|
try {
|
|
206
206
|
if (app.pending) ready = app.modules.then(start);
|
|
207
|
-
else
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
}
|
|
212
|
-
ready?.catch(rollback);
|
|
207
|
+
else ready = Promise.resolve().then(start);
|
|
208
|
+
ready.catch((error) => {
|
|
209
|
+
console.error("[Elysia] listen() failed:", error);
|
|
210
|
+
return rollback(error);
|
|
211
|
+
});
|
|
213
212
|
} catch (error) {
|
|
214
213
|
rollback(error);
|
|
215
214
|
throw error;
|
|
@@ -106,17 +106,20 @@ const BunAdapter = createAdapter({
|
|
|
106
106
|
listen(app, options, callback) {
|
|
107
107
|
const _config = app["~config"]?.serve;
|
|
108
108
|
const optionsIsObject = typeof options === "object";
|
|
109
|
+
let live;
|
|
110
|
+
const gatedFetch = (request, server) => live ? live(request, server) : Promise.resolve(ready).then(() => {
|
|
111
|
+
if (!live) throw new Error("[Elysia] Server was stopped before it was ready");
|
|
112
|
+
return live(request, server);
|
|
113
|
+
});
|
|
109
114
|
const _options = optionsIsObject ? { ...options } : {
|
|
110
115
|
port: +options,
|
|
111
|
-
fetch:
|
|
116
|
+
fetch: gatedFetch
|
|
112
117
|
};
|
|
113
|
-
if (optionsIsObject) _options.fetch =
|
|
118
|
+
if (optionsIsObject) _options.fetch = gatedFetch;
|
|
114
119
|
const serve = _config ? {
|
|
115
120
|
..._config,
|
|
116
121
|
..._options
|
|
117
122
|
} : _options;
|
|
118
|
-
const onSetup = app["~ext"]?.setup;
|
|
119
|
-
const needsGate = app.pending || !!onSetup?.length;
|
|
120
123
|
let ready;
|
|
121
124
|
const build = () => {
|
|
122
125
|
const fetch = app.fetch;
|
|
@@ -129,7 +132,7 @@ const BunAdapter = createAdapter({
|
|
|
129
132
|
let websocket;
|
|
130
133
|
if (app["~hasWS"]) {
|
|
131
134
|
const resolved = resolvedWsOf(app);
|
|
132
|
-
if (!resolved) throw new Error("[Elysia] internal: WebSocket routes are present but no capability provider was resolved
|
|
135
|
+
if (!resolved) throw new Error("[Elysia] internal: WebSocket routes are present but no capability provider was resolved");
|
|
133
136
|
websocket = resolved.config ? Object.assign(resolved.provider.buildGlobalWSHandler(), resolved.config) : resolved.provider.buildGlobalWSHandler();
|
|
134
137
|
}
|
|
135
138
|
return {
|
|
@@ -139,9 +142,6 @@ const BunAdapter = createAdapter({
|
|
|
139
142
|
};
|
|
140
143
|
};
|
|
141
144
|
let built;
|
|
142
|
-
if (!needsGate) built = build();
|
|
143
|
-
if (needsGate) serve.fetch = (request, server) => ready.then(() => app.fetch(request, server));
|
|
144
|
-
else serve.fetch = withOrigin(built.fetch);
|
|
145
145
|
const server = app.server = Bun.serve(serve);
|
|
146
146
|
const reload = () => {
|
|
147
147
|
try {
|
|
@@ -189,10 +189,10 @@ const BunAdapter = createAdapter({
|
|
|
189
189
|
const publish = () => {
|
|
190
190
|
if (app.server !== server) return;
|
|
191
191
|
built ??= build();
|
|
192
|
-
serve.fetch = withOrigin(built.fetch);
|
|
192
|
+
live = serve.fetch = withOrigin(built.fetch);
|
|
193
193
|
if (built.websocket) serve.websocket = built.websocket;
|
|
194
194
|
if (built.routes) serve.routes = built.routes[0];
|
|
195
|
-
|
|
195
|
+
reload();
|
|
196
196
|
if (callback) callback(server);
|
|
197
197
|
};
|
|
198
198
|
const start = () => {
|
|
@@ -203,12 +203,11 @@ const BunAdapter = createAdapter({
|
|
|
203
203
|
};
|
|
204
204
|
try {
|
|
205
205
|
if (app.pending) ready = app.modules.then(start);
|
|
206
|
-
else
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
}
|
|
211
|
-
ready?.catch(rollback);
|
|
206
|
+
else ready = Promise.resolve().then(start);
|
|
207
|
+
ready.catch((error) => {
|
|
208
|
+
console.error("[Elysia] listen() failed:", error);
|
|
209
|
+
return rollback(error);
|
|
210
|
+
});
|
|
212
211
|
} catch (error) {
|
|
213
212
|
rollback(error);
|
|
214
213
|
throw error;
|
package/dist/base.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
const require_runtime = require('./_virtual/_rolldown/runtime.js');
|
|
3
3
|
const require_universal_constants = require('./universal/constants.js');
|
|
4
|
-
const require_constants = require('./constants.js');
|
|
5
4
|
const require_utils = require('./utils.js');
|
|
6
5
|
const require_type_bridge = require('./type/bridge.js');
|
|
7
6
|
const require_universal_is_production = require('./universal/is-production.js');
|
|
@@ -1275,7 +1274,8 @@ var Elysia = class Elysia {
|
|
|
1275
1274
|
#routeMayHaveModelRef(table, i) {
|
|
1276
1275
|
const macroScope = table.macroScope?.get(i);
|
|
1277
1276
|
const owner = table.owner[i];
|
|
1278
|
-
|
|
1277
|
+
const candidate = macroScope ?? owner ?? this;
|
|
1278
|
+
if ((candidate === this ? this : require_compile_handler_index.localMacroRoot(candidate, this))["~ext"]?.macro) return true;
|
|
1279
1279
|
if (Elysia.#hookHasString(table.localHook[i])) return true;
|
|
1280
1280
|
const appHook = table.appHook[i];
|
|
1281
1281
|
if (appHook !== void 0 && appHook.refs) return true;
|
|
@@ -1416,25 +1416,19 @@ var Elysia = class Elysia {
|
|
|
1416
1416
|
else for (let i = 0; i < length; i++) if (this.#routeMayHaveModelRef(table, i)) this.#assertRouteModelRefs(require_route_table.routeRow(table, i), method[i]);
|
|
1417
1417
|
if (length) require_compile_aot.Compiled.claim(this["~programId"], this["~aotFingerprint"] = require_compile_aot.createAotFingerprint());
|
|
1418
1418
|
const isLoose = this["~config"]?.strictPath !== true;
|
|
1419
|
-
let hasLooseCandidate = false;
|
|
1420
|
-
if (isLoose) for (let i = 0; i < length; i++) {
|
|
1421
|
-
const p = path[i];
|
|
1422
|
-
if (canRegisterLoose(p, (flags[i] & require_route_table.RouteFlag.Dynamic) !== 0)) {
|
|
1423
|
-
hasLooseCandidate = true;
|
|
1424
|
-
break;
|
|
1425
|
-
}
|
|
1426
|
-
}
|
|
1427
1419
|
let explicitPaths;
|
|
1428
|
-
if (
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1420
|
+
if (isLoose && table.hasLoose) {
|
|
1421
|
+
explicitPaths = /* @__PURE__ */ new Map();
|
|
1422
|
+
for (let i = 0; i < length; i++) {
|
|
1423
|
+
const m = method[i];
|
|
1424
|
+
const p = path[i];
|
|
1425
|
+
let set = explicitPaths.get(m);
|
|
1426
|
+
if (!set) explicitPaths.set(m, set = /* @__PURE__ */ new Set());
|
|
1427
|
+
set.add(p);
|
|
1428
|
+
if ((flags[i] & require_route_table.RouteFlag.Encode) !== 0) {
|
|
1429
|
+
const encoded = encodeURI(p);
|
|
1430
|
+
if (encoded !== p) set.add(encoded);
|
|
1431
|
+
}
|
|
1438
1432
|
}
|
|
1439
1433
|
}
|
|
1440
1434
|
for (let i = 0; i < length; i++) {
|
|
@@ -1465,7 +1459,7 @@ var Elysia = class Elysia {
|
|
|
1465
1459
|
continue;
|
|
1466
1460
|
}
|
|
1467
1461
|
const isDynamic = (routeFlags & require_route_table.RouteFlag.Dynamic) !== 0;
|
|
1468
|
-
const needsEncode =
|
|
1462
|
+
const needsEncode = (routeFlags & require_route_table.RouteFlag.Encode) !== 0;
|
|
1469
1463
|
const registerLoose = isLoose && canRegisterLoose(routePath, isDynamic);
|
|
1470
1464
|
const explicitMain = registerLoose ? explicitPaths?.get(routeMethod) : void 0;
|
|
1471
1465
|
if (!isDynamic && !needsEncode && !registerLoose) {
|
package/dist/base.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { isBun } from "./universal/constants.mjs";
|
|
2
|
-
import { needEncodeRegex } from "./constants.mjs";
|
|
3
2
|
import { clonePlainDecorators, clonePlainDeep, coalesceStandaloneSchemas, createErrorEventHandler, eventProperties, fnOrigin, fnv1a, getLoosePath, guardNonPlainLeaves, hookToGuard, invalidateMacroEpoch, isEmpty, isNotEmpty, isRecordNumber, joinPath, macroOrigin, mapDeriveEntry, mergeDeep, mergeResponse, nullObject, pushField, schemaProperties, serializeMacroSeed } from "./utils.mjs";
|
|
4
3
|
import { Ref } from "./type/bridge.mjs";
|
|
5
4
|
import { isProduction } from "./universal/is-production.mjs";
|
|
@@ -1272,7 +1271,8 @@ var Elysia = class Elysia {
|
|
|
1272
1271
|
#routeMayHaveModelRef(table, i) {
|
|
1273
1272
|
const macroScope = table.macroScope?.get(i);
|
|
1274
1273
|
const owner = table.owner[i];
|
|
1275
|
-
|
|
1274
|
+
const candidate = macroScope ?? owner ?? this;
|
|
1275
|
+
if ((candidate === this ? this : localMacroRoot(candidate, this))["~ext"]?.macro) return true;
|
|
1276
1276
|
if (Elysia.#hookHasString(table.localHook[i])) return true;
|
|
1277
1277
|
const appHook = table.appHook[i];
|
|
1278
1278
|
if (appHook !== void 0 && appHook.refs) return true;
|
|
@@ -1413,25 +1413,19 @@ var Elysia = class Elysia {
|
|
|
1413
1413
|
else for (let i = 0; i < length; i++) if (this.#routeMayHaveModelRef(table, i)) this.#assertRouteModelRefs(routeRow(table, i), method[i]);
|
|
1414
1414
|
if (length) Compiled.claim(this["~programId"], this["~aotFingerprint"] = createAotFingerprint());
|
|
1415
1415
|
const isLoose = this["~config"]?.strictPath !== true;
|
|
1416
|
-
let hasLooseCandidate = false;
|
|
1417
|
-
if (isLoose) for (let i = 0; i < length; i++) {
|
|
1418
|
-
const p = path[i];
|
|
1419
|
-
if (canRegisterLoose(p, (flags[i] & RouteFlag.Dynamic) !== 0)) {
|
|
1420
|
-
hasLooseCandidate = true;
|
|
1421
|
-
break;
|
|
1422
|
-
}
|
|
1423
|
-
}
|
|
1424
1416
|
let explicitPaths;
|
|
1425
|
-
if (
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1417
|
+
if (isLoose && table.hasLoose) {
|
|
1418
|
+
explicitPaths = /* @__PURE__ */ new Map();
|
|
1419
|
+
for (let i = 0; i < length; i++) {
|
|
1420
|
+
const m = method[i];
|
|
1421
|
+
const p = path[i];
|
|
1422
|
+
let set = explicitPaths.get(m);
|
|
1423
|
+
if (!set) explicitPaths.set(m, set = /* @__PURE__ */ new Set());
|
|
1424
|
+
set.add(p);
|
|
1425
|
+
if ((flags[i] & RouteFlag.Encode) !== 0) {
|
|
1426
|
+
const encoded = encodeURI(p);
|
|
1427
|
+
if (encoded !== p) set.add(encoded);
|
|
1428
|
+
}
|
|
1435
1429
|
}
|
|
1436
1430
|
}
|
|
1437
1431
|
for (let i = 0; i < length; i++) {
|
|
@@ -1462,7 +1456,7 @@ var Elysia = class Elysia {
|
|
|
1462
1456
|
continue;
|
|
1463
1457
|
}
|
|
1464
1458
|
const isDynamic = (routeFlags & RouteFlag.Dynamic) !== 0;
|
|
1465
|
-
const needsEncode =
|
|
1459
|
+
const needsEncode = (routeFlags & RouteFlag.Encode) !== 0;
|
|
1466
1460
|
const registerLoose = isLoose && canRegisterLoose(routePath, isDynamic);
|
|
1467
1461
|
const explicitMain = registerLoose ? explicitPaths?.get(routeMethod) : void 0;
|
|
1468
1462
|
if (!isDynamic && !needsEncode && !registerLoose) {
|
package/dist/package.js
CHANGED
package/dist/package.mjs
CHANGED
package/dist/route-table.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { AnyElysia } from "./base.js";
|
|
|
6
6
|
declare const RouteFlag: {
|
|
7
7
|
readonly WS: 1;
|
|
8
8
|
readonly Dynamic: 2;
|
|
9
|
+
readonly Encode: 4;
|
|
9
10
|
};
|
|
10
11
|
interface RouteTable {
|
|
11
12
|
readonly length: number;
|
|
@@ -17,6 +18,8 @@ interface RouteTable {
|
|
|
17
18
|
readonly appHook: (ChainNode | undefined)[];
|
|
18
19
|
readonly inheritedChain: (ChainNode | undefined)[];
|
|
19
20
|
readonly flags: number[];
|
|
21
|
+
/** any static route path is '' or ends with '/' (loose-alias candidate) */
|
|
22
|
+
readonly hasLoose: boolean;
|
|
20
23
|
readonly macroScope?: Map<number, AnyElysia>;
|
|
21
24
|
}
|
|
22
25
|
declare function buildRouteTable(declaredRoutes: readonly InternalRoute[]): RouteTable;
|
package/dist/route-table.js
CHANGED
|
@@ -4,18 +4,20 @@ const require_constants = require('./constants.js');
|
|
|
4
4
|
//#region src/route-table.ts
|
|
5
5
|
const RouteFlag = {
|
|
6
6
|
WS: 1,
|
|
7
|
-
Dynamic: 2
|
|
7
|
+
Dynamic: 2,
|
|
8
|
+
Encode: 4
|
|
8
9
|
};
|
|
9
10
|
function buildRouteTable(declaredRoutes) {
|
|
10
11
|
const length = declaredRoutes.length;
|
|
11
|
-
const method =
|
|
12
|
-
const path =
|
|
13
|
-
const handler =
|
|
14
|
-
const owner =
|
|
15
|
-
const localHook =
|
|
16
|
-
const appHook =
|
|
17
|
-
const inheritedChain =
|
|
18
|
-
const flags =
|
|
12
|
+
const method = new Array(length);
|
|
13
|
+
const path = new Array(length);
|
|
14
|
+
const handler = new Array(length);
|
|
15
|
+
const owner = new Array(length);
|
|
16
|
+
const localHook = new Array(length);
|
|
17
|
+
const appHook = new Array(length);
|
|
18
|
+
const inheritedChain = new Array(length);
|
|
19
|
+
const flags = new Array(length);
|
|
20
|
+
let hasLoose = false;
|
|
19
21
|
let macroScope;
|
|
20
22
|
for (let i = 0; i < length; i++) {
|
|
21
23
|
const route = declaredRoutes[i];
|
|
@@ -26,7 +28,9 @@ function buildRouteTable(declaredRoutes) {
|
|
|
26
28
|
localHook[i] = route[4];
|
|
27
29
|
appHook[i] = route[5];
|
|
28
30
|
inheritedChain[i] = route[6];
|
|
29
|
-
|
|
31
|
+
const isDynamic = p.indexOf(":") !== -1 || p.indexOf("*") !== -1;
|
|
32
|
+
flags[i] = (route[0] === "WS" ? RouteFlag.WS : 0) | (isDynamic ? RouteFlag.Dynamic : 0) | (require_constants.needEncodeRegex.test(p) ? RouteFlag.Encode : 0);
|
|
33
|
+
if (!isDynamic && (p.length === 0 || p.charCodeAt(p.length - 1) === 47)) hasLoose = true;
|
|
30
34
|
if (route[7]) (macroScope ??= /* @__PURE__ */ new Map()).set(i, route[7]);
|
|
31
35
|
}
|
|
32
36
|
return {
|
|
@@ -39,6 +43,7 @@ function buildRouteTable(declaredRoutes) {
|
|
|
39
43
|
appHook,
|
|
40
44
|
inheritedChain,
|
|
41
45
|
flags,
|
|
46
|
+
hasLoose,
|
|
42
47
|
macroScope
|
|
43
48
|
};
|
|
44
49
|
}
|
package/dist/route-table.mjs
CHANGED
|
@@ -1,20 +1,22 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { needEncodeRegex } from "./constants.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/route-table.ts
|
|
4
4
|
const RouteFlag = {
|
|
5
5
|
WS: 1,
|
|
6
|
-
Dynamic: 2
|
|
6
|
+
Dynamic: 2,
|
|
7
|
+
Encode: 4
|
|
7
8
|
};
|
|
8
9
|
function buildRouteTable(declaredRoutes) {
|
|
9
10
|
const length = declaredRoutes.length;
|
|
10
|
-
const method =
|
|
11
|
-
const path =
|
|
12
|
-
const handler =
|
|
13
|
-
const owner =
|
|
14
|
-
const localHook =
|
|
15
|
-
const appHook =
|
|
16
|
-
const inheritedChain =
|
|
17
|
-
const flags =
|
|
11
|
+
const method = new Array(length);
|
|
12
|
+
const path = new Array(length);
|
|
13
|
+
const handler = new Array(length);
|
|
14
|
+
const owner = new Array(length);
|
|
15
|
+
const localHook = new Array(length);
|
|
16
|
+
const appHook = new Array(length);
|
|
17
|
+
const inheritedChain = new Array(length);
|
|
18
|
+
const flags = new Array(length);
|
|
19
|
+
let hasLoose = false;
|
|
18
20
|
let macroScope;
|
|
19
21
|
for (let i = 0; i < length; i++) {
|
|
20
22
|
const route = declaredRoutes[i];
|
|
@@ -25,7 +27,9 @@ function buildRouteTable(declaredRoutes) {
|
|
|
25
27
|
localHook[i] = route[4];
|
|
26
28
|
appHook[i] = route[5];
|
|
27
29
|
inheritedChain[i] = route[6];
|
|
28
|
-
|
|
30
|
+
const isDynamic = p.indexOf(":") !== -1 || p.indexOf("*") !== -1;
|
|
31
|
+
flags[i] = (route[0] === "WS" ? RouteFlag.WS : 0) | (isDynamic ? RouteFlag.Dynamic : 0) | (needEncodeRegex.test(p) ? RouteFlag.Encode : 0);
|
|
32
|
+
if (!isDynamic && (p.length === 0 || p.charCodeAt(p.length - 1) === 47)) hasLoose = true;
|
|
29
33
|
if (route[7]) (macroScope ??= /* @__PURE__ */ new Map()).set(i, route[7]);
|
|
30
34
|
}
|
|
31
35
|
return {
|
|
@@ -38,6 +42,7 @@ function buildRouteTable(declaredRoutes) {
|
|
|
38
42
|
appHook,
|
|
39
43
|
inheritedChain,
|
|
40
44
|
flags,
|
|
45
|
+
hasLoose,
|
|
41
46
|
macroScope
|
|
42
47
|
};
|
|
43
48
|
}
|
package/dist/type/constants.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ declare const ELYSIA_TYPES: {
|
|
|
17
17
|
readonly NoValidate: 15;
|
|
18
18
|
};
|
|
19
19
|
type ELYSIA_TYPES = typeof ELYSIA_TYPES;
|
|
20
|
-
declare const primitiveElysiaTypes: Set<
|
|
20
|
+
declare const primitiveElysiaTypes: Set<1 | 2 | 6 | 3 | 10 | 11 | 13 | 14>;
|
|
21
21
|
declare const noEnumerable: {
|
|
22
22
|
readonly enumerable: false;
|
|
23
23
|
};
|