@workos/oagen 0.22.0 → 0.22.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.
- package/dist/cli/index.mjs +3 -2
- package/dist/cli/index.mjs.map +1 -1
- package/dist/{diff-Dobf9PHC.mjs → diff-DkeDowzz.mjs} +4 -3
- package/dist/diff-DkeDowzz.mjs.map +1 -0
- package/dist/index.mjs +1 -1
- package/dist/verify/index.mjs +1 -1
- package/package.json +2 -2
- package/dist/diff-Dobf9PHC.mjs.map +0 -1
package/dist/cli/index.mjs
CHANGED
|
@@ -4758,7 +4758,7 @@ async function writeFiles(files, outputDir, options) {
|
|
|
4758
4758
|
}
|
|
4759
4759
|
const adapter = language ? getMergeAdapter(language) : void 0;
|
|
4760
4760
|
if (adapter?.testFilePatterns ? adapter.testFilePatterns.some((p) => p.test(file.path)) : isDefaultTestFile(file.path)) {
|
|
4761
|
-
if (!(header && existingContent.startsWith(header))) {
|
|
4761
|
+
if (!(header && existingContent.startsWith(header)) && !file.overwriteExisting) {
|
|
4762
4762
|
result.skipped.push(file.path);
|
|
4763
4763
|
continue;
|
|
4764
4764
|
}
|
|
@@ -4926,7 +4926,8 @@ async function overwriteWithPreservedRegions(existingContent, generatedContent,
|
|
|
4926
4926
|
const info = className ? effectiveClassEndLines.get(className) : void 0;
|
|
4927
4927
|
for (const entry of classBlocks) {
|
|
4928
4928
|
let insertLine;
|
|
4929
|
-
|
|
4929
|
+
const isAmbiguousAnchor = /^end[;)\s]*$/.test(entry.anchor);
|
|
4930
|
+
if (entry.anchor && !entry.anchor.includes("@oagen-ignore") && !isAmbiguousAnchor && /[a-zA-Z]|^\/\*|^\/\//.test(entry.anchor)) {
|
|
4930
4931
|
for (let li = 0; li < result.length; li++) if (result[li].trimStart() === entry.anchor) {
|
|
4931
4932
|
insertLine = li;
|
|
4932
4933
|
break;
|