@automattic/vip 4.0.2 → 4.0.5
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/AGENTS.md +2 -0
- package/dist/bin/vip-app-deploy-token-generate.js +102 -0
- package/dist/bin/vip-app-deploy-token.js +20 -0
- package/dist/bin/vip-app-deploy.js +7 -1
- package/dist/bin/vip-app.js +1 -1
- package/dist/bin/vip-dev-env-update.js +1 -5
- package/dist/commands/dev-env-import-sql.js +4 -1
- package/dist/commands/dev-env-sync-sql.js +3 -4
- package/dist/lib/analytics/clients/tracks.js +2 -2
- package/dist/lib/api/http.js +19 -14
- package/dist/lib/api.js +1 -2
- package/dist/lib/cli/command.js +37 -1
- package/dist/lib/cli/internal-bin-loader.js +2 -0
- package/dist/lib/client-file-uploader.js +33 -14
- package/dist/lib/custom-deploy/custom-deploy.js +37 -0
- package/dist/lib/dev-environment/dev-environment-core.js +5 -5
- package/dist/lib/dev-environment/dev-environment-lando.js +7 -3
- package/dist/lib/http/download-file.js +6 -1
- package/dist/lib/http/proxy-dispatcher.js +97 -0
- package/dist/lib/keychain/secure.js +4 -4
- package/dist/lib/keychain.js +1 -1
- package/dist/lib/media-import/status.js +6 -1
- package/dist/lib/retry.js +3 -2
- package/dist/lib/search-and-replace.js +3 -4
- package/dist/lib/validations/custom-deploy.js +60 -4
- package/dist/lib/validations/line-by-line.js +4 -9
- package/dist/lib/validations/sql.js +2 -2
- package/docs/COMMANDER-MIGRATION.md +1 -0
- package/docs/RELEASING.md +2 -0
- package/docs/TESTING.md +16 -1
- package/helpers/build-sea.js +2 -2
- package/helpers/release-smoke-test.js +869 -0
- package/npm-shrinkwrap.json +864 -1092
- package/package.json +22 -17
- package/test-utils/undici-mock.js +25 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automattic/vip",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.5",
|
|
4
4
|
"description": "The VIP Javascript library & CLI",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
"vip-app": "dist/bin/vip-app.js",
|
|
9
9
|
"vip-app-list": "dist/bin/vip-app-list.js",
|
|
10
10
|
"vip-app-deploy": "dist/bin/vip-app-deploy.js",
|
|
11
|
+
"vip-app-deploy-token": "dist/bin/vip-app-deploy-token.js",
|
|
12
|
+
"vip-app-deploy-token-generate": "dist/bin/vip-app-deploy-token-generate.js",
|
|
11
13
|
"vip-app-deploy-validate": "dist/bin/vip-app-deploy-validate.js",
|
|
12
14
|
"vip-backup": "dist/bin/vip-backup.js",
|
|
13
15
|
"vip-backup-db": "dist/bin/vip-backup-db.js",
|
|
@@ -87,7 +89,8 @@
|
|
|
87
89
|
"lint": "npm run cmd:lint .",
|
|
88
90
|
"lint:fix": "npm run cmd:lint . -- --fix",
|
|
89
91
|
"publish-please": "publish-please",
|
|
90
|
-
"prepublishOnly": "node ./helpers/prepublishOnly.js"
|
|
92
|
+
"prepublishOnly": "node ./helpers/prepublishOnly.js",
|
|
93
|
+
"smoke:release": "node ./helpers/release-smoke-test.js"
|
|
91
94
|
},
|
|
92
95
|
"repository": {
|
|
93
96
|
"type": "git",
|
|
@@ -113,10 +116,10 @@
|
|
|
113
116
|
"homepage": "https://github.com/Automattic/vip#readme",
|
|
114
117
|
"devDependencies": {
|
|
115
118
|
"@automattic/eslint-plugin-wpvip": "^1.0.0",
|
|
116
|
-
"@babel/cli": "7.
|
|
117
|
-
"@babel/core": "7.29.
|
|
118
|
-
"@babel/preset-env": "7.29.
|
|
119
|
-
"@babel/preset-typescript": "7.
|
|
119
|
+
"@babel/cli": "7.29.7",
|
|
120
|
+
"@babel/core": "7.29.7",
|
|
121
|
+
"@babel/preset-env": "7.29.7",
|
|
122
|
+
"@babel/preset-typescript": "7.29.7",
|
|
120
123
|
"@jest/globals": "^30.0.0",
|
|
121
124
|
"@jest/test-sequencer": "^30.0.0",
|
|
122
125
|
"@types/configstore": "^6.0.2",
|
|
@@ -125,22 +128,20 @@
|
|
|
125
128
|
"@types/ejs": "^3.1.5",
|
|
126
129
|
"@types/jest": "^30.0.0",
|
|
127
130
|
"@types/js-yaml": "^4.0.9",
|
|
128
|
-
"@types/node": "^
|
|
131
|
+
"@types/node": "^25.9.1",
|
|
129
132
|
"@types/proxy-from-env": "^1.0.4",
|
|
130
133
|
"@types/semver": "^7.5.5",
|
|
131
134
|
"@types/shelljs": "^0.10.0",
|
|
132
135
|
"@types/ssh2": "^1.15.4",
|
|
133
|
-
"@types/tar": "^7.0.87",
|
|
134
136
|
"@types/xml2js": "^0.4.14",
|
|
135
137
|
"dockerode": "^5.0.0",
|
|
136
138
|
"jest": "^30.0.0",
|
|
137
|
-
"nock": "13.5.6",
|
|
138
139
|
"postject": "^1.0.0-alpha.6",
|
|
139
140
|
"prettier": "npm:wp-prettier@3.0.3",
|
|
140
141
|
"typescript": "^6.0.2"
|
|
141
142
|
},
|
|
142
143
|
"dependencies": {
|
|
143
|
-
"@apollo/client": "4.
|
|
144
|
+
"@apollo/client": "4.2.3",
|
|
144
145
|
"@automattic/vip-search-replace": "^2.0.0",
|
|
145
146
|
"@json2csv/plainjs": "^7.0.3",
|
|
146
147
|
"@wwa/single-line-log": "^1.1.4",
|
|
@@ -148,37 +149,41 @@
|
|
|
148
149
|
"check-disk-space": "3.4.0",
|
|
149
150
|
"cli-columns": "^4.0.0",
|
|
150
151
|
"cli-table3": "^0.6.3",
|
|
151
|
-
"commander": "^
|
|
152
|
+
"commander": "^15.0.0",
|
|
152
153
|
"configstore": "^8.0.0",
|
|
153
154
|
"debug": "4.4.3",
|
|
154
|
-
"ejs": "^
|
|
155
|
+
"ejs": "^6.0.1",
|
|
155
156
|
"enquirer": "2.4.1",
|
|
156
157
|
"esbuild": "^0.28.0",
|
|
157
158
|
"fetch-retry": "^6.0.0",
|
|
158
|
-
"graphql": "
|
|
159
|
-
"graphql-tag": "2.12.
|
|
159
|
+
"graphql": "17.0.1",
|
|
160
|
+
"graphql-tag": "2.12.7",
|
|
160
161
|
"https-proxy-agent": "^9.0.0",
|
|
161
162
|
"js-yaml": "^4.1.0",
|
|
162
163
|
"jwt-decode": "4.0.0",
|
|
163
164
|
"lando": "github:automattic/lando-cli#78d382fcf40357c4a4cebe4a3cfaef032eab743a",
|
|
164
|
-
"node-fetch": "^3.3.2",
|
|
165
165
|
"node-stream-zip": "1.15.0",
|
|
166
166
|
"open": "^11.0.0",
|
|
167
167
|
"proxy-from-env": "^2.0.0",
|
|
168
|
-
"semver": "7.
|
|
168
|
+
"semver": "7.8.4",
|
|
169
169
|
"shelljs": "^0.10.0",
|
|
170
170
|
"socket.io-client": "^4.5.3",
|
|
171
171
|
"socket.io-stream": "npm:@wwa/socket.io-stream@^0.10.0",
|
|
172
172
|
"socks-proxy-agent": "^10.0.0",
|
|
173
173
|
"ssh2": "1.17.0",
|
|
174
174
|
"tar": "^7.4.0",
|
|
175
|
+
"undici": "^7.0.0",
|
|
175
176
|
"update-notifier": "7.3.1",
|
|
176
177
|
"xml2js": "^0.6.2"
|
|
177
178
|
},
|
|
178
179
|
"optionalDependencies": {
|
|
179
|
-
"@
|
|
180
|
+
"@github/keytar": "^7.10.6"
|
|
180
181
|
},
|
|
181
182
|
"publishConfig": {
|
|
182
183
|
"access": "public"
|
|
184
|
+
},
|
|
185
|
+
"allowScripts": {
|
|
186
|
+
"ssh2@1.17.0": true,
|
|
187
|
+
"@github/keytar@7.10.6": true
|
|
183
188
|
}
|
|
184
189
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { getGlobalDispatcher } from 'undici';
|
|
2
|
+
|
|
3
|
+
const asMockAgent = () => {
|
|
4
|
+
const dispatcher = getGlobalDispatcher();
|
|
5
|
+
|
|
6
|
+
if ( typeof dispatcher.get !== 'function' ) {
|
|
7
|
+
throw new Error( 'Expected global dispatcher to be an undici MockAgent.' );
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
return dispatcher;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const getUndiciMockPool = origin => asMockAgent().get( origin );
|
|
14
|
+
|
|
15
|
+
export const resetUndiciMockAgent = ( { assertNoPending = true } = {} ) => {
|
|
16
|
+
const mockAgent = asMockAgent();
|
|
17
|
+
|
|
18
|
+
if ( assertNoPending && typeof mockAgent.assertNoPendingInterceptors === 'function' ) {
|
|
19
|
+
mockAgent.assertNoPendingInterceptors();
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
if ( typeof mockAgent.clearIntercepts === 'function' ) {
|
|
23
|
+
mockAgent.clearIntercepts();
|
|
24
|
+
}
|
|
25
|
+
};
|