@workos/oagen 0.24.2 → 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.
- package/dist/cli/index.mjs +12 -7
- package/dist/cli/index.mjs.map +1 -1
- package/dist/{diff-IXR1sWSP.mjs → diff-B5B0ie7S.mjs} +13 -8
- package/dist/{diff-IXR1sWSP.mjs.map → diff-B5B0ie7S.mjs.map} +1 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/verify/index.mjs +1 -1
- package/package.json +1 -1
package/dist/cli/index.mjs
CHANGED
|
@@ -5837,13 +5837,18 @@ function buildEmitterContext(spec, options) {
|
|
|
5837
5837
|
let scopedModelNames;
|
|
5838
5838
|
let scopedEnumNames;
|
|
5839
5839
|
if (options.scopedServices && options.scopedServices.size > 0) {
|
|
5840
|
-
const
|
|
5841
|
-
const
|
|
5842
|
-
|
|
5843
|
-
|
|
5844
|
-
const
|
|
5845
|
-
|
|
5846
|
-
|
|
5840
|
+
const selected = options.scopedServices;
|
|
5841
|
+
const selectedOpsByService = /* @__PURE__ */ new Map();
|
|
5842
|
+
for (const r of resolvedOperations) {
|
|
5843
|
+
if (!selected.has(r.mountOn)) continue;
|
|
5844
|
+
const ops = selectedOpsByService.get(r.service.name) ?? [];
|
|
5845
|
+
ops.push(r.operation);
|
|
5846
|
+
selectedOpsByService.set(r.service.name, ops);
|
|
5847
|
+
}
|
|
5848
|
+
const reachable = collectReferencedNames(spec.services.filter((s) => selectedOpsByService.has(s.name)).map((s) => ({
|
|
5849
|
+
...s,
|
|
5850
|
+
operations: selectedOpsByService.get(s.name)
|
|
5851
|
+
})), spec.models, { preserveAllDiscriminated: false });
|
|
5847
5852
|
scopedModelNames = reachable.models;
|
|
5848
5853
|
scopedEnumNames = reachable.enums;
|
|
5849
5854
|
}
|