@workos/oagen 0.17.1 → 0.17.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 +25 -0
- package/dist/cli/index.mjs.map +1 -1
- package/dist/{diff-C38px0NK.mjs → diff-DLqJSVYR.mjs} +26 -1
- package/dist/diff-DLqJSVYR.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-C38px0NK.mjs.map +0 -1
|
@@ -2086,6 +2086,7 @@ async function writeFiles(files, outputDir, options) {
|
|
|
2086
2086
|
const header = options?.header ?? "";
|
|
2087
2087
|
for (const file of sorted) {
|
|
2088
2088
|
const fullPath = path$1.join(outputDir, file.path);
|
|
2089
|
+
await renameMismatchedCasing(fullPath);
|
|
2089
2090
|
let existingContent = null;
|
|
2090
2091
|
try {
|
|
2091
2092
|
existingContent = await fs.readFile(fullPath, "utf-8");
|
|
@@ -2158,6 +2159,30 @@ async function writeFiles(files, outputDir, options) {
|
|
|
2158
2159
|
}
|
|
2159
2160
|
return result;
|
|
2160
2161
|
}
|
|
2162
|
+
/**
|
|
2163
|
+
* If a sibling exists with the same name except for letter case, rename it to
|
|
2164
|
+
* the requested casing. Uses a two-step rename via a temporary unique name so
|
|
2165
|
+
* case-insensitive filesystems (APFS on macOS, NTFS on Windows) actually
|
|
2166
|
+
* update the entry — `rename('Foo', 'FOO')` is a no-op on those systems.
|
|
2167
|
+
*/
|
|
2168
|
+
async function renameMismatchedCasing(fullPath) {
|
|
2169
|
+
const dir = path$1.dirname(fullPath);
|
|
2170
|
+
const target = path$1.basename(fullPath);
|
|
2171
|
+
let entries;
|
|
2172
|
+
try {
|
|
2173
|
+
entries = await fs.readdir(dir);
|
|
2174
|
+
} catch {
|
|
2175
|
+
return;
|
|
2176
|
+
}
|
|
2177
|
+
if (entries.includes(target)) return;
|
|
2178
|
+
const targetLower = target.toLowerCase();
|
|
2179
|
+
const mismatch = entries.find((e) => e.toLowerCase() === targetLower);
|
|
2180
|
+
if (!mismatch) return;
|
|
2181
|
+
const oldPath = path$1.join(dir, mismatch);
|
|
2182
|
+
const tempPath = path$1.join(dir, `.oagen-case-${process.pid}-${Date.now()}-${target}`);
|
|
2183
|
+
await fs.rename(oldPath, tempPath);
|
|
2184
|
+
await fs.rename(tempPath, fullPath);
|
|
2185
|
+
}
|
|
2161
2186
|
/** Comprehensive fallback when no adapter is available. */
|
|
2162
2187
|
function isDefaultTestFile(filePath) {
|
|
2163
2188
|
return /\.(spec|test)\.[jt]sx?$/.test(filePath) || filePath.endsWith("_test.go") || filePath.endsWith("_test.rb") || filePath.endsWith("_spec.rb") || /(?:^|\/)test_.*\.py$/.test(filePath) || filePath.endsWith("_test.py") || filePath.endsWith("Test.php") || filePath.endsWith("_test.rs") || /(?:^|\/)tests\/.*\.rs$/.test(filePath);
|
|
@@ -3260,4 +3285,4 @@ function summarize(changes) {
|
|
|
3260
3285
|
//#endregion
|
|
3261
3286
|
export { MANIFEST_FILENAME as a, treeShakeFiles as c, collectReferencedNames as d, generateAllFiles as f, resolveOperations as h, generate as i, applyFileHeaders as l, deriveMethodName as m, getEmitter as n, integrateGeneratedFiles as o, generateFiles as p, registerEmitter as r, mapFilesForTargetIntegration as s, diffSpecs as t, buildEmitterContext as u };
|
|
3262
3287
|
|
|
3263
|
-
//# sourceMappingURL=diff-
|
|
3288
|
+
//# sourceMappingURL=diff-DLqJSVYR.mjs.map
|