@primate/native 0.6.0 → 0.7.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.
@@ -1,11 +1,11 @@
1
1
  import type { Module } from "@primate/core";
2
- declare const schema: import("pema").ObjectType<import("pema").NormalizeSchemaObject<{
2
+ declare const Schema: import("pema").ObjectType<import("pema").NormalizeSchemaObject<{
3
3
  readonly debug: import("pema").DefaultType<import("pema").BooleanType, false>;
4
4
  readonly start: import("pema").DefaultType<import("pema").StringType, "/">;
5
5
  }>, {
6
6
  debug: boolean;
7
7
  start: string;
8
8
  }>;
9
- export default function module(input?: typeof schema.input): Module;
9
+ export default function module(input?: typeof Schema.input): Module;
10
10
  export {};
11
11
  //# sourceMappingURL=module.d.ts.map
@@ -1,16 +1,15 @@
1
1
  import command from "#command";
2
2
  import targets from "#targets";
3
- import log from "@primate/core/log";
4
- import color from "@rcompat/cli/color";
3
+ import cli from "@rcompat/cli";
5
4
  import io from "@rcompat/io";
6
5
  import p from "pema";
7
- const schema = p({
6
+ const Schema = p({
8
7
  debug: p.boolean.default(false),
9
8
  start: p.string.default("/"),
10
9
  });
11
10
  const names = new Set([...targets.map(t => t.name)]);
12
11
  export default function module(input = {}) {
13
- const options = schema.parse(input);
12
+ const options = Schema.parse(input);
14
13
  return {
15
14
  name: module.name,
16
15
  setup({ onInit, onBuild, onServe }) {
@@ -21,7 +20,7 @@ export default function module(input = {}) {
21
20
  if (names.has(app.target.name)) {
22
21
  app.done(async () => {
23
22
  const { exe, flags } = app.target.get();
24
- const executable_path = color.dim(`${app.path.build}/${exe}`);
23
+ const executable_path = cli.fg.dim(`${app.path.build}/${exe}`);
25
24
  const { host, port } = app.config("http");
26
25
  await app.runpath("worker.js").write(`
27
26
  import target from "@primate/native/target/${app.target.target}";
@@ -35,7 +34,7 @@ export default function module(input = {}) {
35
34
  files: ["server.js", "worker.js"],
36
35
  flags,
37
36
  }));
38
- log.system("executable written to {0}", executable_path);
37
+ app.log.system `executable written to ${executable_path}`;
39
38
  });
40
39
  }
41
40
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primate/native",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "Primate native applications",
5
5
  "homepage": "https://primate.run/docs/native",
6
6
  "bugs": "https://github.com/primate-run/primate/issues",
@@ -17,16 +17,16 @@
17
17
  "!/**/*.spec.*"
18
18
  ],
19
19
  "dependencies": {
20
- "@rcompat/cli": "^0.18.1",
21
- "@rcompat/error": "^0.3.1",
22
- "@rcompat/io": "^0.5.1",
23
- "@rcompat/runtime": "^0.11.1",
24
- "@rcompat/webview": "^0.20.1",
25
- "@primate/core": "^0.6.0",
26
- "pema": "^0.6.0"
20
+ "@rcompat/cli": "^0.24.0",
21
+ "@rcompat/error": "^0.8.0",
22
+ "@rcompat/io": "^0.10.0",
23
+ "@rcompat/runtime": "^0.16.0",
24
+ "@rcompat/webview": "^0.25.0",
25
+ "@primate/core": "^0.7.0",
26
+ "pema": "^0.7.0"
27
27
  },
28
28
  "peerDependencies": {
29
- "primate": "^0.37.0"
29
+ "primate": "^0.38.0"
30
30
  },
31
31
  "imports": {
32
32
  "#*": {