@workos/oagen 0.19.4 → 0.19.5
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
CHANGED
|
@@ -4904,10 +4904,26 @@ function spliceExtraImports(existingLines, resultLines) {
|
|
|
4904
4904
|
const existingPhpUse = new Set(existingLines.filter(isPhpUseImport).map((l) => l.trim()));
|
|
4905
4905
|
const generatedPhpUse = new Set(resultLines.filter(isPhpUseImport).map((l) => l.trim()));
|
|
4906
4906
|
const extraPhpUse = [...existingPhpUse].filter((l) => !generatedPhpUse.has(l));
|
|
4907
|
-
const
|
|
4908
|
-
const
|
|
4909
|
-
|
|
4910
|
-
|
|
4907
|
+
const rubyRequireRe = /^(require(?:_relative)?)\s+['"]([^'"]+)['"]\s*$/;
|
|
4908
|
+
const rubyRequireKey = (l) => {
|
|
4909
|
+
const m = l.trim().match(rubyRequireRe);
|
|
4910
|
+
return m ? `${m[1]}\t${m[2]}` : void 0;
|
|
4911
|
+
};
|
|
4912
|
+
const generatedRubyRequireKeys = /* @__PURE__ */ new Set();
|
|
4913
|
+
for (const l of resultLines) {
|
|
4914
|
+
const key = rubyRequireKey(l);
|
|
4915
|
+
if (key) generatedRubyRequireKeys.add(key);
|
|
4916
|
+
}
|
|
4917
|
+
const seenExistingKeys = /* @__PURE__ */ new Set();
|
|
4918
|
+
const extraRubyRequire = [];
|
|
4919
|
+
for (const l of existingLines) {
|
|
4920
|
+
const key = rubyRequireKey(l);
|
|
4921
|
+
if (!key) continue;
|
|
4922
|
+
if (generatedRubyRequireKeys.has(key)) continue;
|
|
4923
|
+
if (seenExistingKeys.has(key)) continue;
|
|
4924
|
+
seenExistingKeys.add(key);
|
|
4925
|
+
extraRubyRequire.push(l.trim());
|
|
4926
|
+
}
|
|
4911
4927
|
const allExtra = [
|
|
4912
4928
|
...extraSimple,
|
|
4913
4929
|
...extraFromLines,
|