@vercel/introspection 0.0.9 → 0.0.11
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.d.mts +1 -42
- package/dist/index.mjs +1 -56709
- package/dist/loaders/cjs.cjs +1 -56748
- package/dist/loaders/esm.d.mts +1 -1
- package/dist/loaders/esm.mjs +1 -25
- package/dist/loaders/hooks.d.mts +1 -5
- package/dist/loaders/hooks.mjs +2 -49
- package/dist/loaders/rolldown-esm.d.mts +1 -0
- package/dist/loaders/rolldown-esm.mjs +3 -0
- package/dist/loaders/rolldown-hooks.d.mts +1 -0
- package/dist/loaders/rolldown-hooks.mjs +3 -0
- package/package.json +7 -18
- package/dist/express.d.mts +0 -4
- package/dist/express.mjs +0 -56659
- package/dist/hono.d.mts +0 -9
- package/dist/hono.mjs +0 -56628
package/dist/loaders/esm.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import "@vercel/backends/introspection/loaders/esm";
|
package/dist/loaders/esm.mjs
CHANGED
|
@@ -1,27 +1,3 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "@vercel/backends/introspection/loaders/esm";
|
|
2
2
|
|
|
3
|
-
//#region rolldown:runtime
|
|
4
|
-
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
5
|
-
|
|
6
|
-
//#endregion
|
|
7
|
-
//#region src/loaders/block-network.ts
|
|
8
|
-
for (const mod of [
|
|
9
|
-
"net",
|
|
10
|
-
"dns",
|
|
11
|
-
"http",
|
|
12
|
-
"https",
|
|
13
|
-
"tls",
|
|
14
|
-
"dgram"
|
|
15
|
-
]) try {
|
|
16
|
-
const m = __require(mod);
|
|
17
|
-
for (const key of Object.keys(m)) m[key] = new Proxy(m[key], { apply() {
|
|
18
|
-
throw new Error("Networking is disabled");
|
|
19
|
-
} });
|
|
20
|
-
} catch {}
|
|
21
|
-
|
|
22
|
-
//#endregion
|
|
23
|
-
//#region src/loaders/esm.ts
|
|
24
|
-
register(new URL("./hooks.mjs", import.meta.url), import.meta.url);
|
|
25
|
-
|
|
26
|
-
//#endregion
|
|
27
3
|
export { };
|
package/dist/loaders/hooks.d.mts
CHANGED
|
@@ -1,5 +1 @@
|
|
|
1
|
-
|
|
2
|
-
declare function resolve(specifier: string, context: any, nextResolve: any): Promise<any>;
|
|
3
|
-
declare function load(url: string, context: any, nextLoad: (url: string, context: any) => Promise<any>): Promise<any>;
|
|
4
|
-
//#endregion
|
|
5
|
-
export { load, resolve };
|
|
1
|
+
export * from "@vercel/backends/introspection/loaders/hooks";
|
package/dist/loaders/hooks.mjs
CHANGED
|
@@ -1,50 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
let honoUrl = null;
|
|
3
|
-
let expressUrl = null;
|
|
4
|
-
async function resolve(specifier, context, nextResolve) {
|
|
5
|
-
const result = await nextResolve(specifier, context);
|
|
6
|
-
if (specifier === "hono") honoUrl = result.url;
|
|
7
|
-
else if (specifier === "express") expressUrl = result.url;
|
|
8
|
-
return result;
|
|
9
|
-
}
|
|
10
|
-
async function load(url, context, nextLoad) {
|
|
11
|
-
const result = await nextLoad(url, context);
|
|
12
|
-
if (expressUrl === url) {
|
|
13
|
-
const pathToExpressExtract = new URL("../express.mjs", import.meta.url);
|
|
14
|
-
return {
|
|
15
|
-
format: "module",
|
|
16
|
-
source: `
|
|
17
|
-
import { handle} from ${JSON.stringify(pathToExpressExtract.toString())};
|
|
18
|
-
import originalExpress from ${JSON.stringify(url + "?original")};
|
|
1
|
+
export * from "@vercel/backends/introspection/loaders/hooks"
|
|
19
2
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
export * from ${JSON.stringify(url + "?original")};
|
|
23
|
-
export default extendedExpress;
|
|
24
|
-
`,
|
|
25
|
-
shortCircuit: true
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
if (honoUrl === url) {
|
|
29
|
-
const pathToHonoExtract = new URL("../hono.mjs", import.meta.url);
|
|
30
|
-
return {
|
|
31
|
-
format: "module",
|
|
32
|
-
source: `
|
|
33
|
-
import { handle } from ${JSON.stringify(pathToHonoExtract.toString())};
|
|
34
|
-
import * as originalHono from ${JSON.stringify(url + "?original")};
|
|
35
|
-
|
|
36
|
-
export * from ${JSON.stringify(url + "?original")};
|
|
37
|
-
export const Hono = handle(originalHono);
|
|
38
|
-
`,
|
|
39
|
-
shortCircuit: true
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
if (url.endsWith("?original")) {
|
|
43
|
-
const originalUrl = url.replace("?original", "");
|
|
44
|
-
if (originalUrl === honoUrl || originalUrl === expressUrl) return result;
|
|
45
|
-
}
|
|
46
|
-
return result;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
//#endregion
|
|
50
|
-
export { load, resolve };
|
|
3
|
+
export { };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "@vercel/backends/introspection/loaders/rolldown-esm";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@vercel/backends/introspection/loaders/rolldown-hooks";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/introspection",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.11",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"homepage": "https://vercel.com/docs",
|
|
6
6
|
"type": "module",
|
|
@@ -14,7 +14,9 @@
|
|
|
14
14
|
},
|
|
15
15
|
"./loaders/cjs": "./dist/loaders/cjs.js",
|
|
16
16
|
"./loaders/esm": "./dist/loaders/esm.js",
|
|
17
|
-
"./loaders/hooks": "./dist/loaders/hooks.js"
|
|
17
|
+
"./loaders/hooks": "./dist/loaders/hooks.js",
|
|
18
|
+
"./loaders/rolldown-esm": "./dist/loaders/rolldown-esm.js",
|
|
19
|
+
"./loaders/rolldown-hooks": "./dist/loaders/rolldown-hooks.js"
|
|
18
20
|
},
|
|
19
21
|
"repository": {
|
|
20
22
|
"type": "git",
|
|
@@ -25,25 +27,12 @@
|
|
|
25
27
|
"dist"
|
|
26
28
|
],
|
|
27
29
|
"dependencies": {
|
|
28
|
-
"
|
|
29
|
-
"zod": "3.22.4"
|
|
30
|
+
"@vercel/backends": "0.0.25"
|
|
30
31
|
},
|
|
31
32
|
"devDependencies": {
|
|
32
|
-
"@types/
|
|
33
|
-
"@types/fs-extra": "11",
|
|
34
|
-
"@types/jest": "27.5.1",
|
|
35
|
-
"@vercel/nft": "1.1.1",
|
|
36
|
-
"@types/node": "22",
|
|
37
|
-
"fs-extra": "11.1.0",
|
|
38
|
-
"execa": "3.2.0",
|
|
39
|
-
"hono": "4.10.1",
|
|
40
|
-
"jest-junit": "16.0.0",
|
|
33
|
+
"@types/node": "20.11.0",
|
|
41
34
|
"tsdown": "0.16.3",
|
|
42
|
-
"
|
|
43
|
-
"vitest": "^2.0.1",
|
|
44
|
-
"@vercel/static-config": "3.1.2",
|
|
45
|
-
"@vercel/cervel": "0.0.9",
|
|
46
|
-
"@vercel/build-utils": "13.2.8"
|
|
35
|
+
"vitest": "^2.0.1"
|
|
47
36
|
},
|
|
48
37
|
"scripts": {
|
|
49
38
|
"build": "tsdown",
|
package/dist/express.d.mts
DELETED