@fishawack/lab-env 5.0.6 → 5.1.0-beta.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 CHANGED
@@ -1,5 +1,17 @@
1
1
  ## Changelog
2
2
 
3
+ ### 5.1.0-beta.1 (2025-12-23)
4
+
5
+ #### Features
6
+
7
+ * added mysql as a command line tool for artisan schema dump imports ([bfcb74c](https://bitbucket.org/fishawackdigital/lab-env/commits/bfcb74c2a6d1556a4e37adad2139ad313cf2a3c6))
8
+
9
+ #### Bug Fixes
10
+
11
+ * added es to fullstack deployment permissions for opensearch admin ([9d5bad4](https://bitbucket.org/fishawackdigital/lab-env/commits/9d5bad4dbbb96da0c4c25ec1cc6ee4737acb03d2))
12
+ * get all on config endpoint pulls ([3946a5d](https://bitbucket.org/fishawackdigital/lab-env/commits/3946a5d3271ed058f9d7dee37160f4270422605a))
13
+ * wordpress satls and keys now have leading letter to avoid issues with quotes ([56546c5](https://bitbucket.org/fishawackdigital/lab-env/commits/56546c5de9f3a6e7bbc2613831efad145ad33740))
14
+
3
15
  ### 5.0.6 (2025-11-07)
4
16
 
5
17
  #### Bug Fixes
@@ -5,6 +5,17 @@ const fs = require("fs");
5
5
  const generator = require("generate-password");
6
6
  const { template } = require("lodash");
7
7
 
8
+ // Helper to generate password that always starts with a letter
9
+ const generateSafeKey = (options) => {
10
+ let password;
11
+ // Regenerate if it doesn't start with a letter
12
+ do {
13
+ password = generator.generate(options);
14
+ } while (!/^[a-zA-Z]/.test(password));
15
+
16
+ return password;
17
+ };
18
+
8
19
  var miscFile;
9
20
 
10
21
  try {
@@ -255,7 +266,7 @@ module.exports.eb = {
255
266
  shared: [
256
267
  {
257
268
  OptionName: "AUTH_KEY",
258
- Value: generator.generate({
269
+ Value: generateSafeKey({
259
270
  length: 64,
260
271
  numbers: true,
261
272
  symbols: true,
@@ -264,7 +275,7 @@ module.exports.eb = {
264
275
  },
265
276
  {
266
277
  OptionName: "SECURE_AUTH_KEY",
267
- Value: generator.generate({
278
+ Value: generateSafeKey({
268
279
  length: 64,
269
280
  numbers: true,
270
281
  symbols: true,
@@ -273,7 +284,7 @@ module.exports.eb = {
273
284
  },
274
285
  {
275
286
  OptionName: "LOGGED_IN_KEY",
276
- Value: generator.generate({
287
+ Value: generateSafeKey({
277
288
  length: 64,
278
289
  numbers: true,
279
290
  symbols: true,
@@ -282,7 +293,7 @@ module.exports.eb = {
282
293
  },
283
294
  {
284
295
  OptionName: "NONCE_KEY",
285
- Value: generator.generate({
296
+ Value: generateSafeKey({
286
297
  length: 64,
287
298
  numbers: true,
288
299
  symbols: true,
@@ -291,7 +302,7 @@ module.exports.eb = {
291
302
  },
292
303
  {
293
304
  OptionName: "AUTH_SALT",
294
- Value: generator.generate({
305
+ Value: generateSafeKey({
295
306
  length: 64,
296
307
  numbers: true,
297
308
  symbols: true,
@@ -300,7 +311,7 @@ module.exports.eb = {
300
311
  },
301
312
  {
302
313
  OptionName: "SECURE_AUTH_SALT",
303
- Value: generator.generate({
314
+ Value: generateSafeKey({
304
315
  length: 64,
305
316
  numbers: true,
306
317
  symbols: true,
@@ -309,7 +320,7 @@ module.exports.eb = {
309
320
  },
310
321
  {
311
322
  OptionName: "LOGGED_IN_SALT",
312
- Value: generator.generate({
323
+ Value: generateSafeKey({
313
324
  length: 64,
314
325
  numbers: true,
315
326
  symbols: true,
@@ -318,7 +329,7 @@ module.exports.eb = {
318
329
  },
319
330
  {
320
331
  OptionName: "NONCE_SALT",
321
- Value: generator.generate({
332
+ Value: generateSafeKey({
322
333
  length: 64,
323
334
  numbers: true,
324
335
  symbols: true,
@@ -135,6 +135,12 @@ module.exports.syncFWIAMPolicies = async (
135
135
  account,
136
136
  "arn:aws:iam::aws:policy/AdministratorAccess-AWSElasticBeanstalk",
137
137
  );
138
+
139
+ await module.exports.attachIAMPolicy(
140
+ UserName,
141
+ account,
142
+ "arn:aws:iam::aws:policy/AmazonOpenSearchServiceFullAccess",
143
+ );
138
144
  }
139
145
 
140
146
  if (permissions.includes("manage-users")) {
@@ -10,3 +10,4 @@ commands:
10
10
  packages:
11
11
  yum:
12
12
  jq: []
13
+ mariadb105: []
package/hub.js CHANGED
@@ -18,6 +18,34 @@ const axios = require("axios").create({
18
18
  maxBodyLength: Infinity,
19
19
  });
20
20
 
21
+ // Pull all paginated data
22
+ axios.getAll = (url, options = {}) => {
23
+ // eslint-disable-next-line no-async-promise-executor
24
+ return new Promise(async (resolve, reject) => {
25
+ try {
26
+ const arr = { data: { data: [] } };
27
+ let page = 0;
28
+
29
+ while (true) {
30
+ const res = await axios.get(
31
+ `${url}${url.includes("?") ? "&" : "?"}page=${++page}`,
32
+ options,
33
+ );
34
+ arr.data.data = arr.data.data.concat(res.data.data);
35
+ if (
36
+ res.data.next_page_url === null ||
37
+ (res.data.links && res.data.links.next === null)
38
+ )
39
+ break;
40
+ }
41
+
42
+ resolve(arr);
43
+ } catch (e) {
44
+ reject(e);
45
+ }
46
+ });
47
+ };
48
+
21
49
  const baseUrl = process.env.HUB_URL;
22
50
  const headers = {
23
51
  headers: {
@@ -134,7 +162,7 @@ module.exports = {
134
162
  async getConfigurations(repositoryId) {
135
163
  try {
136
164
  return (
137
- await axios.get(`${baseUrl}/api/services/configurations`, {
165
+ await axios.getAll(`${baseUrl}/api/services/configurations`, {
138
166
  ...headers,
139
167
  ...{
140
168
  params: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fishawack/lab-env",
3
- "version": "5.0.6",
3
+ "version": "5.1.0-beta.1",
4
4
  "description": "Docker manager for FW",
5
5
  "main": "cli.js",
6
6
  "scripts": {