@zuplo/cli 1.102.0 → 1.104.0
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/cli.js +2 -2
- package/dist/common/analytics/lib.js +2 -2
- package/dist/common/deno-utils/locator.js +2 -2
- package/dist/common/machine-id/lib.js +2 -2
- package/dist/common/middleware/user-configuration.js +2 -2
- package/dist/common/middleware/user-identification.js +2 -2
- package/dist/common/output.js +2 -2
- package/dist/common/upgraders/package-json-upgrader.js +2 -2
- package/dist/common/upgraders/vscode-settings-json-upgrader.js +2 -2
- package/dist/common/validators/file-system-validator.js +2 -2
- package/dist/common/validators/lib.js +2 -2
- package/dist/common/validators/login-state-validator.js +2 -2
- package/dist/common/validators/project-name-validator.js +2 -2
- package/dist/common/xdg/lib.js +2 -2
- package/dist/convert/engine.js +2 -2
- package/dist/convert/handler.js +2 -2
- package/dist/delete/handler.js +2 -2
- package/dist/delete/poll-deployment.js +2 -2
- package/dist/deploy/archive.js +3 -3
- package/dist/deploy/handler.js +2 -2
- package/dist/deploy/poll-deployment.js +2 -2
- package/dist/dev/handler.js +2 -2
- package/dist/editor/assets/index-03352ce7.js +2 -2
- package/dist/editor/server/cors-plugin.js +2 -2
- package/dist/editor/server/server.js +2 -2
- package/dist/editor/server/xfs.js +2 -2
- package/dist/link/handler.js +2 -2
- package/dist/link/populate.js +2 -2
- package/dist/list/handler.js +2 -2
- package/dist/login/handler.js +2 -2
- package/dist/login/server.js +2 -2
- package/dist/project/import-openapi/handler.js +2 -2
- package/dist/project/import-openapi/utils.js +2 -2
- package/dist/project/update/handler.js +2 -2
- package/dist/test/esbuild-plugins/deno-test-prep-plugin.js +2 -2
- package/dist/test/handler.js +2 -2
- package/dist/test/invoke-test.js +2 -2
- package/dist/tunnel/create/handler.js +2 -2
- package/dist/tunnel/delete/handler.js +2 -2
- package/dist/tunnel/delete/poll-teardown-operation.js +2 -2
- package/dist/tunnel/describe/handler.js +2 -2
- package/dist/tunnel/list/handler.js +2 -2
- package/dist/tunnel/rotate-token/handler.js +2 -2
- package/dist/tunnel/services/describe/handler.js +2 -2
- package/dist/tunnel/services/update/handler.js +2 -2
- package/dist/tunnel/services/update/poll-provisioning-operations.js +2 -2
- package/dist/variable/create/handler.js +2 -2
- package/dist/variable/update/handler.js +2 -2
- package/package.json +5 -3
- package/polyfills/async_hooks.js +8 -0
- package/polyfills/diagnostics_channel.js +155 -0
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="13f2d28d-a993-57e1-bc2e-1821b26c7cff")}catch(e){}}();
|
|
3
3
|
import * as dotenv from "dotenv";
|
|
4
4
|
dotenv.config();
|
|
5
5
|
import * as Sentry from "@sentry/node";
|
|
@@ -80,4 +80,4 @@ else {
|
|
|
80
80
|
Consider using a Node.js version manager such as https://github.com/nvm-sh/nvm.`);
|
|
81
81
|
}
|
|
82
82
|
//# sourceMappingURL=cli.js.map
|
|
83
|
-
//# debugId=
|
|
83
|
+
//# debugId=13f2d28d-a993-57e1-bc2e-1821b26c7cff
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="7964f533-4c45-5bc8-929e-803354f7501e")}catch(e){}}();
|
|
3
3
|
import { defaultIntegrations } from "@sentry/node";
|
|
4
4
|
import { PostHog } from "posthog-node";
|
|
5
5
|
import { POST_HOG_CAPTURE_KEY, ZUPLO_USER_ID_ARGV_KEY } from "../constants.js";
|
|
@@ -54,4 +54,4 @@ export async function shutdownAnalytics() {
|
|
|
54
54
|
return _postHog?.shutdownAsync();
|
|
55
55
|
}
|
|
56
56
|
//# sourceMappingURL=lib.js.map
|
|
57
|
-
//# debugId=
|
|
57
|
+
//# debugId=7964f533-4c45-5bc8-929e-803354f7501e
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="0ab2face-18bc-5321-bfbd-2b6608d25782")}catch(e){}}();
|
|
3
3
|
import { existsSync } from "node:fs";
|
|
4
4
|
import { dirname, resolve } from "node:path";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
|
@@ -26,4 +26,4 @@ export async function locateDeno(dir) {
|
|
|
26
26
|
return locateDeno(dirname(dir));
|
|
27
27
|
}
|
|
28
28
|
//# sourceMappingURL=locator.js.map
|
|
29
|
-
//# debugId=
|
|
29
|
+
//# debugId=0ab2face-18bc-5321-bfbd-2b6608d25782
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="d710f777-d1e4-57a0-aaa8-2fb4bdadb098")}catch(e){}}();
|
|
3
3
|
import { execSync } from "node:child_process";
|
|
4
4
|
import { createHash } from "node:crypto";
|
|
5
5
|
const win32RegBinPath = {
|
|
@@ -65,4 +65,4 @@ export function machineId() {
|
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
//# sourceMappingURL=lib.js.map
|
|
68
|
-
//# debugId=
|
|
68
|
+
//# debugId=d710f777-d1e4-57a0-aaa8-2fb4bdadb098
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="9967c3d0-3ded-5c50-9e45-2f7590c72bfa")}catch(e){}}();
|
|
3
3
|
import { parse } from "jsonc-parser";
|
|
4
4
|
import { existsSync } from "node:fs";
|
|
5
5
|
import { readFile } from "node:fs/promises";
|
|
@@ -59,4 +59,4 @@ const omitNull = (obj) => {
|
|
|
59
59
|
return obj;
|
|
60
60
|
};
|
|
61
61
|
//# sourceMappingURL=user-configuration.js.map
|
|
62
|
-
//# debugId=
|
|
62
|
+
//# debugId=9967c3d0-3ded-5c50-9e45-2f7590c72bfa
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="8688bc9e-df54-5ca7-a1a2-768d83465e92")}catch(e){}}();
|
|
3
3
|
import * as Sentry from "@sentry/node";
|
|
4
4
|
import * as jose from "jose";
|
|
5
5
|
import { readFile } from "node:fs/promises";
|
|
@@ -35,4 +35,4 @@ export async function identify(argv) {
|
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
//# sourceMappingURL=user-identification.js.map
|
|
38
|
-
//# debugId=
|
|
38
|
+
//# debugId=8688bc9e-df54-5ca7-a1a2-768d83465e92
|
package/dist/common/output.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="2df63d73-274e-5ba8-9b31-5a7a98c11051")}catch(e){}}();
|
|
3
3
|
import * as Sentry from "@sentry/node";
|
|
4
4
|
import chalk from "chalk";
|
|
5
5
|
import { MAX_WAIT_PENDING_TIME_MS } from "./constants.js";
|
|
@@ -51,4 +51,4 @@ export function textOrJson(text) {
|
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
//# sourceMappingURL=output.js.map
|
|
54
|
-
//# debugId=
|
|
54
|
+
//# debugId=2df63d73-274e-5ba8-9b31-5a7a98c11051
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="9679ce39-91f8-5b74-ad15-9a9a9427e410")}catch(e){}}();
|
|
3
3
|
import { readFile, writeFile } from "node:fs/promises";
|
|
4
4
|
import { join } from "node:path";
|
|
5
5
|
import prettier from "prettier";
|
|
@@ -64,4 +64,4 @@ export class PackageJsonUpgrader extends StandardUpgrader {
|
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
//# sourceMappingURL=package-json-upgrader.js.map
|
|
67
|
-
//# debugId=
|
|
67
|
+
//# debugId=9679ce39-91f8-5b74-ad15-9a9a9427e410
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="f25ccd6f-0eb7-5cb5-979a-2e2c886e52a4")}catch(e){}}();
|
|
3
3
|
import { parse } from "jsonc-parser";
|
|
4
4
|
import { existsSync } from "node:fs";
|
|
5
5
|
import { readFile, writeFile } from "node:fs/promises";
|
|
@@ -93,4 +93,4 @@ export class VsCodeSettingsJsonUpgrader extends StandardUpgrader {
|
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
//# sourceMappingURL=vscode-settings-json-upgrader.js.map
|
|
96
|
-
//# debugId=
|
|
96
|
+
//# debugId=f25ccd6f-0eb7-5cb5-979a-2e2c886e52a4
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="5d556b94-af4a-5b17-96b6-e1bca9a4704a")}catch(e){}}();
|
|
3
3
|
import fg from "fast-glob";
|
|
4
4
|
import { existsSync, readdirSync } from "node:fs";
|
|
5
5
|
import { join } from "node:path";
|
|
@@ -163,4 +163,4 @@ export const validDeployDirectoryValidator = new CompositeValidator(new ZuploPro
|
|
|
163
163
|
export const validTestDirectoryValidator = new CompositeValidator(new ZuploProjectValidator(), new ZuploProjectHasTestsValidator());
|
|
164
164
|
export const validLinkDirectoryValidator = new CompositeValidator(new ZuploProjectValidator(), new UserIsLoggedInValidator());
|
|
165
165
|
//# sourceMappingURL=file-system-validator.js.map
|
|
166
|
-
//# debugId=
|
|
166
|
+
//# debugId=5d556b94-af4a-5b17-96b6-e1bca9a4704a
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="e95e31c7-891b-5e2b-b79d-45d44fe02643")}catch(e){}}();
|
|
3
3
|
export class CompositeValidator {
|
|
4
4
|
validators = new Array();
|
|
5
5
|
constructor(...validators) {
|
|
@@ -31,4 +31,4 @@ export class YargsChecker {
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
//# sourceMappingURL=lib.js.map
|
|
34
|
-
//# debugId=
|
|
34
|
+
//# debugId=e95e31c7-891b-5e2b-b79d-45d44fe02643
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="ad5e9c30-9045-5fa4-b776-601c8f4c0a0a")}catch(e){}}();
|
|
3
3
|
import { existsSync } from "node:fs";
|
|
4
4
|
import { readFile } from "node:fs/promises";
|
|
5
5
|
import { join } from "node:path";
|
|
@@ -36,4 +36,4 @@ export class UserIsLoggedInValidator {
|
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
//# sourceMappingURL=login-state-validator.js.map
|
|
39
|
-
//# debugId=
|
|
39
|
+
//# debugId=ad5e9c30-9045-5fa4-b776-601c8f4c0a0a
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="920ca05b-f900-53ea-9fad-f5ff80a0c56c")}catch(e){}}();
|
|
3
3
|
export class ProjectIsNotSet extends Error {
|
|
4
4
|
constructor() {
|
|
5
5
|
super(`Missing project name. This command requires a project to be specified. Either specify it using --project or set it in zuplo.jsonc.
|
|
@@ -30,4 +30,4 @@ export class ProjectIsSetValidator {
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
//# sourceMappingURL=project-name-validator.js.map
|
|
33
|
-
//# debugId=
|
|
33
|
+
//# debugId=920ca05b-f900-53ea-9fad-f5ff80a0c56c
|
package/dist/common/xdg/lib.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="0182567c-2e9c-5ee2-a5cc-2836a3b9d697")}catch(e){}}();
|
|
3
3
|
import { homedir } from "node:os";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { ZUPLO_CLI_XDG_FOLDER_NAME } from "../constants.js";
|
|
@@ -18,4 +18,4 @@ export const ZUPLO_XDG_CONFIG_HOME = path.join(XDG_CONFIG_HOME, ZUPLO_CLI_XDG_FO
|
|
|
18
18
|
export const ZUPLO_XDG_DATA_HOME = path.join(XDG_DATA_HOME, ZUPLO_CLI_XDG_FOLDER_NAME);
|
|
19
19
|
export const ZUPLO_XDG_STATE_HOME = path.join(XDG_STATE_HOME, ZUPLO_CLI_XDG_FOLDER_NAME);
|
|
20
20
|
//# sourceMappingURL=lib.js.map
|
|
21
|
-
//# debugId=
|
|
21
|
+
//# debugId=0182567c-2e9c-5ee2-a5cc-2836a3b9d697
|
package/dist/convert/engine.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="2922eb0c-11e6-548e-bbf1-506fe4e64df8")}catch(e){}}();
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
export function convertRoutes(routesConfig) {
|
|
5
5
|
const base = generateBaseOpenAPIConfig();
|
|
@@ -73,4 +73,4 @@ function fullPath(path, context) {
|
|
|
73
73
|
return join(versionPrefix, path.path);
|
|
74
74
|
}
|
|
75
75
|
//# sourceMappingURL=engine.js.map
|
|
76
|
-
//# debugId=
|
|
76
|
+
//# debugId=2922eb0c-11e6-548e-bbf1-506fe4e64df8
|
package/dist/convert/handler.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="e6a52b60-c0b1-5706-8119-a479c0ba9592")}catch(e){}}();
|
|
3
3
|
import { writeFileSync } from "node:fs";
|
|
4
4
|
import { readFile } from "node:fs/promises";
|
|
5
5
|
import { join, relative } from "node:path";
|
|
@@ -36,4 +36,4 @@ export async function convert(argv) {
|
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
//# sourceMappingURL=handler.js.map
|
|
39
|
-
//# debugId=
|
|
39
|
+
//# debugId=e6a52b60-c0b1-5706-8119-a479c0ba9592
|
package/dist/delete/handler.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="e605d017-6ce7-5c84-9e5f-81d70ada98c0")}catch(e){}}();
|
|
3
3
|
import { logger } from "../common/logger.js";
|
|
4
4
|
import { printCriticalFailureToConsoleAndExit, printResultToConsoleAndExitGracefully, } from "../common/output.js";
|
|
5
5
|
import settings from "../common/settings.js";
|
|
@@ -61,4 +61,4 @@ export async function deleteZup(argv) {
|
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
//# sourceMappingURL=handler.js.map
|
|
64
|
-
//# debugId=
|
|
64
|
+
//# debugId=e605d017-6ce7-5c84-9e5f-81d70ada98c0
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="99f1631f-399b-5928-90d8-f3f7d8bcd45a")}catch(e){}}();
|
|
3
3
|
import { printDiagnosticsToConsole } from "../common/output.js";
|
|
4
4
|
import settings from "../common/settings.js";
|
|
5
5
|
function wait(duration = settings.POLL_INTERVAL) {
|
|
@@ -20,4 +20,4 @@ export async function pingDeployment(argv) {
|
|
|
20
20
|
return false;
|
|
21
21
|
}
|
|
22
22
|
//# sourceMappingURL=poll-deployment.js.map
|
|
23
|
-
//# debugId=
|
|
23
|
+
//# debugId=99f1631f-399b-5928-90d8-f3f7d8bcd45a
|
package/dist/deploy/archive.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="a334ee0f-c282-5c19-8ff1-5d9a20596571")}catch(e){}}();
|
|
3
3
|
import ignore from "ignore";
|
|
4
|
-
import minimatch from "minimatch";
|
|
4
|
+
import { minimatch } from "minimatch";
|
|
5
5
|
import { existsSync, mkdirSync, readFileSync, writeFileSync, } from "node:fs";
|
|
6
6
|
import { join, relative, sep } from "node:path";
|
|
7
7
|
import { simpleGit } from "simple-git";
|
|
@@ -108,4 +108,4 @@ async function writeGeneratedMetadata(dir, metadata) {
|
|
|
108
108
|
});
|
|
109
109
|
}
|
|
110
110
|
//# sourceMappingURL=archive.js.map
|
|
111
|
-
//# debugId=
|
|
111
|
+
//# debugId=a334ee0f-c282-5c19-8ff1-5d9a20596571
|
package/dist/deploy/handler.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="8e987720-63b4-54ac-862b-8ebba7e37fca")}catch(e){}}();
|
|
3
3
|
import { parse } from "node:path";
|
|
4
4
|
import { logger } from "../common/logger.js";
|
|
5
5
|
import { printCriticalFailureToConsoleAndExit, printDiagnosticsToConsole, printResultToConsoleAndExitGracefully, } from "../common/output.js";
|
|
@@ -49,4 +49,4 @@ export async function deploy(argv) {
|
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
//# sourceMappingURL=handler.js.map
|
|
52
|
-
//# debugId=
|
|
52
|
+
//# debugId=8e987720-63b4-54ac-862b-8ebba7e37fca
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="3c3c35a5-25eb-5ed0-b613-ff502349f0f9")}catch(e){}}();
|
|
3
3
|
import { logger } from "../common/logger.js";
|
|
4
4
|
import { printDiagnosticsToConsole, textOrJson } from "../common/output.js";
|
|
5
5
|
import settings from "../common/settings.js";
|
|
@@ -63,4 +63,4 @@ export async function pollDeployment(argv, fileId, account, project) {
|
|
|
63
63
|
return {};
|
|
64
64
|
}
|
|
65
65
|
//# sourceMappingURL=poll-deployment.js.map
|
|
66
|
-
//# debugId=
|
|
66
|
+
//# debugId=3c3c35a5-25eb-5ed0-b613-ff502349f0f9
|
package/dist/dev/handler.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="7fbaf77e-7785-5c59-af8e-6a90090cfb6f")}catch(e){}}();
|
|
3
3
|
import { cpSync, existsSync } from "node:fs";
|
|
4
4
|
import { join, relative, resolve } from "node:path";
|
|
5
5
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
@@ -79,4 +79,4 @@ export async function dev(argv) {
|
|
|
79
79
|
});
|
|
80
80
|
}
|
|
81
81
|
//# sourceMappingURL=handler.js.map
|
|
82
|
-
//# debugId=
|
|
82
|
+
//# debugId=7fbaf77e-7785-5c59-af8e-6a90090cfb6f
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="9a98be6d-dfa8-5894-8a42-8f000cd0d850")}catch(e){}}();
|
|
3
3
|
var FS=Object.defineProperty;var HS=(e,t,n)=>t in e?FS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var se=(e,t,n)=>(HS(e,typeof t!="symbol"?t+"":t,n),n),gd=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var Y=(e,t,n)=>(gd(e,t,"read from private field"),n?n.call(e):t.get(e)),Et=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Ye=(e,t,n,r)=>(gd(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);var Pi=(e,t,n)=>(gd(e,t,"access private method"),n);function GS(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();function sl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Y0={exports:{}},Hu={},Q0={exports:{}},ye={};/**
|
|
4
4
|
* @license React
|
|
5
5
|
* react.production.min.js
|
|
@@ -168,4 +168,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
168
168
|
`}function KH(e,t,n,r,i,o){return MS(e,e,t,n,r,i,o)}function eG(e,t){return e.length!==t.length?!1:Yp(e,t)}function Yp(e,t){if(t.length>e.length)return!1;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function tG(e){var t=Qp(e.lines),n=t.oldLines,r=t.newLines;n!==void 0?e.oldLines=n:delete e.oldLines,r!==void 0?e.newLines=r:delete e.newLines}function nG(e,t,n){e=T0(e,n),t=T0(t,n);var r={};(e.index||t.index)&&(r.index=e.index||t.index),(e.newFileName||t.newFileName)&&(j0(e)?j0(t)?(r.oldFileName=bs(r,e.oldFileName,t.oldFileName),r.newFileName=bs(r,e.newFileName,t.newFileName),r.oldHeader=bs(r,e.oldHeader,t.oldHeader),r.newHeader=bs(r,e.newHeader,t.newHeader)):(r.oldFileName=e.oldFileName,r.newFileName=e.newFileName,r.oldHeader=e.oldHeader,r.newHeader=e.newHeader):(r.oldFileName=t.oldFileName||e.oldFileName,r.newFileName=t.newFileName||e.newFileName,r.oldHeader=t.oldHeader||e.oldHeader,r.newHeader=t.newHeader||e.newHeader)),r.hunks=[];for(var i=0,o=0,a=0,l=0;i<e.hunks.length||o<t.hunks.length;){var s=e.hunks[i]||{oldStart:1/0},u=t.hunks[o]||{oldStart:1/0};if(L0(s,u))r.hunks.push(P0(s,a)),i++,l+=s.newLines-s.oldLines;else if(L0(u,s))r.hunks.push(P0(u,l)),o++,a+=u.newLines-u.oldLines;else{var c={oldStart:Math.min(s.oldStart,u.oldStart),oldLines:0,newStart:Math.min(s.newStart+a,u.oldStart+l),newLines:0,lines:[]};rG(c,s.oldStart,s.lines,u.oldStart,u.lines),o++,i++,r.hunks.push(c)}}return r}function T0(e,t){if(typeof e=="string"){if(/^@@/m.test(e)||/^Index:/m.test(e))return ud(e)[0];if(!t)throw new Error("Must provide a base reference or pass in a patch");return fh(void 0,void 0,t,e)}return e}function j0(e){return e.newFileName&&e.newFileName!==e.oldFileName}function bs(e,t,n){return t===n?t:(e.conflict=!0,{mine:t,theirs:n})}function L0(e,t){return e.oldStart<t.oldStart&&e.oldStart+e.oldLines<t.oldStart}function P0(e,t){return{oldStart:e.oldStart,oldLines:e.oldLines,newStart:e.newStart+t,newLines:e.newLines,lines:e.lines}}function rG(e,t,n,r,i){var o={offset:t,lines:n,index:0},a={offset:r,lines:i,index:0};for(O0(e,o,a),O0(e,a,o);o.index<o.lines.length&&a.index<a.lines.length;){var l=o.lines[o.index],s=a.lines[a.index];if((l[0]==="-"||l[0]==="+")&&(s[0]==="-"||s[0]==="+"))iG(e,o,a);else if(l[0]==="+"&&s[0]===" "){var u;(u=e.lines).push.apply(u,or(ui(o)))}else if(s[0]==="+"&&l[0]===" "){var c;(c=e.lines).push.apply(c,or(ui(a)))}else l[0]==="-"&&s[0]===" "?R0(e,o,a):s[0]==="-"&&l[0]===" "?R0(e,a,o,!0):l===s?(e.lines.push(l),o.index++,a.index++):ph(e,ui(o),ui(a))}k0(e,o),k0(e,a),tG(e)}function iG(e,t,n){var r=ui(t),i=ui(n);if(z0(r)&&z0(i)){if(Yp(r,i)&&B0(n,r,r.length-i.length)){var o;(o=e.lines).push.apply(o,or(r));return}else if(Yp(i,r)&&B0(t,i,i.length-r.length)){var a;(a=e.lines).push.apply(a,or(i));return}}else if(eG(r,i)){var l;(l=e.lines).push.apply(l,or(r));return}ph(e,r,i)}function R0(e,t,n,r){var i=ui(t),o=oG(n,i);if(o.merged){var a;(a=e.lines).push.apply(a,or(o.merged))}else ph(e,r?o:i,r?i:o)}function ph(e,t,n){e.conflict=!0,e.lines.push({conflict:!0,mine:t,theirs:n})}function O0(e,t,n){for(;t.offset<n.offset&&t.index<t.lines.length;){var r=t.lines[t.index++];e.lines.push(r),t.offset++}}function k0(e,t){for(;t.index<t.lines.length;){var n=t.lines[t.index++];e.lines.push(n)}}function ui(e){for(var t=[],n=e.lines[e.index][0];e.index<e.lines.length;){var r=e.lines[e.index];if(n==="-"&&r[0]==="+"&&(n="+"),n===r[0])t.push(r),e.index++;else break}return t}function oG(e,t){for(var n=[],r=[],i=0,o=!1,a=!1;i<t.length&&e.index<e.lines.length;){var l=e.lines[e.index],s=t[i];if(s[0]==="+")break;if(o=o||l[0]!==" ",r.push(s),i++,l[0]==="+")for(a=!0;l[0]==="+";)n.push(l),l=e.lines[++e.index];s.substr(1)===l.substr(1)?(n.push(l),e.index++):a=!0}if((t[i]||"")[0]==="+"&&o&&(a=!0),a)return n;for(;i<t.length;)r.push(t[i++]);return{merged:r,changes:n}}function z0(e){return e.reduce(function(t,n){return t&&n[0]==="-"},!0)}function B0(e,t,n){for(var r=0;r<n;r++){var i=t[t.length-n+r].substr(1);if(e.lines[e.index+r]!==" "+i)return!1}return e.index+=n,!0}function Qp(e){var t=0,n=0;return e.forEach(function(r){if(typeof r!="string"){var i=Qp(r.mine),o=Qp(r.theirs);t!==void 0&&(i.oldLines===o.oldLines?t+=i.oldLines:t=void 0),n!==void 0&&(i.newLines===o.newLines?n+=i.newLines:n=void 0)}else n!==void 0&&(r[0]==="+"||r[0]===" ")&&n++,t!==void 0&&(r[0]==="-"||r[0]===" ")&&t++}),{oldLines:t,newLines:n}}function aG(e){for(var t=[],n,r,i=0;i<e.length;i++)n=e[i],n.added?r=1:n.removed?r=-1:r=0,t.push([r,n.value]);return t}function lG(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];r.added?t.push("<ins>"):r.removed&&t.push("<del>"),t.push(sG(r.value)),r.added?t.push("</ins>"):r.removed&&t.push("</del>")}return t.join("")}function sG(e){var t=e;return t=t.replace(/&/g,"&"),t=t.replace(/</g,"<"),t=t.replace(/>/g,">"),t=t.replace(/"/g,"""),t}const uG=Object.freeze(Object.defineProperty({__proto__:null,Diff:Xn,applyPatch:wS,applyPatches:qH,canonicalize:Bu,convertChangesToDMP:aG,convertChangesToXML:lG,createPatch:KH,createTwoFilesPatch:MS,diffArrays:JH,diffChars:UH,diffCss:GH,diffJson:QH,diffLines:dh,diffSentences:HH,diffTrimmedLines:FH,diffWords:$H,diffWordsWithSpace:_H,merge:nG,parsePatch:ud,structuredPatch:fh},Symbol.toStringTag,{value:"Module"}));function cG(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function dG(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var fG=function(){function e(n){var r=this;this._insertTag=function(i){var o;r.tags.length===0?r.insertionPoint?o=r.insertionPoint.nextSibling:r.prepend?o=r.container.firstChild:o=r.before:o=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(i,o),r.tags.push(i)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(dG(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var o=cG(i);try{o.insertRule(r,o.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){return r.parentNode&&r.parentNode.removeChild(r)}),this.tags=[],this.ctr=0},e}(),xt="-ms-",$u="-moz-",xe="-webkit-",xS="comm",mh="rule",gh="decl",pG="@import",bS="@keyframes",mG="@layer",gG=Math.abs,cd=String.fromCharCode,hG=Object.assign;function vG(e,t){return ht(e,0)^45?(((t<<2^ht(e,0))<<2^ht(e,1))<<2^ht(e,2))<<2^ht(e,3):0}function NS(e){return e.trim()}function yG(e,t){return(e=t.exec(e))?e[0]:e}function be(e,t,n){return e.replace(t,n)}function Jp(e,t){return e.indexOf(t)}function ht(e,t){return e.charCodeAt(t)|0}function il(e,t,n){return e.slice(t,n)}function Bn(e){return e.length}function hh(e){return e.length}function Ns(e,t){return t.push(e),e}function IG(e,t){return e.map(t).join("")}var dd=1,Do=1,SS=0,Wt=0,qe=0,zo="";function fd(e,t,n,r,i,o,a){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:dd,column:Do,length:a,return:""}}function oa(e,t){return hG(fd("",null,null,"",null,null,0),e,{length:-e.length},t)}function wG(){return qe}function MG(){return qe=Wt>0?ht(zo,--Wt):0,Do--,qe===10&&(Do=1,dd--),qe}function nn(){return qe=Wt<SS?ht(zo,Wt++):0,Do++,qe===10&&(Do=1,dd++),qe}function Vn(){return ht(zo,Wt)}function Fs(){return Wt}function Hl(e,t){return il(zo,e,t)}function ol(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function DS(e){return dd=Do=1,SS=Bn(zo=e),Wt=0,[]}function AS(e){return zo="",e}function Hs(e){return NS(Hl(Wt-1,Xp(e===91?e+2:e===40?e+1:e)))}function xG(e){for(;(qe=Vn())&&qe<33;)nn();return ol(e)>2||ol(qe)>3?"":" "}function bG(e,t){for(;--t&&nn()&&!(qe<48||qe>102||qe>57&&qe<65||qe>70&&qe<97););return Hl(e,Fs()+(t<6&&Vn()==32&&nn()==32))}function Xp(e){for(;nn();)switch(qe){case e:return Wt;case 34:case 39:e!==34&&e!==39&&Xp(qe);break;case 40:e===41&&Xp(e);break;case 92:nn();break}return Wt}function NG(e,t){for(;nn()&&e+qe!==47+10;)if(e+qe===42+42&&Vn()===47)break;return"/*"+Hl(t,Wt-1)+"*"+cd(e===47?e:nn())}function SG(e){for(;!ol(Vn());)nn();return Hl(e,Wt)}function DG(e){return AS(Gs("",null,null,null,[""],e=DS(e),0,[0],e))}function Gs(e,t,n,r,i,o,a,l,s){for(var u=0,c=0,d=a,f=0,p=0,g=0,h=1,w=1,I=1,y=0,M="",x=i,S=o,b=r,N=M;w;)switch(g=y,y=nn()){case 40:if(g!=108&&ht(N,d-1)==58){Jp(N+=be(Hs(y),"&","&\f"),"&\f")!=-1&&(I=-1);break}case 34:case 39:case 91:N+=Hs(y);break;case 9:case 10:case 13:case 32:N+=xG(g);break;case 92:N+=bG(Fs()-1,7);continue;case 47:switch(Vn()){case 42:case 47:Ns(AG(NG(nn(),Fs()),t,n),s);break;default:N+="/"}break;case 123*h:l[u++]=Bn(N)*I;case 125*h:case 59:case 0:switch(y){case 0:case 125:w=0;case 59+c:I==-1&&(N=be(N,/\f/g,"")),p>0&&Bn(N)-d&&Ns(p>32?$0(N+";",r,n,d-1):$0(be(N," ","")+";",r,n,d-2),s);break;case 59:N+=";";default:if(Ns(b=U0(N,t,n,u,c,i,l,M,x=[],S=[],d),o),y===123)if(c===0)Gs(N,t,b,b,x,o,d,l,S);else switch(f===99&&ht(N,3)===110?100:f){case 100:case 108:case 109:case 115:Gs(e,b,b,r&&Ns(U0(e,b,b,0,0,i,l,M,i,x=[],d),S),i,S,d,l,r?x:S);break;default:Gs(N,b,b,b,[""],S,0,l,S)}}u=c=p=0,h=I=1,M=N="",d=a;break;case 58:d=1+Bn(N),p=g;default:if(h<1){if(y==123)--h;else if(y==125&&h++==0&&MG()==125)continue}switch(N+=cd(y),y*h){case 38:I=c>0?1:(N+="\f",-1);break;case 44:l[u++]=(Bn(N)-1)*I,I=1;break;case 64:Vn()===45&&(N+=Hs(nn())),f=Vn(),c=d=Bn(M=N+=SG(Fs())),y++;break;case 45:g===45&&Bn(N)==2&&(h=0)}}return o}function U0(e,t,n,r,i,o,a,l,s,u,c){for(var d=i-1,f=i===0?o:[""],p=hh(f),g=0,h=0,w=0;g<r;++g)for(var I=0,y=il(e,d+1,d=gG(h=a[g])),M=e;I<p;++I)(M=NS(h>0?f[I]+" "+y:be(y,/&\f/g,f[I])))&&(s[w++]=M);return fd(e,t,n,i===0?mh:l,s,u,c)}function AG(e,t,n){return fd(e,t,n,xS,cd(wG()),il(e,2,-2),0)}function $0(e,t,n,r){return fd(e,t,n,gh,il(e,0,r),il(e,r+1,-1),r)}function oo(e,t){for(var n="",r=hh(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function CG(e,t,n,r){switch(e.type){case mG:if(e.children.length)break;case pG:case gh:return e.return=e.return||e.value;case xS:return"";case bS:return e.return=e.value+"{"+oo(e.children,r)+"}";case mh:e.value=e.props.join(",")}return Bn(n=oo(e.children,r))?e.return=e.value+"{"+n+"}":""}function EG(e){var t=hh(e);return function(n,r,i,o){for(var a="",l=0;l<t;l++)a+=e[l](n,r,i,o)||"";return a}}function TG(e){return function(t){t.root||(t=t.return)&&e(t)}}function jG(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var LG=function(t,n,r){for(var i=0,o=0;i=o,o=Vn(),i===38&&o===12&&(n[r]=1),!ol(o);)nn();return Hl(t,Wt)},PG=function(t,n){var r=-1,i=44;do switch(ol(i)){case 0:i===38&&Vn()===12&&(n[r]=1),t[r]+=LG(Wt-1,n,r);break;case 2:t[r]+=Hs(i);break;case 4:if(i===44){t[++r]=Vn()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=cd(i)}while(i=nn());return t},RG=function(t,n){return AS(PG(DS(t),n))},_0=new WeakMap,OG=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,i=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!_0.get(r))&&!i){_0.set(t,!0);for(var o=[],a=RG(n,o),l=r.props,s=0,u=0;s<a.length;s++)for(var c=0;c<l.length;c++,u++)t.props[u]=o[s]?a[s].replace(/&\f/g,l[c]):l[c]+" "+a[s]}}},kG=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function CS(e,t){switch(vG(e,t)){case 5103:return xe+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return xe+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return xe+e+$u+e+xt+e+e;case 6828:case 4268:return xe+e+xt+e+e;case 6165:return xe+e+xt+"flex-"+e+e;case 5187:return xe+e+be(e,/(\w+).+(:[^]+)/,xe+"box-$1$2"+xt+"flex-$1$2")+e;case 5443:return xe+e+xt+"flex-item-"+be(e,/flex-|-self/,"")+e;case 4675:return xe+e+xt+"flex-line-pack"+be(e,/align-content|flex-|-self/,"")+e;case 5548:return xe+e+xt+be(e,"shrink","negative")+e;case 5292:return xe+e+xt+be(e,"basis","preferred-size")+e;case 6060:return xe+"box-"+be(e,"-grow","")+xe+e+xt+be(e,"grow","positive")+e;case 4554:return xe+be(e,/([^-])(transform)/g,"$1"+xe+"$2")+e;case 6187:return be(be(be(e,/(zoom-|grab)/,xe+"$1"),/(image-set)/,xe+"$1"),e,"")+e;case 5495:case 3959:return be(e,/(image-set\([^]*)/,xe+"$1$`$1");case 4968:return be(be(e,/(.+:)(flex-)?(.*)/,xe+"box-pack:$3"+xt+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+xe+e+e;case 4095:case 3583:case 4068:case 2532:return be(e,/(.+)-inline(.+)/,xe+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Bn(e)-1-t>6)switch(ht(e,t+1)){case 109:if(ht(e,t+4)!==45)break;case 102:return be(e,/(.+:)(.+)-([^]+)/,"$1"+xe+"$2-$3$1"+$u+(ht(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Jp(e,"stretch")?CS(be(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(ht(e,t+1)!==115)break;case 6444:switch(ht(e,Bn(e)-3-(~Jp(e,"!important")&&10))){case 107:return be(e,":",":"+xe)+e;case 101:return be(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+xe+(ht(e,14)===45?"inline-":"")+"box$3$1"+xe+"$2$3$1"+xt+"$2box$3")+e}break;case 5936:switch(ht(e,t+11)){case 114:return xe+e+xt+be(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return xe+e+xt+be(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return xe+e+xt+be(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return xe+e+xt+e+e}return e}var zG=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case gh:t.return=CS(t.value,t.length);break;case bS:return oo([oa(t,{value:be(t.value,"@","@"+xe)})],i);case mh:if(t.length)return IG(t.props,function(o){switch(yG(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return oo([oa(t,{props:[be(o,/:(read-\w+)/,":"+$u+"$1")]})],i);case"::placeholder":return oo([oa(t,{props:[be(o,/:(plac\w+)/,":"+xe+"input-$1")]}),oa(t,{props:[be(o,/:(plac\w+)/,":"+$u+"$1")]}),oa(t,{props:[be(o,/:(plac\w+)/,xt+"input-$1")]})],i)}return""})}},BG=[zG],UG=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(h){var w=h.getAttribute("data-emotion");w.indexOf(" ")!==-1&&(document.head.appendChild(h),h.setAttribute("data-s",""))})}var i=t.stylisPlugins||BG,o={},a,l=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(h){for(var w=h.getAttribute("data-emotion").split(" "),I=1;I<w.length;I++)o[w[I]]=!0;l.push(h)});var s,u=[OG,kG];{var c,d=[CG,TG(function(h){c.insert(h)})],f=EG(u.concat(i,d)),p=function(w){return oo(DG(w),f)};s=function(w,I,y,M){c=y,p(w?w+"{"+I.styles+"}":I.styles),M&&(g.inserted[I.name]=!0)}}var g={key:n,sheet:new fG({key:n,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:o,registered:{},insert:s};return g.sheet.hydrate(l),g};function $G(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var _G={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},FG=/[A-Z]|^ms/g,HG=/_EMO_([^_]+?)_([^]*?)_EMO_/g,ES=function(t){return t.charCodeAt(1)===45},F0=function(t){return t!=null&&typeof t!="boolean"},Sf=jG(function(e){return ES(e)?e:e.replace(FG,"-$&").toLowerCase()}),H0=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(HG,function(r,i,o){return Un={name:i,styles:o,next:Un},i})}return _G[t]!==1&&!ES(t)&&typeof n=="number"&&n!==0?n+"px":n};function al(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return Un={name:n.name,styles:n.styles,next:Un},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)Un={name:r.name,styles:r.styles,next:Un},r=r.next;var i=n.styles+";";return i}return GG(e,t,n)}case"function":{if(e!==void 0){var o=Un,a=n(e);return Un=o,al(e,t,a)}break}}if(t==null)return n;var l=t[n];return l!==void 0?l:n}function GG(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=al(e,t,n[i])+";";else for(var o in n){var a=n[o];if(typeof a!="object")t!=null&&t[a]!==void 0?r+=o+"{"+t[a]+"}":F0(a)&&(r+=Sf(o)+":"+H0(o,a)+";");else if(Array.isArray(a)&&typeof a[0]=="string"&&(t==null||t[a[0]]===void 0))for(var l=0;l<a.length;l++)F0(a[l])&&(r+=Sf(o)+":"+H0(o,a[l])+";");else{var s=al(e,t,a);switch(o){case"animation":case"animationName":{r+=Sf(o)+":"+s+";";break}default:r+=o+"{"+s+"}"}}}return r}var G0=/label:\s*([^\s;\n{]+)\s*(;|$)/g,Un,Df=function(t,n,r){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var i=!0,o="";Un=void 0;var a=t[0];a==null||a.raw===void 0?(i=!1,o+=al(r,n,a)):o+=a[0];for(var l=1;l<t.length;l++)o+=al(r,n,t[l]),i&&(o+=a[l]);G0.lastIndex=0;for(var s="",u;(u=G0.exec(o))!==null;)s+="-"+u[1];var c=$G(o)+s;return{name:c,styles:o,next:Un}},WG=!0;function TS(e,t,n){var r="";return n.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):r+=i+" "}),r}var VG=function(t,n,r){var i=t.key+"-"+n.name;(r===!1||WG===!1)&&t.registered[i]===void 0&&(t.registered[i]=n.styles)},ZG=function(t,n,r){VG(t,n,r);var i=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var o=n;do t.insert(n===o?"."+i:"",o,t.sheet,!0),o=o.next;while(o!==void 0)}};function W0(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function V0(e,t,n){var r=[],i=TS(e,r,n);return r.length<2?n:i+t(r)}var YG=function(t){var n=UG(t);n.sheet.speedy=function(l){this.isSpeedy=l},n.compat=!0;var r=function(){for(var s=arguments.length,u=new Array(s),c=0;c<s;c++)u[c]=arguments[c];var d=Df(u,n.registered,void 0);return ZG(n,d,!1),n.key+"-"+d.name},i=function(){for(var s=arguments.length,u=new Array(s),c=0;c<s;c++)u[c]=arguments[c];var d=Df(u,n.registered),f="animation-"+d.name;return W0(n,{name:d.name,styles:"@keyframes "+f+"{"+d.styles+"}"}),f},o=function(){for(var s=arguments.length,u=new Array(s),c=0;c<s;c++)u[c]=arguments[c];var d=Df(u,n.registered);W0(n,d)},a=function(){for(var s=arguments.length,u=new Array(s),c=0;c<s;c++)u[c]=arguments[c];return V0(n.registered,r,QG(u))};return{css:r,cx:a,injectGlobal:o,keyframes:i,hydrate:function(s){s.forEach(function(u){n.inserted[u]=!0})},flush:function(){n.registered={},n.inserted={},n.sheet.flush()},sheet:n.sheet,cache:n,getRegisteredStyles:TS.bind(null,n.registered),merge:V0.bind(null,n.registered,r)}},QG=function e(t){for(var n="",r=0;r<t.length;r++){var i=t[r];if(i!=null){var o=void 0;switch(typeof i){case"boolean":break;case"object":{if(Array.isArray(i))o=e(i);else{o="";for(var a in i)i[a]&&a&&(o&&(o+=" "),o+=a)}break}default:o=i}o&&(n&&(n+=" "),n+=o)}}return n},jS=YG({key:"css"}),JG=jS.cx,Ge=jS.css,XG=uG,Z0=e=>{const t=e.split(`
|
|
169
169
|
`);if(t.every(o=>!o))return t.length===2?[]:(t.pop(),t);const r=t[t.length-1],i=t[0];return r||t.pop(),i||t.shift(),t},qG=(e,t,n="diffChars")=>{const r=XG[n](e,t),i={left:[],right:[]};return r.forEach(({added:o,removed:a,value:l})=>{const s={};return o&&(s.type=1,s.value=l,i.right.push(s)),a&&(s.type=2,s.value=l,i.left.push(s)),!a&&!o&&(s.type=0,s.value=l,i.right.push(s),i.left.push(s)),s}),i},KG=(e,t,n=!1,r="diffChars",i=0)=>{const o=dh(e.trimRight(),t.trimRight(),{newlineIsToken:!0,ignoreWhitespace:!1,ignoreCase:!1});let a=i,l=i,s=[],u=0;const c=[],d=[],f=(p,g,h,w,I)=>Z0(p).map((M,x)=>{const S={},b={};if(!(d.includes(`${g}-${x}`)||I&&x!==0)){if(h||w)if(c.includes(u)||c.push(u),w){l+=1,S.lineNumber=l,S.type=2,S.value=M||" ";const N=o[g+1];if(N&&N.added&&Z0(N.value)[x]){const{value:P,lineNumber:R,type:O}=f(N.value,g,!0,!1,!0)[0].right;if(d.push(`${g+1}-${x}`),b.lineNumber=R,b.type=O,n)b.value=P;else{const J=qG(M,P,r);b.value=J.right,S.value=J.left}}}else a+=1,b.lineNumber=a,b.type=1,b.value=M;else l+=1,a+=1,S.lineNumber=l,S.type=0,S.value=M,b.lineNumber=a,b.type=0,b.value=M;return u+=1,{right:b,left:S}}}).filter(Boolean);return o.forEach(({added:p,removed:g,value:h},w)=>{s=[...s,...f(h,w,p,g)]}),{lineInformation:s,diffLines:c}},eW=(e,t=!1)=>{const{variables:n={},...r}=e,i={light:{diffViewerBackground:"#fff",diffViewerColor:"#212529",addedBackground:"#e6ffed",addedColor:"#24292e",removedBackground:"#ffeef0",removedColor:"#24292e",wordAddedBackground:"#acf2bd",wordRemovedBackground:"#fdb8c0",addedGutterBackground:"#cdffd8",removedGutterBackground:"#ffdce0",gutterBackground:"#f7f7f7",gutterBackgroundDark:"#f3f1f1",highlightBackground:"#fffbdd",highlightGutterBackground:"#fff5b1",codeFoldGutterBackground:"#dbedff",codeFoldBackground:"#f1f8ff",emptyLineBackground:"#fafbfc",gutterColor:"#212529",addedGutterColor:"#212529",removedGutterColor:"#212529",codeFoldContentColor:"#212529",diffViewerTitleBackground:"#fafbfc",diffViewerTitleColor:"#212529",diffViewerTitleBorderColor:"#eee",...n.light||{}},dark:{diffViewerBackground:"#2e303c",diffViewerColor:"#FFF",addedBackground:"#044B53",addedColor:"white",removedBackground:"#632F34",removedColor:"white",wordAddedBackground:"#055d67",wordRemovedBackground:"#7d383f",addedGutterBackground:"#034148",removedGutterBackground:"#632b30",gutterBackground:"#2c2f3a",gutterBackgroundDark:"#262933",highlightBackground:"#2a3967",highlightGutterBackground:"#2d4077",codeFoldGutterBackground:"#21232b",codeFoldBackground:"#262831",emptyLineBackground:"#363946",gutterColor:"#464c67",addedGutterColor:"#8c8c8c",removedGutterColor:"#8c8c8c",codeFoldContentColor:"#555a7b",diffViewerTitleBackground:"#2f323e",diffViewerTitleColor:"#555a7b",diffViewerTitleBorderColor:"#353846",...n.dark||{}}},o=t?i.dark:i.light,a=Ge({width:"100%",label:"content"}),l=Ge({[`.${a}`]:{width:"50%"},label:"split-view"}),s=Ge({width:"100%",background:o.diffViewerBackground,pre:{margin:0,whiteSpace:"pre-wrap",lineHeight:"25px"},label:"diff-container",borderCollapse:"collapse"}),u=Ge({color:o.codeFoldContentColor,label:"code-fold-content"}),c=Ge({color:o.diffViewerColor,label:"content-text"}),d=Ge({background:o.diffViewerTitleBackground,padding:10,borderBottom:`1px solid ${o.diffViewerTitleBorderColor}`,label:"title-block",":last-child":{borderLeft:`1px solid ${o.diffViewerTitleBorderColor}`},[`.${c}`]:{color:o.diffViewerTitleColor}}),f=Ge({color:o.gutterColor,label:"line-number"}),p=Ge({background:o.removedBackground,color:o.removedColor,pre:{color:o.removedColor},[`.${f}`]:{color:o.removedGutterColor},label:"diff-removed"}),g=Ge({background:o.addedBackground,color:o.addedColor,pre:{color:o.addedColor},[`.${f}`]:{color:o.addedGutterColor},label:"diff-added"}),h=Ge({padding:2,display:"inline-flex",borderRadius:1,label:"word-diff"}),w=Ge({background:o.wordAddedBackground,label:"word-added"}),I=Ge({background:o.wordRemovedBackground,label:"word-removed"}),y=Ge({backgroundColor:o.codeFoldGutterBackground,label:"code-fold-gutter"}),M=Ge({backgroundColor:o.codeFoldBackground,height:40,fontSize:14,fontWeight:700,label:"code-fold",a:{textDecoration:"underline !important",cursor:"pointer",pre:{display:"inline"}}}),x=Ge({backgroundColor:o.emptyLineBackground,label:"empty-line"}),S=Ge({width:25,paddingLeft:10,paddingRight:10,userSelect:"none",label:"marker",[`&.${g}`]:{pre:{color:o.addedColor}},[`&.${p}`]:{pre:{color:o.removedColor}}}),b=Ge({background:o.highlightBackground,label:"highlighted-line",[`.${w}, .${I}`]:{backgroundColor:"initial"}}),N=Ge({label:"highlighted-gutter"}),C=Ge({userSelect:"none",minWidth:50,padding:"0 10px",label:"gutter",textAlign:"right",background:o.gutterBackground,"&:hover":{cursor:"pointer",background:o.gutterBackgroundDark,pre:{opacity:1}},pre:{opacity:.5},[`&.${g}`]:{background:o.addedGutterBackground},[`&.${p}`]:{background:o.removedGutterBackground},[`&.${N}`]:{background:o.highlightGutterBackground,"&:hover":{background:o.highlightGutterBackground}}}),P=Ge({"&:hover":{background:o.gutterBackground,cursor:"initial"},label:"empty-gutter"}),R=Ge({verticalAlign:"baseline",label:"line"}),O={diffContainer:s,diffRemoved:p,diffAdded:g,splitView:l,marker:S,highlightedGutter:N,highlightedLine:b,gutter:C,line:R,wordDiff:h,wordAdded:w,wordRemoved:I,codeFoldGutter:y,codeFold:M,emptyGutter:P,emptyLine:x,lineNumber:f,contentText:c,content:a,codeFoldContent:u,titleBlock:d},J=Object.keys(r).reduce((U,W)=>({...U,[W]:Ge(r[W])}),{});return Object.keys(O).reduce((U,W)=>({...U,[W]:J[W]?JG(O[W],J[W]):O[W]}),{})},LS=class extends v.Component{constructor(e){super(e),this.resetCodeBlocks=()=>this.state.expandedBlocks.length>0?(this.setState({expandedBlocks:[]}),!0):!1,this.onBlockExpand=t=>{const n=this.state.expandedBlocks.slice();n.push(t),this.setState({expandedBlocks:n})},this.computeStyles=OH(eW),this.onLineNumberClickProxy=t=>this.props.onLineNumberClick?n=>this.props.onLineNumberClick(t,n):()=>{},this.renderWordDiff=(t,n)=>t.map((r,i)=>v.createElement("span",{key:i,className:ae(this.styles.wordDiff,{[this.styles.wordAdded]:r.type===1,[this.styles.wordRemoved]:r.type===2})},n?n(r.value):r.value)),this.renderLine=(t,n,r,i,o,a)=>{const l=`${r}-${t}`,s=`${a}-${o}`,u=this.props.highlightLines.includes(l)||this.props.highlightLines.includes(s),c=n===1,d=n===2;let f;return Array.isArray(i)?f=this.renderWordDiff(i,this.props.renderContent):this.props.renderContent?f=this.props.renderContent(i):f=i,v.createElement(v.Fragment,null,!this.props.hideLineNumbers&&v.createElement("td",{onClick:t&&this.onLineNumberClickProxy(l),className:ae(this.styles.gutter,{[this.styles.emptyGutter]:!t,[this.styles.diffAdded]:c,[this.styles.diffRemoved]:d,[this.styles.highlightedGutter]:u})},v.createElement("pre",{className:this.styles.lineNumber},t)),!this.props.splitView&&!this.props.hideLineNumbers&&v.createElement("td",{onClick:o&&this.onLineNumberClickProxy(s),className:ae(this.styles.gutter,{[this.styles.emptyGutter]:!o,[this.styles.diffAdded]:c,[this.styles.diffRemoved]:d,[this.styles.highlightedGutter]:u})},v.createElement("pre",{className:this.styles.lineNumber},o)),v.createElement("td",{className:ae(this.styles.marker,{[this.styles.emptyLine]:!f,[this.styles.diffAdded]:c,[this.styles.diffRemoved]:d,[this.styles.highlightedLine]:u})},v.createElement("pre",null,c&&"+",d&&"-")),v.createElement("td",{className:ae(this.styles.content,{[this.styles.emptyLine]:!f,[this.styles.diffAdded]:c,[this.styles.diffRemoved]:d,[this.styles.highlightedLine]:u})},v.createElement("pre",{className:this.styles.contentText},f)))},this.renderSplitView=({left:t,right:n},r)=>v.createElement("tr",{key:r,className:this.styles.line},this.renderLine(t.lineNumber,t.type,"L",t.value),this.renderLine(n.lineNumber,n.type,"R",n.value)),this.renderInlineView=({left:t,right:n},r)=>{let i;return t.type===2&&n.type===1?v.createElement(v.Fragment,{key:r},v.createElement("tr",{className:this.styles.line},this.renderLine(t.lineNumber,t.type,"L",t.value,null)),v.createElement("tr",{className:this.styles.line},this.renderLine(null,n.type,"R",n.value,n.lineNumber))):(t.type===2&&(i=this.renderLine(t.lineNumber,t.type,"L",t.value,null)),t.type===0&&(i=this.renderLine(t.lineNumber,t.type,"L",t.value,n.lineNumber,"R")),n.type===1&&(i=this.renderLine(null,n.type,"R",n.value,n.lineNumber)),v.createElement("tr",{key:r,className:this.styles.line},i))},this.onBlockClickProxy=t=>()=>this.onBlockExpand(t),this.renderSkippedLineIndicator=(t,n,r,i)=>{const{hideLineNumbers:o,splitView:a}=this.props,l=this.props.codeFoldMessageRenderer?this.props.codeFoldMessageRenderer(t,r,i):v.createElement("pre",{className:this.styles.codeFoldContent},"Expand ",t," lines ..."),s=v.createElement("td",null,v.createElement("a",{onClick:this.onBlockClickProxy(n),tabIndex:0},l)),u=!a&&!o;return v.createElement("tr",{key:`${r}-${i}`,className:this.styles.codeFold},!o&&v.createElement("td",{className:this.styles.codeFoldGutter}),v.createElement("td",{className:ae({[this.styles.codeFoldGutter]:u})}),u?v.createElement(v.Fragment,null,v.createElement("td",null),s):v.createElement(v.Fragment,null,s,v.createElement("td",null)),v.createElement("td",null),v.createElement("td",null))},this.renderDiff=()=>{const{oldValue:t,newValue:n,splitView:r,disableWordDiff:i,compareMethod:o,linesOffset:a}=this.props,{lineInformation:l,diffLines:s}=KG(t,n,i,o,a),u=this.props.extraLinesSurroundingDiff<0?0:this.props.extraLinesSurroundingDiff;let c=[];return l.map((d,f)=>{const p=s[0],g=p-f;if(this.props.showDiffOnly&&(g===-u&&(c=[],s.shift()),d.left.type===0&&(g>u||typeof p>"u")&&!this.state.expandedBlocks.includes(p)))return c.push(f+1),f===l.length-1&&c.length>1?this.renderSkippedLineIndicator(c.length,p,d.left.lineNumber,d.right.lineNumber):null;const h=r?this.renderSplitView(d,f):this.renderInlineView(d,f);if(g===u&&c.length>0){const{length:w}=c;return c=[],v.createElement(v.Fragment,{key:f},this.renderSkippedLineIndicator(w,p,d.left.lineNumber,d.right.lineNumber),h)}return h})},this.render=()=>{const{oldValue:t,newValue:n,useDarkTheme:r,leftTitle:i,rightTitle:o,splitView:a,hideLineNumbers:l}=this.props;if(typeof t!="string"||typeof n!="string")throw Error('"oldValue" and "newValue" should be strings');this.styles=this.computeStyles(this.props.styles,r);const s=this.renderDiff(),u=l?2:3,c=l?2:4,d=(i||o)&&v.createElement("tr",null,v.createElement("td",{colSpan:a?u:c,className:this.styles.titleBlock},v.createElement("pre",{className:this.styles.contentText},i)),a&&v.createElement("td",{colSpan:u,className:this.styles.titleBlock},v.createElement("pre",{className:this.styles.contentText},o)));return v.createElement("table",{className:ae(this.styles.diffContainer,{[this.styles.splitView]:a})},v.createElement("tbody",null,d,s))},this.state={expandedBlocks:[]}}};LS.defaultProps={oldValue:"",newValue:"",splitView:!0,highlightLines:[],disableWordDiff:!1,compareMethod:"diffChars",styles:{},hideLineNumbers:!1,extraLinesSurroundingDiff:3,showDiffOnly:!0,useDarkTheme:!1,linesOffset:0};var tW=LS;const nW={line:{padding:"5px 2px","&:hover":{background:"#a26ea1"}},titleBlock:{padding:"5px",paddingLeft:"15px"}},rW=({url:e,surfaceResponse:t})=>{const n=Cl().get("path"),r=$c(),i=El(),o=Al(),[a,l]=v.useState(!1),[s,u]=v.useState(!1),[c,d]=v.useState(null),[f,p]=v.useState(null),[g,h]=v.useState(!0);v.useEffect(()=>{(async()=>{try{(await fetch(`${e}/ping`)).ok||h(!1)}catch{h(!1)}})()},[g]),v.useEffect(()=>{async function S(b){const N=await fetch(`${e}/open-api-content?path=${n}`,{method:"GET"});if(N.status!==200){const R=await N.json();throw Error(R.message)}const P=(await N.json()).filter(R=>R.path===b);if(P.length>0)return P[0]}if(g){const b=new EventSource(`${e}/updates`);return b.onmessage=async N=>{const C=JSON.parse(N.data);if(C.type==="update"){if(n===null)return;const R=/([a-zA-Z0-9\.\-\_]*)$/.exec(C.filePath);if(!R||!R[0])return;const O=R[0];if(O!==zp&&O!==n){console.log(`discarded event since changes were on '${C.filePath}'`);return}try{const J=await S(O);if(J){const U={path:J.path,type:xu.File,content:JSON.stringify(J.content,void 0,4),saveState:St.unmodified};O===zp&&i.policyListFileModel.saveState!==St.unmodified||O===n&&r.openApiFileModel.saveState!==St.unmodified?x(O,U):(o(U,St.unmodified),t(`Successfully updated Local Designer with external file changes from '${U.path}'.`,"info"))}}catch(J){const U=J.message&&J.message.includes("Failed to fetch")?Bc:`Error: ${J.message}`;t(U,"error")}}},b.onerror=N=>{console.warn("Hot-reload error:",N),t("An error occurred while attempting to set the hot-reload connection. Try restarting the editor.","error"),b.close(),h(!1)},b.addEventListener("close",()=>b.close()),()=>{b.close()}}},[i,r,g]);const w=()=>{l(!1),M(),d(null),p(null),u(!1)},I=()=>{if(f===null){t("An error occurred while attempting to overwrite using the external file changes. Try refreshing the editor session.","error"),w();return}o(f,St.unmodified),t(`Successfully updated Local Designer with external file changes from '${f.path}'.`,"info"),w()},[y,M]=ho(()=>m.jsx(kM,{onClose:w,isOpen:!0,maxWidth:"max-w-4xl",children:m.jsxs("div",{className:"space-y-4",children:[m.jsx("div",{className:"text-xl font-bold",children:"Changes outside of Local Designer"}),m.jsx("div",{className:"text-left text-sm text-gray-600 whitespace-pre-line w-full mb-2",children:m.jsxs("p",{className:"leading-6 mb-5",children:["Failed to hot-reload '",c,"': The content in Local Designer is newer.",m.jsx("br",{})," Please choose if you want to keep current Local Designer changes or overwrite them with the external changes."]})}),s?m.jsx("div",{className:"overflow-scroll h-96 text-sm border",children:m.jsx(tW,{oldValue:(f==null?void 0:f.path)==="policies.json"?i.policyListFileModel.content:r.openApiFileModel.content,newValue:f==null?void 0:f.content,splitView:!0,leftTitle:"Current changes",rightTitle:"External changes",styles:nW})}):m.jsx("div",{className:"text-sm",children:"* This diff is too large to display properly."}),m.jsxs("div",{className:"flex flex-row items-center justify-center space-x-2",children:[m.jsx(En,{label:"Keep current changes",onClick:w}),m.jsx(En,{dataTestId:"connect-non-empty-repo-confirm",buttonType:xi.WHITE,label:"Overwrite current changes",onClick:I})]})]})}),[c,i,f,r]),x=(S,b)=>{d(S),p(b);try{if(b.path.endsWith(".oas.json")&&b.content){const N=JSON.parse(b.content);N.paths&&Object.keys(N.paths).length<40&&u(!0)}else if(b.path.endsWith("policies.json")&&b.content){const N=JSON.parse(b.content);N.policies&&N.policies.length<40&&u(!0)}}catch{console.warn("Failed while calculating the diff size")}y()};return m.jsx("div",{})},iW=5e3;function oW(){const[e,t]=v.useState(null),n=a=>{t({message:a,type:"error"})},r=(a,l)=>{t({message:a,type:l}),setTimeout(()=>{t(null)},iW)},i=window.SERVER_DATA,o=`http://${i.server_address}:${i.server_port}`;return m.jsx("div",{className:"h-screen min-w-lg",children:m.jsx(a3,{children:m.jsx(yC,{children:m.jsx(mk,{children:m.jsx(s3,{url:o,handleErrors:n,children:m.jsx(f3,{children:m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"flex gap-5 px-3 mx-4 ",children:[m.jsx("div",{className:"flex-grow",children:m.jsx(Ob,{url:o,handleErrors:n})}),m.jsx("div",{className:"flex-grow",children:e!==null&&m.jsx(LH,{message:e.message,type:e.type})}),m.jsx("div",{className:"flex-grow",children:m.jsx(jH,{url:o,surfaceResponse:r})})]}),m.jsx(rW,{url:o,surfaceResponse:r}),m.jsx("div",{className:"flex-grow",children:m.jsx(TH,{})})]})})})})})})})}Af.createRoot(document.getElementById("root")).render(m.jsx(k.StrictMode,{children:m.jsx(oW,{})}));
|
|
170
170
|
|
|
171
|
-
//# debugId=
|
|
171
|
+
//# debugId=9a98be6d-dfa8-5894-8a42-8f000cd0d850
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="935a246d-93e4-521b-833c-997e05b1defa")}catch(e){}}();
|
|
3
3
|
import fp from 'fastify-plugin';
|
|
4
4
|
import cors from '@fastify/cors';
|
|
5
5
|
export const corsPlugin = fp(async function (fastify, opts) {
|
|
@@ -16,4 +16,4 @@ export const corsPlugin = fp(async function (fastify, opts) {
|
|
|
16
16
|
});
|
|
17
17
|
});
|
|
18
18
|
//# sourceMappingURL=cors-plugin.js.map
|
|
19
|
-
//# debugId=
|
|
19
|
+
//# debugId=935a246d-93e4-521b-833c-997e05b1defa
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="a1c18fce-50a3-5d1a-a266-cdeb334c2940")}catch(e){}}();
|
|
3
3
|
import fastifyStatic from "@fastify/static";
|
|
4
4
|
import chokidar from "chokidar";
|
|
5
5
|
import Fastify from "fastify";
|
|
@@ -253,4 +253,4 @@ export class ApiServer {
|
|
|
253
253
|
};
|
|
254
254
|
}
|
|
255
255
|
//# sourceMappingURL=server.js.map
|
|
256
|
-
//# debugId=
|
|
256
|
+
//# debugId=a1c18fce-50a3-5d1a-a266-cdeb334c2940
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="5594147b-22d1-553f-8893-d5ddb61be0d0")}catch(e){}}();
|
|
3
3
|
import fs from 'node:fs/promises';
|
|
4
4
|
export async function fileExists(fsPath) {
|
|
5
5
|
try {
|
|
@@ -20,4 +20,4 @@ export async function dirExists(fsPath) {
|
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
//# sourceMappingURL=xfs.js.map
|
|
23
|
-
//# debugId=
|
|
23
|
+
//# debugId=5594147b-22d1-553f-8893-d5ddb61be0d0
|
package/dist/link/handler.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="3c8e52ab-7b72-5f36-b4ad-e2ee1aaa743c")}catch(e){}}();
|
|
3
3
|
import { select } from "@inquirer/prompts";
|
|
4
4
|
import { readFile } from "node:fs/promises";
|
|
5
5
|
import { join } from "node:path";
|
|
@@ -80,4 +80,4 @@ Successfully linked your local directory to the ${project} project in the ${acco
|
|
|
80
80
|
.env.zuplo and zuplo.jsonc have been updated with the new values.`);
|
|
81
81
|
}
|
|
82
82
|
//# sourceMappingURL=handler.js.map
|
|
83
|
-
//# debugId=
|
|
83
|
+
//# debugId=3c8e52ab-7b72-5f36-b4ad-e2ee1aaa743c
|
package/dist/link/populate.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b2394d6d-82d5-5876-b02e-aa6ebe0bf121")}catch(e){}}();
|
|
3
3
|
import { applyEdits, modify } from "jsonc-parser";
|
|
4
4
|
import { existsSync } from "node:fs";
|
|
5
5
|
import { readFile, writeFile } from "node:fs/promises";
|
|
@@ -66,4 +66,4 @@ export async function pullSystemConfig(dir, options) {
|
|
|
66
66
|
await writeFile(zuploPreferredConfigFile, content);
|
|
67
67
|
}
|
|
68
68
|
//# sourceMappingURL=populate.js.map
|
|
69
|
-
//# debugId=
|
|
69
|
+
//# debugId=b2394d6d-82d5-5876-b02e-aa6ebe0bf121
|
package/dist/list/handler.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="2c0014d1-9750-52ee-a907-06d713524f2c")}catch(e){}}();
|
|
3
3
|
import { logger } from "../common/logger.js";
|
|
4
4
|
import { printDiagnosticsToConsole, printResultToConsoleAndExitGracefully, textOrJson, } from "../common/output.js";
|
|
5
5
|
import settings from "../common/settings.js";
|
|
@@ -26,4 +26,4 @@ export async function list(argv) {
|
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
//# sourceMappingURL=handler.js.map
|
|
29
|
-
//# debugId=
|
|
29
|
+
//# debugId=2c0014d1-9750-52ee-a907-06d713524f2c
|
package/dist/login/handler.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b9c770bd-87ab-597f-b274-832456a7ddad")}catch(e){}}();
|
|
3
3
|
import crypto from "node:crypto";
|
|
4
4
|
import { existsSync, mkdirSync } from "node:fs";
|
|
5
5
|
import { writeFile } from "node:fs/promises";
|
|
@@ -75,4 +75,4 @@ export async function login(args) {
|
|
|
75
75
|
await printResultToConsoleAndExitGracefully("Successfully authenticated.");
|
|
76
76
|
}
|
|
77
77
|
//# sourceMappingURL=handler.js.map
|
|
78
|
-
//# debugId=
|
|
78
|
+
//# debugId=b9c770bd-87ab-597f-b274-832456a7ddad
|
package/dist/login/server.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="39935908-8083-55f7-9402-b4eede173a4c")}catch(e){}}();
|
|
3
3
|
import http from "node:http";
|
|
4
4
|
import opn from "open";
|
|
5
5
|
import { printCriticalFailureToConsoleAndExit } from "../common/output.js";
|
|
@@ -35,4 +35,4 @@ export async function browserAuth(authorizationUrl) {
|
|
|
35
35
|
return params;
|
|
36
36
|
}
|
|
37
37
|
//# sourceMappingURL=server.js.map
|
|
38
|
-
//# debugId=
|
|
38
|
+
//# debugId=39935908-8083-55f7-9402-b4eede173a4c
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="033f0170-115e-58e0-8515-63e43519f59c")}catch(e){}}();
|
|
3
3
|
import { confirm } from "@inquirer/prompts";
|
|
4
4
|
import jsYaml from "js-yaml";
|
|
5
5
|
import { existsSync, writeFileSync } from "node:fs";
|
|
@@ -142,4 +142,4 @@ export async function importOpenApi(argv) {
|
|
|
142
142
|
await printResultToConsoleAndExitGracefully(`Import successful. File written to ${destinationFilePath}`);
|
|
143
143
|
}
|
|
144
144
|
//# sourceMappingURL=handler.js.map
|
|
145
|
-
//# debugId=
|
|
145
|
+
//# debugId=033f0170-115e-58e0-8515-63e43519f59c
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="5051b282-1718-5800-92f3-6da9acec7bac")}catch(e){}}();
|
|
3
3
|
import yaml from "js-yaml";
|
|
4
4
|
import { v4 } from "uuid";
|
|
5
5
|
import { ZUPLO_OPEN_API_PATH_KEY, ZUPLO_OPEN_API_ROUTE_KEY, } from "./interfaces.js";
|
|
@@ -220,4 +220,4 @@ const getAllOperationKeys = (pathsObject) => {
|
|
|
220
220
|
.flat();
|
|
221
221
|
};
|
|
222
222
|
//# sourceMappingURL=utils.js.map
|
|
223
|
-
//# debugId=
|
|
223
|
+
//# debugId=5051b282-1718-5800-92f3-6da9acec7bac
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="621a9145-cc00-51e8-be17-81b63287e71c")}catch(e){}}();
|
|
3
3
|
import { confirm } from "@inquirer/prompts";
|
|
4
4
|
import { printDiagnosticsToConsole, printResultToConsoleAndExitGracefully, } from "../../common/output.js";
|
|
5
5
|
import { PackageJsonUpgrader } from "../../common/upgraders/package-json-upgrader.js";
|
|
@@ -26,4 +26,4 @@ export async function update(argv) {
|
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
//# sourceMappingURL=handler.js.map
|
|
29
|
-
//# debugId=
|
|
29
|
+
//# debugId=621a9145-cc00-51e8-be17-81b63287e71c
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="327f255c-47ca-568f-9b06-a3716ca6b328")}catch(e){}}();
|
|
3
3
|
export function denoTestPrepPlugin(argv, options) {
|
|
4
4
|
const aliases = Object.keys(options);
|
|
5
5
|
const re = new RegExp(`^(${aliases.map((x) => escapeRegExp(x)).join("|")})$`);
|
|
@@ -96,4 +96,4 @@ function generateTestContents(argv) {
|
|
|
96
96
|
`;
|
|
97
97
|
}
|
|
98
98
|
//# sourceMappingURL=deno-test-prep-plugin.js.map
|
|
99
|
-
//# debugId=
|
|
99
|
+
//# debugId=327f255c-47ca-568f-9b06-a3716ca6b328
|
package/dist/test/handler.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="22d3731c-201b-5303-ad12-25a85ff3fb29")}catch(e){}}();
|
|
3
3
|
import fg from "fast-glob";
|
|
4
4
|
import { promisify } from "node:util";
|
|
5
5
|
import rimraf from "rimraf";
|
|
@@ -27,4 +27,4 @@ export async function test(argv) {
|
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
//# sourceMappingURL=handler.js.map
|
|
30
|
-
//# debugId=
|
|
30
|
+
//# debugId=22d3731c-201b-5303-ad12-25a85ff3fb29
|
package/dist/test/invoke-test.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="a86033b8-649a-53cf-9f24-6b9f118258b4")}catch(e){}}();
|
|
3
3
|
import { execa } from "execa";
|
|
4
4
|
import { TEST_OUT_FOLDER } from "../common/constants.js";
|
|
5
5
|
import { locateDenoExecutable, MissingDenoExecutableError, } from "../common/deno-utils/locator.js";
|
|
@@ -35,4 +35,4 @@ export async function runTests(argv) {
|
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
//# sourceMappingURL=invoke-test.js.map
|
|
38
|
-
//# debugId=
|
|
38
|
+
//# debugId=a86033b8-649a-53cf-9f24-6b9f118258b4
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="afb9a00d-4582-5f88-a6fa-ff4838dc22f0")}catch(e){}}();
|
|
3
3
|
import { logger } from "../../common/logger.js";
|
|
4
4
|
import { printDiagnosticsToConsole, printTableToConsoleAndExitGracefully, textOrJson, } from "../../common/output.js";
|
|
5
5
|
import settings from "../../common/settings.js";
|
|
@@ -27,4 +27,4 @@ export async function create(argv) {
|
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
//# sourceMappingURL=handler.js.map
|
|
30
|
-
//# debugId=
|
|
30
|
+
//# debugId=afb9a00d-4582-5f88-a6fa-ff4838dc22f0
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="0830f7a7-a266-5f48-88e0-acf2d802eb39")}catch(e){}}();
|
|
3
3
|
import { logger } from "../../common/logger.js";
|
|
4
4
|
import { printCriticalFailureToConsoleAndExit, printDiagnosticsToConsole, printResultToConsoleAndExitGracefully, textOrJson, } from "../../common/output.js";
|
|
5
5
|
import settings from "../../common/settings.js";
|
|
@@ -38,4 +38,4 @@ export async function deleteTunnel(argv) {
|
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
//# sourceMappingURL=handler.js.map
|
|
41
|
-
//# debugId=
|
|
41
|
+
//# debugId=0830f7a7-a266-5f48-88e0-acf2d802eb39
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="05b450c9-fe50-5745-8b18-294ba1768c62")}catch(e){}}();
|
|
3
3
|
import { logger } from "../../common/logger.js";
|
|
4
4
|
import { printDiagnosticsToConsole } from "../../common/output.js";
|
|
5
5
|
import settings from "../../common/settings.js";
|
|
@@ -37,4 +37,4 @@ export async function pollTeardownOperation(args) {
|
|
|
37
37
|
throw new Error("Unexpected error while polling for teardown operation status");
|
|
38
38
|
}
|
|
39
39
|
//# sourceMappingURL=poll-teardown-operation.js.map
|
|
40
|
-
//# debugId=
|
|
40
|
+
//# debugId=05b450c9-fe50-5745-8b18-294ba1768c62
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="9c88c21f-bc3c-528e-a535-cd2107761468")}catch(e){}}();
|
|
3
3
|
import { logger } from "../../common/logger.js";
|
|
4
4
|
import { printDiagnosticsToConsole, printTableToConsoleAndExitGracefully, textOrJson, } from "../../common/output.js";
|
|
5
5
|
import settings from "../../common/settings.js";
|
|
@@ -25,4 +25,4 @@ export async function describe(argv) {
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
//# sourceMappingURL=handler.js.map
|
|
28
|
-
//# debugId=
|
|
28
|
+
//# debugId=9c88c21f-bc3c-528e-a535-cd2107761468
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="d039ef04-2a1a-560a-8534-46eed7d6d1d3")}catch(e){}}();
|
|
3
3
|
import { logger } from "../../common/logger.js";
|
|
4
4
|
import { printDiagnosticsToConsole, printResultToConsoleAndExitGracefully, printTableToConsoleAndExitGracefully, } from "../../common/output.js";
|
|
5
5
|
import settings from "../../common/settings.js";
|
|
@@ -34,4 +34,4 @@ export async function list(argv) {
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
//# sourceMappingURL=handler.js.map
|
|
37
|
-
//# debugId=
|
|
37
|
+
//# debugId=d039ef04-2a1a-560a-8534-46eed7d6d1d3
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="4198e529-4dae-513c-9766-f43b0c50accd")}catch(e){}}();
|
|
3
3
|
import { logger } from "../../common/logger.js";
|
|
4
4
|
import { printDiagnosticsToConsole, printTableToConsoleAndExitGracefully, textOrJson, } from "../../common/output.js";
|
|
5
5
|
import settings from "../../common/settings.js";
|
|
@@ -25,4 +25,4 @@ export async function rotateToken(argv) {
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
//# sourceMappingURL=handler.js.map
|
|
28
|
-
//# debugId=
|
|
28
|
+
//# debugId=4198e529-4dae-513c-9766-f43b0c50accd
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="752ef7eb-cafc-55ab-ad16-47ac07a42333")}catch(e){}}();
|
|
3
3
|
import { logger } from "../../../common/logger.js";
|
|
4
4
|
import { printDiagnosticsToConsole, printResultToConsoleAndExitGracefully, textOrJson, } from "../../../common/output.js";
|
|
5
5
|
import settings from "../../../common/settings.js";
|
|
@@ -25,4 +25,4 @@ export async function describe(argv) {
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
//# sourceMappingURL=handler.js.map
|
|
28
|
-
//# debugId=
|
|
28
|
+
//# debugId=752ef7eb-cafc-55ab-ad16-47ac07a42333
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="c73b2bbb-ae00-542f-831f-b6cc8847e3e7")}catch(e){}}();
|
|
3
3
|
import { readFile } from "node:fs/promises";
|
|
4
4
|
import { logger } from "../../../common/logger.js";
|
|
5
5
|
import { printCriticalFailureToConsoleAndExit, printDiagnosticsToConsole, printResultToConsoleAndExitGracefully, textOrJson, } from "../../../common/output.js";
|
|
@@ -48,4 +48,4 @@ export async function updateServices(argv) {
|
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
//# sourceMappingURL=handler.js.map
|
|
51
|
-
//# debugId=
|
|
51
|
+
//# debugId=c73b2bbb-ae00-542f-831f-b6cc8847e3e7
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="fdd0900d-d354-5e4c-89df-9e29d39aee5d")}catch(e){}}();
|
|
3
3
|
import { logger } from "../../../common/logger.js";
|
|
4
4
|
import { printDiagnosticsToConsole, textOrJson, } from "../../../common/output.js";
|
|
5
5
|
import settings from "../../../common/settings.js";
|
|
@@ -41,4 +41,4 @@ export async function pollProvisioningOperation(args) {
|
|
|
41
41
|
throw new Error("Unexpected error while polling for provisioning operation status");
|
|
42
42
|
}
|
|
43
43
|
//# sourceMappingURL=poll-provisioning-operations.js.map
|
|
44
|
-
//# debugId=
|
|
44
|
+
//# debugId=fdd0900d-d354-5e4c-89df-9e29d39aee5d
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="09b712ce-fdf2-5886-85a9-c5053da7ee48")}catch(e){}}();
|
|
3
3
|
import { logger } from "../../common/logger.js";
|
|
4
4
|
import { printDiagnosticsToConsole, printResultToConsole, textOrJson, } from "../../common/output.js";
|
|
5
5
|
import settings from "../../common/settings.js";
|
|
@@ -31,4 +31,4 @@ export async function create(argv) {
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
//# sourceMappingURL=handler.js.map
|
|
34
|
-
//# debugId=
|
|
34
|
+
//# debugId=09b712ce-fdf2-5886-85a9-c5053da7ee48
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="15639d69-562d-52f0-8bcd-41b3681a0ae0")}catch(e){}}();
|
|
3
3
|
import { logger } from "../../common/logger.js";
|
|
4
4
|
import { printDiagnosticsToConsole, printResultToConsole, textOrJson, } from "../../common/output.js";
|
|
5
5
|
import settings from "../../common/settings.js";
|
|
@@ -29,4 +29,4 @@ export async function update(argv) {
|
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
//# sourceMappingURL=handler.js.map
|
|
32
|
-
//# debugId=
|
|
32
|
+
//# debugId=15639d69-562d-52f0-8bcd-41b3681a0ae0
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zuplo/cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.104.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": "https://github.com/zuplo/cli",
|
|
6
6
|
"description": "The command-line interface for Zuplo",
|
|
@@ -58,12 +58,13 @@
|
|
|
58
58
|
"dependencies": {
|
|
59
59
|
"@fastify/cors": "^8.3.0",
|
|
60
60
|
"@fastify/static": "^6.10.2",
|
|
61
|
+
"@google-cloud/tasks": "5.1.1",
|
|
61
62
|
"@inquirer/prompts": "^3.0.4",
|
|
62
63
|
"@sentry/node": "7.69.0",
|
|
63
64
|
"@swc/core": "1.3.78",
|
|
64
|
-
"@zuplo/core": "5.
|
|
65
|
+
"@zuplo/core": "5.1949.0",
|
|
65
66
|
"@zuplo/pino-pretty-configurations": "^1.5.0",
|
|
66
|
-
"@zuplo/runtime": "5.
|
|
67
|
+
"@zuplo/runtime": "5.1949.0",
|
|
67
68
|
"chalk": "^5.1.2",
|
|
68
69
|
"chokidar": "^3.5.3",
|
|
69
70
|
"deno-bin": "1.37.1",
|
|
@@ -78,6 +79,7 @@
|
|
|
78
79
|
"jose": "^4.14.4",
|
|
79
80
|
"js-yaml": "^4.1.0",
|
|
80
81
|
"jsonc-parser": "^3.2.0",
|
|
82
|
+
"minimatch": "^9.0.3",
|
|
81
83
|
"open": "^9.1.0",
|
|
82
84
|
"pino": "^8.11.0",
|
|
83
85
|
"pino-pretty": "^9.4.0",
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// Source: https://github.com/simon-id/diagnostics_channel-polyfill/tree/master
|
|
3
|
+
|
|
4
|
+
// Port from node core lib/internal/errors.js
|
|
5
|
+
class ERR_INVALID_ARG_TYPE extends TypeError {
|
|
6
|
+
constructor(message, actual) {
|
|
7
|
+
super();
|
|
8
|
+
|
|
9
|
+
if (actual == null) {
|
|
10
|
+
message += `. Received ${actual}`;
|
|
11
|
+
} else if (typeof actual === "function" && actual.name) {
|
|
12
|
+
message += `. Received function ${actual.name}`;
|
|
13
|
+
} else if (typeof actual === "object") {
|
|
14
|
+
if (actual.constructor && actual.constructor.name) {
|
|
15
|
+
message += `. Received an instance of ${actual.constructor.name}`;
|
|
16
|
+
} else {
|
|
17
|
+
const inspected = util.inspect(actual, { depth: -1 });
|
|
18
|
+
message += `. Received ${inspected}`;
|
|
19
|
+
}
|
|
20
|
+
} else {
|
|
21
|
+
let inspected = util.inspect(actual, { colors: false });
|
|
22
|
+
if (inspected.length > 25) {
|
|
23
|
+
inspected = `${inspected.slice(0, 25)}...`;
|
|
24
|
+
}
|
|
25
|
+
message += `. Received type ${typeof actual} (${inspected})`;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
this.code = this.constructor.name;
|
|
29
|
+
|
|
30
|
+
Object.defineProperties(this, {
|
|
31
|
+
message: {
|
|
32
|
+
value: message,
|
|
33
|
+
enumerable: false,
|
|
34
|
+
writable: true,
|
|
35
|
+
configurable: true,
|
|
36
|
+
},
|
|
37
|
+
toString: {
|
|
38
|
+
value() {
|
|
39
|
+
return `${this.name} [${this.code}]: ${this.message}`;
|
|
40
|
+
},
|
|
41
|
+
enumerable: false,
|
|
42
|
+
writable: true,
|
|
43
|
+
configurable: true,
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
class ActiveChannel {
|
|
50
|
+
subscribe(subscription) {
|
|
51
|
+
if (typeof subscription !== "function") {
|
|
52
|
+
throw new ERR_INVALID_ARG_TYPE(
|
|
53
|
+
'The "subscription" argument must be of type function',
|
|
54
|
+
subscription
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
this._subscribers.push(subscription);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
unsubscribe(subscription) {
|
|
61
|
+
const index = this._subscribers.indexOf(subscription);
|
|
62
|
+
if (index === -1) return false;
|
|
63
|
+
|
|
64
|
+
this._subscribers.splice(index, 1);
|
|
65
|
+
|
|
66
|
+
// When there are no more active subscribers, restore to fast prototype.
|
|
67
|
+
if (!this._subscribers.length) {
|
|
68
|
+
// eslint-disable-next-line no-use-before-define
|
|
69
|
+
Object.setPrototypeOf(this, Channel.prototype);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
return true;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
get hasSubscribers() {
|
|
76
|
+
return true;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
publish(data) {
|
|
80
|
+
for (let i = 0; i < this._subscribers.length; i++) {
|
|
81
|
+
try {
|
|
82
|
+
const onMessage = this._subscribers[i];
|
|
83
|
+
onMessage(data, this.name);
|
|
84
|
+
} catch (err) {
|
|
85
|
+
process.nextTick(() => {
|
|
86
|
+
throw err;
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export class Channel {
|
|
94
|
+
constructor(name) {
|
|
95
|
+
this._subscribers = undefined;
|
|
96
|
+
this.name = name;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
static [Symbol.hasInstance](instance) {
|
|
100
|
+
const prototype = Object.getPrototypeOf(instance);
|
|
101
|
+
return (
|
|
102
|
+
prototype === Channel.prototype || prototype === ActiveChannel.prototype
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
subscribe(subscription) {
|
|
107
|
+
Object.setPrototypeOf(this, ActiveChannel.prototype);
|
|
108
|
+
this._subscribers = [];
|
|
109
|
+
this.subscribe(subscription);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
unsubscribe() {
|
|
113
|
+
return false;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
get hasSubscribers() {
|
|
117
|
+
return false;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
publish() {}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
const channels = {};
|
|
124
|
+
|
|
125
|
+
export function channel(name) {
|
|
126
|
+
const channel = channels[name];
|
|
127
|
+
if (channel) return channel;
|
|
128
|
+
|
|
129
|
+
if (typeof name !== "string" && typeof name !== "symbol") {
|
|
130
|
+
throw new ERR_INVALID_ARG_TYPE(
|
|
131
|
+
'The "channel" argument must be one of type string or symbol',
|
|
132
|
+
name
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
return (channels[name] = new Channel(name));
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export function hasSubscribers(name) {
|
|
140
|
+
const channel = channels[name];
|
|
141
|
+
if (!channel) {
|
|
142
|
+
return false;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
return channel.hasSubscribers;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export function deleteChannel(name) {
|
|
149
|
+
if (channels[name]) {
|
|
150
|
+
channels[name] = null;
|
|
151
|
+
return true;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
return false;
|
|
155
|
+
}
|