@absolutejs/absolute 0.13.2 → 0.13.4

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.
Files changed (2) hide show
  1. package/dist/cli/index.js +5 -16
  2. package/package.json +1 -1
package/dist/cli/index.js CHANGED
@@ -17,29 +17,16 @@ var readDbScripts = async () => {
17
17
  return null;
18
18
  return { upCommand, downCommand };
19
19
  };
20
- var execCommand = async (command) => {
21
- const args = command.split(" ");
22
- const proc = Bun.spawn(args, {
23
- stdin: "inherit",
24
- stdout: "inherit",
25
- stderr: "inherit"
26
- });
27
- return proc.exited;
28
- };
29
20
  var startDatabase = async (scripts) => {
30
21
  console.log("Starting database container...");
31
- const exitCode = await execCommand(scripts.upCommand);
22
+ const { exitCode } = await Bun.$`${{ raw: scripts.upCommand }}`.nothrow();
32
23
  if (exitCode !== 0)
33
24
  process.exit(exitCode);
34
25
  };
35
26
  var stopDatabase = async (scripts) => {
36
27
  console.log(`
37
28
  Stopping database container...`);
38
- try {
39
- await execCommand(scripts.downCommand);
40
- } catch {
41
- console.error("Failed to stop database container");
42
- }
29
+ await Bun.$`${{ raw: scripts.downCommand }}`.quiet().nothrow();
43
30
  };
44
31
  var dev = async (serverEntry) => {
45
32
  const usesDocker = existsSync(resolve(COMPOSE_PATH));
@@ -58,7 +45,9 @@ var dev = async (serverEntry) => {
58
45
  cleaning = true;
59
46
  try {
60
47
  server.kill();
61
- } catch {}
48
+ } catch (err) {
49
+ console.error("Failed to kill server process:", err);
50
+ }
62
51
  await server.exited;
63
52
  if (scripts)
64
53
  await stopDatabase(scripts);
package/package.json CHANGED
@@ -55,5 +55,5 @@
55
55
  "typecheck": "bun run tsc --noEmit"
56
56
  },
57
57
  "types": "./dist/index.d.ts",
58
- "version": "0.13.2"
58
+ "version": "0.13.4"
59
59
  }