akanjs 3.0.2 → 3.1.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/base/baseEnv.ts +0 -4
- package/base/primitiveRegistry.ts +2 -2
- package/client/cookie.ts +5 -1
- package/client/csrLocation.ts +122 -0
- package/client/csrTypes.ts +32 -4
- package/client/device.ts +2 -1
- package/client/frameConfig.ts +78 -7
- package/client/index.ts +3 -0
- package/client/makePageProto.tsx +3 -2
- package/client/native/external-view.ts +1 -0
- package/client/route/RootLayoutDefinition.ts +7 -1
- package/client/route/RouteHead.ts +108 -0
- package/client/route/index.ts +1 -0
- package/client/router.ts +36 -23
- package/client/rscNavigation.ts +8 -2
- package/client/viewportMeta.ts +60 -0
- package/client/webManifest.ts +18 -0
- package/common/Logger.ts +7 -2
- package/common/PipelineNames.ts +31 -0
- package/common/PipelinePattern.ts +70 -0
- package/common/PipelinePlanSchema.ts +490 -0
- package/common/backoff.ts +14 -0
- package/common/index.ts +39 -0
- package/common/pipelinePlan.ts +259 -0
- package/common/routeConvention.ts +1 -0
- package/common/types.ts +17 -0
- package/constant/constantRegistry.ts +26 -6
- package/dictionary/base.dictionary.ts +8 -0
- package/dictionary/trans.ts +9 -1
- package/document/into.ts +5 -0
- package/fetch/client/fetchClient.ts +135 -31
- package/fetch/client/httpClient.ts +45 -0
- package/fetch/client/wsClient.ts +125 -16
- package/fetch/fetchType/buildFetch.type.ts +1 -0
- package/index.ts +243 -10
- package/package.json +1 -5
- package/server/akanApp.ts +5 -2
- package/server/akanServer.ts +44 -8
- package/server/artifact/builderRpc.ts +8 -3
- package/server/artifact/ipcTypes.ts +5 -2
- package/server/di/diLifecycle.ts +39 -3
- package/server/di/utils.ts +28 -1
- package/server/ed25519Key.ts +48 -0
- package/server/index.ts +1 -0
- package/server/machine/index.ts +2 -0
- package/server/machine/machineAccount.ts +27 -0
- package/server/machine/machineToken.ts +151 -0
- package/server/mcp/McpApps.ts +256 -0
- package/server/mcp/McpDispatcher.ts +31 -7
- package/server/mcp/McpRouter.ts +209 -46
- package/server/ops/opsToken.ts +3 -10
- package/server/resolver/database.resolver.ts +3 -0
- package/server/resolver/signal.resolver.ts +40 -3
- package/server/routeElementComposer.tsx +78 -2
- package/server/routeState.ts +6 -0
- package/server/routeTreeBuilder.ts +26 -9
- package/server/routing/apiRouter.ts +6 -3
- package/server/routing/roomReplay.ts +88 -0
- package/server/rscClient.tsx +53 -8
- package/server/rscWorker.tsx +141 -27
- package/server/rscWorkerHost.ts +18 -5
- package/server/sitemap.ts +14 -0
- package/server/ssrFromRscRenderer.tsx +12 -6
- package/server/ssrTypes.ts +3 -1
- package/server/systemPageDocument.tsx +38 -30
- package/server/types.tsx +2 -0
- package/server/webRouter.ts +74 -5
- package/service/injectInfo.ts +9 -1
- package/service/ipcTypes.ts +2 -1
- package/service/predefinedAdaptor/database.adaptor.ts +1 -146
- package/service/predefinedAdaptor/queue.adaptor.ts +44 -6
- package/service/predefinedAdaptor/queueBackoff.ts +12 -0
- package/service/predefinedAdaptor/solidQueue.adaptor.ts +17 -13
- package/service/predefinedAdaptor/sql/SqlDocumentStore.ts +44 -2
- package/service/predefinedAdaptor/sql/dialect/postgres.ts +3 -0
- package/service/predefinedAdaptor/sql/dialect/sqlite.ts +5 -2
- package/service/predefinedAdaptor/sql/search/fts5.ts +1 -1
- package/service/predefinedAdaptor/sql/types.ts +8 -6
- package/service/predefinedAdaptor/sql/values.ts +0 -23
- package/service/serve.ts +5 -1
- package/signal/agent.signal.ts +1 -1
- package/signal/base.signal.ts +2 -2
- package/signal/endpointIdempotency.ts +53 -0
- package/signal/internalArg.ts +14 -0
- package/signal/mcp/McpDocument.ts +38 -1
- package/signal/mcp/mcpProtocol.ts +18 -0
- package/signal/signalContext.ts +58 -30
- package/signal/signalRegistry.ts +14 -4
- package/signal/types.ts +18 -3
- package/store/agent/StoreSurfaceSource.ts +1 -1
- package/store/agentic/StToolBuilder.ts +3 -0
- package/test/conformance.ts +9 -33
- package/types/base/baseEnv.d.ts +0 -4
- package/types/base/primitiveRegistry.d.ts +1 -1
- package/types/client/csrLocation.d.ts +32 -0
- package/types/client/csrTypes.d.ts +40 -4
- package/types/client/frameConfig.d.ts +14 -2
- package/types/client/index.d.ts +3 -0
- package/types/client/native/external-view.d.ts +1 -0
- package/types/client/route/RootLayoutDefinition.d.ts +2 -1
- package/types/client/route/RouteHead.d.ts +13 -0
- package/types/client/route/index.d.ts +1 -0
- package/types/client/router.d.ts +6 -0
- package/types/client/rscNavigation.d.ts +4 -0
- package/types/client/viewportMeta.d.ts +18 -0
- package/types/client/webManifest.d.ts +4 -0
- package/types/common/PipelineNames.d.ts +6 -0
- package/types/common/PipelinePattern.d.ts +14 -0
- package/types/common/PipelinePlanSchema.d.ts +9 -0
- package/types/common/backoff.d.ts +10 -0
- package/types/common/index.d.ts +5 -0
- package/types/common/pipelinePlan.d.ts +224 -0
- package/types/common/types.d.ts +16 -0
- package/types/constant/constantRegistry.d.ts +5 -2
- package/types/dictionary/base.dictionary.d.ts +1 -1
- package/types/dictionary/dictionary.d.ts +8 -8
- package/types/document/into.d.ts +9 -0
- package/types/fetch/client/fetchClient.d.ts +31 -4
- package/types/fetch/client/httpClient.d.ts +8 -0
- package/types/fetch/client/wsClient.d.ts +26 -2
- package/types/fetch/fetchType/buildFetch.type.d.ts +1 -0
- package/types/index.d.ts +230 -9
- package/types/server/akanServer.d.ts +16 -1
- package/types/server/artifact/builderRpc.d.ts +7 -2
- package/types/server/artifact/ipcTypes.d.ts +5 -1
- package/types/server/di/utils.d.ts +1 -0
- package/types/server/ed25519Key.d.ts +13 -0
- package/types/server/index.d.ts +1 -0
- package/types/server/machine/index.d.ts +2 -0
- package/types/server/machine/machineAccount.d.ts +5 -0
- package/types/server/machine/machineToken.d.ts +29 -0
- package/types/server/machine.d.ts +1 -0
- package/types/server/mcp/McpApps.d.ts +50 -0
- package/types/server/mcp/McpDispatcher.d.ts +4 -1
- package/types/server/mcp/McpRouter.d.ts +4 -0
- package/types/server/resolver/signal.resolver.d.ts +2 -1
- package/types/server/routeElementComposer.d.ts +24 -4
- package/types/server/routeState.d.ts +4 -1
- package/types/server/routing/roomReplay.d.ts +24 -0
- package/types/server/rscWorkerHost.d.ts +5 -2
- package/types/server/sitemap.d.ts +2 -0
- package/types/server/ssrFromRscRenderer.d.ts +3 -3
- package/types/server/ssrTypes.d.ts +4 -1
- package/types/server/systemPageDocument.d.ts +2 -0
- package/types/server/types.d.ts +4 -1
- package/types/server/webRouter.d.ts +3 -1
- package/types/service/ipcTypes.d.ts +2 -0
- package/types/service/predefinedAdaptor/database.adaptor.d.ts +1 -24
- package/types/service/predefinedAdaptor/queue.adaptor.d.ts +10 -3
- package/types/service/predefinedAdaptor/queueBackoff.d.ts +4 -0
- package/types/service/predefinedAdaptor/solidQueue.adaptor.d.ts +3 -3
- package/types/service/predefinedAdaptor/sql/SqlDocumentStore.d.ts +6 -1
- package/types/service/predefinedAdaptor/sql/dialect/postgres.d.ts +1 -0
- package/types/service/predefinedAdaptor/sql/dialect/sqlite.d.ts +1 -0
- package/types/service/predefinedAdaptor/sql/search/fts5.d.ts +1 -1
- package/types/service/predefinedAdaptor/sql/types.d.ts +9 -5
- package/types/service/predefinedAdaptor/sql/values.d.ts +0 -3
- package/types/service/serve.d.ts +3 -0
- package/types/signal/endpointIdempotency.d.ts +7 -0
- package/types/signal/internalArg.d.ts +10 -0
- package/types/signal/mcp/McpDocument.d.ts +8 -0
- package/types/signal/mcp/mcpProtocol.d.ts +17 -0
- package/types/signal/signalContext.d.ts +5 -3
- package/types/signal/signalRegistry.d.ts +4 -4
- package/types/signal/types.d.ts +21 -1
- package/types/store/agentic/StToolBuilder.d.ts +2 -0
- package/types/test/conformance.d.ts +7 -10
- package/types/ui/Agent/Chat.d.ts +5 -1
- package/types/ui/Agent/EmbedApproval.d.ts +1 -0
- package/types/ui/Agent/index.d.ts +3 -0
- package/types/ui/Agent/useKeyboardFrame.d.ts +2 -0
- package/types/ui/Agent/useScreenActions.d.ts +18 -0
- package/types/ui/BottomSheet.d.ts +1 -0
- package/types/ui/Constant/Doc.d.ts +11 -17
- package/types/ui/Constant/index.d.ts +7 -2
- package/types/ui/Constant/schemaDoc.d.ts +11 -0
- package/types/ui/Dialog/Modal.d.ts +6 -1
- package/types/ui/Dialog/index.d.ts +1 -1
- package/types/ui/Dialog/modalSurface.d.ts +12 -0
- package/types/ui/Layout/BottomTab.d.ts +11 -2
- package/types/ui/Layout/FrameSlotFallback.d.ts +9 -0
- package/types/ui/Layout/Navbar.d.ts +4 -1
- package/types/ui/Layout/TopInset.d.ts +1 -1
- package/types/ui/Layout/index.d.ts +3 -3
- package/types/ui/Link/Action.d.ts +5 -1
- package/types/ui/Link/Anchor.d.ts +5 -3
- package/types/ui/Link/activePath.d.ts +13 -0
- package/types/ui/Link/index.d.ts +1 -1
- package/types/ui/Modal.d.ts +6 -1
- package/types/ui/Model/EditModal.d.ts +6 -1
- package/types/ui/Model/New.d.ts +6 -1
- package/types/ui/Model/ViewEditModal.d.ts +6 -1
- package/types/ui/Model/ViewModal.d.ts +6 -1
- package/types/ui/Model/newFormOrigin.d.ts +7 -0
- package/types/ui/Portal.d.ts +3 -1
- package/types/ui/Reference/origin.d.ts +12 -0
- package/types/ui/Signal/Doc.d.ts +23 -18
- package/types/ui/Signal/Listener.d.ts +2 -6
- package/types/ui/Signal/Object.d.ts +6 -10
- package/types/ui/Signal/Response.d.ts +3 -6
- package/types/ui/Signal/RestApi.d.ts +11 -15
- package/types/ui/Signal/WebSocket.d.ts +11 -21
- package/types/ui/Signal/endpointEntries.d.ts +8 -0
- package/types/ui/Signal/index.d.ts +35 -12
- package/types/ui/Signal/signalText.d.ts +178 -0
- package/types/ui/System/CSR.d.ts +2 -2
- package/types/ui/System/Client.d.ts +4 -3
- package/types/ui/System/Common.d.ts +27 -6
- package/types/ui/System/SSR.d.ts +6 -6
- package/types/ui/Tooltip.d.ts +4 -2
- package/types/ui/index.d.ts +2 -1
- package/types/ui/overlayLayer.d.ts +6 -0
- package/types/ui/overlayPosition.d.ts +17 -0
- package/types/vendor/@akanjs/native/packages/cli/src/api.d.ts +14 -3
- package/types/vendor/@akanjs/native/packages/cli/src/commands/update.d.ts +1 -1
- package/types/vendor/@akanjs/native/packages/cli/src/config.d.ts +30 -5
- package/types/vendor/@akanjs/native/packages/cli/src/lib/compat.d.ts +8 -0
- package/types/vendor/@akanjs/native/packages/cli/src/lib/desktop-server.d.ts +5 -0
- package/types/vendor/@akanjs/native/packages/cli/src/lib/distribution.d.ts +22 -0
- package/types/vendor/@akanjs/native/packages/cli/src/lib/project.d.ts +4 -0
- package/types/vendor/@akanjs/native/packages/cli/src/lib/publish.d.ts +16 -10
- package/types/vendor/@akanjs/native/packages/cli/src/lib/updates.d.ts +51 -7
- package/types/vendor/@akanjs/native/packages/cli/src/lib/vectors.d.ts +1 -1
- package/types/vendor/@akanjs/native/packages/cli/src/platforms/windows-installer.d.ts +7 -0
- package/types/vendor/@akanjs/native/packages/cli/src/platforms/windows.d.ts +5 -0
- package/types/vendor/@akanjs/native/packages/core/src/kernel.d.ts +36 -0
- package/types/vendor/@akanjs/native/packages/desktop/src/plugin.d.ts +2 -0
- package/types/vendor/@akanjs/native/packages/desktop/src/server.d.ts +11 -0
- package/types/vendor/@akanjs/native/plugins/external-view/src/desktop.d.ts +17 -0
- package/types/vendor/@akanjs/native/plugins/external-view/src/index.d.ts +132 -0
- package/types/vendor/@akanjs/native/plugins/external-view/src.d.ts +1 -0
- package/types/vendor/@akanjs/native/plugins/updates/src/index.d.ts +8 -0
- package/types/vendor/@akanjs/native/plugins/window/src/desktop.d.ts +4 -1
- package/types/vendor/@akanjs/native/plugins/window/src/index.d.ts +49 -0
- package/types/vendor/use-agentic/types.d.ts +2 -0
- package/types/webkit/CsrStack.d.ts +1 -1
- package/types/webkit/McpAppAgent.d.ts +14 -0
- package/types/webkit/McpAppApprovals.d.ts +8 -0
- package/types/webkit/McpAppBridge.d.ts +101 -0
- package/types/webkit/McpAppView.d.ts +21 -0
- package/types/webkit/index.d.ts +1 -0
- package/types/webkit/useLocation.d.ts +1 -1
- package/types/webkit/useVisualViewportFrame.d.ts +13 -0
- package/ui/Agent/Chat.tsx +29 -10
- package/ui/Agent/Composer.tsx +2 -1
- package/ui/Agent/EmbedApproval.tsx +17 -0
- package/ui/Agent/RichInput.tsx +1 -1
- package/ui/Agent/index.ts +2 -0
- package/ui/Agent/useKeyboardFrame.ts +10 -0
- package/ui/Agent/useScreenActions.ts +45 -0
- package/ui/BottomSheet.tsx +82 -53
- package/ui/Constant/Doc.tsx +113 -60
- package/ui/Constant/index.ts +2 -2
- package/ui/Constant/schemaDoc.ts +86 -26
- package/ui/Dialog/LegacyModal.tsx +53 -52
- package/ui/Dialog/Modal.tsx +93 -49
- package/ui/Dialog/modalSurface.ts +61 -0
- package/ui/DragAction.tsx +1 -1
- package/ui/DraggableList.tsx +1 -1
- package/ui/Dropdown.tsx +4 -6
- package/ui/KeyboardAvoiding.tsx +1 -1
- package/ui/Layout/BottomInset.tsx +20 -14
- package/ui/Layout/BottomTab.tsx +42 -16
- package/ui/Layout/FrameSlotFallback.tsx +59 -0
- package/ui/Layout/Navbar.tsx +37 -11
- package/ui/Layout/Sider.tsx +1 -1
- package/ui/Layout/TopInset.tsx +15 -14
- package/ui/Link/Action.tsx +15 -5
- package/ui/Link/Anchor.tsx +25 -13
- package/ui/Link/activePath.ts +25 -0
- package/ui/Link/index.tsx +1 -1
- package/ui/Load/Pagination.tsx +1 -1
- package/ui/Load/Units.tsx +1 -1
- package/ui/Loading/ProgressBar.tsx +1 -1
- package/ui/Modal.tsx +9 -0
- package/ui/Model/EditModal.tsx +16 -1
- package/ui/Model/New.tsx +25 -2
- package/ui/Model/NewWrapper_Client.tsx +2 -0
- package/ui/Model/ViewEditModal.tsx +9 -0
- package/ui/Model/ViewModal.tsx +16 -1
- package/ui/Model/newFormOrigin.ts +45 -0
- package/ui/Popconfirm.tsx +5 -7
- package/ui/Portal.tsx +4 -7
- package/ui/Reference/origin.ts +31 -0
- package/ui/ScreenNavigator.tsx +1 -1
- package/ui/Select.tsx +2 -7
- package/ui/Signal/Arg.tsx +2 -2
- package/ui/Signal/Doc.tsx +125 -63
- package/ui/Signal/Endpoint.tsx +11 -10
- package/ui/Signal/Listener.tsx +7 -10
- package/ui/Signal/Object.tsx +7 -14
- package/ui/Signal/Response.tsx +24 -24
- package/ui/Signal/RestApi.tsx +63 -52
- package/ui/Signal/WebSocket.tsx +65 -72
- package/ui/Signal/endpointEntries.ts +25 -0
- package/ui/Signal/index.ts +23 -6
- package/ui/Signal/signalText.ts +59 -0
- package/ui/System/CSR.tsx +34 -8
- package/ui/System/Client.tsx +36 -5
- package/ui/System/Common.tsx +76 -32
- package/ui/System/SSR.tsx +73 -31
- package/ui/Toast.tsx +1 -1
- package/ui/Tooltip.tsx +84 -30
- package/ui/index.ts +11 -1
- package/ui/overlayLayer.ts +25 -2
- package/ui/overlayPosition.ts +90 -0
- package/ui/recipe/inputRecipe.ts +8 -1
- package/ui/styles.css +152 -0
- package/vendor/@akanjs/native/native/android/src/com/akanjs/runtime/AkanNativeActivity.kt +22 -2
- package/vendor/@akanjs/native/native/android/src/com/akanjs/runtime/AkanNativeKernel.kt +37 -0
- package/vendor/@akanjs/native/native/android/src/com/akanjs/runtime/AkanNativeUpdateReports.kt +169 -0
- package/vendor/@akanjs/native/native/android/src/com/akanjs/runtime/AkanNativeUpdates.kt +110 -38
- package/vendor/@akanjs/native/native/android/src/com/akanjs/runtime/AkanNativeVectors.kt +20 -0
- package/vendor/@akanjs/native/native/desktop/Cargo.lock +16 -16
- package/vendor/@akanjs/native/native/desktop/src/external.rs +651 -0
- package/vendor/@akanjs/native/native/desktop/src/json.rs +23 -0
- package/vendor/@akanjs/native/native/desktop/src/lib.rs +228 -5
- package/vendor/@akanjs/native/native/ios/Sources/AkanNativeApp.swift +2 -1
- package/vendor/@akanjs/native/native/ios/Sources/AkanNativeKernel.swift +47 -1
- package/vendor/@akanjs/native/native/ios/Sources/AkanNativeUpdateReports.swift +145 -0
- package/vendor/@akanjs/native/native/ios/Sources/AkanNativeUpdates.swift +112 -43
- package/vendor/@akanjs/native/native/ios/Sources/AkanNativeVectors.swift +18 -0
- package/vendor/@akanjs/native/native/ios/Sources/AkanNativeViewController.swift +24 -2
- package/vendor/@akanjs/native/packages/cli/src/api.ts +22 -6
- package/vendor/@akanjs/native/packages/cli/src/commands/build.ts +24 -8
- package/vendor/@akanjs/native/packages/cli/src/commands/update.ts +11 -9
- package/vendor/@akanjs/native/packages/cli/src/config.ts +35 -7
- package/vendor/@akanjs/native/packages/cli/src/lib/compat.ts +2 -0
- package/vendor/@akanjs/native/packages/cli/src/lib/configkeys.ts +6 -4
- package/vendor/@akanjs/native/packages/cli/src/lib/desktop-server.ts +11 -1
- package/vendor/@akanjs/native/packages/cli/src/lib/distribution.ts +73 -0
- package/vendor/@akanjs/native/packages/cli/src/lib/project.ts +15 -3
- package/vendor/@akanjs/native/packages/cli/src/lib/publish.ts +70 -23
- package/vendor/@akanjs/native/packages/cli/src/lib/updates.ts +159 -23
- package/vendor/@akanjs/native/packages/cli/src/lib/vectors.ts +2 -0
- package/vendor/@akanjs/native/packages/cli/src/platforms/android.ts +9 -4
- package/vendor/@akanjs/native/packages/cli/src/platforms/desktop-update.ts +1 -1
- package/vendor/@akanjs/native/packages/cli/src/platforms/desktop.ts +4 -2
- package/vendor/@akanjs/native/packages/cli/src/platforms/ios.ts +9 -4
- package/vendor/@akanjs/native/packages/cli/src/platforms/windows-installer.ts +25 -11
- package/vendor/@akanjs/native/packages/cli/src/platforms/windows.ts +14 -3
- package/vendor/@akanjs/native/packages/core/src/kernel.ts +49 -0
- package/vendor/@akanjs/native/packages/core/vectors/updates.json +31 -0
- package/vendor/@akanjs/native/packages/desktop/src/main.ts +3 -0
- package/vendor/@akanjs/native/packages/desktop/src/plugin.ts +2 -0
- package/vendor/@akanjs/native/packages/desktop/src/server.ts +70 -6
- package/vendor/@akanjs/native/plugins/external-view/native-plugin.json +23 -0
- package/vendor/@akanjs/native/plugins/external-view/src/desktop.ts +321 -0
- package/vendor/@akanjs/native/plugins/external-view/src/index.ts +106 -0
- package/vendor/@akanjs/native/plugins/updates/android/UpdatesPlugin.kt +133 -41
- package/vendor/@akanjs/native/plugins/updates/ios/UpdatesPlugin.swift +101 -36
- package/vendor/@akanjs/native/plugins/updates/native-plugin.json +4 -2
- package/vendor/@akanjs/native/plugins/updates/src/desktop.ts +15 -1
- package/vendor/@akanjs/native/plugins/updates/src/index.ts +7 -1
- package/vendor/@akanjs/native/plugins/window/native-plugin.json +4 -0
- package/vendor/@akanjs/native/plugins/window/src/desktop.ts +68 -1
- package/vendor/@akanjs/native/plugins/window/src/index.ts +47 -0
- package/vendor/use-agentic/ToolRunner.ts +8 -1
- package/vendor/use-agentic/types.ts +2 -0
- package/webkit/CsrRouteTable.ts +1 -0
- package/webkit/CsrStack.ts +9 -2
- package/webkit/McpAppAgent.ts +138 -0
- package/webkit/McpAppApprovals.ts +56 -0
- package/webkit/McpAppBridge.ts +291 -0
- package/webkit/McpAppView.ts +258 -0
- package/webkit/bootCsr.tsx +54 -5
- package/webkit/index.ts +1 -0
- package/webkit/useCsrValues.ts +16 -10
- package/webkit/useFrameRuntime.ts +10 -1
- package/webkit/useLocation.ts +4 -3
- package/webkit/useVisualViewportFrame.tsx +52 -0
- package/service/predefinedAdaptor/sql/driver/libsql.ts +0 -45
- package/types/service/predefinedAdaptor/sql/driver/libsql.d.ts +0 -20
- package/types/ui/Agent/useKeyboardInset.d.ts +0 -1
- package/types/ui/ServerPortal.d.ts +0 -15
- package/ui/Agent/useKeyboardInset.ts +0 -19
- package/ui/ServerPortal.tsx +0 -49
package/client/router.ts
CHANGED
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
import { getEnv } from "akanjs/base";
|
|
2
2
|
import { getBasePathFromPathname, Logger, parseAkanI18nEnv, parseBasePaths } from "akanjs/common";
|
|
3
|
+
import { csrLocation } from "./csrLocation";
|
|
3
4
|
|
|
4
5
|
export interface RouteOptions {
|
|
5
6
|
scrollToTop?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Writes the URL and the store's path and search params without asking the server for the page, as for `?peek=`;
|
|
9
|
+
* honoured only when the path stays the same. A server component reading `.search()` sees it at the next full
|
|
10
|
+
* navigation.
|
|
11
|
+
*/
|
|
12
|
+
shallow?: boolean;
|
|
6
13
|
}
|
|
7
14
|
export interface RouteManifest {
|
|
8
15
|
routes: string[];
|
|
@@ -160,6 +167,8 @@ class Router {
|
|
|
160
167
|
#indexPath = "/";
|
|
161
168
|
#navigation: Promise<void> = Promise.resolve();
|
|
162
169
|
#historyIdx = 0;
|
|
170
|
+
|
|
171
|
+
#historyWrittenByNavigation = false;
|
|
163
172
|
#redirects = 0;
|
|
164
173
|
#instance: RouterInstance = {
|
|
165
174
|
push: (href: string) => {
|
|
@@ -197,6 +206,7 @@ class Router {
|
|
|
197
206
|
Logger.verbose("Router initialized");
|
|
198
207
|
}
|
|
199
208
|
#initSsrClientRouter(options: SsrClientRouterOption) {
|
|
209
|
+
this.#historyWrittenByNavigation = true;
|
|
200
210
|
const navigate = (method: "push" | "replace") => (href: string, routeOptions?: RouteOptions) => {
|
|
201
211
|
const pathInfo = this.#getPathInfo(href);
|
|
202
212
|
const navigationPathInfo = this.#getNavigationPathInfo(href);
|
|
@@ -207,10 +217,8 @@ class Router {
|
|
|
207
217
|
push: navigate("push"),
|
|
208
218
|
replace: navigate("replace"),
|
|
209
219
|
back: () => {
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
this.#postPathChange(pathInfo);
|
|
213
|
-
router.back();
|
|
220
|
+
this.#postPathAfterBack();
|
|
221
|
+
options.router.back();
|
|
214
222
|
},
|
|
215
223
|
refresh: () => {
|
|
216
224
|
const router = options.router;
|
|
@@ -236,8 +244,7 @@ class Router {
|
|
|
236
244
|
}, 0);
|
|
237
245
|
},
|
|
238
246
|
back: (routeOptions) => {
|
|
239
|
-
|
|
240
|
-
this.#postPathChange({ path, pathname, hash });
|
|
247
|
+
this.#postPathAfterBack();
|
|
241
248
|
options.router.back(routeOptions);
|
|
242
249
|
},
|
|
243
250
|
refresh: () => {
|
|
@@ -255,14 +262,10 @@ class Router {
|
|
|
255
262
|
if (getEnv().side === "server") return;
|
|
256
263
|
const history = globalThis.window?.history;
|
|
257
264
|
if (!history?.replaceState) return;
|
|
258
|
-
const state = (
|
|
265
|
+
const state = (csrLocation.state ?? {}) as Record<string, unknown>;
|
|
259
266
|
const akanState = (state.__akanRouter ?? {}) as { idx?: number };
|
|
260
267
|
this.#historyIdx = Number.isInteger(akanState.idx) ? (akanState.idx as number) : this.#historyIdx;
|
|
261
|
-
|
|
262
|
-
{ ...state, __akanRouter: { ...akanState, idx: this.#historyIdx } },
|
|
263
|
-
"",
|
|
264
|
-
globalThis.window.location.href,
|
|
265
|
-
);
|
|
268
|
+
csrLocation.replace({ ...state, __akanRouter: { ...akanState, idx: this.#historyIdx } });
|
|
266
269
|
if (!globalThis.window.addEventListener) return;
|
|
267
270
|
globalThis.window.addEventListener("popstate", (event) => {
|
|
268
271
|
const nextState = ((event.state as Record<string, unknown> | null)?.__akanRouter ?? {}) as { idx?: number };
|
|
@@ -271,13 +274,14 @@ class Router {
|
|
|
271
274
|
}
|
|
272
275
|
|
|
273
276
|
#rememberHistoryState(kind: "push" | "replace") {
|
|
274
|
-
if (getEnv().side === "server") return;
|
|
277
|
+
if (getEnv().side === "server" || this.#historyWrittenByNavigation) return;
|
|
275
278
|
const history = globalThis.window?.history;
|
|
276
279
|
if (!history) return;
|
|
277
280
|
if (kind === "push") this.#historyIdx += 1;
|
|
278
|
-
|
|
281
|
+
if (!history.replaceState) return;
|
|
282
|
+
const state = (csrLocation.state ?? {}) as Record<string, unknown>;
|
|
279
283
|
const nextState = { ...state, __akanRouter: { ...((state.__akanRouter ?? {}) as object), idx: this.#historyIdx } };
|
|
280
|
-
|
|
284
|
+
csrLocation.replace(nextState);
|
|
281
285
|
}
|
|
282
286
|
|
|
283
287
|
#getPathInfo(href: string, prefix = this.#prefix) {
|
|
@@ -287,7 +291,7 @@ class Router {
|
|
|
287
291
|
return this.#getPathInfo(href, shouldExposeBasePath() ? this.#prefix : "");
|
|
288
292
|
}
|
|
289
293
|
#withCsrRuntimeSearchParams(href: string) {
|
|
290
|
-
const currentSearch = new URLSearchParams(
|
|
294
|
+
const currentSearch = new URLSearchParams(csrLocation.search);
|
|
291
295
|
if (currentSearch.get("csr") !== "true") return href;
|
|
292
296
|
|
|
293
297
|
const [hrefWithoutHash, hash = ""] = href.split("#");
|
|
@@ -304,8 +308,18 @@ class Router {
|
|
|
304
308
|
#getVisiblePathInfo(href: string, lang = this.#lang) {
|
|
305
309
|
return getPathInfo(href, lang, shouldExposeBasePath() ? this.#prefix : "");
|
|
306
310
|
}
|
|
311
|
+
|
|
312
|
+
#postPathAfterBack() {
|
|
313
|
+
window.addEventListener(
|
|
314
|
+
"popstate",
|
|
315
|
+
() => this.#postPathChange(this.#getPathInfo(`${location.pathname}${location.search}${location.hash}`)),
|
|
316
|
+
{ once: true },
|
|
317
|
+
);
|
|
318
|
+
}
|
|
307
319
|
#postPathChange({ path, pathname, hash }: { path: string; pathname: string; hash: string }) {
|
|
308
320
|
Logger.info(`pathChange-start:${path}${hash ? `#${hash}` : ""}`);
|
|
321
|
+
|
|
322
|
+
if (globalThis.__AKAN_EMBED__) return;
|
|
309
323
|
window.parent.postMessage({ type: "pathChange", path, pathname, hash }, "*");
|
|
310
324
|
}
|
|
311
325
|
#postDevSyncNavigation(kind: "push" | "replace", href: string) {
|
|
@@ -386,7 +400,9 @@ class Router {
|
|
|
386
400
|
}
|
|
387
401
|
canGoBack() {
|
|
388
402
|
if (getEnv().side === "server") return false;
|
|
389
|
-
|
|
403
|
+
const state = globalThis.window?.history?.state as { __akanRouter?: { idx?: unknown } } | null | undefined;
|
|
404
|
+
const idx = state?.__akanRouter?.idx;
|
|
405
|
+
return (Number.isInteger(idx) ? (idx as number) : this.#historyIdx) > 0;
|
|
390
406
|
}
|
|
391
407
|
backOrFallback(fallbackHref = this.#indexPath, routeOptions?: RouteOptions) {
|
|
392
408
|
if (this.canGoBack()) {
|
|
@@ -446,11 +462,8 @@ class Router {
|
|
|
446
462
|
setLang(lang: string) {
|
|
447
463
|
if (getEnv().side === "server") throw new Error("setLang is only available in client side");
|
|
448
464
|
this.#checkInitialized();
|
|
449
|
-
const currentLang = getLocaleFromPathname(
|
|
450
|
-
const { path, search, hash } = this.#getVisiblePathInfo(
|
|
451
|
-
`${window.location.pathname}${window.location.search ?? ""}${window.location.hash ?? ""}`,
|
|
452
|
-
currentLang,
|
|
453
|
-
);
|
|
465
|
+
const currentLang = getLocaleFromPathname(csrLocation.pathname) ?? this.#lang;
|
|
466
|
+
const { path, search, hash } = this.#getVisiblePathInfo(csrLocation.href, currentLang);
|
|
454
467
|
this.#lang = lang;
|
|
455
468
|
this.#instance.replace(`${path}${search ? `?${search}` : ""}${hash ? `#${hash}` : ""}`);
|
|
456
469
|
return undefined as never;
|
|
@@ -459,7 +472,7 @@ class Router {
|
|
|
459
472
|
routeOf(pathname: string) {
|
|
460
473
|
return getPathInfo(pathname, this.#lang, this.#prefix).path;
|
|
461
474
|
}
|
|
462
|
-
getPath(pathname =
|
|
475
|
+
getPath(pathname = csrLocation.pathname) {
|
|
463
476
|
if (getEnv().side === "server") throw new Error("getPath is only available in client side");
|
|
464
477
|
return this.routeOf(pathname);
|
|
465
478
|
}
|
package/client/rscNavigation.ts
CHANGED
|
@@ -3,7 +3,10 @@ declare global {
|
|
|
3
3
|
var __AKAN_RSC_IS_FROM_CACHE__: (() => boolean) | undefined;
|
|
4
4
|
var __AKAN_RSC_REFRESH__: ((options?: { buildId?: number }) => Promise<void>) | undefined;
|
|
5
5
|
var __AKAN_RSC_NAVIGATE__:
|
|
6
|
-
| ((
|
|
6
|
+
| ((
|
|
7
|
+
href: string,
|
|
8
|
+
options?: { replace?: boolean; scrollToTop?: boolean; shallow?: boolean; pop?: boolean },
|
|
9
|
+
) => Promise<void>)
|
|
7
10
|
| undefined;
|
|
8
11
|
var __AKAN_DEV_SYNC_NAVIGATION__: ((href: string, kind: "push" | "replace" | "back" | "pop") => void) | undefined;
|
|
9
12
|
var __AKAN_DEV_SYNC_NAVIGATION_APPLYING__: boolean | undefined;
|
|
@@ -17,7 +20,10 @@ export const clearRscNavigationCache = () => {
|
|
|
17
20
|
/** True when the page on screen was replayed from the RSC navigation cache, so its hydrated data may be stale. */
|
|
18
21
|
export const isRscNavigationFromCache = () => globalThis.__AKAN_RSC_IS_FROM_CACHE__?.() ?? false;
|
|
19
22
|
|
|
20
|
-
export const navigateRsc = (
|
|
23
|
+
export const navigateRsc = (
|
|
24
|
+
href: string,
|
|
25
|
+
options?: { replace?: boolean; scrollToTop?: boolean; shallow?: boolean },
|
|
26
|
+
) => {
|
|
21
27
|
return globalThis.__AKAN_RSC_NAVIGATE__?.(href, options);
|
|
22
28
|
};
|
|
23
29
|
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { RouteViewport } from "./csrTypes";
|
|
2
|
+
|
|
3
|
+
export interface ThemeColorTag {
|
|
4
|
+
content: string;
|
|
5
|
+
media?: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
/** Turns a root layout's `.viewport()` into the `viewport` and `theme-color` meta tags every document shell writes. */
|
|
9
|
+
export class ViewportMeta {
|
|
10
|
+
static content(viewport: RouteViewport | undefined, { native = false }: { native?: boolean } = {}): string {
|
|
11
|
+
const parts = ["width=device-width", "initial-scale=1"];
|
|
12
|
+
if (viewport?.fitCover ?? native) parts.push("viewport-fit=cover");
|
|
13
|
+
if (viewport?.interactiveWidget) parts.push(`interactive-widget=${viewport.interactiveWidget}`);
|
|
14
|
+
return parts.join(", ");
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/** The request's theme when it is known; otherwise `light`/`dark` follow the OS until the client names the theme. */
|
|
18
|
+
static themeColors(viewport: RouteViewport | undefined, theme?: string): ThemeColorTag[] {
|
|
19
|
+
const themeColor = viewport?.themeColor;
|
|
20
|
+
if (!themeColor) return [];
|
|
21
|
+
if (typeof themeColor === "string") return [{ content: themeColor }];
|
|
22
|
+
const named = theme ? themeColor[theme] : undefined;
|
|
23
|
+
if (named) return [{ content: named }];
|
|
24
|
+
const schemes = (["light", "dark"] as const)
|
|
25
|
+
.filter((scheme) => themeColor[scheme])
|
|
26
|
+
.map((scheme) => ({ content: themeColor[scheme] ?? "", media: `(prefers-color-scheme: ${scheme})` }));
|
|
27
|
+
if (schemes.length) return schemes;
|
|
28
|
+
const first = Object.values(themeColor)[0];
|
|
29
|
+
return first ? [{ content: first }] : [];
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
static applyContent(viewport: RouteViewport | undefined, { native = false }: { native?: boolean } = {}) {
|
|
33
|
+
const meta = ViewportMeta.#ensureMeta("viewport");
|
|
34
|
+
const content = ViewportMeta.content(viewport, { native });
|
|
35
|
+
if (meta.content !== content) meta.content = content;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
static applyThemeColor(viewport: RouteViewport | undefined, theme?: string) {
|
|
39
|
+
const tags = ViewportMeta.themeColors(viewport, theme);
|
|
40
|
+
if (!tags.length) return;
|
|
41
|
+
const existing = [...document.head.querySelectorAll<HTMLMetaElement>('meta[name="theme-color"]')];
|
|
42
|
+
const kept = existing.slice(0, tags.length);
|
|
43
|
+
for (const meta of existing.slice(tags.length)) meta.remove();
|
|
44
|
+
tags.forEach((tag, idx) => {
|
|
45
|
+
const meta = kept[idx] ?? ViewportMeta.#ensureMeta("theme-color", true);
|
|
46
|
+
meta.content = tag.content;
|
|
47
|
+
if (tag.media) meta.media = tag.media;
|
|
48
|
+
else meta.removeAttribute("media");
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
static #ensureMeta(name: string, fresh = false): HTMLMetaElement {
|
|
53
|
+
const found = fresh ? null : document.head.querySelector<HTMLMetaElement>(`meta[name="${name}"]`);
|
|
54
|
+
if (found) return found;
|
|
55
|
+
const meta = document.createElement("meta");
|
|
56
|
+
meta.name = name;
|
|
57
|
+
document.head.appendChild(meta);
|
|
58
|
+
return meta;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** Where an SSR document links its root layout's `.manifest()`; the server answers it from that layout. */
|
|
2
|
+
export const webManifestHref = (basePath?: string | null) =>
|
|
3
|
+
basePath ? `/${basePath}/manifest.webmanifest` : "/manifest.webmanifest";
|
|
4
|
+
|
|
5
|
+
const camelToSnake = (key: string) => key.replace(/[A-Z]/g, (match) => `_${match.toLowerCase()}`);
|
|
6
|
+
const isPlainObject = (value: unknown): value is Record<string, unknown> =>
|
|
7
|
+
Object.prototype.toString.call(value) === "[object Object]";
|
|
8
|
+
|
|
9
|
+
/** A `.manifest()` object in the browser's own snake_case keys, at every depth. */
|
|
10
|
+
export const toManifestJson = (value: unknown): unknown => {
|
|
11
|
+
if (Array.isArray(value)) return value.map(toManifestJson);
|
|
12
|
+
if (!isPlainObject(value)) return value;
|
|
13
|
+
return Object.fromEntries(
|
|
14
|
+
Object.entries(value)
|
|
15
|
+
.filter(([, entryValue]) => entryValue !== undefined)
|
|
16
|
+
.map(([key, entryValue]) => [camelToSnake(key), toManifestJson(entryValue)]),
|
|
17
|
+
);
|
|
18
|
+
};
|
package/common/Logger.ts
CHANGED
|
@@ -347,10 +347,15 @@ export class Logger {
|
|
|
347
347
|
}
|
|
348
348
|
}
|
|
349
349
|
}
|
|
350
|
+
|
|
351
|
+
static readonly #stderrHidden = envValue("AKAN_CHILD_STDERR_HIDDEN") === "1";
|
|
352
|
+
static #consoleStream(stream: "stdout" | "stderr") {
|
|
353
|
+
return stream === "stderr" && Logger.#stderrHidden ? "stdout" : stream;
|
|
354
|
+
}
|
|
350
355
|
static #writeConsole(entry: LoggerSinkEntry) {
|
|
351
356
|
if (!Logger.consoleOutput) return;
|
|
352
357
|
if (typeof window === "undefined")
|
|
353
|
-
(process[entry.stream] as unknown as NodeJS.WriteStream | undefined)?.write(entry.message);
|
|
358
|
+
(process[Logger.#consoleStream(entry.stream)] as unknown as NodeJS.WriteStream | undefined)?.write(entry.message);
|
|
354
359
|
else Logger.#writeBrowserConsole(entry.record, entry.message);
|
|
355
360
|
}
|
|
356
361
|
|
|
@@ -400,7 +405,7 @@ export class Logger {
|
|
|
400
405
|
Logger.#emit(Logger.#entry(Logger.#buildRecord(undefined, msg, "", null, stream, readLogContext()), msg));
|
|
401
406
|
if (!Logger.consoleOutput) return;
|
|
402
407
|
if (typeof window === "undefined" && method !== "console" && (process as unknown as NodeJS.Process | undefined))
|
|
403
|
-
process[stream].write(msg);
|
|
408
|
+
process[Logger.#consoleStream(stream)].write(msg);
|
|
404
409
|
else console[outputStream === "error" ? "error" : Logger.#inNativeShell() ? "debug" : "log"](msg.trim());
|
|
405
410
|
}
|
|
406
411
|
static {
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import {
|
|
2
|
+
pipelineEnvNamePattern,
|
|
3
|
+
pipelineIdPattern,
|
|
4
|
+
pipelineReservedEnv,
|
|
5
|
+
pipelineSecretNamePattern,
|
|
6
|
+
} from "./pipelinePlan";
|
|
7
|
+
|
|
8
|
+
export class PipelineNames {
|
|
9
|
+
static isReservedEnv(name: string) {
|
|
10
|
+
return (pipelineReservedEnv as readonly string[]).includes(name) || name.startsWith("AKAN_CI_");
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
static idError(id: string): string | null {
|
|
14
|
+
if (pipelineIdPattern.test(id)) return null;
|
|
15
|
+
return `"${id}" is not an id: up to 64 lowercase letters, digits and "-", starting with a letter or digit`;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
static secretNameError(name: string): string | null {
|
|
19
|
+
if (!pipelineSecretNamePattern.test(name))
|
|
20
|
+
return `"${name}" is not a secret name: up to 64 uppercase letters, digits and "_", starting with a letter`;
|
|
21
|
+
if (PipelineNames.isReservedEnv(name)) return `"${name}" is reserved for the executor`;
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
static envNameError(name: string): string | null {
|
|
26
|
+
if (!pipelineEnvNamePattern.test(name))
|
|
27
|
+
return `"${name}" is not an environment variable name: letters, digits and "_", not starting with a digit`;
|
|
28
|
+
if (PipelineNames.isReservedEnv(name)) return `"${name}" is reserved for the executor`;
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { pipelinePlanLimits } from "./pipelinePlan";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The one glob dialect of `when`, shared by the planner (`branch`, `app`) and the executor (`changed`) so both decide
|
|
5
|
+
* alike. `*` is any run without `/`, `**` any run including `/` (and with its `/` also no segment at all), `?` one
|
|
6
|
+
* character but `/`; everything else is literal and case-sensitive. A leading `!` excludes.
|
|
7
|
+
*/
|
|
8
|
+
export class PipelinePattern {
|
|
9
|
+
static readonly #compiled = new Map<string, RegExp>();
|
|
10
|
+
|
|
11
|
+
/** True when some positive pattern matches (or none is given) and no `!` pattern does. */
|
|
12
|
+
static matches(pattern: string | readonly string[], value: string) {
|
|
13
|
+
const patterns = PipelinePattern.#list(pattern);
|
|
14
|
+
const positives = patterns.filter((glob) => !glob.startsWith("!"));
|
|
15
|
+
const negatives = patterns.filter((glob) => glob.startsWith("!")).map((glob) => glob.slice(1));
|
|
16
|
+
const included = !positives.length || positives.some((glob) => PipelinePattern.#regex(glob).test(value));
|
|
17
|
+
return included && !negatives.some((glob) => PipelinePattern.#regex(glob).test(value));
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/** `changed`: true when at least one of `values` matches. */
|
|
21
|
+
static matchesAny(pattern: string | readonly string[], values: readonly string[]) {
|
|
22
|
+
return values.some((value) => PipelinePattern.matches(pattern, value));
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/** Braces and character classes are refused rather than given a meaning, so no implementation can read them apart. */
|
|
26
|
+
static validate(pattern: string | readonly string[]): string | null {
|
|
27
|
+
const patterns = PipelinePattern.#list(pattern);
|
|
28
|
+
if (!patterns.length) return "a pattern list may not be empty";
|
|
29
|
+
for (const glob of patterns) {
|
|
30
|
+
const body = glob.startsWith("!") ? glob.slice(1) : glob;
|
|
31
|
+
if (!body) return `"${glob}" matches nothing`;
|
|
32
|
+
if (body.startsWith("!")) return `"${glob}" negates twice`;
|
|
33
|
+
if (glob.length > pipelinePlanLimits.patternChars)
|
|
34
|
+
return `"${glob.slice(0, 40)}…" is longer than ${pipelinePlanLimits.patternChars} characters`;
|
|
35
|
+
if (/[{}[\]\\]/.test(body))
|
|
36
|
+
return `"${glob}" uses braces, a character class or a backslash, which are not supported`;
|
|
37
|
+
}
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
static #list(pattern: string | readonly string[]) {
|
|
42
|
+
return typeof pattern === "string" ? [pattern] : [...pattern];
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
static #regex(glob: string) {
|
|
46
|
+
const cached = PipelinePattern.#compiled.get(glob);
|
|
47
|
+
if (cached) return cached;
|
|
48
|
+
let source = "";
|
|
49
|
+
let idx = 0;
|
|
50
|
+
while (idx < glob.length) {
|
|
51
|
+
if (glob.startsWith("**/", idx)) {
|
|
52
|
+
source += "(?:.*/)?";
|
|
53
|
+
idx += 3;
|
|
54
|
+
} else if (glob.startsWith("/**", idx) && idx + 3 === glob.length) {
|
|
55
|
+
source += "(?:/.*)?";
|
|
56
|
+
idx += 3;
|
|
57
|
+
} else if (glob.startsWith("**", idx)) {
|
|
58
|
+
source += ".*";
|
|
59
|
+
idx += 2;
|
|
60
|
+
} else {
|
|
61
|
+
const char = glob.charAt(idx);
|
|
62
|
+
source += char === "*" ? "[^/]*" : char === "?" ? "[^/]" : char.replace(/[.+^$|(){}[\]\\]/, "\\$&");
|
|
63
|
+
idx += 1;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
const regex = new RegExp(`^${source}$`);
|
|
67
|
+
PipelinePattern.#compiled.set(glob, regex);
|
|
68
|
+
return regex;
|
|
69
|
+
}
|
|
70
|
+
}
|