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
package/AGENTS.md
CHANGED
|
@@ -87,7 +87,8 @@ Two consequences that cause real bugs:
|
|
|
87
87
|
| `clientDirs` / `clientPatterns` | Sources the browser pipeline compiles. Unset, everything. |
|
|
88
88
|
| `rawDirs` / `rawPatterns` | Sources the node pipeline compiles (types stripped, imports untouched) — server middleware and the like. Unset, nothing. |
|
|
89
89
|
| `ignoreDirs` / `ignorePatterns` | Sources neither pipeline compiles. No default. Each pipeline compiles its selection **and not** these, so an ignored folder cannot be selected back in. `ignoreDirs: ['server']` suits an app whose own build emits its server code; to have Tungsten compile the server, narrow `clientDirs` and select it in `rawDirs` instead. |
|
|
90
|
-
| `serverMiddleware` | `[file, exportName, mountPath]` — Express handlers mounted on Tungsten's own server, so a frontend and an API can share one process. Loaded from the raw pipeline's output when the file is in `rawDirs`, otherwise from `codeDir`. |
|
|
90
|
+
| `serverMiddleware` | `[file, exportName, mountPath]` — Express handlers mounted on Tungsten's own server, so a frontend and an API can share one process. Loaded from the raw pipeline's output when the file is in `rawDirs`, otherwise from `codeDir`. In dev (unreleased) it is loaded once and reloaded when a `.js` file under `codeDir` changes, not on every request — so module-level state lasts until the next edit, as in prod. |
|
|
91
|
+
| `serverIgnoreDirs` / `serverIgnorePatterns` | Dev: files under `codeDir` whose changes don't reload `serverMiddleware`, in the shapes of `ignoreDirs` / `ignorePatterns`. Test files never do. No default; e.g. `serverIgnoreDirs: ['client']`. |
|
|
91
92
|
| `defaultCacheControl` | The `Cache-Control` of prod pages that set none themselves (see [Page caching](#page-caching)). Unset, pages are sent without one. |
|
|
92
93
|
| `serverSideRouting` | 0.7.1+. Unset is `true`. `false`: the server runs none of the app's code for a page. It does no routing and fetches no data, and sends the same stub for every URL (status 200): the root component's `<html>`, `<head>` and `<body>` with nothing in them. The client then fetches the global data (or the pipeline's all-routes data) beside its first routing, with the route data, and builds the head and body. A pipeline app runs, in order: `clientInit`/`init`, then the all-routes data beside routing, then `clientPost`/`post`, then `clientAfterRouting`. A route data redirect is followed on the client before anything is built. Turns `csr` on, and needs a root component. The root's own `content` still runs on the server, and registered stores are built there with an empty context, so neither may depend on the data. Static generation writes the stub for each listed route; routes found only by following links are not found. |
|
|
93
94
|
|
|
@@ -109,6 +110,28 @@ This is correct and intentional. Do not "fix" it to `.tsx`/`.ts` or extensionles
|
|
|
109
110
|
Typical scripts: `dev` = `tsc --watch` alongside `tungsten dev`; `build` = `tsc && tungsten build`;
|
|
110
111
|
`start` = `tungsten start`.
|
|
111
112
|
|
|
113
|
+
### TightScript declarations (unreleased)
|
|
114
|
+
|
|
115
|
+
Tungsten also ships declarations written for TightScript, the TypeScript fork with permission
|
|
116
|
+
modifiers (`rw`, `exact`, `owned`, …). The runtime code is the same either way; only the types
|
|
117
|
+
differ. An app compiled with the fork opts in through an export condition in its `tsconfig.json`:
|
|
118
|
+
|
|
119
|
+
```jsonc
|
|
120
|
+
"compilerOptions": {
|
|
121
|
+
"customConditions": ["tightscript"],
|
|
122
|
+
"permissionModifiers": true,
|
|
123
|
+
"permissionDefaults": "read" // the default; tungsten's declarations are written for it
|
|
124
|
+
}
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Without the condition, an app gets the stock TypeScript declarations, which is what stock `tsc`
|
|
128
|
+
needs: it can't parse TightScript's modifiers. TightScript's global declarations are
|
|
129
|
+
`tungsten/types-ti/*`, used alongside `tungsten/types/*`.
|
|
130
|
+
|
|
131
|
+
Under these declarations tungsten asks for write permission where it writes. For example, an object
|
|
132
|
+
bound to an input must be writable (`rw`), so a form object declared read-only is refused at the
|
|
133
|
+
`bind`.
|
|
134
|
+
|
|
112
135
|
## Components
|
|
113
136
|
|
|
114
137
|
Base classes, exported from `tungsten` with both a long and a short name
|
|
@@ -164,7 +187,9 @@ export class Greeting extends StatefulComponent<Props, State> {
|
|
|
164
187
|
page components** — the last call wins, so a nested component setting it will fight the page.
|
|
165
188
|
- `this.tungsten` holds framework helpers bound to the component (0.7.1+):
|
|
166
189
|
`this.tungsten.getRoutes()` gives the app's routes as this request resolved them (the function
|
|
167
|
-
form called for you), for rendering nav
|
|
190
|
+
form called for you), for rendering nav. Name their type to read their fields:
|
|
191
|
+
`getRoutes<typeof routes>()` (unreleased; unchecked beyond being routes, so name the app's own,
|
|
192
|
+
with `import type`). `this.tungsten.fileUrl('/logo.png')` gives a site
|
|
168
193
|
file's URL with its cache-busting version (see **Styling**). `this.tungsten.instance` is this
|
|
169
194
|
component's instance — the same object as `this.__instance`, under a name that is part of the
|
|
170
195
|
API rather than a convention.
|
|
@@ -185,7 +210,8 @@ Each hook has a React-style name and a short alias:
|
|
|
185
210
|
| `componentDidUnmount` | `_deleted` | |
|
|
186
211
|
|
|
187
212
|
Put browser-only work (`window`, `location`, `localStorage`) in `clientInit` or a later client
|
|
188
|
-
hook — never unguarded in `init`, route code, or `content`.
|
|
213
|
+
hook — never unguarded in `init`, route code, or `content`. A browser-only value the *first render*
|
|
214
|
+
needs (a stored theme) goes through `DocInit()` instead — see **Inline scripts and styles**.
|
|
189
215
|
|
|
190
216
|
Other instance members worth knowing: `this.props`, `this.routeParams`, `this.routeData`,
|
|
191
217
|
`this.globalData`, `this.triggerUpdate()` (manual re-render),
|
|
@@ -322,6 +348,13 @@ export const getRoutes = (reqRes: ReqResOrNull) => [
|
|
|
322
348
|
|
|
323
349
|
`routesWith<Rule>()` takes the routes as separate arguments and returns them keyed by path; its
|
|
324
350
|
rule applies to every route, `'404'` included.
|
|
351
|
+
- **`makeRouteWith<Rule>()`** (unreleased) returns a `route()` that requires the rule's fields, so
|
|
352
|
+
a route missing one is flagged by itself instead of marking the whole list:
|
|
353
|
+
|
|
354
|
+
```tsx
|
|
355
|
+
const appRoute = makeRouteWith<{ name: string }>()
|
|
356
|
+
appRoute({ path: '/', name: 'Home', content: <Home /> })
|
|
357
|
+
```
|
|
325
358
|
|
|
326
359
|
### Path parameters
|
|
327
360
|
|
|
@@ -373,7 +406,59 @@ Type params with `Params<'id'>` or `ParamsFromPath<'/things/:id'>`.
|
|
|
373
406
|
- From a `data` function, **return** `new RoutingRedirect(path)` (in-app) or
|
|
374
407
|
`new WebRedirect(url)` (full browser redirect) instead of data. `RedirectCode` sets the status.
|
|
375
408
|
- As content, render `<RouteRedirectComponent to="/path" />`.
|
|
409
|
+
- Both in-app forms redirect under `siteBasePath` on the server, as `goto()` does (unreleased;
|
|
410
|
+
before, the server sent the bare route path).
|
|
411
|
+
- Global data — classic `globalData` and the pipeline's all-routes data, on either side of a split
|
|
412
|
+
pipeline — may return the same redirects (unreleased). It wins over the route's redirect, and Post
|
|
413
|
+
does not run. It is handed the location (route path plus query) as its last argument, since no
|
|
414
|
+
route has matched yet: check it, or a redirect to `/login` redirects `/login` again.
|
|
376
415
|
- `<MatchedRoute />` renders the active route; it belongs in the root component's `<body>`.
|
|
416
|
+
- **A pipeline recovers to its `'error'` route** (unreleased): the route renders in the root,
|
|
417
|
+
with status 500 and `Cache-Control: no-store`, and the app keeps running. `.routes()` requires
|
|
418
|
+
one, as routing can always fail (a type error, for a returned tuple or object):
|
|
419
|
+
|
|
420
|
+
| Fails | Then |
|
|
421
|
+
| --- | --- |
|
|
422
|
+
| routing or route data | Post, then the `'error'` route |
|
|
423
|
+
| the all-routes data, with a fallback | the fallback is the data, Post, then the `'error'` route |
|
|
424
|
+
| Init; the all-routes data with no fallback; Post; the fallback; the render | the error page |
|
|
425
|
+
|
|
426
|
+
The fallback is the all-routes data function's second argument (also `serverAllRoutesData`,
|
|
427
|
+
`clientAllRoutesData`): a whole value of its type, or a function of the same arguments plus the
|
|
428
|
+
error, which may return a redirect. A static value is shared by every request, so never mutate
|
|
429
|
+
it. A redirect from the all-routes data wins over a route data throw. The route's data is
|
|
430
|
+
`{ error, message }`; in prod `message` is `'server error'`. In prod the page carries the
|
|
431
|
+
message only to the browser, as does a classic `'error'` route's; in dev it carries the error
|
|
432
|
+
too, with its stack. A client navigation recovers in place; past recovery it loads the page
|
|
433
|
+
from the server.
|
|
434
|
+
|
|
435
|
+
```tsx
|
|
436
|
+
.allRoutesData(loadUser, (reqRes, init, location, error) =>
|
|
437
|
+
isUnauthorized(error) ? new WebRedirect(logInUrl(location)) : guestUser)
|
|
438
|
+
...
|
|
439
|
+
.routes(() => [
|
|
440
|
+
...,
|
|
441
|
+
{ path: 'error', content: (info: TungstenErrorInfo) => <ErrorPanel message={info.message} /> },
|
|
442
|
+
])
|
|
443
|
+
```
|
|
444
|
+
- **A pipeline's error page** (unreleased) is `.errorPage(Page)` before `.routes()`, for what
|
|
445
|
+
recovery cannot reach. `Page` extends the stage's
|
|
446
|
+
`ErrorComponent` and renders the whole document, `<html>` included: no root is around it. When a
|
|
447
|
+
request fails past recovery, after Init, the server sends it with status 500, with props
|
|
448
|
+
`{ error, message }`, Init's context and networked data (Post never ran), and
|
|
449
|
+
`this.tungsten.allRoutesData` that may be `undefined` (it may be what threw). On the prod server
|
|
450
|
+
`message` is `'server error'`, not the error's own; `error` is the thrown value either way,
|
|
451
|
+
server-side only. In prod the page carries only the message to the browser (in dev, the error
|
|
452
|
+
too), which hydrates it the same way, with client navigation off. Optional: without one, or when Init or the page itself throws,
|
|
453
|
+
the framework's error page is sent.
|
|
454
|
+
|
|
455
|
+
```tsx
|
|
456
|
+
const withData = pipeline.server('express').init(...).allRoutesData(...)
|
|
457
|
+
class ErrorPage extends withData.ErrorComponent {
|
|
458
|
+
content = () => <html><head>…</head><body><p>{this.props.message}</p></body></html>
|
|
459
|
+
}
|
|
460
|
+
export const app = withData.post(...).errorPage(ErrorPage).routes(() => [...])
|
|
461
|
+
```
|
|
377
462
|
|
|
378
463
|
### Page caching
|
|
379
464
|
|
|
@@ -693,18 +778,65 @@ The React idiom `<script dangerouslySetInnerHTML={{ __html: code }} />` exists b
|
|
|
693
778
|
HTML-escapes script children; Tungsten does not, so the idiom is unnecessary — do not carry it
|
|
694
779
|
over. As with any framework, the string itself must not contain `</script>`.
|
|
695
780
|
|
|
696
|
-
A boot script that
|
|
697
|
-
|
|
698
|
-
removes any it did not** (`reconcileHydratedAttributes.ts`), so
|
|
699
|
-
element
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
server-side (`reqRes` / global data) and render the attribute from the root component
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
(
|
|
781
|
+
A hand-written boot script that sets an attribute on `<html>` or `<body>` (theme, colour scheme)
|
|
782
|
+
does not survive hydration. **Hydration reconciles attributes to what the component rendered and
|
|
783
|
+
removes any it did not** (`reconcileHydratedAttributes.ts`), so the attribute is stripped the moment
|
|
784
|
+
that element hydrates — reported in dev as a mismatch banner (`data-theme: rendered null, server
|
|
785
|
+
sent …`), silently in prod. Deriving the value in `clientInit` does not help either: the first
|
|
786
|
+
client render then differs from the server's markup. Two ways to make the renders agree:
|
|
787
|
+
|
|
788
|
+
- **The server knows the value** — keep the preference in a cookie or the database, read it
|
|
789
|
+
server-side (`reqRes` / global data) and render the attribute from the root component. No script
|
|
790
|
+
needed.
|
|
791
|
+
- **Only the browser knows it** (`localStorage`, `prefers-color-scheme`) — use
|
|
792
|
+
[`DocInit()`](#docinit--code-that-runs-before-body), which runs the script for you and hands the
|
|
793
|
+
same value to the client render.
|
|
794
|
+
|
|
795
|
+
### `DocInit()` — code that runs before `<body>`
|
|
796
|
+
|
|
797
|
+
`DocInit` is an ambient global, like `Sass` — no import. Its function is inlined into the document
|
|
798
|
+
head as a synchronous script, so it runs on every full page load before `<body>` exists, before
|
|
799
|
+
first paint and before the app bundle. The call evaluates to that function's return value on the
|
|
800
|
+
client, and to the second argument on the server:
|
|
801
|
+
|
|
802
|
+
```tsx
|
|
803
|
+
export class Root extends SimpleStoreComponent {
|
|
804
|
+
theme = DocInit(() => {
|
|
805
|
+
const theme = localStorage.getItem('theme') ?? 'light'
|
|
806
|
+
document.documentElement.dataset.theme = theme
|
|
807
|
+
return theme
|
|
808
|
+
}, 'light') // what the server sees; DocInit(() => { … }) alone is the void form
|
|
809
|
+
|
|
810
|
+
content = () =>
|
|
811
|
+
<html data-theme={this.theme}>…</html>
|
|
812
|
+
}
|
|
813
|
+
```
|
|
814
|
+
|
|
815
|
+
**Render whatever the script changed from the value it returned**, as above. Hydration compares the
|
|
816
|
+
client render with the live DOM, so the attribute the head script set and the attribute the client
|
|
817
|
+
render produces agree, and nothing is stripped. Markup rendered from the server value that the
|
|
818
|
+
script did *not* also change is still a mismatch.
|
|
819
|
+
|
|
820
|
+
The rules, enforced at build by `BabelTransformDocInit` with a code frame:
|
|
821
|
+
|
|
822
|
+
- **The function must be self-contained.** Only browser globals (`document`, `localStorage`, …)
|
|
823
|
+
exist in the head. A module import, an outer variable, `this` from the class, a named function
|
|
824
|
+
passed by reference, parameters, `async` and generators are all build errors. Write helpers
|
|
825
|
+
inline in the function.
|
|
826
|
+
- **Only a direct call of the global is recognised.** An alias (`const D = DocInit`) or a wrapper is
|
|
827
|
+
not rewritten, and reaches a stand-in global that throws naming the cause. A local binding named
|
|
828
|
+
`DocInit` is left alone.
|
|
829
|
+
- **A throw halts the page — there is no fallback** to the server value. The error appears in the
|
|
830
|
+
console where it happened, a read of the value throws, and in dev a red banner names the call
|
|
831
|
+
site. Guard what can fail (`localStorage` throws when site data is blocked) inside the function.
|
|
832
|
+
- **The value is fixed for the page load.** It is not reactive; copy it into state or the store in
|
|
833
|
+
`init` if it can change later, and update the DOM yourself when it does.
|
|
834
|
+
- **An HMR edit to a module using `DocInit` falls back to a full reload**, since the head script
|
|
835
|
+
only runs on a full load.
|
|
836
|
+
|
|
837
|
+
Tests run compiled output without the build transform, so the global is the throwing stand-in.
|
|
838
|
+
Call `installTestDocInit()` from `tungsten/testing/installTestDocInit.js` in the test setup: it runs
|
|
839
|
+
the function where a `document` exists and returns the server value where it does not.
|
|
708
840
|
|
|
709
841
|
## Form binding
|
|
710
842
|
|
|
@@ -827,6 +959,13 @@ page does, then runs the client stages and hydrates. A component whose store or
|
|
|
827
959
|
the pipeline's context needs these: `createTestApp()` and `hydrateTestApp()` run no pipeline, so its
|
|
828
960
|
context is empty.
|
|
829
961
|
|
|
962
|
+
`routesOf(app, reqRes | null)` (unreleased, same import) gives a pipeline app's routes as `host()`'s
|
|
963
|
+
`routes` option takes them, for a component that reads the route table (a nav): it runs the app's
|
|
964
|
+
Init for the side `isServer` says this is - the server's needs a request, and throws on `null` -
|
|
965
|
+
and calls the routes function with its result. `routesOf(app, initResult)` skips Init and uses the
|
|
966
|
+
result given, typed as the routes function's `init` parameter:
|
|
967
|
+
`host(Nav, {}, { location: '/', routes: routesOf(app, { context }) })`.
|
|
968
|
+
|
|
830
969
|
Stores are created independently per test app; initialize one with `testStore()` before the root
|
|
831
970
|
component starts. Component tests that need the application's env globals opt in by calling
|
|
832
971
|
`loadEnv({ buildLocation })` once from the test runner `setup` hook, where `buildLocation` is the
|
package/dist/.build-complete
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
1792235388722
|
package/dist/Components.d.ts
CHANGED
|
@@ -141,6 +141,8 @@ export declare abstract class TungstenBaseComponent<Props extends TungstenCompon
|
|
|
141
141
|
shouldStoreComponentUpdate?: (key: Key, data: unknown) => boolean;
|
|
142
142
|
static tagName?: string;
|
|
143
143
|
static displayName?: string;
|
|
144
|
+
static render?: ComponentRenderInfo;
|
|
145
|
+
static noEscape?: boolean;
|
|
144
146
|
static __opaque?: boolean;
|
|
145
147
|
constructor(pkg: ConstructPackage<Props, RouteData>);
|
|
146
148
|
get globalData(): GlobalData;
|
|
@@ -176,7 +178,7 @@ export declare abstract class TungstenSimpleComponent<Props extends TungstenComp
|
|
|
176
178
|
componentDidRender?: ((prevProps: Props) => void | Promise<void>) | (() => void | Promise<void>);
|
|
177
179
|
_rendered?: ((prevProps: Props) => void | Promise<void>) | (() => void | Promise<void>);
|
|
178
180
|
__init: () => Promise<void>;
|
|
179
|
-
__initialContent: () => ContentNode |
|
|
181
|
+
__initialContent: () => Promise<ContentNode> | ContentNode;
|
|
180
182
|
__runUpdate: () => Promise<UpdateResult>;
|
|
181
183
|
__updateAndReturnContent: () => Promise<{
|
|
182
184
|
content: ContentNode;
|
|
@@ -204,7 +206,7 @@ export declare abstract class TungstenComponent<Props extends TungstenComponentP
|
|
|
204
206
|
static displayName?: string;
|
|
205
207
|
constructor(pkg: ConstructPackage<Props, RouteData>);
|
|
206
208
|
__init: () => Promise<void>;
|
|
207
|
-
__initialContent: () => ContentNode |
|
|
209
|
+
__initialContent: () => Promise<ContentNode> | ContentNode;
|
|
208
210
|
__runUpdate: () => Promise<UpdateResult>;
|
|
209
211
|
__handleTitle: () => void;
|
|
210
212
|
setState: (stateUpdates: State) => void;
|
|
@@ -230,7 +232,7 @@ export declare abstract class TungstenStatefulComponent<Props extends TungstenCo
|
|
|
230
232
|
static displayName?: string;
|
|
231
233
|
constructor(pkg: ConstructPackage<Props, RouteData>);
|
|
232
234
|
__init: () => Promise<void>;
|
|
233
|
-
__initialContent: () => ContentNode |
|
|
235
|
+
__initialContent: () => Promise<ContentNode> | ContentNode;
|
|
234
236
|
__runUpdate: () => Promise<UpdateResult>;
|
|
235
237
|
__updateAndReturnContent: () => Promise<{
|
|
236
238
|
content: ContentNode;
|
|
@@ -271,7 +273,7 @@ export declare abstract class TungstenSignalsComponent<Props extends TungstenCom
|
|
|
271
273
|
static displayName?: string;
|
|
272
274
|
constructor(pkg: ConstructPackage<Props, RouteData>);
|
|
273
275
|
__init: () => Promise<void>;
|
|
274
|
-
__initialContent: () => ContentNode |
|
|
276
|
+
__initialContent: () => Promise<ContentNode> | ContentNode;
|
|
275
277
|
__runUpdate: () => Promise<UpdateResult>;
|
|
276
278
|
__updateAndReturnContent: () => Promise<{
|
|
277
279
|
content: ContentNode;
|
package/dist/Components.js
CHANGED
|
@@ -342,6 +342,8 @@ export class TungstenBaseComponent {
|
|
|
342
342
|
}
|
|
343
343
|
_defineProperty(TungstenBaseComponent, "tagName", void 0);
|
|
344
344
|
_defineProperty(TungstenBaseComponent, "displayName", void 0);
|
|
345
|
+
_defineProperty(TungstenBaseComponent, "render", void 0);
|
|
346
|
+
_defineProperty(TungstenBaseComponent, "noEscape", void 0);
|
|
345
347
|
// rendered once, then owns its dom: the parent never re-renders it (see updateClassComponent)
|
|
346
348
|
_defineProperty(TungstenBaseComponent, "__opaque", void 0);
|
|
347
349
|
export class TungstenSimpleComponent extends TungstenBaseComponent {
|
package/dist/Framework.js
CHANGED
|
@@ -169,9 +169,9 @@ export class Framework {
|
|
|
169
169
|
// dev only: only tungsten build sets quiet, so this check cannot fire yet
|
|
170
170
|
if (!this.quiet) cliOut(`Creating dev server`);
|
|
171
171
|
// TS define requires a var to exist or not, so we will initialize it to undefined to satisfy this expectation
|
|
172
|
-
|
|
172
|
+
globalThis.tungstenPublicEnv = {};
|
|
173
173
|
// should we default the debug value? we'd have issues if they set DEBUG to undef
|
|
174
|
-
|
|
174
|
+
globalThis.tungstenPrivateEnv = {/*TUNGSTEN_SERVER_PORT: -999*/};
|
|
175
175
|
//cliOut(`Try Load Env`)
|
|
176
176
|
//this.loadEnv()
|
|
177
177
|
if (this.config === undefined) throwError('Framework.createDevServer()', 'config is undefined');
|
|
@@ -201,9 +201,9 @@ export class Framework {
|
|
|
201
201
|
For validators, load env, pass to validators, receive result and write
|
|
202
202
|
*/
|
|
203
203
|
// TS global var definition requires a var to exist or not, so we will initialize it to undefined to satisfy this expectation
|
|
204
|
-
|
|
204
|
+
globalThis.tungstenPublicEnv = {};
|
|
205
205
|
// should we default the debug value? we'd have issues if they set DEBUG to undef
|
|
206
|
-
|
|
206
|
+
globalThis.tungstenPrivateEnv = {/*TUNGSTEN_SERVER_PORT: -999*/};
|
|
207
207
|
// Load schemas
|
|
208
208
|
const envSchemas = await getEnvSchemas(config);
|
|
209
209
|
let someEnvLoaded = false;
|
|
@@ -265,7 +265,7 @@ export class Framework {
|
|
|
265
265
|
if (!coreResult.success) {
|
|
266
266
|
throwError('Framework.createEnvProd()', 'Your private environment variables don\'t meet the Tungsten requirements\n' + coreResult.problems);
|
|
267
267
|
}
|
|
268
|
-
|
|
268
|
+
globalThis.tungstenPrivateEnv = coreResult.value;
|
|
269
269
|
if (!this.quiet) cliOut('tungsten private env loaded and passed schema validation'); // save this so that we can show all messages about loading .env files first
|
|
270
270
|
}
|
|
271
271
|
if ('publicEnvSchema' in envSchemas) {
|
|
@@ -289,10 +289,10 @@ export class Framework {
|
|
|
289
289
|
if (!coreResult.success) {
|
|
290
290
|
throwError('Framework.createEnvProd()', 'Your public environment variables don\'t meet the Tungsten requirements\n' + coreResult.problems);
|
|
291
291
|
}
|
|
292
|
-
|
|
292
|
+
globalThis.tungstenPublicEnv = coreResult.value;
|
|
293
293
|
// save to public env file
|
|
294
294
|
const clientContents = readFileSync(join(projectDir, bundleFolder, 'client.js'), 'utf-8');
|
|
295
|
-
const publicEnvContent = windowGlobalEnvStatement('tungstenPublicEnv',
|
|
295
|
+
const publicEnvContent = windowGlobalEnvStatement('tungstenPublicEnv', globalThis.tungstenPublicEnv);
|
|
296
296
|
const clientWithEnvHandle = openSync(join(projectDir, bundleFolder, 'clientWithEnv.js'), 'w');
|
|
297
297
|
writeFileSync(clientWithEnvHandle, publicEnvContent);
|
|
298
298
|
writeFileSync(clientWithEnvHandle, clientContents);
|
|
@@ -36,6 +36,8 @@ export type FrameworkConfigBase = {
|
|
|
36
36
|
skipPackageCompilation?: string | string[];
|
|
37
37
|
sourceMaps?: boolean;
|
|
38
38
|
serverMiddleware?: ServerMiddlewareInfo;
|
|
39
|
+
serverIgnoreDirs?: string | string[];
|
|
40
|
+
serverIgnorePatterns?: string | string[];
|
|
39
41
|
apiRoutes?: string;
|
|
40
42
|
apiPath?: string;
|
|
41
43
|
suppressNoHeadWarning?: boolean;
|
|
@@ -43,7 +45,6 @@ export type FrameworkConfigBase = {
|
|
|
43
45
|
suppressEnvOverwriteWarnings?: boolean;
|
|
44
46
|
hmr?: boolean | 'reload';
|
|
45
47
|
csr?: boolean;
|
|
46
|
-
serverSideRouting?: boolean;
|
|
47
48
|
defaultCacheControl?: CacheControl;
|
|
48
49
|
registration?: Registration;
|
|
49
50
|
};
|
|
@@ -51,9 +52,11 @@ export type Registration = 'register' | 'pipeline';
|
|
|
51
52
|
export type FrameworkConfigWithRootComponent = FrameworkConfigBase & {
|
|
52
53
|
useRootComponent?: true;
|
|
53
54
|
rootComponent: string;
|
|
55
|
+
serverSideRouting?: boolean;
|
|
54
56
|
};
|
|
55
57
|
export type FrameworkConfigWithoutRootComponent = FrameworkConfigBase & {
|
|
56
58
|
useRootComponent: false;
|
|
59
|
+
serverSideRouting?: true;
|
|
57
60
|
};
|
|
58
61
|
export type FrameworkConfig = FrameworkConfigWithRootComponent | FrameworkConfigWithoutRootComponent;
|
|
59
62
|
export type FrameworkConfigCompleteBase = {
|
|
@@ -89,6 +92,8 @@ export type FrameworkConfigCompleteBase = {
|
|
|
89
92
|
skipPackageCompilation?: string | string[];
|
|
90
93
|
sourceMaps?: boolean;
|
|
91
94
|
serverMiddleware?: ServerMiddlewareInfo;
|
|
95
|
+
serverIgnoreDirs?: string | string[];
|
|
96
|
+
serverIgnorePatterns?: string | string[];
|
|
92
97
|
apiRoutes?: string;
|
|
93
98
|
apiPath: string;
|
|
94
99
|
suppressNoHeadWarning: boolean;
|
|
@@ -97,16 +102,17 @@ export type FrameworkConfigCompleteBase = {
|
|
|
97
102
|
warnOnFrameworkChange: boolean;
|
|
98
103
|
hmr: boolean | 'reload';
|
|
99
104
|
csr: boolean;
|
|
100
|
-
serverSideRouting?: boolean;
|
|
101
105
|
defaultCacheControl?: CacheControl;
|
|
102
106
|
registration?: Registration;
|
|
103
107
|
};
|
|
104
108
|
export type FrameworkConfigCompleteWithRootComponent = FrameworkConfigCompleteBase & {
|
|
105
109
|
useRootComponent: true;
|
|
106
110
|
rootComponent: string;
|
|
111
|
+
serverSideRouting?: boolean;
|
|
107
112
|
};
|
|
108
113
|
export type FrameworkConfigCompleteWithoutRootComponent = FrameworkConfigCompleteBase & {
|
|
109
114
|
useRootComponent: false;
|
|
115
|
+
serverSideRouting?: true;
|
|
110
116
|
};
|
|
111
117
|
export type FrameworkConfigComplete = FrameworkConfigCompleteWithRootComponent | FrameworkConfigCompleteWithoutRootComponent;
|
|
112
118
|
export type FrameworkConfigOverrides = Pick<FrameworkConfigCompleteBase, 'ignoreDirs' | 'ignorePatterns' | 'sourceMaps'>;
|
|
@@ -11,6 +11,7 @@ import type { ClientRuntimeContext } from './ClientRuntimeContext.js';
|
|
|
11
11
|
import type { RouteKey } from '../routing/RouteTypes.js';
|
|
12
12
|
import type { ClientRoute } from '../pipeline/pipelineDefinition.js';
|
|
13
13
|
import type { BrandedContext, BrandedGlobalData, BrandedNetworkedData } from '../Brands.js';
|
|
14
|
+
import { type TungstenErrorInfo } from '../routing/TungstenErrorInfo.js';
|
|
14
15
|
type DisposableComponent = {
|
|
15
16
|
__delete: () => void;
|
|
16
17
|
__deleted: () => void;
|
|
@@ -19,7 +20,8 @@ export type NavigationCause = 'navigate' | 'history';
|
|
|
19
20
|
export type InstancePipeline = {
|
|
20
21
|
routingContext: BrandedContext;
|
|
21
22
|
routingNetworkedData: BrandedNetworkedData;
|
|
22
|
-
allRoutesData: (() => Promise<BrandedGlobalData>) | undefined;
|
|
23
|
+
allRoutesData: ((location: string) => Promise<BrandedGlobalData>) | undefined;
|
|
24
|
+
allRoutesDataFallback?: ((location: string, error: unknown) => Promise<BrandedGlobalData>) | undefined;
|
|
23
25
|
afterRouting: ((route: ClientRoute, allRoutesData: object) => Promise<BrandedContext>) | undefined;
|
|
24
26
|
};
|
|
25
27
|
export declare class Instance {
|
|
@@ -49,6 +51,7 @@ export declare class Instance {
|
|
|
49
51
|
url: string;
|
|
50
52
|
code: RedirectCode;
|
|
51
53
|
} | undefined;
|
|
54
|
+
errorInfo: TungstenErrorInfo | undefined;
|
|
52
55
|
pipeline: InstancePipeline | undefined;
|
|
53
56
|
pipelineNetworked: object;
|
|
54
57
|
constructor(location: string, instanceConfig: InstanceConfig, reqRes: ReqRes | null, appRoutes: AppRoutes<any>, routes: Routes<any>, internalStore: InternalStore, stores: TrueStore<any>[], storeSubscriptions: StoreSubscriptionsMap, globalData: BrandedGlobalData, matchedRouteInfo: MatchedRouteInfo, runtimeContext?: ClientRuntimeContext);
|
|
@@ -63,6 +66,8 @@ export declare class Instance {
|
|
|
63
66
|
cause?: NavigationCause;
|
|
64
67
|
}) => Promise<void>;
|
|
65
68
|
redirect: (url: string, code?: RedirectCode) => void;
|
|
69
|
+
private routeClassic;
|
|
70
|
+
private routePipeline;
|
|
66
71
|
httpTo: (url: string) => void;
|
|
67
72
|
httpReload: () => void;
|
|
68
73
|
setDefaultTitle: (defaultTitle: string) => void;
|
|
@@ -14,8 +14,9 @@ import { globalDataFunc } from '../routing/registerGlobalData.js';
|
|
|
14
14
|
import { tAssert } from '../assert.js';
|
|
15
15
|
import { throwError } from '../throwError.js';
|
|
16
16
|
import { clientRoute } from '../pipeline/pipelineDefinition.js';
|
|
17
|
+
import { settleRouting } from '../pipeline/settleRouting.js';
|
|
17
18
|
export class Instance {
|
|
18
|
-
constructor(_location, instanceConfig, reqRes, appRoutes,
|
|
19
|
+
constructor(_location, instanceConfig, reqRes, appRoutes, _routes,
|
|
19
20
|
//globalData: GlobalData,
|
|
20
21
|
//matchedRouteInfo: MatchedRouteInfo
|
|
21
22
|
internalStore, stores, storeSubscriptions, _globalData, _matchedRouteInfo, runtimeContext) {
|
|
@@ -56,6 +57,8 @@ export class Instance {
|
|
|
56
57
|
_defineProperty(this, "registeredComponents", []);
|
|
57
58
|
// set when the server has answered the request with a redirect, so it sends nothing more
|
|
58
59
|
_defineProperty(this, "redirected", undefined);
|
|
60
|
+
// set when the page is the pipeline's error page: written into it, for hydration to know it
|
|
61
|
+
_defineProperty(this, "errorInfo", undefined);
|
|
59
62
|
// the pipeline's, set by hydratePipeline(): client navigation routes with Init's context, as
|
|
60
63
|
// the server did, and reruns the all-routes data. Unset, goto() takes the classic path
|
|
61
64
|
_defineProperty(this, "pipeline", undefined);
|
|
@@ -103,32 +106,19 @@ export class Instance {
|
|
|
103
106
|
navigating.set(true);
|
|
104
107
|
// get route data
|
|
105
108
|
try {
|
|
106
|
-
let matchedRouteInfo;
|
|
107
|
-
// global data runs before any route renders, here as before SSR; beside routing, as there
|
|
108
|
-
let globalData = this.globalData;
|
|
109
109
|
const pipeline = this.pipeline;
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
// least this is now a logged, caught rejection rather than a silent
|
|
117
|
-
// unhandled one that left the previous page frozen with no feedback.
|
|
118
|
-
if (errorRoute === undefined) return;
|
|
119
|
-
matchedRouteInfo = {
|
|
120
|
-
key: 'error',
|
|
121
|
-
params: {},
|
|
122
|
-
content: errorRoute.content,
|
|
123
|
-
data: makeTungstenErrorInfo(error)
|
|
124
|
-
};
|
|
125
|
-
}
|
|
110
|
+
const routed = pipeline === undefined ? await this.routeClassic(path) : await this.routePipeline(pipeline, path);
|
|
111
|
+
if (routed === undefined) return;
|
|
112
|
+
const {
|
|
113
|
+
matchedRouteInfo,
|
|
114
|
+
globalData
|
|
115
|
+
} = routed;
|
|
126
116
|
//console.log('matchedRouteInfo', location, matchedRouteInfo)
|
|
127
117
|
//console.log('matched route info', this.matchedRouteInfo)
|
|
128
118
|
if (i !== navigationIndex.get()) return; // another nav has taken over
|
|
129
119
|
// A redirect to a URL leaves the app: on the server redirect() writes an HTTP redirect;
|
|
130
120
|
// in the browser it replaces the location
|
|
131
|
-
const redirection = redirectOf(matchedRouteInfo);
|
|
121
|
+
const redirection = redirectOf(matchedRouteInfo, globalData);
|
|
132
122
|
if (redirection !== undefined) {
|
|
133
123
|
// awaited, so goto() settles when the navigation it started has
|
|
134
124
|
if ('route' in redirection) await this.goto(redirection.route);else this.redirect(redirection.url, redirection.code);
|
|
@@ -184,6 +174,56 @@ export class Instance {
|
|
|
184
174
|
runtimeWindow.location.replace(url);
|
|
185
175
|
}
|
|
186
176
|
});
|
|
177
|
+
// goto()'s routing, with the global data beside it, as before SSR. Undefined: nothing to show
|
|
178
|
+
_defineProperty(this, "routeClassic", async path => {
|
|
179
|
+
try {
|
|
180
|
+
const [matchedRouteInfo, globalData] = await Promise.all([routing(path, this.getRoutes(), this.context, this.networkedData), globalDataFunc.value?.(null, this.context, this.networkedData, path) ?? this.globalData]);
|
|
181
|
+
return {
|
|
182
|
+
matchedRouteInfo,
|
|
183
|
+
globalData
|
|
184
|
+
};
|
|
185
|
+
} catch (error) {
|
|
186
|
+
errorOut(`Tungsten client navigation to '${path}' failed while loading route data:`, error);
|
|
187
|
+
const errorRoute = this.routes.error;
|
|
188
|
+
// Without an app-defined error route there's nothing better to show; at
|
|
189
|
+
// least this is now a logged, caught rejection rather than a silent
|
|
190
|
+
// unhandled one that left the previous page frozen with no feedback.
|
|
191
|
+
if (errorRoute === undefined) return undefined;
|
|
192
|
+
const matchedRouteInfo = {
|
|
193
|
+
key: 'error',
|
|
194
|
+
params: {},
|
|
195
|
+
content: errorRoute.content,
|
|
196
|
+
data: makeTungstenErrorInfo(error)
|
|
197
|
+
};
|
|
198
|
+
return {
|
|
199
|
+
matchedRouteInfo,
|
|
200
|
+
globalData: this.globalData
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
// A pipeline's, recovering to the 'error' route where it can. Past that the server renders its
|
|
205
|
+
// error page: undefined, as the page loads from the server
|
|
206
|
+
_defineProperty(this, "routePipeline", async (pipeline, path) => {
|
|
207
|
+
const routes = this.getRoutes();
|
|
208
|
+
const getAllRoutesData = pipeline.allRoutesData;
|
|
209
|
+
const fallback = pipeline.allRoutesDataFallback;
|
|
210
|
+
const current = this.globalData;
|
|
211
|
+
try {
|
|
212
|
+
const settled = await settleRouting(routes, async () => routing(path, routes, pipeline.routingContext, pipeline.routingNetworkedData), async () => getAllRoutesData === undefined ? current : getAllRoutesData(path), fallback && (async error => fallback(path, error)), makeTungstenErrorInfo);
|
|
213
|
+
if (settled.recoveredFrom !== undefined) {
|
|
214
|
+
errorOut(`Tungsten client navigation to '${path}' failed, showing the error route:`, settled.recoveredFrom);
|
|
215
|
+
}
|
|
216
|
+
const globalData = settled.allRoutesData; // eslint-disable-line @typescript-eslint/no-unsafe-type-assertion -- the framework brands what it builds
|
|
217
|
+
return {
|
|
218
|
+
matchedRouteInfo: settled.matchedRouteInfo,
|
|
219
|
+
globalData
|
|
220
|
+
};
|
|
221
|
+
} catch (error) {
|
|
222
|
+
errorOut(`Tungsten client navigation to '${path}' failed while loading route data:`, error);
|
|
223
|
+
this.httpTo(this.routeKeyToUrl(path));
|
|
224
|
+
return undefined;
|
|
225
|
+
}
|
|
226
|
+
});
|
|
187
227
|
_defineProperty(this, "httpTo", url => {
|
|
188
228
|
if (!isClient) {
|
|
189
229
|
throwError('gotoHttp', 'Cannot modify window location on the server');
|
|
@@ -255,7 +295,7 @@ export class Instance {
|
|
|
255
295
|
this.stores = stores;
|
|
256
296
|
this.storeSubscriptions = storeSubscriptions;
|
|
257
297
|
this.appRoutes = appRoutes;
|
|
258
|
-
this.routes =
|
|
298
|
+
this.routes = _routes;
|
|
259
299
|
this.globalData = _globalData;
|
|
260
300
|
this.matchedRouteInfo = _matchedRouteInfo;
|
|
261
301
|
this.config = instanceConfig; // createInstanceConfig(appConfig)
|
|
@@ -20,15 +20,17 @@ export declare class DevServer extends TungstenServer {
|
|
|
20
20
|
apiRoutes?: ApiRoutes;
|
|
21
21
|
apiPath?: string;
|
|
22
22
|
server?: Server;
|
|
23
|
-
reqId: number;
|
|
24
23
|
firstRender: boolean;
|
|
25
24
|
iterationCount: number;
|
|
26
25
|
serverIterationCount: number;
|
|
27
26
|
private liveReloadClients;
|
|
28
27
|
private unsubscribeReload;
|
|
28
|
+
private watchedMiddleware;
|
|
29
29
|
private bootId;
|
|
30
30
|
constructor(framework: Framework, config: FrameworkConfigComplete, compilationInfo: CompilationInfo, initialProcessEnv?: Record<string, string>);
|
|
31
31
|
private addServerMiddleware;
|
|
32
|
+
private addWatchedServerMiddleware;
|
|
33
|
+
private addPerRequestServerMiddleware;
|
|
32
34
|
private handleLiveReloadStream;
|
|
33
35
|
private reloadDebounceTimer;
|
|
34
36
|
private pendingReloadKind;
|
|
@@ -36,13 +38,14 @@ export declare class DevServer extends TungstenServer {
|
|
|
36
38
|
private static readonly reloadDebounceMs;
|
|
37
39
|
private broadcastReloadEvent;
|
|
38
40
|
private sourceFileToUrlPath;
|
|
39
|
-
private pipelineHandler;
|
|
40
41
|
private handleRequestApi;
|
|
41
42
|
private handleRequest;
|
|
43
|
+
private handleRequestPipeline;
|
|
44
|
+
private renderPipelinePage;
|
|
42
45
|
private tryRenderErrorRoute;
|
|
43
|
-
getGlobalData: (func: BrandedGlobalDataFunction, reqRes: ReqRes, context: BrandedContext, networkedData: BrandedNetworkedData) => Promise<BrandedGlobalData>;
|
|
44
|
-
|
|
45
|
-
errorPage: (error: unknown,
|
|
46
|
+
getGlobalData: (func: BrandedGlobalDataFunction, reqRes: ReqRes, context: BrandedContext, networkedData: BrandedNetworkedData, location: string) => Promise<BrandedGlobalData>;
|
|
47
|
+
printError: (error: unknown, errorSites?: string[]) => void;
|
|
48
|
+
errorPage: (error: unknown, errorSites: string[]) => string;
|
|
46
49
|
start: () => Promise<{
|
|
47
50
|
localOrigin: string;
|
|
48
51
|
publicOrigin: string;
|