@scalar/workspace-store 0.17.1 → 0.18.1
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/CHANGELOG.md +53 -0
- package/dist/client.d.ts +31 -19
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +267 -88
- package/dist/client.js.map +3 -3
- package/dist/events/bus.d.ts +96 -0
- package/dist/events/bus.d.ts.map +1 -0
- package/dist/events/bus.js +60 -0
- package/dist/events/bus.js.map +7 -0
- package/dist/events/definitions/analytics.d.ts +27 -0
- package/dist/events/definitions/analytics.d.ts.map +1 -0
- package/dist/events/definitions/analytics.js +1 -0
- package/dist/events/definitions/analytics.js.map +7 -0
- package/dist/events/definitions/auth.d.ts +30 -0
- package/dist/events/definitions/auth.d.ts.map +1 -0
- package/dist/events/definitions/auth.js +1 -0
- package/dist/events/definitions/auth.js.map +7 -0
- package/dist/events/definitions/common.d.ts +5 -0
- package/dist/events/definitions/common.d.ts.map +1 -0
- package/dist/events/definitions/common.js +1 -0
- package/dist/events/definitions/common.js.map +7 -0
- package/dist/events/definitions/document.d.ts +14 -0
- package/dist/events/definitions/document.d.ts.map +1 -0
- package/dist/events/definitions/document.js +1 -0
- package/dist/events/definitions/document.js.map +7 -0
- package/dist/events/definitions/environment.d.ts +37 -0
- package/dist/events/definitions/environment.d.ts.map +1 -0
- package/dist/events/definitions/environment.js +1 -0
- package/dist/events/definitions/environment.js.map +7 -0
- package/dist/events/definitions/index.d.ts +12 -0
- package/dist/events/definitions/index.d.ts.map +1 -0
- package/dist/events/definitions/index.js +1 -0
- package/dist/events/definitions/index.js.map +7 -0
- package/dist/events/definitions/meta.d.ts +17 -0
- package/dist/events/definitions/meta.d.ts.map +1 -0
- package/dist/events/definitions/meta.js +1 -0
- package/dist/events/definitions/meta.js.map +7 -0
- package/dist/events/definitions/operation.d.ts +11 -0
- package/dist/events/definitions/operation.d.ts.map +1 -0
- package/dist/events/definitions/operation.js +1 -0
- package/dist/events/definitions/operation.js.map +7 -0
- package/dist/events/definitions/server.d.ts +50 -0
- package/dist/events/definitions/server.d.ts.map +1 -0
- package/dist/events/definitions/server.js +1 -0
- package/dist/events/definitions/server.js.map +7 -0
- package/dist/events/definitions/ui.d.ts +52 -0
- package/dist/events/definitions/ui.d.ts.map +1 -0
- package/dist/events/definitions/ui.js +1 -0
- package/dist/events/definitions/ui.js.map +7 -0
- package/dist/events/index.d.ts +3 -1
- package/dist/events/index.d.ts.map +1 -1
- package/dist/events/index.js +3 -1
- package/dist/events/index.js.map +2 -2
- package/dist/events/listeners.d.ts +2 -1
- package/dist/events/listeners.d.ts.map +1 -1
- package/dist/events/listeners.js.map +2 -2
- package/dist/events/{definitions.d.ts → old-definitions.d.ts} +35 -11
- package/dist/events/old-definitions.d.ts.map +1 -0
- package/dist/events/{definitions.js → old-definitions.js} +1 -1
- package/dist/events/old-definitions.js.map +7 -0
- package/dist/helpers/debounce.d.ts +28 -0
- package/dist/helpers/debounce.d.ts.map +1 -0
- package/dist/helpers/debounce.js +31 -0
- package/dist/helpers/debounce.js.map +7 -0
- package/dist/helpers/detect-changes-proxy.d.ts +47 -0
- package/dist/helpers/detect-changes-proxy.d.ts.map +1 -0
- package/dist/helpers/detect-changes-proxy.js +59 -0
- package/dist/helpers/detect-changes-proxy.js.map +7 -0
- package/dist/helpers/overrides-proxy.d.ts +17 -6
- package/dist/helpers/overrides-proxy.d.ts.map +1 -1
- package/dist/helpers/overrides-proxy.js +33 -18
- package/dist/helpers/overrides-proxy.js.map +3 -3
- package/dist/helpers/unpack-proxy.d.ts +6 -0
- package/dist/helpers/unpack-proxy.d.ts.map +1 -0
- package/dist/helpers/unpack-proxy.js +9 -0
- package/dist/helpers/unpack-proxy.js.map +7 -0
- package/dist/mutators/environment.d.ts +21 -13
- package/dist/mutators/environment.d.ts.map +1 -1
- package/dist/mutators/environment.js +46 -25
- package/dist/mutators/environment.js.map +2 -2
- package/dist/mutators/index.d.ts +4 -12
- package/dist/mutators/index.d.ts.map +1 -1
- package/dist/mutators/index.js +7 -4
- package/dist/mutators/index.js.map +2 -2
- package/dist/navigation/get-navigation-options.d.ts +1 -1
- package/dist/navigation/get-navigation-options.d.ts.map +1 -1
- package/dist/navigation/get-navigation-options.js +66 -54
- package/dist/navigation/get-navigation-options.js.map +2 -2
- package/dist/navigation/helpers/get-tag.d.ts +7 -2
- package/dist/navigation/helpers/get-tag.d.ts.map +1 -1
- package/dist/navigation/helpers/get-tag.js +16 -2
- package/dist/navigation/helpers/get-tag.js.map +2 -2
- package/dist/navigation/helpers/traverse-description.d.ts +7 -2
- package/dist/navigation/helpers/traverse-description.d.ts.map +1 -1
- package/dist/navigation/helpers/traverse-description.js +24 -6
- package/dist/navigation/helpers/traverse-description.js.map +2 -2
- package/dist/navigation/helpers/traverse-document.d.ts +5 -2
- package/dist/navigation/helpers/traverse-document.d.ts.map +1 -1
- package/dist/navigation/helpers/traverse-document.js +53 -15
- package/dist/navigation/helpers/traverse-document.js.map +2 -2
- package/dist/navigation/helpers/traverse-paths.d.ts +9 -3
- package/dist/navigation/helpers/traverse-paths.d.ts.map +1 -1
- package/dist/navigation/helpers/traverse-paths.js +63 -9
- package/dist/navigation/helpers/traverse-paths.js.map +2 -2
- package/dist/navigation/helpers/traverse-schemas.d.ts +7 -8
- package/dist/navigation/helpers/traverse-schemas.d.ts.map +1 -1
- package/dist/navigation/helpers/traverse-schemas.js +35 -7
- package/dist/navigation/helpers/traverse-schemas.js.map +2 -2
- package/dist/navigation/helpers/traverse-tags.d.ts +8 -4
- package/dist/navigation/helpers/traverse-tags.d.ts.map +1 -1
- package/dist/navigation/helpers/traverse-tags.js +65 -17
- package/dist/navigation/helpers/traverse-tags.js.map +2 -2
- package/dist/navigation/helpers/traverse-webhooks.d.ts +9 -3
- package/dist/navigation/helpers/traverse-webhooks.d.ts.map +1 -1
- package/dist/navigation/helpers/traverse-webhooks.js +43 -17
- package/dist/navigation/helpers/traverse-webhooks.js.map +2 -2
- package/dist/navigation/types.d.ts +5 -24
- package/dist/navigation/types.d.ts.map +1 -1
- package/dist/persistence/index.d.ts +86 -0
- package/dist/persistence/index.d.ts.map +1 -0
- package/dist/persistence/index.js +196 -0
- package/dist/persistence/index.js.map +7 -0
- package/dist/persistence/indexdb.d.ts +87 -0
- package/dist/persistence/indexdb.d.ts.map +1 -0
- package/dist/persistence/indexdb.js +125 -0
- package/dist/persistence/indexdb.js.map +7 -0
- package/dist/{plugins.d.ts → plugins/bundler/index.d.ts} +1 -1
- package/dist/plugins/bundler/index.d.ts.map +1 -0
- package/dist/{plugins.js → plugins/bundler/index.js} +2 -2
- package/dist/{plugins.js.map → plugins/bundler/index.js.map} +1 -1
- package/dist/plugins/client/index.d.ts +3 -0
- package/dist/plugins/client/index.d.ts.map +1 -0
- package/dist/plugins/client/index.js +5 -0
- package/dist/plugins/client/index.js.map +7 -0
- package/dist/plugins/client/persistence.d.ts +13 -0
- package/dist/plugins/client/persistence.d.ts.map +1 -0
- package/dist/plugins/client/persistence.js +57 -0
- package/dist/plugins/client/persistence.js.map +7 -0
- package/dist/schemas/extensions/document/x-scalar-environments.d.ts +52 -0
- package/dist/schemas/extensions/document/x-scalar-environments.d.ts.map +1 -0
- package/dist/schemas/extensions/document/x-scalar-environments.js +25 -0
- package/dist/schemas/extensions/document/x-scalar-environments.js.map +7 -0
- package/dist/schemas/extensions/workspace/x-scalar-active-environment.d.ts +8 -0
- package/dist/schemas/extensions/workspace/x-scalar-active-environment.d.ts.map +1 -0
- package/dist/schemas/extensions/workspace/x-scalar-active-environment.js +8 -0
- package/dist/schemas/extensions/workspace/x-scalar-active-environment.js.map +7 -0
- package/dist/schemas/extensions.d.ts +1 -0
- package/dist/schemas/extensions.d.ts.map +1 -1
- package/dist/schemas/extensions.js +1 -0
- package/dist/schemas/extensions.js.map +2 -2
- package/dist/schemas/inmemory-workspace.d.ts +95 -28
- package/dist/schemas/inmemory-workspace.d.ts.map +1 -1
- package/dist/schemas/inmemory-workspace.js +1 -9
- package/dist/schemas/inmemory-workspace.js.map +2 -2
- package/dist/schemas/navigation.d.ts +128 -1
- package/dist/schemas/navigation.d.ts.map +1 -1
- package/dist/schemas/navigation.js +20 -1
- package/dist/schemas/navigation.js.map +2 -2
- package/dist/schemas/reference-config/index.d.ts +243 -206
- package/dist/schemas/reference-config/index.d.ts.map +1 -1
- package/dist/schemas/reference-config/index.js.map +2 -2
- package/dist/schemas/reference-config/settings.d.ts +45 -9
- package/dist/schemas/reference-config/settings.d.ts.map +1 -1
- package/dist/schemas/reference-config/settings.js +1 -1
- package/dist/schemas/reference-config/settings.js.map +1 -1
- package/dist/schemas/v3.1/strict/openapi-document.d.ts +1540 -311
- package/dist/schemas/v3.1/strict/openapi-document.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/openapi-document.js +20 -13
- package/dist/schemas/v3.1/strict/openapi-document.js.map +2 -2
- package/dist/schemas/v3.1/strict/parameter.d.ts +23 -1
- package/dist/schemas/v3.1/strict/parameter.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/parameter.js +5 -1
- package/dist/schemas/v3.1/strict/parameter.js.map +2 -2
- package/dist/schemas/v3.1/strict/ref-definitions.d.ts +2 -0
- package/dist/schemas/v3.1/strict/ref-definitions.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/ref-definitions.js +4 -1
- package/dist/schemas/v3.1/strict/ref-definitions.js.map +2 -2
- package/dist/schemas/workspace-specification/config.d.ts +46 -15
- package/dist/schemas/workspace-specification/config.d.ts.map +1 -1
- package/dist/schemas/workspace-specification/config.js.map +1 -1
- package/dist/schemas/workspace-specification/index.d.ts +48 -11
- package/dist/schemas/workspace-specification/index.d.ts.map +1 -1
- package/dist/schemas/workspace.d.ts +353 -85
- package/dist/schemas/workspace.d.ts.map +1 -1
- package/dist/schemas/workspace.js +19 -11
- package/dist/schemas/workspace.js.map +2 -2
- package/dist/server.d.ts +4 -3
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +7 -6
- package/dist/server.js.map +2 -2
- package/dist/workspace-plugin.d.ts +49 -0
- package/dist/workspace-plugin.d.ts.map +1 -0
- package/dist/workspace-plugin.js +1 -0
- package/dist/workspace-plugin.js.map +7 -0
- package/package.json +26 -9
- package/dist/events/definitions.d.ts.map +0 -1
- package/dist/events/definitions.js.map +0 -7
- package/dist/plugins.d.ts.map +0 -1
- package/dist/schemas/v3.1/strict/client-config-extensions/x-scalar-client-config-environments.d.ts +0 -33
- package/dist/schemas/v3.1/strict/client-config-extensions/x-scalar-client-config-environments.d.ts.map +0 -1
- package/dist/schemas/v3.1/strict/client-config-extensions/x-scalar-client-config-environments.js +0 -23
- package/dist/schemas/v3.1/strict/client-config-extensions/x-scalar-client-config-environments.js.map +0 -7
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { isObject } from "../helpers/general.js";
|
|
2
|
+
const isDetectChangesProxy = Symbol("isDetectChangesProxy");
|
|
3
|
+
const detectChangesProxyTarget = Symbol("detectChangesProxyTarget");
|
|
4
|
+
const isPropsVue = (prop) => {
|
|
5
|
+
return typeof prop === "symbol" || prop === "__v_isReactive" || prop === "__v_isReadonly" || prop === "__v_raw" || prop === "__v_skip";
|
|
6
|
+
};
|
|
7
|
+
const createDetectChangesProxy = (target, options, args = {
|
|
8
|
+
proxyCache: /* @__PURE__ */ new WeakMap(),
|
|
9
|
+
path: []
|
|
10
|
+
}) => {
|
|
11
|
+
if (!isObject(target) && !Array.isArray(target)) {
|
|
12
|
+
return target;
|
|
13
|
+
}
|
|
14
|
+
if (args.proxyCache.has(target)) {
|
|
15
|
+
return args.proxyCache.get(target);
|
|
16
|
+
}
|
|
17
|
+
const proxy = new Proxy(target, {
|
|
18
|
+
get(target2, prop, receiver) {
|
|
19
|
+
if (prop === isDetectChangesProxy) {
|
|
20
|
+
return true;
|
|
21
|
+
}
|
|
22
|
+
if (prop === detectChangesProxyTarget) {
|
|
23
|
+
return target2;
|
|
24
|
+
}
|
|
25
|
+
const value = Reflect.get(target2, prop, receiver);
|
|
26
|
+
if (isDetectChangesProxyObject(value) || isPropsVue(prop)) {
|
|
27
|
+
return value;
|
|
28
|
+
}
|
|
29
|
+
return createDetectChangesProxy(value, options, { ...args, path: [...args.path, String(prop)] });
|
|
30
|
+
},
|
|
31
|
+
set(target2, prop, value, receiver) {
|
|
32
|
+
const path = [...args.path, String(prop)];
|
|
33
|
+
options?.hooks?.onBeforeChange?.(path, value);
|
|
34
|
+
const result = Reflect.set(target2, prop, value, receiver);
|
|
35
|
+
options?.hooks?.onAfterChange?.(path, value);
|
|
36
|
+
return result;
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
args.proxyCache.set(target, proxy);
|
|
40
|
+
return proxy;
|
|
41
|
+
};
|
|
42
|
+
const isDetectChangesProxyObject = (obj) => {
|
|
43
|
+
return typeof obj === "object" && obj !== null && obj[isDetectChangesProxy] === true;
|
|
44
|
+
};
|
|
45
|
+
const unpackDetectChangesProxy = (obj) => {
|
|
46
|
+
if (typeof obj !== "object" || obj === null) {
|
|
47
|
+
return obj;
|
|
48
|
+
}
|
|
49
|
+
if (obj[isDetectChangesProxy]) {
|
|
50
|
+
return obj[detectChangesProxyTarget];
|
|
51
|
+
}
|
|
52
|
+
return obj;
|
|
53
|
+
};
|
|
54
|
+
export {
|
|
55
|
+
createDetectChangesProxy,
|
|
56
|
+
isDetectChangesProxyObject,
|
|
57
|
+
unpackDetectChangesProxy
|
|
58
|
+
};
|
|
59
|
+
//# sourceMappingURL=detect-changes-proxy.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/helpers/detect-changes-proxy.ts"],
|
|
4
|
+
"sourcesContent": ["import { isObject } from '@/helpers/general'\n\nconst isDetectChangesProxy = Symbol('isDetectChangesProxy')\nconst detectChangesProxyTarget = Symbol('detectChangesProxyTarget')\n\nconst isPropsVue = (prop: string | Symbol) => {\n return (\n typeof prop === 'symbol' ||\n prop === '__v_isReactive' ||\n prop === '__v_isReadonly' ||\n prop === '__v_raw' ||\n prop === '__v_skip'\n )\n}\n\n/**\n * createDetectChangesProxy - Creates a proxy for an object or array that detects and triggers hooks on changes.\n *\n * This proxy enables detection of set operations, triggering optional hooks (onBeforeChange, onAfterChange) with the path and value changed.\n * The proxy can be applied recursively to all nested objects/arrays, and caches proxies to prevent creating multiple proxies for the same object.\n *\n * Example usage:\n *\n * const obj = { foo: 1, bar: { baz: 2 } };\n * const proxy = createDetectChangesProxy(obj, {\n * hooks: {\n * onBeforeChange: (path, value) => console.log('Before', path, value),\n * onAfterChange: (path, value) => console.log('After', path, value),\n * }\n * });\n * proxy.foo = 42; // Console: Before ['foo'] '42', After ['foo'] '42'\n * proxy.bar.baz = 99; // Console: Before ['bar', 'baz'] '99', After ['bar', 'baz'] '99'\n *\n * @param target The target object or array to wrap in a proxy\n * @param options Optional: hooks for change detection\n * @param args Internal: proxy cache and current property path (used for recursion)\n * @returns The proxied object/array with change detection capabilities\n */\nexport const createDetectChangesProxy = <T>(\n target: T,\n options?: {\n hooks: Partial<{\n onBeforeChange: (path: string[], value: unknown) => void\n onAfterChange: (path: string[], value: unknown) => void\n }>\n },\n args: {\n /** Cache for storing proxies */\n proxyCache: WeakMap<object, unknown>\n /** Path for the target */\n path: string[]\n } = {\n proxyCache: new WeakMap<object, unknown>(),\n path: [],\n },\n): T => {\n // Only wrap objects or arrays\n if (!isObject(target) && !Array.isArray(target)) {\n return target\n }\n\n // Return cached proxy if already created for this target\n if (args.proxyCache.has(target)) {\n return args.proxyCache.get(target)! as T\n }\n\n const proxy = new Proxy(target, {\n get(target, prop, receiver) {\n // Allow identifying if an object is a detect changes proxy\n if (prop === isDetectChangesProxy) {\n return true\n }\n // Allow access to the original target\n if (prop === detectChangesProxyTarget) {\n return target\n }\n\n // Recursively wrap property values in the detect changes proxy\n const value = Reflect.get(target, prop, receiver)\n\n if (isDetectChangesProxyObject(value) || isPropsVue(prop)) {\n return value\n }\n\n return createDetectChangesProxy(value, options, { ...args, path: [...args.path, String(prop)] })\n },\n set(target, prop, value, receiver) {\n const path = [...args.path, String(prop)]\n // Call before-change hook if provided\n options?.hooks?.onBeforeChange?.(path, value)\n const result = Reflect.set(target, prop, value, receiver)\n // Call after-change hook if provided\n options?.hooks?.onAfterChange?.(path, value)\n return result\n },\n })\n\n // Cache the proxy for this target\n args.proxyCache.set(target, proxy)\n return proxy\n}\n\nexport const isDetectChangesProxyObject = (obj: unknown): boolean => {\n return (\n typeof obj === 'object' &&\n obj !== null &&\n (obj as { [isDetectChangesProxy]: boolean })[isDetectChangesProxy] === true\n )\n}\n\n/**\n * Returns the raw/original (non-proxy) object if the passed object is a detect-changes proxy.\n * If the object is not a proxy, it returns the same object.\n *\n * @example\n * const proxy = createDetectChangesProxy({ a: 1 });\n * const raw = unpackDetectChangesProxy(proxy); // Gets the original object { a: 1 }\n * const notProxy = { b: 2 };\n * const stillRaw = unpackDetectChangesProxy(notProxy); // Returns { b: 2 }, unchanged\n */\nexport const unpackDetectChangesProxy = <T>(obj: T): T => {\n if (typeof obj !== 'object' || obj === null) {\n return obj\n }\n\n // If object is a detect-changes proxy, return its underlying target\n if ((obj as T & { [isDetectChangesProxy]: boolean | undefined })[isDetectChangesProxy]) {\n return (obj as T & { [detectChangesProxyTarget]: T })[detectChangesProxyTarget]\n }\n\n return obj\n}\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,gBAAgB;AAEzB,MAAM,uBAAuB,OAAO,sBAAsB;AAC1D,MAAM,2BAA2B,OAAO,0BAA0B;AAElE,MAAM,aAAa,CAAC,SAA0B;AAC5C,SACE,OAAO,SAAS,YAChB,SAAS,oBACT,SAAS,oBACT,SAAS,aACT,SAAS;AAEb;AAyBO,MAAM,2BAA2B,CACtC,QACA,SAMA,OAKI;AAAA,EACF,YAAY,oBAAI,QAAyB;AAAA,EACzC,MAAM,CAAC;AACT,MACM;AAEN,MAAI,CAAC,SAAS,MAAM,KAAK,CAAC,MAAM,QAAQ,MAAM,GAAG;AAC/C,WAAO;AAAA,EACT;AAGA,MAAI,KAAK,WAAW,IAAI,MAAM,GAAG;AAC/B,WAAO,KAAK,WAAW,IAAI,MAAM;AAAA,EACnC;AAEA,QAAM,QAAQ,IAAI,MAAM,QAAQ;AAAA,IAC9B,IAAIA,SAAQ,MAAM,UAAU;AAE1B,UAAI,SAAS,sBAAsB;AACjC,eAAO;AAAA,MACT;AAEA,UAAI,SAAS,0BAA0B;AACrC,eAAOA;AAAA,MACT;AAGA,YAAM,QAAQ,QAAQ,IAAIA,SAAQ,MAAM,QAAQ;AAEhD,UAAI,2BAA2B,KAAK,KAAK,WAAW,IAAI,GAAG;AACzD,eAAO;AAAA,MACT;AAEA,aAAO,yBAAyB,OAAO,SAAS,EAAE,GAAG,MAAM,MAAM,CAAC,GAAG,KAAK,MAAM,OAAO,IAAI,CAAC,EAAE,CAAC;AAAA,IACjG;AAAA,IACA,IAAIA,SAAQ,MAAM,OAAO,UAAU;AACjC,YAAM,OAAO,CAAC,GAAG,KAAK,MAAM,OAAO,IAAI,CAAC;AAExC,eAAS,OAAO,iBAAiB,MAAM,KAAK;AAC5C,YAAM,SAAS,QAAQ,IAAIA,SAAQ,MAAM,OAAO,QAAQ;AAExD,eAAS,OAAO,gBAAgB,MAAM,KAAK;AAC3C,aAAO;AAAA,IACT;AAAA,EACF,CAAC;AAGD,OAAK,WAAW,IAAI,QAAQ,KAAK;AACjC,SAAO;AACT;AAEO,MAAM,6BAA6B,CAAC,QAA0B;AACnE,SACE,OAAO,QAAQ,YACf,QAAQ,QACP,IAA4C,oBAAoB,MAAM;AAE3E;AAYO,MAAM,2BAA2B,CAAI,QAAc;AACxD,MAAI,OAAO,QAAQ,YAAY,QAAQ,MAAM;AAC3C,WAAO;AAAA,EACT;AAGA,MAAK,IAA4D,oBAAoB,GAAG;AACtF,WAAQ,IAA8C,wBAAwB;AAAA,EAChF;AAEA,SAAO;AACT;",
|
|
6
|
+
"names": ["target"]
|
|
7
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
export declare const getOverridesTarget: unique symbol;
|
|
2
2
|
/**
|
|
3
3
|
* Recursively makes all properties of a type optional.
|
|
4
4
|
*
|
|
@@ -23,14 +23,14 @@ export type DeepPartial<T> = T extends object ? {
|
|
|
23
23
|
* - Special symbols are used to identify the proxy and to access the original target.
|
|
24
24
|
*
|
|
25
25
|
* @template T - The type of the target object.
|
|
26
|
-
* @param
|
|
26
|
+
* @param target - The original object to proxy.
|
|
27
27
|
* @param overrides - An optional object containing override values (deeply partial).
|
|
28
28
|
* @returns A proxy object that reflects overrides on top of the target.
|
|
29
29
|
*
|
|
30
30
|
* @example
|
|
31
31
|
* const original = { a: 1, b: { c: 2 } }
|
|
32
32
|
* const overrides = { b: { c: 42 } }
|
|
33
|
-
* const proxy = createOverridesProxy(original, overrides)
|
|
33
|
+
* const proxy = createOverridesProxy(original, { overrides })
|
|
34
34
|
*
|
|
35
35
|
* console.log(proxy.a) // 1 (from original)
|
|
36
36
|
* console.log(proxy.b.c) // 42 (from overrides)
|
|
@@ -41,7 +41,18 @@ export type DeepPartial<T> = T extends object ? {
|
|
|
41
41
|
* proxy.b.c = 99
|
|
42
42
|
* console.log(overrides.b.c) // 99
|
|
43
43
|
*/
|
|
44
|
-
export declare const createOverridesProxy: <T extends Record<string, unknown>>(
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
export declare const createOverridesProxy: <T extends Record<string, unknown>>(target: T, options?: {
|
|
45
|
+
overrides?: DeepPartial<T>;
|
|
46
|
+
}, args?: {
|
|
47
|
+
cache: WeakMap<object, any>;
|
|
48
|
+
}) => T;
|
|
49
|
+
export declare const isOverridesProxyObject: (obj: unknown) => boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Unpacks an object from the overrides proxy, returning the original (unproxied) target object.
|
|
52
|
+
* If the input is not an overrides proxy, returns the object as-is.
|
|
53
|
+
*
|
|
54
|
+
* @param input - The potentially proxied object
|
|
55
|
+
* @returns The original unproxied target object or the input object
|
|
56
|
+
*/
|
|
57
|
+
export declare function unpackOverridesProxy<T>(input: T): T;
|
|
47
58
|
//# sourceMappingURL=overrides-proxy.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"overrides-proxy.d.ts","sourceRoot":"","sources":["../../src/helpers/overrides-proxy.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"overrides-proxy.d.ts","sourceRoot":"","sources":["../../src/helpers/overrides-proxy.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,kBAAkB,eAA+B,CAAA;AAE9D;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI,CAAC,SAAS,MAAM,GAAG;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,GAAG,CAAC,CAAA;AAE1F;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,oBAAoB,GAAI,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACpE,QAAQ,CAAC,EACT,UAAU;IACR,SAAS,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,CAAA;CAC3B,EACD,OAAM;IACJ,KAAK,EAAE,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAG5B,KACA,CAgEF,CAAA;AAED,eAAO,MAAM,sBAAsB,GAAI,KAAK,OAAO,KAAG,OAErD,CAAA;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAMnD"}
|
|
@@ -1,25 +1,35 @@
|
|
|
1
1
|
import { isObject } from "../helpers/general.js";
|
|
2
2
|
const isOverridesProxy = Symbol("isOverridesProxy");
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
const getOverridesTarget = Symbol("getOverridesTarget");
|
|
4
|
+
const createOverridesProxy = (target, options, args = {
|
|
5
|
+
cache: /* @__PURE__ */ new WeakMap()
|
|
6
|
+
}) => {
|
|
7
|
+
if (!target || typeof target !== "object") {
|
|
8
|
+
return target;
|
|
6
9
|
}
|
|
10
|
+
if (args.cache.has(target)) {
|
|
11
|
+
return args.cache.get(target);
|
|
12
|
+
}
|
|
13
|
+
const { overrides } = options ?? {};
|
|
7
14
|
const handler = {
|
|
8
|
-
get(
|
|
15
|
+
get(target2, prop, receiver) {
|
|
9
16
|
if (prop === isOverridesProxy) {
|
|
10
17
|
return true;
|
|
11
18
|
}
|
|
12
|
-
if (prop ===
|
|
13
|
-
return
|
|
19
|
+
if (prop === getOverridesTarget) {
|
|
20
|
+
return target2;
|
|
21
|
+
}
|
|
22
|
+
const value = Reflect.get(target2, prop, receiver);
|
|
23
|
+
if (isOverridesProxyObject(value)) {
|
|
24
|
+
return value;
|
|
14
25
|
}
|
|
15
|
-
const value = Reflect.get(target, prop, receiver);
|
|
16
26
|
if (!isObject(value)) {
|
|
17
27
|
return Reflect.get(overrides ?? {}, prop) ?? value;
|
|
18
28
|
}
|
|
19
|
-
return createOverridesProxy(value, Reflect.get(overrides ?? {}, prop));
|
|
29
|
+
return createOverridesProxy(value, { overrides: Reflect.get(overrides ?? {}, prop) }, args);
|
|
20
30
|
},
|
|
21
|
-
set(
|
|
22
|
-
if (prop === isOverridesProxy || prop ===
|
|
31
|
+
set(target2, prop, value, receiver) {
|
|
32
|
+
if (prop === isOverridesProxy || prop === getOverridesTarget) {
|
|
23
33
|
return false;
|
|
24
34
|
}
|
|
25
35
|
const hasOverride = overrides && Reflect.has(overrides, prop);
|
|
@@ -28,21 +38,26 @@ const createOverridesProxy = (targetObject, overrides) => {
|
|
|
28
38
|
overrides[prop] = value;
|
|
29
39
|
return true;
|
|
30
40
|
}
|
|
31
|
-
return Reflect.set(
|
|
41
|
+
return Reflect.set(target2, prop, value, receiver);
|
|
32
42
|
}
|
|
33
43
|
};
|
|
34
|
-
|
|
44
|
+
const proxy = new Proxy(target, handler);
|
|
45
|
+
args.cache.set(target, proxy);
|
|
46
|
+
return proxy;
|
|
47
|
+
};
|
|
48
|
+
const isOverridesProxyObject = (obj) => {
|
|
49
|
+
return typeof obj === "object" && obj !== null && obj[isOverridesProxy] === true;
|
|
35
50
|
};
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
return obj[TARGET_SYMBOL];
|
|
51
|
+
function unpackOverridesProxy(input) {
|
|
52
|
+
if (input[isOverridesProxy]) {
|
|
53
|
+
return input[getOverridesTarget];
|
|
40
54
|
}
|
|
41
|
-
return
|
|
55
|
+
return input;
|
|
42
56
|
}
|
|
43
57
|
export {
|
|
44
|
-
TARGET_SYMBOL,
|
|
45
58
|
createOverridesProxy,
|
|
59
|
+
getOverridesTarget,
|
|
60
|
+
isOverridesProxyObject,
|
|
46
61
|
unpackOverridesProxy
|
|
47
62
|
};
|
|
48
63
|
//# sourceMappingURL=overrides-proxy.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/helpers/overrides-proxy.ts"],
|
|
4
|
-
"sourcesContent": ["import {
|
|
5
|
-
"mappings": "AAAA,
|
|
6
|
-
"names": []
|
|
4
|
+
"sourcesContent": ["import { isObject } from '@/helpers/general'\n\nconst isOverridesProxy = Symbol('isOverridesProxy')\nexport const getOverridesTarget = Symbol('getOverridesTarget')\n\n/**\n * Recursively makes all properties of a type optional.\n *\n * - If T is an object, recursively applies DeepPartial to each property, making them optional.\n * - Otherwise, T is returned as-is.\n *\n * @template T - The type to make deeply partial (optional).\n * @example\n * type Example = { a: { b: number } }\n * type PartialExample = DeepPartial<Example>\n * // Result: { a?: { b?: number } }\n */\nexport type DeepPartial<T> = T extends object ? { [K in keyof T]?: DeepPartial<T[K]> } : T\n\n/**\n * Creates a proxy object that overlays \"overrides\" on top of a target object.\n *\n * - When reading a property, if an override exists, it is returned; otherwise, the original value is returned.\n * - When writing to a property, if an override exists, it is updated; otherwise, the original object is updated.\n * - This works recursively for nested objects, so overrides can be deeply partial.\n * - Special symbols are used to identify the proxy and to access the original target.\n *\n * @template T - The type of the target object.\n * @param target - The original object to proxy.\n * @param overrides - An optional object containing override values (deeply partial).\n * @returns A proxy object that reflects overrides on top of the target.\n *\n * @example\n * const original = { a: 1, b: { c: 2 } }\n * const overrides = { b: { c: 42 } }\n * const proxy = createOverridesProxy(original, { overrides })\n *\n * console.log(proxy.a) // 1 (from original)\n * console.log(proxy.b.c) // 42 (from overrides)\n *\n * proxy.a = 100\n * console.log(original.a) // 100\n *\n * proxy.b.c = 99\n * console.log(overrides.b.c) // 99\n */\nexport const createOverridesProxy = <T extends Record<string, unknown>>(\n target: T,\n options?: {\n overrides?: DeepPartial<T>\n },\n args: {\n cache: WeakMap<object, any>\n } = {\n cache: new WeakMap(),\n },\n): T => {\n if (!target || typeof target !== 'object') {\n return target\n }\n\n // Return existing proxy for the same target to ensure referential stability\n if (args.cache.has(target)) {\n return args.cache.get(target)!\n }\n\n const { overrides } = options ?? {}\n\n // Proxy handler to intercept get/set operations\n const handler: ProxyHandler<T> = {\n get(target, prop, receiver) {\n // Special symbol to identify this as an overrides proxy\n if (prop === isOverridesProxy) {\n return true\n }\n\n // Special symbol to access the original target object\n if (prop === getOverridesTarget) {\n return target\n }\n\n const value = Reflect.get(target, prop, receiver)\n\n // Return early if the value is already an overrides proxy\n if (isOverridesProxyObject(value)) {\n return value\n }\n\n // If the value is not an object, return the override if it exists, else the original value\n if (!isObject(value)) {\n return Reflect.get(overrides ?? {}, prop) ?? value\n }\n\n // For nested objects, recursively create a proxy with the corresponding overrides\n return createOverridesProxy(value, { overrides: Reflect.get(overrides ?? {}, prop) }, args)\n },\n\n set(target, prop, value, receiver) {\n // Prevent setting special symbols\n if (prop === isOverridesProxy || prop === getOverridesTarget) {\n return false\n }\n\n // If an override exists for this property, update it\n const hasOverride = overrides && Reflect.has(overrides, prop)\n\n if (hasOverride && overrides && typeof overrides === 'object') {\n ;(overrides as any)[prop] = value\n return true\n }\n\n // Otherwise, update the original target\n return Reflect.set(target, prop, value, receiver)\n },\n }\n\n // Return the proxy object\n const proxy = new Proxy<T>(target, handler)\n args.cache.set(target, proxy)\n return proxy\n}\n\nexport const isOverridesProxyObject = (obj: unknown): boolean => {\n return typeof obj === 'object' && obj !== null && (obj as { [isOverridesProxy]: boolean })[isOverridesProxy] === true\n}\n\n/**\n * Unpacks an object from the overrides proxy, returning the original (unproxied) target object.\n * If the input is not an overrides proxy, returns the object as-is.\n *\n * @param input - The potentially proxied object\n * @returns The original unproxied target object or the input object\n */\nexport function unpackOverridesProxy<T>(input: T): T {\n if ((input as T & { [isOverridesProxy]: boolean | undefined })[isOverridesProxy]) {\n return (input as T & { [getOverridesTarget]: T })[getOverridesTarget]\n }\n\n return input\n}\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,gBAAgB;AAEzB,MAAM,mBAAmB,OAAO,kBAAkB;AAC3C,MAAM,qBAAqB,OAAO,oBAAoB;AA2CtD,MAAM,uBAAuB,CAClC,QACA,SAGA,OAEI;AAAA,EACF,OAAO,oBAAI,QAAQ;AACrB,MACM;AACN,MAAI,CAAC,UAAU,OAAO,WAAW,UAAU;AACzC,WAAO;AAAA,EACT;AAGA,MAAI,KAAK,MAAM,IAAI,MAAM,GAAG;AAC1B,WAAO,KAAK,MAAM,IAAI,MAAM;AAAA,EAC9B;AAEA,QAAM,EAAE,UAAU,IAAI,WAAW,CAAC;AAGlC,QAAM,UAA2B;AAAA,IAC/B,IAAIA,SAAQ,MAAM,UAAU;AAE1B,UAAI,SAAS,kBAAkB;AAC7B,eAAO;AAAA,MACT;AAGA,UAAI,SAAS,oBAAoB;AAC/B,eAAOA;AAAA,MACT;AAEA,YAAM,QAAQ,QAAQ,IAAIA,SAAQ,MAAM,QAAQ;AAGhD,UAAI,uBAAuB,KAAK,GAAG;AACjC,eAAO;AAAA,MACT;AAGA,UAAI,CAAC,SAAS,KAAK,GAAG;AACpB,eAAO,QAAQ,IAAI,aAAa,CAAC,GAAG,IAAI,KAAK;AAAA,MAC/C;AAGA,aAAO,qBAAqB,OAAO,EAAE,WAAW,QAAQ,IAAI,aAAa,CAAC,GAAG,IAAI,EAAE,GAAG,IAAI;AAAA,IAC5F;AAAA,IAEA,IAAIA,SAAQ,MAAM,OAAO,UAAU;AAEjC,UAAI,SAAS,oBAAoB,SAAS,oBAAoB;AAC5D,eAAO;AAAA,MACT;AAGA,YAAM,cAAc,aAAa,QAAQ,IAAI,WAAW,IAAI;AAE5D,UAAI,eAAe,aAAa,OAAO,cAAc,UAAU;AAC7D;AAAC,QAAC,UAAkB,IAAI,IAAI;AAC5B,eAAO;AAAA,MACT;AAGA,aAAO,QAAQ,IAAIA,SAAQ,MAAM,OAAO,QAAQ;AAAA,IAClD;AAAA,EACF;AAGA,QAAM,QAAQ,IAAI,MAAS,QAAQ,OAAO;AAC1C,OAAK,MAAM,IAAI,QAAQ,KAAK;AAC5B,SAAO;AACT;AAEO,MAAM,yBAAyB,CAAC,QAA0B;AAC/D,SAAO,OAAO,QAAQ,YAAY,QAAQ,QAAS,IAAwC,gBAAgB,MAAM;AACnH;AASO,SAAS,qBAAwB,OAAa;AACnD,MAAK,MAA0D,gBAAgB,GAAG;AAChF,WAAQ,MAA0C,kBAAkB;AAAA,EACtE;AAEA,SAAO;AACT;",
|
|
6
|
+
"names": ["target"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unpacks special vue reactivity & override & detect-changes & magic proxy from an input object or array,
|
|
3
|
+
* returning the "raw" plain object or array.
|
|
4
|
+
*/
|
|
5
|
+
export declare const unpackProxyObject: <T extends object | Array<unknown>>(input: T) => T;
|
|
6
|
+
//# sourceMappingURL=unpack-proxy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unpack-proxy.d.ts","sourceRoot":"","sources":["../../src/helpers/unpack-proxy.ts"],"names":[],"mappings":"AAMA;;;GAGG;AACH,eAAO,MAAM,iBAAiB,GAAI,CAAC,SAAS,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,KAAG,CACV,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { getRaw } from "@scalar/json-magic/magic-proxy";
|
|
2
|
+
import { toRaw } from "vue";
|
|
3
|
+
import { unpackDetectChangesProxy } from "../helpers/detect-changes-proxy.js";
|
|
4
|
+
import { unpackOverridesProxy } from "../helpers/overrides-proxy.js";
|
|
5
|
+
const unpackProxyObject = (input) => unpackDetectChangesProxy(toRaw(getRaw(unpackOverridesProxy(input))));
|
|
6
|
+
export {
|
|
7
|
+
unpackProxyObject
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=unpack-proxy.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/helpers/unpack-proxy.ts"],
|
|
4
|
+
"sourcesContent": ["import { getRaw } from '@scalar/json-magic/magic-proxy'\nimport { toRaw } from 'vue'\n\nimport { unpackDetectChangesProxy } from '@/helpers/detect-changes-proxy'\nimport { unpackOverridesProxy } from '@/helpers/overrides-proxy'\n\n/**\n * Unpacks special vue reactivity & override & detect-changes & magic proxy from an input object or array,\n * returning the \"raw\" plain object or array.\n */\nexport const unpackProxyObject = <T extends object | Array<unknown>>(input: T): T =>\n unpackDetectChangesProxy(toRaw(getRaw(unpackOverridesProxy(input))))\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,cAAc;AACvB,SAAS,aAAa;AAEtB,SAAS,gCAAgC;AACzC,SAAS,4BAA4B;AAM9B,MAAM,oBAAoB,CAAoC,UACnE,yBAAyB,MAAM,OAAO,qBAAqB,KAAK,CAAC,CAAC,CAAC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,17 +1,25 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { EnvironmentEvents } from '../events/definitions/environment.js';
|
|
2
|
+
import type { Workspace, WorkspaceDocument } from '../schemas.js';
|
|
3
|
+
import { type XScalarEnvVar, type XScalarEnvironment } from '../schemas/extensions/document/x-scalar-environments.js';
|
|
3
4
|
/**
|
|
4
|
-
*
|
|
5
|
-
* Provides functions to add and delete environments from the document's x-scalar-client-config-environments extension.
|
|
5
|
+
* Adds OR updates an environment to the document or workspace.
|
|
6
6
|
*
|
|
7
|
-
* @param
|
|
8
|
-
* @param
|
|
9
|
-
* @
|
|
7
|
+
* @param document - current document if available
|
|
8
|
+
* @param workspace - current workspace if available
|
|
9
|
+
* @param environmentName - Name of the environment to add
|
|
10
|
+
* @param payload - The environment configuration to add
|
|
11
|
+
* @param oldEnvironmentName - Only needed when renaming the environment
|
|
12
|
+
* @returns the parsed environment that was added or updated or undefined if the collection is not found
|
|
10
13
|
*/
|
|
11
|
-
export declare const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
export declare const upsertEnvironment: (document: WorkspaceDocument | null, workspace: Workspace, { environmentName, payload, collectionType, oldEnvironmentName }: EnvironmentEvents["environment:upsert:environment"]) => XScalarEnvironment | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* Adds OR updates an environment variable to the document or workspace.
|
|
17
|
+
*
|
|
18
|
+
* @param collection - Workspace OR document
|
|
19
|
+
* @param environmentName - Name of the environment to add the variable to
|
|
20
|
+
* @param variableName - Name of the variable to add
|
|
21
|
+
* @param value - Value of the variable to add
|
|
22
|
+
* @returns the parsed variable that was added or updated or undefined if the collection is not found
|
|
23
|
+
*/
|
|
24
|
+
export declare const upsertEnvironmentVariable: (collection: WorkspaceDocument | Workspace | null, { environmentName, variable, index }: EnvironmentEvents["environment:upsert:environment-variable"]) => XScalarEnvVar | undefined;
|
|
17
25
|
//# sourceMappingURL=environment.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../../src/mutators/environment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../../src/mutators/environment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAA;AACzE,OAAO,KAAK,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA;AAC7D,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,kBAAkB,EAGxB,MAAM,qDAAqD,CAAA;AAG5D;;;;;;;;;GASG;AACH,eAAO,MAAM,iBAAiB,GAC5B,UAAU,iBAAiB,GAAG,IAAI,EAClC,WAAW,SAAS,EACpB,kEAAkE,iBAAiB,CAAC,gCAAgC,CAAC,KACpH,kBAAkB,GAAG,SAqCvB,CAAA;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,yBAAyB,GACpC,YAAY,iBAAiB,GAAG,SAAS,GAAG,IAAI,EAChD,sCAAsC,iBAAiB,CAAC,yCAAyC,CAAC,KACjG,aAAa,GAAG,SA0BlB,CAAA"}
|
|
@@ -1,31 +1,52 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import {
|
|
2
|
+
xScalarEnvVarSchema,
|
|
3
|
+
xScalarEnvironmentSchema
|
|
4
|
+
} from "../schemas/extensions/document/x-scalar-environments.js";
|
|
5
|
+
import { coerceValue } from "../schemas/typebox-coerce.js";
|
|
6
|
+
const upsertEnvironment = (document, workspace, { environmentName, payload, collectionType, oldEnvironmentName }) => {
|
|
7
|
+
const collection = collectionType === "document" ? document : workspace;
|
|
8
|
+
if (!collection) {
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
if (!collection["x-scalar-environments"]) {
|
|
12
|
+
collection["x-scalar-environments"] = {};
|
|
13
|
+
}
|
|
14
|
+
const isNewEnvironment = !collection["x-scalar-environments"][oldEnvironmentName ?? environmentName];
|
|
15
|
+
const parsed = coerceValue(xScalarEnvironmentSchema, {
|
|
16
|
+
...collection["x-scalar-environments"][oldEnvironmentName ?? environmentName],
|
|
17
|
+
...payload
|
|
18
|
+
});
|
|
19
|
+
collection["x-scalar-environments"][environmentName] = parsed;
|
|
20
|
+
if (oldEnvironmentName && oldEnvironmentName !== environmentName) {
|
|
21
|
+
delete collection["x-scalar-environments"][oldEnvironmentName];
|
|
22
|
+
if (workspace["x-scalar-active-environment"] === oldEnvironmentName) {
|
|
23
|
+
workspace["x-scalar-active-environment"] = environmentName;
|
|
5
24
|
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
25
|
+
}
|
|
26
|
+
if (isNewEnvironment) {
|
|
27
|
+
workspace["x-scalar-active-environment"] = environmentName;
|
|
28
|
+
}
|
|
29
|
+
return parsed;
|
|
30
|
+
};
|
|
31
|
+
const upsertEnvironmentVariable = (collection, { environmentName, variable, index }) => {
|
|
32
|
+
if (!collection?.["x-scalar-environments"]?.[environmentName]) {
|
|
33
|
+
console.error("Environment not found", environmentName);
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
const parsed = coerceValue(xScalarEnvVarSchema, variable);
|
|
37
|
+
if (index !== void 0) {
|
|
38
|
+
if (parsed.name === "") {
|
|
39
|
+
collection["x-scalar-environments"][environmentName].variables.splice(index, 1);
|
|
40
|
+
return;
|
|
19
41
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
deleteEnvironment
|
|
26
|
-
};
|
|
42
|
+
collection["x-scalar-environments"][environmentName].variables[index] = parsed;
|
|
43
|
+
} else {
|
|
44
|
+
collection["x-scalar-environments"][environmentName].variables.push(parsed);
|
|
45
|
+
}
|
|
46
|
+
return parsed;
|
|
27
47
|
};
|
|
28
48
|
export {
|
|
29
|
-
|
|
49
|
+
upsertEnvironment,
|
|
50
|
+
upsertEnvironmentVariable
|
|
30
51
|
};
|
|
31
52
|
//# sourceMappingURL=environment.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/mutators/environment.ts"],
|
|
4
|
-
"sourcesContent": ["import type {
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import type { EnvironmentEvents } from '@/events/definitions/environment'\nimport type { Workspace, WorkspaceDocument } from '@/schemas'\nimport {\n type XScalarEnvVar,\n type XScalarEnvironment,\n xScalarEnvVarSchema,\n xScalarEnvironmentSchema,\n} from '@/schemas/extensions/document/x-scalar-environments'\nimport { coerceValue } from '@/schemas/typebox-coerce'\n\n/**\n * Adds OR updates an environment to the document or workspace.\n *\n * @param document - current document if available\n * @param workspace - current workspace if available\n * @param environmentName - Name of the environment to add\n * @param payload - The environment configuration to add\n * @param oldEnvironmentName - Only needed when renaming the environment\n * @returns the parsed environment that was added or updated or undefined if the collection is not found\n */\nexport const upsertEnvironment = (\n document: WorkspaceDocument | null,\n workspace: Workspace,\n { environmentName, payload, collectionType, oldEnvironmentName }: EnvironmentEvents['environment:upsert:environment'],\n): XScalarEnvironment | undefined => {\n /** Discriminating between document and workspace */\n const collection = collectionType === 'document' ? document : workspace\n if (!collection) {\n return\n }\n\n if (!collection['x-scalar-environments']) {\n collection['x-scalar-environments'] = {}\n }\n\n // Check if this is a new environment before we create it\n const isNewEnvironment = !collection['x-scalar-environments'][oldEnvironmentName ?? environmentName]\n\n // Ensure we parse the payload but keep the old variables\n const parsed = coerceValue(xScalarEnvironmentSchema, {\n ...collection['x-scalar-environments'][oldEnvironmentName ?? environmentName],\n ...payload,\n })\n collection['x-scalar-environments'][environmentName] = parsed\n\n // If we are renaming the environment, we need to delete the old one\n if (oldEnvironmentName && oldEnvironmentName !== environmentName) {\n delete collection['x-scalar-environments'][oldEnvironmentName]\n\n // If the old environment was active, we need to set the new environment as active\n if (workspace['x-scalar-active-environment'] === oldEnvironmentName) {\n workspace['x-scalar-active-environment'] = environmentName\n }\n }\n\n // Set the newly created workspace environment as active\n if (isNewEnvironment) {\n workspace['x-scalar-active-environment'] = environmentName\n }\n\n return parsed\n}\n\n/**\n * Adds OR updates an environment variable to the document or workspace.\n *\n * @param collection - Workspace OR document\n * @param environmentName - Name of the environment to add the variable to\n * @param variableName - Name of the variable to add\n * @param value - Value of the variable to add\n * @returns the parsed variable that was added or updated or undefined if the collection is not found\n */\nexport const upsertEnvironmentVariable = (\n collection: WorkspaceDocument | Workspace | null,\n { environmentName, variable, index }: EnvironmentEvents['environment:upsert:environment-variable'],\n): XScalarEnvVar | undefined => {\n // The environment should exist by now if we are upserting a variable\n if (!collection?.['x-scalar-environments']?.[environmentName]) {\n console.error('Environment not found', environmentName)\n return\n }\n\n // Ensure we parse the variable for type safety\n const parsed = coerceValue(xScalarEnvVarSchema, variable)\n\n if (index !== undefined) {\n // Delete the row if the name is empty\n if (parsed.name === '') {\n collection['x-scalar-environments'][environmentName].variables.splice(index, 1)\n return\n }\n\n // Update\n collection['x-scalar-environments'][environmentName].variables[index] = parsed\n }\n // Add\n else {\n collection['x-scalar-environments'][environmentName].variables.push(parsed)\n }\n\n return parsed\n}\n"],
|
|
5
|
+
"mappings": "AAEA;AAAA,EAGE;AAAA,EACA;AAAA,OACK;AACP,SAAS,mBAAmB;AAYrB,MAAM,oBAAoB,CAC/B,UACA,WACA,EAAE,iBAAiB,SAAS,gBAAgB,mBAAmB,MAC5B;AAEnC,QAAM,aAAa,mBAAmB,aAAa,WAAW;AAC9D,MAAI,CAAC,YAAY;AACf;AAAA,EACF;AAEA,MAAI,CAAC,WAAW,uBAAuB,GAAG;AACxC,eAAW,uBAAuB,IAAI,CAAC;AAAA,EACzC;AAGA,QAAM,mBAAmB,CAAC,WAAW,uBAAuB,EAAE,sBAAsB,eAAe;AAGnG,QAAM,SAAS,YAAY,0BAA0B;AAAA,IACnD,GAAG,WAAW,uBAAuB,EAAE,sBAAsB,eAAe;AAAA,IAC5E,GAAG;AAAA,EACL,CAAC;AACD,aAAW,uBAAuB,EAAE,eAAe,IAAI;AAGvD,MAAI,sBAAsB,uBAAuB,iBAAiB;AAChE,WAAO,WAAW,uBAAuB,EAAE,kBAAkB;AAG7D,QAAI,UAAU,6BAA6B,MAAM,oBAAoB;AACnE,gBAAU,6BAA6B,IAAI;AAAA,IAC7C;AAAA,EACF;AAGA,MAAI,kBAAkB;AACpB,cAAU,6BAA6B,IAAI;AAAA,EAC7C;AAEA,SAAO;AACT;AAWO,MAAM,4BAA4B,CACvC,YACA,EAAE,iBAAiB,UAAU,MAAM,MACL;AAE9B,MAAI,CAAC,aAAa,uBAAuB,IAAI,eAAe,GAAG;AAC7D,YAAQ,MAAM,yBAAyB,eAAe;AACtD;AAAA,EACF;AAGA,QAAM,SAAS,YAAY,qBAAqB,QAAQ;AAExD,MAAI,UAAU,QAAW;AAEvB,QAAI,OAAO,SAAS,IAAI;AACtB,iBAAW,uBAAuB,EAAE,eAAe,EAAE,UAAU,OAAO,OAAO,CAAC;AAC9E;AAAA,IACF;AAGA,eAAW,uBAAuB,EAAE,eAAe,EAAE,UAAU,KAAK,IAAI;AAAA,EAC1E,OAEK;AACH,eAAW,uBAAuB,EAAE,eAAe,EAAE,UAAU,KAAK,MAAM;AAAA,EAC5E;AAEA,SAAO;AACT;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/mutators/index.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
/** biome-ignore-all lint/performance/noBarrelFile: this will probably get deleted later */
|
|
1
2
|
import type { WorkspaceStore } from '../client.js';
|
|
2
3
|
/**
|
|
3
4
|
* Generates a set of mutators for managing OpenAPI document and workspace state.
|
|
4
5
|
*
|
|
6
|
+
* @deprecated use the individual mutators instead, this will be removed after we move fully to the new store
|
|
7
|
+
*
|
|
5
8
|
* @param store - The workspace store containing all documents and workspace-level data
|
|
6
9
|
* @returns An object with mutators for the workspace, the active document, and any named document
|
|
7
10
|
*/
|
|
@@ -10,10 +13,6 @@ export declare function generateClientMutators(store: WorkspaceStore): {
|
|
|
10
13
|
* Returns mutators for the workspace-level configuration.
|
|
11
14
|
*/
|
|
12
15
|
workspace: () => {
|
|
13
|
-
environmentMutators: {
|
|
14
|
-
addEnvironment: (name: string, environment: import("../schemas/v3.1/strict/client-config-extensions/x-scalar-client-config-environments.js").xScalarClientConfigEnvironment) => boolean;
|
|
15
|
-
deleteEnvironment: (environmentName: string) => boolean;
|
|
16
|
-
};
|
|
17
16
|
cookieMutators: {
|
|
18
17
|
addCookie: (cookie: import("../schemas/v3.1/strict/client-config-extensions/x-scalar-client-config-cookies.js").XScalarClientConfigCookie) => boolean;
|
|
19
18
|
deleteCookie: (cookieName: string) => boolean;
|
|
@@ -43,10 +42,6 @@ export declare function generateClientMutators(store: WorkspaceStore): {
|
|
|
43
42
|
addSecurityScheme: (name: string, securityScheme: import("../schemas/v3.1/strict/security-scheme.js").SecuritySchemeObject) => boolean;
|
|
44
43
|
deleteSecurityScheme: (name: string) => boolean;
|
|
45
44
|
};
|
|
46
|
-
environmentMutators: {
|
|
47
|
-
addEnvironment: (name: string, environment: import("../schemas/v3.1/strict/client-config-extensions/x-scalar-client-config-environments.js").xScalarClientConfigEnvironment) => boolean;
|
|
48
|
-
deleteEnvironment: (environmentName: string) => boolean;
|
|
49
|
-
};
|
|
50
45
|
cookieMutators: {
|
|
51
46
|
addCookie: (cookie: import("../schemas/v3.1/strict/client-config-extensions/x-scalar-client-config-cookies.js").XScalarClientConfigCookie) => boolean;
|
|
52
47
|
deleteCookie: (cookieName: string) => boolean;
|
|
@@ -73,10 +68,6 @@ export declare function generateClientMutators(store: WorkspaceStore): {
|
|
|
73
68
|
addSecurityScheme: (name: string, securityScheme: import("../schemas/v3.1/strict/security-scheme.js").SecuritySchemeObject) => boolean;
|
|
74
69
|
deleteSecurityScheme: (name: string) => boolean;
|
|
75
70
|
};
|
|
76
|
-
environmentMutators: {
|
|
77
|
-
addEnvironment: (name: string, environment: import("../schemas/v3.1/strict/client-config-extensions/x-scalar-client-config-environments.js").xScalarClientConfigEnvironment) => boolean;
|
|
78
|
-
deleteEnvironment: (environmentName: string) => boolean;
|
|
79
|
-
};
|
|
80
71
|
cookieMutators: {
|
|
81
72
|
addCookie: (cookie: import("../schemas/v3.1/strict/client-config-extensions/x-scalar-client-config-cookies.js").XScalarClientConfigCookie) => boolean;
|
|
82
73
|
deleteCookie: (cookieName: string) => boolean;
|
|
@@ -87,4 +78,5 @@ export declare function generateClientMutators(store: WorkspaceStore): {
|
|
|
87
78
|
};
|
|
88
79
|
};
|
|
89
80
|
};
|
|
81
|
+
export { upsertEnvironment, upsertEnvironmentVariable, } from './environment.js';
|
|
90
82
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mutators/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mutators/index.ts"],"names":[],"mappings":"AAAA,2FAA2F;AAC3F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAO9C;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,cAAc;IA4DxD;;OAEG;;;;;;;;;;;;;;;IAEH;;;OAGG;;;;;;;;;;;;;;;;;;;;;;IAGH;;;;OAIG;gBACS,MAAM;;;;;;;;;;;;;;;;;;;;;EAErB;AAED,OAAO,EACL,iBAAiB,EACjB,yBAAyB,GAC1B,MAAM,eAAe,CAAA"}
|
package/dist/mutators/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { cookieMutators } from "../mutators/cookie.js";
|
|
2
|
-
import { environmentMutators } from "../mutators/environment.js";
|
|
3
2
|
import { getDocument } from "../mutators/helpers.js";
|
|
4
3
|
import { requestMutators } from "../mutators/request.js";
|
|
5
4
|
import { securitySchemeMutators } from "../mutators/security-schemes.js";
|
|
@@ -21,7 +20,6 @@ function generateClientMutators(store) {
|
|
|
21
20
|
return {
|
|
22
21
|
requestMutators: requestMutators(document),
|
|
23
22
|
securitySchemeMutators: securitySchemeMutators(document?.components?.securitySchemes),
|
|
24
|
-
environmentMutators: environmentMutators(document),
|
|
25
23
|
cookieMutators: cookieMutators(document),
|
|
26
24
|
serverMutators: serverMutators(document?.servers)
|
|
27
25
|
};
|
|
@@ -35,7 +33,6 @@ function generateClientMutators(store) {
|
|
|
35
33
|
store.workspace["x-scalar-client-config-security-schemes"] = {};
|
|
36
34
|
}
|
|
37
35
|
return {
|
|
38
|
-
environmentMutators: environmentMutators(store.workspace),
|
|
39
36
|
cookieMutators: cookieMutators(store.workspace),
|
|
40
37
|
serverMutators: serverMutators(store.workspace["x-scalar-client-config-servers"]),
|
|
41
38
|
securitySchemeMutators: securitySchemeMutators(store.workspace["x-scalar-client-config-security-schemes"])
|
|
@@ -59,7 +56,13 @@ function generateClientMutators(store) {
|
|
|
59
56
|
doc: (name) => documentMutators(name)
|
|
60
57
|
};
|
|
61
58
|
}
|
|
59
|
+
import {
|
|
60
|
+
upsertEnvironment,
|
|
61
|
+
upsertEnvironmentVariable
|
|
62
|
+
} from "./environment.js";
|
|
62
63
|
export {
|
|
63
|
-
generateClientMutators
|
|
64
|
+
generateClientMutators,
|
|
65
|
+
upsertEnvironment,
|
|
66
|
+
upsertEnvironmentVariable
|
|
64
67
|
};
|
|
65
68
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/mutators/index.ts"],
|
|
4
|
-
"sourcesContent": ["
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["/** biome-ignore-all lint/performance/noBarrelFile: this will probably get deleted later */\nimport type { WorkspaceStore } from '@/client'\nimport { cookieMutators } from '@/mutators/cookie'\nimport { getDocument } from '@/mutators/helpers'\nimport { requestMutators } from '@/mutators/request'\nimport { securitySchemeMutators } from '@/mutators/security-schemes'\nimport { serverMutators } from '@/mutators/server'\n\n/**\n * Generates a set of mutators for managing OpenAPI document and workspace state.\n *\n * @deprecated use the individual mutators instead, this will be removed after we move fully to the new store\n *\n * @param store - The workspace store containing all documents and workspace-level data\n * @returns An object with mutators for the workspace, the active document, and any named document\n */\nexport function generateClientMutators(store: WorkspaceStore) {\n /**\n * Returns mutators for a specific document by name.\n *\n * @param documentName - The name of the document to get mutators for\n * @returns An object containing mutators for requests, request examples, security schemes, environments, and cookies\n */\n const documentMutators = (documentName: string) => {\n const document = getDocument(store, documentName)\n\n if (document) {\n // Make sure the document has a servers array\n if (!document.servers) {\n document.servers = []\n }\n\n // Make sure the document has the securitySchema object\n if (!document.components) {\n document.components = {}\n }\n\n if (!document.components.securitySchemes) {\n document.components.securitySchemes = {}\n }\n }\n\n return {\n requestMutators: requestMutators(document),\n securitySchemeMutators: securitySchemeMutators(document?.components?.securitySchemes),\n cookieMutators: cookieMutators(document),\n serverMutators: serverMutators(document?.servers),\n }\n }\n\n /**\n * Returns mutators for the workspace-level configuration.\n *\n * @returns An object containing mutators for environments and cookies at the workspace level\n */\n const workspaceMutators = () => {\n const workspace = store.workspace\n\n // Make sure the workspace has a servers array\n if (!workspace['x-scalar-client-config-servers']) {\n workspace['x-scalar-client-config-servers'] = []\n }\n\n // Make sure the workspace has the securitySchema object\n if (!store.workspace['x-scalar-client-config-security-schemes']) {\n store.workspace['x-scalar-client-config-security-schemes'] = {}\n }\n\n return {\n cookieMutators: cookieMutators(store.workspace),\n serverMutators: serverMutators(store.workspace['x-scalar-client-config-servers']),\n securitySchemeMutators: securitySchemeMutators(store.workspace['x-scalar-client-config-security-schemes']),\n }\n }\n\n return {\n /**\n * Returns mutators for the workspace-level configuration.\n */\n workspace: () => workspaceMutators(),\n /**\n * Returns mutators for the currently active document.\n * Falls back to the first document if no active document is set.\n */\n active: () =>\n documentMutators(store.workspace['x-scalar-active-document'] ?? Object.keys(store.workspace.documents)[0] ?? ''),\n /**\n * Returns mutators for a specific document by name.\n *\n * @param name - The name of the document\n */\n doc: (name: string) => documentMutators(name),\n }\n}\n\nexport {\n upsertEnvironment,\n upsertEnvironmentVariable,\n} from './environment'\n"],
|
|
5
|
+
"mappings": "AAEA,SAAS,sBAAsB;AAC/B,SAAS,mBAAmB;AAC5B,SAAS,uBAAuB;AAChC,SAAS,8BAA8B;AACvC,SAAS,sBAAsB;AAUxB,SAAS,uBAAuB,OAAuB;AAO5D,QAAM,mBAAmB,CAAC,iBAAyB;AACjD,UAAM,WAAW,YAAY,OAAO,YAAY;AAEhD,QAAI,UAAU;AAEZ,UAAI,CAAC,SAAS,SAAS;AACrB,iBAAS,UAAU,CAAC;AAAA,MACtB;AAGA,UAAI,CAAC,SAAS,YAAY;AACxB,iBAAS,aAAa,CAAC;AAAA,MACzB;AAEA,UAAI,CAAC,SAAS,WAAW,iBAAiB;AACxC,iBAAS,WAAW,kBAAkB,CAAC;AAAA,MACzC;AAAA,IACF;AAEA,WAAO;AAAA,MACL,iBAAiB,gBAAgB,QAAQ;AAAA,MACzC,wBAAwB,uBAAuB,UAAU,YAAY,eAAe;AAAA,MACpF,gBAAgB,eAAe,QAAQ;AAAA,MACvC,gBAAgB,eAAe,UAAU,OAAO;AAAA,IAClD;AAAA,EACF;AAOA,QAAM,oBAAoB,MAAM;AAC9B,UAAM,YAAY,MAAM;AAGxB,QAAI,CAAC,UAAU,gCAAgC,GAAG;AAChD,gBAAU,gCAAgC,IAAI,CAAC;AAAA,IACjD;AAGA,QAAI,CAAC,MAAM,UAAU,yCAAyC,GAAG;AAC/D,YAAM,UAAU,yCAAyC,IAAI,CAAC;AAAA,IAChE;AAEA,WAAO;AAAA,MACL,gBAAgB,eAAe,MAAM,SAAS;AAAA,MAC9C,gBAAgB,eAAe,MAAM,UAAU,gCAAgC,CAAC;AAAA,MAChF,wBAAwB,uBAAuB,MAAM,UAAU,yCAAyC,CAAC;AAAA,IAC3G;AAAA,EACF;AAEA,SAAO;AAAA;AAAA;AAAA;AAAA,IAIL,WAAW,MAAM,kBAAkB;AAAA;AAAA;AAAA;AAAA;AAAA,IAKnC,QAAQ,MACN,iBAAiB,MAAM,UAAU,0BAA0B,KAAK,OAAO,KAAK,MAAM,UAAU,SAAS,EAAE,CAAC,KAAK,EAAE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMjH,KAAK,CAAC,SAAiB,iBAAiB,IAAI;AAAA,EAC9C;AACF;AAEA;AAAA,EACE;AAAA,EACA;AAAA,OACK;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -5,5 +5,5 @@ import type { DocumentConfiguration } from '../schemas/workspace-specification/c
|
|
|
5
5
|
* how IDs and slugs are generated for tags, headings, models, operations, and webhooks.
|
|
6
6
|
* The returned options can be influenced by the provided DocumentConfiguration
|
|
7
7
|
*/
|
|
8
|
-
export declare const getNavigationOptions: (config?: DocumentConfiguration) => TraverseSpecOptions;
|
|
8
|
+
export declare const getNavigationOptions: (documentName: string, config?: DocumentConfiguration) => TraverseSpecOptions;
|
|
9
9
|
//# sourceMappingURL=get-navigation-options.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-navigation-options.d.ts","sourceRoot":"","sources":["../../src/navigation/get-navigation-options.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"get-navigation-options.d.ts","sourceRoot":"","sources":["../../src/navigation/get-navigation-options.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AAE7D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAA;AAErF;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,GAAI,cAAc,MAAM,EAAE,SAAS,qBAAqB,KAAG,mBAkH3F,CAAA"}
|