@primate/native 0.2.0 → 0.3.0
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/lib/private/command.js +3 -4
- package/lib/private/desktop.js +0 -13
- package/package.json +3 -3
package/lib/private/command.js
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import fail from "@primate/core/fail";
|
|
2
2
|
import runtime from "@rcompat/runtime";
|
|
3
3
|
const commands = {
|
|
4
4
|
bun: "bun build",
|
|
5
5
|
deno: "deno compile",
|
|
6
6
|
};
|
|
7
7
|
function which(target) {
|
|
8
|
-
if (target in commands)
|
|
8
|
+
if (target in commands)
|
|
9
9
|
return commands[target];
|
|
10
|
-
}
|
|
11
|
-
throw new AppError("unsupported runtime {0}", target);
|
|
10
|
+
throw fail("unsupported runtime {0}", target);
|
|
12
11
|
}
|
|
13
12
|
;
|
|
14
13
|
export default function (init) {
|
package/lib/private/desktop.js
CHANGED
|
@@ -54,19 +54,6 @@ export default async (app) => {
|
|
|
54
54
|
inline: false,
|
|
55
55
|
}`).join(",\n ")}];
|
|
56
56
|
|
|
57
|
-
${app_js === undefined ? "" : dedent `
|
|
58
|
-
const imports = {
|
|
59
|
-
app: "${FileRef.join("/", client_imports.find($import => $import.src.includes("app") && $import.src.endsWith(".js")).src)
|
|
60
|
-
.webpath()}"
|
|
61
|
-
};
|
|
62
|
-
// importmap
|
|
63
|
-
assets.push({
|
|
64
|
-
inline: true,
|
|
65
|
-
code: { imports },
|
|
66
|
-
type: "importmap",
|
|
67
|
-
});
|
|
68
|
-
`}
|
|
69
|
-
|
|
70
57
|
const page_imports = {};
|
|
71
58
|
${pages.map((page, i) => dedent `
|
|
72
59
|
import page${i} from "${FileRef.webpath(`./${location.server}/${location.pages}/${page}`)}" with { type: "file" };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@primate/native",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Primate native",
|
|
5
5
|
"homepage": "https://primate.run/docs/native",
|
|
6
6
|
"bugs": "https://github.com/primate-run/primate/issues",
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"@rcompat/stdio": "^0.12.2",
|
|
24
24
|
"@rcompat/string": "^0.10.0",
|
|
25
25
|
"@rcompat/webview": "^0.14.0",
|
|
26
|
-
"@primate/core": "^0.
|
|
27
|
-
"pema": "^0.
|
|
26
|
+
"@primate/core": "^0.3.0",
|
|
27
|
+
"pema": "^0.3.0"
|
|
28
28
|
},
|
|
29
29
|
"type": "module",
|
|
30
30
|
"imports": {
|