@automattic/vip 2.28.3 → 2.29.0-dev1
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/automattic-vip-2.29.0-dev1.tgz +0 -0
- package/dist/bin/vip-export-sql.js +51 -0
- package/dist/bin/vip-export.js +17 -0
- package/dist/bin/vip.js +1 -1
- package/npm-shrinkwrap.json +2 -1
- package/package.json +3 -1
|
Binary file
|
|
@@ -0,0 +1,51 @@
|
|
|
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 _exportSql = require("../commands/export-sql");
|
|
19
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
20
|
+
const examples = [{
|
|
21
|
+
usage: 'vip export sql @mysite.develop --output=/home/user/export.sql.gz',
|
|
22
|
+
description: 'Export SQL file from your site and save it to the specified location'
|
|
23
|
+
}];
|
|
24
|
+
const appQuery = `
|
|
25
|
+
id,
|
|
26
|
+
name,
|
|
27
|
+
type,
|
|
28
|
+
organization { id, name },
|
|
29
|
+
environments{
|
|
30
|
+
id
|
|
31
|
+
appId
|
|
32
|
+
type
|
|
33
|
+
name
|
|
34
|
+
primaryDomain { name }
|
|
35
|
+
}
|
|
36
|
+
`;
|
|
37
|
+
(0, _command.default)({
|
|
38
|
+
appContext: true,
|
|
39
|
+
appQuery,
|
|
40
|
+
envContext: true,
|
|
41
|
+
module: 'export-sql',
|
|
42
|
+
requiredArgs: 0,
|
|
43
|
+
usage: 'vip export sql'
|
|
44
|
+
}).option('output', 'Specify the location where you want to save the export file').examples(examples).argv(process.argv, async (arg, {
|
|
45
|
+
app,
|
|
46
|
+
env,
|
|
47
|
+
output
|
|
48
|
+
}) => {
|
|
49
|
+
const exportCommand = new _exportSql.ExportSQLCommand(app, env, output);
|
|
50
|
+
await exportCommand.run();
|
|
51
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* External dependencies
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Internal dependencies
|
|
9
|
+
*/
|
|
10
|
+
"use strict";
|
|
11
|
+
|
|
12
|
+
var _command = _interopRequireDefault(require("../lib/cli/command"));
|
|
13
|
+
var _tracker = require("../lib/tracker");
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
(0, _command.default)().command('sql', 'Import SQL to your database from a file').example('vip export sql @mysite.develop', 'Export SQL file from your site').argv(process.argv, async () => {
|
|
16
|
+
await (0, _tracker.trackEvent)('vip_export_command_execute');
|
|
17
|
+
});
|
package/dist/bin/vip.js
CHANGED
|
@@ -33,7 +33,7 @@ const runCmd = async function () {
|
|
|
33
33
|
cmd.command('logout', 'Logout from your current session', async () => {
|
|
34
34
|
await (0, _logout.default)();
|
|
35
35
|
console.log('You are successfully logged out.');
|
|
36
|
-
}).command('app', 'List and modify your VIP applications').command('cache', 'Manage page cache for your VIP applications').command('config', 'Set configuration for your VIP applications').command('dev-env', 'Use local dev-environment').command('import', 'Import media or SQL files into your VIP applications').command('logs', 'Get logs from your VIP applications').command('search-replace', 'Perform search and replace tasks on files').command('sync', 'Sync production to a development environment').command('whoami', 'Display details about the currently logged-in user').command('validate', 'Validate your VIP application and environment').command('wp', 'Run WP CLI commands against an environment');
|
|
36
|
+
}).command('app', 'List and modify your VIP applications').command('cache', 'Manage page cache for your VIP applications').command('config', 'Set configuration for your VIP applications').command('dev-env', 'Use local dev-environment').command('export', 'Export data from your VIP application').command('import', 'Import media or SQL files into your VIP applications').command('logs', 'Get logs from your VIP applications').command('search-replace', 'Perform search and replace tasks on files').command('sync', 'Sync production to a development environment').command('whoami', 'Display details about the currently logged-in user').command('validate', 'Validate your VIP application and environment').command('wp', 'Run WP CLI commands against an environment');
|
|
37
37
|
cmd.argv(process.argv);
|
|
38
38
|
};
|
|
39
39
|
function doesArgvHaveAtLeastOneParam(argv, params) {
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automattic/vip",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.29.0-dev1",
|
|
4
4
|
"lockfileVersion": 2,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
@@ -75,6 +75,7 @@
|
|
|
75
75
|
"vip-dev-env-start": "dist/bin/vip-dev-env-start.js",
|
|
76
76
|
"vip-dev-env-stop": "dist/bin/vip-dev-env-stop.js",
|
|
77
77
|
"vip-dev-env-update": "dist/bin/vip-dev-env-update.js",
|
|
78
|
+
"vip-export-sql": "dist/bin/vip-export-sql.js",
|
|
78
79
|
"vip-import": "dist/bin/vip-import.js",
|
|
79
80
|
"vip-import-media": "dist/bin/vip-import-media.js",
|
|
80
81
|
"vip-import-media-abort": "dist/bin/vip-import-media-abort.js",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automattic/vip",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.29.0-dev1",
|
|
4
4
|
"description": "The VIP Javascript library & CLI",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -33,6 +33,8 @@
|
|
|
33
33
|
"vip-dev-env-start": "dist/bin/vip-dev-env-start.js",
|
|
34
34
|
"vip-dev-env-stop": "dist/bin/vip-dev-env-stop.js",
|
|
35
35
|
"vip-dev-env-logs": "dist/bin/vip-dev-env-logs.js",
|
|
36
|
+
"vip-export": "dist/bin/vip-export.js",
|
|
37
|
+
"vip-export-sql": "dist/bin/vip-export-sql.js",
|
|
36
38
|
"vip-import": "dist/bin/vip-import.js",
|
|
37
39
|
"vip-import-media": "dist/bin/vip-import-media.js",
|
|
38
40
|
"vip-import-media-abort": "dist/bin/vip-import-media-abort.js",
|