@pwrdrvr/microapps-publish 0.0.20 → 0.0.21
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/bin/run +5 -0
- package/dist/commands/nextjs-docker-auto.d.ts +38 -0
- package/dist/commands/nextjs-docker-auto.d.ts.map +1 -0
- package/dist/commands/nextjs-docker-auto.js +415 -0
- package/dist/commands/nextjs-docker-auto.js.map +1 -0
- package/dist/commands/nextjs-version-restore.d.ts +14 -0
- package/dist/commands/nextjs-version-restore.d.ts.map +1 -0
- package/dist/commands/nextjs-version-restore.js +58 -0
- package/dist/commands/nextjs-version-restore.js.map +1 -0
- package/dist/commands/nextjs-version.d.ts +16 -0
- package/dist/commands/nextjs-version.d.ts.map +1 -0
- package/dist/commands/nextjs-version.js +94 -0
- package/dist/commands/nextjs-version.js.map +1 -0
- package/dist/commands/preflight.d.ts +15 -0
- package/dist/commands/preflight.d.ts.map +1 -0
- package/dist/commands/preflight.js +111 -0
- package/dist/commands/preflight.js.map +1 -0
- package/dist/commands/publish.d.ts +23 -0
- package/dist/commands/publish.d.ts.map +1 -0
- package/dist/commands/publish.js +300 -0
- package/dist/commands/publish.js.map +1 -0
- package/dist/config/Config.d.ts +0 -2
- package/dist/config/Config.d.ts.map +1 -1
- package/dist/config/Config.js +0 -5
- package/dist/config/Config.js.map +1 -1
- package/dist/index.d.ts +1 -64
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -480
- package/dist/index.js.map +1 -1
- package/dist/{DeployClient.d.ts → lib/DeployClient.d.ts} +14 -6
- package/dist/lib/DeployClient.d.ts.map +1 -0
- package/dist/{DeployClient.js → lib/DeployClient.js} +15 -5
- package/dist/lib/DeployClient.js.map +1 -0
- package/dist/{S3TransferUtility.d.ts → lib/S3TransferUtility.d.ts} +0 -0
- package/dist/lib/S3TransferUtility.d.ts.map +1 -0
- package/dist/{S3TransferUtility.js → lib/S3TransferUtility.js} +0 -0
- package/dist/lib/S3TransferUtility.js.map +1 -0
- package/dist/{S3Uploader.d.ts → lib/S3Uploader.d.ts} +1 -1
- package/dist/lib/S3Uploader.d.ts.map +1 -0
- package/dist/{S3Uploader.js → lib/S3Uploader.js} +10 -10
- package/dist/lib/S3Uploader.js.map +1 -0
- package/dist/lib/Versions.d.ts +27 -0
- package/dist/lib/Versions.d.ts.map +1 -0
- package/dist/lib/Versions.js +76 -0
- package/dist/lib/Versions.js.map +1 -0
- package/package.json +11 -2
- package/src/commands/nextjs-docker-auto.ts +498 -0
- package/src/commands/nextjs-version-restore.ts +73 -0
- package/src/commands/nextjs-version.ts +113 -0
- package/src/commands/preflight.ts +121 -0
- package/src/commands/publish.ts +358 -0
- package/src/config/Config.ts +0 -4
- package/src/index.ts +1 -596
- package/src/{DeployClient.ts → lib/DeployClient.ts} +21 -12
- package/src/{S3TransferUtility.ts → lib/S3TransferUtility.ts} +0 -0
- package/src/{S3Uploader.ts → lib/S3Uploader.ts} +3 -3
- package/src/lib/Versions.ts +95 -0
- package/dist/DeployClient.d.ts.map +0 -1
- package/dist/DeployClient.js.map +0 -1
- package/dist/S3TransferUtility.d.ts.map +0 -1
- package/dist/S3TransferUtility.js.map +0 -1
- package/dist/S3Uploader.d.ts.map +0 -1
- package/dist/S3Uploader.js.map +0 -1
- package/dist/config/FileStore.d.ts +0 -7
- package/dist/config/FileStore.d.ts.map +0 -1
- package/dist/config/FileStore.js +0 -17
- package/dist/config/FileStore.js.map +0 -1
- package/src/config/FileStore.ts +0 -14
package/dist/index.d.ts
CHANGED
|
@@ -1,65 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import 'source-map-support/register';
|
|
3
|
-
import 'reflect-metadata';
|
|
4
|
-
import { Command, flags as flagsParser } from '@oclif/command';
|
|
5
|
-
import { IConfig as OCLIFIConfig } from '@oclif/config';
|
|
6
|
-
import { IDeployVersionPreflightResult } from './DeployClient';
|
|
7
|
-
export interface IContext {
|
|
8
|
-
preflightResult: IDeployVersionPreflightResult;
|
|
9
|
-
files: string[];
|
|
10
|
-
}
|
|
11
|
-
declare class PublishTool extends Command {
|
|
12
|
-
static flags: {
|
|
13
|
-
version: import("@oclif/parser/lib/flags").IBooleanFlag<void>;
|
|
14
|
-
help: import("@oclif/parser/lib/flags").IBooleanFlag<void>;
|
|
15
|
-
deployerLambdaName: flagsParser.IOptionFlag<string>;
|
|
16
|
-
newVersion: flagsParser.IOptionFlag<string>;
|
|
17
|
-
repoName: flagsParser.IOptionFlag<string>;
|
|
18
|
-
leaveCopy: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
|
|
19
|
-
};
|
|
20
|
-
private static escapeRegExp;
|
|
21
|
-
private VersionAndAlias;
|
|
22
|
-
private IMAGE_TAG;
|
|
23
|
-
private IMAGE_URI;
|
|
24
|
-
private FILES_TO_MODIFY;
|
|
25
|
-
private _restoreFilesStarted;
|
|
26
|
-
constructor(argv: string[], config: OCLIFIConfig);
|
|
27
|
-
run(): Promise<void>;
|
|
28
|
-
/**
|
|
29
|
-
* Restore files that the version was patched into
|
|
30
|
-
*/
|
|
31
|
-
private restoreFiles;
|
|
32
|
-
/**
|
|
33
|
-
* Setup version and alias strings
|
|
34
|
-
* @param version
|
|
35
|
-
* @returns
|
|
36
|
-
*/
|
|
37
|
-
private createVersions;
|
|
38
|
-
/**
|
|
39
|
-
* Write new versions into specified config files
|
|
40
|
-
* @param path
|
|
41
|
-
* @param requiredVersions
|
|
42
|
-
* @param leaveFiles
|
|
43
|
-
* @returns
|
|
44
|
-
*/
|
|
45
|
-
private writeNewVersions;
|
|
46
|
-
/**
|
|
47
|
-
* Login to ECR for Lambda Docker functions
|
|
48
|
-
* @param config
|
|
49
|
-
* @returns
|
|
50
|
-
*/
|
|
51
|
-
private loginToECR;
|
|
52
|
-
/**
|
|
53
|
-
* Publish to ECR for Lambda Docker function
|
|
54
|
-
* @param config
|
|
55
|
-
*/
|
|
56
|
-
private publishToECR;
|
|
57
|
-
/**
|
|
58
|
-
* Publish an app version to Lambda
|
|
59
|
-
* @param config
|
|
60
|
-
* @param versions
|
|
61
|
-
*/
|
|
62
|
-
private deployToLambda;
|
|
63
|
-
}
|
|
64
|
-
export default PublishTool;
|
|
1
|
+
export { run } from '@oclif/command';
|
|
65
2
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,483 +1,6 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
1
|
"use strict";
|
|
3
|
-
/* eslint-disable no-console */
|
|
4
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
|
|
6
|
-
require("
|
|
7
|
-
|
|
8
|
-
require("reflect-metadata");
|
|
9
|
-
const child_process_1 = require("child_process");
|
|
10
|
-
const util = tslib_1.__importStar(require("util"));
|
|
11
|
-
const lambda = tslib_1.__importStar(require("@aws-sdk/client-lambda"));
|
|
12
|
-
const s3 = tslib_1.__importStar(require("@aws-sdk/client-s3"));
|
|
13
|
-
const sts = tslib_1.__importStar(require("@aws-sdk/client-sts"));
|
|
14
|
-
const command_1 = require("@oclif/command");
|
|
15
|
-
const errors_1 = require("@oclif/errors");
|
|
16
|
-
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
17
|
-
const path_1 = tslib_1.__importDefault(require("path"));
|
|
18
|
-
const fs_extra_1 = require("fs-extra");
|
|
19
|
-
const listr2_1 = require("listr2");
|
|
20
|
-
const Config_1 = require("./config/Config");
|
|
21
|
-
const DeployClient_1 = tslib_1.__importDefault(require("./DeployClient"));
|
|
22
|
-
const S3Uploader_1 = tslib_1.__importDefault(require("./S3Uploader"));
|
|
23
|
-
const S3TransferUtility_1 = tslib_1.__importDefault(require("./S3TransferUtility"));
|
|
24
|
-
const lib_storage_1 = require("@aws-sdk/lib-storage");
|
|
25
|
-
const mime_types_1 = require("mime-types");
|
|
26
|
-
const asyncSetTimeout = util.promisify(setTimeout);
|
|
27
|
-
const asyncExec = util.promisify(child_process_1.exec);
|
|
28
|
-
const RUNNING_TEXT = ' RUNS ';
|
|
29
|
-
const RUNNING = chalk_1.default.reset.inverse.yellow.bold(RUNNING_TEXT) + ' ';
|
|
30
|
-
const lambdaClient = new lambda.LambdaClient({
|
|
31
|
-
maxAttempts: 8,
|
|
32
|
-
});
|
|
33
|
-
class PublishTool extends command_1.Command {
|
|
34
|
-
constructor(argv, config) {
|
|
35
|
-
super(argv, config);
|
|
36
|
-
this.IMAGE_TAG = '';
|
|
37
|
-
this.IMAGE_URI = '';
|
|
38
|
-
this._restoreFilesStarted = false;
|
|
39
|
-
this.restoreFiles = this.restoreFiles.bind(this);
|
|
40
|
-
}
|
|
41
|
-
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping
|
|
42
|
-
static escapeRegExp(value) {
|
|
43
|
-
return value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string
|
|
44
|
-
}
|
|
45
|
-
async run() {
|
|
46
|
-
const { flags: parsedFlags } = this.parse(PublishTool);
|
|
47
|
-
const version = parsedFlags.newVersion;
|
|
48
|
-
const leaveFiles = parsedFlags.leaveCopy;
|
|
49
|
-
const lambdaName = parsedFlags.deployerLambdaName;
|
|
50
|
-
const ecrRepo = parsedFlags.repoName;
|
|
51
|
-
// Override the config value
|
|
52
|
-
const config = Config_1.Config.instance;
|
|
53
|
-
config.deployer.lambdaName = lambdaName;
|
|
54
|
-
config.app.semVer = version;
|
|
55
|
-
// Get the account ID and region from STS
|
|
56
|
-
// TODO: Move this to the right place
|
|
57
|
-
if (config.app.awsAccountID === 0 || config.app.awsRegion === '') {
|
|
58
|
-
const stsClient = new sts.STSClient({
|
|
59
|
-
maxAttempts: 8,
|
|
60
|
-
});
|
|
61
|
-
const stsResponse = await stsClient.send(new sts.GetCallerIdentityCommand({}));
|
|
62
|
-
if (config.app.awsAccountID === 0) {
|
|
63
|
-
config.app.awsAccountID = parseInt(stsResponse.Account, 10);
|
|
64
|
-
}
|
|
65
|
-
if (config.app.awsRegion === '') {
|
|
66
|
-
config.app.awsRegion = stsClient.config.region;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
if (config.app.ecrHost === '') {
|
|
70
|
-
config.app.ecrHost = `${config.app.awsAccountID}.dkr.ecr.${config.app.awsRegion}.amazonaws.com`;
|
|
71
|
-
}
|
|
72
|
-
if (ecrRepo) {
|
|
73
|
-
config.app.ecrRepoName = ecrRepo;
|
|
74
|
-
}
|
|
75
|
-
else if (config.app.ecrRepoName === '') {
|
|
76
|
-
config.app.ecrRepoName = `microapps-app-${config.app.name}${Config_1.Config.envLevel}-repo`;
|
|
77
|
-
}
|
|
78
|
-
this.VersionAndAlias = this.createVersions(version);
|
|
79
|
-
const versionOnly = { version: this.VersionAndAlias.version };
|
|
80
|
-
this.FILES_TO_MODIFY = [
|
|
81
|
-
{ path: 'package.json', versions: versionOnly },
|
|
82
|
-
// { path: 'deploy.json', versions: this.VersionAndAlias },
|
|
83
|
-
{ path: 'next.config.js', versions: versionOnly },
|
|
84
|
-
];
|
|
85
|
-
// Install handler to ensure that we restore files
|
|
86
|
-
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
|
87
|
-
process.on('SIGINT', async () => {
|
|
88
|
-
if (this._restoreFilesStarted) {
|
|
89
|
-
return;
|
|
90
|
-
}
|
|
91
|
-
else {
|
|
92
|
-
this._restoreFilesStarted = true;
|
|
93
|
-
}
|
|
94
|
-
this.log('Caught Ctrl-C, restoring files');
|
|
95
|
-
await S3Uploader_1.default.removeTempDirIfExists();
|
|
96
|
-
await this.restoreFiles();
|
|
97
|
-
});
|
|
98
|
-
if (config === undefined) {
|
|
99
|
-
this.error('Failed to load the config file');
|
|
100
|
-
}
|
|
101
|
-
if (config.app.staticAssetsPath === undefined) {
|
|
102
|
-
this.error('StaticAssetsPath must be specified in the config file');
|
|
103
|
-
}
|
|
104
|
-
//
|
|
105
|
-
// Setup Tasks
|
|
106
|
-
//
|
|
107
|
-
const tasks = new listr2_1.Listr([
|
|
108
|
-
{
|
|
109
|
-
title: 'Logging into ECR',
|
|
110
|
-
task: async (ctx, task) => {
|
|
111
|
-
const origTitle = task.title;
|
|
112
|
-
task.title = RUNNING + origTitle;
|
|
113
|
-
await this.loginToECR(config);
|
|
114
|
-
task.title = origTitle;
|
|
115
|
-
},
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
title: 'Modifying Config Files',
|
|
119
|
-
task: async (ctx, task) => {
|
|
120
|
-
const origTitle = task.title;
|
|
121
|
-
task.title = RUNNING + origTitle;
|
|
122
|
-
// Modify the existing files with the new version
|
|
123
|
-
for (const fileToModify of this.FILES_TO_MODIFY) {
|
|
124
|
-
task.output = `Patching version (${this.VersionAndAlias.version}) into ${fileToModify.path}`;
|
|
125
|
-
if (!(await this.writeNewVersions(fileToModify.path, fileToModify.versions, leaveFiles))) {
|
|
126
|
-
task.output = `Failed modifying file: ${fileToModify.path}`;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
task.title = origTitle;
|
|
130
|
-
},
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
title: 'Preflight Version Check',
|
|
134
|
-
task: async (ctx, task) => {
|
|
135
|
-
const origTitle = task.title;
|
|
136
|
-
task.title = RUNNING + origTitle;
|
|
137
|
-
// Confirm the Version Does Not Exist in Published State
|
|
138
|
-
task.output = `Checking if deployed app/version already exists for ${config.app.name}/${version}`;
|
|
139
|
-
ctx.preflightResult = await DeployClient_1.default.DeployVersionPreflight(config, task);
|
|
140
|
-
if (ctx.preflightResult.exists) {
|
|
141
|
-
task.output = `Warning: App/Version already exists: ${config.app.name}/${config.app.semVer}`;
|
|
142
|
-
}
|
|
143
|
-
task.title = origTitle;
|
|
144
|
-
},
|
|
145
|
-
},
|
|
146
|
-
{
|
|
147
|
-
title: 'Serverless Next.js Build',
|
|
148
|
-
task: async (ctx, task) => {
|
|
149
|
-
const origTitle = task.title;
|
|
150
|
-
task.title = RUNNING + origTitle;
|
|
151
|
-
task.output = `Invoking serverless next.js build for ${config.app.name}/${version}`;
|
|
152
|
-
// Run the serverless next.js build
|
|
153
|
-
await asyncExec('serverless');
|
|
154
|
-
if (config.app.serverlessNextRouterPath !== undefined) {
|
|
155
|
-
task.output = 'Copying Serverless Next.js router to build output directory';
|
|
156
|
-
await fs_extra_1.promises.copyFile(config.app.serverlessNextRouterPath, './.serverless_nextjs/index.js');
|
|
157
|
-
}
|
|
158
|
-
task.title = origTitle;
|
|
159
|
-
},
|
|
160
|
-
},
|
|
161
|
-
{
|
|
162
|
-
title: 'Publish to ECR',
|
|
163
|
-
task: async (ctx, task) => {
|
|
164
|
-
const origTitle = task.title;
|
|
165
|
-
task.title = RUNNING + origTitle;
|
|
166
|
-
// Docker, build, tag, push to ECR
|
|
167
|
-
// Note: Need to already have AWS env vars set
|
|
168
|
-
await this.publishToECR(config, task);
|
|
169
|
-
task.title = origTitle;
|
|
170
|
-
},
|
|
171
|
-
},
|
|
172
|
-
{
|
|
173
|
-
title: 'Deploy to Lambda',
|
|
174
|
-
task: async (ctx, task) => {
|
|
175
|
-
const origTitle = task.title;
|
|
176
|
-
task.title = RUNNING + origTitle;
|
|
177
|
-
// Update the Lambda function
|
|
178
|
-
await this.deployToLambda(config, this.VersionAndAlias, task);
|
|
179
|
-
task.title = origTitle;
|
|
180
|
-
},
|
|
181
|
-
},
|
|
182
|
-
{
|
|
183
|
-
title: 'Confirm Static Assets Folder Exists',
|
|
184
|
-
task: async (ctx, task) => {
|
|
185
|
-
const origTitle = task.title;
|
|
186
|
-
task.title = RUNNING + origTitle;
|
|
187
|
-
// Check that Static Assets Folder exists
|
|
188
|
-
if (!(await fs_extra_1.pathExists(config.app.staticAssetsPath))) {
|
|
189
|
-
this.error(`Static asset path does not exist: ${config.app.staticAssetsPath}`);
|
|
190
|
-
}
|
|
191
|
-
task.title = origTitle;
|
|
192
|
-
},
|
|
193
|
-
},
|
|
194
|
-
{
|
|
195
|
-
title: 'Copy Static Files to Local Upload Dir',
|
|
196
|
-
task: async (ctx, task) => {
|
|
197
|
-
const origTitle = task.title;
|
|
198
|
-
task.title = RUNNING + origTitle;
|
|
199
|
-
// Copy files to local dir to be uploaded
|
|
200
|
-
await S3Uploader_1.default.CopyToUploadDir(config, ctx.preflightResult.response.s3UploadUrl);
|
|
201
|
-
task.title = origTitle;
|
|
202
|
-
},
|
|
203
|
-
},
|
|
204
|
-
// {
|
|
205
|
-
// title: 'Upload Files to S3 Staging AppName/Version Prefix',
|
|
206
|
-
// task: async (ctx, task) => {
|
|
207
|
-
// const origTitle = task.title;
|
|
208
|
-
// task.title = RUNNING + origTitle;
|
|
209
|
-
// const { destinationPrefix, bucketName } = S3Uploader.ParseUploadPath(
|
|
210
|
-
// ctx.preflightResult.response.s3UploadUrl,
|
|
211
|
-
// );
|
|
212
|
-
// // Upload Files to S3 Staging AppName/Version Prefix
|
|
213
|
-
// await S3TransferUtility.UploadDir(
|
|
214
|
-
// S3Uploader.TempDir,
|
|
215
|
-
// destinationPrefix,
|
|
216
|
-
// bucketName,
|
|
217
|
-
// ctx.preflightResult.response,
|
|
218
|
-
// );
|
|
219
|
-
// task.title = origTitle;
|
|
220
|
-
// },
|
|
221
|
-
// },
|
|
222
|
-
{
|
|
223
|
-
title: 'Enumerate Files to Upload to S3',
|
|
224
|
-
task: async (ctx, task) => {
|
|
225
|
-
const origTitle = task.title;
|
|
226
|
-
task.title = RUNNING + origTitle;
|
|
227
|
-
ctx.files = (await S3TransferUtility_1.default.GetFiles(S3Uploader_1.default.TempDir));
|
|
228
|
-
task.title = origTitle;
|
|
229
|
-
},
|
|
230
|
-
},
|
|
231
|
-
{
|
|
232
|
-
title: 'Upload Static Files to S3',
|
|
233
|
-
task: (ctx, task) => {
|
|
234
|
-
const origTitle = task.title;
|
|
235
|
-
task.title = RUNNING + origTitle;
|
|
236
|
-
const { bucketName, destinationPrefix } = S3Uploader_1.default.ParseUploadPath(ctx.preflightResult.response.s3UploadUrl);
|
|
237
|
-
// Use temp credentials for S3
|
|
238
|
-
const s3Client = new s3.S3Client({
|
|
239
|
-
maxAttempts: 16,
|
|
240
|
-
credentials: {
|
|
241
|
-
accessKeyId: ctx.preflightResult.response.awsCredentials.accessKeyId,
|
|
242
|
-
secretAccessKey: ctx.preflightResult.response.awsCredentials.secretAccessKey,
|
|
243
|
-
sessionToken: ctx.preflightResult.response.awsCredentials.sessionToken,
|
|
244
|
-
},
|
|
245
|
-
});
|
|
246
|
-
const pathWithoutAppAndVer = path_1.default.join(S3Uploader_1.default.TempDir, destinationPrefix);
|
|
247
|
-
const tasks = ctx.files.map((filePath) => ({
|
|
248
|
-
task: async (ctx, subtask) => {
|
|
249
|
-
const relFilePath = path_1.default.relative(pathWithoutAppAndVer, filePath);
|
|
250
|
-
const origTitle = relFilePath;
|
|
251
|
-
subtask.title = RUNNING + origTitle;
|
|
252
|
-
const upload = new lib_storage_1.Upload({
|
|
253
|
-
client: s3Client,
|
|
254
|
-
leavePartsOnError: false,
|
|
255
|
-
params: {
|
|
256
|
-
Bucket: bucketName,
|
|
257
|
-
Key: path_1.default.relative(S3Uploader_1.default.TempDir, filePath),
|
|
258
|
-
Body: fs_extra_1.createReadStream(filePath),
|
|
259
|
-
ContentType: mime_types_1.contentType(path_1.default.basename(filePath)) || 'application/octet-stream',
|
|
260
|
-
CacheControl: 'max-age=86400; public',
|
|
261
|
-
},
|
|
262
|
-
});
|
|
263
|
-
await upload.done();
|
|
264
|
-
subtask.title = origTitle;
|
|
265
|
-
},
|
|
266
|
-
}));
|
|
267
|
-
task.title = origTitle;
|
|
268
|
-
return task.newListr(tasks, {
|
|
269
|
-
concurrent: 8,
|
|
270
|
-
rendererOptions: {
|
|
271
|
-
clearOutput: false,
|
|
272
|
-
showErrorMessage: true,
|
|
273
|
-
showTimer: true,
|
|
274
|
-
},
|
|
275
|
-
});
|
|
276
|
-
},
|
|
277
|
-
},
|
|
278
|
-
{
|
|
279
|
-
title: `Creating MicroApp Application: ${config.app.name}`,
|
|
280
|
-
task: async (ctx, task) => {
|
|
281
|
-
const origTitle = task.title;
|
|
282
|
-
task.title = RUNNING + origTitle;
|
|
283
|
-
// Call Deployer to Create App if Not Exists
|
|
284
|
-
await DeployClient_1.default.CreateApp(config);
|
|
285
|
-
task.title = origTitle;
|
|
286
|
-
},
|
|
287
|
-
},
|
|
288
|
-
{
|
|
289
|
-
title: `Creating MicroApp Version: ${config.app.semVer}`,
|
|
290
|
-
task: async (ctx, task) => {
|
|
291
|
-
const origTitle = task.title;
|
|
292
|
-
task.title = RUNNING + origTitle;
|
|
293
|
-
// Call Deployer to Deploy AppName/Version
|
|
294
|
-
await DeployClient_1.default.DeployVersion(config, task);
|
|
295
|
-
task.title = origTitle;
|
|
296
|
-
},
|
|
297
|
-
},
|
|
298
|
-
], {
|
|
299
|
-
rendererOptions: {
|
|
300
|
-
showTimer: true,
|
|
301
|
-
},
|
|
302
|
-
});
|
|
303
|
-
try {
|
|
304
|
-
await tasks.run();
|
|
305
|
-
// this.log(`Published: ${config.app.name}/${config.app.semVer}`);
|
|
306
|
-
}
|
|
307
|
-
catch (error) {
|
|
308
|
-
this.log(`Caught exception: ${error.message}`);
|
|
309
|
-
}
|
|
310
|
-
finally {
|
|
311
|
-
await S3Uploader_1.default.removeTempDirIfExists();
|
|
312
|
-
await this.restoreFiles();
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
/**
|
|
316
|
-
* Restore files that the version was patched into
|
|
317
|
-
*/
|
|
318
|
-
async restoreFiles() {
|
|
319
|
-
// Put the old files back when succeeded or failed
|
|
320
|
-
for (const fileToModify of this.FILES_TO_MODIFY) {
|
|
321
|
-
try {
|
|
322
|
-
const stats = await fs_extra_1.promises.stat(`${fileToModify.path}.original`);
|
|
323
|
-
if (stats.isFile()) {
|
|
324
|
-
// Remove the possibly modified file
|
|
325
|
-
await fs_extra_1.promises.unlink(fileToModify.path);
|
|
326
|
-
// Move the original file back
|
|
327
|
-
await fs_extra_1.promises.rename(`${fileToModify.path}.original`, fileToModify.path);
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
catch (_a) {
|
|
331
|
-
// don't care... if the file doesn't exist we can't do anything
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
/**
|
|
336
|
-
* Setup version and alias strings
|
|
337
|
-
* @param version
|
|
338
|
-
* @returns
|
|
339
|
-
*/
|
|
340
|
-
createVersions(version) {
|
|
341
|
-
return { version, alias: `v${version.replace(/\./g, '_')}` };
|
|
342
|
-
}
|
|
343
|
-
/**
|
|
344
|
-
* Write new versions into specified config files
|
|
345
|
-
* @param path
|
|
346
|
-
* @param requiredVersions
|
|
347
|
-
* @param leaveFiles
|
|
348
|
-
* @returns
|
|
349
|
-
*/
|
|
350
|
-
async writeNewVersions(path, requiredVersions, leaveFiles) {
|
|
351
|
-
const stats = await fs_extra_1.promises.stat(path);
|
|
352
|
-
if (!stats.isFile) {
|
|
353
|
-
return false;
|
|
354
|
-
}
|
|
355
|
-
// Make a backup of the file
|
|
356
|
-
await fs_extra_1.promises.copyFile(path, `${path}.original`);
|
|
357
|
-
// File exists, check that it has the required version strings
|
|
358
|
-
let fileText = await fs_extra_1.promises.readFile(path, 'utf8');
|
|
359
|
-
for (const key of Object.keys(requiredVersions)) {
|
|
360
|
-
const placeHolder = key === 'version' ? '0.0.0' : 'v0_0_0';
|
|
361
|
-
if (fileText.indexOf(placeHolder) === -1) {
|
|
362
|
-
// The required placeholder is missing
|
|
363
|
-
return false;
|
|
364
|
-
}
|
|
365
|
-
else {
|
|
366
|
-
const regExp = new RegExp(PublishTool.escapeRegExp(placeHolder), 'g');
|
|
367
|
-
fileText = fileText.replace(regExp, key === 'version' ? requiredVersions.version : requiredVersions.alias);
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
// Write the updated file contents
|
|
371
|
-
await fs_extra_1.promises.writeFile(path, fileText, 'utf8');
|
|
372
|
-
// Leave a copy of the modified file if requested
|
|
373
|
-
if (leaveFiles) {
|
|
374
|
-
// This copy will overwrite an existing file
|
|
375
|
-
await fs_extra_1.promises.copyFile(path, `${path}.modified`);
|
|
376
|
-
}
|
|
377
|
-
return true;
|
|
378
|
-
}
|
|
379
|
-
/**
|
|
380
|
-
* Login to ECR for Lambda Docker functions
|
|
381
|
-
* @param config
|
|
382
|
-
* @returns
|
|
383
|
-
*/
|
|
384
|
-
async loginToECR(config) {
|
|
385
|
-
this.IMAGE_TAG = `${config.app.ecrRepoName}:${this.VersionAndAlias.version}`;
|
|
386
|
-
this.IMAGE_URI = `${config.app.ecrHost}/${this.IMAGE_TAG}`;
|
|
387
|
-
try {
|
|
388
|
-
await asyncExec(`aws ecr get-login-password --region ${config.app.awsRegion} | docker login --username AWS --password-stdin ${config.app.ecrHost}`);
|
|
389
|
-
}
|
|
390
|
-
catch (error) {
|
|
391
|
-
throw new Error(`ECR Login Failed: ${error.message}`);
|
|
392
|
-
}
|
|
393
|
-
return true;
|
|
394
|
-
}
|
|
395
|
-
/**
|
|
396
|
-
* Publish to ECR for Lambda Docker function
|
|
397
|
-
* @param config
|
|
398
|
-
*/
|
|
399
|
-
async publishToECR(config, task) {
|
|
400
|
-
task.output = 'Starting Docker build';
|
|
401
|
-
await asyncExec(`docker build -f Dockerfile -t ${this.IMAGE_TAG} .`);
|
|
402
|
-
await asyncExec(`docker tag ${this.IMAGE_TAG} ${config.app.ecrHost}/${this.IMAGE_TAG}`);
|
|
403
|
-
task.output = 'Starting Docker push to ECR';
|
|
404
|
-
await asyncExec(`docker push ${config.app.ecrHost}/${this.IMAGE_TAG}`);
|
|
405
|
-
}
|
|
406
|
-
/**
|
|
407
|
-
* Publish an app version to Lambda
|
|
408
|
-
* @param config
|
|
409
|
-
* @param versions
|
|
410
|
-
*/
|
|
411
|
-
async deployToLambda(config, versions, task) {
|
|
412
|
-
var _a;
|
|
413
|
-
// Create Lambda version
|
|
414
|
-
task.output = 'Updating Lambda code to point to new Docker image';
|
|
415
|
-
const resultUpdate = await lambdaClient.send(new lambda.UpdateFunctionCodeCommand({
|
|
416
|
-
FunctionName: config.app.lambdaName,
|
|
417
|
-
ImageUri: this.IMAGE_URI,
|
|
418
|
-
Publish: true,
|
|
419
|
-
}));
|
|
420
|
-
const lambdaVersion = resultUpdate.Version;
|
|
421
|
-
task.output = `Lambda version created: ${resultUpdate.Version}`;
|
|
422
|
-
let lastUpdateStatus = resultUpdate.LastUpdateStatus;
|
|
423
|
-
for (let i = 0; i < 5; i++) {
|
|
424
|
-
// When the function is created the status will be "Pending"
|
|
425
|
-
// and we have to wait until it's done creating
|
|
426
|
-
// before we can point an alias to it
|
|
427
|
-
if (lastUpdateStatus === 'Successful') {
|
|
428
|
-
task.output = `Lambda function updated, version: ${lambdaVersion}`;
|
|
429
|
-
break;
|
|
430
|
-
}
|
|
431
|
-
// If it didn't work, wait and try again
|
|
432
|
-
await asyncSetTimeout(1000 * i);
|
|
433
|
-
const resultGet = await lambdaClient.send(new lambda.GetFunctionCommand({
|
|
434
|
-
FunctionName: config.app.lambdaName,
|
|
435
|
-
Qualifier: lambdaVersion,
|
|
436
|
-
}));
|
|
437
|
-
// Save the last update status so we can check on re-loop
|
|
438
|
-
lastUpdateStatus = (_a = resultGet === null || resultGet === void 0 ? void 0 : resultGet.Configuration) === null || _a === void 0 ? void 0 : _a.LastUpdateStatus;
|
|
439
|
-
}
|
|
440
|
-
// Create Lambda alias point
|
|
441
|
-
task.output = `Creating the lambda alias for the new version: ${lambdaVersion}`;
|
|
442
|
-
const resultLambdaAlias = await lambdaClient.send(new lambda.CreateAliasCommand({
|
|
443
|
-
FunctionName: config.app.lambdaName,
|
|
444
|
-
Name: versions.alias,
|
|
445
|
-
FunctionVersion: lambdaVersion,
|
|
446
|
-
}));
|
|
447
|
-
task.output = `Lambda alias created, name: ${resultLambdaAlias.Name}`;
|
|
448
|
-
}
|
|
449
|
-
}
|
|
450
|
-
PublishTool.flags = {
|
|
451
|
-
version: command_1.flags.version({
|
|
452
|
-
char: 'v',
|
|
453
|
-
}),
|
|
454
|
-
help: command_1.flags.help(),
|
|
455
|
-
deployerLambdaName: command_1.flags.string({
|
|
456
|
-
char: 'd',
|
|
457
|
-
multiple: false,
|
|
458
|
-
required: true,
|
|
459
|
-
description: 'Name of the deployer lambda function',
|
|
460
|
-
}),
|
|
461
|
-
newVersion: command_1.flags.string({
|
|
462
|
-
char: 'n',
|
|
463
|
-
multiple: false,
|
|
464
|
-
required: true,
|
|
465
|
-
description: 'New semantic version to apply',
|
|
466
|
-
}),
|
|
467
|
-
repoName: command_1.flags.string({
|
|
468
|
-
char: 'r',
|
|
469
|
-
multiple: false,
|
|
470
|
-
required: true,
|
|
471
|
-
description: 'Name (not URI) of the Docker repo for the app',
|
|
472
|
-
}),
|
|
473
|
-
leaveCopy: command_1.flags.boolean({
|
|
474
|
-
char: 'l',
|
|
475
|
-
default: false,
|
|
476
|
-
required: false,
|
|
477
|
-
description: 'Leave a copy of the modifed files as .modified',
|
|
478
|
-
}),
|
|
479
|
-
};
|
|
480
|
-
// @ts-expect-error catch is actually defined
|
|
481
|
-
PublishTool.run().catch(errors_1.handle);
|
|
482
|
-
exports.default = PublishTool;
|
|
3
|
+
exports.run = void 0;
|
|
4
|
+
var command_1 = require("@oclif/command");
|
|
5
|
+
Object.defineProperty(exports, "run", { enumerable: true, get: function () { return command_1.run; } });
|
|
483
6
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AACA,+BAA+B;;;AAE/B,uCAAqC;AACrC,qBAAqB;AACrB,4BAA0B;AAC1B,iDAAqC;AACrC,mDAA6B;AAC7B,uEAAiD;AAC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AE,KAAK;QACf,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,+BAA+B;KAC7C,CAAC;IACF,QAAQ,EAAE,eAAW,CAAC,MAAM,CAAC;QAC3B,IAAI,EAAE,GAAG;QACT,QAAQ,EAAE,KAAK;QACf,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,+CAA+C;KAC7D,CAAC;IACF,SAAS,EAAE,eAAW,CAAC,OAAO,CAAC;QAC7B,IAAI,EAAE,GAAG;QACT,OAAO,EAAE,KAAK;QACd,QAAQ,EAAE,KAAK;QACf,WAAW,EAAE,gDAAgD;KAC9D,CAAC;CACH,CAAC;AAogBJ,6CAA6C;AAC7C,WAAW,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,eAAY,CAAC,CAAC;AAEtC,kBAAe,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,0CAAqC;AAA5B,8FAAA,GAAG,OAAA"}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import * as lambda from '@aws-sdk/client-lambda';
|
|
2
|
-
import { TaskWrapper } from 'listr2/dist/lib/task-wrapper';
|
|
3
|
-
import { DefaultRenderer } from 'listr2/dist/renderer/default.renderer';
|
|
4
2
|
import { IDeployVersionPreflightResponse } from '@pwrdrvr/microapps-deployer-lib';
|
|
5
|
-
import { IConfig } from '
|
|
6
|
-
import { IContext } from './index';
|
|
3
|
+
import { IConfig } from '../config/Config';
|
|
7
4
|
export interface IDeployVersionPreflightResult {
|
|
8
5
|
exists: boolean;
|
|
9
6
|
response: IDeployVersionPreflightResponse;
|
|
@@ -12,7 +9,18 @@ export default class DeployClient {
|
|
|
12
9
|
static readonly _client: lambda.LambdaClient;
|
|
13
10
|
static readonly _decoder: TextDecoder;
|
|
14
11
|
static CreateApp(config: IConfig): Promise<void>;
|
|
15
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Check if version exists.
|
|
14
|
+
* Optionally get S3 creds for static asset upload.
|
|
15
|
+
* @param config
|
|
16
|
+
* @param output
|
|
17
|
+
* @returns
|
|
18
|
+
*/
|
|
19
|
+
static DeployVersionPreflight(opts: {
|
|
20
|
+
config: IConfig;
|
|
21
|
+
needS3Creds?: boolean;
|
|
22
|
+
output: (message: string) => void;
|
|
23
|
+
}): Promise<IDeployVersionPreflightResult>;
|
|
16
24
|
/**
|
|
17
25
|
* Copy S3 static assets from staging to live bucket.
|
|
18
26
|
* Create API Gateway Integration for app (if needed).
|
|
@@ -21,6 +29,6 @@ export default class DeployClient {
|
|
|
21
29
|
* @param config
|
|
22
30
|
* @param task
|
|
23
31
|
*/
|
|
24
|
-
static DeployVersion(config: IConfig,
|
|
32
|
+
static DeployVersion(config: IConfig, output: (message: string) => void): Promise<void>;
|
|
25
33
|
}
|
|
26
34
|
//# sourceMappingURL=DeployClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeployClient.d.ts","sourceRoot":"","sources":["../../src/lib/DeployClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAEL,+BAA+B,EAIhC,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,MAAM,WAAW,6BAA6B;IAC5C,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,+BAA+B,CAAC;CAC3C;AAED,MAAM,CAAC,OAAO,OAAO,YAAY;IAC/B,MAAM,CAAC,QAAQ,CAAC,OAAO,sBAEpB;IACH,MAAM,CAAC,QAAQ,CAAC,QAAQ,cAA4B;WAEhC,SAAS,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAyB7D;;;;;;OAMG;WACiB,sBAAsB,CAAC,IAAI,EAAE;QAC/C,MAAM,EAAE,OAAO,CAAC;QAChB,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;KACnC,GAAG,OAAO,CAAC,6BAA6B,CAAC;IAgC1C;;;;;;;OAOG;WACiB,aAAa,CAC/B,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,GAChC,OAAO,CAAC,IAAI,CAAC;CA6BjB"}
|