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,4 +1,4 @@
|
|
|
1
|
-
import { throwError } from
|
|
1
|
+
import { throwError } from '../throwError.js';
|
|
2
2
|
// RegEx: @use or @import, 0 or spaces or tabs, followed by an import target in single or double quotes
|
|
3
3
|
const useOrImportRegex = /@(?:use|import)[ \t]*(?:'([^']+)'|"([^']+)")/g;
|
|
4
4
|
// the line optionally starts with digits, spaces then pipe |, and after has 1 or more ^, and to the left and the right is only spaces or more carets
|
package/dist/babelPlugins/transformPackageImports/BabelTransformDependencyImportsCjs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BabelTransformDependencyImportsCjs.d.ts","sourceRoot":"","sources":["../../../src/babelPlugins/transformPackageImports/BabelTransformDependencyImportsCjs.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,KAAK,SAAS,MAAM,aAAa,CAAA;AAC7C,OAAO,EAAE,SAAS,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"BabelTransformDependencyImportsCjs.d.ts","sourceRoot":"","sources":["../../../src/babelPlugins/transformPackageImports/BabelTransformDependencyImportsCjs.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,KAAK,SAAS,MAAM,aAAa,CAAA;AAC7C,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACjD,KAAK,KAAK,GAAG,OAAO,SAAS,CAAC;AAK9B,OAAO,EACH,oBAAoB,EAAE,sBAAsB,EAC5C,KAAK,cAAc,EAAmB,KAAK,iBAAiB,EAC/D,MAAM,cAAc,CAAA;AAIrB,OAAO,KAAK,EACR,oBAAoB,EAAE,qBAAqB,EAAE,oCAAoC,EACjF,uCAAuC,EAAE,oBAAoB,EAChE,MAAM,oCAAoC,CAAA;AAU3C,KAAK,IAAI,GAAG;IACR,UAAU,EAAE,MAAM,EAAE,CAAA;CACvB,CAAA;AAED,KAAK,KAAK,GAAG;IACT,oBAAoB,EAAE,oBAAoB,CAAA;IAC1C,qBAAqB,EAAE,qBAAqB,CAAA;IAC5C,oCAAoC,EAAE,oCAAoC,CAAA;IAC1E,uCAAuC,EAAE,uCAAuC,CAAA;IAChF,oBAAoB,EAAE,oBAAoB,CAAA;CAC7C,CAAA;AAED,wBAAgB,sCAAsC,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,IACxB,OAAO,KAAK;eAoC5C,SAAS;;kCAcmB,QAAQ,CAAC,iBAAiB,CAAC;uCAKtB,QAAQ,CAAC,sBAAsB,CAAC;qCAOlC,QAAQ,CAAC,oBAAoB,CAAC;6BAO/C,QAAQ,CAAC,cAAc,CAAC;;EAiE5D"}
|
|
@@ -7,11 +7,12 @@
|
|
|
7
7
|
// funcs from the parent to do various things.
|
|
8
8
|
// passed in from the parent because this allows them to use a central cache
|
|
9
9
|
// }
|
|
10
|
+
//import type { types as Types } from '@babel/core';
|
|
10
11
|
import { dirname, relative } from 'path';
|
|
11
|
-
import slash from 'slash';
|
|
12
|
-
import { isBareImport } from
|
|
13
|
-
import { cliWarn } from
|
|
14
|
-
import { warn } from
|
|
12
|
+
import slash from '../../slash.js';
|
|
13
|
+
import { isBareImport } from '../isBareImport.js';
|
|
14
|
+
import { cliWarn } from '../../cliOutput.js';
|
|
15
|
+
import { warn } from '../../output.js';
|
|
15
16
|
import { TungstenError } from 'tungsten/TungstenError.js';
|
|
16
17
|
export function MakeBabelTransformDependencyImportsCjs(opts, funcs) {
|
|
17
18
|
return function BabelTransformDependencyImportsCjs(babel) {
|
package/dist/babelPlugins/transformPackageImports/BabelTransformDependencyImportsEsm.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BabelTransformDependencyImportsEsm.d.ts","sourceRoot":"","sources":["../../../src/babelPlugins/transformPackageImports/BabelTransformDependencyImportsEsm.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,KAAK,SAAS,MAAM,aAAa,CAAA;AAC7C,OAAO,EAAE,SAAS,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"BabelTransformDependencyImportsEsm.d.ts","sourceRoot":"","sources":["../../../src/babelPlugins/transformPackageImports/BabelTransformDependencyImportsEsm.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,KAAK,SAAS,MAAM,aAAa,CAAA;AAC7C,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACjD,KAAK,KAAK,GAAG,OAAO,SAAS,CAAC;AAM9B,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAI9G,OAAO,KAAK,EACR,oBAAoB,EAAE,qBAAqB,EAAE,oCAAoC,EACjF,oBAAoB,EAAE,gBAAgB,EACzC,MAAM,oCAAoC,CAAA;AAM3C,KAAK,IAAI,GAAG;IACR,UAAU,EAAE,MAAM,EAAE,CAAA;CACvB,CAAA;AAED,KAAK,KAAK,GAAG;IACT,oBAAoB,EAAE,oBAAoB,CAAA;IAC1C,qBAAqB,EAAE,qBAAqB,CAAA;IAC5C,oCAAoC,EAAE,oCAAoC,CAAA;IAC1E,oBAAoB,EAAE,oBAAoB,CAAA;IAC1C,gBAAgB,EAAE,gBAAgB,CAAA;CACrC,CAAA;AAED,wBAAgB,sCAAsC,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,IACxB,OAAO,KAAK;eA0B5C,SAAS;;gCAWQ,QAAQ,CAAC,iBAAiB,CAAC;uCAYX,QAAQ,CAAC,sBAAsB,CAAC;qCAalC,QAAQ,CAAC,oBAAoB,CAAC;6BAa/C,QAAQ,CAAC,cAAc,CAAC;;EAiC5D"}
|
|
@@ -7,9 +7,10 @@
|
|
|
7
7
|
// funcs from the parent to do various things.
|
|
8
8
|
// passed in from the parent because this allows them to use a central cache
|
|
9
9
|
// }
|
|
10
|
+
//import type { types as Types } from '@babel/core';
|
|
10
11
|
import { dirname, relative } from 'path';
|
|
11
|
-
import slash from 'slash';
|
|
12
|
-
import { isBareImport } from
|
|
12
|
+
import slash from '../../slash.js';
|
|
13
|
+
import { isBareImport } from '../isBareImport.js';
|
|
13
14
|
import { throwError } from 'tungsten/throwError.js';
|
|
14
15
|
import { cliError, cliOut } from 'tungsten/cliOutput.js';
|
|
15
16
|
export function MakeBabelTransformDependencyImportsEsm(opts, funcs) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { dirname } from 'path';
|
|
2
|
-
import { TungstenError } from
|
|
3
|
-
import { findProjectDir } from
|
|
2
|
+
import { TungstenError } from '../../TungstenError.js';
|
|
3
|
+
import { findProjectDir } from '../../findProjectDir.js';
|
|
4
4
|
const getPackageDirForDirCache = {};
|
|
5
5
|
function getPackageDirForDir(dir) {
|
|
6
6
|
if (dir in getPackageDirForDirCache) {
|
package/dist/bin/args.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { cliError, cliOut } from
|
|
1
|
+
import { cliError, cliOut } from '../cliOutput.js';
|
|
2
2
|
export function cliArgs(specs, options = {}) {
|
|
3
3
|
// after node and the script come the command word and its arguments
|
|
4
4
|
const [command = '', ...given] = process.argv.slice(2);
|
|
@@ -59,7 +59,7 @@ export function cliArgs(specs, options = {}) {
|
|
|
59
59
|
parsed[name] = flag.startsWith('--no-') ? !on : on;
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
return parsed; // eslint-disable-line
|
|
62
|
+
return parsed; // eslint-disable-line @typescript-eslint/no-unsafe-type-assertion -- built from specs' own keys
|
|
63
63
|
}
|
|
64
64
|
// '--ignore-dirs <dir>...' -> its flag, that it takes a value, and that it may be given more than once
|
|
65
65
|
function shapeOf(spec) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// build
|
|
2
2
|
import chalk from 'chalk-extensions';
|
|
3
|
-
import { Framework } from
|
|
4
|
-
import { cliOut, cliNews, cliWarn } from
|
|
5
|
-
import { staticSiteFolder } from
|
|
6
|
-
import { createTimeProfiler, reportRunTotal, reportStartupPhase } from
|
|
7
|
-
import { cliArgs } from
|
|
3
|
+
import { Framework } from '../../Framework.js';
|
|
4
|
+
import { cliOut, cliNews, cliWarn } from '../../cliOutput.js';
|
|
5
|
+
import { staticSiteFolder } from '../../settings.js';
|
|
6
|
+
import { createTimeProfiler, reportRunTotal, reportStartupPhase } from '../../timeProfiler.js';
|
|
7
|
+
import { cliArgs } from '../args.js';
|
|
8
8
|
// first statement in the body, so it closes off the import evaluation above
|
|
9
9
|
reportStartupPhase('load build modules');
|
|
10
10
|
// --help never reaches here - bin/index.ts routes it to buildHelp.ts before this module loads
|
|
@@ -34,7 +34,7 @@ await sxyFramework.build('prod');
|
|
|
34
34
|
// }
|
|
35
35
|
// //// end dev
|
|
36
36
|
if (sxyFramework.config.staticSite) {
|
|
37
|
-
// eslint-disable-line @typescript-eslint/no-non-null-assertion,
|
|
37
|
+
// eslint-disable-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-unsafe-type-assertion -- config better be set
|
|
38
38
|
if (!quiet) cliOut(`Building static site`);
|
|
39
39
|
await sxyFramework.clean('staticSite');
|
|
40
40
|
await sxyFramework.staticGen();
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// build
|
|
2
2
|
import chalk from 'chalk-extensions';
|
|
3
|
-
import { Framework } from
|
|
4
|
-
import { cliOut } from
|
|
5
|
-
import { packageNameCapitalized } from
|
|
6
|
-
import { cliArgs } from
|
|
3
|
+
import { Framework } from '../../Framework.js';
|
|
4
|
+
import { cliOut } from '../../cliOutput.js';
|
|
5
|
+
import { packageNameCapitalized } from '../../settings.js';
|
|
6
|
+
import { cliArgs } from '../args.js';
|
|
7
7
|
cliArgs({}); // accepts nothing but --help
|
|
8
8
|
//// prep the app
|
|
9
9
|
const sxyFramework = new Framework();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compile.d.ts","sourceRoot":"","sources":["../../../src/bin/commands/compile.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"compile.d.ts","sourceRoot":"","sources":["../../../src/bin/commands/compile.ts"],"names":[],"mappings":"AAoSA,OAAO,EAAE,CAAA"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { dirname, join, resolve } from 'path';
|
|
2
2
|
import { promises as fsPromises } from 'fs';
|
|
3
|
-
import { removeRecursive } from
|
|
4
|
-
import { compileJavascript } from
|
|
5
|
-
import { compileStyles } from
|
|
6
|
-
import { writeFrameworkCss } from
|
|
7
|
-
import { copyAssets } from
|
|
8
|
-
import { copyPublicFiles } from
|
|
9
|
-
import { createClientFiles } from
|
|
10
|
-
import { createInstanceConfigFile } from
|
|
11
|
-
import { getUserConfig } from
|
|
12
|
-
import { buildCodeSubPath, assetsFolder, clientFolder, componentCssFolder, devBuildOuterFolder, frameworkCssFolder, packagesCacheFolder, packagesFolder, publicFolder, staticFolder } from
|
|
13
|
-
import { cliError, cliNews, cliOut } from
|
|
14
|
-
import { createTimeProfiler, reportRunTotal, reportStartupPhase } from
|
|
15
|
-
import { cliArgs } from
|
|
3
|
+
import { removeRecursive } from '../../removeRecursive.js';
|
|
4
|
+
import { compileJavascript } from '../../build/compileJavascript.js';
|
|
5
|
+
import { compileStyles } from '../../build/compileStyles.js';
|
|
6
|
+
import { writeFrameworkCss } from '../../build/frameworkStylesheets.js';
|
|
7
|
+
import { copyAssets } from '../../build/copyAssets.js';
|
|
8
|
+
import { copyPublicFiles } from '../../build/copyPublicFiles.js';
|
|
9
|
+
import { createClientFiles } from '../../build/createClientFiles.js';
|
|
10
|
+
import { createInstanceConfigFile } from '../../build/createInstanceConfigFile.js';
|
|
11
|
+
import { getUserConfig } from '../../getUserConfig.js';
|
|
12
|
+
import { buildCodeSubPath, assetsFolder, clientFolder, componentCssFolder, devBuildOuterFolder, devRawBuildFolder, frameworkCssFolder, packagesCacheFolder, stylesCacheFolder, packagesFolder, publicFolder, staticFolder } from '../../settings.js';
|
|
13
|
+
import { cliError, cliNews, cliOut } from '../../cliOutput.js';
|
|
14
|
+
import { createTimeProfiler, reportRunTotal, reportStartupPhase } from '../../timeProfiler.js';
|
|
15
|
+
import { cliArgs } from '../args.js';
|
|
16
16
|
// first statement in the body, so it closes off the import evaluation above
|
|
17
17
|
reportStartupPhase('load compile modules');
|
|
18
18
|
const {
|
|
@@ -31,7 +31,8 @@ const {
|
|
|
31
31
|
readyFile: readyFileOption,
|
|
32
32
|
ignoreDirs,
|
|
33
33
|
ignorePatterns,
|
|
34
|
-
tests
|
|
34
|
+
tests,
|
|
35
|
+
fresh
|
|
35
36
|
} = cliArgs({
|
|
36
37
|
js: '--js',
|
|
37
38
|
css: '--css',
|
|
@@ -48,10 +49,11 @@ const {
|
|
|
48
49
|
readyFile: '--ready-file <file>',
|
|
49
50
|
ignoreDirs: '--ignore-dirs <dir>...',
|
|
50
51
|
ignorePatterns: '--ignore-patterns <pattern>...',
|
|
51
|
-
tests: '--tests'
|
|
52
|
+
tests: '--tests',
|
|
53
|
+
fresh: '--fresh'
|
|
52
54
|
}, {
|
|
53
55
|
handledElsewhere: ['--profile-modules'],
|
|
54
|
-
help: ['With no target option (--js, --css, --client, --assets, --public), all targets are compiled.', ' --profile reports the time taken by each compile phase', ' --profile-modules[=<path substring>] reports where module load time goes,', ' splitting each import into what only it needs and what it shares', ' --packages compiles imported packages into the build\'s .packages tree', ' for the dev server to serve. Off by default: compiled code left to', ' node\'s own resolution, as tests use, needs none of it.', ' --ignore-dirs and --ignore-patterns override the config entries of the same name.', ' Repeat either to give several values, or pass an empty value to ignore nothing.', ' --tests also compiles the files the config\'s testPatterns match, which every', ' other compile leaves out.']
|
|
56
|
+
help: ['With no target option (--js, --css, --client, --assets, --public), all targets are compiled.', ' --profile reports the time taken by each compile phase', ' --profile-modules[=<path substring>] reports where module load time goes,', ' splitting each import into what only it needs and what it shares', ' --packages compiles imported packages into the build\'s .packages tree', ' for the dev server to serve. Off by default: compiled code left to', ' node\'s own resolution, as tests use, needs none of it.', ' --ignore-dirs and --ignore-patterns override the config entries of the same name.', ' Repeat either to give several values, or pass an empty value to ignore nothing.', ' --tests also compiles the files the config\'s testPatterns match, which every', ' other compile leaves out.', ' --fresh compiles everything from source, ignoring the packages and styles caches.', ' Both are rewritten, so the next compile starts from a cache this one made.']
|
|
55
57
|
});
|
|
56
58
|
const allTargets = ['js', 'css', 'client', 'assets', 'public'];
|
|
57
59
|
const targetGiven = {
|
|
@@ -92,6 +94,8 @@ const styleImportBase = config.styleImportBase !== undefined ? join(sourceLocati
|
|
|
92
94
|
const buildLocation = outputOption !== undefined ? resolve(projectDir, outputOption) : join(projectDir, devBuildOuterFolder);
|
|
93
95
|
const buildCodeLocation = join(buildLocation, buildCodeSubPath);
|
|
94
96
|
const packagesCacheLocation = outputOption !== undefined ? join(buildLocation, '.packagesCache') : join(projectDir, packagesCacheFolder);
|
|
97
|
+
const stylesCacheLocation = outputOption !== undefined ? join(buildLocation, '.stylesCache') : join(projectDir, stylesCacheFolder);
|
|
98
|
+
const rawBuildLocation = outputOption !== undefined ? `${buildLocation}-raw` : join(projectDir, devRawBuildFolder);
|
|
95
99
|
const readyFileLocation = readyFileOption !== undefined ? resolve(projectDir, readyFileOption) : undefined;
|
|
96
100
|
if (buildLocation.toLowerCase() === resolve(projectDir).toLowerCase()) {
|
|
97
101
|
cliError('Compile output cannot be the project root');
|
|
@@ -120,7 +124,7 @@ const cleanTasks = [];
|
|
|
120
124
|
if (clean && targets.has('js')) {
|
|
121
125
|
cleanTasks.push(removeRecursive(buildCodeLocation), removeRecursive(join(buildLocation, componentCssFolder)),
|
|
122
126
|
// else a component the app no longer imports keeps its stale stylesheet linked
|
|
123
|
-
removeRecursive(join(buildLocation, frameworkCssFolder)), removeRecursive(join(buildLocation, packagesFolder)), removeRecursive(packagesCacheLocation));
|
|
127
|
+
removeRecursive(join(buildLocation, frameworkCssFolder)), removeRecursive(join(buildLocation, packagesFolder)), removeRecursive(packagesCacheLocation), removeRecursive(stylesCacheLocation), removeRecursive(rawBuildLocation));
|
|
124
128
|
}
|
|
125
129
|
if (clean && targets.has('css')) {
|
|
126
130
|
cleanTasks.push(removeRecursive(join(buildLocation, staticFolder)));
|
|
@@ -141,7 +145,10 @@ if (targets.has('js')) {
|
|
|
141
145
|
quiet,
|
|
142
146
|
packages,
|
|
143
147
|
tests,
|
|
148
|
+
fresh,
|
|
144
149
|
packagesCacheLocation,
|
|
150
|
+
stylesCacheLocation,
|
|
151
|
+
rawBuildLocation,
|
|
145
152
|
onCycleComplete: watch ? async cycle => {
|
|
146
153
|
if (cycle.success) {
|
|
147
154
|
await markReady();
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
1
|
+
// build
|
|
2
|
+
import { findProjectDir } from '../../findProjectDir.js';
|
|
3
|
+
import { cliInfo, cliLog } from '../../cliOutput.js';
|
|
3
4
|
cliInfo('tungsten compile-simple-package is not ready yet');
|
|
4
5
|
process.exit(2);
|
|
5
6
|
const projectDir = process.cwd();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../../src/bin/commands/dev.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../../src/bin/commands/dev.ts"],"names":[],"mappings":"AA4EA,OAAO,EAAE,CAAA"}
|
package/dist/bin/commands/dev.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import open from 'open';
|
|
2
|
-
import { cliOut } from
|
|
3
|
-
import { Framework } from
|
|
4
|
-
import { warnOnFrameworkChange } from
|
|
5
|
-
import { createTimeProfiler, reportRunTotal, reportStartupPhase } from
|
|
6
|
-
import { cliArgs } from
|
|
2
|
+
import { cliOut } from '../../cliOutput.js';
|
|
3
|
+
import { Framework } from '../../Framework.js';
|
|
4
|
+
import { warnOnFrameworkChange } from '../../warnOnFrameworkChange.js';
|
|
5
|
+
import { createTimeProfiler, reportRunTotal, reportStartupPhase } from '../../timeProfiler.js';
|
|
6
|
+
import { cliArgs } from '../args.js';
|
|
7
7
|
//import dotenv from 'dotenv'
|
|
8
8
|
//dotenv.config({ path: '.private.env' })
|
|
9
9
|
// first statement in the body, so it closes off the import evaluation above
|
|
@@ -11,12 +11,18 @@ reportStartupPhase('load dev modules');
|
|
|
11
11
|
const {
|
|
12
12
|
boot,
|
|
13
13
|
profile,
|
|
14
|
-
tests
|
|
14
|
+
tests,
|
|
15
|
+
fresh,
|
|
16
|
+
clean
|
|
15
17
|
} = cliArgs({
|
|
16
18
|
boot: '--no-boot',
|
|
17
19
|
profile: '--profile',
|
|
20
|
+
// also delete the packages and styles caches, not only the dev build
|
|
21
|
+
clean: '--clean',
|
|
18
22
|
// also compile the files config.testDirs/testPatterns match - normally only a test compile does
|
|
19
|
-
tests: '--tests'
|
|
23
|
+
tests: '--tests',
|
|
24
|
+
// compile everything from source, ignoring the packages and styles caches (they are rewritten)
|
|
25
|
+
fresh: '--fresh'
|
|
20
26
|
}, {
|
|
21
27
|
handledElsewhere: ['--profile-modules']
|
|
22
28
|
});
|
|
@@ -24,11 +30,12 @@ const {
|
|
|
24
30
|
const sxyFramework = new Framework();
|
|
25
31
|
sxyFramework.profiler = createTimeProfiler(profile);
|
|
26
32
|
sxyFramework.tests = tests;
|
|
33
|
+
sxyFramework.fresh = fresh;
|
|
27
34
|
const config = await sxyFramework.init();
|
|
28
35
|
//console.log('framework ready')
|
|
29
36
|
// build for dev
|
|
30
|
-
cliOut('Removing old builds');
|
|
31
|
-
await sxyFramework.clean('dev');
|
|
37
|
+
cliOut(clean ? 'Removing the dev build and its caches' : 'Removing old builds');
|
|
38
|
+
await sxyFramework.clean(clean ? 'dev-full' : 'dev');
|
|
32
39
|
//cliOut('cleaned')
|
|
33
40
|
cliOut('Building');
|
|
34
41
|
await sxyFramework.build('dev');
|
|
@@ -5,12 +5,12 @@ import { spawn } from 'node:child_process';
|
|
|
5
5
|
import { join } from 'node:path';
|
|
6
6
|
import { fileURLToPath } from 'node:url';
|
|
7
7
|
import chokidar from 'chokidar';
|
|
8
|
-
import { cliError } from
|
|
9
|
-
import { getFrameworkDir } from
|
|
10
|
-
import { cliArgs } from
|
|
8
|
+
import { cliError } from '../../cliOutput.js';
|
|
9
|
+
import { getFrameworkDir } from '../../getFrameworkDir.js';
|
|
10
|
+
import { cliArgs } from '../args.js';
|
|
11
11
|
// devmon reads none of its arguments itself - it passes them straight through to the dev child
|
|
12
12
|
cliArgs({}, {
|
|
13
|
-
handledElsewhere: ['--no-boot', '--profile', '--profile-modules']
|
|
13
|
+
handledElsewhere: ['--no-boot', '--clean', '--fresh', '--tests', '--profile', '--profile-modules']
|
|
14
14
|
});
|
|
15
15
|
const initialArgs = process.argv.slice(3);
|
|
16
16
|
// a restart must not reopen the browser tab, so it always carries --no-boot
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { cliOut } from
|
|
1
|
+
import { cliOut } from '../../cliOutput.js';
|
|
2
2
|
const command = process.argv[2];
|
|
3
3
|
cliOut(`Usage: tungsten <command> [options]
|
|
4
4
|
|
|
5
5
|
Commands:
|
|
6
|
-
dev Start dev mode [--no-boot] [--profile] [--profile-modules]
|
|
6
|
+
dev Start dev mode [--no-boot] [--clean] [--fresh] [--tests] [--profile] [--profile-modules]
|
|
7
7
|
devmon Dev mode, auto-restarts on framework rebuilds (same options as dev)
|
|
8
8
|
build Production build [--profile] [--profile-modules] [--quiet]
|
|
9
9
|
start Start production server
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Framework } from
|
|
2
|
-
import { cliArgs } from
|
|
1
|
+
import { Framework } from '../../Framework.js';
|
|
2
|
+
import { cliArgs } from '../args.js';
|
|
3
3
|
//import dotenv from 'dotenv'
|
|
4
4
|
//dotenv.config({ path: '.private.env' })
|
|
5
5
|
cliArgs({}); // accepts nothing but --help
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import open from 'open';
|
|
2
|
-
import { getUserConfig } from
|
|
3
|
-
import { StaticSiteServer } from
|
|
4
|
-
import { cliArgs } from
|
|
2
|
+
import { getUserConfig } from '../../getUserConfig.js';
|
|
3
|
+
import { StaticSiteServer } from '../../Servers/StaticSiteServer.js';
|
|
4
|
+
import { cliArgs } from '../args.js';
|
|
5
5
|
cliArgs({}); // accepts nothing but --help
|
|
6
6
|
const staticServer = new StaticSiteServer(await getUserConfig());
|
|
7
7
|
const staticServerLocation = await staticServer.start();
|
package/dist/bin/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/bin/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/bin/index.ts"],"names":[],"mappings":"AAoHA,OAAO,EAAE,CAAA"}
|
package/dist/bin/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { enableCompileCache, flushCompileCache } from 'node:module';
|
|
2
|
-
import { cliOut, cliWarn } from
|
|
3
|
-
import { beginStartupProfiling } from
|
|
2
|
+
import { cliOut, cliWarn } from '../cliOutput.js';
|
|
3
|
+
import { beginStartupProfiling } from '../timeProfiler.js';
|
|
4
4
|
// get command line args
|
|
5
5
|
const args = process.argv.slice(2);
|
|
6
6
|
const command = args[0];
|
|
@@ -10,18 +10,26 @@ const profile = args.includes('--profile');
|
|
|
10
10
|
// while it populates, so a single run straight after a rebuild looks like a regression.
|
|
11
11
|
// NODE_DISABLE_COMPILE_CACHE=1 turns it off (NODE_COMPILE_CACHE does not - it names the cache
|
|
12
12
|
// directory, so a value of 0 makes a folder called 0).
|
|
13
|
-
|
|
13
|
+
// OFF for a trial (2026-09-07): Robert is checking whether occasional slow starts persist without
|
|
14
|
+
// it. Measured worth ~200ms warm. Set TUNGSTEN_COMPILE_CACHE=1 to turn it back on meanwhile.
|
|
15
|
+
const compileCacheWanted = process.env.TUNGSTEN_COMPILE_CACHE === '1';
|
|
16
|
+
const compileCache = compileCacheWanted ? enableCompileCache() : undefined;
|
|
14
17
|
// reported under --profile because "is it even on?" is otherwise only answerable by inspecting
|
|
15
18
|
// the cache directory's timestamps - status 1 is enabled, 2 already enabled, 3 disabled
|
|
16
19
|
if (profile) {
|
|
17
|
-
cliOut(`compile cache: status ${compileCache.status}
|
|
20
|
+
cliOut(compileCache === undefined ? `compile cache: off (trial - TUNGSTEN_COMPILE_CACHE=1 enables)` : `compile cache: status ${compileCache.status} ${compileCache.directory ?? compileCache.message ?? ''}`);
|
|
18
21
|
}
|
|
19
22
|
// hooks have to be registered before the command module - and so its import tree - is loaded
|
|
23
|
+
const {
|
|
24
|
+
registerVendorHook
|
|
25
|
+
} = await import('./vendorHook.js');
|
|
26
|
+
const vendorStatus = registerVendorHook();
|
|
27
|
+
if (profile) cliOut(`vendor bundle: ${vendorStatus}`);
|
|
20
28
|
const profileModulesArg = args.find(arg => arg === '--profile-modules' || arg.startsWith('--profile-modules='));
|
|
21
29
|
if (profileModulesArg !== undefined) {
|
|
22
30
|
const {
|
|
23
31
|
registerModuleLoadAnalysis
|
|
24
|
-
} = await import(
|
|
32
|
+
} = await import('./moduleLoadAnalysis.js');
|
|
25
33
|
registerModuleLoadAnalysis(profileModulesArg.split('=')[1]);
|
|
26
34
|
}
|
|
27
35
|
switch (command) {
|
|
@@ -31,7 +39,7 @@ switch (command) {
|
|
|
31
39
|
case '--help':
|
|
32
40
|
case '-h':
|
|
33
41
|
{
|
|
34
|
-
await import(
|
|
42
|
+
await import('./commands/help.js');
|
|
35
43
|
break;
|
|
36
44
|
}
|
|
37
45
|
case 'dev':
|
|
@@ -40,20 +48,20 @@ switch (command) {
|
|
|
40
48
|
beginStartupProfiling(profile);
|
|
41
49
|
// set env before loading the next file, to set the env before file imports
|
|
42
50
|
process.env.__TUNGSTEN_ENV = 'development';
|
|
43
|
-
await import(
|
|
51
|
+
await import('./commands/dev.js');
|
|
44
52
|
break;
|
|
45
53
|
}
|
|
46
54
|
case 'devmon':
|
|
47
55
|
{
|
|
48
56
|
cliOut(`Starting Tungsten auto-restart dev mode`);
|
|
49
57
|
process.env.__TUNGSTEN_ENV = 'development';
|
|
50
|
-
await import(
|
|
58
|
+
await import('./commands/devmon.js');
|
|
51
59
|
break;
|
|
52
60
|
}
|
|
53
61
|
case 'build':
|
|
54
62
|
{
|
|
55
63
|
if (args.includes('--help') || args.includes('-h')) {
|
|
56
|
-
await import(
|
|
64
|
+
await import('./commands/buildHelp.js');
|
|
57
65
|
break;
|
|
58
66
|
}
|
|
59
67
|
// announce before the import: resolving the build's dependencies is a long silent wait
|
|
@@ -61,38 +69,38 @@ switch (command) {
|
|
|
61
69
|
beginStartupProfiling(profile);
|
|
62
70
|
process.env.__TUNGSTEN_ENV = 'production';
|
|
63
71
|
process.env.__TUNGSTEN_DEBUG = 'true';
|
|
64
|
-
await import(
|
|
72
|
+
await import('./commands/build.js');
|
|
65
73
|
break;
|
|
66
74
|
}
|
|
67
75
|
case 'start':
|
|
68
76
|
{
|
|
69
77
|
cliOut(`Starting Tungsten server`);
|
|
70
78
|
process.env.__TUNGSTEN_ENV = 'production';
|
|
71
|
-
await import(
|
|
79
|
+
await import('./commands/start.js');
|
|
72
80
|
break;
|
|
73
81
|
}
|
|
74
82
|
case 'static':
|
|
75
83
|
{
|
|
76
84
|
cliOut(`Starting Tungsten static site preview`);
|
|
77
85
|
//process.env.__TUNGSTEN_ENV = 'production'
|
|
78
|
-
await import(
|
|
86
|
+
await import('./commands/static.js');
|
|
79
87
|
break;
|
|
80
88
|
}
|
|
81
89
|
case 'clean':
|
|
82
90
|
{
|
|
83
|
-
await import(
|
|
91
|
+
await import('./commands/clean.js');
|
|
84
92
|
break;
|
|
85
93
|
}
|
|
86
94
|
case 'compile':
|
|
87
95
|
{
|
|
88
96
|
beginStartupProfiling(profile);
|
|
89
97
|
process.env.__TUNGSTEN_ENV = 'development';
|
|
90
|
-
await import(
|
|
98
|
+
await import('./commands/compile.js');
|
|
91
99
|
break;
|
|
92
100
|
}
|
|
93
101
|
case 'compile-simple-package':
|
|
94
102
|
{
|
|
95
|
-
await import(
|
|
103
|
+
await import('./commands/compileSimplePackage.js');
|
|
96
104
|
break;
|
|
97
105
|
}
|
|
98
106
|
default:
|
|
@@ -105,7 +113,7 @@ switch (command) {
|
|
|
105
113
|
// exited - signals skip exit handling - so they would populate the cache and then throw it away,
|
|
106
114
|
// paying the cold cost on every run forever. The import above has returned by here, which for a
|
|
107
115
|
// server command means it has finished starting, so this persists what that startup compiled.
|
|
108
|
-
flushCompileCache();
|
|
116
|
+
if (compileCacheWanted) flushCompileCache();
|
|
109
117
|
// A profiled dev run has measured everything it will measure once the server is up and the report
|
|
110
118
|
// has printed. Exit rather than leave a server to be killed - after the flush above, which a kill
|
|
111
119
|
// would have skipped. (dev.ts itself must not exit: its import returning is what reaches here.)
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
import { registerHooks } from 'node:module';
|
|
6
6
|
import { performance } from 'node:perf_hooks';
|
|
7
7
|
import chalk from 'chalk-extensions';
|
|
8
|
-
import { cliOut } from
|
|
9
|
-
import { addEndOfRunReport } from
|
|
8
|
+
import { cliOut } from '../cliOutput.js';
|
|
9
|
+
import { addEndOfRunReport } from '../timeProfiler.js';
|
|
10
10
|
const records = new Map();
|
|
11
11
|
// The user's app enters the graph through an iterationQueryString() import, so its first module
|
|
12
12
|
// arrives as an explicitly tagged specifier - and recording stops there. Past that point the cost
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vendorHook.d.ts","sourceRoot":"","sources":["../../src/bin/vendorHook.ts"],"names":[],"mappings":"AAYA,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAA;AAE1D,wBAAgB,kBAAkB,IAAI,gBAAgB,CA2BrD"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { registerHooks } from 'node:module';
|
|
2
|
+
import { existsSync, readFileSync, statSync } from 'node:fs';
|
|
3
|
+
import { dirname, join } from 'node:path';
|
|
4
|
+
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
5
|
+
import { cliWarn } from '../cliOutput.js';
|
|
6
|
+
export function registerVendorHook() {
|
|
7
|
+
const packageDir = dirname(dirname(dirname(fileURLToPath(import.meta.url))));
|
|
8
|
+
const vendorDir = join(packageDir, 'vendor');
|
|
9
|
+
const manifestPath = join(vendorDir, 'manifest.json');
|
|
10
|
+
if (!existsSync(manifestPath)) return 'none';
|
|
11
|
+
const manifest = JSON.parse(readFileSync(manifestPath, 'utf8')); // eslint-disable-line @typescript-eslint/no-unsafe-type-assertion -- our own file
|
|
12
|
+
const lockfile = join(packageDir, 'pnpm-lock.yaml');
|
|
13
|
+
// a linked checkout whose dependencies moved on: fall back rather than run a stale bundle
|
|
14
|
+
if (manifest.lockfile !== undefined && existsSync(lockfile)) {
|
|
15
|
+
const stat = statSync(lockfile);
|
|
16
|
+
if (stat.size !== manifest.lockfile.size || stat.mtimeMs !== manifest.lockfile.mtimeMs) {
|
|
17
|
+
cliWarn('vendor bundle is older than pnpm-lock.yaml - loading dependencies from node_modules (pnpm build-vendor)');
|
|
18
|
+
return 'stale';
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
const entries = new Map(Object.entries(manifest.specifiers).map(([specifier, name]) => [specifier, pathToFileURL(join(vendorDir, `${name}.js`)).href]));
|
|
22
|
+
registerHooks({
|
|
23
|
+
resolve(specifier, context, next) {
|
|
24
|
+
const url = entries.get(specifier);
|
|
25
|
+
// require() callers want module.exports, which the ESM wrappers do not hand back the same way
|
|
26
|
+
if (url === undefined || context.conditions.includes('require')) return next(specifier, context);
|
|
27
|
+
return {
|
|
28
|
+
url,
|
|
29
|
+
shortCircuit: true
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
return 'active';
|
|
34
|
+
}
|
package/dist/browserStorage.js
CHANGED
|
@@ -5,8 +5,8 @@ function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.h
|
|
|
5
5
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
6
6
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
7
7
|
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); }
|
|
8
|
-
import { isBrowser } from
|
|
9
|
-
import { throwError } from
|
|
8
|
+
import { isBrowser } from './isBrowser.js';
|
|
9
|
+
import { throwError } from './throwError.js';
|
|
10
10
|
class ServerStorage {
|
|
11
11
|
constructor() {
|
|
12
12
|
_defineProperty(this, "get", () => throwError('Browser Storage', 'Browser storage was accessed on the server'));
|
|
@@ -38,7 +38,7 @@ export class TungstenLocalStorage {
|
|
|
38
38
|
_defineProperty(this, "clear", () => {
|
|
39
39
|
localStorage.clear();
|
|
40
40
|
for (const key in _classPrivateFieldGet(_subscribers, this)) {
|
|
41
|
-
_classPrivateFieldGet(_push, this).call(this, key, undefined); // eslint-disable-line
|
|
41
|
+
_classPrivateFieldGet(_push, this).call(this, key, undefined); // eslint-disable-line @typescript-eslint/no-unsafe-type-assertion -- TS is being a wanker about keys of object
|
|
42
42
|
}
|
|
43
43
|
});
|
|
44
44
|
_defineProperty(this, "key", index => localStorage.key(index));
|
|
@@ -60,6 +60,7 @@ export class TungstenLocalStorage {
|
|
|
60
60
|
if (subs) {
|
|
61
61
|
for (const element of subs) {
|
|
62
62
|
if ('shouldStoreComponentUpdate' in element && element.shouldStoreComponentUpdate !== undefined) {
|
|
63
|
+
// eslint-disable-line @typescript-eslint/no-unnecessary-condition -- the field can be declared yet unset
|
|
63
64
|
if (!element.shouldStoreComponentUpdate(key, value)) {
|
|
64
65
|
continue;
|
|
65
66
|
}
|
|
@@ -95,7 +96,7 @@ export class TungstenSessionStorage {
|
|
|
95
96
|
_defineProperty(this, "clear", () => {
|
|
96
97
|
sessionStorage.clear();
|
|
97
98
|
for (const key in _classPrivateFieldGet(_subscribers2, this)) {
|
|
98
|
-
_classPrivateFieldGet(_push2, this).call(this, key, undefined); // eslint-disable-line
|
|
99
|
+
_classPrivateFieldGet(_push2, this).call(this, key, undefined); // eslint-disable-line @typescript-eslint/no-unsafe-type-assertion -- TS is being a wanker about keys of object
|
|
99
100
|
}
|
|
100
101
|
});
|
|
101
102
|
_defineProperty(this, "key", index => sessionStorage.key(index));
|
|
@@ -117,6 +118,7 @@ export class TungstenSessionStorage {
|
|
|
117
118
|
if (subs) {
|
|
118
119
|
for (const element of subs) {
|
|
119
120
|
if ('shouldStoreComponentUpdate' in element && element.shouldStoreComponentUpdate !== undefined) {
|
|
121
|
+
// eslint-disable-line @typescript-eslint/no-unnecessary-condition -- the field can be declared yet unset
|
|
120
122
|
if (!element.shouldStoreComponentUpdate(key, value)) {
|
|
121
123
|
continue;
|
|
122
124
|
}
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
declare
|
|
1
|
+
import type { PluginItem } from "@babel/core";
|
|
2
|
+
export declare function typescriptPreset(): PluginItem;
|
|
3
|
+
declare const userCommonConfig: {
|
|
4
|
+
ignore: RegExp[];
|
|
5
|
+
babelrc: false;
|
|
6
|
+
configFile: false;
|
|
7
|
+
presets: PluginItem[];
|
|
8
|
+
plugins: PluginItem[];
|
|
9
|
+
};
|
|
3
10
|
export default userCommonConfig;
|
|
4
11
|
//# sourceMappingURL=babel.user.common.config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"babel.user.common.config.d.ts","sourceRoot":"","sources":["../../src/build/babel.user.common.config.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"babel.user.common.config.d.ts","sourceRoot":"","sources":["../../src/build/babel.user.common.config.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAoB,MAAM,aAAa,CAAA;AAW/D,wBAAgB,gBAAgB,IAAI,UAAU,CAG7C;AAMD,QAAA,MAAM,gBAAgB;;;;aAcb,UAAU,EAAE;aAMZ,UAAU,EAAE;CACO,CAAA;AAE5B,eAAe,gBAAgB,CAAA"}
|