vps-work 2.1.0 → 2.1.3
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/vps-work.cjs +9 -3
- package/package.json +1 -1
package/dist/vps-work.cjs
CHANGED
|
@@ -49110,6 +49110,8 @@ var import_node_fs2 = require("fs");
|
|
|
49110
49110
|
var import_node_child_process = require("child_process");
|
|
49111
49111
|
var KEYCHAIN_SERVICE_NAME = CLI_KEYCHAIN_SERVICE;
|
|
49112
49112
|
var DEFAULT_VPS_SERVICE_ORIGIN = "https://vps-service.vertu.cn";
|
|
49113
|
+
var HERMES_TENANT_API_HOST = "tenant-api";
|
|
49114
|
+
var HERMES_TENANT_API_PORT = "8080";
|
|
49113
49115
|
var dotenvCache = null;
|
|
49114
49116
|
function readDotenv() {
|
|
49115
49117
|
if (dotenvCache) {
|
|
@@ -49154,7 +49156,8 @@ function parsedCredentialOrigin(raw) {
|
|
|
49154
49156
|
try {
|
|
49155
49157
|
const url = new URL(normalized);
|
|
49156
49158
|
const loopback = ["localhost", "127.0.0.1", "[::1]", "::1"].includes(url.hostname.toLowerCase());
|
|
49157
|
-
|
|
49159
|
+
const hermesTenantApi = url.protocol === "http:" && url.hostname.toLowerCase() === HERMES_TENANT_API_HOST && url.port === HERMES_TENANT_API_PORT;
|
|
49160
|
+
if (url.username || url.password || url.protocol !== "https:" && !(url.protocol === "http:" && (loopback || hermesTenantApi))) {
|
|
49158
49161
|
return void 0;
|
|
49159
49162
|
}
|
|
49160
49163
|
return url.origin.toLowerCase();
|
|
@@ -55700,7 +55703,10 @@ function printUsersPlain(users) {
|
|
|
55700
55703
|
byDepartment.set(path3, rows2);
|
|
55701
55704
|
}
|
|
55702
55705
|
for (const [path3, rows2] of [...byDepartment.entries()].sort(([a], [b]) => a.localeCompare(b, "zh-CN"))) {
|
|
55703
|
-
const names = rows2.map((user) =>
|
|
55706
|
+
const names = rows2.map((user) => {
|
|
55707
|
+
const name = user.employee_name || user.login;
|
|
55708
|
+
return user.job_title ? `${name}\uFF08${user.job_title}\uFF09` : name;
|
|
55709
|
+
}).sort((a, b) => a.localeCompare(b, "zh-CN"));
|
|
55704
55710
|
console.log(`- ${path3}\uFF08${rows2.length}\uFF09\uFF1A${names.join("\u3001")}`);
|
|
55705
55711
|
}
|
|
55706
55712
|
}
|
|
@@ -64267,7 +64273,7 @@ function rewriteLongFlag(tok) {
|
|
|
64267
64273
|
}
|
|
64268
64274
|
|
|
64269
64275
|
// src/bin/vps-work.ts
|
|
64270
|
-
var PKG_VERSION = "2.1.
|
|
64276
|
+
var PKG_VERSION = "2.1.3" ? "2.1.3" : "0.0.0-dev";
|
|
64271
64277
|
function smartFlagSuggest(flag, candidates) {
|
|
64272
64278
|
if (!flag.startsWith("--") || flag.length < 4) return "";
|
|
64273
64279
|
const word = flag.slice(2);
|