@scalar/workspace-store 0.2.0 → 0.3.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/.turbo/turbo-build.log +6 -3
- package/CHANGELOG.md +12 -0
- package/dist/client.d.ts +41211 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/{create-workspace-store.js → client.js} +15 -30
- package/dist/client.js.map +7 -0
- package/dist/schemas.d.ts +2 -0
- package/dist/schemas.d.ts.map +1 -0
- package/dist/schemas.js +9 -0
- package/dist/schemas.js.map +7 -0
- package/dist/{create-server-workspace-store.d.ts → server.d.ts} +1 -1
- package/dist/server.d.ts.map +1 -0
- package/dist/{create-server-workspace-store.js → server.js} +1 -1
- package/dist/{create-server-workspace-store.js.map → server.js.map} +3 -3
- package/esbuild.ts +4 -2
- package/package.json +18 -8
- package/src/{create-workspace-store.test.ts → client.test.ts} +2 -82
- package/src/{create-workspace-store.ts → client.ts} +45 -40
- package/src/schemas.ts +6 -0
- package/src/{create-server-workspace-store.test.ts → server.test.ts} +1 -1
- package/dist/create-server-workspace-store.d.ts.map +0 -1
- package/dist/create-workspace-store.d.ts +0 -20605
- package/dist/create-workspace-store.d.ts.map +0 -1
- package/dist/create-workspace-store.js.map +0 -7
- package/dist/index.d.ts +0 -4
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -13
- package/dist/index.js.map +0 -7
- package/src/index.ts +0 -8
- package/src/{create-server-workspace-store.ts → server.ts} +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,qBAAqB,EAAa,MAAM,4BAA4B,CAAA;AAOjG,KAAK,0BAA0B,GAAG;IAAE,IAAI,CAAC,EAAE,qBAAqB,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAA;AAChF,KAAK,sBAAsB,GACvB,CAAC;IAAE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;;;;;;;;;OAiBG;yBACwB,sBAAsB;GAqDpD"}
|
|
@@ -3,44 +3,20 @@ import { createMagicProxy } from "./helpers/proxy.js";
|
|
|
3
3
|
import { isObject } from "./helpers/general.js";
|
|
4
4
|
import { getValueByPath } from "./helpers/json-path-utils.js";
|
|
5
5
|
import { bundle } from "@scalar/openapi-parser";
|
|
6
|
-
import { readFiles } from "@scalar/openapi-parser/utils/bundle/plugins/read-files";
|
|
7
6
|
import { fetchUrls } from "@scalar/openapi-parser/utils/bundle/plugins/fetch-urls";
|
|
8
7
|
async function loadDocument(workspaceDocument) {
|
|
9
8
|
if ("url" in workspaceDocument) {
|
|
10
9
|
return fetchUrls().exec(workspaceDocument.url);
|
|
11
10
|
}
|
|
12
|
-
if ("path" in workspaceDocument) {
|
|
13
|
-
return readFiles().exec(workspaceDocument.path);
|
|
14
|
-
}
|
|
15
11
|
return {
|
|
16
12
|
ok: true,
|
|
17
13
|
data: workspaceDocument.document
|
|
18
14
|
};
|
|
19
15
|
}
|
|
20
|
-
|
|
16
|
+
function createWorkspaceStoreSync(workspaceProps) {
|
|
21
17
|
const workspace = reactive({
|
|
22
18
|
...workspaceProps?.meta,
|
|
23
|
-
documents:
|
|
24
|
-
(workspaceProps?.documents ?? []).map(async (data) => {
|
|
25
|
-
const resolved = await loadDocument(data);
|
|
26
|
-
if (!resolved.ok) {
|
|
27
|
-
console.error(`Can not load the document '${data.name}'`);
|
|
28
|
-
return {
|
|
29
|
-
name: data.name,
|
|
30
|
-
meta: data.meta,
|
|
31
|
-
document: {}
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
return {
|
|
35
|
-
name: data.name,
|
|
36
|
-
meta: data.meta,
|
|
37
|
-
document: isObject(resolved.data) ? resolved.data : {}
|
|
38
|
-
};
|
|
39
|
-
})
|
|
40
|
-
)).reduce((acc, { name, meta, document }) => {
|
|
41
|
-
acc[name] = createMagicProxy({ ...document, ...meta });
|
|
42
|
-
return acc;
|
|
43
|
-
}, {}),
|
|
19
|
+
documents: {},
|
|
44
20
|
/**
|
|
45
21
|
* Returns the currently active document from the workspace.
|
|
46
22
|
* The active document is determined by the 'x-scalar-active-document' metadata field,
|
|
@@ -94,7 +70,7 @@ async function createWorkspaceStore(workspaceProps) {
|
|
|
94
70
|
* updateDocument('document-name', 'x-scalar-active-auth', 'Bearer')
|
|
95
71
|
*/
|
|
96
72
|
updateDocument(name, key, value) {
|
|
97
|
-
const currentDocument = workspace.documents[name === "active" ? workspace["x-scalar-active-document"] ??
|
|
73
|
+
const currentDocument = workspace.documents[name === "active" ? workspace["x-scalar-active-document"] ?? Object.keys(workspace.documents)[0] ?? "" : name];
|
|
98
74
|
if (!currentDocument) {
|
|
99
75
|
throw "Please select a valid document";
|
|
100
76
|
}
|
|
@@ -123,7 +99,7 @@ async function createWorkspaceStore(workspaceProps) {
|
|
|
123
99
|
return bundle(target, {
|
|
124
100
|
root: activeDocument,
|
|
125
101
|
treeShake: false,
|
|
126
|
-
plugins: [fetchUrls()
|
|
102
|
+
plugins: [fetchUrls()],
|
|
127
103
|
urlMap: false,
|
|
128
104
|
hooks: {
|
|
129
105
|
onResolveStart: (node) => {
|
|
@@ -159,13 +135,22 @@ async function createWorkspaceStore(workspaceProps) {
|
|
|
159
135
|
const resolve = await loadDocument(input);
|
|
160
136
|
if (!resolve.ok || !isObject(resolve.data)) {
|
|
161
137
|
console.error(`Can not load the document '${name}'`);
|
|
138
|
+
workspace.documents[name] = {
|
|
139
|
+
...meta
|
|
140
|
+
};
|
|
162
141
|
return;
|
|
163
142
|
}
|
|
164
143
|
workspace.documents[name] = createMagicProxy({ ...resolve.data, ...meta });
|
|
165
144
|
}
|
|
166
145
|
};
|
|
167
146
|
}
|
|
147
|
+
async function createWorkspaceStore(workspaceProps) {
|
|
148
|
+
const store = createWorkspaceStoreSync({ meta: workspaceProps?.meta });
|
|
149
|
+
await Promise.all(workspaceProps?.documents?.map((it) => store.addDocument(it)) ?? []);
|
|
150
|
+
return store;
|
|
151
|
+
}
|
|
168
152
|
export {
|
|
169
|
-
createWorkspaceStore
|
|
153
|
+
createWorkspaceStore,
|
|
154
|
+
createWorkspaceStoreSync
|
|
170
155
|
};
|
|
171
|
-
//# sourceMappingURL=
|
|
156
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/client.ts"],
|
|
4
|
+
"sourcesContent": ["import { reactive, toRaw } from 'vue'\nimport type { WorkspaceMeta, WorkspaceDocumentMeta, Workspace } from './schemas/server-workspace'\nimport { createMagicProxy } from './helpers/proxy'\nimport { isObject } from '@/helpers/general'\nimport { getValueByPath } from '@/helpers/json-path-utils'\nimport { bundle } from '@scalar/openapi-parser'\nimport { fetchUrls } from '@scalar/openapi-parser/utils/bundle/plugins/fetch-urls'\n\ntype WorkspaceDocumentMetaInput = { meta?: WorkspaceDocumentMeta; name: string }\ntype WorkspaceDocumentInput =\n | ({ document: Record<string, unknown> } & WorkspaceDocumentMetaInput)\n | ({ url: string } & WorkspaceDocumentMetaInput)\n\n/**\n * Resolves a workspace document from various input sources (URL, local file, or direct document object).\n *\n * @param workspaceDocument - The document input to resolve, which can be:\n * - A URL to fetch the document from\n * - A local file path to read the document from\n * - A direct document object\n * @returns A promise that resolves to an object containing:\n * - ok: boolean indicating if the resolution was successful\n * - data: The resolved document data\n *\n * @example\n * // Resolve from URL\n * const urlDoc = await loadDocument({ name: 'api', url: 'https://api.example.com/openapi.json' })\n *\n * // Resolve from local file\n * const fileDoc = await loadDocument({ name: 'local', path: './openapi.json' })\n *\n * // Resolve direct document\n * const directDoc = await loadDocument({\n * name: 'inline',\n * document: { openapi: '3.0.0', paths: {} }\n * })\n */\nasync function loadDocument(workspaceDocument: WorkspaceDocumentInput) {\n if ('url' in workspaceDocument) {\n return fetchUrls().exec(workspaceDocument.url)\n }\n\n return {\n ok: true as const,\n data: workspaceDocument.document,\n }\n}\n\n/**\n * Creates a reactive workspace store that manages documents and their metadata.\n * The store provides functionality for accessing, updating, and resolving document references.\n *\n * @param workspaceProps - Configuration object for the workspace\n * @param workspaceProps.meta - Optional metadata for the workspace\n * @param workspaceProps.documents - Optional record of documents to initialize the workspace with\n * @returns An object containing methods and getters for managing the workspace\n * @deprecated Use `createWorkspaceStore` instead.\n */\nexport function createWorkspaceStoreSync(workspaceProps?: {\n meta?: WorkspaceMeta\n}) {\n // Create a reactive workspace object with proxied documents\n // Each document is wrapped in a proxy to enable reactive updates and reference resolution\n const workspace = reactive({\n ...workspaceProps?.meta,\n documents: {},\n /**\n * Returns the currently active document from the workspace.\n * The active document is determined by the 'x-scalar-active-document' metadata field,\n * falling back to the first document in the workspace if no active document is specified.\n *\n * @returns The active document or undefined if no document is found\n */\n get activeDocument(): (typeof workspace.documents)[number] | undefined {\n const activeDocumentKey = workspace['x-scalar-active-document'] ?? Object.keys(workspace.documents)[0] ?? ''\n return workspace.documents[activeDocumentKey]\n },\n }) as Workspace\n\n // Cache to track visited nodes during reference resolution to prevent bundling the same subtree multiple times\n // This is needed because we are doing partial bundle operations\n const visitedNodesCache = new Set()\n\n return {\n /**\n * Returns the raw (non-reactive) workspace object\n */\n get rawWorkspace() {\n return toRaw(workspace)\n },\n /**\n * Returns the reactive workspace object with an additional activeDocument getter\n */\n get workspace() {\n return workspace\n },\n /**\n * Updates a specific metadata field in the workspace\n * @param key - The metadata field to update\n * @param value - The new value for the field\n * @example\n * // Update the workspace title\n * update('x-scalar-active-document', 'document-name')\n */\n update<K extends keyof WorkspaceMeta>(key: K, value: WorkspaceMeta[K]) {\n // @ts-ignore\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n throw new Error('Invalid key: cannot modify prototype')\n }\n Object.assign(workspace, { [key]: value })\n },\n /**\n * Updates a specific metadata field in a document\n * @param name - The name of the document to update ('active' or a specific document name)\n * @param key - The metadata field to update\n * @param value - The new value for the field\n * @throws Error if the specified document doesn't exist\n * @example\n * // Update the auth of the active document\n * updateDocument('active', 'x-scalar-active-auth', 'Bearer')\n * // Update the auth of a specific document\n * updateDocument('document-name', 'x-scalar-active-auth', 'Bearer')\n */\n updateDocument<K extends keyof WorkspaceDocumentMeta>(\n name: 'active' | (string & {}),\n key: K,\n value: WorkspaceDocumentMeta[K],\n ) {\n const currentDocument =\n workspace.documents[\n name === 'active'\n ? (workspace['x-scalar-active-document'] ?? Object.keys(workspace.documents)[0] ?? '')\n : name\n ]\n\n if (!currentDocument) {\n throw 'Please select a valid document'\n }\n\n Object.assign(currentDocument, { [key]: value })\n },\n /**\n * Resolves a reference in the active document by following the provided path and resolving any external $ref references.\n * This method traverses the document structure following the given path and resolves any $ref references it encounters.\n * During resolution, it sets a loading status and updates the reference with the resolved content.\n *\n * @param path - Array of strings representing the path to the reference (e.g. ['paths', '/users', 'get', 'responses', '200'])\n * @throws Error if the path is invalid or empty\n * @example\n * // Resolve a reference in the active document\n * resolve(['paths', '/users', 'get', 'responses', '200'])\n */\n resolve: async (path: string[]) => {\n const activeDocument = workspace.activeDocument\n\n const target = getValueByPath(activeDocument, path)\n\n if (!isObject(target)) {\n console.error(\n `Invalid path provided for resolution. Path: [${path.join(', ')}]. Found value of type: ${typeof target}. Expected an object.`,\n )\n return\n }\n\n // Bundle the target document with the active document as root, resolving any external references\n // and tracking resolution status through hooks\n return bundle(target, {\n root: activeDocument,\n treeShake: false,\n plugins: [fetchUrls()],\n urlMap: false,\n hooks: {\n onResolveStart: (node) => {\n node['$status'] = 'loading'\n },\n onResolveError: (node) => {\n node['$status'] = 'error'\n },\n },\n visitedNodes: visitedNodesCache,\n })\n },\n /**\n * Adds a new document to the workspace\n * @param document - The document content to add. This should be a valid OpenAPI/Swagger document or other supported format\n * @param meta - Metadata for the document, including its name and other properties defined in WorkspaceDocumentMeta\n * @example\n * // Add a new OpenAPI document to the workspace\n * store.addDocument({\n * name: 'name',\n * document: {\n * openapi: '3.0.0',\n * info: { title: 'title' },\n * },\n * meta: {\n * 'x-scalar-active-auth': 'Bearer',\n * 'x-scalar-active-server': 'production'\n * }\n * })\n */\n addDocument: async (input: WorkspaceDocumentInput) => {\n const { name, meta } = input\n\n const resolve = await loadDocument(input)\n\n if (!resolve.ok || !isObject(resolve.data)) {\n console.error(`Can not load the document '${name}'`)\n workspace.documents[name] = {\n ...meta,\n }\n return\n }\n\n workspace.documents[name] = createMagicProxy({ ...(resolve.data as Record<string, unknown>), ...meta })\n },\n }\n}\n\n/**\n * Creates a reactive workspace store that manages documents and their metadata.\n * The store provides functionality for accessing, updating, and resolving document references.\n *\n * @param workspaceProps - Configuration object for the workspace\n * @param workspaceProps.meta - Optional metadata for the workspace\n * @param workspaceProps.documents - Optional record of documents to initialize the workspace with\n * @returns An object containing methods and getters for managing the workspace\n * @example\n * // Create a workspace store with metadata and documents\n * const store = await createWorkspaceStore({\n * meta: {\n * name: 'My Workspace',\n * description: 'A workspace for my API'\n * },\n * documents: [\n * {\n * name: 'petstore',\n * document: {\n * openapi: '3.0.0',\n * info: { title: 'Petstore API' }\n * }\n * }\n * ]\n * })\n */\nexport async function createWorkspaceStore(workspaceProps?: {\n meta?: WorkspaceMeta\n documents?: WorkspaceDocumentInput[]\n}) {\n const store = createWorkspaceStoreSync({ meta: workspaceProps?.meta })\n\n await Promise.all(workspaceProps?.documents?.map((it) => store.addDocument(it)) ?? [])\n\n return store\n}\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,UAAU,aAAa;AAEhC,SAAS,wBAAwB;AACjC,SAAS,gBAAgB;AACzB,SAAS,sBAAsB;AAC/B,SAAS,cAAc;AACvB,SAAS,iBAAiB;AA+B1B,eAAe,aAAa,mBAA2C;AACrE,MAAI,SAAS,mBAAmB;AAC9B,WAAO,UAAU,EAAE,KAAK,kBAAkB,GAAG;AAAA,EAC/C;AAEA,SAAO;AAAA,IACL,IAAI;AAAA,IACJ,MAAM,kBAAkB;AAAA,EAC1B;AACF;AAYO,SAAS,yBAAyB,gBAEtC;AAGD,QAAM,YAAY,SAAS;AAAA,IACzB,GAAG,gBA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sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,KAAK,SAAS,EACd,uBAAuB,EACvB,KAAK,iBAAiB,GACvB,MAAM,4BAA4B,CAAA"}
|
package/dist/schemas.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/schemas.ts"],
|
|
4
|
+
"sourcesContent": ["export {\n WorkspaceSchema,\n type Workspace,\n WorkspaceDocumentSchema,\n type WorkspaceDocument,\n} from './schemas/server-workspace'\n"],
|
|
5
|
+
"mappings": "AAAA;AAAA,EACE;AAAA,EAEA;AAAA,OAEK;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAExD,OAAO,KAAK,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAKtF,eAAO,MAAM,mBAAmB,0BAA0B,CAAA;AAE1D,KAAK,0BAA0B,GAC3B;IACE,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,EAAE,QAAQ,CAAA;IACd,SAAS,EAAE;QACT,IAAI,EAAE,MAAM,CAAA;QACZ,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAA;QAC1C,IAAI,CAAC,EAAE,qBAAqB,CAAA;KAC7B,EAAE,CAAA;IACH,IAAI,CAAC,EAAE,aAAa,CAAA;CACrB,GACD;IACE,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,KAAK,CAAA;IACX,SAAS,EAAE;QACT,IAAI,EAAE,MAAM,CAAA;QACZ,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAA;QAC1C,I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
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../src/
|
|
4
|
-
"sourcesContent": ["import { escapeJsonPointer, upgrade } from '@scalar/openapi-parser'\nimport type { OpenAPIV3_1 } from '@scalar/openapi-types'\nimport { getValueByPath, parseJsonPointer } from './helpers/json-path-utils'\nimport fs from 'node:fs/promises'\nimport { cwd } from 'node:process'\nimport type { WorkspaceDocumentMeta, WorkspaceMeta } from './schemas/server-workspace'\n\nconst DEFAULT_ASSETS_FOLDER = 'assets'\nexport const WORKSPACE_FILE_NAME = 'scalar-workspace.json'\n\ntype CreateServerWorkspaceStore =\n | {\n directory?: string\n mode: 'static'\n documents: {\n name: string\n document: Record<string, unknown> | string\n meta?: WorkspaceDocumentMeta\n }[]\n meta?: WorkspaceMeta\n }\n | {\n baseUrl: string\n mode: 'ssr'\n documents: {\n name: string\n document: Record<string, unknown> | string\n meta?: WorkspaceDocumentMeta\n }[]\n meta?: WorkspaceMeta\n }\n\nconst httpMethods = new Set(['get', 'put', 'post', 'delete', 'options', 'head', 'patch', 'trace'])\n\n/**\n * Filters an OpenAPI PathsObject to only include standard HTTP methods.\n * Removes any vendor extensions or other non-HTTP properties.\n *\n * @param paths - The OpenAPI PathsObject to filter\n * @returns A new PathsObject containing only standard HTTP methods\n *\n * @example\n * Input: {\n * \"/users\": {\n * \"get\": {...},\n * \"x-custom\": {...},\n * \"post\": {...}\n * }\n * }\n * Output: {\n * \"/users\": {\n * \"get\": {...},\n * \"post\": {...}\n * }\n * }\n */\nexport function filterHttpMethodsOnly(paths: OpenAPIV3_1.PathsObject) {\n const result: OpenAPIV3_1.PathsObject = {}\n\n for (const [path, methods] of Object.entries(paths)) {\n if (!methods) {\n continue\n }\n\n const filteredMethods: Record<string, any> = {}\n\n for (const [method, operation] of Object.entries(methods)) {\n if (httpMethods.has(method.toLowerCase())) {\n filteredMethods[method] = operation\n }\n }\n\n if (Object.keys(filteredMethods).length > 0) {\n result[path] = filteredMethods\n }\n }\n\n return result\n}\n\n/**\n * Escapes path keys in an OpenAPI PathsObject to be JSON Pointer compatible.\n * This is necessary because OpenAPI paths can contain characters that need to be escaped\n * when used as JSON Pointer references (like '/' and '~').\n *\n * @example\n * Input: { \"/users/{id}\": { ... } }\n * Output: { \"/users~1{id}\": { ... } }\n */\nexport function escapePaths(paths: OpenAPIV3_1.PathsObject) {\n const result: OpenAPIV3_1.PathsObject = {}\n Object.keys(paths).forEach((path) => {\n result[escapeJsonPointer(path)] = paths[path]\n })\n\n return result\n}\n\n/**\n * Externalizes components by turning them into refs.\n */\nexport function externalizeComponentReferences(\n document: OpenAPIV3_1.Document,\n meta: { mode: 'ssr'; name: string; baseUrl: string } | { mode: 'static'; name: string; directory: string },\n) {\n const result: Record<string, any> = {}\n\n if (!document.components) {\n return result\n }\n\n Object.entries(document.components).forEach(([type, component]) => {\n result[type] = {}\n Object.keys(component).forEach((name) => {\n const ref =\n meta.mode === 'ssr'\n ? `${meta.baseUrl}/${meta.name}/components/${type}/${name}#`\n : `${meta.directory}/chunks/${meta.name}/components/${type}/${name}.json#`\n\n result[type][name] = { '$ref': ref, $global: true }\n })\n })\n\n return result\n}\n\n/**\n * Externalizes paths operations by turning them into refs.\n */\nexport function externalizePathReferences(\n document: OpenAPIV3_1.Document,\n meta: { mode: 'ssr'; name: string; baseUrl: string } | { mode: 'static'; name: string; directory: string },\n) {\n const result: Record<string, any> = {}\n\n if (!document.paths) {\n return result\n }\n\n Object.entries(document.paths).forEach(([path, pathItem]) => {\n if (!pathItem) {\n return result\n }\n\n result[path] = {}\n\n const escapedPath = escapeJsonPointer(path)\n\n Object.keys(pathItem).forEach((type) => {\n if (httpMethods.has(type)) {\n const ref =\n meta.mode === 'ssr'\n ? `${meta.baseUrl}/${meta.name}/operations/${escapedPath}/${type}#`\n : `${meta.directory}/chunks/${meta.name}/operations/${escapedPath}/${type}.json#`\n\n result[path][type] = { '$ref': ref, $global: true }\n } else {\n result[path][type] = pathItem[type]\n }\n })\n })\n\n return result\n}\n\n/**\n * Create server state workspace store\n */\nexport function createServerWorkspaceStore(workspaceProps: CreateServerWorkspaceStore) {\n const documents = workspaceProps.documents.map((el) => {\n const document = upgrade(el.document).specification\n\n return { ...el, document }\n })\n\n /**\n * A map of document chunks that can be loaded asynchronously by the client.\n * Each document is split into components and operations to enable lazy loading.\n * The keys are document names and values contain the components and operations\n * for that document.\n */\n const assets = documents.reduce<\n Record<string, { components?: OpenAPIV3_1.ComponentsObject; operations?: Record<string, unknown> }>\n >((acc, { name, document }) => {\n acc[name] = {\n components: document.components,\n operations: document.paths && escapePaths(filterHttpMethodsOnly(document.paths)),\n }\n return acc\n }, {})\n\n /**\n * Base workspace document containing essential metadata and document references.\n *\n * This workspace document provides the minimal information needed for initial rendering.\n * All components and path operations are replaced with references to enable lazy loading.\n *\n * In SSR mode, references point to API endpoints.\n * In static mode, references point to filesystem chunks.\n */\n const workspace = {\n ...workspaceProps.meta,\n documents: documents.reduce<Record<string, Record<string, unknown>>>((acc, { name, document, meta }) => {\n const options =\n workspaceProps.mode === 'ssr'\n ? { mode: workspaceProps.mode, name, baseUrl: workspaceProps.baseUrl }\n : { mode: workspaceProps.mode, name, directory: workspaceProps.directory ?? DEFAULT_ASSETS_FOLDER }\n\n // Transform the original document by setting all the components and paths operations on refs\n const components = externalizeComponentReferences(document, options)\n const paths = externalizePathReferences(document, options)\n\n acc[name] = { ...meta, ...document, components, paths }\n return acc\n }, {}),\n }\n\n return {\n /**\n * Generates workspace chunks by writing components and operations to the filesystem.\n *\n * This method is only available in static mode. It creates a directory structure containing:\n * - A workspace file with metadata and document references\n * - Component chunks split by type (schemas, parameters, etc)\n * - Operation chunks split by path and HTTP method\n *\n * The generated workspace references will be relative file paths pointing to these chunks.\n *\n * @throws {Error} If called when mode is not 'static'\n */\n generateWorkspaceChunks: async () => {\n if (workspaceProps.mode !== 'static') {\n throw 'Mode has to be set to `static` to generate filesystem workspace chunks'\n }\n\n // Write the workspace document\n const basePath = `${cwd()}/${workspaceProps.directory ?? DEFAULT_ASSETS_FOLDER}`\n await fs.mkdir(basePath, { recursive: true })\n\n // Write the workspace contents on the file system\n await fs.writeFile(`${basePath}/${WORKSPACE_FILE_NAME}`, JSON.stringify(workspace))\n\n // Write the chunks\n for (const [name, { components, operations }] of Object.entries(assets)) {\n // Write the components chunks\n if (components) {\n for (const [type, component] of Object.entries(components as Record<string, Record<string, unknown>>)) {\n const componentPath = `${basePath}/chunks/${name}/components/${type}`\n await fs.mkdir(componentPath, { recursive: true })\n\n for (const [key, value] of Object.entries(component)) {\n await fs.writeFile(`${componentPath}/${key}.json`, JSON.stringify(value))\n }\n }\n }\n\n // Write the operations chunks\n if (operations) {\n for (const [path, methods] of Object.entries(operations as Record<string, Record<string, unknown>>)) {\n const operationPath = `${basePath}/chunks/${name}/operations/${path}`\n await fs.mkdir(operationPath, { recursive: true })\n\n for (const [method, operation] of Object.entries(methods)) {\n await fs.writeFile(`${operationPath}/${method}.json`, JSON.stringify(operation))\n }\n }\n }\n }\n },\n /**\n * Returns the workspace document containing metadata and all sparse documents.\n *\n * The workspace document includes:\n * - Global workspace metadata (theme, active document, etc)\n * - Document metadata and sparse document\n * - In SSR mode: References point to in-memory chunks\n * - In static mode: References point to filesystem chunks\n *\n * @returns The complete workspace document\n */\n getWorkspace: () => {\n return workspace\n },\n /**\n * Retrieves a chunk of data from the workspace using a JSON Pointer\n *\n * A JSON Pointer is a string that references a specific location in a JSON document.\n * Only components and operations chunks can be retrieved.\n *\n * @example\n * ```ts\n * // Get a component\n * get('#/document-name/components/schemas/User')\n *\n * // Get an operation\n * get('#/document-name/operations/pets/get')\n * ```\n *\n * @param pointer - The JSON Pointer string to locate the chunk\n * @returns The chunk data if found, undefined otherwise\n */\n get: (pointer: string) => {\n return getValueByPath(assets, parseJsonPointer(pointer))\n },\n /**\n * Adds a new document to the workspace.\n *\n * The document will be:\n * - Upgraded to OpenAPI 3.1 if needed\n * - Split into components and operations chunks\n * - Have its references externalized based on the workspace mode\n * - Added to the workspace with its metadata\n *\n * @param document - The OpenAPI document to add\n * @param meta - Document metadata including required name and optional settings\n */\n addDocument: (document: Record<string, unknown>, meta: { name: string } & WorkspaceDocumentMeta) => {\n const { name, ...documentMeta } = meta\n\n const documentV3 = upgrade(document).specification\n\n // add the assets\n assets[meta.name] = {\n components: documentV3.components,\n operations: documentV3.paths && escapePaths(filterHttpMethodsOnly(documentV3.paths)),\n }\n\n const options =\n workspaceProps.mode === 'ssr'\n ? { mode: workspaceProps.mode, name, baseUrl: workspaceProps.baseUrl }\n : { mode: workspaceProps.mode, name, directory: workspaceProps.directory ?? DEFAULT_ASSETS_FOLDER }\n\n const components = externalizeComponentReferences(documentV3, options)\n const paths = externalizePathReferences(documentV3, options)\n\n // The document is now a minimal version with externalized references to components and operations.\n // These references will be resolved asynchronously when needed through the workspace's get() method.\n workspace.documents[meta.name] = { ...documentMeta, ...documentV3, components, paths }\n },\n }\n}\n"],
|
|
5
|
-
"mappings": "AAAA,SAAS,mBAAmB,eAAe;AAE3C,SAAS,gBAAgB,wBAAwB;
|
|
3
|
+
"sources": ["../src/server.ts"],
|
|
4
|
+
"sourcesContent": ["import { escapeJsonPointer, upgrade } from '@scalar/openapi-parser'\nimport type { OpenAPIV3_1 } from '@scalar/openapi-types'\nimport { getValueByPath, parseJsonPointer } from './helpers/json-path-utils'\nimport type { WorkspaceDocumentMeta, WorkspaceMeta } from './schemas/server-workspace'\nimport fs from 'node:fs/promises'\nimport { cwd } from 'node:process'\n\nconst DEFAULT_ASSETS_FOLDER = 'assets'\nexport const WORKSPACE_FILE_NAME = 'scalar-workspace.json'\n\ntype CreateServerWorkspaceStore =\n | {\n directory?: string\n mode: 'static'\n documents: {\n name: string\n document: Record<string, unknown> | string\n meta?: WorkspaceDocumentMeta\n }[]\n meta?: WorkspaceMeta\n }\n | {\n baseUrl: string\n mode: 'ssr'\n documents: {\n name: string\n document: Record<string, unknown> | string\n meta?: WorkspaceDocumentMeta\n }[]\n meta?: WorkspaceMeta\n }\n\nconst httpMethods = new Set(['get', 'put', 'post', 'delete', 'options', 'head', 'patch', 'trace'])\n\n/**\n * Filters an OpenAPI PathsObject to only include standard HTTP methods.\n * Removes any vendor extensions or other non-HTTP properties.\n *\n * @param paths - The OpenAPI PathsObject to filter\n * @returns A new PathsObject containing only standard HTTP methods\n *\n * @example\n * Input: {\n * \"/users\": {\n * \"get\": {...},\n * \"x-custom\": {...},\n * \"post\": {...}\n * }\n * }\n * Output: {\n * \"/users\": {\n * \"get\": {...},\n * \"post\": {...}\n * }\n * }\n */\nexport function filterHttpMethodsOnly(paths: OpenAPIV3_1.PathsObject) {\n const result: OpenAPIV3_1.PathsObject = {}\n\n for (const [path, methods] of Object.entries(paths)) {\n if (!methods) {\n continue\n }\n\n const filteredMethods: Record<string, any> = {}\n\n for (const [method, operation] of Object.entries(methods)) {\n if (httpMethods.has(method.toLowerCase())) {\n filteredMethods[method] = operation\n }\n }\n\n if (Object.keys(filteredMethods).length > 0) {\n result[path] = filteredMethods\n }\n }\n\n return result\n}\n\n/**\n * Escapes path keys in an OpenAPI PathsObject to be JSON Pointer compatible.\n * This is necessary because OpenAPI paths can contain characters that need to be escaped\n * when used as JSON Pointer references (like '/' and '~').\n *\n * @example\n * Input: { \"/users/{id}\": { ... } }\n * Output: { \"/users~1{id}\": { ... } }\n */\nexport function escapePaths(paths: OpenAPIV3_1.PathsObject) {\n const result: OpenAPIV3_1.PathsObject = {}\n Object.keys(paths).forEach((path) => {\n result[escapeJsonPointer(path)] = paths[path]\n })\n\n return result\n}\n\n/**\n * Externalizes components by turning them into refs.\n */\nexport function externalizeComponentReferences(\n document: OpenAPIV3_1.Document,\n meta: { mode: 'ssr'; name: string; baseUrl: string } | { mode: 'static'; name: string; directory: string },\n) {\n const result: Record<string, any> = {}\n\n if (!document.components) {\n return result\n }\n\n Object.entries(document.components).forEach(([type, component]) => {\n result[type] = {}\n Object.keys(component).forEach((name) => {\n const ref =\n meta.mode === 'ssr'\n ? `${meta.baseUrl}/${meta.name}/components/${type}/${name}#`\n : `${meta.directory}/chunks/${meta.name}/components/${type}/${name}.json#`\n\n result[type][name] = { '$ref': ref, $global: true }\n })\n })\n\n return result\n}\n\n/**\n * Externalizes paths operations by turning them into refs.\n */\nexport function externalizePathReferences(\n document: OpenAPIV3_1.Document,\n meta: { mode: 'ssr'; name: string; baseUrl: string } | { mode: 'static'; name: string; directory: string },\n) {\n const result: Record<string, any> = {}\n\n if (!document.paths) {\n return result\n }\n\n Object.entries(document.paths).forEach(([path, pathItem]) => {\n if (!pathItem) {\n return result\n }\n\n result[path] = {}\n\n const escapedPath = escapeJsonPointer(path)\n\n Object.keys(pathItem).forEach((type) => {\n if (httpMethods.has(type)) {\n const ref =\n meta.mode === 'ssr'\n ? `${meta.baseUrl}/${meta.name}/operations/${escapedPath}/${type}#`\n : `${meta.directory}/chunks/${meta.name}/operations/${escapedPath}/${type}.json#`\n\n result[path][type] = { '$ref': ref, $global: true }\n } else {\n result[path][type] = pathItem[type]\n }\n })\n })\n\n return result\n}\n\n/**\n * Create server state workspace store\n */\nexport function createServerWorkspaceStore(workspaceProps: CreateServerWorkspaceStore) {\n const documents = workspaceProps.documents.map((el) => {\n const document = upgrade(el.document).specification\n\n return { ...el, document }\n })\n\n /**\n * A map of document chunks that can be loaded asynchronously by the client.\n * Each document is split into components and operations to enable lazy loading.\n * The keys are document names and values contain the components and operations\n * for that document.\n */\n const assets = documents.reduce<\n Record<string, { components?: OpenAPIV3_1.ComponentsObject; operations?: Record<string, unknown> }>\n >((acc, { name, document }) => {\n acc[name] = {\n components: document.components,\n operations: document.paths && escapePaths(filterHttpMethodsOnly(document.paths)),\n }\n return acc\n }, {})\n\n /**\n * Base workspace document containing essential metadata and document references.\n *\n * This workspace document provides the minimal information needed for initial rendering.\n * All components and path operations are replaced with references to enable lazy loading.\n *\n * In SSR mode, references point to API endpoints.\n * In static mode, references point to filesystem chunks.\n */\n const workspace = {\n ...workspaceProps.meta,\n documents: documents.reduce<Record<string, Record<string, unknown>>>((acc, { name, document, meta }) => {\n const options =\n workspaceProps.mode === 'ssr'\n ? { mode: workspaceProps.mode, name, baseUrl: workspaceProps.baseUrl }\n : { mode: workspaceProps.mode, name, directory: workspaceProps.directory ?? DEFAULT_ASSETS_FOLDER }\n\n // Transform the original document by setting all the components and paths operations on refs\n const components = externalizeComponentReferences(document, options)\n const paths = externalizePathReferences(document, options)\n\n acc[name] = { ...meta, ...document, components, paths }\n return acc\n }, {}),\n }\n\n return {\n /**\n * Generates workspace chunks by writing components and operations to the filesystem.\n *\n * This method is only available in static mode. It creates a directory structure containing:\n * - A workspace file with metadata and document references\n * - Component chunks split by type (schemas, parameters, etc)\n * - Operation chunks split by path and HTTP method\n *\n * The generated workspace references will be relative file paths pointing to these chunks.\n *\n * @throws {Error} If called when mode is not 'static'\n */\n generateWorkspaceChunks: async () => {\n if (workspaceProps.mode !== 'static') {\n throw 'Mode has to be set to `static` to generate filesystem workspace chunks'\n }\n\n // Write the workspace document\n const basePath = `${cwd()}/${workspaceProps.directory ?? DEFAULT_ASSETS_FOLDER}`\n await fs.mkdir(basePath, { recursive: true })\n\n // Write the workspace contents on the file system\n await fs.writeFile(`${basePath}/${WORKSPACE_FILE_NAME}`, JSON.stringify(workspace))\n\n // Write the chunks\n for (const [name, { components, operations }] of Object.entries(assets)) {\n // Write the components chunks\n if (components) {\n for (const [type, component] of Object.entries(components as Record<string, Record<string, unknown>>)) {\n const componentPath = `${basePath}/chunks/${name}/components/${type}`\n await fs.mkdir(componentPath, { recursive: true })\n\n for (const [key, value] of Object.entries(component)) {\n await fs.writeFile(`${componentPath}/${key}.json`, JSON.stringify(value))\n }\n }\n }\n\n // Write the operations chunks\n if (operations) {\n for (const [path, methods] of Object.entries(operations as Record<string, Record<string, unknown>>)) {\n const operationPath = `${basePath}/chunks/${name}/operations/${path}`\n await fs.mkdir(operationPath, { recursive: true })\n\n for (const [method, operation] of Object.entries(methods)) {\n await fs.writeFile(`${operationPath}/${method}.json`, JSON.stringify(operation))\n }\n }\n }\n }\n },\n /**\n * Returns the workspace document containing metadata and all sparse documents.\n *\n * The workspace document includes:\n * - Global workspace metadata (theme, active document, etc)\n * - Document metadata and sparse document\n * - In SSR mode: References point to in-memory chunks\n * - In static mode: References point to filesystem chunks\n *\n * @returns The complete workspace document\n */\n getWorkspace: () => {\n return workspace\n },\n /**\n * Retrieves a chunk of data from the workspace using a JSON Pointer\n *\n * A JSON Pointer is a string that references a specific location in a JSON document.\n * Only components and operations chunks can be retrieved.\n *\n * @example\n * ```ts\n * // Get a component\n * get('#/document-name/components/schemas/User')\n *\n * // Get an operation\n * get('#/document-name/operations/pets/get')\n * ```\n *\n * @param pointer - The JSON Pointer string to locate the chunk\n * @returns The chunk data if found, undefined otherwise\n */\n get: (pointer: string) => {\n return getValueByPath(assets, parseJsonPointer(pointer))\n },\n /**\n * Adds a new document to the workspace.\n *\n * The document will be:\n * - Upgraded to OpenAPI 3.1 if needed\n * - Split into components and operations chunks\n * - Have its references externalized based on the workspace mode\n * - Added to the workspace with its metadata\n *\n * @param document - The OpenAPI document to add\n * @param meta - Document metadata including required name and optional settings\n */\n addDocument: (document: Record<string, unknown>, meta: { name: string } & WorkspaceDocumentMeta) => {\n const { name, ...documentMeta } = meta\n\n const documentV3 = upgrade(document).specification\n\n // add the assets\n assets[meta.name] = {\n components: documentV3.components,\n operations: documentV3.paths && escapePaths(filterHttpMethodsOnly(documentV3.paths)),\n }\n\n const options =\n workspaceProps.mode === 'ssr'\n ? { mode: workspaceProps.mode, name, baseUrl: workspaceProps.baseUrl }\n : { mode: workspaceProps.mode, name, directory: workspaceProps.directory ?? DEFAULT_ASSETS_FOLDER }\n\n const components = externalizeComponentReferences(documentV3, options)\n const paths = externalizePathReferences(documentV3, options)\n\n // The document is now a minimal version with externalized references to components and operations.\n // These references will be resolved asynchronously when needed through the workspace's get() method.\n workspace.documents[meta.name] = { ...documentMeta, ...documentV3, components, paths }\n },\n }\n}\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,mBAAmB,eAAe;AAE3C,SAAS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AE,MAAM,eAAe,MAAM,MAAM,WAAW,eAAe,aAAa,sBAAsB;AAEtG,YAAM,aAAa,+BAA+B,YAAY,OAAO;AACrE,YAAM,QAAQ,0BAA0B,YAAY,OAAO;AAI3D,gBAAU,UAAU,KAAK,IAAI,IAAI,EAAE,GAAG,cAAc,GAAG,YAAY,YAAY,MAAM;AAAA,IACvF;AAAA,EACF;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/esbuild.ts
CHANGED
package/package.json
CHANGED
|
@@ -16,23 +16,33 @@
|
|
|
16
16
|
"openapi",
|
|
17
17
|
"scalar"
|
|
18
18
|
],
|
|
19
|
-
"version": "0.
|
|
19
|
+
"version": "0.3.1",
|
|
20
20
|
"engines": {
|
|
21
21
|
"node": ">=18"
|
|
22
22
|
},
|
|
23
23
|
"type": "module",
|
|
24
24
|
"exports": {
|
|
25
|
-
"
|
|
26
|
-
"import": "./dist/
|
|
27
|
-
"types": "./dist/
|
|
28
|
-
"default": "./dist/
|
|
25
|
+
"./client": {
|
|
26
|
+
"import": "./dist/client.js",
|
|
27
|
+
"types": "./dist/client.d.ts",
|
|
28
|
+
"default": "./dist/client.js"
|
|
29
|
+
},
|
|
30
|
+
"./schemas": {
|
|
31
|
+
"import": "./dist/schemas.js",
|
|
32
|
+
"types": "./dist/schemas.d.ts",
|
|
33
|
+
"default": "./dist/schemas.js"
|
|
34
|
+
},
|
|
35
|
+
"./server": {
|
|
36
|
+
"import": "./dist/server.js",
|
|
37
|
+
"types": "./dist/server.d.ts",
|
|
38
|
+
"default": "./dist/server.js"
|
|
29
39
|
}
|
|
30
40
|
},
|
|
31
41
|
"dependencies": {
|
|
32
42
|
"@sinclair/typebox": "0.34.3",
|
|
33
43
|
"vue": "^3.5.12",
|
|
34
|
-
"@scalar/openapi-
|
|
35
|
-
"@scalar/openapi-
|
|
44
|
+
"@scalar/openapi-parser": "0.15.0",
|
|
45
|
+
"@scalar/openapi-types": "0.3.2"
|
|
36
46
|
},
|
|
37
47
|
"devDependencies": {
|
|
38
48
|
"fastify": "^5.3.3",
|
|
@@ -47,7 +57,7 @@
|
|
|
47
57
|
"format:check": "scalar-format-check",
|
|
48
58
|
"lint:check": "eslint .",
|
|
49
59
|
"lint:fix": "eslint . --fix",
|
|
50
|
-
"test
|
|
60
|
+
"test": "vitest",
|
|
51
61
|
"types:build": "scalar-types-build",
|
|
52
62
|
"types:check": "scalar-types-check"
|
|
53
63
|
}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import { createServerWorkspaceStore
|
|
2
|
-
import { createWorkspaceStore } from '@/
|
|
1
|
+
import { createServerWorkspaceStore } from '@/server'
|
|
2
|
+
import { createWorkspaceStore } from '@/client'
|
|
3
3
|
import { beforeEach, describe, expect, test } from 'vitest'
|
|
4
4
|
import fastify, { type FastifyInstance } from 'fastify'
|
|
5
5
|
import { afterEach } from 'node:test'
|
|
6
|
-
import { cwd } from 'node:process'
|
|
7
|
-
import fs from 'node:fs/promises'
|
|
8
|
-
import type { Workspace } from '@/schemas/server-workspace'
|
|
9
6
|
|
|
10
7
|
// Test document
|
|
11
8
|
const document = {
|
|
@@ -286,58 +283,6 @@ describe('create-workspace-store', () => {
|
|
|
286
283
|
).toEqual(document.components.schemas.User)
|
|
287
284
|
})
|
|
288
285
|
|
|
289
|
-
test('should correctly resolve chunks from the file system', async () => {
|
|
290
|
-
const randomSeed = () => Math.floor(Math.random() * Number.MAX_SAFE_INTEGER)
|
|
291
|
-
const path = `temp-${randomSeed()}`
|
|
292
|
-
|
|
293
|
-
const serverStore = createServerWorkspaceStore({
|
|
294
|
-
mode: 'static',
|
|
295
|
-
directory: path,
|
|
296
|
-
documents: [
|
|
297
|
-
{
|
|
298
|
-
name: 'default',
|
|
299
|
-
document: document,
|
|
300
|
-
},
|
|
301
|
-
],
|
|
302
|
-
})
|
|
303
|
-
|
|
304
|
-
await serverStore.generateWorkspaceChunks()
|
|
305
|
-
|
|
306
|
-
const buildPath = `${cwd()}/${path}`
|
|
307
|
-
|
|
308
|
-
// Read the workspace file to get the sparse document
|
|
309
|
-
const workspace = JSON.parse(
|
|
310
|
-
await fs.readFile(`${buildPath}/${WORKSPACE_FILE_NAME}`, { encoding: 'utf-8' }),
|
|
311
|
-
) as Workspace
|
|
312
|
-
|
|
313
|
-
const store = await createWorkspaceStore({
|
|
314
|
-
documents: [
|
|
315
|
-
{
|
|
316
|
-
name: 'default',
|
|
317
|
-
document: workspace.documents['default'],
|
|
318
|
-
},
|
|
319
|
-
],
|
|
320
|
-
})
|
|
321
|
-
|
|
322
|
-
// The operation should not be resolved on the fly
|
|
323
|
-
expect(store.workspace.activeDocument?.paths?.['/users'].get).toEqual({
|
|
324
|
-
'$ref': `${path}/chunks/default/operations/~1users/get.json#`,
|
|
325
|
-
$global: true,
|
|
326
|
-
})
|
|
327
|
-
|
|
328
|
-
// We resolve the ref
|
|
329
|
-
await store.resolve(['paths', '/users', 'get'])
|
|
330
|
-
await fs.rm(`${cwd()}/${path}`, { recursive: true })
|
|
331
|
-
|
|
332
|
-
// We expect the ref to have been resolved with the correct contents
|
|
333
|
-
expect(store.workspace.activeDocument?.paths?.['/users'].get?.summary).toEqual(document.paths['/users'].get.summary)
|
|
334
|
-
|
|
335
|
-
expect(
|
|
336
|
-
(store.workspace.activeDocument?.paths?.['/users'].get as any).responses[200].content['application/json'].schema
|
|
337
|
-
.items,
|
|
338
|
-
).toEqual(document.components.schemas.User)
|
|
339
|
-
})
|
|
340
|
-
|
|
341
286
|
test('should load files form the remote url', async () => {
|
|
342
287
|
const PORT = 9989
|
|
343
288
|
const url = `http://localhost:${PORT}`
|
|
@@ -368,31 +313,6 @@ describe('create-workspace-store', () => {
|
|
|
368
313
|
expect(store.workspace.documents['new'].info?.title).toEqual(document.info.title)
|
|
369
314
|
})
|
|
370
315
|
|
|
371
|
-
test('should load files from the local file system', async () => {
|
|
372
|
-
const fileName = 'temp.json'
|
|
373
|
-
|
|
374
|
-
// write the document to a local file
|
|
375
|
-
await fs.writeFile(fileName, JSON.stringify(document))
|
|
376
|
-
|
|
377
|
-
const store = await createWorkspaceStore({
|
|
378
|
-
documents: [
|
|
379
|
-
{
|
|
380
|
-
path: fileName,
|
|
381
|
-
name: 'default',
|
|
382
|
-
},
|
|
383
|
-
],
|
|
384
|
-
})
|
|
385
|
-
|
|
386
|
-
expect(Object.keys(store.workspace.documents)).toEqual(['default'])
|
|
387
|
-
expect(store.workspace.documents['default'].info?.title).toEqual(document.info.title)
|
|
388
|
-
|
|
389
|
-
await store.addDocument({ name: 'new', path: fileName })
|
|
390
|
-
await fs.rm(fileName)
|
|
391
|
-
|
|
392
|
-
expect(Object.keys(store.workspace.documents)).toEqual(['default', 'new'])
|
|
393
|
-
expect(store.workspace.documents['new'].info?.title).toEqual(document.info.title)
|
|
394
|
-
})
|
|
395
|
-
|
|
396
316
|
test('should handle circular references when we try to resolve all remote chunks recursively', async () => {
|
|
397
317
|
const document = {
|
|
398
318
|
openapi: '3.0.0',
|