workspec 1.0.0 → 1.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/README.md +21 -3
- package/bin/workspec.js +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -2,9 +2,28 @@
|
|
|
2
2
|
|
|
3
3
|
This package provides:
|
|
4
4
|
|
|
5
|
-
- A programmatic WorkSpec
|
|
5
|
+
- A programmatic WorkSpec v1.0.0 validator (`validate()`) that emits RFC 7807 Problem Details
|
|
6
6
|
- A `workspec` CLI with `validate`, `migrate`, and `format` commands
|
|
7
7
|
|
|
8
|
+
## Install
|
|
9
|
+
|
|
10
|
+
Install globally to use `workspec` from any terminal/command prompt path:
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm install -g workspec
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
After install, run:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
workspec --help
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
This follows npm's standard cross-platform CLI pattern via `package.json#bin`:
|
|
23
|
+
|
|
24
|
+
- macOS/Linux: npm links an executable on your PATH
|
|
25
|
+
- Windows: npm creates command shims (`workspec.cmd`/`workspec.ps1`)
|
|
26
|
+
|
|
8
27
|
## CLI
|
|
9
28
|
|
|
10
29
|
Validate:
|
|
@@ -14,7 +33,7 @@ workspec validate path/to/file.workspec.json
|
|
|
14
33
|
workspec validate path/to/file.workspec.json --json
|
|
15
34
|
```
|
|
16
35
|
|
|
17
|
-
Migrate
|
|
36
|
+
Migrate (Previous UAW Syntax -> WorkSpec v1.0.0):
|
|
18
37
|
|
|
19
38
|
```bash
|
|
20
39
|
workspec migrate legacy.json --out migrated.workspec.json --schema
|
|
@@ -25,4 +44,3 @@ Format JSON:
|
|
|
25
44
|
```bash
|
|
26
45
|
workspec format file.json --write
|
|
27
46
|
```
|
|
28
|
-
|
package/bin/workspec.js
CHANGED
|
@@ -9,7 +9,7 @@ const migrator = require(path.join(__dirname, '..', 'workspec-migrate-v1-to-v2.j
|
|
|
9
9
|
|
|
10
10
|
function printHelp(exitCode = 0) {
|
|
11
11
|
const lines = [
|
|
12
|
-
'workspec - WorkSpec
|
|
12
|
+
'workspec - WorkSpec v1.0.0 CLI',
|
|
13
13
|
'',
|
|
14
14
|
'Usage:',
|
|
15
15
|
' workspec validate <file.workspec.json> [--json]',
|
|
@@ -18,7 +18,7 @@ function printHelp(exitCode = 0) {
|
|
|
18
18
|
'',
|
|
19
19
|
'Commands:',
|
|
20
20
|
' validate Validate a WorkSpec document (RFC 7807 output model).',
|
|
21
|
-
' migrate
|
|
21
|
+
' migrate Previous UAW Syntax -> WorkSpec v1.0.0.',
|
|
22
22
|
' format Pretty-print JSON (2-space).',
|
|
23
23
|
'',
|
|
24
24
|
'Flags:',
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "workspec",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.0.
|
|
5
|
-
"description": "WorkSpec
|
|
4
|
+
"version": "1.0.1",
|
|
5
|
+
"description": "WorkSpec v1.0.0 validator and CLI (workspec validate/migrate/format).",
|
|
6
6
|
"license": "AGPL-3.0",
|
|
7
7
|
"main": "index.js",
|
|
8
8
|
"bin": {
|