@primate/core 0.7.1 → 0.7.3

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.
@@ -52,6 +52,7 @@ export default async function build_server(app) {
52
52
  entryPoints: [app.path.build.join("serve.js").path],
53
53
  outfile: app.path.build.join("server.js").path,
54
54
  bundle: true,
55
+ minify: app.mode === "production",
55
56
  platform: "node",
56
57
  format: "esm",
57
58
  packages: app.mode === "development" ? "external" : undefined,
@@ -60,10 +61,7 @@ export default async function build_server(app) {
60
61
  ".json": "json",
61
62
  },
62
63
  banner: {
63
- js: `
64
- import { createRequire as __createRequire } from "node:module";
65
- const require = __createRequire(import.meta.url);
66
- `,
64
+ js: `import { createRequire as __createRequire } from "node:module";const require = __createRequire(import.meta.url);`,
67
65
  },
68
66
  nodePaths: [app.root.join("node_modules").path],
69
67
  resolveExtensions: app.extensions,
@@ -17,7 +17,7 @@ export default async function apply_migration() {
17
17
  .toSorted((a, b) => a.n - b.n);
18
18
  if (files.length === 0) {
19
19
  cli.print("No pending migrations.\n");
20
- return;
20
+ runtime.exit();
21
21
  }
22
22
  for (const { file, n } of files) {
23
23
  const { default: migration } = await import(file.path);
@@ -57,7 +57,6 @@ export default async function create_migration(desc) {
57
57
  // generate virtual entry
58
58
  const entry = store_files.map((f, i) => `import s${i} from "${f.path}";`).join("\n") + `\nexport default [
59
59
  ${store_files.map((_, i) => `s${i}`).join(",\n ")}\n];`;
60
- console.log("entry", entry);
61
60
  const stores = await bundle(entry);
62
61
  const diffs = [];
63
62
  const seen = new Set();
@@ -143,7 +142,7 @@ export default async function create_migration(desc) {
143
142
  }
144
143
  if (diffs.length === 0) {
145
144
  cli.print("No schema changes detected.\n");
146
- return;
145
+ runtime.exit();
147
146
  }
148
147
  if (!await migrations.exists())
149
148
  await migrations.create();
@@ -33,5 +33,6 @@ export default async function status_migration() {
33
33
  if (last_applied.length === 0 && pending.length === 0) {
34
34
  cli.print("No migrations found.\n");
35
35
  }
36
+ runtime.exit();
36
37
  }
37
38
  //# sourceMappingURL=status.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primate/core",
3
- "version": "0.7.1",
3
+ "version": "0.7.3",
4
4
  "description": "The universal web framework",
5
5
  "homepage": "https://primate.run",
6
6
  "bugs": "https://github.com/primate-run/primate/issues",