@wordpress/env 10.39.0 → 11.0.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.
@@ -0,0 +1,79 @@
1
+ 'use strict';
2
+ /**
3
+ * External dependencies
4
+ */
5
+ const fs = require( 'fs' ).promises;
6
+ const path = require( 'path' );
7
+ const { confirm } = require( '@inquirer/prompts' );
8
+
9
+ /**
10
+ * Internal dependencies
11
+ */
12
+ const { loadConfig } = require( '../config' );
13
+ const { executeLifecycleScript } = require( '../execute-lifecycle-script' );
14
+ const { getRuntime, detectRuntime } = require( '../runtime' );
15
+
16
+ /**
17
+ * Cleanup the development server.
18
+ *
19
+ * Removes Docker containers, volumes, networks, and local files,
20
+ * but preserves Docker images for faster re-starts.
21
+ *
22
+ * @param {Object} options
23
+ * @param {Object} options.spinner A CLI spinner which indicates progress.
24
+ * @param {boolean} options.scripts Indicates whether or not lifecycle scripts should be executed.
25
+ * @param {boolean} options.force If true, skips the confirmation prompt.
26
+ * @param {boolean} options.debug True if debug mode is enabled.
27
+ * @param {string|null} options.config Path to a custom .wp-env.json configuration file.
28
+ */
29
+ module.exports = async function cleanup( {
30
+ spinner,
31
+ scripts,
32
+ force,
33
+ debug,
34
+ config: customConfigPath,
35
+ } ) {
36
+ const config = await loadConfig( path.resolve( '.' ), customConfigPath );
37
+
38
+ try {
39
+ await fs.readdir( config.workDirectoryPath );
40
+ } catch {
41
+ spinner.text = 'Could not find any files to remove.';
42
+ return;
43
+ }
44
+
45
+ const runtime = getRuntime(
46
+ await detectRuntime( config.workDirectoryPath )
47
+ );
48
+
49
+ spinner.info( runtime.getCleanupWarningMessage() );
50
+
51
+ let yesDelete = force;
52
+ if ( ! force ) {
53
+ try {
54
+ yesDelete = await confirm( {
55
+ message: 'Are you sure you want to continue?',
56
+ default: false,
57
+ } );
58
+ } catch ( error ) {
59
+ if ( error.name === 'ExitPromptError' ) {
60
+ console.log( 'Cancelled.' );
61
+ process.exit( 1 );
62
+ }
63
+ throw error;
64
+ }
65
+ }
66
+
67
+ spinner.start();
68
+
69
+ if ( ! yesDelete ) {
70
+ spinner.text = 'Cancelled.';
71
+ return;
72
+ }
73
+
74
+ await runtime.cleanup( config, { spinner, debug } );
75
+
76
+ if ( scripts ) {
77
+ await executeLifecycleScript( 'afterCleanup', config, spinner );
78
+ }
79
+ };
@@ -16,13 +16,21 @@ const { getRuntime, detectRuntime } = require( '../runtime' );
16
16
  /**
17
17
  * Destroy the development server.
18
18
  *
19
- * @param {Object} options
20
- * @param {Object} options.spinner A CLI spinner which indicates progress.
21
- * @param {boolean} options.scripts Indicates whether or not lifecycle scripts should be executed.
22
- * @param {boolean} options.debug True if debug mode is enabled.
19
+ * @param {Object} options
20
+ * @param {Object} options.spinner A CLI spinner which indicates progress.
21
+ * @param {boolean} options.scripts Indicates whether or not lifecycle scripts should be executed.
22
+ * @param {boolean} options.force If true, skips the confirmation prompt.
23
+ * @param {boolean} options.debug True if debug mode is enabled.
24
+ * @param {string|null} options.config Path to a custom .wp-env.json configuration file.
23
25
  */
24
- module.exports = async function destroy( { spinner, scripts, debug } ) {
25
- const config = await loadConfig( path.resolve( '.' ) );
26
+ module.exports = async function destroy( {
27
+ spinner,
28
+ scripts,
29
+ force,
30
+ debug,
31
+ config: customConfigPath,
32
+ } ) {
33
+ const config = await loadConfig( path.resolve( '.' ), customConfigPath );
26
34
 
27
35
  try {
28
36
  await fs.readdir( config.workDirectoryPath );
@@ -31,22 +39,26 @@ module.exports = async function destroy( { spinner, scripts, debug } ) {
31
39
  return;
32
40
  }
33
41
 
34
- const runtime = getRuntime( detectRuntime( config.workDirectoryPath ) );
42
+ const runtime = getRuntime(
43
+ await detectRuntime( config.workDirectoryPath )
44
+ );
35
45
 
36
46
  spinner.info( runtime.getDestroyWarningMessage() );
37
47
 
38
- let yesDelete = false;
39
- try {
40
- yesDelete = await confirm( {
41
- message: 'Are you sure you want to continue?',
42
- default: false,
43
- } );
44
- } catch ( error ) {
45
- if ( error.name === 'ExitPromptError' ) {
46
- console.log( 'Cancelled.' );
47
- process.exit( 1 );
48
+ let yesDelete = force;
49
+ if ( ! force ) {
50
+ try {
51
+ yesDelete = await confirm( {
52
+ message: 'Are you sure you want to continue?',
53
+ default: false,
54
+ } );
55
+ } catch ( error ) {
56
+ if ( error.name === 'ExitPromptError' ) {
57
+ console.log( 'Cancelled.' );
58
+ process.exit( 1 );
59
+ }
60
+ throw error;
48
61
  }
49
- throw error;
50
62
  }
51
63
 
52
64
  spinner.start();
@@ -4,18 +4,22 @@
4
4
  */
5
5
  const start = require( './start' );
6
6
  const stop = require( './stop' );
7
+ const reset = require( './reset' );
7
8
  const clean = require( './clean' );
8
9
  const run = require( './run' );
9
10
  const destroy = require( './destroy' );
11
+ const cleanup = require( './cleanup' );
10
12
  const logs = require( './logs' );
11
- const installPath = require( './install-path' );
13
+ const status = require( './status' );
12
14
 
13
15
  module.exports = {
14
16
  start,
15
17
  stop,
18
+ reset,
16
19
  clean,
17
20
  run,
18
21
  destroy,
22
+ cleanup,
19
23
  logs,
20
- installPath,
24
+ status,
21
25
  };
@@ -13,14 +13,23 @@ const { getRuntime, detectRuntime } = require( '../runtime' );
13
13
  /**
14
14
  * Displays the Docker & PHP logs on the given environment.
15
15
  *
16
- * @param {Object} options
17
- * @param {Object} options.environment The environment to run the command in (develop or tests).
18
- * @param {Object} options.watch If true, follow along with log output.
19
- * @param {Object} options.spinner A CLI spinner which indicates progress.
20
- * @param {boolean} options.debug True if debug mode is enabled.
16
+ * @param {Object} options
17
+ * @param {Object} options.environment The environment to run the command in (develop or tests).
18
+ * @param {Object} options.watch If true, follow along with log output.
19
+ * @param {Object} options.spinner A CLI spinner which indicates progress.
20
+ * @param {boolean} options.debug True if debug mode is enabled.
21
+ * @param {string|null} options.config Path to a custom .wp-env.json configuration file.
21
22
  */
22
- module.exports = async function logs( { environment, watch, spinner, debug } ) {
23
- const config = await loadConfig( path.resolve( '.' ) );
24
- const runtime = getRuntime( detectRuntime( config.workDirectoryPath ) );
23
+ module.exports = async function logs( {
24
+ environment,
25
+ watch,
26
+ spinner,
27
+ debug,
28
+ config: customConfigPath,
29
+ } ) {
30
+ const config = await loadConfig( path.resolve( '.' ), customConfigPath );
31
+ const runtime = getRuntime(
32
+ await detectRuntime( config.workDirectoryPath )
33
+ );
25
34
  await runtime.logs( config, { environment, watch, spinner, debug } );
26
35
  };
@@ -0,0 +1,46 @@
1
+ 'use strict';
2
+ /**
3
+ * External dependencies
4
+ */
5
+ const path = require( 'path' );
6
+
7
+ /**
8
+ * Internal dependencies
9
+ */
10
+ const { executeLifecycleScript } = require( '../execute-lifecycle-script' );
11
+ const { loadConfig } = require( '../config' );
12
+ const { getRuntime, detectRuntime } = require( '../runtime' );
13
+
14
+ /**
15
+ * @typedef {import('../wordpress').WPEnvironment} WPEnvironment
16
+ * @typedef {import('../wordpress').WPEnvironmentSelection} WPEnvironmentSelection
17
+ */
18
+
19
+ /**
20
+ * Resets the development server's database, the tests server's database, or both.
21
+ *
22
+ * @param {Object} options
23
+ * @param {WPEnvironmentSelection} options.environment The environment to reset. Either 'development', 'tests', or 'all'.
24
+ * @param {Object} options.spinner A CLI spinner which indicates progress.
25
+ * @param {boolean} options.scripts Indicates whether or not lifecycle scripts should be executed.
26
+ * @param {boolean} options.debug True if debug mode is enabled.
27
+ * @param {string|null} options.config Path to a custom .wp-env.json configuration file.
28
+ */
29
+ module.exports = async function reset( {
30
+ environment,
31
+ spinner,
32
+ scripts,
33
+ debug,
34
+ config: customConfigPath,
35
+ } ) {
36
+ const config = await loadConfig( path.resolve( '.' ), customConfigPath );
37
+ const runtime = getRuntime(
38
+ await detectRuntime( config.workDirectoryPath )
39
+ );
40
+
41
+ await runtime.clean( config, { environment, spinner, debug } );
42
+
43
+ if ( scripts ) {
44
+ await executeLifecycleScript( 'afterReset', config, spinner );
45
+ }
46
+ };
@@ -13,13 +13,14 @@ const { getRuntime, detectRuntime } = require( '../runtime' );
13
13
  /**
14
14
  * Runs an arbitrary command on the given Docker container.
15
15
  *
16
- * @param {Object} options
17
- * @param {string} options.container The Docker container to run the command on.
18
- * @param {string[]} options.command The command to run.
19
- * @param {string[]} options.'--' Any arguments that were passed after a double dash.
20
- * @param {string} options.envCwd The working directory for the command to be executed from.
21
- * @param {Object} options.spinner A CLI spinner which indicates progress.
22
- * @param {boolean} options.debug True if debug mode is enabled.
16
+ * @param {Object} options
17
+ * @param {string} options.container The Docker container to run the command on.
18
+ * @param {string[]} options.command The command to run.
19
+ * @param {string[]} options.'--' Any arguments that were passed after a double dash.
20
+ * @param {string} options.envCwd The working directory for the command to be executed from.
21
+ * @param {Object} options.spinner A CLI spinner which indicates progress.
22
+ * @param {boolean} options.debug True if debug mode is enabled.
23
+ * @param {string|null} options.config Path to a custom .wp-env.json configuration file.
23
24
  */
24
25
  module.exports = async function run( {
25
26
  container,
@@ -28,9 +29,12 @@ module.exports = async function run( {
28
29
  envCwd,
29
30
  spinner,
30
31
  debug,
32
+ config: customConfigPath,
31
33
  } ) {
32
- const config = await loadConfig( path.resolve( '.' ) );
33
- const runtime = getRuntime( detectRuntime( config.workDirectoryPath ) );
34
+ const config = await loadConfig( path.resolve( '.' ), customConfigPath );
35
+ const runtime = getRuntime(
36
+ await detectRuntime( config.workDirectoryPath )
37
+ );
34
38
 
35
39
  // Include any double dashed arguments in the command so that we can pass them to Docker.
36
40
  // This lets users pass options that the command defines without them being parsed.
@@ -12,7 +12,7 @@ const { rimraf } = require( 'rimraf' );
12
12
  */
13
13
  const { loadConfig } = require( '../config' );
14
14
  const { executeLifecycleScript } = require( '../execute-lifecycle-script' );
15
- const { getRuntime } = require( '../runtime' );
15
+ const { getRuntime, getSavedRuntime, saveRuntime } = require( '../runtime' );
16
16
 
17
17
  /**
18
18
  * @typedef {import('../config').WPConfig} WPConfig
@@ -21,14 +21,15 @@ const { getRuntime } = require( '../runtime' );
21
21
  /**
22
22
  * Starts the development server.
23
23
  *
24
- * @param {Object} options
25
- * @param {Object} options.spinner A CLI spinner which indicates progress.
26
- * @param {boolean} options.update If true, update sources.
27
- * @param {string} options.xdebug The Xdebug mode to set.
28
- * @param {string} options.spx The SPX mode to set.
29
- * @param {boolean} options.scripts Indicates whether or not lifecycle scripts should be executed.
30
- * @param {boolean} options.debug True if debug mode is enabled.
31
- * @param {string} options.runtime The runtime to use ('docker' or 'playground').
24
+ * @param {Object} options
25
+ * @param {Object} options.spinner A CLI spinner which indicates progress.
26
+ * @param {boolean} options.update If true, update sources.
27
+ * @param {string} options.xdebug The Xdebug mode to set.
28
+ * @param {string} options.spx The SPX mode to set.
29
+ * @param {boolean} options.scripts Indicates whether or not lifecycle scripts should be executed.
30
+ * @param {boolean} options.debug True if debug mode is enabled.
31
+ * @param {string} options.runtime The runtime to use ('docker' or 'playground').
32
+ * @param {string|null} options.config Path to a custom .wp-env.json configuration file.
32
33
  */
33
34
  module.exports = async function start( {
34
35
  spinner,
@@ -38,6 +39,7 @@ module.exports = async function start( {
38
39
  scripts,
39
40
  debug,
40
41
  runtime: runtimeName = 'docker',
42
+ config: customConfigPath,
41
43
  } ) {
42
44
  spinner.text = 'Reading configuration.';
43
45
 
@@ -48,9 +50,41 @@ module.exports = async function start( {
48
50
  await checkForLegacyInstall( spinner );
49
51
  }
50
52
 
51
- const config = await loadConfig( path.resolve( '.' ) );
53
+ const config = await loadConfig( path.resolve( '.' ), customConfigPath );
52
54
  config.debug = debug;
53
55
 
56
+ // Check if switching runtimes and prompt user to destroy old environment first.
57
+ const savedRuntime = await getSavedRuntime( config.workDirectoryPath );
58
+ if ( savedRuntime && savedRuntime !== runtimeName ) {
59
+ spinner.stop();
60
+ let shouldDestroy = false;
61
+ try {
62
+ shouldDestroy = await confirm( {
63
+ message: `Environment was previously started with '${ savedRuntime }' runtime. Destroy it and start with '${ runtimeName }'?`,
64
+ default: true,
65
+ } );
66
+ } catch ( error ) {
67
+ if ( error.name === 'ExitPromptError' ) {
68
+ console.log( 'Cancelled.' );
69
+ process.exit( 1 );
70
+ }
71
+ throw error;
72
+ }
73
+
74
+ if ( ! shouldDestroy ) {
75
+ spinner.fail(
76
+ `Aborted. Run 'wp-env destroy' manually or start with '--runtime=${ savedRuntime }'.`
77
+ );
78
+ process.exit( 1 );
79
+ }
80
+
81
+ // User confirmed - destroy old runtime first.
82
+ spinner.start();
83
+ spinner.text = `Destroying previous ${ savedRuntime } environment.`;
84
+ const oldRuntime = getRuntime( savedRuntime );
85
+ await oldRuntime.destroy( config, { spinner } );
86
+ }
87
+
54
88
  if ( ! config.detectedLocalConfig ) {
55
89
  const { configDirectoryPath } = config;
56
90
  spinner.warn(
@@ -59,10 +93,13 @@ module.exports = async function start( {
59
93
  spinner.start();
60
94
  }
61
95
 
62
- // Display Playground limitations info
63
- if ( runtimeName === 'playground' ) {
64
- spinner.info(
65
- 'Note: Playground runtime does not support a separate tests environment. Only the development environment will be started.\n'
96
+ if ( config.testsEnvironment !== false ) {
97
+ spinner.warn(
98
+ 'Warning: wp-env starts both development and tests environments by default.\n' +
99
+ 'This behavior is deprecated and will be removed in a future version.\n' +
100
+ 'To avoid this warning, add "testsEnvironment": false to your .wp-env.json.\n' +
101
+ 'The "env", "testsPort", and "testsEnvironment" options are also deprecated.\n' +
102
+ 'Use the --config option with a separate config file for test environments instead.\n'
66
103
  );
67
104
  spinner.start();
68
105
  }
@@ -76,6 +113,9 @@ module.exports = async function start( {
76
113
  spx,
77
114
  debug,
78
115
  } );
116
+
117
+ // Save the runtime type after successful start.
118
+ await saveRuntime( runtimeName, config.workDirectoryPath );
79
119
  } catch ( error ) {
80
120
  // Attempt to stop any partially-started environment so that
81
121
  // processes do not linger after a failed start.
@@ -0,0 +1,160 @@
1
+ 'use strict';
2
+ /**
3
+ * External dependencies
4
+ */
5
+ const path = require( 'path' );
6
+ const { existsSync } = require( 'fs' );
7
+ const chalk = require( 'chalk' );
8
+
9
+ /**
10
+ * Internal dependencies
11
+ */
12
+ const { loadConfig } = require( '../config' );
13
+ const { getRuntime, detectRuntime } = require( '../runtime' );
14
+
15
+ /**
16
+ * Check if an environment has been initialized by looking for runtime-specific files.
17
+ *
18
+ * @param {Object} config The wp-env configuration object.
19
+ * @return {boolean} True if the environment has been initialized.
20
+ */
21
+ function isEnvironmentInitialized( config ) {
22
+ // Check for Docker's docker-compose.yml
23
+ if ( existsSync( config.dockerComposeConfigPath ) ) {
24
+ return true;
25
+ }
26
+
27
+ // Check for Playground's blueprint file
28
+ const playgroundBlueprintPath = path.join(
29
+ config.workDirectoryPath,
30
+ 'playground-blueprint.json'
31
+ );
32
+ if ( existsSync( playgroundBlueprintPath ) ) {
33
+ return true;
34
+ }
35
+
36
+ return false;
37
+ }
38
+
39
+ /**
40
+ * Outputs the status of the wp-env environment.
41
+ *
42
+ * @param {Object} options
43
+ * @param {Object} options.spinner A CLI spinner which indicates progress.
44
+ * @param {boolean} options.debug True if debug mode is enabled.
45
+ * @param {boolean} options.json True to output as JSON.
46
+ * @param {string|null} options.config Path to a custom .wp-env.json configuration file.
47
+ */
48
+ module.exports = async function status( {
49
+ spinner,
50
+ debug,
51
+ json,
52
+ config: customConfigPath,
53
+ } ) {
54
+ spinner.text = 'Getting environment status.';
55
+
56
+ const config = await loadConfig( path.resolve( '.' ), customConfigPath );
57
+
58
+ // Check if environment is initialized by looking for runtime-specific files.
59
+ // We check for these files specifically because the work directory may exist
60
+ // just from caching the WordPress version, but these files are only created
61
+ // when `wp-env start` is actually run.
62
+ if ( ! isEnvironmentInitialized( config ) ) {
63
+ spinner.stop();
64
+ if ( json ) {
65
+ console.log(
66
+ JSON.stringify( {
67
+ status: 'uninitialized',
68
+ installPath: config.workDirectoryPath,
69
+ configPath: config.configDirectoryPath,
70
+ } )
71
+ );
72
+ } else {
73
+ console.log( formatNotInitialized( config ) );
74
+ }
75
+ return;
76
+ }
77
+
78
+ // Detect and get runtime.
79
+ const runtimeName = await detectRuntime( config.workDirectoryPath );
80
+ const runtime = getRuntime( runtimeName );
81
+
82
+ // Get status from runtime.
83
+ const statusData = await runtime.getStatus( config, { spinner, debug } );
84
+
85
+ spinner.stop();
86
+ if ( json ) {
87
+ console.log( JSON.stringify( statusData ) );
88
+ } else {
89
+ console.log( formatStatus( statusData ) );
90
+ }
91
+ };
92
+
93
+ /**
94
+ * Format status for human-readable output when not initialized.
95
+ *
96
+ * @param {Object} config The config object.
97
+ * @return {string} Formatted output.
98
+ */
99
+ function formatNotInitialized( config ) {
100
+ const indent = ' - ';
101
+ return `
102
+ ${ chalk.bold( 'status' ) }: ${ chalk.red( 'uninitialized' ) }
103
+ ${ indent }install path: ${ chalk.dim( config.workDirectoryPath ) }
104
+ ${ indent }config: ${ chalk.dim( config.configDirectoryPath ) }
105
+
106
+ ${ chalk.dim( 'Run `wp-env start` to initialize the environment.' ) }
107
+ `;
108
+ }
109
+
110
+ /**
111
+ * Format status data for human-readable output.
112
+ *
113
+ * @param {Object} status The status object from runtime.
114
+ * @return {string} Formatted output.
115
+ */
116
+ function formatStatus( status ) {
117
+ const statusColor = status.status === 'running' ? chalk.green : chalk.red;
118
+ const indent = ' - ';
119
+
120
+ let output = `
121
+ ${ chalk.bold( 'status' ) }: ${ statusColor( status.status ) }
122
+ ${ indent }runtime: ${ chalk.dim( status.runtime ) }
123
+ ${ indent }install path: ${ chalk.dim( status.installPath ) }
124
+ ${ indent }config: ${ chalk.dim( status.configPath ) }
125
+ `;
126
+
127
+ // Environment section.
128
+ output += `\n${ chalk.bold( 'environment' ) }:\n`;
129
+ if ( status.urls?.development ) {
130
+ output += `${ indent }url: ${ chalk.dim( status.urls.development ) }\n`;
131
+ }
132
+ output += `${ indent }multisite: ${ chalk.dim(
133
+ status.config?.multisite ? 'yes' : 'no'
134
+ ) }\n`;
135
+ output += `${ indent }xdebug: ${ chalk.dim(
136
+ status.config?.xdebug || 'off'
137
+ ) }\n`;
138
+ if ( status.ports?.development ) {
139
+ output += `${ indent }http port: ${ chalk.dim(
140
+ status.ports.development
141
+ ) }\n`;
142
+ }
143
+ if ( status.urls?.phpmyadmin ) {
144
+ output += `${ indent }phpmyadmin url: ${ chalk.dim(
145
+ status.urls.phpmyadmin
146
+ ) }\n`;
147
+ }
148
+ if ( status.ports?.mysql ) {
149
+ output += `${ indent }mysql port: ${ chalk.dim(
150
+ status.ports.mysql
151
+ ) }\n`;
152
+ }
153
+ if ( status.ports?.tests ) {
154
+ output += `${ indent }test http port: ${ chalk.dim(
155
+ status.ports.tests
156
+ ) }\n`;
157
+ }
158
+
159
+ return output;
160
+ }
@@ -13,12 +13,19 @@ const { getRuntime, detectRuntime } = require( '../runtime' );
13
13
  /**
14
14
  * Stops the development server.
15
15
  *
16
- * @param {Object} options
17
- * @param {Object} options.spinner A CLI spinner which indicates progress.
18
- * @param {boolean} options.debug True if debug mode is enabled.
16
+ * @param {Object} options
17
+ * @param {Object} options.spinner A CLI spinner which indicates progress.
18
+ * @param {boolean} options.debug True if debug mode is enabled.
19
+ * @param {string|null} options.config Path to a custom .wp-env.json configuration file.
19
20
  */
20
- module.exports = async function stop( { spinner, debug } ) {
21
- const config = await loadConfig( path.resolve( '.' ) );
22
- const runtime = getRuntime( detectRuntime( config.workDirectoryPath ) );
21
+ module.exports = async function stop( {
22
+ spinner,
23
+ debug,
24
+ config: customConfigPath,
25
+ } ) {
26
+ const config = await loadConfig( path.resolve( '.' ), customConfigPath );
27
+ const runtime = getRuntime(
28
+ await detectRuntime( config.workDirectoryPath )
29
+ );
23
30
  await runtime.stop( config, { spinner, debug } );
24
31
  };
@@ -23,7 +23,6 @@ const { checkPort, checkVersion, checkString } = require( './validate-config' );
23
23
  * @property {?number} phpmyadminPort An override for the development environment's phpMyAdmin port.
24
24
  * @property {?WPSource} coreSource An override for all environment's coreSource.
25
25
  * @property {?string} phpVersion An override for all environment's PHP version.
26
- * @property {?boolean} multisite An override for if environmen should be multisite.
27
26
  * @property {?Object.<string, string>} lifecycleScripts An override for various lifecycle scripts.
28
27
  */
29
28
 
@@ -69,10 +68,6 @@ module.exports = function getConfigFromEnvironmentVars( cacheDirectoryPath ) {
69
68
  environmentConfig.phpVersion = process.env.WP_ENV_PHP_VERSION;
70
69
  }
71
70
 
72
- if ( process.env.WP_ENV_MULTISITE ) {
73
- environmentConfig.multisite = !! process.env.WP_ENV_MULTISITE;
74
- }
75
-
76
71
  return environmentConfig;
77
72
  };
78
73
 
@@ -108,6 +103,8 @@ function getLifecycleScriptOverrides() {
108
103
  const lifecycleEnvironmentVars = {
109
104
  WP_ENV_LIFECYCLE_SCRIPT_AFTER_START: 'afterStart',
110
105
  WP_ENV_LIFECYCLE_SCRIPT_AFTER_CLEAN: 'afterClean',
106
+ WP_ENV_LIFECYCLE_SCRIPT_AFTER_RESET: 'afterReset',
107
+ WP_ENV_LIFECYCLE_SCRIPT_AFTER_CLEANUP: 'afterCleanup',
111
108
  WP_ENV_LIFECYCLE_SCRIPT_AFTER_DESTROY: 'afterDestroy',
112
109
  };
113
110
  for ( const envVar in lifecycleEnvironmentVars ) {