@duckflux/runner 0.7.1 → 0.7.2

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/dist/main.js CHANGED
@@ -126,9 +126,7 @@ async function createHub(config) {
126
126
  var init_eventhub = () => {};
127
127
 
128
128
  // src/main.ts
129
- import { readFileSync } from "fs";
130
129
  import { parseArgs } from "util";
131
- import { dirname as dirname5, resolve as resolve5 } from "path";
132
130
 
133
131
  // src/lint.ts
134
132
  import { dirname as dirname2 } from "node:path";
@@ -57039,15 +57037,45 @@ async function validateCommand(filePath, cliValues) {
57039
57037
  return 1;
57040
57038
  }
57041
57039
  }
57040
+ // package.json
57041
+ var package_default = {
57042
+ name: "@duckflux/runner",
57043
+ version: "0.7.2",
57044
+ type: "module",
57045
+ bin: {
57046
+ quack: "dist/main.js"
57047
+ },
57048
+ exports: {
57049
+ ".": "./dist/index.js",
57050
+ "./dist/main.js": "./dist/main.js"
57051
+ },
57052
+ files: [
57053
+ "dist",
57054
+ "src"
57055
+ ],
57056
+ scripts: {
57057
+ build: "bun build src/main.ts --outdir dist --target node --format esm --banner '#!/usr/bin/env node' && tsc --project tsconfig.build.json",
57058
+ postbuild: "chmod +x dist/main.js",
57059
+ prepublishOnly: "bun run build",
57060
+ "compile:linux-x64": "bun build --compile --target=bun-linux-x64 src/main.ts --outfile bin/quack-linux-x64",
57061
+ "compile:linux-arm64": "bun build --compile --target=bun-linux-arm64 src/main.ts --outfile bin/quack-linux-arm64",
57062
+ "compile:darwin-x64": "bun build --compile --target=bun-darwin-x64 src/main.ts --outfile bin/quack-darwin-x64",
57063
+ "compile:darwin-arm64": "bun build --compile --target=bun-darwin-arm64 src/main.ts --outfile bin/quack-darwin-arm64",
57064
+ "compile:windows-x64": "bun build --compile --target=bun-windows-x64 src/main.ts --outfile bin/quack-windows-x64.exe",
57065
+ compile: "bun run compile:linux-x64 && bun run compile:linux-arm64 && bun run compile:darwin-x64 && bun run compile:darwin-arm64 && bun run compile:windows-x64"
57066
+ },
57067
+ dependencies: {
57068
+ "@duckflux/core": "workspace:*"
57069
+ },
57070
+ optionalDependencies: {
57071
+ "@duckflux/hub-nats": "workspace:*",
57072
+ "@duckflux/hub-redis": "workspace:*"
57073
+ }
57074
+ };
57042
57075
 
57043
57076
  // src/main.ts
57044
57077
  function getVersion() {
57045
- try {
57046
- const pkg = JSON.parse(readFileSync(resolve5(dirname5(new URL(import.meta.url).pathname), "../package.json"), "utf-8"));
57047
- return pkg.version ?? "0.0.0";
57048
- } catch {
57049
- return "0.0.0";
57050
- }
57078
+ return package_default.version ?? "0.0.0";
57051
57079
  }
57052
57080
  if (__require.main == __require.module) {
57053
57081
  const argv = Bun.argv.slice(2);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@duckflux/runner",
3
- "version": "0.7.1",
3
+ "version": "0.7.2",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "quack": "dist/main.js"
package/src/main.ts CHANGED
@@ -1,19 +1,13 @@
1
1
  #!/usr/bin/env bun
2
- import { readFileSync } from "node:fs";
3
2
  import { parseArgs } from "node:util";
4
- import { dirname, resolve } from "node:path";
5
3
  import lintCommand from "./lint";
6
4
  import runCommand from "./run";
7
5
  import serverCommand from "./server";
8
6
  import validateCommand from "./validate";
7
+ import pkg from "../package.json";
9
8
 
10
9
  function getVersion(): string {
11
- try {
12
- const pkg = JSON.parse(readFileSync(resolve(dirname(new URL(import.meta.url).pathname), "../package.json"), "utf-8"));
13
- return pkg.version ?? "0.0.0";
14
- } catch {
15
- return "0.0.0";
16
- }
10
+ return pkg.version ?? "0.0.0";
17
11
  }
18
12
 
19
13
  if (import.meta.main) {