@workos/oagen 0.24.1 → 0.24.3

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.
@@ -3013,7 +3013,17 @@ function buildEmitterContext(spec, options) {
3013
3013
  let scopedEnumNames;
3014
3014
  if (options.scopedServices && options.scopedServices.size > 0) {
3015
3015
  const selected = options.scopedServices;
3016
- const reachable = collectReferencedNames(spec.services.filter((s) => resolvedOperations.some((r) => r.service.name === s.name && selected.has(r.mountOn))), spec.models, { preserveAllDiscriminated: false });
3016
+ const selectedOpsByService = /* @__PURE__ */ new Map();
3017
+ for (const r of resolvedOperations) {
3018
+ if (!selected.has(r.mountOn)) continue;
3019
+ const ops = selectedOpsByService.get(r.service.name) ?? [];
3020
+ ops.push(r.operation);
3021
+ selectedOpsByService.set(r.service.name, ops);
3022
+ }
3023
+ const reachable = collectReferencedNames(spec.services.filter((s) => selectedOpsByService.has(s.name)).map((s) => ({
3024
+ ...s,
3025
+ operations: selectedOpsByService.get(s.name)
3026
+ })), spec.models, { preserveAllDiscriminated: false });
3017
3027
  scopedModelNames = reachable.models;
3018
3028
  scopedEnumNames = reachable.enums;
3019
3029
  }
@@ -4148,4 +4158,4 @@ function summarize(changes) {
4148
4158
  //#endregion
4149
4159
  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 };
4150
4160
 
4151
- //# sourceMappingURL=diff-8vcYeHKf.mjs.map
4161
+ //# sourceMappingURL=diff-B5B0ie7S.mjs.map