@automattic/vip 2.26.2 → 2.27.0-dev2
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 +0 -6
- package/automattic-vip-2.27.0-dev2.tgz +0 -0
- package/dist/bin/vip-dev-env-sync-sql.js +59 -0
- package/dist/bin/vip-dev-env-sync.js +21 -0
- package/dist/bin/vip-dev-env.js +1 -1
- package/npm-shrinkwrap.json +2 -2
- package/package.json +3 -1
- package/automattic-vip-2.26.2.tgz +0 -0
package/CHANGELOG.md
CHANGED
|
Binary file
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* @format
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* External dependencies
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Internal dependencies
|
|
14
|
+
*/
|
|
15
|
+
"use strict";
|
|
16
|
+
|
|
17
|
+
var _command = _interopRequireDefault(require("../lib/cli/command"));
|
|
18
|
+
var _devEnvironmentCore = require("../lib/dev-environment/dev-environment-core");
|
|
19
|
+
var _devEnvironmentLando = require("../lib/dev-environment/dev-environment-lando");
|
|
20
|
+
var _userError = _interopRequireDefault(require("../lib/user-error"));
|
|
21
|
+
var _devEnvSyncSql = require("../commands/dev-env-sync-sql");
|
|
22
|
+
var _devEnvironment = require("../lib/constants/dev-environment");
|
|
23
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
24
|
+
const examples = [{
|
|
25
|
+
usage: `${_devEnvironment.DEV_ENVIRONMENT_FULL_COMMAND} sync sql @my-test.develop --slug=my_site`,
|
|
26
|
+
description: 'Syncs with the `my-test` site\'s `develop` environment database into `my_site`'
|
|
27
|
+
}];
|
|
28
|
+
const appQuery = `
|
|
29
|
+
id,
|
|
30
|
+
name,
|
|
31
|
+
type,
|
|
32
|
+
organization { id, name },
|
|
33
|
+
environments{
|
|
34
|
+
id
|
|
35
|
+
appId
|
|
36
|
+
type
|
|
37
|
+
name
|
|
38
|
+
primaryDomain { name }
|
|
39
|
+
}
|
|
40
|
+
`;
|
|
41
|
+
(0, _command.default)({
|
|
42
|
+
appContext: true,
|
|
43
|
+
appQuery,
|
|
44
|
+
envContext: true,
|
|
45
|
+
requiredArgs: 0,
|
|
46
|
+
module: 'dev-env-sync-sql'
|
|
47
|
+
}).option('slug', 'Custom name of the dev environment').examples(examples).argv(process.argv, async (arg, {
|
|
48
|
+
app,
|
|
49
|
+
env,
|
|
50
|
+
slug
|
|
51
|
+
}) => {
|
|
52
|
+
const lando = await (0, _devEnvironmentLando.bootstrapLando)();
|
|
53
|
+
const envPath = (0, _devEnvironmentCore.getEnvironmentPath)(slug);
|
|
54
|
+
if (!(await (0, _devEnvironmentLando.isEnvUp)(lando, envPath))) {
|
|
55
|
+
throw new _userError.default('Environment needs to be started first');
|
|
56
|
+
}
|
|
57
|
+
const cmd = new _devEnvSyncSql.DevEnvSyncSQLCommand(app, env, slug);
|
|
58
|
+
await cmd.run();
|
|
59
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* @format
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* External dependencies
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Internal dependencies
|
|
14
|
+
*/
|
|
15
|
+
"use strict";
|
|
16
|
+
|
|
17
|
+
var _command = _interopRequireDefault(require("../lib/cli/command"));
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
+
(0, _command.default)({
|
|
20
|
+
requiredArgs: 1
|
|
21
|
+
}).command('sql', 'Sync local database with a production environment').argv(process.argv);
|
package/dist/bin/vip-dev-env.js
CHANGED
|
@@ -18,4 +18,4 @@ var _command = _interopRequireDefault(require("../lib/cli/command"));
|
|
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
19
|
(0, _command.default)({
|
|
20
20
|
requiredArgs: 1
|
|
21
|
-
}).command('create', 'Create a new local dev environment').command('update', 'Update an already created local dev environment').command('start', 'Start a local dev environment').command('stop', 'Stop a local dev environment').command('destroy', 'Remove containers, networks, volumes and configuration files of a local dev environment').command('info', 'Provides basic info about one or multiple local dev environments').command('list', 'Provides basic info about all local dev environments').command('exec', 'Execute an operation on a dev environment').command('import', 'Import data into a local WordPress environment').argv(process.argv);
|
|
21
|
+
}).command('create', 'Create a new local dev environment').command('update', 'Update an already created local dev environment').command('start', 'Start a local dev environment').command('stop', 'Stop a local dev environment').command('destroy', 'Remove containers, networks, volumes and configuration files of a local dev environment').command('info', 'Provides basic info about one or multiple local dev environments').command('list', 'Provides basic info about all local dev environments').command('exec', 'Execute an operation on a dev environment').command('import', 'Import data into a local WordPress environment').command('sync', 'Pull data from production to local development environment').argv(process.argv);
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automattic/vip",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.27.0-dev2",
|
|
4
4
|
"lockfileVersion": 2,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@automattic/vip",
|
|
9
|
-
"version": "2.26.
|
|
9
|
+
"version": "2.26.1",
|
|
10
10
|
"hasInstallScript": true,
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"dependencies": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automattic/vip",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.27.0-dev2",
|
|
4
4
|
"description": "The VIP Javascript library & CLI",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -31,6 +31,8 @@
|
|
|
31
31
|
"vip-dev-env-list": "dist/bin/vip-dev-env-list.js",
|
|
32
32
|
"vip-dev-env-start": "dist/bin/vip-dev-env-start.js",
|
|
33
33
|
"vip-dev-env-stop": "dist/bin/vip-dev-env-stop.js",
|
|
34
|
+
"vip-dev-env-sync": "dist/bin/vip-dev-env-sync.js",
|
|
35
|
+
"vip-dev-env-sync-sql": "dist/bin/vip-dev-env-sync-sql.js",
|
|
34
36
|
"vip-import": "dist/bin/vip-import.js",
|
|
35
37
|
"vip-import-media": "dist/bin/vip-import-media.js",
|
|
36
38
|
"vip-import-media-abort": "dist/bin/vip-import-media-abort.js",
|
|
Binary file
|