@nikelyh/metamorph 2.0.10 → 2.0.11
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/index.js +3 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -420,6 +420,7 @@ var ShadowWorkspace = class {
|
|
|
420
420
|
import fs2 from "fs-extra";
|
|
421
421
|
import * as path from "path";
|
|
422
422
|
import { execSync } from "child_process";
|
|
423
|
+
import * as os from "os";
|
|
423
424
|
var MigrationIntegrator = class {
|
|
424
425
|
shadowWorkspace;
|
|
425
426
|
constructor(shadowWorkspace) {
|
|
@@ -470,7 +471,7 @@ var MigrationIntegrator = class {
|
|
|
470
471
|
return `Successfully applied migration via Git to branch: ${branchName}`;
|
|
471
472
|
}
|
|
472
473
|
async applyWithZipFallback(runId, shadowDir, targetPath) {
|
|
473
|
-
const backupDir = path.resolve(
|
|
474
|
+
const backupDir = path.resolve(os.tmpdir(), "metamorph_backups", `${runId}_backup`);
|
|
474
475
|
fs2.ensureDirSync(backupDir);
|
|
475
476
|
fs2.copySync(targetPath, backupDir, {
|
|
476
477
|
filter: (src) => !src.includes("node_modules") && !src.includes(".git") && !src.includes(".metamorph")
|
|
@@ -1128,7 +1129,7 @@ var mapFilesProcessor = {
|
|
|
1128
1129
|
const fullPath = path2.join(dir, file);
|
|
1129
1130
|
if (fs3.statSync(fullPath).isDirectory()) {
|
|
1130
1131
|
scanDir(fullPath);
|
|
1131
|
-
} else if (file.endsWith(".ts") || file.endsWith(".js")) {
|
|
1132
|
+
} else if (file.endsWith(".ts") || file.endsWith(".js") || file.endsWith(".tsx") || file.endsWith(".jsx")) {
|
|
1132
1133
|
filesToMigrate.push(fullPath);
|
|
1133
1134
|
}
|
|
1134
1135
|
}
|