limina 0.0.1
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/bin/limina.js +25 -0
- package/chunks/dep-DoSHsBSP.js +2026 -0
- package/chunks/dep-jgc7X0zw.js +377 -0
- package/chunks/dep-lkQg1P9Q.js +3 -0
- package/cli.js +2287 -0
- package/config.d.ts +483 -0
- package/config.js +4 -0
- package/index.d.ts +144 -0
- package/index.js +5 -0
- package/package.json +56 -0
package/bin/limina.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import "../chunks/dep-lkQg1P9Q.js";
|
|
3
|
+
import { existsSync } from "node:fs";
|
|
4
|
+
import path from "node:path";
|
|
5
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
6
|
+
import { spawnSync } from "node:child_process";
|
|
7
|
+
|
|
8
|
+
//#region bin/limina.js
|
|
9
|
+
const packageDir = path.resolve(fileURLToPath(new URL("..", import.meta.url)));
|
|
10
|
+
const distCliPath = path.join(packageDir, "cli.js");
|
|
11
|
+
const sourceCliPath = path.join(packageDir, "src/cli.ts");
|
|
12
|
+
const tsxBinName = process.platform === "win32" ? "tsx.cmd" : "tsx";
|
|
13
|
+
const tsxCliPath = [path.join(packageDir, "node_modules/.bin", tsxBinName), path.join(packageDir, "../../node_modules/.bin", tsxBinName)].find((candidate) => existsSync(candidate)) ?? "tsx";
|
|
14
|
+
if (existsSync(sourceCliPath)) {
|
|
15
|
+
const result = spawnSync(tsxCliPath, [sourceCliPath, ...process.argv.slice(2)], {
|
|
16
|
+
stdio: "inherit",
|
|
17
|
+
shell: process.platform === "win32"
|
|
18
|
+
});
|
|
19
|
+
if (result.error) throw result.error;
|
|
20
|
+
process.exit(result.status ?? 1);
|
|
21
|
+
} else if (existsSync(distCliPath)) await import(pathToFileURL(distCliPath).href);
|
|
22
|
+
else throw new Error(`Unable to find limina CLI entry. Expected ${distCliPath}.`);
|
|
23
|
+
|
|
24
|
+
//#endregion
|
|
25
|
+
export { };
|