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.
Files changed (449) hide show
  1. package/dist/.build-complete +1 -1
  2. package/dist/.tsbuildinfo +1 -0
  3. package/dist/AnyComponent.d.ts.map +1 -1
  4. package/dist/AnyComponent.js +1 -1
  5. package/dist/Components.d.ts.map +1 -1
  6. package/dist/Components.js +25 -23
  7. package/dist/ContentNode.js +2 -2
  8. package/dist/DomPointer.js +1 -1
  9. package/dist/DomRegion.js +3 -3
  10. package/dist/Framework.d.ts +2 -1
  11. package/dist/Framework.d.ts.map +1 -1
  12. package/dist/Framework.js +44 -35
  13. package/dist/FrameworkConfig.d.ts +16 -0
  14. package/dist/FrameworkConfig.d.ts.map +1 -1
  15. package/dist/FunctionComponentStandIn.js +8 -8
  16. package/dist/Instance/Instance.js +12 -12
  17. package/dist/RenderedContentNode.d.ts.map +1 -1
  18. package/dist/RenderedContentNode.js +4 -3
  19. package/dist/RenderingNode.js +2 -2
  20. package/dist/Sass.d.ts.map +1 -1
  21. package/dist/Sass.js +1 -0
  22. package/dist/Script.js +1 -1
  23. package/dist/Servers/DevServer.d.ts.map +1 -1
  24. package/dist/Servers/DevServer.js +33 -32
  25. package/dist/Servers/ProdServer.js +15 -15
  26. package/dist/Servers/StaticSiteServer.js +4 -4
  27. package/dist/Servers/TungstenServer.js +5 -5
  28. package/dist/Servers/devErrorPageAutoRetry.js +1 -1
  29. package/dist/Servers/initStores.js +3 -3
  30. package/dist/Servers/loadEnvsDev.d.ts +1 -1
  31. package/dist/Servers/loadEnvsDev.d.ts.map +1 -1
  32. package/dist/Servers/loadEnvsDev.js +10 -8
  33. package/dist/Servers/routing.d.ts.map +1 -1
  34. package/dist/Servers/routing.js +4 -4
  35. package/dist/Store/Store.js +1 -1
  36. package/dist/Store/TypeSafeStore.js +1 -1
  37. package/dist/Store/createStores.js +2 -2
  38. package/dist/Store/makeStore.js +3 -3
  39. package/dist/Store/registerStore.js +3 -3
  40. package/dist/TElement.js +1 -1
  41. package/dist/TungstenApp.js +9 -5
  42. package/dist/TungstenStyleObject.js +1 -1
  43. package/dist/__deproxy.js +2 -2
  44. package/dist/_client/client.js +3 -3
  45. package/dist/alive.js +1 -1
  46. package/dist/api/getApiRoutes.js +3 -3
  47. package/dist/api/getExport.d.ts.map +1 -1
  48. package/dist/api/getExport.js +5 -4
  49. package/dist/api/getExportDev.js +1 -1
  50. package/dist/appOutput.js +1 -1
  51. package/dist/auth/index.js +2 -2
  52. package/dist/babelPlugins/BabelAddDevCacheBust.d.ts.map +1 -1
  53. package/dist/babelPlugins/BabelAddDevCacheBust.js +4 -2
  54. package/dist/babelPlugins/BabelTransformBindDirect.js +4 -2
  55. package/dist/babelPlugins/BabelTransformBindVar.d.ts.map +1 -1
  56. package/dist/babelPlugins/BabelTransformBindVar.js +3 -3
  57. package/dist/babelPlugins/BabelTransformCjsToEsm.js +1 -1
  58. package/dist/babelPlugins/BabelTransformComponentState.d.ts.map +1 -1
  59. package/dist/babelPlugins/BabelTransformComponentState.js +2 -2
  60. package/dist/babelPlugins/BabelTransformComponentStyles.d.ts +2 -0
  61. package/dist/babelPlugins/BabelTransformComponentStyles.d.ts.map +1 -1
  62. package/dist/babelPlugins/BabelTransformComponentStyles.js +32 -15
  63. package/dist/babelPlugins/BabelTransformCssImports.d.ts.map +1 -1
  64. package/dist/babelPlugins/BabelTransformCssImports.js +3 -3
  65. package/dist/babelPlugins/BabelTransformDependencyImportsOld.js +1 -1
  66. package/dist/babelPlugins/BabelTransformDeproxyState.d.ts.map +1 -1
  67. package/dist/babelPlugins/BabelTransformDeproxyState.js +1 -1
  68. package/dist/babelPlugins/BabelTransformJsxExtensionsToJs.d.ts.map +1 -1
  69. package/dist/babelPlugins/BabelTransformJsxExtensionsToJs.js +6 -2
  70. package/dist/babelPlugins/BabelTransformPackageImports.d.ts.map +1 -1
  71. package/dist/babelPlugins/BabelTransformPackageImports.js +75 -53
  72. package/dist/babelPlugins/BabelTransformReactive.js +1 -1
  73. package/dist/babelPlugins/BabelTransformReactiveSvelteStyle.js +1 -1
  74. package/dist/babelPlugins/BabelTransformRemoveBlocks.d.ts.map +1 -1
  75. package/dist/babelPlugins/BabelTransformSxyFrameworkImports.js +1 -1
  76. package/dist/babelPlugins/BabelTransformUniqueComponents.js +1 -1
  77. package/dist/babelPlugins/fixImportsInSassErrorMessage.js +1 -1
  78. package/dist/babelPlugins/test.js +1 -1
  79. package/dist/babelPlugins/transformPackageImports/BabelTransformDependencyImportsCjs.d.ts.map +1 -1
  80. package/dist/babelPlugins/transformPackageImports/BabelTransformDependencyImportsCjs.js +5 -4
  81. package/dist/babelPlugins/transformPackageImports/BabelTransformDependencyImportsEsm.d.ts.map +1 -1
  82. package/dist/babelPlugins/transformPackageImports/BabelTransformDependencyImportsEsm.js +3 -2
  83. package/dist/babelPlugins/transformPackageImports/getWebLocationOfPackageFile.js +2 -2
  84. package/dist/bin/args.js +2 -2
  85. package/dist/bin/commands/build.js +6 -6
  86. package/dist/bin/commands/buildHelp.js +1 -1
  87. package/dist/bin/commands/clean.js +4 -4
  88. package/dist/bin/commands/compile.d.ts.map +1 -1
  89. package/dist/bin/commands/compile.js +24 -17
  90. package/dist/bin/commands/compileSimplePackage.js +3 -2
  91. package/dist/bin/commands/dev.d.ts.map +1 -1
  92. package/dist/bin/commands/dev.js +16 -9
  93. package/dist/bin/commands/devmon.js +4 -4
  94. package/dist/bin/commands/help.js +2 -2
  95. package/dist/bin/commands/start.js +2 -2
  96. package/dist/bin/commands/static.js +3 -3
  97. package/dist/bin/index.d.ts.map +1 -1
  98. package/dist/bin/index.js +24 -16
  99. package/dist/bin/moduleLoadAnalysis.js +2 -2
  100. package/dist/bin/vendorHook.d.ts +3 -0
  101. package/dist/bin/vendorHook.d.ts.map +1 -0
  102. package/dist/bin/vendorHook.js +34 -0
  103. package/dist/browserStorage.js +6 -4
  104. package/dist/build/babel.user.common.config.d.ts +9 -2
  105. package/dist/build/babel.user.common.config.d.ts.map +1 -1
  106. package/dist/build/babel.user.common.config.js +21 -16
  107. package/dist/build/bundle.d.ts +1 -1
  108. package/dist/build/bundle.d.ts.map +1 -1
  109. package/dist/build/bundle.js +15 -7
  110. package/dist/build/bundleBabelOptions.d.ts +6 -0
  111. package/dist/build/bundleBabelOptions.d.ts.map +1 -0
  112. package/dist/build/bundleBabelOptions.js +23 -0
  113. package/dist/build/combineComponentCss.js +2 -2
  114. package/dist/build/compileJavascript.d.ts +4 -0
  115. package/dist/build/compileJavascript.d.ts.map +1 -1
  116. package/dist/build/compileJavascript.js +174 -103
  117. package/dist/build/compileStyles.js +8 -8
  118. package/dist/build/compileUserApp.d.ts +1 -1
  119. package/dist/build/compileUserApp.d.ts.map +1 -1
  120. package/dist/build/compileUserApp.js +15 -12
  121. package/dist/build/componentStylesCache.d.ts +10 -0
  122. package/dist/build/componentStylesCache.d.ts.map +1 -0
  123. package/dist/build/componentStylesCache.js +54 -0
  124. package/dist/build/copyAssets.js +4 -4
  125. package/dist/build/copyPackageModulesToPackagesFolder.js +4 -4
  126. package/dist/build/copyPublicFiles.js +4 -4
  127. package/dist/build/createClientFiles.js +3 -3
  128. package/dist/build/createInstanceConfigFile.js +2 -2
  129. package/dist/build/createPackageVirtualFileSystems.js +1 -1
  130. package/dist/build/devBundle.js +5 -5
  131. package/dist/build/devBundle.rollup.config.d.ts.map +1 -1
  132. package/dist/build/devBundle.rollup.config.js +0 -1
  133. package/dist/build/frameworkDestLocation.d.ts +1 -0
  134. package/dist/build/frameworkDestLocation.d.ts.map +1 -1
  135. package/dist/build/frameworkDestLocation.js +8 -4
  136. package/dist/build/frameworkStylesheets.js +2 -2
  137. package/dist/build/getAllSxyClientModules.d.ts.map +1 -1
  138. package/dist/build/getAllSxyClientModules.js +4 -28
  139. package/dist/build/getPackageDirForFile.js +1 -1
  140. package/dist/build/getSxyClientPackageAliases.d.ts.map +1 -1
  141. package/dist/build/getSxyClientPackageAliases.js +4 -2
  142. package/dist/build/getTempDirForAppCompilation.js +1 -1
  143. package/dist/build/makeBabelRawConfig.d.ts +3 -0
  144. package/dist/build/makeBabelRawConfig.d.ts.map +1 -0
  145. package/dist/build/makeBabelRawConfig.js +12 -0
  146. package/dist/build/makeBabelUserDevConfig.d.ts +1 -1
  147. package/dist/build/makeBabelUserDevConfig.d.ts.map +1 -1
  148. package/dist/build/makeBabelUserDevConfig.js +11 -8
  149. package/dist/build/makeBabelUserProdConfig.d.ts +1 -1
  150. package/dist/build/makeBabelUserProdConfig.d.ts.map +1 -1
  151. package/dist/build/makeBabelUserProdConfig.js +10 -5
  152. package/dist/build/rollup.user.prod.config.d.ts.map +1 -1
  153. package/dist/build/rollup.user.prod.config.js +13 -11
  154. package/dist/build/rollupExtractComponentStylesheets.js +3 -3
  155. package/dist/build/sassImportParser.js +4 -4
  156. package/dist/build/tallyBabel.d.ts +3 -0
  157. package/dist/build/tallyBabel.d.ts.map +1 -0
  158. package/dist/build/tallyBabel.js +11 -0
  159. package/dist/calculateImportedStaticFileLocations.js +2 -2
  160. package/dist/calledFrom.js +2 -2
  161. package/dist/clone.js +4 -4
  162. package/dist/compat/context.d.ts.map +1 -1
  163. package/dist/compat/forwardRef.js +1 -1
  164. package/dist/compat/index.js +1 -1
  165. package/dist/compat/types.d.ts.map +1 -1
  166. package/dist/componentProxyHandlers.d.ts.map +1 -1
  167. package/dist/componentProxyHandlers.js +8 -12
  168. package/dist/components/Link.js +2 -2
  169. package/dist/components/PopMessages.js +3 -3
  170. package/dist/components/RawHtml.js +2 -2
  171. package/dist/components/Stylesheet.d.ts +1 -2
  172. package/dist/components/Stylesheet.d.ts.map +1 -1
  173. package/dist/components/Stylesheet.js +4 -4
  174. package/dist/components/bindable/BindableCheckbox.d.ts.map +1 -1
  175. package/dist/components/bindable/BindableCheckbox.js +1 -1
  176. package/dist/components/bindable/BindableInput.d.ts.map +1 -1
  177. package/dist/components/bindable/BindableInput.js +1 -1
  178. package/dist/components/bindable/BindableInputNonString.js +1 -1
  179. package/dist/components/bindable/BindableInputString.js +1 -1
  180. package/dist/components/bindable/BindableInputTyped.js +1 -1
  181. package/dist/components/bindable/BindableInputTypedLegacy.d.ts.map +1 -1
  182. package/dist/components/bindable/BindableInputTypedLegacy.js +1 -1
  183. package/dist/components/bindable/BindableRadio.d.ts.map +1 -1
  184. package/dist/components/bindable/BindableRadio.js +1 -1
  185. package/dist/components/bindable/BindableSelect.js +1 -1
  186. package/dist/components/bindable/BindableTextarea.d.ts.map +1 -1
  187. package/dist/components/bindable/BindableTextarea.js +1 -1
  188. package/dist/components/library/RichTextEditor/RichTextEditor.js +10 -10
  189. package/dist/components/library/RichTextEditor/contentTree.js +5 -5
  190. package/dist/components/library/RichTextEditor/sanitizeAuthoredHtml.js +2 -2
  191. package/dist/components/library/__StatefulMessage/StatefulMessage.js +2 -2
  192. package/dist/components/library/index.js +2 -2
  193. package/dist/concat.d.ts.map +1 -1
  194. package/dist/concat.js +2 -2
  195. package/dist/copy.d.ts.map +1 -1
  196. package/dist/createElement.js +1 -1
  197. package/dist/createRoutes.d.ts +1 -1
  198. package/dist/createRoutes.d.ts.map +1 -1
  199. package/dist/defaultConfig.d.ts +0 -1
  200. package/dist/defaultConfig.d.ts.map +1 -1
  201. package/dist/defaultConfig.js +2 -2
  202. package/dist/deleteDirs.js +1 -1
  203. package/dist/env/Env.js +2 -2
  204. package/dist/env/addToEnv.js +1 -1
  205. package/dist/env/funcs.js +4 -4
  206. package/dist/env/getEnvSchemas.d.ts +2 -2
  207. package/dist/env/getEnvSchemas.d.ts.map +1 -1
  208. package/dist/env/getEnvSchemas.js +16 -10
  209. package/dist/env/privateEnv.js +2 -2
  210. package/dist/env/privateEnvOrThrow.js +1 -1
  211. package/dist/env/publicEnv.js +1 -1
  212. package/dist/env/publicEnvOrThrow.js +1 -1
  213. package/dist/env/windowGlobalEnvStatement.d.ts.map +1 -1
  214. package/dist/filePathFromUrl.js +1 -1
  215. package/dist/findProjectDir.d.ts.map +1 -1
  216. package/dist/findProjectDir.js +19 -5
  217. package/dist/findUserConfig.js +7 -7
  218. package/dist/fixExtension.d.ts.map +1 -1
  219. package/dist/fixExtension.js +5 -3
  220. package/dist/foreach.js +1 -0
  221. package/dist/frameworkConfigSchema.d.ts +16 -0
  222. package/dist/frameworkConfigSchema.d.ts.map +1 -1
  223. package/dist/frameworkConfigSchema.js +14 -2
  224. package/dist/getComponent.d.ts.map +1 -1
  225. package/dist/getComponent.js +5 -5
  226. package/dist/getComponentDev.d.ts.map +1 -1
  227. package/dist/getComponentDev.js +1 -1
  228. package/dist/getFrameworkDir.js +1 -1
  229. package/dist/getRoutes.d.ts.map +1 -1
  230. package/dist/getRoutes.js +18 -27
  231. package/dist/getRoutesDevs.d.ts.map +1 -1
  232. package/dist/getRoutesDevs.js +1 -1
  233. package/dist/getStackTrace.js +1 -1
  234. package/dist/getUserConfig.js +7 -7
  235. package/dist/glob.d.ts +5 -0
  236. package/dist/glob.d.ts.map +1 -0
  237. package/dist/glob.js +103 -0
  238. package/dist/hasValidKey.js +1 -1
  239. package/dist/helpers/getFetchCompatibleHeaders.js +2 -2
  240. package/dist/helpers/index.js +2 -2
  241. package/dist/hmr/applyHmrModule.js +10 -10
  242. package/dist/hmr/componentIdentity.js +3 -3
  243. package/dist/hmr/instanceRegistry.js +2 -2
  244. package/dist/hooks/clearCurrentComponent.js +1 -1
  245. package/dist/hooks/getCurrentComponent.js +3 -3
  246. package/dist/hooks/index.js +5 -5
  247. package/dist/hooks/setCurrentComponent.js +1 -1
  248. package/dist/hooks/useCallback.js +2 -2
  249. package/dist/hooks/useEffect.js +2 -2
  250. package/dist/hooks/useInstance.js +1 -1
  251. package/dist/hooks/useMemo.js +2 -2
  252. package/dist/hooks/useReducer.d.ts.map +1 -1
  253. package/dist/hooks/useState.d.ts.map +1 -1
  254. package/dist/hooks/useState.js +3 -9
  255. package/dist/hydrate/hydrate.d.ts +1 -1
  256. package/dist/hydrate/hydrate.d.ts.map +1 -1
  257. package/dist/hydrate/hydrate.js +56 -54
  258. package/dist/hydrate/reconcileHydratedAttributes.js +5 -5
  259. package/dist/index.js +2 -2
  260. package/dist/indexInner.d.ts +1 -1
  261. package/dist/indexInner.d.ts.map +1 -1
  262. package/dist/indexInner.js +45 -45
  263. package/dist/innerHtmlFromProps.js +1 -1
  264. package/dist/isBrowser.js +1 -1
  265. package/dist/isDev.js +1 -1
  266. package/dist/isProd.js +1 -1
  267. package/dist/isServer.js +1 -1
  268. package/dist/jsx-runtime.js +1 -1
  269. package/dist/jsxRuntime.d.ts.map +1 -1
  270. package/dist/jsxRuntime.js +12 -7
  271. package/dist/jsxRuntimeSignals.d.ts.map +1 -1
  272. package/dist/jsxRuntimeSignals.js +15 -8
  273. package/dist/makeFinalConfig.d.ts.map +1 -1
  274. package/dist/makeFinalConfig.js +3 -3
  275. package/dist/makeInstanceConfigFromFrameworkConfig.js +1 -1
  276. package/dist/makeServerRpc.js +3 -3
  277. package/dist/markOptionSelected.js +2 -2
  278. package/dist/mergeConfigs.d.ts.map +1 -1
  279. package/dist/mergeConfigs.js +11 -2
  280. package/dist/mutatingFunctions.js +3 -3
  281. package/dist/nbsp.js +1 -1
  282. package/dist/output.js +1 -1
  283. package/dist/pop.js +2 -2
  284. package/dist/postcssPlugins/TransformCssNames.js +8 -8
  285. package/dist/postcssPlugins/parseSelectors.js +1 -1
  286. package/dist/postcssPlugins/parseSelectorsRich.js +1 -1
  287. package/dist/postcssPlugins/scopeAnimationValue.js +2 -2
  288. package/dist/propsAreEqual.js +3 -3
  289. package/dist/rawHtml/filterContentNode.js +4 -4
  290. package/dist/rawHtml/parseHtml.js +5 -5
  291. package/dist/rawHtml/sanitizeHtml.js +3 -3
  292. package/dist/rawHtml/tokenizeHtml.js +2 -2
  293. package/dist/render/addImportMap.js +2 -2
  294. package/dist/render/classComponentNodeToRenderingTree.js +4 -4
  295. package/dist/render/componentNodeToRenderingTree.d.ts.map +1 -1
  296. package/dist/render/componentNodeToRenderingTree.js +13 -24
  297. package/dist/render/contentNodeToHtml.js +11 -11
  298. package/dist/render/contentToHtml.d.ts.map +1 -1
  299. package/dist/render/contentToHtml.js +5 -5
  300. package/dist/render/contentToHtmlDev.js +1 -1
  301. package/dist/render/contentTreeToRenderingTree.js +7 -7
  302. package/dist/render/functionComponentNodeToRenderingTree.js +4 -4
  303. package/dist/render/getFunctionBodyAsString.d.ts.map +1 -1
  304. package/dist/render/getFunctionBodyAsString.js +3 -6
  305. package/dist/render/instantiateClassComponent.js +2 -2
  306. package/dist/render/instantiateComponent.js +3 -3
  307. package/dist/render/instantiateFunctionComponent.js +2 -2
  308. package/dist/render/printComponentNameInSource.js +1 -1
  309. package/dist/render/processHead.js +5 -5
  310. package/dist/render/processHtmlNode.js +1 -1
  311. package/dist/render/processProps.js +4 -4
  312. package/dist/render/processRenderingNodeHtml.js +6 -6
  313. package/dist/render/renderingTreeToHtml.d.ts.map +1 -1
  314. package/dist/render/renderingTreeToHtml.js +16 -16
  315. package/dist/render/rootToHtml.d.ts.map +1 -1
  316. package/dist/render/rootToHtml.js +2 -2
  317. package/dist/render/rootToHtmlDev.js +1 -1
  318. package/dist/requests/fetch/delete.js +2 -2
  319. package/dist/requests/fetch/get.js +3 -3
  320. package/dist/requests/fetch/patch.js +2 -2
  321. package/dist/requests/fetch/post.js +2 -2
  322. package/dist/requests/fetch/put.js +2 -2
  323. package/dist/requests/index.js +5 -5
  324. package/dist/routing/MatchedRoute.js +2 -2
  325. package/dist/routing/Route.js +1 -1
  326. package/dist/routing/RouteDataFunction.type.d.ts.map +1 -1
  327. package/dist/routing/RoutesWithSafeParams.js +1 -1
  328. package/dist/routing/WebRedirect.d.ts.map +1 -1
  329. package/dist/routing/compareRequestToRegex.js +2 -2
  330. package/dist/routing/getPathPriority.js +2 -2
  331. package/dist/routing/matchPath.js +3 -3
  332. package/dist/routing/patternToRegex.js +1 -1
  333. package/dist/server.js +3 -3
  334. package/dist/serverModuleLocation.d.ts +3 -0
  335. package/dist/serverModuleLocation.d.ts.map +1 -0
  336. package/dist/serverModuleLocation.js +12 -0
  337. package/dist/serverRpc.d.ts.map +1 -1
  338. package/dist/settings.d.ts +4 -0
  339. package/dist/settings.d.ts.map +1 -1
  340. package/dist/settings.js +9 -0
  341. package/dist/slash.d.ts +2 -0
  342. package/dist/slash.d.ts.map +1 -0
  343. package/dist/slash.js +5 -0
  344. package/dist/spawnShellCommand.js +1 -1
  345. package/dist/standardSchema.js +1 -1
  346. package/dist/staticGen/getAppRoutes.js +3 -3
  347. package/dist/staticGen/staticGen.d.ts.map +1 -1
  348. package/dist/staticGen/staticGen.js +16 -14
  349. package/dist/staticGen/staticGenFunctions.js +1 -1
  350. package/dist/style/jssToCss.d.ts.map +1 -1
  351. package/dist/style/jssToCss.js +13 -11
  352. package/dist/style/styleContent.js +1 -1
  353. package/dist/style/styleContentSxy.js +8 -8
  354. package/dist/style/unusedStyles.d.ts.map +1 -1
  355. package/dist/style/unusedStyles.js +1 -1
  356. package/dist/sync/index.js +1 -1
  357. package/dist/syncServer/preload.js +1 -1
  358. package/dist/testing/host.js +12 -12
  359. package/dist/testing/hydrateTestApp.d.ts.map +1 -1
  360. package/dist/testing/hydrateTestApp.js +18 -18
  361. package/dist/testing/index.d.ts.map +1 -1
  362. package/dist/testing/index.js +11 -11
  363. package/dist/testing/installTestStyleProcessors.js +2 -2
  364. package/dist/testing/loadEnv.d.ts +4 -1
  365. package/dist/testing/loadEnv.d.ts.map +1 -1
  366. package/dist/testing/loadEnv.js +5 -5
  367. package/dist/testing/temp/componentPackageMock.js +5 -5
  368. package/dist/testing/temp/contentHtmlElements.js +2 -2
  369. package/dist/throwError.js +2 -2
  370. package/dist/timeProfiler.d.ts +5 -1
  371. package/dist/timeProfiler.d.ts.map +1 -1
  372. package/dist/timeProfiler.js +76 -24
  373. package/dist/todo.js +2 -1
  374. package/dist/update/integrateUpdateVdom.d.ts.map +1 -1
  375. package/dist/update/integrateUpdateVdom.js +44 -41
  376. package/dist/update/integrateUpdateVdomPrebuild.js +5 -5
  377. package/dist/validChildren.js +2 -2
  378. package/dist/warnOnFrameworkChange.js +2 -2
  379. package/dist/watch.js +2 -2
  380. package/dist/zones/react.js +3 -3
  381. package/package.json +27 -39
  382. package/types/modules.d.ts +2 -1
  383. package/vendor/babel-core.js +26 -0
  384. package/vendor/babel-parser.js +9 -0
  385. package/vendor/babel-plugin-syntax-import-assertions.js +50 -0
  386. package/vendor/babel-preset-react.js +872 -0
  387. package/vendor/babel-preset-typescript.js +26 -0
  388. package/vendor/babel-types.js +9 -0
  389. package/vendor/chalk-extensions.js +1994 -0
  390. package/vendor/chalk.js +647 -0
  391. package/vendor/chokidar.js +6889 -0
  392. package/vendor/chunk-1TN2rK3j.js +1218 -0
  393. package/vendor/chunk-1UuLTU0U.js +34 -0
  394. package/vendor/chunk-B_NeooyV.js +86 -0
  395. package/vendor/chunk-C12hSZn7.js +88 -0
  396. package/vendor/chunk-C3YkUGz5.js +19 -0
  397. package/vendor/chunk-C3fcZDjl.js +41964 -0
  398. package/vendor/chunk-C9FSKeSx.js +14603 -0
  399. package/vendor/chunk-CPArXGxa.js +14623 -0
  400. package/vendor/cjs-module-lexer.js +6 -0
  401. package/vendor/dotenv.js +412 -0
  402. package/vendor/express.js +40577 -0
  403. package/vendor/import-meta-resolve.js +2201 -0
  404. package/vendor/manifest.json +29 -0
  405. package/vendor/postcss.js +8546 -0
  406. package/vendor/serialize-javascript.js +293 -0
  407. package/vendor/sxy-lib-arrays.js +113 -0
  408. package/vendor/sxy-lib-object-copy.js +1781 -0
  409. package/vendor/sxy-lib-objects.js +156 -0
  410. package/vendor/sxy-lib-promises.js +47 -0
  411. package/vendor/sxy-package-investigator.js +202 -0
  412. package/vendor/valibot.js +7664 -0
  413. package/dist/Servers/hono/DevServerHono.d.ts +0 -2
  414. package/dist/Servers/hono/DevServerHono.d.ts.map +0 -1
  415. package/dist/Servers/hono/DevServerHono.js +0 -423
  416. package/dist/Servers/hono/ProdServerHono.d.ts +0 -2
  417. package/dist/Servers/hono/ProdServerHono.d.ts.map +0 -1
  418. package/dist/Servers/hono/ProdServerHono.js +0 -220
  419. package/dist/Servers/hono/TungstenServerHono.d.ts +0 -6
  420. package/dist/Servers/hono/TungstenServerHono.d.ts.map +0 -1
  421. package/dist/Servers/hono/TungstenServerHono.js +0 -36
  422. package/dist/api/ApiEndpointHono.d.ts +0 -3
  423. package/dist/api/ApiEndpointHono.d.ts.map +0 -1
  424. package/dist/api/ApiEndpointHono.js +0 -1
  425. package/dist/api/ApiRouteHono.d.ts +0 -7
  426. package/dist/api/ApiRouteHono.d.ts.map +0 -1
  427. package/dist/api/ApiRouteHono.js +0 -1
  428. package/dist/api/ApiRoutesHono.d.ts +0 -5
  429. package/dist/api/ApiRoutesHono.d.ts.map +0 -1
  430. package/dist/api/ApiRoutesHono.js +0 -1
  431. package/dist/api/getApiRoutesHono.d.ts +0 -6
  432. package/dist/api/getApiRoutesHono.d.ts.map +0 -1
  433. package/dist/api/getApiRoutesHono.js +0 -14
  434. package/dist/build/compilePackages.d.ts +0 -2
  435. package/dist/build/compilePackages.d.ts.map +0 -1
  436. package/dist/build/compilePackages.js +0 -89
  437. package/dist/build/findRequiredUserModule.d.ts +0 -2
  438. package/dist/build/findRequiredUserModule.d.ts.map +0 -1
  439. package/dist/build/findRequiredUserModule.js +0 -36
  440. package/dist/build/processPackage.d.ts +0 -4
  441. package/dist/build/processPackage.d.ts.map +0 -1
  442. package/dist/build/processPackage.js +0 -91
  443. package/dist/build/tallyBabelPlugins.d.ts +0 -3
  444. package/dist/build/tallyBabelPlugins.d.ts.map +0 -1
  445. package/dist/build/tallyBabelPlugins.js +0 -68
  446. package/dist/testing/loadEnvSetup.d.ts +0 -2
  447. package/dist/testing/loadEnvSetup.d.ts.map +0 -1
  448. package/dist/testing/loadEnvSetup.js +0 -7
  449. package/sxy-loader.config.js +0 -7
@@ -1,4 +1,4 @@
1
- import { throwError } from "../throwError.js";
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
@@ -1,4 +1,4 @@
1
- import { fixImportsInSassErrorMessage } from "./fixImportsInSassErrorMessage.js";
1
+ import { fixImportsInSassErrorMessage } from './fixImportsInSassErrorMessage.js';
2
2
  const input = `
3
3
  @import '../foo'
4
4
  ^^^^^^^^^^^^^^^^
@@ -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,EAAc,MAAM,aAAa,CAAA;AAC7D,KAAK,KAAK,GAAG,OAAO,SAAS,CAAC;AAM9B,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"}
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 "../isBareImport.js";
13
- import { cliWarn } from "../../cliOutput.js";
14
- import { warn } from "../../output.js";
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) {
@@ -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,EAAc,MAAM,aAAa,CAAA;AAC7D,KAAK,KAAK,GAAG,OAAO,SAAS,CAAC;AAO9B,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"}
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 "../isBareImport.js";
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 "../../TungstenError.js";
3
- import { findProjectDir } from "../../findProjectDir.js";
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 "../cliOutput.js";
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 no-type-assertion/no-type-assertion -- built from specs' own keys
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 "../../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";
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, no-type-assertion/no-type-assertion -- config better be set
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,5 +1,5 @@
1
1
  // kept out of build.ts so --help does not pay for resolving the build's import tree
2
- import { cliOut } from "../../cliOutput.js";
2
+ import { cliOut } from '../../cliOutput.js';
3
3
  cliOut(`Usage: tungsten build [--profile] [--profile-modules] [--quiet]
4
4
 
5
5
  Options:
@@ -1,9 +1,9 @@
1
1
  // build
2
2
  import chalk from 'chalk-extensions';
3
- import { Framework } from "../../Framework.js";
4
- import { cliOut } from "../../cliOutput.js";
5
- import { packageNameCapitalized } from "../../settings.js";
6
- import { cliArgs } from "../args.js";
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":"AAoRA,OAAO,EAAE,CAAA"}
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 "../../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, frameworkCssFolder, packagesCacheFolder, 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";
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
- import { findProjectDir } from "../../findProjectDir.js";
2
- import { cliInfo, cliLog } from "../../cliOutput.js";
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":"AAuEA,OAAO,EAAE,CAAA"}
1
+ {"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../../src/bin/commands/dev.ts"],"names":[],"mappings":"AA4EA,OAAO,EAAE,CAAA"}
@@ -1,9 +1,9 @@
1
1
  import open from 'open';
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";
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 "../../cliOutput.js";
9
- import { getFrameworkDir } from "../../getFrameworkDir.js";
10
- import { cliArgs } from "../args.js";
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 "../../cliOutput.js";
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 "../../Framework.js";
2
- import { cliArgs } from "../args.js";
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 "../../getUserConfig.js";
3
- import { StaticSiteServer } from "../../Servers/StaticSiteServer.js";
4
- import { cliArgs } from "../args.js";
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();
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/bin/index.ts"],"names":[],"mappings":"AA6GA,OAAO,EAAE,CAAA"}
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 "../cliOutput.js";
3
- import { beginStartupProfiling } from "../timeProfiler.js";
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
- const compileCache = enableCompileCache();
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}` + ` ${compileCache.directory ?? compileCache.message ?? ''}`);
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("./moduleLoadAnalysis.js");
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("./commands/help.js");
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("./commands/dev.js");
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("./commands/devmon.js");
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("./commands/buildHelp.js");
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("./commands/build.js");
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("./commands/start.js");
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("./commands/static.js");
86
+ await import('./commands/static.js');
79
87
  break;
80
88
  }
81
89
  case 'clean':
82
90
  {
83
- await import("./commands/clean.js");
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("./commands/compile.js");
98
+ await import('./commands/compile.js');
91
99
  break;
92
100
  }
93
101
  case 'compile-simple-package':
94
102
  {
95
- await import("./commands/compileSimplePackage.js");
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 "../cliOutput.js";
9
- import { addEndOfRunReport } from "../timeProfiler.js";
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,3 @@
1
+ export type VendorHookStatus = 'active' | 'none' | 'stale';
2
+ export declare function registerVendorHook(): VendorHookStatus;
3
+ //# sourceMappingURL=vendorHook.d.ts.map
@@ -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
+ }
@@ -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 "./isBrowser.js";
9
- import { throwError } from "./throwError.js";
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 no-type-assertion/no-type-assertion -- TS is being a wanker about keys of object
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 no-type-assertion/no-type-assertion -- TS is being a wanker about keys of object
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 { TransformOptions } from "@babel/core";
2
- declare const userCommonConfig: TransformOptions;
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,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAcnD,QAAA,MAAM,gBAAgB,EAAE,gBA6BvB,CAAA;AAED,eAAe,gBAAgB,CAAA"}
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"}