@payfit/iac 1.0.0-ephemeral-migration-scripts.7 → 1.0.0-ephemeral-migration-scripts.8
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/README.md +97 -4
- package/dist/executors/stack-migration/README.md +111 -11
- package/dist/executors/stack-migration/lib/constants.d.ts +0 -11
- package/dist/executors/stack-migration/lib/constants.js +1 -12
- package/dist/executors/stack-migration/lib/constants.js.map +1 -1
- package/dist/executors/stack-migration/lib/file-operations.d.ts +0 -43
- package/dist/executors/stack-migration/lib/file-operations.js +0 -88
- package/dist/executors/stack-migration/lib/file-operations.js.map +1 -1
- package/dist/executors/stack-migration/lib/git-operations.d.ts +0 -27
- package/dist/executors/stack-migration/lib/git-operations.js +2 -35
- package/dist/executors/stack-migration/lib/git-operations.js.map +1 -1
- package/dist/executors/stack-migration/lib/logger.d.ts +0 -3
- package/dist/executors/stack-migration/lib/logger.js +3 -6
- package/dist/executors/stack-migration/lib/logger.js.map +1 -1
- package/dist/executors/stack-migration/lib/migration-helper.d.ts +8 -44
- package/dist/executors/stack-migration/lib/migration-helper.js +23 -67
- package/dist/executors/stack-migration/lib/migration-helper.js.map +1 -1
- package/dist/executors/stack-migration/lib/migration-tool.d.ts +4 -15
- package/dist/executors/stack-migration/lib/migration-tool.js +77 -212
- package/dist/executors/stack-migration/lib/migration-tool.js.map +1 -1
- package/dist/executors/stack-migration/lib/path-builder.d.ts +0 -8
- package/dist/executors/stack-migration/lib/path-builder.js +2 -28
- package/dist/executors/stack-migration/lib/path-builder.js.map +1 -1
- package/dist/executors/stack-migration/lib/templates/index.d.ts +1 -0
- package/dist/executors/stack-migration/lib/templates/index.js +1 -0
- package/dist/executors/stack-migration/lib/templates/index.js.map +1 -1
- package/dist/executors/stack-migration/lib/templates/message-templates.d.ts +25 -0
- package/dist/executors/stack-migration/lib/templates/message-templates.js +107 -0
- package/dist/executors/stack-migration/lib/templates/message-templates.js.map +1 -0
- package/dist/executors/stack-migration/lib/templates/pr-templates.d.ts +0 -4
- package/dist/executors/stack-migration/lib/templates/pr-templates.js +3 -24
- package/dist/executors/stack-migration/lib/templates/pr-templates.js.map +1 -1
- package/dist/executors/stack-migration/lib/templates/procedure-template.js +5 -40
- package/dist/executors/stack-migration/lib/templates/procedure-template.js.map +1 -1
- package/dist/executors/stack-migration/lib/types.d.ts +0 -9
- package/dist/executors/stack-migration/lib/types.js +0 -3
- package/dist/executors/stack-migration/lib/types.js.map +1 -1
- package/dist/executors/stack-migration/schema.d.ts +2 -1
- package/dist/executors/stack-migration/schema.json +4 -3
- package/dist/executors/stack-migration/stack-migration.js +30 -60
- package/dist/executors/stack-migration/stack-migration.js.map +1 -1
- package/package.json +3 -2
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Git operations helper
|
|
4
|
-
*/
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.GitOperations = void 0;
|
|
7
4
|
const child_process_1 = require("child_process");
|
|
@@ -10,32 +7,22 @@ class GitOperations {
|
|
|
10
7
|
this.dryRun = dryRun;
|
|
11
8
|
this.logger = logger;
|
|
12
9
|
}
|
|
13
|
-
/**
|
|
14
|
-
* Execute a git command
|
|
15
|
-
*/
|
|
16
10
|
exec(command, cwd) {
|
|
17
11
|
if (this.dryRun) {
|
|
18
12
|
this.logger.info(`[DRY RUN] Would run git command: ${command}`);
|
|
19
|
-
return;
|
|
13
|
+
return '';
|
|
20
14
|
}
|
|
21
15
|
return (0, child_process_1.execSync)(command, { cwd, encoding: 'utf8' });
|
|
22
16
|
}
|
|
23
|
-
/**
|
|
24
|
-
* Clone a repository
|
|
25
|
-
*/
|
|
26
17
|
async clone(repoUrl, targetPath, cwd) {
|
|
27
18
|
if (this.dryRun) {
|
|
28
19
|
this.logger.info(`[DRY RUN] Would clone ${repoUrl} to ${targetPath}`);
|
|
29
20
|
return;
|
|
30
21
|
}
|
|
31
22
|
this.logger.info(`Cloning ${repoUrl}...`);
|
|
32
|
-
// Extract just the directory name from the target path to avoid duplication
|
|
33
23
|
const repoName = targetPath.split('/').pop() || targetPath;
|
|
34
24
|
this.exec(`git clone ${repoUrl} ${repoName}`, cwd);
|
|
35
25
|
}
|
|
36
|
-
/**
|
|
37
|
-
* Pull latest changes from origin/main
|
|
38
|
-
*/
|
|
39
26
|
async pull(cwd) {
|
|
40
27
|
if (this.dryRun) {
|
|
41
28
|
this.logger.info(`[DRY RUN] Would pull latest changes`);
|
|
@@ -43,9 +30,6 @@ class GitOperations {
|
|
|
43
30
|
}
|
|
44
31
|
this.exec('git pull origin main', cwd);
|
|
45
32
|
}
|
|
46
|
-
/**
|
|
47
|
-
* Create a new branch
|
|
48
|
-
*/
|
|
49
33
|
async createBranch(branchName, cwd) {
|
|
50
34
|
if (this.dryRun) {
|
|
51
35
|
this.logger.info(`[DRY RUN] Would create branch: ${branchName}`);
|
|
@@ -53,9 +37,6 @@ class GitOperations {
|
|
|
53
37
|
}
|
|
54
38
|
this.exec(`git checkout -b ${branchName}`, cwd);
|
|
55
39
|
}
|
|
56
|
-
/**
|
|
57
|
-
* Add files to staging area
|
|
58
|
-
*/
|
|
59
40
|
async add(files, cwd) {
|
|
60
41
|
if (this.dryRun) {
|
|
61
42
|
this.logger.info(`[DRY RUN] Would add files: ${files.join(' ')}`);
|
|
@@ -63,24 +44,15 @@ class GitOperations {
|
|
|
63
44
|
}
|
|
64
45
|
this.exec(`git add ${files.join(' ')}`, cwd);
|
|
65
46
|
}
|
|
66
|
-
/**
|
|
67
|
-
* Commit changes
|
|
68
|
-
*/
|
|
69
47
|
async commit(message, cwd) {
|
|
70
48
|
if (this.dryRun) {
|
|
71
49
|
this.logger.info(`[DRY RUN] Would commit with message:`);
|
|
72
|
-
message.split('\n').forEach(line => {
|
|
73
|
-
this.logger.info(` ${line}`);
|
|
74
|
-
});
|
|
50
|
+
message.split('\n').forEach(line => this.logger.info(` ${line}`));
|
|
75
51
|
return;
|
|
76
52
|
}
|
|
77
|
-
// Use heredoc for proper multiline commit messages
|
|
78
53
|
const escapedMessage = message.replace(/'/g, "'\\''");
|
|
79
54
|
this.exec(`git commit -m '${escapedMessage}'`, cwd);
|
|
80
55
|
}
|
|
81
|
-
/**
|
|
82
|
-
* Push branch to remote
|
|
83
|
-
*/
|
|
84
56
|
async push(branchName, cwd) {
|
|
85
57
|
if (this.dryRun) {
|
|
86
58
|
this.logger.info(`[DRY RUN] Would push branch: ${branchName}`);
|
|
@@ -88,9 +60,6 @@ class GitOperations {
|
|
|
88
60
|
}
|
|
89
61
|
this.exec(`git push -u origin ${branchName}`, cwd);
|
|
90
62
|
}
|
|
91
|
-
/**
|
|
92
|
-
* Create a draft PR using GitHub CLI
|
|
93
|
-
*/
|
|
94
63
|
async createPR(branchName, title, body, cwd) {
|
|
95
64
|
if (this.dryRun) {
|
|
96
65
|
this.logger.info('[DRY RUN] Would create draft PR:');
|
|
@@ -100,9 +69,7 @@ class GitOperations {
|
|
|
100
69
|
body.split('\n').forEach(line => this.logger.info(` ${line}`));
|
|
101
70
|
return 'https://github.com/example/repo/pull/0 (dry-run)';
|
|
102
71
|
}
|
|
103
|
-
// Push branch first
|
|
104
72
|
await this.push(branchName, cwd);
|
|
105
|
-
// Create PR using gh CLI with heredoc to properly handle special characters
|
|
106
73
|
const escapedTitle = title.replace(/'/g, "'\\''");
|
|
107
74
|
const prUrl = this.exec(`gh pr create --draft --title '${escapedTitle}' --body "$(cat <<'EOF'\n${body}\nEOF\n)"`, cwd);
|
|
108
75
|
this.logger.success(`Draft PR created: ${prUrl}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"git-operations.js","sourceRoot":"","sources":["../../../../src/executors/stack-migration/lib/git-operations.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"git-operations.js","sourceRoot":"","sources":["../../../../src/executors/stack-migration/lib/git-operations.ts"],"names":[],"mappings":";;;AAAA,iDAAwC;AASxC,MAAa,a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AG,CAAC,CAAA;IACpD,CAAC;IAED,KAAK,CAAC,QAAQ,CACZ,UAAkB,EAClB,KAAa,EACb,IAAY,EACZ,GAAW;QAEX,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,kCAAkC,CAAC,CAAA;YACpD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,aAAa,UAAU,EAAE,CAAC,CAAA;YAC3C,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,KAAK,EAAE,CAAC,CAAA;YACrC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;YAC3B,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,CAAA;YACjE,OAAO,kDAAkD,CAAA;QAC3D,CAAC;QAED,MAAM,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,GAAG,CAAC,CAAA;QAEhC,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;QACjD,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CACrB,iCAAiC,YAAY,4BAA4B,IAAI,WAAW,EACxF,GAAG,CACJ,CAAA;QAED,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,qBAAqB,KAAK,EAAE,CAAC,CAAA;QACjD,OAAO,KAAK,CAAA;IACd,CAAC;CACF;AA9FD,sCA8FC"}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Logging utility for migration operations
|
|
4
|
-
*/
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.MigrationLogger = void 0;
|
|
7
4
|
const tslib_1 = require("tslib");
|
|
@@ -21,15 +18,15 @@ class MigrationLogger {
|
|
|
21
18
|
}
|
|
22
19
|
section(title) {
|
|
23
20
|
console.log('');
|
|
24
|
-
console.log(chalk.cyan.bold(
|
|
21
|
+
console.log(chalk.cyan.bold('='.repeat(60)));
|
|
25
22
|
console.log(chalk.cyan.bold(title));
|
|
26
|
-
console.log(chalk.cyan.bold(
|
|
23
|
+
console.log(chalk.cyan.bold('='.repeat(60)));
|
|
27
24
|
console.log('');
|
|
28
25
|
}
|
|
29
26
|
step(current, total, description) {
|
|
30
27
|
console.log('');
|
|
31
28
|
console.log(chalk.blue.bold(`[Step ${current}/${total}] ${description}`));
|
|
32
|
-
console.log(chalk.blue(
|
|
29
|
+
console.log(chalk.blue('-'.repeat(60)));
|
|
33
30
|
console.log('');
|
|
34
31
|
}
|
|
35
32
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../../src/executors/stack-migration/lib/logger.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../../src/executors/stack-migration/lib/logger.ts"],"names":[],"mappings":";;;;AAAA,qDAA8B;AAE9B,MAAa,eAAe;IAC1B,IAAI,CAAC,OAAe;QAClB,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;IACtB,CAAC;IAED,OAAO,CAAC,OAAe;QACrB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,OAAO,EAAE,CAAC,CAAC,CAAA;IAC1C,CAAC;IAED,IAAI,CAAC,OAAe;QAClB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,OAAO,EAAE,CAAC,CAAC,CAAA;IAC3C,CAAC;IAED,KAAK,CAAC,OAAe;QACnB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,OAAO,EAAE,CAAC,CAAC,CAAA;IACxC,CAAC;IAED,OAAO,CAAC,KAAa;QACnB,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;QACf,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;QAC5C,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAA;QACnC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;QAC5C,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;IACjB,CAAC;IAED,IAAI,CAAC,OAAe,EAAE,KAAa,EAAE,WAAmB;QACtD,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;QACf,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,OAAO,IAAI,KAAK,KAAK,WAAW,EAAE,CAAC,CAAC,CAAA;QACzE,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;QACvC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;IACjB,CAAC;CACF;AA/BD,0CA+BC"}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Base migration helper with state management and user interaction
|
|
3
|
-
*/
|
|
4
1
|
import * as readline from 'readline';
|
|
5
2
|
import type { MigrationConfig } from './types';
|
|
6
3
|
import { FileOperations } from './file-operations';
|
|
@@ -16,59 +13,26 @@ export declare class MigrationHelper {
|
|
|
16
13
|
git: GitOperations;
|
|
17
14
|
files: FileOperations;
|
|
18
15
|
constructor(dryRun?: boolean, serviceRepoPath?: string);
|
|
19
|
-
/**
|
|
20
|
-
* Create default configuration
|
|
21
|
-
*/
|
|
22
|
-
private createDefaultConfig;
|
|
23
|
-
/**
|
|
24
|
-
* Initialize readline interface for user interaction
|
|
25
|
-
*/
|
|
26
16
|
initReadline(): void;
|
|
27
|
-
/**
|
|
28
|
-
* Close readline interface
|
|
29
|
-
*/
|
|
30
17
|
closeReadline(): void;
|
|
31
|
-
/**
|
|
32
|
-
* Ask user a question
|
|
33
|
-
*/
|
|
34
18
|
ask(question: string): Promise<string>;
|
|
35
|
-
/**
|
|
36
|
-
* Ask user for confirmation
|
|
37
|
-
*/
|
|
38
19
|
confirm(question: string, defaultYes?: boolean): Promise<boolean>;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
20
|
+
getOrAskConfig(optionValue: string | string[] | undefined, promptText: string, defaultValue?: string): Promise<string>;
|
|
21
|
+
generateBranchName(prefix: string): string;
|
|
22
|
+
exitWithMessage(message: string): never;
|
|
42
23
|
exec(command: string, options?: {
|
|
43
24
|
cwd?: string;
|
|
44
25
|
silent?: boolean;
|
|
45
26
|
}): string;
|
|
46
|
-
/**
|
|
47
|
-
* Execute a command silently
|
|
48
|
-
*/
|
|
49
27
|
execSilent(command: string, cwd?: string): string;
|
|
50
|
-
/**
|
|
51
|
-
* Check if spacectl is authenticated
|
|
52
|
-
*/
|
|
53
28
|
isSpacectlAuthenticated(): boolean;
|
|
54
|
-
/**
|
|
55
|
-
* Ensure spacectl is authenticated
|
|
56
|
-
*/
|
|
57
29
|
ensureSpacectlAuthentication(): Promise<void>;
|
|
58
|
-
/**
|
|
59
|
-
* Fetch all resources for a given stack
|
|
60
|
-
*/
|
|
61
30
|
getStackResourcesFromDirectory(stackId: string, cwd: string): string;
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
31
|
+
getStackModuleKey(stack: {
|
|
32
|
+
identifier: string;
|
|
33
|
+
environment: string;
|
|
34
|
+
region?: string;
|
|
35
|
+
}): string;
|
|
65
36
|
saveMigrationState(): void;
|
|
66
|
-
/**
|
|
67
|
-
* Load migration state from disk
|
|
68
|
-
*/
|
|
69
37
|
loadMigrationState(): boolean;
|
|
70
|
-
/**
|
|
71
|
-
* Clean up migration state file
|
|
72
|
-
*/
|
|
73
|
-
cleanupMigrationState(): void;
|
|
74
38
|
}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Base migration helper with state management and user interaction
|
|
4
|
-
*/
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.MigrationHelper = void 0;
|
|
7
4
|
const tslib_1 = require("tslib");
|
|
@@ -18,16 +15,7 @@ class MigrationHelper {
|
|
|
18
15
|
this.rl = null;
|
|
19
16
|
this.dryRun = dryRun;
|
|
20
17
|
this.logger = new logger_1.MigrationLogger();
|
|
21
|
-
this.config =
|
|
22
|
-
this.paths = new path_builder_1.MigrationPaths(serviceRepoPath);
|
|
23
|
-
this.git = new git_operations_1.GitOperations(dryRun, this.logger);
|
|
24
|
-
this.files = new file_operations_1.FileOperations(dryRun, this.logger);
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Create default configuration
|
|
28
|
-
*/
|
|
29
|
-
createDefaultConfig(serviceRepoPath) {
|
|
30
|
-
return {
|
|
18
|
+
this.config = {
|
|
31
19
|
serviceRepository: {
|
|
32
20
|
name: '',
|
|
33
21
|
path: serviceRepoPath,
|
|
@@ -38,16 +26,14 @@ class MigrationHelper {
|
|
|
38
26
|
repositories: {
|
|
39
27
|
domainEnrollment: '',
|
|
40
28
|
iacDeploy: '',
|
|
41
|
-
ecrDeploy: '',
|
|
42
29
|
},
|
|
43
30
|
stacks: [],
|
|
44
|
-
ecrRepositories: [],
|
|
45
31
|
generatedFiles: {},
|
|
46
32
|
};
|
|
33
|
+
this.paths = new path_builder_1.MigrationPaths(serviceRepoPath);
|
|
34
|
+
this.git = new git_operations_1.GitOperations(dryRun, this.logger);
|
|
35
|
+
this.files = new file_operations_1.FileOperations(dryRun, this.logger);
|
|
47
36
|
}
|
|
48
|
-
/**
|
|
49
|
-
* Initialize readline interface for user interaction
|
|
50
|
-
*/
|
|
51
37
|
initReadline() {
|
|
52
38
|
if (!this.rl) {
|
|
53
39
|
this.rl = readline.createInterface({
|
|
@@ -56,18 +42,12 @@ class MigrationHelper {
|
|
|
56
42
|
});
|
|
57
43
|
}
|
|
58
44
|
}
|
|
59
|
-
/**
|
|
60
|
-
* Close readline interface
|
|
61
|
-
*/
|
|
62
45
|
closeReadline() {
|
|
63
46
|
if (this.rl) {
|
|
64
47
|
this.rl.close();
|
|
65
48
|
this.rl = null;
|
|
66
49
|
}
|
|
67
50
|
}
|
|
68
|
-
/**
|
|
69
|
-
* Ask user a question
|
|
70
|
-
*/
|
|
71
51
|
async ask(question) {
|
|
72
52
|
this.initReadline();
|
|
73
53
|
return new Promise(resolve => {
|
|
@@ -76,9 +56,6 @@ class MigrationHelper {
|
|
|
76
56
|
});
|
|
77
57
|
});
|
|
78
58
|
}
|
|
79
|
-
/**
|
|
80
|
-
* Ask user for confirmation
|
|
81
|
-
*/
|
|
82
59
|
async confirm(question, defaultYes = false) {
|
|
83
60
|
const suffix = defaultYes ? ' (Y/n)' : ' (y/N)';
|
|
84
61
|
const answer = await this.ask(question + suffix);
|
|
@@ -86,16 +63,27 @@ class MigrationHelper {
|
|
|
86
63
|
return defaultYes;
|
|
87
64
|
return answer.toLowerCase() === 'y' || answer.toLowerCase() === 'yes';
|
|
88
65
|
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
66
|
+
async getOrAskConfig(optionValue, promptText, defaultValue) {
|
|
67
|
+
if (optionValue) {
|
|
68
|
+
return Array.isArray(optionValue) ? optionValue.join(',') : optionValue;
|
|
69
|
+
}
|
|
70
|
+
const answer = await this.ask(defaultValue ? `${promptText} [${defaultValue}]` : promptText);
|
|
71
|
+
return answer || defaultValue || '';
|
|
72
|
+
}
|
|
73
|
+
generateBranchName(prefix) {
|
|
74
|
+
return `${prefix}-${Date.now()}`;
|
|
75
|
+
}
|
|
76
|
+
exitWithMessage(message) {
|
|
77
|
+
this.logger.warn(message);
|
|
78
|
+
this.logger.info('Run this script again when ready');
|
|
79
|
+
process.exit(0);
|
|
80
|
+
}
|
|
92
81
|
exec(command, options = {}) {
|
|
93
82
|
try {
|
|
94
83
|
const result = (0, child_process_1.execSync)(command, {
|
|
95
84
|
encoding: 'utf-8',
|
|
96
85
|
cwd: options.cwd || process.cwd(),
|
|
97
86
|
stdio: options.silent ? 'pipe' : 'inherit',
|
|
98
|
-
// Increase buffer size to 100MB for large outputs
|
|
99
87
|
maxBuffer: 100 * 1024 * 1024,
|
|
100
88
|
});
|
|
101
89
|
return result ? result.trim() : '';
|
|
@@ -105,15 +93,9 @@ class MigrationHelper {
|
|
|
105
93
|
throw new Error(`Command failed: ${command}\n${errorMessage}`);
|
|
106
94
|
}
|
|
107
95
|
}
|
|
108
|
-
/**
|
|
109
|
-
* Execute a command silently
|
|
110
|
-
*/
|
|
111
96
|
execSilent(command, cwd) {
|
|
112
97
|
return this.exec(command, { cwd, silent: true });
|
|
113
98
|
}
|
|
114
|
-
/**
|
|
115
|
-
* Check if spacectl is authenticated
|
|
116
|
-
*/
|
|
117
99
|
isSpacectlAuthenticated() {
|
|
118
100
|
try {
|
|
119
101
|
this.execSilent('spacectl profile current');
|
|
@@ -123,11 +105,7 @@ class MigrationHelper {
|
|
|
123
105
|
return false;
|
|
124
106
|
}
|
|
125
107
|
}
|
|
126
|
-
/**
|
|
127
|
-
* Ensure spacectl is authenticated
|
|
128
|
-
*/
|
|
129
108
|
async ensureSpacectlAuthentication() {
|
|
130
|
-
// Skip authentication check in dry-run mode
|
|
131
109
|
if (this.dryRun) {
|
|
132
110
|
this.logger.info('Skipping spacectl authentication check (dry-run mode)');
|
|
133
111
|
return;
|
|
@@ -145,16 +123,12 @@ class MigrationHelper {
|
|
|
145
123
|
this.exec('spacectl profile login');
|
|
146
124
|
this.logger.success('spacectl authentication complete');
|
|
147
125
|
}
|
|
148
|
-
/**
|
|
149
|
-
* Fetch all resources for a given stack
|
|
150
|
-
*/
|
|
151
126
|
getStackResourcesFromDirectory(stackId, cwd) {
|
|
152
|
-
|
|
153
|
-
|
|
127
|
+
return this.execSilent(`spacectl stack resources list --id ${stackId}`, cwd);
|
|
128
|
+
}
|
|
129
|
+
getStackModuleKey(stack) {
|
|
130
|
+
return `${stack.identifier}-${stack.environment}${stack.region ? `-${stack.region}` : ''}`;
|
|
154
131
|
}
|
|
155
|
-
/**
|
|
156
|
-
* Save migration state to disk
|
|
157
|
-
*/
|
|
158
132
|
saveMigrationState() {
|
|
159
133
|
if (this.dryRun) {
|
|
160
134
|
this.logger.info(`[DRY RUN] Would save migration state to ${constants_1.FILE_NAMES.migrationState}`);
|
|
@@ -168,9 +142,6 @@ class MigrationHelper {
|
|
|
168
142
|
fs.writeFileSync(stateFile, JSON.stringify(state, null, 2));
|
|
169
143
|
this.logger.info(`Migration state saved to ${stateFile}`);
|
|
170
144
|
}
|
|
171
|
-
/**
|
|
172
|
-
* Load migration state from disk
|
|
173
|
-
*/
|
|
174
145
|
loadMigrationState() {
|
|
175
146
|
const stateFile = this.paths.migrationState;
|
|
176
147
|
if (!fs.existsSync(stateFile)) {
|
|
@@ -178,7 +149,6 @@ class MigrationHelper {
|
|
|
178
149
|
}
|
|
179
150
|
try {
|
|
180
151
|
const state = JSON.parse(fs.readFileSync(stateFile, 'utf-8'));
|
|
181
|
-
// Merge loaded state into current config
|
|
182
152
|
this.config = { ...this.config, ...state.config, resuming: true };
|
|
183
153
|
this.logger.success('Loaded existing migration state');
|
|
184
154
|
this.logger.info(` Started at: ${state.timestamp}`);
|
|
@@ -189,20 +159,6 @@ class MigrationHelper {
|
|
|
189
159
|
return false;
|
|
190
160
|
}
|
|
191
161
|
}
|
|
192
|
-
/**
|
|
193
|
-
* Clean up migration state file
|
|
194
|
-
*/
|
|
195
|
-
cleanupMigrationState() {
|
|
196
|
-
if (this.dryRun) {
|
|
197
|
-
this.logger.info(`[DRY RUN] Would delete migration state file ${constants_1.FILE_NAMES.migrationState}`);
|
|
198
|
-
return;
|
|
199
|
-
}
|
|
200
|
-
const stateFile = this.paths.migrationState;
|
|
201
|
-
if (fs.existsSync(stateFile)) {
|
|
202
|
-
fs.unlinkSync(stateFile);
|
|
203
|
-
this.logger.info('Migration state file cleaned up');
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
162
|
}
|
|
207
163
|
exports.MigrationHelper = MigrationHelper;
|
|
208
164
|
//# sourceMappingURL=migration-helper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migration-helper.js","sourceRoot":"","sources":["../../../../src/executors/stack-migration/lib/migration-helper.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"migration-helper.js","sourceRoot":"","sources":["../../../../src/executors/stack-migration/lib/migration-helper.ts"],"names":[],"mappings":";;;;AAAA,iDAAwC;AACxC,+CAAwB;AACxB,2DAAoC;AAIpC,2CAAwC;AACxC,uDAAkD;AAClD,qDAAgD;AAChD,qCAA0C;AAC1C,iDAA+C;AAE/C,MAAa,eAAe;IAS1B,YAAY,MAAM,GAAG,KAAK,EAAE,kBAA0B,OAAO,CAAC,GAAG,EAAE;QAP5D,OAAE,GAA8B,IAAI,CAAA;QAQzC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,MAAM,GAAG,IAAI,wBAAe,EAAE,CAAA;QACnC,IAAI,CAAC,MAAM,GAAG;YACZ,iBAAiB,EAAE;gBACjB,IAAI,EAAE,EAAE;gBACR,IAAI,EAAE,eAAe;gBACrB,MAAM,EAAE,EAAE;gBACV,IAAI,EAAE,EAAE;gBACR,UAAU,EAAE,EAAE;aACf;YACD,YAAY,EAAE;gBACZ,gBAAgB,EAAE,EAAE;gBACpB,SAAS,EAAE,EAAE;aACd;YACD,MAAM,EAAE,EAAE;YACV,cAAc,EAAE,EAAE;SACnB,CAAA;QACD,IAAI,CAAC,KAAK,GAAG,IAAI,6BAAc,CAAC,eAAe,CAAC,CAAA;QAChD,IAAI,CAAC,GAAG,GAAG,IAAI,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AY,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAA;YAC7D,IAAI,CAAC,MAAM,GAAG,EAAE,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,KAAK,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAA;YACjE,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,iCAAiC,CAAC,CAAA;YACtD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,iBAAiB,KAAK,CAAC,SAAS,EAAE,CAAC,CAAA;YACpD,OAAO,IAAI,CAAA;QACb,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,MAAM,CAAC,IAAI,CACd,mCAAmC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAC5F,CAAA;YACD,OAAO,KAAK,CAAA;QACd,CAAC;IACH,CAAC;CACF;AArMD,0CAqMC"}
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Main migration tool orchestrating all migration steps
|
|
3
|
-
*/
|
|
4
1
|
import { MigrationHelper } from './migration-helper';
|
|
5
2
|
export declare class MigrationTool extends MigrationHelper {
|
|
6
|
-
/**
|
|
7
|
-
* Step 1: Setup Repositories
|
|
8
|
-
* Clones required repos, validates spacectl auth
|
|
9
|
-
*/
|
|
10
3
|
setupRepositories(options?: {
|
|
11
4
|
name?: string;
|
|
12
5
|
domain?: string;
|
|
@@ -15,7 +8,7 @@ export declare class MigrationTool extends MigrationHelper {
|
|
|
15
8
|
}): Promise<void>;
|
|
16
9
|
/**
|
|
17
10
|
* Step 2: Load Configuration
|
|
18
|
-
* Load stacks
|
|
11
|
+
* Load stacks from iac-deploy
|
|
19
12
|
*/
|
|
20
13
|
loadConfiguration(): Promise<void>;
|
|
21
14
|
/**
|
|
@@ -27,11 +20,11 @@ export declare class MigrationTool extends MigrationHelper {
|
|
|
27
20
|
*/
|
|
28
21
|
createDomainEnrollmentPR(): Promise<void>;
|
|
29
22
|
/**
|
|
30
|
-
* Step 5: Create Service Repository PR (spacelift.yaml,
|
|
23
|
+
* Step 5: Create Service Repository PR (spacelift.yaml, import.tf)
|
|
31
24
|
*/
|
|
32
25
|
createServiceRepositoryPR(): Promise<void>;
|
|
33
26
|
/**
|
|
34
|
-
* Generate import.tf file with import blocks for stacks
|
|
27
|
+
* Generate import.tf file with import blocks for stacks
|
|
35
28
|
*/
|
|
36
29
|
private generateImportTf;
|
|
37
30
|
/**
|
|
@@ -39,17 +32,13 @@ export declare class MigrationTool extends MigrationHelper {
|
|
|
39
32
|
*/
|
|
40
33
|
private parseStackModuleResources;
|
|
41
34
|
/**
|
|
42
|
-
* Step 6: Create Cleanup
|
|
35
|
+
* Step 6: Create Cleanup PR for iac-deploy
|
|
43
36
|
*/
|
|
44
37
|
createCleanupPRs(): Promise<void>;
|
|
45
38
|
/**
|
|
46
39
|
* Create cleanup PR for iac-deploy
|
|
47
40
|
*/
|
|
48
41
|
private createIacDeployCleanupPR;
|
|
49
|
-
/**
|
|
50
|
-
* Create cleanup PR for ecr-deploy
|
|
51
|
-
*/
|
|
52
|
-
private createEcrDeployCleanupPR;
|
|
53
42
|
/**
|
|
54
43
|
* Step 7: Generate State Removal Commands
|
|
55
44
|
*/
|