@workos/oagen 0.8.0 → 0.9.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/dist/cli/index.mjs +600 -528
- package/dist/cli/index.mjs.map +1 -1
- package/dist/compat/index.mjs +1 -1
- package/dist/{diff-BaH9qa8k.mjs → diff-DZvzV9p3.mjs} +21 -21
- package/dist/{diff-BaH9qa8k.mjs.map → diff-DZvzV9p3.mjs.map} +1 -1
- package/dist/index.d.mts +10 -3
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{overlay-TYxHOCow.mjs → overlay-Bt6oz0dg.mjs} +2 -2
- package/dist/{overlay-TYxHOCow.mjs.map → overlay-Bt6oz0dg.mjs.map} +1 -1
- package/dist/verify/index.d.mts.map +1 -1
- package/dist/verify/index.mjs +46 -31
- package/dist/verify/index.mjs.map +1 -1
- package/docs/agents/architecture.md +1 -1
- package/docs/architecture/emitter-contract.md +3 -3
- package/docs/architecture/pipeline.md +1 -1
- package/docs/cli.md +10 -11
- package/package.json +1 -1
- package/skills/generate-emitter/SKILL.md +8 -11
- package/skills/generate-smoke-test/SKILL.md +6 -6
- package/skills/integrate/SKILL.md +1 -1
package/dist/compat/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as safeParse$1, v as ExtractorError } from "../tree-sitter-C53w_0WE.mjs";
|
|
2
|
-
import { A as getDefaultPolicy, C as defaultSeverityForCategory, D as isCompatibleSchemaVersion, E as COMPAT_SCHEMA_VERSION, O as validateSnapshot, S as summarizeChanges, T as apiSurfaceToSnapshot, _ as nodeHints, a as registerExtractor, b as classifyAddedSymbol, c as filterSurface, d as specDerivedHttpKeys, f as specDerivedMethodPaths, g as namedTypeWordsOverlap, h as defaultIsNullableOnlyDifference, i as getExtractor, j as mergePolicy, k as ALL_LANGUAGE_IDS, l as specDerivedEnumValues, m as NAMED_TYPE_RE, n as isPatchableChange, o as diffSnapshots, p as specDerivedNames, r as patchOverlay, s as diffSurfaces, t as buildOverlayLookup, u as specDerivedFieldPaths, v as resolveHints, w as severityMeetsThreshold, x as classifySymbolChanges, y as typeExistsInSurface } from "../overlay-
|
|
2
|
+
import { A as getDefaultPolicy, C as defaultSeverityForCategory, D as isCompatibleSchemaVersion, E as COMPAT_SCHEMA_VERSION, O as validateSnapshot, S as summarizeChanges, T as apiSurfaceToSnapshot, _ as nodeHints, a as registerExtractor, b as classifyAddedSymbol, c as filterSurface, d as specDerivedHttpKeys, f as specDerivedMethodPaths, g as namedTypeWordsOverlap, h as defaultIsNullableOnlyDifference, i as getExtractor, j as mergePolicy, k as ALL_LANGUAGE_IDS, l as specDerivedEnumValues, m as NAMED_TYPE_RE, n as isPatchableChange, o as diffSnapshots, p as specDerivedNames, r as patchOverlay, s as diffSurfaces, t as buildOverlayLookup, u as specDerivedFieldPaths, v as resolveHints, w as severityMeetsThreshold, x as classifySymbolChanges, y as typeExistsInSurface } from "../overlay-Bt6oz0dg.mjs";
|
|
3
3
|
import path, { basename, dirname, join, relative, resolve } from "node:path";
|
|
4
4
|
import Parser from "tree-sitter";
|
|
5
5
|
import ts from "typescript";
|
|
@@ -2439,8 +2439,7 @@ function generateAllFiles(spec, emitter, ctx) {
|
|
|
2439
2439
|
...emitter.generateClient(spec, ctx),
|
|
2440
2440
|
...emitter.generateErrors(ctx),
|
|
2441
2441
|
...emitter.generateTypeSignatures?.(reachableSpec, ctx) ?? [],
|
|
2442
|
-
...emitter.generateTests(reachableSpec, ctx)
|
|
2443
|
-
...emitter.generateManifest?.(spec, ctx) ?? []
|
|
2442
|
+
...emitter.generateTests(reachableSpec, ctx)
|
|
2444
2443
|
];
|
|
2445
2444
|
}
|
|
2446
2445
|
/** Apply file header to generated files, respecting headerPlacement and JSON files. */
|
|
@@ -2454,11 +2453,13 @@ function applyFileHeaders(files, header) {
|
|
|
2454
2453
|
function generateFiles(spec, emitter, options) {
|
|
2455
2454
|
const ctx = buildEmitterContext(spec, options);
|
|
2456
2455
|
const files = generateAllFiles(spec, emitter, ctx);
|
|
2456
|
+
const operations = emitter.buildOperationsMap?.(spec, ctx);
|
|
2457
2457
|
const header = emitter.fileHeader();
|
|
2458
2458
|
return {
|
|
2459
2459
|
files: applyFileHeaders(files, header),
|
|
2460
2460
|
ctx,
|
|
2461
|
-
header
|
|
2461
|
+
header,
|
|
2462
|
+
operations
|
|
2462
2463
|
};
|
|
2463
2464
|
}
|
|
2464
2465
|
//#endregion
|
|
@@ -2724,7 +2725,8 @@ async function writeManifest(dir, opts) {
|
|
|
2724
2725
|
...opts.emitterVersion !== void 0 ? { emitterVersion: opts.emitterVersion } : {},
|
|
2725
2726
|
...opts.configSha !== void 0 ? { configSha: opts.configSha } : {},
|
|
2726
2727
|
...opts.compatSchemaVersion !== void 0 ? { compatSchemaVersion: opts.compatSchemaVersion } : {},
|
|
2727
|
-
files: [...new Set(opts.files)].sort()
|
|
2728
|
+
files: [...new Set(opts.files)].sort(),
|
|
2729
|
+
...opts.operations !== void 0 ? { operations: opts.operations } : {}
|
|
2728
2730
|
};
|
|
2729
2731
|
const manifestPath = path$1.join(dir, MANIFEST_FILENAME);
|
|
2730
2732
|
await fs.mkdir(dir, { recursive: true });
|
|
@@ -2806,7 +2808,7 @@ async function removeEmptyParents(startDir, stopDir) {
|
|
|
2806
2808
|
async function generate(spec, emitter, options) {
|
|
2807
2809
|
const targetManifestForCtx = options.target && !options.noPrune ? await readManifest(options.target) : null;
|
|
2808
2810
|
const priorTargetManifestPaths = targetManifestForCtx ? new Set(targetManifestForCtx.files) : void 0;
|
|
2809
|
-
const { files: withHeaders, header } = generateFiles(spec, emitter, {
|
|
2811
|
+
const { files: withHeaders, header, operations } = generateFiles(spec, emitter, {
|
|
2810
2812
|
...options,
|
|
2811
2813
|
priorTargetManifestPaths
|
|
2812
2814
|
});
|
|
@@ -2832,7 +2834,8 @@ async function generate(spec, emitter, options) {
|
|
|
2832
2834
|
currentPaths: outputEmittedPaths,
|
|
2833
2835
|
language: emitter.language,
|
|
2834
2836
|
header,
|
|
2835
|
-
noPrune: options.noPrune
|
|
2837
|
+
noPrune: options.noPrune,
|
|
2838
|
+
operations
|
|
2836
2839
|
});
|
|
2837
2840
|
const allOutputFiles = [...writeResult.written, ...writeResult.merged];
|
|
2838
2841
|
if (allOutputFiles.length > 0) await formatTargetFiles(emitter, options.outputDir, allOutputFiles);
|
|
@@ -2854,7 +2857,8 @@ async function generate(spec, emitter, options) {
|
|
|
2854
2857
|
currentPaths: targetResult.emittedPaths,
|
|
2855
2858
|
language: emitter.language,
|
|
2856
2859
|
header,
|
|
2857
|
-
noPrune: options.noPrune
|
|
2860
|
+
noPrune: options.noPrune,
|
|
2861
|
+
operations
|
|
2858
2862
|
});
|
|
2859
2863
|
const allTargetFiles = [
|
|
2860
2864
|
...targetResult.written,
|
|
@@ -2870,19 +2874,18 @@ async function generate(spec, emitter, options) {
|
|
|
2870
2874
|
* then write the fresh manifest. Safe on first adoption (no previous manifest).
|
|
2871
2875
|
*/
|
|
2872
2876
|
async function applyManifestPrune(opts) {
|
|
2877
|
+
const manifestOpts = {
|
|
2878
|
+
language: opts.language,
|
|
2879
|
+
files: opts.currentPaths,
|
|
2880
|
+
operations: opts.operations
|
|
2881
|
+
};
|
|
2873
2882
|
if (opts.noPrune) {
|
|
2874
|
-
await writeManifest(opts.dir,
|
|
2875
|
-
language: opts.language,
|
|
2876
|
-
files: opts.currentPaths
|
|
2877
|
-
});
|
|
2883
|
+
await writeManifest(opts.dir, manifestOpts);
|
|
2878
2884
|
return;
|
|
2879
2885
|
}
|
|
2880
2886
|
if (!opts.prevManifest) {
|
|
2881
2887
|
console.log(`${opts.label}: no ${MANIFEST_FILENAME} found — skipping prune (this baseline manifest will be written now).`);
|
|
2882
|
-
await writeManifest(opts.dir,
|
|
2883
|
-
language: opts.language,
|
|
2884
|
-
files: opts.currentPaths
|
|
2885
|
-
});
|
|
2888
|
+
await writeManifest(opts.dir, manifestOpts);
|
|
2886
2889
|
return;
|
|
2887
2890
|
}
|
|
2888
2891
|
const stale = computeStalePaths(opts.prevManifest, opts.currentPaths);
|
|
@@ -2894,10 +2897,7 @@ async function applyManifestPrune(opts) {
|
|
|
2894
2897
|
for (const p of preserved) console.log(` ${p}`);
|
|
2895
2898
|
}
|
|
2896
2899
|
}
|
|
2897
|
-
await writeManifest(opts.dir,
|
|
2898
|
-
language: opts.language,
|
|
2899
|
-
files: opts.currentPaths
|
|
2900
|
-
});
|
|
2900
|
+
await writeManifest(opts.dir, manifestOpts);
|
|
2901
2901
|
}
|
|
2902
2902
|
//#endregion
|
|
2903
2903
|
//#region src/engine/registry.ts
|
|
@@ -3257,6 +3257,6 @@ function summarize(changes) {
|
|
|
3257
3257
|
};
|
|
3258
3258
|
}
|
|
3259
3259
|
//#endregion
|
|
3260
|
-
export {
|
|
3260
|
+
export { MANIFEST_FILENAME as a, treeShakeFiles as c, collectReferencedNames as d, generateAllFiles as f, resolveOperations as h, generate as i, applyFileHeaders as l, deriveMethodName as m, getEmitter as n, integrateGeneratedFiles as o, generateFiles as p, registerEmitter as r, mapFilesForTargetIntegration as s, diffSpecs as t, buildEmitterContext as u };
|
|
3261
3261
|
|
|
3262
|
-
//# sourceMappingURL=diff-
|
|
3262
|
+
//# sourceMappingURL=diff-DZvzV9p3.mjs.map
|