@florianpat/lando-core 3.23.27-2florianPat.0 → 3.23.27-4florianPat.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,6 +1,6 @@
1
1
  ## {{ UNRELEASED_VERSION }} - [{{ UNRELEASED_DATE }}]({{ UNRELEASED_LINK }})
2
2
 
3
- ## v3.23.27-2florianPat.0 - [February 19, 2025](https://github.com/florianPat/lando-core/releases/tag/v3.23.27-2florianPat.0)
3
+ ## v3.23.27-4florianPat.0 - [March 4, 2025](https://github.com/florianPat/lando-core/releases/tag/v3.23.27-4florianPat.0)
4
4
 
5
5
  ## v3.23.26 - [January 24, 2025](https://github.com/lando/core/releases/tag/v3.23.26)
6
6
 
package/lib/app.js CHANGED
@@ -283,6 +283,8 @@ module.exports = class App {
283
283
  console.log(require('yargonaut').chalk().cyan('Looks like this is the first time to start the app. Lets bootstrap it...'));
284
284
  }
285
285
 
286
+ const composeEnvFiles = require('../utils/normalize-files')(_.get(this, 'config.compose_env_file', []), this.root);
287
+
286
288
  return loadPlugins(this, this._lando)
287
289
  /**
288
290
  * Event that only gets triggered if the app never started before (or was destroyed)
@@ -299,7 +301,7 @@ module.exports = class App {
299
301
  this.root,
300
302
  this._dir,
301
303
  (composeFiles, outputFilePath) =>
302
- this.engine.getComposeConfig({compose: composeFiles, project: this.project, outputFilePath}),
304
+ this.engine.getComposeConfig({compose: composeFiles, project: this.project, outputFilePath, opts: {envFiles: composeEnvFiles}}),
303
305
  ))
304
306
  .then(composeFileData => {
305
307
  this.composeData = [new this.ComposeService('compose', {}, ...composeFileData)];
package/lib/compose.js CHANGED
@@ -77,21 +77,22 @@ const parseOptions = (opts = {}) => {
77
77
  /*
78
78
  * Helper to standardize construction of docker commands
79
79
  */
80
- const buildCmd = (run, name, compose, {services, cmd}, opts = {}) => {
80
+ const buildCmd = (run, name, compose, {services, cmd, envFiles}, opts = {}) => {
81
81
  if (!name) throw new Error('Need to give this composition a project name!');
82
82
  // @TODO: we need to strip out opts.user on start/stop because we often get it as part of run
83
83
  const project = ['--project-name', name];
84
84
  const files = _.flatten(_.map(compose, unit => ['--file', unit]));
85
+ const envFile = _.flatten(_.map(envFiles, unit => ['--env-file', unit]));
85
86
  const options = parseOptions(opts);
86
87
  const argz = _.flatten(_.compact([services, cmd]));
87
- return _.flatten([project, files, run, options, argz]);
88
+ return _.flatten([project, files, envFile, run, options, argz]);
88
89
  };
89
90
 
90
91
  /*
91
92
  * Helper to build build object needed by lando.shell.sh
92
93
  */
93
94
  const buildShell = (run, name, compose, opts = {}) => ({
94
- cmd: buildCmd(run, name, compose, {services: opts.services, cmd: opts.cmd}, mergeOpts(run, opts)),
95
+ cmd: buildCmd(run, name, compose, {services: opts.services, cmd: opts.cmd, envFiles: opts.envFiles ?? []}, mergeOpts(run, opts)),
95
96
  opts: {mode: 'spawn', cstdio: opts.cstdio, silent: opts.silent},
96
97
  });
97
98
 
package/lib/engine.js CHANGED
@@ -506,6 +506,7 @@ module.exports = class Engine {
506
506
  * @param {String} data.project A String of the project name (Usually this is the same as the app name)
507
507
  * @param {String} [data.outputFilePath='/path/to/file.yml'] String to output path
508
508
  * @param {Object} [data.opts] Options
509
+ * @param {Array} [data.opts.envFiles] An Array of paths to env files
509
510
  * @return {Promise} A Promise.
510
511
  * @example
511
512
  * return lando.engine.stop(app);
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-2florianPat.0",
4
+ "version": "3.23.27-4florianPat.0",
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-nJ+omUdEgvWWSzY820agmarvTKCfYXYkslyaSNxCZOtyctgzRioHpx4qXRvYnoaHS6q6zjCwSShslZAGwPyyyw==",
251
- "shasum": "864b2749e3dd4bf4691b29fd9aeb45046c61f402",
252
- "filename": "florianpat-lando-core-3.23.27-2florianPat.0.tgz",
253
- "unpackedSize": 60967423
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
254
254
  }
255
255
  }
@@ -5,8 +5,6 @@ const path = require('path');
5
5
 
6
6
  module.exports = (platform = process.landoPlatform ?? process.platform) => {
7
7
  switch (platform) {
8
- case 'darwin':
9
- return '/Applications/Docker.app/Contents/Resources/bin';
10
8
  case 'linux':
11
9
  return '/usr/share/lando/bin';
12
10
  case 'win32':