zudoku 0.0.0-f06d326 → 0.0.0-f0b4321
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 +2 -2
- package/cli.js +8 -2
- package/dist/app/ZuploBuildConfig.d.ts +45 -0
- package/dist/app/ZuploBuildConfig.js +29 -0
- package/dist/app/ZuploBuildConfig.js.map +1 -0
- package/dist/app/demo.js +21 -5
- package/dist/app/demo.js.map +1 -1
- package/dist/app/entry.client.d.ts +0 -2
- package/dist/app/entry.client.js +36 -2
- package/dist/app/entry.client.js.map +1 -1
- package/dist/app/entry.server.d.ts +5 -6
- package/dist/app/entry.server.js +2 -4
- package/dist/app/entry.server.js.map +1 -1
- package/dist/app/env.d.ts +33 -0
- package/dist/app/env.js +37 -0
- package/dist/app/env.js.map +1 -0
- package/dist/app/main.d.ts +1 -0
- package/dist/app/main.js +33 -45
- package/dist/app/main.js.map +1 -1
- package/dist/app/standalone.js +7 -6
- package/dist/app/standalone.js.map +1 -1
- package/dist/cli/build/handler.js +11 -2
- package/dist/cli/build/handler.js.map +1 -1
- package/dist/cli/cli.js +12 -1
- package/dist/cli/cli.js.map +1 -1
- package/dist/cli/cmds/dev.js +1 -7
- package/dist/cli/cmds/dev.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/dev/handler.js +2 -1
- package/dist/cli/dev/handler.js.map +1 -1
- package/dist/config/config.d.ts +16 -3
- 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 +18 -17
- package/dist/config/loader.js +95 -103
- package/dist/config/loader.js.map +1 -1
- package/dist/config/validators/BuildSchema.d.ts +36 -0
- package/dist/config/validators/BuildSchema.js +25 -0
- package/dist/config/validators/BuildSchema.js.map +1 -0
- package/dist/config/validators/InputNavigationSchema.d.ts +7364 -0
- package/dist/config/validators/InputNavigationSchema.js +71 -0
- package/dist/config/validators/InputNavigationSchema.js.map +1 -0
- package/dist/config/validators/InputNavigationSchema.test-d.js +145 -0
- package/dist/config/validators/InputNavigationSchema.test-d.js.map +1 -0
- package/dist/config/validators/NavigationSchema.d.ts +44 -0
- package/dist/config/validators/NavigationSchema.js +95 -0
- package/dist/config/validators/NavigationSchema.js.map +1 -0
- package/dist/config/validators/icon-types.d.ts +2 -1
- package/dist/config/validators/icon-types.js +1813 -1
- package/dist/config/validators/icon-types.js.map +1 -1
- package/dist/config/validators/validate.d.ts +595 -2497
- package/dist/config/validators/validate.js +434 -16
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/config/validators/validate.test.js +141 -0
- package/dist/config/validators/validate.test.js.map +1 -0
- package/dist/index.d.ts +7 -4
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/auth/issuer.d.ts +2 -0
- package/dist/lib/auth/issuer.js +37 -0
- package/dist/lib/auth/issuer.js.map +1 -0
- package/dist/lib/auth/issuer.test.js +94 -0
- package/dist/lib/auth/issuer.test.js.map +1 -0
- package/dist/lib/authentication/AuthenticationPlugin.d.ts +2 -2
- package/dist/lib/authentication/AuthenticationPlugin.js +1 -1
- package/dist/lib/authentication/AuthenticationPlugin.js.map +1 -1
- package/dist/lib/authentication/authentication.d.ts +4 -4
- 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 -1
- package/dist/lib/authentication/components/SignIn.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 -0
- package/dist/lib/authentication/providers/auth0.js +2 -2
- package/dist/lib/authentication/providers/auth0.js.map +1 -1
- package/dist/lib/authentication/providers/azureb2c.d.ts +28 -0
- package/dist/lib/authentication/providers/azureb2c.js +145 -0
- package/dist/lib/authentication/providers/azureb2c.js.map +1 -0
- package/dist/lib/authentication/providers/clerk.js +77 -59
- package/dist/lib/authentication/providers/clerk.js.map +1 -1
- package/dist/lib/authentication/providers/openid.d.ts +16 -19
- package/dist/lib/authentication/providers/openid.js +71 -44
- package/dist/lib/authentication/providers/openid.js.map +1 -1
- package/dist/lib/authentication/providers/supabase.js +5 -14
- package/dist/lib/authentication/providers/supabase.js.map +1 -1
- package/dist/lib/authentication/state.d.ts +6 -5
- package/dist/lib/authentication/state.js +19 -6
- package/dist/lib/authentication/state.js.map +1 -1
- package/dist/lib/components/Autocomplete.js +3 -3
- package/dist/lib/components/Autocomplete.js.map +1 -1
- package/dist/lib/components/Banner.js +2 -2
- package/dist/lib/components/Banner.js.map +1 -1
- package/dist/lib/components/Bootstrap.d.ts +2 -1
- package/dist/lib/components/Bootstrap.js +3 -2
- 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/CategoryHeading.js +1 -1
- package/dist/lib/components/CategoryHeading.js.map +1 -1
- package/dist/lib/components/ErrorPage.js +2 -2
- package/dist/lib/components/ErrorPage.js.map +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/Framed.d.ts +7 -0
- package/dist/lib/components/Framed.js +26 -0
- package/dist/lib/components/Framed.js.map +1 -0
- package/dist/lib/components/Header.js +24 -15
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/Heading.d.ts +8 -4
- package/dist/lib/components/Heading.js +7 -2
- package/dist/lib/components/Heading.js.map +1 -1
- package/dist/lib/components/InlineCode.js +1 -1
- package/dist/lib/components/InlineCode.js.map +1 -1
- package/dist/lib/components/Layout.js +4 -2
- package/dist/lib/components/Layout.js.map +1 -1
- package/dist/lib/components/Main.js +7 -6
- package/dist/lib/components/Main.js.map +1 -1
- package/dist/lib/components/Markdown.d.ts +3 -2
- package/dist/lib/components/Markdown.js +14 -16
- package/dist/lib/components/Markdown.js.map +1 -1
- package/dist/lib/components/MobileTopNavigation.js +13 -5
- 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/PageProgress.d.ts +1 -0
- package/dist/lib/components/PageProgress.js +20 -0
- package/dist/lib/components/PageProgress.js.map +1 -0
- package/dist/lib/components/Pagination.d.ts +2 -1
- package/dist/lib/components/Pagination.js +3 -3
- package/dist/lib/components/Pagination.js.map +1 -1
- package/dist/lib/components/Search.js +7 -1
- 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.js +4 -0
- package/dist/lib/components/StatusPage.js.map +1 -1
- package/dist/lib/components/TopNavigation.d.ts +7 -5
- package/dist/lib/components/TopNavigation.js +51 -54
- package/dist/lib/components/TopNavigation.js.map +1 -1
- package/dist/lib/components/Typography.d.ts +5 -0
- package/dist/lib/components/Typography.js +8 -0
- package/dist/lib/components/Typography.js.map +1 -0
- package/dist/lib/components/Zudoku.js +4 -3
- package/dist/lib/components/Zudoku.js.map +1 -1
- 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/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.js +8 -9
- package/dist/lib/components/context/ViewportAnchorContext.js.map +1 -1
- package/dist/lib/components/context/ZudokuContext.d.ts +3 -7
- package/dist/lib/components/context/ZudokuContext.js +45 -28
- package/dist/lib/components/context/ZudokuContext.js.map +1 -1
- package/dist/lib/components/context/ZudokuProvider.d.ts +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 +46 -24
- package/dist/lib/components/index.js +16 -6
- package/dist/lib/components/index.js.map +1 -1
- package/dist/lib/components/navigation/Navigation.d.ts +5 -0
- package/dist/lib/components/navigation/Navigation.js +12 -0
- package/dist/lib/components/navigation/Navigation.js.map +1 -0
- package/dist/lib/components/navigation/{SidebarBadge.d.ts → NavigationBadge.d.ts} +1 -1
- package/dist/lib/components/navigation/{SidebarBadge.js → NavigationBadge.js} +3 -3
- package/dist/lib/components/navigation/NavigationBadge.js.map +1 -0
- package/dist/lib/components/navigation/NavigationCategory.d.ts +5 -0
- package/dist/lib/components/navigation/{SidebarCategory.js → NavigationCategory.js} +22 -16
- package/dist/lib/components/navigation/NavigationCategory.js.map +1 -0
- package/dist/lib/components/navigation/NavigationItem.d.ts +6 -0
- package/dist/lib/components/navigation/NavigationItem.js +47 -0
- package/dist/lib/components/navigation/NavigationItem.js.map +1 -0
- package/dist/lib/components/navigation/NavigationWrapper.d.ts +7 -0
- package/dist/lib/components/navigation/NavigationWrapper.js +21 -0
- package/dist/lib/components/navigation/NavigationWrapper.js.map +1 -0
- 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/Toc.js +2 -2
- package/dist/lib/components/navigation/Toc.js.map +1 -1
- 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 +12 -6
- package/dist/lib/components/navigation/utils.js +46 -18
- package/dist/lib/components/navigation/utils.js.map +1 -1
- package/dist/lib/core/RouteGuard.d.ts +1 -0
- package/dist/lib/core/RouteGuard.js +9 -3
- package/dist/lib/core/RouteGuard.js.map +1 -1
- package/dist/lib/core/ZudokuContext.d.ts +36 -20
- package/dist/lib/core/ZudokuContext.js +26 -14
- package/dist/lib/core/ZudokuContext.js.map +1 -1
- package/dist/lib/core/plugins.d.ts +7 -4
- package/dist/lib/core/plugins.js +1 -0
- package/dist/lib/core/plugins.js.map +1 -1
- package/dist/lib/errors/ErrorAlert.js +2 -3
- package/dist/lib/errors/ErrorAlert.js.map +1 -1
- package/dist/lib/hooks/index.d.ts +25 -0
- package/dist/lib/hooks/index.js +11 -0
- package/dist/lib/hooks/index.js.map +1 -1
- package/dist/lib/hooks/useEvent.test.js +5 -3
- package/dist/lib/hooks/useEvent.test.js.map +1 -1
- package/dist/lib/hooks/useHotkey.d.ts +4 -0
- package/dist/lib/hooks/useHotkey.js +58 -0
- package/dist/lib/hooks/useHotkey.js.map +1 -0
- package/dist/lib/oas/graphql/circular.js +23 -18
- package/dist/lib/oas/graphql/circular.js.map +1 -1
- package/dist/lib/oas/parser/index.d.ts +3 -0
- package/dist/lib/oas/parser/index.js +7 -1
- package/dist/lib/oas/parser/index.js.map +1 -1
- package/dist/lib/oas/parser/upgrade/index.d.ts +1 -0
- package/dist/lib/oas/parser/upgrade/index.js +77 -25
- package/dist/lib/oas/parser/upgrade/index.js.map +1 -1
- package/dist/lib/plugins/api-catalog/Catalog.d.ts +1 -1
- package/dist/lib/plugins/api-catalog/Catalog.js +1 -1
- package/dist/lib/plugins/api-catalog/Catalog.js.map +1 -1
- package/dist/lib/plugins/api-catalog/index.d.ts +6 -6
- package/dist/lib/plugins/api-catalog/index.js +25 -23
- package/dist/lib/plugins/api-catalog/index.js.map +1 -1
- package/dist/lib/plugins/api-keys/CreateApiKey.d.ts +3 -2
- package/dist/lib/plugins/api-keys/CreateApiKey.js +8 -4
- package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -1
- package/dist/lib/plugins/api-keys/SettingsApiKeys.d.ts +1 -1
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js +150 -27
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
- package/dist/lib/plugins/api-keys/index.d.ts +20 -11
- package/dist/lib/plugins/api-keys/index.js +66 -32
- package/dist/lib/plugins/api-keys/index.js.map +1 -1
- package/dist/lib/plugins/custom-pages/index.d.ts +4 -6
- package/dist/lib/plugins/custom-pages/index.js +15 -10
- package/dist/lib/plugins/custom-pages/index.js.map +1 -1
- package/dist/lib/plugins/markdown/MdxPage.d.ts +1 -2
- package/dist/lib/plugins/markdown/MdxPage.js +30 -10
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/lib/plugins/markdown/index.d.ts +11 -3
- package/dist/lib/plugins/markdown/index.js +9 -26
- package/dist/lib/plugins/markdown/index.js.map +1 -1
- package/dist/lib/plugins/openapi/CollapsibleCode.js +1 -1
- package/dist/lib/plugins/openapi/CollapsibleCode.js.map +1 -1
- package/dist/lib/plugins/openapi/ColorizedParam.js +1 -1
- package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationList.d.ts +1 -1
- package/dist/lib/plugins/openapi/OperationList.js +9 -7
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.js +5 -4
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/ParamInfos.js +4 -1
- package/dist/lib/plugins/openapi/ParamInfos.js.map +1 -1
- package/dist/lib/plugins/openapi/ParameterListItem.js +9 -1
- package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.d.ts +1 -1
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +5 -1
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -1
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.d.ts +2 -4
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.js +1 -4
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/SchemaList.js +7 -7
- package/dist/lib/plugins/openapi/SchemaList.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js +11 -61
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/SidecarExamples.js +9 -1
- package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -1
- package/dist/lib/plugins/openapi/client/useCreateQuery.d.ts +5 -0
- package/dist/lib/plugins/openapi/client/useCreateQuery.js +10 -4
- 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.js +1 -1
- package/dist/lib/plugins/openapi/components/EnumValues.js.map +1 -1
- 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/graphql/gql.d.ts +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.js +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/graphql.d.ts +3 -3
- package/dist/lib/plugins/openapi/graphql/graphql.js +2 -2
- package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
- package/dist/lib/plugins/openapi/index.d.ts +3 -4
- package/dist/lib/plugins/openapi/index.js +14 -12
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/openapi/interfaces.d.ts +7 -6
- package/dist/lib/plugins/openapi/playground/BodyPanel.d.ts +5 -0
- package/dist/lib/plugins/openapi/playground/BodyPanel.js +26 -0
- package/dist/lib/plugins/openapi/playground/BodyPanel.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/CollapsibleHeader.d.ts +8 -0
- package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js +11 -0
- package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js +2 -1
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Headers.d.ts +5 -4
- package/dist/lib/plugins/openapi/playground/Headers.js +54 -32
- package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/IdentityDialog.js +2 -1
- package/dist/lib/plugins/openapi/playground/IdentityDialog.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/IdentitySelector.js +1 -4
- package/dist/lib/plugins/openapi/playground/IdentitySelector.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/InlineInput.js +1 -1
- package/dist/lib/plugins/openapi/playground/InlineInput.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/ParamsGrid.js +2 -2
- package/dist/lib/plugins/openapi/playground/ParamsGrid.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PathParams.js +1 -2
- package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.d.ts +3 -8
- package/dist/lib/plugins/openapi/playground/Playground.js +112 -92
- 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 +3 -3
- package/dist/lib/plugins/openapi/playground/QueryParams.js +38 -23
- package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Spinner.d.ts +2 -0
- package/dist/lib/plugins/openapi/playground/Spinner.js +63 -0
- package/dist/lib/plugins/openapi/playground/Spinner.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/request-panel/UrlPath.d.ts +3 -0
- package/dist/lib/plugins/openapi/playground/request-panel/UrlPath.js +13 -0
- package/dist/lib/plugins/openapi/playground/request-panel/UrlPath.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.d.ts +1 -0
- package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.js +12 -0
- package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/Highlight.d.ts +12 -0
- package/dist/lib/plugins/openapi/playground/result-panel/Highlight.js +11 -0
- package/dist/lib/plugins/openapi/playground/result-panel/Highlight.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.d.ts +8 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.js +69 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.d.ts +10 -4
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +33 -31
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.d.ts +4 -2
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js +8 -10
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js.map +1 -1
- 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/{post-processors → processors}/removeExtensions.js +1 -1
- package/dist/lib/plugins/openapi/processors/removeExtensions.js.map +1 -0
- package/dist/lib/plugins/openapi/{post-processors → processors}/removeExtensions.test.js +26 -6
- package/dist/lib/plugins/openapi/processors/removeExtensions.test.js.map +1 -0
- package/dist/lib/plugins/openapi/{post-processors → processors}/removeParameters.d.ts +3 -1
- package/dist/lib/plugins/openapi/{post-processors → processors}/removeParameters.js +1 -1
- 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/{post-processors → processors}/removeParameters.test.js +53 -25
- package/dist/lib/plugins/openapi/processors/removeParameters.test.js.map +1 -0
- package/dist/lib/plugins/openapi/{post-processors → processors}/removePaths.d.ts +3 -1
- package/dist/lib/plugins/openapi/{post-processors → processors}/removePaths.js +1 -1
- 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.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/SchemaPropertyItem.d.ts +2 -4
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js +20 -15
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaView.d.ts +2 -2
- package/dist/lib/plugins/openapi/schema/SchemaView.js +37 -56
- package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/utils.d.ts +7 -1
- package/dist/lib/plugins/openapi/schema/utils.js +15 -5
- package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
- 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/createNavigationCategory.d.ts +9 -0
- package/dist/lib/plugins/openapi/util/{createSidebarCategory.js → createNavigationCategory.js} +5 -4
- package/dist/lib/plugins/openapi/util/createNavigationCategory.js.map +1 -0
- package/dist/lib/plugins/openapi/util/generateSchemaExample.d.ts +1 -1
- package/dist/lib/plugins/openapi/util/generateSchemaExample.js +44 -0
- package/dist/lib/plugins/openapi/util/generateSchemaExample.js.map +1 -1
- package/dist/lib/plugins/openapi/util/getRoutes.js +52 -15
- package/dist/lib/plugins/openapi/util/getRoutes.js.map +1 -1
- package/dist/lib/plugins/openapi/util/methodColorMap.d.ts +1 -1
- package/dist/lib/plugins/redirect/index.d.ts +1 -1
- package/dist/lib/plugins/search-inkeep/index.d.ts +5 -22
- package/dist/lib/plugins/search-inkeep/index.js +35 -29
- package/dist/lib/plugins/search-inkeep/index.js.map +1 -1
- package/dist/lib/plugins/search-inkeep/inkeep.d.ts +5 -21
- package/dist/lib/plugins/search-inkeep/inkeep.js +10 -19
- package/dist/lib/plugins/search-inkeep/inkeep.js.map +1 -1
- package/dist/lib/plugins/search-pagefind/PagefindSearch.js +9 -4
- package/dist/lib/plugins/search-pagefind/PagefindSearch.js.map +1 -1
- package/dist/lib/plugins/search-pagefind/ResultList.js +12 -11
- package/dist/lib/plugins/search-pagefind/ResultList.js.map +1 -1
- package/dist/lib/plugins/search-pagefind/index.d.ts +1 -3
- 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/Alert.d.ts +6 -5
- package/dist/lib/ui/Alert.js +12 -10
- package/dist/lib/ui/Alert.js.map +1 -1
- package/dist/lib/ui/Badge.d.ts +2 -2
- package/dist/lib/ui/Badge.js +1 -1
- package/dist/lib/ui/Badge.js.map +1 -1
- package/dist/lib/ui/Button.d.ts +2 -2
- package/dist/lib/ui/Button.js +8 -6
- package/dist/lib/ui/Button.js.map +1 -1
- package/dist/lib/ui/Callout.js +1 -1
- package/dist/lib/ui/Callout.js.map +1 -1
- package/dist/lib/ui/Card.js +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 +15 -0
- package/dist/lib/ui/CodeBlock.js +17 -0
- package/dist/lib/ui/CodeBlock.js.map +1 -0
- package/dist/lib/ui/Command.d.ts +2 -2
- package/dist/lib/ui/Command.js +3 -3
- 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/EmbeddedCodeBlock.d.ts +15 -0
- package/dist/lib/ui/EmbeddedCodeBlock.js +18 -0
- package/dist/lib/ui/EmbeddedCodeBlock.js.map +1 -0
- 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.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 +2 -2
- 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/Switch.js +1 -1
- package/dist/lib/ui/Switch.js.map +1 -1
- package/dist/lib/ui/SyntaxHighlight.d.ts +12 -15
- package/dist/lib/ui/SyntaxHighlight.js +13 -60
- package/dist/lib/ui/SyntaxHighlight.js.map +1 -1
- 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/util/MdxComponents.d.ts +18 -3
- package/dist/lib/util/MdxComponents.js +15 -12
- package/dist/lib/util/MdxComponents.js.map +1 -1
- 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/os.d.ts +2 -0
- package/dist/lib/util/os.js +21 -0
- package/dist/lib/util/os.js.map +1 -0
- package/dist/lib/util/traverse.d.ts +1 -1
- package/dist/lib/util/traverse.js +6 -5
- package/dist/lib/util/traverse.js.map +1 -1
- 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/useCopyToClipboard.d.ts +1 -0
- package/dist/lib/util/useCopyToClipboard.js +11 -0
- package/dist/lib/util/useCopyToClipboard.js.map +1 -0
- package/dist/lib/util/useExposedProps.d.ts +8 -1
- package/dist/lib/util/useExposedProps.js.map +1 -1
- package/dist/lib/util/useScrollToAnchor.js +3 -3
- package/dist/lib/util/useScrollToAnchor.js.map +1 -1
- package/dist/vite/api/SchemaManager.d.ts +36 -0
- package/dist/vite/api/SchemaManager.js +141 -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.js +52 -17
- package/dist/vite/api/schema-codegen.js.map +1 -1
- package/dist/vite/api/schema-codegen.test.js +82 -0
- package/dist/vite/api/schema-codegen.test.js.map +1 -1
- package/dist/vite/build.js +22 -15
- package/dist/vite/build.js.map +1 -1
- package/dist/vite/config.d.ts +2 -9
- package/dist/vite/config.js +55 -96
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/config.test.js +1 -1
- package/dist/vite/config.test.js.map +1 -1
- package/dist/vite/css/plugin.d.ts +1 -2
- package/dist/vite/css/plugin.js +14 -2
- package/dist/vite/css/plugin.js.map +1 -1
- package/dist/vite/dev-server.d.ts +0 -1
- package/dist/vite/dev-server.js +14 -13
- package/dist/vite/dev-server.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/mdx/remark-last-modified.d.ts +3 -0
- package/dist/vite/mdx/remark-last-modified.js +29 -0
- package/dist/vite/mdx/remark-last-modified.js.map +1 -0
- package/dist/vite/mdx/utils.d.ts +2 -0
- package/dist/vite/mdx/utils.js +31 -0
- package/dist/vite/mdx/utils.js.map +1 -0
- package/dist/vite/plugin-api-keys.d.ts +1 -2
- package/dist/vite/plugin-api-keys.js +9 -3
- 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 +58 -111
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/plugin-auth.d.ts +1 -2
- package/dist/vite/plugin-auth.js +3 -2
- package/dist/vite/plugin-auth.js.map +1 -1
- package/dist/vite/plugin-component.d.ts +1 -2
- package/dist/vite/plugin-component.js +3 -2
- package/dist/vite/plugin-component.js.map +1 -1
- package/dist/vite/plugin-config-reload.d.ts +1 -2
- package/dist/vite/plugin-config-reload.js +25 -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 +4 -3
- package/dist/vite/plugin-config.js.map +1 -1
- package/dist/vite/plugin-custom-pages.d.ts +1 -2
- package/dist/vite/plugin-custom-pages.js +5 -4
- package/dist/vite/plugin-custom-pages.js.map +1 -1
- package/dist/vite/plugin-docs.d.ts +1 -2
- package/dist/vite/plugin-docs.js +64 -61
- package/dist/vite/plugin-docs.js.map +1 -1
- package/dist/vite/plugin-frontmatter.d.ts +1 -2
- package/dist/vite/plugin-frontmatter.js +9 -4
- package/dist/vite/plugin-frontmatter.js.map +1 -1
- package/dist/vite/plugin-mdx.d.ts +1 -2
- package/dist/vite/plugin-mdx.js +24 -51
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/dist/vite/plugin-navigation.d.ts +4 -0
- package/dist/vite/{plugin-sidebar.js → plugin-navigation.js} +26 -18
- package/dist/vite/plugin-navigation.js.map +1 -0
- package/dist/vite/plugin-redirect.d.ts +1 -2
- package/dist/vite/plugin-redirect.js +3 -2
- package/dist/vite/plugin-redirect.js.map +1 -1
- package/dist/vite/plugin-search.d.ts +1 -2
- package/dist/vite/plugin-search.js +4 -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-theme.d.ts +8 -0
- package/dist/vite/plugin-theme.js +234 -0
- package/dist/vite/plugin-theme.js.map +1 -0
- package/dist/vite/plugin-theme.test.d.ts +1 -0
- package/dist/vite/plugin-theme.test.js +312 -0
- package/dist/vite/plugin-theme.test.js.map +1 -0
- package/dist/vite/plugin.d.ts +1 -2
- package/dist/vite/plugin.js +23 -22
- package/dist/vite/plugin.js.map +1 -1
- package/dist/vite/prerender/FileWritingResponse.d.ts +9 -5
- package/dist/vite/prerender/FileWritingResponse.js +5 -5
- package/dist/vite/prerender/FileWritingResponse.js.map +1 -1
- 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 +1 -0
- package/dist/vite/prerender/prerender.js +24 -5
- package/dist/vite/prerender/prerender.js.map +1 -1
- package/dist/vite/prerender/worker.js +36 -8
- package/dist/vite/prerender/worker.js.map +1 -1
- package/dist/vite/shadcn-registry.d.ts +45 -0
- package/dist/vite/shadcn-registry.js +29 -0
- package/dist/vite/shadcn-registry.js.map +1 -0
- package/dist/vite/sitemap.d.ts +1 -1
- package/dist/zuplo/enrich-with-zuplo.d.ts +3 -3
- package/dist/zuplo/enrich-with-zuplo.js +18 -17
- package/dist/zuplo/enrich-with-zuplo.js.map +1 -1
- package/dist/zuplo/with-zuplo-processors.d.ts +2 -2
- package/dist/zuplo/with-zuplo-processors.js +7 -7
- package/dist/zuplo/with-zuplo-processors.js.map +1 -1
- package/dist/zuplo/with-zuplo.d.ts +5 -2
- package/dist/zuplo/with-zuplo.js +6 -5
- package/dist/zuplo/with-zuplo.js.map +1 -1
- package/lib/Alert-Cig_8hW6.js +161 -0
- package/lib/Alert-Cig_8hW6.js.map +1 -0
- package/lib/Button-B3o-2Xdf.js +51 -0
- package/lib/Button-B3o-2Xdf.js.map +1 -0
- package/lib/Card-CMDQUPM4.js +61 -0
- package/lib/Card-CMDQUPM4.js.map +1 -0
- package/lib/CodeBlock-BaBgX9Wy.js +85 -0
- package/lib/CodeBlock-BaBgX9Wy.js.map +1 -0
- package/lib/Command-C9AC5cf-.js +140 -0
- package/lib/Command-C9AC5cf-.js.map +1 -0
- package/lib/{Dialog-Dv6WG8RN.js → Dialog-DMWw1doX.js} +27 -26
- package/lib/Dialog-DMWw1doX.js.map +1 -0
- package/lib/{Drawer-kDAfOq_2.js → Drawer-DXGPOKPx.js} +26 -26
- package/lib/Drawer-DXGPOKPx.js.map +1 -0
- package/lib/MdxPage-D8Med7IR.js +110 -0
- package/lib/MdxPage-D8Med7IR.js.map +1 -0
- package/lib/OasProvider-YexVRErA.js +35 -0
- package/lib/OasProvider-YexVRErA.js.map +1 -0
- package/lib/{OperationList-CHuBrSD5.js → OperationList-CL_tp7DC.js} +2224 -2118
- package/lib/OperationList-CL_tp7DC.js.map +1 -0
- package/lib/Pagination-Bcjbdo_g.js +37 -0
- package/lib/Pagination-Bcjbdo_g.js.map +1 -0
- package/lib/RouteGuard-Vnlz_t51.js +737 -0
- package/lib/RouteGuard-Vnlz_t51.js.map +1 -0
- package/lib/SchemaList-BNDTWO1B.js +149 -0
- package/lib/SchemaList-BNDTWO1B.js.map +1 -0
- package/lib/SchemaView-DdKqED8D.js +366 -0
- package/lib/SchemaView-DdKqED8D.js.map +1 -0
- package/lib/SignUp-BkAQMKsK.js +56 -0
- package/lib/SignUp-BkAQMKsK.js.map +1 -0
- package/lib/{Markdown-D-vLL3rw.js → Slot-CrCBhP3G.js} +14304 -15521
- package/lib/Slot-CrCBhP3G.js.map +1 -0
- package/lib/{Spinner-CE68iCm0.js → Spinner-mNLZ6awP.js} +2 -2
- package/lib/{Spinner-CE68iCm0.js.map → Spinner-mNLZ6awP.js.map} +1 -1
- package/lib/SyntaxHighlight-CVe58ZSY.js +10306 -0
- package/lib/SyntaxHighlight-CVe58ZSY.js.map +1 -0
- package/lib/{Toc-COKWpWOX.js → Toc-CpsFSXeD.js} +20 -20
- package/lib/Toc-CpsFSXeD.js.map +1 -0
- package/lib/chunk-DQRVZFIR-DHK7_Ilc.js +1839 -0
- package/lib/chunk-DQRVZFIR-DHK7_Ilc.js.map +1 -0
- package/lib/{circular-ByJI6Mci.js → circular-BJUzZQ5q.js} +4799 -5742
- package/lib/circular-BJUzZQ5q.js.map +1 -0
- package/lib/clerk-BDZ31hjU.js +25190 -0
- package/lib/clerk-BDZ31hjU.js.map +1 -0
- package/lib/clsx-OuTLNxxd.js +17 -0
- package/lib/clsx-OuTLNxxd.js.map +1 -0
- package/lib/{cn-qaFjX9_3.js → cn-dYga0KKN.js} +1015 -563
- package/lib/cn-dYga0KKN.js.map +1 -0
- package/lib/{createServer-mMau3eV_.js → createServer-C8-YhyiB.js} +6282 -6205
- package/lib/createServer-C8-YhyiB.js.map +1 -0
- package/lib/errors-CKo4K1aM.js +78 -0
- package/lib/errors-CKo4K1aM.js.map +1 -0
- package/lib/hook-CZjW2buS.js +1510 -0
- package/lib/hook-CZjW2buS.js.map +1 -0
- package/lib/{index-LNp6rxyU.js → index-4XtG1tlD.js} +3 -3
- package/lib/{index-LNp6rxyU.js.map → index-4XtG1tlD.js.map} +1 -1
- package/lib/index-B3xhxwZH.js +3469 -0
- package/lib/index-B3xhxwZH.js.map +1 -0
- package/lib/index-B4yKFxne.js +3980 -0
- package/lib/index-B4yKFxne.js.map +1 -0
- package/lib/index-Bm35Tkgf.js +107 -0
- package/lib/index-Bm35Tkgf.js.map +1 -0
- package/lib/index-CrcNWbel.js +316 -0
- package/lib/index-CrcNWbel.js.map +1 -0
- package/lib/{index-CPNSgwSb.js → index-DI5SPFK9.js} +5 -5
- package/lib/{index-CPNSgwSb.js.map → index-DI5SPFK9.js.map} +1 -1
- package/lib/{index-Dl3Yl0yb.js → index-DmNq2fbN.js} +785 -795
- package/lib/index-DmNq2fbN.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/jsx-runtime-C5mzlN2N.js +285 -0
- package/lib/jsx-runtime-C5mzlN2N.js.map +1 -0
- package/lib/{post-processors → processors}/removeExtensions.js +1 -1
- 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/ui/Accordion.js +2 -2
- package/lib/ui/ActionButton.js +4 -4
- package/lib/ui/Alert.js +55 -39
- package/lib/ui/Alert.js.map +1 -1
- package/lib/ui/AlertDialog.js +2 -2
- package/lib/ui/Badge.js +4 -4
- package/lib/ui/Badge.js.map +1 -1
- package/lib/ui/Breadcrumb.js +2 -2
- package/lib/ui/Button.js +20 -18
- package/lib/ui/Button.js.map +1 -1
- package/lib/ui/Callout.js +14 -12
- package/lib/ui/Callout.js.map +1 -1
- package/lib/ui/Card.js +9 -9
- package/lib/ui/Card.js.map +1 -1
- package/lib/ui/Carousel.js +348 -348
- package/lib/ui/Carousel.js.map +1 -1
- package/lib/ui/Checkbox.js +8 -8
- package/lib/ui/Checkbox.js.map +1 -1
- package/lib/ui/CodeBlock.js +9 -0
- package/lib/ui/CodeBlock.js.map +1 -0
- package/lib/ui/Command.js +58 -58
- package/lib/ui/Command.js.map +1 -1
- package/lib/ui/Dialog.js +41 -41
- package/lib/ui/Dialog.js.map +1 -1
- package/lib/ui/Drawer.js +3 -3
- package/lib/ui/DropdownMenu.js +35 -35
- package/lib/ui/DropdownMenu.js.map +1 -1
- package/lib/ui/EmbeddedCodeBlock.js +80 -0
- package/lib/ui/EmbeddedCodeBlock.js.map +1 -0
- package/lib/ui/Form.js +3 -3
- 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 +2 -2
- 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/RadioGroup.js +11 -11
- package/lib/ui/RadioGroup.js.map +1 -1
- package/lib/ui/ScrollArea.js +2 -2
- package/lib/ui/Select.js +32 -32
- package/lib/ui/Select.js.map +1 -1
- package/lib/ui/Skeleton.js +2 -2
- package/lib/ui/Slider.js +6 -6
- package/lib/ui/Slider.js.map +1 -1
- package/lib/ui/Stepper.js +1 -1
- package/lib/ui/Switch.js +6 -6
- package/lib/ui/Switch.js.map +1 -1
- package/lib/ui/SyntaxHighlight.js +6 -6
- 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/Tooltip.js +15 -8
- package/lib/ui/Tooltip.js.map +1 -1
- package/lib/ui/util.js +1 -1
- package/lib/{useExposedProps-B9qXJedG.js → useExposedProps-BIYjecPD.js} +2 -2
- package/lib/useExposedProps-BIYjecPD.js.map +1 -0
- package/lib/zudoku.auth-auth0.js +29 -32
- package/lib/zudoku.auth-auth0.js.map +1 -1
- package/lib/zudoku.auth-azureb2c.js +9971 -0
- package/lib/zudoku.auth-azureb2c.js.map +1 -0
- package/lib/zudoku.auth-clerk.js +98 -96
- package/lib/zudoku.auth-clerk.js.map +1 -1
- package/lib/zudoku.auth-openid.js +556 -552
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.components.js +27 -25
- package/lib/zudoku.hooks.js +21 -13
- package/lib/zudoku.hooks.js.map +1 -1
- package/lib/zudoku.icons.js +1 -1
- package/lib/zudoku.plugin-api-catalog.js +99 -101
- package/lib/zudoku.plugin-api-catalog.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +556 -207
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-custom-pages.js +12 -18
- package/lib/zudoku.plugin-custom-pages.js.map +1 -1
- package/lib/zudoku.plugin-markdown.js +20 -73
- package/lib/zudoku.plugin-markdown.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +7 -6
- package/lib/zudoku.plugin-redirect.js +1 -1
- package/lib/zudoku.plugin-redirect.js.map +1 -1
- package/lib/zudoku.plugin-search-inkeep.js +55 -59
- package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
- package/lib/zudoku.plugin-search-pagefind.js +207 -121
- package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
- package/lib/zudoku.plugins.js +7 -6
- package/lib/zudoku.plugins.js.map +1 -1
- package/package.json +128 -97
- package/src/app/ZuploBuildConfig.ts +33 -0
- package/src/app/defaultTheme.css +73 -0
- package/src/app/demo.html +1 -1
- package/src/app/demo.tsx +24 -6
- package/src/app/entry.client.tsx +43 -2
- package/src/app/entry.server.tsx +6 -5
- package/src/app/env.ts +43 -0
- package/src/app/font.geist.css +73 -0
- package/src/app/main.css +118 -147
- package/src/app/main.tsx +44 -51
- package/src/app/standalone.tsx +7 -6
- package/src/lib/auth/issuer.test.ts +120 -0
- package/src/lib/auth/issuer.ts +41 -0
- package/src/lib/authentication/AuthenticationPlugin.tsx +4 -4
- package/src/lib/authentication/authentication.ts +4 -7
- package/src/lib/authentication/components/CallbackHandler.tsx +12 -2
- package/src/lib/authentication/components/SignIn.tsx +27 -1
- package/src/lib/authentication/components/SignUp.tsx +35 -1
- package/src/lib/authentication/providers/auth0.tsx +10 -4
- package/src/lib/authentication/providers/azureb2c.tsx +196 -0
- package/src/lib/authentication/providers/clerk.tsx +88 -69
- package/src/lib/authentication/providers/openid.tsx +111 -53
- package/src/lib/authentication/providers/supabase.tsx +9 -16
- package/src/lib/authentication/state.ts +37 -7
- package/src/lib/components/Autocomplete.tsx +3 -2
- package/src/lib/components/Banner.tsx +3 -4
- package/src/lib/components/Bootstrap.tsx +13 -6
- package/src/lib/components/BuildCheck.tsx +75 -0
- package/src/lib/components/CategoryHeading.tsx +4 -1
- package/src/lib/components/ErrorPage.tsx +3 -3
- package/src/lib/components/Footer.tsx +136 -0
- package/src/lib/components/Framed.tsx +51 -0
- package/src/lib/components/Header.tsx +43 -40
- package/src/lib/components/Heading.tsx +18 -10
- package/src/lib/components/InlineCode.tsx +1 -1
- package/src/lib/components/Layout.tsx +13 -7
- package/src/lib/components/Main.tsx +17 -15
- package/src/lib/components/Markdown.tsx +40 -27
- package/src/lib/components/MobileTopNavigation.tsx +86 -22
- package/src/lib/components/NotFoundPage.tsx +3 -3
- package/src/lib/components/PageProgress.tsx +28 -0
- package/src/lib/components/Pagination.tsx +10 -12
- package/src/lib/components/Search.tsx +15 -4
- package/src/lib/components/Slot.test.tsx +465 -0
- package/src/lib/components/Slot.tsx +64 -0
- package/src/lib/components/StatusPage.tsx +5 -0
- package/src/lib/components/TopNavigation.tsx +79 -84
- package/src/lib/components/Typography.tsx +14 -0
- package/src/lib/components/Zudoku.tsx +12 -12
- package/src/lib/components/context/BypassProtectedRoutesContext.ts +3 -0
- package/src/lib/components/context/SlotProvider.tsx +149 -0
- package/src/lib/components/context/ViewportAnchorContext.tsx +8 -15
- package/src/lib/components/context/ZudokuContext.ts +51 -34
- package/src/lib/components/context/ZudokuProvider.tsx +3 -2
- package/src/lib/components/index.ts +17 -9
- package/src/lib/components/navigation/Navigation.tsx +50 -0
- package/src/lib/components/navigation/{SidebarBadge.tsx → NavigationBadge.tsx} +2 -2
- package/src/lib/components/navigation/{SidebarCategory.tsx → NavigationCategory.tsx} +25 -19
- package/src/lib/components/navigation/NavigationItem.tsx +151 -0
- package/src/lib/components/navigation/NavigationWrapper.tsx +49 -0
- package/src/lib/components/navigation/PoweredByZudoku.tsx +33 -0
- package/src/lib/components/navigation/Toc.tsx +5 -5
- 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 +63 -28
- package/src/lib/core/RouteGuard.tsx +26 -4
- package/src/lib/core/ZudokuContext.ts +67 -27
- package/src/lib/core/plugins.ts +12 -4
- package/src/lib/errors/ErrorAlert.tsx +4 -10
- package/src/lib/hooks/index.ts +11 -0
- package/src/lib/hooks/useEvent.test.tsx +7 -5
- package/src/lib/hooks/useHotkey.ts +70 -0
- package/src/lib/oas/graphql/circular.ts +27 -19
- package/src/lib/oas/parser/index.ts +7 -1
- package/src/lib/oas/parser/upgrade/index.ts +98 -28
- package/src/lib/plugins/api-catalog/Catalog.tsx +2 -5
- package/src/lib/plugins/api-catalog/index.tsx +54 -49
- package/src/lib/plugins/api-keys/CreateApiKey.tsx +54 -42
- package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +463 -115
- package/src/lib/plugins/api-keys/index.tsx +131 -58
- package/src/lib/plugins/custom-pages/index.tsx +21 -16
- package/src/lib/plugins/markdown/MdxPage.tsx +77 -21
- package/src/lib/plugins/markdown/index.tsx +29 -42
- package/src/lib/plugins/openapi/CollapsibleCode.tsx +8 -5
- package/src/lib/plugins/openapi/ColorizedParam.tsx +3 -3
- package/src/lib/plugins/openapi/OperationList.tsx +41 -38
- package/src/lib/plugins/openapi/OperationListItem.tsx +33 -47
- package/src/lib/plugins/openapi/ParamInfos.tsx +4 -1
- package/src/lib/plugins/openapi/ParameterListItem.tsx +38 -0
- package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +8 -2
- package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +5 -16
- package/src/lib/plugins/openapi/SchemaList.tsx +26 -20
- package/src/lib/plugins/openapi/Sidecar.tsx +14 -66
- package/src/lib/plugins/openapi/SidecarExamples.tsx +9 -2
- package/src/lib/plugins/openapi/client/useCreateQuery.ts +23 -4
- package/src/lib/plugins/openapi/components/ConstValue.tsx +24 -0
- package/src/lib/plugins/openapi/components/EnumValues.tsx +1 -1
- package/src/lib/plugins/openapi/components/ResponseContent.tsx +104 -0
- package/src/lib/plugins/openapi/graphql/gql.ts +5 -5
- package/src/lib/plugins/openapi/graphql/graphql.ts +6 -6
- package/src/lib/plugins/openapi/index.tsx +16 -15
- package/src/lib/plugins/openapi/interfaces.ts +7 -6
- package/src/lib/plugins/openapi/playground/BodyPanel.tsx +55 -0
- package/src/lib/plugins/openapi/playground/CollapsibleHeader.tsx +47 -0
- package/src/lib/plugins/openapi/playground/ExamplesDropdown.tsx +8 -1
- package/src/lib/plugins/openapi/playground/Headers.tsx +217 -115
- package/src/lib/plugins/openapi/playground/IdentityDialog.tsx +3 -2
- package/src/lib/plugins/openapi/playground/IdentitySelector.tsx +19 -35
- package/src/lib/plugins/openapi/playground/InlineInput.tsx +1 -1
- package/src/lib/plugins/openapi/playground/ParamsGrid.tsx +2 -2
- package/src/lib/plugins/openapi/playground/PathParams.tsx +4 -5
- package/src/lib/plugins/openapi/playground/Playground.tsx +260 -289
- package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +3 -2
- package/src/lib/plugins/openapi/playground/QueryParams.tsx +105 -59
- package/src/lib/plugins/openapi/playground/Spinner.tsx +87 -0
- package/src/lib/plugins/openapi/playground/fileUtils.ts +32 -0
- package/src/lib/plugins/openapi/playground/request-panel/UrlPath.tsx +31 -0
- package/src/lib/plugins/openapi/playground/request-panel/UrlQueryParams.tsx +25 -0
- package/src/lib/plugins/openapi/playground/result-panel/Highlight.tsx +26 -0
- package/src/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.tsx +115 -0
- package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +149 -108
- package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +68 -89
- package/src/lib/plugins/openapi/playground/useRememberSkipLoginDialog.tsx +20 -0
- package/src/lib/plugins/openapi/{post-processors → processors}/removeExtensions.test.ts +29 -9
- package/src/lib/plugins/openapi/{post-processors → processors}/removeExtensions.ts +5 -3
- package/src/lib/plugins/openapi/{post-processors → processors}/removeParameters.test.ts +67 -33
- package/src/lib/plugins/openapi/{post-processors → processors}/removeParameters.ts +5 -3
- package/src/lib/plugins/openapi/processors/removePaths.test.ts +167 -0
- package/src/lib/plugins/openapi/{post-processors → processors}/removePaths.ts +5 -3
- 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 +47 -37
- package/src/lib/plugins/openapi/schema/SchemaView.tsx +90 -147
- package/src/lib/plugins/openapi/schema/utils.ts +30 -6
- package/src/lib/plugins/openapi/util/createHttpSnippet.ts +107 -0
- package/src/lib/plugins/openapi/util/{createSidebarCategory.tsx → createNavigationCategory.tsx} +6 -5
- package/src/lib/plugins/openapi/util/generateSchemaExample.ts +51 -1
- package/src/lib/plugins/openapi/util/getRoutes.tsx +87 -15
- package/src/lib/plugins/openapi/util/methodColorMap.tsx +1 -1
- package/src/lib/plugins/redirect/index.tsx +1 -1
- package/src/lib/plugins/search-inkeep/index.tsx +54 -58
- package/src/lib/plugins/search-inkeep/inkeep.ts +19 -21
- package/src/lib/plugins/search-pagefind/PagefindSearch.tsx +12 -4
- package/src/lib/plugins/search-pagefind/ResultList.tsx +13 -15
- package/src/lib/plugins/search-pagefind/index.tsx +1 -1
- package/src/lib/shiki.ts +132 -0
- package/src/lib/ui/Alert.tsx +45 -39
- package/src/lib/ui/Badge.tsx +2 -2
- package/src/lib/ui/Button.tsx +9 -6
- package/src/lib/ui/Callout.tsx +3 -1
- package/src/lib/ui/Card.tsx +1 -1
- package/src/lib/ui/Checkbox.tsx +1 -1
- package/src/lib/ui/CodeBlock.tsx +88 -0
- package/src/lib/ui/Command.tsx +5 -5
- package/src/lib/ui/Dialog.tsx +11 -7
- package/src/lib/ui/DropdownMenu.tsx +4 -4
- package/src/lib/ui/EmbeddedCodeBlock.tsx +94 -0
- package/src/lib/ui/HoverCard.tsx +1 -1
- package/src/lib/ui/Input.tsx +1 -1
- package/src/lib/ui/Popover.tsx +1 -1
- package/src/lib/ui/RadioGroup.tsx +1 -1
- package/src/lib/ui/Select.tsx +3 -3
- package/src/lib/ui/Slider.tsx +1 -1
- package/src/lib/ui/Switch.tsx +1 -1
- package/src/lib/ui/SyntaxHighlight.tsx +28 -179
- 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/util/MdxComponents.tsx +42 -16
- 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/os.ts +18 -0
- package/src/lib/util/traverse.ts +8 -5
- package/src/lib/util/url.test.ts +51 -0
- package/src/lib/util/url.ts +18 -0
- package/src/lib/util/useCopyToClipboard.ts +17 -0
- package/src/lib/util/useExposedProps.tsx +12 -1
- package/src/lib/util/useScrollToAnchor.ts +3 -3
- 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 -8
- package/dist/app/tailwind.d.ts +0 -4
- package/dist/app/tailwind.js +0 -97
- package/dist/app/tailwind.js.map +0 -1
- package/dist/cli/dev/pagefind-command.d.ts +0 -3
- package/dist/cli/dev/pagefind-command.js +0 -59
- package/dist/cli/dev/pagefind-command.js.map +0 -1
- package/dist/config/common.d.ts +0 -10
- package/dist/config/common.js +0 -2
- package/dist/config/common.js.map +0 -1
- package/dist/config/validators/InputSidebarSchema.d.ts +0 -217
- package/dist/config/validators/InputSidebarSchema.js +0 -62
- package/dist/config/validators/InputSidebarSchema.js.map +0 -1
- package/dist/config/validators/SidebarSchema.d.ts +0 -46
- package/dist/config/validators/SidebarSchema.js +0 -118
- package/dist/config/validators/SidebarSchema.js.map +0 -1
- package/dist/config/validators/common.d.ts +0 -6849
- package/dist/config/validators/common.js +0 -364
- package/dist/config/validators/common.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/context/PluginSystem.js +0 -2
- package/dist/lib/components/context/PluginSystem.js.map +0 -1
- package/dist/lib/components/navigation/Sidebar.d.ts +0 -5
- package/dist/lib/components/navigation/Sidebar.js +0 -17
- package/dist/lib/components/navigation/Sidebar.js.map +0 -1
- package/dist/lib/components/navigation/SidebarBadge.js.map +0 -1
- package/dist/lib/components/navigation/SidebarCategory.d.ts +0 -5
- package/dist/lib/components/navigation/SidebarCategory.js.map +0 -1
- package/dist/lib/components/navigation/SidebarItem.d.ts +0 -11
- package/dist/lib/components/navigation/SidebarItem.js +0 -50
- package/dist/lib/components/navigation/SidebarItem.js.map +0 -1
- package/dist/lib/components/navigation/SidebarWrapper.d.ts +0 -8
- package/dist/lib/components/navigation/SidebarWrapper.js +0 -5
- package/dist/lib/components/navigation/SidebarWrapper.js.map +0 -1
- package/dist/lib/plugins/custom-pages/CustomPage.d.ts +0 -2
- package/dist/lib/plugins/custom-pages/CustomPage.js +0 -11
- package/dist/lib/plugins/custom-pages/CustomPage.js.map +0 -1
- package/dist/lib/plugins/markdown/resolver.d.ts +0 -32
- package/dist/lib/plugins/markdown/resolver.js +0 -46
- package/dist/lib/plugins/markdown/resolver.js.map +0 -1
- package/dist/lib/plugins/openapi/playground/SubmitButton.d.ts +0 -7
- package/dist/lib/plugins/openapi/playground/SubmitButton.js +0 -22
- package/dist/lib/plugins/openapi/playground/SubmitButton.js.map +0 -1
- package/dist/lib/plugins/openapi/playground/UrlDisplay.d.ts +0 -4
- package/dist/lib/plugins/openapi/playground/UrlDisplay.js +0 -22
- package/dist/lib/plugins/openapi/playground/UrlDisplay.js.map +0 -1
- package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.d.ts +0 -7
- package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js +0 -11
- package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js.map +0 -1
- package/dist/lib/plugins/openapi/post-processors/removeExtensions.d.ts +0 -7
- package/dist/lib/plugins/openapi/post-processors/removeExtensions.js.map +0 -1
- package/dist/lib/plugins/openapi/post-processors/removeExtensions.test.js.map +0 -1
- package/dist/lib/plugins/openapi/post-processors/removeParameters.js.map +0 -1
- package/dist/lib/plugins/openapi/post-processors/removeParameters.test.js.map +0 -1
- package/dist/lib/plugins/openapi/post-processors/removePaths.js.map +0 -1
- package/dist/lib/plugins/openapi/post-processors/removePaths.test.js +0 -104
- package/dist/lib/plugins/openapi/post-processors/removePaths.test.js.map +0 -1
- package/dist/lib/plugins/openapi/post-processors/traverse.js.map +0 -1
- package/dist/lib/plugins/openapi/util/createSidebarCategory.d.ts +0 -9
- package/dist/lib/plugins/openapi/util/createSidebarCategory.js.map +0 -1
- package/dist/vite/plugin-docs.test.js +0 -22
- package/dist/vite/plugin-docs.test.js.map +0 -1
- package/dist/vite/plugin-sidebar.d.ts +0 -3
- package/dist/vite/plugin-sidebar.js.map +0 -1
- package/dist/vite/plugin-theme-css.d.ts +0 -6
- package/dist/vite/plugin-theme-css.js +0 -117
- package/dist/vite/plugin-theme-css.js.map +0 -1
- package/dist/zuplo/env.d.ts +0 -7
- package/dist/zuplo/env.js +0 -12
- package/dist/zuplo/env.js.map +0 -1
- package/lib/AuthenticationPlugin-foqdvvkf.js +0 -58
- package/lib/AuthenticationPlugin-foqdvvkf.js.map +0 -1
- package/lib/Button-Fp19CMUr.js +0 -49
- package/lib/Button-Fp19CMUr.js.map +0 -1
- package/lib/Callout-D5frCCJ0.js +0 -229
- package/lib/Callout-D5frCCJ0.js.map +0 -1
- package/lib/CategoryHeading-DpB47wvk.js +0 -10
- package/lib/CategoryHeading-DpB47wvk.js.map +0 -1
- package/lib/Dialog-Dv6WG8RN.js.map +0 -1
- package/lib/Drawer-kDAfOq_2.js.map +0 -1
- package/lib/Markdown-D-vLL3rw.js.map +0 -1
- package/lib/MdxPage-BY6tJN4Q.js +0 -83
- package/lib/MdxPage-BY6tJN4Q.js.map +0 -1
- package/lib/OasProvider-5ej8C_s6.js +0 -34
- package/lib/OasProvider-5ej8C_s6.js.map +0 -1
- package/lib/OperationList-CHuBrSD5.js.map +0 -1
- package/lib/Pagination-DALsKi79.js +0 -46
- package/lib/Pagination-DALsKi79.js.map +0 -1
- package/lib/SchemaList-BH1kPaT4.js +0 -148
- package/lib/SchemaList-BH1kPaT4.js.map +0 -1
- package/lib/SchemaView-6_qdGR_9.js +0 -356
- package/lib/SchemaView-6_qdGR_9.js.map +0 -1
- package/lib/Select-DVFRKf1R.js +0 -223
- package/lib/Select-DVFRKf1R.js.map +0 -1
- package/lib/SlotletProvider-BPQNhW3Y.js +0 -338
- package/lib/SlotletProvider-BPQNhW3Y.js.map +0 -1
- package/lib/SyntaxHighlight-BEoSoPEo.js +0 -2890
- package/lib/SyntaxHighlight-BEoSoPEo.js.map +0 -1
- package/lib/Toc-COKWpWOX.js.map +0 -1
- package/lib/_commonjsHelpers-BkfeUUK-.js +0 -29
- package/lib/_commonjsHelpers-BkfeUUK-.js.map +0 -1
- package/lib/chunk-HA7DTUK3-C4gP41vD.js +0 -1821
- package/lib/chunk-HA7DTUK3-C4gP41vD.js.map +0 -1
- package/lib/circular-ByJI6Mci.js.map +0 -1
- package/lib/cn-qaFjX9_3.js.map +0 -1
- package/lib/context-DLCwaMXN.js +0 -22
- package/lib/context-DLCwaMXN.js.map +0 -1
- package/lib/createServer-mMau3eV_.js.map +0 -1
- package/lib/hook-CqpVYDqN.js +0 -1483
- package/lib/hook-CqpVYDqN.js.map +0 -1
- package/lib/index-Bn6Lc9tq.js +0 -9
- package/lib/index-Bn6Lc9tq.js.map +0 -1
- package/lib/index-CFrxHpoy.js +0 -2514
- package/lib/index-CFrxHpoy.js.map +0 -1
- package/lib/index-DGMVODgw.js +0 -2226
- package/lib/index-DGMVODgw.js.map +0 -1
- package/lib/index-Dl3Yl0yb.js.map +0 -1
- package/lib/index-DwT-v3zK.js +0 -86
- package/lib/index-DwT-v3zK.js.map +0 -1
- package/lib/index-gQD2h1wX.js +0 -447
- package/lib/index-gQD2h1wX.js.map +0 -1
- package/lib/index.esm--gIChbWs.js +0 -1207
- package/lib/index.esm--gIChbWs.js.map +0 -1
- package/lib/invariant-Caa8-XvF.js +0 -26
- package/lib/jsx-runtime-CYK1ROHF.js +0 -446
- package/lib/jsx-runtime-CYK1ROHF.js.map +0 -1
- package/lib/mutation-8LjrN7uz.js +0 -208
- package/lib/mutation-8LjrN7uz.js.map +0 -1
- package/lib/objectEntries-BS7aAgOm.js +0 -12
- package/lib/objectEntries-BS7aAgOm.js.map +0 -1
- package/lib/post-processors/removeExtensions.js.map +0 -1
- package/lib/post-processors/removeParameters.js +0 -48
- package/lib/post-processors/removeParameters.js.map +0 -1
- package/lib/post-processors/removePaths.js +0 -28
- package/lib/post-processors/removePaths.js.map +0 -1
- package/lib/post-processors/traverse.js +0 -15
- package/lib/post-processors/traverse.js.map +0 -1
- package/lib/prism-bash.min-HHIMdNJ_.js +0 -7
- package/lib/prism-bash.min-HHIMdNJ_.js.map +0 -1
- package/lib/prism-csharp.min-bQAo2pmx.js +0 -63
- package/lib/prism-csharp.min-bQAo2pmx.js.map +0 -1
- package/lib/prism-java.min-BpvsOuIa.js +0 -35
- package/lib/prism-java.min-BpvsOuIa.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-jsstacktrace.min-BfobCF2F.js +0 -2
- package/lib/prism-jsstacktrace.min-BfobCF2F.js.map +0 -1
- package/lib/prism-markdown.min-C0Qn0m-5.js +0 -61
- package/lib/prism-markdown.min-C0Qn0m-5.js.map +0 -1
- package/lib/prism-markup-BNGj0Tvm.js +0 -174
- package/lib/prism-markup-BNGj0Tvm.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-ruby.min-Dx9KO9ds.js +0 -38
- package/lib/prism-ruby.min-Dx9KO9ds.js.map +0 -1
- package/lib/prism-typescript.min-CD7H2IYQ.js +0 -34
- package/lib/prism-typescript.min-CD7H2IYQ.js.map +0 -1
- package/lib/useExposedProps-B9qXJedG.js.map +0 -1
- package/src/app/tailwind.ts +0 -103
- package/src/lib/components/SlotletProvider.tsx +0 -55
- package/src/lib/components/context/PluginSystem.ts +0 -0
- package/src/lib/components/navigation/Sidebar.tsx +0 -53
- package/src/lib/components/navigation/SidebarItem.tsx +0 -118
- package/src/lib/components/navigation/SidebarWrapper.tsx +0 -25
- package/src/lib/plugins/custom-pages/CustomPage.tsx +0 -18
- package/src/lib/plugins/markdown/resolver.ts +0 -57
- package/src/lib/plugins/openapi/playground/SubmitButton.tsx +0 -75
- package/src/lib/plugins/openapi/playground/UrlDisplay.tsx +0 -32
- package/src/lib/plugins/openapi/playground/result-panel/RequestTab.tsx +0 -73
- package/src/lib/plugins/openapi/post-processors/removePaths.test.ts +0 -126
- /package/dist/{lib/components/context/PluginSystem.d.ts → config/validators/InputNavigationSchema.test-d.d.ts} +0 -0
- /package/dist/{lib/plugins/openapi/post-processors/removeExtensions.test.d.ts → config/validators/validate.test.d.ts} +0 -0
- /package/dist/lib/{plugins/openapi/post-processors/removeParameters.test.d.ts → auth/issuer.test.d.ts} +0 -0
- /package/dist/lib/{plugins/openapi/post-processors/removePaths.test.d.ts → components/Slot.test.d.ts} +0 -0
- /package/dist/{vite/plugin-docs.test.d.ts → lib/plugins/openapi/processors/removeExtensions.test.d.ts} +0 -0
- /package/dist/lib/plugins/openapi/{post-processors → processors}/traverse.d.ts +0 -0
- /package/dist/lib/plugins/openapi/{post-processors → processors}/traverse.js +0 -0
- /package/src/lib/plugins/openapi/{post-processors → processors}/traverse.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"), F = Symbol.for("yaml.scalar"), he = Symbol.for("yaml.seq"), P = Symbol.for("yaml.node.type"), W = (s) => !!s && typeof s == "object" && s[P] === dt, Z = (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] === F, 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,27 +10,27 @@ 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 F:
|
|
17
17
|
case he:
|
|
18
18
|
return !0;
|
|
19
19
|
}
|
|
20
20
|
return !1;
|
|
21
21
|
}
|
|
22
|
-
const
|
|
23
|
-
function
|
|
24
|
-
const t =
|
|
25
|
-
|
|
22
|
+
const Rt = (s) => (E(s) || L(s)) && !!s.anchor, M = Symbol("break visit"), Ft = Symbol("skip children"), R = Symbol("remove node");
|
|
23
|
+
function ee(s, e) {
|
|
24
|
+
const t = Ut(e);
|
|
25
|
+
Z(s) ? ie(null, s.contents, t, Object.freeze([s])) === R && (s.contents = null) : ie(null, s, t, Object.freeze([]));
|
|
26
26
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
ee.BREAK = M;
|
|
28
|
+
ee.SKIP = Ft;
|
|
29
|
+
ee.REMOVE = R;
|
|
30
30
|
function ie(s, e, t, n) {
|
|
31
|
-
const i =
|
|
31
|
+
const i = Vt(s, e, t, n);
|
|
32
32
|
if ($(i) || T(i))
|
|
33
|
-
return
|
|
33
|
+
return Jt(s, n, i), ie(s, i, t, n);
|
|
34
34
|
if (typeof i != "symbol") {
|
|
35
35
|
if (L(e)) {
|
|
36
36
|
n = Object.freeze(n.concat(e));
|
|
@@ -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 === R && (e.items.splice(r, 1), r -= 1);
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
} else if (T(e)) {
|
|
@@ -49,26 +49,26 @@ 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 === R && (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 === R && (e.value = null);
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
return i;
|
|
60
60
|
}
|
|
61
|
-
async function
|
|
62
|
-
const t =
|
|
63
|
-
|
|
61
|
+
async function Re(s, e) {
|
|
62
|
+
const t = Ut(e);
|
|
63
|
+
Z(s) ? await re(null, s.contents, t, Object.freeze([s])) === R && (s.contents = null) : await re(null, s, t, Object.freeze([]));
|
|
64
64
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
Re.BREAK = M;
|
|
66
|
+
Re.SKIP = Ft;
|
|
67
|
+
Re.REMOVE = R;
|
|
68
68
|
async function re(s, e, t, n) {
|
|
69
|
-
const i = await
|
|
69
|
+
const i = await Vt(s, e, t, n);
|
|
70
70
|
if ($(i) || T(i))
|
|
71
|
-
return
|
|
71
|
+
return Jt(s, n, i), re(s, i, t, n);
|
|
72
72
|
if (typeof i != "symbol") {
|
|
73
73
|
if (L(e)) {
|
|
74
74
|
n = Object.freeze(n.concat(e));
|
|
@@ -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 === R && (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 === R && (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 === R && (e.value = null);
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
return i;
|
|
98
98
|
}
|
|
99
|
-
function
|
|
99
|
+
function Ut(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,31 +111,30 @@ function Rt(s) {
|
|
|
111
111
|
Seq: s.Collection
|
|
112
112
|
}, s) : s;
|
|
113
113
|
}
|
|
114
|
-
function
|
|
115
|
-
var i, r, o, l, a;
|
|
114
|
+
function Vt(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 (W(e))
|
|
126
|
+
return t.Alias?.(s, e, n);
|
|
128
127
|
}
|
|
129
|
-
function
|
|
128
|
+
function Jt(s, e, t) {
|
|
130
129
|
const n = e[e.length - 1];
|
|
131
130
|
if (L(n))
|
|
132
131
|
n.items[s] = t;
|
|
133
132
|
else if (T(n))
|
|
134
133
|
s === "key" ? n.key = t : n.value = t;
|
|
135
|
-
else if (
|
|
134
|
+
else if (Z(n))
|
|
136
135
|
n.contents = t;
|
|
137
136
|
else {
|
|
138
|
-
const i =
|
|
137
|
+
const i = W(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
|
+
ee(e.contents, (o, l) => {
|
|
248
247
|
$(l) && l.tag && (r[l.tag] = !0);
|
|
249
248
|
}), i = Object.keys(r);
|
|
250
249
|
} else
|
|
@@ -257,22 +256,22 @@ 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 Yt(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 Gt(s) {
|
|
268
267
|
const e = /* @__PURE__ */ new Set();
|
|
269
|
-
return
|
|
268
|
+
return ee(s, {
|
|
270
269
|
Value(t, n) {
|
|
271
270
|
n.anchor && e.add(n.anchor);
|
|
272
271
|
}
|
|
273
272
|
}), e;
|
|
274
273
|
}
|
|
275
|
-
function
|
|
274
|
+
function Qt(s, e) {
|
|
276
275
|
for (let t = 1; ; ++t) {
|
|
277
276
|
const n = `${s}${t}`;
|
|
278
277
|
if (!e.has(n))
|
|
@@ -284,8 +283,8 @@ function Ks(s, e) {
|
|
|
284
283
|
let i = null;
|
|
285
284
|
return {
|
|
286
285
|
onAnchor: (r) => {
|
|
287
|
-
t.push(r), i
|
|
288
|
-
const o =
|
|
286
|
+
t.push(r), i ?? (i = Gt(s));
|
|
287
|
+
const o = Qt(e, i);
|
|
289
288
|
return i.add(o), o;
|
|
290
289
|
},
|
|
291
290
|
/**
|
|
@@ -331,11 +330,11 @@ 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
|
-
if (!t || !
|
|
337
|
+
if (!t || !Rt(s))
|
|
339
338
|
return s.toJSON(e, t);
|
|
340
339
|
const n = { aliasCount: 0, count: 1, res: void 0 };
|
|
341
340
|
t.anchors.set(s, n), t.onCreate = (r) => {
|
|
@@ -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() {
|
|
@@ -357,7 +356,7 @@ class pt {
|
|
|
357
356
|
}
|
|
358
357
|
/** A plain JavaScript representation of this node. */
|
|
359
358
|
toJS(e, { mapAsMap: t, maxAliasCount: n, onAnchor: i, reviver: r } = {}) {
|
|
360
|
-
if (!
|
|
359
|
+
if (!Z(e))
|
|
361
360
|
throw new TypeError("A document argument is required");
|
|
362
361
|
const o = {
|
|
363
362
|
anchors: /* @__PURE__ */ new Map(),
|
|
@@ -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 Fe extends pt {
|
|
377
376
|
constructor(e) {
|
|
378
377
|
super(dt), this.source = e, Object.defineProperty(this, "tag", {
|
|
379
378
|
set() {
|
|
@@ -385,26 +384,31 @@ class Re extends pt {
|
|
|
385
384
|
* Resolve the value of this alias within `doc`, finding the last
|
|
386
385
|
* instance of the `source` anchor before this node.
|
|
387
386
|
*/
|
|
388
|
-
resolve(e) {
|
|
389
|
-
let
|
|
390
|
-
|
|
391
|
-
Node: (
|
|
392
|
-
|
|
393
|
-
return G.BREAK;
|
|
394
|
-
i.anchor === this.source && (t = i);
|
|
387
|
+
resolve(e, t) {
|
|
388
|
+
let n;
|
|
389
|
+
t?.aliasResolveCache ? n = t.aliasResolveCache : (n = [], ee(e, {
|
|
390
|
+
Node: (r, o) => {
|
|
391
|
+
(W(o) || Rt(o)) && n.push(o);
|
|
395
392
|
}
|
|
396
|
-
}), t;
|
|
393
|
+
}), t && (t.aliasResolveCache = n));
|
|
394
|
+
let i;
|
|
395
|
+
for (const r of n) {
|
|
396
|
+
if (r === this)
|
|
397
|
+
break;
|
|
398
|
+
r.anchor === this.source && (i = r);
|
|
399
|
+
}
|
|
400
|
+
return i;
|
|
397
401
|
}
|
|
398
402
|
toJSON(e, t) {
|
|
399
403
|
if (!t)
|
|
400
404
|
return { source: this.source };
|
|
401
|
-
const { anchors: n, doc: i, maxAliasCount: r } = t, o = this.resolve(i);
|
|
405
|
+
const { anchors: n, doc: i, maxAliasCount: r } = t, o = this.resolve(i, t);
|
|
402
406
|
if (!o) {
|
|
403
407
|
const a = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;
|
|
404
408
|
throw new ReferenceError(a);
|
|
405
409
|
}
|
|
406
410
|
let l = n.get(o);
|
|
407
|
-
if (l || (
|
|
411
|
+
if (l || (j(o, null, t), l = n.get(o)), !l || l.res === void 0) {
|
|
408
412
|
const a = "This should not happen: Alias anchor was not resolved?";
|
|
409
413
|
throw new ReferenceError(a);
|
|
410
414
|
}
|
|
@@ -417,7 +421,7 @@ class Re extends pt {
|
|
|
417
421
|
toString(e, t, n) {
|
|
418
422
|
const i = `*${this.source}`;
|
|
419
423
|
if (e) {
|
|
420
|
-
if (
|
|
424
|
+
if (Yt(this.source), e.options.verifyAliasOrder && !e.anchors.has(this.source)) {
|
|
421
425
|
const r = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;
|
|
422
426
|
throw new Error(r);
|
|
423
427
|
}
|
|
@@ -428,7 +432,7 @@ class Re extends pt {
|
|
|
428
432
|
}
|
|
429
433
|
}
|
|
430
434
|
function ve(s, e, t) {
|
|
431
|
-
if (
|
|
435
|
+
if (W(e)) {
|
|
432
436
|
const n = e.resolve(s), i = t && n && t.get(n);
|
|
433
437
|
return i ? i.count * i.aliasCount : 0;
|
|
434
438
|
} else if (L(e)) {
|
|
@@ -444,66 +448,62 @@ function ve(s, e, t) {
|
|
|
444
448
|
}
|
|
445
449
|
return 1;
|
|
446
450
|
}
|
|
447
|
-
const
|
|
448
|
-
class
|
|
451
|
+
const Wt = (s) => !s || typeof s != "function" && typeof s != "object";
|
|
452
|
+
class O extends pt {
|
|
449
453
|
constructor(e) {
|
|
450
|
-
super(
|
|
454
|
+
super(F), this.value = e;
|
|
451
455
|
}
|
|
452
456
|
toJSON(e, t) {
|
|
453
|
-
return t
|
|
457
|
+
return t?.keep ? this.value : j(this.value, e, t);
|
|
454
458
|
}
|
|
455
459
|
toString() {
|
|
456
460
|
return String(this.value);
|
|
457
461
|
}
|
|
458
462
|
}
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
const
|
|
465
|
-
function
|
|
463
|
+
O.BLOCK_FOLDED = "BLOCK_FOLDED";
|
|
464
|
+
O.BLOCK_LITERAL = "BLOCK_LITERAL";
|
|
465
|
+
O.PLAIN = "PLAIN";
|
|
466
|
+
O.QUOTE_DOUBLE = "QUOTE_DOUBLE";
|
|
467
|
+
O.QUOTE_SINGLE = "QUOTE_SINGLE";
|
|
468
|
+
const js = "tag:yaml.org,2002:";
|
|
469
|
+
function Ps(s, e, t) {
|
|
466
470
|
if (e) {
|
|
467
471
|
const n = t.filter((r) => r.tag === e), i = n.find((r) => !r.format) ?? n[0];
|
|
468
472
|
if (!i)
|
|
469
473
|
throw new Error(`Tag ${e} not found`);
|
|
470
474
|
return i;
|
|
471
475
|
}
|
|
472
|
-
return t.find((n) =>
|
|
473
|
-
var i;
|
|
474
|
-
return ((i = n.identify) == null ? void 0 : i.call(n, s)) && !n.format;
|
|
475
|
-
});
|
|
476
|
+
return t.find((n) => n.identify?.(s) && !n.format);
|
|
476
477
|
}
|
|
477
478
|
function ke(s, e, t) {
|
|
478
|
-
|
|
479
|
-
if (ee(s) && (s = s.contents), $(s))
|
|
479
|
+
if (Z(s) && (s = s.contents), $(s))
|
|
480
480
|
return s;
|
|
481
481
|
if (T(s)) {
|
|
482
|
-
const
|
|
483
|
-
return
|
|
482
|
+
const f = t.schema[G].createNode?.(t.schema, null, t);
|
|
483
|
+
return f.items.push(s), f;
|
|
484
484
|
}
|
|
485
485
|
(s instanceof String || s instanceof Number || s instanceof Boolean || typeof BigInt < "u" && s instanceof BigInt) && (s = s.valueOf());
|
|
486
486
|
const { aliasDuplicateObjects: n, onAnchor: i, onTagObj: r, schema: o, sourceObjects: l } = t;
|
|
487
487
|
let a;
|
|
488
488
|
if (n && s && typeof s == "object") {
|
|
489
489
|
if (a = l.get(s), a)
|
|
490
|
-
return a.anchor
|
|
490
|
+
return a.anchor ?? (a.anchor = i(s)), new Fe(a.anchor);
|
|
491
491
|
a = { anchor: null, node: null }, l.set(s, a);
|
|
492
492
|
}
|
|
493
|
-
e
|
|
494
|
-
let c =
|
|
493
|
+
e?.startsWith("!!") && (e = js + e.slice(2));
|
|
494
|
+
let c = Ps(s, e, o.tags);
|
|
495
495
|
if (!c) {
|
|
496
496
|
if (s && typeof s.toJSON == "function" && (s = s.toJSON()), !s || typeof s != "object") {
|
|
497
|
-
const
|
|
498
|
-
return a && (a.node =
|
|
497
|
+
const f = new O(s);
|
|
498
|
+
return a && (a.node = f), f;
|
|
499
499
|
}
|
|
500
|
-
c = s instanceof Map ? o[
|
|
500
|
+
c = s instanceof Map ? o[G] : Symbol.iterator in Object(s) ? o[he] : o[G];
|
|
501
501
|
}
|
|
502
502
|
r && (r(c), delete t.onTagObj);
|
|
503
|
-
const
|
|
504
|
-
return e ?
|
|
503
|
+
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);
|
|
504
|
+
return e ? d.tag = e : c.default || (d.tag = c.tag), a && (a.node = d), d;
|
|
505
505
|
}
|
|
506
|
-
function
|
|
506
|
+
function je(s, e, t) {
|
|
507
507
|
let n = t;
|
|
508
508
|
for (let i = e.length - 1; i >= 0; --i) {
|
|
509
509
|
const r = e[i];
|
|
@@ -524,7 +524,7 @@ function Pe(s, e, t) {
|
|
|
524
524
|
});
|
|
525
525
|
}
|
|
526
526
|
const we = (s) => s == null || typeof s == "object" && !!s[Symbol.iterator]().next().done;
|
|
527
|
-
class
|
|
527
|
+
class Ht extends pt {
|
|
528
528
|
constructor(e, t) {
|
|
529
529
|
super(e), Object.defineProperty(this, "schema", {
|
|
530
530
|
value: t,
|
|
@@ -555,7 +555,7 @@ class Wt extends pt {
|
|
|
555
555
|
if (L(r))
|
|
556
556
|
r.addIn(i, t);
|
|
557
557
|
else if (r === void 0 && this.schema)
|
|
558
|
-
this.set(n,
|
|
558
|
+
this.set(n, je(this.schema, i, t));
|
|
559
559
|
else
|
|
560
560
|
throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`);
|
|
561
561
|
}
|
|
@@ -613,7 +613,7 @@ class Wt extends pt {
|
|
|
613
613
|
if (L(r))
|
|
614
614
|
r.setIn(i, t);
|
|
615
615
|
else if (r === void 0 && this.schema)
|
|
616
|
-
this.set(n,
|
|
616
|
+
this.set(n, je(this.schema, i, t));
|
|
617
617
|
else
|
|
618
618
|
throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`);
|
|
619
619
|
}
|
|
@@ -626,7 +626,7 @@ function U(s, e) {
|
|
|
626
626
|
const H = (s, e, t) => s.endsWith(`
|
|
627
627
|
`) ? U(t, e) : t.includes(`
|
|
628
628
|
`) ? `
|
|
629
|
-
` + U(t, e) : (s.endsWith(" ") ? "" : " ") + t,
|
|
629
|
+
` + U(t, e) : (s.endsWith(" ") ? "" : " ") + t, Xt = "flow", at = "block", Be = "quoted";
|
|
630
630
|
function Ue(s, e, t = "flow", { indentAtStart: n, lineWidth: i = 80, minContentWidth: r = 20, onFold: o, onOverflow: l } = {}) {
|
|
631
631
|
if (!i || i < 0)
|
|
632
632
|
return s;
|
|
@@ -634,64 +634,64 @@ function Ue(s, e, t = "flow", { indentAtStart: n, lineWidth: i = 80, minContentW
|
|
|
634
634
|
const a = Math.max(1 + r, 1 + i - e.length);
|
|
635
635
|
if (s.length <= a)
|
|
636
636
|
return s;
|
|
637
|
-
const c = [],
|
|
637
|
+
const c = [], d = {};
|
|
638
638
|
let f = i - e.length;
|
|
639
639
|
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 (
|
|
640
|
+
let u, m, y = !1, h = -1, p = -1, b = -1;
|
|
641
|
+
t === at && (h = $t(s, h, e.length), h !== -1 && (f = h + a));
|
|
642
|
+
for (let S; S = s[h += 1]; ) {
|
|
643
|
+
if (t === Be && S === "\\") {
|
|
644
|
+
switch (p = h, s[h + 1]) {
|
|
645
645
|
case "x":
|
|
646
|
-
|
|
646
|
+
h += 3;
|
|
647
647
|
break;
|
|
648
648
|
case "u":
|
|
649
|
-
|
|
649
|
+
h += 5;
|
|
650
650
|
break;
|
|
651
651
|
case "U":
|
|
652
|
-
|
|
652
|
+
h += 9;
|
|
653
653
|
break;
|
|
654
654
|
default:
|
|
655
|
-
|
|
655
|
+
h += 1;
|
|
656
656
|
}
|
|
657
|
-
b =
|
|
657
|
+
b = h;
|
|
658
658
|
}
|
|
659
|
-
if (
|
|
659
|
+
if (S === `
|
|
660
660
|
`)
|
|
661
|
-
t === at && (
|
|
661
|
+
t === at && (h = $t(s, h, e.length)), f = h + e.length + a, u = void 0;
|
|
662
662
|
else {
|
|
663
|
-
if (
|
|
664
|
-
` &&
|
|
665
|
-
const
|
|
666
|
-
|
|
667
|
-
` &&
|
|
663
|
+
if (S === " " && m && m !== " " && m !== `
|
|
664
|
+
` && m !== " ") {
|
|
665
|
+
const k = s[h + 1];
|
|
666
|
+
k && k !== " " && k !== `
|
|
667
|
+
` && k !== " " && (u = h);
|
|
668
668
|
}
|
|
669
|
-
if (
|
|
670
|
-
if (
|
|
671
|
-
c.push(
|
|
669
|
+
if (h >= f)
|
|
670
|
+
if (u)
|
|
671
|
+
c.push(u), f = u + a, u = void 0;
|
|
672
672
|
else if (t === Be) {
|
|
673
|
-
for (;
|
|
674
|
-
|
|
675
|
-
const
|
|
676
|
-
if (
|
|
673
|
+
for (; m === " " || m === " "; )
|
|
674
|
+
m = S, S = s[h += 1], y = !0;
|
|
675
|
+
const k = h > b + 1 ? h - 2 : p - 1;
|
|
676
|
+
if (d[k])
|
|
677
677
|
return s;
|
|
678
|
-
c.push(
|
|
678
|
+
c.push(k), d[k] = !0, f = k + a, u = void 0;
|
|
679
679
|
} else
|
|
680
680
|
y = !0;
|
|
681
681
|
}
|
|
682
|
-
|
|
682
|
+
m = S;
|
|
683
683
|
}
|
|
684
684
|
if (y && l && l(), c.length === 0)
|
|
685
685
|
return s;
|
|
686
686
|
o && o();
|
|
687
|
-
let
|
|
688
|
-
for (let
|
|
689
|
-
const
|
|
690
|
-
|
|
691
|
-
${e}${s.slice(0,
|
|
692
|
-
${e}${s.slice(
|
|
687
|
+
let w = s.slice(0, c[0]);
|
|
688
|
+
for (let S = 0; S < c.length; ++S) {
|
|
689
|
+
const k = c[S], N = c[S + 1] || s.length;
|
|
690
|
+
k === 0 ? w = `
|
|
691
|
+
${e}${s.slice(0, N)}` : (t === Be && d[k] && (w += `${s[k]}\\`), w += `
|
|
692
|
+
${e}${s.slice(k + 1, N)}`);
|
|
693
693
|
}
|
|
694
|
-
return
|
|
694
|
+
return w;
|
|
695
695
|
}
|
|
696
696
|
function $t(s, e, t) {
|
|
697
697
|
let n = e, i = e + 1, r = s[i];
|
|
@@ -740,8 +740,8 @@ function Se(s, e) {
|
|
|
740
740
|
case "u":
|
|
741
741
|
{
|
|
742
742
|
o += t.slice(l, a);
|
|
743
|
-
const
|
|
744
|
-
switch (
|
|
743
|
+
const d = t.substr(a + 2, 4);
|
|
744
|
+
switch (d) {
|
|
745
745
|
case "0000":
|
|
746
746
|
o += "\\0";
|
|
747
747
|
break;
|
|
@@ -767,7 +767,7 @@ function Se(s, e) {
|
|
|
767
767
|
o += "\\P";
|
|
768
768
|
break;
|
|
769
769
|
default:
|
|
770
|
-
|
|
770
|
+
d.substr(0, 2) === "00" ? o += "\\x" + d.substr(2) : o += t.substr(a, 6);
|
|
771
771
|
}
|
|
772
772
|
a += 5, l = a + 1;
|
|
773
773
|
}
|
|
@@ -795,7 +795,7 @@ function ct(s, e) {
|
|
|
795
795
|
return Se(s, e);
|
|
796
796
|
const t = e.indent || (Je(s) ? " " : ""), n = "'" + s.replace(/'/g, "''").replace(/\n+/g, `$&
|
|
797
797
|
${t}`) + "'";
|
|
798
|
-
return e.implicitKey ? n : Ue(n, t,
|
|
798
|
+
return e.implicitKey ? n : Ue(n, t, Xt, Ve(e, !1));
|
|
799
799
|
}
|
|
800
800
|
function le(s, e) {
|
|
801
801
|
const { singleQuote: t } = e.options;
|
|
@@ -821,62 +821,62 @@ function Me({ comment: s, type: e, value: t }, n, i, r) {
|
|
|
821
821
|
const { blockQuote: o, commentString: l, lineWidth: a } = n.options;
|
|
822
822
|
if (!o || /\n[\t ]+$/.test(t) || /^\s*$/.test(t))
|
|
823
823
|
return le(t, n);
|
|
824
|
-
const c = n.indent || (n.forceBlockIndent || Je(t) ? " " : ""),
|
|
824
|
+
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
825
|
if (!t)
|
|
826
|
-
return
|
|
826
|
+
return d ? `|
|
|
827
827
|
` : `>
|
|
828
828
|
`;
|
|
829
|
-
let f,
|
|
830
|
-
for (
|
|
831
|
-
const
|
|
832
|
-
if (
|
|
833
|
-
` &&
|
|
829
|
+
let f, u;
|
|
830
|
+
for (u = t.length; u > 0; --u) {
|
|
831
|
+
const N = t[u - 1];
|
|
832
|
+
if (N !== `
|
|
833
|
+
` && N !== " " && N !== " ")
|
|
834
834
|
break;
|
|
835
835
|
}
|
|
836
|
-
let
|
|
837
|
-
const y =
|
|
836
|
+
let m = t.substring(u);
|
|
837
|
+
const y = m.indexOf(`
|
|
838
838
|
`);
|
|
839
|
-
y === -1 ? f = "-" : t ===
|
|
840
|
-
` && (
|
|
841
|
-
let
|
|
842
|
-
for (
|
|
843
|
-
const
|
|
844
|
-
if (
|
|
845
|
-
|
|
846
|
-
else if (
|
|
839
|
+
y === -1 ? f = "-" : t === m || y !== m.length - 1 ? (f = "+", r && r()) : f = "", m && (t = t.slice(0, -m.length), m[m.length - 1] === `
|
|
840
|
+
` && (m = m.slice(0, -1)), m = m.replace(ft, `$&${c}`));
|
|
841
|
+
let h = !1, p, b = -1;
|
|
842
|
+
for (p = 0; p < t.length; ++p) {
|
|
843
|
+
const N = t[p];
|
|
844
|
+
if (N === " ")
|
|
845
|
+
h = !0;
|
|
846
|
+
else if (N === `
|
|
847
847
|
`)
|
|
848
|
-
b =
|
|
848
|
+
b = p;
|
|
849
849
|
else
|
|
850
850
|
break;
|
|
851
851
|
}
|
|
852
|
-
let
|
|
853
|
-
|
|
854
|
-
let
|
|
855
|
-
if (s && (
|
|
856
|
-
const
|
|
852
|
+
let w = t.substring(0, b < p ? b + 1 : p);
|
|
853
|
+
w && (t = t.substring(w.length), w = w.replace(/\n+/g, `$&${c}`));
|
|
854
|
+
let k = (h ? c ? "2" : "1" : "") + f;
|
|
855
|
+
if (s && (k += " " + l(s.replace(/ ?[\r\n]+/g, " ")), i && i()), !d) {
|
|
856
|
+
const N = t.replace(/\n+/g, `
|
|
857
857
|
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, "$1$2").replace(/\n+/g, `$&${c}`);
|
|
858
|
-
let
|
|
858
|
+
let A = !1;
|
|
859
859
|
const I = Ve(n, !0);
|
|
860
|
-
o !== "folded" && e !==
|
|
861
|
-
|
|
860
|
+
o !== "folded" && e !== O.BLOCK_FOLDED && (I.onOverflow = () => {
|
|
861
|
+
A = !0;
|
|
862
862
|
});
|
|
863
|
-
const g = Ue(`${
|
|
864
|
-
if (!
|
|
865
|
-
return `>${
|
|
863
|
+
const g = Ue(`${w}${N}${m}`, c, at, I);
|
|
864
|
+
if (!A)
|
|
865
|
+
return `>${k}
|
|
866
866
|
${c}${g}`;
|
|
867
867
|
}
|
|
868
|
-
return t = t.replace(/\n+/g, `$&${c}`), `|${
|
|
869
|
-
${c}${
|
|
868
|
+
return t = t.replace(/\n+/g, `$&${c}`), `|${k}
|
|
869
|
+
${c}${w}${t}${m}`;
|
|
870
870
|
}
|
|
871
|
-
function
|
|
872
|
-
const { type: i, value: r } = s, { actualString: o, implicitKey: l, indent: a, indentStep: c, inFlow:
|
|
871
|
+
function Rs(s, e, t, n) {
|
|
872
|
+
const { type: i, value: r } = s, { actualString: o, implicitKey: l, indent: a, indentStep: c, inFlow: d } = e;
|
|
873
873
|
if (l && r.includes(`
|
|
874
|
-
`) ||
|
|
874
|
+
`) || d && /[[\]{},]/.test(r))
|
|
875
875
|
return le(r, e);
|
|
876
|
-
if (
|
|
877
|
-
return l ||
|
|
876
|
+
if (/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(r))
|
|
877
|
+
return l || d || !r.includes(`
|
|
878
878
|
`) ? le(r, e) : Me(s, e, t, n);
|
|
879
|
-
if (!l && !
|
|
879
|
+
if (!l && !d && i !== O.PLAIN && r.includes(`
|
|
880
880
|
`))
|
|
881
881
|
return Me(s, e, t, n);
|
|
882
882
|
if (Je(r)) {
|
|
@@ -888,43 +888,40 @@ function Fs(s, e, t, n) {
|
|
|
888
888
|
const f = r.replace(/\n+/g, `$&
|
|
889
889
|
${a}`);
|
|
890
890
|
if (o) {
|
|
891
|
-
const
|
|
892
|
-
|
|
893
|
-
return u.default && u.tag !== "tag:yaml.org,2002:str" && ((m = u.test) == null ? void 0 : m.test(f));
|
|
894
|
-
}, { compat: h, tags: y } = e.doc.schema;
|
|
895
|
-
if (y.some(d) || h != null && h.some(d))
|
|
891
|
+
const u = (h) => h.default && h.tag !== "tag:yaml.org,2002:str" && h.test?.test(f), { compat: m, tags: y } = e.doc.schema;
|
|
892
|
+
if (y.some(u) || m?.some(u))
|
|
896
893
|
return le(r, e);
|
|
897
894
|
}
|
|
898
|
-
return l ? f : Ue(f, a,
|
|
895
|
+
return l ? f : Ue(f, a, Xt, Ve(e, !1));
|
|
899
896
|
}
|
|
900
897
|
function Ae(s, e, t, n) {
|
|
901
898
|
const { implicitKey: i, inFlow: r } = e, o = typeof s.value == "string" ? s : Object.assign({}, s, { value: String(s.value) });
|
|
902
899
|
let { type: l } = s;
|
|
903
|
-
l !==
|
|
904
|
-
const a = (
|
|
905
|
-
switch (
|
|
906
|
-
case
|
|
907
|
-
case
|
|
900
|
+
l !== O.QUOTE_DOUBLE && /[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value) && (l = O.QUOTE_DOUBLE);
|
|
901
|
+
const a = (d) => {
|
|
902
|
+
switch (d) {
|
|
903
|
+
case O.BLOCK_FOLDED:
|
|
904
|
+
case O.BLOCK_LITERAL:
|
|
908
905
|
return i || r ? le(o.value, e) : Me(o, e, t, n);
|
|
909
|
-
case
|
|
906
|
+
case O.QUOTE_DOUBLE:
|
|
910
907
|
return Se(o.value, e);
|
|
911
|
-
case
|
|
908
|
+
case O.QUOTE_SINGLE:
|
|
912
909
|
return ct(o.value, e);
|
|
913
|
-
case
|
|
914
|
-
return
|
|
910
|
+
case O.PLAIN:
|
|
911
|
+
return Rs(o, e, t, n);
|
|
915
912
|
default:
|
|
916
913
|
return null;
|
|
917
914
|
}
|
|
918
915
|
};
|
|
919
916
|
let c = a(l);
|
|
920
917
|
if (c === null) {
|
|
921
|
-
const { defaultKeyType:
|
|
922
|
-
if (c = a(
|
|
923
|
-
throw new Error(`Unsupported default string type ${
|
|
918
|
+
const { defaultKeyType: d, defaultStringType: f } = e.options, u = i && d || f;
|
|
919
|
+
if (c = a(u), c === null)
|
|
920
|
+
throw new Error(`Unsupported default string type ${u}`);
|
|
924
921
|
}
|
|
925
922
|
return c;
|
|
926
923
|
}
|
|
927
|
-
function
|
|
924
|
+
function zt(s, e) {
|
|
928
925
|
const t = Object.assign({
|
|
929
926
|
blockQuote: !0,
|
|
930
927
|
commentString: Ds,
|
|
@@ -965,30 +962,26 @@ function Xt(s, e) {
|
|
|
965
962
|
options: t
|
|
966
963
|
};
|
|
967
964
|
}
|
|
968
|
-
function
|
|
969
|
-
var i;
|
|
965
|
+
function Fs(s, e) {
|
|
970
966
|
if (e.tag) {
|
|
971
|
-
const
|
|
972
|
-
if (
|
|
973
|
-
return
|
|
967
|
+
const i = s.filter((r) => r.tag === e.tag);
|
|
968
|
+
if (i.length > 0)
|
|
969
|
+
return i.find((r) => r.format === e.format) ?? i[0];
|
|
974
970
|
}
|
|
975
971
|
let t, n;
|
|
976
972
|
if (E(e)) {
|
|
977
973
|
n = e.value;
|
|
978
|
-
let
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
if (r.length > 1) {
|
|
983
|
-
const o = r.filter((l) => l.test);
|
|
984
|
-
o.length > 0 && (r = o);
|
|
974
|
+
let i = s.filter((r) => r.identify?.(n));
|
|
975
|
+
if (i.length > 1) {
|
|
976
|
+
const r = i.filter((o) => o.test);
|
|
977
|
+
r.length > 0 && (i = r);
|
|
985
978
|
}
|
|
986
|
-
t =
|
|
979
|
+
t = i.find((r) => r.format === e.format) ?? i.find((r) => !r.format);
|
|
987
980
|
} else
|
|
988
|
-
n = e, t = s.find((
|
|
981
|
+
n = e, t = s.find((i) => i.nodeClass && n instanceof i.nodeClass);
|
|
989
982
|
if (!t) {
|
|
990
|
-
const
|
|
991
|
-
throw new Error(`Tag not resolved for ${
|
|
983
|
+
const i = n?.constructor?.name ?? (n === null ? "null" : typeof n);
|
|
984
|
+
throw new Error(`Tag not resolved for ${i} value`);
|
|
992
985
|
}
|
|
993
986
|
return t;
|
|
994
987
|
}
|
|
@@ -996,24 +989,23 @@ function Us(s, e, { anchors: t, doc: n }) {
|
|
|
996
989
|
if (!n.directives)
|
|
997
990
|
return "";
|
|
998
991
|
const i = [], r = (E(s) || L(s)) && s.anchor;
|
|
999
|
-
r &&
|
|
1000
|
-
const o = s.tag
|
|
992
|
+
r && Yt(r) && (t.add(r), i.push(`&${r}`));
|
|
993
|
+
const o = s.tag ?? (e.default ? null : e.tag);
|
|
1001
994
|
return o && i.push(n.directives.tagString(o)), i.join(" ");
|
|
1002
995
|
}
|
|
1003
996
|
function fe(s, e, t, n) {
|
|
1004
|
-
var a;
|
|
1005
997
|
if (T(s))
|
|
1006
998
|
return s.toString(e, t, n);
|
|
1007
|
-
if (
|
|
999
|
+
if (W(s)) {
|
|
1008
1000
|
if (e.doc.directives)
|
|
1009
1001
|
return s.toString(e);
|
|
1010
|
-
if (
|
|
1002
|
+
if (e.resolvedAliases?.has(s))
|
|
1011
1003
|
throw new TypeError("Cannot stringify circular structure without alias nodes");
|
|
1012
1004
|
e.resolvedAliases ? e.resolvedAliases.add(s) : e.resolvedAliases = /* @__PURE__ */ new Set([s]), s = s.resolve(e.doc);
|
|
1013
1005
|
}
|
|
1014
1006
|
let i;
|
|
1015
|
-
const r = $(s) ? s : e.doc.createNode(s, { onTagObj: (
|
|
1016
|
-
i
|
|
1007
|
+
const r = $(s) ? s : e.doc.createNode(s, { onTagObj: (a) => i = a });
|
|
1008
|
+
i ?? (i = Fs(e.doc.schema.tags, r));
|
|
1017
1009
|
const o = Us(r, i, e);
|
|
1018
1010
|
o.length > 0 && (e.indentAtStart = (e.indentAtStart ?? 0) + o.length + 1);
|
|
1019
1011
|
const l = typeof i.stringify == "function" ? i.stringify(r, e, t, n) : E(r) ? Ae(r, e, t, n) : r.toString(e, t, n);
|
|
@@ -1021,69 +1013,69 @@ function fe(s, e, t, n) {
|
|
|
1021
1013
|
${e.indent}${l}` : l;
|
|
1022
1014
|
}
|
|
1023
1015
|
function Vs({ key: s, value: e }, t, n, i) {
|
|
1024
|
-
const { allNullValues: r, doc: o, indent: l, indentStep: a, options: { commentString: c, indentSeq:
|
|
1025
|
-
let
|
|
1016
|
+
const { allNullValues: r, doc: o, indent: l, indentStep: a, options: { commentString: c, indentSeq: d, simpleKeys: f } } = t;
|
|
1017
|
+
let u = $(s) && s.comment || null;
|
|
1026
1018
|
if (f) {
|
|
1027
|
-
if (
|
|
1019
|
+
if (u)
|
|
1028
1020
|
throw new Error("With simple keys, key nodes cannot have comments");
|
|
1029
1021
|
if (L(s) || !$(s) && typeof s == "object") {
|
|
1030
1022
|
const I = "With simple keys, collection cannot be used as a key value";
|
|
1031
1023
|
throw new Error(I);
|
|
1032
1024
|
}
|
|
1033
1025
|
}
|
|
1034
|
-
let
|
|
1026
|
+
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"));
|
|
1035
1027
|
t = Object.assign({}, t, {
|
|
1036
1028
|
allNullValues: !1,
|
|
1037
|
-
implicitKey: !
|
|
1029
|
+
implicitKey: !m && (f || !r),
|
|
1038
1030
|
indent: l + a
|
|
1039
1031
|
});
|
|
1040
|
-
let y = !1,
|
|
1041
|
-
if (!
|
|
1032
|
+
let y = !1, h = !1, p = fe(s, t, () => y = !0, () => h = !0);
|
|
1033
|
+
if (!m && !t.inFlow && p.length > 1024) {
|
|
1042
1034
|
if (f)
|
|
1043
1035
|
throw new Error("With simple keys, single line scalar must not span more than 1024 characters");
|
|
1044
|
-
|
|
1036
|
+
m = !0;
|
|
1045
1037
|
}
|
|
1046
1038
|
if (t.inFlow) {
|
|
1047
1039
|
if (r || e == null)
|
|
1048
|
-
return y && n && n(),
|
|
1049
|
-
} else if (r && !f || e == null &&
|
|
1050
|
-
return
|
|
1051
|
-
y && (
|
|
1052
|
-
${l}:`) : (
|
|
1053
|
-
let b,
|
|
1054
|
-
$(e) ? (b = !!e.spaceBefore,
|
|
1055
|
-
let
|
|
1056
|
-
const
|
|
1057
|
-
let
|
|
1058
|
-
if (
|
|
1059
|
-
if (
|
|
1060
|
-
` : "",
|
|
1061
|
-
const I = c(
|
|
1062
|
-
|
|
1040
|
+
return y && n && n(), p === "" ? "?" : m ? `? ${p}` : p;
|
|
1041
|
+
} else if (r && !f || e == null && m)
|
|
1042
|
+
return p = `? ${p}`, u && !y ? p += H(p, t.indent, c(u)) : h && i && i(), p;
|
|
1043
|
+
y && (u = null), m ? (u && (p += H(p, t.indent, c(u))), p = `? ${p}
|
|
1044
|
+
${l}:`) : (p = `${p}:`, u && (p += H(p, t.indent, c(u))));
|
|
1045
|
+
let b, w, S;
|
|
1046
|
+
$(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));
|
|
1047
|
+
let k = !1;
|
|
1048
|
+
const N = fe(e, t, () => k = !0, () => h = !0);
|
|
1049
|
+
let A = " ";
|
|
1050
|
+
if (u || b || w) {
|
|
1051
|
+
if (A = b ? `
|
|
1052
|
+
` : "", w) {
|
|
1053
|
+
const I = c(w);
|
|
1054
|
+
A += `
|
|
1063
1055
|
${U(I, t.indent)}`;
|
|
1064
1056
|
}
|
|
1065
|
-
|
|
1066
|
-
` && (
|
|
1057
|
+
N === "" && !t.inFlow ? A === `
|
|
1058
|
+
` && (A = `
|
|
1067
1059
|
|
|
1068
|
-
`) :
|
|
1060
|
+
`) : A += `
|
|
1069
1061
|
${t.indent}`;
|
|
1070
|
-
} else if (!
|
|
1071
|
-
const I =
|
|
1062
|
+
} else if (!m && L(e)) {
|
|
1063
|
+
const I = N[0], g = N.indexOf(`
|
|
1072
1064
|
`), _ = g !== -1, J = t.inFlow ?? e.flow ?? e.items.length === 0;
|
|
1073
1065
|
if (_ || !J) {
|
|
1074
1066
|
let te = !1;
|
|
1075
1067
|
if (_ && (I === "&" || I === "!")) {
|
|
1076
|
-
let C =
|
|
1077
|
-
I === "&" && C !== -1 && C < g &&
|
|
1068
|
+
let C = N.indexOf(" ");
|
|
1069
|
+
I === "&" && C !== -1 && C < g && N[C + 1] === "!" && (C = N.indexOf(" ", C + 1)), (C === -1 || g < C) && (te = !0);
|
|
1078
1070
|
}
|
|
1079
|
-
te || (
|
|
1071
|
+
te || (A = `
|
|
1080
1072
|
${t.indent}`);
|
|
1081
1073
|
}
|
|
1082
|
-
} else (
|
|
1083
|
-
`) && (
|
|
1084
|
-
return
|
|
1074
|
+
} else (N === "" || N[0] === `
|
|
1075
|
+
`) && (A = "");
|
|
1076
|
+
return p += A + N, t.inFlow ? k && n && n() : S && !k ? p += H(p, t.indent, c(S)) : h && i && i(), p;
|
|
1085
1077
|
}
|
|
1086
|
-
function
|
|
1078
|
+
function xt(s, e) {
|
|
1087
1079
|
(s === "debug" || s === "warn") && console.warn(e);
|
|
1088
1080
|
}
|
|
1089
1081
|
const Te = "<<", V = {
|
|
@@ -1091,13 +1083,13 @@ const Te = "<<", V = {
|
|
|
1091
1083
|
default: "key",
|
|
1092
1084
|
tag: "tag:yaml.org,2002:merge",
|
|
1093
1085
|
test: /^<<$/,
|
|
1094
|
-
resolve: () => Object.assign(new
|
|
1086
|
+
resolve: () => Object.assign(new O(Symbol(Te)), {
|
|
1095
1087
|
addToJSMap: Zt
|
|
1096
1088
|
}),
|
|
1097
1089
|
stringify: () => Te
|
|
1098
|
-
}, Js = (s, e) => (V.identify(e) || E(e) && (!e.type || e.type ===
|
|
1090
|
+
}, 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);
|
|
1099
1091
|
function Zt(s, e, t) {
|
|
1100
|
-
if (t = s &&
|
|
1092
|
+
if (t = s && W(t) ? t.resolve(s.doc) : t, pe(t))
|
|
1101
1093
|
for (const n of t.items)
|
|
1102
1094
|
et(s, e, n);
|
|
1103
1095
|
else if (Array.isArray(t))
|
|
@@ -1107,7 +1099,7 @@ function Zt(s, e, t) {
|
|
|
1107
1099
|
et(s, e, t);
|
|
1108
1100
|
}
|
|
1109
1101
|
function et(s, e, t) {
|
|
1110
|
-
const n = s &&
|
|
1102
|
+
const n = s && W(t) ? t.resolve(s.doc) : t;
|
|
1111
1103
|
if (!de(n))
|
|
1112
1104
|
throw new Error("Merge sources must be maps or map aliases");
|
|
1113
1105
|
const i = n.toJSON(null, s, Map);
|
|
@@ -1120,19 +1112,19 @@ function et(s, e, t) {
|
|
|
1120
1112
|
});
|
|
1121
1113
|
return e;
|
|
1122
1114
|
}
|
|
1123
|
-
function
|
|
1115
|
+
function es(s, e, { key: t, value: n }) {
|
|
1124
1116
|
if ($(t) && t.addToJSMap)
|
|
1125
1117
|
t.addToJSMap(s, e, n);
|
|
1126
1118
|
else if (Js(s, t))
|
|
1127
1119
|
Zt(s, e, n);
|
|
1128
1120
|
else {
|
|
1129
|
-
const i =
|
|
1121
|
+
const i = j(t, "", s);
|
|
1130
1122
|
if (e instanceof Map)
|
|
1131
|
-
e.set(i,
|
|
1123
|
+
e.set(i, j(n, i, s));
|
|
1132
1124
|
else if (e instanceof Set)
|
|
1133
1125
|
e.add(i);
|
|
1134
1126
|
else {
|
|
1135
|
-
const r = Ys(t, i, s), o =
|
|
1127
|
+
const r = Ys(t, i, s), o = j(n, r, s);
|
|
1136
1128
|
r in e ? Object.defineProperty(e, r, {
|
|
1137
1129
|
value: o,
|
|
1138
1130
|
writable: !0,
|
|
@@ -1148,8 +1140,8 @@ function Ys(s, e, t) {
|
|
|
1148
1140
|
return "";
|
|
1149
1141
|
if (typeof e != "object")
|
|
1150
1142
|
return String(e);
|
|
1151
|
-
if ($(s) &&
|
|
1152
|
-
const n =
|
|
1143
|
+
if ($(s) && t?.doc) {
|
|
1144
|
+
const n = zt(t.doc, {});
|
|
1153
1145
|
n.anchors = /* @__PURE__ */ new Set();
|
|
1154
1146
|
for (const r of t.anchors.keys())
|
|
1155
1147
|
n.anchors.add(r.anchor);
|
|
@@ -1157,7 +1149,7 @@ function Ys(s, e, t) {
|
|
|
1157
1149
|
const i = s.toString(n);
|
|
1158
1150
|
if (!t.mapKeyWarned) {
|
|
1159
1151
|
let r = JSON.stringify(i);
|
|
1160
|
-
r.length > 40 && (r = r.substring(0, 36) + '..."'),
|
|
1152
|
+
r.length > 40 && (r = r.substring(0, 36) + '..."'), xt(t.doc.options.logLevel, `Keys with collection values will be stringified due to JS Object restrictions: ${r}. Set mapAsMap: true to use object keys.`), t.mapKeyWarned = !0;
|
|
1161
1153
|
}
|
|
1162
1154
|
return i;
|
|
1163
1155
|
}
|
|
@@ -1169,54 +1161,54 @@ function mt(s, e, t) {
|
|
|
1169
1161
|
}
|
|
1170
1162
|
class v {
|
|
1171
1163
|
constructor(e, t = null) {
|
|
1172
|
-
Object.defineProperty(this,
|
|
1164
|
+
Object.defineProperty(this, P, { value: qt }), this.key = e, this.value = t;
|
|
1173
1165
|
}
|
|
1174
1166
|
clone(e) {
|
|
1175
1167
|
let { key: t, value: n } = this;
|
|
1176
1168
|
return $(t) && (t = t.clone(e)), $(n) && (n = n.clone(e)), new v(t, n);
|
|
1177
1169
|
}
|
|
1178
1170
|
toJSON(e, t) {
|
|
1179
|
-
const n = t
|
|
1180
|
-
return
|
|
1171
|
+
const n = t?.mapAsMap ? /* @__PURE__ */ new Map() : {};
|
|
1172
|
+
return es(t, n, this);
|
|
1181
1173
|
}
|
|
1182
1174
|
toString(e, t, n) {
|
|
1183
|
-
return e
|
|
1175
|
+
return e?.doc ? Vs(this, e, t, n) : JSON.stringify(this);
|
|
1184
1176
|
}
|
|
1185
1177
|
}
|
|
1186
|
-
function
|
|
1178
|
+
function ts(s, e, t) {
|
|
1187
1179
|
return (e.inFlow ?? s.flow ? Qs : Gs)(s, e, t);
|
|
1188
1180
|
}
|
|
1189
1181
|
function Gs({ comment: s, items: e }, t, { blockItemPrefix: n, flowChars: i, itemIndent: r, onChompKeep: o, onComment: l }) {
|
|
1190
|
-
const { indent: a, options: { commentString: c } } = t,
|
|
1182
|
+
const { indent: a, options: { commentString: c } } = t, d = Object.assign({}, t, { indent: r, type: null });
|
|
1191
1183
|
let f = !1;
|
|
1192
|
-
const
|
|
1184
|
+
const u = [];
|
|
1193
1185
|
for (let y = 0; y < e.length; ++y) {
|
|
1194
|
-
const
|
|
1195
|
-
let
|
|
1196
|
-
if ($(
|
|
1197
|
-
!f &&
|
|
1198
|
-
else if (T(
|
|
1199
|
-
const
|
|
1200
|
-
|
|
1186
|
+
const h = e[y];
|
|
1187
|
+
let p = null;
|
|
1188
|
+
if ($(h))
|
|
1189
|
+
!f && h.spaceBefore && u.push(""), Pe(t, u, h.commentBefore, f), h.comment && (p = h.comment);
|
|
1190
|
+
else if (T(h)) {
|
|
1191
|
+
const w = $(h.key) ? h.key : null;
|
|
1192
|
+
w && (!f && w.spaceBefore && u.push(""), Pe(t, u, w.commentBefore, f));
|
|
1201
1193
|
}
|
|
1202
1194
|
f = !1;
|
|
1203
|
-
let b = fe(
|
|
1204
|
-
|
|
1195
|
+
let b = fe(h, d, () => p = null, () => f = !0);
|
|
1196
|
+
p && (b += H(b, r, c(p))), f && p && (f = !1), u.push(n + b);
|
|
1205
1197
|
}
|
|
1206
|
-
let
|
|
1207
|
-
if (
|
|
1208
|
-
|
|
1198
|
+
let m;
|
|
1199
|
+
if (u.length === 0)
|
|
1200
|
+
m = i.start + i.end;
|
|
1209
1201
|
else {
|
|
1210
|
-
|
|
1211
|
-
for (let y = 1; y <
|
|
1212
|
-
const
|
|
1213
|
-
|
|
1214
|
-
${a}${
|
|
1202
|
+
m = u[0];
|
|
1203
|
+
for (let y = 1; y < u.length; ++y) {
|
|
1204
|
+
const h = u[y];
|
|
1205
|
+
m += h ? `
|
|
1206
|
+
${a}${h}` : `
|
|
1215
1207
|
`;
|
|
1216
1208
|
}
|
|
1217
1209
|
}
|
|
1218
|
-
return s ? (
|
|
1219
|
-
` + U(c(s), a), l && l()) : f && o && o(),
|
|
1210
|
+
return s ? (m += `
|
|
1211
|
+
` + U(c(s), a), l && l()) : f && o && o(), m;
|
|
1220
1212
|
}
|
|
1221
1213
|
function Qs({ items: s }, e, { flowChars: t, itemIndent: n }) {
|
|
1222
1214
|
const { indent: i, indentStep: r, flowCollectionPadding: o, options: { commentString: l } } = e;
|
|
@@ -1226,43 +1218,43 @@ function Qs({ items: s }, e, { flowChars: t, itemIndent: n }) {
|
|
|
1226
1218
|
inFlow: !0,
|
|
1227
1219
|
type: null
|
|
1228
1220
|
});
|
|
1229
|
-
let c = !1,
|
|
1221
|
+
let c = !1, d = 0;
|
|
1230
1222
|
const f = [];
|
|
1231
1223
|
for (let y = 0; y < s.length; ++y) {
|
|
1232
|
-
const
|
|
1233
|
-
let
|
|
1234
|
-
if ($(
|
|
1235
|
-
|
|
1236
|
-
else if (T(
|
|
1237
|
-
const
|
|
1238
|
-
|
|
1239
|
-
const
|
|
1240
|
-
|
|
1224
|
+
const h = s[y];
|
|
1225
|
+
let p = null;
|
|
1226
|
+
if ($(h))
|
|
1227
|
+
h.spaceBefore && f.push(""), Pe(e, f, h.commentBefore, !1), h.comment && (p = h.comment);
|
|
1228
|
+
else if (T(h)) {
|
|
1229
|
+
const w = $(h.key) ? h.key : null;
|
|
1230
|
+
w && (w.spaceBefore && f.push(""), Pe(e, f, w.commentBefore, !1), w.comment && (c = !0));
|
|
1231
|
+
const S = $(h.value) ? h.value : null;
|
|
1232
|
+
S ? (S.comment && (p = S.comment), S.commentBefore && (c = !0)) : h.value == null && w?.comment && (p = w.comment);
|
|
1241
1233
|
}
|
|
1242
|
-
|
|
1243
|
-
let b = fe(
|
|
1244
|
-
y < s.length - 1 && (b += ","),
|
|
1245
|
-
`)) && (c = !0), f.push(b),
|
|
1234
|
+
p && (c = !0);
|
|
1235
|
+
let b = fe(h, a, () => p = null);
|
|
1236
|
+
y < s.length - 1 && (b += ","), p && (b += H(b, n, l(p))), !c && (f.length > d || b.includes(`
|
|
1237
|
+
`)) && (c = !0), f.push(b), d = f.length;
|
|
1246
1238
|
}
|
|
1247
|
-
const { start:
|
|
1239
|
+
const { start: u, end: m } = t;
|
|
1248
1240
|
if (f.length === 0)
|
|
1249
|
-
return
|
|
1241
|
+
return u + m;
|
|
1250
1242
|
if (!c) {
|
|
1251
|
-
const y = f.reduce((
|
|
1243
|
+
const y = f.reduce((h, p) => h + p.length + 2, 2);
|
|
1252
1244
|
c = e.options.lineWidth > 0 && y > e.options.lineWidth;
|
|
1253
1245
|
}
|
|
1254
1246
|
if (c) {
|
|
1255
|
-
let y =
|
|
1256
|
-
for (const
|
|
1257
|
-
y +=
|
|
1258
|
-
${r}${i}${
|
|
1247
|
+
let y = u;
|
|
1248
|
+
for (const h of f)
|
|
1249
|
+
y += h ? `
|
|
1250
|
+
${r}${i}${h}` : `
|
|
1259
1251
|
`;
|
|
1260
1252
|
return `${y}
|
|
1261
|
-
${i}${
|
|
1253
|
+
${i}${m}`;
|
|
1262
1254
|
} else
|
|
1263
|
-
return `${
|
|
1255
|
+
return `${u}${o}${f.join(" ")}${o}${m}`;
|
|
1264
1256
|
}
|
|
1265
|
-
function
|
|
1257
|
+
function Pe({ indent: s, options: { commentString: e } }, t, n, i) {
|
|
1266
1258
|
if (n && i && (n = n.replace(/^\n+/, "")), n) {
|
|
1267
1259
|
const r = U(e(n), s);
|
|
1268
1260
|
t.push(r.trimStart());
|
|
@@ -1274,12 +1266,12 @@ function X(s, e) {
|
|
|
1274
1266
|
if (T(n) && (n.key === e || n.key === t || E(n.key) && n.key.value === t))
|
|
1275
1267
|
return n;
|
|
1276
1268
|
}
|
|
1277
|
-
class K extends
|
|
1269
|
+
class K extends Ht {
|
|
1278
1270
|
static get tagName() {
|
|
1279
1271
|
return "tag:yaml.org,2002:map";
|
|
1280
1272
|
}
|
|
1281
1273
|
constructor(e) {
|
|
1282
|
-
super(
|
|
1274
|
+
super(G, e), this.items = [];
|
|
1283
1275
|
}
|
|
1284
1276
|
/**
|
|
1285
1277
|
* A generic collection parsing method that can be extended
|
|
@@ -1308,17 +1300,16 @@ class K extends Wt {
|
|
|
1308
1300
|
* collection will throw. Otherwise, overwrites the previous value.
|
|
1309
1301
|
*/
|
|
1310
1302
|
add(e, t) {
|
|
1311
|
-
var o;
|
|
1312
1303
|
let n;
|
|
1313
|
-
T(e) ? n = e : !e || typeof e != "object" || !("key" in e) ? n = new v(e, e
|
|
1314
|
-
const i = X(this.items, n.key), r =
|
|
1304
|
+
T(e) ? n = e : !e || typeof e != "object" || !("key" in e) ? n = new v(e, e?.value) : n = new v(e.key, e.value);
|
|
1305
|
+
const i = X(this.items, n.key), r = this.schema?.sortMapEntries;
|
|
1315
1306
|
if (i) {
|
|
1316
1307
|
if (!t)
|
|
1317
1308
|
throw new Error(`Key ${n.key} already set`);
|
|
1318
|
-
E(i.value) &&
|
|
1309
|
+
E(i.value) && Wt(n.value) ? i.value.value = n.value : i.value = n.value;
|
|
1319
1310
|
} else if (r) {
|
|
1320
|
-
const
|
|
1321
|
-
|
|
1311
|
+
const o = this.items.findIndex((l) => r(n, l) < 0);
|
|
1312
|
+
o === -1 ? this.items.push(n) : this.items.splice(o, 0, n);
|
|
1322
1313
|
} else
|
|
1323
1314
|
this.items.push(n);
|
|
1324
1315
|
}
|
|
@@ -1327,7 +1318,7 @@ class K extends Wt {
|
|
|
1327
1318
|
return t ? this.items.splice(this.items.indexOf(t), 1).length > 0 : !1;
|
|
1328
1319
|
}
|
|
1329
1320
|
get(e, t) {
|
|
1330
|
-
const
|
|
1321
|
+
const i = X(this.items, e)?.value;
|
|
1331
1322
|
return (!t && E(i) ? i.value : i) ?? void 0;
|
|
1332
1323
|
}
|
|
1333
1324
|
has(e) {
|
|
@@ -1342,10 +1333,10 @@ class K extends Wt {
|
|
|
1342
1333
|
* @returns Instance of Type, Map, or Object
|
|
1343
1334
|
*/
|
|
1344
1335
|
toJSON(e, t, n) {
|
|
1345
|
-
const i = n ? new n() : t
|
|
1346
|
-
t
|
|
1336
|
+
const i = n ? new n() : t?.mapAsMap ? /* @__PURE__ */ new Map() : {};
|
|
1337
|
+
t?.onCreate && t.onCreate(i);
|
|
1347
1338
|
for (const r of this.items)
|
|
1348
|
-
|
|
1339
|
+
es(t, i, r);
|
|
1349
1340
|
return i;
|
|
1350
1341
|
}
|
|
1351
1342
|
toString(e, t, n) {
|
|
@@ -1354,7 +1345,7 @@ class K extends Wt {
|
|
|
1354
1345
|
for (const i of this.items)
|
|
1355
1346
|
if (!T(i))
|
|
1356
1347
|
throw new Error(`Map items must all be pairs; found ${JSON.stringify(i)} instead`);
|
|
1357
|
-
return !e.allNullValues && this.hasAllNullValues(!1) && (e = Object.assign({}, e, { allNullValues: !0 })),
|
|
1348
|
+
return !e.allNullValues && this.hasAllNullValues(!1) && (e = Object.assign({}, e, { allNullValues: !0 })), ts(this, e, {
|
|
1358
1349
|
blockItemPrefix: "",
|
|
1359
1350
|
flowChars: { start: "{", end: "}" },
|
|
1360
1351
|
itemIndent: e.indent || "",
|
|
@@ -1373,7 +1364,7 @@ const me = {
|
|
|
1373
1364
|
},
|
|
1374
1365
|
createNode: (s, e, t) => K.from(s, e, t)
|
|
1375
1366
|
};
|
|
1376
|
-
class Q extends
|
|
1367
|
+
class Q extends Ht {
|
|
1377
1368
|
static get tagName() {
|
|
1378
1369
|
return "tag:yaml.org,2002:seq";
|
|
1379
1370
|
}
|
|
@@ -1424,18 +1415,18 @@ class Q extends Wt {
|
|
|
1424
1415
|
if (typeof n != "number")
|
|
1425
1416
|
throw new Error(`Expected a valid index, not ${e}.`);
|
|
1426
1417
|
const i = this.items[n];
|
|
1427
|
-
E(i) &&
|
|
1418
|
+
E(i) && Wt(t) ? i.value = t : this.items[n] = t;
|
|
1428
1419
|
}
|
|
1429
1420
|
toJSON(e, t) {
|
|
1430
1421
|
const n = [];
|
|
1431
|
-
t
|
|
1422
|
+
t?.onCreate && t.onCreate(n);
|
|
1432
1423
|
let i = 0;
|
|
1433
1424
|
for (const r of this.items)
|
|
1434
|
-
n.push(
|
|
1425
|
+
n.push(j(r, String(i++), t));
|
|
1435
1426
|
return n;
|
|
1436
1427
|
}
|
|
1437
1428
|
toString(e, t, n) {
|
|
1438
|
-
return e ?
|
|
1429
|
+
return e ? ts(this, e, {
|
|
1439
1430
|
blockItemPrefix: "- ",
|
|
1440
1431
|
flowChars: { start: "[", end: "]" },
|
|
1441
1432
|
itemIndent: (e.indent || "") + " ",
|
|
@@ -1481,18 +1472,18 @@ const ye = {
|
|
|
1481
1472
|
}
|
|
1482
1473
|
}, Ge = {
|
|
1483
1474
|
identify: (s) => s == null,
|
|
1484
|
-
createNode: () => new
|
|
1475
|
+
createNode: () => new O(null),
|
|
1485
1476
|
default: !0,
|
|
1486
1477
|
tag: "tag:yaml.org,2002:null",
|
|
1487
1478
|
test: /^(?:~|[Nn]ull|NULL)?$/,
|
|
1488
|
-
resolve: () => new
|
|
1479
|
+
resolve: () => new O(null),
|
|
1489
1480
|
stringify: ({ source: s }, e) => typeof s == "string" && Ge.test.test(s) ? s : e.options.nullStr
|
|
1490
1481
|
}, yt = {
|
|
1491
1482
|
identify: (s) => typeof s == "boolean",
|
|
1492
1483
|
default: !0,
|
|
1493
1484
|
tag: "tag:yaml.org,2002:bool",
|
|
1494
1485
|
test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,
|
|
1495
|
-
resolve: (s) => new
|
|
1486
|
+
resolve: (s) => new O(s[0] === "t" || s[0] === "T"),
|
|
1496
1487
|
stringify({ source: s, value: e }, t) {
|
|
1497
1488
|
if (s && yt.test.test(s)) {
|
|
1498
1489
|
const n = s[0] === "t" || s[0] === "T";
|
|
@@ -1518,14 +1509,14 @@ function q({ format: s, minFractionDigits: e, tag: t, value: n }) {
|
|
|
1518
1509
|
}
|
|
1519
1510
|
return r;
|
|
1520
1511
|
}
|
|
1521
|
-
const
|
|
1512
|
+
const ss = {
|
|
1522
1513
|
identify: (s) => typeof s == "number",
|
|
1523
1514
|
default: !0,
|
|
1524
1515
|
tag: "tag:yaml.org,2002:float",
|
|
1525
1516
|
test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,
|
|
1526
1517
|
resolve: (s) => s.slice(-3).toLowerCase() === "nan" ? NaN : s[0] === "-" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY,
|
|
1527
1518
|
stringify: q
|
|
1528
|
-
},
|
|
1519
|
+
}, ns = {
|
|
1529
1520
|
identify: (s) => typeof s == "number",
|
|
1530
1521
|
default: !0,
|
|
1531
1522
|
tag: "tag:yaml.org,2002:float",
|
|
@@ -1536,56 +1527,56 @@ const ts = {
|
|
|
1536
1527
|
const e = Number(s.value);
|
|
1537
1528
|
return isFinite(e) ? e.toExponential() : q(s);
|
|
1538
1529
|
}
|
|
1539
|
-
},
|
|
1530
|
+
}, is = {
|
|
1540
1531
|
identify: (s) => typeof s == "number",
|
|
1541
1532
|
default: !0,
|
|
1542
1533
|
tag: "tag:yaml.org,2002:float",
|
|
1543
1534
|
test: /^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,
|
|
1544
1535
|
resolve(s) {
|
|
1545
|
-
const e = new
|
|
1536
|
+
const e = new O(parseFloat(s)), t = s.indexOf(".");
|
|
1546
1537
|
return t !== -1 && s[s.length - 1] === "0" && (e.minFractionDigits = s.length - t - 1), e;
|
|
1547
1538
|
},
|
|
1548
1539
|
stringify: q
|
|
1549
1540
|
}, Qe = (s) => typeof s == "bigint" || Number.isInteger(s), gt = (s, e, t, { intAsBigInt: n }) => n ? BigInt(s) : parseInt(s.substring(e), t);
|
|
1550
|
-
function
|
|
1541
|
+
function rs(s, e, t) {
|
|
1551
1542
|
const { value: n } = s;
|
|
1552
1543
|
return Qe(n) && n >= 0 ? t + n.toString(e) : q(s);
|
|
1553
1544
|
}
|
|
1554
|
-
const
|
|
1545
|
+
const os = {
|
|
1555
1546
|
identify: (s) => Qe(s) && s >= 0,
|
|
1556
1547
|
default: !0,
|
|
1557
1548
|
tag: "tag:yaml.org,2002:int",
|
|
1558
1549
|
format: "OCT",
|
|
1559
1550
|
test: /^0o[0-7]+$/,
|
|
1560
1551
|
resolve: (s, e, t) => gt(s, 2, 8, t),
|
|
1561
|
-
stringify: (s) =>
|
|
1562
|
-
},
|
|
1552
|
+
stringify: (s) => rs(s, 8, "0o")
|
|
1553
|
+
}, ls = {
|
|
1563
1554
|
identify: Qe,
|
|
1564
1555
|
default: !0,
|
|
1565
1556
|
tag: "tag:yaml.org,2002:int",
|
|
1566
1557
|
test: /^[-+]?[0-9]+$/,
|
|
1567
1558
|
resolve: (s, e, t) => gt(s, 0, 10, t),
|
|
1568
1559
|
stringify: q
|
|
1569
|
-
},
|
|
1560
|
+
}, as = {
|
|
1570
1561
|
identify: (s) => Qe(s) && s >= 0,
|
|
1571
1562
|
default: !0,
|
|
1572
1563
|
tag: "tag:yaml.org,2002:int",
|
|
1573
1564
|
format: "HEX",
|
|
1574
1565
|
test: /^0x[0-9a-fA-F]+$/,
|
|
1575
1566
|
resolve: (s, e, t) => gt(s, 2, 16, t),
|
|
1576
|
-
stringify: (s) =>
|
|
1567
|
+
stringify: (s) => rs(s, 16, "0x")
|
|
1577
1568
|
}, Ws = [
|
|
1578
1569
|
me,
|
|
1579
1570
|
ye,
|
|
1580
1571
|
Ye,
|
|
1581
1572
|
Ge,
|
|
1582
1573
|
yt,
|
|
1583
|
-
rs,
|
|
1584
1574
|
os,
|
|
1585
1575
|
ls,
|
|
1586
|
-
|
|
1576
|
+
as,
|
|
1587
1577
|
ss,
|
|
1588
|
-
ns
|
|
1578
|
+
ns,
|
|
1579
|
+
is
|
|
1589
1580
|
];
|
|
1590
1581
|
function _t(s) {
|
|
1591
1582
|
return typeof s == "bigint" || Number.isInteger(s);
|
|
@@ -1600,7 +1591,7 @@ const $e = ({ value: s }) => JSON.stringify(s), Hs = [
|
|
|
1600
1591
|
},
|
|
1601
1592
|
{
|
|
1602
1593
|
identify: (s) => s == null,
|
|
1603
|
-
createNode: () => new
|
|
1594
|
+
createNode: () => new O(null),
|
|
1604
1595
|
default: !0,
|
|
1605
1596
|
tag: "tag:yaml.org,2002:null",
|
|
1606
1597
|
test: /^null$/,
|
|
@@ -1661,6 +1652,8 @@ const $e = ({ value: s }) => JSON.stringify(s), Hs = [
|
|
|
1661
1652
|
return e("This environment does not support reading binary tags; either Buffer or atob is required"), s;
|
|
1662
1653
|
},
|
|
1663
1654
|
stringify({ comment: s, type: e, value: t }, n, i, r) {
|
|
1655
|
+
if (!t)
|
|
1656
|
+
return "";
|
|
1664
1657
|
const o = t;
|
|
1665
1658
|
let l;
|
|
1666
1659
|
if (typeof btoa == "function") {
|
|
@@ -1670,24 +1663,24 @@ const $e = ({ value: s }) => JSON.stringify(s), Hs = [
|
|
|
1670
1663
|
l = btoa(a);
|
|
1671
1664
|
} else
|
|
1672
1665
|
throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");
|
|
1673
|
-
if (e
|
|
1674
|
-
const a = Math.max(n.options.lineWidth - n.indent.length, n.options.minContentWidth), c = Math.ceil(l.length / a),
|
|
1675
|
-
for (let f = 0,
|
|
1676
|
-
|
|
1677
|
-
l =
|
|
1666
|
+
if (e ?? (e = O.BLOCK_LITERAL), e !== O.QUOTE_DOUBLE) {
|
|
1667
|
+
const a = Math.max(n.options.lineWidth - n.indent.length, n.options.minContentWidth), c = Math.ceil(l.length / a), d = new Array(c);
|
|
1668
|
+
for (let f = 0, u = 0; f < c; ++f, u += a)
|
|
1669
|
+
d[f] = l.substr(u, a);
|
|
1670
|
+
l = d.join(e === O.BLOCK_LITERAL ? `
|
|
1678
1671
|
` : " ");
|
|
1679
1672
|
}
|
|
1680
1673
|
return Ae({ comment: s, type: e, value: l }, n, i, r);
|
|
1681
1674
|
}
|
|
1682
1675
|
};
|
|
1683
|
-
function
|
|
1676
|
+
function cs(s, e) {
|
|
1684
1677
|
if (pe(s))
|
|
1685
1678
|
for (let t = 0; t < s.items.length; ++t) {
|
|
1686
1679
|
let n = s.items[t];
|
|
1687
1680
|
if (!T(n)) {
|
|
1688
1681
|
if (de(n)) {
|
|
1689
1682
|
n.items.length > 1 && e("Each pair must have its own sequence indicator");
|
|
1690
|
-
const i = n.items[0] || new v(new
|
|
1683
|
+
const i = n.items[0] || new v(new O(null));
|
|
1691
1684
|
if (n.commentBefore && (i.key.commentBefore = i.key.commentBefore ? `${n.commentBefore}
|
|
1692
1685
|
${i.key.commentBefore}` : n.commentBefore), n.comment) {
|
|
1693
1686
|
const r = i.value ?? i.key;
|
|
@@ -1703,7 +1696,7 @@ ${r.comment}` : n.comment;
|
|
|
1703
1696
|
e("Expected a sequence for this tag");
|
|
1704
1697
|
return s;
|
|
1705
1698
|
}
|
|
1706
|
-
function
|
|
1699
|
+
function fs(s, e, t) {
|
|
1707
1700
|
const { replacer: n } = t, i = new Q(s);
|
|
1708
1701
|
i.tag = "tag:yaml.org,2002:pairs";
|
|
1709
1702
|
let r = 0;
|
|
@@ -1732,8 +1725,8 @@ const wt = {
|
|
|
1732
1725
|
collection: "seq",
|
|
1733
1726
|
default: !1,
|
|
1734
1727
|
tag: "tag:yaml.org,2002:pairs",
|
|
1735
|
-
resolve:
|
|
1736
|
-
createNode:
|
|
1728
|
+
resolve: cs,
|
|
1729
|
+
createNode: fs
|
|
1737
1730
|
};
|
|
1738
1731
|
class ae extends Q {
|
|
1739
1732
|
constructor() {
|
|
@@ -1747,17 +1740,17 @@ class ae extends Q {
|
|
|
1747
1740
|
if (!t)
|
|
1748
1741
|
return super.toJSON(e);
|
|
1749
1742
|
const n = /* @__PURE__ */ new Map();
|
|
1750
|
-
t
|
|
1743
|
+
t?.onCreate && t.onCreate(n);
|
|
1751
1744
|
for (const i of this.items) {
|
|
1752
1745
|
let r, o;
|
|
1753
|
-
if (T(i) ? (r =
|
|
1746
|
+
if (T(i) ? (r = j(i.key, "", t), o = j(i.value, r, t)) : r = j(i, "", t), n.has(r))
|
|
1754
1747
|
throw new Error("Ordered maps must not include duplicate keys");
|
|
1755
1748
|
n.set(r, o);
|
|
1756
1749
|
}
|
|
1757
1750
|
return n;
|
|
1758
1751
|
}
|
|
1759
1752
|
static from(e, t, n) {
|
|
1760
|
-
const i =
|
|
1753
|
+
const i = fs(e, t, n), r = new this();
|
|
1761
1754
|
return r.items = i.items, r;
|
|
1762
1755
|
}
|
|
1763
1756
|
}
|
|
@@ -1769,38 +1762,38 @@ const St = {
|
|
|
1769
1762
|
default: !1,
|
|
1770
1763
|
tag: "tag:yaml.org,2002:omap",
|
|
1771
1764
|
resolve(s, e) {
|
|
1772
|
-
const t =
|
|
1765
|
+
const t = cs(s, e), n = [];
|
|
1773
1766
|
for (const { key: i } of t.items)
|
|
1774
1767
|
E(i) && (n.includes(i.value) ? e(`Ordered maps must not include duplicate keys: ${i.value}`) : n.push(i.value));
|
|
1775
1768
|
return Object.assign(new ae(), t);
|
|
1776
1769
|
},
|
|
1777
1770
|
createNode: (s, e, t) => ae.from(s, e, t)
|
|
1778
1771
|
};
|
|
1779
|
-
function
|
|
1780
|
-
return e && (s ?
|
|
1772
|
+
function us({ value: s, source: e }, t) {
|
|
1773
|
+
return e && (s ? hs : ds).test.test(e) ? e : s ? t.options.trueStr : t.options.falseStr;
|
|
1781
1774
|
}
|
|
1782
|
-
const
|
|
1775
|
+
const hs = {
|
|
1783
1776
|
identify: (s) => s === !0,
|
|
1784
1777
|
default: !0,
|
|
1785
1778
|
tag: "tag:yaml.org,2002:bool",
|
|
1786
1779
|
test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,
|
|
1787
|
-
resolve: () => new
|
|
1788
|
-
stringify:
|
|
1789
|
-
},
|
|
1780
|
+
resolve: () => new O(!0),
|
|
1781
|
+
stringify: us
|
|
1782
|
+
}, ds = {
|
|
1790
1783
|
identify: (s) => s === !1,
|
|
1791
1784
|
default: !0,
|
|
1792
1785
|
tag: "tag:yaml.org,2002:bool",
|
|
1793
1786
|
test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,
|
|
1794
|
-
resolve: () => new
|
|
1795
|
-
stringify:
|
|
1796
|
-
},
|
|
1787
|
+
resolve: () => new O(!1),
|
|
1788
|
+
stringify: us
|
|
1789
|
+
}, xs = {
|
|
1797
1790
|
identify: (s) => typeof s == "number",
|
|
1798
1791
|
default: !0,
|
|
1799
1792
|
tag: "tag:yaml.org,2002:float",
|
|
1800
1793
|
test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,
|
|
1801
1794
|
resolve: (s) => s.slice(-3).toLowerCase() === "nan" ? NaN : s[0] === "-" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY,
|
|
1802
1795
|
stringify: q
|
|
1803
|
-
},
|
|
1796
|
+
}, Zs = {
|
|
1804
1797
|
identify: (s) => typeof s == "number",
|
|
1805
1798
|
default: !0,
|
|
1806
1799
|
tag: "tag:yaml.org,2002:float",
|
|
@@ -1817,7 +1810,7 @@ const us = {
|
|
|
1817
1810
|
tag: "tag:yaml.org,2002:float",
|
|
1818
1811
|
test: /^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,
|
|
1819
1812
|
resolve(s) {
|
|
1820
|
-
const e = new
|
|
1813
|
+
const e = new O(parseFloat(s.replace(/_/g, ""))), t = s.indexOf(".");
|
|
1821
1814
|
if (t !== -1) {
|
|
1822
1815
|
const n = s.substring(t + 1).replace(/_/g, "");
|
|
1823
1816
|
n[n.length - 1] === "0" && (e.minFractionDigits = n.length);
|
|
@@ -1948,7 +1941,7 @@ function Ot(s, e) {
|
|
|
1948
1941
|
const t = s[0], n = t === "-" || t === "+" ? s.substring(1) : s, i = (o) => e ? BigInt(o) : Number(o), r = n.replace(/_/g, "").split(":").reduce((o, l) => o * i(60) + i(l), i(0));
|
|
1949
1942
|
return t === "-" ? i(-1) * r : r;
|
|
1950
1943
|
}
|
|
1951
|
-
function
|
|
1944
|
+
function ps(s) {
|
|
1952
1945
|
let { value: e } = s, t = (o) => o;
|
|
1953
1946
|
if (typeof e == "bigint")
|
|
1954
1947
|
t = (o) => BigInt(o);
|
|
@@ -1959,22 +1952,22 @@ function ds(s) {
|
|
|
1959
1952
|
const i = t(60), r = [e % i];
|
|
1960
1953
|
return e < 60 ? r.unshift(0) : (e = (e - r[0]) / i, r.unshift(e % i), e >= 60 && (e = (e - r[0]) / i, r.unshift(e))), n + r.map((o) => String(o).padStart(2, "0")).join(":").replace(/000000\d*$/, "");
|
|
1961
1954
|
}
|
|
1962
|
-
const
|
|
1955
|
+
const ms = {
|
|
1963
1956
|
identify: (s) => typeof s == "bigint" || Number.isInteger(s),
|
|
1964
1957
|
default: !0,
|
|
1965
1958
|
tag: "tag:yaml.org,2002:int",
|
|
1966
1959
|
format: "TIME",
|
|
1967
1960
|
test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,
|
|
1968
1961
|
resolve: (s, e, { intAsBigInt: t }) => Ot(s, t),
|
|
1969
|
-
stringify:
|
|
1970
|
-
},
|
|
1962
|
+
stringify: ps
|
|
1963
|
+
}, ys = {
|
|
1971
1964
|
identify: (s) => typeof s == "number",
|
|
1972
1965
|
default: !0,
|
|
1973
1966
|
tag: "tag:yaml.org,2002:float",
|
|
1974
1967
|
format: "TIME",
|
|
1975
1968
|
test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,
|
|
1976
1969
|
resolve: (s) => Ot(s, !1),
|
|
1977
|
-
stringify:
|
|
1970
|
+
stringify: ps
|
|
1978
1971
|
}, He = {
|
|
1979
1972
|
identify: (s) => s instanceof Date,
|
|
1980
1973
|
default: !0,
|
|
@@ -1989,35 +1982,35 @@ const ps = {
|
|
|
1989
1982
|
throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");
|
|
1990
1983
|
const [, t, n, i, r, o, l] = e.map(Number), a = e[7] ? Number((e[7] + "00").substr(1, 3)) : 0;
|
|
1991
1984
|
let c = Date.UTC(t, n - 1, i, r || 0, o || 0, l || 0, a);
|
|
1992
|
-
const
|
|
1993
|
-
if (
|
|
1994
|
-
let f = Ot(
|
|
1985
|
+
const d = e[8];
|
|
1986
|
+
if (d && d !== "Z") {
|
|
1987
|
+
let f = Ot(d, !1);
|
|
1995
1988
|
Math.abs(f) < 30 && (f *= 60), c -= 6e4 * f;
|
|
1996
1989
|
}
|
|
1997
1990
|
return new Date(c);
|
|
1998
1991
|
},
|
|
1999
|
-
stringify: ({ value: s }) => s
|
|
1992
|
+
stringify: ({ value: s }) => s?.toISOString().replace(/(T00:00:00)?\.000Z$/, "") ?? ""
|
|
2000
1993
|
}, Ct = [
|
|
2001
1994
|
me,
|
|
2002
1995
|
ye,
|
|
2003
1996
|
Ye,
|
|
2004
1997
|
Ge,
|
|
2005
|
-
us,
|
|
2006
1998
|
hs,
|
|
1999
|
+
ds,
|
|
2007
2000
|
tn,
|
|
2008
2001
|
sn,
|
|
2009
2002
|
nn,
|
|
2010
2003
|
rn,
|
|
2011
|
-
Zs,
|
|
2012
2004
|
xs,
|
|
2005
|
+
Zs,
|
|
2013
2006
|
en,
|
|
2014
2007
|
bt,
|
|
2015
2008
|
V,
|
|
2016
2009
|
St,
|
|
2017
2010
|
wt,
|
|
2018
2011
|
Nt,
|
|
2019
|
-
ps,
|
|
2020
2012
|
ms,
|
|
2013
|
+
ys,
|
|
2021
2014
|
He
|
|
2022
2015
|
], vt = /* @__PURE__ */ new Map([
|
|
2023
2016
|
["core", Ws],
|
|
@@ -2028,14 +2021,14 @@ const ps = {
|
|
|
2028
2021
|
]), Bt = {
|
|
2029
2022
|
binary: bt,
|
|
2030
2023
|
bool: yt,
|
|
2031
|
-
float:
|
|
2032
|
-
floatExp:
|
|
2033
|
-
floatNaN:
|
|
2034
|
-
floatTime:
|
|
2035
|
-
int:
|
|
2036
|
-
intHex:
|
|
2037
|
-
intOct:
|
|
2038
|
-
intTime:
|
|
2024
|
+
float: is,
|
|
2025
|
+
floatExp: ns,
|
|
2026
|
+
floatNaN: ss,
|
|
2027
|
+
floatTime: ys,
|
|
2028
|
+
int: ls,
|
|
2029
|
+
intHex: as,
|
|
2030
|
+
intOct: os,
|
|
2031
|
+
intTime: ms,
|
|
2039
2032
|
map: me,
|
|
2040
2033
|
merge: V,
|
|
2041
2034
|
null: Ge,
|
|
@@ -2071,7 +2064,7 @@ function tt(s, e, t) {
|
|
|
2071
2064
|
return t && (i = i.concat(V)), i.reduce((r, o) => {
|
|
2072
2065
|
const l = typeof o == "string" ? Bt[o] : o;
|
|
2073
2066
|
if (!l) {
|
|
2074
|
-
const a = JSON.stringify(o), c = Object.keys(Bt).map((
|
|
2067
|
+
const a = JSON.stringify(o), c = Object.keys(Bt).map((d) => JSON.stringify(d)).join(", ");
|
|
2075
2068
|
throw new Error(`Unknown custom tag ${a}; use one of ${c}`);
|
|
2076
2069
|
}
|
|
2077
2070
|
return r.includes(l) || r.push(l), r;
|
|
@@ -2080,7 +2073,7 @@ function tt(s, e, t) {
|
|
|
2080
2073
|
const ln = (s, e) => s.key < e.key ? -1 : s.key > e.key ? 1 : 0;
|
|
2081
2074
|
class Xe {
|
|
2082
2075
|
constructor({ compat: e, customTags: t, merge: n, resolveKnownTags: i, schema: r, sortMapEntries: o, toStringDefaults: l }) {
|
|
2083
|
-
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,
|
|
2076
|
+
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, F, { value: Ye }), Object.defineProperty(this, he, { value: ye }), this.sortMapEntries = typeof o == "function" ? o : o === !0 ? ln : null;
|
|
2084
2077
|
}
|
|
2085
2078
|
clone() {
|
|
2086
2079
|
const e = Object.create(Xe.prototype, Object.getOwnPropertyDescriptors(this));
|
|
@@ -2088,44 +2081,43 @@ class Xe {
|
|
|
2088
2081
|
}
|
|
2089
2082
|
}
|
|
2090
2083
|
function an(s, e) {
|
|
2091
|
-
var a;
|
|
2092
2084
|
const t = [];
|
|
2093
2085
|
let n = e.directives === !0;
|
|
2094
2086
|
if (e.directives !== !1 && s.directives) {
|
|
2095
|
-
const
|
|
2096
|
-
|
|
2087
|
+
const a = s.directives.toString(s);
|
|
2088
|
+
a ? (t.push(a), n = !0) : s.directives.docStart && (n = !0);
|
|
2097
2089
|
}
|
|
2098
2090
|
n && t.push("---");
|
|
2099
|
-
const i =
|
|
2091
|
+
const i = zt(s, e), { commentString: r } = i.options;
|
|
2100
2092
|
if (s.commentBefore) {
|
|
2101
2093
|
t.length !== 1 && t.unshift("");
|
|
2102
|
-
const
|
|
2103
|
-
t.unshift(U(
|
|
2094
|
+
const a = r(s.commentBefore);
|
|
2095
|
+
t.unshift(U(a, ""));
|
|
2104
2096
|
}
|
|
2105
2097
|
let o = !1, l = null;
|
|
2106
2098
|
if (s.contents) {
|
|
2107
2099
|
if ($(s.contents)) {
|
|
2108
2100
|
if (s.contents.spaceBefore && n && t.push(""), s.contents.commentBefore) {
|
|
2109
|
-
const
|
|
2110
|
-
t.push(U(
|
|
2101
|
+
const d = r(s.contents.commentBefore);
|
|
2102
|
+
t.push(U(d, ""));
|
|
2111
2103
|
}
|
|
2112
2104
|
i.forceBlockIndent = !!s.comment, l = s.contents.comment;
|
|
2113
2105
|
}
|
|
2114
|
-
const
|
|
2115
|
-
let
|
|
2116
|
-
l && (
|
|
2106
|
+
const a = l ? void 0 : () => o = !0;
|
|
2107
|
+
let c = fe(s.contents, i, () => l = null, a);
|
|
2108
|
+
l && (c += H(c, "", r(l))), (c[0] === "|" || c[0] === ">") && t[t.length - 1] === "---" ? t[t.length - 1] = `--- ${c}` : t.push(c);
|
|
2117
2109
|
} else
|
|
2118
2110
|
t.push(fe(s.contents, i));
|
|
2119
|
-
if (
|
|
2111
|
+
if (s.directives?.docEnd)
|
|
2120
2112
|
if (s.comment) {
|
|
2121
|
-
const
|
|
2122
|
-
|
|
2123
|
-
`) ? (t.push("..."), t.push(U(
|
|
2113
|
+
const a = r(s.comment);
|
|
2114
|
+
a.includes(`
|
|
2115
|
+
`) ? (t.push("..."), t.push(U(a, ""))) : t.push(`... ${a}`);
|
|
2124
2116
|
} else
|
|
2125
2117
|
t.push("...");
|
|
2126
2118
|
else {
|
|
2127
|
-
let
|
|
2128
|
-
|
|
2119
|
+
let a = s.comment;
|
|
2120
|
+
a && o && (a = a.replace(/^\n+/, "")), a && ((!o || l) && t[t.length - 1] !== "" && t.push(""), t.push(U(r(a), "")));
|
|
2129
2121
|
}
|
|
2130
2122
|
return t.join(`
|
|
2131
2123
|
`) + `
|
|
@@ -2133,7 +2125,7 @@ function an(s, e) {
|
|
|
2133
2125
|
}
|
|
2134
2126
|
class ge {
|
|
2135
2127
|
constructor(e, t, n) {
|
|
2136
|
-
this.commentBefore = null, this.comment = null, this.errors = [], this.warnings = [], Object.defineProperty(this,
|
|
2128
|
+
this.commentBefore = null, this.comment = null, this.errors = [], this.warnings = [], Object.defineProperty(this, P, { value: lt });
|
|
2137
2129
|
let i = null;
|
|
2138
2130
|
typeof t == "function" || Array.isArray(t) ? i = t : n === void 0 && t && (n = t, t = void 0);
|
|
2139
2131
|
const r = Object.assign({
|
|
@@ -2148,7 +2140,7 @@ class ge {
|
|
|
2148
2140
|
}, n);
|
|
2149
2141
|
this.options = r;
|
|
2150
2142
|
let { version: o } = r;
|
|
2151
|
-
n
|
|
2143
|
+
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);
|
|
2152
2144
|
}
|
|
2153
2145
|
/**
|
|
2154
2146
|
* Create a deep copy of this Document and its contents.
|
|
@@ -2157,7 +2149,7 @@ class ge {
|
|
|
2157
2149
|
*/
|
|
2158
2150
|
clone() {
|
|
2159
2151
|
const e = Object.create(ge.prototype, {
|
|
2160
|
-
[
|
|
2152
|
+
[P]: { value: lt }
|
|
2161
2153
|
});
|
|
2162
2154
|
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;
|
|
2163
2155
|
}
|
|
@@ -2180,21 +2172,21 @@ class ge {
|
|
|
2180
2172
|
*/
|
|
2181
2173
|
createAlias(e, t) {
|
|
2182
2174
|
if (!e.anchor) {
|
|
2183
|
-
const n =
|
|
2175
|
+
const n = Gt(this);
|
|
2184
2176
|
e.anchor = // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
|
2185
|
-
!t || n.has(t) ?
|
|
2177
|
+
!t || n.has(t) ? Qt(t || "a", n) : t;
|
|
2186
2178
|
}
|
|
2187
|
-
return new
|
|
2179
|
+
return new Fe(e.anchor);
|
|
2188
2180
|
}
|
|
2189
2181
|
createNode(e, t, n) {
|
|
2190
2182
|
let i;
|
|
2191
2183
|
if (typeof t == "function")
|
|
2192
2184
|
e = t.call({ "": e }, "", e), i = t;
|
|
2193
2185
|
else if (Array.isArray(t)) {
|
|
2194
|
-
const
|
|
2186
|
+
const p = (w) => typeof w == "number" || w instanceof String || w instanceof Number, b = t.filter(p).map(String);
|
|
2195
2187
|
b.length > 0 && (t = t.concat(b)), i = t;
|
|
2196
2188
|
} else n === void 0 && t && (n = t, t = void 0);
|
|
2197
|
-
const { aliasDuplicateObjects: r, anchorPrefix: o, flow: l, keepUndefined: a, onTagObj: c, tag:
|
|
2189
|
+
const { aliasDuplicateObjects: r, anchorPrefix: o, flow: l, keepUndefined: a, onTagObj: c, tag: d } = n ?? {}, { onAnchor: f, setAnchors: u, sourceObjects: m } = Ks(
|
|
2198
2190
|
this,
|
|
2199
2191
|
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
|
2200
2192
|
o || "a"
|
|
@@ -2205,9 +2197,9 @@ class ge {
|
|
|
2205
2197
|
onTagObj: c,
|
|
2206
2198
|
replacer: i,
|
|
2207
2199
|
schema: this.schema,
|
|
2208
|
-
sourceObjects:
|
|
2209
|
-
},
|
|
2210
|
-
return l && L(
|
|
2200
|
+
sourceObjects: m
|
|
2201
|
+
}, h = ke(e, d, y);
|
|
2202
|
+
return l && L(h) && (h.flow = !0), u(), h;
|
|
2211
2203
|
}
|
|
2212
2204
|
/**
|
|
2213
2205
|
* Convert a key and a value into a `Pair` using the current schema,
|
|
@@ -2264,14 +2256,14 @@ class ge {
|
|
|
2264
2256
|
* boolean to add/remove the item from the set.
|
|
2265
2257
|
*/
|
|
2266
2258
|
set(e, t) {
|
|
2267
|
-
this.contents == null ? this.contents =
|
|
2259
|
+
this.contents == null ? this.contents = je(this.schema, [e], t) : se(this.contents) && this.contents.set(e, t);
|
|
2268
2260
|
}
|
|
2269
2261
|
/**
|
|
2270
2262
|
* Sets a value in this document. For `!!set`, `value` needs to be a
|
|
2271
2263
|
* boolean to add/remove the item from the set.
|
|
2272
2264
|
*/
|
|
2273
2265
|
setIn(e, t) {
|
|
2274
|
-
we(e) ? this.contents = t : this.contents == null ? this.contents =
|
|
2266
|
+
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);
|
|
2275
2267
|
}
|
|
2276
2268
|
/**
|
|
2277
2269
|
* Change the YAML version and schema used by the document.
|
|
@@ -2315,10 +2307,10 @@ class ge {
|
|
|
2315
2307
|
mapAsMap: n === !0,
|
|
2316
2308
|
mapKeyWarned: !1,
|
|
2317
2309
|
maxAliasCount: typeof i == "number" ? i : 100
|
|
2318
|
-
}, a =
|
|
2310
|
+
}, a = j(this.contents, t ?? "", l);
|
|
2319
2311
|
if (typeof r == "function")
|
|
2320
|
-
for (const { count: c, res:
|
|
2321
|
-
r(
|
|
2312
|
+
for (const { count: c, res: d } of l.anchors.values())
|
|
2313
|
+
r(d, c);
|
|
2322
2314
|
return typeof o == "function" ? oe(o, { "": a }, "", a) : a;
|
|
2323
2315
|
}
|
|
2324
2316
|
/**
|
|
@@ -2356,7 +2348,7 @@ class z extends At {
|
|
|
2356
2348
|
super("YAMLParseError", e, t, n);
|
|
2357
2349
|
}
|
|
2358
2350
|
}
|
|
2359
|
-
class
|
|
2351
|
+
class gs extends At {
|
|
2360
2352
|
constructor(e, t, n) {
|
|
2361
2353
|
super("YAMLWarning", e, t, n);
|
|
2362
2354
|
}
|
|
@@ -2390,52 +2382,52 @@ ${c}
|
|
|
2390
2382
|
}
|
|
2391
2383
|
};
|
|
2392
2384
|
function ue(s, { flow: e, indicator: t, next: n, offset: i, onError: r, parentIndent: o, startOnNewline: l }) {
|
|
2393
|
-
let a = !1, c = l,
|
|
2385
|
+
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;
|
|
2394
2386
|
for (const g of s)
|
|
2395
|
-
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),
|
|
2387
|
+
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) {
|
|
2396
2388
|
case "space":
|
|
2397
|
-
!e && (t !== "doc-start" ||
|
|
2389
|
+
!e && (t !== "doc-start" || n?.type !== "flow-collection") && g.source.includes(" ") && (h = g), d = !0;
|
|
2398
2390
|
break;
|
|
2399
2391
|
case "comment": {
|
|
2400
|
-
|
|
2392
|
+
d || r(g, "MISSING_CHAR", "Comments must be separated from other tokens by white space characters");
|
|
2401
2393
|
const _ = g.source.substring(1) || " ";
|
|
2402
|
-
f ? f +=
|
|
2394
|
+
f ? f += u + _ : f = _, u = "", c = !1;
|
|
2403
2395
|
break;
|
|
2404
2396
|
}
|
|
2405
2397
|
case "newline":
|
|
2406
|
-
c ? f ? f += g.source : (!
|
|
2398
|
+
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;
|
|
2407
2399
|
break;
|
|
2408
2400
|
case "anchor":
|
|
2409
|
-
|
|
2401
|
+
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 ?? (N = g.offset), c = !1, d = !1, y = !0;
|
|
2410
2402
|
break;
|
|
2411
2403
|
case "tag": {
|
|
2412
|
-
b && r(g, "MULTIPLE_TAGS", "A node can have at most one tag"), b = g,
|
|
2404
|
+
b && r(g, "MULTIPLE_TAGS", "A node can have at most one tag"), b = g, N ?? (N = g.offset), c = !1, d = !1, y = !0;
|
|
2413
2405
|
break;
|
|
2414
2406
|
}
|
|
2415
2407
|
case t:
|
|
2416
|
-
(
|
|
2408
|
+
(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;
|
|
2417
2409
|
break;
|
|
2418
2410
|
case "comma":
|
|
2419
2411
|
if (e) {
|
|
2420
|
-
|
|
2412
|
+
S && r(g, "UNEXPECTED_TOKEN", `Unexpected , in ${e}`), S = g, c = !1, d = !1;
|
|
2421
2413
|
break;
|
|
2422
2414
|
}
|
|
2423
2415
|
// else fallthrough
|
|
2424
2416
|
default:
|
|
2425
|
-
r(g, "UNEXPECTED_TOKEN", `Unexpected ${g.type} token`), c = !1,
|
|
2417
|
+
r(g, "UNEXPECTED_TOKEN", `Unexpected ${g.type} token`), c = !1, d = !1;
|
|
2426
2418
|
}
|
|
2427
|
-
const
|
|
2428
|
-
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"),
|
|
2429
|
-
comma:
|
|
2430
|
-
found:
|
|
2419
|
+
const A = s[s.length - 1], I = A ? A.offset + A.source.length : i;
|
|
2420
|
+
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"), {
|
|
2421
|
+
comma: S,
|
|
2422
|
+
found: k,
|
|
2431
2423
|
spaceBefore: a,
|
|
2432
2424
|
comment: f,
|
|
2433
|
-
hasNewline:
|
|
2434
|
-
anchor:
|
|
2425
|
+
hasNewline: m,
|
|
2426
|
+
anchor: p,
|
|
2435
2427
|
tag: b,
|
|
2436
|
-
newlineAfterProp:
|
|
2428
|
+
newlineAfterProp: w,
|
|
2437
2429
|
end: I,
|
|
2438
|
-
start:
|
|
2430
|
+
start: N ?? I
|
|
2439
2431
|
};
|
|
2440
2432
|
}
|
|
2441
2433
|
function Ne(s) {
|
|
@@ -2474,12 +2466,12 @@ function Ne(s) {
|
|
|
2474
2466
|
}
|
|
2475
2467
|
}
|
|
2476
2468
|
function ut(s, e, t) {
|
|
2477
|
-
if (
|
|
2469
|
+
if (e?.type === "flow-collection") {
|
|
2478
2470
|
const n = e.end[0];
|
|
2479
2471
|
n.indent === s && (n.source === "]" || n.source === "}") && Ne(e) && t(n, "BAD_INDENT", "Flow end indicator should be more indented than parent", !0);
|
|
2480
2472
|
}
|
|
2481
2473
|
}
|
|
2482
|
-
function
|
|
2474
|
+
function bs(s, e, t) {
|
|
2483
2475
|
const { uniqueKeys: n } = s.options;
|
|
2484
2476
|
if (n === !1)
|
|
2485
2477
|
return !1;
|
|
@@ -2488,59 +2480,58 @@ function gs(s, e, t) {
|
|
|
2488
2480
|
}
|
|
2489
2481
|
const Mt = "All mapping items must start at the same column";
|
|
2490
2482
|
function cn({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
|
|
2491
|
-
|
|
2492
|
-
const o = (r == null ? void 0 : r.nodeClass) ?? K, l = new o(t.schema);
|
|
2483
|
+
const o = r?.nodeClass ?? K, l = new o(t.schema);
|
|
2493
2484
|
t.atRoot && (t.atRoot = !1);
|
|
2494
2485
|
let a = n.offset, c = null;
|
|
2495
|
-
for (const
|
|
2496
|
-
const { start:
|
|
2486
|
+
for (const d of n.items) {
|
|
2487
|
+
const { start: f, key: u, sep: m, value: y } = d, h = ue(f, {
|
|
2497
2488
|
indicator: "explicit-key-ind",
|
|
2498
|
-
next:
|
|
2489
|
+
next: u ?? m?.[0],
|
|
2499
2490
|
offset: a,
|
|
2500
2491
|
onError: i,
|
|
2501
2492
|
parentIndent: n.indent,
|
|
2502
2493
|
startOnNewline: !0
|
|
2503
|
-
}),
|
|
2504
|
-
if (
|
|
2505
|
-
if (
|
|
2506
|
-
c =
|
|
2507
|
-
` +
|
|
2494
|
+
}), p = !h.found;
|
|
2495
|
+
if (p) {
|
|
2496
|
+
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) {
|
|
2497
|
+
c = h.end, h.comment && (l.comment ? l.comment += `
|
|
2498
|
+
` + h.comment : l.comment = h.comment);
|
|
2508
2499
|
continue;
|
|
2509
2500
|
}
|
|
2510
|
-
(
|
|
2511
|
-
} else
|
|
2501
|
+
(h.newlineAfterProp || Ne(u)) && i(u ?? f[f.length - 1], "MULTILINE_IMPLICIT_KEY", "Implicit keys need to be on a single line");
|
|
2502
|
+
} else h.found?.indent !== n.indent && i(a, "BAD_INDENT", Mt);
|
|
2512
2503
|
t.atKey = !0;
|
|
2513
|
-
const
|
|
2514
|
-
t.schema.compat && ut(n.indent,
|
|
2515
|
-
const
|
|
2504
|
+
const b = h.end, w = u ? s(t, u, h, i) : e(t, b, f, null, h, i);
|
|
2505
|
+
t.schema.compat && ut(n.indent, u, i), t.atKey = !1, bs(t, l.items, w) && i(b, "DUPLICATE_KEY", "Map keys must be unique");
|
|
2506
|
+
const S = ue(m ?? [], {
|
|
2516
2507
|
indicator: "map-value-ind",
|
|
2517
|
-
next:
|
|
2518
|
-
offset:
|
|
2508
|
+
next: y,
|
|
2509
|
+
offset: w.range[2],
|
|
2519
2510
|
onError: i,
|
|
2520
2511
|
parentIndent: n.indent,
|
|
2521
|
-
startOnNewline: !
|
|
2512
|
+
startOnNewline: !u || u.type === "block-scalar"
|
|
2522
2513
|
});
|
|
2523
|
-
if (a =
|
|
2524
|
-
|
|
2525
|
-
const k =
|
|
2526
|
-
t.schema.compat && ut(n.indent,
|
|
2527
|
-
const
|
|
2528
|
-
t.options.keepSourceTokens && (
|
|
2514
|
+
if (a = S.end, S.found) {
|
|
2515
|
+
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"));
|
|
2516
|
+
const k = y ? s(t, y, S, i) : e(t, a, m, null, S, i);
|
|
2517
|
+
t.schema.compat && ut(n.indent, y, i), a = k.range[2];
|
|
2518
|
+
const N = new v(w, k);
|
|
2519
|
+
t.options.keepSourceTokens && (N.srcToken = d), l.items.push(N);
|
|
2529
2520
|
} else {
|
|
2530
|
-
|
|
2531
|
-
` +
|
|
2532
|
-
const k = new v(
|
|
2533
|
-
t.options.keepSourceTokens && (k.srcToken =
|
|
2521
|
+
p && i(w.range, "MISSING_CHAR", "Implicit map keys need to be followed by map values"), S.comment && (w.comment ? w.comment += `
|
|
2522
|
+
` + S.comment : w.comment = S.comment);
|
|
2523
|
+
const k = new v(w);
|
|
2524
|
+
t.options.keepSourceTokens && (k.srcToken = d), l.items.push(k);
|
|
2534
2525
|
}
|
|
2535
2526
|
}
|
|
2536
2527
|
return c && c < a && i(c, "IMPOSSIBLE", "Map comment with trailing content"), l.range = [n.offset, a, c ?? a], l;
|
|
2537
2528
|
}
|
|
2538
2529
|
function fn({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
|
|
2539
|
-
const o =
|
|
2530
|
+
const o = r?.nodeClass ?? Q, l = new o(t.schema);
|
|
2540
2531
|
t.atRoot && (t.atRoot = !1), t.atKey && (t.atKey = !1);
|
|
2541
2532
|
let a = n.offset, c = null;
|
|
2542
|
-
for (const { start:
|
|
2543
|
-
const
|
|
2533
|
+
for (const { start: d, value: f } of n.items) {
|
|
2534
|
+
const u = ue(d, {
|
|
2544
2535
|
indicator: "seq-item-ind",
|
|
2545
2536
|
next: f,
|
|
2546
2537
|
offset: a,
|
|
@@ -2548,15 +2539,15 @@ function fn({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
|
|
|
2548
2539
|
parentIndent: n.indent,
|
|
2549
2540
|
startOnNewline: !0
|
|
2550
2541
|
});
|
|
2551
|
-
if (!
|
|
2552
|
-
if (
|
|
2553
|
-
f && f.type === "block-seq" ? i(
|
|
2542
|
+
if (!u.found)
|
|
2543
|
+
if (u.anchor || u.tag || f)
|
|
2544
|
+
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");
|
|
2554
2545
|
else {
|
|
2555
|
-
c =
|
|
2546
|
+
c = u.end, u.comment && (l.comment = u.comment);
|
|
2556
2547
|
continue;
|
|
2557
2548
|
}
|
|
2558
|
-
const
|
|
2559
|
-
t.schema.compat && ut(n.indent, f, i), a =
|
|
2549
|
+
const m = f ? s(t, f, u, i) : e(t, u.end, d, null, u, i);
|
|
2550
|
+
t.schema.compat && ut(n.indent, f, i), a = m.range[2], l.items.push(m);
|
|
2560
2551
|
}
|
|
2561
2552
|
return l.range = [n.offset, a, c ?? a], l;
|
|
2562
2553
|
}
|
|
@@ -2572,8 +2563,8 @@ function Ie(s, e, t, n) {
|
|
|
2572
2563
|
break;
|
|
2573
2564
|
case "comment": {
|
|
2574
2565
|
t && !r && n(l, "MISSING_CHAR", "Comments must be separated from other tokens by white space characters");
|
|
2575
|
-
const
|
|
2576
|
-
i ? i += o +
|
|
2566
|
+
const d = a.substring(1) || " ";
|
|
2567
|
+
i ? i += o + d : i = d, o = "";
|
|
2577
2568
|
break;
|
|
2578
2569
|
}
|
|
2579
2570
|
case "newline":
|
|
@@ -2589,39 +2580,39 @@ function Ie(s, e, t, n) {
|
|
|
2589
2580
|
}
|
|
2590
2581
|
const st = "Block collections are not allowed within flow collections", nt = (s) => s && (s.type === "block-map" || s.type === "block-seq");
|
|
2591
2582
|
function un({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
|
|
2592
|
-
const o = n.start.source === "{", l = o ? "flow map" : "flow sequence", a =
|
|
2583
|
+
const o = n.start.source === "{", l = o ? "flow map" : "flow sequence", a = r?.nodeClass ?? (o ? K : Q), c = new a(t.schema);
|
|
2593
2584
|
c.flow = !0;
|
|
2594
|
-
const
|
|
2595
|
-
|
|
2585
|
+
const d = t.atRoot;
|
|
2586
|
+
d && (t.atRoot = !1), t.atKey && (t.atKey = !1);
|
|
2596
2587
|
let f = n.offset + n.start.source.length;
|
|
2597
|
-
for (let
|
|
2598
|
-
const b = n.items[
|
|
2588
|
+
for (let p = 0; p < n.items.length; ++p) {
|
|
2589
|
+
const b = n.items[p], { start: w, key: S, sep: k, value: N } = b, A = ue(w, {
|
|
2599
2590
|
flow: l,
|
|
2600
2591
|
indicator: "explicit-key-ind",
|
|
2601
|
-
next:
|
|
2592
|
+
next: S ?? k?.[0],
|
|
2602
2593
|
offset: f,
|
|
2603
2594
|
onError: i,
|
|
2604
2595
|
parentIndent: n.indent,
|
|
2605
2596
|
startOnNewline: !1
|
|
2606
2597
|
});
|
|
2607
|
-
if (!
|
|
2608
|
-
if (!
|
|
2609
|
-
|
|
2610
|
-
` +
|
|
2598
|
+
if (!A.found) {
|
|
2599
|
+
if (!A.anchor && !A.tag && !k && !N) {
|
|
2600
|
+
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 += `
|
|
2601
|
+
` + A.comment : c.comment = A.comment), f = A.end;
|
|
2611
2602
|
continue;
|
|
2612
2603
|
}
|
|
2613
|
-
!o && t.options.strict && Ne(
|
|
2614
|
-
|
|
2604
|
+
!o && t.options.strict && Ne(S) && i(
|
|
2605
|
+
S,
|
|
2615
2606
|
// checked by containsNewline()
|
|
2616
2607
|
"MULTILINE_IMPLICIT_KEY",
|
|
2617
2608
|
"Implicit keys of flow sequence pairs need to be on a single line"
|
|
2618
2609
|
);
|
|
2619
2610
|
}
|
|
2620
|
-
if (
|
|
2621
|
-
|
|
2622
|
-
else if (
|
|
2611
|
+
if (p === 0)
|
|
2612
|
+
A.comma && i(A.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${l}`);
|
|
2613
|
+
else if (A.comma || i(A.start, "MISSING_CHAR", `Missing , between ${l} items`), A.comment) {
|
|
2623
2614
|
let I = "";
|
|
2624
|
-
e: for (const g of
|
|
2615
|
+
e: for (const g of w)
|
|
2625
2616
|
switch (g.type) {
|
|
2626
2617
|
case "comma":
|
|
2627
2618
|
case "space":
|
|
@@ -2635,29 +2626,29 @@ function un({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
|
|
|
2635
2626
|
if (I) {
|
|
2636
2627
|
let g = c.items[c.items.length - 1];
|
|
2637
2628
|
T(g) && (g = g.value ?? g.key), g.comment ? g.comment += `
|
|
2638
|
-
` + I : g.comment = I,
|
|
2629
|
+
` + I : g.comment = I, A.comment = A.comment.substring(I.length + 1);
|
|
2639
2630
|
}
|
|
2640
2631
|
}
|
|
2641
|
-
if (!o && !
|
|
2642
|
-
const I =
|
|
2643
|
-
c.items.push(I), f = I.range[2], nt(
|
|
2632
|
+
if (!o && !k && !A.found) {
|
|
2633
|
+
const I = N ? s(t, N, A, i) : e(t, A.end, k, null, A, i);
|
|
2634
|
+
c.items.push(I), f = I.range[2], nt(N) && i(I.range, "BLOCK_IN_FLOW", st);
|
|
2644
2635
|
} else {
|
|
2645
2636
|
t.atKey = !0;
|
|
2646
|
-
const I =
|
|
2647
|
-
nt(
|
|
2648
|
-
const _ = ue(
|
|
2637
|
+
const I = A.end, g = S ? s(t, S, A, i) : e(t, I, w, null, A, i);
|
|
2638
|
+
nt(S) && i(g.range, "BLOCK_IN_FLOW", st), t.atKey = !1;
|
|
2639
|
+
const _ = ue(k ?? [], {
|
|
2649
2640
|
flow: l,
|
|
2650
2641
|
indicator: "map-value-ind",
|
|
2651
|
-
next:
|
|
2642
|
+
next: N,
|
|
2652
2643
|
offset: g.range[2],
|
|
2653
2644
|
onError: i,
|
|
2654
2645
|
parentIndent: n.indent,
|
|
2655
2646
|
startOnNewline: !1
|
|
2656
2647
|
});
|
|
2657
2648
|
if (_.found) {
|
|
2658
|
-
if (!o && !
|
|
2659
|
-
if (
|
|
2660
|
-
for (const C of
|
|
2649
|
+
if (!o && !A.found && t.options.strict) {
|
|
2650
|
+
if (k)
|
|
2651
|
+
for (const C of k) {
|
|
2661
2652
|
if (C === _.found)
|
|
2662
2653
|
break;
|
|
2663
2654
|
if (C.type === "newline") {
|
|
@@ -2665,16 +2656,16 @@ function un({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
|
|
|
2665
2656
|
break;
|
|
2666
2657
|
}
|
|
2667
2658
|
}
|
|
2668
|
-
|
|
2659
|
+
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");
|
|
2669
2660
|
}
|
|
2670
|
-
} else
|
|
2671
|
-
const J =
|
|
2672
|
-
J ? nt(
|
|
2661
|
+
} 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`));
|
|
2662
|
+
const J = N ? s(t, N, _, i) : _.found ? e(t, _.end, k, null, _, i) : null;
|
|
2663
|
+
J ? nt(N) && i(J.range, "BLOCK_IN_FLOW", st) : _.comment && (g.comment ? g.comment += `
|
|
2673
2664
|
` + _.comment : g.comment = _.comment);
|
|
2674
2665
|
const te = new v(g, J);
|
|
2675
2666
|
if (t.options.keepSourceTokens && (te.srcToken = b), o) {
|
|
2676
2667
|
const C = c;
|
|
2677
|
-
|
|
2668
|
+
bs(t, C.items, g) && i(I, "DUPLICATE_KEY", "Map keys must be unique"), C.items.push(te);
|
|
2678
2669
|
} else {
|
|
2679
2670
|
const C = new K(t.schema);
|
|
2680
2671
|
C.flow = !0, C.items.push(te);
|
|
@@ -2684,20 +2675,20 @@ function un({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
|
|
|
2684
2675
|
f = J ? J.range[2] : _.end;
|
|
2685
2676
|
}
|
|
2686
2677
|
}
|
|
2687
|
-
const
|
|
2688
|
-
let
|
|
2689
|
-
if (
|
|
2690
|
-
|
|
2678
|
+
const u = o ? "}" : "]", [m, ...y] = n.end;
|
|
2679
|
+
let h = f;
|
|
2680
|
+
if (m && m.source === u)
|
|
2681
|
+
h = m.offset + m.source.length;
|
|
2691
2682
|
else {
|
|
2692
|
-
const
|
|
2693
|
-
i(f,
|
|
2683
|
+
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}`;
|
|
2684
|
+
i(f, d ? "MISSING_CHAR" : "BAD_INDENT", b), m && m.source.length !== 1 && y.unshift(m);
|
|
2694
2685
|
}
|
|
2695
2686
|
if (y.length > 0) {
|
|
2696
|
-
const
|
|
2697
|
-
|
|
2698
|
-
` +
|
|
2687
|
+
const p = Ie(y, h, t.options.strict, i);
|
|
2688
|
+
p.comment && (c.comment ? c.comment += `
|
|
2689
|
+
` + p.comment : c.comment = p.comment), c.range = [n.offset, h, p.offset];
|
|
2699
2690
|
} else
|
|
2700
|
-
c.range = [n.offset,
|
|
2691
|
+
c.range = [n.offset, h, h];
|
|
2701
2692
|
return c;
|
|
2702
2693
|
}
|
|
2703
2694
|
function it(s, e, t, n, i, r) {
|
|
@@ -2705,88 +2696,87 @@ function it(s, e, t, n, i, r) {
|
|
|
2705
2696
|
return i === "!" || i === l.tagName ? (o.tag = l.tagName, o) : (i && (o.tag = i), o);
|
|
2706
2697
|
}
|
|
2707
2698
|
function hn(s, e, t, n, i) {
|
|
2708
|
-
|
|
2709
|
-
const r = n.tag, o = r ? e.directives.tagName(r.source, (h) => i(r, "TAG_RESOLVE_FAILED", h)) : null;
|
|
2699
|
+
const r = n.tag, o = r ? e.directives.tagName(r.source, (u) => i(r, "TAG_RESOLVE_FAILED", u)) : null;
|
|
2710
2700
|
if (t.type === "block-seq") {
|
|
2711
|
-
const { anchor:
|
|
2712
|
-
|
|
2701
|
+
const { anchor: u, newlineAfterProp: m } = n, y = u && r ? u.offset > r.offset ? u : r : u ?? r;
|
|
2702
|
+
y && (!m || m.offset < y.offset) && i(y, "MISSING_CHAR", "Missing newline after block sequence props");
|
|
2713
2703
|
}
|
|
2714
2704
|
const l = t.type === "block-map" ? "map" : t.type === "block-seq" ? "seq" : t.start.source === "{" ? "map" : "seq";
|
|
2715
2705
|
if (!r || !o || o === "!" || o === K.tagName && l === "map" || o === Q.tagName && l === "seq")
|
|
2716
2706
|
return it(s, e, t, i, o);
|
|
2717
|
-
let a = e.schema.tags.find((
|
|
2707
|
+
let a = e.schema.tags.find((u) => u.tag === o && u.collection === l);
|
|
2718
2708
|
if (!a) {
|
|
2719
|
-
const
|
|
2720
|
-
if (
|
|
2721
|
-
e.schema.tags.push(Object.assign({},
|
|
2709
|
+
const u = e.schema.knownTags[o];
|
|
2710
|
+
if (u && u.collection === l)
|
|
2711
|
+
e.schema.tags.push(Object.assign({}, u, { default: !1 })), a = u;
|
|
2722
2712
|
else
|
|
2723
|
-
return
|
|
2713
|
+
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);
|
|
2724
2714
|
}
|
|
2725
|
-
const c = it(s, e, t, i, o, a),
|
|
2726
|
-
return f.range = c.range, f.tag = o, a
|
|
2715
|
+
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);
|
|
2716
|
+
return f.range = c.range, f.tag = o, a?.format && (f.format = a.format), f;
|
|
2727
2717
|
}
|
|
2728
|
-
function
|
|
2718
|
+
function ws(s, e, t) {
|
|
2729
2719
|
const n = e.offset, i = dn(e, s.options.strict, t);
|
|
2730
2720
|
if (!i)
|
|
2731
2721
|
return { value: "", type: null, comment: "", range: [n, n, n] };
|
|
2732
|
-
const r = i.mode === ">" ?
|
|
2722
|
+
const r = i.mode === ">" ? O.BLOCK_FOLDED : O.BLOCK_LITERAL, o = e.source ? pn(e.source) : [];
|
|
2733
2723
|
let l = o.length;
|
|
2734
|
-
for (let
|
|
2735
|
-
const
|
|
2736
|
-
if (
|
|
2737
|
-
l =
|
|
2724
|
+
for (let h = o.length - 1; h >= 0; --h) {
|
|
2725
|
+
const p = o[h][1];
|
|
2726
|
+
if (p === "" || p === "\r")
|
|
2727
|
+
l = h;
|
|
2738
2728
|
else
|
|
2739
2729
|
break;
|
|
2740
2730
|
}
|
|
2741
2731
|
if (l === 0) {
|
|
2742
|
-
const
|
|
2732
|
+
const h = i.chomp === "+" && o.length > 0 ? `
|
|
2743
2733
|
`.repeat(Math.max(1, o.length - 1)) : "";
|
|
2744
|
-
let
|
|
2745
|
-
return e.source && (
|
|
2734
|
+
let p = n + i.length;
|
|
2735
|
+
return e.source && (p += e.source.length), { value: h, type: r, comment: i.comment, range: [n, p, p] };
|
|
2746
2736
|
}
|
|
2747
|
-
let a = e.indent + i.indent, c = e.offset + i.length,
|
|
2748
|
-
for (let
|
|
2749
|
-
const [
|
|
2737
|
+
let a = e.indent + i.indent, c = e.offset + i.length, d = 0;
|
|
2738
|
+
for (let h = 0; h < l; ++h) {
|
|
2739
|
+
const [p, b] = o[h];
|
|
2750
2740
|
if (b === "" || b === "\r")
|
|
2751
|
-
i.indent === 0 &&
|
|
2741
|
+
i.indent === 0 && p.length > a && (a = p.length);
|
|
2752
2742
|
else {
|
|
2753
|
-
|
|
2743
|
+
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");
|
|
2754
2744
|
break;
|
|
2755
2745
|
}
|
|
2756
|
-
c +=
|
|
2746
|
+
c += p.length + b.length + 1;
|
|
2757
2747
|
}
|
|
2758
|
-
for (let
|
|
2759
|
-
o[
|
|
2760
|
-
let f = "",
|
|
2761
|
-
for (let
|
|
2762
|
-
f += o[
|
|
2748
|
+
for (let h = o.length - 1; h >= l; --h)
|
|
2749
|
+
o[h][0].length > a && (l = h + 1);
|
|
2750
|
+
let f = "", u = "", m = !1;
|
|
2751
|
+
for (let h = 0; h < d; ++h)
|
|
2752
|
+
f += o[h][0].slice(a) + `
|
|
2763
2753
|
`;
|
|
2764
|
-
for (let
|
|
2765
|
-
let [
|
|
2766
|
-
c +=
|
|
2767
|
-
const
|
|
2768
|
-
if (
|
|
2769
|
-
const
|
|
2770
|
-
t(c - b.length - (
|
|
2754
|
+
for (let h = d; h < l; ++h) {
|
|
2755
|
+
let [p, b] = o[h];
|
|
2756
|
+
c += p.length + b.length + 1;
|
|
2757
|
+
const w = b[b.length - 1] === "\r";
|
|
2758
|
+
if (w && (b = b.slice(0, -1)), b && p.length < a) {
|
|
2759
|
+
const k = `Block scalar lines must not be less indented than their ${i.indent ? "explicit indentation indicator" : "first line"}`;
|
|
2760
|
+
t(c - b.length - (w ? 2 : 1), "BAD_INDENT", k), p = "";
|
|
2771
2761
|
}
|
|
2772
|
-
r ===
|
|
2773
|
-
`) :
|
|
2774
|
-
` : !
|
|
2775
|
-
` && (
|
|
2762
|
+
r === O.BLOCK_LITERAL ? (f += u + p.slice(a) + b, u = `
|
|
2763
|
+
`) : p.length > a || b[0] === " " ? (u === " " ? u = `
|
|
2764
|
+
` : !m && u === `
|
|
2765
|
+
` && (u = `
|
|
2776
2766
|
|
|
2777
|
-
`), f +=
|
|
2778
|
-
`,
|
|
2767
|
+
`), f += u + p.slice(a) + b, u = `
|
|
2768
|
+
`, m = !0) : b === "" ? u === `
|
|
2779
2769
|
` ? f += `
|
|
2780
|
-
` :
|
|
2781
|
-
` : (f +=
|
|
2770
|
+
` : u = `
|
|
2771
|
+
` : (f += u + b, u = " ", m = !1);
|
|
2782
2772
|
}
|
|
2783
2773
|
switch (i.chomp) {
|
|
2784
2774
|
case "-":
|
|
2785
2775
|
break;
|
|
2786
2776
|
case "+":
|
|
2787
|
-
for (let
|
|
2777
|
+
for (let h = l; h < o.length; ++h)
|
|
2788
2778
|
f += `
|
|
2789
|
-
` + o[
|
|
2779
|
+
` + o[h][0].slice(a);
|
|
2790
2780
|
f[f.length - 1] !== `
|
|
2791
2781
|
` && (f += `
|
|
2792
2782
|
`);
|
|
@@ -2803,62 +2793,62 @@ function dn({ offset: s, props: e }, t, n) {
|
|
|
2803
2793
|
return n(e[0], "IMPOSSIBLE", "Block scalar header not found"), null;
|
|
2804
2794
|
const { source: i } = e[0], r = i[0];
|
|
2805
2795
|
let o = 0, l = "", a = -1;
|
|
2806
|
-
for (let
|
|
2807
|
-
const
|
|
2808
|
-
if (!l && (
|
|
2809
|
-
l =
|
|
2796
|
+
for (let u = 1; u < i.length; ++u) {
|
|
2797
|
+
const m = i[u];
|
|
2798
|
+
if (!l && (m === "-" || m === "+"))
|
|
2799
|
+
l = m;
|
|
2810
2800
|
else {
|
|
2811
|
-
const y = Number(
|
|
2812
|
-
!o && y ? o = y : a === -1 && (a = s +
|
|
2801
|
+
const y = Number(m);
|
|
2802
|
+
!o && y ? o = y : a === -1 && (a = s + u);
|
|
2813
2803
|
}
|
|
2814
2804
|
}
|
|
2815
2805
|
a !== -1 && n(a, "UNEXPECTED_TOKEN", `Block scalar header includes extra characters: ${i}`);
|
|
2816
|
-
let c = !1,
|
|
2817
|
-
for (let
|
|
2818
|
-
const
|
|
2819
|
-
switch (
|
|
2806
|
+
let c = !1, d = "", f = i.length;
|
|
2807
|
+
for (let u = 1; u < e.length; ++u) {
|
|
2808
|
+
const m = e[u];
|
|
2809
|
+
switch (m.type) {
|
|
2820
2810
|
case "space":
|
|
2821
2811
|
c = !0;
|
|
2822
2812
|
// fallthrough
|
|
2823
2813
|
case "newline":
|
|
2824
|
-
f +=
|
|
2814
|
+
f += m.source.length;
|
|
2825
2815
|
break;
|
|
2826
2816
|
case "comment":
|
|
2827
|
-
t && !c && n(
|
|
2817
|
+
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);
|
|
2828
2818
|
break;
|
|
2829
2819
|
case "error":
|
|
2830
|
-
n(
|
|
2820
|
+
n(m, "UNEXPECTED_TOKEN", m.message), f += m.source.length;
|
|
2831
2821
|
break;
|
|
2832
2822
|
/* istanbul ignore next should not happen */
|
|
2833
2823
|
default: {
|
|
2834
|
-
const y = `Unexpected token in block scalar header: ${
|
|
2835
|
-
n(
|
|
2836
|
-
const
|
|
2837
|
-
|
|
2824
|
+
const y = `Unexpected token in block scalar header: ${m.type}`;
|
|
2825
|
+
n(m, "UNEXPECTED_TOKEN", y);
|
|
2826
|
+
const h = m.source;
|
|
2827
|
+
h && typeof h == "string" && (f += h.length);
|
|
2838
2828
|
}
|
|
2839
2829
|
}
|
|
2840
2830
|
}
|
|
2841
|
-
return { mode: r, indent: o, chomp: l, comment:
|
|
2831
|
+
return { mode: r, indent: o, chomp: l, comment: d, length: f };
|
|
2842
2832
|
}
|
|
2843
2833
|
function pn(s) {
|
|
2844
|
-
const e = s.split(/\n( *)/), t = e[0], n = t.match(/^( *)/), r = [n
|
|
2834
|
+
const e = s.split(/\n( *)/), t = e[0], n = t.match(/^( *)/), r = [n?.[1] ? [n[1], t.slice(n[1].length)] : ["", t]];
|
|
2845
2835
|
for (let o = 1; o < e.length; o += 2)
|
|
2846
2836
|
r.push([e[o], e[o + 1]]);
|
|
2847
2837
|
return r;
|
|
2848
2838
|
}
|
|
2849
|
-
function
|
|
2839
|
+
function Ss(s, e, t) {
|
|
2850
2840
|
const { offset: n, type: i, source: r, end: o } = s;
|
|
2851
2841
|
let l, a;
|
|
2852
|
-
const c = (
|
|
2842
|
+
const c = (u, m, y) => t(n + u, m, y);
|
|
2853
2843
|
switch (i) {
|
|
2854
2844
|
case "scalar":
|
|
2855
|
-
l =
|
|
2845
|
+
l = O.PLAIN, a = mn(r, c);
|
|
2856
2846
|
break;
|
|
2857
2847
|
case "single-quoted-scalar":
|
|
2858
|
-
l =
|
|
2848
|
+
l = O.QUOTE_SINGLE, a = yn(r, c);
|
|
2859
2849
|
break;
|
|
2860
2850
|
case "double-quoted-scalar":
|
|
2861
|
-
l =
|
|
2851
|
+
l = O.QUOTE_DOUBLE, a = gn(r, c);
|
|
2862
2852
|
break;
|
|
2863
2853
|
/* istanbul ignore next should not happen */
|
|
2864
2854
|
default:
|
|
@@ -2869,12 +2859,12 @@ function ws(s, e, t) {
|
|
|
2869
2859
|
range: [n, n + r.length, n + r.length]
|
|
2870
2860
|
};
|
|
2871
2861
|
}
|
|
2872
|
-
const
|
|
2862
|
+
const d = n + r.length, f = Ie(o, d, e, t);
|
|
2873
2863
|
return {
|
|
2874
2864
|
value: a,
|
|
2875
2865
|
type: l,
|
|
2876
2866
|
comment: f.comment,
|
|
2877
|
-
range: [n,
|
|
2867
|
+
range: [n, d, f.offset]
|
|
2878
2868
|
};
|
|
2879
2869
|
}
|
|
2880
2870
|
function mn(s, e) {
|
|
@@ -2901,12 +2891,12 @@ function mn(s, e) {
|
|
|
2901
2891
|
break;
|
|
2902
2892
|
}
|
|
2903
2893
|
}
|
|
2904
|
-
return t && e(0, "BAD_SCALAR_START", `Plain value cannot start with ${t}`),
|
|
2894
|
+
return t && e(0, "BAD_SCALAR_START", `Plain value cannot start with ${t}`), ks(s);
|
|
2905
2895
|
}
|
|
2906
2896
|
function yn(s, e) {
|
|
2907
|
-
return (s[s.length - 1] !== "'" || s.length === 1) && e(s.length, "MISSING_CHAR", "Missing closing 'quote"),
|
|
2897
|
+
return (s[s.length - 1] !== "'" || s.length === 1) && e(s.length, "MISSING_CHAR", "Missing closing 'quote"), ks(s.slice(1, -1)).replace(/''/g, "'");
|
|
2908
2898
|
}
|
|
2909
|
-
function
|
|
2899
|
+
function ks(s) {
|
|
2910
2900
|
let e, t;
|
|
2911
2901
|
try {
|
|
2912
2902
|
e = new RegExp(`(.*?)(?<![ ])[ ]*\r?
|
|
@@ -2924,7 +2914,7 @@ function Ss(s) {
|
|
|
2924
2914
|
` ? i += r : r = `
|
|
2925
2915
|
` : (i += r + n[1], r = " "), o = t.lastIndex;
|
|
2926
2916
|
const l = /[ \t]*(.*)/sy;
|
|
2927
|
-
return l.lastIndex = o, n = l.exec(s), i + r + (
|
|
2917
|
+
return l.lastIndex = o, n = l.exec(s), i + r + (n?.[1] ?? "");
|
|
2928
2918
|
}
|
|
2929
2919
|
function gn(s, e) {
|
|
2930
2920
|
let t = "";
|
|
@@ -3021,57 +3011,50 @@ function Sn(s, e, t, n) {
|
|
|
3021
3011
|
}
|
|
3022
3012
|
return String.fromCodePoint(o);
|
|
3023
3013
|
}
|
|
3024
|
-
function
|
|
3025
|
-
const { value: i, type: r, comment: o, range: l } = e.type === "block-scalar" ?
|
|
3014
|
+
function Ns(s, e, t, n) {
|
|
3015
|
+
const { value: i, type: r, comment: o, range: l } = e.type === "block-scalar" ? ws(s, e, n) : Ss(e, s.options.strict, n), a = t ? s.directives.tagName(t.source, (f) => n(t, "TAG_RESOLVE_FAILED", f)) : null;
|
|
3026
3016
|
let c;
|
|
3027
|
-
s.options.stringKeys && s.atKey ? c = s.schema[
|
|
3028
|
-
let
|
|
3017
|
+
s.options.stringKeys && s.atKey ? c = s.schema[F] : a ? c = kn(s.schema, i, a, t, n) : e.type === "scalar" ? c = Nn(s, i, e, n) : c = s.schema[F];
|
|
3018
|
+
let d;
|
|
3029
3019
|
try {
|
|
3030
|
-
const f = c.resolve(i, (
|
|
3031
|
-
|
|
3020
|
+
const f = c.resolve(i, (u) => n(t ?? e, "TAG_RESOLVE_FAILED", u), s.options);
|
|
3021
|
+
d = E(f) ? f : new O(f);
|
|
3032
3022
|
} catch (f) {
|
|
3033
|
-
const
|
|
3034
|
-
n(t ?? e, "TAG_RESOLVE_FAILED",
|
|
3023
|
+
const u = f instanceof Error ? f.message : String(f);
|
|
3024
|
+
n(t ?? e, "TAG_RESOLVE_FAILED", u), d = new O(i);
|
|
3035
3025
|
}
|
|
3036
|
-
return
|
|
3026
|
+
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;
|
|
3037
3027
|
}
|
|
3038
3028
|
function kn(s, e, t, n, i) {
|
|
3039
|
-
var l;
|
|
3040
3029
|
if (t === "!")
|
|
3041
|
-
return s[
|
|
3030
|
+
return s[F];
|
|
3042
3031
|
const r = [];
|
|
3043
|
-
for (const
|
|
3044
|
-
if (!
|
|
3045
|
-
if (
|
|
3046
|
-
r.push(
|
|
3032
|
+
for (const l of s.tags)
|
|
3033
|
+
if (!l.collection && l.tag === t)
|
|
3034
|
+
if (l.default && l.test)
|
|
3035
|
+
r.push(l);
|
|
3047
3036
|
else
|
|
3048
|
-
return
|
|
3049
|
-
for (const
|
|
3050
|
-
if (
|
|
3051
|
-
return
|
|
3037
|
+
return l;
|
|
3038
|
+
for (const l of r)
|
|
3039
|
+
if (l.test?.test(e))
|
|
3040
|
+
return l;
|
|
3052
3041
|
const o = s.knownTags[t];
|
|
3053
|
-
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[
|
|
3042
|
+
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[F]);
|
|
3054
3043
|
}
|
|
3055
3044
|
function Nn({ atKey: s, directives: e, schema: t }, n, i, r) {
|
|
3056
|
-
const o = t.tags.find((l) =>
|
|
3057
|
-
var a;
|
|
3058
|
-
return (l.default === !0 || s && l.default === "key") && ((a = l.test) == null ? void 0 : a.test(n));
|
|
3059
|
-
}) || t[R];
|
|
3045
|
+
const o = t.tags.find((l) => (l.default === !0 || s && l.default === "key") && l.test?.test(n)) || t[F];
|
|
3060
3046
|
if (t.compat) {
|
|
3061
|
-
const l = t.compat.find((a) =>
|
|
3062
|
-
var c;
|
|
3063
|
-
return a.default && ((c = a.test) == null ? void 0 : c.test(n));
|
|
3064
|
-
}) ?? t[R];
|
|
3047
|
+
const l = t.compat.find((a) => a.default && a.test?.test(n)) ?? t[F];
|
|
3065
3048
|
if (o.tag !== l.tag) {
|
|
3066
|
-
const a = e.tagString(o.tag), c = e.tagString(l.tag),
|
|
3067
|
-
r(i, "TAG_RESOLVE_FAILED",
|
|
3049
|
+
const a = e.tagString(o.tag), c = e.tagString(l.tag), d = `Value may be parsed as either ${a} or ${c}`;
|
|
3050
|
+
r(i, "TAG_RESOLVE_FAILED", d, !0);
|
|
3068
3051
|
}
|
|
3069
3052
|
}
|
|
3070
3053
|
return o;
|
|
3071
3054
|
}
|
|
3072
3055
|
function On(s, e, t) {
|
|
3073
3056
|
if (e) {
|
|
3074
|
-
t
|
|
3057
|
+
t ?? (t = e.length);
|
|
3075
3058
|
for (let n = t - 1; n >= 0; --n) {
|
|
3076
3059
|
let i = e[n];
|
|
3077
3060
|
switch (i.type) {
|
|
@@ -3081,17 +3064,17 @@ function On(s, e, t) {
|
|
|
3081
3064
|
s -= i.source.length;
|
|
3082
3065
|
continue;
|
|
3083
3066
|
}
|
|
3084
|
-
for (i = e[++n];
|
|
3067
|
+
for (i = e[++n]; i?.type === "space"; )
|
|
3085
3068
|
s += i.source.length, i = e[++n];
|
|
3086
3069
|
break;
|
|
3087
3070
|
}
|
|
3088
3071
|
}
|
|
3089
3072
|
return s;
|
|
3090
3073
|
}
|
|
3091
|
-
const An = { composeNode:
|
|
3092
|
-
function
|
|
3074
|
+
const An = { composeNode: Os, composeEmptyNode: Et };
|
|
3075
|
+
function Os(s, e, t, n) {
|
|
3093
3076
|
const i = s.atKey, { spaceBefore: r, comment: o, anchor: l, tag: a } = t;
|
|
3094
|
-
let c,
|
|
3077
|
+
let c, d = !0;
|
|
3095
3078
|
switch (e.type) {
|
|
3096
3079
|
case "alias":
|
|
3097
3080
|
c = En(s, e, n), (l || a) && n(e, "ALIAS_PROPS", "An alias node must not specify any properties");
|
|
@@ -3100,7 +3083,7 @@ function Ns(s, e, t, n) {
|
|
|
3100
3083
|
case "single-quoted-scalar":
|
|
3101
3084
|
case "double-quoted-scalar":
|
|
3102
3085
|
case "block-scalar":
|
|
3103
|
-
c =
|
|
3086
|
+
c = Ns(s, e, a, n), l && (c.anchor = l.source.substring(1));
|
|
3104
3087
|
break;
|
|
3105
3088
|
case "block-map":
|
|
3106
3089
|
case "block-seq":
|
|
@@ -3109,22 +3092,22 @@ function Ns(s, e, t, n) {
|
|
|
3109
3092
|
break;
|
|
3110
3093
|
default: {
|
|
3111
3094
|
const f = e.type === "error" ? e.message : `Unsupported token (type: ${e.type})`;
|
|
3112
|
-
n(e, "UNEXPECTED_TOKEN", f), c = Et(s, e.offset, void 0, null, t, n),
|
|
3095
|
+
n(e, "UNEXPECTED_TOKEN", f), c = Et(s, e.offset, void 0, null, t, n), d = !1;
|
|
3113
3096
|
}
|
|
3114
3097
|
}
|
|
3115
|
-
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 &&
|
|
3098
|
+
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;
|
|
3116
3099
|
}
|
|
3117
3100
|
function Et(s, e, t, n, { spaceBefore: i, comment: r, anchor: o, tag: l, end: a }, c) {
|
|
3118
|
-
const
|
|
3101
|
+
const d = {
|
|
3119
3102
|
type: "scalar",
|
|
3120
3103
|
offset: On(e, t, n),
|
|
3121
3104
|
indent: -1,
|
|
3122
3105
|
source: ""
|
|
3123
|
-
}, f =
|
|
3106
|
+
}, f = Ns(s, d, l, c);
|
|
3124
3107
|
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;
|
|
3125
3108
|
}
|
|
3126
3109
|
function En({ options: s }, { offset: e, source: t, end: n }, i) {
|
|
3127
|
-
const r = new
|
|
3110
|
+
const r = new Fe(t.substring(1));
|
|
3128
3111
|
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);
|
|
3129
3112
|
const o = e + t.length, l = Ie(n, o, s.strict, i);
|
|
3130
3113
|
return r.range = [e, o, l.offset], l.comment && (r.comment = l.comment), r;
|
|
@@ -3136,17 +3119,17 @@ function In(s, e, { offset: t, start: n, value: i, end: r }, o) {
|
|
|
3136
3119
|
directives: a.directives,
|
|
3137
3120
|
options: a.options,
|
|
3138
3121
|
schema: a.schema
|
|
3139
|
-
},
|
|
3122
|
+
}, d = ue(n, {
|
|
3140
3123
|
indicator: "doc-start",
|
|
3141
|
-
next: i ??
|
|
3124
|
+
next: i ?? r?.[0],
|
|
3142
3125
|
offset: t,
|
|
3143
3126
|
onError: o,
|
|
3144
3127
|
parentIndent: 0,
|
|
3145
3128
|
startOnNewline: !0
|
|
3146
3129
|
});
|
|
3147
|
-
|
|
3148
|
-
const f = a.contents.range[2],
|
|
3149
|
-
return
|
|
3130
|
+
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 ? Os(c, i, d, o) : Et(c, d.end, n, null, d, o);
|
|
3131
|
+
const f = a.contents.range[2], u = Ie(r, f, !1, o);
|
|
3132
|
+
return u.comment && (a.comment = u.comment), a.range = [t, f, u.offset], a;
|
|
3150
3133
|
}
|
|
3151
3134
|
function be(s) {
|
|
3152
3135
|
if (typeof s == "number")
|
|
@@ -3157,19 +3140,18 @@ function be(s) {
|
|
|
3157
3140
|
return [e, e + (typeof t == "string" ? t.length : 1)];
|
|
3158
3141
|
}
|
|
3159
3142
|
function Kt(s) {
|
|
3160
|
-
var i;
|
|
3161
3143
|
let e = "", t = !1, n = !1;
|
|
3162
|
-
for (let
|
|
3163
|
-
const
|
|
3164
|
-
switch (
|
|
3144
|
+
for (let i = 0; i < s.length; ++i) {
|
|
3145
|
+
const r = s[i];
|
|
3146
|
+
switch (r[0]) {
|
|
3165
3147
|
case "#":
|
|
3166
3148
|
e += (e === "" ? "" : n ? `
|
|
3167
3149
|
|
|
3168
3150
|
` : `
|
|
3169
|
-
`) + (
|
|
3151
|
+
`) + (r.substring(1) || " "), t = !0, n = !1;
|
|
3170
3152
|
break;
|
|
3171
3153
|
case "%":
|
|
3172
|
-
|
|
3154
|
+
s[i + 1]?.[0] !== "#" && (i += 1), t = !1;
|
|
3173
3155
|
break;
|
|
3174
3156
|
default:
|
|
3175
3157
|
t || (n = !0), t = !1;
|
|
@@ -3181,7 +3163,7 @@ class It {
|
|
|
3181
3163
|
constructor(e = {}) {
|
|
3182
3164
|
this.doc = null, this.atDirectives = !1, this.prelude = [], this.errors = [], this.warnings = [], this.onError = (t, n, i, r) => {
|
|
3183
3165
|
const o = be(t);
|
|
3184
|
-
r ? this.warnings.push(new
|
|
3166
|
+
r ? this.warnings.push(new gs(o, n, i)) : this.errors.push(new z(o, n, i));
|
|
3185
3167
|
}, this.directives = new B({ version: e.version || "1.2" }), this.options = e;
|
|
3186
3168
|
}
|
|
3187
3169
|
decorate(e, t) {
|
|
@@ -3305,9 +3287,9 @@ function Tn(s, e = !0, t) {
|
|
|
3305
3287
|
case "scalar":
|
|
3306
3288
|
case "single-quoted-scalar":
|
|
3307
3289
|
case "double-quoted-scalar":
|
|
3308
|
-
return
|
|
3290
|
+
return Ss(s, e, n);
|
|
3309
3291
|
case "block-scalar":
|
|
3310
|
-
return
|
|
3292
|
+
return ws({ options: { strict: e } }, s, n);
|
|
3311
3293
|
}
|
|
3312
3294
|
}
|
|
3313
3295
|
return null;
|
|
@@ -3326,12 +3308,12 @@ function Ln(s, e) {
|
|
|
3326
3308
|
case "|":
|
|
3327
3309
|
case ">": {
|
|
3328
3310
|
const c = l.indexOf(`
|
|
3329
|
-
`),
|
|
3330
|
-
`,
|
|
3331
|
-
{ type: "block-scalar-header", offset: r, indent: n, source:
|
|
3311
|
+
`), d = l.substring(0, c), f = l.substring(c + 1) + `
|
|
3312
|
+
`, u = [
|
|
3313
|
+
{ type: "block-scalar-header", offset: r, indent: n, source: d }
|
|
3332
3314
|
];
|
|
3333
|
-
return
|
|
3334
|
-
` }), { type: "block-scalar", offset: r, indent: n, props:
|
|
3315
|
+
return As(u, a) || u.push({ type: "newline", offset: -1, indent: n, source: `
|
|
3316
|
+
` }), { type: "block-scalar", offset: r, indent: n, props: u, source: f };
|
|
3335
3317
|
}
|
|
3336
3318
|
case '"':
|
|
3337
3319
|
return { type: "double-quoted-scalar", offset: r, indent: n, source: l, end: a };
|
|
@@ -3395,14 +3377,14 @@ function _n(s, e) {
|
|
|
3395
3377
|
const { offset: r } = s, o = "indent" in s ? s.indent : -1, l = [
|
|
3396
3378
|
{ type: "block-scalar-header", offset: r, indent: o, source: n }
|
|
3397
3379
|
];
|
|
3398
|
-
|
|
3380
|
+
As(l, "end" in s ? s.end : void 0) || l.push({ type: "newline", offset: -1, indent: o, source: `
|
|
3399
3381
|
` });
|
|
3400
3382
|
for (const a of Object.keys(s))
|
|
3401
3383
|
a !== "type" && a !== "offset" && delete s[a];
|
|
3402
3384
|
Object.assign(s, { type: "block-scalar", indent: o, props: l, source: i });
|
|
3403
3385
|
}
|
|
3404
3386
|
}
|
|
3405
|
-
function
|
|
3387
|
+
function As(s, e) {
|
|
3406
3388
|
if (e)
|
|
3407
3389
|
for (const t of e)
|
|
3408
3390
|
switch (t.type) {
|
|
@@ -3495,17 +3477,17 @@ function Ke({ start: s, key: e, sep: t, value: n }) {
|
|
|
3495
3477
|
i += r.source;
|
|
3496
3478
|
return n && (i += qe(n)), i;
|
|
3497
3479
|
}
|
|
3498
|
-
const ht = Symbol("break visit"), vn = Symbol("skip children"),
|
|
3499
|
-
function
|
|
3500
|
-
"type" in s && s.type === "document" && (s = { start: s.start, value: s.value }),
|
|
3480
|
+
const ht = Symbol("break visit"), vn = Symbol("skip children"), Es = Symbol("remove item");
|
|
3481
|
+
function x(s, e) {
|
|
3482
|
+
"type" in s && s.type === "document" && (s = { start: s.start, value: s.value }), Is(Object.freeze([]), s, e);
|
|
3501
3483
|
}
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3484
|
+
x.BREAK = ht;
|
|
3485
|
+
x.SKIP = vn;
|
|
3486
|
+
x.REMOVE = Es;
|
|
3487
|
+
x.itemAtPath = (s, e) => {
|
|
3506
3488
|
let t = s;
|
|
3507
3489
|
for (const [n, i] of e) {
|
|
3508
|
-
const r = t
|
|
3490
|
+
const r = t?.[n];
|
|
3509
3491
|
if (r && "items" in r)
|
|
3510
3492
|
t = r.items[i];
|
|
3511
3493
|
else
|
|
@@ -3513,13 +3495,13 @@ Z.itemAtPath = (s, e) => {
|
|
|
3513
3495
|
}
|
|
3514
3496
|
return t;
|
|
3515
3497
|
};
|
|
3516
|
-
|
|
3517
|
-
const t =
|
|
3498
|
+
x.parentCollection = (s, e) => {
|
|
3499
|
+
const t = x.itemAtPath(s, e.slice(0, -1)), n = e[e.length - 1][0], i = t?.[n];
|
|
3518
3500
|
if (i && "items" in i)
|
|
3519
3501
|
return i;
|
|
3520
3502
|
throw new Error("Parent collection not found");
|
|
3521
3503
|
};
|
|
3522
|
-
function
|
|
3504
|
+
function Is(s, e, t) {
|
|
3523
3505
|
let n = t(e, s);
|
|
3524
3506
|
if (typeof n == "symbol")
|
|
3525
3507
|
return n;
|
|
@@ -3527,13 +3509,13 @@ function Es(s, e, t) {
|
|
|
3527
3509
|
const r = e[i];
|
|
3528
3510
|
if (r && "items" in r) {
|
|
3529
3511
|
for (let o = 0; o < r.items.length; ++o) {
|
|
3530
|
-
const l =
|
|
3512
|
+
const l = Is(Object.freeze(s.concat([[i, o]])), r.items[o], t);
|
|
3531
3513
|
if (typeof l == "number")
|
|
3532
3514
|
o = l - 1;
|
|
3533
3515
|
else {
|
|
3534
3516
|
if (l === ht)
|
|
3535
3517
|
return ht;
|
|
3536
|
-
l ===
|
|
3518
|
+
l === Es && (r.items.splice(o, 1), o -= 1);
|
|
3537
3519
|
}
|
|
3538
3520
|
}
|
|
3539
3521
|
typeof n == "function" && i === "key" && (n = n(e, s));
|
|
@@ -3541,14 +3523,14 @@ function Es(s, e, t) {
|
|
|
3541
3523
|
}
|
|
3542
3524
|
return typeof n == "function" ? n(e, s) : n;
|
|
3543
3525
|
}
|
|
3544
|
-
const ze = "\uFEFF",
|
|
3526
|
+
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");
|
|
3545
3527
|
function Kn(s) {
|
|
3546
3528
|
switch (s) {
|
|
3547
3529
|
case ze:
|
|
3548
3530
|
return "<BOM>";
|
|
3549
|
-
case Ze:
|
|
3550
|
-
return "<DOC>";
|
|
3551
3531
|
case xe:
|
|
3532
|
+
return "<DOC>";
|
|
3533
|
+
case Ze:
|
|
3552
3534
|
return "<FLOW_END>";
|
|
3553
3535
|
case Oe:
|
|
3554
3536
|
return "<SCALAR>";
|
|
@@ -3556,13 +3538,13 @@ function Kn(s) {
|
|
|
3556
3538
|
return JSON.stringify(s);
|
|
3557
3539
|
}
|
|
3558
3540
|
}
|
|
3559
|
-
function
|
|
3541
|
+
function Ts(s) {
|
|
3560
3542
|
switch (s) {
|
|
3561
3543
|
case ze:
|
|
3562
3544
|
return "byte-order-mark";
|
|
3563
|
-
case Ze:
|
|
3564
|
-
return "doc-mode";
|
|
3565
3545
|
case xe:
|
|
3546
|
+
return "doc-mode";
|
|
3547
|
+
case Ze:
|
|
3566
3548
|
return "flow-error-end";
|
|
3567
3549
|
case Oe:
|
|
3568
3550
|
return "scalar";
|
|
@@ -3617,11 +3599,11 @@ function Is(s) {
|
|
|
3617
3599
|
}
|
|
3618
3600
|
return null;
|
|
3619
3601
|
}
|
|
3620
|
-
const
|
|
3602
|
+
const jn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3621
3603
|
__proto__: null,
|
|
3622
3604
|
BOM: ze,
|
|
3623
|
-
DOCUMENT:
|
|
3624
|
-
FLOW_END:
|
|
3605
|
+
DOCUMENT: xe,
|
|
3606
|
+
FLOW_END: Ze,
|
|
3625
3607
|
SCALAR: Oe,
|
|
3626
3608
|
createScalarToken: Ln,
|
|
3627
3609
|
isCollection: Bn,
|
|
@@ -3630,8 +3612,8 @@ const Pn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3630
3612
|
resolveAsScalar: Tn,
|
|
3631
3613
|
setScalarValue: $n,
|
|
3632
3614
|
stringify: Cn,
|
|
3633
|
-
tokenType:
|
|
3634
|
-
visit:
|
|
3615
|
+
tokenType: Ts,
|
|
3616
|
+
visit: x
|
|
3635
3617
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3636
3618
|
function D(s) {
|
|
3637
3619
|
switch (s) {
|
|
@@ -3646,9 +3628,9 @@ function D(s) {
|
|
|
3646
3628
|
return !1;
|
|
3647
3629
|
}
|
|
3648
3630
|
}
|
|
3649
|
-
const
|
|
3631
|
+
const jt = new Set("0123456789ABCDEFabcdef"), Pn = new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"), _e = new Set(",[]{}"), Dn = new Set(` ,[]{}
|
|
3650
3632
|
\r `), ot = (s) => !s || Dn.has(s);
|
|
3651
|
-
class
|
|
3633
|
+
class Ls {
|
|
3652
3634
|
constructor() {
|
|
3653
3635
|
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;
|
|
3654
3636
|
}
|
|
@@ -3764,7 +3746,7 @@ class Ts {
|
|
|
3764
3746
|
const t = yield* this.pushSpaces(!0);
|
|
3765
3747
|
return yield* this.pushCount(e.length - t), yield* this.pushNewline(), "stream";
|
|
3766
3748
|
}
|
|
3767
|
-
return yield
|
|
3749
|
+
return yield xe, yield* this.parseLineStart();
|
|
3768
3750
|
}
|
|
3769
3751
|
*parseLineStart() {
|
|
3770
3752
|
const e = this.charAt(0);
|
|
@@ -3828,7 +3810,7 @@ class Ts {
|
|
|
3828
3810
|
if (i === null)
|
|
3829
3811
|
return this.setNext("flow");
|
|
3830
3812
|
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] === "}")))
|
|
3831
|
-
return this.flowLevel = 0, yield
|
|
3813
|
+
return this.flowLevel = 0, yield Ze, yield* this.parseLineStart();
|
|
3832
3814
|
let r = 0;
|
|
3833
3815
|
for (; i[r] === ","; )
|
|
3834
3816
|
r += yield* this.pushCount(1), r += yield* this.pushSpaces(!0), this.flowKey = !1;
|
|
@@ -4033,9 +4015,9 @@ class Ts {
|
|
|
4033
4015
|
} else {
|
|
4034
4016
|
let e = this.pos + 1, t = this.buffer[e];
|
|
4035
4017
|
for (; t; )
|
|
4036
|
-
if (
|
|
4018
|
+
if (Pn.has(t))
|
|
4037
4019
|
t = this.buffer[++e];
|
|
4038
|
-
else if (t === "%" &&
|
|
4020
|
+
else if (t === "%" && jt.has(this.buffer[e + 1]) && jt.has(this.buffer[e + 2]))
|
|
4039
4021
|
t = this.buffer[e += 3];
|
|
4040
4022
|
else
|
|
4041
4023
|
break;
|
|
@@ -4063,7 +4045,7 @@ class Ts {
|
|
|
4063
4045
|
return yield* this.pushToIndex(t, !1);
|
|
4064
4046
|
}
|
|
4065
4047
|
}
|
|
4066
|
-
class
|
|
4048
|
+
class $s {
|
|
4067
4049
|
constructor() {
|
|
4068
4050
|
this.lineStarts = [], this.addNewLine = (e) => this.lineStarts.push(e), this.linePos = (e) => {
|
|
4069
4051
|
let t = 0, n = this.lineStarts.length;
|
|
@@ -4080,13 +4062,13 @@ class Ls {
|
|
|
4080
4062
|
};
|
|
4081
4063
|
}
|
|
4082
4064
|
}
|
|
4083
|
-
function
|
|
4065
|
+
function Y(s, e) {
|
|
4084
4066
|
for (let t = 0; t < s.length; ++t)
|
|
4085
4067
|
if (s[t].type === e)
|
|
4086
4068
|
return !0;
|
|
4087
4069
|
return !1;
|
|
4088
4070
|
}
|
|
4089
|
-
function
|
|
4071
|
+
function Pt(s) {
|
|
4090
4072
|
for (let e = 0; e < s.length; ++e)
|
|
4091
4073
|
switch (s[e].type) {
|
|
4092
4074
|
case "space":
|
|
@@ -4098,8 +4080,8 @@ function jt(s) {
|
|
|
4098
4080
|
}
|
|
4099
4081
|
return -1;
|
|
4100
4082
|
}
|
|
4101
|
-
function
|
|
4102
|
-
switch (s
|
|
4083
|
+
function _s(s) {
|
|
4084
|
+
switch (s?.type) {
|
|
4103
4085
|
case "alias":
|
|
4104
4086
|
case "scalar":
|
|
4105
4087
|
case "single-quoted-scalar":
|
|
@@ -4126,7 +4108,6 @@ function Ce(s) {
|
|
|
4126
4108
|
}
|
|
4127
4109
|
}
|
|
4128
4110
|
function ne(s) {
|
|
4129
|
-
var t;
|
|
4130
4111
|
if (s.length === 0)
|
|
4131
4112
|
return [];
|
|
4132
4113
|
let e = s.length;
|
|
@@ -4139,14 +4120,14 @@ function ne(s) {
|
|
|
4139
4120
|
case "newline":
|
|
4140
4121
|
break e;
|
|
4141
4122
|
}
|
|
4142
|
-
for (;
|
|
4123
|
+
for (; s[++e]?.type === "space"; )
|
|
4143
4124
|
;
|
|
4144
4125
|
return s.splice(e, s.length);
|
|
4145
4126
|
}
|
|
4146
4127
|
function Dt(s) {
|
|
4147
4128
|
if (s.start.type === "flow-seq-start")
|
|
4148
4129
|
for (const e of s.items)
|
|
4149
|
-
e.sep && !e.value && !
|
|
4130
|
+
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);
|
|
4150
4131
|
}
|
|
4151
4132
|
class Tt {
|
|
4152
4133
|
/**
|
|
@@ -4154,7 +4135,7 @@ class Tt {
|
|
|
4154
4135
|
* each new line (in `parse()`, including the start of input).
|
|
4155
4136
|
*/
|
|
4156
4137
|
constructor(e) {
|
|
4157
|
-
this.atNewLine = !0, this.atScalar = !1, this.indent = 0, this.offset = 0, this.onKeyLine = !1, this.stack = [], this.source = "", this.type = "", this.lexer = new
|
|
4138
|
+
this.atNewLine = !0, this.atScalar = !1, this.indent = 0, this.offset = 0, this.onKeyLine = !1, this.stack = [], this.source = "", this.type = "", this.lexer = new Ls(), this.onNewLine = e;
|
|
4158
4139
|
}
|
|
4159
4140
|
/**
|
|
4160
4141
|
* Parse `source` as a YAML stream.
|
|
@@ -4178,7 +4159,7 @@ class Tt {
|
|
|
4178
4159
|
this.atScalar = !1, yield* this.step(), this.offset += e.length;
|
|
4179
4160
|
return;
|
|
4180
4161
|
}
|
|
4181
|
-
const t =
|
|
4162
|
+
const t = Ts(e);
|
|
4182
4163
|
if (t)
|
|
4183
4164
|
if (t === "scalar")
|
|
4184
4165
|
this.atNewLine = !1, this.atScalar = !0, this.type = "scalar";
|
|
@@ -4303,7 +4284,7 @@ class Tt {
|
|
|
4303
4284
|
}
|
|
4304
4285
|
if ((n.type === "document" || n.type === "block-map" || n.type === "block-seq") && (t.type === "block-map" || t.type === "block-seq")) {
|
|
4305
4286
|
const i = t.items[t.items.length - 1];
|
|
4306
|
-
i && !i.sep && !i.value && i.start.length > 0 &&
|
|
4287
|
+
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));
|
|
4307
4288
|
}
|
|
4308
4289
|
}
|
|
4309
4290
|
}
|
|
@@ -4341,7 +4322,7 @@ class Tt {
|
|
|
4341
4322
|
return yield* this.lineEnd(e);
|
|
4342
4323
|
switch (this.type) {
|
|
4343
4324
|
case "doc-start": {
|
|
4344
|
-
|
|
4325
|
+
Pt(e.start) !== -1 ? (yield* this.pop(), yield* this.step()) : e.start.push(this.sourceToken);
|
|
4345
4326
|
return;
|
|
4346
4327
|
}
|
|
4347
4328
|
case "anchor":
|
|
@@ -4398,13 +4379,12 @@ class Tt {
|
|
|
4398
4379
|
}
|
|
4399
4380
|
}
|
|
4400
4381
|
*blockMap(e) {
|
|
4401
|
-
var n;
|
|
4402
4382
|
const t = e.items[e.items.length - 1];
|
|
4403
4383
|
switch (this.type) {
|
|
4404
4384
|
case "newline":
|
|
4405
4385
|
if (this.onKeyLine = !1, t.value) {
|
|
4406
|
-
const
|
|
4407
|
-
(
|
|
4386
|
+
const n = "end" in t.value ? t.value.end : void 0;
|
|
4387
|
+
(Array.isArray(n) ? n[n.length - 1] : void 0)?.type === "comment" ? n?.push(this.sourceToken) : e.items.push({ start: [this.sourceToken] });
|
|
4408
4388
|
} else t.sep ? t.sep.push(this.sourceToken) : t.start.push(this.sourceToken);
|
|
4409
4389
|
return;
|
|
4410
4390
|
case "space":
|
|
@@ -4415,9 +4395,9 @@ class Tt {
|
|
|
4415
4395
|
t.sep.push(this.sourceToken);
|
|
4416
4396
|
else {
|
|
4417
4397
|
if (this.atIndentedComment(t.start, e.indent)) {
|
|
4418
|
-
const i = e.items[e.items.length - 2]
|
|
4419
|
-
if (Array.isArray(
|
|
4420
|
-
Array.prototype.push.apply(
|
|
4398
|
+
const i = e.items[e.items.length - 2]?.value?.end;
|
|
4399
|
+
if (Array.isArray(i)) {
|
|
4400
|
+
Array.prototype.push.apply(i, t.start), i.push(this.sourceToken), e.items.pop();
|
|
4421
4401
|
return;
|
|
4422
4402
|
}
|
|
4423
4403
|
}
|
|
@@ -4426,34 +4406,34 @@ class Tt {
|
|
|
4426
4406
|
return;
|
|
4427
4407
|
}
|
|
4428
4408
|
if (this.indent >= e.indent) {
|
|
4429
|
-
const
|
|
4430
|
-
let
|
|
4431
|
-
if (
|
|
4432
|
-
const
|
|
4433
|
-
for (let
|
|
4434
|
-
const
|
|
4435
|
-
switch (
|
|
4409
|
+
const n = !this.onKeyLine && this.indent === e.indent, i = n && (t.sep || t.explicitKey) && this.type !== "seq-item-ind";
|
|
4410
|
+
let r = [];
|
|
4411
|
+
if (i && t.sep && !t.value) {
|
|
4412
|
+
const o = [];
|
|
4413
|
+
for (let l = 0; l < t.sep.length; ++l) {
|
|
4414
|
+
const a = t.sep[l];
|
|
4415
|
+
switch (a.type) {
|
|
4436
4416
|
case "newline":
|
|
4437
|
-
|
|
4417
|
+
o.push(l);
|
|
4438
4418
|
break;
|
|
4439
4419
|
case "space":
|
|
4440
4420
|
break;
|
|
4441
4421
|
case "comment":
|
|
4442
|
-
|
|
4422
|
+
a.indent > e.indent && (o.length = 0);
|
|
4443
4423
|
break;
|
|
4444
4424
|
default:
|
|
4445
|
-
|
|
4425
|
+
o.length = 0;
|
|
4446
4426
|
}
|
|
4447
4427
|
}
|
|
4448
|
-
|
|
4428
|
+
o.length >= 2 && (r = t.sep.splice(o[1]));
|
|
4449
4429
|
}
|
|
4450
4430
|
switch (this.type) {
|
|
4451
4431
|
case "anchor":
|
|
4452
4432
|
case "tag":
|
|
4453
|
-
|
|
4433
|
+
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);
|
|
4454
4434
|
return;
|
|
4455
4435
|
case "explicit-key-ind":
|
|
4456
|
-
!t.sep && !t.explicitKey ? (t.start.push(this.sourceToken), t.explicitKey = !0) :
|
|
4436
|
+
!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({
|
|
4457
4437
|
type: "block-map",
|
|
4458
4438
|
offset: this.offset,
|
|
4459
4439
|
indent: this.indent,
|
|
@@ -4465,35 +4445,35 @@ class Tt {
|
|
|
4465
4445
|
if (t.sep)
|
|
4466
4446
|
if (t.value)
|
|
4467
4447
|
e.items.push({ start: [], key: null, sep: [this.sourceToken] });
|
|
4468
|
-
else if (
|
|
4448
|
+
else if (Y(t.sep, "map-value-ind"))
|
|
4469
4449
|
this.stack.push({
|
|
4470
4450
|
type: "block-map",
|
|
4471
4451
|
offset: this.offset,
|
|
4472
4452
|
indent: this.indent,
|
|
4473
|
-
items: [{ start:
|
|
4453
|
+
items: [{ start: r, key: null, sep: [this.sourceToken] }]
|
|
4474
4454
|
});
|
|
4475
|
-
else if (
|
|
4476
|
-
const
|
|
4477
|
-
|
|
4455
|
+
else if (_s(t.key) && !Y(t.sep, "newline")) {
|
|
4456
|
+
const o = ne(t.start), l = t.key, a = t.sep;
|
|
4457
|
+
a.push(this.sourceToken), delete t.key, delete t.sep, this.stack.push({
|
|
4478
4458
|
type: "block-map",
|
|
4479
4459
|
offset: this.offset,
|
|
4480
4460
|
indent: this.indent,
|
|
4481
|
-
items: [{ start:
|
|
4461
|
+
items: [{ start: o, key: l, sep: a }]
|
|
4482
4462
|
});
|
|
4483
|
-
} else
|
|
4484
|
-
else if (
|
|
4463
|
+
} else r.length > 0 ? t.sep = t.sep.concat(r, this.sourceToken) : t.sep.push(this.sourceToken);
|
|
4464
|
+
else if (Y(t.start, "newline"))
|
|
4485
4465
|
Object.assign(t, { key: null, sep: [this.sourceToken] });
|
|
4486
4466
|
else {
|
|
4487
|
-
const
|
|
4467
|
+
const o = ne(t.start);
|
|
4488
4468
|
this.stack.push({
|
|
4489
4469
|
type: "block-map",
|
|
4490
4470
|
offset: this.offset,
|
|
4491
4471
|
indent: this.indent,
|
|
4492
|
-
items: [{ start:
|
|
4472
|
+
items: [{ start: o, key: null, sep: [this.sourceToken] }]
|
|
4493
4473
|
});
|
|
4494
4474
|
}
|
|
4495
4475
|
else
|
|
4496
|
-
t.sep ? t.value ||
|
|
4476
|
+
t.sep ? t.value || i ? e.items.push({ start: r, key: null, sep: [this.sourceToken] }) : Y(t.sep, "map-value-ind") ? this.stack.push({
|
|
4497
4477
|
type: "block-map",
|
|
4498
4478
|
offset: this.offset,
|
|
4499
4479
|
indent: this.indent,
|
|
@@ -4505,14 +4485,25 @@ class Tt {
|
|
|
4505
4485
|
case "scalar":
|
|
4506
4486
|
case "single-quoted-scalar":
|
|
4507
4487
|
case "double-quoted-scalar": {
|
|
4508
|
-
const
|
|
4509
|
-
|
|
4488
|
+
const o = this.flowScalar(this.type);
|
|
4489
|
+
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);
|
|
4510
4490
|
return;
|
|
4511
4491
|
}
|
|
4512
4492
|
default: {
|
|
4513
|
-
const
|
|
4514
|
-
if (
|
|
4515
|
-
|
|
4493
|
+
const o = this.startBlockValue(e);
|
|
4494
|
+
if (o) {
|
|
4495
|
+
if (o.type === "block-seq") {
|
|
4496
|
+
if (!t.explicitKey && t.sep && !Y(t.sep, "newline")) {
|
|
4497
|
+
yield* this.pop({
|
|
4498
|
+
type: "error",
|
|
4499
|
+
offset: this.offset,
|
|
4500
|
+
message: "Unexpected block-seq-ind on same line with key",
|
|
4501
|
+
source: this.source
|
|
4502
|
+
});
|
|
4503
|
+
return;
|
|
4504
|
+
}
|
|
4505
|
+
} else n && e.items.push({ start: r });
|
|
4506
|
+
this.stack.push(o);
|
|
4516
4507
|
return;
|
|
4517
4508
|
}
|
|
4518
4509
|
}
|
|
@@ -4521,13 +4512,12 @@ class Tt {
|
|
|
4521
4512
|
yield* this.pop(), yield* this.step();
|
|
4522
4513
|
}
|
|
4523
4514
|
*blockSequence(e) {
|
|
4524
|
-
var n;
|
|
4525
4515
|
const t = e.items[e.items.length - 1];
|
|
4526
4516
|
switch (this.type) {
|
|
4527
4517
|
case "newline":
|
|
4528
4518
|
if (t.value) {
|
|
4529
|
-
const
|
|
4530
|
-
(
|
|
4519
|
+
const n = "end" in t.value ? t.value.end : void 0;
|
|
4520
|
+
(Array.isArray(n) ? n[n.length - 1] : void 0)?.type === "comment" ? n?.push(this.sourceToken) : e.items.push({ start: [this.sourceToken] });
|
|
4531
4521
|
} else
|
|
4532
4522
|
t.start.push(this.sourceToken);
|
|
4533
4523
|
return;
|
|
@@ -4537,9 +4527,9 @@ class Tt {
|
|
|
4537
4527
|
e.items.push({ start: [this.sourceToken] });
|
|
4538
4528
|
else {
|
|
4539
4529
|
if (this.atIndentedComment(t.start, e.indent)) {
|
|
4540
|
-
const i = e.items[e.items.length - 2]
|
|
4541
|
-
if (Array.isArray(
|
|
4542
|
-
Array.prototype.push.apply(
|
|
4530
|
+
const i = e.items[e.items.length - 2]?.value?.end;
|
|
4531
|
+
if (Array.isArray(i)) {
|
|
4532
|
+
Array.prototype.push.apply(i, t.start), i.push(this.sourceToken), e.items.pop();
|
|
4543
4533
|
return;
|
|
4544
4534
|
}
|
|
4545
4535
|
}
|
|
@@ -4555,13 +4545,13 @@ class Tt {
|
|
|
4555
4545
|
case "seq-item-ind":
|
|
4556
4546
|
if (this.indent !== e.indent)
|
|
4557
4547
|
break;
|
|
4558
|
-
t.value ||
|
|
4548
|
+
t.value || Y(t.start, "seq-item-ind") ? e.items.push({ start: [this.sourceToken] }) : t.start.push(this.sourceToken);
|
|
4559
4549
|
return;
|
|
4560
4550
|
}
|
|
4561
4551
|
if (this.indent > e.indent) {
|
|
4562
|
-
const
|
|
4563
|
-
if (
|
|
4564
|
-
this.stack.push(
|
|
4552
|
+
const n = this.startBlockValue(e);
|
|
4553
|
+
if (n) {
|
|
4554
|
+
this.stack.push(n);
|
|
4565
4555
|
return;
|
|
4566
4556
|
}
|
|
4567
4557
|
}
|
|
@@ -4721,19 +4711,19 @@ class Tt {
|
|
|
4721
4711
|
}
|
|
4722
4712
|
}
|
|
4723
4713
|
}
|
|
4724
|
-
function
|
|
4714
|
+
function Cs(s) {
|
|
4725
4715
|
const e = s.prettyErrors !== !1;
|
|
4726
|
-
return { lineCounter: s.lineCounter || e && new
|
|
4716
|
+
return { lineCounter: s.lineCounter || e && new $s() || null, prettyErrors: e };
|
|
4727
4717
|
}
|
|
4728
4718
|
function qn(s, e = {}) {
|
|
4729
|
-
const { lineCounter: t, prettyErrors: n } =
|
|
4719
|
+
const { lineCounter: t, prettyErrors: n } = Cs(e), i = new Tt(t?.addNewLine), r = new It(e), o = Array.from(r.compose(i.parse(s)));
|
|
4730
4720
|
if (n && t)
|
|
4731
4721
|
for (const l of o)
|
|
4732
4722
|
l.errors.forEach(De(s, t)), l.warnings.forEach(De(s, t));
|
|
4733
4723
|
return o.length > 0 ? o : Object.assign([], { empty: !0 }, r.streamInfo());
|
|
4734
4724
|
}
|
|
4735
|
-
function
|
|
4736
|
-
const { lineCounter: t, prettyErrors: n } =
|
|
4725
|
+
function vs(s, e = {}) {
|
|
4726
|
+
const { lineCounter: t, prettyErrors: n } = Cs(e), i = new Tt(t?.addNewLine), r = new It(e);
|
|
4737
4727
|
let o = null;
|
|
4738
4728
|
for (const l of r.compose(i.parse(s), !0, s.length))
|
|
4739
4729
|
if (!o)
|
|
@@ -4744,20 +4734,20 @@ function Cs(s, e = {}) {
|
|
|
4744
4734
|
}
|
|
4745
4735
|
return n && t && (o.errors.forEach(De(s, t)), o.warnings.forEach(De(s, t))), o;
|
|
4746
4736
|
}
|
|
4747
|
-
function
|
|
4737
|
+
function Rn(s, e, t) {
|
|
4748
4738
|
let n;
|
|
4749
4739
|
typeof e == "function" ? n = e : t === void 0 && e && typeof e == "object" && (t = e);
|
|
4750
|
-
const i =
|
|
4740
|
+
const i = vs(s, t);
|
|
4751
4741
|
if (!i)
|
|
4752
4742
|
return null;
|
|
4753
|
-
if (i.warnings.forEach((r) =>
|
|
4743
|
+
if (i.warnings.forEach((r) => xt(i.options.logLevel, r)), i.errors.length > 0) {
|
|
4754
4744
|
if (i.options.logLevel !== "silent")
|
|
4755
4745
|
throw i.errors[0];
|
|
4756
4746
|
i.errors = [];
|
|
4757
4747
|
}
|
|
4758
4748
|
return i.toJS(Object.assign({ reviver: n }, t));
|
|
4759
4749
|
}
|
|
4760
|
-
function
|
|
4750
|
+
function Fn(s, e, t) {
|
|
4761
4751
|
let n = null;
|
|
4762
4752
|
if (typeof e == "function" || Array.isArray(e) ? n = e : t === void 0 && e && (t = e), typeof t == "string" && (t = t.length), typeof t == "number") {
|
|
4763
4753
|
const i = Math.round(t);
|
|
@@ -4768,70 +4758,70 @@ function Rn(s, e, t) {
|
|
|
4768
4758
|
if (!i)
|
|
4769
4759
|
return;
|
|
4770
4760
|
}
|
|
4771
|
-
return
|
|
4761
|
+
return Z(s) && !n ? s.toString(t) : new ge(s, n, t).toString(t);
|
|
4772
4762
|
}
|
|
4773
4763
|
const Un = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4774
4764
|
__proto__: null,
|
|
4775
|
-
Alias:
|
|
4776
|
-
CST:
|
|
4765
|
+
Alias: Fe,
|
|
4766
|
+
CST: jn,
|
|
4777
4767
|
Composer: It,
|
|
4778
4768
|
Document: ge,
|
|
4779
|
-
Lexer:
|
|
4780
|
-
LineCounter:
|
|
4769
|
+
Lexer: Ls,
|
|
4770
|
+
LineCounter: $s,
|
|
4781
4771
|
Pair: v,
|
|
4782
4772
|
Parser: Tt,
|
|
4783
|
-
Scalar:
|
|
4773
|
+
Scalar: O,
|
|
4784
4774
|
Schema: Xe,
|
|
4785
4775
|
YAMLError: At,
|
|
4786
4776
|
YAMLMap: K,
|
|
4787
4777
|
YAMLParseError: z,
|
|
4788
4778
|
YAMLSeq: Q,
|
|
4789
|
-
YAMLWarning:
|
|
4790
|
-
isAlias:
|
|
4779
|
+
YAMLWarning: gs,
|
|
4780
|
+
isAlias: W,
|
|
4791
4781
|
isCollection: L,
|
|
4792
|
-
isDocument:
|
|
4782
|
+
isDocument: Z,
|
|
4793
4783
|
isMap: de,
|
|
4794
4784
|
isNode: $,
|
|
4795
4785
|
isPair: T,
|
|
4796
4786
|
isScalar: E,
|
|
4797
4787
|
isSeq: pe,
|
|
4798
|
-
parse:
|
|
4788
|
+
parse: Rn,
|
|
4799
4789
|
parseAllDocuments: qn,
|
|
4800
|
-
parseDocument:
|
|
4801
|
-
stringify:
|
|
4802
|
-
visit:
|
|
4803
|
-
visitAsync:
|
|
4790
|
+
parseDocument: vs,
|
|
4791
|
+
stringify: Fn,
|
|
4792
|
+
visit: ee,
|
|
4793
|
+
visitAsync: Re
|
|
4804
4794
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4805
4795
|
export {
|
|
4806
|
-
|
|
4807
|
-
|
|
4796
|
+
Fe as Alias,
|
|
4797
|
+
jn as CST,
|
|
4808
4798
|
It as Composer,
|
|
4809
4799
|
ge as Document,
|
|
4810
|
-
|
|
4811
|
-
|
|
4800
|
+
Ls as Lexer,
|
|
4801
|
+
$s as LineCounter,
|
|
4812
4802
|
v as Pair,
|
|
4813
4803
|
Tt as Parser,
|
|
4814
|
-
|
|
4804
|
+
O as Scalar,
|
|
4815
4805
|
Xe as Schema,
|
|
4816
4806
|
At as YAMLError,
|
|
4817
4807
|
K as YAMLMap,
|
|
4818
4808
|
z as YAMLParseError,
|
|
4819
4809
|
Q as YAMLSeq,
|
|
4820
|
-
|
|
4810
|
+
gs as YAMLWarning,
|
|
4821
4811
|
Un as default,
|
|
4822
|
-
|
|
4812
|
+
W as isAlias,
|
|
4823
4813
|
L as isCollection,
|
|
4824
|
-
|
|
4814
|
+
Z as isDocument,
|
|
4825
4815
|
de as isMap,
|
|
4826
4816
|
$ as isNode,
|
|
4827
4817
|
T as isPair,
|
|
4828
4818
|
E as isScalar,
|
|
4829
4819
|
pe as isSeq,
|
|
4830
|
-
|
|
4820
|
+
Rn as parse,
|
|
4831
4821
|
qn as parseAllDocuments,
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
|
|
4822
|
+
vs as parseDocument,
|
|
4823
|
+
Fn as stringify,
|
|
4824
|
+
ee as visit,
|
|
4825
|
+
Re as visitAsync
|
|
4836
4826
|
};
|
|
4837
|
-
//# sourceMappingURL=index-
|
|
4827
|
+
//# sourceMappingURL=index-DmNq2fbN.js.map
|