@workos/oagen 0.10.1 → 0.10.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 +28 -2
- package/dist/cli/index.mjs.map +1 -1
- package/dist/compat/index.mjs +1 -1
- package/dist/differ-CTl98yoS.d.mts.map +1 -1
- package/dist/{overlay-DWU6W29l.mjs → overlay-uz2WOJIP.mjs} +27 -2
- package/dist/overlay-uz2WOJIP.mjs.map +1 -0
- package/dist/verify/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/overlay-DWU6W29l.mjs.map +0 -1
package/dist/cli/index.mjs
CHANGED
|
@@ -6628,7 +6628,8 @@ function filterSurfaceByManifest(surface, manifest) {
|
|
|
6628
6628
|
else methodsExcluded++;
|
|
6629
6629
|
filteredClasses[name] = {
|
|
6630
6630
|
...cls,
|
|
6631
|
-
methods
|
|
6631
|
+
methods,
|
|
6632
|
+
constructorParams: []
|
|
6632
6633
|
};
|
|
6633
6634
|
} else filteredClasses[name] = cls;
|
|
6634
6635
|
}
|
|
@@ -7184,6 +7185,9 @@ function filterSurface(surface, allowedNames, opts) {
|
|
|
7184
7185
|
function diffSnapshots(baseline, candidate, policy) {
|
|
7185
7186
|
const effectivePolicy = policy ?? baseline.policies;
|
|
7186
7187
|
const changes = [];
|
|
7188
|
+
const serviceAccessors = /* @__PURE__ */ new Set();
|
|
7189
|
+
for (const sym of baseline.symbols) if (sym.kind === "service_accessor") serviceAccessors.add(sym.fqName);
|
|
7190
|
+
for (const sym of candidate.symbols) if (sym.kind === "service_accessor") serviceAccessors.add(sym.fqName);
|
|
7187
7191
|
const candById = /* @__PURE__ */ new Map();
|
|
7188
7192
|
const candByFqName = /* @__PURE__ */ new Map();
|
|
7189
7193
|
for (const sym of candidate.symbols) {
|
|
@@ -7193,15 +7197,37 @@ function diffSnapshots(baseline, candidate, policy) {
|
|
|
7193
7197
|
const baseByFqName = /* @__PURE__ */ new Set();
|
|
7194
7198
|
for (const sym of baseline.symbols) baseByFqName.add(sym.fqName);
|
|
7195
7199
|
for (const baseSym of baseline.symbols) {
|
|
7200
|
+
if (isServiceWrapperConstructor(baseSym, serviceAccessors)) continue;
|
|
7196
7201
|
const candSym = candById.get(baseSym.id) ?? candByFqName.get(baseSym.fqName);
|
|
7197
7202
|
changes.push(...classifySymbolChanges(baseSym, candSym, effectivePolicy));
|
|
7198
7203
|
}
|
|
7199
|
-
for (const candSym of candidate.symbols) if (!baseByFqName.has(candSym.fqName))
|
|
7204
|
+
for (const candSym of candidate.symbols) if (!baseByFqName.has(candSym.fqName)) {
|
|
7205
|
+
if (isServiceWrapperConstructor(candSym, serviceAccessors)) continue;
|
|
7206
|
+
changes.push(classifyAddedSymbol(candSym));
|
|
7207
|
+
}
|
|
7200
7208
|
return {
|
|
7201
7209
|
changes,
|
|
7202
7210
|
summary: summarizeChanges(changes)
|
|
7203
7211
|
};
|
|
7204
7212
|
}
|
|
7213
|
+
/**
|
|
7214
|
+
* Check if a symbol is a constructor belonging to a service wrapper class.
|
|
7215
|
+
*
|
|
7216
|
+
* Service wrapper constructors are internal plumbing (taking a client/config
|
|
7217
|
+
* object) — users interact with services via `client.admin_portal`, not
|
|
7218
|
+
* `new AdminPortal(...)`. Changes to these constructors should not be
|
|
7219
|
+
* reported as breaking.
|
|
7220
|
+
*
|
|
7221
|
+
* Catches two patterns:
|
|
7222
|
+
* - Ruby: kind === 'constructor', ownerFqName is a service_accessor
|
|
7223
|
+
* - PHP: kind === 'callable' with fqName ending in '.__construct'
|
|
7224
|
+
*/
|
|
7225
|
+
function isServiceWrapperConstructor(sym, serviceAccessors) {
|
|
7226
|
+
if (!sym.ownerFqName || !serviceAccessors.has(sym.ownerFqName)) return false;
|
|
7227
|
+
if (sym.kind === "constructor") return true;
|
|
7228
|
+
if (sym.kind === "callable" && sym.fqName.endsWith(".__construct")) return true;
|
|
7229
|
+
return false;
|
|
7230
|
+
}
|
|
7205
7231
|
//#endregion
|
|
7206
7232
|
//#region src/compat/concepts.ts
|
|
7207
7233
|
/**
|