dalibre-plugin 0.0.0-stage → 0.5.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.
- package/README.md +12 -2
- package/bin/dalibre-plugin.js +19 -0
- package/package.json +24 -4
package/README.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
-
#
|
|
1
|
+
# dalibre-plugin
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The CLI for writing [Dalibre](https://github.com/djyde/dalibre) plugins,
|
|
4
|
+
with their docs:
|
|
5
|
+
|
|
6
|
+
```sh
|
|
7
|
+
npx dalibre-plugin@latest docs # topics; then: docs <topic>, or docs --all
|
|
8
|
+
npx dalibre-plugin@latest types # the API's types; then: types <Name>
|
|
9
|
+
npx dalibre-plugin@latest --help # every command
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Each version is the Dalibre release of the same number, and its docs are
|
|
13
|
+
that release's plugin API.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Runs the dalibre-plugin binary npm installed for this platform.
|
|
3
|
+
const { spawnSync } = require("node:child_process");
|
|
4
|
+
|
|
5
|
+
const os = process.platform, cpu = process.arch;
|
|
6
|
+
const exe = os === "win32" ? ".exe" : "";
|
|
7
|
+
let bin;
|
|
8
|
+
try {
|
|
9
|
+
bin = require.resolve(`dalibre-plugin-${os}-${cpu}/bin/dalibre-plugin${exe}`);
|
|
10
|
+
} catch {
|
|
11
|
+
console.error(`dalibre-plugin has no build for ${os} ${cpu}; build it from https://github.com/djyde/dalibre: go build ./cmd/dalibre-plugin`);
|
|
12
|
+
process.exit(1);
|
|
13
|
+
}
|
|
14
|
+
const r = spawnSync(bin, process.argv.slice(2), { stdio: "inherit" });
|
|
15
|
+
if (r.error) {
|
|
16
|
+
console.error(r.error.message);
|
|
17
|
+
process.exit(1);
|
|
18
|
+
}
|
|
19
|
+
process.exit(r.status ?? 1);
|
package/package.json
CHANGED
|
@@ -1,6 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dalibre-plugin",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.5.0",
|
|
4
|
+
"description": "Write, try and pack Dalibre plugins",
|
|
5
|
+
"homepage": "https://github.com/djyde/dalibre/blob/main/docs/plugins/README.md",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/djyde/dalibre.git",
|
|
9
|
+
"directory": "sdk/npm"
|
|
10
|
+
},
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"bin": {
|
|
13
|
+
"dalibre-plugin": "bin/dalibre-plugin.js"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"bin"
|
|
17
|
+
],
|
|
18
|
+
"optionalDependencies": {
|
|
19
|
+
"dalibre-plugin-darwin-arm64": "0.5.0",
|
|
20
|
+
"dalibre-plugin-darwin-x64": "0.5.0",
|
|
21
|
+
"dalibre-plugin-linux-arm64": "0.5.0",
|
|
22
|
+
"dalibre-plugin-linux-x64": "0.5.0",
|
|
23
|
+
"dalibre-plugin-win32-arm64": "0.5.0",
|
|
24
|
+
"dalibre-plugin-win32-x64": "0.5.0"
|
|
25
|
+
}
|
|
26
|
+
}
|