quality.md 0.1.0 → 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.
- package/README.md +14 -0
- package/bin/qualitymd.js +32 -0
- package/package.json +21 -22
- package/src/bin.ts +0 -6
- package/src/cli.ts +0 -26
- package/src/index.ts +0 -1
package/README.md
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# QUALITY.md
|
|
2
|
+
|
|
3
|
+
Run the early `qualitymd` command-line wrapper for `QUALITY.md` files.
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
npx quality.md init -
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
This package ships a small launcher that runs a prebuilt, native Go binary
|
|
10
|
+
delivered as a per-platform optional dependency (no toolchain or postinstall
|
|
11
|
+
download required).
|
|
12
|
+
|
|
13
|
+
See the [project README](https://github.com/qualitymd/quality.md) for the current
|
|
14
|
+
format specification status, command status, and other install methods.
|
package/bin/qualitymd.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
// Launcher for the quality.md CLI. The actual binary ships in a per-platform
|
|
5
|
+
// optional dependency (e.g. @qualitymd/cli-darwin-arm64). npm installs only the
|
|
6
|
+
// package matching the host's `os`/`cpu`, so we resolve that one and exec it.
|
|
7
|
+
|
|
8
|
+
const { spawnSync } = require("node:child_process");
|
|
9
|
+
|
|
10
|
+
const platformKey = `${process.platform}-${process.arch}`;
|
|
11
|
+
const pkg = `@qualitymd/cli-${platformKey}`;
|
|
12
|
+
const ext = process.platform === "win32" ? ".exe" : "";
|
|
13
|
+
|
|
14
|
+
let binary;
|
|
15
|
+
try {
|
|
16
|
+
binary = require.resolve(`${pkg}/bin/qualitymd${ext}`);
|
|
17
|
+
} catch {
|
|
18
|
+
console.error(
|
|
19
|
+
`quality.md: no prebuilt binary for ${platformKey}.\n` +
|
|
20
|
+
`The optional dependency ${pkg} is missing. If you installed with ` +
|
|
21
|
+
`--no-optional, reinstall without it, or use:\n` +
|
|
22
|
+
` go install github.com/qualitymd/quality.md/cmd/qualitymd@latest`,
|
|
23
|
+
);
|
|
24
|
+
process.exit(1);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const result = spawnSync(binary, process.argv.slice(2), { stdio: "inherit" });
|
|
28
|
+
|
|
29
|
+
if (result.error) {
|
|
30
|
+
throw result.error;
|
|
31
|
+
}
|
|
32
|
+
process.exit(result.status === null ? 1 : result.status);
|
package/package.json
CHANGED
|
@@ -1,33 +1,32 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "quality.md",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Evaluate QUALITY.md specifications from the command line.",
|
|
5
|
+
"homepage": "https://github.com/qualitymd/quality.md",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/qualitymd/quality.md.git"
|
|
8
9
|
},
|
|
9
|
-
"
|
|
10
|
-
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"bin": {
|
|
12
|
+
"qualitymd": "bin/qualitymd.js",
|
|
13
|
+
"quality.md": "bin/qualitymd.js"
|
|
11
14
|
},
|
|
12
15
|
"files": [
|
|
13
|
-
"
|
|
16
|
+
"bin"
|
|
14
17
|
],
|
|
15
|
-
"
|
|
16
|
-
"
|
|
18
|
+
"optionalDependencies": {
|
|
19
|
+
"@qualitymd/cli-darwin-arm64": "0.2.0",
|
|
20
|
+
"@qualitymd/cli-darwin-x64": "0.2.0",
|
|
21
|
+
"@qualitymd/cli-linux-arm64": "0.2.0",
|
|
22
|
+
"@qualitymd/cli-linux-x64": "0.2.0",
|
|
23
|
+
"@qualitymd/cli-win32-arm64": "0.2.0",
|
|
24
|
+
"@qualitymd/cli-win32-x64": "0.2.0"
|
|
17
25
|
},
|
|
18
26
|
"publishConfig": {
|
|
19
27
|
"access": "public"
|
|
20
28
|
},
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"effect": "4.0.0-beta.80"
|
|
24
|
-
},
|
|
25
|
-
"devDependencies": {
|
|
26
|
-
"@types/node": "^25.9.3",
|
|
27
|
-
"typescript": "^6.0.3"
|
|
28
|
-
},
|
|
29
|
-
"scripts": {
|
|
30
|
-
"start": "node ./src/bin.ts",
|
|
31
|
-
"typecheck": "tsc --build"
|
|
29
|
+
"engines": {
|
|
30
|
+
"node": ">=18"
|
|
32
31
|
}
|
|
33
|
-
}
|
|
32
|
+
}
|
package/src/bin.ts
DELETED
package/src/cli.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { Console } from "effect"
|
|
2
|
-
import { Command, Flag } from "effect/unstable/cli"
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* The root `qualitymd` command.
|
|
6
|
-
*
|
|
7
|
-
* Add subcommands with `Command.withSubcommands` as the CLI grows.
|
|
8
|
-
*/
|
|
9
|
-
const root = Command.make(
|
|
10
|
-
"qualitymd",
|
|
11
|
-
{
|
|
12
|
-
name: Flag.string("name").pipe(
|
|
13
|
-
Flag.withAlias("n"),
|
|
14
|
-
Flag.withDescription("Who to greet"),
|
|
15
|
-
Flag.withDefault("world")
|
|
16
|
-
)
|
|
17
|
-
},
|
|
18
|
-
({ name }) => Console.log(`Hello, ${name}! quality.md is ready.`)
|
|
19
|
-
).pipe(Command.withDescription("quality.md command-line interface"))
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Parses the provided arguments and runs the root command. The resulting
|
|
23
|
-
* `Effect` still requires the CLI `Environment`, which the entry point
|
|
24
|
-
* (`bin.ts`) provides via the Node services layer.
|
|
25
|
-
*/
|
|
26
|
-
export const run = Command.run(root, { version: "0.0.0" })
|
package/src/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { run } from "./cli.ts"
|