@fishawack/lab-env 5.5.0 → 5.6.1
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/CHANGELOG.md +36 -0
- package/cli.js +2 -2
- package/commands/content.js +1 -2
- package/commands/create/cmds/new.js +2 -3
- package/commands/create/cmds/provision.js +1 -2
- package/commands/create/libs/utilities.js +9 -0
- package/commands/create/libs/vars.js +1 -1
- package/commands/create/services/aws/iam.js +1 -1
- package/commands/create/services/bitbucket.js +6 -2
- package/commands/create/services/guide.js +8 -6
- package/commands/create/services/test.js +1 -1
- package/globals.js +1 -2
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,41 @@
|
|
|
1
1
|
## Changelog
|
|
2
2
|
|
|
3
|
+
### 5.6.1 (2026-06-03)
|
|
4
|
+
|
|
5
|
+
#### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* trigger release ([fe4907d](https://bitbucket.org/fishawackdigital/lab-env/commits/fe4907daabd6c670e9b970f475f1b6b032871ea5))
|
|
8
|
+
|
|
9
|
+
### 5.6.1-beta.1 (2026-06-03)
|
|
10
|
+
|
|
11
|
+
#### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* trigger release ([fe4907d](https://bitbucket.org/fishawackdigital/lab-env/commits/fe4907daabd6c670e9b970f475f1b6b032871ea5))
|
|
14
|
+
|
|
15
|
+
### 5.6.0 (2026-06-02)
|
|
16
|
+
|
|
17
|
+
#### Features
|
|
18
|
+
|
|
19
|
+
* copy to clipboard now cross platform and silent errors ([ba5b1e1](https://bitbucket.org/fishawackdigital/lab-env/commits/ba5b1e171a8cd902ad50c4a361516c18ba578e27))
|
|
20
|
+
|
|
21
|
+
#### Bug Fixes
|
|
22
|
+
|
|
23
|
+
* give rds access to deploy fullstack iam users ([e052363](https://bitbucket.org/fishawackdigital/lab-env/commits/e052363b8535530c3e065c42359d11682561f6db))
|
|
24
|
+
* lint now avaialble to devops ([31f57c6](https://bitbucket.org/fishawackdigital/lab-env/commits/31f57c6c12fd021b3a6e877aca9b37489180b4b0))
|
|
25
|
+
* switch to bitbucket api keys in place of retired app passwords ([dfc8c5c](https://bitbucket.org/fishawackdigital/lab-env/commits/dfc8c5c9c6d6740a5a625d42a91ec6ff8af56c2a))
|
|
26
|
+
|
|
27
|
+
### 5.6.0-beta.1 (2026-06-02)
|
|
28
|
+
|
|
29
|
+
#### Features
|
|
30
|
+
|
|
31
|
+
* copy to clipboard now cross platform and silent errors ([ba5b1e1](https://bitbucket.org/fishawackdigital/lab-env/commits/ba5b1e171a8cd902ad50c4a361516c18ba578e27))
|
|
32
|
+
|
|
33
|
+
#### Bug Fixes
|
|
34
|
+
|
|
35
|
+
* give rds access to deploy fullstack iam users ([e052363](https://bitbucket.org/fishawackdigital/lab-env/commits/e052363b8535530c3e065c42359d11682561f6db))
|
|
36
|
+
* lint now avaialble to devops ([31f57c6](https://bitbucket.org/fishawackdigital/lab-env/commits/31f57c6c12fd021b3a6e877aca9b37489180b4b0))
|
|
37
|
+
* switch to bitbucket api keys in place of retired app passwords ([dfc8c5c](https://bitbucket.org/fishawackdigital/lab-env/commits/dfc8c5c9c6d6740a5a625d42a91ec6ff8af56c2a))
|
|
38
|
+
|
|
3
39
|
### 5.5.0 (2026-04-29)
|
|
4
40
|
|
|
5
41
|
#### Features
|
package/cli.js
CHANGED
|
@@ -112,8 +112,8 @@ const args = hideBin(process.argv);
|
|
|
112
112
|
|
|
113
113
|
// Special handling for devops preset - only gets create commands and hidden docker commands
|
|
114
114
|
if (_.config.preset === "devops") {
|
|
115
|
-
// No platform or base commands for devops
|
|
116
|
-
commands = [];
|
|
115
|
+
// No platform or base commands for devops except for lint
|
|
116
|
+
commands = ["lint"];
|
|
117
117
|
} else {
|
|
118
118
|
// Normal command building for other presets
|
|
119
119
|
// Add command groups based on platform
|
package/commands/content.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
const execSync = require("child_process").execSync;
|
|
2
1
|
const fs = require("fs-extra");
|
|
3
2
|
const path = require("path");
|
|
4
3
|
const { isEqual } = require("lodash");
|
|
@@ -55,7 +54,7 @@ module.exports = [
|
|
|
55
54
|
null,
|
|
56
55
|
4,
|
|
57
56
|
);
|
|
58
|
-
|
|
57
|
+
utilities.copyToClipboard(stringify);
|
|
59
58
|
console.log(
|
|
60
59
|
utilities.colorize(
|
|
61
60
|
`\n${stringify}\n\n(copied to clipboard)`,
|
|
@@ -2,7 +2,6 @@ const prompts = require("../libs/prompts");
|
|
|
2
2
|
const utilities = require("../libs/utilities");
|
|
3
3
|
const vars = require("../libs/vars");
|
|
4
4
|
const bitbucket = require("../services/bitbucket");
|
|
5
|
-
const execSync = require("child_process").execSync;
|
|
6
5
|
|
|
7
6
|
module.exports = [
|
|
8
7
|
"new [name]",
|
|
@@ -47,8 +46,8 @@ module.exports = [
|
|
|
47
46
|
|
|
48
47
|
await bitbucket.enablePipelines(name);
|
|
49
48
|
|
|
50
|
-
|
|
51
|
-
`
|
|
49
|
+
utilities.copyToClipboard(
|
|
50
|
+
`git clone ${vars.urls.bitbucketSSH}/${name}`,
|
|
52
51
|
);
|
|
53
52
|
|
|
54
53
|
console.log(
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
const _ = require("../../../globals.js");
|
|
2
2
|
const utilities = require("../libs/utilities");
|
|
3
|
-
const execSync = require("child_process").execSync;
|
|
4
3
|
const inquirer = require("inquirer");
|
|
5
4
|
const aws = require("../services/aws/index.js");
|
|
6
5
|
const { setAWSClientDefaults } = require("../services/aws/misc.js");
|
|
@@ -358,7 +357,7 @@ module.exports = [
|
|
|
358
357
|
|
|
359
358
|
let stringify = JSON.stringify(config, null, 4);
|
|
360
359
|
let output = stringify.substring(1, stringify.length - 1).trim();
|
|
361
|
-
|
|
360
|
+
utilities.copyToClipboard(output);
|
|
362
361
|
console.log(
|
|
363
362
|
utilities.colorize(`\n${output}\n\n(copied to clipboard)`, "title"),
|
|
364
363
|
);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
const chalk = require("chalk");
|
|
2
2
|
const ora = require("ora");
|
|
3
3
|
const crypto = require("crypto");
|
|
4
|
+
const clipboardy = require("clipboardy");
|
|
4
5
|
|
|
5
6
|
// Text
|
|
6
7
|
module.exports.capitalize = (str) => str.charAt(0).toUpperCase() + str.slice(1);
|
|
@@ -135,6 +136,14 @@ module.exports.nameSafe = (name, service = "s3") => {
|
|
|
135
136
|
return safe;
|
|
136
137
|
};
|
|
137
138
|
|
|
139
|
+
module.exports.copyToClipboard = (text) => {
|
|
140
|
+
try {
|
|
141
|
+
clipboardy.writeSync(text);
|
|
142
|
+
} catch {
|
|
143
|
+
// Silently skip if clipboard is unavailable (e.g. Linux without xclip/xsel)
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
|
|
138
147
|
module.exports.poll = async (cb, resolve, reject) => {
|
|
139
148
|
let res;
|
|
140
149
|
|
|
@@ -78,7 +78,7 @@ module.exports.urls = {
|
|
|
78
78
|
|
|
79
79
|
// Request Headers
|
|
80
80
|
module.exports.headers = {
|
|
81
|
-
bbHeaders: encode(misc.bitbucket.username, misc.bitbucket.
|
|
81
|
+
bbHeaders: encode(misc.bitbucket.username, misc.bitbucket.token),
|
|
82
82
|
};
|
|
83
83
|
|
|
84
84
|
// Required global node modules
|
|
@@ -140,7 +140,7 @@ module.exports.syncFWIAMPolicies = async (
|
|
|
140
140
|
|
|
141
141
|
await module.exports.attachIAMPolicy(
|
|
142
142
|
UserName,
|
|
143
|
-
"arn:aws:iam::aws:policy/
|
|
143
|
+
"arn:aws:iam::aws:policy/AmazonRDSFullAccess",
|
|
144
144
|
);
|
|
145
145
|
|
|
146
146
|
await module.exports.attachIAMPolicy(
|
|
@@ -18,9 +18,13 @@ module.exports.check = async () => {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
return true;
|
|
21
|
-
} catch {
|
|
21
|
+
} catch (e) {
|
|
22
|
+
const detail = e.response?.data?.error
|
|
23
|
+
? `${e.response.status}: ${e.response.data.error.message}${e.response.data.error.detail?.required ? ` (required scopes: ${e.response.data.error.detail.required.join(", ")})` : ""}`
|
|
24
|
+
: e.message;
|
|
25
|
+
|
|
22
26
|
spinner.update(
|
|
23
|
-
`Failed to communicate with ${misc.bitbucket.workspace} on Bitbucket
|
|
27
|
+
`Failed to communicate with ${misc.bitbucket.workspace} on Bitbucket. ${detail}`,
|
|
24
28
|
"fail",
|
|
25
29
|
);
|
|
26
30
|
|
|
@@ -74,7 +74,8 @@ module.exports.bitbucket = async ({ confirm }) => {
|
|
|
74
74
|
{
|
|
75
75
|
type: "input",
|
|
76
76
|
name: "username",
|
|
77
|
-
message:
|
|
77
|
+
message:
|
|
78
|
+
"What is your Atlassian email? (e.g. mike.mellor@avalerehealth.com)",
|
|
78
79
|
default: credsMisc.bitbucket && credsMisc.bitbucket.username,
|
|
79
80
|
validate: (input) =>
|
|
80
81
|
input.trim().length > 0 ||
|
|
@@ -82,12 +83,13 @@ module.exports.bitbucket = async ({ confirm }) => {
|
|
|
82
83
|
},
|
|
83
84
|
{
|
|
84
85
|
type: "password",
|
|
85
|
-
name: "
|
|
86
|
-
default: credsMisc.bitbucket && credsMisc.bitbucket.
|
|
87
|
-
message:
|
|
86
|
+
name: "token",
|
|
87
|
+
default: credsMisc.bitbucket && credsMisc.bitbucket.token,
|
|
88
|
+
message:
|
|
89
|
+
"What is your Bitbucket API token? (create one at https://id.atlassian.com/manage-profile/security/api-tokens). Required scopes {admin,delete,raed,write}:repository:bitbucket",
|
|
88
90
|
validate: (input) =>
|
|
89
91
|
input.trim().length > 0 ||
|
|
90
|
-
"
|
|
92
|
+
"Token cannot be an empty string",
|
|
91
93
|
},
|
|
92
94
|
{
|
|
93
95
|
type: "input",
|
|
@@ -105,7 +107,7 @@ module.exports.bitbucket = async ({ confirm }) => {
|
|
|
105
107
|
|
|
106
108
|
credsMisc.bitbucket = file.bitbucket = { ...inputs };
|
|
107
109
|
apis.bbWorkspaceAPI = `${bitbucketApi}/${inputs.workspace}`;
|
|
108
|
-
headers.bbHeaders = encode(inputs.username, inputs.
|
|
110
|
+
headers.bbHeaders = encode(inputs.username, inputs.token);
|
|
109
111
|
urls.bitbucketSSH = `git@bitbucket.org:${inputs.workspace}`;
|
|
110
112
|
|
|
111
113
|
writeFileSync(
|
package/globals.js
CHANGED
|
@@ -129,7 +129,7 @@ var services;
|
|
|
129
129
|
var branch;
|
|
130
130
|
var remote;
|
|
131
131
|
let vscodeSettings = {};
|
|
132
|
-
var diagnosis = "
|
|
132
|
+
var diagnosis = "5.0.0";
|
|
133
133
|
var opts = { encoding: "utf8", stdio: "inherit", shell: "/bin/bash" };
|
|
134
134
|
const users = {
|
|
135
135
|
core: "node",
|
|
@@ -712,7 +712,6 @@ if (
|
|
|
712
712
|
args[0] !== "origin" &&
|
|
713
713
|
args[0] !== "--version" &&
|
|
714
714
|
args[0] !== "--help" &&
|
|
715
|
-
args[0] !== "new" &&
|
|
716
715
|
args[0] !== "key" &&
|
|
717
716
|
args[0] !== "dekey" &&
|
|
718
717
|
args[0] !== "lint" &&
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fishawack/lab-env",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.6.1",
|
|
4
4
|
"description": "Docker manager for FW",
|
|
5
5
|
"main": "cli.js",
|
|
6
6
|
"scripts": {
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"apache-md5": "^1.1.8",
|
|
31
31
|
"axios": "^0.21.4",
|
|
32
32
|
"chalk": "4.1.0",
|
|
33
|
+
"clipboardy": "^2.3.0",
|
|
33
34
|
"dotenv": "^17.2.3",
|
|
34
35
|
"form-data": "^4.0.4",
|
|
35
36
|
"fs-extra": "^11.1.1",
|