@tschk/moonshine-deploy-bun 0.4.4 → 0.4.80
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/package.json +5 -5
- package/src/index.ts +7 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tschk/moonshine-deploy-bun",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.80",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.ts",
|
|
@@ -15,19 +15,19 @@
|
|
|
15
15
|
"test": "bun test"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@tschk/moonshine-framework": "^0.4.
|
|
19
|
-
"@tschk/moonshine-server": "^0.4.
|
|
18
|
+
"@tschk/moonshine-framework": "^0.4.80",
|
|
19
|
+
"@tschk/moonshine-server": "^0.4.80"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@types/bun": "1.3.14",
|
|
23
23
|
"typescript": "7.0.2",
|
|
24
|
-
"@tschk/moonshine-adapter-conformance": "^0.4.
|
|
24
|
+
"@tschk/moonshine-adapter-conformance": "^0.4.80"
|
|
25
25
|
},
|
|
26
26
|
"files": [
|
|
27
27
|
"src"
|
|
28
28
|
],
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"@tschk/moonshine-react": "^0.4.
|
|
30
|
+
"@tschk/moonshine-react": "^0.4.80"
|
|
31
31
|
},
|
|
32
32
|
"peerDependenciesMeta": {
|
|
33
33
|
"@tschk/moonshine-react": {
|
package/src/index.ts
CHANGED
|
@@ -82,10 +82,13 @@ export const bunAdapter: DeploymentAdapter = {
|
|
|
82
82
|
JSON.stringify(builtManifest, null, 2) + "\n",
|
|
83
83
|
);
|
|
84
84
|
const native = manifest.renderer === "native";
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
85
|
+
// The bundle exports the renderer bound to its own route modules (and, for
|
|
86
|
+
// React, its own React instance).
|
|
87
|
+
const rendererImport =
|
|
88
|
+
native || (manifest.renderer ?? "react") === "react"
|
|
89
|
+
? 'import { modules, renderer } from "./dist/server.js";'
|
|
90
|
+
: 'import { modules } from "./dist/server.js";\nimport { reactRenderer as renderer } from "@tschk/moonshine-react";';
|
|
91
|
+
const entry = `import { createRequestHandler } from "@tschk/moonshine-server${manifest.dataRequests ? "/data-http" : ""}";
|
|
89
92
|
import { createBunServer } from "@tschk/moonshine-deploy-bun";
|
|
90
93
|
import { resolve } from "node:path";
|
|
91
94
|
import manifest from "./manifest.json" with { type: "json" };
|