@workos/oagen 0.24.5 → 0.24.6
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.
|
@@ -3431,7 +3431,7 @@ async function readManifest(dir) {
|
|
|
3431
3431
|
}
|
|
3432
3432
|
try {
|
|
3433
3433
|
const parsed = JSON.parse(raw);
|
|
3434
|
-
if (typeof parsed.version !== "number" || typeof parsed.language !== "string" ||
|
|
3434
|
+
if (typeof parsed.version !== "number" || typeof parsed.language !== "string" || !Array.isArray(parsed.files) || !parsed.files.every((p) => typeof p === "string")) return null;
|
|
3435
3435
|
if (parsed.version > MANIFEST_VERSION) {
|
|
3436
3436
|
console.warn(`[oagen] ${MANIFEST_FILENAME} schema version ${parsed.version} is newer than supported (${MANIFEST_VERSION}); ignoring for pruning.`);
|
|
3437
3437
|
return null;
|
|
@@ -3448,7 +3448,6 @@ async function writeManifest(dir, opts) {
|
|
|
3448
3448
|
version: MANIFEST_VERSION,
|
|
3449
3449
|
language: opts.language,
|
|
3450
3450
|
...opts.sdkName !== void 0 ? { sdkName: opts.sdkName } : {},
|
|
3451
|
-
generatedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
3452
3451
|
...opts.specSha !== void 0 ? { specSha: opts.specSha } : {},
|
|
3453
3452
|
...opts.specPath !== void 0 ? { specPath: opts.specPath } : {},
|
|
3454
3453
|
...opts.emitterSha !== void 0 ? { emitterSha: opts.emitterSha } : {},
|
|
@@ -3458,16 +3457,9 @@ async function writeManifest(dir, opts) {
|
|
|
3458
3457
|
files: [...new Set(opts.files)].sort(),
|
|
3459
3458
|
...opts.operations !== void 0 ? { operations: opts.operations } : {}
|
|
3460
3459
|
};
|
|
3461
|
-
const previous = await readManifest(dir);
|
|
3462
|
-
if (previous && sameManifestExceptGeneratedAt(previous, manifest)) manifest.generatedAt = previous.generatedAt;
|
|
3463
3460
|
await fs.mkdir(dir, { recursive: true });
|
|
3464
3461
|
await fs.writeFile(manifestPath, JSON.stringify(manifest, null, 2) + "\n", "utf-8");
|
|
3465
3462
|
}
|
|
3466
|
-
function sameManifestExceptGeneratedAt(a, b) {
|
|
3467
|
-
const { generatedAt: _aGeneratedAt, ...aComparable } = a;
|
|
3468
|
-
const { generatedAt: _bGeneratedAt, ...bComparable } = b;
|
|
3469
|
-
return JSON.stringify(aComparable) === JSON.stringify(bComparable);
|
|
3470
|
-
}
|
|
3471
3463
|
/** Return the set of previous paths no longer present in the current emission. */
|
|
3472
3464
|
function computeStalePaths(prev, currentPaths) {
|
|
3473
3465
|
const current = new Set(currentPaths);
|
|
@@ -4159,4 +4151,4 @@ function summarize(changes) {
|
|
|
4159
4151
|
//#endregion
|
|
4160
4152
|
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 };
|
|
4161
4153
|
|
|
4162
|
-
//# sourceMappingURL=diff-
|
|
4154
|
+
//# sourceMappingURL=diff-BDupSv0M.mjs.map
|