@automattic/vip 2.39.5 → 2.39.7
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/dist/bin/vip-app-deploy.js +22 -52
- package/dist/bin/vip-dev-env-create.js +0 -1
- package/dist/bin/vip-dev-env-info.js +11 -4
- package/dist/bin/vip-dev-env-shell.js +0 -1
- package/dist/bin/vip-dev-env-start.js +3 -0
- package/dist/bin/vip-dev-env-update.js +1 -2
- package/dist/lib/custom-deploy/custom-deploy.js +19 -14
- package/dist/lib/dev-environment/dev-environment-cli.js +4 -13
- package/dist/lib/dev-environment/dev-environment-configuration-file.js +2 -2
- package/dist/lib/dev-environment/dev-environment-core.js +1 -7
- package/dist/lib/dev-environment/dev-environment-lando.js +7 -4
- package/docs/CHANGELOG.md +20 -0
- package/npm-shrinkwrap.json +522 -704
- package/package.json +7 -7
|
@@ -26,38 +26,11 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
26
26
|
/**
|
|
27
27
|
* Internal dependencies
|
|
28
28
|
*/
|
|
29
|
-
const appQuery = `
|
|
30
|
-
id,
|
|
31
|
-
name,
|
|
32
|
-
type,
|
|
33
|
-
typeId
|
|
34
|
-
organization { id, name },
|
|
35
|
-
environments{
|
|
36
|
-
id
|
|
37
|
-
appId
|
|
38
|
-
type
|
|
39
|
-
name
|
|
40
|
-
launched
|
|
41
|
-
isK8sResident
|
|
42
|
-
syncProgress { status }
|
|
43
|
-
primaryDomain { name }
|
|
44
|
-
wpSites {
|
|
45
|
-
nodes {
|
|
46
|
-
homeUrl
|
|
47
|
-
id
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
`;
|
|
52
29
|
const START_DEPLOY_MUTATION = (0, _graphqlTag.default)`
|
|
53
30
|
mutation StartCustomDeploy($input: AppEnvironmentCustomDeployInput) {
|
|
54
31
|
startCustomDeploy(input: $input) {
|
|
55
|
-
app {
|
|
56
|
-
id
|
|
57
|
-
name
|
|
58
|
-
}
|
|
59
|
-
message
|
|
60
32
|
success
|
|
33
|
+
message
|
|
61
34
|
}
|
|
62
35
|
}
|
|
63
36
|
`;
|
|
@@ -90,21 +63,22 @@ async function appDeployCmd(arg = [], opts = {}) {
|
|
|
90
63
|
const env = opts.env;
|
|
91
64
|
const [fileName] = arg;
|
|
92
65
|
const fileMeta = await (0, _clientFileUploader.getFileMeta)(fileName);
|
|
93
|
-
const inputBasename = fileMeta.basename;
|
|
94
66
|
debug('Options: ', opts);
|
|
95
67
|
debug('Args: ', arg);
|
|
96
|
-
|
|
97
|
-
const
|
|
68
|
+
debug('Validating custom deploy key...');
|
|
69
|
+
const {
|
|
70
|
+
appId,
|
|
71
|
+
envId,
|
|
72
|
+
...validatedArgs
|
|
73
|
+
} = await (0, _customDeploy.validateCustomDeployKey)(app, env);
|
|
74
|
+
debug('Validated environment data: ', {
|
|
75
|
+
appId,
|
|
76
|
+
envId,
|
|
77
|
+
validatedArgs
|
|
78
|
+
});
|
|
98
79
|
const track = _tracker.trackEventWithEnv.bind(null, appId, envId);
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
error_type: 'unsupported-app'
|
|
102
|
-
});
|
|
103
|
-
exit.withError('The type of application you specified does not currently support deploys.');
|
|
104
|
-
}
|
|
105
|
-
debug('Validating custom deploy key if present...');
|
|
106
|
-
await (0, _customDeploy.validateCustomDeployKey)(envId);
|
|
107
|
-
await (0, _customDeploy.validateFile)(app, env, fileMeta);
|
|
80
|
+
debug('Validating file...');
|
|
81
|
+
await (0, _customDeploy.validateFile)(appId, envId, fileMeta);
|
|
108
82
|
await track('deploy_app_command_execute');
|
|
109
83
|
|
|
110
84
|
// Upload file as different name to avoid overwriting existing same named files
|
|
@@ -114,13 +88,12 @@ async function appDeployCmd(arg = [], opts = {}) {
|
|
|
114
88
|
fileMeta.basename = `${datePrefix}-${fileMeta.basename}`;
|
|
115
89
|
const deployMessage = opts.message ?? '';
|
|
116
90
|
const forceDeploy = opts.force;
|
|
117
|
-
const domain = env?.primaryDomain?.name ? env.primaryDomain.name : `#${env.id}`;
|
|
118
91
|
if (!forceDeploy) {
|
|
119
92
|
const promptParams = {
|
|
120
|
-
launched: Boolean(
|
|
121
|
-
formattedEnvironment: (0, _format.formatEnvironment)(
|
|
93
|
+
launched: Boolean(validatedArgs.launched),
|
|
94
|
+
formattedEnvironment: (0, _format.formatEnvironment)(validatedArgs.envType),
|
|
122
95
|
track,
|
|
123
|
-
domain
|
|
96
|
+
domain: validatedArgs.primaryDomainName
|
|
124
97
|
};
|
|
125
98
|
await promptToContinue(promptParams);
|
|
126
99
|
}
|
|
@@ -185,8 +158,8 @@ Processing the file for deployment to your environment...
|
|
|
185
158
|
result
|
|
186
159
|
} = await (0, _clientFileUploader.uploadImportSqlFileToS3)(uploadParams);
|
|
187
160
|
startDeployVariables.input = {
|
|
188
|
-
id:
|
|
189
|
-
environmentId:
|
|
161
|
+
id: appId,
|
|
162
|
+
environmentId: envId,
|
|
190
163
|
basename: fileMeta.basename,
|
|
191
164
|
checksum,
|
|
192
165
|
deployMessage
|
|
@@ -240,8 +213,8 @@ Processing the file for deployment to your environment...
|
|
|
240
213
|
progressTracker.print({
|
|
241
214
|
clearAfter: true
|
|
242
215
|
});
|
|
243
|
-
const deploymentsUrl = `https://dashboard.wpvip.com/apps/${appId}/${
|
|
244
|
-
console.log(`\n✅ ${_chalk.default.bold(_chalk.default.underline(_chalk.default.magenta(
|
|
216
|
+
const deploymentsUrl = `https://dashboard.wpvip.com/apps/${appId}/${validatedArgs.envUniqueLabel}/code/deployments`;
|
|
217
|
+
console.log(`\n✅ ${_chalk.default.bold(_chalk.default.underline(_chalk.default.magenta(fileMeta.basename)))} has been sent for deployment to ${_chalk.default.bold(_chalk.default.blue(validatedArgs.primaryDomainName))}. \nTo check deployment status, go to ${_chalk.default.bold('VIP Dashboard')}: ${deploymentsUrl}`);
|
|
245
218
|
}
|
|
246
219
|
|
|
247
220
|
// Command examples for the `vip deploy app` help prompt
|
|
@@ -258,8 +231,5 @@ const examples = [
|
|
|
258
231
|
description: 'Deploy the given compressed file to your site without prompting'
|
|
259
232
|
}];
|
|
260
233
|
void (0, _command.default)({
|
|
261
|
-
appContext: true,
|
|
262
|
-
appQuery,
|
|
263
|
-
envContext: true,
|
|
264
234
|
requiredArgs: 1
|
|
265
|
-
}).examples(examples).option('message', 'Custom message for deploy').option('force', 'Skip prompt').argv(process.argv, appDeployCmd);
|
|
235
|
+
}).examples(examples).option('message', 'Custom message for deploy').option('force', 'Skip prompt').option('app', 'The application name or ID').option('env', 'The environment name or ID').argv(process.argv, appDeployCmd);
|
|
@@ -53,7 +53,6 @@ cmd.argv(process.argv, async (arg, opt) => {
|
|
|
53
53
|
const lando = await (0, _devEnvironmentLando.bootstrapLando)();
|
|
54
54
|
await (0, _devEnvironmentCli.validateDependencies)(lando, slug);
|
|
55
55
|
debug('Args: ', arg, 'Options: ', opt);
|
|
56
|
-
(0, _devEnvironmentCli.handleDeprecatedOptions)(opt);
|
|
57
56
|
const trackingInfo = {
|
|
58
57
|
slug,
|
|
59
58
|
app: opt.app,
|
|
@@ -18,12 +18,19 @@ const examples = [{
|
|
|
18
18
|
description: 'Return information about a local dev environment named "my_site"'
|
|
19
19
|
}];
|
|
20
20
|
(0, _command.default)().option('slug', 'Custom name of the dev environment', undefined, _devEnvironmentCli.processSlug).option('all', 'Show Info for all local dev environments').option('extended', 'Show extended information about the dev environment').examples(examples).argv(process.argv, async (arg, opt) => {
|
|
21
|
-
|
|
21
|
+
let trackingInfo;
|
|
22
|
+
let slug;
|
|
22
23
|
const lando = await (0, _devEnvironmentLando.bootstrapLando)();
|
|
24
|
+
if (opt.all) {
|
|
25
|
+
trackingInfo = {
|
|
26
|
+
all: true
|
|
27
|
+
};
|
|
28
|
+
slug = '';
|
|
29
|
+
} else {
|
|
30
|
+
slug = await (0, _devEnvironmentCli.getEnvironmentName)(opt);
|
|
31
|
+
trackingInfo = (0, _devEnvironmentCli.getEnvTrackingInfo)(slug);
|
|
32
|
+
}
|
|
23
33
|
await (0, _devEnvironmentCli.validateDependencies)(lando, slug);
|
|
24
|
-
const trackingInfo = opt.all ? {
|
|
25
|
-
all: true
|
|
26
|
-
} : (0, _devEnvironmentCli.getEnvTrackingInfo)(slug);
|
|
27
34
|
await (0, _tracker.trackEvent)('dev_env_info_command_execute', trackingInfo);
|
|
28
35
|
debug('Args: ', arg, 'Options: ', opt);
|
|
29
36
|
try {
|
|
@@ -22,8 +22,11 @@ const examples = [{
|
|
|
22
22
|
const lando = await (0, _devEnvironmentLando.bootstrapLando)();
|
|
23
23
|
await (0, _devEnvironmentCli.validateDependencies)(lando, slug);
|
|
24
24
|
const startProcessing = new Date();
|
|
25
|
+
const versions = await lando.engine.daemon.getVersions();
|
|
25
26
|
const trackingInfo = (0, _devEnvironmentCli.getEnvTrackingInfo)(slug);
|
|
26
27
|
trackingInfo.vscode = Boolean(opt.vscode);
|
|
28
|
+
trackingInfo.docker = versions.engine;
|
|
29
|
+
trackingInfo.docker_compose = versions.compose;
|
|
27
30
|
await (0, _tracker.trackEvent)('dev_env_start_command_execute', trackingInfo);
|
|
28
31
|
debug('Args: ', arg, 'Options: ', opt);
|
|
29
32
|
const options = {
|
|
@@ -21,7 +21,6 @@ const cmd = (0, _command.default)().option('slug', 'Custom name of the dev envir
|
|
|
21
21
|
cmd.examples(examples);
|
|
22
22
|
cmd.argv(process.argv, async (arg, opt) => {
|
|
23
23
|
const slug = await (0, _devEnvironmentCli.getEnvironmentName)(opt);
|
|
24
|
-
(0, _devEnvironmentCli.handleDeprecatedOptions)(opt);
|
|
25
24
|
const lando = await (0, _devEnvironmentLando.bootstrapLando)();
|
|
26
25
|
await (0, _devEnvironmentCli.validateDependencies)(lando, slug);
|
|
27
26
|
const trackingInfo = (0, _devEnvironmentCli.getEnvTrackingInfo)(slug);
|
|
@@ -54,7 +53,7 @@ cmd.argv(process.argv, async (arg, opt) => {
|
|
|
54
53
|
mariadb: currentInstanceData.mariadb,
|
|
55
54
|
phpmyadmin: currentInstanceData.phpmyadmin,
|
|
56
55
|
xdebug: currentInstanceData.xdebug,
|
|
57
|
-
mailpit: currentInstanceData.mailpit
|
|
56
|
+
mailpit: currentInstanceData.mailpit,
|
|
58
57
|
photon: currentInstanceData.photon,
|
|
59
58
|
mediaRedirectDomain: currentInstanceData.mediaRedirectDomain,
|
|
60
59
|
multisite: false,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
|
-
exports.isSupportedApp = isSupportedApp;
|
|
5
4
|
exports.validateCustomDeployKey = validateCustomDeployKey;
|
|
6
5
|
exports.validateFile = validateFile;
|
|
7
6
|
var _fs = _interopRequireDefault(require("fs"));
|
|
@@ -10,7 +9,6 @@ var _api = _interopRequireDefault(require("../../lib/api"));
|
|
|
10
9
|
var exit = _interopRequireWildcard(require("../../lib/cli/exit"));
|
|
11
10
|
var _clientFileUploader = require("../../lib/client-file-uploader");
|
|
12
11
|
var _fileSize = require("../../lib/constants/file-size");
|
|
13
|
-
var _vipgo = require("../../lib/constants/vipgo");
|
|
14
12
|
var _tracker = require("../../lib/tracker");
|
|
15
13
|
var _customDeploy = require("../../lib/validations/custom-deploy");
|
|
16
14
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
@@ -18,23 +16,28 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
18
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
17
|
const DEPLOY_MAX_FILE_SIZE = 4 * _fileSize.GB_IN_BYTES;
|
|
20
18
|
const WPVIP_DEPLOY_TOKEN = process.env.WPVIP_DEPLOY_TOKEN;
|
|
21
|
-
function
|
|
22
|
-
return _vipgo.WORDPRESS_SITE_TYPE_IDS.includes(app.typeId);
|
|
23
|
-
}
|
|
24
|
-
async function validateCustomDeployKey(envId) {
|
|
19
|
+
async function validateCustomDeployKey(app, env) {
|
|
25
20
|
if (!WPVIP_DEPLOY_TOKEN) {
|
|
26
21
|
exit.withError('Valid custom deploy key is required.');
|
|
27
22
|
}
|
|
28
23
|
const VALIDATE_CUSTOM_DEPLOY_ACCESS_MUTATION = (0, _graphqlTag.default)`
|
|
29
24
|
mutation ValidateCustomDeployAccess {
|
|
30
|
-
validateCustomDeployAccess( input: {
|
|
31
|
-
success
|
|
25
|
+
validateCustomDeployAccess( input: { app: "${String(app)}", env: "${String(env)}" } ) {
|
|
26
|
+
success,
|
|
27
|
+
appId,
|
|
28
|
+
envId,
|
|
29
|
+
envType,
|
|
30
|
+
envUniqueLabel,
|
|
31
|
+
primaryDomainName,
|
|
32
|
+
launched
|
|
32
33
|
}
|
|
33
34
|
}
|
|
34
35
|
`;
|
|
35
|
-
const api = (0, _api.default)(
|
|
36
|
+
const api = (0, _api.default)({
|
|
37
|
+
exitOnError: true
|
|
38
|
+
});
|
|
36
39
|
try {
|
|
37
|
-
await api.mutate({
|
|
40
|
+
const result = await api.mutate({
|
|
38
41
|
mutation: VALIDATE_CUSTOM_DEPLOY_ACCESS_MUTATION,
|
|
39
42
|
context: {
|
|
40
43
|
headers: {
|
|
@@ -42,22 +45,24 @@ async function validateCustomDeployKey(envId) {
|
|
|
42
45
|
}
|
|
43
46
|
}
|
|
44
47
|
});
|
|
48
|
+
if (!result.data?.validateCustomDeployAccess) {
|
|
49
|
+
throw new Error('Not found');
|
|
50
|
+
}
|
|
51
|
+
return result.data?.validateCustomDeployAccess;
|
|
45
52
|
} catch (error) {
|
|
46
|
-
exit.withError(`Unauthorized: Invalid or non-existent custom deploy key for environment
|
|
53
|
+
exit.withError(`Unauthorized: Invalid or non-existent custom deploy key for environment.`);
|
|
47
54
|
}
|
|
48
55
|
}
|
|
49
56
|
|
|
50
57
|
/**
|
|
51
58
|
* @param {FileMeta} fileMeta
|
|
52
59
|
*/
|
|
53
|
-
async function validateFile(
|
|
60
|
+
async function validateFile(appId, envId, fileMeta) {
|
|
54
61
|
const {
|
|
55
62
|
fileName,
|
|
56
63
|
basename,
|
|
57
64
|
isCompressed
|
|
58
65
|
} = fileMeta;
|
|
59
|
-
const appId = env.appId;
|
|
60
|
-
const envId = env.id;
|
|
61
66
|
const track = _tracker.trackEventWithEnv.bind(null, appId, envId);
|
|
62
67
|
if (!_fs.default.existsSync(fileName)) {
|
|
63
68
|
await track('deploy_app_command_error', {
|
|
@@ -9,7 +9,6 @@ exports.getEnvironmentStartCommand = getEnvironmentStartCommand;
|
|
|
9
9
|
exports.getOptionsFromAppInfo = getOptionsFromAppInfo;
|
|
10
10
|
exports.getTagChoices = getTagChoices;
|
|
11
11
|
exports.handleCLIException = handleCLIException;
|
|
12
|
-
exports.handleDeprecatedOptions = handleDeprecatedOptions;
|
|
13
12
|
exports.postStart = postStart;
|
|
14
13
|
exports.printTable = printTable;
|
|
15
14
|
exports.processBooleanOption = processBooleanOption;
|
|
@@ -434,7 +433,8 @@ function promptForBoolean(message, initial) {
|
|
|
434
433
|
if (isStdinTTY) {
|
|
435
434
|
const confirm = new _enquirer.Confirm({
|
|
436
435
|
message,
|
|
437
|
-
|
|
436
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any,@typescript-eslint/no-unsafe-assignment
|
|
437
|
+
initial: initial // TS definition is wrong, so we need to bypass it to show the correct hint.
|
|
438
438
|
});
|
|
439
439
|
return confirm.run();
|
|
440
440
|
}
|
|
@@ -606,7 +606,7 @@ function processVersionOption(value) {
|
|
|
606
606
|
}
|
|
607
607
|
function addDevEnvConfigurationOptions(command) {
|
|
608
608
|
// We leave the third parameter to undefined on some because the defaults are handled in preProcessInstanceData()
|
|
609
|
-
return command.option('wordpress', 'Use a specific WordPress version', undefined, processVersionOption).option(['u', 'mu-plugins'], 'Use a specific mu-plugins changeset or local directory').option('app-code', 'Use the application code from a local directory or use "demo" for VIP skeleton code').option('phpmyadmin', 'Enable PHPMyAdmin component. By default it is disabled', undefined, processBooleanOption).option('xdebug', 'Enable XDebug. By default it is disabled', undefined, processBooleanOption).option('xdebug_config', 'Extra configuration to pass to xdebug via XDEBUG_CONFIG environment variable').option('elasticsearch', 'Enable Elasticsearch (needed by Enterprise Search)', undefined, processBooleanOption).option(['r', 'media-redirect-domain'], 'Domain to redirect for missing media files. This can be used to still have images without the need to import them locally.').option('php', 'Explicitly choose PHP version to use', undefined, processVersionOption).option(['
|
|
609
|
+
return command.option('wordpress', 'Use a specific WordPress version', undefined, processVersionOption).option(['u', 'mu-plugins'], 'Use a specific mu-plugins changeset or local directory').option('app-code', 'Use the application code from a local directory or use "demo" for VIP skeleton code').option('phpmyadmin', 'Enable PHPMyAdmin component. By default it is disabled', undefined, processBooleanOption).option('xdebug', 'Enable XDebug. By default it is disabled', undefined, processBooleanOption).option('xdebug_config', 'Extra configuration to pass to xdebug via XDEBUG_CONFIG environment variable').option('elasticsearch', 'Enable Elasticsearch (needed by Enterprise Search)', undefined, processBooleanOption).option(['r', 'media-redirect-domain'], 'Domain to redirect for missing media files. This can be used to still have images without the need to import them locally.').option('php', 'Explicitly choose PHP version to use', undefined, processVersionOption).option(['A', 'mailpit'], 'Enable Mailpit. By default it is disabled', undefined, processBooleanOption).option(['H', 'photon'], 'Enable Photon. By default it is disabled', undefined, processBooleanOption);
|
|
610
610
|
}
|
|
611
611
|
|
|
612
612
|
/**
|
|
@@ -704,13 +704,4 @@ const getVSCodeExecutable = () => {
|
|
|
704
704
|
debug(`Could not find ${candidate} in path`);
|
|
705
705
|
}
|
|
706
706
|
return null;
|
|
707
|
-
};
|
|
708
|
-
function handleDeprecatedOptions(opts) {
|
|
709
|
-
if (opts.mailhog) {
|
|
710
|
-
console.warn(_chalk.default.yellow('Warning: --mailhog is deprecated and will be removed in a future release. Please use --mailpit instead.'));
|
|
711
|
-
if (opts.mailpit === undefined) {
|
|
712
|
-
opts.mailpit = opts.mailhog;
|
|
713
|
-
}
|
|
714
|
-
delete opts.mailhog;
|
|
715
|
-
}
|
|
716
|
-
}
|
|
707
|
+
};
|
|
@@ -81,7 +81,7 @@ function sanitizeConfiguration(configuration, configurationFilePath) {
|
|
|
81
81
|
elasticsearch: stringToBooleanIfDefined(configuration.elasticsearch),
|
|
82
82
|
phpmyadmin: stringToBooleanIfDefined(configuration.phpmyadmin),
|
|
83
83
|
xdebug: stringToBooleanIfDefined(configuration.xdebug),
|
|
84
|
-
mailpit: stringToBooleanIfDefined(configuration.mailpit
|
|
84
|
+
mailpit: stringToBooleanIfDefined(configuration.mailpit),
|
|
85
85
|
'media-redirect-domain': configuration['media-redirect-domain']?.toString(),
|
|
86
86
|
photon: stringToBooleanIfDefined(configuration.photon),
|
|
87
87
|
meta: configurationMeta
|
|
@@ -119,7 +119,7 @@ function mergeConfigurationFileOptions(preselectedOptions, configurationFileOpti
|
|
|
119
119
|
phpmyadmin: configurationFileOptions.phpmyadmin,
|
|
120
120
|
xdebug: configurationFileOptions.xdebug,
|
|
121
121
|
xdebugConfig: configurationFileOptions['xdebug-config'],
|
|
122
|
-
mailpit: configurationFileOptions.mailpit
|
|
122
|
+
mailpit: configurationFileOptions.mailpit,
|
|
123
123
|
mediaRedirectDomain: configurationFileOptions['media-redirect-domain'],
|
|
124
124
|
photon: configurationFileOptions.photon
|
|
125
125
|
};
|
|
@@ -153,9 +153,7 @@ function preProcessInstanceData(instanceData) {
|
|
|
153
153
|
}
|
|
154
154
|
|
|
155
155
|
// Mailpit migration
|
|
156
|
-
|
|
157
|
-
newInstanceData.mailpit = newInstanceData.mailhog ?? false;
|
|
158
|
-
}
|
|
156
|
+
newInstanceData.mailpit ??= false;
|
|
159
157
|
|
|
160
158
|
// MariaDB migration
|
|
161
159
|
if (!newInstanceData.mariadb) {
|
|
@@ -308,10 +306,6 @@ function readEnvironmentData(slug) {
|
|
|
308
306
|
// clientCode was renamed to appCode
|
|
309
307
|
instanceData.appCode = instanceData.clientCode;
|
|
310
308
|
}
|
|
311
|
-
if (instanceData.mailhog) {
|
|
312
|
-
instanceData.mailpit = instanceData.mailhog;
|
|
313
|
-
delete instanceData.mailhog;
|
|
314
|
-
}
|
|
315
309
|
return instanceData;
|
|
316
310
|
}
|
|
317
311
|
|
|
@@ -23,12 +23,14 @@ var _build = _interopRequireDefault(require("lando/plugins/lando-tooling/lib/bui
|
|
|
23
23
|
var _promises = require("node:dns/promises");
|
|
24
24
|
var _promises2 = require("node:fs/promises");
|
|
25
25
|
var _nodeOs = require("node:os");
|
|
26
|
-
var _nodePath =
|
|
26
|
+
var _nodePath = _interopRequireWildcard(require("node:path"));
|
|
27
27
|
var _xdgBasedir = _interopRequireDefault(require("xdg-basedir"));
|
|
28
28
|
var _devEnvironmentCore = require("./dev-environment-core");
|
|
29
29
|
var _dockerUtils = require("./docker-utils");
|
|
30
30
|
var _devEnvironment = require("../constants/dev-environment");
|
|
31
31
|
var _userError = _interopRequireDefault(require("../user-error"));
|
|
32
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
33
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
32
34
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
33
35
|
/**
|
|
34
36
|
* This file will hold all the interactions with lando library
|
|
@@ -40,9 +42,10 @@ const debug = (0, _debug.default)(DEBUG_KEY);
|
|
|
40
42
|
* @return {Promise<LandoConfig>} Lando configuration
|
|
41
43
|
*/
|
|
42
44
|
async function getLandoConfig() {
|
|
43
|
-
|
|
44
|
-
const landoPath = _nodePath.
|
|
45
|
-
|
|
45
|
+
// The path will be smth like `yarn/global/node_modules/lando/lib/lando.js`; we need the path up to `lando` (inclusive)
|
|
46
|
+
const landoPath = (0, _nodePath.dirname)((0, _nodePath.dirname)(require.resolve('lando')));
|
|
47
|
+
// The path will be smth like `yarn/global/node_modules/@lando/compose/index.js`; we need the path up to `@lando` (inclusive)
|
|
48
|
+
const atLandoPath = (0, _nodePath.dirname)((0, _nodePath.dirname)(require.resolve('@lando/compose')));
|
|
46
49
|
debug(`Getting Lando config, using paths '${landoPath}' and '${atLandoPath}' for plugins`);
|
|
47
50
|
const isLandoDebugSelected = _debug.default.enabled(DEBUG_KEY);
|
|
48
51
|
const isAllDebugSelected = _debug.default.enabled('"*"');
|
package/docs/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
## Changelog
|
|
2
2
|
|
|
3
|
+
### 2.39.7
|
|
4
|
+
|
|
5
|
+
* Fix promptForBoolean to display the default initial value capitalized
|
|
6
|
+
* fix(dev-env): `vip dev-env info --all` should not ask for a slug
|
|
7
|
+
* build(deps-dev): bump rimraf from 5.0.5 to 5.0.7
|
|
8
|
+
* build(deps): bump cli-table3 from 0.6.4 to 0.6.5
|
|
9
|
+
* build(deps): bump semver from 7.6.0 to 7.6.2
|
|
10
|
+
* build(deps-dev): bump @types/node from 18.19.31 to 18.19.33
|
|
11
|
+
* build(deps-dev): bump @automattic/eslint-plugin-wpvip from 0.9.1 to 0.10/1832
|
|
12
|
+
* build(deps-dev): bump @automattic/eslint-plugin-wpvip from 0.10.0 to 0.11l/1835
|
|
13
|
+
* fix(dev-env): plugin loading when using yarn to install VIP CLI
|
|
14
|
+
* feat(dev-env): track versions of `docker` and `docker-compose`
|
|
15
|
+
|
|
16
|
+
**Full Changelog**: https://github.com/Automattic/vip-cli/compare/2.39.6...2.39.7
|
|
17
|
+
|
|
18
|
+
### 2.39.6
|
|
19
|
+
* Custom Deploys: Update deploy validation to run fully off of the custom deploy token. There are breaking changes associated with these updates, so the VIP CLI must be updated to this latest version in order to continue using the custom deploy functionality.
|
|
20
|
+
|
|
21
|
+
**Full Changelog**: https://github.com/Automattic/vip-cli/compare/2.39.5...2.39.6
|
|
22
|
+
|
|
3
23
|
### 2.39.5
|
|
4
24
|
* Custom Deploys: Pass in deploy token to StartCustomDeploy mutation and allow `getSignedUploadRequestData()` to accept another bearer token
|
|
5
25
|
|