@scalar/api-client 3.5.1 → 3.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -1
- package/dist/style.css +3933 -4768
- package/dist/styles/tailwind.config.css +20 -0
- package/dist/styles/utilities.css +45 -0
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.js +1 -1
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.js.map +1 -1
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.script.js +1 -1
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.script.js.map +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.script.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.script.js.map +1 -1
- package/dist/v2/components/data-table/DataTableInput.vue.d.ts +1 -1
- package/dist/v2/components/data-table/DataTableInput.vue.d.ts.map +1 -1
- package/dist/v2/constants.js +1 -1
- package/dist/v2/features/app/App.vue.d.ts +15 -31
- package/dist/v2/features/app/App.vue.d.ts.map +1 -1
- package/dist/v2/features/app/App.vue.js.map +1 -1
- package/dist/v2/features/app/App.vue.script.js +131 -50
- package/dist/v2/features/app/App.vue.script.js.map +1 -1
- package/dist/v2/features/app/app-state.d.ts +10 -14
- package/dist/v2/features/app/app-state.d.ts.map +1 -1
- package/dist/v2/features/app/app-state.js +53 -21
- package/dist/v2/features/app/app-state.js.map +1 -1
- package/dist/v2/features/app/components/AppHeader.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/AppHeader.vue.js.map +1 -1
- package/dist/v2/features/app/components/AppHeader.vue.script.js +4 -3
- package/dist/v2/features/app/components/AppHeader.vue.script.js.map +1 -1
- package/dist/v2/features/app/components/AppHeaderActions.vue.d.ts +32 -0
- package/dist/v2/features/app/components/AppHeaderActions.vue.d.ts.map +1 -0
- package/dist/v2/features/app/components/AppHeaderActions.vue.js +7 -0
- package/dist/v2/features/app/components/AppHeaderActions.vue.js.map +1 -0
- package/dist/v2/features/app/components/AppHeaderActions.vue.script.js +172 -0
- package/dist/v2/features/app/components/AppHeaderActions.vue.script.js.map +1 -0
- package/dist/v2/features/app/components/AppSidebar.vue.d.ts +2 -5
- package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/AppSidebar.vue.js +1 -1
- package/dist/v2/features/app/components/AppSidebar.vue.js.map +1 -1
- package/dist/v2/features/app/components/AppSidebar.vue.script.js +4 -9
- package/dist/v2/features/app/components/AppSidebar.vue.script.js.map +1 -1
- package/dist/v2/features/app/components/DesktopTabs.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/DesktopTabs.vue.js.map +1 -1
- package/dist/v2/features/app/components/DesktopTabs.vue.script.js +2 -2
- package/dist/v2/features/app/components/DesktopTabs.vue.script.js.map +1 -1
- package/dist/v2/features/app/components/DocumentBreadcrumb.vue.d.ts +1 -2
- package/dist/v2/features/app/components/DocumentBreadcrumb.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/DocumentBreadcrumb.vue.js +1 -1
- package/dist/v2/features/app/components/DocumentBreadcrumb.vue.js.map +1 -1
- package/dist/v2/features/app/components/DocumentBreadcrumb.vue.script.js +4 -35
- package/dist/v2/features/app/components/DocumentBreadcrumb.vue.script.js.map +1 -1
- package/dist/v2/features/app/components/DocumentSyncIndicator.vue.d.ts +1 -1
- package/dist/v2/features/app/components/DocumentSyncIndicator.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/PublishDocumentModal.vue.d.ts +77 -0
- package/dist/v2/features/app/components/PublishDocumentModal.vue.d.ts.map +1 -0
- package/dist/v2/features/app/components/PublishDocumentModal.vue.js +7 -0
- package/dist/v2/features/app/components/PublishDocumentModal.vue.js.map +1 -0
- package/dist/v2/features/app/components/PublishDocumentModal.vue.script.js +209 -0
- package/dist/v2/features/app/components/PublishDocumentModal.vue.script.js.map +1 -0
- package/dist/v2/features/app/components/SyncConflictResolutionEditor.vue.d.ts.map +1 -0
- package/dist/v2/features/{collection → app}/components/SyncConflictResolutionEditor.vue.js +2 -2
- package/dist/v2/features/app/components/SyncConflictResolutionEditor.vue.js.map +1 -0
- package/dist/v2/features/{collection → app}/components/SyncConflictResolutionEditor.vue.script.js +1 -1
- package/dist/v2/features/{collection/components/SyncConflictResolutionEditor.vue.js.map → app/components/SyncConflictResolutionEditor.vue.script.js.map} +1 -1
- package/dist/v2/features/app/helpers/check-version-conflict.d.ts +8 -5
- package/dist/v2/features/app/helpers/check-version-conflict.d.ts.map +1 -1
- package/dist/v2/features/app/helpers/check-version-conflict.js +10 -7
- package/dist/v2/features/app/helpers/check-version-conflict.js.map +1 -1
- package/dist/v2/features/app/helpers/create-api-client-app.d.ts +8 -5
- package/dist/v2/features/app/helpers/create-api-client-app.d.ts.map +1 -1
- package/dist/v2/features/app/helpers/create-api-client-app.js +2 -2
- package/dist/v2/features/app/helpers/create-api-client-app.js.map +1 -1
- package/dist/v2/features/app/helpers/load-registry-document.d.ts +1 -10
- package/dist/v2/features/app/helpers/load-registry-document.d.ts.map +1 -1
- package/dist/v2/features/app/helpers/load-registry-document.js +6 -5
- package/dist/v2/features/app/helpers/load-registry-document.js.map +1 -1
- package/dist/v2/features/app/helpers/registry-error-messages.d.ts +23 -0
- package/dist/v2/features/app/helpers/registry-error-messages.d.ts.map +1 -0
- package/dist/v2/features/app/helpers/registry-error-messages.js +63 -0
- package/dist/v2/features/app/helpers/registry-error-messages.js.map +1 -0
- package/dist/v2/features/app/hooks/use-active-document-version.d.ts +2 -1
- package/dist/v2/features/app/hooks/use-active-document-version.d.ts.map +1 -1
- package/dist/v2/features/app/hooks/use-active-document-version.js.map +1 -1
- package/dist/v2/features/app/hooks/use-document-sync.d.ts +126 -0
- package/dist/v2/features/app/hooks/use-document-sync.d.ts.map +1 -0
- package/dist/v2/features/app/hooks/use-document-sync.js +448 -0
- package/dist/v2/features/app/hooks/use-document-sync.js.map +1 -0
- package/dist/v2/features/app/hooks/use-network-status.d.ts +29 -0
- package/dist/v2/features/app/hooks/use-network-status.d.ts.map +1 -0
- package/dist/v2/features/app/hooks/use-network-status.js +58 -0
- package/dist/v2/features/app/hooks/use-network-status.js.map +1 -0
- package/dist/v2/features/app/hooks/use-sidebar-documents.d.ts +1 -25
- package/dist/v2/features/app/hooks/use-sidebar-documents.d.ts.map +1 -1
- package/dist/v2/features/app/hooks/use-sidebar-documents.js.map +1 -1
- package/dist/v2/features/app/index.d.ts +1 -1
- package/dist/v2/features/app/index.d.ts.map +1 -1
- package/dist/v2/features/collection/DocumentCollection.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/DocumentCollection.vue.js.map +1 -1
- package/dist/v2/features/collection/DocumentCollection.vue.script.js +43 -277
- package/dist/v2/features/collection/DocumentCollection.vue.script.js.map +1 -1
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.d.ts.map +1 -1
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.js.map +1 -1
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.script.js +35 -17
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.script.js.map +1 -1
- package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.d.ts.map +1 -1
- package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.js.map +1 -1
- package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.script.js +15 -13
- package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.script.js.map +1 -1
- package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue.d.ts.map +1 -1
- package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue.js +1 -1
- package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue.js.map +1 -1
- package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue.script.js +51 -39
- package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue.script.js.map +1 -1
- package/dist/v2/features/command-palette/components/CommandPaletteOpenApiDocument.vue.d.ts.map +1 -1
- package/dist/v2/features/command-palette/components/CommandPaletteOpenApiDocument.vue.js.map +1 -1
- package/dist/v2/features/command-palette/components/CommandPaletteOpenApiDocument.vue.script.js +30 -14
- package/dist/v2/features/command-palette/components/CommandPaletteOpenApiDocument.vue.script.js.map +1 -1
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.d.ts.map +1 -1
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.js.map +1 -1
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.script.js +44 -42
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.script.js.map +1 -1
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.d.ts.map +1 -1
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.js.map +1 -1
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.script.js +33 -17
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.script.js.map +1 -1
- package/dist/v2/features/command-palette/helpers/load-document-from-source.d.ts.map +1 -1
- package/dist/v2/features/command-palette/helpers/load-document-from-source.js +3 -2
- package/dist/v2/features/command-palette/helpers/load-document-from-source.js.map +1 -1
- package/dist/v2/features/editor/hooks/use-three-way-merge-editor.d.ts.map +1 -1
- package/dist/v2/features/editor/hooks/use-three-way-merge-editor.js +5 -5
- package/dist/v2/features/editor/hooks/use-three-way-merge-editor.js.map +1 -1
- package/dist/v2/helpers/is-url.d.ts.map +1 -1
- package/dist/v2/helpers/is-url.js +2 -1
- package/dist/v2/helpers/is-url.js.map +1 -1
- package/dist/v2/types/configuration.d.ts +273 -7
- package/dist/v2/types/configuration.d.ts.map +1 -1
- package/dist/vue-styles.css +1389 -0
- package/package.json +20 -14
- package/dist/v2/features/app/components/DocumentSyncIndicator.vue.js +0 -7
- package/dist/v2/features/app/components/DocumentSyncIndicator.vue.js.map +0 -1
- package/dist/v2/features/app/components/DocumentSyncIndicator.vue.script.js +0 -51
- package/dist/v2/features/app/components/DocumentSyncIndicator.vue.script.js.map +0 -1
- package/dist/v2/features/collection/components/SyncConflictResolutionEditor.vue.d.ts.map +0 -1
- package/dist/v2/features/collection/components/SyncConflictResolutionEditor.vue.script.js.map +0 -1
- /package/dist/v2/features/{collection → app}/components/SyncConflictResolutionEditor.vue.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load-registry-document.js","names":[],"sources":["../../../../../src/v2/features/app/helpers/load-registry-document.ts"],"sourcesContent":["import { coerce, object, string } from '@scalar/validation'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\n\nimport { generateUniqueSlug } from '@/v2/features/command-palette/helpers/generate-unique-slug'\nimport type { ImportDocumentFromRegistry } from '@/v2/types/configuration'\n\n/** Result of attempting to load a registry document into the workspace store. */\ntype LoadRegistryDocumentResult = { ok: true; documentName: string } | { ok: false; error: string }\n\nexport const loadRegistryDocument = async ({\n workspaceStore,\n fetcher,\n namespace,\n slug,\n version = 'latest',\n
|
|
1
|
+
{"version":3,"file":"load-registry-document.js","names":[],"sources":["../../../../../src/v2/features/app/helpers/load-registry-document.ts"],"sourcesContent":["import { coerce, object, string } from '@scalar/validation'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\n\nimport { generateUniqueSlug } from '@/v2/features/command-palette/helpers/generate-unique-slug'\nimport type { ImportDocumentFromRegistry } from '@/v2/types/configuration'\n\n/** Result of attempting to load a registry document into the workspace store. */\ntype LoadRegistryDocumentResult = { ok: true; documentName: string } | { ok: false; error: string }\n\nexport const loadRegistryDocument = async ({\n workspaceStore,\n fetcher,\n namespace,\n slug,\n version = 'latest',\n}: {\n workspaceStore: WorkspaceStore\n fetcher: ImportDocumentFromRegistry\n namespace: string\n slug: string\n /**\n * Specific version to fetch from the registry. When omitted we ask the\n * registry for `latest`, which is what callers default to when they do\n * not have a concrete version pinned for the document yet.\n */\n version?: string\n}): Promise<LoadRegistryDocumentResult> => {\n const documents = workspaceStore.workspace.documents\n\n const existing = Object.entries(documents).find(([, doc]) => {\n const meta = doc?.['x-scalar-registry-meta']\n return meta?.namespace === namespace && meta?.slug === slug && meta?.version === version\n })\n\n if (existing) {\n return { ok: true, documentName: existing[0] }\n }\n\n const result = await fetcher({ namespace, slug, version })\n if (!result.ok) {\n // The registry adapter returns a discriminated `FetchRegistryDocumentError`\n // code; we surface the human-readable `message` when one was provided\n // and fall back to the code itself so the user always sees something\n // actionable in the toast / log line.\n return {\n ok: false,\n error: `Failed to fetch document: ${result.message ?? result.error}`,\n }\n }\n\n const { document, versionSha } = result.data\n\n // Parse the document data into a schema\n const schema = object({ info: object({ title: string() }) })\n const baseName = coerce(schema, document).info.title\n\n // Compose the workspace key as `slug(title)-slug(version)`\n // so the url will be like /workspace/acme/pets-api-1.0.0\n const title = baseName.trim() || slug\n const documentName = await generateUniqueSlug(`${title}-${version}`, new Set(Object.keys(documents)))\n\n if (!documentName) {\n return {\n ok: false,\n error: 'Failed to generate a unique name for the document',\n }\n }\n\n await workspaceStore.addDocument({\n name: documentName,\n document,\n meta: {\n 'x-scalar-registry-meta': {\n namespace,\n slug,\n version,\n // Only include `commitHash` when the registry actually advertised\n // one. Writing `undefined` into the object would leave an explicit\n // `commitHash: undefined` key on the persisted meta, which the\n // downstream sync logic treats as \"we already know the hash\" and\n // short-circuits the first commit-hash stamp after a pull.\n ...(versionSha ? { commitHash: versionSha } : {}),\n },\n },\n })\n\n return { ok: true, documentName }\n}\n"],"mappings":";;;AASA,IAAa,uBAAuB,OAAO,EACzC,gBACA,SACA,WACA,MACA,UAAU,eAY+B;CACzC,MAAM,YAAY,eAAe,UAAU;CAE3C,MAAM,WAAW,OAAO,QAAQ,UAAU,CAAC,MAAM,GAAG,SAAS;EAC3D,MAAM,OAAO,MAAM;AACnB,SAAO,MAAM,cAAc,aAAa,MAAM,SAAS,QAAQ,MAAM,YAAY;GACjF;AAEF,KAAI,SACF,QAAO;EAAE,IAAI;EAAM,cAAc,SAAS;EAAI;CAGhD,MAAM,SAAS,MAAM,QAAQ;EAAE;EAAW;EAAM;EAAS,CAAC;AAC1D,KAAI,CAAC,OAAO,GAKV,QAAO;EACL,IAAI;EACJ,OAAO,6BAA6B,OAAO,WAAW,OAAO;EAC9D;CAGH,MAAM,EAAE,UAAU,eAAe,OAAO;CASxC,MAAM,eAAe,MAAM,mBAAmB,GAL7B,OADF,OAAO,EAAE,MAAM,OAAO,EAAE,OAAO,QAAQ,EAAE,CAAC,EAAE,CAAC,EAC5B,SAAS,CAAC,KAAK,MAIxB,MAAM,IAAI,KACsB,GAAG,WAAW,IAAI,IAAI,OAAO,KAAK,UAAU,CAAC,CAAC;AAErG,KAAI,CAAC,aACH,QAAO;EACL,IAAI;EACJ,OAAO;EACR;AAGH,OAAM,eAAe,YAAY;EAC/B,MAAM;EACN;EACA,MAAM,EACJ,0BAA0B;GACxB;GACA;GACA;GAMA,GAAI,aAAa,EAAE,YAAY,YAAY,GAAG,EAAE;GACjD,EACF;EACF,CAAC;AAEF,QAAO;EAAE,IAAI;EAAM;EAAc"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { FetchRegistryDocumentError, PublishRegistryDocumentError, PublishRegistryVersionError } from '../../../../v2/types/configuration';
|
|
2
|
+
/**
|
|
3
|
+
* Maps a {@link FetchRegistryDocumentError} code to a user-facing
|
|
4
|
+
* message used by the Pull flow when reading a document from the
|
|
5
|
+
* registry fails. The optional `detail` is the human-readable `message`
|
|
6
|
+
* field returned alongside the discriminated code; we only stitch it
|
|
7
|
+
* into the network branch because the other codes already describe a
|
|
8
|
+
* specific failure mode the user can act on.
|
|
9
|
+
*/
|
|
10
|
+
export declare const messageForFetchError: (code: FetchRegistryDocumentError, detail?: string) => string;
|
|
11
|
+
/**
|
|
12
|
+
* Maps a {@link PublishRegistryVersionError} code to a user-facing
|
|
13
|
+
* message used by the Push flow when publishing a new commit on an
|
|
14
|
+
* existing version fails.
|
|
15
|
+
*/
|
|
16
|
+
export declare const messageForPublishVersionError: (code: PublishRegistryVersionError, detail?: string) => string;
|
|
17
|
+
/**
|
|
18
|
+
* Maps a {@link PublishRegistryDocumentError} code to a user-facing
|
|
19
|
+
* message used by the first-time Publish flow (creating a brand-new
|
|
20
|
+
* registry entry for a document that does not have one yet).
|
|
21
|
+
*/
|
|
22
|
+
export declare const messageForPublishDocumentError: (code: PublishRegistryDocumentError, detail?: string) => string;
|
|
23
|
+
//# sourceMappingURL=registry-error-messages.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry-error-messages.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/app/helpers/registry-error-messages.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,0BAA0B,EAC1B,4BAA4B,EAC5B,2BAA2B,EAC5B,MAAM,0BAA0B,CAAA;AAsBjC;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,GAAI,MAAM,0BAA0B,EAAE,SAAS,MAAM,KAAG,MAYxF,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,6BAA6B,GAAI,MAAM,2BAA2B,EAAE,SAAS,MAAM,KAAG,MAclG,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,8BAA8B,GAAI,MAAM,4BAA4B,EAAE,SAAS,MAAM,KAAG,MAYpG,CAAA"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
//#region src/v2/features/app/helpers/registry-error-messages.ts
|
|
2
|
+
/**
|
|
3
|
+
* Generic fallback used when an adapter callback rejected for a
|
|
4
|
+
* registry call we could not classify any further. Splitting it out
|
|
5
|
+
* keeps the per-flow helpers below small and readable.
|
|
6
|
+
*/
|
|
7
|
+
var NETWORK_FALLBACK = "Could not reach the registry. Check your connection and try again.";
|
|
8
|
+
/**
|
|
9
|
+
* Generic fallback used when an adapter rejects with the `UNKNOWN`
|
|
10
|
+
* catch-all code. We weave the optional `detail` in when present so
|
|
11
|
+
* the user still gets a hint of what actually went wrong even though
|
|
12
|
+
* we could not classify the failure into a specific branch.
|
|
13
|
+
*/
|
|
14
|
+
var UNKNOWN_FALLBACK = "Something went wrong. Please try again.";
|
|
15
|
+
var networkMessage = (detail) => detail ? `Could not reach the registry: ${detail}` : NETWORK_FALLBACK;
|
|
16
|
+
var unknownMessage = (detail) => detail ? `Something went wrong: ${detail}` : UNKNOWN_FALLBACK;
|
|
17
|
+
/**
|
|
18
|
+
* Maps a {@link FetchRegistryDocumentError} code to a user-facing
|
|
19
|
+
* message used by the Pull flow when reading a document from the
|
|
20
|
+
* registry fails. The optional `detail` is the human-readable `message`
|
|
21
|
+
* field returned alongside the discriminated code; we only stitch it
|
|
22
|
+
* into the network branch because the other codes already describe a
|
|
23
|
+
* specific failure mode the user can act on.
|
|
24
|
+
*/
|
|
25
|
+
var messageForFetchError = (code, detail) => {
|
|
26
|
+
switch (code) {
|
|
27
|
+
case "NOT_FOUND": return "This version is no longer available on the registry.";
|
|
28
|
+
case "UNAUTHORIZED": return "You are not allowed to read this document. Please sign in and try again.";
|
|
29
|
+
case "FETCH_FAILED": return networkMessage(detail);
|
|
30
|
+
default: return unknownMessage(detail);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Maps a {@link PublishRegistryVersionError} code to a user-facing
|
|
35
|
+
* message used by the Push flow when publishing a new commit on an
|
|
36
|
+
* existing version fails.
|
|
37
|
+
*/
|
|
38
|
+
var messageForPublishVersionError = (code, detail) => {
|
|
39
|
+
switch (code) {
|
|
40
|
+
case "CONFLICT": return "Someone else pushed changes to this version. Pull the latest before pushing again.";
|
|
41
|
+
case "NOT_FOUND": return "This document is no longer available on the registry.";
|
|
42
|
+
case "UNAUTHORIZED": return "You are not allowed to publish to this namespace.";
|
|
43
|
+
case "FETCH_FAILED": return networkMessage(detail);
|
|
44
|
+
default: return unknownMessage(detail);
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Maps a {@link PublishRegistryDocumentError} code to a user-facing
|
|
49
|
+
* message used by the first-time Publish flow (creating a brand-new
|
|
50
|
+
* registry entry for a document that does not have one yet).
|
|
51
|
+
*/
|
|
52
|
+
var messageForPublishDocumentError = (code, detail) => {
|
|
53
|
+
switch (code) {
|
|
54
|
+
case "CONFLICT": return "A document with this namespace and slug already exists. Pick a different slug or pull the existing one.";
|
|
55
|
+
case "UNAUTHORIZED": return "You are not allowed to publish to this namespace.";
|
|
56
|
+
case "FETCH_FAILED": return networkMessage(detail);
|
|
57
|
+
default: return unknownMessage(detail);
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
//#endregion
|
|
61
|
+
export { messageForFetchError, messageForPublishDocumentError, messageForPublishVersionError };
|
|
62
|
+
|
|
63
|
+
//# sourceMappingURL=registry-error-messages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry-error-messages.js","names":[],"sources":["../../../../../src/v2/features/app/helpers/registry-error-messages.ts"],"sourcesContent":["import type {\n FetchRegistryDocumentError,\n PublishRegistryDocumentError,\n PublishRegistryVersionError,\n} from '@/v2/types/configuration'\n\n/**\n * Generic fallback used when an adapter callback rejected for a\n * registry call we could not classify any further. Splitting it out\n * keeps the per-flow helpers below small and readable.\n */\nconst NETWORK_FALLBACK = 'Could not reach the registry. Check your connection and try again.'\n\n/**\n * Generic fallback used when an adapter rejects with the `UNKNOWN`\n * catch-all code. We weave the optional `detail` in when present so\n * the user still gets a hint of what actually went wrong even though\n * we could not classify the failure into a specific branch.\n */\nconst UNKNOWN_FALLBACK = 'Something went wrong. Please try again.'\n\nconst networkMessage = (detail?: string): string =>\n detail ? `Could not reach the registry: ${detail}` : NETWORK_FALLBACK\n\nconst unknownMessage = (detail?: string): string => (detail ? `Something went wrong: ${detail}` : UNKNOWN_FALLBACK)\n\n/**\n * Maps a {@link FetchRegistryDocumentError} code to a user-facing\n * message used by the Pull flow when reading a document from the\n * registry fails. The optional `detail` is the human-readable `message`\n * field returned alongside the discriminated code; we only stitch it\n * into the network branch because the other codes already describe a\n * specific failure mode the user can act on.\n */\nexport const messageForFetchError = (code: FetchRegistryDocumentError, detail?: string): string => {\n switch (code) {\n case 'NOT_FOUND':\n return 'This version is no longer available on the registry.'\n case 'UNAUTHORIZED':\n return 'You are not allowed to read this document. Please sign in and try again.'\n case 'FETCH_FAILED':\n return networkMessage(detail)\n case 'UNKNOWN':\n default:\n return unknownMessage(detail)\n }\n}\n\n/**\n * Maps a {@link PublishRegistryVersionError} code to a user-facing\n * message used by the Push flow when publishing a new commit on an\n * existing version fails.\n */\nexport const messageForPublishVersionError = (code: PublishRegistryVersionError, detail?: string): string => {\n switch (code) {\n case 'CONFLICT':\n return 'Someone else pushed changes to this version. Pull the latest before pushing again.'\n case 'NOT_FOUND':\n return 'This document is no longer available on the registry.'\n case 'UNAUTHORIZED':\n return 'You are not allowed to publish to this namespace.'\n case 'FETCH_FAILED':\n return networkMessage(detail)\n case 'UNKNOWN':\n default:\n return unknownMessage(detail)\n }\n}\n\n/**\n * Maps a {@link PublishRegistryDocumentError} code to a user-facing\n * message used by the first-time Publish flow (creating a brand-new\n * registry entry for a document that does not have one yet).\n */\nexport const messageForPublishDocumentError = (code: PublishRegistryDocumentError, detail?: string): string => {\n switch (code) {\n case 'CONFLICT':\n return 'A document with this namespace and slug already exists. Pick a different slug or pull the existing one.'\n case 'UNAUTHORIZED':\n return 'You are not allowed to publish to this namespace.'\n case 'FETCH_FAILED':\n return networkMessage(detail)\n case 'UNKNOWN':\n default:\n return unknownMessage(detail)\n }\n}\n"],"mappings":";;;;;;AAWA,IAAM,mBAAmB;;;;;;;AAQzB,IAAM,mBAAmB;AAEzB,IAAM,kBAAkB,WACtB,SAAS,iCAAiC,WAAW;AAEvD,IAAM,kBAAkB,WAA6B,SAAS,yBAAyB,WAAW;;;;;;;;;AAUlG,IAAa,wBAAwB,MAAkC,WAA4B;AACjG,SAAQ,MAAR;EACE,KAAK,YACH,QAAO;EACT,KAAK,eACH,QAAO;EACT,KAAK,eACH,QAAO,eAAe,OAAO;EAE/B,QACE,QAAO,eAAe,OAAO;;;;;;;;AASnC,IAAa,iCAAiC,MAAmC,WAA4B;AAC3G,SAAQ,MAAR;EACE,KAAK,WACH,QAAO;EACT,KAAK,YACH,QAAO;EACT,KAAK,eACH,QAAO;EACT,KAAK,eACH,QAAO,eAAe,OAAO;EAE/B,QACE,QAAO,eAAe,OAAO;;;;;;;;AASnC,IAAa,kCAAkC,MAAoC,WAA4B;AAC7G,SAAQ,MAAR;EACE,KAAK,WACH,QAAO;EACT,KAAK,eACH,QAAO;EACT,KAAK,eACH,QAAO,eAAe,OAAO;EAE/B,QACE,QAAO,eAAe,OAAO"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type ComputedRef } from 'vue';
|
|
2
2
|
import type { AppState } from '../../../../v2/features/app/app-state.js';
|
|
3
|
-
import { type
|
|
3
|
+
import { type SidebarDocumentItem, type SidebarDocumentVersion } from '../../../../v2/features/app/hooks/use-sidebar-documents.js';
|
|
4
|
+
import type { RegistryDocumentsState } from '../../../../v2/types/configuration';
|
|
4
5
|
/**
|
|
5
6
|
* Resolves everything UI surfaces need to know about the document the user
|
|
6
7
|
* is currently viewing in a registry-backed workspace.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-active-document-version.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/app/hooks/use-active-document-version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAY,MAAM,KAAK,CAAA;AAEhD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAA;AAC3D,OAAO,EACL,KAAK,
|
|
1
|
+
{"version":3,"file":"use-active-document-version.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/app/hooks/use-active-document-version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAY,MAAM,KAAK,CAAA;AAEhD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAA;AAC3D,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAE5B,MAAM,+CAA+C,CAAA;AACtD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AAEtE;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,wBAAwB,GAAI,6BAGtC;IACD,GAAG,EAAE,QAAQ,CAAA;IACb,wFAAwF;IACxF,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;CAChD,KAAG;IACF,SAAS,EAAE,WAAW,CAAC,mBAAmB,EAAE,CAAC,CAAA;IAC7C,kBAAkB,EAAE,WAAW,CAC3B;QACE,SAAS,EAAE,MAAM,CAAA;QACjB,IAAI,EAAE,MAAM,CAAA;QACZ,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,UAAU,CAAC,EAAE,MAAM,CAAA;QACnB,0BAA0B,CAAC,EAAE,MAAM,CAAA;QACnC,WAAW,CAAC,EAAE,OAAO,CAAA;KACtB,GACD,SAAS,CACZ,CAAA;IACD,UAAU,EAAE,WAAW,CAAC,mBAAmB,GAAG,SAAS,CAAC,CAAA;IACxD,QAAQ,EAAE,WAAW,CAAC,sBAAsB,EAAE,CAAC,CAAA;IAC/C,aAAa,EAAE,WAAW,CAAC,sBAAsB,GAAG,SAAS,CAAC,CAAA;CAqD/D,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-active-document-version.js","names":[],"sources":["../../../../../src/v2/features/app/hooks/use-active-document-version.ts"],"sourcesContent":["import { type ComputedRef, computed } from 'vue'\n\nimport type { AppState } from '@/v2/features/app/app-state'\nimport {\n type
|
|
1
|
+
{"version":3,"file":"use-active-document-version.js","names":[],"sources":["../../../../../src/v2/features/app/hooks/use-active-document-version.ts"],"sourcesContent":["import { type ComputedRef, computed } from 'vue'\n\nimport type { AppState } from '@/v2/features/app/app-state'\nimport {\n type SidebarDocumentItem,\n type SidebarDocumentVersion,\n useSidebarDocuments,\n} from '@/v2/features/app/hooks/use-sidebar-documents'\nimport type { RegistryDocumentsState } from '@/v2/types/configuration'\n\n/**\n * Resolves everything UI surfaces need to know about the document the user\n * is currently viewing in a registry-backed workspace.\n *\n * The breadcrumb's version picker and the right-side sync indicator both\n * need the same data:\n *\n * - the sidebar item for the active group (so titles match the registry),\n * - the full version list for that group (used to render dropdown rows /\n * feed `useVersionConflictCheck`),\n * - and the currently active version (used for the picker selection and\n * the standalone status icon).\n *\n * Pulling this into a composable keeps both surfaces aligned and avoids\n * duplicating the active-version selection rules — in particular the\n * fallback to the version declared on `x-scalar-registry-meta` when the\n * sidebar's notion of the active version has not caught up yet (e.g. during\n * a pending fetch).\n */\nexport const useActiveDocumentVersion = ({\n app,\n registryDocuments,\n}: {\n app: AppState\n /** Reactive accessor — components pass a getter so the composable stays prop-driven. */\n registryDocuments: () => RegistryDocumentsState\n}): {\n documents: ComputedRef<SidebarDocumentItem[]>\n activeRegistryMeta: ComputedRef<\n | {\n namespace: string\n slug: string\n version?: string\n commitHash?: string\n conflictCheckedAgainstHash?: string\n hasConflict?: boolean\n }\n | undefined\n >\n activeItem: ComputedRef<SidebarDocumentItem | undefined>\n versions: ComputedRef<SidebarDocumentVersion[]>\n activeVersion: ComputedRef<SidebarDocumentVersion | undefined>\n} => {\n const { documents } = useSidebarDocuments({\n app,\n managedDocs: () => registryDocuments().documents ?? [],\n })\n\n /** Registry meta for the currently active document (if any). */\n const activeRegistryMeta = computed(() => {\n const doc = app.store.value?.workspace.activeDocument\n return doc?.['x-scalar-registry-meta']\n })\n\n /**\n * Sidebar item representing the currently active registry-backed document.\n * We match by `namespace + slug` because a single group can contain\n * several versions and the active document may be any of them.\n */\n const activeItem = computed(() => {\n const meta = activeRegistryMeta.value\n if (!meta) {\n return undefined\n }\n return documents.value.find(\n (item) => item.registry?.namespace === meta.namespace && item.registry?.slug === meta.slug,\n )\n })\n\n /** Versions for the active group, ordered with the latest first. */\n const versions = computed<SidebarDocumentVersion[]>(() => activeItem.value?.versions ?? [])\n\n /**\n * The version currently active on screen. Prefers matching the version\n * declared on the active document's registry meta so consumers always\n * reflect what the user is viewing, even when the sidebar's notion of the\n * active version has not caught up yet (e.g. during a pending fetch).\n */\n const activeVersion = computed<SidebarDocumentVersion | undefined>(() => {\n const meta = activeRegistryMeta.value\n const list = versions.value\n if (!meta) {\n return list[0]\n }\n return list.find((v) => v.version === meta.version) ?? list[0]\n })\n\n return {\n documents,\n activeRegistryMeta,\n activeItem,\n versions,\n activeVersion,\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA6BA,IAAa,4BAA4B,EACvC,KACA,wBAqBG;CACH,MAAM,EAAE,cAAc,oBAAoB;EACxC;EACA,mBAAmB,mBAAmB,CAAC,aAAa,EAAE;EACvD,CAAC;;CAGF,MAAM,qBAAqB,eAAe;AAExC,UADY,IAAI,MAAM,OAAO,UAAU,kBAC1B;GACb;;;;;;CAOF,MAAM,aAAa,eAAe;EAChC,MAAM,OAAO,mBAAmB;AAChC,MAAI,CAAC,KACH;AAEF,SAAO,UAAU,MAAM,MACpB,SAAS,KAAK,UAAU,cAAc,KAAK,aAAa,KAAK,UAAU,SAAS,KAAK,KACvF;GACD;;CAGF,MAAM,WAAW,eAAyC,WAAW,OAAO,YAAY,EAAE,CAAC;AAiB3F,QAAO;EACL;EACA;EACA;EACA;EACA,eAdoB,eAAmD;GACvE,MAAM,OAAO,mBAAmB;GAChC,MAAM,OAAO,SAAS;AACtB,OAAI,CAAC,KACH,QAAO,KAAK;AAEd,UAAO,KAAK,MAAM,MAAM,EAAE,YAAY,KAAK,QAAQ,IAAI,KAAK;IAC5D;EAQD"}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { useModal } from '@scalar/components';
|
|
2
|
+
import { type merge } from '@scalar/json-magic/diff';
|
|
3
|
+
import { type ComputedRef, type Ref } from 'vue';
|
|
4
|
+
import type { AppState } from '../../../../v2/features/app/app-state.js';
|
|
5
|
+
import { useActiveDocumentVersion } from '../../../../v2/features/app/hooks/use-active-document-version.js';
|
|
6
|
+
import type { RegistryAdapter, RegistryDocumentsState, RegistryNamespacesState } from '../../../../v2/types/configuration';
|
|
7
|
+
/**
|
|
8
|
+
* Registry meta as it was when a pull began. Captures the same shape
|
|
9
|
+
* `activeRegistryMeta` returns so we can hand it to the post-pull
|
|
10
|
+
* commit-hash stamp without re-deriving (and possibly missing) it once
|
|
11
|
+
* the rebase has finished mutating the active document.
|
|
12
|
+
*/
|
|
13
|
+
type PendingPullRegistryMeta = NonNullable<ReturnType<typeof useActiveDocumentVersion>['activeRegistryMeta']['value']>;
|
|
14
|
+
/**
|
|
15
|
+
* In-flight pull state captured while the three-way merge editor is on
|
|
16
|
+
* screen. We need to hold onto the rebase result (so the user-resolved
|
|
17
|
+
* document can still be applied), the registry meta and slug we were
|
|
18
|
+
* pulling against, and the upstream commit hash advertised by the
|
|
19
|
+
* listing - none of those are reachable from inside the conflict
|
|
20
|
+
* modal once the surrounding closure has unwound.
|
|
21
|
+
*
|
|
22
|
+
* `null` while no pull is awaiting user input. The modal-close handler
|
|
23
|
+
* resets it so a dismissed pull cleanly aborts without applying any
|
|
24
|
+
* changes (the workspace store only mutates when `applyChanges` is
|
|
25
|
+
* actually invoked).
|
|
26
|
+
*/
|
|
27
|
+
type PendingPullState = {
|
|
28
|
+
rebaseResult: {
|
|
29
|
+
originalDocument: Record<string, unknown>;
|
|
30
|
+
resolvedDocument: Record<string, unknown>;
|
|
31
|
+
conflicts: ReturnType<typeof merge>['conflicts'];
|
|
32
|
+
applyChanges: (input: {
|
|
33
|
+
resolvedDocument: Record<string, unknown>;
|
|
34
|
+
}) => Promise<void>;
|
|
35
|
+
};
|
|
36
|
+
meta: PendingPullRegistryMeta;
|
|
37
|
+
slug: string;
|
|
38
|
+
incomingCommitHash: string | undefined;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Owns the document-level sync flow for the API client header: save,
|
|
42
|
+
* revert, pull, push, and first-time publish. The top-level `App.vue`
|
|
43
|
+
* was accumulating all five flows alongside its routing / layout glue,
|
|
44
|
+
* which made the file hard to reason about in isolation - extracting
|
|
45
|
+
* the registry-bound logic into a single hook keeps the component
|
|
46
|
+
* declarative and gives the flow a single place to test against.
|
|
47
|
+
*
|
|
48
|
+
* The hook owns:
|
|
49
|
+
* - the visibility computeds for each header action cluster,
|
|
50
|
+
* - the network-aware enable / disable gates (`canPullActiveDocument`,
|
|
51
|
+
* `canPushActiveDocument`),
|
|
52
|
+
* - the modal states for the publish + sync-conflict flows,
|
|
53
|
+
* - the pending pull state captured while the three-way merge editor
|
|
54
|
+
* is open,
|
|
55
|
+
* - and every async handler invoked from the header buttons / modals.
|
|
56
|
+
*/
|
|
57
|
+
export declare const useDocumentSync: ({ app, registry, registryDocuments, }: {
|
|
58
|
+
app: AppState;
|
|
59
|
+
/** Registry adapter wired up by the host application; `undefined` when registry features are disabled. */
|
|
60
|
+
registry: RegistryAdapter | undefined;
|
|
61
|
+
/** Reactive accessor — components pass a getter so the hook stays prop-driven. */
|
|
62
|
+
registryDocuments: () => RegistryDocumentsState;
|
|
63
|
+
}) => {
|
|
64
|
+
/** Whether the local-workspace Save / Revert cluster should mount. */
|
|
65
|
+
showLocalSaveActions: ComputedRef<boolean>;
|
|
66
|
+
/** Whether the team-workspace Pull / Push cluster should mount. */
|
|
67
|
+
showTeamSyncActions: ComputedRef<boolean>;
|
|
68
|
+
/** Whether the team-workspace Publish cluster (no registry meta yet) should mount. */
|
|
69
|
+
showTeamPublishAction: ComputedRef<boolean>;
|
|
70
|
+
/** Truthy when at least one of the action clusters is renderable. */
|
|
71
|
+
hasHeaderActionCluster: ComputedRef<boolean>;
|
|
72
|
+
/** Whether the active document has unsaved local edits. */
|
|
73
|
+
isActiveDocumentDirty: ComputedRef<boolean>;
|
|
74
|
+
/** Reactive online status. */
|
|
75
|
+
isOnline: Ref<boolean>;
|
|
76
|
+
/** Reactive offline status (inverse of `isOnline`). */
|
|
77
|
+
isOffline: ComputedRef<boolean>;
|
|
78
|
+
/** Whether the pull button should be clickable. */
|
|
79
|
+
canPullActiveDocument: ComputedRef<boolean>;
|
|
80
|
+
/** Whether the push button should be clickable. */
|
|
81
|
+
canPushActiveDocument: ComputedRef<boolean>;
|
|
82
|
+
/** Modal state for the first-time publish modal. */
|
|
83
|
+
publishDocumentModalState: ReturnType<typeof useModal>;
|
|
84
|
+
/** Modal state for the three-way merge editor. */
|
|
85
|
+
syncConflictModalState: ReturnType<typeof useModal>;
|
|
86
|
+
/** In-flight pull state shared with the three-way merge editor. */
|
|
87
|
+
pendingPullState: Ref<PendingPullState | null>;
|
|
88
|
+
/** Default slug pre-filled into the publish modal. */
|
|
89
|
+
publishDefaultSlug: ComputedRef<string>;
|
|
90
|
+
/** Default version pre-filled into the publish modal. */
|
|
91
|
+
publishDefaultVersion: ComputedRef<string>;
|
|
92
|
+
/** Reactive view of the namespaces the user can publish to. */
|
|
93
|
+
registryNamespaces: ComputedRef<RegistryNamespacesState>;
|
|
94
|
+
/** Persists local edits on the active document. */
|
|
95
|
+
handleSaveDocument: () => Promise<void>;
|
|
96
|
+
/** Discards local edits and restores the saved baseline. */
|
|
97
|
+
handleRevertDocument: () => Promise<void>;
|
|
98
|
+
/** Pulls the active document from the registry and rebases local edits. */
|
|
99
|
+
handlePullDocument: () => Promise<void>;
|
|
100
|
+
/** Publishes the active document as the next commit on the current registry version. */
|
|
101
|
+
handlePushDocument: () => Promise<void>;
|
|
102
|
+
/** Opens the publish modal for the active document. */
|
|
103
|
+
handlePublishDocument: () => void;
|
|
104
|
+
/** Submit handler invoked by the publish modal once the user confirms their inputs. */
|
|
105
|
+
handlePublishDocumentSubmit: (params: {
|
|
106
|
+
input: {
|
|
107
|
+
namespace: string;
|
|
108
|
+
slug: string;
|
|
109
|
+
version: string;
|
|
110
|
+
};
|
|
111
|
+
done: (outcome: {
|
|
112
|
+
ok: true;
|
|
113
|
+
} | {
|
|
114
|
+
ok: false;
|
|
115
|
+
message: string;
|
|
116
|
+
}) => void;
|
|
117
|
+
}) => Promise<void>;
|
|
118
|
+
/** Apply callback wired up to the three-way merge editor. */
|
|
119
|
+
handleSyncConflictApplyChanges: (params: {
|
|
120
|
+
resolvedDocument: Record<string, unknown>;
|
|
121
|
+
}) => Promise<void>;
|
|
122
|
+
/** Reset the pending pull when the conflict modal closes without an apply. */
|
|
123
|
+
handleSyncConflictModalClose: () => void;
|
|
124
|
+
};
|
|
125
|
+
export {};
|
|
126
|
+
//# sourceMappingURL=use-document-sync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-document-sync.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/app/hooks/use-document-sync.ts"],"names":[],"mappings":"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"}
|