tungsten 0.4.11 → 0.4.13
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/dist/.build-complete +1 -1
- package/dist/.tsbuildinfo +1 -0
- package/dist/AnyComponent.d.ts.map +1 -1
- package/dist/AnyComponent.js +1 -1
- package/dist/Components.d.ts.map +1 -1
- package/dist/Components.js +25 -23
- package/dist/ContentNode.js +2 -2
- package/dist/DomPointer.js +1 -1
- package/dist/DomRegion.js +3 -3
- package/dist/Framework.d.ts +2 -1
- package/dist/Framework.d.ts.map +1 -1
- package/dist/Framework.js +44 -35
- package/dist/FrameworkConfig.d.ts +16 -0
- package/dist/FrameworkConfig.d.ts.map +1 -1
- package/dist/FunctionComponentStandIn.js +8 -8
- package/dist/Instance/Instance.js +12 -12
- package/dist/RenderedContentNode.d.ts.map +1 -1
- package/dist/RenderedContentNode.js +4 -3
- package/dist/RenderingNode.js +2 -2
- package/dist/Sass.d.ts.map +1 -1
- package/dist/Sass.js +1 -0
- package/dist/Script.js +1 -1
- package/dist/Servers/DevServer.d.ts.map +1 -1
- package/dist/Servers/DevServer.js +33 -32
- package/dist/Servers/ProdServer.js +15 -15
- package/dist/Servers/StaticSiteServer.js +4 -4
- package/dist/Servers/TungstenServer.js +5 -5
- package/dist/Servers/devErrorPageAutoRetry.js +1 -1
- package/dist/Servers/initStores.js +3 -3
- package/dist/Servers/loadEnvsDev.d.ts +1 -1
- package/dist/Servers/loadEnvsDev.d.ts.map +1 -1
- package/dist/Servers/loadEnvsDev.js +10 -8
- package/dist/Servers/routing.d.ts.map +1 -1
- package/dist/Servers/routing.js +4 -4
- package/dist/Store/Store.js +1 -1
- package/dist/Store/TypeSafeStore.js +1 -1
- package/dist/Store/createStores.js +2 -2
- package/dist/Store/makeStore.js +3 -3
- package/dist/Store/registerStore.js +3 -3
- package/dist/TElement.js +1 -1
- package/dist/TungstenApp.js +9 -5
- package/dist/TungstenStyleObject.js +1 -1
- package/dist/__deproxy.js +2 -2
- package/dist/_client/client.js +3 -3
- package/dist/alive.js +1 -1
- package/dist/api/getApiRoutes.js +3 -3
- package/dist/api/getExport.d.ts.map +1 -1
- package/dist/api/getExport.js +5 -4
- package/dist/api/getExportDev.js +1 -1
- package/dist/appOutput.js +1 -1
- package/dist/auth/index.js +2 -2
- package/dist/babelPlugins/BabelAddDevCacheBust.d.ts.map +1 -1
- package/dist/babelPlugins/BabelAddDevCacheBust.js +4 -2
- package/dist/babelPlugins/BabelTransformBindDirect.js +4 -2
- package/dist/babelPlugins/BabelTransformBindVar.d.ts.map +1 -1
- package/dist/babelPlugins/BabelTransformBindVar.js +3 -3
- package/dist/babelPlugins/BabelTransformCjsToEsm.js +1 -1
- package/dist/babelPlugins/BabelTransformComponentState.d.ts.map +1 -1
- package/dist/babelPlugins/BabelTransformComponentState.js +2 -2
- package/dist/babelPlugins/BabelTransformComponentStyles.d.ts +2 -0
- package/dist/babelPlugins/BabelTransformComponentStyles.d.ts.map +1 -1
- package/dist/babelPlugins/BabelTransformComponentStyles.js +32 -15
- package/dist/babelPlugins/BabelTransformCssImports.d.ts.map +1 -1
- package/dist/babelPlugins/BabelTransformCssImports.js +3 -3
- package/dist/babelPlugins/BabelTransformDependencyImportsOld.js +1 -1
- package/dist/babelPlugins/BabelTransformDeproxyState.d.ts.map +1 -1
- package/dist/babelPlugins/BabelTransformDeproxyState.js +1 -1
- package/dist/babelPlugins/BabelTransformJsxExtensionsToJs.d.ts.map +1 -1
- package/dist/babelPlugins/BabelTransformJsxExtensionsToJs.js +6 -2
- package/dist/babelPlugins/BabelTransformPackageImports.d.ts.map +1 -1
- package/dist/babelPlugins/BabelTransformPackageImports.js +75 -53
- package/dist/babelPlugins/BabelTransformReactive.js +1 -1
- package/dist/babelPlugins/BabelTransformReactiveSvelteStyle.js +1 -1
- package/dist/babelPlugins/BabelTransformRemoveBlocks.d.ts.map +1 -1
- package/dist/babelPlugins/BabelTransformSxyFrameworkImports.js +1 -1
- package/dist/babelPlugins/BabelTransformUniqueComponents.js +1 -1
- package/dist/babelPlugins/fixImportsInSassErrorMessage.js +1 -1
- package/dist/babelPlugins/test.js +1 -1
- package/dist/babelPlugins/transformPackageImports/BabelTransformDependencyImportsCjs.d.ts.map +1 -1
- package/dist/babelPlugins/transformPackageImports/BabelTransformDependencyImportsCjs.js +5 -4
- package/dist/babelPlugins/transformPackageImports/BabelTransformDependencyImportsEsm.d.ts.map +1 -1
- package/dist/babelPlugins/transformPackageImports/BabelTransformDependencyImportsEsm.js +3 -2
- package/dist/babelPlugins/transformPackageImports/getWebLocationOfPackageFile.js +2 -2
- package/dist/bin/args.js +2 -2
- package/dist/bin/commands/build.js +6 -6
- package/dist/bin/commands/buildHelp.js +1 -1
- package/dist/bin/commands/clean.js +4 -4
- package/dist/bin/commands/compile.d.ts.map +1 -1
- package/dist/bin/commands/compile.js +24 -17
- package/dist/bin/commands/compileSimplePackage.js +3 -2
- package/dist/bin/commands/dev.d.ts.map +1 -1
- package/dist/bin/commands/dev.js +16 -9
- package/dist/bin/commands/devmon.js +4 -4
- package/dist/bin/commands/help.js +2 -2
- package/dist/bin/commands/start.js +2 -2
- package/dist/bin/commands/static.js +3 -3
- package/dist/bin/index.d.ts.map +1 -1
- package/dist/bin/index.js +24 -16
- package/dist/bin/moduleLoadAnalysis.js +2 -2
- package/dist/bin/vendorHook.d.ts +3 -0
- package/dist/bin/vendorHook.d.ts.map +1 -0
- package/dist/bin/vendorHook.js +34 -0
- package/dist/browserStorage.js +6 -4
- package/dist/build/babel.user.common.config.d.ts +9 -2
- package/dist/build/babel.user.common.config.d.ts.map +1 -1
- package/dist/build/babel.user.common.config.js +21 -16
- package/dist/build/bundle.d.ts +1 -1
- package/dist/build/bundle.d.ts.map +1 -1
- package/dist/build/bundle.js +15 -7
- package/dist/build/bundleBabelOptions.d.ts +6 -0
- package/dist/build/bundleBabelOptions.d.ts.map +1 -0
- package/dist/build/bundleBabelOptions.js +23 -0
- package/dist/build/combineComponentCss.js +2 -2
- package/dist/build/compileJavascript.d.ts +4 -0
- package/dist/build/compileJavascript.d.ts.map +1 -1
- package/dist/build/compileJavascript.js +174 -103
- package/dist/build/compileStyles.js +8 -8
- package/dist/build/compileUserApp.d.ts +1 -1
- package/dist/build/compileUserApp.d.ts.map +1 -1
- package/dist/build/compileUserApp.js +15 -12
- package/dist/build/componentStylesCache.d.ts +10 -0
- package/dist/build/componentStylesCache.d.ts.map +1 -0
- package/dist/build/componentStylesCache.js +54 -0
- package/dist/build/copyAssets.js +4 -4
- package/dist/build/copyPackageModulesToPackagesFolder.js +4 -4
- package/dist/build/copyPublicFiles.js +4 -4
- package/dist/build/createClientFiles.js +3 -3
- package/dist/build/createInstanceConfigFile.js +2 -2
- package/dist/build/createPackageVirtualFileSystems.js +1 -1
- package/dist/build/devBundle.js +5 -5
- package/dist/build/devBundle.rollup.config.d.ts.map +1 -1
- package/dist/build/devBundle.rollup.config.js +0 -1
- package/dist/build/frameworkDestLocation.d.ts +1 -0
- package/dist/build/frameworkDestLocation.d.ts.map +1 -1
- package/dist/build/frameworkDestLocation.js +8 -4
- package/dist/build/frameworkStylesheets.js +2 -2
- package/dist/build/getAllSxyClientModules.d.ts.map +1 -1
- package/dist/build/getAllSxyClientModules.js +4 -28
- package/dist/build/getPackageDirForFile.js +1 -1
- package/dist/build/getSxyClientPackageAliases.d.ts.map +1 -1
- package/dist/build/getSxyClientPackageAliases.js +4 -2
- package/dist/build/getTempDirForAppCompilation.js +1 -1
- package/dist/build/makeBabelRawConfig.d.ts +3 -0
- package/dist/build/makeBabelRawConfig.d.ts.map +1 -0
- package/dist/build/makeBabelRawConfig.js +12 -0
- package/dist/build/makeBabelUserDevConfig.d.ts +1 -1
- package/dist/build/makeBabelUserDevConfig.d.ts.map +1 -1
- package/dist/build/makeBabelUserDevConfig.js +11 -8
- package/dist/build/makeBabelUserProdConfig.d.ts +1 -1
- package/dist/build/makeBabelUserProdConfig.d.ts.map +1 -1
- package/dist/build/makeBabelUserProdConfig.js +10 -5
- package/dist/build/rollup.user.prod.config.d.ts.map +1 -1
- package/dist/build/rollup.user.prod.config.js +13 -11
- package/dist/build/rollupExtractComponentStylesheets.js +3 -3
- package/dist/build/sassImportParser.js +4 -4
- package/dist/build/tallyBabel.d.ts +3 -0
- package/dist/build/tallyBabel.d.ts.map +1 -0
- package/dist/build/tallyBabel.js +11 -0
- package/dist/calculateImportedStaticFileLocations.js +2 -2
- package/dist/calledFrom.js +2 -2
- package/dist/clone.js +4 -4
- package/dist/compat/context.d.ts.map +1 -1
- package/dist/compat/forwardRef.js +1 -1
- package/dist/compat/index.js +1 -1
- package/dist/compat/types.d.ts.map +1 -1
- package/dist/componentProxyHandlers.d.ts.map +1 -1
- package/dist/componentProxyHandlers.js +8 -12
- package/dist/components/Link.js +2 -2
- package/dist/components/PopMessages.js +3 -3
- package/dist/components/RawHtml.js +2 -2
- package/dist/components/Stylesheet.d.ts +1 -2
- package/dist/components/Stylesheet.d.ts.map +1 -1
- package/dist/components/Stylesheet.js +4 -4
- package/dist/components/bindable/BindableCheckbox.d.ts.map +1 -1
- package/dist/components/bindable/BindableCheckbox.js +1 -1
- package/dist/components/bindable/BindableInput.d.ts.map +1 -1
- package/dist/components/bindable/BindableInput.js +1 -1
- package/dist/components/bindable/BindableInputNonString.js +1 -1
- package/dist/components/bindable/BindableInputString.js +1 -1
- package/dist/components/bindable/BindableInputTyped.js +1 -1
- package/dist/components/bindable/BindableInputTypedLegacy.d.ts.map +1 -1
- package/dist/components/bindable/BindableInputTypedLegacy.js +1 -1
- package/dist/components/bindable/BindableRadio.d.ts.map +1 -1
- package/dist/components/bindable/BindableRadio.js +1 -1
- package/dist/components/bindable/BindableSelect.js +1 -1
- package/dist/components/bindable/BindableTextarea.d.ts.map +1 -1
- package/dist/components/bindable/BindableTextarea.js +1 -1
- package/dist/components/library/RichTextEditor/RichTextEditor.js +10 -10
- package/dist/components/library/RichTextEditor/contentTree.js +5 -5
- package/dist/components/library/RichTextEditor/sanitizeAuthoredHtml.js +2 -2
- package/dist/components/library/__StatefulMessage/StatefulMessage.js +2 -2
- package/dist/components/library/index.js +2 -2
- package/dist/concat.d.ts.map +1 -1
- package/dist/concat.js +2 -2
- package/dist/copy.d.ts.map +1 -1
- package/dist/createElement.js +1 -1
- package/dist/createRoutes.d.ts +1 -1
- package/dist/createRoutes.d.ts.map +1 -1
- package/dist/defaultConfig.d.ts +0 -1
- package/dist/defaultConfig.d.ts.map +1 -1
- package/dist/defaultConfig.js +2 -2
- package/dist/deleteDirs.js +1 -1
- package/dist/env/Env.js +2 -2
- package/dist/env/addToEnv.js +1 -1
- package/dist/env/funcs.js +4 -4
- package/dist/env/getEnvSchemas.d.ts +2 -2
- package/dist/env/getEnvSchemas.d.ts.map +1 -1
- package/dist/env/getEnvSchemas.js +16 -10
- package/dist/env/privateEnv.js +2 -2
- package/dist/env/privateEnvOrThrow.js +1 -1
- package/dist/env/publicEnv.js +1 -1
- package/dist/env/publicEnvOrThrow.js +1 -1
- package/dist/env/windowGlobalEnvStatement.d.ts.map +1 -1
- package/dist/filePathFromUrl.js +1 -1
- package/dist/findProjectDir.d.ts.map +1 -1
- package/dist/findProjectDir.js +19 -5
- package/dist/findUserConfig.js +7 -7
- package/dist/fixExtension.d.ts.map +1 -1
- package/dist/fixExtension.js +5 -3
- package/dist/foreach.js +1 -0
- package/dist/frameworkConfigSchema.d.ts +16 -0
- package/dist/frameworkConfigSchema.d.ts.map +1 -1
- package/dist/frameworkConfigSchema.js +14 -2
- package/dist/getComponent.d.ts.map +1 -1
- package/dist/getComponent.js +5 -5
- package/dist/getComponentDev.d.ts.map +1 -1
- package/dist/getComponentDev.js +1 -1
- package/dist/getFrameworkDir.js +1 -1
- package/dist/getRoutes.d.ts.map +1 -1
- package/dist/getRoutes.js +18 -27
- package/dist/getRoutesDevs.d.ts.map +1 -1
- package/dist/getRoutesDevs.js +1 -1
- package/dist/getStackTrace.js +1 -1
- package/dist/getUserConfig.js +7 -7
- package/dist/glob.d.ts +5 -0
- package/dist/glob.d.ts.map +1 -0
- package/dist/glob.js +103 -0
- package/dist/hasValidKey.js +1 -1
- package/dist/helpers/getFetchCompatibleHeaders.js +2 -2
- package/dist/helpers/index.js +2 -2
- package/dist/hmr/applyHmrModule.js +10 -10
- package/dist/hmr/componentIdentity.js +3 -3
- package/dist/hmr/instanceRegistry.js +2 -2
- package/dist/hooks/clearCurrentComponent.js +1 -1
- package/dist/hooks/getCurrentComponent.js +3 -3
- package/dist/hooks/index.js +5 -5
- package/dist/hooks/setCurrentComponent.js +1 -1
- package/dist/hooks/useCallback.js +2 -2
- package/dist/hooks/useEffect.js +2 -2
- package/dist/hooks/useInstance.js +1 -1
- package/dist/hooks/useMemo.js +2 -2
- package/dist/hooks/useReducer.d.ts.map +1 -1
- package/dist/hooks/useState.d.ts.map +1 -1
- package/dist/hooks/useState.js +3 -9
- package/dist/hydrate/hydrate.d.ts +1 -1
- package/dist/hydrate/hydrate.d.ts.map +1 -1
- package/dist/hydrate/hydrate.js +56 -54
- package/dist/hydrate/reconcileHydratedAttributes.js +5 -5
- package/dist/index.js +2 -2
- package/dist/indexInner.d.ts +1 -1
- package/dist/indexInner.d.ts.map +1 -1
- package/dist/indexInner.js +45 -45
- package/dist/innerHtmlFromProps.js +1 -1
- package/dist/isBrowser.js +1 -1
- package/dist/isDev.js +1 -1
- package/dist/isProd.js +1 -1
- package/dist/isServer.js +1 -1
- package/dist/jsx-runtime.js +1 -1
- package/dist/jsxRuntime.d.ts.map +1 -1
- package/dist/jsxRuntime.js +12 -7
- package/dist/jsxRuntimeSignals.d.ts.map +1 -1
- package/dist/jsxRuntimeSignals.js +15 -8
- package/dist/makeFinalConfig.d.ts.map +1 -1
- package/dist/makeFinalConfig.js +3 -3
- package/dist/makeInstanceConfigFromFrameworkConfig.js +1 -1
- package/dist/makeServerRpc.js +3 -3
- package/dist/markOptionSelected.js +2 -2
- package/dist/mergeConfigs.d.ts.map +1 -1
- package/dist/mergeConfigs.js +11 -2
- package/dist/mutatingFunctions.js +3 -3
- package/dist/nbsp.js +1 -1
- package/dist/output.js +1 -1
- package/dist/pop.js +2 -2
- package/dist/postcssPlugins/TransformCssNames.js +8 -8
- package/dist/postcssPlugins/parseSelectors.js +1 -1
- package/dist/postcssPlugins/parseSelectorsRich.js +1 -1
- package/dist/postcssPlugins/scopeAnimationValue.js +2 -2
- package/dist/propsAreEqual.js +3 -3
- package/dist/rawHtml/filterContentNode.js +4 -4
- package/dist/rawHtml/parseHtml.js +5 -5
- package/dist/rawHtml/sanitizeHtml.js +3 -3
- package/dist/rawHtml/tokenizeHtml.js +2 -2
- package/dist/render/addImportMap.js +2 -2
- package/dist/render/classComponentNodeToRenderingTree.js +4 -4
- package/dist/render/componentNodeToRenderingTree.d.ts.map +1 -1
- package/dist/render/componentNodeToRenderingTree.js +13 -24
- package/dist/render/contentNodeToHtml.js +11 -11
- package/dist/render/contentToHtml.d.ts.map +1 -1
- package/dist/render/contentToHtml.js +5 -5
- package/dist/render/contentToHtmlDev.js +1 -1
- package/dist/render/contentTreeToRenderingTree.js +7 -7
- package/dist/render/functionComponentNodeToRenderingTree.js +4 -4
- package/dist/render/getFunctionBodyAsString.d.ts.map +1 -1
- package/dist/render/getFunctionBodyAsString.js +3 -6
- package/dist/render/instantiateClassComponent.js +2 -2
- package/dist/render/instantiateComponent.js +3 -3
- package/dist/render/instantiateFunctionComponent.js +2 -2
- package/dist/render/printComponentNameInSource.js +1 -1
- package/dist/render/processHead.js +5 -5
- package/dist/render/processHtmlNode.js +1 -1
- package/dist/render/processProps.js +4 -4
- package/dist/render/processRenderingNodeHtml.js +6 -6
- package/dist/render/renderingTreeToHtml.d.ts.map +1 -1
- package/dist/render/renderingTreeToHtml.js +16 -16
- package/dist/render/rootToHtml.d.ts.map +1 -1
- package/dist/render/rootToHtml.js +2 -2
- package/dist/render/rootToHtmlDev.js +1 -1
- package/dist/requests/fetch/delete.js +2 -2
- package/dist/requests/fetch/get.js +3 -3
- package/dist/requests/fetch/patch.js +2 -2
- package/dist/requests/fetch/post.js +2 -2
- package/dist/requests/fetch/put.js +2 -2
- package/dist/requests/index.js +5 -5
- package/dist/routing/MatchedRoute.js +2 -2
- package/dist/routing/Route.js +1 -1
- package/dist/routing/RouteDataFunction.type.d.ts.map +1 -1
- package/dist/routing/RoutesWithSafeParams.js +1 -1
- package/dist/routing/WebRedirect.d.ts.map +1 -1
- package/dist/routing/compareRequestToRegex.js +2 -2
- package/dist/routing/getPathPriority.js +2 -2
- package/dist/routing/matchPath.js +3 -3
- package/dist/routing/patternToRegex.js +1 -1
- package/dist/server.js +3 -3
- package/dist/serverModuleLocation.d.ts +3 -0
- package/dist/serverModuleLocation.d.ts.map +1 -0
- package/dist/serverModuleLocation.js +12 -0
- package/dist/serverRpc.d.ts.map +1 -1
- package/dist/settings.d.ts +4 -0
- package/dist/settings.d.ts.map +1 -1
- package/dist/settings.js +9 -0
- package/dist/slash.d.ts +2 -0
- package/dist/slash.d.ts.map +1 -0
- package/dist/slash.js +5 -0
- package/dist/spawnShellCommand.js +1 -1
- package/dist/standardSchema.js +1 -1
- package/dist/staticGen/getAppRoutes.js +3 -3
- package/dist/staticGen/staticGen.d.ts.map +1 -1
- package/dist/staticGen/staticGen.js +16 -14
- package/dist/staticGen/staticGenFunctions.js +1 -1
- package/dist/style/jssToCss.d.ts.map +1 -1
- package/dist/style/jssToCss.js +13 -11
- package/dist/style/styleContent.js +1 -1
- package/dist/style/styleContentSxy.js +8 -8
- package/dist/style/unusedStyles.d.ts.map +1 -1
- package/dist/style/unusedStyles.js +1 -1
- package/dist/sync/index.js +1 -1
- package/dist/syncServer/preload.js +1 -1
- package/dist/testing/host.js +12 -12
- package/dist/testing/hydrateTestApp.d.ts.map +1 -1
- package/dist/testing/hydrateTestApp.js +18 -18
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +11 -11
- package/dist/testing/installTestStyleProcessors.js +2 -2
- package/dist/testing/loadEnv.d.ts +4 -1
- package/dist/testing/loadEnv.d.ts.map +1 -1
- package/dist/testing/loadEnv.js +5 -5
- package/dist/testing/temp/componentPackageMock.js +5 -5
- package/dist/testing/temp/contentHtmlElements.js +2 -2
- package/dist/throwError.js +2 -2
- package/dist/timeProfiler.d.ts +5 -1
- package/dist/timeProfiler.d.ts.map +1 -1
- package/dist/timeProfiler.js +76 -24
- package/dist/todo.js +2 -1
- package/dist/update/integrateUpdateVdom.d.ts.map +1 -1
- package/dist/update/integrateUpdateVdom.js +44 -41
- package/dist/update/integrateUpdateVdomPrebuild.js +5 -5
- package/dist/validChildren.js +2 -2
- package/dist/warnOnFrameworkChange.js +2 -2
- package/dist/watch.js +2 -2
- package/dist/zones/react.js +3 -3
- package/package.json +27 -39
- package/types/modules.d.ts +2 -1
- package/vendor/babel-core.js +26 -0
- package/vendor/babel-parser.js +9 -0
- package/vendor/babel-plugin-syntax-import-assertions.js +50 -0
- package/vendor/babel-preset-react.js +872 -0
- package/vendor/babel-preset-typescript.js +26 -0
- package/vendor/babel-types.js +9 -0
- package/vendor/chalk-extensions.js +1994 -0
- package/vendor/chalk.js +647 -0
- package/vendor/chokidar.js +6889 -0
- package/vendor/chunk-1TN2rK3j.js +1218 -0
- package/vendor/chunk-1UuLTU0U.js +34 -0
- package/vendor/chunk-B_NeooyV.js +86 -0
- package/vendor/chunk-C12hSZn7.js +88 -0
- package/vendor/chunk-C3YkUGz5.js +19 -0
- package/vendor/chunk-C3fcZDjl.js +41964 -0
- package/vendor/chunk-C9FSKeSx.js +14603 -0
- package/vendor/chunk-CPArXGxa.js +14623 -0
- package/vendor/cjs-module-lexer.js +6 -0
- package/vendor/dotenv.js +412 -0
- package/vendor/express.js +40577 -0
- package/vendor/import-meta-resolve.js +2201 -0
- package/vendor/manifest.json +29 -0
- package/vendor/postcss.js +8546 -0
- package/vendor/serialize-javascript.js +293 -0
- package/vendor/sxy-lib-arrays.js +113 -0
- package/vendor/sxy-lib-object-copy.js +1781 -0
- package/vendor/sxy-lib-objects.js +156 -0
- package/vendor/sxy-lib-promises.js +47 -0
- package/vendor/sxy-package-investigator.js +202 -0
- package/vendor/valibot.js +7664 -0
- package/dist/Servers/hono/DevServerHono.d.ts +0 -2
- package/dist/Servers/hono/DevServerHono.d.ts.map +0 -1
- package/dist/Servers/hono/DevServerHono.js +0 -423
- package/dist/Servers/hono/ProdServerHono.d.ts +0 -2
- package/dist/Servers/hono/ProdServerHono.d.ts.map +0 -1
- package/dist/Servers/hono/ProdServerHono.js +0 -220
- package/dist/Servers/hono/TungstenServerHono.d.ts +0 -6
- package/dist/Servers/hono/TungstenServerHono.d.ts.map +0 -1
- package/dist/Servers/hono/TungstenServerHono.js +0 -36
- package/dist/api/ApiEndpointHono.d.ts +0 -3
- package/dist/api/ApiEndpointHono.d.ts.map +0 -1
- package/dist/api/ApiEndpointHono.js +0 -1
- package/dist/api/ApiRouteHono.d.ts +0 -7
- package/dist/api/ApiRouteHono.d.ts.map +0 -1
- package/dist/api/ApiRouteHono.js +0 -1
- package/dist/api/ApiRoutesHono.d.ts +0 -5
- package/dist/api/ApiRoutesHono.d.ts.map +0 -1
- package/dist/api/ApiRoutesHono.js +0 -1
- package/dist/api/getApiRoutesHono.d.ts +0 -6
- package/dist/api/getApiRoutesHono.d.ts.map +0 -1
- package/dist/api/getApiRoutesHono.js +0 -14
- package/dist/build/compilePackages.d.ts +0 -2
- package/dist/build/compilePackages.d.ts.map +0 -1
- package/dist/build/compilePackages.js +0 -89
- package/dist/build/findRequiredUserModule.d.ts +0 -2
- package/dist/build/findRequiredUserModule.d.ts.map +0 -1
- package/dist/build/findRequiredUserModule.js +0 -36
- package/dist/build/processPackage.d.ts +0 -4
- package/dist/build/processPackage.d.ts.map +0 -1
- package/dist/build/processPackage.js +0 -91
- package/dist/build/tallyBabelPlugins.d.ts +0 -3
- package/dist/build/tallyBabelPlugins.d.ts.map +0 -1
- package/dist/build/tallyBabelPlugins.js +0 -68
- package/dist/testing/loadEnvSetup.d.ts +0 -2
- package/dist/testing/loadEnvSetup.d.ts.map +0 -1
- package/dist/testing/loadEnvSetup.js +0 -7
- package/sxy-loader.config.js +0 -7
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $contentNull } from
|
|
2
|
-
import { $type } from
|
|
1
|
+
import { $contentNull } from './symbols.js';
|
|
2
|
+
import { $type } from './contentNodeSymbols.js';
|
|
3
3
|
// rendered content node symbols
|
|
4
4
|
export const $string = Symbol('string');
|
|
5
5
|
export const $number = Symbol('number');
|
|
@@ -18,6 +18,7 @@ export function RenderedContentNodeIsSingle(rcn) {
|
|
|
18
18
|
export function WideRenderedContentNodeIsRendered(wrcn) {
|
|
19
19
|
return wrcn !== $contentNull && !RenderedContentNodeIsNonRendered(wrcn);
|
|
20
20
|
}
|
|
21
|
+
/* eslint-disable @typescript-eslint/no-unnecessary-condition -- type guards: the null checks stay although the declared unions exclude null */
|
|
21
22
|
export function RenderedContentNodeIsArray(rcn) {
|
|
22
23
|
return Array.isArray(rcn);
|
|
23
24
|
}
|
|
@@ -88,7 +89,7 @@ export function makeRenderedContentNodeHtml(newNode, domNode, renderedChildren)
|
|
|
88
89
|
return {
|
|
89
90
|
...newNode,
|
|
90
91
|
domNode: domNode,
|
|
91
|
-
// eslint-disable-line
|
|
92
|
+
// eslint-disable-line @typescript-eslint/no-unsafe-type-assertion -- casting to TungstenHTMLElement just allows arbitrary keys to be added.
|
|
92
93
|
renderedChildren
|
|
93
94
|
};
|
|
94
95
|
}
|
package/dist/RenderingNode.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ContentNodeIsLiteral } from
|
|
2
|
-
import { $key, $props, $type } from
|
|
1
|
+
import { ContentNodeIsLiteral } from './ContentNode.js';
|
|
2
|
+
import { $key, $props, $type } from './contentNodeSymbols.js';
|
|
3
3
|
export const $component = Symbol('element');
|
|
4
4
|
export const $element = Symbol('element');
|
|
5
5
|
export const $children = Symbol('children');
|
package/dist/Sass.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sass.d.ts","sourceRoot":"","sources":["../src/Sass.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Sass.d.ts","sourceRoot":"","sources":["../src/Sass.ts"],"names":[],"mappings":"AAKA,wBAAgB,IAAI,CAAC,MAAM,EAAE,MAAM;;;;EAMlC"}
|
package/dist/Sass.js
CHANGED
package/dist/Script.js
CHANGED
|
@@ -2,7 +2,7 @@ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object
|
|
|
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
|
import { TungstenSimpleComponent } from "./Components.js";
|
|
5
|
-
import { jsx as _jsx } from "tungsten/
|
|
5
|
+
import { jsx as _jsx } from "tungsten/jsx-runtime";
|
|
6
6
|
export class Script extends TungstenSimpleComponent {
|
|
7
7
|
constructor(...args) {
|
|
8
8
|
super(...args);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DevServer.d.ts","sourceRoot":"","sources":["../../src/Servers/DevServer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAClC,OAAO,OAA4D,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"DevServer.d.ts","sourceRoot":"","sources":["../../src/Servers/DevServer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAClC,OAAO,OAA4D,MAAM,SAAS,CAAA;AAQlF,OAAO,KAAK,EAAE,uBAAuB,EAAwB,MAAM,uBAAuB,CAAA;AAC1F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAA;AAClE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAMpD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAW3C,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAIrC,OAAO,EAAE,UAAU,EAAkB,kBAAkB,EAAE,MAAM,kCAAkC,CAAA;AAEjG,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAqBrD,qBAAa,SAAU,SAAQ,cAAc;IACzC,SAAS,EAAE,SAAS,CAAA;IACpB,MAAM,EAAE,uBAAuB,CAAA;IAC/B,eAAe,EAAE,eAAe,CAAA;IAChC,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAO;IAC9B,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACzC,GAAG,EAAE,OAAO,CAAC,WAAW,CAAA;IAExB,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,OAAO,CAAO;IAC3B,cAAc,EAAE,MAAM,CAAI;IAC1B,oBAAoB,EAAE,MAAM,CAAI;IAChC,OAAO,CAAC,iBAAiB,CAA2B;IACpD,OAAO,CAAC,iBAAiB,CAA4B;IAIrD,OAAO,CAAC,MAAM,CAA2C;gBAErD,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,uBAAuB,EAAE,eAAe,EAAE,eAAe,EACvF,iBAAiB,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM;IAgIlD,OAAO,CAAC,mBAAmB,CA2E1B;IAKD,OAAO,CAAC,sBAAsB,CAQ7B;IACD,OAAO,CAAC,mBAAmB,CAA8B;IACzD,OAAO,CAAC,iBAAiB,CAA+B;IACxD,OAAO,CAAC,kBAAkB,CAAyB;IACnD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,gBAAgB,CAAM;IAC9C,OAAO,CAAC,oBAAoB,CAwB3B;IACD,OAAO,CAAC,mBAAmB,CAK1B;IACD,OAAO,CAAC,gBAAgB,CAcvB;IAED,OAAO,CAAC,aAAa,CA+NpB;IAaD,OAAO,CAAC,mBAAmB,CAsC1B;IAID,aAAa,GAAU,MAAM,kBAAkB,EAAE,QAAQ,MAAM,yBAQ9D;IACD,QAAQ,GAAI,OAAO,OAAO,UAIzB;IACD,SAAS,GAAI,OAAO,OAAO,EAAE,YAAY,MAAM,EAAE,YAiBhD;IACD,KAAK,QAAO,OAAO,CAAC,MAAM,CAAC,CAO1B;IACD,IAAI,aAMH;CAGJ"}
|
|
@@ -3,36 +3,39 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
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
|
import express from 'express';
|
|
5
5
|
import { join, relative } from 'path';
|
|
6
|
-
import
|
|
6
|
+
import { fixExtension } from '../fixExtension.js';
|
|
7
|
+
import { serverModuleLocation } from '../serverModuleLocation.js';
|
|
8
|
+
import slash from '../slash.js';
|
|
7
9
|
// moduleReloader (V important ES module cache control) is not imported here - Framework imports
|
|
8
10
|
// DevServer on the prod path too, so it is registered in createDevServer() instead
|
|
9
11
|
import { allObj as promiseAllObj } from 'sxy-lib/promises.js';
|
|
10
|
-
import { staticFolder, assetsFolder, publicFolder, packagesFolder, clientFolder, componentCssFolder, frameworkCssFolder } from
|
|
11
|
-
import { rootToHtmlDev as renderRootToHtmlDev } from
|
|
12
|
-
import { Instance } from
|
|
13
|
-
import { TungstenError } from
|
|
14
|
-
import { makeInstanceConfigFromFrameworkConfig } from
|
|
15
|
-
import { cliNews, cliOut, cliWarn, cliLog, cliError } from
|
|
12
|
+
import { staticFolder, assetsFolder, publicFolder, packagesFolder, clientFolder, componentCssFolder, frameworkCssFolder } from '../settings.js';
|
|
13
|
+
import { rootToHtmlDev as renderRootToHtmlDev } from '../render/rootToHtmlDev.js';
|
|
14
|
+
import { Instance } from '../Instance/Instance.js';
|
|
15
|
+
import { TungstenError } from '../TungstenError.js';
|
|
16
|
+
import { makeInstanceConfigFromFrameworkConfig } from '../makeInstanceConfigFromFrameworkConfig.js';
|
|
17
|
+
import { cliNews, cliOut, cliWarn, cliLog, cliError } from '../cliOutput.js'; // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
16
18
|
import { existsSync } from 'fs';
|
|
17
|
-
import { getApiRoutes } from
|
|
18
|
-
import { standardizeWebPath } from
|
|
19
|
-
import { log } from
|
|
20
|
-
import { throwError } from
|
|
21
|
-
import { getRoutesDev } from
|
|
22
|
-
import { getComponentDev } from
|
|
23
|
-
import { serveStatic } from
|
|
19
|
+
import { getApiRoutes } from '../api/getApiRoutes.js';
|
|
20
|
+
import { standardizeWebPath } from '../standardizeWebPath.js';
|
|
21
|
+
import { log } from '../appOutput.js';
|
|
22
|
+
import { throwError } from '../throwError.js';
|
|
23
|
+
import { getRoutesDev } from '../getRoutesDevs.js';
|
|
24
|
+
import { getComponentDev } from '../getComponentDev.js';
|
|
25
|
+
import { serveStatic } from './serveStatic.js';
|
|
26
|
+
// old loading method
|
|
24
27
|
import { routing } from "./routing.js";
|
|
25
|
-
import { globalDataFunc } from
|
|
28
|
+
import { globalDataFunc } from '../routing/registerGlobalData.js';
|
|
26
29
|
import { TungstenServer } from "./TungstenServer.js";
|
|
27
|
-
import { portError } from
|
|
28
|
-
import { loadEnvsDev } from
|
|
29
|
-
import { initStores } from
|
|
30
|
-
import { makeTungstenErrorInfo } from
|
|
31
|
-
import { MatchedRoute } from
|
|
32
|
-
import { iterationQueryString } from
|
|
33
|
-
import { onReloadEvent } from
|
|
34
|
-
import { importDevModuleWithRetry } from
|
|
35
|
-
import { devErrorPageAutoRetryScript } from
|
|
30
|
+
import { portError } from './portError.js';
|
|
31
|
+
import { loadEnvsDev } from './loadEnvsDev.js';
|
|
32
|
+
import { initStores } from './initStores.js';
|
|
33
|
+
import { makeTungstenErrorInfo } from '../routing/TungstenErrorInfo.js';
|
|
34
|
+
import { MatchedRoute } from '../routing/MatchedRoute.js';
|
|
35
|
+
import { iterationQueryString } from '../iterationQueryString.js';
|
|
36
|
+
import { onReloadEvent } from '../hmr/liveReloadHub.js';
|
|
37
|
+
import { importDevModuleWithRetry } from '../importDevModuleWithRetry.js';
|
|
38
|
+
import { devErrorPageAutoRetryScript } from './devErrorPageAutoRetry.js';
|
|
36
39
|
//import cookieParser from 'cookie-parser'
|
|
37
40
|
function debug(...texts) {
|
|
38
41
|
// console.log(...texts)
|
|
@@ -76,7 +79,7 @@ export class DevServer extends TungstenServer {
|
|
|
76
79
|
// + ` when trying to load server middleware`
|
|
77
80
|
// )
|
|
78
81
|
// }
|
|
79
|
-
// const middlewares = middlewareModule[middlewareExportName] as RequestHandler[] // eslint-disable-line
|
|
82
|
+
// const middlewares = middlewareModule[middlewareExportName] as RequestHandler[] // eslint-disable-line @typescript-eslint/no-unsafe-type-assertion
|
|
80
83
|
// this.app.use(path, middlewares)
|
|
81
84
|
// return
|
|
82
85
|
this.app.use(path, async (req, res, next) => {
|
|
@@ -91,13 +94,13 @@ export class DevServer extends TungstenServer {
|
|
|
91
94
|
// [*] const middlewares = await middlewaresPromise
|
|
92
95
|
try {
|
|
93
96
|
//const load = await createLoad(import.meta.url, sxyLoaderConfig)
|
|
94
|
-
const fullFilePath = 'file://' +
|
|
97
|
+
const fullFilePath = 'file://' + serverModuleLocation(this.compilationInfo.projectDir, 'dev', this.compilationInfo.codeLocation, middlewareFile);
|
|
95
98
|
//const middlewareModule = await load(fullFilePath)
|
|
96
99
|
const middlewareModule = await importDevModuleWithRetry(iterationQueryString(fullFilePath, this.serverIterationCount++, 'middleware'));
|
|
97
100
|
if (!(middlewareExportName in middlewareModule)) {
|
|
98
101
|
throwError('DevServer', `export ${middlewareExportName} not found in ${middlewareFile}` + ` when trying to load server middleware`);
|
|
99
102
|
}
|
|
100
|
-
const middlewares = middlewareModule[middlewareExportName]; // eslint-disable-line
|
|
103
|
+
const middlewares = middlewareModule[middlewareExportName]; // eslint-disable-line @typescript-eslint/no-unsafe-type-assertion
|
|
101
104
|
if (!Array.isArray(middlewares)) {
|
|
102
105
|
throwError('addServerMiddleware', `Expected middlewares to be an array`);
|
|
103
106
|
}
|
|
@@ -171,11 +174,9 @@ export class DevServer extends TungstenServer {
|
|
|
171
174
|
}, DevServer.reloadDebounceMs);
|
|
172
175
|
});
|
|
173
176
|
_defineProperty(this, "sourceFileToUrlPath", file => {
|
|
174
|
-
|
|
175
|
-
//
|
|
176
|
-
|
|
177
|
-
// that here so the URL points at the file that's actually served.
|
|
178
|
-
if (rel.endsWith('.jsx')) rel = rel.slice(0, -1);
|
|
177
|
+
// compileJavascript writes every compiled source as .js - match that here so the URL
|
|
178
|
+
// points at the file that's actually served
|
|
179
|
+
const rel = fixExtension(slash(relative(this.compilationInfo.codeLocation, file)));
|
|
179
180
|
return `/${this.compilationInfo.codeSubPath}/${rel}`;
|
|
180
181
|
});
|
|
181
182
|
_defineProperty(this, "handleRequestApi", async (req, res, next) => {
|
|
@@ -4,23 +4,23 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
4
4
|
import express from 'express';
|
|
5
5
|
import { join } from 'path';
|
|
6
6
|
import { existsSync } from 'fs';
|
|
7
|
-
import { staticFolder, assetsFolder, packageNameCapitalized, publicFolder, componentCssFolder, frameworkCssFolder } from
|
|
8
|
-
import { rootToHtml as renderRootToHtml } from
|
|
9
|
-
import { contentToHtml as renderContentToHtml } from
|
|
10
|
-
import { Instance } from
|
|
11
|
-
import { cliOut, cliWarn, cliLog, cliNews, cliDebug } from
|
|
12
|
-
import { TungstenError } from
|
|
13
|
-
import { makeInstanceConfigFromFrameworkConfig } from
|
|
7
|
+
import { staticFolder, assetsFolder, packageNameCapitalized, publicFolder, componentCssFolder, frameworkCssFolder } from '../settings.js';
|
|
8
|
+
import { rootToHtml as renderRootToHtml } from '../render/rootToHtml.js';
|
|
9
|
+
import { contentToHtml as renderContentToHtml } from '../render/contentToHtml.js';
|
|
10
|
+
import { Instance } from '../Instance/Instance.js';
|
|
11
|
+
import { cliOut, cliWarn, cliLog, cliNews, cliDebug } from '../cliOutput.js'; // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
12
|
+
import { TungstenError } from '../TungstenError.js';
|
|
13
|
+
import { makeInstanceConfigFromFrameworkConfig } from '../makeInstanceConfigFromFrameworkConfig.js';
|
|
14
14
|
//import { addRequireResolveHooks } from '../reRouting/addRequireResolveHooks.js'
|
|
15
|
-
import { standardizeWebPath } from
|
|
16
|
-
import { throwError } from
|
|
17
|
-
import { serveStatic } from
|
|
15
|
+
import { standardizeWebPath } from '../standardizeWebPath.js';
|
|
16
|
+
import { throwError } from '../throwError.js';
|
|
17
|
+
import { serveStatic } from './serveStatic.js';
|
|
18
18
|
import { routing } from "./routing.js";
|
|
19
|
-
import { globalDataFunc } from
|
|
19
|
+
import { globalDataFunc } from '../routing/registerGlobalData.js';
|
|
20
20
|
import { TungstenServer } from "./TungstenServer.js";
|
|
21
|
-
import { portError } from
|
|
22
|
-
import { initStores } from
|
|
23
|
-
import { makeTungstenErrorInfo } from
|
|
21
|
+
import { portError } from './portError.js';
|
|
22
|
+
import { initStores } from './initStores.js';
|
|
23
|
+
import { makeTungstenErrorInfo } from '../routing/TungstenErrorInfo.js';
|
|
24
24
|
function debug(...texts) {
|
|
25
25
|
// console.log(...texts)
|
|
26
26
|
}
|
|
@@ -352,7 +352,7 @@ export class ProdServer extends TungstenServer {
|
|
|
352
352
|
//const port = (portOverride !== undefined) ? portOverride : port
|
|
353
353
|
// eslint-disable-next-line no-console
|
|
354
354
|
this.server = this.app.listen(port, () => {
|
|
355
|
-
const serverAddress = this.server.address(); // eslint-disable-line @typescript-eslint/no-non-null-assertion,
|
|
355
|
+
const serverAddress = this.server.address(); // eslint-disable-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-unsafe-type-assertion
|
|
356
356
|
this.location = `${proto}://${host}:${serverAddress.port}`;
|
|
357
357
|
if (!mute) cliNews(`${packageNameCapitalized} prod server ready at ${this.location}`);
|
|
358
358
|
resolve(this.location);
|
|
@@ -2,10 +2,10 @@ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object
|
|
|
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
|
import express from 'express';
|
|
5
|
-
import { serveStatic } from
|
|
5
|
+
import { serveStatic } from './serveStatic.js';
|
|
6
6
|
import { join } from 'path';
|
|
7
|
-
import { staticSiteFolder } from
|
|
8
|
-
import { cliNews } from
|
|
7
|
+
import { staticSiteFolder } from '../settings.js';
|
|
8
|
+
import { cliNews } from '../cliOutput.js';
|
|
9
9
|
export class StaticSiteServer {
|
|
10
10
|
// to do
|
|
11
11
|
constructor(config) {
|
|
@@ -19,7 +19,7 @@ export class StaticSiteServer {
|
|
|
19
19
|
return new Promise(resolve => {
|
|
20
20
|
const staticSiteServer = this; // eslint-disable-line @typescript-eslint/no-this-alias
|
|
21
21
|
this.server = this.app.listen(0, function () {
|
|
22
|
-
const port = this.address().port; // eslint-disable-line
|
|
22
|
+
const port = this.address().port; // eslint-disable-line @typescript-eslint/no-unsafe-type-assertion
|
|
23
23
|
const location = staticSiteServer.location = `http://localhost:${port}${staticSiteServer.config.siteBasePath}`;
|
|
24
24
|
cliNews(`Static preview ready at ${location}`);
|
|
25
25
|
resolve(location);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ContentNodeIsClassComponent } from
|
|
2
|
-
import { RoutingRedirect } from
|
|
3
|
-
import { cliTodo } from
|
|
1
|
+
import { ContentNodeIsClassComponent } from '../ContentNode.js';
|
|
2
|
+
import { RoutingRedirect } from '../routing/RoutingRedirect.js';
|
|
3
|
+
import { cliTodo } from '../cliOutput.js';
|
|
4
4
|
import { RouteRedirectComponent } from "../components/RouteRedirectComponent.js";
|
|
5
5
|
import { WebRedirectComponent } from "../components/WebRedirectComponent.js";
|
|
6
|
-
import { $props, $type } from
|
|
7
|
-
import { WebRedirect } from
|
|
6
|
+
import { $props, $type } from '../contentNodeSymbols.js';
|
|
7
|
+
import { WebRedirect } from '../routing/WebRedirect.js';
|
|
8
8
|
function debug(...texts) {
|
|
9
9
|
// console.log(...texts)
|
|
10
10
|
}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
// still, in fact, a self-resolving situation. If the error that reached the error page still
|
|
9
9
|
// looks like that same transient shape, embed a tiny script that auto-reloads a few times before
|
|
10
10
|
// giving up - capped via sessionStorage so a genuine, permanent error doesn't loop forever.
|
|
11
|
-
import { isTransientDevModuleError } from
|
|
11
|
+
import { isTransientDevModuleError } from '../importDevModuleWithRetry.js';
|
|
12
12
|
const sessionStorageKey = 'tungstenDevErrorRetryCount';
|
|
13
13
|
export const maxAutoRetryAttempts = 8;
|
|
14
14
|
const retryDelayMs = 500;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { InternalStoreSchema } from
|
|
2
|
-
import { makeStore } from
|
|
3
|
-
import { createStores } from
|
|
1
|
+
import { InternalStoreSchema } from '../Store/InternalStoreSchema.js';
|
|
2
|
+
import { makeStore } from '../Store/makeStore.js';
|
|
3
|
+
import { createStores } from '../Store/createStores.js';
|
|
4
4
|
export function initStores(location, reqResOrNull, globalData, matchedRouteInfo, serverDataLoading = null) {
|
|
5
5
|
const storeSubscriptions = new Map();
|
|
6
6
|
const internalStoreSubscribedElements = new Map();
|
|
@@ -3,6 +3,6 @@ type ProcessEnv = {
|
|
|
3
3
|
[x: string]: string | undefined;
|
|
4
4
|
TZ?: string;
|
|
5
5
|
};
|
|
6
|
-
export declare function loadEnvsDev(config: FrameworkConfigComplete, iteration: number, initialProcessEnv: ProcessEnv, _firstLoad: boolean, useTestEnvFiles?: boolean): Promise<void>;
|
|
6
|
+
export declare function loadEnvsDev(config: FrameworkConfigComplete, iteration: number, initialProcessEnv: ProcessEnv, _firstLoad: boolean, useTestEnvFiles?: boolean, buildCodeFolder?: string): Promise<void>;
|
|
7
7
|
export {};
|
|
8
8
|
//# sourceMappingURL=loadEnvsDev.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loadEnvsDev.d.ts","sourceRoot":"","sources":["../../src/Servers/loadEnvsDev.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAA;AAUpE,KAAK,UAAU,GAAG;IACd,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IAChC,EAAE,CAAC,EAAE,MAAM,CAAC;CACf,CAAA;AAED,wBAAsB,WAAW,CAC7B,MAAM,EAAE,uBAAuB,EAE/B,SAAS,EAAE,MAAM,EACjB,iBAAiB,EAAE,UAAU,EAC7B,UAAU,EAAE,OAAO,EACnB,eAAe,UAAQ,
|
|
1
|
+
{"version":3,"file":"loadEnvsDev.d.ts","sourceRoot":"","sources":["../../src/Servers/loadEnvsDev.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAA;AAUpE,KAAK,UAAU,GAAG;IACd,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IAChC,EAAE,CAAC,EAAE,MAAM,CAAC;CACf,CAAA;AAED,wBAAsB,WAAW,CAC7B,MAAM,EAAE,uBAAuB,EAE/B,SAAS,EAAE,MAAM,EACjB,iBAAiB,EAAE,UAAU,EAC7B,UAAU,EAAE,OAAO,EACnB,eAAe,UAAQ,EAEvB,eAAe,CAAC,EAAE,MAAM,iBA8H3B"}
|
|
@@ -1,23 +1,25 @@
|
|
|
1
1
|
import { join } from 'path';
|
|
2
2
|
import { readFile as readFilePromise, access as accessPromise } from 'fs/promises';
|
|
3
3
|
import { remap as objectRemap, filter as objectFilter } from 'sxy-lib/objects.js';
|
|
4
|
-
import { getEnvSchemasDev } from
|
|
4
|
+
import { getEnvSchemasDev } from '../env/getEnvSchemas.js';
|
|
5
5
|
import dotenv from 'dotenv';
|
|
6
|
-
import { cliLog, cliOut } from
|
|
7
|
-
import { addToEnv } from
|
|
6
|
+
import { cliLog, cliOut } from '../cliOutput.js';
|
|
7
|
+
import { addToEnv } from '../env/addToEnv.js';
|
|
8
8
|
import { throwError } from 'tungsten/throwError.js';
|
|
9
|
-
import { tungstenCorePrivateEnvSchema } from
|
|
10
|
-
import { tungstenCorePublicEnvSchema } from
|
|
11
|
-
import { checkIsObject, validate } from
|
|
9
|
+
import { tungstenCorePrivateEnvSchema } from './tungstenCorePrivateEnvSchema.js';
|
|
10
|
+
import { tungstenCorePublicEnvSchema } from './tungstenCorePublicEnvSchema.js';
|
|
11
|
+
import { checkIsObject, validate } from '../standardSchema.js';
|
|
12
12
|
export async function loadEnvsDev(config,
|
|
13
13
|
//load: Load,
|
|
14
|
-
iteration, initialProcessEnv, _firstLoad, useTestEnvFiles = false
|
|
14
|
+
iteration, initialProcessEnv, _firstLoad, useTestEnvFiles = false,
|
|
15
|
+
// where the compiled env schemas module is, when not the dev build (a test run's own compile)
|
|
16
|
+
buildCodeFolder) {
|
|
15
17
|
//console.log('loadEnvsDev')
|
|
16
18
|
const tempEnv = {
|
|
17
19
|
...initialProcessEnv
|
|
18
20
|
};
|
|
19
21
|
// const envSchemas = await getEnvSchemasDev(config, load)
|
|
20
|
-
const envSchemas = await getEnvSchemasDev(config, iteration);
|
|
22
|
+
const envSchemas = await getEnvSchemasDev(config, iteration, buildCodeFolder);
|
|
21
23
|
const projectDir = process.cwd();
|
|
22
24
|
const envLocation = join(projectDir, '.env');
|
|
23
25
|
const privateEnvLocation = join(projectDir, '.env.private');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routing.d.ts","sourceRoot":"","sources":["../../src/Servers/routing.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"routing.d.ts","sourceRoot":"","sources":["../../src/Servers/routing.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAC7D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAGlD,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAA;AAIjE,wBAAsB,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,GAAE,iBAAiB,GAAG,IAAW,GAC5G,OAAO,CAAC,gBAAgB,CAAC,CA+D9B"}
|
package/dist/Servers/routing.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Default404 } from "../routing/Default404.js";
|
|
2
|
-
import { matchPath } from
|
|
3
|
-
import { makeTungstenErrorInfo } from
|
|
4
|
-
import { jsx as _jsx } from "tungsten/
|
|
2
|
+
import { matchPath } from '../routing/matchPath.js';
|
|
3
|
+
import { makeTungstenErrorInfo } from '../routing/TungstenErrorInfo.js';
|
|
4
|
+
import { jsx as _jsx } from "tungsten/jsx-runtime";
|
|
5
5
|
export async function routing(location, routes, serverDataLoading = null) {
|
|
6
6
|
let defaultRoute, _404Route, errorRoute;
|
|
7
7
|
// try the current path against each defined route
|
|
@@ -9,7 +9,7 @@ export async function routing(location, routes, serverDataLoading = null) {
|
|
|
9
9
|
// this is assuming an array
|
|
10
10
|
// should check whether we have an array, fragment, or single element instead
|
|
11
11
|
for (const [_path, route] of Object.entries(routes)) {
|
|
12
|
-
const path = _path; // eslint-disable-line
|
|
12
|
+
const path = _path; // eslint-disable-line @typescript-eslint/no-unsafe-type-assertion -- TS fails to infer type of path correctly
|
|
13
13
|
if (path === 'default') {
|
|
14
14
|
defaultRoute = route;
|
|
15
15
|
continue;
|
package/dist/Store/Store.js
CHANGED
|
@@ -226,7 +226,7 @@ export class Store {
|
|
|
226
226
|
if (IsObject(o)) {
|
|
227
227
|
throw new TungstenError(`Store.increment() error: data for ${key} is not an object. Is type ${typeof o} instead`)
|
|
228
228
|
}
|
|
229
|
-
Object.assign(this.data[key] as GenericObject, object) // eslint-disable-line
|
|
229
|
+
Object.assign(this.data[key] as GenericObject, object) // eslint-disable-line @typescript-eslint/no-unsafe-type-assertion -- TS won't let me typecheck within this.data
|
|
230
230
|
this.push(key)
|
|
231
231
|
}
|
|
232
232
|
push(key: string) {
|
|
@@ -229,7 +229,7 @@ export class TypeSafeStore<Schema extends object> {
|
|
|
229
229
|
if (IsObject(o)) {
|
|
230
230
|
throw new TungstenError(`Store.increment() error: data for ${key} is not an object. Is type ${typeof o} instead`)
|
|
231
231
|
}
|
|
232
|
-
Object.assign(this.data[key] as GenericObject, object) // eslint-disable-line
|
|
232
|
+
Object.assign(this.data[key] as GenericObject, object) // eslint-disable-line @typescript-eslint/no-unsafe-type-assertion -- TS won't let me typecheck within this.data
|
|
233
233
|
this.push(key)
|
|
234
234
|
}
|
|
235
235
|
push(key: string) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { makeStore } from
|
|
2
|
-
import { storeSchemas } from
|
|
1
|
+
import { makeStore } from './makeStore.js';
|
|
2
|
+
import { storeSchemas } from './storeCreators.js';
|
|
3
3
|
export function createStores(reqRes, matchedRouteInfo, globalData, storeSubscriptionsMap, serverDataLoading = null) {
|
|
4
4
|
const stores = storeSchemas.map(Schema => {
|
|
5
5
|
const subscribedElements = new Map();
|
package/dist/Store/makeStore.js
CHANGED
|
@@ -6,8 +6,8 @@ function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("C
|
|
|
6
6
|
function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
|
|
7
7
|
function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
|
|
8
8
|
function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
|
|
9
|
-
import { objectMap } from
|
|
10
|
-
import { isBrowser } from
|
|
9
|
+
import { objectMap } from '../objectMap.js';
|
|
10
|
+
import { isBrowser } from '../isBrowser.js';
|
|
11
11
|
var _key = /*#__PURE__*/new WeakMap();
|
|
12
12
|
var _value = /*#__PURE__*/new WeakMap();
|
|
13
13
|
var _subscribedElements = /*#__PURE__*/new WeakMap();
|
|
@@ -119,5 +119,5 @@ export class StoreValue {
|
|
|
119
119
|
export function makeStore(schema, subscribedElements, serverDataLoading = null) {
|
|
120
120
|
//const Class = (isServer) ? StoreValueServer : StoreValue
|
|
121
121
|
const store = objectMap(schema, (key, value) => serverDataLoading ? new StoreValueServer(key, value, subscribedElements, serverDataLoading) : new StoreValue(key, value, subscribedElements));
|
|
122
|
-
return store; // eslint-disable-line
|
|
122
|
+
return store; // eslint-disable-line @typescript-eslint/no-unsafe-type-assertion -- not sure, just want to get rid of squigglies
|
|
123
123
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { storeSchemas } from
|
|
2
|
-
import { Instance } from
|
|
1
|
+
import { storeSchemas } from './storeCreators.js';
|
|
2
|
+
import { Instance } from '../Instance/Instance.js';
|
|
3
3
|
export function registerStore(StoreSchema) {
|
|
4
4
|
//console.log('registering store', StoreSchema.name)
|
|
5
5
|
const position = 0;
|
|
6
6
|
storeSchemas[0] = StoreSchema;
|
|
7
7
|
return {
|
|
8
8
|
getComponentStore: element => {
|
|
9
|
-
const store = element.__instance.stores[position]; // eslint-disable-line
|
|
9
|
+
const store = element.__instance.stores[position]; // eslint-disable-line @typescript-eslint/no-unsafe-type-assertion -- we set this schema above
|
|
10
10
|
const proxiedStore = element.__proxyStore(store);
|
|
11
11
|
return proxiedStore;
|
|
12
12
|
},
|
package/dist/TElement.js
CHANGED
|
@@ -17,7 +17,7 @@ export {};
|
|
|
17
17
|
// this.parentProxy = new Proxy(parent, {
|
|
18
18
|
// get: function(obj: AnyComponent, key: string | symbol) {
|
|
19
19
|
// global.__T_CurrentElement = this
|
|
20
|
-
// return (obj as AnyComponent & Record<string | symbol, unknown>)[key] // eslint-disable-line
|
|
20
|
+
// return (obj as AnyComponent & Record<string | symbol, unknown>)[key] // eslint-disable-line @typescript-eslint/no-unsafe-type-assertion -- TS being difficult, whatcha gonna do?
|
|
21
21
|
// },
|
|
22
22
|
// })
|
|
23
23
|
// this.type = type
|
package/dist/TungstenApp.js
CHANGED
|
@@ -2,9 +2,9 @@ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object
|
|
|
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
|
/// WIP
|
|
5
|
-
import { cliLog } from
|
|
6
|
-
import { Framework } from
|
|
7
|
-
import { throwError } from
|
|
5
|
+
import { cliLog } from './cliOutput.js';
|
|
6
|
+
import { Framework } from './Framework.js';
|
|
7
|
+
import { throwError } from './throwError.js';
|
|
8
8
|
export class TungstenApp {
|
|
9
9
|
constructor(options) {
|
|
10
10
|
_defineProperty(this, "rootComponent", void 0);
|
|
@@ -29,8 +29,12 @@ export class TungstenApp {
|
|
|
29
29
|
if (dev) cliLog('Starting Tungsten in Development mode');else cliLog('Starting Tungsten in Production mode');
|
|
30
30
|
if (this.rootComponent === undefined) throwError('TungstenApp', 'No root component set.' + ' You must set a root component in the option objects of the TungstenApp constructor, ' + ' or by calling set tungstenApp.setRootComponent()');
|
|
31
31
|
if (this.appRoutes === undefined) throwError('TungstenApp', 'No routes set.' + ' You must set your application routes in the options object of the TungstenApp constructor, ' + ' or by calling set tungstenApp.setRoutes()');
|
|
32
|
-
if (this.
|
|
33
|
-
|
|
32
|
+
if (this.privateEnvValidator === undefined) throwError(
|
|
33
|
+
// eslint-disable-line @typescript-eslint/no-unnecessary-condition -- validator types are `never` placeholders for now
|
|
34
|
+
'TungstenApp', 'No Private Env Validator set.' + ' You must set a private env validator in the options object of the TungstenApp constructor, ' + ' or by calling set tungstenApp.setPrivateEnvValidator()');
|
|
35
|
+
if (this.publicEnvValidator === undefined) throwError(
|
|
36
|
+
// eslint-disable-line @typescript-eslint/no-unnecessary-condition -- as above
|
|
37
|
+
'TungstenApp', 'No Public Env Validator set.' + ' You must set a public env validator in the options object of the TungstenApp constructor, ' + ' or by calling set tungstenApp.setPublicEnvValidator()');
|
|
34
38
|
// start stuff
|
|
35
39
|
const framework = new Framework();
|
|
36
40
|
await framework.init();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { CssNames as TungstenStyleObject } from
|
|
1
|
+
export { CssNames as TungstenStyleObject } from './CssNames.js';
|
package/dist/__deproxy.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $original } from
|
|
2
|
-
import { NoDeproxy } from
|
|
1
|
+
import { $original } from './componentProxyHandlers.js';
|
|
2
|
+
import { NoDeproxy } from './NoDeproxy.js';
|
|
3
3
|
// doesn't this need to be deep?
|
|
4
4
|
export function __deproxy(possibleProxy) {
|
|
5
5
|
console.log('__deproxy called, this function may not be adequate');
|
package/dist/_client/client.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
//import { helpers } from './cjsHelpers.js'
|
|
2
2
|
import { hydrate } from 'tungsten';
|
|
3
3
|
// @ts-ignore -- ignore module not found, will be generated later
|
|
4
|
-
import instanceConfig from
|
|
4
|
+
import instanceConfig from '../.tungsten.config.js';
|
|
5
5
|
// wrap the async code in an async IIFE to help rollup
|
|
6
6
|
const clientPromise = (async () => {
|
|
7
7
|
//const isProd = window.__tungsten_prod__ = appConfig.prod
|
|
@@ -11,11 +11,11 @@ const clientPromise = (async () => {
|
|
|
11
11
|
// is this causing a slowdown?
|
|
12
12
|
// need to change this to static imports via build steps
|
|
13
13
|
let routes;
|
|
14
|
-
const promises = [import(
|
|
14
|
+
const promises = [import('./routes.js').then(mod => routes = mod.routes)];
|
|
15
15
|
let RootComponent = null;
|
|
16
16
|
if (instanceConfig.useRootComponent) {
|
|
17
17
|
// rollup is failing to handle this when useRootComponent is false
|
|
18
|
-
promises.push(import(
|
|
18
|
+
promises.push(import('./RootComponent.js').then(({
|
|
19
19
|
module,
|
|
20
20
|
filename
|
|
21
21
|
}) => RootComponent = 'default' in module ? module.default : module[filename]) // could probably do with better error handling/reporting
|
package/dist/alive.js
CHANGED
package/dist/api/getApiRoutes.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { join } from 'path';
|
|
2
|
-
import { TungstenError } from
|
|
3
|
-
import { getExportDev } from
|
|
4
|
-
import { getExport } from
|
|
2
|
+
import { TungstenError } from '../TungstenError.js';
|
|
3
|
+
import { getExportDev } from './getExportDev.js';
|
|
4
|
+
import { getExport } from './getExport.js';
|
|
5
5
|
export async function getApiRoutes(config, compilationInfo, mode) {
|
|
6
6
|
if (typeof config.apiRoutes !== 'string') {
|
|
7
7
|
throw new TungstenError(`getApiRoutes() error - config.apiRoutes is not valid`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getExport.d.ts","sourceRoot":"","sources":["../../src/api/getExport.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getExport.d.ts","sourceRoot":"","sources":["../../src/api/getExport.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAQjC,wBAAsB,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,GAAE,IAAa,GAAG,OAAO,CAAC,GAAG,CAAC,CAuBpG"}
|
package/dist/api/getExport.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
// old loading method
|
|
1
2
|
import { basename } from 'path';
|
|
2
|
-
import { fixExtension } from
|
|
3
|
-
import { TungstenError } from
|
|
4
|
-
import { iterationQueryString } from
|
|
5
|
-
import { importDevModuleWithRetry } from
|
|
3
|
+
import { fixExtension } from '../fixExtension.js';
|
|
4
|
+
import { TungstenError } from '../TungstenError.js';
|
|
5
|
+
import { iterationQueryString } from '../iterationQueryString.js';
|
|
6
|
+
import { importDevModuleWithRetry } from '../importDevModuleWithRetry.js';
|
|
6
7
|
//let load //// !! future improvement
|
|
7
8
|
let exportIteration = 0;
|
|
8
9
|
export async function getExport(filePath, relFile, mode = 'prod') {
|
package/dist/api/getExportDev.js
CHANGED
package/dist/appOutput.js
CHANGED
package/dist/auth/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
1
|
+
export * from './hashPassword.js';
|
|
2
|
+
export * from './checkPassword.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BabelAddDevCacheBust.d.ts","sourceRoot":"","sources":["../../src/babelPlugins/BabelAddDevCacheBust.ts"],"names":[],"mappings":"AAkCA,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACtD,OAAO,KAAK,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"BabelAddDevCacheBust.d.ts","sourceRoot":"","sources":["../../src/babelPlugins/BabelAddDevCacheBust.ts"],"names":[],"mappings":"AAkCA,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACtD,OAAO,KAAK,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAA;AA2BnG,wBAAgB,wBAAwB;;eAKjB,SAAS;;gCAKQ,QAAQ,CAAC,iBAAiB,CAAC;qCAItB,QAAQ,CAAC,sBAAsB,CAAC;mCAIlC,QAAQ,CAAC,oBAAoB,CAAC;;EAOxE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// RS: this is unsuitable for test
|
|
2
|
-
// and dubious during dev. Removing it for now
|
|
2
|
+
// and dubious during dev. Removing it from test for now
|
|
3
3
|
// will have to revisit HMR
|
|
4
4
|
// BabelAddDevCacheBust
|
|
5
5
|
// exports MakeBabelAddDevCacheBust (function)
|
|
@@ -29,9 +29,11 @@
|
|
|
29
29
|
// plugins actually end up running in.
|
|
30
30
|
import { dirname, join } from 'path';
|
|
31
31
|
import fs from 'fs';
|
|
32
|
+
// a `.js` specifier names the compiled file; on disk in codeLocation it may be .js, .jsx, or with
|
|
33
|
+
// typescript: true, .ts/.tsx
|
|
32
34
|
function resolveOnDiskMtime(fromDir, specifier) {
|
|
33
35
|
if (!specifier.startsWith('.')) return undefined;
|
|
34
|
-
const candidates = specifier.endsWith('.jsx') ? [specifier, specifier.slice(0, -1)] : specifier.endsWith('.js') ? [
|
|
36
|
+
const candidates = specifier.endsWith('.jsx') ? [specifier, specifier.slice(0, -1)] : specifier.endsWith('.js') ? ['.js', '.jsx', '.ts', '.tsx'].map(extension => `${specifier.slice(0, -3)}${extension}`) : specifier.endsWith('.ts') || specifier.endsWith('.tsx') ? [specifier] : [];
|
|
35
37
|
for (const candidate of candidates) {
|
|
36
38
|
const abs = join(fromDir, candidate);
|
|
37
39
|
if (fs.existsSync(abs)) return fs.statSync(abs).mtimeMs;
|