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
|
@@ -7,6 +7,7 @@ import { join, relative } from 'path';
|
|
|
7
7
|
// DevServer on the prod path too, so it is registered in createDevServer() instead
|
|
8
8
|
import { allObj as promiseAllObj } from 'sxy-lib/promises.js';
|
|
9
9
|
import { existsSync } from 'fs';
|
|
10
|
+
import { inspect } from 'util';
|
|
10
11
|
import { fixExtension } from '../fixExtension.js';
|
|
11
12
|
import { serverModuleLocation } from '../serverModuleLocation.js';
|
|
12
13
|
import slash from '../slash.js';
|
|
@@ -18,7 +19,6 @@ import { makeInstanceConfigFromFrameworkConfig } from '../makeInstanceConfigFrom
|
|
|
18
19
|
import { cliNews, cliOut, cliWarn, cliLog, cliError } from '../cliOutput.js';
|
|
19
20
|
import { getApiRoutes } from '../api/getApiRoutes.js';
|
|
20
21
|
import { standardizeWebPath } from '../standardizeWebPath.js';
|
|
21
|
-
import { log } from '../appOutput.js';
|
|
22
22
|
import { throwError } from '../throwError.js';
|
|
23
23
|
import { getRoutesDev } from '../getRoutesDevs.js';
|
|
24
24
|
import { getComponentDev } from '../getComponentDev.js';
|
|
@@ -27,7 +27,7 @@ import { serveStatic } from './serveStatic.js';
|
|
|
27
27
|
import { routing } from "./routing.js";
|
|
28
28
|
import { globalDataFunc } from '../routing/registerGlobalData.js';
|
|
29
29
|
import { createNetworkedData } from '../routing/routingRegistry.js';
|
|
30
|
-
import { TungstenServer } from "./TungstenServer.js";
|
|
30
|
+
import { appRoutesFor, runnerOf, TungstenServer } from "./TungstenServer.js";
|
|
31
31
|
import { portError } from './portError.js';
|
|
32
32
|
import { loadEnvsDev } from './loadEnvsDev.js';
|
|
33
33
|
import { initStores } from './initStores.js';
|
|
@@ -38,17 +38,22 @@ import { MatchedRoute } from '../routing/MatchedRoute.js';
|
|
|
38
38
|
import { responseStatus } from '../routing/MatchedRouteInfo.js';
|
|
39
39
|
import { toRoutes } from '../routing/routesArray.js';
|
|
40
40
|
import { resetRegistrations } from './resetRegistrations.js';
|
|
41
|
-
import { PipelineRequestHandler } from '../pipeline/PipelineRequestHandler.js';
|
|
42
41
|
import { importRoutesModule } from '../pipeline/importRoutesModule.js';
|
|
42
|
+
import { runStep } from '../pipeline/runPipeline.js';
|
|
43
43
|
import { iterationQueryString } from '../iterationQueryString.js';
|
|
44
44
|
import { onReloadEvent } from '../hmr/liveReloadHub.js';
|
|
45
45
|
import { importDevModuleWithRetry } from '../importDevModuleWithRetry.js';
|
|
46
|
+
import { ignoreGlobs } from '../build/ignoreGlobs.js';
|
|
47
|
+
import { middlewaresExport, watchedServerMiddleware } from './watchedServerMiddleware.js';
|
|
46
48
|
import { listenVerified, registerBootProbe } from './listenVerified.js';
|
|
47
49
|
import { JSONstringify } from '../json.js';
|
|
50
|
+
import { htmlEntities } from '../htmlEntities.js';
|
|
48
51
|
//import cookieParser from 'cookie-parser'
|
|
49
52
|
function debug(...texts) {
|
|
50
53
|
// console.log(...texts)
|
|
51
54
|
}
|
|
55
|
+
// 'request' re-imports serverMiddleware on every request, the earlier model, kept beside 'watch'
|
|
56
|
+
const serverMiddlewareReload = 'watch';
|
|
52
57
|
// what Chrome DevTools fetches to auto-connect a localhost project as a workspace
|
|
53
58
|
const chromeDevtoolsProjectSettingsPath = '/.well-known/appspecific/com.chrome.devtools.json';
|
|
54
59
|
export class DevServer extends TungstenServer {
|
|
@@ -70,17 +75,46 @@ export class DevServer extends TungstenServer {
|
|
|
70
75
|
_defineProperty(this, "apiRoutes", void 0);
|
|
71
76
|
_defineProperty(this, "apiPath", void 0);
|
|
72
77
|
_defineProperty(this, "server", void 0);
|
|
73
|
-
_defineProperty(this, "reqId", void 0);
|
|
74
78
|
_defineProperty(this, "firstRender", true);
|
|
75
79
|
_defineProperty(this, "iterationCount", 0);
|
|
76
80
|
_defineProperty(this, "serverIterationCount", 0);
|
|
77
81
|
_defineProperty(this, "liveReloadClients", new Set());
|
|
78
82
|
_defineProperty(this, "unsubscribeReload", null);
|
|
83
|
+
_defineProperty(this, "watchedMiddleware", null);
|
|
79
84
|
// Sent as the first event on every live-reload connection (see handleLiveReloadStream), so
|
|
80
85
|
// the client can tell a fresh reconnect (server process restarted, e.g. by tungsten devmon)
|
|
81
86
|
// apart from its first-ever connection, and reload only in the former case.
|
|
82
87
|
_defineProperty(this, "bootId", `${Date.now()}-${Math.random()}`);
|
|
83
88
|
_defineProperty(this, "addServerMiddleware", serverMiddleware => {
|
|
89
|
+
if (serverMiddlewareReload === 'watch') this.addWatchedServerMiddleware(serverMiddleware);else this.addPerRequestServerMiddleware(serverMiddleware);
|
|
90
|
+
});
|
|
91
|
+
_defineProperty(this, "addWatchedServerMiddleware", serverMiddleware => {
|
|
92
|
+
const [middlewareFile, middlewareExportName, middlewarePath] = serverMiddleware;
|
|
93
|
+
const path = middlewarePath.startsWith('/') ? middlewarePath : '/' + middlewarePath;
|
|
94
|
+
const {
|
|
95
|
+
projectDir,
|
|
96
|
+
codeLocation,
|
|
97
|
+
buildLocation
|
|
98
|
+
} = this.compilationInfo;
|
|
99
|
+
const {
|
|
100
|
+
testDirs,
|
|
101
|
+
testPatterns,
|
|
102
|
+
serverIgnoreDirs,
|
|
103
|
+
serverIgnorePatterns
|
|
104
|
+
} = this.config;
|
|
105
|
+
const load = async () => {
|
|
106
|
+
const location = serverModuleLocation(projectDir, 'dev', codeLocation, middlewareFile);
|
|
107
|
+
const file = 'file://' + location;
|
|
108
|
+
const module = await importDevModuleWithRetry(iterationQueryString(file, this.serverIterationCount++, 'middleware'));
|
|
109
|
+
return middlewaresExport(module, middlewareExportName, middlewareFile);
|
|
110
|
+
};
|
|
111
|
+
const ignored = ['**/node_modules/**', slash(`${buildLocation}/**`), ...ignoreGlobs(codeLocation, testDirs, testPatterns), ...ignoreGlobs(codeLocation, serverIgnoreDirs, serverIgnorePatterns)];
|
|
112
|
+
const watched = slash(`${codeLocation}/**/*.js`);
|
|
113
|
+
this.watchedMiddleware = watchedServerMiddleware(load, watched, ignored);
|
|
114
|
+
this.app.use(path, this.watchedMiddleware.handler);
|
|
115
|
+
cliOut(`Server Middleware added to server at ${path}`);
|
|
116
|
+
});
|
|
117
|
+
_defineProperty(this, "addPerRequestServerMiddleware", serverMiddleware => {
|
|
84
118
|
//console.log('addServerMiddleware')
|
|
85
119
|
const [middlewareFile, middlewareExportName, middlewarePath] = serverMiddleware;
|
|
86
120
|
const path = middlewarePath.startsWith('/') ? middlewarePath : '/' + middlewarePath;
|
|
@@ -195,35 +229,6 @@ export class DevServer extends TungstenServer {
|
|
|
195
229
|
const rel = fixExtension(slash(relative(this.compilationInfo.codeLocation, file)));
|
|
196
230
|
return `/${this.compilationInfo.codeSubPath}/${rel}`;
|
|
197
231
|
});
|
|
198
|
-
// pages under config.registration 'pipeline': the app is re-imported per request, as below
|
|
199
|
-
_defineProperty(this, "pipelineHandler", () => new PipelineRequestHandler({
|
|
200
|
-
dev: true,
|
|
201
|
-
config: this.config,
|
|
202
|
-
instanceConfig: () => makeInstanceConfigFromFrameworkConfig(this.config, true),
|
|
203
|
-
fileVersions: undefined,
|
|
204
|
-
loadApp: async () => {
|
|
205
|
-
this.firstRender = false;
|
|
206
|
-
const iteration = this.iterationCount++;
|
|
207
|
-
resetRegistrations();
|
|
208
|
-
await loadEnvsDev(this.config, iteration, this.initialProcessEnv, false);
|
|
209
|
-
const [app, Root] = await Promise.all([importRoutesModule(this.compilationInfo, this.config, iteration), this.config.useRootComponent ? getComponentDev(join(this.compilationInfo.buildCodeLocation, this.config.rootComponent), this.config.rootComponent, iteration) : null]);
|
|
210
|
-
return {
|
|
211
|
-
Root,
|
|
212
|
-
app
|
|
213
|
-
};
|
|
214
|
-
},
|
|
215
|
-
render: async (Root, instance) => {
|
|
216
|
-
if (this.framework.clientImportAliases === undefined) {
|
|
217
|
-
throwError('DevServer', 'framework.clientImportAliases is undefined');
|
|
218
|
-
}
|
|
219
|
-
return renderRootToHtmlDev(this.compilationInfo, this.framework.clientImportAliases, Root, instance, this.config, global.tungstenPublicEnv, '' // siteBasePathOverride
|
|
220
|
-
);
|
|
221
|
-
},
|
|
222
|
-
errorPage: error => {
|
|
223
|
-
this.errorLog(error);
|
|
224
|
-
return this.errorPage(error, []);
|
|
225
|
-
}
|
|
226
|
-
}));
|
|
227
232
|
_defineProperty(this, "handleRequestApi", async (req, res, next) => {
|
|
228
233
|
req.params.foo;
|
|
229
234
|
this.apiRoutes = await getApiRoutes(this.config, this.compilationInfo, 'dev');
|
|
@@ -274,18 +279,10 @@ export class DevServer extends TungstenServer {
|
|
|
274
279
|
let capturedContext = {};
|
|
275
280
|
let capturedNetworkedData = {};
|
|
276
281
|
try {
|
|
277
|
-
//const _firstRender = this.firstRender
|
|
278
282
|
this.firstRender = false;
|
|
279
283
|
const iteration = this.iterationCount++;
|
|
280
|
-
//console.log('received a frontend req', req.originalUrl, res.locals.reqId)
|
|
281
|
-
//// I think we need to pass req, (res?) to the app
|
|
282
|
-
//// so that it can set response codes
|
|
283
|
-
//// or
|
|
284
|
-
//// the app has to return some data other than response string
|
|
285
|
-
////
|
|
286
|
-
//// perhaps, set some return data in the instance
|
|
287
|
-
//// then return html string + other data
|
|
288
284
|
const location = req.url;
|
|
285
|
+
// make a cut down version of the app config that will be given to the instance
|
|
289
286
|
const instanceConfig = makeInstanceConfigFromFrameworkConfig(this.config, true);
|
|
290
287
|
if (this.framework.frameworkModules === undefined) {
|
|
291
288
|
throwError('DevServer.handleRequest()', 'framework.frameworkModules is undefined');
|
|
@@ -293,23 +290,22 @@ export class DevServer extends TungstenServer {
|
|
|
293
290
|
if (this.framework.clientImportAliases === undefined) {
|
|
294
291
|
throwError('DevServer.handleRequest()', 'framework.frameworkModules is undefined');
|
|
295
292
|
}
|
|
293
|
+
// ?
|
|
296
294
|
resetRegistrations();
|
|
297
|
-
//
|
|
295
|
+
// load env vars per request
|
|
298
296
|
await loadEnvsDev(this.config, iteration, this.initialProcessEnv, false);
|
|
299
|
-
// we are delaying instance creation until after we load the app code, to lets things initialise?
|
|
300
297
|
const reqRes = {
|
|
301
298
|
req,
|
|
302
299
|
res
|
|
303
300
|
};
|
|
304
|
-
//
|
|
301
|
+
// I think this is now unused, was probably related to networked stores
|
|
305
302
|
const serverDataLoading = {
|
|
306
303
|
value: false
|
|
307
304
|
};
|
|
308
|
-
|
|
309
|
-
if (this.config.serverSideRouting === false && this.config.useRootComponent) {
|
|
305
|
+
if (this.config.serverSideRouting === false) {
|
|
310
306
|
const [appRoutes, Root] = await Promise.all([getRoutesDev(this.compilationInfo, this.config, iteration), getComponentDev(join(this.compilationInfo.buildCodeLocation, this.config.rootComponent), this.config.rootComponent, iteration)]);
|
|
311
307
|
const instance = stubInstance(location, instanceConfig, reqRes, appRoutes);
|
|
312
|
-
sendStub(reqRes, undefined, await renderRootToHtmlDev(this.compilationInfo, this.framework.clientImportAliases, Root, instance, this.config,
|
|
308
|
+
sendStub(reqRes, undefined, await renderRootToHtmlDev(this.compilationInfo, this.framework.clientImportAliases, Root, instance, this.config, globalThis.tungstenPublicEnv, ''));
|
|
313
309
|
return;
|
|
314
310
|
}
|
|
315
311
|
//const routingPromise = getRoutesDev(this.compilationInfo, this.config, load).then(
|
|
@@ -322,35 +318,26 @@ export class DevServer extends TungstenServer {
|
|
|
322
318
|
return promiseAllObj({
|
|
323
319
|
appRoutes,
|
|
324
320
|
routes,
|
|
325
|
-
globalData: globalDataFunc.value !== undefined ? this.getGlobalData(globalDataFunc.value, reqRes, capturedContext, capturedNetworkedData).then(globalData => {
|
|
321
|
+
globalData: globalDataFunc.value !== undefined ? this.getGlobalData(globalDataFunc.value, reqRes, capturedContext, capturedNetworkedData, location).then(globalData => {
|
|
326
322
|
capturedGlobalData = globalData;
|
|
327
323
|
return globalData;
|
|
328
324
|
}).catch(e => {
|
|
329
325
|
const msg = 'Error getting global data';
|
|
326
|
+
console.log('cliError 1');
|
|
330
327
|
cliError(msg);
|
|
331
328
|
errorTrack.push(msg);
|
|
332
329
|
throw e;
|
|
333
330
|
}) : {},
|
|
331
|
+
// eslint-disable-line @typescript-eslint/no-unsafe-type-assertion
|
|
334
332
|
matchedRouteInfo: routing(location, routes, capturedContext, capturedNetworkedData, serverDataLoading).catch(e => {
|
|
335
333
|
const msg = 'Error performing routing';
|
|
334
|
+
console.log('cliError 2');
|
|
336
335
|
cliError(msg);
|
|
337
336
|
errorTrack.push(msg);
|
|
338
337
|
throw e;
|
|
339
338
|
})
|
|
340
339
|
});
|
|
341
|
-
// .catch(e => {
|
|
342
|
-
// const msg = 'Error when generating routes, getting global data, or performing routing'
|
|
343
|
-
// cliError(msg)
|
|
344
|
-
// errorTrack.push(msg)
|
|
345
|
-
// //cliError(e)
|
|
346
|
-
// throw e
|
|
347
|
-
// })
|
|
348
340
|
});
|
|
349
|
-
// routingPromise.catch(e => {
|
|
350
|
-
// cliError('ROUTING PROMISE ERR')
|
|
351
|
-
// //cliError(e)
|
|
352
|
-
// throw e
|
|
353
|
-
// })
|
|
354
341
|
let appRoutes;
|
|
355
342
|
let routes;
|
|
356
343
|
let globalData;
|
|
@@ -368,37 +355,20 @@ export class DevServer extends TungstenServer {
|
|
|
368
355
|
RootComponentClass
|
|
369
356
|
} = await promiseAllObj({
|
|
370
357
|
routing: routingPromise,
|
|
371
|
-
//RootComponentClass: getComponentDev(rootComponentFileFull, this.config.rootComponent, load)
|
|
372
358
|
RootComponentClass: getComponentDev(rootComponentFileFull, this.config.rootComponent, iteration).then(c => {
|
|
373
359
|
capturedRootComponentClass = c;
|
|
374
360
|
return c;
|
|
375
361
|
})
|
|
376
|
-
})
|
|
377
|
-
// .catch(e => {
|
|
378
|
-
// cliError('ROUTING AND ROOT ERR')
|
|
379
|
-
// //cliError(e)
|
|
380
|
-
// throw e
|
|
381
|
-
// //return undefined as any
|
|
382
|
-
// })
|
|
383
|
-
);
|
|
362
|
+
}));
|
|
384
363
|
} else {
|
|
385
|
-
//console.log('do routing')
|
|
386
364
|
({
|
|
387
365
|
appRoutes,
|
|
388
366
|
routes,
|
|
389
367
|
globalData,
|
|
390
368
|
matchedRouteInfo
|
|
391
369
|
} = await routingPromise);
|
|
392
|
-
//throwError('DevServer', 'useRootComponent = false not implemented yet')
|
|
393
370
|
}
|
|
394
|
-
|
|
395
|
-
//const routes = (typeof appRoutes === 'function') ? appRoutes(reqRes) : appRoutes
|
|
396
|
-
// load data, and do routing
|
|
397
|
-
// const [globalData, matchedRouteInfo] = await Promise.all([
|
|
398
|
-
// (globalDataFunc !== undefined) ? globalDataFunc(reqRes) : {},
|
|
399
|
-
// routing(location, routes, serverDataLoading)
|
|
400
|
-
// ])
|
|
401
|
-
const redirected = this.handleRedirects(res, matchedRouteInfo);
|
|
371
|
+
const redirected = this.handleRedirects(res, matchedRouteInfo, instanceConfig, globalData);
|
|
402
372
|
if (redirected) return; // end early
|
|
403
373
|
// make stores
|
|
404
374
|
const {
|
|
@@ -412,23 +382,11 @@ export class DevServer extends TungstenServer {
|
|
|
412
382
|
instance.networkedData = capturedNetworkedData;
|
|
413
383
|
let html;
|
|
414
384
|
if (RootComponentClass) {
|
|
415
|
-
html = await renderRootToHtmlDev(this.compilationInfo, this.framework.clientImportAliases, RootComponentClass, instance, this.config,
|
|
385
|
+
html = await renderRootToHtmlDev(this.compilationInfo, this.framework.clientImportAliases, RootComponentClass, instance, this.config, globalThis.tungstenPublicEnv, '' // siteBasePathOverride
|
|
416
386
|
);
|
|
417
387
|
} else {
|
|
418
|
-
html = await renderRootToHtmlDev(this.compilationInfo, this.framework.clientImportAliases, MatchedRoute, instance, this.config,
|
|
388
|
+
html = await renderRootToHtmlDev(this.compilationInfo, this.framework.clientImportAliases, MatchedRoute, instance, this.config, globalThis.tungstenPublicEnv, '' // siteBasePathOverride
|
|
419
389
|
);
|
|
420
|
-
// const { params, data } = matchedRouteInfo
|
|
421
|
-
// let { content } = matchedRouteInfo
|
|
422
|
-
// if (typeof content === 'function') {
|
|
423
|
-
// content = content(data, params, {} /* props */, globalData, location)
|
|
424
|
-
// //throwError('DevServer', 'route content is a function')
|
|
425
|
-
// }
|
|
426
|
-
// //console.log('content to render', content)
|
|
427
|
-
// html = await renderContentToHtmlDev(
|
|
428
|
-
// this.compilationInfo, this.framework.clientImportAliases,
|
|
429
|
-
// content, instance, this.config, global.tungstenPublicEnv,
|
|
430
|
-
// '' // siteBasePathOverride
|
|
431
|
-
// )
|
|
432
390
|
}
|
|
433
391
|
// a goto() during the render has already answered with a redirect
|
|
434
392
|
if (instance.redirected !== undefined) return;
|
|
@@ -437,8 +395,8 @@ export class DevServer extends TungstenServer {
|
|
|
437
395
|
res.status(responseStatus(instance.matchedRouteInfo));
|
|
438
396
|
res.send(html);
|
|
439
397
|
} catch (e) {
|
|
440
|
-
cliLog('error in
|
|
441
|
-
this.
|
|
398
|
+
cliLog('error in DevServer.handleRequest');
|
|
399
|
+
this.printError(e);
|
|
442
400
|
cliLog('');
|
|
443
401
|
// too late for an error page once a redirect has gone out
|
|
444
402
|
if (res.headersSent) return;
|
|
@@ -448,6 +406,124 @@ export class DevServer extends TungstenServer {
|
|
|
448
406
|
res.send(errorRouteHtml ?? this.errorPage(e, errorTrack));
|
|
449
407
|
}
|
|
450
408
|
});
|
|
409
|
+
// pages under config.registration 'pipeline': the app is re-imported per request, as above
|
|
410
|
+
_defineProperty(this, "handleRequestPipeline", async (req, res) => {
|
|
411
|
+
if (this.staticFileRegex.test(req.url)) {
|
|
412
|
+
cliLog(`Requested asset file ${req.url} was not found`);
|
|
413
|
+
res.status(404).end();
|
|
414
|
+
return;
|
|
415
|
+
}
|
|
416
|
+
// as handleRequest: a 404 without the render
|
|
417
|
+
if (req.url === chromeDevtoolsProjectSettingsPath) {
|
|
418
|
+
cliLog(`Chrome DevTools asked for ${req.url} - not supported yet, skipping the render`);
|
|
419
|
+
res.status(404).end();
|
|
420
|
+
return;
|
|
421
|
+
}
|
|
422
|
+
cliLog('handling ' + req.url);
|
|
423
|
+
const location = req.url;
|
|
424
|
+
const reqRes = {
|
|
425
|
+
req,
|
|
426
|
+
res
|
|
427
|
+
};
|
|
428
|
+
const instanceConfig = makeInstanceConfigFromFrameworkConfig(this.config, true);
|
|
429
|
+
// what the request reached, for the error page and the error track
|
|
430
|
+
let loaded;
|
|
431
|
+
const progress = {};
|
|
432
|
+
try {
|
|
433
|
+
if (this.framework.frameworkModules === undefined) {
|
|
434
|
+
throwError('DevServer.handleRequestPipeline()', 'framework.frameworkModules unset');
|
|
435
|
+
}
|
|
436
|
+
this.firstRender = false;
|
|
437
|
+
const iteration = this.iterationCount++;
|
|
438
|
+
resetRegistrations();
|
|
439
|
+
await loadEnvsDev(this.config, iteration, this.initialProcessEnv, false);
|
|
440
|
+
const [app, Root] = await Promise.all([importRoutesModule(this.compilationInfo, this.config, iteration), this.config.useRootComponent ? getComponentDev(join(this.compilationInfo.buildCodeLocation, this.config.rootComponent), this.config.rootComponent, iteration) : null]);
|
|
441
|
+
loaded = app;
|
|
442
|
+
if (this.config.serverSideRouting === false) {
|
|
443
|
+
const appRoutes = appRoutesFor(app, undefined, true);
|
|
444
|
+
const instance = stubInstance(location, instanceConfig, reqRes, appRoutes);
|
|
445
|
+
sendStub(reqRes, undefined, await this.renderPipelinePage(Root ?? MatchedRoute, instance));
|
|
446
|
+
return;
|
|
447
|
+
}
|
|
448
|
+
const serverDataLoading = {
|
|
449
|
+
value: false
|
|
450
|
+
};
|
|
451
|
+
const runner = runnerOf(app);
|
|
452
|
+
const {
|
|
453
|
+
init,
|
|
454
|
+
routes,
|
|
455
|
+
allRoutesData,
|
|
456
|
+
matchedRouteInfo,
|
|
457
|
+
recoveredFrom
|
|
458
|
+
} = await runner.route(app, reqRes, location, serverDataLoading, true, progress);
|
|
459
|
+
if (this.handleRedirects(res, matchedRouteInfo, instanceConfig, allRoutesData)) return;
|
|
460
|
+
if (recoveredFrom !== undefined) {
|
|
461
|
+
cliLog('DevServer.handleRequestPipeline recovered, rendering the error route');
|
|
462
|
+
const errorTrack = (progress.failedSteps ?? []).map(step => `Error during ${step}`);
|
|
463
|
+
this.printError(recoveredFrom, errorTrack);
|
|
464
|
+
cliLog('');
|
|
465
|
+
}
|
|
466
|
+
const post = await runStep(progress, 'Post', () => runner.post(app, reqRes, init, allRoutesData));
|
|
467
|
+
const instance = this.pipelineInstance({
|
|
468
|
+
location,
|
|
469
|
+
reqRes,
|
|
470
|
+
instanceConfig,
|
|
471
|
+
fileVersions: undefined,
|
|
472
|
+
appRoutes: appRoutesFor(app, init, true),
|
|
473
|
+
routes,
|
|
474
|
+
matchedRouteInfo,
|
|
475
|
+
serverDataLoading,
|
|
476
|
+
allRoutesData,
|
|
477
|
+
context: runner.context(init, post),
|
|
478
|
+
networked: runner.networked(init, post)
|
|
479
|
+
});
|
|
480
|
+
const html = await runStep(progress, 'render', () => this.renderPipelinePage(Root ?? MatchedRoute, instance));
|
|
481
|
+
// a goto() during the render has already answered with a redirect
|
|
482
|
+
if (instance.redirected !== undefined) return;
|
|
483
|
+
res.setHeader('Content-Type', 'text/html');
|
|
484
|
+
res.status(responseStatus(instance.matchedRouteInfo));
|
|
485
|
+
res.send(html);
|
|
486
|
+
} catch (e) {
|
|
487
|
+
const errorTrack = (progress.failedSteps ?? []).map(step => `Error during ${step}`);
|
|
488
|
+
//console.log('cliLog 1')
|
|
489
|
+
cliLog('error in DevServer.handleRequestPipeline');
|
|
490
|
+
this.printError(e, errorTrack);
|
|
491
|
+
cliLog('');
|
|
492
|
+
// too late for an error page once a redirect has gone out
|
|
493
|
+
if (res.headersSent) return;
|
|
494
|
+
const errorPage = this.pipelineErrorPage(loaded, progress, e, {
|
|
495
|
+
location,
|
|
496
|
+
reqRes,
|
|
497
|
+
instanceConfig,
|
|
498
|
+
fileVersions: undefined
|
|
499
|
+
});
|
|
500
|
+
let html;
|
|
501
|
+
if (errorPage !== undefined) {
|
|
502
|
+
const {
|
|
503
|
+
ErrorPage,
|
|
504
|
+
instance,
|
|
505
|
+
errorInfo
|
|
506
|
+
} = errorPage;
|
|
507
|
+
try {
|
|
508
|
+
html = await this.renderPipelinePage(ErrorPage, instance, errorInfo);
|
|
509
|
+
} catch (renderError) {
|
|
510
|
+
cliError('Error rendering the app\'s error page, falling back to the default one');
|
|
511
|
+
cliLog(renderError);
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
res.setHeader('Content-Type', 'text/html');
|
|
515
|
+
res.status(500);
|
|
516
|
+
res.send(html ?? this.errorPage(e, errorTrack));
|
|
517
|
+
}
|
|
518
|
+
});
|
|
519
|
+
_defineProperty(this, "renderPipelinePage", async (Root, instance, props) => {
|
|
520
|
+
if (this.framework.clientImportAliases === undefined) {
|
|
521
|
+
throwError('DevServer', 'framework.clientImportAliases is undefined');
|
|
522
|
+
}
|
|
523
|
+
return renderRootToHtmlDev(this.compilationInfo, this.framework.clientImportAliases, Root, instance, this.config, globalThis.tungstenPublicEnv, '',
|
|
524
|
+
// siteBasePathOverride
|
|
525
|
+
props);
|
|
526
|
+
});
|
|
451
527
|
// Attempts to render the app's own 'error' route instead of the dev server's generic
|
|
452
528
|
// error dump, using whatever `routes`/`RootComponentClass`/`globalData` handleRequest
|
|
453
529
|
// above managed to capture before it failed. Global data and route data are independent
|
|
@@ -490,7 +566,7 @@ export class DevServer extends TungstenServer {
|
|
|
490
566
|
const instance = new Instance(req.url, instanceConfig, reqRes, routes, routes, internalStore, stores, storeSubscriptions, globalData, matchedRouteInfo);
|
|
491
567
|
instance.context = context;
|
|
492
568
|
instance.networkedData = networkedData;
|
|
493
|
-
return await renderRootToHtmlDev(this.compilationInfo, this.framework.clientImportAliases, RootComponentClass ?? MatchedRoute, instance, this.config,
|
|
569
|
+
return await renderRootToHtmlDev(this.compilationInfo, this.framework.clientImportAliases, RootComponentClass ?? MatchedRoute, instance, this.config, globalThis.tungstenPublicEnv, '' // siteBasePathOverride
|
|
494
570
|
);
|
|
495
571
|
} catch (renderError) {
|
|
496
572
|
cliError('Error rendering app error route, falling back to default error page');
|
|
@@ -501,32 +577,43 @@ export class DevServer extends TungstenServer {
|
|
|
501
577
|
// private async handlePost(req: express.Request, res: express.Response): Promise<void> {
|
|
502
578
|
// throw new TungstenError(`Err - Dev server received a post request. Not supported yet.`)
|
|
503
579
|
// }
|
|
504
|
-
_defineProperty(this, "getGlobalData", async (func, reqRes, context, networkedData) => {
|
|
580
|
+
_defineProperty(this, "getGlobalData", async (func, reqRes, context, networkedData, location) => {
|
|
505
581
|
try {
|
|
506
|
-
return await func(reqRes, context, networkedData);
|
|
582
|
+
return await func(reqRes, context, networkedData, location);
|
|
507
583
|
} catch (e) {
|
|
508
584
|
cliError('Error fetching global data');
|
|
509
585
|
//cliError(e)
|
|
510
586
|
throw e;
|
|
511
587
|
}
|
|
512
588
|
});
|
|
513
|
-
_defineProperty(this, "
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
589
|
+
_defineProperty(this, "printError", (error, errorSites = []) => {
|
|
590
|
+
for (const step of errorSites) {
|
|
591
|
+
cliError(step);
|
|
592
|
+
}
|
|
593
|
+
//log((typeof error === 'object' && error !== null && 'stack' in error) ? error.stack : error)
|
|
594
|
+
cliLog(error);
|
|
517
595
|
});
|
|
518
|
-
_defineProperty(this, "errorPage", (error,
|
|
596
|
+
_defineProperty(this, "errorPage", (error, errorSites) => {
|
|
597
|
+
// const escapeHtml = (text: string) =>
|
|
598
|
+
// text.replaceAll('&', '&').replaceAll('<', '<').replaceAll('>', '>')
|
|
519
599
|
return `<!DOCTYPE html>
|
|
520
600
|
<html>
|
|
521
601
|
<head>
|
|
522
602
|
<title>Error</title>
|
|
523
|
-
<style>
|
|
603
|
+
<style>
|
|
604
|
+
html { font-family: arial; background-color: #2c3853; color: white; }
|
|
605
|
+
body { margin: 0 5%; }
|
|
606
|
+
h3.site { color: #ff3d3d; }
|
|
607
|
+
pre { white-space: pre-wrap; overflow-wrap: anywhere; }
|
|
608
|
+
</style>
|
|
524
609
|
</head>
|
|
525
610
|
<body>
|
|
526
611
|
<h1>Application Error</h1>
|
|
527
612
|
<section>
|
|
528
|
-
${
|
|
529
|
-
<pre>${
|
|
613
|
+
${errorSites.map(s => '<h3 class="site">' + s + '</h3>')}
|
|
614
|
+
<pre>${htmlEntities(inspect(error, {
|
|
615
|
+
depth: 6
|
|
616
|
+
}))}</pre>
|
|
530
617
|
</section>
|
|
531
618
|
</body>
|
|
532
619
|
</html>`;
|
|
@@ -570,6 +657,7 @@ export class DevServer extends TungstenServer {
|
|
|
570
657
|
_defineProperty(this, "stop", () => {
|
|
571
658
|
if (this.server !== undefined) this.server.close();
|
|
572
659
|
this.unsubscribeReload?.();
|
|
660
|
+
void this.watchedMiddleware?.close();
|
|
573
661
|
if (this.reloadDebounceTimer !== null) clearTimeout(this.reloadDebounceTimer);
|
|
574
662
|
for (const client of this.liveReloadClients) client.end();
|
|
575
663
|
this.liveReloadClients.clear();
|
|
@@ -591,13 +679,8 @@ export class DevServer extends TungstenServer {
|
|
|
591
679
|
this.requestedPort = port;
|
|
592
680
|
this.initialProcessEnv = initialProcessEnv;
|
|
593
681
|
this.app = express();
|
|
594
|
-
this.reqId = 0;
|
|
595
682
|
registerBootProbe(this.app, this.bootId); // first, so start() can prove it owns the port
|
|
596
683
|
//this.app.use(cookieParser)
|
|
597
|
-
this.app.use((req, res, next) => {
|
|
598
|
-
res.locals.reqId = this.reqId++;
|
|
599
|
-
next();
|
|
600
|
-
});
|
|
601
684
|
//if (tungstenPrivateEnv.DEBUG === true) {
|
|
602
685
|
this.app.use((req, res, next) => {
|
|
603
686
|
const host = String(req.header('host')); // host:port, the port left out when default
|
|
@@ -663,7 +746,7 @@ export class DevServer extends TungstenServer {
|
|
|
663
746
|
this.app.use(apiPath, express.json());
|
|
664
747
|
this.app.use(apiPath, this.handleRequestApi);
|
|
665
748
|
}
|
|
666
|
-
this.app.use(config.registration === 'pipeline' ? this.
|
|
749
|
+
this.app.use(config.registration === 'pipeline' ? this.handleRequestPipeline : this.handleRequest);
|
|
667
750
|
// !!! obsolete?
|
|
668
751
|
// start hooking into require to rewrite react requires to tungsten
|
|
669
752
|
//addRequireResolveHooks() // we need this for server side
|
|
@@ -23,8 +23,10 @@ export declare class ProdServer extends TungstenServer {
|
|
|
23
23
|
server?: Server;
|
|
24
24
|
private bootId;
|
|
25
25
|
constructor(framework: Framework, config: FrameworkConfigComplete, compilationInfo: CompilationInfo, appRoutes: AppRoutes<any>, RootComponentOrNull: AnyComponentType | null, serverMiddleware: ServerMiddleware | null, pipelineApp?: PipelineApp | null);
|
|
26
|
-
readonly
|
|
26
|
+
private readonly pipelineApp;
|
|
27
27
|
private handleRequestApi;
|
|
28
|
+
handleRequestPipeline: (req: express.Request, res: express.Response) => Promise<void>;
|
|
29
|
+
private renderPipelinePage;
|
|
28
30
|
handleRequest: (req: express.Request, res: express.Response) => Promise<void>;
|
|
29
31
|
private tryRenderErrorRoute;
|
|
30
32
|
private stubRoot;
|