tungsten 0.7.2 → 0.8.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/AGENTS.md +154 -15
- package/dist/.build-complete +1 -1
- package/dist/Components.d.ts +6 -4
- package/dist/Components.js +2 -0
- package/dist/Framework.js +7 -7
- package/dist/FrameworkConfig.d.ts +8 -2
- package/dist/Instance/Instance.d.ts +6 -1
- package/dist/Instance/Instance.js +62 -22
- package/dist/Servers/DevServer.d.ts +8 -5
- package/dist/Servers/DevServer.js +196 -113
- package/dist/Servers/ProdServer.d.ts +3 -1
- package/dist/Servers/ProdServer.js +136 -34
- package/dist/Servers/TungstenServer.d.ts +34 -1
- package/dist/Servers/TungstenServer.js +94 -42
- package/dist/Servers/loadEnvsDev.js +4 -4
- package/dist/Servers/watchedServerMiddleware.d.ts +10 -0
- package/dist/Servers/watchedServerMiddleware.js +45 -0
- package/dist/TungstenApp.js +2 -1
- package/dist/_client/cjsHelpers.d.ts +1 -1
- package/dist/_client/hmr.js +1 -1
- package/dist/_client/liveReloadSource.js +1 -1
- package/dist/_testing/errorRoute.d.ts +8 -0
- package/dist/_testing/errorRoute.js +9 -0
- package/dist/appBuilder.d.ts +2 -1
- package/dist/babelPlugins/BabelTransformComponentStyles.js +5 -3
- package/dist/babelPlugins/BabelTransformPackageImports.js +3 -1
- package/dist/babelPlugins/StyleCompileError.d.ts +4 -0
- package/dist/babelPlugins/StyleCompileError.js +11 -0
- package/dist/bin/commands/devmon.js +2 -2
- package/dist/bin/vendorHook.js +2 -1
- package/dist/build/assetVersions.js +2 -1
- package/dist/build/babel.user.common.config.d.ts +3 -5
- package/dist/build/compileJavascript.js +12 -27
- package/dist/build/componentStylesCache.js +2 -2
- package/dist/build/frameworkDestLocation.js +2 -1
- package/dist/build/ignoreGlobs.d.ts +2 -0
- package/dist/build/ignoreGlobs.js +8 -0
- package/dist/build/makeBabelRawConfig.d.ts +2 -2
- package/dist/build/makeBabelUserDevConfig.d.ts +2 -2
- package/dist/build/makeBabelUserProdConfig.d.ts +2 -2
- package/dist/build/rollup.user.prod.config.js +2 -2
- package/dist/build/tallyBabel.d.ts +2 -2
- package/dist/build/tallyBabel.js +1 -1
- package/dist/clone.js +1 -0
- package/dist/componentHelpers.d.ts +1 -1
- package/dist/componentHelpers.js +3 -4
- package/dist/componentProxyHandlers.js +2 -1
- package/dist/components/NativeHtml.d.ts +1 -1
- package/dist/components/bindable/BindableInputTyped.d.ts +3 -1
- package/dist/components/bindable/BindableInputTypedLegacy.d.ts +3 -1
- package/dist/components/bindable/bindableHtmlElements.d.ts +3 -3
- package/dist/components/library/RichTextEditor/RichTextEditor.d.ts +1 -1
- package/dist/components/library/RichTextEditor/StoredContentNode.d.ts +6 -1
- package/dist/components/library/RichTextEditor/contentTree.js +33 -13
- package/dist/env/setPrivateEnvValidator.js +2 -2
- package/dist/env/setPublicEnvValidator.d.ts +2 -2
- package/dist/env/setPublicEnvValidator.js +2 -2
- package/dist/fileVersions.js +5 -1
- package/dist/findProjectDir.js +2 -1
- package/dist/findUserConfig.d.ts +1 -1
- package/dist/frameworkConfigSchema.d.ts +8 -4
- package/dist/frameworkConfigSchema.js +2 -0
- package/dist/getRoutes.js +0 -4
- package/dist/hydrate/hydrate.js +3 -2
- package/dist/hydrate/hydrateGlobalData.d.ts +3 -0
- package/dist/hydrate/stubRouting.d.ts +2 -1
- package/dist/hydrate/stubRouting.js +7 -5
- package/dist/indexInner.d.ts +1 -0
- package/dist/indexInner.js +1 -0
- package/dist/json.d.ts +4 -0
- package/dist/json.js +3 -0
- package/dist/makeFinalConfig.js +3 -1
- package/dist/mutatingFunctions.d.ts +3 -3
- package/dist/pipeline/hydratePipeline.js +46 -5
- package/dist/pipeline/pipeline.d.ts +21 -6
- package/dist/pipeline/pipeline.js +14 -3
- package/dist/pipeline/pipelineDefinition.d.ts +11 -3
- package/dist/pipeline/pipelineDefinition.js +2 -0
- package/dist/pipeline/runPipeline.d.ts +15 -5
- package/dist/pipeline/runPipeline.js +71 -29
- package/dist/pipeline/runSplitPipeline.d.ts +2 -2
- package/dist/pipeline/runSplitPipeline.js +11 -5
- package/dist/pipeline/settleRouting.d.ts +10 -0
- package/dist/pipeline/settleRouting.js +54 -0
- package/dist/pipeline/splitPipeline.d.ts +9 -6
- package/dist/pipeline/splitPipeline.js +6 -4
- package/dist/postcssPlugins/TransformCssNames.d.ts +6 -6
- package/dist/render/contentTreeToRenderingTree.js +1 -3
- package/dist/render/instantiateClassComponent.d.ts +1 -1
- package/dist/render/processHead.js +31 -0
- package/dist/render/processProps.d.ts +6 -1
- package/dist/render/processProps.js +6 -4
- package/dist/render/rootToHtml.d.ts +1 -1
- package/dist/render/rootToHtml.js +2 -2
- package/dist/render/rootToHtmlDev.d.ts +1 -1
- package/dist/render/rootToHtmlDev.js +2 -2
- package/dist/routing/DataRedirect.d.ts +4 -0
- package/dist/routing/DataRedirect.js +1 -0
- package/dist/routing/Group.d.ts +1 -1
- package/dist/routing/MatchedRoute.d.ts +1 -1
- package/dist/routing/MatchedRoute.js +9 -3
- package/dist/routing/builder.d.ts +28 -9
- package/dist/routing/builder.js +9 -2
- package/dist/routing/redirectOf.d.ts +3 -2
- package/dist/routing/redirectOf.js +16 -9
- package/dist/routing/registerGlobalData.d.ts +4 -3
- package/dist/routing/registerRouting.d.ts +2 -1
- package/dist/routing/resolveAppRoutes.js +10 -1
- package/dist/routing/routesArray.d.ts +3 -2
- package/dist/routing/routingBuilder.d.ts +2 -1
- package/dist/staticGen/staticGen.js +3 -11
- package/dist/style/styleContentSxy.js +8 -8
- package/dist/syncServer/preload.js +1 -1
- package/dist/testing/createTestApp.d.ts +1 -1
- package/dist/testing/ensure.d.ts +1 -1
- package/dist/testing/host.d.ts +4 -4
- package/dist/testing/hydrateTestApp.d.ts +1 -1
- package/dist/testing/loadEnv.js +1 -1
- package/dist/testing/pipeline/createTestPipelineApp.js +10 -10
- package/dist/testing/pipeline/hostPipeline.d.ts +4 -4
- package/dist/testing/pipeline/hydrateTestPipelineApp.js +3 -3
- package/dist/testing/pipeline/index.d.ts +2 -0
- package/dist/testing/pipeline/index.js +3 -1
- package/dist/testing/pipeline/routesOf.d.ts +14 -0
- package/dist/testing/pipeline/routesOf.js +19 -0
- package/dist/testing/pipeline/testingComponentPackageFromPacket.d.ts +11 -0
- package/dist/testing/pipeline/testingComponentPackageFromPacket.js +26 -0
- package/dist/testing/testingComponentPackage.d.ts +1 -0
- package/dist/testing/testingComponentPackage.js +2 -1
- package/dist-ti/AnyComponent.d.ts +7 -0
- package/dist-ti/AnyComponentType.d.ts +7 -0
- package/dist-ti/AppResponse.d.ts +9 -0
- package/dist-ti/AppTypeExtraction.d.ts +3 -0
- package/dist-ti/AssignedStyle.d.ts +6 -0
- package/dist-ti/Brands.d.ts +17 -0
- package/dist-ti/CjsTypes.d.ts +9 -0
- package/dist-ti/ComponentInstance.d.ts +3 -0
- package/dist-ti/ComponentRenderInfo.type.d.ts +7 -0
- package/dist-ti/ComponentStyle.d.ts +7 -0
- package/dist-ti/Components.d.ts +344 -0
- package/dist-ti/ContentFunction.d.ts +10 -0
- package/dist-ti/ContentNode.d.ts +95 -0
- package/dist-ti/ContentNodeNew.d.ts +3 -0
- package/dist-ti/CssNames.d.ts +10 -0
- package/dist-ti/DomNodes.d.ts +4 -0
- package/dist-ti/DomPointer.d.ts +24 -0
- package/dist-ti/DomRegion.d.ts +23 -0
- package/dist-ti/ExtendableHTMLElement.d.ts +6 -0
- package/dist-ti/Framework.d.ts +33 -0
- package/dist-ti/FrameworkConfig.d.ts +121 -0
- package/dist-ti/FunctionComponent.d.ts +14 -0
- package/dist-ti/FunctionComponentStandIn.d.ts +62 -0
- package/dist-ti/GenericObject.type.d.ts +3 -0
- package/dist-ti/HtmlElementAttributes.d.ts +3 -0
- package/dist-ti/Instance/ClientRuntimeContext.d.ts +9 -0
- package/dist-ti/Instance/Instance.d.ts +89 -0
- package/dist-ti/Instance/InstanceConfig.d.ts +14 -0
- package/dist-ti/IsDefined.d.ts +3 -0
- package/dist-ti/IsIndexableObject.d.ts +3 -0
- package/dist-ti/IsNumber.d.ts +3 -0
- package/dist-ti/IsObject.d.ts +4 -0
- package/dist-ti/Json.type.d.ts +8 -0
- package/dist-ti/JsxContent.d.ts +5 -0
- package/dist-ti/Key.d.ts +3 -0
- package/dist-ti/KeyAttr.d.ts +4 -0
- package/dist-ti/MapObject.d.ts +5 -0
- package/dist-ti/Mode.d.ts +3 -0
- package/dist-ti/Module.d.ts +6 -0
- package/dist-ti/NoDeproxy.d.ts +6 -0
- package/dist-ti/PopMessage.type.d.ts +7 -0
- package/dist-ti/ProcessedStylesObject.d.ts +7 -0
- package/dist-ti/RenderFunction.d.ts +4 -0
- package/dist-ti/RenderedContentNode.d.ts +83 -0
- package/dist-ti/RenderingNode.d.ts +58 -0
- package/dist-ti/ReqRes.d.ts +170 -0
- package/dist-ti/Sass.d.ts +7 -0
- package/dist-ti/Script.d.ts +9 -0
- package/dist-ti/ServerRpcFunction.type.d.ts +3 -0
- package/dist-ti/Servers/DevServer.d.ts +57 -0
- package/dist-ti/Servers/ProdServer.d.ts +38 -0
- package/dist-ti/Servers/ServerMiddleware.d.ts +7 -0
- package/dist-ti/Servers/StaticSiteServer.d.ts +15 -0
- package/dist-ti/Servers/TungstenServer.d.ts +43 -0
- package/dist-ti/Servers/cacheVersioned.d.ts +4 -0
- package/dist-ti/Servers/devErrorPageAutoRetry.d.ts +5 -0
- package/dist-ti/Servers/initStores.d.ts +17 -0
- package/dist-ti/Servers/listenVerified.d.ts +13 -0
- package/dist-ti/Servers/loadEnvsDev.d.ts +8 -0
- package/dist-ti/Servers/portError.d.ts +3 -0
- package/dist-ti/Servers/resetRegistrations.d.ts +3 -0
- package/dist-ti/Servers/routing.d.ts +7 -0
- package/dist-ti/Servers/serveStatic.d.ts +6 -0
- package/dist-ti/Servers/stubInstance.d.ts +9 -0
- package/dist-ti/Servers/tungstenCorePrivateEnvSchema.d.ts +8 -0
- package/dist-ti/Servers/tungstenCorePublicEnvSchema.d.ts +9 -0
- package/dist-ti/Servers/watchedServerMiddleware.d.ts +11 -0
- package/dist-ti/Store/BaseStoreSchema.d.ts +4 -0
- package/dist-ti/Store/InternalStoreSchema.d.ts +22 -0
- package/dist-ti/Store/ServerDataLoading.d.ts +5 -0
- package/dist-ti/Store/Store.d.ts +3 -0
- package/dist-ti/Store/StoreProxyInterface.d.ts +3 -0
- package/dist-ti/Store/StoreSchemaClass.d.ts +10 -0
- package/dist-ti/Store/StoreSubscriptions.types.d.ts +7 -0
- package/dist-ti/Store/TypeSafeStore.d.ts +3 -0
- package/dist-ti/Store/createStores.d.ts +9 -0
- package/dist-ti/Store/exportStore.d.ts +4 -0
- package/dist-ti/Store/getInternalStore.d.ts +5 -0
- package/dist-ti/Store/getStore.d.ts +3 -0
- package/dist-ti/Store/makeStore.d.ts +53 -0
- package/dist-ti/Store/registerStore.d.ts +13 -0
- package/dist-ti/Store/storeCreators.d.ts +4 -0
- package/dist-ti/StoreBindVariable.d.ts +4 -0
- package/dist-ti/StyleProcessor.d.ts +4 -0
- package/dist-ti/TElement.d.ts +3 -0
- package/dist-ti/TungstenApp.d.ts +27 -0
- package/dist-ti/TungstenAppOld.d.ts +3 -0
- package/dist-ti/TungstenElement.d.ts +4 -0
- package/dist-ti/TungstenError.d.ts +10 -0
- package/dist-ti/TungstenStyleObject.d.ts +3 -0
- package/dist-ti/__deproxy.d.ts +4 -0
- package/dist-ti/_client/RootComponent.d.ts +5 -0
- package/dist-ti/_client/cjsHelpers.d.ts +12 -0
- package/dist-ti/_client/client.d.ts +15 -0
- package/dist-ti/_client/hmr.d.ts +3 -0
- package/dist-ti/_client/liveReload.d.ts +3 -0
- package/dist-ti/_client/liveReloadSource.d.ts +4 -0
- package/dist-ti/_client/rootComponentRelFilePath.d.ts +3 -0
- package/dist-ti/_client/routes.d.ts +4 -0
- package/dist-ti/_testing/errorRoute.d.ts +9 -0
- package/dist-ti/_testing/regexEquals.d.ts +3 -0
- package/dist-ti/_testing/should.d.ts +3 -0
- package/dist-ti/_testing/sxy-test-runner.types.d.ts +6 -0
- package/dist-ti/alive.d.ts +4 -0
- package/dist-ti/api/ApiEndpoint.d.ts +4 -0
- package/dist-ti/api/ApiMethod.type.d.ts +3 -0
- package/dist-ti/api/ApiRoute.d.ts +8 -0
- package/dist-ti/api/ApiRoutes.d.ts +6 -0
- package/dist-ti/api/Request.d.ts +3 -0
- package/dist-ti/api/Response.d.ts +3 -0
- package/dist-ti/api/getApiRoutes.d.ts +7 -0
- package/dist-ti/api/getExport.d.ts +4 -0
- package/dist-ti/api/getExportDev.d.ts +3 -0
- package/dist-ti/appBuilder.d.ts +75 -0
- package/dist-ti/appOutput.d.ts +7 -0
- package/dist-ti/assert.d.ts +3 -0
- package/dist-ti/auth/checkPassword.d.ts +4 -0
- package/dist-ti/auth/hashPassword.d.ts +4 -0
- package/dist-ti/auth/index.d.ts +4 -0
- package/dist-ti/babelPlugins/BabelAddDevCacheBust.d.ts +19 -0
- package/dist-ti/babelPlugins/BabelExtractComponentStylesheet.d.ts +14 -0
- package/dist-ti/babelPlugins/BabelFakeType.d.ts +8 -0
- package/dist-ti/babelPlugins/BabelState.type.d.ts +4 -0
- package/dist-ti/babelPlugins/BabelTransformBindDirect.d.ts +16 -0
- package/dist-ti/babelPlugins/BabelTransformBindVar.d.ts +16 -0
- package/dist-ti/babelPlugins/BabelTransformCjsToEsm.d.ts +17 -0
- package/dist-ti/babelPlugins/BabelTransformCjsToFunction.d.ts +21 -0
- package/dist-ti/babelPlugins/BabelTransformCjsToFunction2.d.ts +22 -0
- package/dist-ti/babelPlugins/BabelTransformComponentState.d.ts +27 -0
- package/dist-ti/babelPlugins/BabelTransformComponentStyles.d.ts +38 -0
- package/dist-ti/babelPlugins/BabelTransformCssImports.d.ts +18 -0
- package/dist-ti/babelPlugins/BabelTransformDependencyImportsOld.d.ts +21 -0
- package/dist-ti/babelPlugins/BabelTransformDeproxyState.d.ts +23 -0
- package/dist-ti/babelPlugins/BabelTransformDocInit.d.ts +10 -0
- package/dist-ti/babelPlugins/BabelTransformJsxExtensionsToJs.d.ts +12 -0
- package/dist-ti/babelPlugins/BabelTransformJsxSignals.d.ts +3 -0
- package/dist-ti/babelPlugins/BabelTransformPackageImports.d.ts +89 -0
- package/dist-ti/babelPlugins/BabelTransformReactive.d.ts +16 -0
- package/dist-ti/babelPlugins/BabelTransformReactiveSvelteStyle.d.ts +11 -0
- package/dist-ti/babelPlugins/BabelTransformRemoveBlocks.d.ts +14 -0
- package/dist-ti/babelPlugins/BabelTransformRemoveDevBlocks.d.ts +11 -0
- package/dist-ti/babelPlugins/BabelTransformRemoveServerBlocks.d.ts +11 -0
- package/dist-ti/babelPlugins/BabelTransformRemoveServerCode.d.ts +3 -0
- package/dist-ti/babelPlugins/BabelTransformSxyFrameworkImports.d.ts +11 -0
- package/dist-ti/babelPlugins/BabelTransformSxyJsx.d.ts +3 -0
- package/dist-ti/babelPlugins/BabelTransformUniqueComponents.d.ts +11 -0
- package/dist-ti/babelPlugins/BabelTypes.d.ts +7 -0
- package/dist-ti/babelPlugins/StyleCompileError.d.ts +5 -0
- package/dist-ti/babelPlugins/fixImportsInSassErrorMessage.d.ts +9 -0
- package/dist-ti/babelPlugins/isBareImport.d.ts +3 -0
- package/dist-ti/babelPlugins/test.d.ts +3 -0
- package/dist-ti/babelPlugins/transformPackageImports/BabelTransformDependencyImportsCjs.d.ts +35 -0
- package/dist-ti/babelPlugins/transformPackageImports/BabelTransformDependencyImportsEsm.d.ts +35 -0
- package/dist-ti/babelPlugins/transformPackageImports/getWebLocationOfPackageFile.d.ts +3 -0
- package/dist-ti/babelPlugins/transformPackageImports/resolveBareImport.d.ts +3 -0
- package/dist-ti/bin/args.d.ts +12 -0
- package/dist-ti/bin/commands/build.d.ts +3 -0
- package/dist-ti/bin/commands/buildHelp.d.ts +3 -0
- package/dist-ti/bin/commands/clean.d.ts +3 -0
- package/dist-ti/bin/commands/compile.d.ts +3 -0
- package/dist-ti/bin/commands/compileSimplePackage.d.ts +3 -0
- package/dist-ti/bin/commands/dev.d.ts +3 -0
- package/dist-ti/bin/commands/devmon.d.ts +3 -0
- package/dist-ti/bin/commands/help.d.ts +3 -0
- package/dist-ti/bin/commands/speed.d.ts +3 -0
- package/dist-ti/bin/commands/start.d.ts +3 -0
- package/dist-ti/bin/commands/static.d.ts +3 -0
- package/dist-ti/bin/index.d.ts +3 -0
- package/dist-ti/bin/moduleLoadAnalysis.d.ts +3 -0
- package/dist-ti/bin/vendorHook.d.ts +4 -0
- package/dist-ti/booleanAttributeValue.d.ts +22 -0
- package/dist-ti/browserStorage.d.ts +65 -0
- package/dist-ti/build/BabelConfig.d.ts +6 -0
- package/dist-ti/build/CompilationInfo.d.ts +18 -0
- package/dist-ti/build/CompilationInfoFailure.d.ts +3 -0
- package/dist-ti/build/CompilationInfoSuccess.d.ts +3 -0
- package/dist-ti/build/Event.type.d.ts +3 -0
- package/dist-ti/build/ImportAliases.d.ts +5 -0
- package/dist-ti/build/PackageList.d.ts +3 -0
- package/dist-ti/build/PackagesCacheInfo.d.ts +3 -0
- package/dist-ti/build/ProcessPackageResult.d.ts +16 -0
- package/dist-ti/build/ProcessPackageResults.d.ts +4 -0
- package/dist-ti/build/PromiseSettledResultIsPromiseRejectedResult.d.ts +6 -0
- package/dist-ti/build/assetVersions.d.ts +10 -0
- package/dist-ti/build/babel.user.common.config.d.ts +11 -0
- package/dist-ti/build/bundle.d.ts +3 -0
- package/dist-ti/build/bundleBabelOptions.d.ts +6 -0
- package/dist-ti/build/clientModuleAliases.d.ts +3 -0
- package/dist-ti/build/clientRoutesFile.d.ts +3 -0
- package/dist-ti/build/combineComponentCss.d.ts +3 -0
- package/dist-ti/build/compileJavascript.d.ts +30 -0
- package/dist-ti/build/compileStyles.d.ts +5 -0
- package/dist-ti/build/compileUserApp.d.ts +7 -0
- package/dist-ti/build/componentStylesCache.d.ts +11 -0
- package/dist-ti/build/copyAssets.d.ts +4 -0
- package/dist-ti/build/copyPackageModulesToPackagesFolder.d.ts +5 -0
- package/dist-ti/build/copyPublicFiles.d.ts +4 -0
- package/dist-ti/build/createClientFiles.d.ts +5 -0
- package/dist-ti/build/createInstanceConfigFile.d.ts +5 -0
- package/dist-ti/build/createPackageVirtualFileSystem.d.ts +4 -0
- package/dist-ti/build/createPackageVirtualFileSystems.d.ts +4 -0
- package/dist-ti/build/customImportAliases.d.ts +5 -0
- package/dist-ti/build/customPackageEntryPoints.d.ts +7 -0
- package/dist-ti/build/devBundle.d.ts +3 -0
- package/dist-ti/build/devBundle.rollup.config.d.ts +7 -0
- package/dist-ti/build/findRequiredUserModules.d.ts +3 -0
- package/dist-ti/build/frameworkDestLocation.d.ts +4 -0
- package/dist-ti/build/frameworkStylesheets.d.ts +6 -0
- package/dist-ti/build/getAllSxyClientModules.d.ts +5 -0
- package/dist-ti/build/getPackageDirForFile.d.ts +3 -0
- package/dist-ti/build/getSxyClientPackageAliases.d.ts +4 -0
- package/dist-ti/build/getTempDirForAppCompilation.d.ts +4 -0
- package/dist-ti/build/ignoreGlobs.d.ts +3 -0
- package/dist-ti/build/internalAliases.d.ts +5 -0
- package/dist-ti/build/makeBabelRawConfig.d.ts +4 -0
- package/dist-ti/build/makeBabelUserDevConfig.d.ts +6 -0
- package/dist-ti/build/makeBabelUserProdConfig.d.ts +4 -0
- package/dist-ti/build/makeEnvJavascriptContent.d.ts +3 -0
- package/dist-ti/build/modifySassImports.d.ts +7 -0
- package/dist-ti/build/packageIdentifier.d.ts +7 -0
- package/dist-ti/build/processDataToLines.d.ts +3 -0
- package/dist-ti/build/resolveSassScssImports.d.ts +4 -0
- package/dist-ti/build/rollup.user.prod.config.d.ts +7 -0
- package/dist-ti/build/rollupExtractComponentStylesheets.d.ts +13 -0
- package/dist-ti/build/rollupProdConstants.d.ts +6 -0
- package/dist-ti/build/sassImportParser.d.ts +7 -0
- package/dist-ti/build/scssImportParserChatgpt.d.ts +7 -0
- package/dist-ti/build/tallyBabel.d.ts +4 -0
- package/dist-ti/cacheControl.d.ts +14 -0
- package/dist-ti/calculateImportedStaticFileLocations.d.ts +11 -0
- package/dist-ti/calledFrom.d.ts +8 -0
- package/dist-ti/checkedAttributeToBoolean.d.ts +3 -0
- package/dist-ti/checkedValueToBoolean.d.ts +3 -0
- package/dist-ti/cliOutput.d.ts +17 -0
- package/dist-ti/clone.d.ts +7 -0
- package/dist-ti/compat/context.d.ts +26 -0
- package/dist-ti/compat/forwardRef.d.ts +10 -0
- package/dist-ti/compat/index.d.ts +3 -0
- package/dist-ti/compat/propTypes.d.ts +18 -0
- package/dist-ti/compat/toTungstenClassComponent.d.ts +3 -0
- package/dist-ti/compat/toTungstenFunctionComponent.d.ts +3 -0
- package/dist-ti/compat/types.d.ts +17 -0
- package/dist-ti/componentClassName.d.ts +3 -0
- package/dist-ti/componentHelpers.d.ts +20 -0
- package/dist-ti/componentProxyHandlers.d.ts +39 -0
- package/dist-ti/componentType.d.ts +3 -0
- package/dist-ti/components/Await.d.ts +18 -0
- package/dist-ti/components/Fragment.d.ts +9 -0
- package/dist-ti/components/GoToComponent.d.ts +11 -0
- package/dist-ti/components/Lazy.d.ts +18 -0
- package/dist-ti/components/Link.d.ts +15 -0
- package/dist-ti/components/NativeHtml.d.ts +11 -0
- package/dist-ti/components/NoEscape.d.ts +9 -0
- package/dist-ti/components/PopMessages.d.ts +13 -0
- package/dist-ti/components/Protected.d.ts +11 -0
- package/dist-ti/components/RawHtml.d.ts +37 -0
- package/dist-ti/components/RouteRedirectComponent.d.ts +13 -0
- package/dist-ti/components/Stylesheet.d.ts +9 -0
- package/dist-ti/components/WebRedirectComponent.d.ts +12 -0
- package/dist-ti/components/_GoToComponent.d.ts +11 -0
- package/dist-ti/components/bindable/BindMode.d.ts +3 -0
- package/dist-ti/components/bindable/BindVariable.d.ts +37 -0
- package/dist-ti/components/bindable/BindableCheckbox.d.ts +26 -0
- package/dist-ti/components/bindable/BindableInput.d.ts +22 -0
- package/dist-ti/components/bindable/BindableInputNonString.d.ts +23 -0
- package/dist-ti/components/bindable/BindableInputString.d.ts +23 -0
- package/dist-ti/components/bindable/BindableInputTyped.d.ts +30 -0
- package/dist-ti/components/bindable/BindableInputTypedLegacy.d.ts +34 -0
- package/dist-ti/components/bindable/BindableRadio.d.ts +15 -0
- package/dist-ti/components/bindable/BindableSelect.d.ts +33 -0
- package/dist-ti/components/bindable/BindableSelectNaive.d.ts +3 -0
- package/dist-ti/components/bindable/BindableTextarea.d.ts +29 -0
- package/dist-ti/components/bindable/bindableCandidates.comparison.d.ts +142 -0
- package/dist-ti/components/bindable/bindableHtmlElements.d.ts +28 -0
- package/dist-ti/components/library/RichTextEditor/RichTextEditor.d.ts +52 -0
- package/dist-ti/components/library/RichTextEditor/StoredContentNode.d.ts +11 -0
- package/dist-ti/components/library/RichTextEditor/activeFormats.d.ts +21 -0
- package/dist-ti/components/library/RichTextEditor/contentTree.d.ts +31 -0
- package/dist-ti/components/library/RichTextEditor/sanitizeAuthoredHtml.d.ts +31 -0
- package/dist-ti/components/library/__StatefulMessage/MessageData.d.ts +8 -0
- package/dist-ti/components/library/__StatefulMessage/StatefulMessage.d.ts +23 -0
- package/dist-ti/components/library/index.d.ts +6 -0
- package/dist-ti/components/makeTypedLink.d.ts +10 -0
- package/dist-ti/concat.d.ts +3 -0
- package/dist-ti/contentNodeSymbols.d.ts +14 -0
- package/dist-ti/context/registerContext.d.ts +23 -0
- package/dist-ti/copy.d.ts +3 -0
- package/dist-ti/createElement.d.ts +3 -0
- package/dist-ti/createRef.d.ts +8 -0
- package/dist-ti/createRoutes.d.ts +4 -0
- package/dist-ti/defaultConfig.d.ts +5 -0
- package/dist-ti/deleteDirs.d.ts +3 -0
- package/dist-ti/devBanner.d.ts +5 -0
- package/dist-ti/docInit.d.ts +17 -0
- package/dist-ti/domNodeChecks.d.ts +4 -0
- package/dist-ti/env/Env.d.ts +3 -0
- package/dist-ti/env/Interfaces.d.ts +10 -0
- package/dist-ti/env/addToEnv.d.ts +3 -0
- package/dist-ti/env/droppedCoreEnvKeys.d.ts +6 -0
- package/dist-ti/env/funcs.d.ts +6 -0
- package/dist-ti/env/getEnvSchemas.d.ts +11 -0
- package/dist-ti/env/index.d.ts +3 -0
- package/dist-ti/env/privateEnv.d.ts +3 -0
- package/dist-ti/env/privateEnvOrThrow.d.ts +3 -0
- package/dist-ti/env/publicEnv.d.ts +3 -0
- package/dist-ti/env/publicEnvOrThrow.d.ts +3 -0
- package/dist-ti/env/registerEnvSchemas.d.ts +16 -0
- package/dist-ti/env/setPrivateEnvValidator.d.ts +9 -0
- package/dist-ti/env/setPublicEnvValidator.d.ts +9 -0
- package/dist-ti/env/test.d.ts +3 -0
- package/dist-ti/env/types.d.ts +4 -0
- package/dist-ti/env/windowGlobalEnvStatement.d.ts +3 -0
- package/dist-ti/experiments.d.ts +3 -0
- package/dist-ti/filePathFromUrl.d.ts +3 -0
- package/dist-ti/fileVersions.d.ts +10 -0
- package/dist-ti/findPackageDotJson.d.ts +3 -0
- package/dist-ti/findProjectDir.d.ts +6 -0
- package/dist-ti/findUserConfig.d.ts +7 -0
- package/dist-ti/fixExtension.d.ts +3 -0
- package/dist-ti/foreach.d.ts +8 -0
- package/dist-ti/frameworkConfigSchema.d.ts +107 -0
- package/dist-ti/getArrowFunctionBody.d.ts +3 -0
- package/dist-ti/getComponent.d.ts +5 -0
- package/dist-ti/getComponentDev.d.ts +4 -0
- package/dist-ti/getConfig.d.ts +3 -0
- package/dist-ti/getContentFromFunctionComponent.d.ts +4 -0
- package/dist-ti/getFrameworkDir.d.ts +3 -0
- package/dist-ti/getRoutes.d.ts +7 -0
- package/dist-ti/getRoutesDevs.d.ts +5 -0
- package/dist-ti/getStackTrace.d.ts +3 -0
- package/dist-ti/getStyledContentFromFunctionComponent.d.ts +4 -0
- package/dist-ti/getUserConfig.d.ts +4 -0
- package/dist-ti/glob.d.ts +6 -0
- package/dist-ti/globals.d.ts +3 -0
- package/dist-ti/goto.d.ts +3 -0
- package/dist-ti/hasDomain.d.ts +21 -0
- package/dist-ti/hasValidKey.d.ts +4 -0
- package/dist-ti/headChildren.d.ts +3 -0
- package/dist-ti/helpers/combineClassNames.d.ts +4 -0
- package/dist-ti/helpers/forwardingFetch.d.ts +4 -0
- package/dist-ti/helpers/getFetchCompatibleHeaders.d.ts +4 -0
- package/dist-ti/helpers/index.d.ts +6 -0
- package/dist-ti/helpers/perRequest.d.ts +4 -0
- package/dist-ti/hmr/applyHmrModule.d.ts +12 -0
- package/dist-ti/hmr/componentIdentity.d.ts +10 -0
- package/dist-ti/hmr/instanceRegistry.d.ts +5 -0
- package/dist-ti/hmr/liveReloadHub.d.ts +11 -0
- package/dist-ti/hmr/refreshStylesheets.d.ts +3 -0
- package/dist-ti/hooks/clearCurrentComponent.d.ts +3 -0
- package/dist-ti/hooks/getCurrentComponent.d.ts +8 -0
- package/dist-ti/hooks/globalObj.d.ts +3 -0
- package/dist-ti/hooks/globalType.d.ts +3 -0
- package/dist-ti/hooks/index.d.ts +7 -0
- package/dist-ti/hooks/setCurrentComponent.d.ts +4 -0
- package/dist-ti/hooks/shallowCompare.d.ts +3 -0
- package/dist-ti/hooks/useCallback.d.ts +3 -0
- package/dist-ti/hooks/useContext.d.ts +3 -0
- package/dist-ti/hooks/useEffect.d.ts +3 -0
- package/dist-ti/hooks/useInstance.d.ts +4 -0
- package/dist-ti/hooks/useMemo.d.ts +3 -0
- package/dist-ti/hooks/useReducer.d.ts +3 -0
- package/dist-ti/hooks/useRef.d.ts +5 -0
- package/dist-ti/hooks/useState.d.ts +4 -0
- package/dist-ti/htmlEntities.d.ts +3 -0
- package/dist-ti/htmlEventHandlerKey.d.ts +4 -0
- package/dist-ti/htmlEvents.d.ts +7 -0
- package/dist-ti/hydrate/hydrate.d.ts +21 -0
- package/dist-ti/hydrate/hydrateGlobalData.d.ts +14 -0
- package/dist-ti/hydrate/reconcileHydratedAttributes.d.ts +26 -0
- package/dist-ti/hydrate/renderHydrationMismatchBanner.d.ts +9 -0
- package/dist-ti/hydrate/stubRouting.d.ts +10 -0
- package/dist-ti/importDevModuleWithRetry.d.ts +5 -0
- package/dist-ti/importModule.d.ts +4 -0
- package/dist-ti/index.d.ts +5 -0
- package/dist-ti/indexInner.d.ts +116 -0
- package/dist-ti/info.d.ts +3 -0
- package/dist-ti/innerHtmlFromProps.d.ts +19 -0
- package/dist-ti/isBrowser.d.ts +3 -0
- package/dist-ti/isClient.d.ts +3 -0
- package/dist-ti/isDev.d.ts +4 -0
- package/dist-ti/isProd.d.ts +3 -0
- package/dist-ti/isServer.d.ts +3 -0
- package/dist-ti/iterationQueryString.d.ts +3 -0
- package/dist-ti/json.d.ts +17 -0
- package/dist-ti/jsx-runtime.d.ts +3 -0
- package/dist-ti/jsxHelpers.d.ts +4 -0
- package/dist-ti/jsxRuntime.d.ts +11 -0
- package/dist-ti/jsxRuntimeSignals.d.ts +23 -0
- package/dist-ti/loadPackageDotJsonFromDir.d.ts +4 -0
- package/dist-ti/logAndReturn.d.ts +4 -0
- package/dist-ti/makeFinalConfig.d.ts +4 -0
- package/dist-ti/makeInstanceConfigFromFrameworkConfig.d.ts +5 -0
- package/dist-ti/makeServerRpc.d.ts +8 -0
- package/dist-ti/markOptionSelected.d.ts +18 -0
- package/dist-ti/mergeConfigs.d.ts +4 -0
- package/dist-ti/moduleReloader.d.ts +3 -0
- package/dist-ti/mutatingFunctions.d.ts +13 -0
- package/dist-ti/nbsp.d.ts +3 -0
- package/dist-ti/objectMap.d.ts +4 -0
- package/dist-ti/objectTypesToCopy.d.ts +3 -0
- package/dist-ti/objectTypesToProxy.d.ts +3 -0
- package/dist-ti/output.d.ts +7 -0
- package/dist-ti/packageSettings.d.ts +3 -0
- package/dist-ti/pipeLog.d.ts +3 -0
- package/dist-ti/pipeline/contextStore.d.ts +13 -0
- package/dist-ti/pipeline/hydratePipeline.d.ts +5 -0
- package/dist-ti/pipeline/importRoutesModule.d.ts +7 -0
- package/dist-ti/pipeline/networkedTransport.d.ts +12 -0
- package/dist-ti/pipeline/pipeline.d.ts +124 -0
- package/dist-ti/pipeline/pipelineDefinition.d.ts +87 -0
- package/dist-ti/pipeline/runPipeline.d.ts +40 -0
- package/dist-ti/pipeline/runSplitPipeline.d.ts +11 -0
- package/dist-ti/pipeline/settleRouting.d.ts +11 -0
- package/dist-ti/pipeline/splitPipeline.d.ts +66 -0
- package/dist-ti/pop.d.ts +11 -0
- package/dist-ti/possibleEnvFiles.d.ts +3 -0
- package/dist-ti/postcssPlugins/TransformCssNames.d.ts +16 -0
- package/dist-ti/postcssPlugins/parseSelectors.d.ts +3 -0
- package/dist-ti/postcssPlugins/parseSelectorsRich.d.ts +9 -0
- package/dist-ti/postcssPlugins/scopeAnimationValue.d.ts +3 -0
- package/dist-ti/postcssPlugins/splitCssValue.d.ts +3 -0
- package/dist-ti/postcssPlugins/unwrapIgnoreMarker.d.ts +3 -0
- package/dist-ti/promise.d.ts +3 -0
- package/dist-ti/propsAreEqual.d.ts +9 -0
- package/dist-ti/rawHtml/HtmlAllowList.d.ts +18 -0
- package/dist-ti/rawHtml/decodeHtmlEntities.d.ts +9 -0
- package/dist-ti/rawHtml/filterContentNode.d.ts +21 -0
- package/dist-ti/rawHtml/htmlParsingTags.d.ts +24 -0
- package/dist-ti/rawHtml/parseHtml.d.ts +50 -0
- package/dist-ti/rawHtml/safeHtmlAllowList.d.ts +19 -0
- package/dist-ti/rawHtml/sanitizeHtml.d.ts +18 -0
- package/dist-ti/rawHtml/tokenizeHtml.d.ts +26 -0
- package/dist-ti/reRouting/addRequireResolveHooks.d.ts +3 -0
- package/dist-ti/reRouting/importLoader.d.ts +8 -0
- package/dist-ti/ref.d.ts +3 -0
- package/dist-ti/regexEscape.d.ts +3 -0
- package/dist-ti/removeRecursive.d.ts +3 -0
- package/dist-ti/render/HeadData.d.ts +22 -0
- package/dist-ti/render/SxyFrameworkModule.d.ts +6 -0
- package/dist-ti/render/SxyFrameworkModules.d.ts +4 -0
- package/dist-ti/render/addImportMap.d.ts +5 -0
- package/dist-ti/render/classComponentNodeToRenderingTree.d.ts +7 -0
- package/dist-ti/render/componentNodeToRenderingTree.d.ts +7 -0
- package/dist-ti/render/contentNodeToHtml.d.ts +19 -0
- package/dist-ti/render/contentToHtml.d.ts +10 -0
- package/dist-ti/render/contentToHtmlDev.d.ts +10 -0
- package/dist-ti/render/contentTreeToRenderingTree.d.ts +7 -0
- package/dist-ti/render/debug.d.ts +3 -0
- package/dist-ti/render/functionComponentNodeToRenderingTree.d.ts +7 -0
- package/dist-ti/render/getFunctionBodyAsString.d.ts +4 -0
- package/dist-ti/render/htmlMonoTags.d.ts +7 -0
- package/dist-ti/render/htmlNoSelfCloseTags.d.ts +28 -0
- package/dist-ti/render/htmlSelfClosableTags.d.ts +7 -0
- package/dist-ti/render/htmlSingleOnlyTags.d.ts +9 -0
- package/dist-ti/render/htmlVoidTags.d.ts +20 -0
- package/dist-ti/render/instantiateClassComponent.d.ts +6 -0
- package/dist-ti/render/instantiateComponent.d.ts +6 -0
- package/dist-ti/render/instantiateFunctionComponent.d.ts +7 -0
- package/dist-ti/render/printComponentNameInSource.d.ts +3 -0
- package/dist-ti/render/processBody.d.ts +3 -0
- package/dist-ti/render/processHead.d.ts +5 -0
- package/dist-ti/render/processHtmlNode.d.ts +4 -0
- package/dist-ti/render/processProps.d.ts +3 -0
- package/dist-ti/render/processRenderingNodeHtml.d.ts +4 -0
- package/dist-ti/render/readDocInitScript.d.ts +4 -0
- package/dist-ti/render/renderingTreeToHtml.d.ts +5 -0
- package/dist-ti/render/rootToHtml.d.ts +10 -0
- package/dist-ti/render/rootToHtmlDev.d.ts +10 -0
- package/dist-ti/requests/axios/get.d.ts +3 -0
- package/dist-ti/requests/axios/post.d.ts +3 -0
- package/dist-ti/requests/fetch/FetchExtras.d.ts +32 -0
- package/dist-ti/requests/fetch/_fetchPromise.d.ts +3 -0
- package/dist-ti/requests/fetch/delete.d.ts +4 -0
- package/dist-ti/requests/fetch/get.d.ts +4 -0
- package/dist-ti/requests/fetch/mergeFetchInit.d.ts +3 -0
- package/dist-ti/requests/fetch/paramsObjectToParamsString.d.ts +3 -0
- package/dist-ti/requests/fetch/patch.d.ts +4 -0
- package/dist-ti/requests/fetch/post.d.ts +4 -0
- package/dist-ti/requests/fetch/put.d.ts +4 -0
- package/dist-ti/requests/index.d.ts +7 -0
- package/dist-ti/routesLocationParts.d.ts +7 -0
- package/dist-ti/routing/AppRoutes.d.ts +7 -0
- package/dist-ti/routing/DataRedirect.d.ts +5 -0
- package/dist-ti/routing/Default404.d.ts +6 -0
- package/dist-ti/routing/ErrorRouteType.d.ts +9 -0
- package/dist-ti/routing/Group.d.ts +13 -0
- package/dist-ti/routing/Match.type.d.ts +18 -0
- package/dist-ti/routing/MatchedRoute.d.ts +15 -0
- package/dist-ti/routing/MatchedRouteInfo.d.ts +14 -0
- package/dist-ti/routing/Params.d.ts +3 -0
- package/dist-ti/routing/ParamsFromPath.d.ts +11 -0
- package/dist-ti/routing/RedirectCode.d.ts +3 -0
- package/dist-ti/routing/Route.d.ts +3 -0
- package/dist-ti/routing/RouteContent.d.ts +5 -0
- package/dist-ti/routing/RouteContentFunction.d.ts +6 -0
- package/dist-ti/routing/RouteData.d.ts +3 -0
- package/dist-ti/routing/RouteDataFunction.type.d.ts +9 -0
- package/dist-ti/routing/RouteDataReturnType.d.ts +12 -0
- package/dist-ti/routing/RouteParams.type.d.ts +3 -0
- package/dist-ti/routing/RoutePaths.d.ts +13 -0
- package/dist-ti/routing/RouteProp.d.ts +11 -0
- package/dist-ti/routing/RouteType.d.ts +3 -0
- package/dist-ti/routing/RouteTypes.d.ts +20 -0
- package/dist-ti/routing/Router.d.ts +3 -0
- package/dist-ti/routing/Routes.d.ts +39 -0
- package/dist-ti/routing/RoutesFunction.d.ts +14 -0
- package/dist-ti/routing/RoutesWithSafeParams.d.ts +3 -0
- package/dist-ti/routing/RoutingRedirect.d.ts +9 -0
- package/dist-ti/routing/Serializable.d.ts +6 -0
- package/dist-ti/routing/TungstenErrorInfo.d.ts +7 -0
- package/dist-ti/routing/WebRedirect.d.ts +9 -0
- package/dist-ti/routing/builder.d.ts +131 -0
- package/dist-ti/routing/builder.trial.d.ts +3 -0
- package/dist-ti/routing/compareRequestToRegex.d.ts +10 -0
- package/dist-ti/routing/debug.d.ts +3 -0
- package/dist-ti/routing/defineRoutes.d.ts +9 -0
- package/dist-ti/routing/getPathPriority.d.ts +3 -0
- package/dist-ti/routing/matchPath.d.ts +4 -0
- package/dist-ti/routing/patternToRegex.d.ts +6 -0
- package/dist-ti/routing/pyramidRouting.d.ts +3 -0
- package/dist-ti/routing/redirectOf.d.ts +13 -0
- package/dist-ti/routing/registerGlobalData.d.ts +19 -0
- package/dist-ti/routing/registerRoutes.d.ts +11 -0
- package/dist-ti/routing/registerRouting.d.ts +38 -0
- package/dist-ti/routing/registrationTypes.d.ts +12 -0
- package/dist-ti/routing/resolveAppRoutes.d.ts +6 -0
- package/dist-ti/routing/routeSymbols.d.ts +10 -0
- package/dist-ti/routing/routeUrl.d.ts +9 -0
- package/dist-ti/routing/routesArray.d.ts +31 -0
- package/dist-ti/routing/routingBuilder.d.ts +36 -0
- package/dist-ti/routing/routingRegistry.d.ts +20 -0
- package/dist-ti/routing/runContentFunction.d.ts +3 -0
- package/dist-ti/routing/splitRequest.d.ts +18 -0
- package/dist-ti/run.d.ts +3 -0
- package/dist-ti/server.d.ts +5 -0
- package/dist-ti/serverModuleLocation.d.ts +4 -0
- package/dist-ti/serverRpc.d.ts +3 -0
- package/dist-ti/serverRpcs.d.ts +4 -0
- package/dist-ti/settings.d.ts +34 -0
- package/dist-ti/signals/tracking.d.ts +34 -0
- package/dist-ti/slash.d.ts +3 -0
- package/dist-ti/spawnShellCommand.d.ts +4 -0
- package/dist-ti/standardSchema.d.ts +38 -0
- package/dist-ti/standardizeWebPath.d.ts +3 -0
- package/dist-ti/startDevServer.d.ts +3 -0
- package/dist-ti/stateTracking.d.ts +48 -0
- package/dist-ti/staticGen/RouteDefinition.d.ts +9 -0
- package/dist-ti/staticGen/getAppRoutes.d.ts +6 -0
- package/dist-ti/staticGen/staticGen.d.ts +4 -0
- package/dist-ti/staticGen/staticGenFunctions.d.ts +7 -0
- package/dist-ti/style/jssToCss.d.ts +3 -0
- package/dist-ti/style/styleContent.d.ts +4 -0
- package/dist-ti/style/styleContentReact.d.ts +3 -0
- package/dist-ti/style/styleContentReactClassOrClassname.d.ts +3 -0
- package/dist-ti/style/styleContentSxy.d.ts +5 -0
- package/dist-ti/style/styleContentSxyClassOrClassname.d.ts +3 -0
- package/dist-ti/style/styleElementContent.d.ts +3 -0
- package/dist-ti/style/unusedStyles.d.ts +10 -0
- package/dist-ti/styleProcessors.d.ts +3 -0
- package/dist-ti/symbols.d.ts +4 -0
- package/dist-ti/sync/index.d.ts +5 -0
- package/dist-ti/syncServer/preload.d.ts +3 -0
- package/dist-ti/testing/contentToString.d.ts +14 -0
- package/dist-ti/testing/createTestApp.d.ts +72 -0
- package/dist-ti/testing/display.d.ts +3 -0
- package/dist-ti/testing/ensure.d.ts +120 -0
- package/dist-ti/testing/ensure.trial.d.ts +3 -0
- package/dist-ti/testing/helpers/contentHtmlElements.d.ts +4 -0
- package/dist-ti/testing/host.d.ts +189 -0
- package/dist-ti/testing/hydrateTestApp.d.ts +57 -0
- package/dist-ti/testing/index.d.ts +12 -0
- package/dist-ti/testing/installTestDocInit.d.ts +3 -0
- package/dist-ti/testing/installTestStyleProcessors.d.ts +3 -0
- package/dist-ti/testing/loadEnv.d.ts +7 -0
- package/dist-ti/testing/normalize.d.ts +3 -0
- package/dist-ti/testing/pipeline/createTestPacketApp.d.ts +31 -0
- package/dist-ti/testing/pipeline/createTestPipelineApp.d.ts +71 -0
- package/dist-ti/testing/pipeline/hostPipeline.d.ts +26 -0
- package/dist-ti/testing/pipeline/hydrateTestPipelineApp.d.ts +31 -0
- package/dist-ti/testing/pipeline/index.d.ts +8 -0
- package/dist-ti/testing/pipeline/pipelineTestApp.d.ts +35 -0
- package/dist-ti/testing/pipeline/routesOf.d.ts +15 -0
- package/dist-ti/testing/pipeline/testPipelineRoute.d.ts +3 -0
- package/dist-ti/testing/pipeline/testingComponentPackageFromPacket.d.ts +12 -0
- package/dist-ti/testing/resolveContent.d.ts +19 -0
- package/dist-ti/testing/testEnvIsRequested.d.ts +4 -0
- package/dist-ti/testing/testingComponentPackage.d.ts +36 -0
- package/dist-ti/throwError.d.ts +5 -0
- package/dist-ti/timeProfiler.d.ts +17 -0
- package/dist-ti/todo.d.ts +3 -0
- package/dist-ti/update/UpdateResult.d.ts +7 -0
- package/dist-ti/update/UpdateScheduler.d.ts +18 -0
- package/dist-ti/update/guardedUpdate.d.ts +10 -0
- package/dist-ti/update/integrateUpdateVdom.d.ts +50 -0
- package/dist-ti/update/integrateUpdateVdomPrebuild.d.ts +3 -0
- package/dist-ti/update/pendingMounts.d.ts +26 -0
- package/dist-ti/validChildren.d.ts +6 -0
- package/dist-ti/warnOnFrameworkChange.d.ts +3 -0
- package/dist-ti/watch.d.ts +10 -0
- package/dist-ti/when.d.ts +4 -0
- package/dist-ti/zones/react.d.ts +54 -0
- package/package.json +75 -11
- package/types/globals.d.ts +65 -0
- package/types/helpers.d.ts +2 -1
- package/types/index.d.ts +2 -57
- package/types-ti/helpers.d.ts +0 -0
- package/types-ti/index.d.ts +12 -0
- package/types-ti/permissions.d.ts +39 -0
- package/vendor/manifest.json +2 -2
- package/dist/pipeline/PipelineRequestHandler.d.ts +0 -25
- package/dist/pipeline/PipelineRequestHandler.js +0 -104
|
@@ -4,14 +4,16 @@ import { routeKeyToUrl } from '../routing/routeUrl.js';
|
|
|
4
4
|
import { TungstenError } from '../TungstenError.js';
|
|
5
5
|
// config.serverSideRouting false: the page's first routing is the client's, with its route data. A
|
|
6
6
|
// redirect to a route routes again, the address bar replaced, before anything is built; one to a
|
|
7
|
-
// URL leaves the page, and gives null
|
|
8
|
-
|
|
7
|
+
// URL leaves the page, and gives null. allRoutesData: the pipeline's, beside each routing, whose
|
|
8
|
+
// redirect wins over the route's
|
|
9
|
+
export async function stubRouting(location, route, instanceConfig, allRoutesData) {
|
|
9
10
|
for (let hops = 0; hops <= 10; hops++) {
|
|
10
|
-
const matchedRouteInfo = await route(location);
|
|
11
|
-
const redirection = redirectOf(matchedRouteInfo);
|
|
11
|
+
const [matchedRouteInfo, data] = await Promise.all([route(location), allRoutesData?.(location)]);
|
|
12
|
+
const redirection = redirectOf(matchedRouteInfo, data);
|
|
12
13
|
if (redirection === undefined) return {
|
|
13
14
|
location,
|
|
14
|
-
matchedRouteInfo
|
|
15
|
+
matchedRouteInfo,
|
|
16
|
+
allRoutesData: data
|
|
15
17
|
};
|
|
16
18
|
if ('url' in redirection) {
|
|
17
19
|
window.location.replace(redirection.url);
|
package/dist/indexInner.d.ts
CHANGED
|
@@ -63,6 +63,7 @@ export { splitPipeline } from './pipeline/splitPipeline.js';
|
|
|
63
63
|
export type { PipelineServerAllRoutesData } from './pipeline/splitPipeline.js';
|
|
64
64
|
export { contextStore } from './pipeline/contextStore.js';
|
|
65
65
|
export { hydratePipeline } from './pipeline/hydratePipeline.js';
|
|
66
|
+
export { routesWith, routesListWith, makeRouteWith } from './routing/builder.js';
|
|
66
67
|
export { registeredRouting } from './routing/routingRegistry.js';
|
|
67
68
|
export { type Context, type ContextClass, type ContextClasses, registerContext, } from './context/registerContext.js';
|
|
68
69
|
export { registerNetworkedData, type NetworkedData } from './routing/routingRegistry.js';
|
package/dist/indexInner.js
CHANGED
|
@@ -85,6 +85,7 @@ export { contextStore } from './pipeline/contextStore.js';
|
|
|
85
85
|
// the generated client.js calls this in place of hydrate() under 'pipeline'
|
|
86
86
|
export { hydratePipeline } from './pipeline/hydratePipeline.js';
|
|
87
87
|
// the generated client/routes.js reads this; not meant for app code
|
|
88
|
+
export { routesWith, routesListWith, makeRouteWith } from './routing/builder.js';
|
|
88
89
|
export { registeredRouting } from './routing/routingRegistry.js';
|
|
89
90
|
// Context and NetworkedData are the interfaces an app augments, from its classes or its routing
|
|
90
91
|
export { registerContext } from './context/registerContext.js';
|
package/dist/json.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import type { Json } from './Json.type.js';
|
|
1
2
|
type Replacer = (this: unknown, key: string, value: unknown) => unknown;
|
|
3
|
+
type Reviver = (this: unknown, key: string, value: unknown) => unknown;
|
|
2
4
|
type AllowList = (string | number)[] | null;
|
|
3
5
|
type Space = string | number;
|
|
4
6
|
type IfAny<T, Then> = 0 extends (1 & T) ? Then : never;
|
|
@@ -8,5 +10,7 @@ export declare function JSONstringify(value: object, replacer?: AllowList, space
|
|
|
8
10
|
export declare function JSONstringify(value: string | number | boolean | null, replacer?: AllowList, space?: Space): string;
|
|
9
11
|
export declare function JSONstringify(value: string | number | boolean | null | object, replacer?: AllowList, space?: Space): string;
|
|
10
12
|
export declare function JSONstringify(value: unknown, replacer?: Replacer | AllowList, space?: Space): string | undefined;
|
|
13
|
+
export declare function JSONparse(text: string): Json;
|
|
14
|
+
export declare function JSONparse(text: string, reviver: Reviver): unknown;
|
|
11
15
|
export {};
|
|
12
16
|
//# sourceMappingURL=json.d.ts.map
|
package/dist/json.js
CHANGED
|
@@ -5,4 +5,7 @@ export function JSONstringify(value, replacer, space) {
|
|
|
5
5
|
/* eslint-disable no-restricted-properties -- the typed wrapper */
|
|
6
6
|
return typeof replacer === 'function' ? JSON.stringify(value, replacer, space) : JSON.stringify(value, replacer, space);
|
|
7
7
|
/* eslint-enable no-restricted-properties */
|
|
8
|
+
}
|
|
9
|
+
export function JSONparse(text, reviver) {
|
|
10
|
+
return JSON.parse(text, reviver); // eslint-disable-line no-restricted-properties -- the typed wrapper
|
|
8
11
|
}
|
package/dist/makeFinalConfig.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { defaultConfig } from './defaultConfig.js';
|
|
2
2
|
export function makeFinalConfig(userConfig, overrides = null) {
|
|
3
|
-
const finalConfig =
|
|
3
|
+
const finalConfig = {
|
|
4
|
+
...structuredClone(defaultConfig)
|
|
5
|
+
};
|
|
4
6
|
for (const key in userConfig) {
|
|
5
7
|
//if (Object.prototype.hasOwnProperty.call(userConfig, key)) { // github co-pilot suggestion, unsure if needed
|
|
6
8
|
finalConfig[key] = userConfig[key]; // eslint-disable-line @typescript-eslint/no-unsafe-type-assertion
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export declare const arrayMutatingFunctions: readonly [
|
|
1
|
+
export declare const arrayMutatingFunctions: readonly ['push', 'pop', 'shift', 'unshift', 'sort', 'splice', 'reverse', 'fill', 'copyWithin'];
|
|
2
2
|
type ArrayMutatingFunctions = typeof arrayMutatingFunctions[number];
|
|
3
3
|
export declare const arrayMutatingFunctionInsertsFrom: Partial<Record<ArrayMutatingFunctions, number>>;
|
|
4
|
-
export declare const mapMutatingFunctions: readonly [
|
|
4
|
+
export declare const mapMutatingFunctions: readonly ['set', 'delete', 'clear'];
|
|
5
5
|
type MapMutatingFunctions = typeof mapMutatingFunctions[number];
|
|
6
|
-
export declare const setMutatingFunctions: readonly [
|
|
6
|
+
export declare const setMutatingFunctions: readonly ['add', 'delete', 'clear'];
|
|
7
7
|
type SetMutatingFunctions = typeof setMutatingFunctions[number];
|
|
8
8
|
export declare function KeyIsArrayMutatingFunction(key: string): key is ArrayMutatingFunctions;
|
|
9
9
|
export declare function KeyIsMapMutatingFunction(key: string): key is MapMutatingFunctions;
|
|
@@ -29,17 +29,48 @@ export async function hydratePipeline(app, RootComponent, instanceConfig, fileVe
|
|
|
29
29
|
const routes = pipelineRoutes(app, null, init, isDev);
|
|
30
30
|
const routeContext = routingContext(ran.routingContext);
|
|
31
31
|
const networkedData = routingNetworkedData(ran.routingNetworkedData);
|
|
32
|
+
// the server's error page: the app's error page alone, with what clientInit made - the server
|
|
33
|
+
// ran no Post - and, with no shell around it, navigation from it loads pages from the server
|
|
34
|
+
if (typeof __tungsten_error_info__ !== 'undefined' && app.errorPage !== undefined) {
|
|
35
|
+
const noRoute = {
|
|
36
|
+
key: null,
|
|
37
|
+
params: {},
|
|
38
|
+
content: null
|
|
39
|
+
};
|
|
40
|
+
const globalData = __tungsten_global_data__;
|
|
41
|
+
const {
|
|
42
|
+
internalStore,
|
|
43
|
+
stores,
|
|
44
|
+
storeSubscriptions
|
|
45
|
+
} = initStores(location, null, globalData, noRoute, null, routeContext, networkedData);
|
|
46
|
+
const instance = new Instance(location, {
|
|
47
|
+
...instanceConfig,
|
|
48
|
+
clientSideNav: false
|
|
49
|
+
}, null, appRoutesFor(app, init), routes, internalStore, stores, storeSubscriptions, globalData, noRoute);
|
|
50
|
+
instance.fileVersions = fileVersions;
|
|
51
|
+
instance.context = routeContext;
|
|
52
|
+
instance.networkedData = networkedData;
|
|
53
|
+
instance.pipelineNetworked = ran.networked;
|
|
54
|
+
instance.errorInfo = {
|
|
55
|
+
error: undefined,
|
|
56
|
+
message: __tungsten_error_info__.message
|
|
57
|
+
};
|
|
58
|
+
const ErrorPage = app.errorPage; // eslint-disable-line @typescript-eslint/no-unsafe-type-assertion -- .errorPage() typed it
|
|
59
|
+
await hydrateDocument(instance, ErrorPage, instance.errorInfo);
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
32
62
|
let allRoutesData;
|
|
33
63
|
let matchedRouteInfo;
|
|
34
64
|
if (instanceConfig.serverSideRouting === false) {
|
|
35
65
|
// a stub page: the client's own all-routes data, beside its first routing, as a navigation's
|
|
36
|
-
const
|
|
66
|
+
const fetchData = ran.allRoutesData;
|
|
67
|
+
const routed = await stubRouting(location, to => routing(to, routes, routeContext, networkedData), instanceConfig, fetchData && (async to => fetchData(to)));
|
|
37
68
|
if (routed === null) return;
|
|
38
69
|
({
|
|
39
70
|
location,
|
|
40
71
|
matchedRouteInfo
|
|
41
72
|
} = routed);
|
|
42
|
-
allRoutesData =
|
|
73
|
+
allRoutesData = routed.allRoutesData; // eslint-disable-line @typescript-eslint/no-unsafe-type-assertion -- the framework brands what it builds
|
|
43
74
|
} else {
|
|
44
75
|
allRoutesData = __tungsten_global_data__;
|
|
45
76
|
matchedRouteInfo = hydrationRouting(__tungsten_matched_route_info__, routes);
|
|
@@ -62,14 +93,19 @@ export async function hydratePipeline(app, RootComponent, instanceConfig, fileVe
|
|
|
62
93
|
routingContext: routeContext,
|
|
63
94
|
routingNetworkedData: networkedData,
|
|
64
95
|
allRoutesData: allRoutesDataFor(ran.allRoutesData),
|
|
96
|
+
allRoutesDataFallback: fallbackFor(ran.allRoutesDataFallback),
|
|
65
97
|
afterRouting
|
|
66
98
|
};
|
|
67
|
-
if (isDev) setCurrentInstance(instance);
|
|
68
99
|
if (instanceConfig.serverSideRouting !== false && typeof __tungsten_route_data__ !== 'undefined') {
|
|
69
100
|
instance.routeData = __tungsten_route_data__;
|
|
70
101
|
}
|
|
102
|
+
await hydrateDocument(instance, RootComponent ?? MatchedRoute);
|
|
103
|
+
}
|
|
104
|
+
// the page's document, from its root component
|
|
105
|
+
async function hydrateDocument(instance, RootComponent, props = {}) {
|
|
106
|
+
if (isDev) setCurrentInstance(instance);
|
|
71
107
|
const meta = makeDefaultHydrateMeta();
|
|
72
|
-
await hydrateRootComponent(instance, RootComponent
|
|
108
|
+
await hydrateRootComponent(instance, RootComponent, new DomPointer(document, 1), meta, props);
|
|
73
109
|
instance.hydrationComplete = true;
|
|
74
110
|
if (isDev) renderHydrationMismatchBanner(meta.mismatches);
|
|
75
111
|
if (isDev) renderDocInitErrorBanner();
|
|
@@ -79,5 +115,10 @@ const appRoutesFor = (app, init) => reqRes => pipelineRoutes(app, reqRes, init,
|
|
|
79
115
|
const allRoutesDataFor = run => {
|
|
80
116
|
if (run === undefined) return undefined;
|
|
81
117
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- the framework brands what it builds
|
|
82
|
-
return async
|
|
118
|
+
return async location => await run(location);
|
|
119
|
+
};
|
|
120
|
+
const fallbackFor = run => {
|
|
121
|
+
if (run === undefined) return undefined;
|
|
122
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- the framework brands what it builds
|
|
123
|
+
return async (location, error) => await run(location, error);
|
|
83
124
|
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { ComponentStore, ConstructPackage, TungstenComponentPropsBase, TungstenComponentSignalsConstraint, TungstenComponentStateConstraint } from '../Components.jsx';
|
|
2
2
|
import type { ComponentHelpers } from '../componentHelpers.js';
|
|
3
|
+
import type { TungstenErrorInfo } from '../routing/TungstenErrorInfo.js';
|
|
3
4
|
import type { RoutesWithSettings } from '../routing/Routes.js';
|
|
5
|
+
import type { DataRedirect } from '../routing/DataRedirect.js';
|
|
4
6
|
import type { NoDuplicatePaths, RoutesArray } from '../routing/routesArray.js';
|
|
5
7
|
import type { Serializable } from '../routing/Serializable.js';
|
|
6
8
|
import type { ReadonlyTrueStore } from '../Store/makeStore.js';
|
|
@@ -78,26 +80,39 @@ export type PipelineStageResult<X, Name extends keyof StagesOf<X> = never> = Rec
|
|
|
78
80
|
export type PipelineStageContext<X, Name extends keyof StagesOf<X> = never> = RecordOf<X, Name> extends StageRecord<any, infer C> ? (C extends object ? C : Nothing) : never;
|
|
79
81
|
type Process<Req, Previous, X, G = never> = (reqRes: Req | null, previous: Previous, allRoutesData: G) => MaybePromise<X>;
|
|
80
82
|
export type SerializableData<G> = G extends object ? Serializable<G> : never;
|
|
81
|
-
export type AllRoutesDataProcess<Req, I, G> = (reqRes: Req | null, init: I) => MaybePromise<G & SerializableData<NoInfer<G
|
|
83
|
+
export type AllRoutesDataProcess<Req, I, G> = (reqRes: Req | null, init: I, location: string) => MaybePromise<(G & SerializableData<NoInfer<G>>) | DataRedirect>;
|
|
84
|
+
export type AllRoutesDataFallback<Req, I, G> = NoInfer<G> | ((reqRes: Req | null, init: I, location: string, error: unknown) => MaybePromise<NoInfer<G> | DataRedirect>);
|
|
82
85
|
type RoutesFunction<Req, I, G extends object | undefined> = (reqRes: Req | null, init: I) => RoutesWithSettings<G> | RoutesArray<G> | [];
|
|
86
|
+
type HasErrorRoute<Rs> = Rs extends readonly unknown[] ? (number extends Rs['length'] ? true : ('error' extends PathOf<Rs[number]> ? true : false)) : ('error' extends keyof Rs ? true : false);
|
|
87
|
+
type PathOf<E> = E extends {
|
|
88
|
+
path: infer P;
|
|
89
|
+
} ? P : never;
|
|
90
|
+
type ReturnedRoutes<R> = R extends (...args: never[]) => infer Rs ? Rs : R;
|
|
91
|
+
export type RequireErrorRoute<R> = true extends HasErrorRoute<ReturnedRoutes<R>> ? unknown : 'A pipeline needs an \'error\' route: a failed request renders it.';
|
|
83
92
|
type Routes<Req, I, Ctx, N, G extends object | undefined> = {
|
|
84
|
-
<const R extends RoutesFunction<Req, I, G>>(routes: R & NoDuplicatePaths<R>): PipelineApp<R, DeliveredContext<Ctx>, N, G>;
|
|
85
|
-
<const R extends RoutesFunction<Req, I, G>>(options: RoutesOptions, routes: R & NoDuplicatePaths<R>): PipelineApp<R, DeliveredContext<Ctx>, N, G>;
|
|
93
|
+
<const R extends RoutesFunction<Req, I, G>>(routes: R & NoDuplicatePaths<R> & RequireErrorRoute<R>): PipelineApp<R, DeliveredContext<Ctx>, N, G>;
|
|
94
|
+
<const R extends RoutesFunction<Req, I, G>>(options: RoutesOptions, routes: R & NoDuplicatePaths<R> & RequireErrorRoute<R>): PipelineApp<R, DeliveredContext<Ctx>, N, G>;
|
|
86
95
|
};
|
|
87
|
-
export type
|
|
96
|
+
export type ErrorPageComponent<ECtx, EN, G extends object | undefined> = PipelineSimpleComponent<ECtx, EN, G | undefined, TungstenErrorInfo>;
|
|
97
|
+
export type ErrorPageClass<ECtx, EN, G extends object | undefined> = abstract new (pkg: ConstructPackage<TungstenErrorInfo, undefined>) => ErrorPageComponent<ECtx, EN, G>;
|
|
98
|
+
export type RoutesStage<Req, I, Ctx, N, G extends object | undefined, ECtx, EN> = PipelineComponents<Ctx, N, G> & {
|
|
99
|
+
ErrorComponent: ErrorPageClass<ECtx, EN, G> & Statics<typeof PipelineSimpleComponent>;
|
|
88
100
|
routes: Routes<Req, I, Ctx, N, G>;
|
|
89
101
|
};
|
|
102
|
+
export type PostStage<Req, I, Ctx, N, G extends object | undefined, ECtx = I, EN = Nothing> = RoutesStage<Req, I, Ctx, N, G, ECtx, EN> & {
|
|
103
|
+
errorPage: (page: ErrorPageClass<ECtx, EN, G>) => RoutesStage<Req, I, Ctx, N, G, ECtx, EN>;
|
|
104
|
+
};
|
|
90
105
|
export type DataStage<Req, I, G extends object | undefined> = PostStage<Req, I, I, Nothing, G> & {
|
|
91
106
|
post: <P extends StageContext, This>(this: This, process: Process<Req, I, P, G>) => PostStage<Req, I, P, Nothing, G> & StageMark<This, 'post', P, P>;
|
|
92
107
|
};
|
|
93
108
|
export type InitStage<Req, I> = DataStage<Req, I, undefined> & {
|
|
94
|
-
allRoutesData: <G extends object, This>(this: This, process: AllRoutesDataProcess<Req, I, G>) => DataStage<Req, I, G> & StageMark<This, 'allRoutesData', G, I>;
|
|
109
|
+
allRoutesData: <G extends object, This>(this: This, process: AllRoutesDataProcess<Req, I, G>, fallback?: AllRoutesDataFallback<Req, I, G>) => DataStage<Req, I, G> & StageMark<This, 'allRoutesData', G, I>;
|
|
95
110
|
};
|
|
96
111
|
export type ServerStage<Req> = InitStage<Req, undefined> & {
|
|
97
112
|
init: <I extends StageContext | undefined, This>(this: This, process: Process<Req, undefined, I>) => InitStage<Req, I> & StageMark<This, 'init', I, I>;
|
|
98
113
|
};
|
|
99
114
|
export declare const loosely: <T>(process: unknown) => T;
|
|
100
|
-
export declare function postStage<Req, I, Ctx, N, G extends object | undefined>(definition: PipelineDefinition): PostStage<Req, I, Ctx, N, G>;
|
|
115
|
+
export declare function postStage<Req, I, Ctx, N, G extends object | undefined, ECtx = I, EN = Nothing>(definition: PipelineDefinition): PostStage<Req, I, Ctx, N, G, ECtx, EN>;
|
|
101
116
|
export declare function checkServer(builder: string, lib: ServerKind): void;
|
|
102
117
|
export type PipelineBuilder = {
|
|
103
118
|
server: <Kind extends ServerKind>(kind: Kind) => ServerStage<ServerRequests[Kind]>;
|
|
@@ -62,12 +62,22 @@ function makeApp(definition, args) {
|
|
|
62
62
|
[$pipelineApp]: true
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
|
-
|
|
65
|
+
function routesStage(definition) {
|
|
66
66
|
return {
|
|
67
67
|
...pipelineComponents,
|
|
68
|
+
ErrorComponent: PipelineSimpleComponent,
|
|
68
69
|
routes: (...args) => makeApp(definition, args)
|
|
69
70
|
};
|
|
70
71
|
}
|
|
72
|
+
export function postStage(definition) {
|
|
73
|
+
return {
|
|
74
|
+
...routesStage(definition),
|
|
75
|
+
errorPage: page => routesStage({
|
|
76
|
+
...definition,
|
|
77
|
+
errorPage: loosely(page)
|
|
78
|
+
})
|
|
79
|
+
};
|
|
80
|
+
}
|
|
71
81
|
function dataStage(definition) {
|
|
72
82
|
return {
|
|
73
83
|
...postStage(definition),
|
|
@@ -80,9 +90,10 @@ function dataStage(definition) {
|
|
|
80
90
|
function initStage(definition) {
|
|
81
91
|
return {
|
|
82
92
|
...dataStage(definition),
|
|
83
|
-
allRoutesData: process => dataStage({
|
|
93
|
+
allRoutesData: (process, fallback) => dataStage({
|
|
84
94
|
...definition,
|
|
85
|
-
allRoutesData: loosely(process)
|
|
95
|
+
allRoutesData: loosely(process),
|
|
96
|
+
allRoutesDataFallback: loosely(fallback)
|
|
86
97
|
})
|
|
87
98
|
};
|
|
88
99
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { AnyComponentType } from '../AnyComponentType.js';
|
|
1
2
|
import type { RouteCacheControl } from '../cacheControl.js';
|
|
2
3
|
import type { ReqRes } from '../ReqRes.js';
|
|
3
4
|
import type { MatchedRouteInfo } from '../routing/MatchedRouteInfo.js';
|
|
@@ -18,7 +19,7 @@ export type SplitResult = {
|
|
|
18
19
|
export type RegisteredServerInit = (reqRes: unknown) => MaybePromise<SplitResult | undefined>;
|
|
19
20
|
export type RegisteredServerPost = (reqRes: unknown, init: SplitResult | undefined, allRoutesData: AllRoutesDataConstraint) => MaybePromise<SplitResult | undefined>;
|
|
20
21
|
export type RegisteredClientInit = (networked: object) => MaybePromise<SplitResult | undefined>;
|
|
21
|
-
export type RegisteredClientAllRoutesData = (init: SplitResult | undefined) => MaybePromise<object>;
|
|
22
|
+
export type RegisteredClientAllRoutesData = (init: SplitResult | undefined, location: string) => MaybePromise<object>;
|
|
22
23
|
export type RegisteredClientPost = (init: SplitResult | undefined, allRoutesData: AllRoutesDataConstraint) => MaybePromise<SplitResult | undefined>;
|
|
23
24
|
export type ClientRoute = {
|
|
24
25
|
key: RouteKey | null;
|
|
@@ -33,7 +34,8 @@ export type ClientStarted = {
|
|
|
33
34
|
init: StageContext | undefined;
|
|
34
35
|
routingContext: object;
|
|
35
36
|
routingNetworkedData: object;
|
|
36
|
-
allRoutesData: (() => MaybePromise<object>) | undefined;
|
|
37
|
+
allRoutesData: ((location: string) => MaybePromise<object>) | undefined;
|
|
38
|
+
allRoutesDataFallback: ((location: string, error: unknown) => Promise<object>) | undefined;
|
|
37
39
|
networked: object;
|
|
38
40
|
post: (allRoutesData: AllRoutesDataConstraint) => Promise<ClientPosted>;
|
|
39
41
|
};
|
|
@@ -42,7 +44,10 @@ export type ClientPosted = {
|
|
|
42
44
|
afterRouting: ((route: ClientRoute, allRoutesData: AllRoutesDataConstraint) => Promise<object>) | undefined;
|
|
43
45
|
};
|
|
44
46
|
export type RegisteredRoutes = (reqRes: unknown, init: StageContext | undefined) => unknown;
|
|
45
|
-
export type RegisteredAllRoutesData = (reqRes: unknown, init: StageContext | undefined) => MaybePromise<object>;
|
|
47
|
+
export type RegisteredAllRoutesData = (reqRes: unknown, init: StageContext | undefined, location: string) => MaybePromise<object>;
|
|
48
|
+
export type RegisteredAllRoutesDataFallback = object | ((reqRes: unknown, init: StageContext | undefined, location: string, error: unknown) => MaybePromise<object>);
|
|
49
|
+
export type RegisteredClientAllRoutesDataFallback = object | ((init: SplitResult | undefined, location: string, error: unknown) => MaybePromise<object>);
|
|
50
|
+
export declare const isFallbackFunction: <F extends object>(fallback: F) => fallback is Extract<F, (...args: never[]) => unknown>;
|
|
46
51
|
export type RoutesOptions = {
|
|
47
52
|
cacheControl?: RouteCacheControl;
|
|
48
53
|
};
|
|
@@ -52,13 +57,16 @@ export type PipelineDefinition = {
|
|
|
52
57
|
client: ClientRun;
|
|
53
58
|
init?: RegisteredStage;
|
|
54
59
|
allRoutesData?: RegisteredAllRoutesData;
|
|
60
|
+
allRoutesDataFallback?: RegisteredAllRoutesDataFallback | undefined;
|
|
55
61
|
post?: RegisteredStage;
|
|
56
62
|
serverInit?: RegisteredServerInit;
|
|
57
63
|
serverPost?: RegisteredServerPost;
|
|
58
64
|
clientInit?: RegisteredClientInit;
|
|
59
65
|
clientAllRoutesData?: RegisteredClientAllRoutesData;
|
|
66
|
+
clientAllRoutesDataFallback?: RegisteredClientAllRoutesDataFallback | undefined;
|
|
60
67
|
clientPost?: RegisteredClientPost;
|
|
61
68
|
clientAfterRouting?: RegisteredClientAfterRouting;
|
|
69
|
+
errorPage?: AnyComponentType;
|
|
62
70
|
};
|
|
63
71
|
export declare const $pipelineApp: unique symbol;
|
|
64
72
|
declare const $appTypes: unique symbol;
|
|
@@ -4,6 +4,8 @@ export const clientRoute = (matched, location) => ({
|
|
|
4
4
|
data: matched.data,
|
|
5
5
|
location
|
|
6
6
|
});
|
|
7
|
+
// a fallback is a G, which is serializable, or a function making one
|
|
8
|
+
export const isFallbackFunction = fallback => typeof fallback === 'function';
|
|
7
9
|
export const $pipelineApp = Symbol('tungsten pipeline app');
|
|
8
10
|
export const isPipelineApp = value => typeof value === 'object' && value !== null && $pipelineApp in value;
|
|
9
11
|
// the routes function as the runners call it
|
|
@@ -3,27 +3,37 @@ import type { MatchedRouteInfo } from '../routing/MatchedRouteInfo.js';
|
|
|
3
3
|
import type { RoutesWithSettings } from '../routing/Routes.js';
|
|
4
4
|
import type { ServerDataLoading } from '../Store/ServerDataLoading.js';
|
|
5
5
|
import type { InstancePipeline } from '../Instance/Instance.js';
|
|
6
|
-
import type { AllRoutesDataConstraint, ClientPosted, ClientStarted, PipelineApp, StageContext } from './pipelineDefinition.js';
|
|
6
|
+
import type { AllRoutesDataConstraint, ClientPosted, ClientStarted, PipelineApp, RegisteredAllRoutesDataFallback, StageContext } from './pipelineDefinition.js';
|
|
7
7
|
export type PipelineRouted = {
|
|
8
8
|
init: StageContext | undefined;
|
|
9
9
|
routes: RoutesWithSettings<any>;
|
|
10
10
|
allRoutesData: AllRoutesDataConstraint;
|
|
11
11
|
matchedRouteInfo: MatchedRouteInfo;
|
|
12
|
+
recoveredFrom?: unknown;
|
|
13
|
+
};
|
|
14
|
+
export type RequestProgress = {
|
|
15
|
+
init?: {
|
|
16
|
+
value: StageContext | undefined;
|
|
17
|
+
};
|
|
18
|
+
allRoutesData?: unknown;
|
|
19
|
+
failedSteps?: string[];
|
|
12
20
|
};
|
|
13
21
|
export type ServerRunner = {
|
|
14
|
-
route: (app: PipelineApp, reqRes: unknown, location: string, serverDataLoading: ServerDataLoading | null, dev: boolean) => Promise<PipelineRouted>;
|
|
22
|
+
route: (app: PipelineApp, reqRes: unknown, location: string, serverDataLoading: ServerDataLoading | null, dev: boolean, progress?: RequestProgress) => Promise<PipelineRouted>;
|
|
15
23
|
post: (app: PipelineApp, reqRes: unknown, init: StageContext | undefined, allRoutesData: AllRoutesDataConstraint) => Promise<StageContext | undefined>;
|
|
16
24
|
context: (init: StageContext | undefined, post: StageContext | undefined) => object;
|
|
17
25
|
networked: (init: StageContext | undefined, post: StageContext | undefined) => object | undefined;
|
|
18
26
|
};
|
|
27
|
+
export declare function runStep<T>(progress: RequestProgress, step: string, run: () => T | Promise<T>): Promise<T>;
|
|
19
28
|
export declare function pipelineRoutes(app: PipelineApp, reqRes: unknown, init: StageContext | undefined, dev: boolean): RoutesWithSettings<any>;
|
|
20
|
-
export declare function routeWithPipeline(app: PipelineApp, reqRes: unknown, location: string, serverDataLoading: ServerDataLoading | null, dev: boolean): Promise<PipelineRouted>;
|
|
21
|
-
export declare function routeAfterInit(app: PipelineApp, reqRes: unknown, location: string, serverDataLoading: ServerDataLoading | null, dev: boolean, init: StageContext | undefined, context: object | undefined, networked: object | undefined): Promise<PipelineRouted>;
|
|
22
29
|
export declare const routingContext: (context: object | undefined) => BrandedContext;
|
|
23
30
|
export declare const routingNetworkedData: (networked: object | undefined) => BrandedNetworkedData;
|
|
24
|
-
export declare
|
|
31
|
+
export declare function routeWithPipeline(app: PipelineApp, reqRes: unknown, location: string, serverDataLoading: ServerDataLoading | null, dev: boolean, progress?: RequestProgress): Promise<PipelineRouted>;
|
|
32
|
+
export declare function routeAfterInit(app: PipelineApp, reqRes: unknown, location: string, serverDataLoading: ServerDataLoading | null, dev: boolean, init: StageContext | undefined, context: object | undefined, networked: object | undefined, progress?: RequestProgress): Promise<PipelineRouted>;
|
|
33
|
+
export declare function fromFallback(fallback: RegisteredAllRoutesDataFallback, reqRes: unknown, init: StageContext | undefined, location: string, error: unknown): Promise<object>;
|
|
25
34
|
export declare function runPost(app: PipelineApp, reqRes: unknown, init: StageContext | undefined, allRoutesData: AllRoutesDataConstraint): Promise<StageContext | undefined>;
|
|
26
35
|
export declare const pipelineContext: (init: StageContext | undefined, post: StageContext | undefined) => object;
|
|
27
36
|
export declare const symmetricServer: ServerRunner;
|
|
28
37
|
export declare function runClientPipeline(app: PipelineApp): Promise<ClientStarted>;
|
|
38
|
+
export declare const afterRoutingFor: (run: ClientPosted['afterRouting']) => InstancePipeline['afterRouting'];
|
|
29
39
|
//# sourceMappingURL=runPipeline.d.ts.map
|
|
@@ -1,8 +1,23 @@
|
|
|
1
1
|
import { $cacheControl } from '../cacheControl.js';
|
|
2
2
|
import { routing } from "../Servers/routing.js";
|
|
3
3
|
import { toRoutes } from '../routing/routesArray.js';
|
|
4
|
-
import {
|
|
5
|
-
|
|
4
|
+
import { makeTungstenErrorInfo } from '../routing/TungstenErrorInfo.js';
|
|
5
|
+
import { appRoutesFunction, isFallbackFunction } from './pipelineDefinition.js';
|
|
6
|
+
import { settleRouting } from './settleRouting.js';
|
|
7
|
+
// ---- steps ------------------------------------------------------------------
|
|
8
|
+
// Runs one step of a request. If it throws, the step's name is added to progress.failedSteps and
|
|
9
|
+
// the error goes on as before
|
|
10
|
+
export async function runStep(progress, step, run) {
|
|
11
|
+
try {
|
|
12
|
+
return await run();
|
|
13
|
+
} catch (e) {
|
|
14
|
+
(progress.failedSteps ??= []).push(step);
|
|
15
|
+
throw e;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
// ---- routes -----------------------------------------------------------------
|
|
19
|
+
// The app's routes as the router reads them. The routes function gets Init's result; the routes
|
|
20
|
+
// options (cacheControl) go where the object form keeps its settings
|
|
6
21
|
export function pipelineRoutes(app, reqRes, init, dev) {
|
|
7
22
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- typed by the stage
|
|
8
23
|
const returned = appRoutesFunction(app)(reqRes, init);
|
|
@@ -13,59 +28,86 @@ export function pipelineRoutes(app, reqRes, init, dev) {
|
|
|
13
28
|
[$cacheControl]: cacheControl
|
|
14
29
|
} : routes;
|
|
15
30
|
}
|
|
16
|
-
//
|
|
17
|
-
//
|
|
18
|
-
export
|
|
19
|
-
|
|
20
|
-
|
|
31
|
+
// the context and networked data as the route data functions receive them, branded
|
|
32
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
|
33
|
+
export const routingContext = context => context ?? {};
|
|
34
|
+
export const routingNetworkedData = networked => networked ?? {}; // eslint-disable-line @typescript-eslint/no-unsafe-type-assertion
|
|
35
|
+
// ---- on the server ----------------------------------------------------------
|
|
36
|
+
// Init, then routing. Here Init's result is the context the route data functions get
|
|
37
|
+
export async function routeWithPipeline(app, reqRes, location, serverDataLoading, dev, progress = {}) {
|
|
38
|
+
const init = await runStep(progress, 'Init', () => app.init?.(reqRes, undefined));
|
|
39
|
+
progress.init = {
|
|
40
|
+
value: init
|
|
41
|
+
};
|
|
42
|
+
return routeAfterInit(app, reqRes, location, serverDataLoading, dev, init, init, undefined, progress);
|
|
21
43
|
}
|
|
22
|
-
// the
|
|
23
|
-
|
|
44
|
+
// Routing, with the all-routes data fetched at the same time, as the classic global data is. Both
|
|
45
|
+
// pipelines use it: `context` and `networked` are what the route data functions get (the split
|
|
46
|
+
// pipeline passes Init's two halves)
|
|
47
|
+
export async function routeAfterInit(app, reqRes, location, serverDataLoading, dev, init, context, networked, progress = {}) {
|
|
24
48
|
const routes = pipelineRoutes(app, reqRes, init, dev);
|
|
25
|
-
const
|
|
49
|
+
const getAllRoutesData = app.allRoutesData;
|
|
50
|
+
const fallback = app.allRoutesDataFallback;
|
|
51
|
+
// what arrived, for the error page if a later step fails
|
|
52
|
+
const arrived = data => {
|
|
53
|
+
progress.allRoutesData = data;
|
|
54
|
+
return data;
|
|
55
|
+
};
|
|
56
|
+
const settled = await settleRouting(routes, async () => runStep(progress, 'routing', async () => routing(location, routes, routingContext(context), routingNetworkedData(networked), serverDataLoading)), getAllRoutesData && (async () => runStep(progress, 'all-routes data', async () => arrived(await getAllRoutesData(reqRes, init, location)))), fallback && (async error => runStep(progress, 'all-routes data fallback', async () => arrived(await fromFallback(fallback, reqRes, init, location, error)))), dev ? makeTungstenErrorInfo : serverErrorInfo);
|
|
57
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- the stage typed it
|
|
58
|
+
const allRoutesData = settled.allRoutesData;
|
|
26
59
|
return {
|
|
27
60
|
init,
|
|
28
61
|
routes,
|
|
29
|
-
|
|
30
|
-
|
|
62
|
+
...settled,
|
|
63
|
+
allRoutesData
|
|
31
64
|
};
|
|
32
65
|
}
|
|
33
|
-
// the
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
66
|
+
// in prod the error route is handed a generic message: the error's own stays on the server
|
|
67
|
+
const serverErrorInfo = error => ({
|
|
68
|
+
error,
|
|
69
|
+
message: 'server error'
|
|
70
|
+
});
|
|
71
|
+
// the app's fallback for a failed all-routes data: a value as given, or what its function makes of
|
|
72
|
+
// what the all-routes data function was handed, and the error
|
|
73
|
+
export async function fromFallback(fallback, reqRes, init, location, error) {
|
|
74
|
+
return isFallbackFunction(fallback) ? fallback(reqRes, init, location, error) : fallback;
|
|
75
|
+
}
|
|
76
|
+
// Post, after routing. Not run for a redirect
|
|
43
77
|
export async function runPost(app, reqRes, init, allRoutesData) {
|
|
44
78
|
return app.post?.(reqRes, init, allRoutesData);
|
|
45
79
|
}
|
|
46
|
-
//
|
|
80
|
+
// the components' context: Post's, or Init's when there is no Post
|
|
47
81
|
export const pipelineContext = (init, post) => post ?? init ?? {};
|
|
48
|
-
//
|
|
82
|
+
// the pipeline's ServerRunner; it writes no networked data into the page
|
|
49
83
|
export const symmetricServer = {
|
|
50
84
|
route: routeWithPipeline,
|
|
51
85
|
post: runPost,
|
|
52
86
|
context: pipelineContext,
|
|
53
87
|
networked: () => undefined
|
|
54
88
|
};
|
|
55
|
-
//
|
|
56
|
-
//
|
|
89
|
+
// ---- in the browser ---------------------------------------------------------
|
|
90
|
+
// For hydration: the same stages, with null for the request. Post waits for the all-routes data
|
|
91
|
+
// hydration hands it; the all-routes data function is kept to run again before each navigation
|
|
57
92
|
export async function runClientPipeline(app) {
|
|
58
93
|
const init = await app.init?.(null, undefined);
|
|
59
|
-
const
|
|
94
|
+
const getAllRoutesData = app.allRoutesData;
|
|
95
|
+
const fallback = app.allRoutesDataFallback;
|
|
60
96
|
return {
|
|
61
97
|
init,
|
|
62
98
|
routingContext: init ?? {},
|
|
63
99
|
routingNetworkedData: {},
|
|
64
|
-
allRoutesData:
|
|
100
|
+
allRoutesData: getAllRoutesData && (location => getAllRoutesData(null, init, location)),
|
|
101
|
+
allRoutesDataFallback: fallback && (async (location, error) => fromFallback(fallback, null, init, location, error)),
|
|
65
102
|
networked: {},
|
|
66
103
|
post: async allRoutesData => ({
|
|
67
104
|
context: pipelineContext(init, await app.post?.(null, init, allRoutesData)),
|
|
68
105
|
afterRouting: undefined
|
|
69
106
|
})
|
|
70
107
|
};
|
|
71
|
-
}
|
|
108
|
+
}
|
|
109
|
+
// the split pipeline's clientAfterRouting, in the form the instance calls after each navigation
|
|
110
|
+
export const afterRoutingFor = run => {
|
|
111
|
+
if (run === undefined) return undefined;
|
|
112
|
+
return async (route, allRoutesData) => await run(route, allRoutesData); // eslint-disable-line @typescript-eslint/no-unsafe-type-assertion
|
|
113
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ServerDataLoading } from '../Store/ServerDataLoading.js';
|
|
2
2
|
import type { AllRoutesDataConstraint, ClientStarted, PipelineApp, SplitResult } from './pipelineDefinition.js';
|
|
3
|
-
import type { PipelineRouted, ServerRunner } from './runPipeline.js';
|
|
4
|
-
export declare function routeWithSplitPipeline(app: PipelineApp, reqRes: unknown, location: string, serverDataLoading: ServerDataLoading | null, dev: boolean): Promise<PipelineRouted>;
|
|
3
|
+
import type { PipelineRouted, RequestProgress, ServerRunner } from './runPipeline.js';
|
|
4
|
+
export declare function routeWithSplitPipeline(app: PipelineApp, reqRes: unknown, location: string, serverDataLoading: ServerDataLoading | null, dev: boolean, progress?: RequestProgress): Promise<PipelineRouted>;
|
|
5
5
|
export declare function runServerPost(app: PipelineApp, reqRes: unknown, init: object | undefined, allRoutesData: AllRoutesDataConstraint): Promise<SplitResult | undefined>;
|
|
6
6
|
export declare const splitContext: (init: object | undefined, post: object | undefined) => object;
|
|
7
7
|
export declare const splitNetworked: (init: object | undefined, post: object | undefined) => object | undefined;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { fromTransport } from './networkedTransport.js';
|
|
2
|
-
import {
|
|
2
|
+
import { isFallbackFunction } from './pipelineDefinition.js';
|
|
3
|
+
import { routeAfterInit, runStep } from './runPipeline.js';
|
|
3
4
|
/*
|
|
4
5
|
* Runs a split pipeline app: serverInit -> routing -> serverPost on the server, clientInit ->
|
|
5
6
|
* routing -> clientPost in the browser. The route data functions are handed Init's context and
|
|
@@ -7,9 +8,12 @@ import { routeAfterInit } from './runPipeline.js';
|
|
|
7
8
|
*/
|
|
8
9
|
// The stages' results. The app holds them loosely, as the builder typed them
|
|
9
10
|
const asSplit = stage => stage;
|
|
10
|
-
export async function routeWithSplitPipeline(app, reqRes, location, serverDataLoading, dev) {
|
|
11
|
-
const init = await app.serverInit?.(reqRes);
|
|
12
|
-
|
|
11
|
+
export async function routeWithSplitPipeline(app, reqRes, location, serverDataLoading, dev, progress = {}) {
|
|
12
|
+
const init = await runStep(progress, 'serverInit', () => app.serverInit?.(reqRes));
|
|
13
|
+
progress.init = {
|
|
14
|
+
value: init
|
|
15
|
+
};
|
|
16
|
+
return routeAfterInit(app, reqRes, location, serverDataLoading, dev, init, init?.context, init?.networked, progress);
|
|
13
17
|
}
|
|
14
18
|
// after routing, and not at all for a redirect
|
|
15
19
|
export async function runServerPost(app, reqRes, init, allRoutesData) {
|
|
@@ -33,11 +37,13 @@ export async function runSplitClient(app, fromPage) {
|
|
|
33
37
|
const networked = fromTransport(fromPage) ?? {};
|
|
34
38
|
const init = await app.clientInit?.(networked);
|
|
35
39
|
const registered = app.clientAllRoutesData;
|
|
40
|
+
const fallback = app.clientAllRoutesDataFallback;
|
|
36
41
|
return {
|
|
37
42
|
init,
|
|
38
43
|
routingContext: init?.context ?? {},
|
|
39
44
|
routingNetworkedData: init?.networked ?? {},
|
|
40
|
-
allRoutesData: registered && (
|
|
45
|
+
allRoutesData: registered && (location => registered(init, location)),
|
|
46
|
+
allRoutesDataFallback: fallback && (async (location, error) => isFallbackFunction(fallback) ? fallback(init, location, error) : fallback),
|
|
41
47
|
networked,
|
|
42
48
|
post: async allRoutesData => {
|
|
43
49
|
const context = splitContext(init, await app.clientPost?.(init, allRoutesData));
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { MatchedRouteInfo } from '../routing/MatchedRouteInfo.js';
|
|
2
|
+
import type { Routes } from '../routing/Routes.js';
|
|
3
|
+
import type { TungstenErrorInfo } from '../routing/TungstenErrorInfo.js';
|
|
4
|
+
export type Settled = {
|
|
5
|
+
allRoutesData: unknown;
|
|
6
|
+
matchedRouteInfo: MatchedRouteInfo;
|
|
7
|
+
recoveredFrom?: unknown;
|
|
8
|
+
};
|
|
9
|
+
export declare function settleRouting(routes: Routes<any>, route: () => Promise<MatchedRouteInfo>, loadData: (() => Promise<unknown>) | undefined, fallback: ((error: unknown) => Promise<unknown>) | undefined, errorInfo: (error: unknown) => TungstenErrorInfo): Promise<Settled>;
|
|
10
|
+
//# sourceMappingURL=settleRouting.d.ts.map
|