@florianpat/lando-core 3.23.22 → 3.23.27-2florianPat.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.
Files changed (54) hide show
  1. package/CHANGELOG.md +23 -1
  2. package/app.js +5 -0
  3. package/builders/_lando.js +19 -6
  4. package/builders/lando-v4.js +3 -0
  5. package/config.yml +4 -4
  6. package/hooks/app-add-init-tooling.js +21 -0
  7. package/hooks/app-run-events.js +22 -0
  8. package/hooks/lando-setup-build-engine-darwin.js +3 -0
  9. package/hooks/lando-setup-build-engine-win32.js +2 -0
  10. package/hooks/lando-setup-build-engine-wsl.js +2 -0
  11. package/hooks/lando-setup-orchestrator.js +2 -2
  12. package/lib/app.js +30 -24
  13. package/lib/daemon.js +1 -1
  14. package/lib/engine.js +1 -1
  15. package/lib/formatters.js +1 -1
  16. package/lib/router.js +1 -1
  17. package/lib/updates.js +9 -1
  18. package/netlify.toml +1 -0
  19. package/node_modules/undici/docs/docs/api/Dispatcher.md +51 -0
  20. package/node_modules/undici/index.js +2 -1
  21. package/node_modules/undici/lib/api/api-request.js +1 -1
  22. package/node_modules/undici/lib/core/connect.js +5 -0
  23. package/node_modules/undici/lib/dispatcher/client-h2.js +20 -6
  24. package/node_modules/undici/lib/handler/retry-handler.js +3 -3
  25. package/node_modules/undici/lib/interceptor/dns.js +375 -0
  26. package/node_modules/undici/lib/web/cache/cache.js +1 -0
  27. package/node_modules/undici/lib/web/cache/cachestorage.js +2 -0
  28. package/node_modules/undici/lib/web/eventsource/eventsource.js +2 -0
  29. package/node_modules/undici/lib/web/fetch/body.js +9 -1
  30. package/node_modules/undici/lib/web/fetch/formdata.js +2 -0
  31. package/node_modules/undici/lib/web/fetch/headers.js +2 -0
  32. package/node_modules/undici/lib/web/fetch/index.js +1 -1
  33. package/node_modules/undici/lib/web/fetch/request.js +1 -0
  34. package/node_modules/undici/lib/web/fetch/response.js +1 -0
  35. package/node_modules/undici/lib/web/fetch/webidl.js +2 -0
  36. package/node_modules/undici/lib/web/websocket/events.js +4 -0
  37. package/node_modules/undici/lib/web/websocket/websocket.js +2 -0
  38. package/node_modules/undici/package.json +1 -1
  39. package/node_modules/undici/types/interceptors.d.ts +14 -0
  40. package/node_modules/undici/types/retry-handler.d.ts +1 -1
  41. package/node_modules/undici/types/webidl.d.ts +6 -0
  42. package/package.json +6 -6
  43. package/release-aliases/3-EDGE +1 -1
  44. package/release-aliases/3-STABLE +1 -1
  45. package/scripts/install-docker-desktop.sh +1 -1
  46. package/scripts/install-docker-engine.sh +1 -1
  47. package/scripts/lando-entrypoint.sh +1 -1
  48. package/utils/build-tooling-task.js +2 -1
  49. package/utils/get-compose-x.js +1 -1
  50. package/utils/get-config-defaults.js +5 -5
  51. package/utils/get-tasks.js +4 -2
  52. package/utils/load-compose-files.js +2 -2
  53. package/utils/to-lando-container.js +16 -2
  54. package/checksums.txt +0 -0
@@ -27,7 +27,7 @@ const getDockerBin = (bin, base, pathFallback = true) => {
27
27
  }
28
28
  };
29
29
 
30
- module.exports = ({orchestratorVersion = '2.30.3', userConfRoot = os.tmpdir()} = {}) => {
30
+ module.exports = ({orchestratorVersion = '2.31.0', userConfRoot = os.tmpdir()} = {}) => {
31
31
  const orchestratorBin = `docker-compose-v${orchestratorVersion}`;
32
32
  switch (process.platform) {
33
33
  case 'darwin':
@@ -8,20 +8,20 @@ const os = require('os');
8
8
  const getBuildEngineVersion = (platform = process.landoPlatform ?? process.platform) => {
9
9
  switch (platform) {
10
10
  case 'darwin':
11
- return '4.36.0';
11
+ return '4.37.2';
12
12
  case 'linux':
13
- return '27.3.1';
13
+ return '27.5.0';
14
14
  case 'win32':
15
- return '4.36.0';
15
+ return '4.37.1';
16
16
  case 'wsl':
17
- return '4.36.0';
17
+ return '4.37.1';
18
18
  }
19
19
  };
20
20
 
21
21
  // Default config
22
22
  const defaultConfig = options => ({
23
23
  orchestratorSeparator: '_',
24
- orchestratorVersion: '2.30.3',
24
+ orchestratorVersion: '2.31.0',
25
25
  configSources: [],
26
26
  coreBase: path.resolve(__dirname, '..'),
27
27
  disablePlugins: [],
@@ -3,6 +3,7 @@
3
3
  const _ = require('lodash');
4
4
  const fs = require('fs');
5
5
  const path = require('path');
6
+ const App = require('../lib/app');
6
7
 
7
8
  /*
8
9
  * Paths to /
@@ -40,9 +41,10 @@ const loadCacheFile = file => {
40
41
  */
41
42
  const appRunner = command => (argv, lando) => {
42
43
  const app = lando.getApp(argv._app.root);
44
+ const service = _.get(app.config, `tooling.${command}.service`, '');
43
45
  return lando.events.emit('pre-app-runner', app)
44
46
  .then(() => lando.events.emit('pre-command-runner', app))
45
- .then(() => app.init().then(() => _.find(app.tasks, {command}).run(argv)));
47
+ .then(() => app.init({noEngine: '_init' === service}).then(() => _.find(app.tasks, {command}).run(argv)));
46
48
  };
47
49
 
48
50
  /*
@@ -128,7 +130,7 @@ module.exports = (config = {}, argv = {}, tasks = []) => {
128
130
 
129
131
  // If the tooling command is being called lets assess whether we can get away with engine bootstrap level
130
132
  const ids = _(config.tooling).map(task => task.id).filter(_.identity).value();
131
- const level = (_.includes(ids, argv._[0])) ? getBsLevel(config, argv._[0]) : 'app';
133
+ const level = !App.isBootstrapCommand && (_.includes(ids, argv._[0])) ? getBsLevel(config, argv._[0]) : 'app';
132
134
 
133
135
  // Load all the tasks, remember we need to remove "disabled" tasks (eg non-object tasks) here
134
136
  _.forEach(_.get(config, 'tooling', {}), (task, command) => {
@@ -12,7 +12,7 @@ const remove = require('./remove');
12
12
  module.exports = async (files, dir, landoComposeConfigDir = undefined, outputConfigFunction = undefined) => {
13
13
  const composeFilePaths = _(require('./normalize-files')(files, dir)).value();
14
14
  if (_.isEmpty(composeFilePaths)) {
15
- return {};
15
+ return [];
16
16
  }
17
17
 
18
18
  if (undefined === outputConfigFunction) {
@@ -29,5 +29,5 @@ module.exports = async (files, dir, landoComposeConfigDir = undefined, outputCon
29
29
  fs.unlinkSync(outputFile);
30
30
  remove(path.dirname(outputFile));
31
31
 
32
- return result;
32
+ return [result];
33
33
  };
@@ -1,22 +1,36 @@
1
1
  'use strict';
2
2
 
3
- module.exports = ({Labels, Id, Status}, separator = '_') => {
3
+ const path = require('path');
4
+
5
+ module.exports = ({Labels, Id, Status}, separator = '_', src = []) => {
4
6
  // Get name of docker container.
5
7
  const app = Labels['com.docker.compose.project'];
6
8
  const service = Labels['com.docker.compose.service'];
7
9
  const num = Labels['com.docker.compose.container-number'];
8
10
  const lando = Labels['io.lando.container'];
9
11
  const special = Labels['io.lando.service-container'];
12
+
13
+ // if we have io.lando.root and io.lando.
14
+ if (Labels['io.lando.root'] && Labels['io.lando.landofiles']) {
15
+ src = Labels['io.lando.landofiles'].split(',').map(landofile => path.join(Labels['io.lando.root'], landofile));
16
+
17
+ // or legacy support for Labels['io.lando.src']
18
+ } else if (Labels['io.lando.src']) {
19
+ src = Labels['io.lando.src'].split(',');
20
+
21
+ // or its just unknown
22
+ } else src = 'unknown';
23
+
10
24
  // Build generic container.
11
25
  return {
12
26
  id: Id,
13
27
  service: service,
14
28
  name: [app, service, num].join(separator),
15
29
  app: (special !== 'TRUE') ? app : '_global_',
16
- src: (Labels['io.lando.src']) ? Labels['io.lando.src'].split(',') : 'unknown',
17
30
  kind: (special !== 'TRUE') ? 'app' : 'service',
18
31
  lando: (lando === 'TRUE') ? true : false,
19
32
  instance: Labels['io.lando.id'] || 'unknown',
20
33
  status: Status,
34
+ src,
21
35
  };
22
36
  };
package/checksums.txt DELETED
File without changes