@workos/oagen 0.24.1 → 0.24.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.
@@ -3012,8 +3012,13 @@ function buildEmitterContext(spec, options) {
3012
3012
  let scopedModelNames;
3013
3013
  let scopedEnumNames;
3014
3014
  if (options.scopedServices && options.scopedServices.size > 0) {
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 });
3015
+ const scope = options.scopedServices;
3016
+ const present = options.presentServiceKeys ?? /* @__PURE__ */ new Set();
3017
+ const postMountOf = (service) => resolvedOperations.find((r) => r.service.name === service.name)?.mountOn ?? service.name;
3018
+ const reachable = collectReferencedNames(spec.services.filter((s) => {
3019
+ const postMount = postMountOf(s);
3020
+ return scope.has(postMount) || present.has(canonicalServiceKey(postMount));
3021
+ }), spec.models, { preserveAllDiscriminated: false });
3017
3022
  scopedModelNames = reachable.models;
3018
3023
  scopedEnumNames = reachable.enums;
3019
3024
  }
@@ -4148,4 +4153,4 @@ function summarize(changes) {
4148
4153
  //#endregion
4149
4154
  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
4155
 
4151
- //# sourceMappingURL=diff-8vcYeHKf.mjs.map
4156
+ //# sourceMappingURL=diff-IXR1sWSP.mjs.map