@skill-map/spec 0.1.1 → 0.1.2
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/CHANGELOG.md +6 -0
- package/README.md +38 -3
- package/index.json +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Spec changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- f4214fe: Expand `spec/README.md` §Distribution with concrete install and usage snippets now that `@skill-map/spec` is live on npm: install command, loading a schema via `exports`, and a small integrity-verification example using the `index.json` sha256 block.
|
|
8
|
+
|
|
3
9
|
## 0.1.1
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -96,9 +96,44 @@ When spec and reference impl disagree, the spec wins. File an issue; one of them
|
|
|
96
96
|
|
|
97
97
|
## Distribution
|
|
98
98
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
99
|
+
Published to npm as [`@skill-map/spec`](https://www.npmjs.com/package/@skill-map/spec).
|
|
100
|
+
|
|
101
|
+
### Install
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
npm i @skill-map/spec
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### Use — load a schema
|
|
108
|
+
|
|
109
|
+
```js
|
|
110
|
+
import specIndex from '@skill-map/spec';
|
|
111
|
+
import nodeSchema from '@skill-map/spec/schemas/node.schema.json' with { type: 'json' };
|
|
112
|
+
|
|
113
|
+
console.log(specIndex.specVersion); // → "0.0.1" (payload version, tracks file shape)
|
|
114
|
+
console.log(specIndex.integrity.algorithm); // → "sha256"
|
|
115
|
+
console.log(nodeSchema.$id); // → "https://skill-map.dev/spec/v0/node.schema.json"
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Every JSON Schema is exported individually via `@skill-map/spec/schemas/*.json`. Prose documents ship in the tarball for reference but are not `exports`-surfaced.
|
|
119
|
+
|
|
120
|
+
### Verify integrity
|
|
121
|
+
|
|
122
|
+
The package ships `index.json` with a sha256 per file. To verify a local installation matches what was published:
|
|
123
|
+
|
|
124
|
+
```js
|
|
125
|
+
import { readFileSync } from 'node:fs';
|
|
126
|
+
import { createHash } from 'node:crypto';
|
|
127
|
+
import index from '@skill-map/spec';
|
|
128
|
+
|
|
129
|
+
const file = 'schemas/node.schema.json';
|
|
130
|
+
const actual = createHash('sha256').update(readFileSync(`node_modules/@skill-map/spec/${file}`)).digest('hex');
|
|
131
|
+
console.log(actual === index.integrity.files[file] ? 'ok' : 'drift');
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### JSON Schema Store
|
|
135
|
+
|
|
136
|
+
The schemas will be registered on JSON Schema Store once the canonical URLs under `skill-map.dev/spec/v0/` are stable (Step 13).
|
|
102
137
|
|
|
103
138
|
## License
|
|
104
139
|
|
package/index.json
CHANGED
|
@@ -159,8 +159,8 @@
|
|
|
159
159
|
"integrity": {
|
|
160
160
|
"algorithm": "sha256",
|
|
161
161
|
"files": {
|
|
162
|
-
"CHANGELOG.md": "
|
|
163
|
-
"README.md": "
|
|
162
|
+
"CHANGELOG.md": "91c092558c008f1de7394e6ad17554401f60f09951598e946b23cb04db37d9a0",
|
|
163
|
+
"README.md": "0b4301578969ae159f8a43359666744b8e67fd65caf720f270c32e8174cf2a91",
|
|
164
164
|
"architecture.md": "fdb1ed50f12bf7b7fb89663c651277b7ba5ed729bd3dc02f3963c51e4d480b12",
|
|
165
165
|
"cli-contract.md": "ddb7d62f45398866dba2f25da544f8376d76582170712cb5a0010bb826ffb46a",
|
|
166
166
|
"conformance/README.md": "4e41ff823b55ce3c274a033c5152ae0b2759fc714a714d7815593d8be84c8a4c",
|