@skill-map/cli 0.16.5 → 0.17.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/dist/index.js CHANGED
@@ -102,7 +102,7 @@ import yaml from "js-yaml";
102
102
  // package.json
103
103
  var package_default = {
104
104
  name: "@skill-map/cli",
105
- version: "0.16.5",
105
+ version: "0.17.0",
106
106
  description: "skill-map reference implementation \u2014 kernel + CLI + adapters.",
107
107
  license: "MIT",
108
108
  type: "module",
@@ -149,10 +149,13 @@ var package_default = {
149
149
  scripts: {
150
150
  build: "tsup",
151
151
  dev: "tsup --watch",
152
- "dev:serve": "node ../scripts/dev-serve.js",
152
+ "dev:serve": "node scripts/dev-serve.js",
153
153
  typecheck: "tsc --noEmit",
154
154
  lint: "eslint .",
155
155
  "lint:fix": "eslint . --fix",
156
+ reference: "node scripts/build-reference.js",
157
+ "reference:check": "node scripts/build-reference.js --check",
158
+ validate: "npm run typecheck && npm run lint && npm run build && npm run test:ci && npm run reference:check",
156
159
  pretest: "tsup",
157
160
  "pretest:ci": "tsup",
158
161
  "pretest:coverage": "tsup",
@@ -165,7 +168,7 @@ var package_default = {
165
168
  },
166
169
  dependencies: {
167
170
  "@hono/node-server": "2.0.1",
168
- "@skill-map/spec": "0.16.0",
171
+ "@skill-map/spec": "0.17.0",
169
172
  ajv: "8.18.0",
170
173
  "ajv-formats": "3.0.1",
171
174
  chokidar: "5.0.0",
@@ -381,6 +384,7 @@ function buildProviderFrontmatterValidator(providers) {
381
384
  const baseFile = resolve2(specRoot, "schemas/frontmatter/base.schema.json");
382
385
  const baseSchema = JSON.parse(readFileSync2(baseFile, "utf8"));
383
386
  ajv.addSchema(baseSchema);
387
+ registerProviderAuxiliarySchemas(ajv, providers);
384
388
  const compiled = /* @__PURE__ */ new Map();
385
389
  for (const provider of providers) {
386
390
  for (const [kind, entry] of Object.entries(provider.kinds)) {
@@ -405,6 +409,16 @@ function formatError(err) {
405
409
  const path = err.instancePath || "(root)";
406
410
  return `${path} ${err.message ?? err.keyword}`;
407
411
  }
412
+ function registerProviderAuxiliarySchemas(ajv, providers) {
413
+ for (const provider of providers) {
414
+ if (!provider.schemas) continue;
415
+ for (const aux of provider.schemas) {
416
+ const auxJson = aux;
417
+ if (typeof auxJson.$id === "string" && ajv.getSchema(auxJson.$id)) continue;
418
+ ajv.addSchema(aux);
419
+ }
420
+ }
421
+ }
408
422
  function resolveSpecRoot() {
409
423
  const require2 = createRequire2(import.meta.url);
410
424
  try {