@pwrdrvr/microapps-publish 0.4.0-alpha.9 → 1.0.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/README.md +25 -25
- package/package.json +5 -52
- package/bin/run +0 -5
- package/dist/commands/delete.d.ts +0 -18
- package/dist/commands/delete.d.ts.map +0 -1
- package/dist/commands/delete.js +0 -125
- package/dist/commands/delete.js.map +0 -1
- package/dist/commands/nextjs-version-restore.d.ts +0 -14
- package/dist/commands/nextjs-version-restore.d.ts.map +0 -1
- package/dist/commands/nextjs-version-restore.js +0 -53
- package/dist/commands/nextjs-version-restore.js.map +0 -1
- package/dist/commands/nextjs-version.d.ts +0 -18
- package/dist/commands/nextjs-version.d.ts.map +0 -1
- package/dist/commands/nextjs-version.js +0 -103
- package/dist/commands/nextjs-version.js.map +0 -1
- package/dist/commands/preflight.d.ts +0 -19
- package/dist/commands/preflight.d.ts.map +0 -1
- package/dist/commands/preflight.js +0 -135
- package/dist/commands/preflight.js.map +0 -1
- package/dist/commands/publish-static.d.ts +0 -25
- package/dist/commands/publish-static.d.ts.map +0 -1
- package/dist/commands/publish-static.js +0 -361
- package/dist/commands/publish-static.js.map +0 -1
- package/dist/commands/publish.d.ts +0 -39
- package/dist/commands/publish.d.ts.map +0 -1
- package/dist/commands/publish.js +0 -565
- package/dist/commands/publish.js.map +0 -1
- package/dist/config/Application.d.ts +0 -26
- package/dist/config/Application.d.ts.map +0 -1
- package/dist/config/Application.js +0 -99
- package/dist/config/Application.js.map +0 -1
- package/dist/config/Config.d.ts +0 -18
- package/dist/config/Config.d.ts.map +0 -1
- package/dist/config/Config.js +0 -71
- package/dist/config/Config.js.map +0 -1
- package/dist/config/Deployer.d.ts +0 -10
- package/dist/config/Deployer.d.ts.map +0 -1
- package/dist/config/Deployer.js +0 -17
- package/dist/config/Deployer.js.map +0 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -6
- package/dist/index.js.map +0 -1
- package/dist/lib/DeployClient.d.ts +0 -102
- package/dist/lib/DeployClient.d.ts.map +0 -1
- package/dist/lib/DeployClient.js +0 -233
- package/dist/lib/DeployClient.js.map +0 -1
- package/dist/lib/FilesExist.d.ts +0 -5
- package/dist/lib/FilesExist.d.ts.map +0 -1
- package/dist/lib/FilesExist.js +0 -26
- package/dist/lib/FilesExist.js.map +0 -1
- package/dist/lib/S3TransferUtility.d.ts +0 -19
- package/dist/lib/S3TransferUtility.d.ts.map +0 -1
- package/dist/lib/S3TransferUtility.js +0 -94
- package/dist/lib/S3TransferUtility.js.map +0 -1
- package/dist/lib/S3Uploader.d.ts +0 -27
- package/dist/lib/S3Uploader.d.ts.map +0 -1
- package/dist/lib/S3Uploader.js +0 -77
- package/dist/lib/S3Uploader.js.map +0 -1
- package/dist/lib/Versions.d.ts +0 -33
- package/dist/lib/Versions.d.ts.map +0 -1
- package/dist/lib/Versions.js +0 -76
- package/dist/lib/Versions.js.map +0 -1
- package/src/commands/delete.ts +0 -135
- package/src/commands/nextjs-version-restore.ts +0 -70
- package/src/commands/nextjs-version.ts +0 -123
- package/src/commands/preflight.ts +0 -148
- package/src/commands/publish-static.ts +0 -416
- package/src/commands/publish.ts +0 -662
- package/src/commands-deprecated/nextjs-docker-auto.skip +0 -590
- package/src/config/Application.ts +0 -98
- package/src/config/Config.ts +0 -81
- package/src/config/Deployer.ts +0 -17
- package/src/index.ts +0 -1
- package/src/lib/DeployClient.ts +0 -334
- package/src/lib/FilesExist.ts +0 -25
- package/src/lib/S3TransferUtility.spec.ts +0 -15
- package/src/lib/S3TransferUtility.ts +0 -113
- package/src/lib/S3Uploader.ts +0 -94
- package/src/lib/Versions.ts +0 -101
- package/src/lib/__snapshots__/S3TransferUtility.spec.ts.snap +0 -12
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Overview
|
|
2
2
|
|
|
3
|
-
`
|
|
3
|
+
`pwrdrvr` is the CLI used to deploy new MicroApps and new versions for existing MicroApps using the [MicroApps framework](https://github.com/pwrdrvr/microapps-core/).
|
|
4
4
|
|
|
5
5
|
# Table of Contents <!-- omit in toc -->
|
|
6
6
|
|
|
@@ -18,30 +18,30 @@
|
|
|
18
18
|
|
|
19
19
|
# Video Preview of Deploying an App
|
|
20
20
|
|
|
21
|
-

|
|
22
22
|
|
|
23
23
|
# Installation
|
|
24
24
|
|
|
25
|
-
`npm i -g
|
|
25
|
+
`npm i -g pwrdrvr`
|
|
26
26
|
|
|
27
27
|
# Usage
|
|
28
28
|
|
|
29
29
|
## Command - help
|
|
30
30
|
|
|
31
|
-
`npx
|
|
31
|
+
`npx pwrdrvr help`
|
|
32
32
|
|
|
33
33
|
```
|
|
34
34
|
Publish tool for deploying apps and updates
|
|
35
35
|
|
|
36
36
|
VERSION
|
|
37
|
-
|
|
37
|
+
pwrdrvr/0.0.0 darwin-arm64 node-v18.12.1
|
|
38
38
|
|
|
39
39
|
USAGE
|
|
40
|
-
$
|
|
40
|
+
$ pwrdrvr [COMMAND]
|
|
41
41
|
|
|
42
42
|
COMMANDS
|
|
43
43
|
delete Delete app/version
|
|
44
|
-
help display help for
|
|
44
|
+
help display help for pwrdrvr
|
|
45
45
|
nextjs-version Apply version to next.config.js overtop of 0.0.0 placeholder
|
|
46
46
|
nextjs-version-restore Restore next.config.js
|
|
47
47
|
preflight Check if app/version are available
|
|
@@ -52,13 +52,13 @@ COMMANDS
|
|
|
52
52
|
|
|
53
53
|
## Command - preflight
|
|
54
54
|
|
|
55
|
-
`npx
|
|
55
|
+
`npx pwrdrvr preflight help`
|
|
56
56
|
|
|
57
57
|
```
|
|
58
58
|
Check if app/version are available
|
|
59
59
|
|
|
60
60
|
USAGE
|
|
61
|
-
$
|
|
61
|
+
$ pwrdrvr preflight
|
|
62
62
|
|
|
63
63
|
OPTIONS
|
|
64
64
|
-a, --app-name=app-name MicroApps app name (this becomes the path the app is rooted at)
|
|
@@ -74,19 +74,19 @@ OPTIONS
|
|
|
74
74
|
--help show CLI help
|
|
75
75
|
|
|
76
76
|
EXAMPLE
|
|
77
|
-
$
|
|
77
|
+
$ pwrdrvr preflight -d microapps-deployer-dev -a release -n 0.0.13
|
|
78
78
|
✔ Preflight Version Check [0.2s]
|
|
79
79
|
```
|
|
80
80
|
|
|
81
81
|
## Command - publish
|
|
82
82
|
|
|
83
|
-
`npx
|
|
83
|
+
`npx pwrdrvr publish help`
|
|
84
84
|
|
|
85
85
|
```
|
|
86
86
|
Publish arbitrary framework app - deploy static assets to S3, alias the $LATEST Lambda function, and add integration/route to API Gateway.
|
|
87
87
|
|
|
88
88
|
USAGE
|
|
89
|
-
$
|
|
89
|
+
$ pwrdrvr publish
|
|
90
90
|
|
|
91
91
|
OPTIONS
|
|
92
92
|
-a, --app-name=app-name MicroApps app name (this becomes the path the app is rooted at)
|
|
@@ -122,7 +122,7 @@ OPTIONS
|
|
|
122
122
|
--startup-type=(iframe|direct) [default: iframe] How the app should be loaded
|
|
123
123
|
|
|
124
124
|
EXAMPLE
|
|
125
|
-
$
|
|
125
|
+
$ pwrdrvr publish -d microapps-deployer-dev -l microapps-app-release-dev -a release -n 0.0.21
|
|
126
126
|
✔ Get S3 Temp Credentials [1s]
|
|
127
127
|
✔ Deploy to Lambda [0.6s]
|
|
128
128
|
✔ Confirm Static Assets Folder Exists [0.0s]
|
|
@@ -135,13 +135,13 @@ EXAMPLE
|
|
|
135
135
|
|
|
136
136
|
## Command - publish-static
|
|
137
137
|
|
|
138
|
-
`npx
|
|
138
|
+
`npx pwrdrvr publish-static help`
|
|
139
139
|
|
|
140
140
|
```
|
|
141
141
|
Publish arbitrary framework static app - deploy static assets to S3 only.
|
|
142
142
|
|
|
143
143
|
USAGE
|
|
144
|
-
$
|
|
144
|
+
$ pwrdrvr publish-static
|
|
145
145
|
|
|
146
146
|
OPTIONS
|
|
147
147
|
-a, --app-name=app-name MicroApps app name (this becomes the path the app is rooted at)
|
|
@@ -168,7 +168,7 @@ OPTIONS
|
|
|
168
168
|
assets
|
|
169
169
|
|
|
170
170
|
EXAMPLE
|
|
171
|
-
$
|
|
171
|
+
$ pwrdrvr publish-static -d microapps-deployer-dev -l microapps-app-release-dev -a release -n 0.0.21
|
|
172
172
|
✔ Get S3 Temp Credentials [1s]
|
|
173
173
|
✔ Confirm Static Assets Folder Exists [0.0s]
|
|
174
174
|
✔ Copy Static Files to Local Upload Dir [0.0s]
|
|
@@ -180,13 +180,13 @@ EXAMPLE
|
|
|
180
180
|
|
|
181
181
|
## Command - nextjs-version
|
|
182
182
|
|
|
183
|
-
`npx
|
|
183
|
+
`npx pwrdrvr nextjs-version help`
|
|
184
184
|
|
|
185
185
|
```
|
|
186
186
|
Apply version to next.config.js overtop of 0.0.0 placeholder
|
|
187
187
|
|
|
188
188
|
USAGE
|
|
189
|
-
$
|
|
189
|
+
$ pwrdrvr nextjs-version
|
|
190
190
|
|
|
191
191
|
OPTIONS
|
|
192
192
|
-l, --leave-copy Leave a copy of the modifed files as .modified
|
|
@@ -195,38 +195,38 @@ OPTIONS
|
|
|
195
195
|
--help show CLI help
|
|
196
196
|
|
|
197
197
|
EXAMPLE
|
|
198
|
-
$
|
|
198
|
+
$ pwrdrvr nextjs-version -n 0.0.13
|
|
199
199
|
✔ Modifying Config Files [0.0s]
|
|
200
200
|
```
|
|
201
201
|
|
|
202
202
|
## Command - nextjs-version-restore
|
|
203
203
|
|
|
204
|
-
`npx
|
|
204
|
+
`npx pwrdrvr nextjs-version-restore help`
|
|
205
205
|
|
|
206
206
|
```
|
|
207
207
|
Restore next.config.js
|
|
208
208
|
|
|
209
209
|
USAGE
|
|
210
|
-
$
|
|
210
|
+
$ pwrdrvr nextjs-version-restore
|
|
211
211
|
|
|
212
212
|
OPTIONS
|
|
213
213
|
-v, --version show CLI version
|
|
214
214
|
--help show CLI help
|
|
215
215
|
|
|
216
216
|
EXAMPLE
|
|
217
|
-
$
|
|
217
|
+
$ pwrdrvr nextjs-version-restore
|
|
218
218
|
✔ Restoring Modified Config Files [0.0s]
|
|
219
219
|
```
|
|
220
220
|
|
|
221
221
|
## Command - delete
|
|
222
222
|
|
|
223
|
-
`npx
|
|
223
|
+
`npx pwrdrvr delete help`
|
|
224
224
|
|
|
225
225
|
```
|
|
226
226
|
Delete app/version
|
|
227
227
|
|
|
228
228
|
USAGE
|
|
229
|
-
$
|
|
229
|
+
$ pwrdrvr delete
|
|
230
230
|
|
|
231
231
|
OPTIONS
|
|
232
232
|
-a, --app-name=app-name MicroApps app name (this becomes the path the app is rooted at)
|
|
@@ -236,6 +236,6 @@ OPTIONS
|
|
|
236
236
|
--help show CLI help
|
|
237
237
|
|
|
238
238
|
EXAMPLE
|
|
239
|
-
$
|
|
239
|
+
$ pwrdrvr delete -d microapps-deployer-dev -a release -n 0.0.13
|
|
240
240
|
✔ App/Version deleted: release/0.0.13 [1.2s]
|
|
241
241
|
```
|
package/package.json
CHANGED
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pwrdrvr/microapps-publish",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"source": "src/index.ts",
|
|
3
|
+
"version": "1.0.2",
|
|
4
|
+
"description": "Convenience package: renamed to `pwrdrvr`",
|
|
7
5
|
"publishConfig": {
|
|
8
6
|
"access": "public"
|
|
9
7
|
},
|
|
10
|
-
"bin": {
|
|
11
|
-
"microapps-publish": "./bin/run"
|
|
12
|
-
},
|
|
13
8
|
"engineStrict": true,
|
|
14
9
|
"engine": {
|
|
15
10
|
"node": ">= 12.0.0"
|
|
@@ -18,8 +13,6 @@
|
|
|
18
13
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
19
14
|
},
|
|
20
15
|
"files": [
|
|
21
|
-
"dist",
|
|
22
|
-
"src",
|
|
23
16
|
"package.json",
|
|
24
17
|
"LICENSE",
|
|
25
18
|
"README.md"
|
|
@@ -34,49 +27,9 @@
|
|
|
34
27
|
"url": "https://github.com/pwrdrvr/microapps-core/issues"
|
|
35
28
|
},
|
|
36
29
|
"homepage": "https://github.com/pwrdrvr/microapps-core#readme",
|
|
37
|
-
"dependencies": {
|
|
38
|
-
|
|
39
|
-
"@aws-sdk/client-s3": "^3.78.0",
|
|
40
|
-
"@aws-sdk/client-sts": "^3.78.0",
|
|
41
|
-
"@aws-sdk/lib-storage": "^3.78.0",
|
|
42
|
-
"@oclif/command": "^1.8.4",
|
|
43
|
-
"@oclif/config": "^1.17.1",
|
|
44
|
-
"@oclif/core": "^1.0.4",
|
|
45
|
-
"@oclif/errors": "^1.3.5",
|
|
46
|
-
"@oclif/plugin-help": "^3.2.7",
|
|
47
|
-
"chalk": "^4.1.2",
|
|
48
|
-
"convict": "^6.1.0",
|
|
49
|
-
"convict-format-with-validator": "^6.0.1",
|
|
50
|
-
"fs-extra": "^9.1.0",
|
|
51
|
-
"js-yaml": "^4.1.0",
|
|
52
|
-
"listr2": "^3.13.5",
|
|
53
|
-
"mime-types": "^2.1.30",
|
|
54
|
-
"p-map": "^4.0.0",
|
|
55
|
-
"reflect-metadata": "^0.1.13",
|
|
56
|
-
"source-map-support": "0.5.21",
|
|
57
|
-
"ts-convict": "^1.1.0",
|
|
58
|
-
"tslib": "^2.1.0"
|
|
59
|
-
},
|
|
60
|
-
"peerDependencies": {
|
|
61
|
-
"@aws-sdk/client-lambda": "^3.78.0",
|
|
62
|
-
"@aws-sdk/client-s3": "^3.78.0",
|
|
63
|
-
"@aws-sdk/client-sts": "^3.78.0",
|
|
64
|
-
"@aws-sdk/lib-storage": "^3.78.0"
|
|
65
|
-
},
|
|
30
|
+
"dependencies": {},
|
|
31
|
+
"peerDependencies": {},
|
|
66
32
|
"devDependencies": {
|
|
67
|
-
"
|
|
68
|
-
"@types/convict-format-with-validator": "^6.0.2",
|
|
69
|
-
"@types/fs-extra": "^9.0.11",
|
|
70
|
-
"@types/js-yaml": "^4.0.1",
|
|
71
|
-
"@types/mime-types": "^2.1.0",
|
|
72
|
-
"@types/source-map-support": "0.5.6",
|
|
73
|
-
"type-fest": "^0.20.2"
|
|
74
|
-
},
|
|
75
|
-
"oclif": {
|
|
76
|
-
"commands": "./dist/commands/",
|
|
77
|
-
"bin": "microapps-publish",
|
|
78
|
-
"plugins": [
|
|
79
|
-
"@oclif/plugin-help"
|
|
80
|
-
]
|
|
33
|
+
"pwrdrvr": "*"
|
|
81
34
|
}
|
|
82
35
|
}
|
package/bin/run
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import 'reflect-metadata';
|
|
2
|
-
import { Command, flags as flagsParser } from '@oclif/command';
|
|
3
|
-
export declare class DeleteCommand extends Command {
|
|
4
|
-
static description: string;
|
|
5
|
-
static examples: string[];
|
|
6
|
-
static flags: {
|
|
7
|
-
version: import("@oclif/parser/lib/flags").IBooleanFlag<void>;
|
|
8
|
-
help: import("@oclif/parser/lib/flags").IBooleanFlag<void>;
|
|
9
|
-
appName: flagsParser.IOptionFlag<string>;
|
|
10
|
-
'app-name': flagsParser.IOptionFlag<string>;
|
|
11
|
-
newVersion: flagsParser.IOptionFlag<string>;
|
|
12
|
-
'new-version': flagsParser.IOptionFlag<string>;
|
|
13
|
-
deployerLambdaName: flagsParser.IOptionFlag<string>;
|
|
14
|
-
'deployer-lambda-name': flagsParser.IOptionFlag<string>;
|
|
15
|
-
};
|
|
16
|
-
run(): Promise<void>;
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=delete.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../src/commands/delete.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAE1B,OAAO,EAAE,OAAO,EAAE,KAAK,IAAI,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAK/D,qBAAa,aAAc,SAAQ,OAAO;IACxC,MAAM,CAAC,WAAW,SAAwB;IAE1C,MAAM,CAAC,QAAQ,WAIb;IAEF,MAAM,CAAC,KAAK;;;;;;;;;MAyCV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CA2E3B"}
|
package/dist/commands/delete.js
DELETED
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DeleteCommand = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
require("reflect-metadata");
|
|
6
|
-
const sts = tslib_1.__importStar(require("@aws-sdk/client-sts"));
|
|
7
|
-
const command_1 = require("@oclif/command");
|
|
8
|
-
const listr2_1 = require("listr2");
|
|
9
|
-
const Config_1 = require("../config/Config");
|
|
10
|
-
const DeployClient_1 = tslib_1.__importDefault(require("../lib/DeployClient"));
|
|
11
|
-
class DeleteCommand extends command_1.Command {
|
|
12
|
-
async run() {
|
|
13
|
-
var _a, _b, _c, _d, _e, _f;
|
|
14
|
-
const config = Config_1.Config.instance;
|
|
15
|
-
// const RUNNING_TEXT = ' RUNS ';
|
|
16
|
-
// const RUNNING = chalk.reset.inverse.yellow.bold(RUNNING_TEXT) + ' ';
|
|
17
|
-
const RUNNING = ''; //chalk.reset.inverse.yellow.bold(RUNNING_TEXT) + ' ';
|
|
18
|
-
const { flags: parsedFlags } = this.parse(DeleteCommand);
|
|
19
|
-
const semVer = (_b = (_a = parsedFlags.newVersion) !== null && _a !== void 0 ? _a : parsedFlags['new-version']) !== null && _b !== void 0 ? _b : config.app.semVer;
|
|
20
|
-
const appName = (_d = (_c = parsedFlags.appName) !== null && _c !== void 0 ? _c : parsedFlags['app-name']) !== null && _d !== void 0 ? _d : config.app.name;
|
|
21
|
-
const deployerLambdaName = (_f = (_e = parsedFlags.deployerLambdaName) !== null && _e !== void 0 ? _e : parsedFlags['deployer-lambda-name']) !== null && _f !== void 0 ? _f : config.deployer.lambdaName;
|
|
22
|
-
// Override the config value
|
|
23
|
-
config.deployer.lambdaName = deployerLambdaName;
|
|
24
|
-
config.app.name = appName;
|
|
25
|
-
config.app.semVer = semVer;
|
|
26
|
-
// TODO: Pick and validate the appname/semver from the config and flags
|
|
27
|
-
// Get the account ID and region from STS
|
|
28
|
-
// TODO: Move this to the right place
|
|
29
|
-
if (config.app.awsAccountID === '' || config.app.awsRegion === '') {
|
|
30
|
-
const stsClient = new sts.STSClient({
|
|
31
|
-
maxAttempts: 8,
|
|
32
|
-
});
|
|
33
|
-
const stsResponse = await stsClient.send(new sts.GetCallerIdentityCommand({}));
|
|
34
|
-
if (config.app.awsAccountID === '') {
|
|
35
|
-
config.app.awsAccountID = stsResponse.Account;
|
|
36
|
-
}
|
|
37
|
-
if (config.app.awsRegion === '') {
|
|
38
|
-
config.app.awsRegion = stsClient.config.region;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
//
|
|
42
|
-
// Setup Tasks
|
|
43
|
-
//
|
|
44
|
-
const tasks = new listr2_1.Listr([
|
|
45
|
-
{
|
|
46
|
-
title: 'Deleting Version',
|
|
47
|
-
task: async (ctx, task) => {
|
|
48
|
-
const origTitle = task.title;
|
|
49
|
-
task.title = RUNNING + origTitle;
|
|
50
|
-
// Confirm the Version Does Not Exist in Published State
|
|
51
|
-
task.output = `Deleting app/version ${config.app.name}/${semVer}`;
|
|
52
|
-
const result = await DeployClient_1.default.DeleteVersion({
|
|
53
|
-
config,
|
|
54
|
-
output: (message) => (task.output = message),
|
|
55
|
-
});
|
|
56
|
-
if (result.statusCode === 200) {
|
|
57
|
-
task.title = `App/Version deleted: ${config.app.name}/${config.app.semVer}`;
|
|
58
|
-
}
|
|
59
|
-
else if (result.statusCode === 404) {
|
|
60
|
-
task.title = `App/Version does not exist: ${config.app.name}/${config.app.semVer}`;
|
|
61
|
-
}
|
|
62
|
-
else {
|
|
63
|
-
task.title = `App/Version delete failed: ${config.app.name}/${config.app.semVer}`;
|
|
64
|
-
throw new Error(`App/Version delete failed: ${config.app.name}/${config.app.semVer}`);
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
},
|
|
68
|
-
], {
|
|
69
|
-
rendererOptions: {
|
|
70
|
-
showTimer: true,
|
|
71
|
-
},
|
|
72
|
-
});
|
|
73
|
-
await tasks.run();
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
exports.DeleteCommand = DeleteCommand;
|
|
77
|
-
DeleteCommand.description = 'Delete app/version';
|
|
78
|
-
DeleteCommand.examples = [
|
|
79
|
-
`$ microapps-publish delete -d microapps-deployer-dev -a release -n 0.0.13
|
|
80
|
-
✔ App/Version deleted: release/0.0.13 [1.2s]
|
|
81
|
-
`,
|
|
82
|
-
];
|
|
83
|
-
DeleteCommand.flags = {
|
|
84
|
-
version: command_1.flags.version({
|
|
85
|
-
char: 'v',
|
|
86
|
-
}),
|
|
87
|
-
help: command_1.flags.help(),
|
|
88
|
-
// Deprecated
|
|
89
|
-
appName: command_1.flags.string({
|
|
90
|
-
multiple: false,
|
|
91
|
-
required: false,
|
|
92
|
-
hidden: true,
|
|
93
|
-
}),
|
|
94
|
-
'app-name': command_1.flags.string({
|
|
95
|
-
char: 'a',
|
|
96
|
-
multiple: false,
|
|
97
|
-
exactlyOne: ['app-name', 'appName'],
|
|
98
|
-
description: 'MicroApps app name (this becomes the path the app is rooted at)',
|
|
99
|
-
}),
|
|
100
|
-
// Deprecated
|
|
101
|
-
newVersion: command_1.flags.string({
|
|
102
|
-
multiple: false,
|
|
103
|
-
required: false,
|
|
104
|
-
hidden: true,
|
|
105
|
-
}),
|
|
106
|
-
'new-version': command_1.flags.string({
|
|
107
|
-
char: 'n',
|
|
108
|
-
multiple: false,
|
|
109
|
-
exactlyOne: ['new-version', 'newVersion'],
|
|
110
|
-
description: 'New semantic version to apply',
|
|
111
|
-
}),
|
|
112
|
-
// Deprecated
|
|
113
|
-
deployerLambdaName: command_1.flags.string({
|
|
114
|
-
multiple: false,
|
|
115
|
-
required: false,
|
|
116
|
-
hidden: true,
|
|
117
|
-
}),
|
|
118
|
-
'deployer-lambda-name': command_1.flags.string({
|
|
119
|
-
char: 'd',
|
|
120
|
-
multiple: false,
|
|
121
|
-
exactlyOne: ['deployer-lambda-name', 'deployerLambdaName'],
|
|
122
|
-
description: 'Name of the deployer lambda function',
|
|
123
|
-
}),
|
|
124
|
-
};
|
|
125
|
-
//# sourceMappingURL=delete.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"delete.js","sourceRoot":"","sources":["../../src/commands/delete.ts"],"names":[],"mappings":";;;;AAAA,4BAA0B;AAC1B,iEAA2C;AAC3C,4CAA+D;AAC/D,mCAA+B;AAC/B,6CAA0C;AAC1C,+EAA+C;AAE/C,MAAa,aAAc,SAAQ,iBAAO;IAoDxC,KAAK,CAAC,GAAG;;QACP,MAAM,MAAM,GAAG,eAAM,CAAC,QAAQ,CAAC;QAE/B,iCAAiC;QACjC,uEAAuE;QACvE,MAAM,OAAO,GAAG,EAAE,CAAC,CAAC,sDAAsD;QAE1E,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;QACzD,MAAM,MAAM,GAAG,MAAA,MAAA,WAAW,CAAC,UAAU,mCAAI,WAAW,CAAC,aAAa,CAAC,mCAAI,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC;QACzF,MAAM,OAAO,GAAG,MAAA,MAAA,WAAW,CAAC,OAAO,mCAAI,WAAW,CAAC,UAAU,CAAC,mCAAI,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC;QAClF,MAAM,kBAAkB,GACtB,MAAA,MAAA,WAAW,CAAC,kBAAkB,mCAC9B,WAAW,CAAC,sBAAsB,CAAC,mCACnC,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC;QAE7B,4BAA4B;QAC5B,MAAM,CAAC,QAAQ,CAAC,UAAU,GAAG,kBAAkB,CAAC;QAChD,MAAM,CAAC,GAAG,CAAC,IAAI,GAAG,OAAO,CAAC;QAC1B,MAAM,CAAC,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC;QAE3B,uEAAuE;QAEvE,yCAAyC;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E;KAC/E,CAAC;IACF,aAAa;IACb,UAAU,EAAE,eAAW,CAAC,MAAM,CAAC;QAC7B,QAAQ,EAAE,KAAK;QACf,QAAQ,EAAE,KAAK;QACf,MAAM,EAAE,IAAI;KACb,CAAC;IACF,aAAa,EAAE,eAAW,CAAC,MAAM,CAAC;QAChC,IAAI,EAAE,GAAG;QACT,QAAQ,EAAE,KAAK;QACf,UAAU,EAAE,CAAC,aAAa,EAAE,YAAY,CAAC;QACzC,WAAW,EAAE,+BAA+B;KAC7C,CAAC;IACF,aAAa;IACb,kBAAkB,EAAE,eAAW,CAAC,MAAM,CAAC;QACrC,QAAQ,EAAE,KAAK;QACf,QAAQ,EAAE,KAAK;QACf,MAAM,EAAE,IAAI;KACb,CAAC;IACF,sBAAsB,EAAE,eAAW,CAAC,MAAM,CAAC;QACzC,IAAI,EAAE,GAAG;QACT,QAAQ,EAAE,KAAK;QACf,UAAU,EAAE,CAAC,sBAAsB,EAAE,oBAAoB,CAAC;QAC1D,WAAW,EAAE,sCAAsC;KACpD,CAAC;CACH,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import 'reflect-metadata';
|
|
2
|
-
import { Command } from '@oclif/command';
|
|
3
|
-
export declare class NextJSVersionRestoreCommand extends Command {
|
|
4
|
-
static description: string;
|
|
5
|
-
static examples: string[];
|
|
6
|
-
static flags: {
|
|
7
|
-
version: import("@oclif/parser/lib/flags").IBooleanFlag<void>;
|
|
8
|
-
help: import("@oclif/parser/lib/flags").IBooleanFlag<void>;
|
|
9
|
-
};
|
|
10
|
-
private VersionAndAlias;
|
|
11
|
-
private FILES_TO_MODIFY;
|
|
12
|
-
run(): Promise<void>;
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=nextjs-version-restore.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nextjs-version-restore.d.ts","sourceRoot":"","sources":["../../src/commands/nextjs-version-restore.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAwB,MAAM,gBAAgB,CAAC;AAI/D,qBAAa,2BAA4B,SAAQ,OAAO;IACtD,MAAM,CAAC,WAAW,SAA4B;IAE9C,MAAM,CAAC,QAAQ,WAIb;IAEF,MAAM,CAAC,KAAK;;;MAKV;IAEF,OAAO,CAAC,eAAe,CAAY;IACnC,OAAO,CAAC,eAAe,CAGnB;IAEE,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CA0C3B"}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NextJSVersionRestoreCommand = void 0;
|
|
4
|
-
require("reflect-metadata");
|
|
5
|
-
const command_1 = require("@oclif/command");
|
|
6
|
-
const listr2_1 = require("listr2");
|
|
7
|
-
const Versions_1 = require("../lib/Versions");
|
|
8
|
-
class NextJSVersionRestoreCommand extends command_1.Command {
|
|
9
|
-
async run() {
|
|
10
|
-
// const RUNNING_TEXT = ' RUNS ';
|
|
11
|
-
// const RUNNING = chalk.reset.inverse.yellow.bold(RUNNING_TEXT) + ' ';
|
|
12
|
-
const RUNNING = ''; //chalk.reset.inverse.yellow.bold(RUNNING_TEXT) + ' ';
|
|
13
|
-
// const { flags: parsedFlags } =
|
|
14
|
-
this.parse(NextJSVersionRestoreCommand);
|
|
15
|
-
this.VersionAndAlias = (0, Versions_1.createVersions)('0.0.0');
|
|
16
|
-
const versionOnly = { version: this.VersionAndAlias.version };
|
|
17
|
-
this.FILES_TO_MODIFY = [{ path: 'next.config.js', versions: versionOnly }];
|
|
18
|
-
// TODO: Pick and validate the appname/semver from the config and flags
|
|
19
|
-
//
|
|
20
|
-
// Setup Tasks
|
|
21
|
-
//
|
|
22
|
-
const tasks = new listr2_1.Listr([
|
|
23
|
-
{
|
|
24
|
-
title: 'Restoring Modified Config Files',
|
|
25
|
-
task: async (ctx, task) => {
|
|
26
|
-
const origTitle = task.title;
|
|
27
|
-
task.title = RUNNING + origTitle;
|
|
28
|
-
await (0, Versions_1.restoreFiles)(this.FILES_TO_MODIFY);
|
|
29
|
-
task.title = origTitle;
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
], {
|
|
33
|
-
rendererOptions: {
|
|
34
|
-
showTimer: true,
|
|
35
|
-
},
|
|
36
|
-
});
|
|
37
|
-
await tasks.run();
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
exports.NextJSVersionRestoreCommand = NextJSVersionRestoreCommand;
|
|
41
|
-
NextJSVersionRestoreCommand.description = 'Restore next.config.js';
|
|
42
|
-
NextJSVersionRestoreCommand.examples = [
|
|
43
|
-
`$ microapps-publish nextjs-version-restore
|
|
44
|
-
✔ Restoring Modified Config Files [0.0s]
|
|
45
|
-
`,
|
|
46
|
-
];
|
|
47
|
-
NextJSVersionRestoreCommand.flags = {
|
|
48
|
-
version: command_1.flags.version({
|
|
49
|
-
char: 'v',
|
|
50
|
-
}),
|
|
51
|
-
help: command_1.flags.help(),
|
|
52
|
-
};
|
|
53
|
-
//# sourceMappingURL=nextjs-version-restore.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nextjs-version-restore.js","sourceRoot":"","sources":["../../src/commands/nextjs-version-restore.ts"],"names":[],"mappings":";;;AAAA,4BAA0B;AAC1B,4CAA+D;AAC/D,mCAA+B;AAC/B,8CAA0E;AAE1E,MAAa,2BAA4B,SAAQ,iBAAO;IAsBtD,KAAK,CAAC,GAAG;QACP,iCAAiC;QACjC,uEAAuE;QACvE,MAAM,OAAO,GAAG,EAAE,CAAC,CAAC,sDAAsD;QAE1E,iCAAiC;QACjC,IAAI,CAAC,KAAK,CAAC,2BAA2B,CAAC,CAAC;QAExC,IAAI,CAAC,eAAe,GAAG,IAAA,yBAAc,EAAC,OAAO,CAAC,CAAC;QAC/C,MAAM,WAAW,GAAG,EAAE,OAAO,EAAE,IAAI,CAAC,eAAe,CAAC,OAAO,EAAE,CAAC;QAE9D,IAAI,CAAC,eAAe,GAAG,CAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC,CAAC;QAE3E,uEAAuE;QAEvE,EAAE;QACF,cAAc;QACd,EAAE;QAEF,MAAM,KAAK,GAAG,IAAI,cAAK,CACrB;YACE;gBACE,KAAK,EAAE,iCAAiC;gBACxC,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;oBACxB,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC;oBAC7B,IAAI,CAAC,KAAK,GAAG,OAAO,GAAG,SAAS,CAAC;oBAEjC,MAAM,IAAA,uBAAY,EAAC,IAAI,CAAC,eAAe,CAAC,CAAC;oBAEzC,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC;gBACzB,CAAC;aACF;SACF,EACD;YACE,eAAe,EAAE;gBACf,SAAS,EAAE,IAAI;aAChB;SACF,CACF,CAAC;QAEF,MAAM,KAAK,CAAC,GAAG,EAAE,CAAC;IACpB,CAAC;;AA/DH,kEAgEC;AA/DQ,uCAAW,GAAG,wBAAwB,CAAC;AAEvC,oCAAQ,GAAG;IAChB;;CAEH;CACE,CAAC;AAEK,iCAAK,GAAG;IACb,OAAO,EAAE,eAAW,CAAC,OAAO,CAAC;QAC3B,IAAI,EAAE,GAAG;KACV,CAAC;IACF,IAAI,EAAE,eAAW,CAAC,IAAI,EAAE;CACzB,CAAC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import 'reflect-metadata';
|
|
2
|
-
import { Command, flags as flagsParser } from '@oclif/command';
|
|
3
|
-
export declare class NextJSVersionCommand extends Command {
|
|
4
|
-
static description: string;
|
|
5
|
-
static examples: string[];
|
|
6
|
-
static flags: {
|
|
7
|
-
version: import("@oclif/parser/lib/flags").IBooleanFlag<void>;
|
|
8
|
-
help: import("@oclif/parser/lib/flags").IBooleanFlag<void>;
|
|
9
|
-
newVersion: flagsParser.IOptionFlag<string>;
|
|
10
|
-
'new-version': flagsParser.IOptionFlag<string>;
|
|
11
|
-
leaveCopy: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
|
|
12
|
-
'leave-copy': import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
|
|
13
|
-
};
|
|
14
|
-
private VersionAndAlias;
|
|
15
|
-
private FILES_TO_MODIFY;
|
|
16
|
-
run(): Promise<void>;
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=nextjs-version.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nextjs-version.d.ts","sourceRoot":"","sources":["../../src/commands/nextjs-version.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,KAAK,IAAI,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAK/D,qBAAa,oBAAqB,SAAQ,OAAO;IAC/C,MAAM,CAAC,WAAW,SAAkE;IAEpF,MAAM,CAAC,QAAQ,WAIb;IAEF,MAAM,CAAC,KAAK;;;;;;;MA+BV;IAEF,OAAO,CAAC,eAAe,CAAY;IACnC,OAAO,CAAC,eAAe,CAGnB;IAEE,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAoE3B"}
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NextJSVersionCommand = void 0;
|
|
4
|
-
require("reflect-metadata");
|
|
5
|
-
const command_1 = require("@oclif/command");
|
|
6
|
-
const listr2_1 = require("listr2");
|
|
7
|
-
const Versions_1 = require("../lib/Versions");
|
|
8
|
-
const Config_1 = require("../config/Config");
|
|
9
|
-
class NextJSVersionCommand extends command_1.Command {
|
|
10
|
-
async run() {
|
|
11
|
-
var _a, _b;
|
|
12
|
-
// const RUNNING_TEXT = ' RUNS ';
|
|
13
|
-
// const RUNNING = chalk.reset.inverse.yellow.bold(RUNNING_TEXT) + ' ';
|
|
14
|
-
const RUNNING = ''; //chalk.reset.inverse.yellow.bold(RUNNING_TEXT) + ' ';
|
|
15
|
-
const { flags: parsedFlags } = this.parse(NextJSVersionCommand);
|
|
16
|
-
const semVer = (_a = parsedFlags.newVersion) !== null && _a !== void 0 ? _a : parsedFlags['new-version'];
|
|
17
|
-
const leaveFiles = (_b = parsedFlags.leaveCopy) !== null && _b !== void 0 ? _b : parsedFlags['leave-copy'];
|
|
18
|
-
// Override the config value
|
|
19
|
-
const config = Config_1.Config.instance;
|
|
20
|
-
config.app.semVer = semVer;
|
|
21
|
-
this.VersionAndAlias = (0, Versions_1.createVersions)(semVer);
|
|
22
|
-
const versionOnly = { version: this.VersionAndAlias.version };
|
|
23
|
-
this.FILES_TO_MODIFY = [{ path: 'next.config.js', versions: versionOnly }];
|
|
24
|
-
// TODO: Pick and validate the appname/semver from the config and flags
|
|
25
|
-
if (config === undefined) {
|
|
26
|
-
this.error('Failed to load the config file');
|
|
27
|
-
}
|
|
28
|
-
//
|
|
29
|
-
// Setup Tasks
|
|
30
|
-
//
|
|
31
|
-
const tasks = new listr2_1.Listr([
|
|
32
|
-
{
|
|
33
|
-
title: 'Restoring Modified Config Files',
|
|
34
|
-
task: async (ctx, task) => {
|
|
35
|
-
const origTitle = task.title;
|
|
36
|
-
task.title = RUNNING + origTitle;
|
|
37
|
-
await (0, Versions_1.restoreFiles)(this.FILES_TO_MODIFY);
|
|
38
|
-
task.title = origTitle;
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
title: 'Modifying Config Files',
|
|
43
|
-
task: async (ctx, task) => {
|
|
44
|
-
const origTitle = task.title;
|
|
45
|
-
task.title = RUNNING + origTitle;
|
|
46
|
-
// Modify the existing files with the new version
|
|
47
|
-
for (const fileToModify of this.FILES_TO_MODIFY) {
|
|
48
|
-
task.output = `Patching version (${this.VersionAndAlias.version}) into ${fileToModify.path}`;
|
|
49
|
-
if (!(await (0, Versions_1.writeNewVersions)(fileToModify.path, fileToModify.versions, leaveFiles))) {
|
|
50
|
-
task.output = `Failed modifying file: ${fileToModify.path}`;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
task.title = origTitle;
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
], {
|
|
57
|
-
rendererOptions: {
|
|
58
|
-
showTimer: true,
|
|
59
|
-
},
|
|
60
|
-
});
|
|
61
|
-
await tasks.run();
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
exports.NextJSVersionCommand = NextJSVersionCommand;
|
|
65
|
-
NextJSVersionCommand.description = 'Apply version to next.config.js overtop of 0.0.0 placeholder';
|
|
66
|
-
NextJSVersionCommand.examples = [
|
|
67
|
-
`$ microapps-publish nextjs-version -n 0.0.13
|
|
68
|
-
✔ Modifying Config Files [0.0s]
|
|
69
|
-
`,
|
|
70
|
-
];
|
|
71
|
-
NextJSVersionCommand.flags = {
|
|
72
|
-
version: command_1.flags.version({
|
|
73
|
-
char: 'v',
|
|
74
|
-
}),
|
|
75
|
-
help: command_1.flags.help(),
|
|
76
|
-
// Deprecated
|
|
77
|
-
newVersion: command_1.flags.string({
|
|
78
|
-
multiple: false,
|
|
79
|
-
required: false,
|
|
80
|
-
hidden: true,
|
|
81
|
-
}),
|
|
82
|
-
'new-version': command_1.flags.string({
|
|
83
|
-
char: 'n',
|
|
84
|
-
multiple: false,
|
|
85
|
-
exactlyOne: ['new-version', 'newVersion'],
|
|
86
|
-
description: 'New semantic version to apply',
|
|
87
|
-
}),
|
|
88
|
-
// Deprecated
|
|
89
|
-
leaveCopy: command_1.flags.boolean({
|
|
90
|
-
char: 'l',
|
|
91
|
-
default: false,
|
|
92
|
-
required: false,
|
|
93
|
-
hidden: true,
|
|
94
|
-
exclusive: ['leave-copy'],
|
|
95
|
-
}),
|
|
96
|
-
'leave-copy': command_1.flags.boolean({
|
|
97
|
-
char: 'l',
|
|
98
|
-
default: false,
|
|
99
|
-
required: false,
|
|
100
|
-
description: 'Leave a copy of the modifed files as .modified',
|
|
101
|
-
}),
|
|
102
|
-
};
|
|
103
|
-
//# sourceMappingURL=nextjs-version.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nextjs-version.js","sourceRoot":"","sources":["../../src/commands/nextjs-version.ts"],"names":[],"mappings":";;;AAAA,4BAA0B;AAC1B,4CAA+D;AAC/D,mCAA+B;AAC/B,8CAA4F;AAC5F,6CAA0C;AAE1C,MAAa,oBAAqB,SAAQ,iBAAO;IAgD/C,KAAK,CAAC,GAAG;;QACP,iCAAiC;QACjC,uEAAuE;QACvE,MAAM,OAAO,GAAG,EAAE,CAAC,CAAC,sDAAsD;QAE1E,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC;QAChE,MAAM,MAAM,GAAG,MAAA,WAAW,CAAC,UAAU,mCAAI,WAAW,CAAC,aAAa,CAAC,CAAC;QACpE,MAAM,UAAU,GAAG,MAAA,WAAW,CAAC,SAAS,mCAAI,WAAW,CAAC,YAAY,CAAC,CAAC;QAEtE,4BAA4B;QAC5B,MAAM,MAAM,GAAG,eAAM,CAAC,QAAQ,CAAC;QAC/B,MAAM,CAAC,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC;QAE3B,IAAI,CAAC,eAAe,GAAG,IAAA,yBAAc,EAAC,MAAM,CAAC,CAAC;QAC9C,MAAM,WAAW,GAAG,EAAE,OAAO,EAAE,IAAI,CAAC,eAAe,CAAC,OAAO,EAAE,CAAC;QAE9D,IAAI,CAAC,eAAe,GAAG,CAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC,CAAC;QAE3E,uEAAuE;QAEvE,IAAI,MAAM,KAAK,SAAS,EAAE;YACxB,IAAI,CAAC,KAAK,CAAC,gCAAgC,CAAC,CAAC;SAC9C;QAED,EAAE;QACF,cAAc;QACd,EAAE;QAEF,MAAM,KAAK,GAAG,IAAI,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ACb,OAAO,EAAE,eAAW,CAAC,OAAO,CAAC;QAC3B,IAAI,EAAE,GAAG;KACV,CAAC;IACF,IAAI,EAAE,eAAW,CAAC,IAAI,EAAE;IACxB,aAAa;IACb,UAAU,EAAE,eAAW,CAAC,MAAM,CAAC;QAC7B,QAAQ,EAAE,KAAK;QACf,QAAQ,EAAE,KAAK;QACf,MAAM,EAAE,IAAI;KACb,CAAC;IACF,aAAa,EAAE,eAAW,CAAC,MAAM,CAAC;QAChC,IAAI,EAAE,GAAG;QACT,QAAQ,EAAE,KAAK;QACf,UAAU,EAAE,CAAC,aAAa,EAAE,YAAY,CAAC;QACzC,WAAW,EAAE,+BAA+B;KAC7C,CAAC;IACF,aAAa;IACb,SAAS,EAAE,eAAW,CAAC,OAAO,CAAC;QAC7B,IAAI,EAAE,GAAG;QACT,OAAO,EAAE,KAAK;QACd,QAAQ,EAAE,KAAK;QACf,MAAM,EAAE,IAAI;QACZ,SAAS,EAAE,CAAC,YAAY,CAAC;KAC1B,CAAC;IACF,YAAY,EAAE,eAAW,CAAC,OAAO,CAAC;QAChC,IAAI,EAAE,GAAG;QACT,OAAO,EAAE,KAAK;QACd,QAAQ,EAAE,KAAK;QACf,WAAW,EAAE,gDAAgD;KAC9D,CAAC;CACH,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import 'reflect-metadata';
|
|
2
|
-
import { Command, flags as flagsParser } from '@oclif/command';
|
|
3
|
-
export declare class PreflightCommand extends Command {
|
|
4
|
-
static description: string;
|
|
5
|
-
static examples: string[];
|
|
6
|
-
static flags: {
|
|
7
|
-
version: import("@oclif/parser/lib/flags").IBooleanFlag<void>;
|
|
8
|
-
help: import("@oclif/parser/lib/flags").IBooleanFlag<void>;
|
|
9
|
-
appName: flagsParser.IOptionFlag<string>;
|
|
10
|
-
'app-name': flagsParser.IOptionFlag<string>;
|
|
11
|
-
newVersion: flagsParser.IOptionFlag<string>;
|
|
12
|
-
'new-version': flagsParser.IOptionFlag<string>;
|
|
13
|
-
deployerLambdaName: flagsParser.IOptionFlag<string>;
|
|
14
|
-
'deployer-lambda-name': flagsParser.IOptionFlag<string>;
|
|
15
|
-
overwrite: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
|
|
16
|
-
};
|
|
17
|
-
run(): Promise<void>;
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=preflight.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"preflight.d.ts","sourceRoot":"","sources":["../../src/commands/preflight.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAE1B,OAAO,EAAE,OAAO,EAAE,KAAK,IAAI,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAK/D,qBAAa,gBAAiB,SAAQ,OAAO;IAC3C,MAAM,CAAC,WAAW,SAAwC;IAE1D,MAAM,CAAC,QAAQ,WAIb;IAEF,MAAM,CAAC,KAAK;;;;;;;;;;MAgDV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAiF3B"}
|