@scalar/workspace-store 0.38.1 → 0.39.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/CHANGELOG.md +27 -0
- package/dist/entities/auth/index.d.ts.map +1 -1
- package/dist/entities/auth/index.js +13 -21
- package/dist/entities/auth/index.js.map +2 -2
- package/dist/entities/auth/schema.d.ts +50 -0
- package/dist/entities/auth/schema.d.ts.map +1 -1
- package/dist/events/definitions/operation.d.ts +13 -0
- package/dist/events/definitions/operation.d.ts.map +1 -1
- package/dist/events/definitions/ui.d.ts +9 -1
- package/dist/events/definitions/ui.d.ts.map +1 -1
- package/dist/helpers/detect-changes-proxy.d.ts +5 -2
- package/dist/helpers/detect-changes-proxy.d.ts.map +1 -1
- package/dist/helpers/detect-changes-proxy.js +7 -0
- package/dist/helpers/detect-changes-proxy.js.map +2 -2
- package/dist/mutators/document.d.ts.map +1 -1
- package/dist/mutators/document.js +2 -2
- package/dist/mutators/document.js.map +2 -2
- package/dist/mutators/environment.d.ts +7 -0
- package/dist/mutators/environment.d.ts.map +1 -1
- package/dist/mutators/environment.js.map +2 -2
- package/dist/mutators/index.d.ts +2 -0
- package/dist/mutators/index.d.ts.map +1 -1
- package/dist/mutators/operation/helpers/sync-path-parameters.d.ts +43 -7
- package/dist/mutators/operation/helpers/sync-path-parameters.d.ts.map +1 -1
- package/dist/mutators/operation/helpers/sync-path-parameters.js +30 -25
- package/dist/mutators/operation/helpers/sync-path-parameters.js.map +2 -2
- package/dist/mutators/operation/index.d.ts +1 -0
- package/dist/mutators/operation/index.d.ts.map +1 -1
- package/dist/mutators/operation/index.js +2 -0
- package/dist/mutators/operation/index.js.map +2 -2
- package/dist/mutators/operation/operation.d.ts +12 -0
- package/dist/mutators/operation/operation.d.ts.map +1 -1
- package/dist/mutators/operation/operation.js +62 -4
- package/dist/mutators/operation/operation.js.map +2 -2
- package/dist/navigation/helpers/traverse-document.d.ts.map +1 -1
- package/dist/navigation/helpers/traverse-document.js +2 -1
- package/dist/navigation/helpers/traverse-document.js.map +2 -2
- package/dist/plugins/bundler/index.d.ts.map +1 -1
- package/dist/plugins/bundler/index.js +29 -25
- package/dist/plugins/bundler/index.js.map +3 -3
- package/dist/plugins/client/persistence.d.ts.map +1 -1
- package/dist/plugins/client/persistence.js +28 -1
- package/dist/plugins/client/persistence.js.map +2 -2
- package/dist/schemas/inmemory-workspace.d.ts +30 -0
- package/dist/schemas/inmemory-workspace.d.ts.map +1 -1
- package/dist/schemas/reference-config/index.d.ts +10 -0
- package/dist/schemas/reference-config/index.d.ts.map +1 -1
- package/dist/schemas/reference-config/settings.d.ts +10 -0
- package/dist/schemas/reference-config/settings.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/openapi-document.d.ts +350 -0
- package/dist/schemas/v3.1/strict/openapi-document.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/schema.d.ts +13 -0
- package/dist/schemas/v3.1/strict/schema.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/schema.js +3 -1
- package/dist/schemas/v3.1/strict/schema.js.map +2 -2
- package/dist/schemas/workspace.d.ts +30 -0
- package/dist/schemas/workspace.d.ts.map +1 -1
- package/dist/workspace-plugin.d.ts +6 -0
- package/dist/workspace-plugin.d.ts.map +1 -1
- package/package.json +6 -6
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/navigation/helpers/traverse-document.ts"],
|
|
4
|
-
"sourcesContent": ["import { unpackProxyObject } from '@/helpers/unpack-proxy'\nimport { type NavigationOptions, getNavigationOptions } from '@/navigation/get-navigation-options'\nimport type { TagsMap } from '@/navigation/types'\nimport type { TraversedDocument, TraversedEntry } from '@/schemas/navigation'\nimport type { OpenApiDocument } from '@/schemas/v3.1/strict/openapi-document'\n\nimport { traverseDescription } from './traverse-description'\nimport { traversePaths } from './traverse-paths'\nimport { traverseSchemas } from './traverse-schemas'\nimport { traverseTags } from './traverse-tags'\nimport { traverseWebhooks } from './traverse-webhooks'\n\n/**\n * Traverses an OpenAPI Document to generate navigation structure and metadata.\n *\n * This function processes the OpenAPI document to create:\n * - A hierarchical navigation structure for the sidebar\n * - A mapping of IDs to titles for mobile header navigation\n * - Tag-based organization of operations and webhooks\n * - Optional schema/model documentation\n */\nexport const traverseDocument = (documentName: string, document: OpenApiDocument, options?: NavigationOptions) => {\n const { hideModels, tagsSorter, operationsSorter, generateId } = getNavigationOptions(documentName, options)\n\n const documentId = generateId({\n type: 'document',\n info: document.info,\n name: documentName,\n })\n\n /** Map of tags and their entries */\n const tagsMap: TagsMap = new Map(\n document.tags?.map((tag) => [\n tag.name ?? 'Untitled Tag',\n { id: generateId({ type: 'tag', tag, parentId: documentId }), parentId: documentId, tag, entries: [] },\n ]) ?? [],\n )\n\n /** Generate entries for the document info description field */\n const entries: TraversedEntry[] = traverseDescription({\n generateId,\n parentId: documentId,\n info: document.info,\n })\n\n /** Traverse all the document path */\n const { untaggedOperations } = traversePaths({ document, tagsMap, generateId, documentId })\n\n const untaggedWebhooksParentId = generateId({\n type: 'webhook',\n name: '',\n parentId: documentId,\n })\n\n const untaggedWebhooks = traverseWebhooks({\n document,\n generateId,\n tagsMap,\n untaggedWebhooksParentId,\n documentId,\n })\n\n const tagsEntries = traverseTags({\n document,\n tagsMap,\n documentId,\n options: { tagsSorter, operationsSorter, generateId },\n })\n\n // Add tagged operations, webhooks and tagGroups\n entries.push(...tagsEntries)\n // Add untagged operations\n entries.push(...untaggedOperations)\n\n // Add untagged webhooks\n if (untaggedWebhooks.length) {\n entries.push({\n type: 'tag',\n id: untaggedWebhooksParentId,\n title: 'Webhooks',\n name: 'Webhooks',\n children: untaggedWebhooks,\n isGroup: false,\n isWebhooks: true,\n })\n }\n\n // Add models if they are not hidden\n if (!hideModels && document.components?.schemas) {\n const untaggedModels = traverseSchemas({\n documentId,\n document,\n generateId,\n tagsMap,\n })\n\n if (untaggedModels.length) {\n entries.push({\n type: 'models',\n id: generateId({\n type: 'model',\n parentId: documentId,\n }),\n title: 'Models',\n name: 'Models',\n children: untaggedModels,\n })\n }\n }\n\n const sortOrder = document['x-scalar-order']\n\n // Try to sort the entries using the x-scalar-order\n if (sortOrder) {\n entries.sort((a, b) => {\n const indexA = sortOrder.indexOf(a.id)\n const indexB = sortOrder.indexOf(b.id)\n // If an id is not found, treat it as \"infinity\" so those items go last.\n const safeIndexA = indexA === -1 ? Number.POSITIVE_INFINITY : indexA\n const safeIndexB = indexB === -1 ? Number.POSITIVE_INFINITY : indexB\n return safeIndexA - safeIndexB\n })\n }\n\n // Now update the sort order of the entries\n document['x-scalar-order'] = unpackProxyObject(entries.map((entry) => entry.id))\n\n return {\n id: documentId,\n type: 'document',\n title:
|
|
5
|
-
"mappings": "AAAA,SAAS,yBAAyB;AAClC,SAAiC,4BAA4B;AAK7D,SAAS,2BAA2B;AACpC,SAAS,qBAAqB;AAC9B,SAAS,uBAAuB;AAChC,SAAS,oBAAoB;AAC7B,SAAS,wBAAwB;AAW1B,MAAM,mBAAmB,CAAC,cAAsB,UAA2B,YAAgC;AAChH,QAAM,EAAE,YAAY,YAAY,kBAAkB,WAAW,IAAI,qBAAqB,cAAc,OAAO;AAE3G,QAAM,aAAa,WAAW;AAAA,IAC5B,MAAM;AAAA,IACN,MAAM,SAAS;AAAA,IACf,MAAM;AAAA,EACR,CAAC;AAGD,QAAM,UAAmB,IAAI;AAAA,IAC3B,SAAS,MAAM,IAAI,CAAC,QAAQ;AAAA,MAC1B,IAAI,QAAQ;AAAA,MACZ,EAAE,IAAI,WAAW,EAAE,MAAM,OAAO,KAAK,UAAU,WAAW,CAAC,GAAG,UAAU,YAAY,KAAK,SAAS,CAAC,EAAE;AAAA,IACvG,CAAC,KAAK,CAAC;AAAA,EACT;AAGA,QAAM,UAA4B,oBAAoB;AAAA,IACpD;AAAA,IACA,UAAU;AAAA,IACV,MAAM,SAAS;AAAA,EACjB,CAAC;AAGD,QAAM,EAAE,mBAAmB,IAAI,cAAc,E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AAoB;AAC9D,aAAO,aAAa;AAAA,IACtB,CAAC;AAAA,EACH;AAGA,WAAS,gBAAgB,IAAI,kBAAkB,QAAQ,IAAI,CAAC,UAAU,MAAM,EAAE,CAAC;AAE/E,SAAO;AAAA,IACL,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,OAAO
|
|
4
|
+
"sourcesContent": ["import { unpackProxyObject } from '@/helpers/unpack-proxy'\nimport { type NavigationOptions, getNavigationOptions } from '@/navigation/get-navigation-options'\nimport type { TagsMap } from '@/navigation/types'\nimport type { TraversedDocument, TraversedEntry } from '@/schemas/navigation'\nimport type { OpenApiDocument } from '@/schemas/v3.1/strict/openapi-document'\n\nimport { traverseDescription } from './traverse-description'\nimport { traversePaths } from './traverse-paths'\nimport { traverseSchemas } from './traverse-schemas'\nimport { traverseTags } from './traverse-tags'\nimport { traverseWebhooks } from './traverse-webhooks'\n\n/**\n * Traverses an OpenAPI Document to generate navigation structure and metadata.\n *\n * This function processes the OpenAPI document to create:\n * - A hierarchical navigation structure for the sidebar\n * - A mapping of IDs to titles for mobile header navigation\n * - Tag-based organization of operations and webhooks\n * - Optional schema/model documentation\n */\nexport const traverseDocument = (documentName: string, document: OpenApiDocument, options?: NavigationOptions) => {\n const { hideModels, tagsSorter, operationsSorter, generateId } = getNavigationOptions(documentName, options)\n\n const documentId = generateId({\n type: 'document',\n info: document.info,\n name: documentName,\n })\n\n /** Map of tags and their entries */\n const tagsMap: TagsMap = new Map(\n document.tags?.map((tag) => [\n tag.name ?? 'Untitled Tag',\n { id: generateId({ type: 'tag', tag, parentId: documentId }), parentId: documentId, tag, entries: [] },\n ]) ?? [],\n )\n\n /** Generate entries for the document info description field */\n const entries: TraversedEntry[] = traverseDescription({\n generateId,\n parentId: documentId,\n info: document.info,\n })\n\n /** Traverse all the document path */\n const { untaggedOperations } = traversePaths({ document, tagsMap, generateId, documentId })\n\n const untaggedWebhooksParentId = generateId({\n type: 'webhook',\n name: '',\n parentId: documentId,\n })\n\n const untaggedWebhooks = traverseWebhooks({\n document,\n generateId,\n tagsMap,\n untaggedWebhooksParentId,\n documentId,\n })\n\n const tagsEntries = traverseTags({\n document,\n tagsMap,\n documentId,\n options: { tagsSorter, operationsSorter, generateId },\n })\n\n // Add tagged operations, webhooks and tagGroups\n entries.push(...tagsEntries)\n // Add untagged operations\n entries.push(...untaggedOperations)\n\n // Add untagged webhooks\n if (untaggedWebhooks.length) {\n entries.push({\n type: 'tag',\n id: untaggedWebhooksParentId,\n title: 'Webhooks',\n name: 'Webhooks',\n children: untaggedWebhooks,\n isGroup: false,\n isWebhooks: true,\n })\n }\n\n // Add models if they are not hidden\n if (!hideModels && document.components?.schemas) {\n const untaggedModels = traverseSchemas({\n documentId,\n document,\n generateId,\n tagsMap,\n })\n\n if (untaggedModels.length) {\n entries.push({\n type: 'models',\n id: generateId({\n type: 'model',\n parentId: documentId,\n }),\n title: 'Models',\n name: 'Models',\n children: untaggedModels,\n })\n }\n }\n\n const sortOrder = document['x-scalar-order']\n\n // Try to sort the entries using the x-scalar-order\n if (sortOrder) {\n entries.sort((a, b) => {\n const indexA = sortOrder.indexOf(a.id)\n const indexB = sortOrder.indexOf(b.id)\n // If an id is not found, treat it as \"infinity\" so those items go last.\n const safeIndexA = indexA === -1 ? Number.POSITIVE_INFINITY : indexA\n const safeIndexB = indexB === -1 ? Number.POSITIVE_INFINITY : indexB\n return safeIndexA - safeIndexB\n })\n }\n\n // Now update the sort order of the entries\n document['x-scalar-order'] = unpackProxyObject(entries.map((entry) => entry.id))\n\n const documentTitle = document.info?.title?.trim() || 'Untitled Document'\n\n return {\n id: documentId,\n type: 'document',\n title: documentTitle,\n name: documentName,\n children: entries,\n icon: document['x-scalar-icon'],\n } satisfies TraversedDocument\n}\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,yBAAyB;AAClC,SAAiC,4BAA4B;AAK7D,SAAS,2BAA2B;AACpC,SAAS,qBAAqB;AAC9B,SAAS,uBAAuB;AAChC,SAAS,oBAAoB;AAC7B,S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,EACH;AAGA,MAAI,CAAC,cAAc,SAAS,YAAY,SAAS;AAC/C,UAAM,iBAAiB,gBAAgB;AAAA,MACrC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF,CAAC;AAED,QAAI,eAAe,QAAQ;AACzB,cAAQ,KAAK;AAAA,QACX,MAAM;AAAA,QACN,IAAI,WAAW;AAAA,UACb,MAAM;AAAA,UACN,UAAU;AAAA,QACZ,CAAC;AAAA,QACD,OAAO;AAAA,QACP,MAAM;AAAA,QACN,UAAU;AAAA,MACZ,CAAC;AAAA,IACH;AAAA,EACF;AAEA,QAAM,YAAY,SAAS,gBAAgB;AAG3C,MAAI,WAAW;AACb,YAAQ,KAAK,CAAC,GAAG,MAAM;AACrB,YAAM,SAAS,UAAU,QAAQ,EAAE,EAAE;AACrC,YAAM,SAAS,UAAU,QAAQ,EAAE,EAAE;AAErC,YAAM,aAAa,WAAW,KAAK,OAAO,oBAAoB;AAC9D,YAAM,aAAa,WAAW,KAAK,OAAO,oBAAoB;AAC9D,aAAO,aAAa;AAAA,IACtB,CAAC;AAAA,EACH;AAGA,WAAS,gBAAgB,IAAI,kBAAkB,QAAQ,IAAI,CAAC,UAAU,MAAM,EAAE,CAAC;AAE/E,QAAM,gBAAgB,SAAS,MAAM,OAAO,KAAK,KAAK;AAEtD,SAAO;AAAA,IACL,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,OAAO;AAAA,IACP,MAAM;AAAA,IACN,UAAU;AAAA,IACV,MAAM,SAAS,eAAe;AAAA,EAChC;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/bundler/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/bundler/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAShE;;;;;GAKG;AACH,eAAO,MAAM,aAAa,QAAO,eAahC,CAAA;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,qBAAqB,QAAO,eA+BxC,CAAA;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,cAAc,QAAO,eAwCjC,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,mBAAmB,QAAO,eAuBtC,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,oBAAoB,QAAO,eAuBvC,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,aAAa,QAAO,eAmBhC,CAAA;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,kBAAkB,QAAO,eAkFrC,CAAA"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { HTTP_METHODS } from "@scalar/helpers/http/http-methods";
|
|
2
2
|
import { isObject } from "@scalar/helpers/object/is-object";
|
|
3
3
|
import { isLocalRef } from "../../helpers/general.js";
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
syncParametersForPathChange
|
|
6
|
+
} from "../../mutators/operation/helpers/sync-path-parameters.js";
|
|
5
7
|
import { getResolvedRef } from "../../plugins/bundler/helpers.js";
|
|
6
8
|
const loadingStatus = () => {
|
|
7
9
|
return {
|
|
@@ -128,34 +130,36 @@ const syncPathParameters = () => {
|
|
|
128
130
|
if (!isObject(operation)) {
|
|
129
131
|
continue;
|
|
130
132
|
}
|
|
131
|
-
const
|
|
132
|
-
|
|
133
|
-
(
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
acc.other.push(param);
|
|
143
|
-
return acc;
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
path: [],
|
|
147
|
-
other: []
|
|
148
|
-
}
|
|
133
|
+
const isParameterNode = (param) => {
|
|
134
|
+
const resolved = getResolvedRef(param, context);
|
|
135
|
+
return isObject(resolved) && "name" in resolved && typeof resolved.name === "string" && "in" in resolved && typeof resolved.in === "string";
|
|
136
|
+
};
|
|
137
|
+
const isPathParameterNode = (param) => {
|
|
138
|
+
const resolved = getResolvedRef(param, context);
|
|
139
|
+
return isParameterNode(resolved) && resolved.in === "path";
|
|
140
|
+
};
|
|
141
|
+
const existingParameters = ("parameters" in operation && Array.isArray(operation.parameters) ? operation.parameters : []).filter(isParameterNode);
|
|
142
|
+
const existingPathParameters = new Set(
|
|
143
|
+
existingParameters.map((param) => getResolvedRef(param, context)).filter(isPathParameterNode).map((param) => param.name)
|
|
149
144
|
);
|
|
150
145
|
const pathItemParameters = "parameters" in node && Array.isArray(node.parameters) ? node.parameters : [];
|
|
151
|
-
|
|
146
|
+
const pathItemPathParameters = pathItemParameters.filter((param) => {
|
|
152
147
|
const resolved = getResolvedRef(param, context);
|
|
153
|
-
if (
|
|
154
|
-
|
|
148
|
+
if (!isPathParameterNode(resolved)) {
|
|
149
|
+
return false;
|
|
155
150
|
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
151
|
+
const result2 = !existingPathParameters.has(resolved.name);
|
|
152
|
+
if (result2) {
|
|
153
|
+
existingPathParameters.add(resolved.name);
|
|
154
|
+
}
|
|
155
|
+
return result2;
|
|
156
|
+
});
|
|
157
|
+
const result = syncParametersForPathChange(
|
|
158
|
+
pathString,
|
|
159
|
+
pathString,
|
|
160
|
+
[...existingParameters, ...pathItemPathParameters],
|
|
161
|
+
(node2) => getResolvedRef(node2, context)
|
|
162
|
+
);
|
|
159
163
|
if (result.length > 0) {
|
|
160
164
|
operation.parameters = result;
|
|
161
165
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/plugins/bundler/index.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * This file contains a collection of plugins used for the bundler.\n * Plugins defined here can extend or modify the behavior of the bundling process,\n * such as adding lifecycle hooks or custom processing logic.\n */\n\nimport { HTTP_METHODS } from '@scalar/helpers/http/http-methods'\nimport { isObject } from '@scalar/helpers/object/is-object'\nimport type { LifecyclePlugin } from '@scalar/json-magic/bundle'\n\nimport { isLocalRef } from '@/helpers/general'\nimport { syncParametersForPathChange } from '@/mutators/operation/helpers/sync-path-parameters'\nimport { getResolvedRef } from '@/plugins/bundler/helpers'\n\n/**\n * A lifecycle plugin that adds a `$status` property to nodes during resolution.\n * - Sets `$status` to 'loading' when resolution starts.\n * - Sets `$status` to 'error' if resolution fails.\n * - Removes `$status` when resolution succeeds.\n */\nexport const loadingStatus = (): LifecyclePlugin => {\n return {\n type: 'lifecycle',\n onResolveStart: (node) => {\n node['$status'] = 'loading'\n },\n onResolveError: (node) => {\n node['$status'] = 'error'\n },\n onResolveSuccess: (node) => {\n delete node['$status']\n },\n }\n}\n\n/**\n * Lifecycle plugin to resolve and embed external content referenced by an 'externalValue' property in a node.\n *\n * When a node contains an 'externalValue' property (as a string), this plugin will:\n * - Fetch the external resource (such as a URL or file) using the fetchUrls plugin.\n * - If the fetch is successful, assign the fetched data to the node's 'value' property.\n *\n * This is useful for inlining external content (like examples or schemas) into the OpenAPI document during bundling.\n *\n * @param node - The node being processed, which may contain an 'externalValue' property.\n */\nexport const externalValueResolver = (): LifecyclePlugin => {\n return {\n type: 'lifecycle',\n onAfterNodeProcess: async (node, context) => {\n const externalValue = node['externalValue']\n const cache = context.resolutionCache\n\n // Only process if 'externalValue' is a string\n if (typeof externalValue !== 'string') {\n return\n }\n\n const loader = context.loaders.find((it) => it.validate(externalValue))\n\n // We can not process the external value\n if (!loader) {\n return\n }\n\n if (!cache.has(externalValue)) {\n cache.set(externalValue, loader.exec(externalValue))\n }\n\n const result = await cache.get(externalValue)\n\n // If fetch is successful, assign the data to the node's 'value' property\n if (result?.ok) {\n node['value'] = result.data\n }\n },\n }\n}\n\n/**\n * Lifecycle plugin to resolve $ref on any object, including non-standard locations like the info object.\n *\n * This plugin will:\n * - Detect if a node contains a $ref property (as a string).\n * - If the node is under the 'info' path, attempt to resolve the reference using fetchUrls.\n * - Replace the node's properties with the resolved data if successful.\n *\n * Note: This currently only supports refs on the 'info' object and does not handle primitive types.\n */\nexport const refsEverywhere = (): LifecyclePlugin => {\n return {\n type: 'lifecycle',\n onBeforeNodeProcess: async (node, context) => {\n const { path, resolutionCache, parentNode } = context\n const ref = node['$ref']\n\n // Only process nodes that have a $ref property as a string\n if (typeof ref !== 'string') {\n return\n }\n\n // Can not resolve top level refs\n if (!parentNode || !path.length) {\n return\n }\n\n const loader = context.loaders.find((it) => it.validate(ref))\n\n // Can not load the external ref\n if (!loader) {\n return\n }\n\n // Support resolving $ref on the info object\n if (path[0] === 'info') {\n // Use the cache to avoid duplicate fetches\n if (!resolutionCache.has(ref)) {\n resolutionCache.set(ref, loader.exec(ref))\n }\n\n const result = await resolutionCache.get(ref)\n\n if (result?.ok) {\n // Replace the ref with the resolved data\n parentNode[path.at(-1)!] = result.data\n }\n }\n },\n }\n}\n\n/**\n * Lifecycle plugin to restore original $ref values after processing.\n *\n * This plugin is intended to be used as a \"lifecycle\" plugin in the bundling process.\n * It operates in the `onAfterNodeProcess` hook, and its main purpose is to restore\n * the original $ref values for external references that may have been replaced or\n * rewritten during the bundling process.\n *\n * How it works:\n * - For each node processed, if the node contains a $ref property (as a string),\n * and the root document contains an \"x-ext-urls\" mapping object,\n * the plugin will attempt to restore the original $ref value.\n * - The \"x-ext-urls\" object is expected to be a mapping from the rewritten $ref\n * (e.g., a hashed or compressed reference) back to the original external URL or path.\n * - If a mapping exists for the current $ref, the plugin replaces the $ref value\n * with the original value from the mapping. If no mapping exists (e.g., for local refs),\n * the $ref value is left unchanged.\n *\n * This is useful for scenarios where you want to present or export the bundled document\n * with the original external $ref values, rather than the internal or rewritten ones.\n *\n * @returns {LifecyclePlugin} The plugin object for use in the bundler.\n */\nexport const restoreOriginalRefs = (): LifecyclePlugin => {\n return {\n type: 'lifecycle',\n onBeforeNodeProcess: (node, context) => {\n const ref = node['$ref']\n const root = context.rootNode\n const extUrls = root['x-ext-urls']\n\n // Only process if $ref is a string and x-ext-urls is a valid object\n if (typeof ref !== 'string' || typeof extUrls !== 'object' || extUrls === null || !isLocalRef(ref)) {\n return\n }\n\n // Working with local refs\n\n const segments = ref.split('/')\n const key = segments.at(-1) ?? ''\n\n // Replace the $ref with the original version from the mapping,\n // or keep the current version if there is no mapping (e.g., for local refs)\n node['$ref'] = (extUrls as Record<string, string>)[key] ?? ref\n },\n }\n}\n\n/**\n * Lifecycle plugin to normalize the `scheme` property in securitySchemes to lowercase.\n *\n * Our typebox schemas require the `scheme` property to be a lowercase string.\n * This plugin ensures that any `scheme` field under `components.securitySchemes` is normalized to lowercase, fixing\n * potential user input errors such as \"Bearer\" or \"BASIC\".\n *\n * Example:\n * ```yaml\n * Before normalization:\n * components:\n * securitySchemes:\n * bearerAuth:\n * type: http\n * scheme: Bearer\n * ```\n * After normalization:\n * ```yaml\n * components:\n * securitySchemes:\n * bearerAuth:\n * type: http\n * scheme: bearer\n * ```\n */\nexport const normalizeAuthSchemes = (): LifecyclePlugin => {\n return {\n type: 'lifecycle',\n onAfterNodeProcess: (node, context) => {\n const { path } = context\n\n // Check if we're at components.securitySchemes.{schemeName}\n if (path.length === 3 && path[0] === 'components' && path[1] === 'securitySchemes') {\n const targetNode = getResolvedRef(node, context)\n\n // If the scheme exists and is a string, normalize to lowercase if not already\n if (\n typeof targetNode === 'object' &&\n targetNode !== null &&\n 'scheme' in targetNode &&\n typeof targetNode['scheme'] === 'string' &&\n targetNode['scheme'].toLowerCase() !== targetNode['scheme']\n ) {\n targetNode['scheme'] = targetNode['scheme'].toLowerCase()\n }\n }\n },\n }\n}\n\n/**\n * Lifecycle plugin to normalize $ref nodes:\n * Ensures that for any non-schema object containing a $ref, only $ref,\n * summary, description, and $status properties are preserved.\n * This keeps $ref references clean and predictable for downstream consumers.\n */\nexport const normalizeRefs = (): LifecyclePlugin => {\n return {\n type: 'lifecycle',\n onBeforeNodeProcess: (node, context) => {\n const { path } = context\n\n // If the node is a $ref and we are not on the schema object, we need to normalize the $ref\n if (typeof node['$ref'] === 'string' && !(path[0] === 'components' && path[1] === 'schemas')) {\n // Remove any other properties from the node and only keep the '$ref', 'summary', 'description' and '$status'\n const keepProperties = new Set(['$ref', 'summary', 'description', '$status'])\n\n Object.keys(node).forEach((key) => {\n if (!keepProperties.has(key)) {\n delete node[key]\n }\n })\n }\n },\n }\n}\n\n/**\n * Lifecycle plugin to sync path parameters for all operations under a path item.\n *\n * When processing a path item (e.g., '/users/{id}'), this plugin will:\n * - Extract path variables from the path string\n * - For each HTTP method operation (get, post, put, delete, etc.)\n * - Sync the operation's parameters to match the path variables\n * - Preserve existing parameter configurations when possible\n *\n * This ensures that path parameters are always in sync with the path string,\n * even after bundling or other transformations.\n */\nexport const syncPathParameters = (): LifecyclePlugin => {\n return {\n type: 'lifecycle',\n onBeforeNodeProcess: (node, context) => {\n const { path } = context\n\n // Only process path items (e.g., paths -> /users/{id} -> operations)\n if (path.length !== 2 || path[0] !== 'paths' || typeof path[1] !== 'string') {\n return\n }\n\n const pathString = path[1]\n\n // Sync parameters for each operation method\n for (const method of HTTP_METHODS) {\n const operation = getResolvedRef(node[method], context)\n\n if (!isObject(operation)) {\n continue\n }\n\n const existingParameters =\n 'parameters' in operation && Array.isArray(operation.parameters) ? operation.parameters : []\n\n const { path: pathParameters, other: restParameters } = existingParameters.reduce<{\n path: any[]\n other: any[]\n }>(\n (acc, param) => {\n const resolved = getResolvedRef(param, context)\n\n if (!isObject(resolved)) {\n return acc\n }\n\n if (resolved.in === 'path') {\n acc.path.push(resolved)\n return acc\n }\n acc.other.push(param)\n return acc\n },\n {\n path: [],\n other: [],\n },\n )\n\n // Include path-item level path parameters as fallbacks for any that the operation does not declare.\n // Without this, syncParametersForPathChange would create bare `{ name, in: 'path' }` params,\n // losing description, schema, required, etc. from the path-item definition.\n const pathItemParameters = 'parameters' in node && Array.isArray(node.parameters) ? node.parameters : []\n\n for (const param of pathItemParameters) {\n const resolved = getResolvedRef(param, context)\n\n if (isObject(resolved) && resolved.in === 'path' && !pathParameters.find((p) => p.name === resolved.name)) {\n pathParameters.push(resolved)\n }\n }\n\n // Sync path parameters using the same path for old and new\n // This ensures parameters match the current path string\n const syncedParameters = syncParametersForPathChange(pathString, pathString, pathParameters)\n\n const result = [...syncedParameters, ...restParameters]\n\n if (result.length > 0) {\n operation.parameters = result\n }\n }\n },\n }\n}\n"],
|
|
5
|
-
"mappings": "AAMA,SAAS,oBAAoB;AAC7B,SAAS,gBAAgB;AAGzB,SAAS,kBAAkB;AAC3B,
|
|
6
|
-
"names": []
|
|
4
|
+
"sourcesContent": ["/**\n * This file contains a collection of plugins used for the bundler.\n * Plugins defined here can extend or modify the behavior of the bundling process,\n * such as adding lifecycle hooks or custom processing logic.\n */\n\nimport { HTTP_METHODS } from '@scalar/helpers/http/http-methods'\nimport { isObject } from '@scalar/helpers/object/is-object'\nimport type { LifecyclePlugin } from '@scalar/json-magic/bundle'\n\nimport { isLocalRef } from '@/helpers/general'\nimport {\n type MinimalParameterObject,\n syncParametersForPathChange,\n} from '@/mutators/operation/helpers/sync-path-parameters'\nimport { getResolvedRef } from '@/plugins/bundler/helpers'\n\n/**\n * A lifecycle plugin that adds a `$status` property to nodes during resolution.\n * - Sets `$status` to 'loading' when resolution starts.\n * - Sets `$status` to 'error' if resolution fails.\n * - Removes `$status` when resolution succeeds.\n */\nexport const loadingStatus = (): LifecyclePlugin => {\n return {\n type: 'lifecycle',\n onResolveStart: (node) => {\n node['$status'] = 'loading'\n },\n onResolveError: (node) => {\n node['$status'] = 'error'\n },\n onResolveSuccess: (node) => {\n delete node['$status']\n },\n }\n}\n\n/**\n * Lifecycle plugin to resolve and embed external content referenced by an 'externalValue' property in a node.\n *\n * When a node contains an 'externalValue' property (as a string), this plugin will:\n * - Fetch the external resource (such as a URL or file) using the fetchUrls plugin.\n * - If the fetch is successful, assign the fetched data to the node's 'value' property.\n *\n * This is useful for inlining external content (like examples or schemas) into the OpenAPI document during bundling.\n *\n * @param node - The node being processed, which may contain an 'externalValue' property.\n */\nexport const externalValueResolver = (): LifecyclePlugin => {\n return {\n type: 'lifecycle',\n onAfterNodeProcess: async (node, context) => {\n const externalValue = node['externalValue']\n const cache = context.resolutionCache\n\n // Only process if 'externalValue' is a string\n if (typeof externalValue !== 'string') {\n return\n }\n\n const loader = context.loaders.find((it) => it.validate(externalValue))\n\n // We can not process the external value\n if (!loader) {\n return\n }\n\n if (!cache.has(externalValue)) {\n cache.set(externalValue, loader.exec(externalValue))\n }\n\n const result = await cache.get(externalValue)\n\n // If fetch is successful, assign the data to the node's 'value' property\n if (result?.ok) {\n node['value'] = result.data\n }\n },\n }\n}\n\n/**\n * Lifecycle plugin to resolve $ref on any object, including non-standard locations like the info object.\n *\n * This plugin will:\n * - Detect if a node contains a $ref property (as a string).\n * - If the node is under the 'info' path, attempt to resolve the reference using fetchUrls.\n * - Replace the node's properties with the resolved data if successful.\n *\n * Note: This currently only supports refs on the 'info' object and does not handle primitive types.\n */\nexport const refsEverywhere = (): LifecyclePlugin => {\n return {\n type: 'lifecycle',\n onBeforeNodeProcess: async (node, context) => {\n const { path, resolutionCache, parentNode } = context\n const ref = node['$ref']\n\n // Only process nodes that have a $ref property as a string\n if (typeof ref !== 'string') {\n return\n }\n\n // Can not resolve top level refs\n if (!parentNode || !path.length) {\n return\n }\n\n const loader = context.loaders.find((it) => it.validate(ref))\n\n // Can not load the external ref\n if (!loader) {\n return\n }\n\n // Support resolving $ref on the info object\n if (path[0] === 'info') {\n // Use the cache to avoid duplicate fetches\n if (!resolutionCache.has(ref)) {\n resolutionCache.set(ref, loader.exec(ref))\n }\n\n const result = await resolutionCache.get(ref)\n\n if (result?.ok) {\n // Replace the ref with the resolved data\n parentNode[path.at(-1)!] = result.data\n }\n }\n },\n }\n}\n\n/**\n * Lifecycle plugin to restore original $ref values after processing.\n *\n * This plugin is intended to be used as a \"lifecycle\" plugin in the bundling process.\n * It operates in the `onAfterNodeProcess` hook, and its main purpose is to restore\n * the original $ref values for external references that may have been replaced or\n * rewritten during the bundling process.\n *\n * How it works:\n * - For each node processed, if the node contains a $ref property (as a string),\n * and the root document contains an \"x-ext-urls\" mapping object,\n * the plugin will attempt to restore the original $ref value.\n * - The \"x-ext-urls\" object is expected to be a mapping from the rewritten $ref\n * (e.g., a hashed or compressed reference) back to the original external URL or path.\n * - If a mapping exists for the current $ref, the plugin replaces the $ref value\n * with the original value from the mapping. If no mapping exists (e.g., for local refs),\n * the $ref value is left unchanged.\n *\n * This is useful for scenarios where you want to present or export the bundled document\n * with the original external $ref values, rather than the internal or rewritten ones.\n *\n * @returns {LifecyclePlugin} The plugin object for use in the bundler.\n */\nexport const restoreOriginalRefs = (): LifecyclePlugin => {\n return {\n type: 'lifecycle',\n onBeforeNodeProcess: (node, context) => {\n const ref = node['$ref']\n const root = context.rootNode\n const extUrls = root['x-ext-urls']\n\n // Only process if $ref is a string and x-ext-urls is a valid object\n if (typeof ref !== 'string' || typeof extUrls !== 'object' || extUrls === null || !isLocalRef(ref)) {\n return\n }\n\n // Working with local refs\n\n const segments = ref.split('/')\n const key = segments.at(-1) ?? ''\n\n // Replace the $ref with the original version from the mapping,\n // or keep the current version if there is no mapping (e.g., for local refs)\n node['$ref'] = (extUrls as Record<string, string>)[key] ?? ref\n },\n }\n}\n\n/**\n * Lifecycle plugin to normalize the `scheme` property in securitySchemes to lowercase.\n *\n * Our typebox schemas require the `scheme` property to be a lowercase string.\n * This plugin ensures that any `scheme` field under `components.securitySchemes` is normalized to lowercase, fixing\n * potential user input errors such as \"Bearer\" or \"BASIC\".\n *\n * Example:\n * ```yaml\n * Before normalization:\n * components:\n * securitySchemes:\n * bearerAuth:\n * type: http\n * scheme: Bearer\n * ```\n * After normalization:\n * ```yaml\n * components:\n * securitySchemes:\n * bearerAuth:\n * type: http\n * scheme: bearer\n * ```\n */\nexport const normalizeAuthSchemes = (): LifecyclePlugin => {\n return {\n type: 'lifecycle',\n onAfterNodeProcess: (node, context) => {\n const { path } = context\n\n // Check if we're at components.securitySchemes.{schemeName}\n if (path.length === 3 && path[0] === 'components' && path[1] === 'securitySchemes') {\n const targetNode = getResolvedRef(node, context)\n\n // If the scheme exists and is a string, normalize to lowercase if not already\n if (\n typeof targetNode === 'object' &&\n targetNode !== null &&\n 'scheme' in targetNode &&\n typeof targetNode['scheme'] === 'string' &&\n targetNode['scheme'].toLowerCase() !== targetNode['scheme']\n ) {\n targetNode['scheme'] = targetNode['scheme'].toLowerCase()\n }\n }\n },\n }\n}\n\n/**\n * Lifecycle plugin to normalize $ref nodes:\n * Ensures that for any non-schema object containing a $ref, only $ref,\n * summary, description, and $status properties are preserved.\n * This keeps $ref references clean and predictable for downstream consumers.\n */\nexport const normalizeRefs = (): LifecyclePlugin => {\n return {\n type: 'lifecycle',\n onBeforeNodeProcess: (node, context) => {\n const { path } = context\n\n // If the node is a $ref and we are not on the schema object, we need to normalize the $ref\n if (typeof node['$ref'] === 'string' && !(path[0] === 'components' && path[1] === 'schemas')) {\n // Remove any other properties from the node and only keep the '$ref', 'summary', 'description' and '$status'\n const keepProperties = new Set(['$ref', 'summary', 'description', '$status'])\n\n Object.keys(node).forEach((key) => {\n if (!keepProperties.has(key)) {\n delete node[key]\n }\n })\n }\n },\n }\n}\n\n/**\n * Lifecycle plugin to sync path parameters for all operations under a path item.\n *\n * When processing a path item (e.g., '/users/{id}'), this plugin will:\n * - Extract path variables from the path string\n * - For each HTTP method operation (get, post, put, delete, etc.)\n * - Sync the operation's parameters to match the path variables\n * - Preserve existing parameter configurations when possible\n *\n * This ensures that path parameters are always in sync with the path string,\n * even after bundling or other transformations.\n */\nexport const syncPathParameters = (): LifecyclePlugin => {\n return {\n type: 'lifecycle',\n onBeforeNodeProcess: (node, context) => {\n const { path } = context\n\n // Only process path items (e.g., paths -> /users/{id} -> operations)\n if (path.length !== 2 || path[0] !== 'paths' || typeof path[1] !== 'string') {\n return\n }\n\n const pathString = path[1]\n\n // Sync parameters for each operation method\n for (const method of HTTP_METHODS) {\n const operation = getResolvedRef(node[method], context)\n\n if (!isObject(operation)) {\n continue\n }\n\n const isParameterNode = (param: unknown): param is MinimalParameterObject => {\n const resolved = getResolvedRef(param, context)\n\n return (\n isObject(resolved) &&\n 'name' in resolved &&\n typeof resolved.name === 'string' &&\n 'in' in resolved &&\n typeof resolved.in === 'string'\n )\n }\n\n const isPathParameterNode = (param: unknown): param is MinimalParameterObject => {\n const resolved = getResolvedRef(param, context)\n return isParameterNode(resolved) && resolved.in === 'path'\n }\n\n const existingParameters = (\n 'parameters' in operation && Array.isArray(operation.parameters) ? operation.parameters : []\n ).filter(isParameterNode)\n\n const existingPathParameters = new Set<string>(\n existingParameters\n .map((param) => getResolvedRef(param, context))\n .filter(isPathParameterNode)\n .map((param) => param.name),\n )\n\n // Include path-item level path parameters as fallbacks for any that the operation does not declare.\n // Without this, syncParametersForPathChange would create bare `{ name, in: 'path' }` params,\n // losing description, schema, required, etc. from the path-item definition.\n const pathItemParameters = 'parameters' in node && Array.isArray(node.parameters) ? node.parameters : []\n\n const pathItemPathParameters = pathItemParameters.filter((param): param is MinimalParameterObject => {\n const resolved = getResolvedRef(param, context)\n\n if (!isPathParameterNode(resolved)) {\n return false\n }\n\n const result = !existingPathParameters.has(resolved.name)\n\n if (result) {\n existingPathParameters.add(resolved.name)\n }\n\n return result\n })\n\n const result = syncParametersForPathChange(\n pathString,\n pathString,\n [...existingParameters, ...pathItemPathParameters],\n (node) => getResolvedRef(node, context) as MinimalParameterObject,\n )\n if (result.length > 0) {\n operation.parameters = result\n }\n }\n },\n }\n}\n"],
|
|
5
|
+
"mappings": "AAMA,SAAS,oBAAoB;AAC7B,SAAS,gBAAgB;AAGzB,SAAS,kBAAkB;AAC3B;AAAA,EAEE;AAAA,OACK;AACP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gBAAgB,aAAa,MAAM,QAAQ,UAAU,UAAU,IAAI,UAAU,aAAa,CAAC,GAC3F,OAAO,eAAe;AAExB,cAAM,yBAAyB,IAAI;AAAA,UACjC,mBACG,IAAI,CAAC,UAAU,eAAe,OAAO,OAAO,CAAC,EAC7C,OAAO,mBAAmB,EAC1B,IAAI,CAAC,UAAU,MAAM,IAAI;AAAA,QAC9B;AAKA,cAAM,qBAAqB,gBAAgB,QAAQ,MAAM,QAAQ,KAAK,UAAU,IAAI,KAAK,aAAa,CAAC;AAEvG,cAAM,yBAAyB,mBAAmB,OAAO,CAAC,UAA2C;AACnG,gBAAM,WAAW,eAAe,OAAO,OAAO;AAE9C,cAAI,CAAC,oBAAoB,QAAQ,GAAG;AAClC,mBAAO;AAAA,UACT;AAEA,gBAAMA,UAAS,CAAC,uBAAuB,IAAI,SAAS,IAAI;AAExD,cAAIA,SAAQ;AACV,mCAAuB,IAAI,SAAS,IAAI;AAAA,UAC1C;AAEA,iBAAOA;AAAA,QACT,CAAC;AAED,cAAM,SAAS;AAAA,UACb;AAAA,UACA;AAAA,UACA,CAAC,GAAG,oBAAoB,GAAG,sBAAsB;AAAA,UACjD,CAACC,UAAS,eAAeA,OAAM,OAAO;AAAA,QACxC;AACA,YAAI,OAAO,SAAS,GAAG;AACrB,oBAAU,aAAa;AAAA,QACzB;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;",
|
|
6
|
+
"names": ["result", "node"]
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"persistence.d.ts","sourceRoot":"","sources":["../../../src/plugins/client/persistence.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"persistence.d.ts","sourceRoot":"","sources":["../../../src/plugins/client/persistence.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAsCzD;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,GAAU,0CAKrC;IACD,WAAW,EAAE,MAAM,CAAA;IACnB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,KAAG,OAAO,CAAC,eAAe,CAoF1B,CAAA"}
|
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
import { debounce } from "@scalar/helpers/general/debounce";
|
|
2
2
|
import { createWorkspaceStorePersistence } from "../../persistence/index.js";
|
|
3
|
+
const pendingFlushes = /* @__PURE__ */ new Set();
|
|
4
|
+
let persistenceLifecycleListenersInitialized = false;
|
|
5
|
+
const runPendingFlushes = () => {
|
|
6
|
+
for (const flush of pendingFlushes) {
|
|
7
|
+
flush();
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
const initializePersistenceLifecycleListeners = () => {
|
|
11
|
+
if (persistenceLifecycleListenersInitialized || typeof window === "undefined" || typeof document === "undefined") {
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
persistenceLifecycleListenersInitialized = true;
|
|
15
|
+
window.addEventListener("pagehide", runPendingFlushes);
|
|
16
|
+
window.addEventListener("beforeunload", runPendingFlushes);
|
|
17
|
+
document.addEventListener("visibilitychange", () => {
|
|
18
|
+
if (document.visibilityState === "hidden") {
|
|
19
|
+
runPendingFlushes();
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
};
|
|
3
23
|
const persistencePlugin = async ({
|
|
4
24
|
workspaceId,
|
|
5
25
|
debounceDelay = 500,
|
|
@@ -7,8 +27,15 @@ const persistencePlugin = async ({
|
|
|
7
27
|
maxWait = 1e4
|
|
8
28
|
}) => {
|
|
9
29
|
const persistence = await createWorkspaceStorePersistence();
|
|
10
|
-
const { execute } = debounce({ delay: debounceDelay, maxWait });
|
|
30
|
+
const { execute, flushAll } = debounce({ delay: debounceDelay, maxWait });
|
|
31
|
+
pendingFlushes.add(flushAll);
|
|
32
|
+
initializePersistenceLifecycleListeners();
|
|
33
|
+
const dispose = () => {
|
|
34
|
+
flushAll();
|
|
35
|
+
pendingFlushes.delete(flushAll);
|
|
36
|
+
};
|
|
11
37
|
return {
|
|
38
|
+
dispose,
|
|
12
39
|
hooks: {
|
|
13
40
|
/**
|
|
14
41
|
* Handles all workspace state change events.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/plugins/client/persistence.ts"],
|
|
4
|
-
"sourcesContent": ["import { debounce } from '@scalar/helpers/general/debounce'\n\nimport { createWorkspaceStorePersistence } from '@/persistence'\nimport type { WorkspacePlugin } from '@/workspace-plugin'\n\n/**\n * Plugin to persist workspace state changes with debounced writes.\n * Each type of change (meta, documentConfigs, documents, etc.) is debounced by key (type + workspaceId + optional documentName).\n * The debounce delay can be customized, defaults to 500ms.\n *\n * This avoids excessive writes to IndexedDB or other persistence layer when changes occur rapidly.\n */\nexport const persistencePlugin = async ({\n workspaceId,\n debounceDelay = 500,\n /** Maximum time in milliseconds to wait before forcing execution, even with continuous calls. */\n maxWait = 10000,\n}: {\n workspaceId: string\n debounceDelay?: number\n maxWait?: number\n}): Promise<WorkspacePlugin> => {\n // Create the persistence instance (e.g., IndexedDB, localForage, etc.)\n const persistence = await createWorkspaceStorePersistence()\n // Debounced execute function for batching similar state changes\n const { execute } = debounce({ delay: debounceDelay, maxWait })\n\n return {\n hooks: {\n /**\n * Handles all workspace state change events.\n * Each write is debounced by a composite key to prevent frequent writes for the same entity.\n */\n onWorkspaceStateChanges(event) {\n // If the event is for workspace meta data, debounce by workspaceId\n if (event.type === 'meta') {\n return execute(`meta-${workspaceId}`, () => persistence.meta.setItem(workspaceId, event.value))\n }\n\n // Debounce per document content and workspace\n if (event.type === 'documents') {\n return execute(`documents-${workspaceId}-${event.documentName}`, () =>\n persistence.documents.setItem(workspaceId, event.documentName, event.value),\n )\n }\n\n // Debounce per intermediate document and workspace\n if (event.type === 'intermediateDocuments') {\n return execute(`intermediateDocuments-${workspaceId}-${event.documentName}`, () =>\n persistence.intermediateDocuments.setItem(workspaceId, event.documentName, event.value),\n )\n }\n\n // Debounce per original document and workspace\n if (event.type === 'originalDocuments') {\n return execute(`originalDocuments-${workspaceId}-${event.documentName}`, () =>\n persistence.originalDocuments.setItem(workspaceId, event.documentName, event.value),\n )\n }\n\n // Debounce per document override and workspace\n if (event.type === 'overrides') {\n return execute(`overrides-${workspaceId}-${event.documentName}`, () =>\n persistence.overrides.setItem(workspaceId, event.documentName, event.value),\n )\n }\n\n // Debounce per document history and workspace\n if (event.type === 'history') {\n return execute(`history-${workspaceId}-${event.documentName}`, () =>\n persistence.history.setItem(workspaceId, event.documentName, event.value),\n )\n }\n\n // Debounce per document auth and workspace\n if (event.type === 'auth') {\n return execute(`auth-${workspaceId}-${event.documentName}`, () =>\n persistence.auth.setItem(workspaceId, event.documentName, event.value),\n )\n }\n\n // Delete document\n if (event.type === 'deleteDocument') {\n return execute(`deleteDocument-${workspaceId}-${event.documentName}`, () =>\n persistence.workspace.deleteDocument(workspaceId, event.documentName),\n )\n }\n\n // No action for other event types\n return\n },\n },\n }\n}\n"],
|
|
5
|
-
"mappings": "AAAA,SAAS,gBAAgB;AAEzB,SAAS,uCAAuC;
|
|
4
|
+
"sourcesContent": ["import { debounce } from '@scalar/helpers/general/debounce'\n\nimport { createWorkspaceStorePersistence } from '@/persistence'\nimport type { WorkspacePlugin } from '@/workspace-plugin'\n\nconst pendingFlushes = new Set<() => void>()\n// Flag to ensure lifecycle event listeners are only initialized once\nlet persistenceLifecycleListenersInitialized = false\n\n/**\n * Runs (calls) all pending flush functions.\n */\nconst runPendingFlushes = (): void => {\n for (const flush of pendingFlushes) {\n flush() // Call the flush function\n }\n}\n\n/**\n * Adds event listeners to ensure flushing on important lifecycle events\n * (like navigation away or page hide). Ensures they're registered only once.\n */\nconst initializePersistenceLifecycleListeners = (): void => {\n // Avoid adding listeners multiple times or during SSR/non-browser environments\n if (persistenceLifecycleListenersInitialized || typeof window === 'undefined' || typeof document === 'undefined') {\n return\n }\n\n persistenceLifecycleListenersInitialized = true\n // Trigger flush on pagehide (browser is unloading or navigating away)\n window.addEventListener('pagehide', runPendingFlushes)\n // Also trigger flush on beforeunload as a fallback\n window.addEventListener('beforeunload', runPendingFlushes)\n // For SPAs: trigger flush when the page goes hidden (such as switching tabs)\n document.addEventListener('visibilitychange', () => {\n if (document.visibilityState === 'hidden') {\n runPendingFlushes()\n }\n })\n}\n\n/**\n * Plugin to persist workspace state changes with debounced writes.\n * Each type of change (meta, documentConfigs, documents, etc.) is debounced by key (type + workspaceId + optional documentName).\n * The debounce delay can be customized, defaults to 500ms.\n *\n * This avoids excessive writes to IndexedDB or other persistence layer when changes occur rapidly.\n */\nexport const persistencePlugin = async ({\n workspaceId,\n debounceDelay = 500,\n /** Maximum time in milliseconds to wait before forcing execution, even with continuous calls. */\n maxWait = 10000,\n}: {\n workspaceId: string\n debounceDelay?: number\n maxWait?: number\n}): Promise<WorkspacePlugin> => {\n // Create the persistence instance (e.g., IndexedDB, localForage, etc.)\n const persistence = await createWorkspaceStorePersistence()\n // Debounced execute function for batching similar state changes\n const { execute, flushAll } = debounce({ delay: debounceDelay, maxWait })\n\n pendingFlushes.add(flushAll)\n initializePersistenceLifecycleListeners()\n\n const dispose = (): void => {\n // Flush any pending writes and clear timers before removing from the set.\n // Otherwise pending data can be lost if the workspace is torn down and a\n // lifecycle event (e.g. pagehide) never fires or fires after the callback was removed.\n flushAll()\n pendingFlushes.delete(flushAll)\n }\n\n return {\n dispose,\n hooks: {\n /**\n * Handles all workspace state change events.\n * Each write is debounced by a composite key to prevent frequent writes for the same entity.\n */\n onWorkspaceStateChanges(event) {\n // If the event is for workspace meta data, debounce by workspaceId\n if (event.type === 'meta') {\n return execute(`meta-${workspaceId}`, () => persistence.meta.setItem(workspaceId, event.value))\n }\n\n // Debounce per document content and workspace\n if (event.type === 'documents') {\n return execute(`documents-${workspaceId}-${event.documentName}`, () =>\n persistence.documents.setItem(workspaceId, event.documentName, event.value),\n )\n }\n\n // Debounce per intermediate document and workspace\n if (event.type === 'intermediateDocuments') {\n return execute(`intermediateDocuments-${workspaceId}-${event.documentName}`, () =>\n persistence.intermediateDocuments.setItem(workspaceId, event.documentName, event.value),\n )\n }\n\n // Debounce per original document and workspace\n if (event.type === 'originalDocuments') {\n return execute(`originalDocuments-${workspaceId}-${event.documentName}`, () =>\n persistence.originalDocuments.setItem(workspaceId, event.documentName, event.value),\n )\n }\n\n // Debounce per document override and workspace\n if (event.type === 'overrides') {\n return execute(`overrides-${workspaceId}-${event.documentName}`, () =>\n persistence.overrides.setItem(workspaceId, event.documentName, event.value),\n )\n }\n\n // Debounce per document history and workspace\n if (event.type === 'history') {\n return execute(`history-${workspaceId}-${event.documentName}`, () =>\n persistence.history.setItem(workspaceId, event.documentName, event.value),\n )\n }\n\n // Debounce per document auth and workspace\n if (event.type === 'auth') {\n return execute(`auth-${workspaceId}-${event.documentName}`, () =>\n persistence.auth.setItem(workspaceId, event.documentName, event.value),\n )\n }\n\n // Delete document\n if (event.type === 'deleteDocument') {\n return execute(`deleteDocument-${workspaceId}-${event.documentName}`, () =>\n persistence.workspace.deleteDocument(workspaceId, event.documentName),\n )\n }\n\n // No action for other event types\n return\n },\n },\n }\n}\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,gBAAgB;AAEzB,SAAS,uCAAuC;AAGhD,MAAM,iBAAiB,oBAAI,IAAgB;AAE3C,IAAI,2CAA2C;AAK/C,MAAM,oBAAoB,MAAY;AACpC,aAAW,SAAS,gBAAgB;AAClC,UAAM;AAAA,EACR;AACF;AAMA,MAAM,0CAA0C,MAAY;AAE1D,MAAI,4CAA4C,OAAO,WAAW,eAAe,OAAO,aAAa,aAAa;AAChH;AAAA,EACF;AAEA,6CAA2C;AAE3C,SAAO,iBAAiB,YAAY,iBAAiB;AAErD,SAAO,iBAAiB,gBAAgB,iBAAiB;AAEzD,WAAS,iBAAiB,oBAAoB,MAAM;AAClD,QAAI,SAAS,o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MAAM,YAAY;AAAA,YAAI,MAC/D,YAAY,UAAU,QAAQ,aAAa,MAAM,cAAc,MAAM,KAAK;AAAA,UAC5E;AAAA,QACF;AAGA,YAAI,MAAM,SAAS,WAAW;AAC5B,iBAAO;AAAA,YAAQ,WAAW,WAAW,IAAI,MAAM,YAAY;AAAA,YAAI,MAC7D,YAAY,QAAQ,QAAQ,aAAa,MAAM,cAAc,MAAM,KAAK;AAAA,UAC1E;AAAA,QACF;AAGA,YAAI,MAAM,SAAS,QAAQ;AACzB,iBAAO;AAAA,YAAQ,QAAQ,WAAW,IAAI,MAAM,YAAY;AAAA,YAAI,MAC1D,YAAY,KAAK,QAAQ,aAAa,MAAM,cAAc,MAAM,KAAK;AAAA,UACvE;AAAA,QACF;AAGA,YAAI,MAAM,SAAS,kBAAkB;AACnC,iBAAO;AAAA,YAAQ,kBAAkB,WAAW,IAAI,MAAM,YAAY;AAAA,YAAI,MACpE,YAAY,UAAU,eAAe,aAAa,MAAM,YAAY;AAAA,UACtE;AAAA,QACF;AAGA;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -741,6 +741,16 @@ export declare const InMemoryWorkspaceSchema: import("@scalar/typebox").TObject<
|
|
|
741
741
|
}>]>, import("@scalar/typebox").TObject<{
|
|
742
742
|
'$ref-value': import("@scalar/typebox").TUnknown;
|
|
743
743
|
}>]>]>>>;
|
|
744
|
+
propertyNames: import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TRef<"SchemaObject">, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
745
|
+
$ref: import("@scalar/typebox").TString;
|
|
746
|
+
summary: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
747
|
+
description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
748
|
+
}>, import("@scalar/typebox").TObject<{
|
|
749
|
+
$status: import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TLiteral<"loading">, import("@scalar/typebox").TLiteral<"error">]>>;
|
|
750
|
+
$global: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
751
|
+
}>]>, import("@scalar/typebox").TObject<{
|
|
752
|
+
'$ref-value': import("@scalar/typebox").TUnknown;
|
|
753
|
+
}>]>]>>;
|
|
744
754
|
}>, import("@scalar/typebox").TObject<{
|
|
745
755
|
name: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
746
756
|
title: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
@@ -2374,6 +2384,16 @@ export declare const InMemoryWorkspaceSchema: import("@scalar/typebox").TObject<
|
|
|
2374
2384
|
}>]>, import("@scalar/typebox").TObject<{
|
|
2375
2385
|
'$ref-value': import("@scalar/typebox").TUnknown;
|
|
2376
2386
|
}>]>]>>>;
|
|
2387
|
+
propertyNames: import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TRef<"SchemaObject">, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
2388
|
+
$ref: import("@scalar/typebox").TString;
|
|
2389
|
+
summary: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
2390
|
+
description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
2391
|
+
}>, import("@scalar/typebox").TObject<{
|
|
2392
|
+
$status: import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TLiteral<"loading">, import("@scalar/typebox").TLiteral<"error">]>>;
|
|
2393
|
+
$global: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
2394
|
+
}>]>, import("@scalar/typebox").TObject<{
|
|
2395
|
+
'$ref-value': import("@scalar/typebox").TUnknown;
|
|
2396
|
+
}>]>]>>;
|
|
2377
2397
|
}>, import("@scalar/typebox").TObject<{
|
|
2378
2398
|
name: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
2379
2399
|
title: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
@@ -3778,6 +3798,16 @@ export declare const InMemoryWorkspaceSchema: import("@scalar/typebox").TObject<
|
|
|
3778
3798
|
}>]>, import("@scalar/typebox").TObject<{
|
|
3779
3799
|
'$ref-value': import("@scalar/typebox").TUnknown;
|
|
3780
3800
|
}>]>]>>>;
|
|
3801
|
+
propertyNames: import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TRef<"SchemaObject">, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
3802
|
+
$ref: import("@scalar/typebox").TString;
|
|
3803
|
+
summary: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
3804
|
+
description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
3805
|
+
}>, import("@scalar/typebox").TObject<{
|
|
3806
|
+
$status: import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TLiteral<"loading">, import("@scalar/typebox").TLiteral<"error">]>>;
|
|
3807
|
+
$global: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
3808
|
+
}>]>, import("@scalar/typebox").TObject<{
|
|
3809
|
+
'$ref-value': import("@scalar/typebox").TUnknown;
|
|
3810
|
+
}>]>]>>;
|
|
3781
3811
|
}>, import("@scalar/typebox").TObject<{
|
|
3782
3812
|
name: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
3783
3813
|
title: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inmemory-workspace.d.ts","sourceRoot":"","sources":["../../src/schemas/inmemory-workspace.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAsB,MAAM,wBAAwB,CA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M,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAA;IAC1D,qBAAqB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAA;IAC9D,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC9B,OAAO,EAAE,eAAe,CAAA;IACxB,IAAI,EAAE,YAAY,CAAA;CACnB,CAAA"}
|
|
@@ -716,6 +716,16 @@ export declare const ReferenceConfigSchema: import("@scalar/typebox").TObject<{
|
|
|
716
716
|
}>]>, import("@scalar/typebox").TObject<{
|
|
717
717
|
'$ref-value': import("@scalar/typebox").TUnknown;
|
|
718
718
|
}>]>]>>>;
|
|
719
|
+
propertyNames: import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TRef<"SchemaObject">, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
720
|
+
$ref: import("@scalar/typebox").TString;
|
|
721
|
+
summary: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
722
|
+
description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
723
|
+
}>, import("@scalar/typebox").TObject<{
|
|
724
|
+
$status: import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[TLiteral<"loading">, TLiteral<"error">]>>;
|
|
725
|
+
$global: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
726
|
+
}>]>, import("@scalar/typebox").TObject<{
|
|
727
|
+
'$ref-value': import("@scalar/typebox").TUnknown;
|
|
728
|
+
}>]>]>>;
|
|
719
729
|
}>, import("@scalar/typebox").TObject<{
|
|
720
730
|
name: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
721
731
|
title: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/schemas/reference-config/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,QAAQ,EAAQ,MAAM,iBAAiB,CAAA;AAClE,OAAO,EAA2C,KAAK,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AACvG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAE7C,OAAO,EAAE,KAAK,UAAU,EAAuC,MAAM,cAAc,CAAA;AACnF,OAAO,EAAE,KAAK,QAAQ,EAAmC,MAAM,YAAY,CAAA;AAC3E,OAAO,EAAE,KAAK,IAAI,EAA2B,MAAM,QAAQ,CAAA;AAC3D,OAAO,EAAE,KAAK,OAAO,EAAiC,MAAM,WAAW,CAAA;AACvE,OAAO,EAAE,KAAK,QAAQ,EAAmC,MAAM,YAAY,CAAA;AAE3E;;;;GAIG;AACH,eAAO,MAAM,qBAAqB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/schemas/reference-config/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,QAAQ,EAAQ,MAAM,iBAAiB,CAAA;AAClE,OAAO,EAA2C,KAAK,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AACvG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAE7C,OAAO,EAAE,KAAK,UAAU,EAAuC,MAAM,cAAc,CAAA;AACnF,OAAO,EAAE,KAAK,QAAQ,EAAmC,MAAM,YAAY,CAAA;AAC3E,OAAO,EAAE,KAAK,IAAI,EAA2B,MAAM,QAAQ,CAAA;AAC3D,OAAO,EAAE,KAAK,OAAO,EAAiC,MAAM,WAAW,CAAA;AACvE,OAAO,EAAE,KAAK,QAAQ,EAAmC,MAAM,YAAY,CAAA;AAE3E;;;;GAIG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqBjC,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,QAAQ,CAAA;IACnB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,UAAU,CAAC,EAAE,UAAU,CAAA;IACvB,QAAQ,CAAC,EAAE,QAAQ,CAAA;IACnB,IAAI,CAAC,EAAE,IAAI,CAAA;IACX,WAAW,CAAC,EAAE,gBAAgB,CAAA;CAC/B,CAAA;AAED,eAAO,MAAM,sBAAsB,EAAE,YAAY,CAAC,eAAe,CAgChE,CAAA"}
|
|
@@ -702,6 +702,16 @@ export declare const SettingsSchema: import("@scalar/typebox").TObject<{
|
|
|
702
702
|
}>]>, import("@scalar/typebox").TObject<{
|
|
703
703
|
'$ref-value': import("@scalar/typebox").TUnknown;
|
|
704
704
|
}>]>]>>>;
|
|
705
|
+
propertyNames: import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TRef<"SchemaObject">, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
706
|
+
$ref: import("@scalar/typebox").TString;
|
|
707
|
+
summary: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
708
|
+
description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
709
|
+
}>, import("@scalar/typebox").TObject<{
|
|
710
|
+
$status: import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TLiteral<"loading">, import("@scalar/typebox").TLiteral<"error">]>>;
|
|
711
|
+
$global: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
712
|
+
}>]>, import("@scalar/typebox").TObject<{
|
|
713
|
+
'$ref-value': import("@scalar/typebox").TUnknown;
|
|
714
|
+
}>]>]>>;
|
|
705
715
|
}>, import("@scalar/typebox").TObject<{
|
|
706
716
|
name: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
707
717
|
title: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../src/schemas/reference-config/settings.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAG7C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAEhE,eAAO,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../src/schemas/reference-config/settings.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAG7C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAEhE,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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