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,14 +1,14 @@
|
|
|
1
|
-
import slash from 'slash';
|
|
1
|
+
import slash from '../slash.js';
|
|
2
2
|
import chokidar from 'chokidar';
|
|
3
3
|
import { join, dirname, resolve } from 'path';
|
|
4
4
|
import { pathToFileURL } from 'url';
|
|
5
5
|
import { promises as fsPromises, utimesSync } from 'fs';
|
|
6
6
|
import * as sass from 'sass';
|
|
7
|
-
import {
|
|
8
|
-
import { staticFolder } from
|
|
9
|
-
import { cliError, cliOut } from
|
|
10
|
-
import { throwError } from
|
|
11
|
-
import { resolveSassImport, resolveScssImport } from
|
|
7
|
+
import { glob } from '../glob.js';
|
|
8
|
+
import { staticFolder } from '../settings.js';
|
|
9
|
+
import { cliError, cliOut } from '../cliOutput.js'; // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
10
|
+
import { throwError } from '../throwError.js';
|
|
11
|
+
import { resolveSassImport, resolveScssImport } from './resolveSassScssImports.js';
|
|
12
12
|
function debug(...texts) {
|
|
13
13
|
//console.log(...texts)
|
|
14
14
|
}
|
|
@@ -59,7 +59,7 @@ function findSxssDependencies(data, file, regex, extension) {
|
|
|
59
59
|
// [...xxx] converts it to a plain array
|
|
60
60
|
let results = [...data.matchAll(regex)]
|
|
61
61
|
// the matches group is on position 1, so we map to get just the match group
|
|
62
|
-
.map(x => x[1]); // eslint-disable-line
|
|
62
|
+
.map(x => x[1]); // eslint-disable-line @typescript-eslint/no-unsafe-type-assertion
|
|
63
63
|
if (extension === '.sass') results = results.map(dep => {
|
|
64
64
|
if ((dep.startsWith(`'`) || dep.startsWith(`"`)) && dep.endsWith(dep[0])) {
|
|
65
65
|
return dep.slice(1, -1);
|
|
@@ -216,7 +216,7 @@ export async function compileStyles(projectDir, config, styleImportBase, buildLo
|
|
|
216
216
|
const ignoreGlob = buildLocation + '/**/*';
|
|
217
217
|
debug('Styles watchGlob', watchGlob);
|
|
218
218
|
if (!watch) {
|
|
219
|
-
const files = await
|
|
219
|
+
const files = await glob(slash(watchGlob));
|
|
220
220
|
await Promise.all(files.map(file => processAndCopyFile(sourceLocation, staticLocation, slash(file), styleImportBase, cssFiles, cssDependencies, cssdependers)));
|
|
221
221
|
return null;
|
|
222
222
|
}
|
|
@@ -2,5 +2,5 @@ import type { CompilationInfo } from './CompilationInfo.js';
|
|
|
2
2
|
import type { FrameworkConfigComplete } from '../FrameworkConfig.js';
|
|
3
3
|
import type { Mode } from '../Mode.js';
|
|
4
4
|
import { type TimeProfiler } from '../timeProfiler.js';
|
|
5
|
-
export declare function compileUserApp(projectDir: string, appConfig: FrameworkConfigComplete, mode: Mode, profiler?: TimeProfiler, quiet?: boolean, tests?: boolean): Promise<CompilationInfo>;
|
|
5
|
+
export declare function compileUserApp(projectDir: string, appConfig: FrameworkConfigComplete, mode: Mode, profiler?: TimeProfiler, quiet?: boolean, tests?: boolean, fresh?: boolean): Promise<CompilationInfo>;
|
|
6
6
|
//# sourceMappingURL=compileUserApp.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compileUserApp.d.ts","sourceRoot":"","sources":["../../src/build/compileUserApp.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAC3D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAA;AACpE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAWtC,OAAO,EAAsB,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAI1E,wBAAsB,cAAc,CAChC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,uBAAuB,EAAE,IAAI,EAAE,IAAI,EAClE,QAAQ,GAAE,YAAwC,EAAE,KAAK,UAAQ,EAAE,KAAK,UAAQ,
|
|
1
|
+
{"version":3,"file":"compileUserApp.d.ts","sourceRoot":"","sources":["../../src/build/compileUserApp.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAC3D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAA;AACpE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAWtC,OAAO,EAAsB,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAI1E,wBAAsB,cAAc,CAChC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,uBAAuB,EAAE,IAAI,EAAE,IAAI,EAClE,QAAQ,GAAE,YAAwC,EAAE,KAAK,UAAQ,EAAE,KAAK,UAAQ,EAAE,KAAK,UAAQ,GAChG,OAAO,CAAC,eAAe,CAAC,CAgF1B"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { join } from 'path';
|
|
2
|
-
import { compileJavascript } from
|
|
3
|
-
import { compileStyles } from
|
|
4
|
-
import { copyAssets } from
|
|
5
|
-
import { copyPublicFiles } from
|
|
6
|
-
import { buildCodeSubPath, bundleFolder, devBuildOuterFolder, frameworkCssFile, frameworkCssFolder, prodBuildFolder } from
|
|
7
|
-
import { combineComponentCss } from
|
|
8
|
-
import { writeFrameworkCss } from
|
|
9
|
-
import { emitReloadEvent } from
|
|
10
|
-
import { createTimeProfiler } from
|
|
2
|
+
import { compileJavascript } from './compileJavascript.js';
|
|
3
|
+
import { compileStyles } from './compileStyles.js';
|
|
4
|
+
import { copyAssets } from './copyAssets.js';
|
|
5
|
+
import { copyPublicFiles } from './copyPublicFiles.js';
|
|
6
|
+
import { buildCodeSubPath, bundleFolder, devBuildOuterFolder, frameworkCssFile, frameworkCssFolder, prodBuildFolder } from '../settings.js';
|
|
7
|
+
import { combineComponentCss } from './combineComponentCss.js';
|
|
8
|
+
import { writeFrameworkCss } from './frameworkStylesheets.js';
|
|
9
|
+
import { emitReloadEvent } from '../hmr/liveReloadHub.js';
|
|
10
|
+
import { createTimeProfiler } from '../timeProfiler.js';
|
|
11
11
|
//import { compileEnv } from './compileEnv.js'
|
|
12
|
-
export async function compileUserApp(projectDir, appConfig, mode, profiler = createTimeProfiler(false), quiet = false, tests = false) {
|
|
12
|
+
export async function compileUserApp(projectDir, appConfig, mode, profiler = createTimeProfiler(false), quiet = false, tests = false, fresh = false) {
|
|
13
13
|
const codeLocation = join(projectDir, appConfig.codeDir);
|
|
14
14
|
const relSourceDir = appConfig.sourceDir !== undefined && appConfig.sourceDir !== '' ? appConfig.sourceDir : appConfig.codeDir;
|
|
15
15
|
const sourceLocation = join(projectDir, relSourceDir);
|
|
@@ -23,13 +23,16 @@ export async function compileUserApp(projectDir, appConfig, mode, profiler = cre
|
|
|
23
23
|
const compileJavascriptPromise = profiler.timeProfileAsync('compile javascript', () => compileJavascript(projectDir, appConfig, codeLocation, sourceLocation, styleImportBase, buildLocation, buildCodeLocation, mode, watch, mode === 'dev' ? {
|
|
24
24
|
quiet,
|
|
25
25
|
tests,
|
|
26
|
+
fresh,
|
|
26
27
|
hmr: appConfig.hmr === true,
|
|
28
|
+
// a raw-only file (server code) has nothing for the browser to reload
|
|
27
29
|
onCycleComplete: cycle => {
|
|
28
|
-
if (cycle.success) emitReloadEvent('js', cycle.file);
|
|
30
|
+
if (cycle.success && cycle.client !== false) emitReloadEvent('js', cycle.file);
|
|
29
31
|
}
|
|
30
32
|
} : {
|
|
31
33
|
quiet,
|
|
32
|
-
tests
|
|
34
|
+
tests,
|
|
35
|
+
fresh
|
|
33
36
|
}));
|
|
34
37
|
//const compileEnvPromise = compileEnv(projectDir, appConfig, codeLocation, buildLocation, mode)
|
|
35
38
|
const compileStylesPromise = profiler.timeProfileAsync('compile styles', () => compileStyles(projectDir, appConfig, styleImportBase, buildLocation, watch, mode === 'dev' ? () => emitReloadEvent('css') : undefined, quiet));
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type CompiledStyles = {
|
|
2
|
+
css: string;
|
|
3
|
+
dependencies: string[];
|
|
4
|
+
};
|
|
5
|
+
export declare function makeComponentStylesCache(cacheDir: string | undefined, fresh?: boolean): {
|
|
6
|
+
lookup(moduleName: string, language: string, rawStyles: string): CompiledStyles | undefined;
|
|
7
|
+
store(moduleName: string, language: string, rawStyles: string, compiled: CompiledStyles): void;
|
|
8
|
+
};
|
|
9
|
+
export type ComponentStylesCache = ReturnType<typeof makeComponentStylesCache>;
|
|
10
|
+
//# sourceMappingURL=componentStylesCache.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"componentStylesCache.d.ts","sourceRoot":"","sources":["../../src/build/componentStylesCache.ts"],"names":[],"mappings":"AAUA,MAAM,MAAM,cAAc,GAAG;IACzB,GAAG,EAAE,MAAM,CAAA;IAEX,YAAY,EAAE,MAAM,EAAE,CAAA;CACzB,CAAA;AAoBD,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,EAAE,KAAK,UAAQ;uBAKzD,MAAM,YAAY,MAAM,aAAa,MAAM,GAAG,cAAc,GAAG,SAAS;sBAezE,MAAM,YAAY,MAAM,aAAa,MAAM,YAAY,cAAc;EAY9F;AAED,MAAM,MAAM,oBAAoB,GAAG,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAA"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { createHash } from 'crypto';
|
|
2
|
+
import fs from 'fs';
|
|
3
|
+
import { join } from 'path';
|
|
4
|
+
import { frameworkVersion } from './frameworkDestLocation.js';
|
|
5
|
+
const sha1 = data => createHash('sha1').update(data).digest('hex');
|
|
6
|
+
const blockHash = (language, rawStyles) => sha1(`${language}\0${rawStyles}`);
|
|
7
|
+
const fileHash = file => {
|
|
8
|
+
try {
|
|
9
|
+
return sha1(fs.readFileSync(file, 'utf8'));
|
|
10
|
+
} catch {
|
|
11
|
+
return undefined;
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
// fresh: every lookup misses, so everything compiles from source and the records are all rewritten
|
|
15
|
+
export function makeComponentStylesCache(cacheDir, fresh = false) {
|
|
16
|
+
// `#` (the framework module prefix) is kept out of filenames, as the css manifest does
|
|
17
|
+
const recordFile = (dir, moduleName) => join(dir, `${moduleName.replaceAll('#', '')}.json`);
|
|
18
|
+
return {
|
|
19
|
+
lookup(moduleName, language, rawStyles) {
|
|
20
|
+
if (cacheDir === undefined || fresh) return undefined;
|
|
21
|
+
let record;
|
|
22
|
+
try {
|
|
23
|
+
record = JSON.parse(fs.readFileSync(recordFile(cacheDir, moduleName), 'utf8'));
|
|
24
|
+
} catch {
|
|
25
|
+
return undefined;
|
|
26
|
+
}
|
|
27
|
+
if (record.version !== frameworkVersion || record.hash !== blockHash(language, rawStyles)) return undefined;
|
|
28
|
+
if (!Array.isArray(record.dependencies) || typeof record.css !== 'string') return undefined;
|
|
29
|
+
for (const dependency of record.dependencies) {
|
|
30
|
+
if (fileHash(dependency.file) !== dependency.hash) return undefined;
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
css: record.css,
|
|
34
|
+
dependencies: record.dependencies.map(dependency => dependency.file)
|
|
35
|
+
};
|
|
36
|
+
},
|
|
37
|
+
store(moduleName, language, rawStyles, compiled) {
|
|
38
|
+
if (cacheDir === undefined) return;
|
|
39
|
+
const record = {
|
|
40
|
+
version: frameworkVersion,
|
|
41
|
+
hash: blockHash(language, rawStyles),
|
|
42
|
+
css: compiled.css,
|
|
43
|
+
dependencies: compiled.dependencies.map(file => ({
|
|
44
|
+
file,
|
|
45
|
+
hash: fileHash(file) ?? ''
|
|
46
|
+
}))
|
|
47
|
+
};
|
|
48
|
+
fs.mkdirSync(cacheDir, {
|
|
49
|
+
recursive: true
|
|
50
|
+
});
|
|
51
|
+
fs.writeFileSync(recordFile(cacheDir, moduleName), JSON.stringify(record));
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
}
|
package/dist/build/copyAssets.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import slash from 'slash';
|
|
1
|
+
import slash from '../slash.js';
|
|
2
2
|
import chokidar from 'chokidar';
|
|
3
3
|
import { join, dirname } from 'path';
|
|
4
4
|
import { promises as fsPromises } from 'fs';
|
|
5
|
-
import {
|
|
6
|
-
import { cliOut } from
|
|
5
|
+
import { glob } from '../glob.js';
|
|
6
|
+
import { cliOut } from '../cliOutput.js';
|
|
7
7
|
async function copyFile(assetsLocation, targetLocation, filePathFull, event) {
|
|
8
8
|
const relFile = filePathFull.slice(assetsLocation.length + 1);
|
|
9
9
|
const target = join(targetLocation, relFile);
|
|
@@ -23,7 +23,7 @@ export async function copyAssets(projectDir, config, buildLocation, watch = true
|
|
|
23
23
|
const watchGlob = assetsLocation + '/**/*';
|
|
24
24
|
//const ignoreGlob = buildLocation + '/**/*'
|
|
25
25
|
if (!watch) {
|
|
26
|
-
const files = await
|
|
26
|
+
const files = await glob(slash(watchGlob));
|
|
27
27
|
await Promise.all(files.map(file => copyFile(assetsLocation, targetLocation, slash(file), 'add')));
|
|
28
28
|
return null;
|
|
29
29
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { existsSync, promises as fsPromises } from 'fs';
|
|
2
2
|
import { dirname, join } from 'path';
|
|
3
3
|
import { transformSync as babelTransformSync } from '@babel/core';
|
|
4
|
-
import { findProjectDir } from
|
|
5
|
-
import { devBuildOuterFolder, prodBuildFolder, packagesFolder } from
|
|
6
|
-
import { MakeBabelTransformDependencyImports } from
|
|
7
|
-
import { TungstenError } from
|
|
4
|
+
import { findProjectDir } from '../findProjectDir.js';
|
|
5
|
+
import { devBuildOuterFolder, prodBuildFolder, packagesFolder } from '../settings.js';
|
|
6
|
+
import { MakeBabelTransformDependencyImports } from '../babelPlugins/BabelTransformDependencyImportsOld.js';
|
|
7
|
+
import { TungstenError } from '../TungstenError.js';
|
|
8
8
|
import { cliWarn } from 'tungsten/cliOutput.js';
|
|
9
9
|
const frameworkDir = findProjectDir(import.meta.url);
|
|
10
10
|
// unused!
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import slash from 'slash';
|
|
1
|
+
import slash from '../slash.js';
|
|
2
2
|
import chokidar from 'chokidar';
|
|
3
3
|
import { join, dirname } from 'path';
|
|
4
4
|
import { promises as fsPromises } from 'fs';
|
|
5
|
-
import {
|
|
6
|
-
import { cliOut } from
|
|
5
|
+
import { glob } from '../glob.js';
|
|
6
|
+
import { cliOut } from '../cliOutput.js';
|
|
7
7
|
async function copyFile(assetsLocation, targetLocation, filePathFull, event) {
|
|
8
8
|
const relFile = filePathFull.slice(assetsLocation.length + 1);
|
|
9
9
|
const target = join(targetLocation, relFile);
|
|
@@ -24,7 +24,7 @@ export async function copyPublicFiles(projectDir, config, buildLocation, watch =
|
|
|
24
24
|
const watchGlob = publicLocation + '/**/*';
|
|
25
25
|
//const ignoreGlob = buildLocation + '/**/*'
|
|
26
26
|
if (!watch) {
|
|
27
|
-
const files = await
|
|
27
|
+
const files = await glob(slash(watchGlob));
|
|
28
28
|
await Promise.all(files.map(file => copyFile(publicLocation, targetLocation, slash(file), 'add')));
|
|
29
29
|
return null;
|
|
30
30
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { promises as fsPromises } from 'fs';
|
|
2
2
|
import { join } from 'path';
|
|
3
|
-
import { buildCodeSubPath, devBuildOuterFolder, prodBuildFolder, clientFolder, frameworkDistFolder, frameworkClientFolder } from
|
|
4
|
-
import { fixExtension } from
|
|
5
|
-
import { findProjectDir } from
|
|
3
|
+
import { buildCodeSubPath, devBuildOuterFolder, prodBuildFolder, clientFolder, frameworkDistFolder, frameworkClientFolder } from '../settings.js';
|
|
4
|
+
import { fixExtension } from '../fixExtension.js';
|
|
5
|
+
import { findProjectDir } from '../findProjectDir.js';
|
|
6
6
|
export async function createClientFiles(config, mode, buildLocation) {
|
|
7
7
|
//console.log('creating entry file')
|
|
8
8
|
const specificBuildFolder = buildLocation ?? join(process.cwd(), mode === 'dev' ? devBuildOuterFolder : prodBuildFolder);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { promises as fsPromises } from 'fs';
|
|
2
2
|
import { join, dirname } from 'path';
|
|
3
|
-
import { devBuildOuterFolder, prodBuildFolder } from
|
|
4
|
-
import { TungstenError } from
|
|
3
|
+
import { devBuildOuterFolder, prodBuildFolder } from '../settings.js';
|
|
4
|
+
import { TungstenError } from '../TungstenError.js';
|
|
5
5
|
export async function createInstanceConfigFile(config, mode, buildLocation) {
|
|
6
6
|
//console.log('creating app config')
|
|
7
7
|
const specificBuildFolder = buildLocation ?? join(process.cwd(), mode === 'dev' ? devBuildOuterFolder : prodBuildFolder);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createPackageVirtualFileSystem } from
|
|
1
|
+
import { createPackageVirtualFileSystem } from './createPackageVirtualFileSystem.js';
|
|
2
2
|
// pretty sure we aren't using this now
|
|
3
3
|
export function createPackageVirtualFileSystems(packages) {
|
|
4
4
|
for (const p of Object.values(packages)) {
|
package/dist/build/devBundle.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { join } from 'path';
|
|
2
|
-
import { getFrameworkDir } from
|
|
3
|
-
import { devBuildOuterFolder, frameworkDistFolder } from
|
|
4
|
-
import { spawnShellCommand } from
|
|
5
|
-
import { cliError, cliOut } from
|
|
6
|
-
import { frameworkDestLocation } from
|
|
2
|
+
import { getFrameworkDir } from '../getFrameworkDir.js';
|
|
3
|
+
import { devBuildOuterFolder, frameworkDistFolder } from '../settings.js';
|
|
4
|
+
import { spawnShellCommand } from '../spawnShellCommand.js';
|
|
5
|
+
import { cliError, cliOut } from '../cliOutput.js';
|
|
6
|
+
import { frameworkDestLocation } from './frameworkDestLocation.js';
|
|
7
7
|
export async function devBundle() {
|
|
8
8
|
return new Promise((resolve, reject) => {
|
|
9
9
|
cliOut('Creating dev bundle');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"devBundle.rollup.config.d.ts","sourceRoot":"","sources":["../../src/build/devBundle.rollup.config.ts"],"names":[],"mappings":"AAUA,KAAK,YAAY,GAAG;IAChB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CACrB,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"devBundle.rollup.config.d.ts","sourceRoot":"","sources":["../../src/build/devBundle.rollup.config.ts"],"names":[],"mappings":"AAUA,KAAK,YAAY,GAAG;IAChB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CACrB,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,YAiBnB,CAAA;AAED,eAAe,YAAY,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"frameworkDestLocation.d.ts","sourceRoot":"","sources":["../../src/build/frameworkDestLocation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"frameworkDestLocation.d.ts","sourceRoot":"","sources":["../../src/build/frameworkDestLocation.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,gBAAgB,EAAE,MAA4B,CAAA;AAC3D,eAAO,MAAM,qBAAqB,QAAyE,CAAA"}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { getPackageJson } from 'sxy-package-investigator';
|
|
2
|
-
import { TungstenError } from
|
|
3
|
-
import { getFrameworkDir } from
|
|
4
|
-
import { frameworkDistFolder, packageName } from
|
|
2
|
+
import { TungstenError } from '../TungstenError.js';
|
|
3
|
+
import { getFrameworkDir } from '../getFrameworkDir.js';
|
|
4
|
+
import { frameworkDistFolder, packageName } from '../settings.js';
|
|
5
5
|
const packageJsonResult = getPackageJson(getFrameworkDir());
|
|
6
6
|
const packageJson = packageJsonResult.value;
|
|
7
7
|
if (packageJson === undefined) {
|
|
8
8
|
throw new TungstenError(`getSxyClientPackageAliases() error: framework package.json not found`);
|
|
9
9
|
}
|
|
10
|
-
|
|
10
|
+
if (packageJson.version === undefined) {
|
|
11
|
+
throw new TungstenError(`frameworkDestLocation error: framework package.json has no version`);
|
|
12
|
+
}
|
|
13
|
+
export const frameworkVersion = packageJson.version;
|
|
14
|
+
export const frameworkDestLocation = `/.packages/${packageName}@${frameworkVersion}/${frameworkDistFolder}`;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { existsSync, promises as fsPromises } from 'fs';
|
|
2
2
|
import { dirname, join } from 'path';
|
|
3
|
-
import slash from 'slash';
|
|
4
|
-
import { frameworkCssFile, frameworkCssFolder, frameworkDistFolder } from
|
|
3
|
+
import slash from '../slash.js';
|
|
4
|
+
import { frameworkCssFile, frameworkCssFolder, frameworkDistFolder } from '../settings.js';
|
|
5
5
|
// Component stylesheets named by a `$stylesheet` static on a package component, collected while
|
|
6
6
|
// the package import tree is walked so only components the app actually imports contribute.
|
|
7
7
|
// Held on globalThis because moduleReloader busts the ES module cache in dev, so the collector
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getAllSxyClientModules.d.ts","sourceRoot":"","sources":["../../src/build/getAllSxyClientModules.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getAllSxyClientModules.d.ts","sourceRoot":"","sources":["../../src/build/getAllSxyClientModules.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAErC,MAAM,MAAM,qBAAqB,GAAG,MAAM,EAAE,CAAA;AAK5C,wBAAgB,2BAA2B,IAAI,qBAAqB,CAEnE"}
|
|
@@ -1,30 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import { frameworkDistFolder } from "../settings.js";
|
|
1
|
+
// the module list this used to walk with sxy-dependency-tree has been empty for a long time; the
|
|
2
|
+
// walk went with it (typescript + typescript-estree, ~250 modules at dev start). The servers
|
|
3
|
+
// still guard on the field being defined.
|
|
5
4
|
export function getAllTungstenClientModules() {
|
|
6
|
-
|
|
7
|
-
const tungstenModules = [];
|
|
8
|
-
for (const module of []) {
|
|
9
|
-
const fullPath = join(frameworkLocation, frameworkDistFolder, module);
|
|
10
|
-
const nonExistent = [];
|
|
11
|
-
const dependencies = dependencyTree.toList({
|
|
12
|
-
filename: fullPath,
|
|
13
|
-
directory: frameworkLocation,
|
|
14
|
-
nonExistent
|
|
15
|
-
});
|
|
16
|
-
for (const dependency of dependencies) {
|
|
17
|
-
if (!tungstenModules.includes(dependency)) {
|
|
18
|
-
tungstenModules.push(dependency);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
//const distCodeLocation = frameworkLocation+'/'+frameworkDistFolder+'/'
|
|
23
|
-
const tungstenModulesDetailed = tungstenModules.map(module => {
|
|
24
|
-
return {
|
|
25
|
-
abs: module,
|
|
26
|
-
rel: module.slice((frameworkLocation + '/').length) // relative to base
|
|
27
|
-
};
|
|
28
|
-
});
|
|
29
|
-
return tungstenModulesDetailed;
|
|
5
|
+
return [];
|
|
30
6
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { dirname } from 'path';
|
|
2
|
-
import { findProjectDir } from
|
|
2
|
+
import { findProjectDir } from '../findProjectDir.js';
|
|
3
3
|
const cache = {};
|
|
4
4
|
// Package boundary for a file. Nameless package.json files are not boundaries — see findProjectDir.
|
|
5
5
|
export function getPackageDirForFile(file) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSxyClientPackageAliases.d.ts","sourceRoot":"","sources":["../../src/build/getSxyClientPackageAliases.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getSxyClientPackageAliases.d.ts","sourceRoot":"","sources":["../../src/build/getSxyClientPackageAliases.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAKvD,wBAAgB,+BAA+B,IAAI,aAAa,CAkC/D"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { frameworkDestLocation } from
|
|
1
|
+
import { frameworkDestLocation } from './frameworkDestLocation.js';
|
|
2
2
|
// I think these are only used in dev
|
|
3
3
|
export function getTungstenClientPackageAliases() {
|
|
4
4
|
// const packageJsonResult = getPackageJson(getFrameworkDir())
|
|
@@ -10,7 +10,9 @@ export function getTungstenClientPackageAliases() {
|
|
|
10
10
|
// I think these are only used in dev
|
|
11
11
|
const importAliases = {
|
|
12
12
|
'tungsten': `${frameworkDestLocation}/index.js`,
|
|
13
|
-
'
|
|
13
|
+
// what preset-react emits, in app code and the framework's own dist alike; the exports
|
|
14
|
+
// map answers it for node and rollup
|
|
15
|
+
'tungsten/jsx-runtime': `${frameworkDestLocation}/jsx-runtime.js`
|
|
14
16
|
// The component library, mirroring the `./library` subpath in exports.
|
|
15
17
|
//'tungsten/library': `${frameworkDestLocation}/components/library/index.js`,
|
|
16
18
|
//'tungsten': `${frameworkDestLocation}/indexBundle.js`,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { join } from 'path';
|
|
2
|
-
import { devBuildFolder, prodBuildCodeFolder } from
|
|
2
|
+
import { devBuildFolder, prodBuildCodeFolder } from '../settings.js';
|
|
3
3
|
//import { tmpdir } from 'os'
|
|
4
4
|
export function getTempDirForAppCompilation(projectDir, mode) {
|
|
5
5
|
// const location = join(
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"makeBabelRawConfig.d.ts","sourceRoot":"","sources":["../../src/build/makeBabelRawConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AASnD,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,OAAO,GAAG,gBAAgB,CAKxE"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { objectCopy } from 'sxy-lib-object-copy';
|
|
2
|
+
import userCommonConfig, { typescriptPreset } from './babel.user.common.config.js';
|
|
3
|
+
import { MakeBabelTransformJsxExtensionsToJs } from '../babelPlugins/BabelTransformJsxExtensionsToJs.js';
|
|
4
|
+
// The raw pipeline: sources compiled for node rather than the browser (config rawDirs/rawPatterns).
|
|
5
|
+
// The common presets - jsx, and types stripped when the app is typescript - with only the
|
|
6
|
+
// extension rewrite; none of the client plugins, so imports are left for node to resolve.
|
|
7
|
+
export function makeBabelRawConfig(typescript) {
|
|
8
|
+
const rawConfig = objectCopy(userCommonConfig);
|
|
9
|
+
if (typescript) rawConfig.presets.push(typescriptPreset()); // eslint-disable-line @typescript-eslint/no-non-null-assertion
|
|
10
|
+
rawConfig.plugins = [MakeBabelTransformJsxExtensionsToJs()];
|
|
11
|
+
return rawConfig;
|
|
12
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TransformOptions } from '@babel/core';
|
|
2
2
|
import type { ImportAliases } from './ImportAliases.js';
|
|
3
3
|
import { DependencyGraph } from '../babelPlugins/BabelTransformPackageImports.js';
|
|
4
|
-
export declare function makeBabelUserDevConfig(projectDir: string, absCodeDir: string, absSourceDir: string, absStyleImportBase: string, buildLocation: string, buildCodeLocation: string, packagesCacheLocation: string, skipPackageCompilationFiles: ReadonlySet<string>, oldDependencyGraph: DependencyGraph, dependencyGraph: DependencyGraph, importAliases: ImportAliases, promises: Promise<any>[], watchStyles?: boolean, hmr?: boolean, packages?: boolean): TransformOptions;
|
|
4
|
+
export declare function makeBabelUserDevConfig(projectDir: string, absCodeDir: string, absSourceDir: string, typescript: boolean, absStyleImportBase: string, buildLocation: string, buildCodeLocation: string, packagesCacheLocation: string, stylesCacheLocation: string | undefined, fresh: boolean, skipPackageCompilationFiles: ReadonlySet<string>, oldDependencyGraph: DependencyGraph, dependencyGraph: DependencyGraph, importAliases: ImportAliases, promises: Promise<any>[], watchStyles?: boolean, hmr?: boolean, packages?: boolean): TransformOptions;
|
|
5
5
|
//# sourceMappingURL=makeBabelUserDevConfig.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"makeBabelUserDevConfig.d.ts","sourceRoot":"","sources":["../../src/build/makeBabelUserDevConfig.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"makeBabelUserDevConfig.d.ts","sourceRoot":"","sources":["../../src/build/makeBabelUserDevConfig.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAInD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAEvD,OAAO,EAAoC,eAAe,EAAE,MAAM,iDAAiD,CAAA;AAOnH,wBAAgB,sBAAsB,CAClC,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,OAAO,EACnB,kBAAkB,EAAE,MAAM,EAC1B,aAAa,EAAE,MAAM,EACrB,iBAAiB,EAAE,MAAM,EACzB,qBAAqB,EAAE,MAAM,EAC7B,mBAAmB,EAAE,MAAM,GAAG,SAAS,EACvC,KAAK,EAAE,OAAO,EACd,2BAA2B,EAAE,WAAW,CAAC,MAAM,CAAC,EAChD,kBAAkB,EAAE,eAAe,EACnC,eAAe,EAAE,eAAe,EAChC,aAAa,EAAE,aAAa,EAC5B,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,EAAE,EACxB,WAAW,UAAO,EAClB,GAAG,UAAQ,EACX,QAAQ,UAAO,GAChB,gBAAgB,CA4ClB"}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
// may retire this
|
|
2
2
|
import { objectCopy } from 'sxy-lib-object-copy';
|
|
3
3
|
import { join } from 'path';
|
|
4
|
-
import { MakeBabelTransformComponentStyles } from
|
|
5
|
-
import { MakeBabelTransformPackageImports } from
|
|
6
|
-
import { componentCssFolder, componentCssFile } from
|
|
7
|
-
import userCommonConfig from
|
|
8
|
-
import { MakeBabelTransformCssImports } from
|
|
9
|
-
import { MakeBabelAddDevCacheBust } from
|
|
10
|
-
export function makeBabelUserDevConfig(projectDir, absCodeDir, absSourceDir, absStyleImportBase, buildLocation, buildCodeLocation, packagesCacheLocation, skipPackageCompilationFiles, oldDependencyGraph, dependencyGraph, importAliases, promises, watchStyles = true, hmr = false, packages = true) {
|
|
4
|
+
import { MakeBabelTransformComponentStyles } from '../babelPlugins/BabelTransformComponentStyles.js';
|
|
5
|
+
import { MakeBabelTransformPackageImports } from '../babelPlugins/BabelTransformPackageImports.js';
|
|
6
|
+
import { componentCssFolder, componentCssFile } from '../settings.js';
|
|
7
|
+
import userCommonConfig, { typescriptPreset } from './babel.user.common.config.js';
|
|
8
|
+
import { MakeBabelTransformCssImports } from '../babelPlugins/BabelTransformCssImports.js';
|
|
9
|
+
import { MakeBabelAddDevCacheBust } from '../babelPlugins/BabelAddDevCacheBust.js';
|
|
10
|
+
export function makeBabelUserDevConfig(projectDir, absCodeDir, absSourceDir, typescript, absStyleImportBase, buildLocation, buildCodeLocation, packagesCacheLocation, stylesCacheLocation, fresh, skipPackageCompilationFiles, oldDependencyGraph, dependencyGraph, importAliases, promises, watchStyles = true, hmr = false, packages = true) {
|
|
11
11
|
const userDevConfig = objectCopy(userCommonConfig);
|
|
12
|
+
if (typescript) userDevConfig.presets.push(typescriptPreset());
|
|
12
13
|
// pushed first so the plugin order is the same either way
|
|
13
14
|
// its only products - the /.packages tree and the importmap aliases - are consumed by the
|
|
14
15
|
// dev server, so a build that will not be served can skip the walk entirely
|
|
@@ -34,7 +35,9 @@ export function makeBabelUserDevConfig(projectDir, absCodeDir, absSourceDir, abs
|
|
|
34
35
|
projectAbsStyleImportDir: absStyleImportBase,
|
|
35
36
|
classNameFormat: '[folder]-[name]_[local]',
|
|
36
37
|
cssOutputFile: join(buildLocation, componentCssFolder, componentCssFile),
|
|
37
|
-
watch: watchStyles
|
|
38
|
+
watch: watchStyles,
|
|
39
|
+
cacheDir: stylesCacheLocation,
|
|
40
|
+
freshCache: fresh
|
|
38
41
|
}));
|
|
39
42
|
if (hmr) userDevConfig.plugins.push(
|
|
40
43
|
// Dev-only: keeps every relative import's browser-cached URL in sync with the
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { TransformOptions } from '@babel/core';
|
|
2
|
-
export declare function makeBabelUserProdConfig(projectDir: string, absCodeDir: string, absSourceDir: string, absStyleImportBase: string, watchStyles?: boolean): TransformOptions;
|
|
2
|
+
export declare function makeBabelUserProdConfig(projectDir: string, absCodeDir: string, absSourceDir: string, typescript: boolean, absStyleImportBase: string, watchStyles?: boolean): TransformOptions;
|
|
3
3
|
//# sourceMappingURL=makeBabelUserProdConfig.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"makeBabelUserProdConfig.d.ts","sourceRoot":"","sources":["../../src/build/makeBabelUserProdConfig.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"makeBabelUserProdConfig.d.ts","sourceRoot":"","sources":["../../src/build/makeBabelUserProdConfig.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAMnD,wBAAgB,uBAAuB,CACnC,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,OAAO,EACnB,kBAAkB,EAAE,MAAM,EAC1B,WAAW,UAAO,GACnB,gBAAgB,CAqBlB"}
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
// may retire this
|
|
2
2
|
import { objectCopy } from 'sxy-lib-object-copy';
|
|
3
3
|
import { join } from 'path';
|
|
4
|
-
import { MakeBabelTransformComponentStyles } from
|
|
5
|
-
import { prodBuildFolder, componentCssFolder, componentCssFile } from
|
|
6
|
-
import userCommonConfig from
|
|
7
|
-
import { MakeBabelTransformCssImports } from
|
|
8
|
-
export function makeBabelUserProdConfig(projectDir, absCodeDir, absSourceDir, absStyleImportBase, watchStyles = true) {
|
|
4
|
+
import { MakeBabelTransformComponentStyles } from '../babelPlugins/BabelTransformComponentStyles.js';
|
|
5
|
+
import { prodBuildFolder, componentCssFolder, componentCssFile } from '../settings.js';
|
|
6
|
+
import userCommonConfig, { typescriptPreset } from './babel.user.common.config.js';
|
|
7
|
+
import { MakeBabelTransformCssImports } from '../babelPlugins/BabelTransformCssImports.js';
|
|
8
|
+
export function makeBabelUserProdConfig(projectDir, absCodeDir, absSourceDir, typescript, absStyleImportBase, watchStyles = true) {
|
|
9
9
|
const userProdConfig = objectCopy(userCommonConfig);
|
|
10
|
+
if (typescript) userProdConfig.presets.push(typescriptPreset()); // eslint-disable-line @typescript-eslint/no-non-null-assertion
|
|
11
|
+
// no syntax lowering here either: the bundle step (rollup.user.prod.config.ts) owns the browser floor.
|
|
12
|
+
// If stripping React `propTypes` from pre-19 React components in react-zones ever matters for
|
|
13
|
+
// bundle size, babel-plugin-transform-react-remove-prop-types goes here (it used to sit in an
|
|
14
|
+
// env.production block nothing switched on, uninstalled) - tungsten itself never reads propTypes
|
|
10
15
|
userProdConfig.plugins.push(
|
|
11
16
|
// eslint-disable-line @typescript-eslint/no-non-null-assertion
|
|
12
17
|
MakeBabelTransformCssImports({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rollup.user.prod.config.d.ts","sourceRoot":"","sources":["../../src/build/rollup.user.prod.config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rollup.user.prod.config.d.ts","sourceRoot":"","sources":["../../src/build/rollup.user.prod.config.ts"],"names":[],"mappings":"AAaA,KAAK,YAAY,GAAG;IAChB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CACrB,CAAA;AAmBD,QAAA,MAAM,YAAY,EAAE,YAmBnB,CAAA;AAED,eAAe,YAAY,CAAA"}
|
|
@@ -4,31 +4,34 @@ import { babel } from "@rollup/plugin-babel";
|
|
|
4
4
|
import terser from "@rollup/plugin-terser";
|
|
5
5
|
//import gzip from "rollup-plugin-gzip"
|
|
6
6
|
import jsonModule from "@rollup/plugin-json";
|
|
7
|
-
import {
|
|
8
|
-
import { MakeBabelTransformRemoveDevBlocks } from "../babelPlugins/BabelTransformRemoveDevBlocks.js";
|
|
7
|
+
import { bundleBabelOptions } from "./bundleBabelOptions.js";
|
|
9
8
|
import { rollupExtractComponentStylesheets } from "./rollupExtractComponentStylesheets.js";
|
|
10
9
|
const json = typeof jsonModule === "function" ? jsonModule : jsonModule.default;
|
|
11
10
|
function replaceProductionNodeEnv() {
|
|
12
11
|
return {
|
|
13
|
-
name:
|
|
12
|
+
name: "tungsten-production-node-env",
|
|
14
13
|
transform(code) {
|
|
15
|
-
if (!code.includes(
|
|
14
|
+
if (!code.includes("process.env.NODE_ENV")) return null;
|
|
16
15
|
return {
|
|
17
|
-
code: code.replaceAll(
|
|
16
|
+
code: code.replaceAll("process.env.NODE_ENV", JSON.stringify("production")),
|
|
18
17
|
map: null
|
|
19
18
|
};
|
|
20
19
|
}
|
|
21
20
|
};
|
|
22
21
|
}
|
|
22
|
+
// the app config's `targets`, handed over by bundle.ts; unset means the framework default
|
|
23
|
+
const targetsEnv = process.env.TUNGSTEN_TARGETS;
|
|
24
|
+
const targets = targetsEnv === undefined ? undefined : JSON.parse(targetsEnv);
|
|
23
25
|
const rollupConfig = {
|
|
24
26
|
plugins: [json(), nodeResolve(), commonjs(),
|
|
25
27
|
// must be before babel
|
|
26
28
|
replaceProductionNodeEnv(),
|
|
27
|
-
// before babel,
|
|
28
|
-
rollupExtractComponentStylesheets(),
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
// before babel, so it sees component stylesheets as written
|
|
30
|
+
rollupExtractComponentStylesheets(),
|
|
31
|
+
// no node_modules exclude: the floor applies to the framework and packages in the bundle too
|
|
32
|
+
babel({
|
|
33
|
+
babelHelpers: "bundled",
|
|
34
|
+
...bundleBabelOptions(targets)
|
|
32
35
|
}),
|
|
33
36
|
// must be after commonjs
|
|
34
37
|
terser({
|
|
@@ -37,6 +40,5 @@ const rollupConfig = {
|
|
|
37
40
|
})
|
|
38
41
|
////gzip(),
|
|
39
42
|
]
|
|
40
|
-
//strictDeprecations: true // help prep for upgrade to rollup 3 -- this complains about the inlineDynamicImports CLI arg
|
|
41
43
|
};
|
|
42
44
|
export default rollupConfig;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { dirname } from 'path';
|
|
2
|
-
import { recordFrameworkStylesheet, writeFrameworkCss } from
|
|
3
|
-
import { getPackageDirForFile } from
|
|
2
|
+
import { recordFrameworkStylesheet, writeFrameworkCss } from './frameworkStylesheets.js';
|
|
3
|
+
import { getPackageDirForFile } from './getPackageDirForFile.js';
|
|
4
4
|
// `static $stylesheet = "i/….css"` as emitted by BabelTransformComponentStyles.
|
|
5
5
|
const markerPattern = /static\s+\$stylesheet\s*=\s*(["'])([^"']+)\1\s*;?/g;
|
|
6
6
|
// Prod bundles rather than walking packages, so the package-walk extraction never runs. This is
|
|
@@ -22,7 +22,7 @@ export function rollupExtractComponentStylesheets() {
|
|
|
22
22
|
return found ? {
|
|
23
23
|
code: stripped,
|
|
24
24
|
map: null
|
|
25
|
-
} : null;
|
|
25
|
+
} : null; // eslint-disable-line @typescript-eslint/no-unnecessary-condition -- set inside the replace callback, which narrowing cannot see
|
|
26
26
|
},
|
|
27
27
|
// The bundle is written to <build>/.bundle/<file>, so the build root is two up.
|
|
28
28
|
async writeBundle(outputOptions) {
|