@florianpat/lando-core 3.23.27-5florianPat.0 → 3.23.27-5florianPat.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,6 +1,6 @@
1
1
  ## {{ UNRELEASED_VERSION }} - [{{ UNRELEASED_DATE }}]({{ UNRELEASED_LINK }})
2
2
 
3
- ## v3.23.27-5florianPat.0 - [August 22, 2025](https://github.com/florianPat/lando-core/releases/tag/v3.23.27-5florianPat.0)
3
+ ## v3.23.27-5florianPat.1 - [August 25, 2025](https://github.com/florianPat/lando-core/releases/tag/v3.23.27-5florianPat.1)
4
4
 
5
5
  ## v3.23.26 - [January 24, 2025](https://github.com/lando/core/releases/tag/v3.23.26)
6
6
 
package/index.js CHANGED
@@ -61,7 +61,7 @@ module.exports = async lando => {
61
61
  lando.events.on('pre-setup', 0, async () => await require('./hooks/lando-copy-v3-scripts')(lando));
62
62
 
63
63
  // ensure we setup docker if needed
64
- lando.events.once('pre-setup', async options => await require(`./hooks/lando-setup-build-engine-${platform}`)(lando, options));
64
+ lando.events.once('pre-setup', async options => await require(`./hooks/lando-setup-build-engine-${process.platform}`)(lando, options));
65
65
 
66
66
  // do some sepecial handling on wsl
67
67
  lando.events.once('pre-setup', async options => await require('./hooks/lando-setup-create-ca-wsl')(lando, options));
package/lib/art.js CHANGED
@@ -300,7 +300,7 @@ exports.newContent = (type = 'guide') => [
300
300
  '',
301
301
  ].join(os.EOL);
302
302
 
303
- exports.setupHeader = (bengine = process.landoPlatform === 'linux' || process.platform === 'linux' ? 'Engine' : 'Desktop') => `
303
+ exports.setupHeader = (bengine = ['linux', 'wsl'].includes(process.landoPlatform) ? 'Engine' : 'Desktop') => `
304
304
  ${chalk.magenta(niceFont('Lando Setup!', 'Small Slant'))}
305
305
 
306
306
  ${chalk.bold('lando setup')} is a hidden convenience command to help you satisify the
package/lib/daemon.js CHANGED
@@ -28,9 +28,9 @@ const buildDockerCmd = (cmd, scriptsDir, dockerBin) => {
28
28
  case 'darwin':
29
29
  return ['open', MACOS_BASE];
30
30
  case 'linux':
31
+ case 'wsl':
31
32
  return [path.join(scriptsDir, `docker-engine-${cmd}.sh`)];
32
33
  case 'win32':
33
- case 'wsl':
34
34
  return ['powershell.exe', '-ExecutionPolicy', 'Bypass', '-File', `"${windowsStartScript}"`];
35
35
  }
36
36
  };
@@ -107,12 +107,12 @@ module.exports = class LandoDaemon {
107
107
  await require('../utils/run-command')('open', [MACOS_BASE], {debug: this.debug});
108
108
  break;
109
109
  case 'linux':
110
+ case 'wsl':
110
111
  const lscript = path.join(this.scriptsDir, 'docker-engine-start.sh');
111
112
  if (password) await require('../utils/run-elevated')([lscript], {debug, password});
112
113
  else await require('../utils/run-command')(lscript, {debug});
113
114
  break;
114
115
  case 'win32':
115
- case 'wsl':
116
116
  const wscript = path.join(this.scriptsDir, 'docker-desktop-start.ps1');
117
117
  await require('../utils/run-powershell-script')(wscript, undefined, {debug: this.debug});
118
118
  await require('delay')(2000);
@@ -226,10 +226,10 @@ module.exports = class LandoDaemon {
226
226
  case 'darwin':
227
227
  return getMacProp('CFBundleShortVersionString').then(version => ({...versions, desktop: version}));
228
228
  case 'linux':
229
+ case 'wsl':
229
230
  const cmd = [`"${this.docker}"`, 'version', '--format', '{{.Server.Version}}'];
230
231
  return shell.sh(cmd).catch(() => '18.0.0').then(version => ({...versions, engine: version}));
231
232
  case 'win32':
232
- case 'wsl':
233
233
  const componentsVersionFile = this.platform === 'win32'
234
234
  ? path.resolve(getDockerBinPath('win32'), '..', 'componentsVersion.json') : '/Docker/host/componentsVersion.json';
235
235
 
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-5florianPat.0",
4
+ "version": "3.23.27-5florianPat.1",
5
5
  "author": "Florian Patruck @florianPat",
6
6
  "license": "GPL-3.0",
7
7
  "repository": "florianPat/lando-core",
@@ -249,9 +249,9 @@
249
249
  "yargs-parser"
250
250
  ],
251
251
  "dist": {
252
- "integrity": "sha512-4XH8m3midLfVyHWYS3dPq978/MNrKtNQ2HcNrj/iYXgS0+E05NauocHPAt9vBRHb3FCcGT9Eo1e5StzZUjb7xw==",
253
- "shasum": "15a076e7e025a35ddf5c82fc789f8057c10b54f1",
254
- "filename": "florianpat-lando-core-3.23.27-5florianPat.0.tgz",
255
- "unpackedSize": 60980579
252
+ "integrity": "sha512-fKWOfM4UYDTsbPvvdsPG82hLRiDToxg9tTZeytY7Xr5BGs/HcR0NufBpTJ42Dd/zMNxsYp8undbxnHsHxC3ESw==",
253
+ "shasum": "03cc7ac953797fae05985d31f69a96efdfbcf351",
254
+ "filename": "florianpat-lando-core-3.23.27-5florianPat.1.tgz",
255
+ "unpackedSize": 60980524
256
256
  }
257
257
  }
@@ -76,7 +76,7 @@ module.exports = lando => {
76
76
  if (lando.engine.dockerInstalled === false) return false;
77
77
 
78
78
  // we also want to do an additional check on docker-destkop
79
- if (lando.config.os.landoPlatform !== 'linux' && !fs.existsSync(getDockerDesktopBin())) return false;
79
+ if (!['linux', 'wsl'].includes(lando.config.os.landoPlatform) && !fs.existsSync(getDockerDesktopBin())) return false;
80
80
 
81
81
  // otherwise attempt to sus things out
82
82
  try {
@@ -167,7 +167,7 @@ exports.parseRoutes = (service, urls = [], sslReady, labels = {}) => {
167
167
  rule.middlewares.push({name: 'lando', key: 'headers.customrequestheaders.X-Lando', value: 'on'});
168
168
 
169
169
  // Add in any path stripping middleware we need it
170
- if (rule.pathname.length > 1) {
170
+ if (rule.pathname.length > 1 && _.get(rule, 'stripPrefix', true)) {
171
171
  rule.middlewares.push({name: 'stripprefix', key: 'stripprefix.prefixes', value: rule.pathname});
172
172
  };
173
173
 
package/tasks/setup.js CHANGED
@@ -67,7 +67,7 @@ module.exports = lando => {
67
67
  // get defaults from the lando config
68
68
  const defaults = lando.config.setup;
69
69
  // determine label for build engine
70
- const buildEngine = process.landoPlatform === 'linux' || process.platform === 'linux' ? 'docker-engine' : 'docker-desktop';
70
+ const buildEngine = ['linux', 'wsl'].includes(process.landoPlatform) ? 'docker-engine' : 'docker-desktop';
71
71
  // default options
72
72
  const options = {
73
73
  'build-engine': {
@@ -10,11 +10,10 @@ const getBuildEngineVersion = (platform = process.landoPlatform ?? process.platf
10
10
  case 'darwin':
11
11
  return '4.37.2';
12
12
  case 'linux':
13
+ case 'wsl':
13
14
  return '27.5.0';
14
15
  case 'win32':
15
16
  return '4.37.1';
16
- case 'wsl':
17
- return '4.37.1';
18
17
  }
19
18
  };
20
19
 
@@ -6,6 +6,7 @@ const path = require('path');
6
6
  module.exports = (platform = process.landoPlatform ?? process.platform) => {
7
7
  switch (platform) {
8
8
  case 'linux':
9
+ case 'wsl':
9
10
  return '/usr/share/lando/bin';
10
11
  case 'win32':
11
12
  const programFiles = process.env.ProgramW6432 || process.env.ProgramFiles;
@@ -17,8 +18,6 @@ module.exports = (platform = process.landoPlatform ?? process.platform) => {
17
18
  } else {
18
19
  return path.win32.join(programFiles + '\\Docker\\Docker\\resources\\bin');
19
20
  }
20
- case 'wsl':
21
- return '/mnt/wsl/docker-desktop/cli-tools/usr/bin';
22
21
  default:
23
22
  return '/usr/bin';
24
23
  }