@workos/oagen 0.10.2 → 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 +26 -1
- 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
|
@@ -7185,6 +7185,9 @@ function filterSurface(surface, allowedNames, opts) {
|
|
|
7185
7185
|
function diffSnapshots(baseline, candidate, policy) {
|
|
7186
7186
|
const effectivePolicy = policy ?? baseline.policies;
|
|
7187
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);
|
|
7188
7191
|
const candById = /* @__PURE__ */ new Map();
|
|
7189
7192
|
const candByFqName = /* @__PURE__ */ new Map();
|
|
7190
7193
|
for (const sym of candidate.symbols) {
|
|
@@ -7194,15 +7197,37 @@ function diffSnapshots(baseline, candidate, policy) {
|
|
|
7194
7197
|
const baseByFqName = /* @__PURE__ */ new Set();
|
|
7195
7198
|
for (const sym of baseline.symbols) baseByFqName.add(sym.fqName);
|
|
7196
7199
|
for (const baseSym of baseline.symbols) {
|
|
7200
|
+
if (isServiceWrapperConstructor(baseSym, serviceAccessors)) continue;
|
|
7197
7201
|
const candSym = candById.get(baseSym.id) ?? candByFqName.get(baseSym.fqName);
|
|
7198
7202
|
changes.push(...classifySymbolChanges(baseSym, candSym, effectivePolicy));
|
|
7199
7203
|
}
|
|
7200
|
-
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
|
+
}
|
|
7201
7208
|
return {
|
|
7202
7209
|
changes,
|
|
7203
7210
|
summary: summarizeChanges(changes)
|
|
7204
7211
|
};
|
|
7205
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
|
+
}
|
|
7206
7231
|
//#endregion
|
|
7207
7232
|
//#region src/compat/concepts.ts
|
|
7208
7233
|
/**
|