@lando/wordpress 1.2.0 → 1.2.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.
@@ -0,0 +1 @@
1
+ {"parent":null,"pid":1930,"argv":["/opt/hostedtoolcache/node/18.19.1/x64/bin/node","/home/runner/work/wordpress/wordpress/node_modules/.bin/nyc","--reporter=html","--reporter=text","mocha","--timeout","5000","test/**/*.spec.js"],"execArgv":[],"cwd":"/home/runner/work/wordpress/wordpress","time":1709613420261,"ppid":1929,"coverageFilename":"/home/runner/work/wordpress/wordpress/.nyc_output/09cdc376-a10c-4b83-b8ec-41c8d0338871.json","externalId":"","uuid":"09cdc376-a10c-4b83-b8ec-41c8d0338871","files":[]}
@@ -0,0 +1 @@
1
+ {"parent":null,"pid":1941,"argv":["/opt/hostedtoolcache/node/18.19.1/x64/bin/node","/home/runner/work/wordpress/wordpress/node_modules/.bin/mocha","--timeout","5000","test/**/*.spec.js"],"execArgv":[],"cwd":"/home/runner/work/wordpress/wordpress","time":1709613420413,"ppid":1930,"coverageFilename":"/home/runner/work/wordpress/wordpress/.nyc_output/de2bdb45-7c07-4db9-968d-bd97cb07b03e.json","externalId":"","uuid":"de2bdb45-7c07-4db9-968d-bd97cb07b03e","files":[]}
@@ -1 +1 @@
1
- {"processes":{"60bcd701-7f12-46d8-9181-6dc35120f897":{"parent":null,"children":[]},"c429492a-cdef-42c0-a2d6-3a207362156d":{"parent":null,"children":[]}},"files":{},"externalIds":{}}
1
+ {"processes":{"09cdc376-a10c-4b83-b8ec-41c8d0338871":{"parent":null,"children":[]},"de2bdb45-7c07-4db9-968d-bd97cb07b03e":{"parent":null,"children":[]}},"files":{},"externalIds":{}}
package/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## v1.2.1 - [March 4, 2024](https://github.com/lando/wordpress/releases/tag/v1.2.1)
2
+
3
+ ### Fixes
4
+
5
+ * Improved `database` selection for purposes of `config` loading, fixes some `database` bootup issues when the `database` type is overriden downstream
6
+
1
7
  ## v1.2.0 - [February 22, 2024](https://github.com/lando/wordpress/releases/tag/v1.2.0)
2
8
 
3
9
  ### New Features
@@ -65,6 +65,13 @@ const getServiceConfig = (options, types = ['php', 'server', 'vhosts']) => {
65
65
  return config;
66
66
  };
67
67
 
68
+ /*
69
+ * Helper to get database type
70
+ */
71
+ const getDatabaseType = options => {
72
+ return _.get(options, '_app.config.services.database.type', options.database) ?? 'mysql';
73
+ };
74
+
68
75
  // Tooling defaults
69
76
  const toolingDefaults = {
70
77
  'composer': {
@@ -163,11 +170,12 @@ const getConfigDefaults = options => {
163
170
  // Get the viaconf
164
171
  if (_.startsWith(options.via, 'nginx')) options.defaultFiles.vhosts = 'default.conf.tpl';
165
172
 
166
- // Get the default db conf
167
- const dbConfig = _.get(options, 'database', 'mysql');
173
+ // attempt to discover the database that is actually being used
174
+ // @NOTE: this will look to see if database is overridden
175
+ const dbConfig = getDatabaseType(options);
168
176
  const database = _.first(dbConfig.split(':'));
169
177
  const version = _.last(dbConfig.split(':')).substring(0, 2);
170
- if (database === 'mysql' || database === 'mariadb') {
178
+ if (database === 'wordpress-mysql' || database === 'mysql' || database === 'mariadb') {
171
179
  if (version === '8.') {
172
180
  options.defaultFiles.database = 'mysql8.cnf';
173
181
  } else {
@@ -86,7 +86,7 @@
86
86
  <div class='footer quiet pad2 space-top1 center small'>
87
87
  Code coverage generated by
88
88
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
89
- at 2024-02-22T15:48:01.020Z
89
+ at 2024-03-05T04:37:00.784Z
90
90
  </div>
91
91
  <script src="prettify.js"></script>
92
92
  <script>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lando/wordpress",
3
3
  "description": "A Lando plugin that provides a tight integration with WordPress.",
4
- "version": "1.2.0",
4
+ "version": "1.2.1",
5
5
  "author": "Mike Pirog @pirog",
6
6
  "license": "GPL-3.0",
7
7
  "repository": "lando/wordpress",
@@ -75,9 +75,9 @@
75
75
  "lodash"
76
76
  ],
77
77
  "dist": {
78
- "integrity": "sha512-wcyCtgj6G9aERYc8vfzcHsDvTZ/4400tenKgjspnsLnrXPIGBpAg/8kNxevTsr8Ym975lCaghYmx9R0NKQPdAA==",
79
- "shasum": "4fd39d6a0bdfea50072b1a4dbc27b9e2edbad9f6",
80
- "filename": "lando-wordpress-1.2.0.tgz",
81
- "unpackedSize": 13749634
78
+ "integrity": "sha512-uF5JvI5fSGbFlT7+YNpW3c9LFRreT1r8qvMgwyy8UpRiFc5YCJZa71aCqWea8wXYka/oXOH5qYlUyL4OGGIE0g==",
79
+ "shasum": "26dc2a1e04c72768096092f99ae4482b180f19e7",
80
+ "filename": "lando-wordpress-1.2.1.tgz",
81
+ "unpackedSize": 13750173
82
82
  }
83
83
  }
@@ -1 +0,0 @@
1
- {"parent":null,"pid":1935,"argv":["/opt/hostedtoolcache/node/18.19.1/x64/bin/node","/home/runner/work/wordpress/wordpress/node_modules/.bin/nyc","--reporter=html","--reporter=text","mocha","--timeout","5000","test/**/*.spec.js"],"execArgv":[],"cwd":"/home/runner/work/wordpress/wordpress","time":1708616880664,"ppid":1934,"coverageFilename":"/home/runner/work/wordpress/wordpress/.nyc_output/60bcd701-7f12-46d8-9181-6dc35120f897.json","externalId":"","uuid":"60bcd701-7f12-46d8-9181-6dc35120f897","files":[]}
@@ -1 +0,0 @@
1
- {"parent":null,"pid":1946,"argv":["/opt/hostedtoolcache/node/18.19.1/x64/bin/node","/home/runner/work/wordpress/wordpress/node_modules/.bin/mocha","--timeout","5000","test/**/*.spec.js"],"execArgv":[],"cwd":"/home/runner/work/wordpress/wordpress","time":1708616880821,"ppid":1935,"coverageFilename":"/home/runner/work/wordpress/wordpress/.nyc_output/c429492a-cdef-42c0-a2d6-3a207362156d.json","externalId":"","uuid":"c429492a-cdef-42c0-a2d6-3a207362156d","files":[]}