@fishawack/lab-env 4.45.0-beta.4 → 4.45.0

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,61 @@
1
1
  ## Changelog
2
2
 
3
+ ### 4.45.0 (2025-09-04)
4
+
5
+ #### Features
6
+
7
+ * addded more python compatible commands ([b4940ea](https://bitbucket.org/fishawackdigital/lab-env/commits/b4940eaa29c58138f6ff952773da0925e64fcab7))
8
+ * added a manage users permission ([e59b21a](https://bitbucket.org/fishawackdigital/lab-env/commits/e59b21a3c3d307aae3430cce676d8f20ed936525))
9
+ * added besins client ([58bcc77](https://bitbucket.org/fishawackdigital/lab-env/commits/58bcc771fe28029e92e63be315292605974c747a))
10
+ * added custom python setup and start commands ([6ca192f](https://bitbucket.org/fishawackdigital/lab-env/commits/6ca192f92bf1044b52aaa1e890a13be68d9cb366))
11
+ * added devops preset ([46f43c5](https://bitbucket.org/fishawackdigital/lab-env/commits/46f43c5f7c0648112edb3ff20439626fd6a69077))
12
+ * added devops specific commands ([21daf7a](https://bitbucket.org/fishawackdigital/lab-env/commits/21daf7a8dfb9cde0ed88b2a943c6753ef1ea003f))
13
+ * added mcp instructions file ([3f27ac9](https://bitbucket.org/fishawackdigital/lab-env/commits/3f27ac954f440edae1c96439c2f46f1c277ee3c0))
14
+ * added new clients ([872332e](https://bitbucket.org/fishawackdigital/lab-env/commits/872332e5303b22a6f44102c724b824422418710b))
15
+ * added python instructions file ([4ba1c77](https://bitbucket.org/fishawackdigital/lab-env/commits/4ba1c7717e8e41414758d1e77bab6fc891553763))
16
+ * added sass instructions file ([563b7ee](https://bitbucket.org/fishawackdigital/lab-env/commits/563b7eebdcfac1904507930b053846fa575bf038))
17
+ * added workspace command ([a6ad364](https://bitbucket.org/fishawackdigital/lab-env/commits/a6ad364d8846e34394318d4f908b0b2b769ea9ee))
18
+ * added workspace instructions file ([1838c42](https://bitbucket.org/fishawackdigital/lab-env/commits/1838c42c979c0ad2a0b59f45db9876050ccc2b04))
19
+ * allow users to pass name and error if already exists ([071d836](https://bitbucket.org/fishawackdigital/lab-env/commits/071d836402cbc595496054fcb3e6d99798f2ff67))
20
+ * better errors when mismatching versions found ([d3c0c75](https://bitbucket.org/fishawackdigital/lab-env/commits/d3c0c753d919f383d0262c4d3221d179b19f9fa3))
21
+ * copy ai file now has cwd param ([e91f2a5](https://bitbucket.org/fishawackdigital/lab-env/commits/e91f2a53243b8fb424f2ab0abba0946cfefadbb7))
22
+ * copy python ai files ([def8212](https://bitbucket.org/fishawackdigital/lab-env/commits/def8212f7151a6714a76e5096c7c41c1cf55908f))
23
+ * copy the lab-env ai file into projects ([c217274](https://bitbucket.org/fishawackdigital/lab-env/commits/c2172745ebef906536d12347c051c4e3d38f663d))
24
+ * implement ui framework ai file ([17a7bda](https://bitbucket.org/fishawackdigital/lab-env/commits/17a7bda861bd14cb67e11e92079de809853ef242))
25
+ * improved laravel ai docs ([076bd4d](https://bitbucket.org/fishawackdigital/lab-env/commits/076bd4d6d99ad58ca68b117b8d0425e3ada72cb3))
26
+ * split lab-env into standalone ai file ([4f84fd9](https://bitbucket.org/fishawackdigital/lab-env/commits/4f84fd9999e571b67d313511f00f5bee310ac24b))
27
+ * support python builds ([10f9929](https://bitbucket.org/fishawackdigital/lab-env/commits/10f99291306f060e720ad2e2ccf536ecda12a53c))
28
+ * two new commands for pip and python ([658191a](https://bitbucket.org/fishawackdigital/lab-env/commits/658191a4dfeba7459d4513a875b9511fb5f1e5ee))
29
+ * updated vue instructions to have style specifics ([695713a](https://bitbucket.org/fishawackdigital/lab-env/commits/695713a8b2bf61908fb05c331f8b47e7196d2f2d))
30
+ * updates to lab-env config ([de73808](https://bitbucket.org/fishawackdigital/lab-env/commits/de73808cf13283ad469161c27937671de14ffcdb))
31
+ * workspace command now creates a workspace ai file and mcp file ([271f9b4](https://bitbucket.org/fishawackdigital/lab-env/commits/271f9b4677a58f41e428a9d2fb95d90be9319d23))
32
+ * workspace now creats workspace and opens ([fb40e8b](https://bitbucket.org/fishawackdigital/lab-env/commits/fb40e8bcb34669c5858ed4877218c0c8ca32a3ff))
33
+
34
+ #### Bug Fixes
35
+
36
+ * added apply to to lab env ai file ([e82f875](https://bitbucket.org/fishawackdigital/lab-env/commits/e82f87543f0cc3add465b414b393a50b595e95c1))
37
+ * added more context around query binding ([4cfd427](https://bitbucket.org/fishawackdigital/lab-env/commits/4cfd42737fa9b19d5b24e28e9219bbae629c5b32))
38
+ * added note about resources being _Build/sass on static projects ([1b66bb2](https://bitbucket.org/fishawackdigital/lab-env/commits/1b66bb2f206cde8847f9859581b1c87603d161d8))
39
+ * beta branch now installs submodules ([9f78f63](https://bitbucket.org/fishawackdigital/lab-env/commits/9f78f63830562e0e3a0f797a888b0d97465165d0))
40
+ * copy sass instructions on core projects ([70ad3a8](https://bitbucket.org/fishawackdigital/lab-env/commits/70ad3a8d8dfd48c3d208541696619740d8973dfb))
41
+ * dont attempt to remove volumes if there aren't any ([ac9f621](https://bitbucket.org/fishawackdigital/lab-env/commits/ac9f62133f47b1e4971524fc75e8ae94ba32d4ba))
42
+ * fixed no cache flag ([d1f3f9a](https://bitbucket.org/fishawackdigital/lab-env/commits/d1f3f9a329177f2431be802897d37bfdf3df5b1e))
43
+ * ignore .venv from linting checks ([e49fa69](https://bitbucket.org/fishawackdigital/lab-env/commits/e49fa698397ba2287def174ad3b2a5608b7a393b))
44
+ * python now uses uv and implements test command ([b81b8d7](https://bitbucket.org/fishawackdigital/lab-env/commits/b81b8d7c47a6e2fe7437ed930f18e3f54e800fc7))
45
+ * renamed files to correct extension ([a54bd0b](https://bitbucket.org/fishawackdigital/lab-env/commits/a54bd0bb59030e20c2e3b35dfbe9aa7b01106103))
46
+ * support no core in python projects ([2882070](https://bitbucket.org/fishawackdigital/lab-env/commits/2882070c34546daf1d261f708a63687dcc303dfc))
47
+ * support python in execute command ([619deea](https://bitbucket.org/fishawackdigital/lab-env/commits/619deea45eac08d41076b70c505fdaf043e5c7c1))
48
+ * switch connect default to python for those projects ([d481960](https://bitbucket.org/fishawackdigital/lab-env/commits/d481960f1a836f5841dcf79ec5f90819eacae212))
49
+ * use @ instead of * in wildcard insructions files ([2176ad8](https://bitbucket.org/fishawackdigital/lab-env/commits/2176ad8cf6702c5ca52eccbee5637bfc9bf0bdbb))
50
+ * use php 8.2 for new php environments ([d2a180e](https://bitbucket.org/fishawackdigital/lab-env/commits/d2a180ebcbf679d49b598f22b6587b3e28327b2a))
51
+
52
+ ### 4.45.0-beta.5 (2025-09-04)
53
+
54
+ #### Features
55
+
56
+ * addded more python compatible commands ([b4940ea](https://bitbucket.org/fishawackdigital/lab-env/commits/b4940eaa29c58138f6ff952773da0925e64fcab7))
57
+ * better errors when mismatching versions found ([d3c0c75](https://bitbucket.org/fishawackdigital/lab-env/commits/d3c0c753d919f383d0262c4d3221d179b19f9fa3))
58
+
3
59
  ### 4.45.0-beta.4 (2025-09-03)
4
60
 
5
61
  #### Features
package/cli.js CHANGED
@@ -40,6 +40,8 @@ const args = hideBin(process.argv);
40
40
  "start",
41
41
  "setup",
42
42
  "test",
43
+ "production",
44
+ "run",
43
45
  "connect",
44
46
  "execute",
45
47
  "nuke",
@@ -50,10 +52,8 @@ const args = hideBin(process.argv);
50
52
  // Web development commands (for frameworks that build frontend assets)
51
53
  webDev: [
52
54
  "watch",
53
- "run",
54
55
  "check",
55
56
  "npm",
56
- "production",
57
57
  "reinstall",
58
58
  "install",
59
59
  "uninstall",
@@ -86,7 +86,7 @@ const args = hideBin(process.argv);
86
86
 
87
87
  // Config-based command additions
88
88
  const configCommands = {
89
- content: _.config.preset !== "external",
89
+ content: _.config.preset !== "external" && _.platform !== "python",
90
90
  deploy: _.config.preset === "permanent",
91
91
  origin: _.config.preset === "permanent",
92
92
  };
@@ -12,7 +12,8 @@ module.exports = [
12
12
  _.platform === "wordpress" ||
13
13
  _.platform === "drupal" ||
14
14
  _.platform === "craftcms" ||
15
- _.platform === "adonis"
15
+ _.platform === "adonis" ||
16
+ _.platform === "python"
16
17
  ) {
17
18
  _.up(() =>
18
19
  execSync(
@@ -4,9 +4,14 @@ module.exports = [
4
4
  ["production", "prod"],
5
5
  "builds for production",
6
6
  () => {},
7
- () =>
8
- _.command(
9
- "core",
10
- `${process.env.VERSION === "0" ? "xvfb-run " : ""}npm run production`,
11
- ),
7
+ () => {
8
+ if (_.platform === "python") {
9
+ console.log("No production command currently available for Python");
10
+ } else {
11
+ _.command(
12
+ "core",
13
+ `${process.env.VERSION === "0" ? "xvfb-run " : ""}npm run production`,
14
+ );
15
+ }
16
+ },
12
17
  ];
package/commands/run.js CHANGED
@@ -2,7 +2,7 @@ const _ = require("../globals.js");
2
2
 
3
3
  module.exports = [
4
4
  "run [command] [flags...]",
5
- "run an npm script",
5
+ _.platform === "python" ? "run a uv script" : "run an npm script",
6
6
  (yargs) => {
7
7
  yargs.positional("command", {
8
8
  describe: "command to run",
@@ -22,9 +22,29 @@ module.exports = [
22
22
  });
23
23
  }
24
24
  },
25
- (argv) =>
26
- _.command(
27
- "core",
28
- `${argv.d ? "xvfb-run " : ""}npm run ${argv.command} -- -- ${argv.flags.join(" ")}`,
29
- ),
25
+ (argv) => {
26
+ if (_.platform === "python") {
27
+ if (argv.command === "mail" || argv.command === "package") {
28
+ console.log(
29
+ `${argv.command} is a built-in command and will be ignored`,
30
+ );
31
+ return;
32
+ }
33
+
34
+ const command = argv.command.endsWith(".py")
35
+ ? argv.command
36
+ : `${argv.command}.py`;
37
+
38
+ _.command(
39
+ "python",
40
+ `uv run ${command} -- -- ${argv.flags.join(" ")}`,
41
+ true,
42
+ );
43
+ } else {
44
+ _.command(
45
+ "core",
46
+ `${argv.d ? "xvfb-run " : ""}npm run ${argv.command} -- -- ${argv.flags.join(" ")}`,
47
+ );
48
+ }
49
+ },
30
50
  ];
package/globals.js CHANGED
@@ -17,6 +17,8 @@ const utilities = require("./commands/create/libs/utilities");
17
17
  const os = require("os");
18
18
  const { hideBin } = require("yargs/helpers");
19
19
  const args = hideBin(process.argv);
20
+ const forced = args.find((d) => d === "--force");
21
+ const { version: labenvVersion } = require("./package.json");
20
22
 
21
23
  process.env.DIRNAME = __dirname;
22
24
  process.env.USER_UID = execSync("id -u", {
@@ -197,7 +199,7 @@ if (composer && composer.require && composer.require["laravel/framework"]) {
197
199
  composer.require["laravel/framework"],
198
200
  )?.version;
199
201
 
200
- if (process.env.FW_NEXT) {
202
+ if (process.env.FW_NEXT || forced) {
201
203
  process.env.VERSION_LARAVEL = versions[versions.length - 1];
202
204
  } else if (semver.satisfies(version, "<=8")) {
203
205
  process.env.VERSION_LARAVEL = "8";
@@ -218,12 +220,7 @@ if (composer && composer.require && composer.require["laravel/framework"]) {
218
220
  args[0] !== "lint" &&
219
221
  args[0] !== "workspace"
220
222
  ) {
221
- if (!args.find((d) => d === "--force")) {
222
- console.log(
223
- `${utilities.colorize(`laravel`, "title")} and ${utilities.colorize(`@fishawack/lab-env`, "title")} have mismatching versions.\n\nRun ${utilities.colorize(`npm i -g @fishawack/lab-env@latest`, "success")} or pass ${utilities.colorize(`--force`, "warning")} to continue.`,
224
- );
225
- process.exit(1);
226
- }
223
+ unknownLabEnvConfig(platform, version);
227
224
  }
228
225
 
229
226
  // Default to latest image when outside of known core versions
@@ -249,7 +246,7 @@ if (composer && composer.require && composer.require["laravel/framework"]) {
249
246
  composer?.require["johnpbloch/wordpress"],
250
247
  )?.version;
251
248
 
252
- if (process.env.FW_NEXT) {
249
+ if (process.env.FW_NEXT || forced) {
253
250
  process.env.VERSION_WORDPRESS = versions[versions.length - 1];
254
251
  } else if (!version) {
255
252
  process.env.VERSION_WORDPRESS = "0";
@@ -268,12 +265,7 @@ if (composer && composer.require && composer.require["laravel/framework"]) {
268
265
  args[0] !== "lint" &&
269
266
  args[0] !== "workspace"
270
267
  ) {
271
- if (!args.find((d) => d === "--force")) {
272
- console.log(
273
- `${utilities.colorize(`wordpress`, "title")} and ${utilities.colorize(`@fishawack/lab-env`, "title")} have mismatching versions.\n\nRun ${utilities.colorize(`npm i -g @fishawack/lab-env@latest`, "success")} or pass ${utilities.colorize(`--force`, "warning")} to continue.`,
274
- );
275
- process.exit(1);
276
- }
268
+ unknownLabEnvConfig(platform, version);
277
269
  }
278
270
 
279
271
  // Default to latest image when outside of known core versions
@@ -321,7 +313,7 @@ const getCoreVersion = () => {
321
313
 
322
314
  const version = getCoreVersion();
323
315
 
324
- if (process.env.FW_NEXT) {
316
+ if (process.env.FW_NEXT || forced) {
325
317
  process.env.VERSION = versions[versions.length - 1];
326
318
  } else if (semver.satisfies(semver.coerce(version), "<=7.24.0")) {
327
319
  process.env.VERSION = "0";
@@ -343,15 +335,10 @@ if (process.env.FW_NEXT) {
343
335
  args[0] !== "lint" &&
344
336
  args[0] !== "workspace"
345
337
  ) {
346
- if (
347
- !args.find((d) => d === "--force") &&
348
- platform !== "php" &&
349
- platform !== "python"
350
- ) {
351
- console.log(
352
- `${utilities.colorize(`@fishawack/core`, "title")} and ${utilities.colorize(`@fishawack/lab-env`, "title")} have mismatching versions.\n\nRun ${utilities.colorize(`npm i -g @fishawack/lab-env@latest`, "success")} or pass ${utilities.colorize(`--force`, "warning")} to continue.`,
353
- );
354
- process.exit(1);
338
+ if (version) {
339
+ unknownLabEnvConfig("core", version);
340
+ } else if (platform !== "php" && platform !== "python") {
341
+ unknownLabEnvConfig();
355
342
  }
356
343
  }
357
344
 
@@ -573,6 +560,14 @@ if (!existsSync(path.join(cwd, "stylelint.config.js"))) {
573
560
  );
574
561
  }
575
562
 
563
+ function unknownLabEnvConfig(platform, version) {
564
+ console.log(
565
+ `${utilities.colorize(`lab-env@${labenvVersion}`, "success")} doesn't recognize the current ${platform ? `${utilities.colorize(`${platform}@${version}`, "warning")} version` : `project platform`}.\n\nRun ${utilities.colorize(`npm i -g @fishawack/lab-env@latest`, "success")} to update to the latest build or pass ${utilities.colorize(`--force`, "warning")} to continue.`,
566
+ );
567
+
568
+ process.exit(1);
569
+ }
570
+
576
571
  function copyAIInstructionsFile(source, projectDir = cwd) {
577
572
  // Create directory if it doesn't exist
578
573
  const destDir = path.join(projectDir, ".github/instructions");
@@ -673,7 +668,7 @@ if (
673
668
  args[0] !== "lint" &&
674
669
  args[0] !== "workspace"
675
670
  ) {
676
- if (!args.find((d) => d === "--force")) {
671
+ if (!forced) {
677
672
  // Stop here if diagnosis either unset or outdated
678
673
  if (
679
674
  !config.diagnosis ||
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fishawack/lab-env",
3
- "version": "4.45.0-beta.4",
3
+ "version": "4.45.0",
4
4
  "description": "Docker manager for FW",
5
5
  "main": "cli.js",
6
6
  "scripts": {