@scalar/workspace-store 0.40.2 → 0.40.4
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 +13 -0
- package/dist/client.d.ts +7 -2
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +820 -681
- package/dist/entities/auth/index.js +96 -101
- package/dist/entities/auth/schema.d.ts +10 -0
- package/dist/entities/auth/schema.d.ts.map +1 -1
- package/dist/entities/auth/schema.js +42 -116
- package/dist/entities/history/index.js +80 -60
- package/dist/entities/history/schema.js +94 -88
- package/dist/events/bus.js +146 -93
- package/dist/events/definitions/analytics.js +1 -1
- package/dist/events/definitions/auth.js +1 -1
- package/dist/events/definitions/common.js +1 -1
- package/dist/events/definitions/cookie.js +1 -1
- package/dist/events/definitions/document.js +1 -1
- package/dist/events/definitions/environment.js +1 -1
- package/dist/events/definitions/hooks.js +1 -1
- package/dist/events/definitions/index.js +1 -1
- package/dist/events/definitions/meta.js +1 -1
- package/dist/events/definitions/operation.js +1 -1
- package/dist/events/definitions/server.js +1 -1
- package/dist/events/definitions/tabs.js +1 -1
- package/dist/events/definitions/tag.js +1 -1
- package/dist/events/definitions/ui.js +1 -1
- package/dist/events/definitions/workspace.js +1 -1
- package/dist/events/index.js +3 -9
- package/dist/events/listeners.js +20 -22
- package/dist/events/old-definitions.js +15 -12
- package/dist/helpers/deep-clone.js +33 -17
- package/dist/helpers/detect-changes-proxy.js +95 -57
- package/dist/helpers/general.js +78 -23
- package/dist/helpers/generate-unique-value.js +77 -45
- package/dist/helpers/get-fetch.js +12 -10
- package/dist/helpers/get-resolved-ref.js +11 -10
- package/dist/helpers/is-non-optional-security-requirement.js +3 -6
- package/dist/helpers/merge-object.js +71 -30
- package/dist/helpers/overrides-proxy.js +98 -58
- package/dist/helpers/unpack-proxy.js +60 -58
- package/dist/mutators/auth.js +358 -230
- package/dist/mutators/cookie.js +59 -42
- package/dist/mutators/document.js +104 -66
- package/dist/mutators/environment.js +97 -72
- package/dist/mutators/helpers.js +9 -13
- package/dist/mutators/index.js +62 -49
- package/dist/mutators/operation/body.js +88 -57
- package/dist/mutators/operation/extensions.js +20 -12
- package/dist/mutators/operation/helpers/fetch-request-to-har.js +144 -107
- package/dist/mutators/operation/helpers/fetch-response-to-har.js +143 -95
- package/dist/mutators/operation/helpers/get-parameter-position.js +12 -12
- package/dist/mutators/operation/helpers/har-to-operation.js +169 -132
- package/dist/mutators/operation/helpers/sync-path-parameters.js +109 -60
- package/dist/mutators/operation/history.js +60 -64
- package/dist/mutators/operation/index.js +25 -49
- package/dist/mutators/operation/operation.js +349 -240
- package/dist/mutators/operation/parameters.js +157 -93
- package/dist/mutators/server.js +213 -152
- package/dist/mutators/tabs.js +173 -130
- package/dist/mutators/tag.js +131 -97
- package/dist/mutators/workspace.js +72 -42
- package/dist/navigation/get-navigation-options.js +97 -84
- package/dist/navigation/helpers/get-openapi-object.js +46 -29
- package/dist/navigation/helpers/get-operation-entries.js +72 -32
- package/dist/navigation/helpers/get-parent-entry.js +16 -12
- package/dist/navigation/helpers/get-tag-entries.js +56 -29
- package/dist/navigation/helpers/get-tag.js +22 -23
- package/dist/navigation/helpers/get-x-keys.js +13 -9
- package/dist/navigation/helpers/traverse-description.js +90 -72
- package/dist/navigation/helpers/traverse-document.js +111 -98
- package/dist/navigation/helpers/traverse-examples.js +35 -31
- package/dist/navigation/helpers/traverse-paths.js +118 -106
- package/dist/navigation/helpers/traverse-schemas.js +65 -64
- package/dist/navigation/helpers/traverse-tags.js +158 -129
- package/dist/navigation/helpers/traverse-webhooks.js +96 -90
- package/dist/navigation/helpers/update-order-ids.js +59 -51
- package/dist/navigation/helpers/utils.js +71 -21
- package/dist/navigation/index.js +5 -13
- package/dist/navigation/types.js +1 -1
- package/dist/persistence/index.js +283 -285
- package/dist/persistence/indexdb.js +263 -126
- package/dist/plugins/bundler/helpers.js +21 -12
- package/dist/plugins/bundler/index.d.ts +7 -0
- package/dist/plugins/bundler/index.d.ts.map +1 -1
- package/dist/plugins/bundler/index.js +305 -171
- package/dist/plugins/client/index.js +1 -5
- package/dist/plugins/client/persistence.js +95 -90
- package/dist/resolve.js +18 -25
- package/dist/schemas/compose.js +6 -7
- package/dist/schemas/extensions/document/x-internal.js +3 -7
- package/dist/schemas/extensions/document/x-scalar-environments.js +16 -22
- package/dist/schemas/extensions/document/x-scalar-icon.js +3 -7
- package/dist/schemas/extensions/document/x-scalar-ignore.js +3 -7
- package/dist/schemas/extensions/document/x-scalar-is-dirty.js +21 -8
- package/dist/schemas/extensions/document/x-scalar-original-document-hash.js +17 -8
- package/dist/schemas/extensions/document/x-scalar-registry-meta.js +15 -21
- package/dist/schemas/extensions/document/x-scalar-sdk-installation.js +5 -13
- package/dist/schemas/extensions/document/x-scalar-watch-mode.js +4 -8
- package/dist/schemas/extensions/document/x-tags.js +3 -7
- package/dist/schemas/extensions/example/x-disabled.js +17 -7
- package/dist/schemas/extensions/general/x-scalar-active-environment.js +4 -7
- package/dist/schemas/extensions/general/x-scalar-cookies.js +9 -14
- package/dist/schemas/extensions/general/x-scalar-order.js +8 -7
- package/dist/schemas/extensions/operation/index.js +4 -23
- package/dist/schemas/extensions/operation/x-badge.js +42 -50
- package/dist/schemas/extensions/operation/x-code-samples.js +8 -12
- package/dist/schemas/extensions/operation/x-draft-examples.js +3 -7
- package/dist/schemas/extensions/operation/x-post-response.js +18 -7
- package/dist/schemas/extensions/operation/x-scalar-disable-parameters.js +57 -13
- package/dist/schemas/extensions/operation/x-scalar-selected-content-type.js +9 -7
- package/dist/schemas/extensions/operation/x-scalar-stability.js +15 -14
- package/dist/schemas/extensions/parameter/x-global.js +12 -7
- package/dist/schemas/extensions/schema/x-additional-properties-name.js +10 -7
- package/dist/schemas/extensions/schema/x-enum-descriptions.js +17 -12
- package/dist/schemas/extensions/schema/x-enum-varnames.js +21 -8
- package/dist/schemas/extensions/schema/x-examples.js +3 -7
- package/dist/schemas/extensions/schema/x-variable.js +3 -7
- package/dist/schemas/extensions/security/index.js +1 -1
- package/dist/schemas/extensions/security/x-default-scopes.js +16 -7
- package/dist/schemas/extensions/security/x-scalar-credentials-location.js +16 -7
- package/dist/schemas/extensions/security/x-scalar-security-body.js +14 -7
- package/dist/schemas/extensions/security/x-scalar-security-query.js +14 -7
- package/dist/schemas/extensions/security/x-scalar-security-secrets.js +66 -37
- package/dist/schemas/extensions/security/x-tokenName.js +11 -7
- package/dist/schemas/extensions/security/x-use-pkce.js +6 -10
- package/dist/schemas/extensions/server/x-scalar-selected-server.js +3 -7
- package/dist/schemas/extensions/tag/index.js +1 -1
- package/dist/schemas/extensions/tag/x-display-name.js +11 -7
- package/dist/schemas/extensions/tag/x-tag-groups.js +13 -15
- package/dist/schemas/extensions/workspace/index.js +2 -11
- package/dist/schemas/extensions/workspace/x-scalar-active-proxy.js +13 -7
- package/dist/schemas/extensions/workspace/x-scalar-tabs.js +15 -13
- package/dist/schemas/extensions.js +11 -15
- package/dist/schemas/inmemory-workspace.d.ts +6 -0
- package/dist/schemas/inmemory-workspace.d.ts.map +1 -1
- package/dist/schemas/inmemory-workspace.js +13 -21
- package/dist/schemas/navigation.js +48 -85
- package/dist/schemas/reference-config/appearance.js +15 -22
- package/dist/schemas/reference-config/features.js +14 -21
- package/dist/schemas/reference-config/index.d.ts +2 -0
- package/dist/schemas/reference-config/index.d.ts.map +1 -1
- package/dist/schemas/reference-config/index.js +42 -44
- package/dist/schemas/reference-config/meta.js +11 -18
- package/dist/schemas/reference-config/routing.js +7 -14
- package/dist/schemas/reference-config/settings.d.ts +2 -0
- package/dist/schemas/reference-config/settings.d.ts.map +1 -1
- package/dist/schemas/reference-config/settings.js +10 -17
- package/dist/schemas/typebox-coerce.js +23 -6
- package/dist/schemas/v3.1/strict/callback.js +6 -12
- package/dist/schemas/v3.1/strict/components.js +26 -48
- package/dist/schemas/v3.1/strict/contact.js +9 -12
- package/dist/schemas/v3.1/strict/discriminator.js +11 -10
- package/dist/schemas/v3.1/strict/encoding.js +15 -12
- package/dist/schemas/v3.1/strict/example.js +11 -13
- package/dist/schemas/v3.1/strict/external-documentation.js +7 -10
- package/dist/schemas/v3.1/strict/header.js +27 -28
- package/dist/schemas/v3.1/strict/info.js +10 -16
- package/dist/schemas/v3.1/strict/license.js +9 -12
- package/dist/schemas/v3.1/strict/link.js +22 -19
- package/dist/schemas/v3.1/strict/media-type.js +17 -16
- package/dist/schemas/v3.1/strict/oauth-flow.js +28 -62
- package/dist/schemas/v3.1/strict/oauthflows.js +14 -20
- package/dist/schemas/v3.1/strict/openapi-document.d.ts +70 -0
- package/dist/schemas/v3.1/strict/openapi-document.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/openapi-document.js +126 -210
- package/dist/schemas/v3.1/strict/operation.js +16 -43
- package/dist/schemas/v3.1/strict/parameter.d.ts +6 -0
- package/dist/schemas/v3.1/strict/parameter.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/parameter.js +29 -35
- package/dist/schemas/v3.1/strict/path-item.js +36 -40
- package/dist/schemas/v3.1/strict/paths.js +8 -11
- package/dist/schemas/v3.1/strict/ref-definitions.js +76 -100
- package/dist/schemas/v3.1/strict/reference.js +18 -21
- package/dist/schemas/v3.1/strict/request-body.js +8 -16
- package/dist/schemas/v3.1/strict/response.js +12 -16
- package/dist/schemas/v3.1/strict/responses.js +13 -11
- package/dist/schemas/v3.1/strict/schema.js +149 -157
- package/dist/schemas/v3.1/strict/security-requirement.js +13 -12
- package/dist/schemas/v3.1/strict/security-scheme.js +29 -41
- package/dist/schemas/v3.1/strict/server-variable.js +9 -12
- package/dist/schemas/v3.1/strict/server.js +10 -13
- package/dist/schemas/v3.1/strict/tag.js +11 -20
- package/dist/schemas/v3.1/strict/type-guards.js +20 -20
- package/dist/schemas/v3.1/strict/xml.js +17 -16
- package/dist/schemas/workspace-specification/index.js +11 -23
- package/dist/schemas/workspace-specification/info.js +4 -8
- package/dist/schemas/workspace.d.ts +6 -0
- package/dist/schemas/workspace.d.ts.map +1 -1
- package/dist/schemas/workspace.js +25 -51
- package/dist/schemas.js +2 -6
- package/dist/server.js +286 -176
- package/dist/workspace-plugin.js +1 -1
- package/package.json +13 -19
- package/dist/client.js.map +0 -7
- package/dist/entities/auth/index.js.map +0 -7
- package/dist/entities/auth/schema.js.map +0 -7
- package/dist/entities/history/index.js.map +0 -7
- package/dist/entities/history/schema.js.map +0 -7
- package/dist/events/bus.js.map +0 -7
- package/dist/events/definitions/analytics.js.map +0 -7
- package/dist/events/definitions/auth.js.map +0 -7
- package/dist/events/definitions/common.js.map +0 -7
- package/dist/events/definitions/cookie.js.map +0 -7
- package/dist/events/definitions/document.js.map +0 -7
- package/dist/events/definitions/environment.js.map +0 -7
- package/dist/events/definitions/hooks.js.map +0 -7
- package/dist/events/definitions/index.js.map +0 -7
- package/dist/events/definitions/meta.js.map +0 -7
- package/dist/events/definitions/operation.js.map +0 -7
- package/dist/events/definitions/server.js.map +0 -7
- package/dist/events/definitions/tabs.js.map +0 -7
- package/dist/events/definitions/tag.js.map +0 -7
- package/dist/events/definitions/ui.js.map +0 -7
- package/dist/events/definitions/workspace.js.map +0 -7
- package/dist/events/index.js.map +0 -7
- package/dist/events/listeners.js.map +0 -7
- package/dist/events/old-definitions.js.map +0 -7
- package/dist/helpers/apply-selective-updates.d.ts +0 -19
- package/dist/helpers/apply-selective-updates.d.ts.map +0 -1
- package/dist/helpers/apply-selective-updates.js +0 -37
- package/dist/helpers/apply-selective-updates.js.map +0 -7
- package/dist/helpers/deep-clone.js.map +0 -7
- package/dist/helpers/detect-changes-proxy.js.map +0 -7
- package/dist/helpers/general.js.map +0 -7
- package/dist/helpers/generate-unique-value.js.map +0 -7
- package/dist/helpers/get-fetch.js.map +0 -7
- package/dist/helpers/get-resolved-ref.js.map +0 -7
- package/dist/helpers/is-non-optional-security-requirement.js.map +0 -7
- package/dist/helpers/merge-object.js.map +0 -7
- package/dist/helpers/overrides-proxy.js.map +0 -7
- package/dist/helpers/unpack-proxy.js.map +0 -7
- package/dist/mutators/auth.js.map +0 -7
- package/dist/mutators/cookie.js.map +0 -7
- package/dist/mutators/document.js.map +0 -7
- package/dist/mutators/environment.js.map +0 -7
- package/dist/mutators/helpers.js.map +0 -7
- package/dist/mutators/index.js.map +0 -7
- package/dist/mutators/operation/body.js.map +0 -7
- package/dist/mutators/operation/extensions.js.map +0 -7
- package/dist/mutators/operation/helpers/fetch-request-to-har.js.map +0 -7
- package/dist/mutators/operation/helpers/fetch-response-to-har.js.map +0 -7
- package/dist/mutators/operation/helpers/get-parameter-position.js.map +0 -7
- package/dist/mutators/operation/helpers/har-to-operation.js.map +0 -7
- package/dist/mutators/operation/helpers/sync-path-parameters.js.map +0 -7
- package/dist/mutators/operation/history.js.map +0 -7
- package/dist/mutators/operation/index.js.map +0 -7
- package/dist/mutators/operation/operation.js.map +0 -7
- package/dist/mutators/operation/parameters.js.map +0 -7
- package/dist/mutators/server.js.map +0 -7
- package/dist/mutators/tabs.js.map +0 -7
- package/dist/mutators/tag.js.map +0 -7
- package/dist/mutators/workspace.js.map +0 -7
- package/dist/navigation/get-navigation-options.js.map +0 -7
- package/dist/navigation/helpers/get-openapi-object.js.map +0 -7
- package/dist/navigation/helpers/get-operation-entries.js.map +0 -7
- package/dist/navigation/helpers/get-parent-entry.js.map +0 -7
- package/dist/navigation/helpers/get-tag-entries.js.map +0 -7
- package/dist/navigation/helpers/get-tag.js.map +0 -7
- package/dist/navigation/helpers/get-x-keys.js.map +0 -7
- package/dist/navigation/helpers/traverse-description.js.map +0 -7
- package/dist/navigation/helpers/traverse-document.js.map +0 -7
- package/dist/navigation/helpers/traverse-examples.js.map +0 -7
- package/dist/navigation/helpers/traverse-paths.js.map +0 -7
- package/dist/navigation/helpers/traverse-schemas.js.map +0 -7
- package/dist/navigation/helpers/traverse-tags.js.map +0 -7
- package/dist/navigation/helpers/traverse-webhooks.js.map +0 -7
- package/dist/navigation/helpers/update-order-ids.js.map +0 -7
- package/dist/navigation/helpers/utils.js.map +0 -7
- package/dist/navigation/index.js.map +0 -7
- package/dist/navigation/types.js.map +0 -7
- package/dist/persistence/index.js.map +0 -7
- package/dist/persistence/indexdb.js.map +0 -7
- package/dist/plugins/bundler/helpers.js.map +0 -7
- package/dist/plugins/bundler/index.js.map +0 -7
- package/dist/plugins/client/index.js.map +0 -7
- package/dist/plugins/client/persistence.js.map +0 -7
- package/dist/resolve.js.map +0 -7
- package/dist/schemas/compose.js.map +0 -7
- package/dist/schemas/extensions/document/x-internal.js.map +0 -7
- package/dist/schemas/extensions/document/x-scalar-environments.js.map +0 -7
- package/dist/schemas/extensions/document/x-scalar-icon.js.map +0 -7
- package/dist/schemas/extensions/document/x-scalar-ignore.js.map +0 -7
- package/dist/schemas/extensions/document/x-scalar-is-dirty.js.map +0 -7
- package/dist/schemas/extensions/document/x-scalar-original-document-hash.js.map +0 -7
- package/dist/schemas/extensions/document/x-scalar-registry-meta.js.map +0 -7
- package/dist/schemas/extensions/document/x-scalar-sdk-installation.js.map +0 -7
- package/dist/schemas/extensions/document/x-scalar-watch-mode.js.map +0 -7
- package/dist/schemas/extensions/document/x-tags.js.map +0 -7
- package/dist/schemas/extensions/example/x-disabled.js.map +0 -7
- package/dist/schemas/extensions/general/x-scalar-active-environment.js.map +0 -7
- package/dist/schemas/extensions/general/x-scalar-cookies.js.map +0 -7
- package/dist/schemas/extensions/general/x-scalar-order.js.map +0 -7
- package/dist/schemas/extensions/operation/index.js.map +0 -7
- package/dist/schemas/extensions/operation/x-badge.js.map +0 -7
- package/dist/schemas/extensions/operation/x-code-samples.js.map +0 -7
- package/dist/schemas/extensions/operation/x-draft-examples.js.map +0 -7
- package/dist/schemas/extensions/operation/x-post-response.js.map +0 -7
- package/dist/schemas/extensions/operation/x-scalar-disable-parameters.js.map +0 -7
- package/dist/schemas/extensions/operation/x-scalar-selected-content-type.js.map +0 -7
- package/dist/schemas/extensions/operation/x-scalar-stability.js.map +0 -7
- package/dist/schemas/extensions/parameter/x-global.js.map +0 -7
- package/dist/schemas/extensions/schema/x-additional-properties-name.js.map +0 -7
- package/dist/schemas/extensions/schema/x-enum-descriptions.js.map +0 -7
- package/dist/schemas/extensions/schema/x-enum-varnames.js.map +0 -7
- package/dist/schemas/extensions/schema/x-examples.js.map +0 -7
- package/dist/schemas/extensions/schema/x-variable.js.map +0 -7
- package/dist/schemas/extensions/security/index.js.map +0 -7
- package/dist/schemas/extensions/security/x-default-scopes.js.map +0 -7
- package/dist/schemas/extensions/security/x-scalar-credentials-location.js.map +0 -7
- package/dist/schemas/extensions/security/x-scalar-security-body.js.map +0 -7
- package/dist/schemas/extensions/security/x-scalar-security-query.js.map +0 -7
- package/dist/schemas/extensions/security/x-scalar-security-secrets.js.map +0 -7
- package/dist/schemas/extensions/security/x-tokenName.js.map +0 -7
- package/dist/schemas/extensions/security/x-use-pkce.js.map +0 -7
- package/dist/schemas/extensions/server/x-scalar-selected-server.js.map +0 -7
- package/dist/schemas/extensions/tag/index.js.map +0 -7
- package/dist/schemas/extensions/tag/x-display-name.js.map +0 -7
- package/dist/schemas/extensions/tag/x-tag-groups.js.map +0 -7
- package/dist/schemas/extensions/workspace/index.js.map +0 -7
- package/dist/schemas/extensions/workspace/x-scalar-active-proxy.js.map +0 -7
- package/dist/schemas/extensions/workspace/x-scalar-tabs.js.map +0 -7
- package/dist/schemas/extensions.js.map +0 -7
- package/dist/schemas/inmemory-workspace.js.map +0 -7
- package/dist/schemas/navigation.js.map +0 -7
- package/dist/schemas/reference-config/appearance.js.map +0 -7
- package/dist/schemas/reference-config/features.js.map +0 -7
- package/dist/schemas/reference-config/index.js.map +0 -7
- package/dist/schemas/reference-config/meta.js.map +0 -7
- package/dist/schemas/reference-config/routing.js.map +0 -7
- package/dist/schemas/reference-config/settings.js.map +0 -7
- package/dist/schemas/typebox-coerce.js.map +0 -7
- package/dist/schemas/v3.1/strict/callback.js.map +0 -7
- package/dist/schemas/v3.1/strict/components.js.map +0 -7
- package/dist/schemas/v3.1/strict/contact.js.map +0 -7
- package/dist/schemas/v3.1/strict/discriminator.js.map +0 -7
- package/dist/schemas/v3.1/strict/encoding.js.map +0 -7
- package/dist/schemas/v3.1/strict/example.js.map +0 -7
- package/dist/schemas/v3.1/strict/external-documentation.js.map +0 -7
- package/dist/schemas/v3.1/strict/header.js.map +0 -7
- package/dist/schemas/v3.1/strict/info.js.map +0 -7
- package/dist/schemas/v3.1/strict/license.js.map +0 -7
- package/dist/schemas/v3.1/strict/link.js.map +0 -7
- package/dist/schemas/v3.1/strict/media-type.js.map +0 -7
- package/dist/schemas/v3.1/strict/oauth-flow.js.map +0 -7
- package/dist/schemas/v3.1/strict/oauthflows.js.map +0 -7
- package/dist/schemas/v3.1/strict/openapi-document.js.map +0 -7
- package/dist/schemas/v3.1/strict/operation.js.map +0 -7
- package/dist/schemas/v3.1/strict/parameter.js.map +0 -7
- package/dist/schemas/v3.1/strict/path-item.js.map +0 -7
- package/dist/schemas/v3.1/strict/paths.js.map +0 -7
- package/dist/schemas/v3.1/strict/ref-definitions.js.map +0 -7
- package/dist/schemas/v3.1/strict/reference.js.map +0 -7
- package/dist/schemas/v3.1/strict/request-body.js.map +0 -7
- package/dist/schemas/v3.1/strict/response.js.map +0 -7
- package/dist/schemas/v3.1/strict/responses.js.map +0 -7
- package/dist/schemas/v3.1/strict/schema.js.map +0 -7
- package/dist/schemas/v3.1/strict/security-requirement.js.map +0 -7
- package/dist/schemas/v3.1/strict/security-scheme.js.map +0 -7
- package/dist/schemas/v3.1/strict/server-variable.js.map +0 -7
- package/dist/schemas/v3.1/strict/server.js.map +0 -7
- package/dist/schemas/v3.1/strict/tag.js.map +0 -7
- package/dist/schemas/v3.1/strict/type-guards.js.map +0 -7
- package/dist/schemas/v3.1/strict/xml.js.map +0 -7
- package/dist/schemas/workspace-specification/index.js.map +0 -7
- package/dist/schemas/workspace-specification/info.js.map +0 -7
- package/dist/schemas/workspace.js.map +0 -7
- package/dist/schemas.js.map +0 -7
- package/dist/server.js.map +0 -7
- package/dist/workspace-plugin.js.map +0 -7
package/dist/server.js
CHANGED
|
@@ -1,192 +1,302 @@
|
|
|
1
|
-
import fs from
|
|
2
|
-
import { cwd } from
|
|
3
|
-
import { parseJsonPointerSegments } from
|
|
4
|
-
import { getValueAtPath } from
|
|
5
|
-
import { fetchUrls, readFiles } from
|
|
6
|
-
import { escapeJsonPointer } from
|
|
7
|
-
import { upgrade } from
|
|
8
|
-
import { keyOf } from
|
|
9
|
-
import { createNavigation } from
|
|
10
|
-
import { extensions } from
|
|
11
|
-
import { coerceValue } from
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
1
|
+
import fs from 'node:fs/promises';
|
|
2
|
+
import { cwd } from 'node:process';
|
|
3
|
+
import { parseJsonPointerSegments } from '@scalar/helpers/json/parse-json-pointer-segments';
|
|
4
|
+
import { getValueAtPath } from '@scalar/helpers/object/get-value-at-path';
|
|
5
|
+
import { fetchUrls, readFiles } from '@scalar/json-magic/bundle/plugins/node';
|
|
6
|
+
import { escapeJsonPointer } from '@scalar/json-magic/helpers/escape-json-pointer';
|
|
7
|
+
import { upgrade } from '@scalar/openapi-upgrader';
|
|
8
|
+
import { keyOf } from './helpers/general.js';
|
|
9
|
+
import { createNavigation } from './navigation/index.js';
|
|
10
|
+
import { extensions } from './schemas/extensions.js';
|
|
11
|
+
import { coerceValue } from './schemas/typebox-coerce.js';
|
|
12
|
+
import { OpenAPIDocumentSchema, } from './schemas/v3.1/strict/openapi-document.js';
|
|
13
|
+
const DEFAULT_ASSETS_FOLDER = 'assets';
|
|
14
|
+
export const WORKSPACE_FILE_NAME = 'scalar-workspace.json';
|
|
15
|
+
const httpMethods = new Set(['get', 'put', 'post', 'delete', 'options', 'head', 'patch', 'trace']);
|
|
16
|
+
/**
|
|
17
|
+
* Filters an OpenAPI PathsObject to only include standard HTTP methods.
|
|
18
|
+
* Removes any vendor extensions or other non-HTTP properties.
|
|
19
|
+
*
|
|
20
|
+
* @param paths - The OpenAPI PathsObject to filter
|
|
21
|
+
* @returns A new PathsObject containing only standard HTTP methods
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* Input: {
|
|
25
|
+
* "/users": {
|
|
26
|
+
* "get": {...},
|
|
27
|
+
* "x-custom": {...},
|
|
28
|
+
* "post": {...}
|
|
29
|
+
* }
|
|
30
|
+
* }
|
|
31
|
+
* Output: {
|
|
32
|
+
* "/users": {
|
|
33
|
+
* "get": {...},
|
|
34
|
+
* "post": {...}
|
|
35
|
+
* }
|
|
36
|
+
* }
|
|
37
|
+
*/
|
|
38
|
+
export function filterHttpMethodsOnly(paths) {
|
|
39
|
+
const result = {};
|
|
40
|
+
// Todo: skip extension properties
|
|
41
|
+
for (const [path, methods] of Object.entries(paths)) {
|
|
42
|
+
if (!methods) {
|
|
43
|
+
continue;
|
|
44
|
+
}
|
|
45
|
+
const filteredMethods = {};
|
|
46
|
+
for (const [method, operation] of Object.entries(methods)) {
|
|
47
|
+
if (httpMethods.has(method.toLowerCase())) {
|
|
48
|
+
filteredMethods[method] = operation;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
if (Object.keys(filteredMethods).length > 0) {
|
|
52
|
+
result[path] = filteredMethods;
|
|
53
|
+
}
|
|
41
54
|
}
|
|
42
|
-
|
|
43
|
-
return result;
|
|
55
|
+
return result;
|
|
44
56
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
57
|
+
/**
|
|
58
|
+
* Escapes path keys in an OpenAPI PathsObject to be JSON Pointer compatible.
|
|
59
|
+
* This is necessary because OpenAPI paths can contain characters that need to be escaped
|
|
60
|
+
* when used as JSON Pointer references (like '/' and '~').
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* Input: { "/users/{id}": { ... } }
|
|
64
|
+
* Output: { "/users~1{id}": { ... } }
|
|
65
|
+
*/
|
|
66
|
+
export function escapePaths(paths) {
|
|
67
|
+
const result = {};
|
|
68
|
+
Object.keys(paths).forEach((path) => {
|
|
69
|
+
if (paths[path]) {
|
|
70
|
+
result[escapeJsonPointer(path)] = paths[path];
|
|
71
|
+
}
|
|
72
|
+
});
|
|
48
73
|
return result;
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Externalizes components by turning them into refs.
|
|
77
|
+
*/
|
|
78
|
+
export function externalizeComponentReferences(document, meta) {
|
|
79
|
+
const result = {};
|
|
80
|
+
if (!document.components) {
|
|
81
|
+
return result;
|
|
53
82
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
83
|
+
Object.entries(document.components).forEach(([type, component]) => {
|
|
84
|
+
if (!component || typeof component !== 'object') {
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
result[type] = {};
|
|
88
|
+
Object.keys(component).forEach((name) => {
|
|
89
|
+
const ref = meta.mode === 'ssr'
|
|
90
|
+
? `${meta.baseUrl}/${meta.name}/components/${type}/${name}#`
|
|
91
|
+
: `./chunks/${meta.name}/components/${type}/${name}.json#`;
|
|
92
|
+
result[type][name] = { '$ref': ref, $global: true };
|
|
93
|
+
});
|
|
58
94
|
});
|
|
59
|
-
});
|
|
60
|
-
return result;
|
|
61
|
-
}
|
|
62
|
-
function externalizePathReferences(document, meta) {
|
|
63
|
-
const result = {};
|
|
64
|
-
if (!document.paths) {
|
|
65
95
|
return result;
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Externalizes paths operations by turning them into refs.
|
|
99
|
+
*/
|
|
100
|
+
export function externalizePathReferences(document, meta) {
|
|
101
|
+
const result = {};
|
|
102
|
+
if (!document.paths) {
|
|
103
|
+
return result;
|
|
70
104
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
105
|
+
Object.entries(document.paths).forEach(([path, pathItem]) => {
|
|
106
|
+
if (!pathItem || typeof pathItem !== 'object') {
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
const pathItemRecord = pathItem;
|
|
110
|
+
result[path] = {};
|
|
111
|
+
const escapedPath = escapeJsonPointer(path);
|
|
112
|
+
keyOf(pathItemRecord).forEach((type) => {
|
|
113
|
+
if (httpMethods.has(type)) {
|
|
114
|
+
const ref = meta.mode === 'ssr'
|
|
115
|
+
? `${meta.baseUrl}/${meta.name}/operations/${escapedPath}/${type}#`
|
|
116
|
+
: `./chunks/${meta.name}/operations/${escapedPath}/${type}.json#`;
|
|
117
|
+
result[path][type] = { '$ref': ref, $global: true };
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
result[path][type] = pathItemRecord[type];
|
|
121
|
+
}
|
|
122
|
+
});
|
|
81
123
|
});
|
|
82
|
-
|
|
83
|
-
return result;
|
|
124
|
+
return result;
|
|
84
125
|
}
|
|
126
|
+
/**
|
|
127
|
+
* Resolves a workspace document from various input sources (URL, local file, or direct document object).
|
|
128
|
+
*
|
|
129
|
+
* @param workspaceDocument - The document input to resolve, which can be:
|
|
130
|
+
* - A URL to fetch the document from
|
|
131
|
+
* - A local file path to read the document from
|
|
132
|
+
* - A direct document object
|
|
133
|
+
* @returns A promise that resolves to an object containing:
|
|
134
|
+
* - ok: boolean indicating if the resolution was successful
|
|
135
|
+
* - data: The resolved document data
|
|
136
|
+
*
|
|
137
|
+
* @example
|
|
138
|
+
* // Resolve from URL
|
|
139
|
+
* const urlDoc = await loadDocument({ name: 'api', url: 'https://api.example.com/openapi.json' })
|
|
140
|
+
*
|
|
141
|
+
* // Resolve direct document
|
|
142
|
+
* const directDoc = await loadDocument({
|
|
143
|
+
* name: 'inline',
|
|
144
|
+
* document: { openapi: '3.0.0', paths: {} }
|
|
145
|
+
* })
|
|
146
|
+
*/
|
|
85
147
|
function loadDocument(workspaceDocument) {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
148
|
+
if ('url' in workspaceDocument) {
|
|
149
|
+
return fetchUrls().exec(workspaceDocument.url);
|
|
150
|
+
}
|
|
151
|
+
if ('path' in workspaceDocument) {
|
|
152
|
+
return readFiles().exec(workspaceDocument.path);
|
|
153
|
+
}
|
|
154
|
+
return Promise.resolve({
|
|
155
|
+
ok: true,
|
|
156
|
+
data: workspaceDocument.document,
|
|
157
|
+
raw: JSON.stringify(workspaceDocument.document),
|
|
158
|
+
});
|
|
97
159
|
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
160
|
+
/**
|
|
161
|
+
* Create server state workspace store
|
|
162
|
+
*/
|
|
163
|
+
export async function createServerWorkspaceStore(workspaceProps) {
|
|
164
|
+
/**
|
|
165
|
+
* Base workspace document containing essential metadata and document references.
|
|
166
|
+
*
|
|
167
|
+
* This workspace document provides the minimal information needed for initial rendering.
|
|
168
|
+
* All components and path operations are replaced with references to enable lazy loading.
|
|
169
|
+
*
|
|
170
|
+
* In SSR mode, references point to API endpoints.
|
|
171
|
+
* In static mode, references point to filesystem chunks.
|
|
172
|
+
*/
|
|
173
|
+
const workspace = {
|
|
174
|
+
...workspaceProps.meta,
|
|
175
|
+
documents: {},
|
|
110
176
|
};
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
177
|
+
/**
|
|
178
|
+
* A map of document chunks that can be loaded asynchronously by the client.
|
|
179
|
+
* Each document is split into components and operations to enable lazy loading.
|
|
180
|
+
* The keys are document names and values contain the components and operations
|
|
181
|
+
* for that document.
|
|
182
|
+
*/
|
|
183
|
+
const assets = {};
|
|
184
|
+
/**
|
|
185
|
+
* Adds a new document to the workspace.
|
|
186
|
+
*
|
|
187
|
+
* This function processes an OpenAPI document by:
|
|
188
|
+
* 1. Converting it to OpenAPI 3.1 format if needed
|
|
189
|
+
* 2. Separating it into reusable components and path operations
|
|
190
|
+
* 3. Externalizing references based on the workspace mode (SSR or static)
|
|
191
|
+
* 4. Adding the processed document to the workspace with its metadata
|
|
192
|
+
*
|
|
193
|
+
* The resulting document contains minimal information with externalized references
|
|
194
|
+
* that will be resolved on-demand through the workspace's get() method.
|
|
195
|
+
*
|
|
196
|
+
* @param document - The OpenAPI document to process and add
|
|
197
|
+
* @param meta - Document metadata containing the required name and optional settings
|
|
198
|
+
*/
|
|
199
|
+
const addDocumentSync = (document, meta, navigationOptions) => {
|
|
200
|
+
const { name, ...documentMeta } = meta;
|
|
201
|
+
const documentV3 = coerceValue(OpenAPIDocumentSchema, upgrade(document, '3.1'));
|
|
202
|
+
// add the assets
|
|
203
|
+
assets[meta.name] = {
|
|
204
|
+
components: documentV3.components,
|
|
205
|
+
operations: documentV3.paths && escapePaths(filterHttpMethodsOnly(documentV3.paths)),
|
|
206
|
+
};
|
|
207
|
+
const options = workspaceProps.mode === 'ssr'
|
|
208
|
+
? { mode: workspaceProps.mode, name, baseUrl: workspaceProps.baseUrl }
|
|
209
|
+
: { mode: workspaceProps.mode, name, directory: workspaceProps.directory ?? DEFAULT_ASSETS_FOLDER };
|
|
210
|
+
const components = externalizeComponentReferences(documentV3, options);
|
|
211
|
+
const paths = externalizePathReferences(documentV3, options);
|
|
212
|
+
// Build the sidebar entries
|
|
213
|
+
const navigation = createNavigation(name, documentV3, navigationOptions ?? workspaceProps.navigationOptions);
|
|
214
|
+
// The document is now a minimal version with externalized references to components and operations.
|
|
215
|
+
// These references will be resolved asynchronously when needed through the workspace's get() method.
|
|
216
|
+
workspace.documents[meta.name] = {
|
|
217
|
+
...documentMeta,
|
|
218
|
+
...documentV3,
|
|
219
|
+
components,
|
|
220
|
+
paths,
|
|
221
|
+
[extensions.document.navigation]: navigation,
|
|
222
|
+
};
|
|
121
223
|
};
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
const basePath = `${cwd()}/${workspaceProps.directory ?? DEFAULT_ASSETS_FOLDER}`;
|
|
138
|
-
await fs.mkdir(basePath, { recursive: true });
|
|
139
|
-
await fs.writeFile(`${basePath}/${WORKSPACE_FILE_NAME}`, JSON.stringify(workspace));
|
|
140
|
-
for (const [name, { components, operations }] of Object.entries(assets)) {
|
|
141
|
-
if (components) {
|
|
142
|
-
for (const [type, component] of Object.entries(components)) {
|
|
143
|
-
const componentPath = `${basePath}/chunks/${name}/components/${type}`;
|
|
144
|
-
await fs.mkdir(componentPath, { recursive: true });
|
|
145
|
-
for (const [key, value] of Object.entries(component)) {
|
|
146
|
-
await fs.writeFile(`${componentPath}/${key}.json`, JSON.stringify(value));
|
|
147
|
-
}
|
|
148
|
-
}
|
|
224
|
+
/**
|
|
225
|
+
* Adds a new document to the workspace asynchronously.
|
|
226
|
+
*
|
|
227
|
+
* This function:
|
|
228
|
+
* 1. Loads the document using the provided input
|
|
229
|
+
* 2. Checks if the document loaded successfully
|
|
230
|
+
* 3. If successful, adds the document to the workspace using addDocumentSync
|
|
231
|
+
*
|
|
232
|
+
* @param input - The document input containing the document source and metadata
|
|
233
|
+
*/
|
|
234
|
+
const addDocument = async (input, navigationOptions) => {
|
|
235
|
+
const document = await loadDocument(input);
|
|
236
|
+
if (!document.ok) {
|
|
237
|
+
console.warn(`Failed to load document "${input.name}`);
|
|
238
|
+
return;
|
|
149
239
|
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
240
|
+
addDocumentSync(document.data, { name: input.name, ...input.meta }, navigationOptions);
|
|
241
|
+
};
|
|
242
|
+
// Load and process all initial documents in parallel
|
|
243
|
+
await Promise.all(workspaceProps.documents.map((document) => addDocument(document)));
|
|
244
|
+
return {
|
|
245
|
+
generateWorkspaceChunks: async () => {
|
|
246
|
+
if (workspaceProps.mode !== 'static') {
|
|
247
|
+
throw 'Mode has to be set to `static` to generate filesystem workspace chunks';
|
|
156
248
|
}
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
249
|
+
// Write the workspace document
|
|
250
|
+
const basePath = `${cwd()}/${workspaceProps.directory ?? DEFAULT_ASSETS_FOLDER}`;
|
|
251
|
+
await fs.mkdir(basePath, { recursive: true });
|
|
252
|
+
// Write the workspace contents on the file system
|
|
253
|
+
await fs.writeFile(`${basePath}/${WORKSPACE_FILE_NAME}`, JSON.stringify(workspace));
|
|
254
|
+
// Write the chunks
|
|
255
|
+
for (const [name, { components, operations }] of Object.entries(assets)) {
|
|
256
|
+
// Write the components chunks
|
|
257
|
+
if (components) {
|
|
258
|
+
for (const [type, component] of Object.entries(components)) {
|
|
259
|
+
const componentPath = `${basePath}/chunks/${name}/components/${type}`;
|
|
260
|
+
await fs.mkdir(componentPath, { recursive: true });
|
|
261
|
+
for (const [key, value] of Object.entries(component)) {
|
|
262
|
+
await fs.writeFile(`${componentPath}/${key}.json`, JSON.stringify(value));
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
// Write the operations chunks
|
|
267
|
+
if (operations) {
|
|
268
|
+
for (const [path, methods] of Object.entries(operations)) {
|
|
269
|
+
const operationPath = `${basePath}/chunks/${name}/operations/${path}`;
|
|
270
|
+
await fs.mkdir(operationPath, { recursive: true });
|
|
271
|
+
for (const [method, operation] of Object.entries(methods)) {
|
|
272
|
+
await fs.writeFile(`${operationPath}/${method}.json`, JSON.stringify(operation));
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
},
|
|
278
|
+
getWorkspace: () => {
|
|
279
|
+
return workspace;
|
|
280
|
+
},
|
|
281
|
+
get: (pointer) => {
|
|
282
|
+
const pointerPath = (() => {
|
|
283
|
+
if (pointer.startsWith('#')) {
|
|
284
|
+
return pointer.slice(1);
|
|
285
|
+
}
|
|
286
|
+
if (pointer.startsWith('/')) {
|
|
287
|
+
return pointer;
|
|
288
|
+
}
|
|
289
|
+
try {
|
|
290
|
+
return new URL(pointer).pathname;
|
|
291
|
+
}
|
|
292
|
+
catch {
|
|
293
|
+
return pointer;
|
|
294
|
+
}
|
|
295
|
+
})();
|
|
296
|
+
// Keep the path segments escaped cuz we store them on the filesystem as escaped sequences
|
|
297
|
+
const path = parseJsonPointerSegments(pointerPath).map(escapeJsonPointer);
|
|
298
|
+
return getValueAtPath(assets, path);
|
|
299
|
+
},
|
|
300
|
+
addDocument,
|
|
301
|
+
};
|
|
183
302
|
}
|
|
184
|
-
export {
|
|
185
|
-
WORKSPACE_FILE_NAME,
|
|
186
|
-
createServerWorkspaceStore,
|
|
187
|
-
escapePaths,
|
|
188
|
-
externalizeComponentReferences,
|
|
189
|
-
externalizePathReferences,
|
|
190
|
-
filterHttpMethodsOnly
|
|
191
|
-
};
|
|
192
|
-
//# sourceMappingURL=server.js.map
|
package/dist/workspace-plugin.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"openapi",
|
|
17
17
|
"scalar"
|
|
18
18
|
],
|
|
19
|
-
"version": "0.40.
|
|
19
|
+
"version": "0.40.4",
|
|
20
20
|
"engines": {
|
|
21
21
|
"node": ">=22"
|
|
22
22
|
},
|
|
@@ -138,31 +138,25 @@
|
|
|
138
138
|
"type-fest": "^5.3.1",
|
|
139
139
|
"vue": "^3.5.26",
|
|
140
140
|
"yaml": "^2.8.0",
|
|
141
|
-
"@scalar/
|
|
142
|
-
"@scalar/
|
|
143
|
-
"@scalar/json-magic": "0.12.
|
|
144
|
-
"@scalar/
|
|
145
|
-
"@scalar/snippetz": "0.7.
|
|
146
|
-
"@scalar/types": "0.7.
|
|
147
|
-
"@scalar/
|
|
141
|
+
"@scalar/code-highlight": "0.3.1",
|
|
142
|
+
"@scalar/helpers": "0.4.2",
|
|
143
|
+
"@scalar/json-magic": "0.12.4",
|
|
144
|
+
"@scalar/object-utils": "1.3.3",
|
|
145
|
+
"@scalar/snippetz": "0.7.6",
|
|
146
|
+
"@scalar/types": "0.7.4",
|
|
147
|
+
"@scalar/openapi-upgrader": "0.2.2"
|
|
148
148
|
},
|
|
149
149
|
"devDependencies": {
|
|
150
150
|
"@google-cloud/storage": "7.16.0",
|
|
151
151
|
"fake-indexeddb": "6.2.3",
|
|
152
152
|
"fastify": "^5.3.3",
|
|
153
|
-
"vite": "
|
|
154
|
-
"vitest": "4.0
|
|
155
|
-
"@scalar/build-tooling": "0.5.0"
|
|
153
|
+
"vite": "8.0.0",
|
|
154
|
+
"vitest": "4.1.0"
|
|
156
155
|
},
|
|
157
156
|
"scripts": {
|
|
158
|
-
"build": "
|
|
159
|
-
"
|
|
160
|
-
"format:check": "scalar-format-check",
|
|
161
|
-
"generate-json-schemas": "vite-node ./scripts/generate-json-schemas.ts",
|
|
162
|
-
"lint:check": "scalar-lint-check",
|
|
163
|
-
"lint:fix": "scalar-lint-fix",
|
|
157
|
+
"build": "tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json",
|
|
158
|
+
"generate-json-schemas": "tsx ./scripts/generate-json-schemas.ts",
|
|
164
159
|
"test": "vitest",
|
|
165
|
-
"types:
|
|
166
|
-
"types:check": "scalar-types-check"
|
|
160
|
+
"types:check": "tsc --noEmit"
|
|
167
161
|
}
|
|
168
162
|
}
|