@siddharatha/adapter-node-rolldown 1.1.6 → 1.1.7
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/files/env.js +21 -86
- package/files/handler.js +865 -1231
- package/files/index.js +223 -469
- package/files/shims.js +12 -13
- package/package.json +55 -50
package/files/shims.js
CHANGED
|
@@ -1,25 +1,20 @@
|
|
|
1
|
-
import buffer from
|
|
2
|
-
import { webcrypto } from
|
|
3
|
-
|
|
4
|
-
// `buffer.File` was added in Node 18.13.0 while the `File` global was added in Node 20.0.0
|
|
5
|
-
const File = /** @type {import('node:buffer') & { File?: File}} */ (buffer).File;
|
|
1
|
+
import buffer from "node:buffer";
|
|
2
|
+
import { webcrypto } from "node:crypto";
|
|
6
3
|
|
|
4
|
+
//#region node_modules/.pnpm/@sveltejs+kit@2.49.4_@opentelemetry+api@1.7.0_@sveltejs+vite-plugin-svelte@3.1.2_svelte_c9e193a2a3d1b6c3ce1a7d87af2ed627/node_modules/@sveltejs/kit/src/exports/node/polyfills.js
|
|
7
5
|
/** @type {Record<string, any>} */
|
|
8
6
|
const globals = {
|
|
9
7
|
crypto: webcrypto,
|
|
10
|
-
File
|
|
8
|
+
File: buffer.File
|
|
11
9
|
};
|
|
12
|
-
|
|
13
|
-
// exported for dev/preview and node environments
|
|
14
10
|
/**
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
11
|
+
* Make various web APIs available as globals:
|
|
12
|
+
* - `crypto`
|
|
13
|
+
* - `File`
|
|
14
|
+
*/
|
|
19
15
|
function installPolyfills() {
|
|
20
16
|
for (const name in globals) {
|
|
21
17
|
if (name in globalThis) continue;
|
|
22
|
-
|
|
23
18
|
Object.defineProperty(globalThis, name, {
|
|
24
19
|
enumerable: true,
|
|
25
20
|
configurable: true,
|
|
@@ -29,4 +24,8 @@ function installPolyfills() {
|
|
|
29
24
|
}
|
|
30
25
|
}
|
|
31
26
|
|
|
27
|
+
//#endregion
|
|
28
|
+
//#region src/shims.js
|
|
32
29
|
installPolyfills();
|
|
30
|
+
|
|
31
|
+
//#endregion
|
package/package.json
CHANGED
|
@@ -1,52 +1,57 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
"
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
2
|
+
"name": "@siddharatha/adapter-node-rolldown",
|
|
3
|
+
"version": "1.1.7",
|
|
4
|
+
"description": "Just replacing @sveltejs/adapter-node with rolldown",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": "./index.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"files",
|
|
11
|
+
"index.js",
|
|
12
|
+
"index.d.ts"
|
|
13
|
+
],
|
|
14
|
+
"keywords": [
|
|
15
|
+
"svelte",
|
|
16
|
+
"sveltekit",
|
|
17
|
+
"adapter",
|
|
18
|
+
"polka",
|
|
19
|
+
"performance",
|
|
20
|
+
"opentelemetry",
|
|
21
|
+
"websocket",
|
|
22
|
+
"kubernetes",
|
|
23
|
+
"ecs",
|
|
24
|
+
"rolldown"
|
|
25
|
+
],
|
|
26
|
+
"author": "",
|
|
27
|
+
"license": "MIT",
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"rolldown": "1.0.0-beta.60"
|
|
30
|
+
},
|
|
31
|
+
"peerDependencies": {
|
|
32
|
+
"@sveltejs/kit": "^2.4.0"
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"@changesets/cli": "^2.27.1",
|
|
36
|
+
"@polka/url": "^1.0.0-next.21",
|
|
37
|
+
"@sveltejs/kit": "^2.4.0",
|
|
38
|
+
"@sveltejs/vite-plugin-svelte": "^3.0.1",
|
|
39
|
+
"@types/node": "^20.0.0",
|
|
40
|
+
"c8": "^8.0.0",
|
|
41
|
+
"polka": "^1.0.0-next.22",
|
|
42
|
+
"rimraf": "^5.0.0",
|
|
43
|
+
"sirv": "^2.0.3",
|
|
44
|
+
"typescript": "^4.9.4",
|
|
45
|
+
"vite": "^5.0.0"
|
|
46
|
+
},
|
|
47
|
+
"scripts": {
|
|
48
|
+
"dev": "rimraf files && rolldown -w -c",
|
|
49
|
+
"build": "rimraf files && rolldown -c",
|
|
50
|
+
"lint": "prettier --check .",
|
|
51
|
+
"format": "prettier --write .",
|
|
52
|
+
"release": "changeset publish",
|
|
53
|
+
"changeset": "changeset",
|
|
54
|
+
"version:next": "changeset version --tag next",
|
|
55
|
+
"release:next": "pnpm publish --tag next"
|
|
56
|
+
}
|
|
52
57
|
}
|