zudoku 0.0.0-fd8f8ad → 0.0.0-feat-bundled-types.1c7f1db
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/README.md +1 -1
- package/cli.js +9 -0
- package/dist/app/ZuploBuildConfig.d.ts +155 -0
- package/dist/app/ZuploBuildConfig.js +29 -0
- package/dist/app/ZuploBuildConfig.js.map +1 -0
- package/dist/app/demo.js +1 -2
- package/dist/app/demo.js.map +1 -1
- package/dist/app/entry.client.d.ts +6 -0
- package/dist/app/entry.client.js +51 -15
- package/dist/app/entry.client.js.map +1 -1
- package/dist/app/entry.server.d.ts +9 -6
- package/dist/app/entry.server.js +14 -10
- package/dist/app/entry.server.js.map +1 -1
- package/dist/app/env.d.ts +33 -0
- package/dist/app/env.js +29 -0
- package/dist/app/env.js.map +1 -0
- package/dist/app/main.d.ts +2 -2
- package/dist/app/main.js +41 -35
- package/dist/app/main.js.map +1 -1
- package/dist/app/sentry.d.ts +3 -0
- package/dist/app/sentry.js +19 -0
- package/dist/app/sentry.js.map +1 -0
- package/dist/app/standalone.js +1 -2
- package/dist/app/standalone.js.map +1 -1
- package/dist/cli/build/handler.d.ts +1 -3
- package/dist/cli/build/handler.js +9 -1
- package/dist/cli/build/handler.js.map +1 -1
- package/dist/cli/cli.js +17 -3
- package/dist/cli/cli.js.map +1 -1
- package/dist/cli/cmds/build.d.ts +11 -3
- package/dist/cli/cmds/build.js +21 -13
- package/dist/cli/cmds/build.js.map +1 -1
- package/dist/cli/cmds/dev.d.ts +1 -1
- package/dist/cli/cmds/dev.js +5 -0
- package/dist/cli/cmds/dev.js.map +1 -1
- package/dist/cli/cmds/preview.d.ts +16 -0
- package/dist/cli/cmds/preview.js +25 -0
- package/dist/cli/cmds/preview.js.map +1 -0
- package/dist/cli/common/logger.js +9 -0
- package/dist/cli/common/logger.js.map +1 -1
- package/dist/cli/common/machine-id/lib.js +1 -0
- package/dist/cli/common/machine-id/lib.js.map +1 -1
- package/dist/cli/common/outdated.js +2 -1
- package/dist/cli/common/outdated.js.map +1 -1
- package/dist/cli/common/output.js.map +1 -1
- package/dist/cli/common/utils/ports.d.ts +1 -1
- package/dist/cli/common/utils/ports.js +16 -15
- package/dist/cli/common/utils/ports.js.map +1 -1
- package/dist/cli/dev/handler.d.ts +1 -0
- package/dist/cli/dev/handler.js +15 -12
- package/dist/cli/dev/handler.js.map +1 -1
- package/dist/cli/preview/handler.d.ts +3 -0
- package/dist/cli/preview/handler.js +35 -0
- package/dist/cli/preview/handler.js.map +1 -0
- package/dist/config/config.d.ts +20 -16
- package/dist/config/file-exists.d.ts +1 -0
- package/dist/config/file-exists.js +5 -0
- package/dist/config/file-exists.js.map +1 -0
- package/dist/config/loader.d.ts +21 -0
- package/dist/config/loader.js +145 -0
- package/dist/config/loader.js.map +1 -0
- package/dist/config/validators/BuildSchema.d.ts +60 -0
- package/dist/config/validators/BuildSchema.js +31 -0
- package/dist/config/validators/BuildSchema.js.map +1 -0
- package/dist/config/validators/InputSidebarSchema.d.ts +46 -30
- package/dist/config/validators/InputSidebarSchema.js +11 -1
- package/dist/config/validators/InputSidebarSchema.js.map +1 -1
- package/dist/config/validators/icon-types.d.ts +1 -0
- package/dist/config/validators/icon-types.js +2 -0
- package/dist/config/validators/icon-types.js.map +1 -0
- package/dist/config/validators/validate.d.ts +4334 -173
- package/dist/config/validators/validate.js +278 -112
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/index.d.ts +7 -3
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/MissingIcon.d.ts +2 -0
- package/dist/lib/MissingIcon.js +7 -0
- package/dist/lib/MissingIcon.js.map +1 -0
- package/dist/lib/authentication/AuthenticationPlugin.d.ts +6 -4
- package/dist/lib/authentication/AuthenticationPlugin.js +4 -1
- package/dist/lib/authentication/AuthenticationPlugin.js.map +1 -1
- package/dist/lib/authentication/authentication.d.ts +4 -5
- package/dist/lib/authentication/components/CallbackHandler.js +6 -2
- package/dist/lib/authentication/components/CallbackHandler.js.map +1 -1
- package/dist/lib/authentication/components/SignIn.d.ts +1 -1
- package/dist/lib/authentication/components/SignIn.js +5 -2
- package/dist/lib/authentication/components/SignIn.js.map +1 -1
- package/dist/lib/authentication/components/SignOut.js +2 -2
- package/dist/lib/authentication/components/SignOut.js.map +1 -1
- package/dist/lib/authentication/components/SignUp.d.ts +1 -1
- package/dist/lib/authentication/components/SignUp.js +4 -1
- package/dist/lib/authentication/components/SignUp.js.map +1 -1
- package/dist/lib/authentication/hook.d.ts +6 -4
- package/dist/lib/authentication/hook.js +12 -4
- package/dist/lib/authentication/hook.js.map +1 -1
- package/dist/lib/authentication/providers/auth0.d.ts +2 -2
- package/dist/lib/authentication/providers/auth0.js +5 -4
- package/dist/lib/authentication/providers/auth0.js.map +1 -1
- package/dist/lib/authentication/providers/clerk.d.ts +2 -2
- package/dist/lib/authentication/providers/clerk.js +116 -47
- package/dist/lib/authentication/providers/clerk.js.map +1 -1
- package/dist/lib/authentication/providers/openid.d.ts +21 -19
- package/dist/lib/authentication/providers/openid.js +62 -69
- package/dist/lib/authentication/providers/openid.js.map +1 -1
- package/dist/lib/authentication/providers/supabase.d.ts +4 -0
- package/dist/lib/authentication/providers/supabase.js +115 -0
- package/dist/lib/authentication/providers/supabase.js.map +1 -0
- package/dist/lib/authentication/state.d.ts +23 -19
- package/dist/lib/authentication/state.js +35 -10
- package/dist/lib/authentication/state.js.map +1 -1
- package/dist/lib/components/AnchorLink.d.ts +2 -2
- package/dist/lib/components/AnchorLink.js +9 -5
- package/dist/lib/components/AnchorLink.js.map +1 -1
- package/dist/lib/components/Autocomplete.d.ts +13 -0
- package/dist/lib/components/Autocomplete.js +47 -0
- package/dist/lib/components/Autocomplete.js.map +1 -0
- package/dist/lib/components/Banner.js +1 -1
- package/dist/lib/components/Banner.js.map +1 -1
- package/dist/lib/components/Bootstrap.d.ts +5 -5
- package/dist/lib/components/Bootstrap.js +14 -13
- package/dist/lib/components/Bootstrap.js.map +1 -1
- package/dist/lib/components/BuildCheck.d.ts +4 -0
- package/dist/lib/components/BuildCheck.js +38 -0
- package/dist/lib/components/BuildCheck.js.map +1 -0
- package/dist/lib/components/ErrorPage.js +1 -1
- package/dist/lib/components/Footer.d.ts +1 -0
- package/dist/lib/components/Footer.js +32 -0
- package/dist/lib/components/Footer.js.map +1 -0
- package/dist/lib/components/Header.js +28 -12
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/Heading.d.ts +5 -5
- package/dist/lib/components/Heading.js +6 -1
- package/dist/lib/components/Heading.js.map +1 -1
- package/dist/lib/components/InlineCode.d.ts +2 -1
- package/dist/lib/components/InlineCode.js +2 -9
- package/dist/lib/components/InlineCode.js.map +1 -1
- package/dist/lib/components/Layout.js +10 -21
- package/dist/lib/components/Layout.js.map +1 -1
- package/dist/lib/components/Main.d.ts +2 -0
- package/dist/lib/components/Main.js +18 -0
- package/dist/lib/components/Main.js.map +1 -0
- package/dist/lib/components/Markdown.d.ts +4 -2
- package/dist/lib/components/Markdown.js +14 -13
- package/dist/lib/components/Markdown.js.map +1 -1
- package/dist/lib/components/MobileTopNavigation.js +10 -8
- package/dist/lib/components/MobileTopNavigation.js.map +1 -1
- package/dist/lib/components/NotFoundPage.js +2 -2
- package/dist/lib/components/NotFoundPage.js.map +1 -1
- package/dist/lib/components/Pagination.d.ts +11 -0
- package/dist/lib/components/Pagination.js +10 -0
- package/dist/lib/components/Pagination.js.map +1 -0
- package/dist/lib/components/PathRenderer.d.ts +11 -0
- package/dist/lib/components/PathRenderer.js +28 -0
- package/dist/lib/components/PathRenderer.js.map +1 -0
- package/dist/lib/components/ReactMarkdown.d.ts +29 -0
- package/dist/lib/components/ReactMarkdown.js +182 -0
- package/dist/lib/components/ReactMarkdown.js.map +1 -0
- package/dist/lib/components/Search.d.ts +3 -1
- package/dist/lib/components/Search.js +9 -3
- package/dist/lib/components/Search.js.map +1 -1
- package/dist/lib/components/Slot.d.ts +17 -0
- package/dist/lib/components/Slot.js +24 -0
- package/dist/lib/components/Slot.js.map +1 -0
- package/dist/lib/components/Slot.test.js +168 -0
- package/dist/lib/components/Slot.test.js.map +1 -0
- package/dist/lib/components/StatusPage.d.ts +7 -0
- package/dist/lib/components/StatusPage.js +71 -0
- package/dist/lib/components/StatusPage.js.map +1 -0
- package/dist/lib/components/ThemeSwitch.js +10 -5
- package/dist/lib/components/ThemeSwitch.js.map +1 -1
- package/dist/lib/components/TopNavigation.d.ts +3 -3
- package/dist/lib/components/TopNavigation.js +35 -23
- package/dist/lib/components/TopNavigation.js.map +1 -1
- package/dist/lib/components/Zudoku.d.ts +1 -1
- package/dist/lib/components/Zudoku.js +14 -9
- package/dist/lib/components/Zudoku.js.map +1 -1
- package/dist/lib/components/cache.d.ts +13 -0
- package/dist/lib/components/cache.js +20 -0
- package/dist/lib/components/cache.js.map +1 -0
- package/dist/lib/components/context/BypassProtectedRoutesContext.d.ts +1 -0
- package/dist/lib/components/context/BypassProtectedRoutesContext.js +3 -0
- package/dist/lib/components/context/BypassProtectedRoutesContext.js.map +1 -0
- package/dist/lib/components/context/RouterEventsEmitter.d.ts +1 -0
- package/dist/lib/components/context/RouterEventsEmitter.js +17 -0
- package/dist/lib/components/context/RouterEventsEmitter.js.map +1 -0
- package/dist/lib/components/context/SlotProvider.d.ts +26 -0
- package/dist/lib/components/context/SlotProvider.js +83 -0
- package/dist/lib/components/context/SlotProvider.js.map +1 -0
- package/dist/lib/components/context/ViewportAnchorContext.d.ts +2 -4
- package/dist/lib/components/context/ViewportAnchorContext.js +29 -23
- package/dist/lib/components/context/ViewportAnchorContext.js.map +1 -1
- package/dist/lib/components/context/ZudokuContext.d.ts +2 -2
- package/dist/lib/components/context/ZudokuContext.js +20 -8
- package/dist/lib/components/context/ZudokuContext.js.map +1 -1
- package/dist/lib/components/context/ZudokuProvider.js +2 -1
- package/dist/lib/components/context/ZudokuProvider.js.map +1 -1
- package/dist/lib/components/index.d.ts +56 -15
- package/dist/lib/components/index.js +28 -7
- package/dist/lib/components/index.js.map +1 -1
- package/dist/lib/components/navigation/PoweredByZudoku.d.ts +3 -0
- package/dist/lib/components/navigation/PoweredByZudoku.js +7 -0
- package/dist/lib/components/navigation/PoweredByZudoku.js.map +1 -0
- package/dist/lib/components/navigation/Sidebar.d.ts +5 -1
- package/dist/lib/components/navigation/Sidebar.js +4 -8
- package/dist/lib/components/navigation/Sidebar.js.map +1 -1
- package/dist/lib/components/navigation/SidebarBadge.d.ts +6 -3
- package/dist/lib/components/navigation/SidebarBadge.js +13 -11
- package/dist/lib/components/navigation/SidebarBadge.js.map +1 -1
- package/dist/lib/components/navigation/SidebarCategory.d.ts +3 -3
- package/dist/lib/components/navigation/SidebarCategory.js +33 -24
- package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
- package/dist/lib/components/navigation/SidebarItem.d.ts +2 -8
- package/dist/lib/components/navigation/SidebarItem.js +30 -33
- package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
- package/dist/lib/components/navigation/SidebarWrapper.d.ts +7 -6
- package/dist/lib/components/navigation/SidebarWrapper.js +18 -3
- package/dist/lib/components/navigation/SidebarWrapper.js.map +1 -1
- package/dist/lib/{plugins/markdown → components/navigation}/Toc.js +6 -8
- package/dist/lib/components/navigation/Toc.js.map +1 -0
- package/dist/lib/components/navigation/ZudokuLogo.d.ts +6 -0
- package/dist/lib/components/navigation/ZudokuLogo.js +5 -0
- package/dist/lib/components/navigation/ZudokuLogo.js.map +1 -0
- package/dist/lib/components/navigation/ZuploLogo.d.ts +3 -0
- package/dist/lib/components/navigation/ZuploLogo.js +4 -0
- package/dist/lib/components/navigation/ZuploLogo.js.map +1 -0
- package/dist/lib/components/navigation/utils.d.ts +8 -0
- package/dist/lib/components/navigation/utils.js +35 -7
- package/dist/lib/components/navigation/utils.js.map +1 -1
- package/dist/lib/core/RouteGuard.d.ts +2 -0
- package/dist/lib/core/RouteGuard.js +52 -0
- package/dist/lib/core/RouteGuard.js.map +1 -0
- package/dist/lib/core/ZudokuContext.d.ts +52 -11
- package/dist/lib/core/ZudokuContext.js +38 -12
- package/dist/lib/core/ZudokuContext.js.map +1 -1
- package/dist/lib/core/plugins.d.ts +25 -8
- package/dist/lib/core/plugins.js +4 -0
- package/dist/lib/core/plugins.js.map +1 -1
- package/dist/lib/errors/ErrorAlert.js +6 -1
- package/dist/lib/errors/ErrorAlert.js.map +1 -1
- package/dist/lib/errors/RouterError.js +1 -1
- package/dist/lib/errors/RouterError.js.map +1 -1
- package/dist/lib/hooks/index.d.ts +22 -0
- package/dist/lib/hooks/index.js +16 -0
- package/dist/lib/hooks/index.js.map +1 -0
- package/dist/lib/hooks/useEvent.d.ts +11 -0
- package/dist/lib/hooks/useEvent.js +19 -0
- package/dist/lib/hooks/useEvent.js.map +1 -0
- package/dist/lib/hooks/useEvent.test.js +100 -0
- package/dist/lib/hooks/useEvent.test.js.map +1 -0
- package/dist/lib/icons.d.ts +1 -0
- package/dist/lib/icons.js +1 -0
- package/dist/lib/icons.js.map +1 -1
- package/dist/lib/oas/graphql/circular.d.ts +3 -0
- package/dist/lib/oas/graphql/circular.js +43 -0
- package/dist/lib/oas/graphql/circular.js.map +1 -0
- package/dist/lib/oas/graphql/index.d.ts +25 -1
- package/dist/lib/oas/graphql/index.js +213 -66
- package/dist/lib/oas/graphql/index.js.map +1 -1
- package/dist/lib/oas/parser/dereference/index.js +8 -3
- package/dist/lib/oas/parser/dereference/index.js.map +1 -1
- package/dist/lib/oas/parser/index.d.ts +8 -3
- package/dist/lib/oas/parser/index.js +7 -23
- package/dist/lib/oas/parser/index.js.map +1 -1
- package/dist/lib/oas/parser/upgrade/index.d.ts +3 -2
- package/dist/lib/oas/parser/upgrade/index.js +83 -33
- package/dist/lib/oas/parser/upgrade/index.js.map +1 -1
- package/dist/lib/plugins/api-catalog/Catalog.d.ts +4 -0
- package/dist/lib/plugins/api-catalog/Catalog.js +26 -0
- package/dist/lib/plugins/api-catalog/Catalog.js.map +1 -0
- package/dist/lib/plugins/api-catalog/index.d.ts +31 -0
- package/dist/lib/plugins/api-catalog/index.js +46 -0
- package/dist/lib/plugins/api-catalog/index.js.map +1 -0
- package/dist/lib/plugins/api-keys/CreateApiKey.d.ts +3 -2
- package/dist/lib/plugins/api-keys/CreateApiKey.js +15 -7
- package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -1
- package/dist/lib/plugins/api-keys/ProtectedRoute.js +1 -1
- package/dist/lib/plugins/api-keys/ProtectedRoute.js.map +1 -1
- package/dist/lib/plugins/api-keys/SettingsApiKeys.d.ts +1 -1
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js +153 -27
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
- package/dist/lib/plugins/api-keys/index.d.ts +21 -11
- package/dist/lib/plugins/api-keys/index.js +49 -30
- package/dist/lib/plugins/api-keys/index.js.map +1 -1
- package/dist/lib/plugins/custom-pages/index.d.ts +1 -1
- package/dist/lib/plugins/markdown/MdxPage.d.ts +10 -2
- package/dist/lib/plugins/markdown/MdxPage.js +17 -4
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/lib/plugins/markdown/index.d.ts +3 -1
- package/dist/lib/plugins/markdown/index.js +1 -1
- package/dist/lib/plugins/markdown/index.js.map +1 -1
- package/dist/lib/plugins/markdown/resolver.d.ts +1 -7
- package/dist/lib/plugins/markdown/resolver.js +0 -29
- package/dist/lib/plugins/markdown/resolver.js.map +1 -1
- package/dist/lib/plugins/openapi/CollapsibleCode.js +2 -1
- package/dist/lib/plugins/openapi/CollapsibleCode.js.map +1 -1
- package/dist/lib/plugins/openapi/ColorizedParam.d.ts +10 -2
- package/dist/lib/plugins/openapi/ColorizedParam.js +19 -8
- package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -1
- package/dist/lib/plugins/openapi/Endpoint.d.ts +1 -1
- package/dist/lib/plugins/openapi/Endpoint.js +8 -7
- package/dist/lib/plugins/openapi/Endpoint.js.map +1 -1
- package/dist/lib/plugins/openapi/OasProvider.d.ts +8 -0
- package/dist/lib/plugins/openapi/OasProvider.js +29 -0
- package/dist/lib/plugins/openapi/OasProvider.js.map +1 -0
- package/dist/lib/plugins/openapi/OperationList.d.ts +5 -2
- package/dist/lib/plugins/openapi/OperationList.js +92 -11
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.d.ts +5 -3
- package/dist/lib/plugins/openapi/OperationListItem.js +12 -6
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/ParamInfos.d.ts +6 -0
- package/dist/lib/plugins/openapi/ParamInfos.js +45 -0
- package/dist/lib/plugins/openapi/ParamInfos.js.map +1 -0
- package/dist/lib/plugins/openapi/ParameterList.d.ts +2 -1
- package/dist/lib/plugins/openapi/ParameterList.js +3 -2
- package/dist/lib/plugins/openapi/ParameterList.js.map +1 -1
- package/dist/lib/plugins/openapi/ParameterListItem.js +16 -3
- package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.d.ts +4 -2
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +17 -4
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -1
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.d.ts +3 -4
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.js +5 -13
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.d.ts +2 -4
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.js +4 -13
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/SchemaList.d.ts +1 -0
- package/dist/lib/plugins/openapi/SchemaList.js +53 -0
- package/dist/lib/plugins/openapi/SchemaList.js.map +1 -0
- package/dist/lib/plugins/openapi/Sidecar.js +60 -93
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/SidecarBox.js +4 -4
- package/dist/lib/plugins/openapi/SidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/SidecarExamples.d.ts +9 -0
- package/dist/lib/plugins/openapi/SidecarExamples.js +76 -0
- package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -0
- package/dist/lib/plugins/openapi/SimpleSelect.js +1 -1
- package/dist/lib/plugins/openapi/SimpleSelect.js.map +1 -1
- package/dist/lib/plugins/openapi/client/GraphQLClient.d.ts +2 -2
- package/dist/lib/plugins/openapi/client/GraphQLClient.js +23 -82
- package/dist/lib/plugins/openapi/client/GraphQLClient.js.map +1 -1
- package/dist/lib/plugins/openapi/client/createServer.d.ts +2 -1
- package/dist/lib/plugins/openapi/client/createServer.js +5 -2
- package/dist/lib/plugins/openapi/client/createServer.js.map +1 -1
- package/dist/lib/plugins/openapi/client/useCreateQuery.d.ts +11 -2
- package/dist/lib/plugins/openapi/client/useCreateQuery.js +14 -7
- package/dist/lib/plugins/openapi/client/useCreateQuery.js.map +1 -1
- package/dist/lib/plugins/openapi/components/ConstValue.d.ts +5 -0
- package/dist/lib/plugins/openapi/components/ConstValue.js +6 -0
- package/dist/lib/plugins/openapi/components/ConstValue.js.map +1 -0
- package/dist/lib/plugins/openapi/components/EnumValues.d.ts +5 -0
- package/dist/lib/plugins/openapi/components/EnumValues.js +15 -0
- package/dist/lib/plugins/openapi/components/EnumValues.js.map +1 -0
- package/dist/lib/plugins/openapi/components/ResponseContent.d.ts +12 -0
- package/dist/lib/plugins/openapi/components/ResponseContent.js +21 -0
- package/dist/lib/plugins/openapi/components/ResponseContent.js.map +1 -0
- package/dist/lib/plugins/openapi/components/SelectOnClick.d.ts +5 -0
- package/dist/lib/plugins/openapi/components/SelectOnClick.js +16 -0
- package/dist/lib/plugins/openapi/components/SelectOnClick.js.map +1 -0
- package/dist/lib/plugins/openapi/context.d.ts +3 -3
- package/dist/lib/plugins/openapi/graphql/gql.d.ts +11 -3
- package/dist/lib/plugins/openapi/graphql/gql.js +5 -14
- package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/graphql.d.ts +113 -21
- package/dist/lib/plugins/openapi/graphql/graphql.js +55 -11
- package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
- package/dist/lib/plugins/openapi/index.d.ts +10 -7
- package/dist/lib/plugins/openapi/index.js +65 -82
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/openapi/interfaces.d.ts +57 -3
- package/dist/lib/plugins/openapi/playground/BodyPanel.d.ts +5 -0
- package/dist/lib/plugins/openapi/playground/BodyPanel.js +22 -0
- package/dist/lib/plugins/openapi/playground/BodyPanel.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.d.ts +6 -0
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js +9 -0
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/Headers.d.ts +4 -4
- package/dist/lib/plugins/openapi/playground/Headers.js +84 -5
- package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/IdentityDialog.d.ts +11 -0
- package/dist/lib/plugins/openapi/playground/IdentityDialog.js +14 -0
- package/dist/lib/plugins/openapi/playground/IdentityDialog.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/IdentitySelector.d.ts +7 -0
- package/dist/lib/plugins/openapi/playground/IdentitySelector.js +8 -0
- package/dist/lib/plugins/openapi/playground/IdentitySelector.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/ParamsGrid.d.ts +9 -0
- package/dist/lib/plugins/openapi/playground/ParamsGrid.js +5 -0
- package/dist/lib/plugins/openapi/playground/ParamsGrid.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/PathParams.d.ts +3 -2
- package/dist/lib/plugins/openapi/playground/PathParams.js +5 -7
- package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.d.ts +32 -2
- package/dist/lib/plugins/openapi/playground/Playground.js +147 -78
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +1 -1
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/QueryParams.d.ts +1 -1
- package/dist/lib/plugins/openapi/playground/QueryParams.js +24 -18
- package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/RequestLoginDialog.d.ts +7 -0
- package/dist/lib/plugins/openapi/playground/RequestLoginDialog.js +8 -0
- package/dist/lib/plugins/openapi/playground/RequestLoginDialog.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/fileUtils.d.ts +2 -0
- package/dist/lib/plugins/openapi/playground/fileUtils.js +22 -0
- package/dist/lib/plugins/openapi/playground/fileUtils.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/rememberedIdentity.d.ts +17 -0
- package/dist/lib/plugins/openapi/playground/rememberedIdentity.js +11 -0
- package/dist/lib/plugins/openapi/playground/rememberedIdentity.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.d.ts +7 -0
- package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js +11 -0
- package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.d.ts +11 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +110 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.d.ts +9 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js +17 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.d.ts +10 -0
- package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.js +32 -0
- package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.test.d.ts +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.test.js +56 -0
- package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.test.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/useRememberSkipLoginDialog.d.ts +16 -0
- package/dist/lib/plugins/openapi/playground/useRememberSkipLoginDialog.js +10 -0
- package/dist/lib/plugins/openapi/playground/useRememberSkipLoginDialog.js.map +1 -0
- package/dist/lib/plugins/openapi/processors/removeExtensions.d.ts +8 -0
- package/dist/lib/plugins/openapi/processors/removeExtensions.js +16 -0
- package/dist/lib/plugins/openapi/processors/removeExtensions.js.map +1 -0
- package/dist/lib/plugins/openapi/processors/removeExtensions.test.d.ts +1 -0
- package/dist/lib/plugins/openapi/processors/removeExtensions.test.js +194 -0
- package/dist/lib/plugins/openapi/processors/removeExtensions.test.js.map +1 -0
- package/dist/lib/plugins/openapi/processors/removeParameters.d.ts +12 -0
- package/dist/lib/plugins/openapi/processors/removeParameters.js +66 -0
- package/dist/lib/plugins/openapi/processors/removeParameters.js.map +1 -0
- package/dist/lib/plugins/openapi/processors/removeParameters.test.d.ts +1 -0
- package/dist/lib/plugins/openapi/processors/removeParameters.test.js +159 -0
- package/dist/lib/plugins/openapi/processors/removeParameters.test.js.map +1 -0
- package/dist/lib/plugins/openapi/processors/removePaths.d.ts +13 -0
- package/dist/lib/plugins/openapi/processors/removePaths.js +33 -0
- package/dist/lib/plugins/openapi/processors/removePaths.js.map +1 -0
- package/dist/lib/plugins/openapi/processors/removePaths.test.d.ts +1 -0
- package/dist/lib/plugins/openapi/processors/removePaths.test.js +144 -0
- package/dist/lib/plugins/openapi/processors/removePaths.test.js.map +1 -0
- package/dist/lib/plugins/openapi/processors/traverse.d.ts +1 -0
- package/dist/lib/plugins/openapi/processors/traverse.js +2 -0
- package/dist/lib/plugins/openapi/processors/traverse.js.map +1 -0
- package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.d.ts +1 -2
- package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.js +2 -2
- package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.d.ts +2 -1
- package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.js +2 -2
- package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.d.ts +0 -1
- package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.js +1 -1
- package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.d.ts +4 -0
- package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js +15 -0
- package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js.map +1 -0
- package/dist/lib/plugins/openapi/schema/{SchemaComponents.d.ts → SchemaPropertyItem.d.ts} +2 -4
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js +45 -0
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -0
- package/dist/lib/plugins/openapi/schema/SchemaView.d.ts +2 -2
- package/dist/lib/plugins/openapi/schema/SchemaView.js +38 -50
- package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/utils.d.ts +8 -1
- package/dist/lib/plugins/openapi/schema/utils.js +15 -4
- package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
- package/dist/lib/plugins/openapi/state.d.ts +25 -0
- package/dist/lib/plugins/openapi/state.js +18 -0
- package/dist/lib/plugins/openapi/state.js.map +1 -0
- package/dist/lib/plugins/openapi/util/createHttpSnippet.d.ts +11 -0
- package/dist/lib/plugins/openapi/util/createHttpSnippet.js +89 -0
- package/dist/lib/plugins/openapi/util/createHttpSnippet.js.map +1 -0
- package/dist/lib/plugins/openapi/util/createSidebarCategory.d.ts +9 -0
- package/dist/lib/plugins/openapi/util/createSidebarCategory.js +23 -0
- package/dist/lib/plugins/openapi/util/createSidebarCategory.js.map +1 -0
- package/dist/lib/plugins/openapi/util/generateSchemaExample.d.ts +1 -1
- package/dist/lib/plugins/openapi/util/generateSchemaExample.js +62 -10
- package/dist/lib/plugins/openapi/util/generateSchemaExample.js.map +1 -1
- package/dist/lib/plugins/openapi/util/getRoutes.d.ts +10 -0
- package/dist/lib/plugins/openapi/util/getRoutes.js +117 -0
- package/dist/lib/plugins/openapi/util/getRoutes.js.map +1 -0
- package/dist/lib/plugins/openapi/util/methodColorMap.d.ts +2 -0
- package/dist/lib/plugins/openapi/util/methodColorMap.js +10 -0
- package/dist/lib/plugins/openapi/util/methodColorMap.js.map +1 -0
- package/dist/lib/plugins/openapi/util/methodToColor.d.ts +20 -0
- package/dist/lib/plugins/openapi/util/methodToColor.js +24 -0
- package/dist/lib/plugins/openapi/util/methodToColor.js.map +1 -0
- package/dist/lib/plugins/openapi/util/sanitizeMarkdownForMetatag.d.ts +1 -0
- package/dist/lib/plugins/openapi/util/sanitizeMarkdownForMetatag.js +27 -0
- package/dist/lib/plugins/openapi/util/sanitizeMarkdownForMetatag.js.map +1 -0
- package/dist/lib/plugins/redirect/index.d.ts +1 -1
- package/dist/lib/plugins/redirect/index.js +1 -1
- package/dist/lib/plugins/redirect/index.js.map +1 -1
- package/dist/lib/plugins/search-inkeep/index.d.ts +22 -3
- package/dist/lib/plugins/search-inkeep/index.js +41 -5
- package/dist/lib/plugins/search-inkeep/index.js.map +1 -1
- package/dist/lib/plugins/search-inkeep/inkeep.d.ts +3 -4
- package/dist/lib/plugins/search-inkeep/inkeep.js.map +1 -1
- package/dist/lib/plugins/search-pagefind/PagefindSearch.d.ts +6 -0
- package/dist/lib/plugins/search-pagefind/PagefindSearch.js +80 -0
- package/dist/lib/plugins/search-pagefind/PagefindSearch.js.map +1 -0
- package/dist/lib/plugins/search-pagefind/ResultList.d.ts +8 -0
- package/dist/lib/plugins/search-pagefind/ResultList.js +32 -0
- package/dist/lib/plugins/search-pagefind/ResultList.js.map +1 -0
- package/dist/lib/plugins/search-pagefind/get-results.d.ts +10 -0
- package/dist/lib/plugins/search-pagefind/get-results.js +42 -0
- package/dist/lib/plugins/search-pagefind/get-results.js.map +1 -0
- package/dist/lib/plugins/search-pagefind/index.d.ts +6 -0
- package/dist/lib/plugins/search-pagefind/index.js +9 -0
- package/dist/lib/plugins/search-pagefind/index.js.map +1 -0
- package/dist/lib/plugins/search-pagefind/types.d.ts +85 -0
- package/dist/lib/plugins/search-pagefind/types.js +2 -0
- package/dist/lib/plugins/search-pagefind/types.js.map +1 -0
- package/dist/lib/shiki.d.ts +31 -0
- package/dist/lib/shiki.js +101 -0
- package/dist/lib/shiki.js.map +1 -0
- package/dist/lib/ui/Badge.d.ts +2 -2
- package/dist/lib/ui/Badge.js +2 -1
- package/dist/lib/ui/Badge.js.map +1 -1
- package/dist/lib/ui/Button.d.ts +3 -3
- package/dist/lib/ui/Button.js +9 -6
- package/dist/lib/ui/Button.js.map +1 -1
- package/dist/lib/ui/Callout.d.ts +2 -1
- package/dist/lib/ui/Callout.js +3 -2
- package/dist/lib/ui/Callout.js.map +1 -1
- package/dist/lib/ui/Card.js +1 -1
- package/dist/lib/ui/Card.js.map +1 -1
- package/dist/lib/ui/Checkbox.js +1 -1
- package/dist/lib/ui/Checkbox.js.map +1 -1
- package/dist/lib/ui/CodeBlock.d.ts +16 -0
- package/dist/lib/ui/CodeBlock.js +18 -0
- package/dist/lib/ui/CodeBlock.js.map +1 -0
- package/dist/lib/ui/Command.d.ts +16 -2
- package/dist/lib/ui/Command.js +9 -5
- package/dist/lib/ui/Command.js.map +1 -1
- package/dist/lib/ui/Dialog.d.ts +3 -1
- package/dist/lib/ui/Dialog.js +2 -2
- package/dist/lib/ui/Dialog.js.map +1 -1
- package/dist/lib/ui/DropdownMenu.js +4 -4
- package/dist/lib/ui/DropdownMenu.js.map +1 -1
- package/dist/lib/ui/Form.d.ts +1 -1
- package/dist/lib/ui/HoverCard.js +1 -1
- package/dist/lib/ui/HoverCard.js.map +1 -1
- package/dist/lib/ui/Input.d.ts +1 -2
- package/dist/lib/ui/Input.js +1 -1
- package/dist/lib/ui/Input.js.map +1 -1
- package/dist/lib/ui/Popover.js +1 -1
- package/dist/lib/ui/Popover.js.map +1 -1
- package/dist/lib/ui/RadioGroup.js +1 -1
- package/dist/lib/ui/RadioGroup.js.map +1 -1
- package/dist/lib/ui/Select.js +4 -4
- package/dist/lib/ui/Select.js.map +1 -1
- package/dist/lib/ui/Slider.js +1 -1
- package/dist/lib/ui/Slider.js.map +1 -1
- package/dist/lib/ui/Stepper.d.ts +3 -0
- package/dist/lib/ui/Stepper.js +7 -0
- package/dist/lib/ui/Stepper.js.map +1 -0
- package/dist/lib/ui/Switch.js +1 -1
- package/dist/lib/ui/Switch.js.map +1 -1
- package/dist/lib/ui/SyntaxHighlight.d.ts +10 -0
- package/dist/lib/ui/SyntaxHighlight.js +14 -0
- package/dist/lib/ui/SyntaxHighlight.js.map +1 -0
- package/dist/lib/ui/Tabs.js +2 -2
- package/dist/lib/ui/Tabs.js.map +1 -1
- package/dist/lib/ui/Textarea.js +1 -1
- package/dist/lib/ui/Textarea.js.map +1 -1
- package/dist/lib/ui/Toggle.js +1 -1
- package/dist/lib/ui/Toggle.js.map +1 -1
- package/dist/lib/ui/Tooltip.d.ts +2 -1
- package/dist/lib/ui/Tooltip.js +2 -1
- package/dist/lib/ui/Tooltip.js.map +1 -1
- package/dist/lib/ui/util.d.ts +2 -0
- package/dist/lib/ui/util.js +3 -0
- package/dist/lib/ui/util.js.map +1 -0
- package/dist/lib/util/MdxComponents.d.ts +29 -20
- package/dist/lib/util/MdxComponents.js +17 -15
- package/dist/lib/util/MdxComponents.js.map +1 -1
- package/dist/lib/util/createVariantComponent.d.ts +2 -2
- package/dist/lib/util/detectOS.d.ts +1 -0
- package/dist/lib/util/detectOS.js +11 -0
- package/dist/lib/util/detectOS.js.map +1 -0
- package/dist/lib/util/ensureArray.d.ts +1 -0
- package/dist/lib/util/ensureArray.js +2 -0
- package/dist/lib/util/ensureArray.js.map +1 -0
- package/dist/lib/util/humanFileSize.d.ts +6 -0
- package/dist/lib/util/humanFileSize.js +14 -0
- package/dist/lib/util/humanFileSize.js.map +1 -0
- package/dist/lib/util/humanFileSize.test.d.ts +1 -0
- package/dist/lib/util/humanFileSize.test.js +22 -0
- package/dist/lib/util/humanFileSize.test.js.map +1 -0
- package/dist/lib/util/joinPath.d.ts +3 -0
- package/dist/lib/util/joinPath.js +3 -0
- package/dist/lib/util/joinPath.js.map +1 -1
- package/dist/lib/util/joinUrl.d.ts +1 -0
- package/dist/lib/util/joinUrl.js +40 -0
- package/dist/lib/util/joinUrl.js.map +1 -0
- package/dist/lib/util/joinUrl.test.d.ts +1 -0
- package/dist/lib/util/joinUrl.test.js +43 -0
- package/dist/lib/util/joinUrl.test.js.map +1 -0
- package/dist/lib/util/scrollIntoViewIfNeeded.d.ts +1 -0
- package/dist/lib/util/scrollIntoViewIfNeeded.js +14 -0
- package/dist/lib/util/scrollIntoViewIfNeeded.js.map +1 -0
- package/dist/lib/util/traverse.d.ts +3 -0
- package/dist/lib/util/traverse.js +23 -0
- package/dist/lib/util/traverse.js.map +1 -0
- package/dist/lib/util/types.d.ts +7 -0
- package/dist/lib/util/types.js +2 -0
- package/dist/lib/util/types.js.map +1 -0
- package/dist/lib/util/url.d.ts +4 -0
- package/dist/lib/util/url.js +13 -0
- package/dist/lib/util/url.js.map +1 -0
- package/dist/lib/util/url.test.d.ts +1 -0
- package/dist/lib/util/url.test.js +26 -0
- package/dist/lib/util/url.test.js.map +1 -0
- package/dist/lib/util/useExposedProps.d.ts +8 -1
- package/dist/lib/util/useExposedProps.js +1 -1
- package/dist/lib/util/useExposedProps.js.map +1 -1
- package/dist/lib/util/useLatest.d.ts +1 -0
- package/dist/lib/util/useLatest.js +15 -0
- package/dist/lib/util/useLatest.js.map +1 -0
- package/dist/lib/util/useOnScreen.d.ts +3 -2
- package/dist/lib/util/useOnScreen.js +3 -3
- package/dist/lib/util/useOnScreen.js.map +1 -1
- package/dist/lib/util/useScrollToAnchor.d.ts +1 -0
- package/dist/lib/util/useScrollToAnchor.js +42 -37
- package/dist/lib/util/useScrollToAnchor.js.map +1 -1
- package/dist/lib/util/useScrollToTop.js +7 -5
- package/dist/lib/util/useScrollToTop.js.map +1 -1
- package/dist/vite/api/SchemaManager.d.ts +36 -0
- package/dist/vite/api/SchemaManager.js +137 -0
- package/dist/vite/api/SchemaManager.js.map +1 -0
- package/dist/vite/api/SchemaManager.test.d.ts +1 -0
- package/dist/vite/api/SchemaManager.test.js +106 -0
- package/dist/vite/api/SchemaManager.test.js.map +1 -0
- package/dist/vite/api/schema-codegen.d.ts +12 -0
- package/dist/vite/api/schema-codegen.js +85 -0
- package/dist/vite/api/schema-codegen.js.map +1 -0
- package/dist/vite/api/schema-codegen.test.d.ts +1 -0
- package/dist/vite/api/schema-codegen.test.js +313 -0
- package/dist/vite/api/schema-codegen.test.js.map +1 -0
- package/dist/vite/build.js +82 -18
- package/dist/vite/build.js.map +1 -1
- package/dist/vite/config.d.ts +2 -10
- package/dist/vite/config.js +105 -111
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/config.test.js +12 -6
- package/dist/vite/config.test.js.map +1 -1
- package/dist/vite/create-pagefind-index.d.ts +4 -0
- package/dist/vite/create-pagefind-index.js +12 -0
- package/dist/vite/create-pagefind-index.js.map +1 -0
- package/dist/vite/css/collect.d.ts +2 -0
- package/dist/vite/css/collect.js +27 -0
- package/dist/vite/css/collect.js.map +1 -0
- package/dist/vite/css/plugin.d.ts +4 -0
- package/dist/vite/css/plugin.js +80 -0
- package/dist/vite/css/plugin.js.map +1 -0
- package/dist/vite/dev-server.d.ts +5 -3
- package/dist/vite/dev-server.js +73 -22
- package/dist/vite/dev-server.js.map +1 -1
- package/dist/vite/error-handler.d.ts +1 -1
- package/dist/vite/error-handler.js +1 -1
- package/dist/vite/error-handler.js.map +1 -1
- package/dist/vite/html.d.ts +7 -3
- package/dist/vite/html.js +15 -9
- package/dist/vite/html.js.map +1 -1
- package/dist/vite/output.d.ts +15 -3
- package/dist/vite/output.js +41 -14
- package/dist/vite/output.js.map +1 -1
- package/dist/vite/plugin-api-keys.d.ts +1 -2
- package/dist/vite/plugin-api-keys.js +13 -7
- package/dist/vite/plugin-api-keys.js.map +1 -1
- package/dist/vite/plugin-api.d.ts +1 -2
- package/dist/vite/plugin-api.js +146 -32
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/plugin-auth.d.ts +1 -2
- package/dist/vite/plugin-auth.js +10 -6
- package/dist/vite/plugin-auth.js.map +1 -1
- package/dist/vite/plugin-component.d.ts +1 -2
- package/dist/vite/plugin-component.js +23 -22
- package/dist/vite/plugin-component.js.map +1 -1
- package/dist/vite/plugin-config-reload.d.ts +3 -4
- package/dist/vite/plugin-config-reload.js +29 -23
- package/dist/vite/plugin-config-reload.js.map +1 -1
- package/dist/vite/plugin-config.d.ts +1 -2
- package/dist/vite/plugin-config.js +27 -2
- package/dist/vite/plugin-config.js.map +1 -1
- package/dist/vite/plugin-configure-tailwind.d.ts +2 -0
- package/dist/vite/plugin-configure-tailwind.js +38 -0
- package/dist/vite/plugin-configure-tailwind.js.map +1 -0
- package/dist/vite/plugin-custom-pages.d.ts +1 -2
- package/dist/vite/plugin-custom-pages.js +6 -5
- package/dist/vite/plugin-custom-pages.js.map +1 -1
- package/dist/vite/plugin-docs.d.ts +2 -3
- package/dist/vite/plugin-docs.js +26 -8
- package/dist/vite/plugin-docs.js.map +1 -1
- package/dist/vite/plugin-frontmatter.d.ts +1 -2
- package/dist/vite/plugin-frontmatter.js +8 -6
- package/dist/vite/plugin-frontmatter.js.map +1 -1
- package/dist/vite/plugin-mdx.d.ts +1 -2
- package/dist/vite/plugin-mdx.js +89 -23
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/dist/vite/plugin-redirect.d.ts +1 -2
- package/dist/vite/plugin-redirect.js +6 -5
- package/dist/vite/plugin-redirect.js.map +1 -1
- package/dist/vite/plugin-search.d.ts +1 -2
- package/dist/vite/plugin-search.js +8 -3
- package/dist/vite/plugin-search.js.map +1 -1
- package/dist/vite/plugin-shiki-register.d.ts +2 -0
- package/dist/vite/plugin-shiki-register.js +39 -0
- package/dist/vite/plugin-shiki-register.js.map +1 -0
- package/dist/vite/plugin-sidebar.d.ts +4 -3
- package/dist/vite/plugin-sidebar.js +24 -8
- package/dist/vite/plugin-sidebar.js.map +1 -1
- package/dist/vite/{plugin-custom-css.d.ts → plugin-theme-css.d.ts} +2 -3
- package/dist/vite/{plugin-custom-css.js → plugin-theme-css.js} +29 -7
- package/dist/vite/plugin-theme-css.js.map +1 -0
- package/dist/vite/plugin.d.ts +1 -3
- package/dist/vite/plugin.js +25 -18
- package/dist/vite/plugin.js.map +1 -1
- package/dist/vite/prerender/FileWritingResponse.d.ts +25 -0
- package/dist/vite/prerender/FileWritingResponse.js +51 -0
- package/dist/vite/prerender/FileWritingResponse.js.map +1 -0
- package/dist/vite/prerender/InMemoryResponse.d.ts +16 -0
- package/dist/vite/prerender/InMemoryResponse.js +32 -0
- package/dist/vite/prerender/InMemoryResponse.js.map +1 -0
- package/dist/vite/prerender/PrerenderResponse.d.ts +10 -0
- package/dist/vite/prerender/PrerenderResponse.js +2 -0
- package/dist/vite/prerender/PrerenderResponse.js.map +1 -0
- package/dist/vite/prerender/prerender.d.ts +15 -0
- package/dist/vite/prerender/prerender.js +109 -0
- package/dist/vite/prerender/prerender.js.map +1 -0
- package/dist/vite/prerender/worker.d.ts +13 -0
- package/dist/vite/prerender/worker.js +59 -0
- package/dist/vite/prerender/worker.js.map +1 -0
- package/dist/vite/remarkStaticGeneration.js +5 -5
- package/dist/vite/remarkStaticGeneration.js.map +1 -1
- package/dist/vite/reporter.d.ts +3 -0
- package/dist/vite/reporter.js +33 -0
- package/dist/vite/reporter.js.map +1 -0
- package/dist/vite/sitemap.d.ts +1 -1
- package/dist/vite/sitemap.js +2 -1
- package/dist/vite/sitemap.js.map +1 -1
- package/dist/zuplo/enrich-with-zuplo.d.ts +5 -0
- package/dist/zuplo/enrich-with-zuplo.js +185 -0
- package/dist/zuplo/enrich-with-zuplo.js.map +1 -0
- package/dist/zuplo/policy-types.d.ts +33 -0
- package/dist/zuplo/policy-types.js +8 -0
- package/dist/zuplo/policy-types.js.map +1 -0
- package/dist/zuplo/with-zuplo-processors.d.ts +3 -0
- package/dist/zuplo/with-zuplo-processors.js +26 -0
- package/dist/zuplo/with-zuplo-processors.js.map +1 -0
- package/dist/zuplo/with-zuplo.d.ts +6 -0
- package/dist/zuplo/with-zuplo.js +10 -0
- package/dist/zuplo/with-zuplo.js.map +1 -0
- package/lib/Button-BE9IVkWV.js +51 -0
- package/lib/Button-BE9IVkWV.js.map +1 -0
- package/lib/Callout-CoVxYafP.js +231 -0
- package/lib/Callout-CoVxYafP.js.map +1 -0
- package/lib/Card-DPhGbYUM.js +61 -0
- package/lib/Card-DPhGbYUM.js.map +1 -0
- package/lib/{CategoryHeading-Bb9dqxD3.js → CategoryHeading-Cu2RwgjC.js} +3 -3
- package/lib/{CategoryHeading-Bb9dqxD3.js.map → CategoryHeading-Cu2RwgjC.js.map} +1 -1
- package/lib/ClientOnly-E7hGysn1.js.map +1 -1
- package/lib/Dialog-BxpuVLh9.js +99 -0
- package/lib/Dialog-BxpuVLh9.js.map +1 -0
- package/lib/Drawer-BzkOKwgC.js +1133 -0
- package/lib/Drawer-BzkOKwgC.js.map +1 -0
- package/lib/{Markdown-BorQdbxW.js → Markdown-Cm4kj26S.js} +6073 -5916
- package/lib/Markdown-Cm4kj26S.js.map +1 -0
- package/lib/MdxPage-fDGQtB5w.js +84 -0
- package/lib/MdxPage-fDGQtB5w.js.map +1 -0
- package/lib/OasProvider-CFBvfR3r.js +33 -0
- package/lib/OasProvider-CFBvfR3r.js.map +1 -0
- package/lib/OperationList-Xs4KWmsh.js +5153 -0
- package/lib/OperationList-Xs4KWmsh.js.map +1 -0
- package/lib/Pagination-CCxhL836.js +36 -0
- package/lib/Pagination-CCxhL836.js.map +1 -0
- package/lib/RouteGuard-CZ_uLv3g.js +55 -0
- package/lib/RouteGuard-CZ_uLv3g.js.map +1 -0
- package/lib/SchemaList-BWaNlmUJ.js +160 -0
- package/lib/SchemaList-BWaNlmUJ.js.map +1 -0
- package/lib/SchemaView-DdKJt2ln.js +375 -0
- package/lib/SchemaView-DdKJt2ln.js.map +1 -0
- package/lib/SignUp-B-1Pvc-8.js +63 -0
- package/lib/SignUp-B-1Pvc-8.js.map +1 -0
- package/lib/Slot-B99cbD-q.js +160 -0
- package/lib/Slot-B99cbD-q.js.map +1 -0
- package/lib/{Spinner-3cQDBVGr.js → Spinner-mNLZ6awP.js} +2 -2
- package/lib/{Spinner-3cQDBVGr.js.map → Spinner-mNLZ6awP.js.map} +1 -1
- package/lib/SyntaxHighlight-Cz6Me7-F.js +10279 -0
- package/lib/SyntaxHighlight-Cz6Me7-F.js.map +1 -0
- package/lib/Toc-Qe7A4uj_.js +92 -0
- package/lib/Toc-Qe7A4uj_.js.map +1 -0
- package/lib/chunk-DQRVZFIR-BblmKnHy.js +1839 -0
- package/lib/chunk-DQRVZFIR-BblmKnHy.js.map +1 -0
- package/lib/circular-w5eL5J8a.js +14934 -0
- package/lib/circular-w5eL5J8a.js.map +1 -0
- package/lib/clsx-OuTLNxxd.js +17 -0
- package/lib/clsx-OuTLNxxd.js.map +1 -0
- package/lib/{cn-BmFQLtkS.js → cn-wvCW-ho6.js} +1016 -564
- package/lib/cn-wvCW-ho6.js.map +1 -0
- package/lib/createServer-p3yUA8Bu.js +12649 -0
- package/lib/createServer-p3yUA8Bu.js.map +1 -0
- package/lib/hook-k7PfUIsj.js +1465 -0
- package/lib/hook-k7PfUIsj.js.map +1 -0
- package/lib/index--oeBayMa.js +86 -0
- package/lib/index--oeBayMa.js.map +1 -0
- package/lib/{index-LNp6rxyU.js → index-BvvmIczU.js} +2 -2
- package/lib/{index-LNp6rxyU.js.map → index-BvvmIczU.js.map} +1 -1
- package/lib/index-CrcNWbel.js +316 -0
- package/lib/index-CrcNWbel.js.map +1 -0
- package/lib/index-DI5SPFK9.js +36 -0
- package/lib/index-DI5SPFK9.js.map +1 -0
- package/lib/index-QzXzw_ra.js +24 -0
- package/lib/index-QzXzw_ra.js.map +1 -0
- package/lib/index-yqBxBqxF.js +3226 -0
- package/lib/index-yqBxBqxF.js.map +1 -0
- package/lib/{assets/index-B_Jk_Yzp.js → index-zddirpDj.js} +727 -725
- package/lib/index-zddirpDj.js.map +1 -0
- package/lib/index.esm-BFcSKCe-.js +683 -0
- package/lib/index.esm-BFcSKCe-.js.map +1 -0
- package/lib/index.esm-Cp4wkyud.js +1236 -0
- package/lib/index.esm-Cp4wkyud.js.map +1 -0
- package/lib/invariant-DAFpPywt.js +48 -0
- package/lib/{invariant-Caa8-XvF.js.map → invariant-DAFpPywt.js.map} +1 -1
- package/lib/joinPath-B7kNnUX4.js +8 -0
- package/lib/joinPath-B7kNnUX4.js.map +1 -0
- package/lib/jsx-runtime-C5mzlN2N.js +285 -0
- package/lib/jsx-runtime-C5mzlN2N.js.map +1 -0
- package/lib/mutation-BSeQ8pEK.js +196 -0
- package/lib/mutation-BSeQ8pEK.js.map +1 -0
- package/lib/objectEntries-yMIkr2mI.js +5 -0
- package/lib/objectEntries-yMIkr2mI.js.map +1 -0
- package/lib/processors/removeExtensions.js +11 -0
- package/lib/processors/removeExtensions.js.map +1 -0
- package/lib/processors/removeParameters.js +47 -0
- package/lib/processors/removeParameters.js.map +1 -0
- package/lib/processors/removePaths.js +28 -0
- package/lib/processors/removePaths.js.map +1 -0
- package/lib/processors/traverse.js +17 -0
- package/lib/processors/traverse.js.map +1 -0
- package/lib/react-nprogress.esm-C2MPXjiJ.js +389 -0
- package/lib/react-nprogress.esm-C2MPXjiJ.js.map +1 -0
- package/lib/ui/Accordion.js +2 -2
- package/lib/ui/Accordion.js.map +1 -1
- package/lib/ui/ActionButton.js +4 -4
- package/lib/ui/ActionButton.js.map +1 -1
- package/lib/ui/Alert.js +3 -3
- package/lib/ui/Alert.js.map +1 -1
- package/lib/ui/AlertDialog.js +2 -2
- package/lib/ui/AlertDialog.js.map +1 -1
- package/lib/ui/Badge.js +5 -4
- package/lib/ui/Badge.js.map +1 -1
- package/lib/ui/Breadcrumb.js +5 -5
- package/lib/ui/Breadcrumb.js.map +1 -1
- package/lib/ui/Button.js +22 -19
- package/lib/ui/Button.js.map +1 -1
- package/lib/ui/Callout.js +40 -20
- package/lib/ui/Callout.js.map +1 -1
- package/lib/ui/Card.js +3 -3
- package/lib/ui/Card.js.map +1 -1
- package/lib/ui/Carousel.js +552 -546
- package/lib/ui/Carousel.js.map +1 -1
- package/lib/ui/Checkbox.js +14 -13
- package/lib/ui/Checkbox.js.map +1 -1
- package/lib/ui/CodeBlock.js +84 -0
- package/lib/ui/CodeBlock.js.map +1 -0
- package/lib/ui/Command.js +116 -510
- package/lib/ui/Command.js.map +1 -1
- package/lib/ui/Dialog.js +27 -27
- package/lib/ui/Dialog.js.map +1 -1
- package/lib/ui/Drawer.js +14 -1150
- package/lib/ui/Drawer.js.map +1 -1
- package/lib/ui/DropdownMenu.js +35 -35
- package/lib/ui/DropdownMenu.js.map +1 -1
- package/lib/ui/Form.js +6 -6
- package/lib/ui/Form.js.map +1 -1
- package/lib/ui/HoverCard.js +6 -6
- package/lib/ui/HoverCard.js.map +1 -1
- package/lib/ui/Input.js +3 -3
- package/lib/ui/Input.js.map +1 -1
- package/lib/ui/Label.js +3 -3
- package/lib/ui/Pagination.js +5 -5
- package/lib/ui/Pagination.js.map +1 -1
- package/lib/ui/Popover.js +3 -3
- package/lib/ui/Popover.js.map +1 -1
- package/lib/ui/Progress.js +2 -2
- package/lib/ui/Progress.js.map +1 -1
- package/lib/ui/RadioGroup.js +11 -11
- package/lib/ui/RadioGroup.js.map +1 -1
- package/lib/ui/ScrollArea.js +2 -2
- package/lib/ui/ScrollArea.js.map +1 -1
- package/lib/ui/Select.js +34 -34
- package/lib/ui/Select.js.map +1 -1
- package/lib/ui/Skeleton.js +2 -2
- package/lib/ui/Skeleton.js.map +1 -1
- package/lib/ui/Slider.js +6 -6
- package/lib/ui/Slider.js.map +1 -1
- package/lib/ui/Stepper.js +6 -0
- package/lib/ui/Stepper.js.map +1 -0
- package/lib/ui/Switch.js +6 -6
- package/lib/ui/Switch.js.map +1 -1
- package/lib/ui/SyntaxHighlight.js +10 -0
- package/lib/ui/SyntaxHighlight.js.map +1 -0
- package/lib/ui/Tabs.js +17 -17
- package/lib/ui/Tabs.js.map +1 -1
- package/lib/ui/Textarea.js +6 -6
- package/lib/ui/Textarea.js.map +1 -1
- package/lib/ui/Toggle.js +8 -8
- package/lib/ui/Toggle.js.map +1 -1
- package/lib/ui/ToggleGroup.js +2 -2
- package/lib/ui/ToggleGroup.js.map +1 -1
- package/lib/ui/Tooltip.js +15 -8
- package/lib/ui/Tooltip.js.map +1 -1
- package/lib/ui/util.js +6 -0
- package/lib/ui/util.js.map +1 -0
- package/lib/useExposedProps-BZQkZneR.js +9 -0
- package/lib/useExposedProps-BZQkZneR.js.map +1 -0
- package/lib/useLatest-hmRS46UF.js +11 -0
- package/lib/useLatest-hmRS46UF.js.map +1 -0
- package/lib/useMutation-CZSmsIGW.js +97 -0
- package/lib/useMutation-CZSmsIGW.js.map +1 -0
- package/lib/zudoku.auth-auth0.js +33 -36
- package/lib/zudoku.auth-auth0.js.map +1 -1
- package/lib/zudoku.auth-clerk.js +115 -58
- package/lib/zudoku.auth-clerk.js.map +1 -1
- package/lib/zudoku.auth-openid.js +585 -601
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.components.js +4286 -1297
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.hooks.js +28 -0
- package/lib/zudoku.hooks.js.map +1 -0
- package/lib/zudoku.icons.js +10 -0
- package/lib/zudoku.icons.js.map +1 -1
- package/lib/zudoku.plugin-api-catalog.js +117 -0
- package/lib/zudoku.plugin-api-catalog.js.map +1 -0
- package/lib/zudoku.plugin-api-keys.js +520 -206
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-custom-pages.js +4 -4
- package/lib/zudoku.plugin-custom-pages.js.map +1 -1
- package/lib/zudoku.plugin-markdown.js +27 -50
- package/lib/zudoku.plugin-markdown.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +7 -6
- package/lib/zudoku.plugin-openapi.js.map +1 -1
- package/lib/zudoku.plugin-redirect.js +1 -1
- package/lib/zudoku.plugin-redirect.js.map +1 -1
- package/lib/zudoku.plugin-search-inkeep.js +52 -24
- package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
- package/lib/zudoku.plugin-search-pagefind.js +230 -0
- package/lib/zudoku.plugin-search-pagefind.js.map +1 -0
- package/lib/zudoku.plugins.js +15 -0
- package/lib/zudoku.plugins.js.map +1 -0
- package/package.json +160 -104
- package/src/app/ZuploBuildConfig.ts +33 -0
- package/src/app/defaultTheme.css +54 -0
- package/src/app/demo-cdn.html +31 -31
- package/src/app/demo.html +1 -1
- package/src/app/demo.tsx +1 -2
- package/src/app/entry.client.tsx +67 -15
- package/src/app/entry.server.tsx +26 -15
- package/src/app/env.ts +35 -0
- package/src/app/font.geist.css +73 -0
- package/src/app/main.css +199 -130
- package/src/app/main.tsx +67 -39
- package/src/app/sentry.ts +24 -0
- package/src/app/standalone.tsx +1 -2
- package/src/lib/MissingIcon.tsx +22 -0
- package/src/lib/authentication/AuthenticationPlugin.tsx +8 -5
- package/src/lib/authentication/authentication.ts +5 -6
- package/src/lib/authentication/components/CallbackHandler.tsx +12 -2
- package/src/lib/authentication/components/SignIn.tsx +35 -2
- package/src/lib/authentication/components/SignOut.tsx +3 -2
- package/src/lib/authentication/components/SignUp.tsx +35 -1
- package/src/lib/authentication/hook.ts +13 -4
- package/src/lib/authentication/providers/auth0.tsx +14 -9
- package/src/lib/authentication/providers/clerk.tsx +136 -53
- package/src/lib/authentication/providers/openid.tsx +87 -84
- package/src/lib/authentication/providers/supabase.tsx +157 -0
- package/src/lib/authentication/state.ts +51 -27
- package/src/lib/components/AnchorLink.tsx +13 -8
- package/src/lib/components/Autocomplete.tsx +113 -0
- package/src/lib/components/Banner.tsx +3 -2
- package/src/lib/components/Bootstrap.tsx +33 -31
- package/src/lib/components/BuildCheck.tsx +75 -0
- package/src/lib/components/ErrorPage.tsx +1 -1
- package/src/lib/components/Footer.tsx +136 -0
- package/src/lib/components/Header.tsx +85 -44
- package/src/lib/components/Heading.tsx +20 -16
- package/src/lib/components/InlineCode.tsx +13 -16
- package/src/lib/components/Layout.tsx +36 -60
- package/src/lib/components/Main.tsx +51 -0
- package/src/lib/components/Markdown.tsx +42 -28
- package/src/lib/components/MobileTopNavigation.tsx +37 -34
- package/src/lib/components/NotFoundPage.tsx +2 -2
- package/src/lib/components/Pagination.tsx +44 -0
- package/src/lib/components/PathRenderer.tsx +61 -0
- package/src/lib/components/ReactMarkdown.license.txt +21 -0
- package/src/lib/components/ReactMarkdown.tsx +264 -0
- package/src/lib/components/Search.tsx +18 -7
- package/src/lib/components/Slot.test.tsx +465 -0
- package/src/lib/components/Slot.tsx +64 -0
- package/src/lib/components/StatusPage.tsx +91 -0
- package/src/lib/components/ThemeSwitch.tsx +33 -11
- package/src/lib/components/TopNavigation.tsx +70 -47
- package/src/lib/components/Zudoku.tsx +27 -16
- package/src/lib/components/cache.ts +23 -0
- package/src/lib/components/context/BypassProtectedRoutesContext.ts +3 -0
- package/src/lib/components/context/RouterEventsEmitter.tsx +19 -0
- package/src/lib/components/context/SlotProvider.tsx +149 -0
- package/src/lib/components/context/ViewportAnchorContext.tsx +34 -36
- package/src/lib/components/context/ZudokuContext.ts +30 -9
- package/src/lib/components/context/ZudokuProvider.tsx +2 -1
- package/src/lib/components/index.ts +34 -11
- package/src/lib/components/navigation/PoweredByZudoku.tsx +33 -0
- package/src/lib/components/navigation/Sidebar.tsx +39 -30
- package/src/lib/components/navigation/SidebarBadge.tsx +17 -12
- package/src/lib/components/navigation/SidebarCategory.tsx +67 -60
- package/src/lib/components/navigation/SidebarItem.tsx +81 -64
- package/src/lib/components/navigation/SidebarWrapper.tsx +42 -22
- package/src/lib/{plugins/markdown → components/navigation}/Toc.tsx +9 -18
- package/src/lib/components/navigation/ZudokuLogo.tsx +25 -0
- package/src/lib/components/navigation/ZuploLogo.tsx +14 -0
- package/src/lib/components/navigation/utils.ts +43 -7
- package/src/lib/core/RouteGuard.tsx +96 -0
- package/src/lib/core/ZudokuContext.ts +93 -23
- package/src/lib/core/plugins.ts +42 -8
- package/src/lib/errors/ErrorAlert.tsx +24 -17
- package/src/lib/errors/RouterError.tsx +1 -1
- package/src/lib/hooks/index.ts +16 -0
- package/src/lib/hooks/useEvent.test.tsx +149 -0
- package/src/lib/hooks/useEvent.ts +41 -0
- package/src/lib/icons.ts +1 -0
- package/src/lib/oas/graphql/circular.ts +58 -0
- package/src/lib/oas/graphql/index.ts +295 -101
- package/src/lib/oas/parser/dereference/index.ts +10 -4
- package/src/lib/oas/parser/index.ts +14 -30
- package/src/lib/oas/parser/upgrade/index.ts +103 -40
- package/src/lib/plugins/api-catalog/Catalog.tsx +73 -0
- package/src/lib/plugins/api-catalog/index.tsx +115 -0
- package/src/lib/plugins/api-keys/CreateApiKey.tsx +61 -45
- package/src/lib/plugins/api-keys/ProtectedRoute.tsx +1 -1
- package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +439 -114
- package/src/lib/plugins/api-keys/index.tsx +115 -56
- package/src/lib/plugins/custom-pages/index.tsx +2 -2
- package/src/lib/plugins/markdown/MdxPage.tsx +43 -41
- package/src/lib/plugins/markdown/index.tsx +5 -2
- package/src/lib/plugins/markdown/resolver.ts +1 -34
- package/src/lib/plugins/openapi/CollapsibleCode.tsx +15 -9
- package/src/lib/plugins/openapi/ColorizedParam.tsx +30 -13
- package/src/lib/plugins/openapi/Endpoint.tsx +14 -12
- package/src/lib/plugins/openapi/OasProvider.tsx +51 -0
- package/src/lib/plugins/openapi/OperationList.tsx +232 -42
- package/src/lib/plugins/openapi/OperationListItem.tsx +122 -93
- package/src/lib/plugins/openapi/ParamInfos.tsx +90 -0
- package/src/lib/plugins/openapi/ParameterList.tsx +4 -0
- package/src/lib/plugins/openapi/ParameterListItem.tsx +65 -24
- package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +28 -3
- package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +15 -38
- package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +36 -64
- package/src/lib/plugins/openapi/SchemaList.tsx +163 -0
- package/src/lib/plugins/openapi/Sidecar.tsx +96 -129
- package/src/lib/plugins/openapi/SidecarBox.tsx +4 -16
- package/src/lib/plugins/openapi/SidecarExamples.tsx +168 -0
- package/src/lib/plugins/openapi/SimpleSelect.tsx +1 -1
- package/src/lib/plugins/openapi/client/GraphQLClient.tsx +29 -104
- package/src/lib/plugins/openapi/client/createServer.ts +6 -2
- package/src/lib/plugins/openapi/client/useCreateQuery.ts +34 -7
- package/src/lib/plugins/openapi/components/ConstValue.tsx +24 -0
- package/src/lib/plugins/openapi/components/EnumValues.tsx +58 -0
- package/src/lib/plugins/openapi/components/ResponseContent.tsx +104 -0
- package/src/lib/plugins/openapi/components/SelectOnClick.tsx +29 -0
- package/src/lib/plugins/openapi/context.tsx +2 -2
- package/src/lib/plugins/openapi/graphql/gql.ts +36 -11
- package/src/lib/plugins/openapi/graphql/graphql.ts +172 -36
- package/src/lib/plugins/openapi/index.tsx +100 -98
- package/src/lib/plugins/openapi/interfaces.ts +58 -3
- package/src/lib/plugins/openapi/playground/BodyPanel.tsx +46 -0
- package/src/lib/plugins/openapi/playground/ExamplesDropdown.tsx +55 -0
- package/src/lib/plugins/openapi/playground/Headers.tsx +182 -49
- package/src/lib/plugins/openapi/playground/IdentityDialog.tsx +74 -0
- package/src/lib/plugins/openapi/playground/IdentitySelector.tsx +43 -0
- package/src/lib/plugins/openapi/playground/ParamsGrid.tsx +13 -0
- package/src/lib/plugins/openapi/playground/PathParams.tsx +39 -64
- package/src/lib/plugins/openapi/playground/Playground.tsx +329 -267
- package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +7 -3
- package/src/lib/plugins/openapi/playground/QueryParams.tsx +87 -89
- package/src/lib/plugins/openapi/playground/RequestLoginDialog.tsx +51 -0
- package/src/lib/plugins/openapi/playground/fileUtils.ts +32 -0
- package/src/lib/plugins/openapi/playground/rememberedIdentity.ts +26 -0
- package/src/lib/plugins/openapi/playground/result-panel/RequestTab.tsx +73 -0
- package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +265 -0
- package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +126 -0
- package/src/lib/plugins/openapi/playground/result-panel/convertToTypes.test.ts +64 -0
- package/src/lib/plugins/openapi/playground/result-panel/convertToTypes.ts +36 -0
- package/src/lib/plugins/openapi/playground/useRememberSkipLoginDialog.tsx +20 -0
- package/src/lib/plugins/openapi/processors/removeExtensions.test.ts +222 -0
- package/src/lib/plugins/openapi/processors/removeExtensions.ts +29 -0
- package/src/lib/plugins/openapi/processors/removeParameters.test.ts +182 -0
- package/src/lib/plugins/openapi/processors/removeParameters.ts +103 -0
- package/src/lib/plugins/openapi/processors/removePaths.test.ts +167 -0
- package/src/lib/plugins/openapi/processors/removePaths.ts +57 -0
- package/src/lib/plugins/openapi/processors/traverse.ts +1 -0
- package/src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.tsx +1 -8
- package/src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.tsx +3 -0
- package/src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.tsx +6 -3
- package/src/lib/plugins/openapi/schema/SchemaExampleAndDefault.tsx +39 -0
- package/src/lib/plugins/openapi/schema/SchemaPropertyItem.tsx +160 -0
- package/src/lib/plugins/openapi/schema/SchemaView.tsx +105 -141
- package/src/lib/plugins/openapi/schema/utils.ts +32 -5
- package/src/lib/plugins/openapi/state.ts +36 -0
- package/src/lib/plugins/openapi/util/createHttpSnippet.ts +107 -0
- package/src/lib/plugins/openapi/util/createSidebarCategory.tsx +37 -0
- package/src/lib/plugins/openapi/util/generateSchemaExample.ts +77 -12
- package/src/lib/plugins/openapi/util/getRoutes.tsx +198 -0
- package/src/lib/plugins/openapi/util/methodColorMap.tsx +11 -0
- package/src/lib/plugins/openapi/util/methodToColor.ts +27 -0
- package/src/lib/plugins/openapi/util/sanitizeMarkdownForMetatag.tsx +32 -0
- package/src/lib/plugins/redirect/index.tsx +2 -2
- package/src/lib/plugins/search-inkeep/index.tsx +78 -23
- package/src/lib/plugins/search-inkeep/inkeep.ts +3 -9
- package/src/lib/plugins/search-pagefind/PagefindSearch.tsx +164 -0
- package/src/lib/plugins/search-pagefind/ResultList.tsx +105 -0
- package/src/lib/plugins/search-pagefind/get-results.tsx +75 -0
- package/src/lib/plugins/search-pagefind/index.tsx +21 -0
- package/src/lib/plugins/search-pagefind/types.ts +118 -0
- package/src/lib/shiki.ts +132 -0
- package/src/lib/ui/Badge.tsx +3 -2
- package/src/lib/ui/Button.tsx +12 -7
- package/src/lib/ui/Callout.tsx +30 -10
- package/src/lib/ui/Card.tsx +1 -1
- package/src/lib/ui/Checkbox.tsx +2 -1
- package/src/lib/ui/CodeBlock.tsx +103 -0
- package/src/lib/ui/Command.tsx +47 -5
- package/src/lib/ui/Dialog.tsx +11 -7
- package/src/lib/ui/DropdownMenu.tsx +4 -4
- package/src/lib/ui/HoverCard.tsx +1 -1
- package/src/lib/ui/Input.tsx +2 -3
- package/src/lib/ui/Popover.tsx +1 -1
- package/src/lib/ui/RadioGroup.tsx +1 -1
- package/src/lib/ui/Select.tsx +4 -4
- package/src/lib/ui/Slider.tsx +1 -1
- package/src/lib/ui/Stepper.tsx +8 -0
- package/src/lib/ui/Switch.tsx +1 -1
- package/src/lib/ui/SyntaxHighlight.tsx +27 -0
- package/src/lib/ui/Tabs.tsx +2 -2
- package/src/lib/ui/Textarea.tsx +1 -1
- package/src/lib/ui/Toggle.tsx +1 -1
- package/src/lib/ui/Tooltip.tsx +16 -1
- package/src/lib/ui/util.tsx +3 -0
- package/src/lib/util/MdxComponents.tsx +37 -23
- package/src/lib/util/createVariantComponent.tsx +2 -2
- package/src/lib/util/detectOS.ts +9 -0
- package/src/lib/util/ensureArray.ts +3 -0
- package/src/lib/util/humanFileSize.test.ts +24 -0
- package/src/lib/util/humanFileSize.ts +16 -0
- package/src/lib/util/joinPath.tsx +3 -0
- package/src/lib/util/joinUrl.test.ts +62 -0
- package/src/lib/util/joinUrl.ts +57 -0
- package/src/lib/util/scrollIntoViewIfNeeded.ts +18 -0
- package/src/lib/util/traverse.ts +34 -0
- package/src/lib/util/types.ts +7 -0
- package/src/lib/util/url.test.ts +51 -0
- package/src/lib/util/url.ts +18 -0
- package/src/lib/util/useExposedProps.tsx +13 -2
- package/src/lib/util/useLatest.ts +18 -0
- package/src/lib/util/useOnScreen.ts +6 -4
- package/src/lib/util/useScrollToAnchor.ts +48 -39
- package/src/lib/util/useScrollToTop.ts +9 -4
- package/src/shiki/langs/abap.js +1 -0
- package/src/shiki/langs/actionscript-3.js +1 -0
- package/src/shiki/langs/ada.js +1 -0
- package/src/shiki/langs/angular-expression.js +1 -0
- package/src/shiki/langs/angular-html.js +1 -0
- package/src/shiki/langs/angular-inline-style.js +1 -0
- package/src/shiki/langs/angular-inline-template.js +1 -0
- package/src/shiki/langs/angular-let-declaration.js +1 -0
- package/src/shiki/langs/angular-template-blocks.js +1 -0
- package/src/shiki/langs/angular-template.js +1 -0
- package/src/shiki/langs/angular-ts.js +1 -0
- package/src/shiki/langs/apache.js +1 -0
- package/src/shiki/langs/apex.js +1 -0
- package/src/shiki/langs/apl.js +1 -0
- package/src/shiki/langs/applescript.js +1 -0
- package/src/shiki/langs/ara.js +1 -0
- package/src/shiki/langs/asciidoc.js +1 -0
- package/src/shiki/langs/asm.js +1 -0
- package/src/shiki/langs/astro.js +1 -0
- package/src/shiki/langs/awk.js +1 -0
- package/src/shiki/langs/ballerina.js +1 -0
- package/src/shiki/langs/bat.js +1 -0
- package/src/shiki/langs/beancount.js +1 -0
- package/src/shiki/langs/berry.js +1 -0
- package/src/shiki/langs/bibtex.js +1 -0
- package/src/shiki/langs/bicep.js +1 -0
- package/src/shiki/langs/blade.js +1 -0
- package/src/shiki/langs/bsl.js +1 -0
- package/src/shiki/langs/c.js +1 -0
- package/src/shiki/langs/cadence.js +1 -0
- package/src/shiki/langs/cairo.js +1 -0
- package/src/shiki/langs/clarity.js +1 -0
- package/src/shiki/langs/clojure.js +1 -0
- package/src/shiki/langs/cmake.js +1 -0
- package/src/shiki/langs/cobol.js +1 -0
- package/src/shiki/langs/codeowners.js +1 -0
- package/src/shiki/langs/codeql.js +1 -0
- package/src/shiki/langs/coffee.js +1 -0
- package/src/shiki/langs/common-lisp.js +1 -0
- package/src/shiki/langs/coq.js +1 -0
- package/src/shiki/langs/cpp-macro.js +1 -0
- package/src/shiki/langs/cpp.js +1 -0
- package/src/shiki/langs/crystal.js +1 -0
- package/src/shiki/langs/csharp.js +1 -0
- package/src/shiki/langs/css.js +1 -0
- package/src/shiki/langs/csv.js +1 -0
- package/src/shiki/langs/cue.js +1 -0
- package/src/shiki/langs/cypher.js +1 -0
- package/src/shiki/langs/d.js +1 -0
- package/src/shiki/langs/dart.js +1 -0
- package/src/shiki/langs/dax.js +1 -0
- package/src/shiki/langs/desktop.js +1 -0
- package/src/shiki/langs/diff.js +1 -0
- package/src/shiki/langs/docker.js +1 -0
- package/src/shiki/langs/dotenv.js +1 -0
- package/src/shiki/langs/dream-maker.js +1 -0
- package/src/shiki/langs/edge.js +1 -0
- package/src/shiki/langs/elixir.js +1 -0
- package/src/shiki/langs/elm.js +1 -0
- package/src/shiki/langs/emacs-lisp.js +1 -0
- package/src/shiki/langs/erb.js +1 -0
- package/src/shiki/langs/erlang.js +1 -0
- package/src/shiki/langs/es-tag-css.js +1 -0
- package/src/shiki/langs/es-tag-glsl.js +1 -0
- package/src/shiki/langs/es-tag-html.js +1 -0
- package/src/shiki/langs/es-tag-sql.js +1 -0
- package/src/shiki/langs/es-tag-xml.js +1 -0
- package/src/shiki/langs/fennel.js +1 -0
- package/src/shiki/langs/fish.js +1 -0
- package/src/shiki/langs/fluent.js +1 -0
- package/src/shiki/langs/fortran-fixed-form.js +1 -0
- package/src/shiki/langs/fortran-free-form.js +1 -0
- package/src/shiki/langs/fsharp.js +1 -0
- package/src/shiki/langs/gdresource.js +1 -0
- package/src/shiki/langs/gdscript.js +1 -0
- package/src/shiki/langs/gdshader.js +1 -0
- package/src/shiki/langs/genie.js +1 -0
- package/src/shiki/langs/gherkin.js +1 -0
- package/src/shiki/langs/git-commit.js +1 -0
- package/src/shiki/langs/git-rebase.js +1 -0
- package/src/shiki/langs/gleam.js +1 -0
- package/src/shiki/langs/glimmer-js.js +1 -0
- package/src/shiki/langs/glimmer-ts.js +1 -0
- package/src/shiki/langs/glsl.js +1 -0
- package/src/shiki/langs/gnuplot.js +1 -0
- package/src/shiki/langs/go.js +1 -0
- package/src/shiki/langs/graphql.js +1 -0
- package/src/shiki/langs/groovy.js +1 -0
- package/src/shiki/langs/hack.js +1 -0
- package/src/shiki/langs/haml.js +1 -0
- package/src/shiki/langs/handlebars.js +1 -0
- package/src/shiki/langs/haskell.js +1 -0
- package/src/shiki/langs/haxe.js +1 -0
- package/src/shiki/langs/hcl.js +1 -0
- package/src/shiki/langs/hjson.js +1 -0
- package/src/shiki/langs/hlsl.js +1 -0
- package/src/shiki/langs/html-derivative.js +1 -0
- package/src/shiki/langs/html.js +1 -0
- package/src/shiki/langs/http.js +1 -0
- package/src/shiki/langs/hxml.js +1 -0
- package/src/shiki/langs/hy.js +1 -0
- package/src/shiki/langs/imba.js +1 -0
- package/src/shiki/langs/ini.js +1 -0
- package/src/shiki/langs/java.js +1 -0
- package/src/shiki/langs/javascript.js +1 -0
- package/src/shiki/langs/jinja-html.js +1 -0
- package/src/shiki/langs/jinja.js +1 -0
- package/src/shiki/langs/jison.js +1 -0
- package/src/shiki/langs/json.js +1 -0
- package/src/shiki/langs/json5.js +1 -0
- package/src/shiki/langs/jsonc.js +1 -0
- package/src/shiki/langs/jsonl.js +1 -0
- package/src/shiki/langs/jsonnet.js +1 -0
- package/src/shiki/langs/jssm.js +1 -0
- package/src/shiki/langs/jsx.js +1 -0
- package/src/shiki/langs/julia.js +1 -0
- package/src/shiki/langs/kotlin.js +1 -0
- package/src/shiki/langs/kusto.js +1 -0
- package/src/shiki/langs/latex.js +1 -0
- package/src/shiki/langs/lean.js +1 -0
- package/src/shiki/langs/less.js +1 -0
- package/src/shiki/langs/liquid.js +1 -0
- package/src/shiki/langs/llvm.js +1 -0
- package/src/shiki/langs/log.js +1 -0
- package/src/shiki/langs/logo.js +1 -0
- package/src/shiki/langs/lua.js +1 -0
- package/src/shiki/langs/luau.js +1 -0
- package/src/shiki/langs/make.js +1 -0
- package/src/shiki/langs/markdown-vue.js +1 -0
- package/src/shiki/langs/markdown.js +1 -0
- package/src/shiki/langs/marko.js +1 -0
- package/src/shiki/langs/matlab.js +1 -0
- package/src/shiki/langs/mdc.js +1 -0
- package/src/shiki/langs/mdx.js +1 -0
- package/src/shiki/langs/mermaid.js +1 -0
- package/src/shiki/langs/mipsasm.js +1 -0
- package/src/shiki/langs/mojo.js +1 -0
- package/src/shiki/langs/move.js +1 -0
- package/src/shiki/langs/narrat.js +1 -0
- package/src/shiki/langs/nextflow.js +1 -0
- package/src/shiki/langs/nginx.js +1 -0
- package/src/shiki/langs/nim.js +1 -0
- package/src/shiki/langs/nix.js +1 -0
- package/src/shiki/langs/nushell.js +1 -0
- package/src/shiki/langs/objective-c.js +1 -0
- package/src/shiki/langs/objective-cpp.js +1 -0
- package/src/shiki/langs/ocaml.js +1 -0
- package/src/shiki/langs/pascal.js +1 -0
- package/src/shiki/langs/perl.js +1 -0
- package/src/shiki/langs/php.js +1 -0
- package/src/shiki/langs/plsql.js +1 -0
- package/src/shiki/langs/po.js +1 -0
- package/src/shiki/langs/polar.js +1 -0
- package/src/shiki/langs/postcss.js +1 -0
- package/src/shiki/langs/powerquery.js +1 -0
- package/src/shiki/langs/powershell.js +1 -0
- package/src/shiki/langs/prisma.js +1 -0
- package/src/shiki/langs/prolog.js +1 -0
- package/src/shiki/langs/proto.js +1 -0
- package/src/shiki/langs/pug.js +1 -0
- package/src/shiki/langs/puppet.js +1 -0
- package/src/shiki/langs/purescript.js +1 -0
- package/src/shiki/langs/python.js +1 -0
- package/src/shiki/langs/qml.js +1 -0
- package/src/shiki/langs/qmldir.js +1 -0
- package/src/shiki/langs/qss.js +1 -0
- package/src/shiki/langs/r.js +1 -0
- package/src/shiki/langs/racket.js +1 -0
- package/src/shiki/langs/raku.js +1 -0
- package/src/shiki/langs/razor.js +1 -0
- package/src/shiki/langs/reg.js +1 -0
- package/src/shiki/langs/regexp.js +1 -0
- package/src/shiki/langs/rel.js +1 -0
- package/src/shiki/langs/riscv.js +1 -0
- package/src/shiki/langs/rst.js +1 -0
- package/src/shiki/langs/ruby.js +1 -0
- package/src/shiki/langs/rust.js +1 -0
- package/src/shiki/langs/sas.js +1 -0
- package/src/shiki/langs/sass.js +1 -0
- package/src/shiki/langs/scala.js +1 -0
- package/src/shiki/langs/scheme.js +1 -0
- package/src/shiki/langs/scss.js +1 -0
- package/src/shiki/langs/sdbl.js +1 -0
- package/src/shiki/langs/shaderlab.js +1 -0
- package/src/shiki/langs/shellscript.js +1 -0
- package/src/shiki/langs/shellsession.js +1 -0
- package/src/shiki/langs/smalltalk.js +1 -0
- package/src/shiki/langs/solidity.js +1 -0
- package/src/shiki/langs/soy.js +1 -0
- package/src/shiki/langs/sparql.js +1 -0
- package/src/shiki/langs/splunk.js +1 -0
- package/src/shiki/langs/sql.js +1 -0
- package/src/shiki/langs/ssh-config.js +1 -0
- package/src/shiki/langs/stata.js +1 -0
- package/src/shiki/langs/stylus.js +1 -0
- package/src/shiki/langs/svelte.js +1 -0
- package/src/shiki/langs/swift.js +1 -0
- package/src/shiki/langs/system-verilog.js +1 -0
- package/src/shiki/langs/systemd.js +1 -0
- package/src/shiki/langs/talonscript.js +1 -0
- package/src/shiki/langs/tasl.js +1 -0
- package/src/shiki/langs/tcl.js +1 -0
- package/src/shiki/langs/templ.js +1 -0
- package/src/shiki/langs/terraform.js +1 -0
- package/src/shiki/langs/tex.js +1 -0
- package/src/shiki/langs/toml.js +1 -0
- package/src/shiki/langs/ts-tags.js +1 -0
- package/src/shiki/langs/tsv.js +1 -0
- package/src/shiki/langs/tsx.js +1 -0
- package/src/shiki/langs/turtle.js +1 -0
- package/src/shiki/langs/twig.js +1 -0
- package/src/shiki/langs/typescript.js +1 -0
- package/src/shiki/langs/typespec.js +1 -0
- package/src/shiki/langs/typst.js +1 -0
- package/src/shiki/langs/v.js +1 -0
- package/src/shiki/langs/vala.js +1 -0
- package/src/shiki/langs/vb.js +1 -0
- package/src/shiki/langs/verilog.js +1 -0
- package/src/shiki/langs/vhdl.js +1 -0
- package/src/shiki/langs/viml.js +1 -0
- package/src/shiki/langs/vue-directives.js +1 -0
- package/src/shiki/langs/vue-html.js +1 -0
- package/src/shiki/langs/vue-interpolations.js +1 -0
- package/src/shiki/langs/vue-sfc-style-variable-injection.js +1 -0
- package/src/shiki/langs/vue.js +1 -0
- package/src/shiki/langs/vyper.js +1 -0
- package/src/shiki/langs/wasm.js +1 -0
- package/src/shiki/langs/wenyan.js +1 -0
- package/src/shiki/langs/wgsl.js +1 -0
- package/src/shiki/langs/wikitext.js +1 -0
- package/src/shiki/langs/wit.js +1 -0
- package/src/shiki/langs/wolfram.js +1 -0
- package/src/shiki/langs/xml.js +1 -0
- package/src/shiki/langs/xsl.js +1 -0
- package/src/shiki/langs/yaml.js +1 -0
- package/src/shiki/langs/zenscript.js +1 -0
- package/src/shiki/langs/zig.js +1 -0
- package/src/shiki/themes/andromeeda.js +1 -0
- package/src/shiki/themes/aurora-x.js +1 -0
- package/src/shiki/themes/ayu-dark.js +1 -0
- package/src/shiki/themes/catppuccin-frappe.js +1 -0
- package/src/shiki/themes/catppuccin-latte.js +1 -0
- package/src/shiki/themes/catppuccin-macchiato.js +1 -0
- package/src/shiki/themes/catppuccin-mocha.js +1 -0
- package/src/shiki/themes/dark-plus.js +1 -0
- package/src/shiki/themes/dracula-soft.js +1 -0
- package/src/shiki/themes/dracula.js +1 -0
- package/src/shiki/themes/everforest-dark.js +1 -0
- package/src/shiki/themes/everforest-light.js +1 -0
- package/src/shiki/themes/github-dark-default.js +1 -0
- package/src/shiki/themes/github-dark-dimmed.js +1 -0
- package/src/shiki/themes/github-dark-high-contrast.js +1 -0
- package/src/shiki/themes/github-dark.js +1 -0
- package/src/shiki/themes/github-light-default.js +1 -0
- package/src/shiki/themes/github-light-high-contrast.js +1 -0
- package/src/shiki/themes/github-light.js +1 -0
- package/src/shiki/themes/gruvbox-dark-hard.js +1 -0
- package/src/shiki/themes/gruvbox-dark-medium.js +1 -0
- package/src/shiki/themes/gruvbox-dark-soft.js +1 -0
- package/src/shiki/themes/gruvbox-light-hard.js +1 -0
- package/src/shiki/themes/gruvbox-light-medium.js +1 -0
- package/src/shiki/themes/gruvbox-light-soft.js +1 -0
- package/src/shiki/themes/houston.js +1 -0
- package/src/shiki/themes/kanagawa-dragon.js +1 -0
- package/src/shiki/themes/kanagawa-lotus.js +1 -0
- package/src/shiki/themes/kanagawa-wave.js +1 -0
- package/src/shiki/themes/laserwave.js +1 -0
- package/src/shiki/themes/light-plus.js +1 -0
- package/src/shiki/themes/material-theme-darker.js +1 -0
- package/src/shiki/themes/material-theme-lighter.js +1 -0
- package/src/shiki/themes/material-theme-ocean.js +1 -0
- package/src/shiki/themes/material-theme-palenight.js +1 -0
- package/src/shiki/themes/material-theme.js +1 -0
- package/src/shiki/themes/min-dark.js +1 -0
- package/src/shiki/themes/min-light.js +1 -0
- package/src/shiki/themes/monokai.js +1 -0
- package/src/shiki/themes/night-owl.js +1 -0
- package/src/shiki/themes/nord.js +1 -0
- package/src/shiki/themes/one-dark-pro.js +1 -0
- package/src/shiki/themes/one-light.js +1 -0
- package/src/shiki/themes/plastic.js +1 -0
- package/src/shiki/themes/poimandres.js +1 -0
- package/src/shiki/themes/red.js +1 -0
- package/src/shiki/themes/rose-pine-dawn.js +1 -0
- package/src/shiki/themes/rose-pine-moon.js +1 -0
- package/src/shiki/themes/rose-pine.js +1 -0
- package/src/shiki/themes/slack-dark.js +1 -0
- package/src/shiki/themes/slack-ochin.js +1 -0
- package/src/shiki/themes/snazzy-light.js +1 -0
- package/src/shiki/themes/solarized-dark.js +1 -0
- package/src/shiki/themes/solarized-light.js +1 -0
- package/src/shiki/themes/synthwave-84.js +1 -0
- package/src/shiki/themes/tokyo-night.js +1 -0
- package/src/shiki/themes/vesper.js +1 -0
- package/src/shiki/themes/vitesse-black.js +1 -0
- package/src/shiki/themes/vitesse-dark.js +1 -0
- package/src/shiki/themes/vitesse-light.js +1 -0
- package/client.d.ts +0 -1
- package/dist/app/tailwind.d.ts +0 -3
- package/dist/app/tailwind.js +0 -65
- package/dist/app/tailwind.js.map +0 -1
- package/dist/lib/components/SlotletProvider.d.ts +0 -17
- package/dist/lib/components/SlotletProvider.js +0 -18
- package/dist/lib/components/SlotletProvider.js.map +0 -1
- package/dist/lib/components/SyntaxHighlight.d.ts +0 -11
- package/dist/lib/components/SyntaxHighlight.js +0 -57
- package/dist/lib/components/SyntaxHighlight.js.map +0 -1
- package/dist/lib/components/context/PluginSystem.js +0 -2
- package/dist/lib/components/context/PluginSystem.js.map +0 -1
- package/dist/lib/plugins/markdown/Toc.js.map +0 -1
- package/dist/lib/plugins/openapi/Route.d.ts +0 -6
- package/dist/lib/plugins/openapi/Route.js +0 -6
- package/dist/lib/plugins/openapi/Route.js.map +0 -1
- package/dist/lib/plugins/openapi/client/worker.d.ts +0 -4
- package/dist/lib/plugins/openapi/client/worker.js +0 -29
- package/dist/lib/plugins/openapi/client/worker.js.map +0 -1
- package/dist/lib/plugins/openapi/playground/ResponseTab.d.ts +0 -4
- package/dist/lib/plugins/openapi/playground/ResponseTab.js +0 -42
- package/dist/lib/plugins/openapi/playground/ResponseTab.js.map +0 -1
- package/dist/lib/plugins/openapi/schema/SchemaComponents.js +0 -28
- package/dist/lib/plugins/openapi/schema/SchemaComponents.js.map +0 -1
- package/dist/lib/plugins/openapi-worker.d.ts +0 -1
- package/dist/lib/plugins/openapi-worker.js +0 -8
- package/dist/lib/plugins/openapi-worker.js.map +0 -1
- package/dist/lib/plugins/search-inkeep/InkeepCustomTrigger.d.ts +0 -2
- package/dist/lib/plugins/search-inkeep/InkeepCustomTrigger.js +0 -3
- package/dist/lib/plugins/search-inkeep/InkeepCustomTrigger.js.map +0 -1
- package/dist/ts.d.ts +0 -6
- package/dist/ts.js +0 -61
- package/dist/ts.js.map +0 -1
- package/dist/vite/plugin-custom-css.js.map +0 -1
- package/dist/vite/plugin-docs.test.js +0 -30
- package/dist/vite/plugin-docs.test.js.map +0 -1
- package/dist/vite/prerender.d.ts +0 -21
- package/dist/vite/prerender.js +0 -89
- package/dist/vite/prerender.js.map +0 -1
- package/lib/AnchorLink-CDlhr8gL.js +0 -706
- package/lib/AnchorLink-CDlhr8gL.js.map +0 -1
- package/lib/AuthenticationPlugin-DeGDVa1r.js +0 -56
- package/lib/AuthenticationPlugin-DeGDVa1r.js.map +0 -1
- package/lib/Button-jK0EsymC.js +0 -48
- package/lib/Button-jK0EsymC.js.map +0 -1
- package/lib/Dialog-k70Qfukb.js +0 -67
- package/lib/Dialog-k70Qfukb.js.map +0 -1
- package/lib/InkeepCustomTrigger-CE5-K5ex.js +0 -6
- package/lib/InkeepCustomTrigger-CE5-K5ex.js.map +0 -1
- package/lib/Markdown-BorQdbxW.js.map +0 -1
- package/lib/MdxPage-DFlbtJWi.js +0 -174
- package/lib/MdxPage-DFlbtJWi.js.map +0 -1
- package/lib/OperationList-KshJrrLL.js +0 -4691
- package/lib/OperationList-KshJrrLL.js.map +0 -1
- package/lib/Route-DlG_HTMu.js +0 -11
- package/lib/Route-DlG_HTMu.js.map +0 -1
- package/lib/Select-DP74t8Yy.js +0 -223
- package/lib/Select-DP74t8Yy.js.map +0 -1
- package/lib/SidebarBadge-DxFJcJ6V.js +0 -51
- package/lib/SidebarBadge-DxFJcJ6V.js.map +0 -1
- package/lib/SlotletProvider-D2v6rJy1.js +0 -252
- package/lib/SlotletProvider-D2v6rJy1.js.map +0 -1
- package/lib/SyntaxHighlight-CBmwwKoM.js +0 -2983
- package/lib/SyntaxHighlight-CBmwwKoM.js.map +0 -1
- package/lib/__vite-browser-external-BYRIRx8p.js +0 -9
- package/lib/__vite-browser-external-BYRIRx8p.js.map +0 -1
- package/lib/_commonjsHelpers-BkfeUUK-.js +0 -29
- package/lib/_commonjsHelpers-BkfeUUK-.js.map +0 -1
- package/lib/assets/index-B_Jk_Yzp.js.map +0 -1
- package/lib/assets/worker-CPsGZsve.js +0 -18201
- package/lib/assets/worker-CPsGZsve.js.map +0 -1
- package/lib/cn-BmFQLtkS.js.map +0 -1
- package/lib/context-D1nXWxm7.js +0 -22
- package/lib/context-D1nXWxm7.js.map +0 -1
- package/lib/createServer-DK-g7kbB.js +0 -16089
- package/lib/createServer-DK-g7kbB.js.map +0 -1
- package/lib/hook-Diu0rqp-.js +0 -229
- package/lib/hook-Diu0rqp-.js.map +0 -1
- package/lib/index-BcesIHH4.js +0 -1273
- package/lib/index-BcesIHH4.js.map +0 -1
- package/lib/index-BuAyrJe3.js +0 -46
- package/lib/index-BuAyrJe3.js.map +0 -1
- package/lib/index-CkwDvuPt.js +0 -4820
- package/lib/index-CkwDvuPt.js.map +0 -1
- package/lib/index-Czzd9rjU.js +0 -899
- package/lib/index-Czzd9rjU.js.map +0 -1
- package/lib/index-Yn8c3UWE.js +0 -921
- package/lib/index-Yn8c3UWE.js.map +0 -1
- package/lib/index.esm-C5mr_sKO.js +0 -1193
- package/lib/index.esm-C5mr_sKO.js.map +0 -1
- package/lib/invariant-Caa8-XvF.js +0 -26
- package/lib/jsx-runtime-B6kdoens.js +0 -635
- package/lib/jsx-runtime-B6kdoens.js.map +0 -1
- package/lib/prism-bash.min-DadFsM4Z.js +0 -7
- package/lib/prism-bash.min-DadFsM4Z.js.map +0 -1
- package/lib/prism-csharp.min-Yizuc34Y.js +0 -35
- package/lib/prism-csharp.min-Yizuc34Y.js.map +0 -1
- package/lib/prism-java.min-d5iT_mOd.js +0 -7
- package/lib/prism-java.min-d5iT_mOd.js.map +0 -1
- package/lib/prism-javascript.min-CEqHqgbm.js +0 -9
- package/lib/prism-javascript.min-CEqHqgbm.js.map +0 -1
- package/lib/prism-json.min-B1GJqK1k.js +0 -2
- package/lib/prism-json.min-B1GJqK1k.js.map +0 -1
- package/lib/prism-markdown.min-F3U-vPBi.js +0 -61
- package/lib/prism-markdown.min-F3U-vPBi.js.map +0 -1
- package/lib/prism-markup-BNGj0Tvm.js +0 -174
- package/lib/prism-markup-BNGj0Tvm.js.map +0 -1
- package/lib/prism-markup-templating-DZrrEs0A.js +0 -62
- package/lib/prism-markup-templating-DZrrEs0A.js.map +0 -1
- package/lib/prism-objectivec.min-BXSWqpJJ.js +0 -2
- package/lib/prism-objectivec.min-BXSWqpJJ.js.map +0 -1
- package/lib/prism-php.min-o7FpoMP_.js +0 -11
- package/lib/prism-php.min-o7FpoMP_.js.map +0 -1
- package/lib/prism-ruby.min-C7LwcKyz.js +0 -10
- package/lib/prism-ruby.min-C7LwcKyz.js.map +0 -1
- package/lib/prism-typescript.min-oSVeWCAd.js +0 -6
- package/lib/prism-typescript.min-oSVeWCAd.js.map +0 -1
- package/lib/router-lfyopgBI.js +0 -3024
- package/lib/router-lfyopgBI.js.map +0 -1
- package/lib/state-BsPrOUAh.js +0 -252
- package/lib/state-BsPrOUAh.js.map +0 -1
- package/lib/useExposedProps-CTPtylCV.js +0 -10
- package/lib/useExposedProps-CTPtylCV.js.map +0 -1
- package/lib/utils-DcpDOncX.js +0 -1218
- package/lib/utils-DcpDOncX.js.map +0 -1
- package/lib/zudoku.openapi-worker.js +0 -15
- package/lib/zudoku.openapi-worker.js.map +0 -1
- package/src/app/tailwind.ts +0 -68
- package/src/lib/components/SlotletProvider.tsx +0 -55
- package/src/lib/components/SyntaxHighlight.tsx +0 -160
- package/src/lib/components/context/PluginSystem.ts +0 -0
- package/src/lib/plugins/openapi/Route.tsx +0 -19
- package/src/lib/plugins/openapi/client/worker.ts +0 -44
- package/src/lib/plugins/openapi/playground/ResponseTab.tsx +0 -76
- package/src/lib/plugins/openapi/schema/SchemaComponents.tsx +0 -126
- package/src/lib/plugins/openapi-worker.ts +0 -11
- package/src/lib/plugins/search-inkeep/InkeepCustomTrigger.tsx +0 -3
- /package/dist/lib/components/{context/PluginSystem.d.ts → Slot.test.d.ts} +0 -0
- /package/dist/lib/{plugins/markdown → components/navigation}/Toc.d.ts +0 -0
- /package/dist/{vite/plugin-docs.test.d.ts → lib/hooks/useEvent.test.d.ts} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const dt = Symbol.for("yaml.alias"), lt = Symbol.for("yaml.document"),
|
|
1
|
+
const dt = Symbol.for("yaml.alias"), lt = Symbol.for("yaml.document"), G = Symbol.for("yaml.map"), qt = Symbol.for("yaml.pair"), R = Symbol.for("yaml.scalar"), he = Symbol.for("yaml.seq"), P = Symbol.for("yaml.node.type"), Z = (s) => !!s && typeof s == "object" && s[P] === dt, ee = (s) => !!s && typeof s == "object" && s[P] === lt, de = (s) => !!s && typeof s == "object" && s[P] === G, T = (s) => !!s && typeof s == "object" && s[P] === qt, E = (s) => !!s && typeof s == "object" && s[P] === R, pe = (s) => !!s && typeof s == "object" && s[P] === he;
|
|
2
2
|
function L(s) {
|
|
3
3
|
if (s && typeof s == "object")
|
|
4
|
-
switch (s[
|
|
5
|
-
case
|
|
4
|
+
switch (s[P]) {
|
|
5
|
+
case G:
|
|
6
6
|
case he:
|
|
7
7
|
return !0;
|
|
8
8
|
}
|
|
@@ -10,25 +10,25 @@ function L(s) {
|
|
|
10
10
|
}
|
|
11
11
|
function $(s) {
|
|
12
12
|
if (s && typeof s == "object")
|
|
13
|
-
switch (s[
|
|
13
|
+
switch (s[P]) {
|
|
14
14
|
case dt:
|
|
15
|
-
case
|
|
16
|
-
case
|
|
15
|
+
case G:
|
|
16
|
+
case R:
|
|
17
17
|
case he:
|
|
18
18
|
return !0;
|
|
19
19
|
}
|
|
20
20
|
return !1;
|
|
21
21
|
}
|
|
22
|
-
const vs = (s) => (E(s) || L(s)) && !!s.anchor, M = Symbol("break visit"),
|
|
23
|
-
function
|
|
24
|
-
const t =
|
|
25
|
-
ee(s) ? ie(null, s.contents, t, Object.freeze([s])) ===
|
|
22
|
+
const vs = (s) => (E(s) || L(s)) && !!s.anchor, M = Symbol("break visit"), Ft = Symbol("skip children"), F = Symbol("remove node");
|
|
23
|
+
function Q(s, e) {
|
|
24
|
+
const t = Rt(e);
|
|
25
|
+
ee(s) ? ie(null, s.contents, t, Object.freeze([s])) === F && (s.contents = null) : ie(null, s, t, Object.freeze([]));
|
|
26
26
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
Q.BREAK = M;
|
|
28
|
+
Q.SKIP = Ft;
|
|
29
|
+
Q.REMOVE = F;
|
|
30
30
|
function ie(s, e, t, n) {
|
|
31
|
-
const i =
|
|
31
|
+
const i = Ut(s, e, t, n);
|
|
32
32
|
if ($(i) || T(i))
|
|
33
33
|
return Vt(s, n, i), ie(s, i, t, n);
|
|
34
34
|
if (typeof i != "symbol") {
|
|
@@ -41,7 +41,7 @@ function ie(s, e, t, n) {
|
|
|
41
41
|
else {
|
|
42
42
|
if (o === M)
|
|
43
43
|
return M;
|
|
44
|
-
o ===
|
|
44
|
+
o === F && (e.items.splice(r, 1), r -= 1);
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
} else if (T(e)) {
|
|
@@ -49,24 +49,24 @@ function ie(s, e, t, n) {
|
|
|
49
49
|
const r = ie("key", e.key, t, n);
|
|
50
50
|
if (r === M)
|
|
51
51
|
return M;
|
|
52
|
-
r ===
|
|
52
|
+
r === F && (e.key = null);
|
|
53
53
|
const o = ie("value", e.value, t, n);
|
|
54
54
|
if (o === M)
|
|
55
55
|
return M;
|
|
56
|
-
o ===
|
|
56
|
+
o === F && (e.value = null);
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
return i;
|
|
60
60
|
}
|
|
61
|
-
async function
|
|
62
|
-
const t =
|
|
63
|
-
ee(s) ? await re(null, s.contents, t, Object.freeze([s])) ===
|
|
61
|
+
async function Fe(s, e) {
|
|
62
|
+
const t = Rt(e);
|
|
63
|
+
ee(s) ? await re(null, s.contents, t, Object.freeze([s])) === F && (s.contents = null) : await re(null, s, t, Object.freeze([]));
|
|
64
64
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
Fe.BREAK = M;
|
|
66
|
+
Fe.SKIP = Ft;
|
|
67
|
+
Fe.REMOVE = F;
|
|
68
68
|
async function re(s, e, t, n) {
|
|
69
|
-
const i = await
|
|
69
|
+
const i = await Ut(s, e, t, n);
|
|
70
70
|
if ($(i) || T(i))
|
|
71
71
|
return Vt(s, n, i), re(s, i, t, n);
|
|
72
72
|
if (typeof i != "symbol") {
|
|
@@ -79,7 +79,7 @@ async function re(s, e, t, n) {
|
|
|
79
79
|
else {
|
|
80
80
|
if (o === M)
|
|
81
81
|
return M;
|
|
82
|
-
o ===
|
|
82
|
+
o === F && (e.items.splice(r, 1), r -= 1);
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
} else if (T(e)) {
|
|
@@ -87,16 +87,16 @@ async function re(s, e, t, n) {
|
|
|
87
87
|
const r = await re("key", e.key, t, n);
|
|
88
88
|
if (r === M)
|
|
89
89
|
return M;
|
|
90
|
-
r ===
|
|
90
|
+
r === F && (e.key = null);
|
|
91
91
|
const o = await re("value", e.value, t, n);
|
|
92
92
|
if (o === M)
|
|
93
93
|
return M;
|
|
94
|
-
o ===
|
|
94
|
+
o === F && (e.value = null);
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
return i;
|
|
98
98
|
}
|
|
99
|
-
function
|
|
99
|
+
function Rt(s) {
|
|
100
100
|
return typeof s == "object" && (s.Collection || s.Node || s.Value) ? Object.assign({
|
|
101
101
|
Alias: s.Node,
|
|
102
102
|
Map: s.Node,
|
|
@@ -111,20 +111,19 @@ function Ut(s) {
|
|
|
111
111
|
Seq: s.Collection
|
|
112
112
|
}, s) : s;
|
|
113
113
|
}
|
|
114
|
-
function
|
|
115
|
-
var i, r, o, l, a;
|
|
114
|
+
function Ut(s, e, t, n) {
|
|
116
115
|
if (typeof t == "function")
|
|
117
116
|
return t(s, e, n);
|
|
118
117
|
if (de(e))
|
|
119
|
-
return
|
|
118
|
+
return t.Map?.(s, e, n);
|
|
120
119
|
if (pe(e))
|
|
121
|
-
return
|
|
120
|
+
return t.Seq?.(s, e, n);
|
|
122
121
|
if (T(e))
|
|
123
|
-
return
|
|
122
|
+
return t.Pair?.(s, e, n);
|
|
124
123
|
if (E(e))
|
|
125
|
-
return
|
|
126
|
-
if (
|
|
127
|
-
return
|
|
124
|
+
return t.Scalar?.(s, e, n);
|
|
125
|
+
if (Z(e))
|
|
126
|
+
return t.Alias?.(s, e, n);
|
|
128
127
|
}
|
|
129
128
|
function Vt(s, e, t) {
|
|
130
129
|
const n = e[e.length - 1];
|
|
@@ -135,7 +134,7 @@ function Vt(s, e, t) {
|
|
|
135
134
|
else if (ee(n))
|
|
136
135
|
n.contents = t;
|
|
137
136
|
else {
|
|
138
|
-
const i =
|
|
137
|
+
const i = Z(n) ? "alias" : "scalar";
|
|
139
138
|
throw new Error(`Cannot replace node with ${i} parent`);
|
|
140
139
|
}
|
|
141
140
|
}
|
|
@@ -244,7 +243,7 @@ class B {
|
|
|
244
243
|
let i;
|
|
245
244
|
if (e && n.length > 0 && $(e.contents)) {
|
|
246
245
|
const r = {};
|
|
247
|
-
|
|
246
|
+
Q(e.contents, (o, l) => {
|
|
248
247
|
$(l) && l.tag && (r[l.tag] = !0);
|
|
249
248
|
}), i = Object.keys(r);
|
|
250
249
|
} else
|
|
@@ -257,16 +256,16 @@ class B {
|
|
|
257
256
|
}
|
|
258
257
|
B.defaultYaml = { explicit: !1, version: "1.2" };
|
|
259
258
|
B.defaultTags = { "!!": "tag:yaml.org,2002:" };
|
|
260
|
-
function
|
|
259
|
+
function Jt(s) {
|
|
261
260
|
if (/[\x00-\x19\s,[\]{}]/.test(s)) {
|
|
262
261
|
const t = `Anchor must not contain whitespace or control characters: ${JSON.stringify(s)}`;
|
|
263
262
|
throw new Error(t);
|
|
264
263
|
}
|
|
265
264
|
return !0;
|
|
266
265
|
}
|
|
267
|
-
function
|
|
266
|
+
function Yt(s) {
|
|
268
267
|
const e = /* @__PURE__ */ new Set();
|
|
269
|
-
return
|
|
268
|
+
return Q(s, {
|
|
270
269
|
Value(t, n) {
|
|
271
270
|
n.anchor && e.add(n.anchor);
|
|
272
271
|
}
|
|
@@ -284,7 +283,7 @@ function Ks(s, e) {
|
|
|
284
283
|
let i = null;
|
|
285
284
|
return {
|
|
286
285
|
onAnchor: (r) => {
|
|
287
|
-
t.push(r), i || (i =
|
|
286
|
+
t.push(r), i || (i = Yt(s));
|
|
288
287
|
const o = Gt(e, i);
|
|
289
288
|
return i.add(o), o;
|
|
290
289
|
},
|
|
@@ -331,9 +330,9 @@ function oe(s, e, t, n) {
|
|
|
331
330
|
}
|
|
332
331
|
return s.call(e, t, n);
|
|
333
332
|
}
|
|
334
|
-
function
|
|
333
|
+
function j(s, e, t) {
|
|
335
334
|
if (Array.isArray(s))
|
|
336
|
-
return s.map((n, i) =>
|
|
335
|
+
return s.map((n, i) => j(n, String(i), t));
|
|
337
336
|
if (s && typeof s.toJSON == "function") {
|
|
338
337
|
if (!t || !vs(s))
|
|
339
338
|
return s.toJSON(e, t);
|
|
@@ -344,11 +343,11 @@ function P(s, e, t) {
|
|
|
344
343
|
const i = s.toJSON(e, t);
|
|
345
344
|
return t.onCreate && t.onCreate(i), i;
|
|
346
345
|
}
|
|
347
|
-
return typeof s == "bigint" && !
|
|
346
|
+
return typeof s == "bigint" && !t?.keep ? Number(s) : s;
|
|
348
347
|
}
|
|
349
348
|
class pt {
|
|
350
349
|
constructor(e) {
|
|
351
|
-
Object.defineProperty(this,
|
|
350
|
+
Object.defineProperty(this, P, { value: e });
|
|
352
351
|
}
|
|
353
352
|
/** Create a copy of this node. */
|
|
354
353
|
clone() {
|
|
@@ -366,14 +365,14 @@ class pt {
|
|
|
366
365
|
mapAsMap: t === !0,
|
|
367
366
|
mapKeyWarned: !1,
|
|
368
367
|
maxAliasCount: typeof n == "number" ? n : 100
|
|
369
|
-
}, l =
|
|
368
|
+
}, l = j(this, "", o);
|
|
370
369
|
if (typeof i == "function")
|
|
371
370
|
for (const { count: a, res: c } of o.anchors.values())
|
|
372
371
|
i(c, a);
|
|
373
372
|
return typeof r == "function" ? oe(r, { "": l }, "", l) : l;
|
|
374
373
|
}
|
|
375
374
|
}
|
|
376
|
-
class
|
|
375
|
+
class Re extends pt {
|
|
377
376
|
constructor(e) {
|
|
378
377
|
super(dt), this.source = e, Object.defineProperty(this, "tag", {
|
|
379
378
|
set() {
|
|
@@ -387,10 +386,10 @@ class Ue extends pt {
|
|
|
387
386
|
*/
|
|
388
387
|
resolve(e) {
|
|
389
388
|
let t;
|
|
390
|
-
return
|
|
389
|
+
return Q(e, {
|
|
391
390
|
Node: (n, i) => {
|
|
392
391
|
if (i === this)
|
|
393
|
-
return
|
|
392
|
+
return Q.BREAK;
|
|
394
393
|
i.anchor === this.source && (t = i);
|
|
395
394
|
}
|
|
396
395
|
}), t;
|
|
@@ -404,7 +403,7 @@ class Ue extends pt {
|
|
|
404
403
|
throw new ReferenceError(a);
|
|
405
404
|
}
|
|
406
405
|
let l = n.get(o);
|
|
407
|
-
if (l || (
|
|
406
|
+
if (l || (j(o, null, t), l = n.get(o)), !l || l.res === void 0) {
|
|
408
407
|
const a = "This should not happen: Alias anchor was not resolved?";
|
|
409
408
|
throw new ReferenceError(a);
|
|
410
409
|
}
|
|
@@ -417,7 +416,7 @@ class Ue extends pt {
|
|
|
417
416
|
toString(e, t, n) {
|
|
418
417
|
const i = `*${this.source}`;
|
|
419
418
|
if (e) {
|
|
420
|
-
if (
|
|
419
|
+
if (Jt(this.source), e.options.verifyAliasOrder && !e.anchors.has(this.source)) {
|
|
421
420
|
const r = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;
|
|
422
421
|
throw new Error(r);
|
|
423
422
|
}
|
|
@@ -428,7 +427,7 @@ class Ue extends pt {
|
|
|
428
427
|
}
|
|
429
428
|
}
|
|
430
429
|
function ve(s, e, t) {
|
|
431
|
-
if (
|
|
430
|
+
if (Z(e)) {
|
|
432
431
|
const n = e.resolve(s), i = t && n && t.get(n);
|
|
433
432
|
return i ? i.count * i.aliasCount : 0;
|
|
434
433
|
} else if (L(e)) {
|
|
@@ -447,10 +446,10 @@ function ve(s, e, t) {
|
|
|
447
446
|
const Qt = (s) => !s || typeof s != "function" && typeof s != "object";
|
|
448
447
|
class O extends pt {
|
|
449
448
|
constructor(e) {
|
|
450
|
-
super(
|
|
449
|
+
super(R), this.value = e;
|
|
451
450
|
}
|
|
452
451
|
toJSON(e, t) {
|
|
453
|
-
return t
|
|
452
|
+
return t?.keep ? this.value : j(this.value, e, t);
|
|
454
453
|
}
|
|
455
454
|
toString() {
|
|
456
455
|
return String(this.value);
|
|
@@ -461,49 +460,45 @@ O.BLOCK_LITERAL = "BLOCK_LITERAL";
|
|
|
461
460
|
O.PLAIN = "PLAIN";
|
|
462
461
|
O.QUOTE_DOUBLE = "QUOTE_DOUBLE";
|
|
463
462
|
O.QUOTE_SINGLE = "QUOTE_SINGLE";
|
|
464
|
-
const
|
|
465
|
-
function
|
|
463
|
+
const js = "tag:yaml.org,2002:";
|
|
464
|
+
function Ps(s, e, t) {
|
|
466
465
|
if (e) {
|
|
467
466
|
const n = t.filter((r) => r.tag === e), i = n.find((r) => !r.format) ?? n[0];
|
|
468
467
|
if (!i)
|
|
469
468
|
throw new Error(`Tag ${e} not found`);
|
|
470
469
|
return i;
|
|
471
470
|
}
|
|
472
|
-
return t.find((n) =>
|
|
473
|
-
var i;
|
|
474
|
-
return ((i = n.identify) == null ? void 0 : i.call(n, s)) && !n.format;
|
|
475
|
-
});
|
|
471
|
+
return t.find((n) => n.identify?.(s) && !n.format);
|
|
476
472
|
}
|
|
477
473
|
function ke(s, e, t) {
|
|
478
|
-
var f, d, h;
|
|
479
474
|
if (ee(s) && (s = s.contents), $(s))
|
|
480
475
|
return s;
|
|
481
476
|
if (T(s)) {
|
|
482
|
-
const
|
|
483
|
-
return
|
|
477
|
+
const f = t.schema[G].createNode?.(t.schema, null, t);
|
|
478
|
+
return f.items.push(s), f;
|
|
484
479
|
}
|
|
485
480
|
(s instanceof String || s instanceof Number || s instanceof Boolean || typeof BigInt < "u" && s instanceof BigInt) && (s = s.valueOf());
|
|
486
481
|
const { aliasDuplicateObjects: n, onAnchor: i, onTagObj: r, schema: o, sourceObjects: l } = t;
|
|
487
482
|
let a;
|
|
488
483
|
if (n && s && typeof s == "object") {
|
|
489
484
|
if (a = l.get(s), a)
|
|
490
|
-
return a.anchor || (a.anchor = i(s)), new
|
|
485
|
+
return a.anchor || (a.anchor = i(s)), new Re(a.anchor);
|
|
491
486
|
a = { anchor: null, node: null }, l.set(s, a);
|
|
492
487
|
}
|
|
493
|
-
e
|
|
494
|
-
let c =
|
|
488
|
+
e?.startsWith("!!") && (e = js + e.slice(2));
|
|
489
|
+
let c = Ps(s, e, o.tags);
|
|
495
490
|
if (!c) {
|
|
496
491
|
if (s && typeof s.toJSON == "function" && (s = s.toJSON()), !s || typeof s != "object") {
|
|
497
|
-
const
|
|
498
|
-
return a && (a.node =
|
|
492
|
+
const f = new O(s);
|
|
493
|
+
return a && (a.node = f), f;
|
|
499
494
|
}
|
|
500
|
-
c = s instanceof Map ? o[
|
|
495
|
+
c = s instanceof Map ? o[G] : Symbol.iterator in Object(s) ? o[he] : o[G];
|
|
501
496
|
}
|
|
502
497
|
r && (r(c), delete t.onTagObj);
|
|
503
|
-
const
|
|
504
|
-
return e ?
|
|
498
|
+
const d = c?.createNode ? c.createNode(t.schema, s, t) : typeof c?.nodeClass?.from == "function" ? c.nodeClass.from(t.schema, s, t) : new O(s);
|
|
499
|
+
return e ? d.tag = e : c.default || (d.tag = c.tag), a && (a.node = d), d;
|
|
505
500
|
}
|
|
506
|
-
function
|
|
501
|
+
function je(s, e, t) {
|
|
507
502
|
let n = t;
|
|
508
503
|
for (let i = e.length - 1; i >= 0; --i) {
|
|
509
504
|
const r = e[i];
|
|
@@ -555,7 +550,7 @@ class Wt extends pt {
|
|
|
555
550
|
if (L(r))
|
|
556
551
|
r.addIn(i, t);
|
|
557
552
|
else if (r === void 0 && this.schema)
|
|
558
|
-
this.set(n,
|
|
553
|
+
this.set(n, je(this.schema, i, t));
|
|
559
554
|
else
|
|
560
555
|
throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`);
|
|
561
556
|
}
|
|
@@ -613,83 +608,83 @@ class Wt extends pt {
|
|
|
613
608
|
if (L(r))
|
|
614
609
|
r.setIn(i, t);
|
|
615
610
|
else if (r === void 0 && this.schema)
|
|
616
|
-
this.set(n,
|
|
611
|
+
this.set(n, je(this.schema, i, t));
|
|
617
612
|
else
|
|
618
613
|
throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`);
|
|
619
614
|
}
|
|
620
615
|
}
|
|
621
616
|
}
|
|
622
|
-
const
|
|
623
|
-
function
|
|
617
|
+
const Ds = (s) => s.replace(/^(?!$)(?: $)?/gm, "#");
|
|
618
|
+
function U(s, e) {
|
|
624
619
|
return /^\n+$/.test(s) ? s.substring(1) : e ? s.replace(/^(?! *$)/gm, e) : s;
|
|
625
620
|
}
|
|
626
621
|
const H = (s, e, t) => s.endsWith(`
|
|
627
|
-
`) ?
|
|
622
|
+
`) ? U(t, e) : t.includes(`
|
|
628
623
|
`) ? `
|
|
629
|
-
` +
|
|
630
|
-
function
|
|
624
|
+
` + U(t, e) : (s.endsWith(" ") ? "" : " ") + t, Ht = "flow", at = "block", Be = "quoted";
|
|
625
|
+
function Ue(s, e, t = "flow", { indentAtStart: n, lineWidth: i = 80, minContentWidth: r = 20, onFold: o, onOverflow: l } = {}) {
|
|
631
626
|
if (!i || i < 0)
|
|
632
627
|
return s;
|
|
633
628
|
i < r && (r = 0);
|
|
634
629
|
const a = Math.max(1 + r, 1 + i - e.length);
|
|
635
630
|
if (s.length <= a)
|
|
636
631
|
return s;
|
|
637
|
-
const c = [],
|
|
632
|
+
const c = [], d = {};
|
|
638
633
|
let f = i - e.length;
|
|
639
634
|
typeof n == "number" && (n > i - Math.max(2, r) ? c.push(0) : f = i - n);
|
|
640
|
-
let
|
|
641
|
-
t === at && (
|
|
642
|
-
for (let
|
|
643
|
-
if (t === Be &&
|
|
644
|
-
switch (
|
|
635
|
+
let u, m, y = !1, h = -1, p = -1, b = -1;
|
|
636
|
+
t === at && (h = $t(s, h, e.length), h !== -1 && (f = h + a));
|
|
637
|
+
for (let S; S = s[h += 1]; ) {
|
|
638
|
+
if (t === Be && S === "\\") {
|
|
639
|
+
switch (p = h, s[h + 1]) {
|
|
645
640
|
case "x":
|
|
646
|
-
|
|
641
|
+
h += 3;
|
|
647
642
|
break;
|
|
648
643
|
case "u":
|
|
649
|
-
|
|
644
|
+
h += 5;
|
|
650
645
|
break;
|
|
651
646
|
case "U":
|
|
652
|
-
|
|
647
|
+
h += 9;
|
|
653
648
|
break;
|
|
654
649
|
default:
|
|
655
|
-
|
|
650
|
+
h += 1;
|
|
656
651
|
}
|
|
657
|
-
b =
|
|
652
|
+
b = h;
|
|
658
653
|
}
|
|
659
|
-
if (
|
|
654
|
+
if (S === `
|
|
660
655
|
`)
|
|
661
|
-
t === at && (
|
|
656
|
+
t === at && (h = $t(s, h, e.length)), f = h + e.length + a, u = void 0;
|
|
662
657
|
else {
|
|
663
|
-
if (
|
|
664
|
-
` &&
|
|
665
|
-
const
|
|
666
|
-
|
|
667
|
-
` &&
|
|
658
|
+
if (S === " " && m && m !== " " && m !== `
|
|
659
|
+
` && m !== " ") {
|
|
660
|
+
const k = s[h + 1];
|
|
661
|
+
k && k !== " " && k !== `
|
|
662
|
+
` && k !== " " && (u = h);
|
|
668
663
|
}
|
|
669
|
-
if (
|
|
670
|
-
if (
|
|
671
|
-
c.push(
|
|
664
|
+
if (h >= f)
|
|
665
|
+
if (u)
|
|
666
|
+
c.push(u), f = u + a, u = void 0;
|
|
672
667
|
else if (t === Be) {
|
|
673
|
-
for (;
|
|
674
|
-
|
|
675
|
-
const
|
|
676
|
-
if (
|
|
668
|
+
for (; m === " " || m === " "; )
|
|
669
|
+
m = S, S = s[h += 1], y = !0;
|
|
670
|
+
const k = h > b + 1 ? h - 2 : p - 1;
|
|
671
|
+
if (d[k])
|
|
677
672
|
return s;
|
|
678
|
-
c.push(
|
|
673
|
+
c.push(k), d[k] = !0, f = k + a, u = void 0;
|
|
679
674
|
} else
|
|
680
675
|
y = !0;
|
|
681
676
|
}
|
|
682
|
-
|
|
677
|
+
m = S;
|
|
683
678
|
}
|
|
684
679
|
if (y && l && l(), c.length === 0)
|
|
685
680
|
return s;
|
|
686
681
|
o && o();
|
|
687
682
|
let w = s.slice(0, c[0]);
|
|
688
|
-
for (let
|
|
689
|
-
const
|
|
690
|
-
|
|
691
|
-
${e}${s.slice(0,
|
|
692
|
-
${e}${s.slice(
|
|
683
|
+
for (let S = 0; S < c.length; ++S) {
|
|
684
|
+
const k = c[S], N = c[S + 1] || s.length;
|
|
685
|
+
k === 0 ? w = `
|
|
686
|
+
${e}${s.slice(0, N)}` : (t === Be && d[k] && (w += `${s[k]}\\`), w += `
|
|
687
|
+
${e}${s.slice(k + 1, N)}`);
|
|
693
688
|
}
|
|
694
689
|
return w;
|
|
695
690
|
}
|
|
@@ -711,7 +706,7 @@ const Ve = (s, e) => ({
|
|
|
711
706
|
indentAtStart: e ? s.indent.length : s.indentAtStart,
|
|
712
707
|
lineWidth: s.options.lineWidth,
|
|
713
708
|
minContentWidth: s.options.minContentWidth
|
|
714
|
-
}),
|
|
709
|
+
}), Je = (s) => /^(%|---|\.\.\.)/m.test(s);
|
|
715
710
|
function qs(s, e, t) {
|
|
716
711
|
if (!e || e < 0)
|
|
717
712
|
return !1;
|
|
@@ -732,7 +727,7 @@ function Se(s, e) {
|
|
|
732
727
|
const t = JSON.stringify(s);
|
|
733
728
|
if (e.options.doubleQuotedAsJSON)
|
|
734
729
|
return t;
|
|
735
|
-
const { implicitKey: n } = e, i = e.options.doubleQuotedMinMultiLineLength, r = e.indent || (
|
|
730
|
+
const { implicitKey: n } = e, i = e.options.doubleQuotedMinMultiLineLength, r = e.indent || (Je(s) ? " " : "");
|
|
736
731
|
let o = "", l = 0;
|
|
737
732
|
for (let a = 0, c = t[a]; c; c = t[++a])
|
|
738
733
|
if (c === " " && t[a + 1] === "\\" && t[a + 2] === "n" && (o += t.slice(l, a) + "\\ ", a += 1, l = a, c = "\\"), c === "\\")
|
|
@@ -740,8 +735,8 @@ function Se(s, e) {
|
|
|
740
735
|
case "u":
|
|
741
736
|
{
|
|
742
737
|
o += t.slice(l, a);
|
|
743
|
-
const
|
|
744
|
-
switch (
|
|
738
|
+
const d = t.substr(a + 2, 4);
|
|
739
|
+
switch (d) {
|
|
745
740
|
case "0000":
|
|
746
741
|
o += "\\0";
|
|
747
742
|
break;
|
|
@@ -767,7 +762,7 @@ function Se(s, e) {
|
|
|
767
762
|
o += "\\P";
|
|
768
763
|
break;
|
|
769
764
|
default:
|
|
770
|
-
|
|
765
|
+
d.substr(0, 2) === "00" ? o += "\\x" + d.substr(2) : o += t.substr(a, 6);
|
|
771
766
|
}
|
|
772
767
|
a += 5, l = a + 1;
|
|
773
768
|
}
|
|
@@ -787,15 +782,15 @@ function Se(s, e) {
|
|
|
787
782
|
default:
|
|
788
783
|
a += 1;
|
|
789
784
|
}
|
|
790
|
-
return o = l ? o + t.slice(l) : t, n ? o :
|
|
785
|
+
return o = l ? o + t.slice(l) : t, n ? o : Ue(o, r, Be, Ve(e, !1));
|
|
791
786
|
}
|
|
792
787
|
function ct(s, e) {
|
|
793
788
|
if (e.options.singleQuote === !1 || e.implicitKey && s.includes(`
|
|
794
789
|
`) || /[ \t]\n|\n[ \t]/.test(s))
|
|
795
790
|
return Se(s, e);
|
|
796
|
-
const t = e.indent || (
|
|
791
|
+
const t = e.indent || (Je(s) ? " " : ""), n = "'" + s.replace(/'/g, "''").replace(/\n+/g, `$&
|
|
797
792
|
${t}`) + "'";
|
|
798
|
-
return e.implicitKey ? n :
|
|
793
|
+
return e.implicitKey ? n : Ue(n, t, Ht, Ve(e, !1));
|
|
799
794
|
}
|
|
800
795
|
function le(s, e) {
|
|
801
796
|
const { singleQuote: t } = e.options;
|
|
@@ -821,58 +816,65 @@ function Me({ comment: s, type: e, value: t }, n, i, r) {
|
|
|
821
816
|
const { blockQuote: o, commentString: l, lineWidth: a } = n.options;
|
|
822
817
|
if (!o || /\n[\t ]+$/.test(t) || /^\s*$/.test(t))
|
|
823
818
|
return le(t, n);
|
|
824
|
-
const c = n.indent || (n.forceBlockIndent ||
|
|
819
|
+
const c = n.indent || (n.forceBlockIndent || Je(t) ? " " : ""), d = o === "literal" ? !0 : o === "folded" || e === O.BLOCK_FOLDED ? !1 : e === O.BLOCK_LITERAL ? !0 : !qs(t, a, c.length);
|
|
825
820
|
if (!t)
|
|
826
|
-
return
|
|
821
|
+
return d ? `|
|
|
827
822
|
` : `>
|
|
828
823
|
`;
|
|
829
|
-
let f,
|
|
830
|
-
for (
|
|
831
|
-
const
|
|
832
|
-
if (
|
|
833
|
-
` &&
|
|
824
|
+
let f, u;
|
|
825
|
+
for (u = t.length; u > 0; --u) {
|
|
826
|
+
const N = t[u - 1];
|
|
827
|
+
if (N !== `
|
|
828
|
+
` && N !== " " && N !== " ")
|
|
834
829
|
break;
|
|
835
830
|
}
|
|
836
|
-
let
|
|
837
|
-
const y =
|
|
831
|
+
let m = t.substring(u);
|
|
832
|
+
const y = m.indexOf(`
|
|
838
833
|
`);
|
|
839
|
-
y === -1 ? f = "-" : t ===
|
|
840
|
-
` && (
|
|
841
|
-
let
|
|
842
|
-
for (
|
|
843
|
-
const
|
|
844
|
-
if (
|
|
845
|
-
|
|
846
|
-
else if (
|
|
834
|
+
y === -1 ? f = "-" : t === m || y !== m.length - 1 ? (f = "+", r && r()) : f = "", m && (t = t.slice(0, -m.length), m[m.length - 1] === `
|
|
835
|
+
` && (m = m.slice(0, -1)), m = m.replace(ft, `$&${c}`));
|
|
836
|
+
let h = !1, p, b = -1;
|
|
837
|
+
for (p = 0; p < t.length; ++p) {
|
|
838
|
+
const N = t[p];
|
|
839
|
+
if (N === " ")
|
|
840
|
+
h = !0;
|
|
841
|
+
else if (N === `
|
|
847
842
|
`)
|
|
848
|
-
b =
|
|
843
|
+
b = p;
|
|
849
844
|
else
|
|
850
845
|
break;
|
|
851
846
|
}
|
|
852
|
-
let w = t.substring(0, b <
|
|
847
|
+
let w = t.substring(0, b < p ? b + 1 : p);
|
|
853
848
|
w && (t = t.substring(w.length), w = w.replace(/\n+/g, `$&${c}`));
|
|
854
|
-
let
|
|
855
|
-
if (s && (
|
|
856
|
-
|
|
857
|
-
${c}${w}${t}${h}`;
|
|
858
|
-
t = t.replace(/\n+/g, `
|
|
849
|
+
let k = (h ? c ? "2" : "1" : "") + f;
|
|
850
|
+
if (s && (k += " " + l(s.replace(/ ?[\r\n]+/g, " ")), i && i()), !d) {
|
|
851
|
+
const N = t.replace(/\n+/g, `
|
|
859
852
|
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, "$1$2").replace(/\n+/g, `$&${c}`);
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
853
|
+
let A = !1;
|
|
854
|
+
const I = Ve(n, !0);
|
|
855
|
+
o !== "folded" && e !== O.BLOCK_FOLDED && (I.onOverflow = () => {
|
|
856
|
+
A = !0;
|
|
857
|
+
});
|
|
858
|
+
const g = Ue(`${w}${N}${m}`, c, at, I);
|
|
859
|
+
if (!A)
|
|
860
|
+
return `>${k}
|
|
861
|
+
${c}${g}`;
|
|
862
|
+
}
|
|
863
|
+
return t = t.replace(/\n+/g, `$&${c}`), `|${k}
|
|
864
|
+
${c}${w}${t}${m}`;
|
|
863
865
|
}
|
|
864
|
-
function
|
|
865
|
-
const { type: i, value: r } = s, { actualString: o, implicitKey: l, indent: a, indentStep: c, inFlow:
|
|
866
|
+
function Fs(s, e, t, n) {
|
|
867
|
+
const { type: i, value: r } = s, { actualString: o, implicitKey: l, indent: a, indentStep: c, inFlow: d } = e;
|
|
866
868
|
if (l && r.includes(`
|
|
867
|
-
`) ||
|
|
869
|
+
`) || d && /[[\]{},]/.test(r))
|
|
868
870
|
return le(r, e);
|
|
869
871
|
if (!r || /^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(r))
|
|
870
|
-
return l ||
|
|
872
|
+
return l || d || !r.includes(`
|
|
871
873
|
`) ? le(r, e) : Me(s, e, t, n);
|
|
872
|
-
if (!l && !
|
|
874
|
+
if (!l && !d && i !== O.PLAIN && r.includes(`
|
|
873
875
|
`))
|
|
874
876
|
return Me(s, e, t, n);
|
|
875
|
-
if (
|
|
877
|
+
if (Je(r)) {
|
|
876
878
|
if (a === "")
|
|
877
879
|
return e.forceBlockIndent = !0, Me(s, e, t, n);
|
|
878
880
|
if (l && a === c)
|
|
@@ -881,21 +883,18 @@ function Rs(s, e, t, n) {
|
|
|
881
883
|
const f = r.replace(/\n+/g, `$&
|
|
882
884
|
${a}`);
|
|
883
885
|
if (o) {
|
|
884
|
-
const
|
|
885
|
-
|
|
886
|
-
return u.default && u.tag !== "tag:yaml.org,2002:str" && ((m = u.test) == null ? void 0 : m.test(f));
|
|
887
|
-
}, { compat: h, tags: y } = e.doc.schema;
|
|
888
|
-
if (y.some(d) || h != null && h.some(d))
|
|
886
|
+
const u = (h) => h.default && h.tag !== "tag:yaml.org,2002:str" && h.test?.test(f), { compat: m, tags: y } = e.doc.schema;
|
|
887
|
+
if (y.some(u) || m?.some(u))
|
|
889
888
|
return le(r, e);
|
|
890
889
|
}
|
|
891
|
-
return l ? f :
|
|
890
|
+
return l ? f : Ue(f, a, Ht, Ve(e, !1));
|
|
892
891
|
}
|
|
893
892
|
function Ae(s, e, t, n) {
|
|
894
893
|
const { implicitKey: i, inFlow: r } = e, o = typeof s.value == "string" ? s : Object.assign({}, s, { value: String(s.value) });
|
|
895
894
|
let { type: l } = s;
|
|
896
895
|
l !== O.QUOTE_DOUBLE && /[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value) && (l = O.QUOTE_DOUBLE);
|
|
897
|
-
const a = (
|
|
898
|
-
switch (
|
|
896
|
+
const a = (d) => {
|
|
897
|
+
switch (d) {
|
|
899
898
|
case O.BLOCK_FOLDED:
|
|
900
899
|
case O.BLOCK_LITERAL:
|
|
901
900
|
return i || r ? le(o.value, e) : Me(o, e, t, n);
|
|
@@ -904,23 +903,23 @@ function Ae(s, e, t, n) {
|
|
|
904
903
|
case O.QUOTE_SINGLE:
|
|
905
904
|
return ct(o.value, e);
|
|
906
905
|
case O.PLAIN:
|
|
907
|
-
return
|
|
906
|
+
return Fs(o, e, t, n);
|
|
908
907
|
default:
|
|
909
908
|
return null;
|
|
910
909
|
}
|
|
911
910
|
};
|
|
912
911
|
let c = a(l);
|
|
913
912
|
if (c === null) {
|
|
914
|
-
const { defaultKeyType:
|
|
915
|
-
if (c = a(
|
|
916
|
-
throw new Error(`Unsupported default string type ${
|
|
913
|
+
const { defaultKeyType: d, defaultStringType: f } = e.options, u = i && d || f;
|
|
914
|
+
if (c = a(u), c === null)
|
|
915
|
+
throw new Error(`Unsupported default string type ${u}`);
|
|
917
916
|
}
|
|
918
917
|
return c;
|
|
919
918
|
}
|
|
920
919
|
function Xt(s, e) {
|
|
921
920
|
const t = Object.assign({
|
|
922
921
|
blockQuote: !0,
|
|
923
|
-
commentString:
|
|
922
|
+
commentString: Ds,
|
|
924
923
|
defaultKeyType: null,
|
|
925
924
|
defaultStringType: "PLAIN",
|
|
926
925
|
directives: null,
|
|
@@ -958,139 +957,134 @@ function Xt(s, e) {
|
|
|
958
957
|
options: t
|
|
959
958
|
};
|
|
960
959
|
}
|
|
961
|
-
function
|
|
962
|
-
var i;
|
|
960
|
+
function Rs(s, e) {
|
|
963
961
|
if (e.tag) {
|
|
964
|
-
const
|
|
965
|
-
if (
|
|
966
|
-
return
|
|
962
|
+
const i = s.filter((r) => r.tag === e.tag);
|
|
963
|
+
if (i.length > 0)
|
|
964
|
+
return i.find((r) => r.format === e.format) ?? i[0];
|
|
967
965
|
}
|
|
968
966
|
let t, n;
|
|
969
967
|
if (E(e)) {
|
|
970
968
|
n = e.value;
|
|
971
|
-
let
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
if (r.length > 1) {
|
|
976
|
-
const o = r.filter((l) => l.test);
|
|
977
|
-
o.length > 0 && (r = o);
|
|
969
|
+
let i = s.filter((r) => r.identify?.(n));
|
|
970
|
+
if (i.length > 1) {
|
|
971
|
+
const r = i.filter((o) => o.test);
|
|
972
|
+
r.length > 0 && (i = r);
|
|
978
973
|
}
|
|
979
|
-
t =
|
|
974
|
+
t = i.find((r) => r.format === e.format) ?? i.find((r) => !r.format);
|
|
980
975
|
} else
|
|
981
|
-
n = e, t = s.find((
|
|
976
|
+
n = e, t = s.find((i) => i.nodeClass && n instanceof i.nodeClass);
|
|
982
977
|
if (!t) {
|
|
983
|
-
const
|
|
984
|
-
throw new Error(`Tag not resolved for ${
|
|
978
|
+
const i = n?.constructor?.name ?? typeof n;
|
|
979
|
+
throw new Error(`Tag not resolved for ${i} value`);
|
|
985
980
|
}
|
|
986
981
|
return t;
|
|
987
982
|
}
|
|
988
|
-
function
|
|
983
|
+
function Us(s, e, { anchors: t, doc: n }) {
|
|
989
984
|
if (!n.directives)
|
|
990
985
|
return "";
|
|
991
986
|
const i = [], r = (E(s) || L(s)) && s.anchor;
|
|
992
|
-
r &&
|
|
987
|
+
r && Jt(r) && (t.add(r), i.push(`&${r}`));
|
|
993
988
|
const o = s.tag ? s.tag : e.default ? null : e.tag;
|
|
994
989
|
return o && i.push(n.directives.tagString(o)), i.join(" ");
|
|
995
990
|
}
|
|
996
991
|
function fe(s, e, t, n) {
|
|
997
|
-
var a;
|
|
998
992
|
if (T(s))
|
|
999
993
|
return s.toString(e, t, n);
|
|
1000
|
-
if (
|
|
994
|
+
if (Z(s)) {
|
|
1001
995
|
if (e.doc.directives)
|
|
1002
996
|
return s.toString(e);
|
|
1003
|
-
if (
|
|
997
|
+
if (e.resolvedAliases?.has(s))
|
|
1004
998
|
throw new TypeError("Cannot stringify circular structure without alias nodes");
|
|
1005
999
|
e.resolvedAliases ? e.resolvedAliases.add(s) : e.resolvedAliases = /* @__PURE__ */ new Set([s]), s = s.resolve(e.doc);
|
|
1006
1000
|
}
|
|
1007
1001
|
let i;
|
|
1008
|
-
const r = $(s) ? s : e.doc.createNode(s, { onTagObj: (
|
|
1009
|
-
i || (i =
|
|
1010
|
-
const o =
|
|
1002
|
+
const r = $(s) ? s : e.doc.createNode(s, { onTagObj: (a) => i = a });
|
|
1003
|
+
i || (i = Rs(e.doc.schema.tags, r));
|
|
1004
|
+
const o = Us(r, i, e);
|
|
1011
1005
|
o.length > 0 && (e.indentAtStart = (e.indentAtStart ?? 0) + o.length + 1);
|
|
1012
1006
|
const l = typeof i.stringify == "function" ? i.stringify(r, e, t, n) : E(r) ? Ae(r, e, t, n) : r.toString(e, t, n);
|
|
1013
1007
|
return o ? E(r) || l[0] === "{" || l[0] === "[" ? `${o} ${l}` : `${o}
|
|
1014
1008
|
${e.indent}${l}` : l;
|
|
1015
1009
|
}
|
|
1016
1010
|
function Vs({ key: s, value: e }, t, n, i) {
|
|
1017
|
-
const { allNullValues: r, doc: o, indent: l, indentStep: a, options: { commentString: c, indentSeq:
|
|
1018
|
-
let
|
|
1011
|
+
const { allNullValues: r, doc: o, indent: l, indentStep: a, options: { commentString: c, indentSeq: d, simpleKeys: f } } = t;
|
|
1012
|
+
let u = $(s) && s.comment || null;
|
|
1019
1013
|
if (f) {
|
|
1020
|
-
if (
|
|
1014
|
+
if (u)
|
|
1021
1015
|
throw new Error("With simple keys, key nodes cannot have comments");
|
|
1022
1016
|
if (L(s) || !$(s) && typeof s == "object") {
|
|
1023
1017
|
const I = "With simple keys, collection cannot be used as a key value";
|
|
1024
1018
|
throw new Error(I);
|
|
1025
1019
|
}
|
|
1026
1020
|
}
|
|
1027
|
-
let
|
|
1021
|
+
let m = !f && (!s || u && e == null && !t.inFlow || L(s) || (E(s) ? s.type === O.BLOCK_FOLDED || s.type === O.BLOCK_LITERAL : typeof s == "object"));
|
|
1028
1022
|
t = Object.assign({}, t, {
|
|
1029
1023
|
allNullValues: !1,
|
|
1030
|
-
implicitKey: !
|
|
1024
|
+
implicitKey: !m && (f || !r),
|
|
1031
1025
|
indent: l + a
|
|
1032
1026
|
});
|
|
1033
|
-
let y = !1,
|
|
1034
|
-
if (!
|
|
1027
|
+
let y = !1, h = !1, p = fe(s, t, () => y = !0, () => h = !0);
|
|
1028
|
+
if (!m && !t.inFlow && p.length > 1024) {
|
|
1035
1029
|
if (f)
|
|
1036
1030
|
throw new Error("With simple keys, single line scalar must not span more than 1024 characters");
|
|
1037
|
-
|
|
1031
|
+
m = !0;
|
|
1038
1032
|
}
|
|
1039
1033
|
if (t.inFlow) {
|
|
1040
1034
|
if (r || e == null)
|
|
1041
|
-
return y && n && n(),
|
|
1042
|
-
} else if (r && !f || e == null &&
|
|
1043
|
-
return
|
|
1044
|
-
y && (
|
|
1045
|
-
${l}:`) : (
|
|
1046
|
-
let b, w,
|
|
1047
|
-
$(e) ? (b = !!e.spaceBefore, w = e.commentBefore,
|
|
1048
|
-
let
|
|
1049
|
-
const
|
|
1050
|
-
let
|
|
1051
|
-
if (
|
|
1052
|
-
if (
|
|
1035
|
+
return y && n && n(), p === "" ? "?" : m ? `? ${p}` : p;
|
|
1036
|
+
} else if (r && !f || e == null && m)
|
|
1037
|
+
return p = `? ${p}`, u && !y ? p += H(p, t.indent, c(u)) : h && i && i(), p;
|
|
1038
|
+
y && (u = null), m ? (u && (p += H(p, t.indent, c(u))), p = `? ${p}
|
|
1039
|
+
${l}:`) : (p = `${p}:`, u && (p += H(p, t.indent, c(u))));
|
|
1040
|
+
let b, w, S;
|
|
1041
|
+
$(e) ? (b = !!e.spaceBefore, w = e.commentBefore, S = e.comment) : (b = !1, w = null, S = null, e && typeof e == "object" && (e = o.createNode(e))), t.implicitKey = !1, !m && !u && E(e) && (t.indentAtStart = p.length + 1), h = !1, !d && a.length >= 2 && !t.inFlow && !m && pe(e) && !e.flow && !e.tag && !e.anchor && (t.indent = t.indent.substring(2));
|
|
1042
|
+
let k = !1;
|
|
1043
|
+
const N = fe(e, t, () => k = !0, () => h = !0);
|
|
1044
|
+
let A = " ";
|
|
1045
|
+
if (u || b || w) {
|
|
1046
|
+
if (A = b ? `
|
|
1053
1047
|
` : "", w) {
|
|
1054
1048
|
const I = c(w);
|
|
1055
|
-
|
|
1056
|
-
${
|
|
1049
|
+
A += `
|
|
1050
|
+
${U(I, t.indent)}`;
|
|
1057
1051
|
}
|
|
1058
|
-
|
|
1059
|
-
` && (
|
|
1052
|
+
N === "" && !t.inFlow ? A === `
|
|
1053
|
+
` && (A = `
|
|
1060
1054
|
|
|
1061
|
-
`) :
|
|
1055
|
+
`) : A += `
|
|
1062
1056
|
${t.indent}`;
|
|
1063
|
-
} else if (!
|
|
1064
|
-
const I =
|
|
1065
|
-
`), _ = g !== -1,
|
|
1066
|
-
if (_ || !
|
|
1057
|
+
} else if (!m && L(e)) {
|
|
1058
|
+
const I = N[0], g = N.indexOf(`
|
|
1059
|
+
`), _ = g !== -1, J = t.inFlow ?? e.flow ?? e.items.length === 0;
|
|
1060
|
+
if (_ || !J) {
|
|
1067
1061
|
let te = !1;
|
|
1068
1062
|
if (_ && (I === "&" || I === "!")) {
|
|
1069
|
-
let C =
|
|
1070
|
-
I === "&" && C !== -1 && C < g &&
|
|
1063
|
+
let C = N.indexOf(" ");
|
|
1064
|
+
I === "&" && C !== -1 && C < g && N[C + 1] === "!" && (C = N.indexOf(" ", C + 1)), (C === -1 || g < C) && (te = !0);
|
|
1071
1065
|
}
|
|
1072
|
-
te || (
|
|
1066
|
+
te || (A = `
|
|
1073
1067
|
${t.indent}`);
|
|
1074
1068
|
}
|
|
1075
|
-
} else (
|
|
1076
|
-
`) && (
|
|
1077
|
-
return
|
|
1069
|
+
} else (N === "" || N[0] === `
|
|
1070
|
+
`) && (A = "");
|
|
1071
|
+
return p += A + N, t.inFlow ? k && n && n() : S && !k ? p += H(p, t.indent, c(S)) : h && i && i(), p;
|
|
1078
1072
|
}
|
|
1079
1073
|
function zt(s, e) {
|
|
1080
|
-
(s === "debug" || s === "warn") &&
|
|
1074
|
+
(s === "debug" || s === "warn") && console.warn(e);
|
|
1081
1075
|
}
|
|
1082
|
-
const
|
|
1083
|
-
identify: (s) => s ===
|
|
1076
|
+
const Te = "<<", V = {
|
|
1077
|
+
identify: (s) => s === Te || typeof s == "symbol" && s.description === Te,
|
|
1084
1078
|
default: "key",
|
|
1085
1079
|
tag: "tag:yaml.org,2002:merge",
|
|
1086
1080
|
test: /^<<$/,
|
|
1087
|
-
resolve: () => Object.assign(new O(Symbol(
|
|
1088
|
-
addToJSMap:
|
|
1081
|
+
resolve: () => Object.assign(new O(Symbol(Te)), {
|
|
1082
|
+
addToJSMap: xt
|
|
1089
1083
|
}),
|
|
1090
|
-
stringify: () =>
|
|
1091
|
-
},
|
|
1092
|
-
function
|
|
1093
|
-
if (t = s &&
|
|
1084
|
+
stringify: () => Te
|
|
1085
|
+
}, Js = (s, e) => (V.identify(e) || E(e) && (!e.type || e.type === O.PLAIN) && V.identify(e.value)) && s?.doc.schema.tags.some((t) => t.tag === V.tag && t.default);
|
|
1086
|
+
function xt(s, e, t) {
|
|
1087
|
+
if (t = s && Z(t) ? t.resolve(s.doc) : t, pe(t))
|
|
1094
1088
|
for (const n of t.items)
|
|
1095
1089
|
et(s, e, n);
|
|
1096
1090
|
else if (Array.isArray(t))
|
|
@@ -1100,7 +1094,7 @@ function Zt(s, e, t) {
|
|
|
1100
1094
|
et(s, e, t);
|
|
1101
1095
|
}
|
|
1102
1096
|
function et(s, e, t) {
|
|
1103
|
-
const n = s &&
|
|
1097
|
+
const n = s && Z(t) ? t.resolve(s.doc) : t;
|
|
1104
1098
|
if (!de(n))
|
|
1105
1099
|
throw new Error("Merge sources must be maps or map aliases");
|
|
1106
1100
|
const i = n.toJSON(null, s, Map);
|
|
@@ -1113,19 +1107,19 @@ function et(s, e, t) {
|
|
|
1113
1107
|
});
|
|
1114
1108
|
return e;
|
|
1115
1109
|
}
|
|
1116
|
-
function
|
|
1110
|
+
function Zt(s, e, { key: t, value: n }) {
|
|
1117
1111
|
if ($(t) && t.addToJSMap)
|
|
1118
1112
|
t.addToJSMap(s, e, n);
|
|
1119
|
-
else if (
|
|
1120
|
-
|
|
1113
|
+
else if (Js(s, t))
|
|
1114
|
+
xt(s, e, n);
|
|
1121
1115
|
else {
|
|
1122
|
-
const i =
|
|
1116
|
+
const i = j(t, "", s);
|
|
1123
1117
|
if (e instanceof Map)
|
|
1124
|
-
e.set(i,
|
|
1118
|
+
e.set(i, j(n, i, s));
|
|
1125
1119
|
else if (e instanceof Set)
|
|
1126
1120
|
e.add(i);
|
|
1127
1121
|
else {
|
|
1128
|
-
const r =
|
|
1122
|
+
const r = Ys(t, i, s), o = j(n, r, s);
|
|
1129
1123
|
r in e ? Object.defineProperty(e, r, {
|
|
1130
1124
|
value: o,
|
|
1131
1125
|
writable: !0,
|
|
@@ -1136,12 +1130,12 @@ function xt(s, e, { key: t, value: n }) {
|
|
|
1136
1130
|
}
|
|
1137
1131
|
return e;
|
|
1138
1132
|
}
|
|
1139
|
-
function
|
|
1133
|
+
function Ys(s, e, t) {
|
|
1140
1134
|
if (e === null)
|
|
1141
1135
|
return "";
|
|
1142
1136
|
if (typeof e != "object")
|
|
1143
1137
|
return String(e);
|
|
1144
|
-
if ($(s) &&
|
|
1138
|
+
if ($(s) && t?.doc) {
|
|
1145
1139
|
const n = Xt(t.doc, {});
|
|
1146
1140
|
n.anchors = /* @__PURE__ */ new Set();
|
|
1147
1141
|
for (const r of t.anchors.keys())
|
|
@@ -1162,54 +1156,54 @@ function mt(s, e, t) {
|
|
|
1162
1156
|
}
|
|
1163
1157
|
class v {
|
|
1164
1158
|
constructor(e, t = null) {
|
|
1165
|
-
Object.defineProperty(this,
|
|
1159
|
+
Object.defineProperty(this, P, { value: qt }), this.key = e, this.value = t;
|
|
1166
1160
|
}
|
|
1167
1161
|
clone(e) {
|
|
1168
1162
|
let { key: t, value: n } = this;
|
|
1169
1163
|
return $(t) && (t = t.clone(e)), $(n) && (n = n.clone(e)), new v(t, n);
|
|
1170
1164
|
}
|
|
1171
1165
|
toJSON(e, t) {
|
|
1172
|
-
const n = t
|
|
1173
|
-
return
|
|
1166
|
+
const n = t?.mapAsMap ? /* @__PURE__ */ new Map() : {};
|
|
1167
|
+
return Zt(t, n, this);
|
|
1174
1168
|
}
|
|
1175
1169
|
toString(e, t, n) {
|
|
1176
|
-
return e
|
|
1170
|
+
return e?.doc ? Vs(this, e, t, n) : JSON.stringify(this);
|
|
1177
1171
|
}
|
|
1178
1172
|
}
|
|
1179
1173
|
function es(s, e, t) {
|
|
1180
1174
|
return (e.inFlow ?? s.flow ? Qs : Gs)(s, e, t);
|
|
1181
1175
|
}
|
|
1182
1176
|
function Gs({ comment: s, items: e }, t, { blockItemPrefix: n, flowChars: i, itemIndent: r, onChompKeep: o, onComment: l }) {
|
|
1183
|
-
const { indent: a, options: { commentString: c } } = t,
|
|
1177
|
+
const { indent: a, options: { commentString: c } } = t, d = Object.assign({}, t, { indent: r, type: null });
|
|
1184
1178
|
let f = !1;
|
|
1185
|
-
const
|
|
1179
|
+
const u = [];
|
|
1186
1180
|
for (let y = 0; y < e.length; ++y) {
|
|
1187
|
-
const
|
|
1188
|
-
let
|
|
1189
|
-
if ($(
|
|
1190
|
-
!f &&
|
|
1191
|
-
else if (T(
|
|
1192
|
-
const w = $(
|
|
1193
|
-
w && (!f && w.spaceBefore &&
|
|
1181
|
+
const h = e[y];
|
|
1182
|
+
let p = null;
|
|
1183
|
+
if ($(h))
|
|
1184
|
+
!f && h.spaceBefore && u.push(""), Pe(t, u, h.commentBefore, f), h.comment && (p = h.comment);
|
|
1185
|
+
else if (T(h)) {
|
|
1186
|
+
const w = $(h.key) ? h.key : null;
|
|
1187
|
+
w && (!f && w.spaceBefore && u.push(""), Pe(t, u, w.commentBefore, f));
|
|
1194
1188
|
}
|
|
1195
1189
|
f = !1;
|
|
1196
|
-
let b = fe(
|
|
1197
|
-
|
|
1190
|
+
let b = fe(h, d, () => p = null, () => f = !0);
|
|
1191
|
+
p && (b += H(b, r, c(p))), f && p && (f = !1), u.push(n + b);
|
|
1198
1192
|
}
|
|
1199
|
-
let
|
|
1200
|
-
if (
|
|
1201
|
-
|
|
1193
|
+
let m;
|
|
1194
|
+
if (u.length === 0)
|
|
1195
|
+
m = i.start + i.end;
|
|
1202
1196
|
else {
|
|
1203
|
-
|
|
1204
|
-
for (let y = 1; y <
|
|
1205
|
-
const
|
|
1206
|
-
|
|
1207
|
-
${a}${
|
|
1197
|
+
m = u[0];
|
|
1198
|
+
for (let y = 1; y < u.length; ++y) {
|
|
1199
|
+
const h = u[y];
|
|
1200
|
+
m += h ? `
|
|
1201
|
+
${a}${h}` : `
|
|
1208
1202
|
`;
|
|
1209
1203
|
}
|
|
1210
1204
|
}
|
|
1211
|
-
return s ? (
|
|
1212
|
-
` +
|
|
1205
|
+
return s ? (m += `
|
|
1206
|
+
` + U(c(s), a), l && l()) : f && o && o(), m;
|
|
1213
1207
|
}
|
|
1214
1208
|
function Qs({ items: s }, e, { flowChars: t, itemIndent: n }) {
|
|
1215
1209
|
const { indent: i, indentStep: r, flowCollectionPadding: o, options: { commentString: l } } = e;
|
|
@@ -1219,45 +1213,45 @@ function Qs({ items: s }, e, { flowChars: t, itemIndent: n }) {
|
|
|
1219
1213
|
inFlow: !0,
|
|
1220
1214
|
type: null
|
|
1221
1215
|
});
|
|
1222
|
-
let c = !1,
|
|
1216
|
+
let c = !1, d = 0;
|
|
1223
1217
|
const f = [];
|
|
1224
1218
|
for (let y = 0; y < s.length; ++y) {
|
|
1225
|
-
const
|
|
1226
|
-
let
|
|
1227
|
-
if ($(
|
|
1228
|
-
|
|
1229
|
-
else if (T(
|
|
1230
|
-
const w = $(
|
|
1231
|
-
w && (w.spaceBefore && f.push(""),
|
|
1232
|
-
const
|
|
1233
|
-
|
|
1219
|
+
const h = s[y];
|
|
1220
|
+
let p = null;
|
|
1221
|
+
if ($(h))
|
|
1222
|
+
h.spaceBefore && f.push(""), Pe(e, f, h.commentBefore, !1), h.comment && (p = h.comment);
|
|
1223
|
+
else if (T(h)) {
|
|
1224
|
+
const w = $(h.key) ? h.key : null;
|
|
1225
|
+
w && (w.spaceBefore && f.push(""), Pe(e, f, w.commentBefore, !1), w.comment && (c = !0));
|
|
1226
|
+
const S = $(h.value) ? h.value : null;
|
|
1227
|
+
S ? (S.comment && (p = S.comment), S.commentBefore && (c = !0)) : h.value == null && w?.comment && (p = w.comment);
|
|
1234
1228
|
}
|
|
1235
|
-
|
|
1236
|
-
let b = fe(
|
|
1237
|
-
y < s.length - 1 && (b += ","),
|
|
1238
|
-
`)) && (c = !0), f.push(b),
|
|
1229
|
+
p && (c = !0);
|
|
1230
|
+
let b = fe(h, a, () => p = null);
|
|
1231
|
+
y < s.length - 1 && (b += ","), p && (b += H(b, n, l(p))), !c && (f.length > d || b.includes(`
|
|
1232
|
+
`)) && (c = !0), f.push(b), d = f.length;
|
|
1239
1233
|
}
|
|
1240
|
-
const { start:
|
|
1234
|
+
const { start: u, end: m } = t;
|
|
1241
1235
|
if (f.length === 0)
|
|
1242
|
-
return
|
|
1236
|
+
return u + m;
|
|
1243
1237
|
if (!c) {
|
|
1244
|
-
const y = f.reduce((
|
|
1238
|
+
const y = f.reduce((h, p) => h + p.length + 2, 2);
|
|
1245
1239
|
c = e.options.lineWidth > 0 && y > e.options.lineWidth;
|
|
1246
1240
|
}
|
|
1247
1241
|
if (c) {
|
|
1248
|
-
let y =
|
|
1249
|
-
for (const
|
|
1250
|
-
y +=
|
|
1251
|
-
${r}${i}${
|
|
1242
|
+
let y = u;
|
|
1243
|
+
for (const h of f)
|
|
1244
|
+
y += h ? `
|
|
1245
|
+
${r}${i}${h}` : `
|
|
1252
1246
|
`;
|
|
1253
1247
|
return `${y}
|
|
1254
|
-
${i}${
|
|
1248
|
+
${i}${m}`;
|
|
1255
1249
|
} else
|
|
1256
|
-
return `${
|
|
1250
|
+
return `${u}${o}${f.join(" ")}${o}${m}`;
|
|
1257
1251
|
}
|
|
1258
|
-
function
|
|
1252
|
+
function Pe({ indent: s, options: { commentString: e } }, t, n, i) {
|
|
1259
1253
|
if (n && i && (n = n.replace(/^\n+/, "")), n) {
|
|
1260
|
-
const r =
|
|
1254
|
+
const r = U(e(n), s);
|
|
1261
1255
|
t.push(r.trimStart());
|
|
1262
1256
|
}
|
|
1263
1257
|
}
|
|
@@ -1272,7 +1266,7 @@ class K extends Wt {
|
|
|
1272
1266
|
return "tag:yaml.org,2002:map";
|
|
1273
1267
|
}
|
|
1274
1268
|
constructor(e) {
|
|
1275
|
-
super(
|
|
1269
|
+
super(G, e), this.items = [];
|
|
1276
1270
|
}
|
|
1277
1271
|
/**
|
|
1278
1272
|
* A generic collection parsing method that can be extended
|
|
@@ -1301,17 +1295,16 @@ class K extends Wt {
|
|
|
1301
1295
|
* collection will throw. Otherwise, overwrites the previous value.
|
|
1302
1296
|
*/
|
|
1303
1297
|
add(e, t) {
|
|
1304
|
-
var o;
|
|
1305
1298
|
let n;
|
|
1306
|
-
T(e) ? n = e : !e || typeof e != "object" || !("key" in e) ? n = new v(e, e
|
|
1307
|
-
const i = X(this.items, n.key), r =
|
|
1299
|
+
T(e) ? n = e : !e || typeof e != "object" || !("key" in e) ? n = new v(e, e?.value) : n = new v(e.key, e.value);
|
|
1300
|
+
const i = X(this.items, n.key), r = this.schema?.sortMapEntries;
|
|
1308
1301
|
if (i) {
|
|
1309
1302
|
if (!t)
|
|
1310
1303
|
throw new Error(`Key ${n.key} already set`);
|
|
1311
1304
|
E(i.value) && Qt(n.value) ? i.value.value = n.value : i.value = n.value;
|
|
1312
1305
|
} else if (r) {
|
|
1313
|
-
const
|
|
1314
|
-
|
|
1306
|
+
const o = this.items.findIndex((l) => r(n, l) < 0);
|
|
1307
|
+
o === -1 ? this.items.push(n) : this.items.splice(o, 0, n);
|
|
1315
1308
|
} else
|
|
1316
1309
|
this.items.push(n);
|
|
1317
1310
|
}
|
|
@@ -1320,7 +1313,7 @@ class K extends Wt {
|
|
|
1320
1313
|
return t ? this.items.splice(this.items.indexOf(t), 1).length > 0 : !1;
|
|
1321
1314
|
}
|
|
1322
1315
|
get(e, t) {
|
|
1323
|
-
const
|
|
1316
|
+
const i = X(this.items, e)?.value;
|
|
1324
1317
|
return (!t && E(i) ? i.value : i) ?? void 0;
|
|
1325
1318
|
}
|
|
1326
1319
|
has(e) {
|
|
@@ -1335,10 +1328,10 @@ class K extends Wt {
|
|
|
1335
1328
|
* @returns Instance of Type, Map, or Object
|
|
1336
1329
|
*/
|
|
1337
1330
|
toJSON(e, t, n) {
|
|
1338
|
-
const i = n ? new n() : t
|
|
1339
|
-
t
|
|
1331
|
+
const i = n ? new n() : t?.mapAsMap ? /* @__PURE__ */ new Map() : {};
|
|
1332
|
+
t?.onCreate && t.onCreate(i);
|
|
1340
1333
|
for (const r of this.items)
|
|
1341
|
-
|
|
1334
|
+
Zt(t, i, r);
|
|
1342
1335
|
return i;
|
|
1343
1336
|
}
|
|
1344
1337
|
toString(e, t, n) {
|
|
@@ -1366,7 +1359,7 @@ const me = {
|
|
|
1366
1359
|
},
|
|
1367
1360
|
createNode: (s, e, t) => K.from(s, e, t)
|
|
1368
1361
|
};
|
|
1369
|
-
class
|
|
1362
|
+
class W extends Wt {
|
|
1370
1363
|
static get tagName() {
|
|
1371
1364
|
return "tag:yaml.org,2002:seq";
|
|
1372
1365
|
}
|
|
@@ -1421,10 +1414,10 @@ class Q extends Wt {
|
|
|
1421
1414
|
}
|
|
1422
1415
|
toJSON(e, t) {
|
|
1423
1416
|
const n = [];
|
|
1424
|
-
t
|
|
1417
|
+
t?.onCreate && t.onCreate(n);
|
|
1425
1418
|
let i = 0;
|
|
1426
1419
|
for (const r of this.items)
|
|
1427
|
-
n.push(
|
|
1420
|
+
n.push(j(r, String(i++), t));
|
|
1428
1421
|
return n;
|
|
1429
1422
|
}
|
|
1430
1423
|
toString(e, t, n) {
|
|
@@ -1458,13 +1451,13 @@ function Le(s) {
|
|
|
1458
1451
|
const ye = {
|
|
1459
1452
|
collection: "seq",
|
|
1460
1453
|
default: !0,
|
|
1461
|
-
nodeClass:
|
|
1454
|
+
nodeClass: W,
|
|
1462
1455
|
tag: "tag:yaml.org,2002:seq",
|
|
1463
1456
|
resolve(s, e) {
|
|
1464
1457
|
return pe(s) || e("Expected a sequence for this tag"), s;
|
|
1465
1458
|
},
|
|
1466
|
-
createNode: (s, e, t) =>
|
|
1467
|
-
},
|
|
1459
|
+
createNode: (s, e, t) => W.from(s, e, t)
|
|
1460
|
+
}, Ye = {
|
|
1468
1461
|
identify: (s) => typeof s == "string",
|
|
1469
1462
|
default: !0,
|
|
1470
1463
|
tag: "tag:yaml.org,2002:str",
|
|
@@ -1570,7 +1563,7 @@ const rs = {
|
|
|
1570
1563
|
}, Ws = [
|
|
1571
1564
|
me,
|
|
1572
1565
|
ye,
|
|
1573
|
-
|
|
1566
|
+
Ye,
|
|
1574
1567
|
Ge,
|
|
1575
1568
|
yt,
|
|
1576
1569
|
rs,
|
|
@@ -1604,7 +1597,7 @@ const $e = ({ value: s }) => JSON.stringify(s), Hs = [
|
|
|
1604
1597
|
identify: (s) => typeof s == "boolean",
|
|
1605
1598
|
default: !0,
|
|
1606
1599
|
tag: "tag:yaml.org,2002:bool",
|
|
1607
|
-
test: /^true
|
|
1600
|
+
test: /^true$|^false$/,
|
|
1608
1601
|
resolve: (s) => s === "true",
|
|
1609
1602
|
stringify: $e
|
|
1610
1603
|
},
|
|
@@ -1645,8 +1638,6 @@ const $e = ({ value: s }) => JSON.stringify(s), Hs = [
|
|
|
1645
1638
|
* document.querySelector('#photo').src = URL.createObjectURL(blob)
|
|
1646
1639
|
*/
|
|
1647
1640
|
resolve(s, e) {
|
|
1648
|
-
if (typeof Buffer == "function")
|
|
1649
|
-
return Buffer.from(s, "base64");
|
|
1650
1641
|
if (typeof atob == "function") {
|
|
1651
1642
|
const t = atob(s.replace(/[\n\r]/g, "")), n = new Uint8Array(t.length);
|
|
1652
1643
|
for (let i = 0; i < t.length; ++i)
|
|
@@ -1656,11 +1647,11 @@ const $e = ({ value: s }) => JSON.stringify(s), Hs = [
|
|
|
1656
1647
|
return e("This environment does not support reading binary tags; either Buffer or atob is required"), s;
|
|
1657
1648
|
},
|
|
1658
1649
|
stringify({ comment: s, type: e, value: t }, n, i, r) {
|
|
1650
|
+
if (!t)
|
|
1651
|
+
return "";
|
|
1659
1652
|
const o = t;
|
|
1660
1653
|
let l;
|
|
1661
|
-
if (typeof
|
|
1662
|
-
l = o instanceof Buffer ? o.toString("base64") : Buffer.from(o.buffer).toString("base64");
|
|
1663
|
-
else if (typeof btoa == "function") {
|
|
1654
|
+
if (typeof btoa == "function") {
|
|
1664
1655
|
let a = "";
|
|
1665
1656
|
for (let c = 0; c < o.length; ++c)
|
|
1666
1657
|
a += String.fromCharCode(o[c]);
|
|
@@ -1668,10 +1659,10 @@ const $e = ({ value: s }) => JSON.stringify(s), Hs = [
|
|
|
1668
1659
|
} else
|
|
1669
1660
|
throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");
|
|
1670
1661
|
if (e || (e = O.BLOCK_LITERAL), e !== O.QUOTE_DOUBLE) {
|
|
1671
|
-
const a = Math.max(n.options.lineWidth - n.indent.length, n.options.minContentWidth), c = Math.ceil(l.length / a),
|
|
1672
|
-
for (let f = 0,
|
|
1673
|
-
|
|
1674
|
-
l =
|
|
1662
|
+
const a = Math.max(n.options.lineWidth - n.indent.length, n.options.minContentWidth), c = Math.ceil(l.length / a), d = new Array(c);
|
|
1663
|
+
for (let f = 0, u = 0; f < c; ++f, u += a)
|
|
1664
|
+
d[f] = l.substr(u, a);
|
|
1665
|
+
l = d.join(e === O.BLOCK_LITERAL ? `
|
|
1675
1666
|
` : " ");
|
|
1676
1667
|
}
|
|
1677
1668
|
return Ae({ comment: s, type: e, value: l }, n, i, r);
|
|
@@ -1701,7 +1692,7 @@ ${r.comment}` : n.comment;
|
|
|
1701
1692
|
return s;
|
|
1702
1693
|
}
|
|
1703
1694
|
function cs(s, e, t) {
|
|
1704
|
-
const { replacer: n } = t, i = new
|
|
1695
|
+
const { replacer: n } = t, i = new W(s);
|
|
1705
1696
|
i.tag = "tag:yaml.org,2002:pairs";
|
|
1706
1697
|
let r = 0;
|
|
1707
1698
|
if (e && Symbol.iterator in Object(e))
|
|
@@ -1732,7 +1723,7 @@ const wt = {
|
|
|
1732
1723
|
resolve: as,
|
|
1733
1724
|
createNode: cs
|
|
1734
1725
|
};
|
|
1735
|
-
class ae extends
|
|
1726
|
+
class ae extends W {
|
|
1736
1727
|
constructor() {
|
|
1737
1728
|
super(), this.add = K.prototype.add.bind(this), this.delete = K.prototype.delete.bind(this), this.get = K.prototype.get.bind(this), this.has = K.prototype.has.bind(this), this.set = K.prototype.set.bind(this), this.tag = ae.tag;
|
|
1738
1729
|
}
|
|
@@ -1744,10 +1735,10 @@ class ae extends Q {
|
|
|
1744
1735
|
if (!t)
|
|
1745
1736
|
return super.toJSON(e);
|
|
1746
1737
|
const n = /* @__PURE__ */ new Map();
|
|
1747
|
-
t
|
|
1738
|
+
t?.onCreate && t.onCreate(n);
|
|
1748
1739
|
for (const i of this.items) {
|
|
1749
1740
|
let r, o;
|
|
1750
|
-
if (T(i) ? (r =
|
|
1741
|
+
if (T(i) ? (r = j(i.key, "", t), o = j(i.value, r, t)) : r = j(i, "", t), n.has(r))
|
|
1751
1742
|
throw new Error("Ordered maps must not include duplicate keys");
|
|
1752
1743
|
n.set(r, o);
|
|
1753
1744
|
}
|
|
@@ -1790,14 +1781,14 @@ const us = {
|
|
|
1790
1781
|
test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,
|
|
1791
1782
|
resolve: () => new O(!1),
|
|
1792
1783
|
stringify: fs
|
|
1793
|
-
},
|
|
1784
|
+
}, xs = {
|
|
1794
1785
|
identify: (s) => typeof s == "number",
|
|
1795
1786
|
default: !0,
|
|
1796
1787
|
tag: "tag:yaml.org,2002:float",
|
|
1797
1788
|
test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,
|
|
1798
1789
|
resolve: (s) => s.slice(-3).toLowerCase() === "nan" ? NaN : s[0] === "-" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY,
|
|
1799
1790
|
stringify: q
|
|
1800
|
-
},
|
|
1791
|
+
}, Zs = {
|
|
1801
1792
|
identify: (s) => typeof s == "number",
|
|
1802
1793
|
default: !0,
|
|
1803
1794
|
tag: "tag:yaml.org,2002:float",
|
|
@@ -1986,18 +1977,18 @@ const ps = {
|
|
|
1986
1977
|
throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");
|
|
1987
1978
|
const [, t, n, i, r, o, l] = e.map(Number), a = e[7] ? Number((e[7] + "00").substr(1, 3)) : 0;
|
|
1988
1979
|
let c = Date.UTC(t, n - 1, i, r || 0, o || 0, l || 0, a);
|
|
1989
|
-
const
|
|
1990
|
-
if (
|
|
1991
|
-
let f = Ot(
|
|
1980
|
+
const d = e[8];
|
|
1981
|
+
if (d && d !== "Z") {
|
|
1982
|
+
let f = Ot(d, !1);
|
|
1992
1983
|
Math.abs(f) < 30 && (f *= 60), c -= 6e4 * f;
|
|
1993
1984
|
}
|
|
1994
1985
|
return new Date(c);
|
|
1995
1986
|
},
|
|
1996
|
-
stringify: ({ value: s }) => s
|
|
1987
|
+
stringify: ({ value: s }) => s?.toISOString().replace(/(T00:00:00)?\.000Z$/, "") ?? ""
|
|
1997
1988
|
}, Ct = [
|
|
1998
1989
|
me,
|
|
1999
1990
|
ye,
|
|
2000
|
-
|
|
1991
|
+
Ye,
|
|
2001
1992
|
Ge,
|
|
2002
1993
|
us,
|
|
2003
1994
|
hs,
|
|
@@ -2005,8 +1996,8 @@ const ps = {
|
|
|
2005
1996
|
sn,
|
|
2006
1997
|
nn,
|
|
2007
1998
|
rn,
|
|
2008
|
-
Zs,
|
|
2009
1999
|
xs,
|
|
2000
|
+
Zs,
|
|
2010
2001
|
en,
|
|
2011
2002
|
bt,
|
|
2012
2003
|
V,
|
|
@@ -2018,7 +2009,7 @@ const ps = {
|
|
|
2018
2009
|
He
|
|
2019
2010
|
], vt = /* @__PURE__ */ new Map([
|
|
2020
2011
|
["core", Ws],
|
|
2021
|
-
["failsafe", [me, ye,
|
|
2012
|
+
["failsafe", [me, ye, Ye]],
|
|
2022
2013
|
["json", zs],
|
|
2023
2014
|
["yaml11", Ct],
|
|
2024
2015
|
["yaml-1.1", Ct]
|
|
@@ -2068,7 +2059,7 @@ function tt(s, e, t) {
|
|
|
2068
2059
|
return t && (i = i.concat(V)), i.reduce((r, o) => {
|
|
2069
2060
|
const l = typeof o == "string" ? Bt[o] : o;
|
|
2070
2061
|
if (!l) {
|
|
2071
|
-
const a = JSON.stringify(o), c = Object.keys(Bt).map((
|
|
2062
|
+
const a = JSON.stringify(o), c = Object.keys(Bt).map((d) => JSON.stringify(d)).join(", ");
|
|
2072
2063
|
throw new Error(`Unknown custom tag ${a}; use one of ${c}`);
|
|
2073
2064
|
}
|
|
2074
2065
|
return r.includes(l) || r.push(l), r;
|
|
@@ -2077,7 +2068,7 @@ function tt(s, e, t) {
|
|
|
2077
2068
|
const ln = (s, e) => s.key < e.key ? -1 : s.key > e.key ? 1 : 0;
|
|
2078
2069
|
class Xe {
|
|
2079
2070
|
constructor({ compat: e, customTags: t, merge: n, resolveKnownTags: i, schema: r, sortMapEntries: o, toStringDefaults: l }) {
|
|
2080
|
-
this.compat = Array.isArray(e) ? tt(e, "compat") : e ? tt(null, e) : null, this.name = typeof r == "string" && r || "core", this.knownTags = i ? on : {}, this.tags = tt(t, this.name, n), this.toStringOptions = l ?? null, Object.defineProperty(this,
|
|
2071
|
+
this.compat = Array.isArray(e) ? tt(e, "compat") : e ? tt(null, e) : null, this.name = typeof r == "string" && r || "core", this.knownTags = i ? on : {}, this.tags = tt(t, this.name, n), this.toStringOptions = l ?? null, Object.defineProperty(this, G, { value: me }), Object.defineProperty(this, R, { value: Ye }), Object.defineProperty(this, he, { value: ye }), this.sortMapEntries = typeof o == "function" ? o : o === !0 ? ln : null;
|
|
2081
2072
|
}
|
|
2082
2073
|
clone() {
|
|
2083
2074
|
const e = Object.create(Xe.prototype, Object.getOwnPropertyDescriptors(this));
|
|
@@ -2085,44 +2076,43 @@ class Xe {
|
|
|
2085
2076
|
}
|
|
2086
2077
|
}
|
|
2087
2078
|
function an(s, e) {
|
|
2088
|
-
var a;
|
|
2089
2079
|
const t = [];
|
|
2090
2080
|
let n = e.directives === !0;
|
|
2091
2081
|
if (e.directives !== !1 && s.directives) {
|
|
2092
|
-
const
|
|
2093
|
-
|
|
2082
|
+
const a = s.directives.toString(s);
|
|
2083
|
+
a ? (t.push(a), n = !0) : s.directives.docStart && (n = !0);
|
|
2094
2084
|
}
|
|
2095
2085
|
n && t.push("---");
|
|
2096
2086
|
const i = Xt(s, e), { commentString: r } = i.options;
|
|
2097
2087
|
if (s.commentBefore) {
|
|
2098
2088
|
t.length !== 1 && t.unshift("");
|
|
2099
|
-
const
|
|
2100
|
-
t.unshift(
|
|
2089
|
+
const a = r(s.commentBefore);
|
|
2090
|
+
t.unshift(U(a, ""));
|
|
2101
2091
|
}
|
|
2102
2092
|
let o = !1, l = null;
|
|
2103
2093
|
if (s.contents) {
|
|
2104
2094
|
if ($(s.contents)) {
|
|
2105
2095
|
if (s.contents.spaceBefore && n && t.push(""), s.contents.commentBefore) {
|
|
2106
|
-
const
|
|
2107
|
-
t.push(
|
|
2096
|
+
const d = r(s.contents.commentBefore);
|
|
2097
|
+
t.push(U(d, ""));
|
|
2108
2098
|
}
|
|
2109
2099
|
i.forceBlockIndent = !!s.comment, l = s.contents.comment;
|
|
2110
2100
|
}
|
|
2111
|
-
const
|
|
2112
|
-
let
|
|
2113
|
-
l && (
|
|
2101
|
+
const a = l ? void 0 : () => o = !0;
|
|
2102
|
+
let c = fe(s.contents, i, () => l = null, a);
|
|
2103
|
+
l && (c += H(c, "", r(l))), (c[0] === "|" || c[0] === ">") && t[t.length - 1] === "---" ? t[t.length - 1] = `--- ${c}` : t.push(c);
|
|
2114
2104
|
} else
|
|
2115
2105
|
t.push(fe(s.contents, i));
|
|
2116
|
-
if (
|
|
2106
|
+
if (s.directives?.docEnd)
|
|
2117
2107
|
if (s.comment) {
|
|
2118
|
-
const
|
|
2119
|
-
|
|
2120
|
-
`) ? (t.push("..."), t.push(
|
|
2108
|
+
const a = r(s.comment);
|
|
2109
|
+
a.includes(`
|
|
2110
|
+
`) ? (t.push("..."), t.push(U(a, ""))) : t.push(`... ${a}`);
|
|
2121
2111
|
} else
|
|
2122
2112
|
t.push("...");
|
|
2123
2113
|
else {
|
|
2124
|
-
let
|
|
2125
|
-
|
|
2114
|
+
let a = s.comment;
|
|
2115
|
+
a && o && (a = a.replace(/^\n+/, "")), a && ((!o || l) && t[t.length - 1] !== "" && t.push(""), t.push(U(r(a), "")));
|
|
2126
2116
|
}
|
|
2127
2117
|
return t.join(`
|
|
2128
2118
|
`) + `
|
|
@@ -2130,7 +2120,7 @@ function an(s, e) {
|
|
|
2130
2120
|
}
|
|
2131
2121
|
class ge {
|
|
2132
2122
|
constructor(e, t, n) {
|
|
2133
|
-
this.commentBefore = null, this.comment = null, this.errors = [], this.warnings = [], Object.defineProperty(this,
|
|
2123
|
+
this.commentBefore = null, this.comment = null, this.errors = [], this.warnings = [], Object.defineProperty(this, P, { value: lt });
|
|
2134
2124
|
let i = null;
|
|
2135
2125
|
typeof t == "function" || Array.isArray(t) ? i = t : n === void 0 && t && (n = t, t = void 0);
|
|
2136
2126
|
const r = Object.assign({
|
|
@@ -2145,7 +2135,7 @@ class ge {
|
|
|
2145
2135
|
}, n);
|
|
2146
2136
|
this.options = r;
|
|
2147
2137
|
let { version: o } = r;
|
|
2148
|
-
n
|
|
2138
|
+
n?._directives ? (this.directives = n._directives.atDocument(), this.directives.yaml.explicit && (o = this.directives.yaml.version)) : this.directives = new B({ version: o }), this.setSchema(o, n), this.contents = e === void 0 ? null : this.createNode(e, i, n);
|
|
2149
2139
|
}
|
|
2150
2140
|
/**
|
|
2151
2141
|
* Create a deep copy of this Document and its contents.
|
|
@@ -2154,7 +2144,7 @@ class ge {
|
|
|
2154
2144
|
*/
|
|
2155
2145
|
clone() {
|
|
2156
2146
|
const e = Object.create(ge.prototype, {
|
|
2157
|
-
[
|
|
2147
|
+
[P]: { value: lt }
|
|
2158
2148
|
});
|
|
2159
2149
|
return e.commentBefore = this.commentBefore, e.comment = this.comment, e.errors = this.errors.slice(), e.warnings = this.warnings.slice(), e.options = Object.assign({}, this.options), this.directives && (e.directives = this.directives.clone()), e.schema = this.schema.clone(), e.contents = $(this.contents) ? this.contents.clone(e.schema) : this.contents, this.range && (e.range = this.range.slice()), e;
|
|
2160
2150
|
}
|
|
@@ -2177,21 +2167,21 @@ class ge {
|
|
|
2177
2167
|
*/
|
|
2178
2168
|
createAlias(e, t) {
|
|
2179
2169
|
if (!e.anchor) {
|
|
2180
|
-
const n =
|
|
2170
|
+
const n = Yt(this);
|
|
2181
2171
|
e.anchor = // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
|
2182
2172
|
!t || n.has(t) ? Gt(t || "a", n) : t;
|
|
2183
2173
|
}
|
|
2184
|
-
return new
|
|
2174
|
+
return new Re(e.anchor);
|
|
2185
2175
|
}
|
|
2186
2176
|
createNode(e, t, n) {
|
|
2187
2177
|
let i;
|
|
2188
2178
|
if (typeof t == "function")
|
|
2189
2179
|
e = t.call({ "": e }, "", e), i = t;
|
|
2190
2180
|
else if (Array.isArray(t)) {
|
|
2191
|
-
const
|
|
2181
|
+
const p = (w) => typeof w == "number" || w instanceof String || w instanceof Number, b = t.filter(p).map(String);
|
|
2192
2182
|
b.length > 0 && (t = t.concat(b)), i = t;
|
|
2193
2183
|
} else n === void 0 && t && (n = t, t = void 0);
|
|
2194
|
-
const { aliasDuplicateObjects: r, anchorPrefix: o, flow: l, keepUndefined: a, onTagObj: c, tag:
|
|
2184
|
+
const { aliasDuplicateObjects: r, anchorPrefix: o, flow: l, keepUndefined: a, onTagObj: c, tag: d } = n ?? {}, { onAnchor: f, setAnchors: u, sourceObjects: m } = Ks(
|
|
2195
2185
|
this,
|
|
2196
2186
|
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
|
2197
2187
|
o || "a"
|
|
@@ -2202,9 +2192,9 @@ class ge {
|
|
|
2202
2192
|
onTagObj: c,
|
|
2203
2193
|
replacer: i,
|
|
2204
2194
|
schema: this.schema,
|
|
2205
|
-
sourceObjects:
|
|
2206
|
-
},
|
|
2207
|
-
return l && L(
|
|
2195
|
+
sourceObjects: m
|
|
2196
|
+
}, h = ke(e, d, y);
|
|
2197
|
+
return l && L(h) && (h.flow = !0), u(), h;
|
|
2208
2198
|
}
|
|
2209
2199
|
/**
|
|
2210
2200
|
* Convert a key and a value into a `Pair` using the current schema,
|
|
@@ -2261,14 +2251,14 @@ class ge {
|
|
|
2261
2251
|
* boolean to add/remove the item from the set.
|
|
2262
2252
|
*/
|
|
2263
2253
|
set(e, t) {
|
|
2264
|
-
this.contents == null ? this.contents =
|
|
2254
|
+
this.contents == null ? this.contents = je(this.schema, [e], t) : se(this.contents) && this.contents.set(e, t);
|
|
2265
2255
|
}
|
|
2266
2256
|
/**
|
|
2267
2257
|
* Sets a value in this document. For `!!set`, `value` needs to be a
|
|
2268
2258
|
* boolean to add/remove the item from the set.
|
|
2269
2259
|
*/
|
|
2270
2260
|
setIn(e, t) {
|
|
2271
|
-
we(e) ? this.contents = t : this.contents == null ? this.contents =
|
|
2261
|
+
we(e) ? this.contents = t : this.contents == null ? this.contents = je(this.schema, Array.from(e), t) : se(this.contents) && this.contents.setIn(e, t);
|
|
2272
2262
|
}
|
|
2273
2263
|
/**
|
|
2274
2264
|
* Change the YAML version and schema used by the document.
|
|
@@ -2312,10 +2302,10 @@ class ge {
|
|
|
2312
2302
|
mapAsMap: n === !0,
|
|
2313
2303
|
mapKeyWarned: !1,
|
|
2314
2304
|
maxAliasCount: typeof i == "number" ? i : 100
|
|
2315
|
-
}, a =
|
|
2305
|
+
}, a = j(this.contents, t ?? "", l);
|
|
2316
2306
|
if (typeof r == "function")
|
|
2317
|
-
for (const { count: c, res:
|
|
2318
|
-
r(
|
|
2307
|
+
for (const { count: c, res: d } of l.anchors.values())
|
|
2308
|
+
r(d, c);
|
|
2319
2309
|
return typeof o == "function" ? oe(o, { "": a }, "", a) : a;
|
|
2320
2310
|
}
|
|
2321
2311
|
/**
|
|
@@ -2358,7 +2348,7 @@ class ys extends At {
|
|
|
2358
2348
|
super("YAMLWarning", e, t, n);
|
|
2359
2349
|
}
|
|
2360
2350
|
}
|
|
2361
|
-
const
|
|
2351
|
+
const De = (s, e) => (t) => {
|
|
2362
2352
|
if (t.pos[0] === -1)
|
|
2363
2353
|
return;
|
|
2364
2354
|
t.linePos = t.pos.map((l) => e.linePos(l));
|
|
@@ -2387,51 +2377,52 @@ ${c}
|
|
|
2387
2377
|
}
|
|
2388
2378
|
};
|
|
2389
2379
|
function ue(s, { flow: e, indicator: t, next: n, offset: i, onError: r, parentIndent: o, startOnNewline: l }) {
|
|
2390
|
-
let a = !1, c = l,
|
|
2380
|
+
let a = !1, c = l, d = l, f = "", u = "", m = !1, y = !1, h = null, p = null, b = null, w = null, S = null, k = null, N = null;
|
|
2391
2381
|
for (const g of s)
|
|
2392
|
-
switch (y && (g.type !== "space" && g.type !== "newline" && g.type !== "comma" && r(g.offset, "MISSING_CHAR", "Tags and anchors must be separated from the next token by white space"), y = !1),
|
|
2382
|
+
switch (y && (g.type !== "space" && g.type !== "newline" && g.type !== "comma" && r(g.offset, "MISSING_CHAR", "Tags and anchors must be separated from the next token by white space"), y = !1), h && (c && g.type !== "comment" && g.type !== "newline" && r(h, "TAB_AS_INDENT", "Tabs are not allowed as indentation"), h = null), g.type) {
|
|
2393
2383
|
case "space":
|
|
2394
|
-
!e && (t !== "doc-start" ||
|
|
2384
|
+
!e && (t !== "doc-start" || n?.type !== "flow-collection") && g.source.includes(" ") && (h = g), d = !0;
|
|
2395
2385
|
break;
|
|
2396
2386
|
case "comment": {
|
|
2397
|
-
|
|
2387
|
+
d || r(g, "MISSING_CHAR", "Comments must be separated from other tokens by white space characters");
|
|
2398
2388
|
const _ = g.source.substring(1) || " ";
|
|
2399
|
-
f ? f +=
|
|
2389
|
+
f ? f += u + _ : f = _, u = "", c = !1;
|
|
2400
2390
|
break;
|
|
2401
2391
|
}
|
|
2402
2392
|
case "newline":
|
|
2403
|
-
c ? f ? f += g.source : a = !0 :
|
|
2393
|
+
c ? f ? f += g.source : (!k || t !== "seq-item-ind") && (a = !0) : u += g.source, c = !0, m = !0, (p || b) && (w = g), d = !0;
|
|
2404
2394
|
break;
|
|
2405
2395
|
case "anchor":
|
|
2406
|
-
|
|
2396
|
+
p && r(g, "MULTIPLE_ANCHORS", "A node can have at most one anchor"), g.source.endsWith(":") && r(g.offset + g.source.length - 1, "BAD_ALIAS", "Anchor ending in : is ambiguous", !0), p = g, N === null && (N = g.offset), c = !1, d = !1, y = !0;
|
|
2407
2397
|
break;
|
|
2408
2398
|
case "tag": {
|
|
2409
|
-
b && r(g, "MULTIPLE_TAGS", "A node can have at most one tag"), b = g,
|
|
2399
|
+
b && r(g, "MULTIPLE_TAGS", "A node can have at most one tag"), b = g, N === null && (N = g.offset), c = !1, d = !1, y = !0;
|
|
2410
2400
|
break;
|
|
2411
2401
|
}
|
|
2412
2402
|
case t:
|
|
2413
|
-
(
|
|
2403
|
+
(p || b) && r(g, "BAD_PROP_ORDER", `Anchors and tags must be after the ${g.source} indicator`), k && r(g, "UNEXPECTED_TOKEN", `Unexpected ${g.source} in ${e ?? "collection"}`), k = g, c = t === "seq-item-ind" || t === "explicit-key-ind", d = !1;
|
|
2414
2404
|
break;
|
|
2415
2405
|
case "comma":
|
|
2416
2406
|
if (e) {
|
|
2417
|
-
|
|
2407
|
+
S && r(g, "UNEXPECTED_TOKEN", `Unexpected , in ${e}`), S = g, c = !1, d = !1;
|
|
2418
2408
|
break;
|
|
2419
2409
|
}
|
|
2410
|
+
// else fallthrough
|
|
2420
2411
|
default:
|
|
2421
|
-
r(g, "UNEXPECTED_TOKEN", `Unexpected ${g.type} token`), c = !1,
|
|
2412
|
+
r(g, "UNEXPECTED_TOKEN", `Unexpected ${g.type} token`), c = !1, d = !1;
|
|
2422
2413
|
}
|
|
2423
|
-
const
|
|
2424
|
-
return y && n && n.type !== "space" && n.type !== "newline" && n.type !== "comma" && (n.type !== "scalar" || n.source !== "") && r(n.offset, "MISSING_CHAR", "Tags and anchors must be separated from the next token by white space"),
|
|
2425
|
-
comma:
|
|
2426
|
-
found:
|
|
2414
|
+
const A = s[s.length - 1], I = A ? A.offset + A.source.length : i;
|
|
2415
|
+
return y && n && n.type !== "space" && n.type !== "newline" && n.type !== "comma" && (n.type !== "scalar" || n.source !== "") && r(n.offset, "MISSING_CHAR", "Tags and anchors must be separated from the next token by white space"), h && (c && h.indent <= o || n?.type === "block-map" || n?.type === "block-seq") && r(h, "TAB_AS_INDENT", "Tabs are not allowed as indentation"), {
|
|
2416
|
+
comma: S,
|
|
2417
|
+
found: k,
|
|
2427
2418
|
spaceBefore: a,
|
|
2428
2419
|
comment: f,
|
|
2429
|
-
hasNewline:
|
|
2430
|
-
anchor:
|
|
2420
|
+
hasNewline: m,
|
|
2421
|
+
anchor: p,
|
|
2431
2422
|
tag: b,
|
|
2432
2423
|
newlineAfterProp: w,
|
|
2433
2424
|
end: I,
|
|
2434
|
-
start:
|
|
2425
|
+
start: N ?? I
|
|
2435
2426
|
};
|
|
2436
2427
|
}
|
|
2437
2428
|
function Ne(s) {
|
|
@@ -2470,7 +2461,7 @@ function Ne(s) {
|
|
|
2470
2461
|
}
|
|
2471
2462
|
}
|
|
2472
2463
|
function ut(s, e, t) {
|
|
2473
|
-
if (
|
|
2464
|
+
if (e?.type === "flow-collection") {
|
|
2474
2465
|
const n = e.end[0];
|
|
2475
2466
|
n.indent === s && (n.source === "]" || n.source === "}") && Ne(e) && t(n, "BAD_INDENT", "Flow end indicator should be more indented than parent", !0);
|
|
2476
2467
|
}
|
|
@@ -2484,59 +2475,58 @@ function gs(s, e, t) {
|
|
|
2484
2475
|
}
|
|
2485
2476
|
const Mt = "All mapping items must start at the same column";
|
|
2486
2477
|
function cn({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
|
|
2487
|
-
|
|
2488
|
-
const o = (r == null ? void 0 : r.nodeClass) ?? K, l = new o(t.schema);
|
|
2478
|
+
const o = r?.nodeClass ?? K, l = new o(t.schema);
|
|
2489
2479
|
t.atRoot && (t.atRoot = !1);
|
|
2490
2480
|
let a = n.offset, c = null;
|
|
2491
|
-
for (const
|
|
2492
|
-
const { start:
|
|
2481
|
+
for (const d of n.items) {
|
|
2482
|
+
const { start: f, key: u, sep: m, value: y } = d, h = ue(f, {
|
|
2493
2483
|
indicator: "explicit-key-ind",
|
|
2494
|
-
next:
|
|
2484
|
+
next: u ?? m?.[0],
|
|
2495
2485
|
offset: a,
|
|
2496
2486
|
onError: i,
|
|
2497
2487
|
parentIndent: n.indent,
|
|
2498
2488
|
startOnNewline: !0
|
|
2499
|
-
}),
|
|
2500
|
-
if (
|
|
2501
|
-
if (
|
|
2502
|
-
c =
|
|
2503
|
-
` +
|
|
2489
|
+
}), p = !h.found;
|
|
2490
|
+
if (p) {
|
|
2491
|
+
if (u && (u.type === "block-seq" ? i(a, "BLOCK_AS_IMPLICIT_KEY", "A block sequence may not be used as an implicit map key") : "indent" in u && u.indent !== n.indent && i(a, "BAD_INDENT", Mt)), !h.anchor && !h.tag && !m) {
|
|
2492
|
+
c = h.end, h.comment && (l.comment ? l.comment += `
|
|
2493
|
+
` + h.comment : l.comment = h.comment);
|
|
2504
2494
|
continue;
|
|
2505
2495
|
}
|
|
2506
|
-
(
|
|
2507
|
-
} else
|
|
2496
|
+
(h.newlineAfterProp || Ne(u)) && i(u ?? f[f.length - 1], "MULTILINE_IMPLICIT_KEY", "Implicit keys need to be on a single line");
|
|
2497
|
+
} else h.found?.indent !== n.indent && i(a, "BAD_INDENT", Mt);
|
|
2508
2498
|
t.atKey = !0;
|
|
2509
|
-
const
|
|
2510
|
-
t.schema.compat && ut(n.indent,
|
|
2511
|
-
const S = ue(
|
|
2499
|
+
const b = h.end, w = u ? s(t, u, h, i) : e(t, b, f, null, h, i);
|
|
2500
|
+
t.schema.compat && ut(n.indent, u, i), t.atKey = !1, gs(t, l.items, w) && i(b, "DUPLICATE_KEY", "Map keys must be unique");
|
|
2501
|
+
const S = ue(m ?? [], {
|
|
2512
2502
|
indicator: "map-value-ind",
|
|
2513
|
-
next:
|
|
2514
|
-
offset:
|
|
2503
|
+
next: y,
|
|
2504
|
+
offset: w.range[2],
|
|
2515
2505
|
onError: i,
|
|
2516
2506
|
parentIndent: n.indent,
|
|
2517
|
-
startOnNewline: !
|
|
2507
|
+
startOnNewline: !u || u.type === "block-scalar"
|
|
2518
2508
|
});
|
|
2519
2509
|
if (a = S.end, S.found) {
|
|
2520
|
-
|
|
2521
|
-
const
|
|
2522
|
-
t.schema.compat && ut(n.indent,
|
|
2523
|
-
const
|
|
2524
|
-
t.options.keepSourceTokens && (
|
|
2510
|
+
p && (y?.type === "block-map" && !S.hasNewline && i(a, "BLOCK_AS_IMPLICIT_KEY", "Nested mappings are not allowed in compact mappings"), t.options.strict && h.start < S.found.offset - 1024 && i(w.range, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));
|
|
2511
|
+
const k = y ? s(t, y, S, i) : e(t, a, m, null, S, i);
|
|
2512
|
+
t.schema.compat && ut(n.indent, y, i), a = k.range[2];
|
|
2513
|
+
const N = new v(w, k);
|
|
2514
|
+
t.options.keepSourceTokens && (N.srcToken = d), l.items.push(N);
|
|
2525
2515
|
} else {
|
|
2526
|
-
|
|
2527
|
-
` + S.comment :
|
|
2528
|
-
const
|
|
2529
|
-
t.options.keepSourceTokens && (
|
|
2516
|
+
p && i(w.range, "MISSING_CHAR", "Implicit map keys need to be followed by map values"), S.comment && (w.comment ? w.comment += `
|
|
2517
|
+
` + S.comment : w.comment = S.comment);
|
|
2518
|
+
const k = new v(w);
|
|
2519
|
+
t.options.keepSourceTokens && (k.srcToken = d), l.items.push(k);
|
|
2530
2520
|
}
|
|
2531
2521
|
}
|
|
2532
2522
|
return c && c < a && i(c, "IMPOSSIBLE", "Map comment with trailing content"), l.range = [n.offset, a, c ?? a], l;
|
|
2533
2523
|
}
|
|
2534
2524
|
function fn({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
|
|
2535
|
-
const o =
|
|
2525
|
+
const o = r?.nodeClass ?? W, l = new o(t.schema);
|
|
2536
2526
|
t.atRoot && (t.atRoot = !1), t.atKey && (t.atKey = !1);
|
|
2537
2527
|
let a = n.offset, c = null;
|
|
2538
|
-
for (const { start:
|
|
2539
|
-
const
|
|
2528
|
+
for (const { start: d, value: f } of n.items) {
|
|
2529
|
+
const u = ue(d, {
|
|
2540
2530
|
indicator: "seq-item-ind",
|
|
2541
2531
|
next: f,
|
|
2542
2532
|
offset: a,
|
|
@@ -2544,19 +2534,19 @@ function fn({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
|
|
|
2544
2534
|
parentIndent: n.indent,
|
|
2545
2535
|
startOnNewline: !0
|
|
2546
2536
|
});
|
|
2547
|
-
if (!
|
|
2548
|
-
if (
|
|
2549
|
-
f && f.type === "block-seq" ? i(
|
|
2537
|
+
if (!u.found)
|
|
2538
|
+
if (u.anchor || u.tag || f)
|
|
2539
|
+
f && f.type === "block-seq" ? i(u.end, "BAD_INDENT", "All sequence items must start at the same column") : i(a, "MISSING_CHAR", "Sequence item without - indicator");
|
|
2550
2540
|
else {
|
|
2551
|
-
c =
|
|
2541
|
+
c = u.end, u.comment && (l.comment = u.comment);
|
|
2552
2542
|
continue;
|
|
2553
2543
|
}
|
|
2554
|
-
const
|
|
2555
|
-
t.schema.compat && ut(n.indent, f, i), a =
|
|
2544
|
+
const m = f ? s(t, f, u, i) : e(t, u.end, d, null, u, i);
|
|
2545
|
+
t.schema.compat && ut(n.indent, f, i), a = m.range[2], l.items.push(m);
|
|
2556
2546
|
}
|
|
2557
2547
|
return l.range = [n.offset, a, c ?? a], l;
|
|
2558
2548
|
}
|
|
2559
|
-
function
|
|
2549
|
+
function Ie(s, e, t, n) {
|
|
2560
2550
|
let i = "";
|
|
2561
2551
|
if (s) {
|
|
2562
2552
|
let r = !1, o = "";
|
|
@@ -2568,8 +2558,8 @@ function Te(s, e, t, n) {
|
|
|
2568
2558
|
break;
|
|
2569
2559
|
case "comment": {
|
|
2570
2560
|
t && !r && n(l, "MISSING_CHAR", "Comments must be separated from other tokens by white space characters");
|
|
2571
|
-
const
|
|
2572
|
-
i ? i += o +
|
|
2561
|
+
const d = a.substring(1) || " ";
|
|
2562
|
+
i ? i += o + d : i = d, o = "";
|
|
2573
2563
|
break;
|
|
2574
2564
|
}
|
|
2575
2565
|
case "newline":
|
|
@@ -2585,37 +2575,37 @@ function Te(s, e, t, n) {
|
|
|
2585
2575
|
}
|
|
2586
2576
|
const st = "Block collections are not allowed within flow collections", nt = (s) => s && (s.type === "block-map" || s.type === "block-seq");
|
|
2587
2577
|
function un({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
|
|
2588
|
-
const o = n.start.source === "{", l = o ? "flow map" : "flow sequence", a =
|
|
2578
|
+
const o = n.start.source === "{", l = o ? "flow map" : "flow sequence", a = r?.nodeClass ?? (o ? K : W), c = new a(t.schema);
|
|
2589
2579
|
c.flow = !0;
|
|
2590
|
-
const
|
|
2591
|
-
|
|
2580
|
+
const d = t.atRoot;
|
|
2581
|
+
d && (t.atRoot = !1), t.atKey && (t.atKey = !1);
|
|
2592
2582
|
let f = n.offset + n.start.source.length;
|
|
2593
|
-
for (let
|
|
2594
|
-
const b = n.items[
|
|
2583
|
+
for (let p = 0; p < n.items.length; ++p) {
|
|
2584
|
+
const b = n.items[p], { start: w, key: S, sep: k, value: N } = b, A = ue(w, {
|
|
2595
2585
|
flow: l,
|
|
2596
2586
|
indicator: "explicit-key-ind",
|
|
2597
|
-
next:
|
|
2587
|
+
next: S ?? k?.[0],
|
|
2598
2588
|
offset: f,
|
|
2599
2589
|
onError: i,
|
|
2600
2590
|
parentIndent: n.indent,
|
|
2601
2591
|
startOnNewline: !1
|
|
2602
2592
|
});
|
|
2603
|
-
if (!
|
|
2604
|
-
if (!
|
|
2605
|
-
|
|
2606
|
-
` +
|
|
2593
|
+
if (!A.found) {
|
|
2594
|
+
if (!A.anchor && !A.tag && !k && !N) {
|
|
2595
|
+
p === 0 && A.comma ? i(A.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${l}`) : p < n.items.length - 1 && i(A.start, "UNEXPECTED_TOKEN", `Unexpected empty item in ${l}`), A.comment && (c.comment ? c.comment += `
|
|
2596
|
+
` + A.comment : c.comment = A.comment), f = A.end;
|
|
2607
2597
|
continue;
|
|
2608
2598
|
}
|
|
2609
|
-
!o && t.options.strict && Ne(
|
|
2610
|
-
|
|
2599
|
+
!o && t.options.strict && Ne(S) && i(
|
|
2600
|
+
S,
|
|
2611
2601
|
// checked by containsNewline()
|
|
2612
2602
|
"MULTILINE_IMPLICIT_KEY",
|
|
2613
2603
|
"Implicit keys of flow sequence pairs need to be on a single line"
|
|
2614
2604
|
);
|
|
2615
2605
|
}
|
|
2616
|
-
if (
|
|
2617
|
-
|
|
2618
|
-
else if (
|
|
2606
|
+
if (p === 0)
|
|
2607
|
+
A.comma && i(A.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${l}`);
|
|
2608
|
+
else if (A.comma || i(A.start, "MISSING_CHAR", `Missing , between ${l} items`), A.comment) {
|
|
2619
2609
|
let I = "";
|
|
2620
2610
|
e: for (const g of w)
|
|
2621
2611
|
switch (g.type) {
|
|
@@ -2631,29 +2621,29 @@ function un({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
|
|
|
2631
2621
|
if (I) {
|
|
2632
2622
|
let g = c.items[c.items.length - 1];
|
|
2633
2623
|
T(g) && (g = g.value ?? g.key), g.comment ? g.comment += `
|
|
2634
|
-
` + I : g.comment = I,
|
|
2624
|
+
` + I : g.comment = I, A.comment = A.comment.substring(I.length + 1);
|
|
2635
2625
|
}
|
|
2636
2626
|
}
|
|
2637
|
-
if (!o && !
|
|
2638
|
-
const I =
|
|
2639
|
-
c.items.push(I), f = I.range[2], nt(
|
|
2627
|
+
if (!o && !k && !A.found) {
|
|
2628
|
+
const I = N ? s(t, N, A, i) : e(t, A.end, k, null, A, i);
|
|
2629
|
+
c.items.push(I), f = I.range[2], nt(N) && i(I.range, "BLOCK_IN_FLOW", st);
|
|
2640
2630
|
} else {
|
|
2641
2631
|
t.atKey = !0;
|
|
2642
|
-
const I =
|
|
2643
|
-
nt(
|
|
2644
|
-
const _ = ue(
|
|
2632
|
+
const I = A.end, g = S ? s(t, S, A, i) : e(t, I, w, null, A, i);
|
|
2633
|
+
nt(S) && i(g.range, "BLOCK_IN_FLOW", st), t.atKey = !1;
|
|
2634
|
+
const _ = ue(k ?? [], {
|
|
2645
2635
|
flow: l,
|
|
2646
2636
|
indicator: "map-value-ind",
|
|
2647
|
-
next:
|
|
2637
|
+
next: N,
|
|
2648
2638
|
offset: g.range[2],
|
|
2649
2639
|
onError: i,
|
|
2650
2640
|
parentIndent: n.indent,
|
|
2651
2641
|
startOnNewline: !1
|
|
2652
2642
|
});
|
|
2653
2643
|
if (_.found) {
|
|
2654
|
-
if (!o && !
|
|
2655
|
-
if (
|
|
2656
|
-
for (const C of
|
|
2644
|
+
if (!o && !A.found && t.options.strict) {
|
|
2645
|
+
if (k)
|
|
2646
|
+
for (const C of k) {
|
|
2657
2647
|
if (C === _.found)
|
|
2658
2648
|
break;
|
|
2659
2649
|
if (C.type === "newline") {
|
|
@@ -2661,39 +2651,39 @@ function un({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
|
|
|
2661
2651
|
break;
|
|
2662
2652
|
}
|
|
2663
2653
|
}
|
|
2664
|
-
|
|
2654
|
+
A.start < _.found.offset - 1024 && i(_.found, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit flow sequence key");
|
|
2665
2655
|
}
|
|
2666
|
-
} else
|
|
2667
|
-
const
|
|
2668
|
-
|
|
2656
|
+
} else N && ("source" in N && N.source && N.source[0] === ":" ? i(N, "MISSING_CHAR", `Missing space after : in ${l}`) : i(_.start, "MISSING_CHAR", `Missing , or : between ${l} items`));
|
|
2657
|
+
const J = N ? s(t, N, _, i) : _.found ? e(t, _.end, k, null, _, i) : null;
|
|
2658
|
+
J ? nt(N) && i(J.range, "BLOCK_IN_FLOW", st) : _.comment && (g.comment ? g.comment += `
|
|
2669
2659
|
` + _.comment : g.comment = _.comment);
|
|
2670
|
-
const te = new v(g,
|
|
2660
|
+
const te = new v(g, J);
|
|
2671
2661
|
if (t.options.keepSourceTokens && (te.srcToken = b), o) {
|
|
2672
2662
|
const C = c;
|
|
2673
2663
|
gs(t, C.items, g) && i(I, "DUPLICATE_KEY", "Map keys must be unique"), C.items.push(te);
|
|
2674
2664
|
} else {
|
|
2675
2665
|
const C = new K(t.schema);
|
|
2676
2666
|
C.flow = !0, C.items.push(te);
|
|
2677
|
-
const Lt = (
|
|
2667
|
+
const Lt = (J ?? g).range;
|
|
2678
2668
|
C.range = [g.range[0], Lt[1], Lt[2]], c.items.push(C);
|
|
2679
2669
|
}
|
|
2680
|
-
f =
|
|
2670
|
+
f = J ? J.range[2] : _.end;
|
|
2681
2671
|
}
|
|
2682
2672
|
}
|
|
2683
|
-
const
|
|
2684
|
-
let
|
|
2685
|
-
if (
|
|
2686
|
-
|
|
2673
|
+
const u = o ? "}" : "]", [m, ...y] = n.end;
|
|
2674
|
+
let h = f;
|
|
2675
|
+
if (m && m.source === u)
|
|
2676
|
+
h = m.offset + m.source.length;
|
|
2687
2677
|
else {
|
|
2688
|
-
const
|
|
2689
|
-
i(f,
|
|
2678
|
+
const p = l[0].toUpperCase() + l.substring(1), b = d ? `${p} must end with a ${u}` : `${p} in block collection must be sufficiently indented and end with a ${u}`;
|
|
2679
|
+
i(f, d ? "MISSING_CHAR" : "BAD_INDENT", b), m && m.source.length !== 1 && y.unshift(m);
|
|
2690
2680
|
}
|
|
2691
2681
|
if (y.length > 0) {
|
|
2692
|
-
const
|
|
2693
|
-
|
|
2694
|
-
` +
|
|
2682
|
+
const p = Ie(y, h, t.options.strict, i);
|
|
2683
|
+
p.comment && (c.comment ? c.comment += `
|
|
2684
|
+
` + p.comment : c.comment = p.comment), c.range = [n.offset, h, p.offset];
|
|
2695
2685
|
} else
|
|
2696
|
-
c.range = [n.offset,
|
|
2686
|
+
c.range = [n.offset, h, h];
|
|
2697
2687
|
return c;
|
|
2698
2688
|
}
|
|
2699
2689
|
function it(s, e, t, n, i, r) {
|
|
@@ -2701,25 +2691,24 @@ function it(s, e, t, n, i, r) {
|
|
|
2701
2691
|
return i === "!" || i === l.tagName ? (o.tag = l.tagName, o) : (i && (o.tag = i), o);
|
|
2702
2692
|
}
|
|
2703
2693
|
function hn(s, e, t, n, i) {
|
|
2704
|
-
|
|
2705
|
-
const r = n.tag, o = r ? e.directives.tagName(r.source, (h) => i(r, "TAG_RESOLVE_FAILED", h)) : null;
|
|
2694
|
+
const r = n.tag, o = r ? e.directives.tagName(r.source, (u) => i(r, "TAG_RESOLVE_FAILED", u)) : null;
|
|
2706
2695
|
if (t.type === "block-seq") {
|
|
2707
|
-
const { anchor:
|
|
2708
|
-
|
|
2696
|
+
const { anchor: u, newlineAfterProp: m } = n, y = u && r ? u.offset > r.offset ? u : r : u ?? r;
|
|
2697
|
+
y && (!m || m.offset < y.offset) && i(y, "MISSING_CHAR", "Missing newline after block sequence props");
|
|
2709
2698
|
}
|
|
2710
2699
|
const l = t.type === "block-map" ? "map" : t.type === "block-seq" ? "seq" : t.start.source === "{" ? "map" : "seq";
|
|
2711
|
-
if (!r || !o || o === "!" || o === K.tagName && l === "map" || o ===
|
|
2700
|
+
if (!r || !o || o === "!" || o === K.tagName && l === "map" || o === W.tagName && l === "seq")
|
|
2712
2701
|
return it(s, e, t, i, o);
|
|
2713
|
-
let a = e.schema.tags.find((
|
|
2702
|
+
let a = e.schema.tags.find((u) => u.tag === o && u.collection === l);
|
|
2714
2703
|
if (!a) {
|
|
2715
|
-
const
|
|
2716
|
-
if (
|
|
2717
|
-
e.schema.tags.push(Object.assign({},
|
|
2704
|
+
const u = e.schema.knownTags[o];
|
|
2705
|
+
if (u && u.collection === l)
|
|
2706
|
+
e.schema.tags.push(Object.assign({}, u, { default: !1 })), a = u;
|
|
2718
2707
|
else
|
|
2719
|
-
return
|
|
2708
|
+
return u ? i(r, "BAD_COLLECTION_TYPE", `${u.tag} used for ${l} collection, but expects ${u.collection ?? "scalar"}`, !0) : i(r, "TAG_RESOLVE_FAILED", `Unresolved tag: ${o}`, !0), it(s, e, t, i, o);
|
|
2720
2709
|
}
|
|
2721
|
-
const c = it(s, e, t, i, o, a),
|
|
2722
|
-
return f.range = c.range, f.tag = o, a
|
|
2710
|
+
const c = it(s, e, t, i, o, a), d = a.resolve?.(c, (u) => i(r, "TAG_RESOLVE_FAILED", u), e.options) ?? c, f = $(d) ? d : new O(d);
|
|
2711
|
+
return f.range = c.range, f.tag = o, a?.format && (f.format = a.format), f;
|
|
2723
2712
|
}
|
|
2724
2713
|
function bs(s, e, t) {
|
|
2725
2714
|
const n = e.offset, i = dn(e, s.options.strict, t);
|
|
@@ -2727,62 +2716,62 @@ function bs(s, e, t) {
|
|
|
2727
2716
|
return { value: "", type: null, comment: "", range: [n, n, n] };
|
|
2728
2717
|
const r = i.mode === ">" ? O.BLOCK_FOLDED : O.BLOCK_LITERAL, o = e.source ? pn(e.source) : [];
|
|
2729
2718
|
let l = o.length;
|
|
2730
|
-
for (let
|
|
2731
|
-
const
|
|
2732
|
-
if (
|
|
2733
|
-
l =
|
|
2719
|
+
for (let h = o.length - 1; h >= 0; --h) {
|
|
2720
|
+
const p = o[h][1];
|
|
2721
|
+
if (p === "" || p === "\r")
|
|
2722
|
+
l = h;
|
|
2734
2723
|
else
|
|
2735
2724
|
break;
|
|
2736
2725
|
}
|
|
2737
2726
|
if (l === 0) {
|
|
2738
|
-
const
|
|
2727
|
+
const h = i.chomp === "+" && o.length > 0 ? `
|
|
2739
2728
|
`.repeat(Math.max(1, o.length - 1)) : "";
|
|
2740
|
-
let
|
|
2741
|
-
return e.source && (
|
|
2729
|
+
let p = n + i.length;
|
|
2730
|
+
return e.source && (p += e.source.length), { value: h, type: r, comment: i.comment, range: [n, p, p] };
|
|
2742
2731
|
}
|
|
2743
|
-
let a = e.indent + i.indent, c = e.offset + i.length,
|
|
2744
|
-
for (let
|
|
2745
|
-
const [
|
|
2732
|
+
let a = e.indent + i.indent, c = e.offset + i.length, d = 0;
|
|
2733
|
+
for (let h = 0; h < l; ++h) {
|
|
2734
|
+
const [p, b] = o[h];
|
|
2746
2735
|
if (b === "" || b === "\r")
|
|
2747
|
-
i.indent === 0 &&
|
|
2736
|
+
i.indent === 0 && p.length > a && (a = p.length);
|
|
2748
2737
|
else {
|
|
2749
|
-
|
|
2738
|
+
p.length < a && t(c + p.length, "MISSING_CHAR", "Block scalars with more-indented leading empty lines must use an explicit indentation indicator"), i.indent === 0 && (a = p.length), d = h, a === 0 && !s.atRoot && t(c, "BAD_INDENT", "Block scalar values in collections must be indented");
|
|
2750
2739
|
break;
|
|
2751
2740
|
}
|
|
2752
|
-
c +=
|
|
2741
|
+
c += p.length + b.length + 1;
|
|
2753
2742
|
}
|
|
2754
|
-
for (let
|
|
2755
|
-
o[
|
|
2756
|
-
let f = "",
|
|
2757
|
-
for (let
|
|
2758
|
-
f += o[
|
|
2743
|
+
for (let h = o.length - 1; h >= l; --h)
|
|
2744
|
+
o[h][0].length > a && (l = h + 1);
|
|
2745
|
+
let f = "", u = "", m = !1;
|
|
2746
|
+
for (let h = 0; h < d; ++h)
|
|
2747
|
+
f += o[h][0].slice(a) + `
|
|
2759
2748
|
`;
|
|
2760
|
-
for (let
|
|
2761
|
-
let [
|
|
2762
|
-
c +=
|
|
2749
|
+
for (let h = d; h < l; ++h) {
|
|
2750
|
+
let [p, b] = o[h];
|
|
2751
|
+
c += p.length + b.length + 1;
|
|
2763
2752
|
const w = b[b.length - 1] === "\r";
|
|
2764
|
-
if (w && (b = b.slice(0, -1)), b &&
|
|
2765
|
-
const
|
|
2766
|
-
t(c - b.length - (w ? 2 : 1), "BAD_INDENT",
|
|
2753
|
+
if (w && (b = b.slice(0, -1)), b && p.length < a) {
|
|
2754
|
+
const k = `Block scalar lines must not be less indented than their ${i.indent ? "explicit indentation indicator" : "first line"}`;
|
|
2755
|
+
t(c - b.length - (w ? 2 : 1), "BAD_INDENT", k), p = "";
|
|
2767
2756
|
}
|
|
2768
|
-
r === O.BLOCK_LITERAL ? (f +=
|
|
2769
|
-
`) :
|
|
2770
|
-
` : !
|
|
2771
|
-
` && (
|
|
2757
|
+
r === O.BLOCK_LITERAL ? (f += u + p.slice(a) + b, u = `
|
|
2758
|
+
`) : p.length > a || b[0] === " " ? (u === " " ? u = `
|
|
2759
|
+
` : !m && u === `
|
|
2760
|
+
` && (u = `
|
|
2772
2761
|
|
|
2773
|
-
`), f +=
|
|
2774
|
-
`,
|
|
2762
|
+
`), f += u + p.slice(a) + b, u = `
|
|
2763
|
+
`, m = !0) : b === "" ? u === `
|
|
2775
2764
|
` ? f += `
|
|
2776
|
-
` :
|
|
2777
|
-
` : (f +=
|
|
2765
|
+
` : u = `
|
|
2766
|
+
` : (f += u + b, u = " ", m = !1);
|
|
2778
2767
|
}
|
|
2779
2768
|
switch (i.chomp) {
|
|
2780
2769
|
case "-":
|
|
2781
2770
|
break;
|
|
2782
2771
|
case "+":
|
|
2783
|
-
for (let
|
|
2772
|
+
for (let h = l; h < o.length; ++h)
|
|
2784
2773
|
f += `
|
|
2785
|
-
` + o[
|
|
2774
|
+
` + o[h][0].slice(a);
|
|
2786
2775
|
f[f.length - 1] !== `
|
|
2787
2776
|
` && (f += `
|
|
2788
2777
|
`);
|
|
@@ -2799,43 +2788,45 @@ function dn({ offset: s, props: e }, t, n) {
|
|
|
2799
2788
|
return n(e[0], "IMPOSSIBLE", "Block scalar header not found"), null;
|
|
2800
2789
|
const { source: i } = e[0], r = i[0];
|
|
2801
2790
|
let o = 0, l = "", a = -1;
|
|
2802
|
-
for (let
|
|
2803
|
-
const
|
|
2804
|
-
if (!l && (
|
|
2805
|
-
l =
|
|
2791
|
+
for (let u = 1; u < i.length; ++u) {
|
|
2792
|
+
const m = i[u];
|
|
2793
|
+
if (!l && (m === "-" || m === "+"))
|
|
2794
|
+
l = m;
|
|
2806
2795
|
else {
|
|
2807
|
-
const y = Number(
|
|
2808
|
-
!o && y ? o = y : a === -1 && (a = s +
|
|
2796
|
+
const y = Number(m);
|
|
2797
|
+
!o && y ? o = y : a === -1 && (a = s + u);
|
|
2809
2798
|
}
|
|
2810
2799
|
}
|
|
2811
2800
|
a !== -1 && n(a, "UNEXPECTED_TOKEN", `Block scalar header includes extra characters: ${i}`);
|
|
2812
|
-
let c = !1,
|
|
2813
|
-
for (let
|
|
2814
|
-
const
|
|
2815
|
-
switch (
|
|
2801
|
+
let c = !1, d = "", f = i.length;
|
|
2802
|
+
for (let u = 1; u < e.length; ++u) {
|
|
2803
|
+
const m = e[u];
|
|
2804
|
+
switch (m.type) {
|
|
2816
2805
|
case "space":
|
|
2817
2806
|
c = !0;
|
|
2807
|
+
// fallthrough
|
|
2818
2808
|
case "newline":
|
|
2819
|
-
f +=
|
|
2809
|
+
f += m.source.length;
|
|
2820
2810
|
break;
|
|
2821
2811
|
case "comment":
|
|
2822
|
-
t && !c && n(
|
|
2812
|
+
t && !c && n(m, "MISSING_CHAR", "Comments must be separated from other tokens by white space characters"), f += m.source.length, d = m.source.substring(1);
|
|
2823
2813
|
break;
|
|
2824
2814
|
case "error":
|
|
2825
|
-
n(
|
|
2815
|
+
n(m, "UNEXPECTED_TOKEN", m.message), f += m.source.length;
|
|
2826
2816
|
break;
|
|
2817
|
+
/* istanbul ignore next should not happen */
|
|
2827
2818
|
default: {
|
|
2828
|
-
const y = `Unexpected token in block scalar header: ${
|
|
2829
|
-
n(
|
|
2830
|
-
const
|
|
2831
|
-
|
|
2819
|
+
const y = `Unexpected token in block scalar header: ${m.type}`;
|
|
2820
|
+
n(m, "UNEXPECTED_TOKEN", y);
|
|
2821
|
+
const h = m.source;
|
|
2822
|
+
h && typeof h == "string" && (f += h.length);
|
|
2832
2823
|
}
|
|
2833
2824
|
}
|
|
2834
2825
|
}
|
|
2835
|
-
return { mode: r, indent: o, chomp: l, comment:
|
|
2826
|
+
return { mode: r, indent: o, chomp: l, comment: d, length: f };
|
|
2836
2827
|
}
|
|
2837
2828
|
function pn(s) {
|
|
2838
|
-
const e = s.split(/\n( *)/), t = e[0], n = t.match(/^( *)/), r = [n
|
|
2829
|
+
const e = s.split(/\n( *)/), t = e[0], n = t.match(/^( *)/), r = [n?.[1] ? [n[1], t.slice(n[1].length)] : ["", t]];
|
|
2839
2830
|
for (let o = 1; o < e.length; o += 2)
|
|
2840
2831
|
r.push([e[o], e[o + 1]]);
|
|
2841
2832
|
return r;
|
|
@@ -2843,7 +2834,7 @@ function pn(s) {
|
|
|
2843
2834
|
function ws(s, e, t) {
|
|
2844
2835
|
const { offset: n, type: i, source: r, end: o } = s;
|
|
2845
2836
|
let l, a;
|
|
2846
|
-
const c = (
|
|
2837
|
+
const c = (u, m, y) => t(n + u, m, y);
|
|
2847
2838
|
switch (i) {
|
|
2848
2839
|
case "scalar":
|
|
2849
2840
|
l = O.PLAIN, a = mn(r, c);
|
|
@@ -2854,6 +2845,7 @@ function ws(s, e, t) {
|
|
|
2854
2845
|
case "double-quoted-scalar":
|
|
2855
2846
|
l = O.QUOTE_DOUBLE, a = gn(r, c);
|
|
2856
2847
|
break;
|
|
2848
|
+
/* istanbul ignore next should not happen */
|
|
2857
2849
|
default:
|
|
2858
2850
|
return t(s, "UNEXPECTED_TOKEN", `Expected a flow scalar value, but found: ${i}`), {
|
|
2859
2851
|
value: "",
|
|
@@ -2862,17 +2854,18 @@ function ws(s, e, t) {
|
|
|
2862
2854
|
range: [n, n + r.length, n + r.length]
|
|
2863
2855
|
};
|
|
2864
2856
|
}
|
|
2865
|
-
const
|
|
2857
|
+
const d = n + r.length, f = Ie(o, d, e, t);
|
|
2866
2858
|
return {
|
|
2867
2859
|
value: a,
|
|
2868
2860
|
type: l,
|
|
2869
2861
|
comment: f.comment,
|
|
2870
|
-
range: [n,
|
|
2862
|
+
range: [n, d, f.offset]
|
|
2871
2863
|
};
|
|
2872
2864
|
}
|
|
2873
2865
|
function mn(s, e) {
|
|
2874
2866
|
let t = "";
|
|
2875
2867
|
switch (s[0]) {
|
|
2868
|
+
/* istanbul ignore next should not happen */
|
|
2876
2869
|
case " ":
|
|
2877
2870
|
t = "a tab character";
|
|
2878
2871
|
break;
|
|
@@ -2916,7 +2909,7 @@ function Ss(s) {
|
|
|
2916
2909
|
` ? i += r : r = `
|
|
2917
2910
|
` : (i += r + n[1], r = " "), o = t.lastIndex;
|
|
2918
2911
|
const l = /[ \t]*(.*)/sy;
|
|
2919
|
-
return l.lastIndex = o, n = l.exec(s), i + r + (
|
|
2912
|
+
return l.lastIndex = o, n = l.exec(s), i + r + (n?.[1] ?? "");
|
|
2920
2913
|
}
|
|
2921
2914
|
function gn(s, e) {
|
|
2922
2915
|
let t = "";
|
|
@@ -3016,47 +3009,40 @@ function Sn(s, e, t, n) {
|
|
|
3016
3009
|
function ks(s, e, t, n) {
|
|
3017
3010
|
const { value: i, type: r, comment: o, range: l } = e.type === "block-scalar" ? bs(s, e, n) : ws(e, s.options.strict, n), a = t ? s.directives.tagName(t.source, (f) => n(t, "TAG_RESOLVE_FAILED", f)) : null;
|
|
3018
3011
|
let c;
|
|
3019
|
-
s.options.stringKeys && s.atKey ? c = s.schema[
|
|
3020
|
-
let
|
|
3012
|
+
s.options.stringKeys && s.atKey ? c = s.schema[R] : a ? c = kn(s.schema, i, a, t, n) : e.type === "scalar" ? c = Nn(s, i, e, n) : c = s.schema[R];
|
|
3013
|
+
let d;
|
|
3021
3014
|
try {
|
|
3022
|
-
const f = c.resolve(i, (
|
|
3023
|
-
|
|
3015
|
+
const f = c.resolve(i, (u) => n(t ?? e, "TAG_RESOLVE_FAILED", u), s.options);
|
|
3016
|
+
d = E(f) ? f : new O(f);
|
|
3024
3017
|
} catch (f) {
|
|
3025
|
-
const
|
|
3026
|
-
n(t ?? e, "TAG_RESOLVE_FAILED",
|
|
3018
|
+
const u = f instanceof Error ? f.message : String(f);
|
|
3019
|
+
n(t ?? e, "TAG_RESOLVE_FAILED", u), d = new O(i);
|
|
3027
3020
|
}
|
|
3028
|
-
return
|
|
3021
|
+
return d.range = l, d.source = i, r && (d.type = r), a && (d.tag = a), c.format && (d.format = c.format), o && (d.comment = o), d;
|
|
3029
3022
|
}
|
|
3030
3023
|
function kn(s, e, t, n, i) {
|
|
3031
|
-
var l;
|
|
3032
3024
|
if (t === "!")
|
|
3033
|
-
return s[
|
|
3025
|
+
return s[R];
|
|
3034
3026
|
const r = [];
|
|
3035
|
-
for (const
|
|
3036
|
-
if (!
|
|
3037
|
-
if (
|
|
3038
|
-
r.push(
|
|
3027
|
+
for (const l of s.tags)
|
|
3028
|
+
if (!l.collection && l.tag === t)
|
|
3029
|
+
if (l.default && l.test)
|
|
3030
|
+
r.push(l);
|
|
3039
3031
|
else
|
|
3040
|
-
return
|
|
3041
|
-
for (const
|
|
3042
|
-
if (
|
|
3043
|
-
return
|
|
3032
|
+
return l;
|
|
3033
|
+
for (const l of r)
|
|
3034
|
+
if (l.test?.test(e))
|
|
3035
|
+
return l;
|
|
3044
3036
|
const o = s.knownTags[t];
|
|
3045
|
-
return o && !o.collection ? (s.tags.push(Object.assign({}, o, { default: !1, test: void 0 })), o) : (i(n, "TAG_RESOLVE_FAILED", `Unresolved tag: ${t}`, t !== "tag:yaml.org,2002:str"), s[
|
|
3037
|
+
return o && !o.collection ? (s.tags.push(Object.assign({}, o, { default: !1, test: void 0 })), o) : (i(n, "TAG_RESOLVE_FAILED", `Unresolved tag: ${t}`, t !== "tag:yaml.org,2002:str"), s[R]);
|
|
3046
3038
|
}
|
|
3047
3039
|
function Nn({ atKey: s, directives: e, schema: t }, n, i, r) {
|
|
3048
|
-
const o = t.tags.find((l) =>
|
|
3049
|
-
var a;
|
|
3050
|
-
return (l.default === !0 || s && l.default === "key") && ((a = l.test) == null ? void 0 : a.test(n));
|
|
3051
|
-
}) || t[U];
|
|
3040
|
+
const o = t.tags.find((l) => (l.default === !0 || s && l.default === "key") && l.test?.test(n)) || t[R];
|
|
3052
3041
|
if (t.compat) {
|
|
3053
|
-
const l = t.compat.find((a) =>
|
|
3054
|
-
var c;
|
|
3055
|
-
return a.default && ((c = a.test) == null ? void 0 : c.test(n));
|
|
3056
|
-
}) ?? t[U];
|
|
3042
|
+
const l = t.compat.find((a) => a.default && a.test?.test(n)) ?? t[R];
|
|
3057
3043
|
if (o.tag !== l.tag) {
|
|
3058
|
-
const a = e.tagString(o.tag), c = e.tagString(l.tag),
|
|
3059
|
-
r(i, "TAG_RESOLVE_FAILED",
|
|
3044
|
+
const a = e.tagString(o.tag), c = e.tagString(l.tag), d = `Value may be parsed as either ${a} or ${c}`;
|
|
3045
|
+
r(i, "TAG_RESOLVE_FAILED", d, !0);
|
|
3060
3046
|
}
|
|
3061
3047
|
}
|
|
3062
3048
|
return o;
|
|
@@ -3073,7 +3059,7 @@ function On(s, e, t) {
|
|
|
3073
3059
|
s -= i.source.length;
|
|
3074
3060
|
continue;
|
|
3075
3061
|
}
|
|
3076
|
-
for (i = e[++n];
|
|
3062
|
+
for (i = e[++n]; i?.type === "space"; )
|
|
3077
3063
|
s += i.source.length, i = e[++n];
|
|
3078
3064
|
break;
|
|
3079
3065
|
}
|
|
@@ -3083,7 +3069,7 @@ function On(s, e, t) {
|
|
|
3083
3069
|
const An = { composeNode: Ns, composeEmptyNode: Et };
|
|
3084
3070
|
function Ns(s, e, t, n) {
|
|
3085
3071
|
const i = s.atKey, { spaceBefore: r, comment: o, anchor: l, tag: a } = t;
|
|
3086
|
-
let c,
|
|
3072
|
+
let c, d = !0;
|
|
3087
3073
|
switch (e.type) {
|
|
3088
3074
|
case "alias":
|
|
3089
3075
|
c = En(s, e, n), (l || a) && n(e, "ALIAS_PROPS", "An alias node must not specify any properties");
|
|
@@ -3101,44 +3087,44 @@ function Ns(s, e, t, n) {
|
|
|
3101
3087
|
break;
|
|
3102
3088
|
default: {
|
|
3103
3089
|
const f = e.type === "error" ? e.message : `Unsupported token (type: ${e.type})`;
|
|
3104
|
-
n(e, "UNEXPECTED_TOKEN", f), c = Et(s, e.offset, void 0, null, t, n),
|
|
3090
|
+
n(e, "UNEXPECTED_TOKEN", f), c = Et(s, e.offset, void 0, null, t, n), d = !1;
|
|
3105
3091
|
}
|
|
3106
3092
|
}
|
|
3107
|
-
return l && c.anchor === "" && n(l, "BAD_ALIAS", "Anchor cannot be an empty string"), i && s.options.stringKeys && (!E(c) || typeof c.value != "string" || c.tag && c.tag !== "tag:yaml.org,2002:str") && n(a ?? e, "NON_STRING_KEY", "With stringKeys, all keys must be strings"), r && (c.spaceBefore = !0), o && (e.type === "scalar" && e.source === "" ? c.comment = o : c.commentBefore = o), s.options.keepSourceTokens &&
|
|
3093
|
+
return l && c.anchor === "" && n(l, "BAD_ALIAS", "Anchor cannot be an empty string"), i && s.options.stringKeys && (!E(c) || typeof c.value != "string" || c.tag && c.tag !== "tag:yaml.org,2002:str") && n(a ?? e, "NON_STRING_KEY", "With stringKeys, all keys must be strings"), r && (c.spaceBefore = !0), o && (e.type === "scalar" && e.source === "" ? c.comment = o : c.commentBefore = o), s.options.keepSourceTokens && d && (c.srcToken = e), c;
|
|
3108
3094
|
}
|
|
3109
3095
|
function Et(s, e, t, n, { spaceBefore: i, comment: r, anchor: o, tag: l, end: a }, c) {
|
|
3110
|
-
const
|
|
3096
|
+
const d = {
|
|
3111
3097
|
type: "scalar",
|
|
3112
3098
|
offset: On(e, t, n),
|
|
3113
3099
|
indent: -1,
|
|
3114
3100
|
source: ""
|
|
3115
|
-
}, f = ks(s,
|
|
3101
|
+
}, f = ks(s, d, l, c);
|
|
3116
3102
|
return o && (f.anchor = o.source.substring(1), f.anchor === "" && c(o, "BAD_ALIAS", "Anchor cannot be an empty string")), i && (f.spaceBefore = !0), r && (f.comment = r, f.range[2] = a), f;
|
|
3117
3103
|
}
|
|
3118
3104
|
function En({ options: s }, { offset: e, source: t, end: n }, i) {
|
|
3119
|
-
const r = new
|
|
3105
|
+
const r = new Re(t.substring(1));
|
|
3120
3106
|
r.source === "" && i(e, "BAD_ALIAS", "Alias cannot be an empty string"), r.source.endsWith(":") && i(e + t.length - 1, "BAD_ALIAS", "Alias ending in : is ambiguous", !0);
|
|
3121
|
-
const o = e + t.length, l =
|
|
3107
|
+
const o = e + t.length, l = Ie(n, o, s.strict, i);
|
|
3122
3108
|
return r.range = [e, o, l.offset], l.comment && (r.comment = l.comment), r;
|
|
3123
3109
|
}
|
|
3124
|
-
function
|
|
3110
|
+
function In(s, e, { offset: t, start: n, value: i, end: r }, o) {
|
|
3125
3111
|
const l = Object.assign({ _directives: e }, s), a = new ge(void 0, l), c = {
|
|
3126
3112
|
atKey: !1,
|
|
3127
3113
|
atRoot: !0,
|
|
3128
3114
|
directives: a.directives,
|
|
3129
3115
|
options: a.options,
|
|
3130
3116
|
schema: a.schema
|
|
3131
|
-
},
|
|
3117
|
+
}, d = ue(n, {
|
|
3132
3118
|
indicator: "doc-start",
|
|
3133
|
-
next: i ??
|
|
3119
|
+
next: i ?? r?.[0],
|
|
3134
3120
|
offset: t,
|
|
3135
3121
|
onError: o,
|
|
3136
3122
|
parentIndent: 0,
|
|
3137
3123
|
startOnNewline: !0
|
|
3138
3124
|
});
|
|
3139
|
-
|
|
3140
|
-
const f = a.contents.range[2],
|
|
3141
|
-
return
|
|
3125
|
+
d.found && (a.directives.docStart = !0, i && (i.type === "block-map" || i.type === "block-seq") && !d.hasNewline && o(d.end, "MISSING_CHAR", "Block collection cannot start on same line with directives-end marker")), a.contents = i ? Ns(c, i, d, o) : Et(c, d.end, n, null, d, o);
|
|
3126
|
+
const f = a.contents.range[2], u = Ie(r, f, !1, o);
|
|
3127
|
+
return u.comment && (a.comment = u.comment), a.range = [t, f, u.offset], a;
|
|
3142
3128
|
}
|
|
3143
3129
|
function be(s) {
|
|
3144
3130
|
if (typeof s == "number")
|
|
@@ -3149,19 +3135,18 @@ function be(s) {
|
|
|
3149
3135
|
return [e, e + (typeof t == "string" ? t.length : 1)];
|
|
3150
3136
|
}
|
|
3151
3137
|
function Kt(s) {
|
|
3152
|
-
var i;
|
|
3153
3138
|
let e = "", t = !1, n = !1;
|
|
3154
|
-
for (let
|
|
3155
|
-
const
|
|
3156
|
-
switch (
|
|
3139
|
+
for (let i = 0; i < s.length; ++i) {
|
|
3140
|
+
const r = s[i];
|
|
3141
|
+
switch (r[0]) {
|
|
3157
3142
|
case "#":
|
|
3158
3143
|
e += (e === "" ? "" : n ? `
|
|
3159
3144
|
|
|
3160
3145
|
` : `
|
|
3161
|
-
`) + (
|
|
3146
|
+
`) + (r.substring(1) || " "), t = !0, n = !1;
|
|
3162
3147
|
break;
|
|
3163
3148
|
case "%":
|
|
3164
|
-
|
|
3149
|
+
s[i + 1]?.[0] !== "#" && (i += 1), t = !1;
|
|
3165
3150
|
break;
|
|
3166
3151
|
default:
|
|
3167
3152
|
t || (n = !0), t = !1;
|
|
@@ -3169,7 +3154,7 @@ function Kt(s) {
|
|
|
3169
3154
|
}
|
|
3170
3155
|
return { comment: e, afterEmptyLine: n };
|
|
3171
3156
|
}
|
|
3172
|
-
class
|
|
3157
|
+
class It {
|
|
3173
3158
|
constructor(e = {}) {
|
|
3174
3159
|
this.doc = null, this.atDirectives = !1, this.prelude = [], this.errors = [], this.warnings = [], this.onError = (t, n, i, r) => {
|
|
3175
3160
|
const o = be(t);
|
|
@@ -3233,7 +3218,7 @@ ${o}` : n;
|
|
|
3233
3218
|
}), this.prelude.push(e.source), this.atDirectives = !0;
|
|
3234
3219
|
break;
|
|
3235
3220
|
case "document": {
|
|
3236
|
-
const t =
|
|
3221
|
+
const t = In(this.options, this.directives, e, this.onError);
|
|
3237
3222
|
this.atDirectives && !t.directives.docStart && this.onError(e, "MISSING_CHAR", "Missing directives-end/doc-start indicator line"), this.decorate(t, !1), this.doc && (yield this.doc), this.doc = t, this.atDirectives = !1;
|
|
3238
3223
|
break;
|
|
3239
3224
|
}
|
|
@@ -3256,7 +3241,7 @@ ${o}` : n;
|
|
|
3256
3241
|
break;
|
|
3257
3242
|
}
|
|
3258
3243
|
this.doc.directives.docEnd = !0;
|
|
3259
|
-
const t =
|
|
3244
|
+
const t = Ie(e.end, e.offset + e.source.length, this.doc.options.strict, this.onError);
|
|
3260
3245
|
if (this.decorate(this.doc, !0), t.comment) {
|
|
3261
3246
|
const n = this.doc.comment;
|
|
3262
3247
|
this.doc.comment = n ? `${n}
|
|
@@ -3284,7 +3269,7 @@ ${t.comment}` : t.comment;
|
|
|
3284
3269
|
}
|
|
3285
3270
|
}
|
|
3286
3271
|
}
|
|
3287
|
-
function
|
|
3272
|
+
function Tn(s, e = !0, t) {
|
|
3288
3273
|
if (s) {
|
|
3289
3274
|
const n = (i, r, o) => {
|
|
3290
3275
|
const l = typeof i == "number" ? i : Array.isArray(i) ? i[0] : i.offset;
|
|
@@ -3318,12 +3303,12 @@ function Ln(s, e) {
|
|
|
3318
3303
|
case "|":
|
|
3319
3304
|
case ">": {
|
|
3320
3305
|
const c = l.indexOf(`
|
|
3321
|
-
`),
|
|
3322
|
-
`,
|
|
3323
|
-
{ type: "block-scalar-header", offset: r, indent: n, source:
|
|
3306
|
+
`), d = l.substring(0, c), f = l.substring(c + 1) + `
|
|
3307
|
+
`, u = [
|
|
3308
|
+
{ type: "block-scalar-header", offset: r, indent: n, source: d }
|
|
3324
3309
|
];
|
|
3325
|
-
return Os(
|
|
3326
|
-
` }), { type: "block-scalar", offset: r, indent: n, props:
|
|
3310
|
+
return Os(u, a) || u.push({ type: "newline", offset: -1, indent: n, source: `
|
|
3311
|
+
` }), { type: "block-scalar", offset: r, indent: n, props: u, source: f };
|
|
3327
3312
|
}
|
|
3328
3313
|
case '"':
|
|
3329
3314
|
return { type: "double-quoted-scalar", offset: r, indent: n, source: l, end: a };
|
|
@@ -3488,16 +3473,16 @@ function Ke({ start: s, key: e, sep: t, value: n }) {
|
|
|
3488
3473
|
return n && (i += qe(n)), i;
|
|
3489
3474
|
}
|
|
3490
3475
|
const ht = Symbol("break visit"), vn = Symbol("skip children"), As = Symbol("remove item");
|
|
3491
|
-
function
|
|
3476
|
+
function x(s, e) {
|
|
3492
3477
|
"type" in s && s.type === "document" && (s = { start: s.start, value: s.value }), Es(Object.freeze([]), s, e);
|
|
3493
3478
|
}
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3479
|
+
x.BREAK = ht;
|
|
3480
|
+
x.SKIP = vn;
|
|
3481
|
+
x.REMOVE = As;
|
|
3482
|
+
x.itemAtPath = (s, e) => {
|
|
3498
3483
|
let t = s;
|
|
3499
3484
|
for (const [n, i] of e) {
|
|
3500
|
-
const r = t
|
|
3485
|
+
const r = t?.[n];
|
|
3501
3486
|
if (r && "items" in r)
|
|
3502
3487
|
t = r.items[i];
|
|
3503
3488
|
else
|
|
@@ -3505,8 +3490,8 @@ Z.itemAtPath = (s, e) => {
|
|
|
3505
3490
|
}
|
|
3506
3491
|
return t;
|
|
3507
3492
|
};
|
|
3508
|
-
|
|
3509
|
-
const t =
|
|
3493
|
+
x.parentCollection = (s, e) => {
|
|
3494
|
+
const t = x.itemAtPath(s, e.slice(0, -1)), n = e[e.length - 1][0], i = t?.[n];
|
|
3510
3495
|
if (i && "items" in i)
|
|
3511
3496
|
return i;
|
|
3512
3497
|
throw new Error("Parent collection not found");
|
|
@@ -3533,14 +3518,14 @@ function Es(s, e, t) {
|
|
|
3533
3518
|
}
|
|
3534
3519
|
return typeof n == "function" ? n(e, s) : n;
|
|
3535
3520
|
}
|
|
3536
|
-
const ze = "\uFEFF",
|
|
3521
|
+
const ze = "\uFEFF", xe = "", Ze = "", Oe = "", Bn = (s) => !!s && "items" in s, Mn = (s) => !!s && (s.type === "scalar" || s.type === "single-quoted-scalar" || s.type === "double-quoted-scalar" || s.type === "block-scalar");
|
|
3537
3522
|
function Kn(s) {
|
|
3538
3523
|
switch (s) {
|
|
3539
3524
|
case ze:
|
|
3540
3525
|
return "<BOM>";
|
|
3541
|
-
case Ze:
|
|
3542
|
-
return "<DOC>";
|
|
3543
3526
|
case xe:
|
|
3527
|
+
return "<DOC>";
|
|
3528
|
+
case Ze:
|
|
3544
3529
|
return "<FLOW_END>";
|
|
3545
3530
|
case Oe:
|
|
3546
3531
|
return "<SCALAR>";
|
|
@@ -3548,13 +3533,13 @@ function Kn(s) {
|
|
|
3548
3533
|
return JSON.stringify(s);
|
|
3549
3534
|
}
|
|
3550
3535
|
}
|
|
3551
|
-
function
|
|
3536
|
+
function Is(s) {
|
|
3552
3537
|
switch (s) {
|
|
3553
3538
|
case ze:
|
|
3554
3539
|
return "byte-order-mark";
|
|
3555
|
-
case Ze:
|
|
3556
|
-
return "doc-mode";
|
|
3557
3540
|
case xe:
|
|
3541
|
+
return "doc-mode";
|
|
3542
|
+
case Ze:
|
|
3558
3543
|
return "flow-error-end";
|
|
3559
3544
|
case Oe:
|
|
3560
3545
|
return "scalar";
|
|
@@ -3609,23 +3594,23 @@ function Ts(s) {
|
|
|
3609
3594
|
}
|
|
3610
3595
|
return null;
|
|
3611
3596
|
}
|
|
3612
|
-
|
|
3597
|
+
const jn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3613
3598
|
__proto__: null,
|
|
3614
3599
|
BOM: ze,
|
|
3615
|
-
DOCUMENT:
|
|
3616
|
-
FLOW_END:
|
|
3600
|
+
DOCUMENT: xe,
|
|
3601
|
+
FLOW_END: Ze,
|
|
3617
3602
|
SCALAR: Oe,
|
|
3618
3603
|
createScalarToken: Ln,
|
|
3619
3604
|
isCollection: Bn,
|
|
3620
3605
|
isScalar: Mn,
|
|
3621
3606
|
prettyToken: Kn,
|
|
3622
|
-
resolveAsScalar:
|
|
3607
|
+
resolveAsScalar: Tn,
|
|
3623
3608
|
setScalarValue: $n,
|
|
3624
3609
|
stringify: Cn,
|
|
3625
|
-
tokenType:
|
|
3626
|
-
visit:
|
|
3627
|
-
});
|
|
3628
|
-
function
|
|
3610
|
+
tokenType: Is,
|
|
3611
|
+
visit: x
|
|
3612
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
3613
|
+
function D(s) {
|
|
3629
3614
|
switch (s) {
|
|
3630
3615
|
case void 0:
|
|
3631
3616
|
case " ":
|
|
@@ -3638,9 +3623,9 @@ function j(s) {
|
|
|
3638
3623
|
return !1;
|
|
3639
3624
|
}
|
|
3640
3625
|
}
|
|
3641
|
-
const
|
|
3642
|
-
\r `), ot = (s) => !s ||
|
|
3643
|
-
class
|
|
3626
|
+
const jt = new Set("0123456789ABCDEFabcdef"), Pn = new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"), _e = new Set(",[]{}"), Dn = new Set(` ,[]{}
|
|
3627
|
+
\r `), ot = (s) => !s || Dn.has(s);
|
|
3628
|
+
class Ts {
|
|
3644
3629
|
constructor() {
|
|
3645
3630
|
this.atEnd = !1, this.blockScalarIndent = -1, this.blockScalarKeep = !1, this.buffer = "", this.flowKey = !1, this.flowLevel = 0, this.indentNext = 0, this.indentValue = 0, this.lineEndPos = null, this.next = null, this.pos = 0;
|
|
3646
3631
|
}
|
|
@@ -3689,7 +3674,7 @@ class Is {
|
|
|
3689
3674
|
}
|
|
3690
3675
|
if (t === "-" || t === ".") {
|
|
3691
3676
|
const n = this.buffer.substr(e, 3);
|
|
3692
|
-
if ((n === "---" || n === "...") &&
|
|
3677
|
+
if ((n === "---" || n === "...") && D(this.buffer[e + 3]))
|
|
3693
3678
|
return -1;
|
|
3694
3679
|
}
|
|
3695
3680
|
return e;
|
|
@@ -3756,7 +3741,7 @@ class Is {
|
|
|
3756
3741
|
const t = yield* this.pushSpaces(!0);
|
|
3757
3742
|
return yield* this.pushCount(e.length - t), yield* this.pushNewline(), "stream";
|
|
3758
3743
|
}
|
|
3759
|
-
return yield
|
|
3744
|
+
return yield xe, yield* this.parseLineStart();
|
|
3760
3745
|
}
|
|
3761
3746
|
*parseLineStart() {
|
|
3762
3747
|
const e = this.charAt(0);
|
|
@@ -3766,16 +3751,16 @@ class Is {
|
|
|
3766
3751
|
if (!this.atEnd && !this.hasChars(4))
|
|
3767
3752
|
return this.setNext("line-start");
|
|
3768
3753
|
const t = this.peek(3);
|
|
3769
|
-
if ((t === "---" || t === "...") &&
|
|
3754
|
+
if ((t === "---" || t === "...") && D(this.charAt(3)))
|
|
3770
3755
|
return yield* this.pushCount(3), this.indentValue = 0, this.indentNext = 0, t === "---" ? "doc" : "stream";
|
|
3771
3756
|
}
|
|
3772
|
-
return this.indentValue = yield* this.pushSpaces(!1), this.indentNext > this.indentValue && !
|
|
3757
|
+
return this.indentValue = yield* this.pushSpaces(!1), this.indentNext > this.indentValue && !D(this.charAt(1)) && (this.indentNext = this.indentValue), yield* this.parseBlockStart();
|
|
3773
3758
|
}
|
|
3774
3759
|
*parseBlockStart() {
|
|
3775
3760
|
const [e, t] = this.peek(2);
|
|
3776
3761
|
if (!t && !this.atEnd)
|
|
3777
3762
|
return this.setNext("block-start");
|
|
3778
|
-
if ((e === "-" || e === "?" || e === ":") &&
|
|
3763
|
+
if ((e === "-" || e === "?" || e === ":") && D(t)) {
|
|
3779
3764
|
const n = (yield* this.pushCount(1)) + (yield* this.pushSpaces(!0));
|
|
3780
3765
|
return this.indentNext = this.indentValue + 1, this.indentValue += n, yield* this.parseBlockStart();
|
|
3781
3766
|
}
|
|
@@ -3790,6 +3775,7 @@ class Is {
|
|
|
3790
3775
|
switch (e[t]) {
|
|
3791
3776
|
case "#":
|
|
3792
3777
|
yield* this.pushCount(e.length - t);
|
|
3778
|
+
// fallthrough
|
|
3793
3779
|
case void 0:
|
|
3794
3780
|
return yield* this.pushNewline(), yield* this.parseLineStart();
|
|
3795
3781
|
case "{":
|
|
@@ -3818,8 +3804,8 @@ class Is {
|
|
|
3818
3804
|
const i = this.getLine();
|
|
3819
3805
|
if (i === null)
|
|
3820
3806
|
return this.setNext("flow");
|
|
3821
|
-
if ((n !== -1 && n < this.indentNext && i[0] !== "#" || n === 0 && (i.startsWith("---") || i.startsWith("...")) &&
|
|
3822
|
-
return this.flowLevel = 0, yield
|
|
3807
|
+
if ((n !== -1 && n < this.indentNext && i[0] !== "#" || n === 0 && (i.startsWith("---") || i.startsWith("...")) && D(i[3])) && !(n === this.indentNext - 1 && this.flowLevel === 1 && (i[0] === "]" || i[0] === "}")))
|
|
3808
|
+
return this.flowLevel = 0, yield Ze, yield* this.parseLineStart();
|
|
3823
3809
|
let r = 0;
|
|
3824
3810
|
for (; i[r] === ","; )
|
|
3825
3811
|
r += yield* this.pushCount(1), r += yield* this.pushSpaces(!0), this.flowKey = !1;
|
|
@@ -3841,9 +3827,10 @@ class Is {
|
|
|
3841
3827
|
return this.flowKey = !0, yield* this.parseQuotedScalar();
|
|
3842
3828
|
case ":": {
|
|
3843
3829
|
const o = this.charAt(1);
|
|
3844
|
-
if (this.flowKey ||
|
|
3830
|
+
if (this.flowKey || D(o) || o === ",")
|
|
3845
3831
|
return this.flowKey = !1, yield* this.pushCount(1), yield* this.pushSpaces(!0), "flow";
|
|
3846
3832
|
}
|
|
3833
|
+
// fallthrough
|
|
3847
3834
|
default:
|
|
3848
3835
|
return this.flowKey = !1, yield* this.parsePlainScalar();
|
|
3849
3836
|
}
|
|
@@ -3895,7 +3882,7 @@ class Is {
|
|
|
3895
3882
|
else if (t !== "-")
|
|
3896
3883
|
break;
|
|
3897
3884
|
}
|
|
3898
|
-
return yield* this.pushUntil((t) =>
|
|
3885
|
+
return yield* this.pushUntil((t) => D(t) || t === "#");
|
|
3899
3886
|
}
|
|
3900
3887
|
*parseBlockScalar() {
|
|
3901
3888
|
let e = this.pos - 1, t = 0, n;
|
|
@@ -3916,6 +3903,7 @@ class Is {
|
|
|
3916
3903
|
`)
|
|
3917
3904
|
break;
|
|
3918
3905
|
}
|
|
3906
|
+
// fallthrough
|
|
3919
3907
|
default:
|
|
3920
3908
|
break e;
|
|
3921
3909
|
}
|
|
@@ -3965,10 +3953,10 @@ class Is {
|
|
|
3965
3953
|
for (; i = this.buffer[++n]; )
|
|
3966
3954
|
if (i === ":") {
|
|
3967
3955
|
const r = this.buffer[n + 1];
|
|
3968
|
-
if (
|
|
3956
|
+
if (D(r) || e && _e.has(r))
|
|
3969
3957
|
break;
|
|
3970
3958
|
t = n;
|
|
3971
|
-
} else if (
|
|
3959
|
+
} else if (D(i)) {
|
|
3972
3960
|
let r = this.buffer[n + 1];
|
|
3973
3961
|
if (i === "\r" && (r === `
|
|
3974
3962
|
` ? (n += 1, i = `
|
|
@@ -4002,10 +3990,12 @@ class Is {
|
|
|
4002
3990
|
case "&":
|
|
4003
3991
|
return (yield* this.pushUntil(ot)) + (yield* this.pushSpaces(!0)) + (yield* this.pushIndicators());
|
|
4004
3992
|
case "-":
|
|
3993
|
+
// this is an error
|
|
4005
3994
|
case "?":
|
|
3995
|
+
// this is an error outside flow collections
|
|
4006
3996
|
case ":": {
|
|
4007
3997
|
const e = this.flowLevel > 0, t = this.charAt(1);
|
|
4008
|
-
if (
|
|
3998
|
+
if (D(t) || e && _e.has(t))
|
|
4009
3999
|
return e ? this.flowKey && (this.flowKey = !1) : this.indentNext = this.indentValue + 1, (yield* this.pushCount(1)) + (yield* this.pushSpaces(!0)) + (yield* this.pushIndicators());
|
|
4010
4000
|
}
|
|
4011
4001
|
}
|
|
@@ -4014,15 +4004,15 @@ class Is {
|
|
|
4014
4004
|
*pushTag() {
|
|
4015
4005
|
if (this.charAt(1) === "<") {
|
|
4016
4006
|
let e = this.pos + 2, t = this.buffer[e];
|
|
4017
|
-
for (; !
|
|
4007
|
+
for (; !D(t) && t !== ">"; )
|
|
4018
4008
|
t = this.buffer[++e];
|
|
4019
4009
|
return yield* this.pushToIndex(t === ">" ? e + 1 : e, !1);
|
|
4020
4010
|
} else {
|
|
4021
4011
|
let e = this.pos + 1, t = this.buffer[e];
|
|
4022
4012
|
for (; t; )
|
|
4023
|
-
if (
|
|
4013
|
+
if (Pn.has(t))
|
|
4024
4014
|
t = this.buffer[++e];
|
|
4025
|
-
else if (t === "%" &&
|
|
4015
|
+
else if (t === "%" && jt.has(this.buffer[e + 1]) && jt.has(this.buffer[e + 2]))
|
|
4026
4016
|
t = this.buffer[e += 3];
|
|
4027
4017
|
else
|
|
4028
4018
|
break;
|
|
@@ -4067,13 +4057,13 @@ class Ls {
|
|
|
4067
4057
|
};
|
|
4068
4058
|
}
|
|
4069
4059
|
}
|
|
4070
|
-
function
|
|
4060
|
+
function Y(s, e) {
|
|
4071
4061
|
for (let t = 0; t < s.length; ++t)
|
|
4072
4062
|
if (s[t].type === e)
|
|
4073
4063
|
return !0;
|
|
4074
4064
|
return !1;
|
|
4075
4065
|
}
|
|
4076
|
-
function
|
|
4066
|
+
function Pt(s) {
|
|
4077
4067
|
for (let e = 0; e < s.length; ++e)
|
|
4078
4068
|
switch (s[e].type) {
|
|
4079
4069
|
case "space":
|
|
@@ -4086,7 +4076,7 @@ function Dt(s) {
|
|
|
4086
4076
|
return -1;
|
|
4087
4077
|
}
|
|
4088
4078
|
function $s(s) {
|
|
4089
|
-
switch (s
|
|
4079
|
+
switch (s?.type) {
|
|
4090
4080
|
case "alias":
|
|
4091
4081
|
case "scalar":
|
|
4092
4082
|
case "single-quoted-scalar":
|
|
@@ -4107,12 +4097,12 @@ function Ce(s) {
|
|
|
4107
4097
|
}
|
|
4108
4098
|
case "block-seq":
|
|
4109
4099
|
return s.items[s.items.length - 1].start;
|
|
4100
|
+
/* istanbul ignore next should not happen */
|
|
4110
4101
|
default:
|
|
4111
4102
|
return [];
|
|
4112
4103
|
}
|
|
4113
4104
|
}
|
|
4114
4105
|
function ne(s) {
|
|
4115
|
-
var t;
|
|
4116
4106
|
if (s.length === 0)
|
|
4117
4107
|
return [];
|
|
4118
4108
|
let e = s.length;
|
|
@@ -4125,22 +4115,22 @@ function ne(s) {
|
|
|
4125
4115
|
case "newline":
|
|
4126
4116
|
break e;
|
|
4127
4117
|
}
|
|
4128
|
-
for (;
|
|
4118
|
+
for (; s[++e]?.type === "space"; )
|
|
4129
4119
|
;
|
|
4130
4120
|
return s.splice(e, s.length);
|
|
4131
4121
|
}
|
|
4132
|
-
function
|
|
4122
|
+
function Dt(s) {
|
|
4133
4123
|
if (s.start.type === "flow-seq-start")
|
|
4134
4124
|
for (const e of s.items)
|
|
4135
|
-
e.sep && !e.value && !
|
|
4125
|
+
e.sep && !e.value && !Y(e.start, "explicit-key-ind") && !Y(e.sep, "map-value-ind") && (e.key && (e.value = e.key), delete e.key, $s(e.value) ? e.value.end ? Array.prototype.push.apply(e.value.end, e.sep) : e.value.end = e.sep : Array.prototype.push.apply(e.start, e.sep), delete e.sep);
|
|
4136
4126
|
}
|
|
4137
|
-
class
|
|
4127
|
+
class Tt {
|
|
4138
4128
|
/**
|
|
4139
4129
|
* @param onNewLine - If defined, called separately with the start position of
|
|
4140
4130
|
* each new line (in `parse()`, including the start of input).
|
|
4141
4131
|
*/
|
|
4142
4132
|
constructor(e) {
|
|
4143
|
-
this.atNewLine = !0, this.atScalar = !1, this.indent = 0, this.offset = 0, this.onKeyLine = !1, this.stack = [], this.source = "", this.type = "", this.lexer = new
|
|
4133
|
+
this.atNewLine = !0, this.atScalar = !1, this.indent = 0, this.offset = 0, this.onKeyLine = !1, this.stack = [], this.source = "", this.type = "", this.lexer = new Ts(), this.onNewLine = e;
|
|
4144
4134
|
}
|
|
4145
4135
|
/**
|
|
4146
4136
|
* Parse `source` as a YAML stream.
|
|
@@ -4164,7 +4154,7 @@ class It {
|
|
|
4164
4154
|
this.atScalar = !1, yield* this.step(), this.offset += e.length;
|
|
4165
4155
|
return;
|
|
4166
4156
|
}
|
|
4167
|
-
const t =
|
|
4157
|
+
const t = Is(e);
|
|
4168
4158
|
if (t)
|
|
4169
4159
|
if (t === "scalar")
|
|
4170
4160
|
this.atNewLine = !1, this.atScalar = !0, this.type = "scalar";
|
|
@@ -4253,7 +4243,7 @@ class It {
|
|
|
4253
4243
|
yield t;
|
|
4254
4244
|
else {
|
|
4255
4245
|
const n = this.peek(1);
|
|
4256
|
-
switch (t.type === "block-scalar" ? t.indent = "indent" in n ? n.indent : 0 : t.type === "flow-collection" && n.type === "document" && (t.indent = 0), t.type === "flow-collection" &&
|
|
4246
|
+
switch (t.type === "block-scalar" ? t.indent = "indent" in n ? n.indent : 0 : t.type === "flow-collection" && n.type === "document" && (t.indent = 0), t.type === "flow-collection" && Dt(t), n.type) {
|
|
4257
4247
|
case "document":
|
|
4258
4248
|
n.value = t;
|
|
4259
4249
|
break;
|
|
@@ -4283,12 +4273,13 @@ class It {
|
|
|
4283
4273
|
!i || i.value ? n.items.push({ start: [], key: t, sep: [] }) : i.sep ? i.value = t : Object.assign(i, { key: t, sep: [] });
|
|
4284
4274
|
return;
|
|
4285
4275
|
}
|
|
4276
|
+
/* istanbul ignore next should not happen */
|
|
4286
4277
|
default:
|
|
4287
4278
|
yield* this.pop(), yield* this.pop(t);
|
|
4288
4279
|
}
|
|
4289
4280
|
if ((n.type === "document" || n.type === "block-map" || n.type === "block-seq") && (t.type === "block-map" || t.type === "block-seq")) {
|
|
4290
4281
|
const i = t.items[t.items.length - 1];
|
|
4291
|
-
i && !i.sep && !i.value && i.start.length > 0 &&
|
|
4282
|
+
i && !i.sep && !i.value && i.start.length > 0 && Pt(i.start) === -1 && (t.indent === 0 || i.start.every((r) => r.type !== "comment" || r.indent < t.indent)) && (n.type === "document" ? n.end = i.start : n.items.push({ start: i.start }), t.items.splice(-1, 1));
|
|
4292
4283
|
}
|
|
4293
4284
|
}
|
|
4294
4285
|
}
|
|
@@ -4326,7 +4317,7 @@ class It {
|
|
|
4326
4317
|
return yield* this.lineEnd(e);
|
|
4327
4318
|
switch (this.type) {
|
|
4328
4319
|
case "doc-start": {
|
|
4329
|
-
|
|
4320
|
+
Pt(e.start) !== -1 ? (yield* this.pop(), yield* this.step()) : e.start.push(this.sourceToken);
|
|
4330
4321
|
return;
|
|
4331
4322
|
}
|
|
4332
4323
|
case "anchor":
|
|
@@ -4377,18 +4368,18 @@ class It {
|
|
|
4377
4368
|
}
|
|
4378
4369
|
yield* this.pop();
|
|
4379
4370
|
break;
|
|
4371
|
+
/* istanbul ignore next should not happen */
|
|
4380
4372
|
default:
|
|
4381
4373
|
yield* this.pop(), yield* this.step();
|
|
4382
4374
|
}
|
|
4383
4375
|
}
|
|
4384
4376
|
*blockMap(e) {
|
|
4385
|
-
var n;
|
|
4386
4377
|
const t = e.items[e.items.length - 1];
|
|
4387
4378
|
switch (this.type) {
|
|
4388
4379
|
case "newline":
|
|
4389
4380
|
if (this.onKeyLine = !1, t.value) {
|
|
4390
|
-
const
|
|
4391
|
-
(
|
|
4381
|
+
const n = "end" in t.value ? t.value.end : void 0;
|
|
4382
|
+
(Array.isArray(n) ? n[n.length - 1] : void 0)?.type === "comment" ? n?.push(this.sourceToken) : e.items.push({ start: [this.sourceToken] });
|
|
4392
4383
|
} else t.sep ? t.sep.push(this.sourceToken) : t.start.push(this.sourceToken);
|
|
4393
4384
|
return;
|
|
4394
4385
|
case "space":
|
|
@@ -4399,9 +4390,9 @@ class It {
|
|
|
4399
4390
|
t.sep.push(this.sourceToken);
|
|
4400
4391
|
else {
|
|
4401
4392
|
if (this.atIndentedComment(t.start, e.indent)) {
|
|
4402
|
-
const i = e.items[e.items.length - 2]
|
|
4403
|
-
if (Array.isArray(
|
|
4404
|
-
Array.prototype.push.apply(
|
|
4393
|
+
const i = e.items[e.items.length - 2]?.value?.end;
|
|
4394
|
+
if (Array.isArray(i)) {
|
|
4395
|
+
Array.prototype.push.apply(i, t.start), i.push(this.sourceToken), e.items.pop();
|
|
4405
4396
|
return;
|
|
4406
4397
|
}
|
|
4407
4398
|
}
|
|
@@ -4410,34 +4401,34 @@ class It {
|
|
|
4410
4401
|
return;
|
|
4411
4402
|
}
|
|
4412
4403
|
if (this.indent >= e.indent) {
|
|
4413
|
-
const
|
|
4414
|
-
let
|
|
4415
|
-
if (
|
|
4416
|
-
const
|
|
4417
|
-
for (let
|
|
4418
|
-
const
|
|
4419
|
-
switch (
|
|
4404
|
+
const n = !this.onKeyLine && this.indent === e.indent, i = n && (t.sep || t.explicitKey) && this.type !== "seq-item-ind";
|
|
4405
|
+
let r = [];
|
|
4406
|
+
if (i && t.sep && !t.value) {
|
|
4407
|
+
const o = [];
|
|
4408
|
+
for (let l = 0; l < t.sep.length; ++l) {
|
|
4409
|
+
const a = t.sep[l];
|
|
4410
|
+
switch (a.type) {
|
|
4420
4411
|
case "newline":
|
|
4421
|
-
|
|
4412
|
+
o.push(l);
|
|
4422
4413
|
break;
|
|
4423
4414
|
case "space":
|
|
4424
4415
|
break;
|
|
4425
4416
|
case "comment":
|
|
4426
|
-
|
|
4417
|
+
a.indent > e.indent && (o.length = 0);
|
|
4427
4418
|
break;
|
|
4428
4419
|
default:
|
|
4429
|
-
|
|
4420
|
+
o.length = 0;
|
|
4430
4421
|
}
|
|
4431
4422
|
}
|
|
4432
|
-
|
|
4423
|
+
o.length >= 2 && (r = t.sep.splice(o[1]));
|
|
4433
4424
|
}
|
|
4434
4425
|
switch (this.type) {
|
|
4435
4426
|
case "anchor":
|
|
4436
4427
|
case "tag":
|
|
4437
|
-
|
|
4428
|
+
i || t.value ? (r.push(this.sourceToken), e.items.push({ start: r }), this.onKeyLine = !0) : t.sep ? t.sep.push(this.sourceToken) : t.start.push(this.sourceToken);
|
|
4438
4429
|
return;
|
|
4439
4430
|
case "explicit-key-ind":
|
|
4440
|
-
!t.sep && !t.explicitKey ? (t.start.push(this.sourceToken), t.explicitKey = !0) :
|
|
4431
|
+
!t.sep && !t.explicitKey ? (t.start.push(this.sourceToken), t.explicitKey = !0) : i || t.value ? (r.push(this.sourceToken), e.items.push({ start: r, explicitKey: !0 })) : this.stack.push({
|
|
4441
4432
|
type: "block-map",
|
|
4442
4433
|
offset: this.offset,
|
|
4443
4434
|
indent: this.indent,
|
|
@@ -4449,35 +4440,35 @@ class It {
|
|
|
4449
4440
|
if (t.sep)
|
|
4450
4441
|
if (t.value)
|
|
4451
4442
|
e.items.push({ start: [], key: null, sep: [this.sourceToken] });
|
|
4452
|
-
else if (
|
|
4443
|
+
else if (Y(t.sep, "map-value-ind"))
|
|
4453
4444
|
this.stack.push({
|
|
4454
4445
|
type: "block-map",
|
|
4455
4446
|
offset: this.offset,
|
|
4456
4447
|
indent: this.indent,
|
|
4457
|
-
items: [{ start:
|
|
4448
|
+
items: [{ start: r, key: null, sep: [this.sourceToken] }]
|
|
4458
4449
|
});
|
|
4459
|
-
else if ($s(t.key) && !
|
|
4460
|
-
const
|
|
4461
|
-
|
|
4450
|
+
else if ($s(t.key) && !Y(t.sep, "newline")) {
|
|
4451
|
+
const o = ne(t.start), l = t.key, a = t.sep;
|
|
4452
|
+
a.push(this.sourceToken), delete t.key, delete t.sep, this.stack.push({
|
|
4462
4453
|
type: "block-map",
|
|
4463
4454
|
offset: this.offset,
|
|
4464
4455
|
indent: this.indent,
|
|
4465
|
-
items: [{ start:
|
|
4456
|
+
items: [{ start: o, key: l, sep: a }]
|
|
4466
4457
|
});
|
|
4467
|
-
} else
|
|
4468
|
-
else if (
|
|
4458
|
+
} else r.length > 0 ? t.sep = t.sep.concat(r, this.sourceToken) : t.sep.push(this.sourceToken);
|
|
4459
|
+
else if (Y(t.start, "newline"))
|
|
4469
4460
|
Object.assign(t, { key: null, sep: [this.sourceToken] });
|
|
4470
4461
|
else {
|
|
4471
|
-
const
|
|
4462
|
+
const o = ne(t.start);
|
|
4472
4463
|
this.stack.push({
|
|
4473
4464
|
type: "block-map",
|
|
4474
4465
|
offset: this.offset,
|
|
4475
4466
|
indent: this.indent,
|
|
4476
|
-
items: [{ start:
|
|
4467
|
+
items: [{ start: o, key: null, sep: [this.sourceToken] }]
|
|
4477
4468
|
});
|
|
4478
4469
|
}
|
|
4479
4470
|
else
|
|
4480
|
-
t.sep ? t.value ||
|
|
4471
|
+
t.sep ? t.value || i ? e.items.push({ start: r, key: null, sep: [this.sourceToken] }) : Y(t.sep, "map-value-ind") ? this.stack.push({
|
|
4481
4472
|
type: "block-map",
|
|
4482
4473
|
offset: this.offset,
|
|
4483
4474
|
indent: this.indent,
|
|
@@ -4489,14 +4480,25 @@ class It {
|
|
|
4489
4480
|
case "scalar":
|
|
4490
4481
|
case "single-quoted-scalar":
|
|
4491
4482
|
case "double-quoted-scalar": {
|
|
4492
|
-
const
|
|
4493
|
-
|
|
4483
|
+
const o = this.flowScalar(this.type);
|
|
4484
|
+
i || t.value ? (e.items.push({ start: r, key: o, sep: [] }), this.onKeyLine = !0) : t.sep ? this.stack.push(o) : (Object.assign(t, { key: o, sep: [] }), this.onKeyLine = !0);
|
|
4494
4485
|
return;
|
|
4495
4486
|
}
|
|
4496
4487
|
default: {
|
|
4497
|
-
const
|
|
4498
|
-
if (
|
|
4499
|
-
|
|
4488
|
+
const o = this.startBlockValue(e);
|
|
4489
|
+
if (o) {
|
|
4490
|
+
if (o.type === "block-seq") {
|
|
4491
|
+
if (!t.explicitKey && t.sep && !Y(t.sep, "newline")) {
|
|
4492
|
+
yield* this.pop({
|
|
4493
|
+
type: "error",
|
|
4494
|
+
offset: this.offset,
|
|
4495
|
+
message: "Unexpected block-seq-ind on same line with key",
|
|
4496
|
+
source: this.source
|
|
4497
|
+
});
|
|
4498
|
+
return;
|
|
4499
|
+
}
|
|
4500
|
+
} else n && e.items.push({ start: r });
|
|
4501
|
+
this.stack.push(o);
|
|
4500
4502
|
return;
|
|
4501
4503
|
}
|
|
4502
4504
|
}
|
|
@@ -4505,13 +4507,12 @@ class It {
|
|
|
4505
4507
|
yield* this.pop(), yield* this.step();
|
|
4506
4508
|
}
|
|
4507
4509
|
*blockSequence(e) {
|
|
4508
|
-
var n;
|
|
4509
4510
|
const t = e.items[e.items.length - 1];
|
|
4510
4511
|
switch (this.type) {
|
|
4511
4512
|
case "newline":
|
|
4512
4513
|
if (t.value) {
|
|
4513
|
-
const
|
|
4514
|
-
(
|
|
4514
|
+
const n = "end" in t.value ? t.value.end : void 0;
|
|
4515
|
+
(Array.isArray(n) ? n[n.length - 1] : void 0)?.type === "comment" ? n?.push(this.sourceToken) : e.items.push({ start: [this.sourceToken] });
|
|
4515
4516
|
} else
|
|
4516
4517
|
t.start.push(this.sourceToken);
|
|
4517
4518
|
return;
|
|
@@ -4521,9 +4522,9 @@ class It {
|
|
|
4521
4522
|
e.items.push({ start: [this.sourceToken] });
|
|
4522
4523
|
else {
|
|
4523
4524
|
if (this.atIndentedComment(t.start, e.indent)) {
|
|
4524
|
-
const i = e.items[e.items.length - 2]
|
|
4525
|
-
if (Array.isArray(
|
|
4526
|
-
Array.prototype.push.apply(
|
|
4525
|
+
const i = e.items[e.items.length - 2]?.value?.end;
|
|
4526
|
+
if (Array.isArray(i)) {
|
|
4527
|
+
Array.prototype.push.apply(i, t.start), i.push(this.sourceToken), e.items.pop();
|
|
4527
4528
|
return;
|
|
4528
4529
|
}
|
|
4529
4530
|
}
|
|
@@ -4539,13 +4540,13 @@ class It {
|
|
|
4539
4540
|
case "seq-item-ind":
|
|
4540
4541
|
if (this.indent !== e.indent)
|
|
4541
4542
|
break;
|
|
4542
|
-
t.value ||
|
|
4543
|
+
t.value || Y(t.start, "seq-item-ind") ? e.items.push({ start: [this.sourceToken] }) : t.start.push(this.sourceToken);
|
|
4543
4544
|
return;
|
|
4544
4545
|
}
|
|
4545
4546
|
if (this.indent > e.indent) {
|
|
4546
|
-
const
|
|
4547
|
-
if (
|
|
4548
|
-
this.stack.push(
|
|
4547
|
+
const n = this.startBlockValue(e);
|
|
4548
|
+
if (n) {
|
|
4549
|
+
this.stack.push(n);
|
|
4549
4550
|
return;
|
|
4550
4551
|
}
|
|
4551
4552
|
}
|
|
@@ -4595,7 +4596,7 @@ class It {
|
|
|
4595
4596
|
yield* this.pop(), yield* this.step();
|
|
4596
4597
|
else if (this.type === "map-value-ind" && n.type !== "flow-collection") {
|
|
4597
4598
|
const i = Ce(n), r = ne(i);
|
|
4598
|
-
|
|
4599
|
+
Dt(e);
|
|
4599
4600
|
const o = e.end.splice(1, e.end.length);
|
|
4600
4601
|
o.push(this.sourceToken);
|
|
4601
4602
|
const l = {
|
|
@@ -4697,6 +4698,7 @@ class It {
|
|
|
4697
4698
|
break;
|
|
4698
4699
|
case "newline":
|
|
4699
4700
|
this.onKeyLine = !1;
|
|
4701
|
+
// fallthrough
|
|
4700
4702
|
case "space":
|
|
4701
4703
|
case "comment":
|
|
4702
4704
|
default:
|
|
@@ -4709,14 +4711,14 @@ function _s(s) {
|
|
|
4709
4711
|
return { lineCounter: s.lineCounter || e && new Ls() || null, prettyErrors: e };
|
|
4710
4712
|
}
|
|
4711
4713
|
function qn(s, e = {}) {
|
|
4712
|
-
const { lineCounter: t, prettyErrors: n } = _s(e), i = new
|
|
4714
|
+
const { lineCounter: t, prettyErrors: n } = _s(e), i = new Tt(t?.addNewLine), r = new It(e), o = Array.from(r.compose(i.parse(s)));
|
|
4713
4715
|
if (n && t)
|
|
4714
4716
|
for (const l of o)
|
|
4715
|
-
l.errors.forEach(
|
|
4717
|
+
l.errors.forEach(De(s, t)), l.warnings.forEach(De(s, t));
|
|
4716
4718
|
return o.length > 0 ? o : Object.assign([], { empty: !0 }, r.streamInfo());
|
|
4717
4719
|
}
|
|
4718
4720
|
function Cs(s, e = {}) {
|
|
4719
|
-
const { lineCounter: t, prettyErrors: n } = _s(e), i = new
|
|
4721
|
+
const { lineCounter: t, prettyErrors: n } = _s(e), i = new Tt(t?.addNewLine), r = new It(e);
|
|
4720
4722
|
let o = null;
|
|
4721
4723
|
for (const l of r.compose(i.parse(s), !0, s.length))
|
|
4722
4724
|
if (!o)
|
|
@@ -4725,9 +4727,9 @@ function Cs(s, e = {}) {
|
|
|
4725
4727
|
o.errors.push(new z(l.range.slice(0, 2), "MULTIPLE_DOCS", "Source contains multiple documents; please use YAML.parseAllDocuments()"));
|
|
4726
4728
|
break;
|
|
4727
4729
|
}
|
|
4728
|
-
return n && t && (o.errors.forEach(
|
|
4730
|
+
return n && t && (o.errors.forEach(De(s, t)), o.warnings.forEach(De(s, t))), o;
|
|
4729
4731
|
}
|
|
4730
|
-
function
|
|
4732
|
+
function Fn(s, e, t) {
|
|
4731
4733
|
let n;
|
|
4732
4734
|
typeof e == "function" ? n = e : t === void 0 && e && typeof e == "object" && (t = e);
|
|
4733
4735
|
const i = Cs(s, t);
|
|
@@ -4740,7 +4742,7 @@ function Rn(s, e, t) {
|
|
|
4740
4742
|
}
|
|
4741
4743
|
return i.toJS(Object.assign({ reviver: n }, t));
|
|
4742
4744
|
}
|
|
4743
|
-
function
|
|
4745
|
+
function Rn(s, e, t) {
|
|
4744
4746
|
let n = null;
|
|
4745
4747
|
if (typeof e == "function" || Array.isArray(e) ? n = e : t === void 0 && e && (t = e), typeof t == "string" && (t = t.length), typeof t == "number") {
|
|
4746
4748
|
const i = Math.round(t);
|
|
@@ -4753,24 +4755,24 @@ function Un(s, e, t) {
|
|
|
4753
4755
|
}
|
|
4754
4756
|
return ee(s) && !n ? s.toString(t) : new ge(s, n, t).toString(t);
|
|
4755
4757
|
}
|
|
4756
|
-
|
|
4758
|
+
const Un = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4757
4759
|
__proto__: null,
|
|
4758
|
-
Alias:
|
|
4759
|
-
CST:
|
|
4760
|
-
Composer:
|
|
4760
|
+
Alias: Re,
|
|
4761
|
+
CST: jn,
|
|
4762
|
+
Composer: It,
|
|
4761
4763
|
Document: ge,
|
|
4762
|
-
Lexer:
|
|
4764
|
+
Lexer: Ts,
|
|
4763
4765
|
LineCounter: Ls,
|
|
4764
4766
|
Pair: v,
|
|
4765
|
-
Parser:
|
|
4767
|
+
Parser: Tt,
|
|
4766
4768
|
Scalar: O,
|
|
4767
4769
|
Schema: Xe,
|
|
4768
4770
|
YAMLError: At,
|
|
4769
4771
|
YAMLMap: K,
|
|
4770
4772
|
YAMLParseError: z,
|
|
4771
|
-
YAMLSeq:
|
|
4773
|
+
YAMLSeq: W,
|
|
4772
4774
|
YAMLWarning: ys,
|
|
4773
|
-
isAlias:
|
|
4775
|
+
isAlias: Z,
|
|
4774
4776
|
isCollection: L,
|
|
4775
4777
|
isDocument: ee,
|
|
4776
4778
|
isMap: de,
|
|
@@ -4778,31 +4780,31 @@ var Fn = /* @__PURE__ */ Object.freeze({
|
|
|
4778
4780
|
isPair: T,
|
|
4779
4781
|
isScalar: E,
|
|
4780
4782
|
isSeq: pe,
|
|
4781
|
-
parse:
|
|
4783
|
+
parse: Fn,
|
|
4782
4784
|
parseAllDocuments: qn,
|
|
4783
4785
|
parseDocument: Cs,
|
|
4784
|
-
stringify:
|
|
4785
|
-
visit:
|
|
4786
|
-
visitAsync:
|
|
4787
|
-
});
|
|
4786
|
+
stringify: Rn,
|
|
4787
|
+
visit: Q,
|
|
4788
|
+
visitAsync: Fe
|
|
4789
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
4788
4790
|
export {
|
|
4789
|
-
|
|
4790
|
-
|
|
4791
|
-
|
|
4791
|
+
Re as Alias,
|
|
4792
|
+
jn as CST,
|
|
4793
|
+
It as Composer,
|
|
4792
4794
|
ge as Document,
|
|
4793
|
-
|
|
4795
|
+
Ts as Lexer,
|
|
4794
4796
|
Ls as LineCounter,
|
|
4795
4797
|
v as Pair,
|
|
4796
|
-
|
|
4798
|
+
Tt as Parser,
|
|
4797
4799
|
O as Scalar,
|
|
4798
4800
|
Xe as Schema,
|
|
4799
4801
|
At as YAMLError,
|
|
4800
4802
|
K as YAMLMap,
|
|
4801
4803
|
z as YAMLParseError,
|
|
4802
|
-
|
|
4804
|
+
W as YAMLSeq,
|
|
4803
4805
|
ys as YAMLWarning,
|
|
4804
|
-
|
|
4805
|
-
|
|
4806
|
+
Un as default,
|
|
4807
|
+
Z as isAlias,
|
|
4806
4808
|
L as isCollection,
|
|
4807
4809
|
ee as isDocument,
|
|
4808
4810
|
de as isMap,
|
|
@@ -4810,11 +4812,11 @@ export {
|
|
|
4810
4812
|
T as isPair,
|
|
4811
4813
|
E as isScalar,
|
|
4812
4814
|
pe as isSeq,
|
|
4813
|
-
|
|
4815
|
+
Fn as parse,
|
|
4814
4816
|
qn as parseAllDocuments,
|
|
4815
4817
|
Cs as parseDocument,
|
|
4816
|
-
|
|
4817
|
-
|
|
4818
|
-
|
|
4818
|
+
Rn as stringify,
|
|
4819
|
+
Q as visit,
|
|
4820
|
+
Fe as visitAsync
|
|
4819
4821
|
};
|
|
4820
|
-
//# sourceMappingURL=index-
|
|
4822
|
+
//# sourceMappingURL=index-zddirpDj.js.map
|