@bizzywork/routing 0.0.0-stage → 0.2.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.
@@ -0,0 +1,60 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire as __bizzyRequire } from "node:module";
3
+ import { fileURLToPath as __bizzyPath } from "node:url";
4
+ const require = __bizzyRequire(import.meta.url);
5
+ const __filename = __bizzyPath(import.meta.url);
6
+ const __dirname = __bizzyPath(new URL(".", import.meta.url));
7
+
8
+ // bizzy-routing/launcher/bin/bizzy-routing.ts
9
+ import { homedir } from "node:os";
10
+ import { dirname } from "node:path";
11
+ import { fileURLToPath } from "node:url";
12
+ var [major = 0, minor = 0] = process.versions.node.split(".").map(Number);
13
+ if (major < 22 || major === 22 && minor < 13) {
14
+ process.stderr.write(`Bizzy routing needs Node 22.13 or newer; this is ${process.version}.
15
+ `);
16
+ process.exit(1);
17
+ }
18
+ var emitWarning = process.emitWarning.bind(process);
19
+ process.emitWarning = ((...args) => {
20
+ if (!String(args[0]).startsWith("SQLite is an experimental feature")) emitWarning(...args);
21
+ });
22
+ async function readStdin() {
23
+ let text = "";
24
+ for await (const chunk of process.stdin) text += String(chunk);
25
+ return text;
26
+ }
27
+ var { run } = await import("./main-7NNVOX2S.js");
28
+ var { plainUi } = await import("./ui-4PTMUQQ4.js");
29
+ var { clackUi, showError } = await import("./clack-ui-KUXMJI7C.js");
30
+ var interactive = Boolean(process.stdin.isTTY && process.stdout.isTTY);
31
+ try {
32
+ const result = await run({
33
+ argv: process.argv.slice(2),
34
+ env: process.env,
35
+ home: homedir(),
36
+ execPath: process.execPath,
37
+ bundleDir: dirname(fileURLToPath(import.meta.url)),
38
+ version: true ? "0.2.0" : "dev",
39
+ platform: process.platform,
40
+ uid: process.getuid?.(),
41
+ interactive,
42
+ ui: interactive ? clackUi() : plainUi((text) => process.stdout.write(text)),
43
+ readStdin,
44
+ stdout: (text) => process.stdout.write(text),
45
+ stderr: (text) => process.stderr.write(text)
46
+ });
47
+ if ("exit" in result) process.exitCode = result.exit;
48
+ else
49
+ for (const signal of ["SIGINT", "SIGTERM"])
50
+ process.once(signal, () => {
51
+ void result.close().then(() => process.exit(0));
52
+ });
53
+ } catch (error) {
54
+ if (interactive) process.exitCode = showError(error);
55
+ else {
56
+ process.stderr.write(`${error instanceof Error ? error.message : String(error)}
57
+ `);
58
+ process.exitCode = 1;
59
+ }
60
+ }
@@ -0,0 +1,62 @@
1
+ import { createRequire as __bizzyRequire } from "node:module";
2
+ import { fileURLToPath as __bizzyPath } from "node:url";
3
+ const require = __bizzyRequire(import.meta.url);
4
+ const __filename = __bizzyPath(import.meta.url);
5
+ const __dirname = __bizzyPath(new URL(".", import.meta.url));
6
+ var __create = Object.create;
7
+ var __defProp = Object.defineProperty;
8
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
9
+ var __getOwnPropNames = Object.getOwnPropertyNames;
10
+ var __getProtoOf = Object.getPrototypeOf;
11
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
12
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
13
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
14
+ }) : x)(function(x) {
15
+ if (typeof require !== "undefined") return require.apply(this, arguments);
16
+ throw Error('Dynamic require of "' + x + '" is not supported');
17
+ });
18
+ var __esm = (fn, res, err) => function __init() {
19
+ if (err) throw err[0];
20
+ try {
21
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
22
+ } catch (e) {
23
+ throw err = [e], e;
24
+ }
25
+ };
26
+ var __commonJS = (cb, mod) => function __require2() {
27
+ try {
28
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
29
+ } catch (e) {
30
+ throw mod = 0, e;
31
+ }
32
+ };
33
+ var __export = (target, all) => {
34
+ for (var name in all)
35
+ __defProp(target, name, { get: all[name], enumerable: true });
36
+ };
37
+ var __copyProps = (to, from, except, desc) => {
38
+ if (from && typeof from === "object" || typeof from === "function") {
39
+ for (let key of __getOwnPropNames(from))
40
+ if (!__hasOwnProp.call(to, key) && key !== except)
41
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
42
+ }
43
+ return to;
44
+ };
45
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
46
+ // If the importer is in node compatibility mode or this is not an ESM
47
+ // file that has been converted to a CommonJS file using a Babel-
48
+ // compatible transform (i.e. "__esModule" has not been set), then set
49
+ // "default" to the CommonJS "module.exports" for node compatibility.
50
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
51
+ mod
52
+ ));
53
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
54
+
55
+ export {
56
+ __require,
57
+ __esm,
58
+ __commonJS,
59
+ __export,
60
+ __toESM,
61
+ __toCommonJS
62
+ };