opencult 0.0.1 → 0.1.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/README.md +10 -3
- package/bin/opencult.js +36 -4
- package/package.json +10 -3
package/README.md
CHANGED
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
# opencult
|
|
2
2
|
|
|
3
|
-
The
|
|
3
|
+
The **OpenCult CLI**: discover, install and deploy free, open source tools.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
```sh
|
|
6
|
+
npx opencult --help
|
|
7
|
+
npx opencult deploy ./my-listing # run a listing locally with Docker Compose
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
This package is a small launcher. npm installs the prebuilt binary for your platform (`@opencult/cli-<os>-<arch>`) next to it, and the launcher runs it. Supported: macOS (arm64, x64), Linux (arm64, x64), Windows (x64).
|
|
11
|
+
|
|
12
|
+
Other ways to install: `brew install opencult/tap/opencult`, `cargo install opencult`, or a binary from [GitHub Releases](https://github.com/OpenCult/opencult/releases).
|
|
6
13
|
|
|
7
14
|
- Website: https://opencult.org
|
|
8
|
-
-
|
|
15
|
+
- Source: https://github.com/OpenCult/opencult
|
package/bin/opencult.js
CHANGED
|
@@ -1,6 +1,38 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
2
|
+
"use strict";
|
|
3
|
+
// Runs the prebuilt opencult binary from the platform package npm installed alongside this one.
|
|
3
4
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
const { spawnSync } = require("node:child_process");
|
|
6
|
+
|
|
7
|
+
const PACKAGES = {
|
|
8
|
+
"darwin-arm64": "@opencult/cli-darwin-arm64",
|
|
9
|
+
"darwin-x64": "@opencult/cli-darwin-x64",
|
|
10
|
+
"linux-arm64": "@opencult/cli-linux-arm64",
|
|
11
|
+
"linux-x64": "@opencult/cli-linux-x64",
|
|
12
|
+
"win32-x64": "@opencult/cli-win32-x64",
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const key = `${process.platform}-${process.arch}`;
|
|
16
|
+
const pkg = PACKAGES[key];
|
|
17
|
+
if (!pkg) {
|
|
18
|
+
console.error(`opencult: no prebuilt binary for ${key}. Install from source instead: cargo install opencult`);
|
|
19
|
+
process.exit(1);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
let bin;
|
|
23
|
+
try {
|
|
24
|
+
bin = require.resolve(`${pkg}/bin/opencult${process.platform === "win32" ? ".exe" : ""}`);
|
|
25
|
+
} catch {
|
|
26
|
+
console.error(`opencult: ${pkg} isn't installed. Reinstall without --no-optional / --omit=optional.`);
|
|
27
|
+
process.exit(1);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const result = spawnSync(bin, process.argv.slice(2), { stdio: "inherit" });
|
|
31
|
+
if (result.error) {
|
|
32
|
+
console.error(`opencult: ${result.error.message}`);
|
|
33
|
+
process.exit(1);
|
|
34
|
+
}
|
|
35
|
+
if (result.signal) {
|
|
36
|
+
process.kill(process.pid, result.signal);
|
|
37
|
+
}
|
|
38
|
+
process.exit(result.status ?? 1);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencult",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "OpenCult CLI: discover, install and deploy free, open source tools.
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "OpenCult CLI: discover, install and deploy free, open source tools.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"opencult",
|
|
7
7
|
"open-source",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"self-hosted",
|
|
10
10
|
"deploy",
|
|
11
11
|
"cli",
|
|
12
|
-
"
|
|
12
|
+
"docker-compose"
|
|
13
13
|
],
|
|
14
14
|
"homepage": "https://opencult.org",
|
|
15
15
|
"repository": {
|
|
@@ -30,5 +30,12 @@
|
|
|
30
30
|
],
|
|
31
31
|
"engines": {
|
|
32
32
|
"node": ">=18"
|
|
33
|
+
},
|
|
34
|
+
"optionalDependencies": {
|
|
35
|
+
"@opencult/cli-darwin-arm64": "0.1.1",
|
|
36
|
+
"@opencult/cli-darwin-x64": "0.1.1",
|
|
37
|
+
"@opencult/cli-linux-arm64": "0.1.1",
|
|
38
|
+
"@opencult/cli-linux-x64": "0.1.1",
|
|
39
|
+
"@opencult/cli-win32-x64": "0.1.1"
|
|
33
40
|
}
|
|
34
41
|
}
|