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
|
@@ -8,7 +8,7 @@ import { staticFolder, assetsFolder, packageNameCapitalized, publicFolder, compo
|
|
|
8
8
|
import { rootToHtml as renderRootToHtml } from '../render/rootToHtml.js';
|
|
9
9
|
import { contentToHtml as renderContentToHtml } from '../render/contentToHtml.js';
|
|
10
10
|
import { Instance } from '../Instance/Instance.js';
|
|
11
|
-
import { cliOut, cliWarn, cliLog, cliNews, cliDebug } from '../cliOutput.js';
|
|
11
|
+
import { cliOut, cliWarn, cliLog, cliNews, cliDebug, cliError } from '../cliOutput.js';
|
|
12
12
|
import { TungstenError } from '../TungstenError.js';
|
|
13
13
|
import { makeInstanceConfigFromFrameworkConfig } from '../makeInstanceConfigFromFrameworkConfig.js';
|
|
14
14
|
//import { addRequireResolveHooks } from '../reRouting/addRequireResolveHooks.js'
|
|
@@ -19,7 +19,7 @@ import { cacheVersioned } from './cacheVersioned.js';
|
|
|
19
19
|
import { $cacheControl, cacheControlHeader, pageCacheControl } from '../cacheControl.js';
|
|
20
20
|
import { routing } from "./routing.js";
|
|
21
21
|
import { globalDataFunc } from '../routing/registerGlobalData.js';
|
|
22
|
-
import { TungstenServer } from "./TungstenServer.js";
|
|
22
|
+
import { appRoutesFor, runnerOf, TungstenServer } from "./TungstenServer.js";
|
|
23
23
|
import { portError } from './portError.js';
|
|
24
24
|
import { initStores } from './initStores.js';
|
|
25
25
|
import { createContext } from '../context/registerContext.js';
|
|
@@ -28,8 +28,9 @@ import { makeTungstenErrorInfo } from '../routing/TungstenErrorInfo.js';
|
|
|
28
28
|
import { responseStatus } from '../routing/MatchedRouteInfo.js';
|
|
29
29
|
import { toRoutes } from '../routing/routesArray.js';
|
|
30
30
|
import { listenVerified, newBootId, registerBootProbe } from './listenVerified.js';
|
|
31
|
-
import { PipelineRequestHandler } from '../pipeline/PipelineRequestHandler.js';
|
|
32
31
|
import { sendStub, stubInstance } from './stubInstance.js';
|
|
32
|
+
import { runStep } from '../pipeline/runPipeline.js';
|
|
33
|
+
import { MatchedRoute } from '../routing/MatchedRoute.js';
|
|
33
34
|
function debug(...texts) {
|
|
34
35
|
// console.log(...texts)
|
|
35
36
|
}
|
|
@@ -58,8 +59,8 @@ export class ProdServer extends TungstenServer {
|
|
|
58
59
|
_defineProperty(this, "apiRoutes", void 0);
|
|
59
60
|
_defineProperty(this, "server", void 0);
|
|
60
61
|
_defineProperty(this, "bootId", newBootId());
|
|
61
|
-
//
|
|
62
|
-
_defineProperty(this, "
|
|
62
|
+
// config.registration 'pipeline': the routes module's app
|
|
63
|
+
_defineProperty(this, "pipelineApp", void 0);
|
|
63
64
|
// private addServerMiddleware = (serverMiddleware: ServerMiddlewareInfo): void => {
|
|
64
65
|
// const [middlewareFile, middlewareExportName, middlewarePath] = serverMiddleware
|
|
65
66
|
// const fullFilePath = 'file://' + join(this.compilationInfo.codeLocation, middlewareFile)
|
|
@@ -98,8 +99,126 @@ export class ProdServer extends TungstenServer {
|
|
|
98
99
|
// // else
|
|
99
100
|
// res.sendStatus(404)
|
|
100
101
|
});
|
|
102
|
+
// pages under config.registration 'pipeline'
|
|
103
|
+
_defineProperty(this, "handleRequestPipeline", async (req, res) => {
|
|
104
|
+
if (this.staticFileRegex.test(req.url)) {
|
|
105
|
+
cliLog(`Requested asset file ${req.url} was not found`);
|
|
106
|
+
res.status(404).end();
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
const location = req.url;
|
|
110
|
+
const reqRes = {
|
|
111
|
+
req,
|
|
112
|
+
res
|
|
113
|
+
};
|
|
114
|
+
const instanceConfig = makeInstanceConfigFromFrameworkConfig(this.config);
|
|
115
|
+
const fileVersions = this.compilationInfo.fileVersions;
|
|
116
|
+
const app = this.pipelineApp;
|
|
117
|
+
// what the request reached, for the error page and the log
|
|
118
|
+
const progress = {};
|
|
119
|
+
try {
|
|
120
|
+
if (app === null) {
|
|
121
|
+
throwError('ProdServer', `config.registration is 'pipeline', but no pipeline app given`);
|
|
122
|
+
}
|
|
123
|
+
if (this.framework.frameworkModules === undefined) {
|
|
124
|
+
throwError('ProdServer.handleRequestPipeline()', 'framework.frameworkModules unset');
|
|
125
|
+
}
|
|
126
|
+
const Root = this.RootComponentOrNull ?? MatchedRoute;
|
|
127
|
+
if (this.config.serverSideRouting === false) {
|
|
128
|
+
const appRoutes = appRoutesFor(app, undefined, false);
|
|
129
|
+
const instance = stubInstance(location, instanceConfig, reqRes, appRoutes);
|
|
130
|
+
const html = await this.renderPipelinePage(this.stubRoot(), instance);
|
|
131
|
+
sendStub(reqRes, this.config.defaultCacheControl, html);
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
const serverDataLoading = {
|
|
135
|
+
value: false
|
|
136
|
+
};
|
|
137
|
+
const runner = runnerOf(app);
|
|
138
|
+
const {
|
|
139
|
+
init,
|
|
140
|
+
routes,
|
|
141
|
+
allRoutesData,
|
|
142
|
+
matchedRouteInfo,
|
|
143
|
+
recoveredFrom
|
|
144
|
+
} = await runner.route(app, reqRes, location, serverDataLoading, false, progress);
|
|
145
|
+
if (this.handleRedirects(res, matchedRouteInfo, instanceConfig, allRoutesData)) return;
|
|
146
|
+
const recovered = recoveredFrom !== undefined;
|
|
147
|
+
if (recovered) {
|
|
148
|
+
const failed = (progress.failedSteps ?? []).join(', ');
|
|
149
|
+
cliLog(`handleRequestPipeline() recovered from an error in ${failed}`, recoveredFrom);
|
|
150
|
+
}
|
|
151
|
+
const post = await runStep(progress, 'Post', () => runner.post(app, reqRes, init, allRoutesData));
|
|
152
|
+
const instance = this.pipelineInstance({
|
|
153
|
+
location,
|
|
154
|
+
reqRes,
|
|
155
|
+
instanceConfig,
|
|
156
|
+
fileVersions,
|
|
157
|
+
appRoutes: appRoutesFor(app, init, false),
|
|
158
|
+
routes,
|
|
159
|
+
matchedRouteInfo,
|
|
160
|
+
serverDataLoading,
|
|
161
|
+
allRoutesData,
|
|
162
|
+
context: runner.context(init, post),
|
|
163
|
+
networked: runner.networked(init, post)
|
|
164
|
+
});
|
|
165
|
+
const html = await runStep(progress, 'render', () => this.renderPipelinePage(Root, instance));
|
|
166
|
+
// a goto() during the render has already answered with a redirect
|
|
167
|
+
if (instance.redirected !== undefined) return;
|
|
168
|
+
res.setHeader('Content-Type', 'text/html');
|
|
169
|
+
// a recovered page shows a passing failure, which no cache should keep
|
|
170
|
+
if (recovered) res.setHeader('Cache-Control', 'no-store');
|
|
171
|
+
// server middleware ran first, and a Cache-Control it set stands
|
|
172
|
+
if (res.getHeader('Cache-Control') === undefined) {
|
|
173
|
+
const key = instance.matchedRouteInfo.key;
|
|
174
|
+
const byKey = routes;
|
|
175
|
+
const cacheControl = pageCacheControl(key !== null && Object.hasOwn(routes, key) ? byKey[key] : undefined, routes[$cacheControl], this.config.defaultCacheControl, reqRes);
|
|
176
|
+
if (cacheControl !== undefined) {
|
|
177
|
+
res.setHeader('Cache-Control', cacheControlHeader(cacheControl));
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
res.status(responseStatus(instance.matchedRouteInfo));
|
|
181
|
+
res.send(html);
|
|
182
|
+
} catch (e) {
|
|
183
|
+
const failed = progress.failedSteps;
|
|
184
|
+
const steps = failed === undefined ? '' : ` (failed in ${failed.join(', ')})`;
|
|
185
|
+
cliLog(`handleRequestPipeline() error${steps}`, e);
|
|
186
|
+
// too late for an error page once a redirect has gone out
|
|
187
|
+
if (res.headersSent) return;
|
|
188
|
+
// the error's own message stays on the server
|
|
189
|
+
const errorPage = this.pipelineErrorPage(app ?? undefined, progress, e, {
|
|
190
|
+
location,
|
|
191
|
+
reqRes,
|
|
192
|
+
instanceConfig,
|
|
193
|
+
fileVersions
|
|
194
|
+
}, 'server error');
|
|
195
|
+
let html;
|
|
196
|
+
if (errorPage !== undefined) {
|
|
197
|
+
const {
|
|
198
|
+
ErrorPage,
|
|
199
|
+
instance,
|
|
200
|
+
errorInfo
|
|
201
|
+
} = errorPage;
|
|
202
|
+
try {
|
|
203
|
+
html = await this.renderPipelinePage(ErrorPage, instance, errorInfo);
|
|
204
|
+
} catch (renderError) {
|
|
205
|
+
cliError('Error rendering the app\'s error page, falling back to the default one');
|
|
206
|
+
cliLog(renderError);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
res.setHeader('Content-Type', 'text/html');
|
|
210
|
+
res.status(500);
|
|
211
|
+
res.send(html ?? this.errorPage());
|
|
212
|
+
}
|
|
213
|
+
});
|
|
214
|
+
_defineProperty(this, "renderPipelinePage", async (Root, instance, props) => {
|
|
215
|
+
if (this.framework.clientImportAliases === undefined) {
|
|
216
|
+
throwError('ProdServer', 'framework.clientImportAliases is undefined');
|
|
217
|
+
}
|
|
218
|
+
return renderRootToHtml(this.compilationInfo, this.framework.clientImportAliases, Root, instance, this.config, this.config.siteBasePath, undefined, false, props);
|
|
219
|
+
});
|
|
101
220
|
_defineProperty(this, "handleRequest", async (req, res) => {
|
|
102
|
-
if (
|
|
221
|
+
if (this.staticFileRegex.test(req.url)) {
|
|
103
222
|
cliLog(`Requested asset file ${req.url} was not found`);
|
|
104
223
|
res.status(404).end();
|
|
105
224
|
return;
|
|
@@ -159,10 +278,12 @@ export class ProdServer extends TungstenServer {
|
|
|
159
278
|
const networkedData = createNetworkedData(reqRes, context);
|
|
160
279
|
capturedNetworkedData = networkedData;
|
|
161
280
|
const routes = toRoutes(typeof appRoutes === 'function' ? appRoutes(reqRes, context, networkedData) : appRoutes, false);
|
|
162
|
-
const [globalData, matchedRouteInfo] = await Promise.all([globalDataFunc.value !== undefined ? globalDataFunc.value(reqRes, context, networkedData).then(
|
|
163
|
-
capturedGlobalData =
|
|
164
|
-
return
|
|
165
|
-
}) : {},
|
|
281
|
+
const [globalData, matchedRouteInfo] = await Promise.all([globalDataFunc.value !== undefined ? globalDataFunc.value(reqRes, context, networkedData, location).then(data => {
|
|
282
|
+
capturedGlobalData = data;
|
|
283
|
+
return data;
|
|
284
|
+
}) : {},
|
|
285
|
+
// eslint-disable-line @typescript-eslint/no-unsafe-type-assertion
|
|
286
|
+
routing(location, routes, context, networkedData, serverDataLoading)]);
|
|
166
287
|
//instance.matchedRouteInfo =
|
|
167
288
|
//cliTodo('Can we move redirect handling to base class?')
|
|
168
289
|
// // 2025-03-14 copied this code here from Dev server,
|
|
@@ -181,7 +302,7 @@ export class ProdServer extends TungstenServer {
|
|
|
181
302
|
// res.redirect(code, to)
|
|
182
303
|
// return
|
|
183
304
|
// }
|
|
184
|
-
const redirected = this.handleRedirects(res, matchedRouteInfo);
|
|
305
|
+
const redirected = this.handleRedirects(res, matchedRouteInfo, instanceConfig, globalData);
|
|
185
306
|
if (redirected) return; // end early
|
|
186
307
|
const {
|
|
187
308
|
internalStore,
|
|
@@ -228,6 +349,8 @@ export class ProdServer extends TungstenServer {
|
|
|
228
349
|
if (res.headersSent) return;
|
|
229
350
|
const errorRouteHtml = await this.tryRenderErrorRoute(req, res, capturedGlobalData, capturedContext, capturedNetworkedData, e);
|
|
230
351
|
res.setHeader('Content-Type', 'text/html');
|
|
352
|
+
// a failure, which no cache should keep - as the pipeline path's recovered pages
|
|
353
|
+
res.setHeader('Cache-Control', 'no-store');
|
|
231
354
|
res.status(500);
|
|
232
355
|
res.send(errorRouteHtml ?? this.errorPage());
|
|
233
356
|
}
|
|
@@ -409,29 +532,8 @@ export class ProdServer extends TungstenServer {
|
|
|
409
532
|
this.app.use(apiPath, express.json());
|
|
410
533
|
this.app.use(apiPath, this.handleRequestApi);
|
|
411
534
|
}
|
|
412
|
-
this.
|
|
413
|
-
|
|
414
|
-
config: _config,
|
|
415
|
-
instanceConfig: () => makeInstanceConfigFromFrameworkConfig(this.config),
|
|
416
|
-
fileVersions: this.compilationInfo.fileVersions,
|
|
417
|
-
loadApp: async () => {
|
|
418
|
-
if (pipelineApp === null) {
|
|
419
|
-
throwError('ProdServer', `config.registration is 'pipeline', but no pipeline app was given`);
|
|
420
|
-
}
|
|
421
|
-
return Promise.resolve({
|
|
422
|
-
Root: this.RootComponentOrNull,
|
|
423
|
-
app: pipelineApp
|
|
424
|
-
});
|
|
425
|
-
},
|
|
426
|
-
render: async (Root, instance) => {
|
|
427
|
-
if (this.framework.clientImportAliases === undefined) {
|
|
428
|
-
throwError('ProdServer', 'framework.clientImportAliases is undefined');
|
|
429
|
-
}
|
|
430
|
-
return renderRootToHtml(this.compilationInfo, this.framework.clientImportAliases, Root, instance, this.config, this.config.siteBasePath);
|
|
431
|
-
},
|
|
432
|
-
errorPage: () => this.errorPage()
|
|
433
|
-
}).handle : this.handleRequest;
|
|
434
|
-
this.app.use(this.requestHandler);
|
|
535
|
+
this.pipelineApp = pipelineApp;
|
|
536
|
+
this.app.use(_config.registration === 'pipeline' ? this.handleRequestPipeline : this.handleRequest);
|
|
435
537
|
}
|
|
436
538
|
// private async handlePost(req: express.Request, res: express.Response): Promise<void> {
|
|
437
539
|
// throw new TungstenError(`Err - Dev server received a post request. Not supported yet.`)
|
|
@@ -1,9 +1,42 @@
|
|
|
1
1
|
import type { Response as ExpressResponse } from 'express';
|
|
2
|
+
import type { AnyComponentType } from '../AnyComponentType.js';
|
|
3
|
+
import type { InstanceConfig } from '../Instance/InstanceConfig.js';
|
|
4
|
+
import type { PipelineApp, StageContext } from '../pipeline/pipelineDefinition.js';
|
|
5
|
+
import type { RequestProgress } from '../pipeline/runPipeline.js';
|
|
6
|
+
import type { ReqRes } from '../ReqRes.js';
|
|
7
|
+
import type { AppRoutes } from '../routing/AppRoutes.js';
|
|
2
8
|
import type { MatchedRouteInfo } from '../routing/MatchedRouteInfo.js';
|
|
9
|
+
import type { Routes } from '../routing/Routes.js';
|
|
10
|
+
import type { TungstenErrorInfo } from '../routing/TungstenErrorInfo.js';
|
|
11
|
+
import type { ServerDataLoading } from '../Store/ServerDataLoading.js';
|
|
12
|
+
import { Instance } from '../Instance/Instance.js';
|
|
13
|
+
export type PipelinePage = {
|
|
14
|
+
location: string;
|
|
15
|
+
reqRes: ReqRes;
|
|
16
|
+
instanceConfig: InstanceConfig;
|
|
17
|
+
fileVersions: Record<string, string> | undefined;
|
|
18
|
+
appRoutes: AppRoutes<any>;
|
|
19
|
+
routes: Routes<any>;
|
|
20
|
+
matchedRouteInfo: MatchedRouteInfo;
|
|
21
|
+
serverDataLoading: ServerDataLoading;
|
|
22
|
+
allRoutesData: unknown;
|
|
23
|
+
context: object;
|
|
24
|
+
networked: object | undefined;
|
|
25
|
+
};
|
|
26
|
+
export type PipelineErrorPage = {
|
|
27
|
+
ErrorPage: AnyComponentType;
|
|
28
|
+
instance: Instance;
|
|
29
|
+
errorInfo: TungstenErrorInfo;
|
|
30
|
+
};
|
|
3
31
|
export declare class TungstenServer {
|
|
32
|
+
protected staticFileRegex: RegExp;
|
|
4
33
|
protected makeOrigin(proto: string, host: string, port: number): string;
|
|
5
34
|
protected arrivedAt(host: string, proto: string): string;
|
|
6
35
|
protected hostOfOrigin(origin: string): string | null;
|
|
7
|
-
protected handleRedirects(res: ExpressResponse, matchedRouteInfo: MatchedRouteInfo): boolean;
|
|
36
|
+
protected handleRedirects(res: ExpressResponse, matchedRouteInfo: MatchedRouteInfo, config: Pick<InstanceConfig, 'siteBasePath' | 'staticSite'>, allRoutesData?: unknown): boolean;
|
|
37
|
+
protected pipelineInstance(page: PipelinePage): Instance;
|
|
38
|
+
protected pipelineErrorPage(app: PipelineApp | undefined, progress: RequestProgress, error: unknown, page: Pick<PipelinePage, 'location' | 'reqRes' | 'instanceConfig' | 'fileVersions'>, message?: string): PipelineErrorPage | undefined;
|
|
8
39
|
}
|
|
40
|
+
export declare const runnerOf: (app: PipelineApp) => import("../pipeline/runPipeline.js").ServerRunner;
|
|
41
|
+
export declare const appRoutesFor: (app: PipelineApp, init: StageContext | undefined, dev: boolean) => AppRoutes<any>;
|
|
9
42
|
//# sourceMappingURL=TungstenServer.d.ts.map
|
|
@@ -1,14 +1,24 @@
|
|
|
1
|
-
|
|
1
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
2
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
3
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
4
|
+
import { Instance } from '../Instance/Instance.js';
|
|
5
|
+
import { isProd } from '../isProd.js';
|
|
6
|
+
import { NetworkedTransport } from '../pipeline/networkedTransport.js';
|
|
7
|
+
import { pipelineRoutes, symmetricServer } from '../pipeline/runPipeline.js';
|
|
8
|
+
import { splitServer } from '../pipeline/runSplitPipeline.js';
|
|
9
|
+
import { redirectOf } from '../routing/redirectOf.js';
|
|
10
|
+
import { routeKeyToUrl } from '../routing/routeUrl.js';
|
|
2
11
|
import { RoutingRedirect } from '../routing/RoutingRedirect.js';
|
|
3
|
-
import {
|
|
4
|
-
import { RouteRedirectComponent } from "../components/RouteRedirectComponent.js";
|
|
5
|
-
import { WebRedirectComponent } from "../components/WebRedirectComponent.js";
|
|
6
|
-
import { $props, $type } from '../contentNodeSymbols.js';
|
|
12
|
+
import { makeTungstenErrorInfo } from '../routing/TungstenErrorInfo.js';
|
|
7
13
|
import { WebRedirect } from '../routing/WebRedirect.js';
|
|
14
|
+
import { initStores } from './initStores.js';
|
|
8
15
|
function debug(...texts) {
|
|
9
16
|
// console.log(...texts)
|
|
10
17
|
}
|
|
11
18
|
export class TungstenServer {
|
|
19
|
+
constructor() {
|
|
20
|
+
_defineProperty(this, "staticFileRegex", /\.(css|scss|sass|js|jsx|png|jpg|jpeg|svg|ico|txt)$/);
|
|
21
|
+
}
|
|
12
22
|
// URL drops the port when it is the scheme's default, so http://x:80 -> http://x, https://x:443
|
|
13
23
|
// -> https://x, and anything else keeps it. Throws on a host it cannot parse
|
|
14
24
|
makeOrigin(proto, host, port) {
|
|
@@ -29,41 +39,83 @@ export class TungstenServer {
|
|
|
29
39
|
return null;
|
|
30
40
|
}
|
|
31
41
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
res.redirect(redirect.code, redirect.to);
|
|
41
|
-
return true;
|
|
42
|
-
}
|
|
43
|
-
// console.log('content', matchedRouteInfo.content)
|
|
44
|
-
// console.log('is func', typeof matchedRouteInfo.content !== 'function')
|
|
45
|
-
// console.log('ContentNodeIsClassComponent', ContentNodeIsClassComponent(matchedRouteInfo.content as any))
|
|
46
|
-
// console.log('instanceof', (matchedRouteInfo as any).content[$type] instanceof RedirectComponent)
|
|
47
|
-
// console.log('prototype instanceof', (matchedRouteInfo as any).content[$type].prototype instanceof RedirectComponent)
|
|
48
|
-
// console.log('__tungstenRedirect', (matchedRouteInfo as any).content[$type].__tungstenRedirect)
|
|
49
|
-
// console.log('$type', (matchedRouteInfo as any).content[$type])
|
|
50
|
-
//console.log('content[$type]', matchedRouteInfo.content[$type])
|
|
51
|
-
//console.log('instanceof', matchedRouteInfo.content instanceof RedirectComponent)
|
|
52
|
-
if (typeof matchedRouteInfo.content !== 'function' && ContentNodeIsClassComponent(matchedRouteInfo.content)) {
|
|
53
|
-
if (matchedRouteInfo.content[$type] === RouteRedirectComponent || matchedRouteInfo.content[$type].prototype instanceof RouteRedirectComponent) {
|
|
54
|
-
cliTodo('consider type of RedirectComponent props');
|
|
55
|
-
const code = matchedRouteInfo.content[$props].code || 302;
|
|
56
|
-
const to = matchedRouteInfo.content[$props].to;
|
|
57
|
-
res.redirect(code, to);
|
|
58
|
-
return true;
|
|
59
|
-
} else if (matchedRouteInfo.content[$type] === WebRedirectComponent || matchedRouteInfo.content[$type].prototype instanceof WebRedirectComponent) {
|
|
60
|
-
cliTodo('consider type of RedirectComponent props');
|
|
61
|
-
const code = matchedRouteInfo.content[$props].code || 302;
|
|
62
|
-
const to = matchedRouteInfo.content[$props].to;
|
|
63
|
-
res.redirect(code, to);
|
|
64
|
-
return true;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
return false;
|
|
42
|
+
// config: the instance's, so a route redirect goes where the instance's goto() would.
|
|
43
|
+
// allRoutesData: the pipeline's, whose redirect wins over the route's
|
|
44
|
+
handleRedirects(res, matchedRouteInfo, config, allRoutesData) {
|
|
45
|
+
const redirection = redirectOf(matchedRouteInfo, allRoutesData);
|
|
46
|
+
if (redirection === undefined) return false;
|
|
47
|
+
const url = 'route' in redirection ? routeKeyToUrl(redirection.route, config.siteBasePath, isProd && config.staticSite) : redirection.url;
|
|
48
|
+
res.redirect(redirection.code ?? 302, url);
|
|
49
|
+
return true;
|
|
68
50
|
}
|
|
69
|
-
|
|
51
|
+
// a pipeline page's instance, from what its stages made
|
|
52
|
+
pipelineInstance(page) {
|
|
53
|
+
const {
|
|
54
|
+
location,
|
|
55
|
+
reqRes,
|
|
56
|
+
matchedRouteInfo,
|
|
57
|
+
serverDataLoading,
|
|
58
|
+
routes
|
|
59
|
+
} = page;
|
|
60
|
+
// processHead writes it into the page; the stores synced after routing are read now
|
|
61
|
+
const transport = new NetworkedTransport(page.networked);
|
|
62
|
+
transport.snapshotAfterRouting();
|
|
63
|
+
// the framework brands what it builds
|
|
64
|
+
const context = page.context; // eslint-disable-line @typescript-eslint/no-unsafe-type-assertion
|
|
65
|
+
const globalData = page.allRoutesData; // eslint-disable-line @typescript-eslint/no-unsafe-type-assertion
|
|
66
|
+
const networkedData = transport; // eslint-disable-line @typescript-eslint/no-unsafe-type-assertion
|
|
67
|
+
const {
|
|
68
|
+
internalStore,
|
|
69
|
+
stores,
|
|
70
|
+
storeSubscriptions
|
|
71
|
+
} = initStores(location, reqRes, globalData, matchedRouteInfo, serverDataLoading, context, networkedData);
|
|
72
|
+
const instance = new Instance(location, page.instanceConfig, reqRes, page.appRoutes, routes, internalStore, stores, storeSubscriptions, globalData, matchedRouteInfo);
|
|
73
|
+
instance.fileVersions = page.fileVersions;
|
|
74
|
+
instance.context = context;
|
|
75
|
+
instance.networkedData = networkedData;
|
|
76
|
+
instance.pipelineNetworked = page.networked ?? {};
|
|
77
|
+
return instance;
|
|
78
|
+
}
|
|
79
|
+
// The app's error page, the whole document, with what Init made - Post never ran - and the
|
|
80
|
+
// all-routes data if it came. Undefined when there is none, or Init never finished.
|
|
81
|
+
// message: shown in place of the error's own, which may hold what the browser should not see
|
|
82
|
+
pipelineErrorPage(app, progress, error, page, message) {
|
|
83
|
+
const ErrorPage = app?.errorPage;
|
|
84
|
+
if (app === undefined || ErrorPage === undefined) return undefined;
|
|
85
|
+
if (progress.init === undefined) return undefined;
|
|
86
|
+
const runner = runnerOf(app);
|
|
87
|
+
const init = progress.init.value;
|
|
88
|
+
const data = progress.allRoutesData;
|
|
89
|
+
const redirect = data instanceof RoutingRedirect || data instanceof WebRedirect;
|
|
90
|
+
const errorInfo = message === undefined ? makeTungstenErrorInfo(error) : {
|
|
91
|
+
error,
|
|
92
|
+
message
|
|
93
|
+
};
|
|
94
|
+
const routes = {}; // eslint-disable-line @typescript-eslint/no-unsafe-type-assertion -- nothing routes from the error page
|
|
95
|
+
const instance = this.pipelineInstance({
|
|
96
|
+
...page,
|
|
97
|
+
appRoutes: routes,
|
|
98
|
+
routes,
|
|
99
|
+
serverDataLoading: {
|
|
100
|
+
value: false
|
|
101
|
+
},
|
|
102
|
+
matchedRouteInfo: {
|
|
103
|
+
key: null,
|
|
104
|
+
params: {},
|
|
105
|
+
content: null
|
|
106
|
+
},
|
|
107
|
+
allRoutesData: redirect ? undefined : data,
|
|
108
|
+
context: runner.context(init, undefined),
|
|
109
|
+
networked: runner.networked(init, undefined)
|
|
110
|
+
});
|
|
111
|
+
instance.errorInfo = errorInfo;
|
|
112
|
+
return {
|
|
113
|
+
ErrorPage,
|
|
114
|
+
instance,
|
|
115
|
+
errorInfo
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
export const runnerOf = app => app.split === true ? splitServer : symmetricServer;
|
|
120
|
+
// what the instance calls for its routes: the pipeline's, with this request's Init
|
|
121
|
+
export const appRoutesFor = (app, init, dev) => reqRes => pipelineRoutes(app, reqRes, init, dev);
|
|
@@ -81,8 +81,8 @@ buildCodeFolder) {
|
|
|
81
81
|
// eslint-disable-line @stylistic/max-len
|
|
82
82
|
'\n' + coreResult.problems + '\nenv: ' + JSONstringify(tempEnv, null, 4));
|
|
83
83
|
}
|
|
84
|
-
|
|
85
|
-
//console.log('
|
|
84
|
+
globalThis.tungstenPrivateEnv = coreResult.value;
|
|
85
|
+
//console.log('globalThis.tungstenPrivateEnv', globalThis.tungstenPrivateEnv)
|
|
86
86
|
if (_firstLoad) cliOut('tungsten private env loaded and passed schema validation'); // save this so that we can show all messages about loading .env files first
|
|
87
87
|
}
|
|
88
88
|
if ('publicEnvSchema' in envSchemas) {
|
|
@@ -103,8 +103,8 @@ buildCodeFolder) {
|
|
|
103
103
|
// eslint-disable-line @stylistic/max-len
|
|
104
104
|
'\n' + coreResult.problems + '\npublic env: ' + JSONstringify(tempPublicEnv, null, 4));
|
|
105
105
|
}
|
|
106
|
-
|
|
107
|
-
//console.log('
|
|
106
|
+
globalThis.tungstenPublicEnv = coreResult.value;
|
|
107
|
+
//console.log('globalThis.tungstenPublicEnv', globalThis.tungstenPublicEnv)
|
|
108
108
|
if (_firstLoad) cliOut('tungsten public env loaded and passed schema validation'); // save this so that we can show all messages about loading .env files first
|
|
109
109
|
}
|
|
110
110
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type RequestHandler } from 'express';
|
|
2
|
+
import type { ModuleNamespace } from '../importModule.js';
|
|
3
|
+
export type WatchedServerMiddleware = {
|
|
4
|
+
handler: RequestHandler;
|
|
5
|
+
ready: Promise<void>;
|
|
6
|
+
close: () => Promise<void>;
|
|
7
|
+
};
|
|
8
|
+
export declare function watchedServerMiddleware(load: () => Promise<readonly RequestHandler[]>, watched: string, ignored: string[]): WatchedServerMiddleware;
|
|
9
|
+
export declare function middlewaresExport(module: ModuleNamespace, exportName: string, file: string): readonly RequestHandler[];
|
|
10
|
+
//# sourceMappingURL=watchedServerMiddleware.d.ts.map
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import express from 'express';
|
|
2
|
+
import chokidar from 'chokidar';
|
|
3
|
+
import { throwError } from '../throwError.js';
|
|
4
|
+
export function watchedServerMiddleware(load, watched, ignored) {
|
|
5
|
+
let current = null;
|
|
6
|
+
const watcher = chokidar.watch(watched, {
|
|
7
|
+
ignored,
|
|
8
|
+
ignoreInitial: true
|
|
9
|
+
});
|
|
10
|
+
// any change may be in the middleware's imports, so the next request loads it afresh
|
|
11
|
+
watcher.on('all', () => {
|
|
12
|
+
current = null;
|
|
13
|
+
});
|
|
14
|
+
const ready = new Promise(resolve => watcher.once('ready', () => resolve()));
|
|
15
|
+
const loaded = () => current ??= load().then(middlewares => express.Router().use([...middlewares]));
|
|
16
|
+
const handler = (req, res, next) => {
|
|
17
|
+
const attempt = loaded();
|
|
18
|
+
void attempt.then(router => {
|
|
19
|
+
router(req, res, next);
|
|
20
|
+
}, e => {
|
|
21
|
+
// a failed load isn't kept: the next request tries again
|
|
22
|
+
if (current === attempt) current = null;
|
|
23
|
+
next(e);
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
return {
|
|
27
|
+
handler,
|
|
28
|
+
ready,
|
|
29
|
+
close: () => watcher.close()
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
// the middleware export of a server middleware module, checked
|
|
33
|
+
export function middlewaresExport(module, exportName, file) {
|
|
34
|
+
if (!(exportName in module)) {
|
|
35
|
+
throwError('serverMiddleware', `export ${exportName} not found in ${file}`);
|
|
36
|
+
}
|
|
37
|
+
const middlewares = module[exportName];
|
|
38
|
+
if (!Array.isArray(middlewares) || middlewares.length === 0) {
|
|
39
|
+
throwError('serverMiddleware', `${exportName} in ${file} must be a non-empty array of middleware`);
|
|
40
|
+
}
|
|
41
|
+
if (!middlewares.every(m => typeof m === 'function')) {
|
|
42
|
+
throwError('serverMiddleware', `every entry of ${exportName} in ${file} must be a function`);
|
|
43
|
+
}
|
|
44
|
+
return middlewares; // eslint-disable-line @typescript-eslint/no-unsafe-type-assertion -- checked above
|
|
45
|
+
}
|
package/dist/TungstenApp.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
2
2
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
3
3
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
4
|
-
///
|
|
4
|
+
/// Unused
|
|
5
|
+
/// probably fails due to recursive dependency
|
|
5
6
|
import { cliLog } from './cliOutput.js';
|
|
6
7
|
import { Framework } from './Framework.js';
|
|
7
8
|
import { throwError } from './throwError.js';
|
package/dist/_client/hmr.js
CHANGED
|
@@ -36,7 +36,7 @@ es.addEventListener('css', () => {
|
|
|
36
36
|
es.addEventListener('js', ev => {
|
|
37
37
|
let payload;
|
|
38
38
|
try {
|
|
39
|
-
payload = JSON.parse(ev.data);
|
|
39
|
+
payload = JSON.parse(ev.data); // eslint-disable-line no-restricted-properties -- served verbatim: it can't import json.ts
|
|
40
40
|
} catch {
|
|
41
41
|
fullReload('bad payload');
|
|
42
42
|
return;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// into the app's .client folder by createClientFiles and served from there, outside the traced
|
|
3
3
|
// module graph - see the note atop hmr.ts for why that matters.
|
|
4
4
|
function bootIdOf(data) {
|
|
5
|
-
const payload = JSON.parse(data);
|
|
5
|
+
const payload = JSON.parse(data); // eslint-disable-line no-restricted-properties -- served verbatim: it can't import json.ts
|
|
6
6
|
if (typeof payload !== 'object' || payload === null || !('bootId' in payload)) return undefined;
|
|
7
7
|
return typeof payload.bootId === 'string' ? payload.bootId : undefined;
|
|
8
8
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// A pipeline needs an 'error' route. For a test with no failure to show: `errorRoute` in the
|
|
2
|
+
// array form, `error: errorEndpoint` in the object form
|
|
3
|
+
export const errorEndpoint = {
|
|
4
|
+
content: () => null
|
|
5
|
+
};
|
|
6
|
+
export const errorRoute = {
|
|
7
|
+
path: 'error',
|
|
8
|
+
...errorEndpoint
|
|
9
|
+
};
|
package/dist/appBuilder.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import type { MatchedRouteInfo } from './routing/MatchedRouteInfo.js';
|
|
|
5
5
|
import type { RoutesWithSettings } from './routing/Routes.js';
|
|
6
6
|
import type { NoDuplicatePaths, RoutesArray } from './routing/routesArray.js';
|
|
7
7
|
import type { Serializable } from './routing/Serializable.js';
|
|
8
|
+
import type { DataRedirect } from './routing/DataRedirect.js';
|
|
8
9
|
import type { TrueStore } from './Store/makeStore.js';
|
|
9
10
|
import type { Instance } from './Instance/Instance.js';
|
|
10
11
|
import { TungstenBaseSimpleStoreComponent, TungstenBaseStatefulStoreComponent, TungstenSignalsComponent, TungstenSimpleComponent, TungstenStatefulComponent } from './Components.jsx';
|
|
@@ -45,7 +46,7 @@ type ContextArg<C> = (new (reqRes: ReqResOrNull) => C) | {
|
|
|
45
46
|
server: new (reqRes: ReqRes) => C;
|
|
46
47
|
};
|
|
47
48
|
type NetworkedDataArg<C, ND> = (new (reqRes: ReqResOrNull, context: C) => ND) & (new (reqRes: ReqResOrNull, context: C) => Serializable<NoInfer<ND>>);
|
|
48
|
-
type GlobalDataArg<C, ND, G> = ((reqRes: ReqResOrNull, context: C, networkedData: ND) => Promise<G>) & ((reqRes: ReqResOrNull, context: C, networkedData: ND) => Promise<Serializable<NoInfer<G
|
|
49
|
+
type GlobalDataArg<C, ND, G> = ((reqRes: ReqResOrNull, context: C, networkedData: ND, location: string) => Promise<G | DataRedirect>) & ((reqRes: ReqResOrNull, context: C, networkedData: ND, location: string) => Promise<Serializable<NoInfer<G>> | DataRedirect>);
|
|
49
50
|
type StoreArg<C, ND, G, St> = new (reqRes: ReqResOrNull, context: C, networkedData: ND, globalData: G, matchedRouteInfo: MatchedRouteInfo) => St;
|
|
50
51
|
type RoutesArg<C, ND, G extends object> = RoutesWithSettings<G> | RoutesArray<G> | ((reqRes: ReqResOrNull, context: C, networkedData: ND) => RoutesWithSettings<G> | RoutesArray<G> | []);
|
|
51
52
|
export type AppStage<C extends object, ND extends object, G extends object, St extends object | undefined> = {
|
|
@@ -21,6 +21,7 @@ import { CssNames } from '../CssNames.js';
|
|
|
21
21
|
import { watch } from '../watch.js';
|
|
22
22
|
import slash from '../slash.js';
|
|
23
23
|
import { fixImportsInSassErrorMessage } from './fixImportsInSassErrorMessage.js';
|
|
24
|
+
import { StyleCompileError } from './StyleCompileError.js';
|
|
24
25
|
import { throwError } from '../throwError.js';
|
|
25
26
|
import { tallied } from '../timeProfiler.js';
|
|
26
27
|
import { makeComponentStylesCache } from '../build/componentStylesCache.js';
|
|
@@ -111,8 +112,9 @@ function sassScssToCss(data, fullFile, fullSourceFile, importBase, syntax) {
|
|
|
111
112
|
if (foundImportError) {
|
|
112
113
|
errorOut(`Tungsten uses modified import resolution for SASS. Relative imports must start with ./ or ../`);
|
|
113
114
|
}
|
|
114
|
-
|
|
115
|
-
|
|
115
|
+
throw new StyleCompileError(message, {
|
|
116
|
+
cause: e
|
|
117
|
+
});
|
|
116
118
|
}
|
|
117
119
|
const {
|
|
118
120
|
css
|
|
@@ -283,7 +285,7 @@ export function MakeBabelTransformComponentStyles(opts) {
|
|
|
283
285
|
// a single part and every module name collapsed to its bare filename —
|
|
284
286
|
// platform-dependent class names, and two components sharing a filename
|
|
285
287
|
// scoped identically.
|
|
286
|
-
const parts = relFilePath.split('/');
|
|
288
|
+
const parts = [...relFilePath.split('/')];
|
|
287
289
|
if (name === 'index') {
|
|
288
290
|
parts.pop();
|
|
289
291
|
} else {
|
|
@@ -717,7 +717,9 @@ export function MakeBabelTransformPackageImports(opts) {
|
|
|
717
717
|
reexports
|
|
718
718
|
} = lexerParse(code);
|
|
719
719
|
//console.log('lexInner exports', exports)
|
|
720
|
-
const exportsMap =
|
|
720
|
+
const exportsMap = {
|
|
721
|
+
...mapToObject(exports, value => [value, true])
|
|
722
|
+
};
|
|
721
723
|
//console.log('lexInner exports map', exportsMap)
|
|
722
724
|
for (const re of reexports) {
|
|
723
725
|
try {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
2
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
3
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
4
|
+
// a component's styles failed to compile: the message names the file, line and problem, so the
|
|
5
|
+
// report prints it alone - the stack is the compiler's, not the app's
|
|
6
|
+
export class StyleCompileError extends Error {
|
|
7
|
+
constructor(...args) {
|
|
8
|
+
super(...args);
|
|
9
|
+
_defineProperty(this, "name", 'StyleCompileError');
|
|
10
|
+
}
|
|
11
|
+
}
|