@fishawack/lab-env 5.7.0-beta.6 → 5.7.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/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  ## Changelog
2
2
 
3
+ ### 5.7.0-beta.8 (2026-07-08)
4
+
5
+ #### Bug Fixes
6
+
7
+ * added restart queue to config post deploy ([397a138](https://bitbucket.org/fishawackdigital/lab-env/commits/397a138c46d45e4e437820f0e14e574bda19ea74))
8
+ * fail deprov if env goes back to ready ([e3dc73f](https://bitbucket.org/fishawackdigital/lab-env/commits/e3dc73fb21cc0a9d5f356d0f9c1d88d08cfdf13b))
9
+ * handle double hypen name safe values to always enforce only a single ([4a18dde](https://bitbucket.org/fishawackdigital/lab-env/commits/4a18dde460d49e5034f5952977c5fa5727d02126))
10
+ * increase timeout on test suits before call ([a0a31c8](https://bitbucket.org/fishawackdigital/lab-env/commits/a0a31c89e7d548a13e0f0ecdf1c591a1e2463506))
11
+ * moved setvars config update to prebuild for consistency ([64483d0](https://bitbucket.org/fishawackdigital/lab-env/commits/64483d0473f2c3f449a55f0f6fe6ee1e565c12a9))
12
+ * simpler queue worker ([4ecc62d](https://bitbucket.org/fishawackdigital/lab-env/commits/4ecc62df734c9aabdbaec1db6ea87c80169128b3))
13
+
14
+ ### 5.7.0-beta.7 (2026-07-03)
15
+
16
+ #### Bug Fixes
17
+
18
+ * added more places where rekey can bypass without project ([44e8ca4](https://bitbucket.org/fishawackdigital/lab-env/commits/44e8ca4ec2a1199d96e857338516628d51cb7e1d))
19
+ * remove boilerplate-vue as option now its deprecated ([e8c097a](https://bitbucket.org/fishawackdigital/lab-env/commits/e8c097af21260c127defb90bb85c0eed224f35c2))
20
+ * rotate email creds before operator iam permissions ([a4f510e](https://bitbucket.org/fishawackdigital/lab-env/commits/a4f510e916912dd199d03e4fde984c4abbb8d931))
21
+
3
22
  ### 5.7.0-beta.6 (2026-07-03)
4
23
 
5
24
  #### Features
@@ -12,7 +12,7 @@ const execSync = require("child_process").execSync;
12
12
 
13
13
  describe("deploy", () => {
14
14
  before(function () {
15
- this.timeout(60000 * 10);
15
+ this.timeout(60000 * 20);
16
16
 
17
17
  execSync(
18
18
  `git -C _Test/_fixtures clone git@bitbucket.org:fishawackdigital/${repo}`,
@@ -12,7 +12,7 @@ const execSync = require("child_process").execSync;
12
12
 
13
13
  describe("deploy", () => {
14
14
  before(function () {
15
- this.timeout(60000 * 10);
15
+ this.timeout(60000 * 20);
16
16
 
17
17
  execSync(
18
18
  `git -C _Test/_fixtures clone git@bitbucket.org:fishawackdigital/${repo}`,
@@ -12,7 +12,7 @@ const execSync = require("child_process").execSync;
12
12
 
13
13
  describe("deploy", () => {
14
14
  before(function () {
15
- this.timeout(60000 * 10);
15
+ this.timeout(60000 * 20);
16
16
 
17
17
  execSync(
18
18
  `git -C _Test/_fixtures clone git@bitbucket.org:fishawackdigital/${repo}`,
@@ -12,7 +12,7 @@ const execSync = require("child_process").execSync;
12
12
 
13
13
  describe("deploy", () => {
14
14
  before(function () {
15
- this.timeout(60000 * 10);
15
+ this.timeout(60000 * 20);
16
16
 
17
17
  execSync(
18
18
  `git -C _Test/_fixtures clone git@bitbucket.org:fishawackdigital/${repo}`,
@@ -12,7 +12,7 @@ const execSync = require("child_process").execSync;
12
12
 
13
13
  describe("deploy", () => {
14
14
  before(function () {
15
- this.timeout(60000 * 10);
15
+ this.timeout(60000 * 20);
16
16
 
17
17
  execSync(
18
18
  `git -C _Test/_fixtures clone git@bitbucket.org:fishawackdigital/${repo}`,
@@ -12,7 +12,7 @@ const execSync = require("child_process").execSync;
12
12
 
13
13
  describe("deploy", () => {
14
14
  before(function () {
15
- this.timeout(60000 * 10);
15
+ this.timeout(60000 * 20);
16
16
 
17
17
  execSync(
18
18
  `git -C _Test/_fixtures clone git@bitbucket.org:fishawackdigital/${repo}`,
@@ -12,7 +12,7 @@ const execSync = require("child_process").execSync;
12
12
 
13
13
  describe("deploy", () => {
14
14
  before(function () {
15
- this.timeout(60000 * 10);
15
+ this.timeout(60000 * 20);
16
16
 
17
17
  execSync(
18
18
  `git -C _Test/_fixtures clone git@bitbucket.org:fishawackdigital/${repo}`,
@@ -226,6 +226,26 @@ module.exports = [
226
226
  }
227
227
  }
228
228
 
229
+ // Rotate SES email credentials BEFORE rotating the operator's AWS key.
230
+ // The SES client uses fromIni({ profile: 'fishawack' }) which reads the
231
+ // operator's key from ~/.aws/credentials — once that key is rotated below
232
+ // the profile becomes stale and the SES call would fail.
233
+ if (misc.nodemailer?.AWSSES?.username) {
234
+ try {
235
+ const creds = await aws.ses.rotateOperatorSESCredentials(
236
+ operator.username,
237
+ );
238
+ aws.ses.updateMiscNodemailer(creds);
239
+ console.log(
240
+ "\n \u2713 SES email credentials rotated and saved to misc.json\n",
241
+ );
242
+ } catch (err) {
243
+ console.log(
244
+ `\n \u26a0 Failed to rotate SES credentials: ${err.message}\n`,
245
+ );
246
+ }
247
+ }
248
+
229
249
  // Process operator sequentially — must be last per account
230
250
  if (includeOperator) {
231
251
  const operatorBatches = clients.map((client) => ({
@@ -258,23 +278,6 @@ module.exports = [
258
278
  }
259
279
  }
260
280
 
261
- // Rotate SES email credentials (after operator keys so fishawack creds are still valid)
262
- if (misc.nodemailer?.AWSSES?.username) {
263
- try {
264
- const creds = await aws.ses.rotateOperatorSESCredentials(
265
- operator.username,
266
- );
267
- aws.ses.updateMiscNodemailer(creds);
268
- console.log(
269
- "\n \u2713 SES email credentials rotated and saved to misc.json\n",
270
- );
271
- } catch (err) {
272
- console.log(
273
- `\n \u26a0 Failed to rotate SES credentials: ${err.message}\n`,
274
- );
275
- }
276
- }
277
-
278
281
  await outputCredentials(credentials, sendEmail);
279
282
  },
280
283
  ];
@@ -142,12 +142,14 @@ module.exports.nameSafe = (name, service = "s3") => {
142
142
 
143
143
  safe = safe.substring(0, maxLength - suffix.length - prefix.length);
144
144
  safe = safe.replace(/[^a-zA-Z0-9-_. ]/g, ""); // Remove special chars except . _ - as these are all transformed into -
145
+ safe = safe.replace(/-+$/, ""); // Strip trailing hyphens before suffix is appended
145
146
  safe = safe.toLowerCase();
146
147
  safe = `${prefix}${safe}`;
147
148
  safe = `${safe}${suffix}`;
148
149
  safe = safe.replace(/\./g, "-");
149
150
  // eslint-disable-next-line no-useless-escape
150
151
  safe = safe.replace(/\_/g, "-");
152
+ safe = safe.replace(/--+/g, "-"); // Collapse any consecutive hyphens
151
153
 
152
154
  return safe;
153
155
  };
@@ -114,10 +114,6 @@ module.exports.templates = [
114
114
  name: "boilerplate",
115
115
  type: "boilerplate",
116
116
  },
117
- {
118
- name: "boilerplate-vue",
119
- type: "boilerplate",
120
- },
121
117
  {
122
118
  name: "boilerplate-wordpress",
123
119
  type: "boilerplate",
@@ -588,6 +584,7 @@ module.exports.eb = {
588
584
  ".ebextensions/laravel/rds-ssl.config",
589
585
  ".ebextensions/laravel/software.config",
590
586
  ".platform/hooks/postdeploy/restart_queue.sh",
587
+ ".platform/confighooks/postdeploy/restart_queue.sh",
591
588
  ],
592
589
  },
593
590
  adonis: {
@@ -610,7 +607,7 @@ module.exports.eb = {
610
607
  },
611
608
  shared: [
612
609
  ".platform/hooks/prebuild/setvars.sh",
613
- ".platform/confighooks/postdeploy/setvars.sh",
610
+ ".platform/confighooks/prebuild/setvars.sh",
614
611
  ".ebextensions/misc/asg-self-healing.config",
615
612
  ".ebextensions/misc/alb-http-to-https-redirection.config",
616
613
  ".ebextensions/misc/enable-https-lb.config",
@@ -186,6 +186,7 @@ module.exports.removeElasticBeanstalkEnvironment = async (name) => {
186
186
  return module.exports.waitForElasticBeanstalkEnvironment(
187
187
  name,
188
188
  "Terminated",
189
+ "Ready",
189
190
  );
190
191
  },
191
192
  );
@@ -265,7 +266,7 @@ module.exports.copyElasticBeanstalkConfigs = async (configurations, branch) => {
265
266
  }
266
267
  }
267
268
 
268
- fs.outputFileSync(checksumPath, JSON.stringify(checksums, null, 2));
269
+ fs.outputFileSync(checksumPath, JSON.stringify(checksums, null, 4) + "\n");
269
270
 
270
271
  fs.outputFileSync(
271
272
  `_IaC/${branch}/.elasticbeanstalk/config.yml`,
@@ -1617,7 +1617,10 @@ module.exports.fullstackTerminate = async (
1617
1617
  );
1618
1618
  return res.DBInstances[0];
1619
1619
  } catch (e) {
1620
- if (e.name === "DBInstanceNotFoundFault") {
1620
+ if (
1621
+ e.name === "DBInstanceNotFoundFault" ||
1622
+ e.name === "InvalidParameterValue"
1623
+ ) {
1621
1624
  return { DBInstanceStatus: "deleted" };
1622
1625
  }
1623
1626
  throw e;
@@ -1640,7 +1643,10 @@ module.exports.fullstackTerminate = async (
1640
1643
  );
1641
1644
  return DomainStatus;
1642
1645
  } catch (e) {
1643
- if (e.name === "ResourceNotFoundException") {
1646
+ if (
1647
+ e.name === "ResourceNotFoundException" ||
1648
+ e.name === "ValidationException"
1649
+ ) {
1644
1650
  return { deleted: true };
1645
1651
  }
1646
1652
  throw e;
@@ -1664,7 +1670,10 @@ module.exports.fullstackTerminate = async (
1664
1670
  );
1665
1671
  return ReplicationGroups[0];
1666
1672
  } catch (e) {
1667
- if (e.name === "ReplicationGroupNotFoundFault") {
1673
+ if (
1674
+ e.name === "ReplicationGroupNotFoundFault" ||
1675
+ e.name === "InvalidParameterValue"
1676
+ ) {
1668
1677
  return { deleted: true };
1669
1678
  }
1670
1679
  throw e;
@@ -13,7 +13,7 @@ files:
13
13
  Group=webapp
14
14
  WorkingDirectory=/var/app/current
15
15
  EnvironmentFile=/etc/sysconfig/env
16
- ExecStart=/usr/bin/php /var/app/current/artisan queue:work database --queue=streaming,default --timeout=620 --tries=1
16
+ ExecStart=/usr/bin/php /var/app/current/artisan queue:work --timeout=620 --tries=1
17
17
  Restart=always
18
18
  RestartSec=5
19
19
  StandardOutput=append:/var/log/queue-worker.log
@@ -0,0 +1,4 @@
1
+ #!/bin/bash
2
+ set -e
3
+
4
+ systemctl restart queue-worker
package/globals.js CHANGED
@@ -233,6 +233,7 @@ if (composer && composer.require && composer.require["laravel/framework"]) {
233
233
  args[0] !== "new" &&
234
234
  args[0] !== "key" &&
235
235
  args[0] !== "dekey" &&
236
+ args[0] !== "rekey" &&
236
237
  args[0] !== "lint" &&
237
238
  args[0] !== "workspace" &&
238
239
  args[0] !== "prune"
@@ -355,6 +356,7 @@ if (process.env.FW_NEXT || forced) {
355
356
  args[0] !== "new" &&
356
357
  args[0] !== "key" &&
357
358
  args[0] !== "dekey" &&
359
+ args[0] !== "rekey" &&
358
360
  args[0] !== "lint" &&
359
361
  args[0] !== "workspace" &&
360
362
  args[0] !== "prune"
@@ -715,6 +717,7 @@ if (
715
717
  args[0] !== "--help" &&
716
718
  args[0] !== "key" &&
717
719
  args[0] !== "dekey" &&
720
+ args[0] !== "rekey" &&
718
721
  args[0] !== "lint" &&
719
722
  args[0] !== "workspace" &&
720
723
  args[0] !== "prune"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fishawack/lab-env",
3
- "version": "5.7.0-beta.6",
3
+ "version": "5.7.0-beta.8",
4
4
  "description": "Docker manager for FW",
5
5
  "main": "cli.js",
6
6
  "scripts": {