@seayoo-web/finder 2.0.5 → 2.0.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/index.cjs +4 -3
- package/dist/index.js +4 -3
- package/package.json +1 -9
- package/types/src/plugin.d.ts +0 -1
package/dist/index.cjs
CHANGED
|
@@ -245,7 +245,7 @@ async function getServerSupportedProjects(serverDomain, ignoreCache = false, deb
|
|
|
245
245
|
const { status, message, data } = await request({
|
|
246
246
|
url: inspectURL,
|
|
247
247
|
method: "GET",
|
|
248
|
-
headers: {
|
|
248
|
+
headers: { "user-agent": `web finder agent v2` }
|
|
249
249
|
});
|
|
250
250
|
if (status !== 200) {
|
|
251
251
|
if (debug) {
|
|
@@ -344,9 +344,10 @@ function viteDeployPlugin(option) {
|
|
|
344
344
|
preview: true,
|
|
345
345
|
...option,
|
|
346
346
|
dist: distDir
|
|
347
|
-
}).catch(() =>
|
|
348
|
-
if (result
|
|
347
|
+
}).catch((e) => e instanceof Error ? e : typeof e === "string" ? new Error(e) : new Error(e + ""));
|
|
348
|
+
if (result instanceof Error) {
|
|
349
349
|
(_a = option.onError) == null ? void 0 : _a.call(option);
|
|
350
|
+
console.log("部署失败".bgRed, result.message);
|
|
350
351
|
} else {
|
|
351
352
|
(_b = option.onFinished) == null ? void 0 : _b.call(option);
|
|
352
353
|
console.log("部署成功".bgGreen, (result || "").green);
|
package/dist/index.js
CHANGED
|
@@ -243,7 +243,7 @@ async function getServerSupportedProjects(serverDomain, ignoreCache = false, deb
|
|
|
243
243
|
const { status, message, data } = await request({
|
|
244
244
|
url: inspectURL,
|
|
245
245
|
method: "GET",
|
|
246
|
-
headers: {
|
|
246
|
+
headers: { "user-agent": `web finder agent v2` }
|
|
247
247
|
});
|
|
248
248
|
if (status !== 200) {
|
|
249
249
|
if (debug) {
|
|
@@ -342,9 +342,10 @@ function viteDeployPlugin(option) {
|
|
|
342
342
|
preview: true,
|
|
343
343
|
...option,
|
|
344
344
|
dist: distDir
|
|
345
|
-
}).catch(() =>
|
|
346
|
-
if (result
|
|
345
|
+
}).catch((e) => e instanceof Error ? e : typeof e === "string" ? new Error(e) : new Error(e + ""));
|
|
346
|
+
if (result instanceof Error) {
|
|
347
347
|
(_a = option.onError) == null ? void 0 : _a.call(option);
|
|
348
|
+
console.log("部署失败".bgRed, result.message);
|
|
348
349
|
} else {
|
|
349
350
|
(_b = option.onFinished) == null ? void 0 : _b.call(option);
|
|
350
351
|
console.log("部署成功".bgGreen, (result || "").green);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seayoo-web/finder",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.7",
|
|
4
4
|
"description": "agent for web finder",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"source": "index.ts",
|
|
@@ -12,14 +12,6 @@
|
|
|
12
12
|
"types",
|
|
13
13
|
"README.md"
|
|
14
14
|
],
|
|
15
|
-
"exports": {
|
|
16
|
-
".": {
|
|
17
|
-
"types": "./types/index.d.ts",
|
|
18
|
-
"import": "./dist/index.js",
|
|
19
|
-
"require": "./dist/index.cjs",
|
|
20
|
-
"default": "./dist/index.js"
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
15
|
"engines": {
|
|
24
16
|
"node": ">= 18"
|
|
25
17
|
},
|