@florianpat/lando-core 3.23.27-4florianPat.0 → 3.23.27-4florianPat.2

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,6 +1,6 @@
1
1
  ## {{ UNRELEASED_VERSION }} - [{{ UNRELEASED_DATE }}]({{ UNRELEASED_LINK }})
2
2
 
3
- ## v3.23.27-4florianPat.0 - [March 4, 2025](https://github.com/florianPat/lando-core/releases/tag/v3.23.27-4florianPat.0)
3
+ ## v3.23.27-4florianPat.2 - [March 13, 2025](https://github.com/florianPat/lando-core/releases/tag/v3.23.27-4florianPat.2)
4
4
 
5
5
  ## v3.23.26 - [January 24, 2025](https://github.com/lando/core/releases/tag/v3.23.26)
6
6
 
package/app.js CHANGED
@@ -131,7 +131,7 @@ module.exports = async (app, lando) => {
131
131
  app.events.on('ready', 1, async () => await require('./hooks/app-override-tooling-defaults')(app, lando));
132
132
 
133
133
  // set tooling compose cache
134
- app.events.on('ready', async () => await require('./hooks/app-set-compose-cache')(app, lando));
134
+ app.events.on('ready-engine', async () => await require('./hooks/app-set-compose-cache')(app, lando));
135
135
 
136
136
  // v4 parts of the app are ready
137
137
  app.events.on('ready', 6, async () => await require('./hooks/app-v4-ready')(app, lando));
@@ -144,7 +144,7 @@ module.exports = async (app, lando) => {
144
144
 
145
145
  // Save a compose cache every time the app is ready, we have to duplicate this for v4 because we modify the
146
146
  // composeData after the v3 app.ready event
147
- app.events.on('ready-v4', async () => await require('./hooks/app-set-v4-compose-cache')(app, lando));
147
+ app.events.on('ready-engine', async () => await require('./hooks/app-set-v4-compose-cache')(app, lando));
148
148
 
149
149
  // Otherwise set on rebuilds
150
150
  // NOTE: We set this pre-rebuild because post-rebuild runs after post-start because you would need to
package/lib/cli.js CHANGED
@@ -317,6 +317,7 @@ module.exports = class Cli {
317
317
  .option('help', globalOptions.help)
318
318
  .option('verbose', globalOptions.verbose)
319
319
  .version(false)
320
+ .env('lando_cli_')
320
321
  .middleware([(argv => {
321
322
  argv._app = config;
322
323
  argv._yargs = yargs;
package/lib/daemon.js CHANGED
@@ -40,7 +40,7 @@ const buildDockerCmd = (cmd, scriptsDir, dockerBin) => {
40
40
  */
41
41
  const getMacProp = prop => shell.sh(['defaults', 'read', `${MACOS_BASE}/Contents/Info.plist`, prop])
42
42
  .then(data => _.trim(data))
43
- .catch(() => null);
43
+ .catch(() => 'skip');
44
44
 
45
45
  /*
46
46
  * Creates a new Daemon instance.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@florianpat/lando-core",
3
3
  "description": "The libraries that power all of Lando. Fork by flo for compose integration",
4
- "version": "3.23.27-4florianPat.0",
4
+ "version": "3.23.27-4florianPat.2",
5
5
  "author": "Florian Patruck @florianPat",
6
6
  "license": "GPL-3.0",
7
7
  "repository": "florianPat/lando-core",
@@ -247,9 +247,9 @@
247
247
  "yargs-parser"
248
248
  ],
249
249
  "dist": {
250
- "integrity": "sha512-/98U+xsnU1BnJCQAsZZlui8fGnMYfhATamRCi/wy9j29g76GPwXAR5/smdRmEq+Ibyt6SRSvxRVLp9cC7HvERw==",
251
- "shasum": "4a4b0505a255aaf87c0a7e663f143a1c43de652d",
252
- "filename": "florianpat-lando-core-3.23.27-4florianPat.0.tgz",
253
- "unpackedSize": 60967690
250
+ "integrity": "sha512-md/dXWSDeZ/Yuv01a926LsoZUUFhVdhXKhuTsxueCV87DdsJ95SrVgwn8X7DiqD0sRb771j4oQ1wEYr01OId/g==",
251
+ "shasum": "48b0d84ff591b9cc816be0d7ac6a68c952270de0",
252
+ "filename": "florianpat-lando-core-3.23.27-4florianPat.2.tgz",
253
+ "unpackedSize": 60967667
254
254
  }
255
255
  }
package/tasks/exec.js CHANGED
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
3
  // Modules
4
- const fs = require('fs');
5
- const path = require('path');
6
4
  const _ = require('lodash');
7
5
 
8
6
  const {color} = require('listr2');
7
+ const fs = require('fs');
8
+ const path = require('path');
9
9
 
10
10
  // @TODO: when we have a file for recipes/compose we can set choices on service
11
11
 
@@ -14,7 +14,7 @@ module.exports = (lando, config = lando.appConfig) => ({
14
14
  describe: 'Runs command(s) on a service',
15
15
  usage: '$0 exec <service> [--user <user>] -- <command>',
16
16
  override: true,
17
- level: 'engine',
17
+ level: 'app',
18
18
  examples: [
19
19
  '$0 exec appserver -- lash bash',
20
20
  '$0 exec nginx --user root -- whoami',
@@ -40,7 +40,8 @@ module.exports = (lando, config = lando.appConfig) => ({
40
40
 
41
41
  // if no app then we need to throw
42
42
  if (!fs.existsSync(minapp.composeCache)) {
43
- throw new Error('Could not detect a built app. Rebuild or move into the correct location!');
43
+ const app = lando.getApp(options._app.root);
44
+ await app.init();
44
45
  }
45
46
 
46
47
  // Build a minimal app
@@ -59,7 +60,7 @@ module.exports = (lando, config = lando.appConfig) => ({
59
60
  }
60
61
 
61
62
  // nice things
62
- const aservices = app?.config?.allServices ?? app?.allServices ?? [];
63
+ const aservices = app.allServices;
63
64
  const choices = `[${color.green('choices:')} ${aservices.map(service => `"${service}"`).join(', ')}]`;
64
65
 
65
66
  // gather our options
@@ -127,8 +128,8 @@ module.exports = (lando, config = lando.appConfig) => ({
127
128
  ropts.push(sconf?.overrides?.working_dir ?? sconf?.working_dir);
128
129
  // mix in mount if applicable
129
130
  ropts.push(app?.mounts[options.service]);
130
- ropts.push(!options.deps ?? true);
131
- ropts.push(options.autoRemove ?? false);
131
+ ropts.push(!options.deps ?? false);
132
+ ropts.push(options.autoRemove ?? true);
132
133
 
133
134
  // emit pre-exec
134
135
  await app.events.emit('pre-exec', config);