@fishawack/lab-env 4.39.0-beta.6 → 4.39.0-beta.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/.prettierignore +8 -0
- package/CHANGELOG.md +37 -0
- package/README.md +46 -0
- package/_Test/provision.js +16 -7
- package/_Test/s3.js +3 -1
- package/_Test/utilities.js +4 -0
- package/cli.js +4 -6
- package/commands/check.js +1 -0
- package/commands/clean.js +2 -2
- package/commands/content.js +2 -2
- package/commands/create/cmds/dekey.js +2 -3
- package/commands/create/cmds/deprovision.js +2 -2
- package/commands/create/cmds/diagnose.js +3 -2
- package/commands/create/cmds/key.js +2 -2
- package/commands/create/cmds/provision.js +3 -3
- package/commands/create/libs/aws-cloudfront-auth.js +11 -8
- package/commands/create/libs/aws-cloudfront-response.js +1 -0
- package/commands/create/libs/aws-cloudfront-simple.js +10 -7
- package/commands/create/libs/utilities.js +3 -0
- package/commands/create/libs/vars.js +24 -24
- package/commands/create/services/aws/cloudfront.js +1 -1
- package/commands/create/services/aws/iam.js +5 -3
- package/commands/create/services/aws/index.js +36 -12
- package/commands/create/services/aws/s3.js +1 -0
- package/commands/create/services/bitbucket.js +4 -4
- package/commands/create/services/egnyte.js +2 -2
- package/commands/create/services/gitlab.js +2 -2
- package/commands/create/services/guide.js +26 -19
- package/commands/create/services/test.js +13 -11
- package/commands/deploy.js +2 -2
- package/commands/docker/config.js +2 -2
- package/commands/docker/down.js +2 -2
- package/commands/docker/mocha.js +2 -4
- package/commands/docker/volumes.js +2 -2
- package/commands/lint.js +31 -7
- package/commands/nuke.js +5 -3
- package/commands/origin.js +3 -3
- package/commands/production.js +2 -2
- package/commands/regenerate.js +2 -2
- package/commands/reinstall.js +2 -2
- package/commands/setup.js +2 -2
- package/commands/test.js +2 -2
- package/commands/watch.js +2 -2
- package/commands/wp.js +0 -2
- package/eslint.config.js +79 -0
- package/globals.js +73 -50
- package/package.json +1 -1
- package/stylelint.config.js +40 -0
- package/commands/pretty.js +0 -14
|
@@ -116,29 +116,39 @@ module.exports.static = async (
|
|
|
116
116
|
module.exports.staticTerminate = async (name, account, repo, branch, id) => {
|
|
117
117
|
try {
|
|
118
118
|
await module.exports.s3.emptyS3Bucket(name, account);
|
|
119
|
-
} catch
|
|
119
|
+
} catch {
|
|
120
|
+
/* empty */
|
|
121
|
+
}
|
|
120
122
|
|
|
121
123
|
try {
|
|
122
124
|
await module.exports.s3.removeS3Bucket(name, account);
|
|
123
|
-
} catch
|
|
125
|
+
} catch {
|
|
126
|
+
/* empty */
|
|
127
|
+
}
|
|
124
128
|
|
|
125
129
|
try {
|
|
126
130
|
await module.exports.cloudfront.removeCloudFrontDistribution(
|
|
127
131
|
id,
|
|
128
132
|
account,
|
|
129
133
|
);
|
|
130
|
-
} catch
|
|
134
|
+
} catch {
|
|
135
|
+
/* empty */
|
|
136
|
+
}
|
|
131
137
|
|
|
132
138
|
try {
|
|
133
139
|
await module.exports.cloudfront.removeCloudFrontFunction(name, account);
|
|
134
|
-
} catch
|
|
140
|
+
} catch {
|
|
141
|
+
/* empty */
|
|
142
|
+
}
|
|
135
143
|
|
|
136
144
|
try {
|
|
137
145
|
await module.exports.cloudfront.removeCloudFrontFunction(
|
|
138
146
|
module.exports.slug(`${repo}-response`, account, branch),
|
|
139
147
|
account,
|
|
140
148
|
);
|
|
141
|
-
} catch
|
|
149
|
+
} catch {
|
|
150
|
+
/* empty */
|
|
151
|
+
}
|
|
142
152
|
};
|
|
143
153
|
|
|
144
154
|
module.exports.fullstack = async (
|
|
@@ -181,14 +191,18 @@ module.exports.fullstack = async (
|
|
|
181
191
|
repo,
|
|
182
192
|
account,
|
|
183
193
|
);
|
|
184
|
-
} catch
|
|
194
|
+
} catch {
|
|
195
|
+
/* empty */
|
|
196
|
+
}
|
|
185
197
|
|
|
186
198
|
let hasKeyPair = false;
|
|
187
199
|
|
|
188
200
|
try {
|
|
189
201
|
await module.exports.ec2.getKeyPair("id_rsa_prev", account);
|
|
190
202
|
hasKeyPair = true;
|
|
191
|
-
} catch
|
|
203
|
+
} catch {
|
|
204
|
+
/* empty */
|
|
205
|
+
}
|
|
192
206
|
|
|
193
207
|
// LetsEncrypt CN records are limited to 64 chars so use only the hash from the generated name
|
|
194
208
|
const CNAMEPrefix = `fw-auto-${name.split("-")[name.split("-").length - 1]}`;
|
|
@@ -270,27 +284,37 @@ module.exports.fullstackTerminate = async (name, account, repo, branch) => {
|
|
|
270
284
|
|
|
271
285
|
try {
|
|
272
286
|
await module.exports.iam.removeIAMUser(s3Slug, account);
|
|
273
|
-
} catch
|
|
287
|
+
} catch {
|
|
288
|
+
/* empty */
|
|
289
|
+
}
|
|
274
290
|
|
|
275
291
|
try {
|
|
276
292
|
await module.exports.s3.emptyS3Bucket(s3Slug, account);
|
|
277
|
-
} catch
|
|
293
|
+
} catch {
|
|
294
|
+
/* empty */
|
|
295
|
+
}
|
|
278
296
|
|
|
279
297
|
try {
|
|
280
298
|
await module.exports.s3.removeS3Bucket(s3Slug, account);
|
|
281
|
-
} catch
|
|
299
|
+
} catch {
|
|
300
|
+
/* empty */
|
|
301
|
+
}
|
|
282
302
|
|
|
283
303
|
try {
|
|
284
304
|
await module.exports.elasticbeanstalk.removeElasticBeanstalkEnvironment(
|
|
285
305
|
name,
|
|
286
306
|
account,
|
|
287
307
|
);
|
|
288
|
-
} catch
|
|
308
|
+
} catch {
|
|
309
|
+
/* empty */
|
|
310
|
+
}
|
|
289
311
|
|
|
290
312
|
try {
|
|
291
313
|
await module.exports.elasticbeanstalk.removeElasticBeanstalkApplication(
|
|
292
314
|
repo,
|
|
293
315
|
account,
|
|
294
316
|
);
|
|
295
|
-
} catch
|
|
317
|
+
} catch {
|
|
318
|
+
/* empty */
|
|
319
|
+
}
|
|
296
320
|
};
|
|
@@ -154,6 +154,7 @@ module.exports.emptyS3Bucket = async (bucket, account) => {
|
|
|
154
154
|
const client = createClient(S3Client, account);
|
|
155
155
|
|
|
156
156
|
await Spinner.prototype.simple(`Emptying s3 bucket`, () => {
|
|
157
|
+
// eslint-disable-next-line no-async-promise-executor
|
|
157
158
|
return new Promise(async (resolve, reject) => {
|
|
158
159
|
try {
|
|
159
160
|
let ContinuationToken = null;
|
|
@@ -18,7 +18,7 @@ module.exports.check = async () => {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
return true;
|
|
21
|
-
} catch
|
|
21
|
+
} catch {
|
|
22
22
|
spinner.update(
|
|
23
23
|
`Failed to communicate with ${misc.bitbucket.workspace} on Bitbucket.`,
|
|
24
24
|
"fail",
|
|
@@ -41,7 +41,7 @@ module.exports.remove = async (slug) => {
|
|
|
41
41
|
} else {
|
|
42
42
|
throw "";
|
|
43
43
|
}
|
|
44
|
-
} catch
|
|
44
|
+
} catch {
|
|
45
45
|
spinner.update(`Failed to delete ${slug} on Bitbucket.`, "fail");
|
|
46
46
|
}
|
|
47
47
|
};
|
|
@@ -98,14 +98,14 @@ module.exports.fork = async (slug, template) => {
|
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
return true;
|
|
101
|
-
} catch
|
|
101
|
+
} catch {
|
|
102
102
|
spinner.update(`Failed to create ${slug} on Bitbucket.`, "fail");
|
|
103
103
|
|
|
104
104
|
return false;
|
|
105
105
|
}
|
|
106
106
|
};
|
|
107
107
|
|
|
108
|
-
module.exports.enablePipelines = async (slug
|
|
108
|
+
module.exports.enablePipelines = async (slug) => {
|
|
109
109
|
let spinner = new Spinner(`Enabling pipelines for ${slug}`);
|
|
110
110
|
|
|
111
111
|
try {
|
|
@@ -25,7 +25,7 @@ module.exports.request = async (username, password, host) => {
|
|
|
25
25
|
!(await new Promise((resolve, reject) => {
|
|
26
26
|
exec(
|
|
27
27
|
`curl -I -k --ftp-ssl --ftp-pasv -u "${username.replace("$", "\\$")}:${password}" ftp://${host}`,
|
|
28
|
-
(error, stdout
|
|
28
|
+
(error, stdout) => {
|
|
29
29
|
if (error) {
|
|
30
30
|
reject(error);
|
|
31
31
|
return;
|
|
@@ -42,7 +42,7 @@ module.exports.request = async (username, password, host) => {
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
return true;
|
|
45
|
-
} catch
|
|
45
|
+
} catch {
|
|
46
46
|
spinner.update(`Failed to communicate with Egnyte.`, "fail");
|
|
47
47
|
|
|
48
48
|
return false;
|
|
@@ -13,7 +13,7 @@ module.exports.check = async () => {
|
|
|
13
13
|
await new Promise((resolve, reject) => {
|
|
14
14
|
exec(
|
|
15
15
|
`curl -H "Content-Type:application/json" http://${misc.gitlab.workspace}/api/v4/users?private_token=${misc.gitlab.token}`,
|
|
16
|
-
(error, stdout
|
|
16
|
+
(error, stdout) => {
|
|
17
17
|
if (error) {
|
|
18
18
|
reject(error);
|
|
19
19
|
return;
|
|
@@ -33,7 +33,7 @@ module.exports.check = async () => {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
return true;
|
|
36
|
-
} catch
|
|
36
|
+
} catch {
|
|
37
37
|
spinner.update(
|
|
38
38
|
`Failed to communicate with ${misc.gitlab.workspace} on Gitlab.`,
|
|
39
39
|
"fail",
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
const inquirer = require("inquirer");
|
|
2
2
|
const { homedir } = require("os");
|
|
3
3
|
const { mkdirSync, writeFileSync, readFileSync } = require("fs");
|
|
4
|
-
const { encode } = require("../libs/utilities");
|
|
4
|
+
const { encode, Spinner } = require("../libs/utilities");
|
|
5
5
|
const {
|
|
6
6
|
urls,
|
|
7
7
|
apis,
|
|
8
|
-
misc:
|
|
8
|
+
misc: credsMisc,
|
|
9
9
|
bitbucketApi,
|
|
10
10
|
headers,
|
|
11
|
-
ftppass:
|
|
11
|
+
ftppass: credsFtppass,
|
|
12
12
|
creds,
|
|
13
13
|
presets,
|
|
14
|
-
|
|
14
|
+
globalModules,
|
|
15
15
|
} = require("../libs/vars");
|
|
16
16
|
const { execSync } = require("child_process");
|
|
17
17
|
|
|
@@ -75,7 +75,7 @@ module.exports.bitbucket = async ({ confirm }) => {
|
|
|
75
75
|
type: "input",
|
|
76
76
|
name: "username",
|
|
77
77
|
message: "What is your bitbucket username? (e.g. mmellor)",
|
|
78
|
-
default:
|
|
78
|
+
default: credsMisc.bitbucket && credsMisc.bitbucket.username,
|
|
79
79
|
validate: (input) =>
|
|
80
80
|
input.trim().length > 0 ||
|
|
81
81
|
"Username cannot be an empty string",
|
|
@@ -83,7 +83,7 @@ module.exports.bitbucket = async ({ confirm }) => {
|
|
|
83
83
|
{
|
|
84
84
|
type: "password",
|
|
85
85
|
name: "password",
|
|
86
|
-
default:
|
|
86
|
+
default: credsMisc.bitbucket && credsMisc.bitbucket.password,
|
|
87
87
|
message: "What is your bitbucket password? (e.g. password1234)",
|
|
88
88
|
validate: (input) =>
|
|
89
89
|
input.trim().length > 0 ||
|
|
@@ -103,7 +103,7 @@ module.exports.bitbucket = async ({ confirm }) => {
|
|
|
103
103
|
}),
|
|
104
104
|
);
|
|
105
105
|
|
|
106
|
-
|
|
106
|
+
credsMisc.bitbucket = file.bitbucket = { ...inputs };
|
|
107
107
|
apis.bbWorkspaceAPI = `${bitbucketApi}/${inputs.workspace}`;
|
|
108
108
|
headers.bbHeaders = encode(inputs.username, inputs.password);
|
|
109
109
|
urls.bitbucketSSH = `git@bitbucket.org:${inputs.workspace}`;
|
|
@@ -137,7 +137,7 @@ module.exports.gitlab = async ({ confirm }) => {
|
|
|
137
137
|
name: "token",
|
|
138
138
|
message:
|
|
139
139
|
"What is your gitlab token? (e.g. puhQmpZGooQyLCa5LhTg)",
|
|
140
|
-
default: (
|
|
140
|
+
default: (credsMisc.gitlab && credsMisc.gitlab.token) || null,
|
|
141
141
|
validate: (input) =>
|
|
142
142
|
input.trim().length > 0 ||
|
|
143
143
|
"Password cannot be an empty string",
|
|
@@ -156,7 +156,7 @@ module.exports.gitlab = async ({ confirm }) => {
|
|
|
156
156
|
}),
|
|
157
157
|
);
|
|
158
158
|
|
|
159
|
-
|
|
159
|
+
credsMisc.gitlab = file.gitlab = { ...inputs };
|
|
160
160
|
|
|
161
161
|
writeFileSync(
|
|
162
162
|
`${homedir()}/targets/misc.json`,
|
|
@@ -210,8 +210,8 @@ module.exports.egnyte = async ({ confirm }) => {
|
|
|
210
210
|
message:
|
|
211
211
|
"What is your egnyte username? (e.g. mmellor$fishawack)",
|
|
212
212
|
default:
|
|
213
|
-
(
|
|
214
|
-
|
|
213
|
+
(credsFtppass["ftp-fishawack.egnyte.com"] &&
|
|
214
|
+
credsFtppass["ftp-fishawack.egnyte.com"].username) ||
|
|
215
215
|
null,
|
|
216
216
|
validate: (input) =>
|
|
217
217
|
input.trim().length > 0 ||
|
|
@@ -222,8 +222,8 @@ module.exports.egnyte = async ({ confirm }) => {
|
|
|
222
222
|
name: "password",
|
|
223
223
|
message: "What is your egnyte password? (e.g. password1234)",
|
|
224
224
|
default:
|
|
225
|
-
(
|
|
226
|
-
|
|
225
|
+
(credsFtppass["ftp-fishawack.egnyte.com"] &&
|
|
226
|
+
credsFtppass["ftp-fishawack.egnyte.com"].password) ||
|
|
227
227
|
null,
|
|
228
228
|
validate: (input) =>
|
|
229
229
|
input.trim().length > 0 ||
|
|
@@ -247,7 +247,7 @@ module.exports.egnyte = async ({ confirm }) => {
|
|
|
247
247
|
);
|
|
248
248
|
|
|
249
249
|
creds.egnyte =
|
|
250
|
-
|
|
250
|
+
credsFtppass["ftp-fishawack.egnyte.com"] =
|
|
251
251
|
file["ftp-fishawack.egnyte.com"] =
|
|
252
252
|
{ ...inputs };
|
|
253
253
|
|
|
@@ -431,6 +431,7 @@ module.exports.watertight = async ({ confirm }) => {
|
|
|
431
431
|
]);
|
|
432
432
|
|
|
433
433
|
if (inputs.confirm) {
|
|
434
|
+
/* empty */
|
|
434
435
|
} else {
|
|
435
436
|
throw "";
|
|
436
437
|
}
|
|
@@ -455,23 +456,29 @@ module.exports.gitconfig = async ({ confirm }) => {
|
|
|
455
456
|
}
|
|
456
457
|
};
|
|
457
458
|
|
|
458
|
-
module.exports.
|
|
459
|
+
module.exports.globalModules = async ({ confirm }) => {
|
|
459
460
|
let inputs = confirm
|
|
460
461
|
? { confirm }
|
|
461
462
|
: await inquirer.prompt([
|
|
462
463
|
{
|
|
463
464
|
type: "confirm",
|
|
464
465
|
name: "confirm",
|
|
465
|
-
message: `Install required global dependencies? ${
|
|
466
|
+
message: `Install required global dependencies? ${globalModules.map((d) => `${d.package}@${d.version}`).join(", ")}`,
|
|
466
467
|
default: true,
|
|
467
468
|
},
|
|
468
469
|
]);
|
|
469
470
|
|
|
470
471
|
if (inputs.confirm) {
|
|
471
|
-
|
|
472
|
-
const { package, version } = global_modules[i];
|
|
472
|
+
let spinner;
|
|
473
473
|
|
|
474
|
-
|
|
474
|
+
for (let i = 0; i < globalModules.length; i++) {
|
|
475
|
+
const { package: packageName, version } = globalModules[i];
|
|
476
|
+
|
|
477
|
+
spinner = new Spinner(`Installing ${packageName}@${version}`);
|
|
478
|
+
|
|
479
|
+
execSync(`npm install -g ${packageName}@${version}`);
|
|
480
|
+
|
|
481
|
+
spinner.update(`Installed ${packageName}@${version}`);
|
|
475
482
|
}
|
|
476
483
|
} else {
|
|
477
484
|
throw "";
|
|
@@ -193,13 +193,13 @@ module.exports.watertight = async () => {
|
|
|
193
193
|
!(await new Promise((resolve, reject) =>
|
|
194
194
|
exec(
|
|
195
195
|
"git clone --bare git@bitbucket.org:fishawackdigital/watertight-node-auto ./.tmp/watertight-node-auto",
|
|
196
|
-
(error
|
|
196
|
+
(error) => (error ? reject(error) : resolve()),
|
|
197
197
|
),
|
|
198
198
|
));
|
|
199
199
|
|
|
200
200
|
spinner.update("Successfully accessed watertight-node-auto repository");
|
|
201
201
|
return true;
|
|
202
|
-
} catch
|
|
202
|
+
} catch {
|
|
203
203
|
spinner.update(
|
|
204
204
|
"Could not access watertight-node-auto repository",
|
|
205
205
|
"fail",
|
|
@@ -221,20 +221,20 @@ module.exports.gitconfig = async () => {
|
|
|
221
221
|
}
|
|
222
222
|
};
|
|
223
223
|
|
|
224
|
-
module.exports.
|
|
224
|
+
module.exports.globalModules = async () => {
|
|
225
225
|
// Get list of all globally installed node modules
|
|
226
226
|
let spinner = new utils.Spinner(
|
|
227
227
|
"Retrieving a list of all globally installed node_modules",
|
|
228
228
|
);
|
|
229
229
|
|
|
230
|
-
let
|
|
230
|
+
let globalModules;
|
|
231
231
|
|
|
232
232
|
try {
|
|
233
233
|
const stdout = execSync("npm ls -g --depth=0 --json", {
|
|
234
234
|
encoding: "utf8",
|
|
235
235
|
});
|
|
236
236
|
const data = JSON.parse(stdout);
|
|
237
|
-
|
|
237
|
+
globalModules = data.dependencies || {};
|
|
238
238
|
|
|
239
239
|
spinner.update("Global node_module list retrieved");
|
|
240
240
|
} catch (error) {
|
|
@@ -244,19 +244,21 @@ module.exports.global_modules = async () => {
|
|
|
244
244
|
);
|
|
245
245
|
}
|
|
246
246
|
|
|
247
|
-
for (let i = 0; i < vars.
|
|
248
|
-
const { package, version } = vars.
|
|
247
|
+
for (let i = 0; i < vars.globalModules.length; i++) {
|
|
248
|
+
const { package: packageName, version } = vars.globalModules[i];
|
|
249
249
|
|
|
250
250
|
spinner = new utils.Spinner(
|
|
251
|
-
`Checking ${
|
|
251
|
+
`Checking ${packageName}@${version} is installed`,
|
|
252
252
|
);
|
|
253
253
|
|
|
254
|
-
if (
|
|
254
|
+
if (
|
|
255
|
+
semver.satisfies(globalModules[packageName]?.version, `=${version}`)
|
|
256
|
+
) {
|
|
255
257
|
spinner.update(
|
|
256
|
-
`Package: ${
|
|
258
|
+
`Package: ${packageName}@${globalModules[packageName]?.version} found`,
|
|
257
259
|
);
|
|
258
260
|
} else {
|
|
259
|
-
spinner.update(`Could not find ${
|
|
261
|
+
spinner.update(`Could not find ${packageName}@${version}`, "fail");
|
|
260
262
|
return false;
|
|
261
263
|
}
|
|
262
264
|
}
|
package/commands/deploy.js
CHANGED
package/commands/docker/down.js
CHANGED
package/commands/docker/mocha.js
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
const _ = require("../../globals.js");
|
|
2
2
|
|
|
3
|
-
const execSync = require("child_process").execSync;
|
|
4
|
-
|
|
5
3
|
module.exports = [
|
|
6
4
|
"mocha",
|
|
7
5
|
false,
|
|
8
|
-
(
|
|
9
|
-
(
|
|
6
|
+
() => {},
|
|
7
|
+
() =>
|
|
10
8
|
_.command(
|
|
11
9
|
"core",
|
|
12
10
|
`${process.env.VERSION === "0" ? "xvfb-run " : ""}npm run mocha`,
|
package/commands/lint.js
CHANGED
|
@@ -3,12 +3,36 @@ const execSync = require("child_process").execSync;
|
|
|
3
3
|
const _ = require("../globals.js");
|
|
4
4
|
|
|
5
5
|
module.exports = [
|
|
6
|
-
"lint",
|
|
6
|
+
"lint [linters]",
|
|
7
7
|
"runs code style, javascript, scss & php linting",
|
|
8
|
-
(yargs) => {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
(yargs) => {
|
|
9
|
+
yargs.positional("linters", {
|
|
10
|
+
describe: "linters to run",
|
|
11
|
+
default: "js css php style",
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
yargs.option("fix", {
|
|
15
|
+
describe: "Attempt to fix issues",
|
|
16
|
+
type: "boolean",
|
|
17
|
+
});
|
|
18
|
+
},
|
|
19
|
+
(argv) => {
|
|
20
|
+
if (argv.linters.includes("style")) {
|
|
21
|
+
execSync(`prettier ${argv.fix ? "--write" : "--check"} .`, _.opts);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
if (argv.linters.includes("js")) {
|
|
25
|
+
execSync(
|
|
26
|
+
`eslint '**/*.{js,vue}' --no-error-on-unmatched-pattern${argv.fix ? " --fix" : ""}`,
|
|
27
|
+
_.opts,
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
if (argv.linters.includes("css")) {
|
|
32
|
+
execSync(
|
|
33
|
+
`stylelint '**/*.{scss,css}' --allow-empty-input${argv.fix ? " --fix" : ""}`,
|
|
34
|
+
_.opts,
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
},
|
|
14
38
|
];
|
package/commands/nuke.js
CHANGED
|
@@ -5,13 +5,15 @@ const execSync = require("child_process").execSync;
|
|
|
5
5
|
module.exports = [
|
|
6
6
|
"nuke",
|
|
7
7
|
"cleans out all files not tracked by git",
|
|
8
|
-
(
|
|
9
|
-
(
|
|
8
|
+
() => {},
|
|
9
|
+
() => {
|
|
10
10
|
execSync(`git clean -xfd`, _.opts);
|
|
11
11
|
|
|
12
12
|
// Remove all virtual volumes
|
|
13
13
|
try {
|
|
14
14
|
execSync(`docker volume rm ${_.volumes.join(" ")}`, _.opts);
|
|
15
|
-
} catch
|
|
15
|
+
} catch {
|
|
16
|
+
/* empty */
|
|
17
|
+
}
|
|
16
18
|
},
|
|
17
19
|
];
|
package/commands/origin.js
CHANGED
|
@@ -7,8 +7,8 @@ const chalk = require("chalk");
|
|
|
7
7
|
module.exports = [
|
|
8
8
|
"origin",
|
|
9
9
|
"add gitlab as a second remote",
|
|
10
|
-
(
|
|
11
|
-
(
|
|
10
|
+
() => {},
|
|
11
|
+
() => {
|
|
12
12
|
try {
|
|
13
13
|
let misc = require(
|
|
14
14
|
path.join(require("os").homedir(), "targets", "misc.json"),
|
|
@@ -43,7 +43,7 @@ module.exports = [
|
|
|
43
43
|
.replace(/[^\w ]+/g, "")
|
|
44
44
|
.replace(/ +/g, "-");
|
|
45
45
|
fullpath = `${group}/${_.repo}`;
|
|
46
|
-
} catch
|
|
46
|
+
} catch {
|
|
47
47
|
console.log(`Can't connect to ${url.bitbucket}`);
|
|
48
48
|
return;
|
|
49
49
|
}
|
package/commands/production.js
CHANGED
package/commands/regenerate.js
CHANGED
|
@@ -3,8 +3,8 @@ const _ = require("../globals.js");
|
|
|
3
3
|
module.exports = [
|
|
4
4
|
["regenerate", "regen"],
|
|
5
5
|
"regenerates dependency lock files",
|
|
6
|
-
(
|
|
7
|
-
(
|
|
6
|
+
() => {},
|
|
7
|
+
() => {
|
|
8
8
|
_.command(
|
|
9
9
|
"core",
|
|
10
10
|
`rm package-lock.json; git clean -xfd node_modules/ 2>/dev/null || true; npm install`,
|
package/commands/reinstall.js
CHANGED
package/commands/setup.js
CHANGED
package/commands/test.js
CHANGED
package/commands/watch.js
CHANGED