tungsten 0.4.10 → 0.4.12

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 (294) hide show
  1. package/dist/.build-complete +1 -1
  2. package/dist/AnyComponent.js +1 -1
  3. package/dist/Components.d.ts.map +1 -1
  4. package/dist/Components.js +15 -16
  5. package/dist/ContentNode.js +2 -2
  6. package/dist/DomRegion.js +1 -1
  7. package/dist/Framework.d.ts +2 -1
  8. package/dist/Framework.d.ts.map +1 -1
  9. package/dist/Framework.js +43 -34
  10. package/dist/FrameworkConfig.d.ts +16 -0
  11. package/dist/FrameworkConfig.d.ts.map +1 -1
  12. package/dist/FunctionComponentStandIn.js +8 -8
  13. package/dist/Instance/Instance.js +11 -11
  14. package/dist/RenderedContentNode.js +2 -2
  15. package/dist/RenderingNode.js +2 -2
  16. package/dist/Script.js +1 -1
  17. package/dist/Servers/DevServer.d.ts.map +1 -1
  18. package/dist/Servers/DevServer.js +29 -29
  19. package/dist/Servers/ProdServer.js +14 -14
  20. package/dist/Servers/StaticSiteServer.js +3 -3
  21. package/dist/Servers/TungstenServer.js +5 -5
  22. package/dist/Servers/devErrorPageAutoRetry.js +1 -1
  23. package/dist/Servers/hono/TungstenServerHono.js +5 -5
  24. package/dist/Servers/initStores.js +3 -3
  25. package/dist/Servers/loadEnvsDev.js +6 -6
  26. package/dist/Servers/routing.js +3 -3
  27. package/dist/Store/createStores.js +2 -2
  28. package/dist/Store/makeStore.js +2 -2
  29. package/dist/Store/registerStore.js +2 -2
  30. package/dist/TungstenApp.js +3 -3
  31. package/dist/TungstenStyleObject.js +1 -1
  32. package/dist/__deproxy.js +2 -2
  33. package/dist/_client/client.js +3 -3
  34. package/dist/alive.js +1 -1
  35. package/dist/api/getApiRoutes.js +3 -3
  36. package/dist/api/getApiRoutesHono.js +3 -3
  37. package/dist/api/getExport.js +4 -4
  38. package/dist/api/getExportDev.js +1 -1
  39. package/dist/appOutput.js +1 -1
  40. package/dist/auth/index.js +2 -2
  41. package/dist/babelPlugins/BabelAddDevCacheBust.d.ts.map +1 -1
  42. package/dist/babelPlugins/BabelAddDevCacheBust.js +4 -2
  43. package/dist/babelPlugins/BabelTransformBindDirect.js +2 -2
  44. package/dist/babelPlugins/BabelTransformBindVar.js +3 -3
  45. package/dist/babelPlugins/BabelTransformCjsToEsm.js +1 -1
  46. package/dist/babelPlugins/BabelTransformComponentState.js +2 -2
  47. package/dist/babelPlugins/BabelTransformComponentStyles.d.ts +2 -0
  48. package/dist/babelPlugins/BabelTransformComponentStyles.d.ts.map +1 -1
  49. package/dist/babelPlugins/BabelTransformComponentStyles.js +27 -11
  50. package/dist/babelPlugins/BabelTransformCssImports.js +1 -1
  51. package/dist/babelPlugins/BabelTransformDeproxyState.js +1 -1
  52. package/dist/babelPlugins/BabelTransformJsxExtensionsToJs.d.ts.map +1 -1
  53. package/dist/babelPlugins/BabelTransformJsxExtensionsToJs.js +6 -2
  54. package/dist/babelPlugins/BabelTransformPackageImports.d.ts.map +1 -1
  55. package/dist/babelPlugins/BabelTransformPackageImports.js +71 -49
  56. package/dist/babelPlugins/BabelTransformReactive.js +1 -1
  57. package/dist/babelPlugins/BabelTransformReactiveSvelteStyle.js +1 -1
  58. package/dist/babelPlugins/BabelTransformSxyFrameworkImports.js +1 -1
  59. package/dist/babelPlugins/BabelTransformUniqueComponents.js +1 -1
  60. package/dist/babelPlugins/fixImportsInSassErrorMessage.js +1 -1
  61. package/dist/babelPlugins/test.js +1 -1
  62. package/dist/babelPlugins/transformPackageImports/BabelTransformDependencyImportsCjs.js +3 -3
  63. package/dist/babelPlugins/transformPackageImports/BabelTransformDependencyImportsEsm.js +1 -1
  64. package/dist/babelPlugins/transformPackageImports/getWebLocationOfPackageFile.js +2 -2
  65. package/dist/bin/args.js +1 -1
  66. package/dist/bin/commands/build.js +5 -5
  67. package/dist/bin/commands/buildHelp.js +1 -1
  68. package/dist/bin/commands/clean.js +4 -4
  69. package/dist/bin/commands/compile.d.ts.map +1 -1
  70. package/dist/bin/commands/compile.js +24 -17
  71. package/dist/bin/commands/compileSimplePackage.js +2 -2
  72. package/dist/bin/commands/dev.d.ts.map +1 -1
  73. package/dist/bin/commands/dev.js +16 -9
  74. package/dist/bin/commands/devmon.js +4 -4
  75. package/dist/bin/commands/help.js +2 -2
  76. package/dist/bin/commands/start.js +2 -2
  77. package/dist/bin/commands/static.js +3 -3
  78. package/dist/bin/index.js +13 -13
  79. package/dist/bin/moduleLoadAnalysis.js +2 -2
  80. package/dist/browserStorage.js +2 -2
  81. package/dist/build/babel.user.common.config.d.ts +7 -2
  82. package/dist/build/babel.user.common.config.d.ts.map +1 -1
  83. package/dist/build/babel.user.common.config.js +14 -15
  84. package/dist/build/bundle.d.ts +1 -1
  85. package/dist/build/bundle.d.ts.map +1 -1
  86. package/dist/build/bundle.js +15 -7
  87. package/dist/build/bundleBabelOptions.d.ts +6 -0
  88. package/dist/build/bundleBabelOptions.d.ts.map +1 -0
  89. package/dist/build/bundleBabelOptions.js +23 -0
  90. package/dist/build/combineComponentCss.js +2 -2
  91. package/dist/build/compileJavascript.d.ts +4 -0
  92. package/dist/build/compileJavascript.d.ts.map +1 -1
  93. package/dist/build/compileJavascript.js +148 -90
  94. package/dist/build/compileStyles.js +4 -4
  95. package/dist/build/compileUserApp.d.ts +1 -1
  96. package/dist/build/compileUserApp.d.ts.map +1 -1
  97. package/dist/build/compileUserApp.js +15 -12
  98. package/dist/build/componentStylesCache.d.ts +10 -0
  99. package/dist/build/componentStylesCache.d.ts.map +1 -0
  100. package/dist/build/componentStylesCache.js +54 -0
  101. package/dist/build/copyAssets.js +1 -1
  102. package/dist/build/copyPackageModulesToPackagesFolder.js +4 -4
  103. package/dist/build/copyPublicFiles.js +1 -1
  104. package/dist/build/createClientFiles.js +3 -3
  105. package/dist/build/createInstanceConfigFile.js +2 -2
  106. package/dist/build/createPackageVirtualFileSystems.js +1 -1
  107. package/dist/build/devBundle.js +5 -5
  108. package/dist/build/devBundle.rollup.config.d.ts.map +1 -1
  109. package/dist/build/devBundle.rollup.config.js +0 -1
  110. package/dist/build/frameworkDestLocation.d.ts +1 -0
  111. package/dist/build/frameworkDestLocation.d.ts.map +1 -1
  112. package/dist/build/frameworkDestLocation.js +8 -4
  113. package/dist/build/frameworkStylesheets.js +1 -1
  114. package/dist/build/getAllSxyClientModules.js +2 -2
  115. package/dist/build/getPackageDirForFile.js +1 -1
  116. package/dist/build/getSxyClientPackageAliases.d.ts.map +1 -1
  117. package/dist/build/getSxyClientPackageAliases.js +4 -2
  118. package/dist/build/getTempDirForAppCompilation.js +1 -1
  119. package/dist/build/makeBabelRawConfig.d.ts +3 -0
  120. package/dist/build/makeBabelRawConfig.d.ts.map +1 -0
  121. package/dist/build/makeBabelRawConfig.js +12 -0
  122. package/dist/build/makeBabelUserDevConfig.d.ts +1 -1
  123. package/dist/build/makeBabelUserDevConfig.d.ts.map +1 -1
  124. package/dist/build/makeBabelUserDevConfig.js +11 -8
  125. package/dist/build/makeBabelUserProdConfig.d.ts +1 -1
  126. package/dist/build/makeBabelUserProdConfig.d.ts.map +1 -1
  127. package/dist/build/makeBabelUserProdConfig.js +10 -5
  128. package/dist/build/processPackage.js +3 -3
  129. package/dist/build/rollup.user.prod.config.d.ts.map +1 -1
  130. package/dist/build/rollup.user.prod.config.js +13 -11
  131. package/dist/build/rollupExtractComponentStylesheets.js +2 -2
  132. package/dist/build/sassImportParser.js +2 -2
  133. package/dist/build/tallyBabelPlugins.d.ts.map +1 -1
  134. package/dist/build/tallyBabelPlugins.js +2 -7
  135. package/dist/calculateImportedStaticFileLocations.js +2 -2
  136. package/dist/calledFrom.js +2 -2
  137. package/dist/compat/forwardRef.js +1 -1
  138. package/dist/compat/index.js +1 -1
  139. package/dist/componentCss/tungsten.css +2 -2
  140. package/dist/componentProxyHandlers.js +3 -3
  141. package/dist/components/Link.js +2 -2
  142. package/dist/components/PopMessages.js +3 -3
  143. package/dist/components/RawHtml.js +2 -2
  144. package/dist/components/Stylesheet.js +3 -3
  145. package/dist/components/bindable/BindableCheckbox.js +1 -1
  146. package/dist/components/bindable/BindableInput.js +1 -1
  147. package/dist/components/bindable/BindableInputNonString.js +1 -1
  148. package/dist/components/bindable/BindableInputString.js +1 -1
  149. package/dist/components/bindable/BindableInputTyped.js +1 -1
  150. package/dist/components/bindable/BindableInputTypedLegacy.js +1 -1
  151. package/dist/components/bindable/BindableRadio.js +1 -1
  152. package/dist/components/bindable/BindableSelect.js +1 -1
  153. package/dist/components/bindable/BindableTextarea.js +1 -1
  154. package/dist/components/library/RichTextEditor/RichTextEditor.js +8 -8
  155. package/dist/components/library/RichTextEditor/contentTree.js +4 -4
  156. package/dist/components/library/RichTextEditor/sanitizeAuthoredHtml.js +2 -2
  157. package/dist/components/library/__StatefulMessage/StatefulMessage.js +2 -2
  158. package/dist/components/library/index.js +2 -2
  159. package/dist/createElement.js +1 -1
  160. package/dist/defaultConfig.d.ts +0 -1
  161. package/dist/defaultConfig.d.ts.map +1 -1
  162. package/dist/defaultConfig.js +2 -2
  163. package/dist/deleteDirs.js +1 -1
  164. package/dist/env/addToEnv.js +1 -1
  165. package/dist/env/funcs.js +4 -4
  166. package/dist/env/getEnvSchemas.d.ts.map +1 -1
  167. package/dist/env/getEnvSchemas.js +10 -6
  168. package/dist/env/privateEnv.js +2 -2
  169. package/dist/env/privateEnvOrThrow.js +1 -1
  170. package/dist/env/publicEnv.js +1 -1
  171. package/dist/env/publicEnvOrThrow.js +1 -1
  172. package/dist/filePathFromUrl.js +1 -1
  173. package/dist/findProjectDir.js +1 -1
  174. package/dist/findUserConfig.js +5 -5
  175. package/dist/fixExtension.d.ts.map +1 -1
  176. package/dist/fixExtension.js +5 -3
  177. package/dist/frameworkConfigSchema.d.ts +16 -0
  178. package/dist/frameworkConfigSchema.d.ts.map +1 -1
  179. package/dist/frameworkConfigSchema.js +12 -0
  180. package/dist/getComponent.js +5 -5
  181. package/dist/getComponentDev.js +1 -1
  182. package/dist/getFrameworkDir.js +1 -1
  183. package/dist/getRoutes.js +5 -5
  184. package/dist/getRoutesDevs.js +1 -1
  185. package/dist/getUserConfig.js +7 -7
  186. package/dist/hasValidKey.js +1 -1
  187. package/dist/helpers/index.js +2 -2
  188. package/dist/hmr/applyHmrModule.js +5 -5
  189. package/dist/hmr/componentIdentity.js +2 -2
  190. package/dist/hooks/clearCurrentComponent.js +1 -1
  191. package/dist/hooks/getCurrentComponent.js +3 -3
  192. package/dist/hooks/index.js +5 -5
  193. package/dist/hooks/setCurrentComponent.js +1 -1
  194. package/dist/hooks/useCallback.js +2 -2
  195. package/dist/hooks/useEffect.js +2 -2
  196. package/dist/hooks/useInstance.js +1 -1
  197. package/dist/hooks/useMemo.js +2 -2
  198. package/dist/hooks/useState.js +3 -3
  199. package/dist/hydrate/hydrate.js +31 -31
  200. package/dist/hydrate/reconcileHydratedAttributes.js +3 -3
  201. package/dist/index.js +2 -2
  202. package/dist/indexInner.d.ts +1 -1
  203. package/dist/indexInner.d.ts.map +1 -1
  204. package/dist/indexInner.js +45 -45
  205. package/dist/innerHtmlFromProps.js +1 -1
  206. package/dist/isBrowser.js +1 -1
  207. package/dist/isDev.js +1 -1
  208. package/dist/isProd.js +1 -1
  209. package/dist/isServer.js +1 -1
  210. package/dist/jsx-runtime.js +1 -1
  211. package/dist/jsxRuntime.d.ts.map +1 -1
  212. package/dist/jsxRuntime.js +12 -7
  213. package/dist/jsxRuntimeSignals.d.ts.map +1 -1
  214. package/dist/jsxRuntimeSignals.js +15 -8
  215. package/dist/makeFinalConfig.js +1 -1
  216. package/dist/makeInstanceConfigFromFrameworkConfig.js +1 -1
  217. package/dist/makeServerRpc.js +3 -3
  218. package/dist/markOptionSelected.js +1 -1
  219. package/dist/nbsp.js +1 -1
  220. package/dist/output.js +1 -1
  221. package/dist/pop.js +2 -2
  222. package/dist/postcssPlugins/TransformCssNames.js +6 -6
  223. package/dist/postcssPlugins/parseSelectors.js +1 -1
  224. package/dist/postcssPlugins/parseSelectorsRich.js +1 -1
  225. package/dist/postcssPlugins/scopeAnimationValue.js +2 -2
  226. package/dist/propsAreEqual.js +3 -3
  227. package/dist/rawHtml/filterContentNode.js +4 -4
  228. package/dist/rawHtml/parseHtml.js +4 -4
  229. package/dist/rawHtml/sanitizeHtml.js +3 -3
  230. package/dist/rawHtml/tokenizeHtml.js +2 -2
  231. package/dist/render/addImportMap.js +2 -2
  232. package/dist/render/classComponentNodeToRenderingTree.js +4 -4
  233. package/dist/render/componentNodeToRenderingTree.js +7 -7
  234. package/dist/render/contentNodeToHtml.js +11 -11
  235. package/dist/render/contentToHtml.js +4 -4
  236. package/dist/render/contentToHtmlDev.js +1 -1
  237. package/dist/render/contentTreeToRenderingTree.js +7 -7
  238. package/dist/render/functionComponentNodeToRenderingTree.js +4 -4
  239. package/dist/render/getFunctionBodyAsString.js +1 -1
  240. package/dist/render/instantiateClassComponent.js +2 -2
  241. package/dist/render/instantiateComponent.js +3 -3
  242. package/dist/render/instantiateFunctionComponent.js +2 -2
  243. package/dist/render/printComponentNameInSource.js +1 -1
  244. package/dist/render/processHead.js +5 -5
  245. package/dist/render/processHtmlNode.js +1 -1
  246. package/dist/render/processProps.js +2 -2
  247. package/dist/render/processRenderingNodeHtml.js +6 -6
  248. package/dist/render/renderingTreeToHtml.js +16 -16
  249. package/dist/render/rootToHtml.js +2 -2
  250. package/dist/render/rootToHtmlDev.js +1 -1
  251. package/dist/requests/fetch/delete.js +2 -2
  252. package/dist/requests/fetch/get.js +3 -3
  253. package/dist/requests/fetch/patch.js +2 -2
  254. package/dist/requests/fetch/post.js +2 -2
  255. package/dist/requests/fetch/put.js +2 -2
  256. package/dist/requests/index.js +5 -5
  257. package/dist/routing/MatchedRoute.js +2 -2
  258. package/dist/routing/getPathPriority.js +1 -1
  259. package/dist/routing/matchPath.js +3 -3
  260. package/dist/routing/patternToRegex.js +1 -1
  261. package/dist/server.js +3 -3
  262. package/dist/serverModuleLocation.d.ts +3 -0
  263. package/dist/serverModuleLocation.d.ts.map +1 -0
  264. package/dist/serverModuleLocation.js +12 -0
  265. package/dist/settings.d.ts +4 -0
  266. package/dist/settings.d.ts.map +1 -1
  267. package/dist/settings.js +9 -0
  268. package/dist/standardSchema.js +1 -1
  269. package/dist/staticGen/getAppRoutes.js +3 -3
  270. package/dist/staticGen/staticGen.js +7 -7
  271. package/dist/style/jssToCss.js +3 -3
  272. package/dist/style/styleContent.js +1 -1
  273. package/dist/style/styleContentSxy.js +8 -8
  274. package/dist/style/unusedStyles.js +1 -1
  275. package/dist/sync/index.js +1 -1
  276. package/dist/syncServer/preload.js +1 -1
  277. package/dist/testing/host.js +1 -1
  278. package/dist/testing/hydrateTestApp.js +9 -9
  279. package/dist/testing/index.js +11 -11
  280. package/dist/testing/installTestStyleProcessors.js +1 -1
  281. package/dist/testing/loadEnv.js +3 -3
  282. package/dist/testing/loadEnvSetup.js +1 -1
  283. package/dist/testing/temp/componentPackageMock.js +2 -2
  284. package/dist/testing/temp/contentHtmlElements.js +2 -2
  285. package/dist/throwError.js +2 -2
  286. package/dist/timeProfiler.d.ts +1 -1
  287. package/dist/timeProfiler.d.ts.map +1 -1
  288. package/dist/timeProfiler.js +62 -26
  289. package/dist/update/integrateUpdateVdom.js +28 -28
  290. package/dist/validChildren.js +2 -2
  291. package/dist/warnOnFrameworkChange.js +2 -2
  292. package/dist/zones/react.js +3 -3
  293. package/package.json +18 -11
  294. package/types/modules.d.ts +2 -0
@@ -1,4 +1,4 @@
1
- import { $props, $type } from "../contentNodeSymbols.js";
1
+ import { $props, $type } from '../contentNodeSymbols.js';
2
2
  export function processHtmlNode(node) {
3
3
  // if (node[$type] === 'button') {
4
4
  // console.log('processing html node', node)
@@ -1,6 +1,6 @@
1
1
  import { objects } from 'sxy-lib';
2
- import { jssToCss } from "../style/jssToCss.js";
3
- import { StringIsHtmlEvent } from "../htmlEvents.js";
2
+ import { jssToCss } from '../style/jssToCss.js';
3
+ import { StringIsHtmlEvent } from '../htmlEvents.js';
4
4
  // Props that are instructions to Tungsten rather than HTML attributes.
5
5
  //
6
6
  // Event handlers are not listed here: they are recognised with
@@ -1,9 +1,9 @@
1
- import { bindableHtmlElements } from "../components/bindable/bindableHtmlElements.js";
2
- import { cliWarn } from "../cliOutput.js";
3
- import { debug } from "./debug.js";
4
- import { $props, $type } from "../contentNodeSymbols.js";
5
- import { checkedValueToBoolean } from "../checkedValueToBoolean.js";
6
- import { markOptionSelected } from "../markOptionSelected.js";
1
+ import { bindableHtmlElements } from '../components/bindable/bindableHtmlElements.js';
2
+ import { cliWarn } from '../cliOutput.js';
3
+ import { debug } from './debug.js';
4
+ import { $props, $type } from '../contentNodeSymbols.js';
5
+ import { checkedValueToBoolean } from '../checkedValueToBoolean.js';
6
+ import { markOptionSelected } from '../markOptionSelected.js';
7
7
  export function processRenderingNodeHtml(node, lastSelect) {
8
8
  const props = node[$props];
9
9
  debug('processRenderingNodeHtml', node);
@@ -1,20 +1,20 @@
1
1
  import { reduce as objectReduce } from 'sxy-lib/objects.js';
2
- import { booleanAttributeValue } from "../booleanAttributeValue.js";
3
- import { processProps } from "./processProps.js";
4
- import { htmlVoidTags } from "./htmlVoidTags.js";
5
- import { validRenderingChildren } from "../validChildren.js";
6
- import { htmlEntities } from "../htmlEntities.js";
7
- import { htmlSelfClosableTags } from "./htmlSelfClosableTags.js";
8
- import { htmlMonoTags } from "./htmlMonoTags.js";
9
- import { debug } from "./debug.js";
10
- import { TungstenError } from "../TungstenError.js";
11
- import { throwError } from "../throwError.js";
12
- import { $props, $type } from "../contentNodeSymbols.js";
13
- import { printComponentNamesInSource } from "./printComponentNameInSource.js";
14
- import { RenderingNodeElementIsComponent, RenderingNodeElementIsHtml } from "../RenderingNode.js";
15
- import { processHead } from "./processHead.js";
16
- import { processRenderingNodeHtml } from "./processRenderingNodeHtml.js";
17
- import { innerHtmlFromProps } from "../innerHtmlFromProps.js";
2
+ import { booleanAttributeValue } from '../booleanAttributeValue.js';
3
+ import { processProps } from './processProps.js';
4
+ import { htmlVoidTags } from './htmlVoidTags.js';
5
+ import { validRenderingChildren } from '../validChildren.js';
6
+ import { htmlEntities } from '../htmlEntities.js';
7
+ import { htmlSelfClosableTags } from './htmlSelfClosableTags.js';
8
+ import { htmlMonoTags } from './htmlMonoTags.js';
9
+ import { debug } from './debug.js';
10
+ import { TungstenError } from '../TungstenError.js';
11
+ import { throwError } from '../throwError.js';
12
+ import { $props, $type } from '../contentNodeSymbols.js';
13
+ import { printComponentNamesInSource } from './printComponentNameInSource.js';
14
+ import { RenderingNodeElementIsComponent, RenderingNodeElementIsHtml } from '../RenderingNode.js';
15
+ import { processHead } from './processHead.js';
16
+ import { processRenderingNodeHtml } from './processRenderingNodeHtml.js';
17
+ import { innerHtmlFromProps } from '../innerHtmlFromProps.js';
18
18
  //// Maybe we should build the full tree before rendering
19
19
  //// may need some merging with componentTreeToHtml
20
20
  export async function renderingNodeToHtml(node, noEscape, headData, lastSelect) {
@@ -1,5 +1,5 @@
1
- import { $props, $type } from "../contentNodeSymbols.js";
2
- import { contentToHtml } from "./contentToHtml.js";
1
+ import { $props, $type } from '../contentNodeSymbols.js';
2
+ import { contentToHtml } from './contentToHtml.js';
3
3
  export async function rootToHtml(compilationInfo, clientImportAliases, RootComponentClass, instance, config, siteBasePathOverride, tungstenPublicEnv = undefined, dev = false) {
4
4
  const rootNode = {
5
5
  [$type]: RootComponentClass,
@@ -1,4 +1,4 @@
1
- import { rootToHtml } from "./rootToHtml.js";
1
+ import { rootToHtml } from './rootToHtml.js';
2
2
  export async function rootToHtmlDev(compilationInfo, clientImportAliases, RootComponentClass, instance, config, tungstenPrivateEnv, siteBasePathOverride) {
3
3
  return await rootToHtml(compilationInfo, clientImportAliases, RootComponentClass, instance, config, siteBasePathOverride, tungstenPrivateEnv, true);
4
4
  }
@@ -1,5 +1,5 @@
1
- import { TungstenError } from "../../TungstenError.js";
2
- import { _fetchPromise } from "./_fetchPromise.js";
1
+ import { TungstenError } from '../../TungstenError.js';
2
+ import { _fetchPromise } from './_fetchPromise.js';
3
3
  const method = 'DELETE';
4
4
  export async function httpDelete(url, data, extras) {
5
5
  const _fetch = await _fetchPromise;
@@ -1,6 +1,6 @@
1
- import { TungstenError } from "../../TungstenError.js";
2
- import { _fetchPromise } from "./_fetchPromise.js";
3
- import { paramsObjectToParamsString } from "./paramsObjectToParamsString.js";
1
+ import { TungstenError } from '../../TungstenError.js';
2
+ import { _fetchPromise } from './_fetchPromise.js';
3
+ import { paramsObjectToParamsString } from './paramsObjectToParamsString.js';
4
4
  const method = 'GET';
5
5
  export async function get(url, data, extras) {
6
6
  const _fetch = await _fetchPromise;
@@ -1,5 +1,5 @@
1
- import { TungstenError } from "../../TungstenError.js";
2
- import { _fetchPromise } from "./_fetchPromise.js";
1
+ import { TungstenError } from '../../TungstenError.js';
2
+ import { _fetchPromise } from './_fetchPromise.js';
3
3
  const method = 'PATCH';
4
4
  export async function patch(url, data, extras) {
5
5
  const _fetch = await _fetchPromise;
@@ -1,5 +1,5 @@
1
- import { TungstenError } from "../../TungstenError.js";
2
- import { _fetchPromise } from "./_fetchPromise.js";
1
+ import { TungstenError } from '../../TungstenError.js';
2
+ import { _fetchPromise } from './_fetchPromise.js';
3
3
  const method = 'POST';
4
4
  export async function post(url, data, extras) {
5
5
  const _fetch = await _fetchPromise;
@@ -1,5 +1,5 @@
1
- import { TungstenError } from "../../TungstenError.js";
2
- import { _fetchPromise } from "./_fetchPromise.js";
1
+ import { TungstenError } from '../../TungstenError.js';
2
+ import { _fetchPromise } from './_fetchPromise.js';
3
3
  const method = 'PUT';
4
4
  export async function put(url, data, extras) {
5
5
  const _fetch = await _fetchPromise;
@@ -1,5 +1,5 @@
1
- export { get } from "./fetch/get.js";
2
- export { post } from "./fetch/post.js";
3
- export { put } from "./fetch/put.js";
4
- export { patch } from "./fetch/patch.js";
5
- export { httpDelete, httpDelete as deleteHttp } from "./fetch/delete.js";
1
+ export { get } from './fetch/get.js';
2
+ export { post } from './fetch/post.js';
3
+ export { put } from './fetch/put.js';
4
+ export { patch } from './fetch/patch.js';
5
+ export { httpDelete, httpDelete as deleteHttp } from './fetch/delete.js';
@@ -2,8 +2,8 @@ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object
2
2
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
3
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
4
  import { TungstenSimpleInternalStoreComponent } from "../Components.js";
5
- import { ContentNodeIsComponent } from "../ContentNode.js";
6
- import { $props, $routeData, $routeParams } from "../contentNodeSymbols.js";
5
+ import { ContentNodeIsComponent } from '../ContentNode.js';
6
+ import { $props, $routeData, $routeParams } from '../contentNodeSymbols.js';
7
7
  export class MatchedRoute extends TungstenSimpleInternalStoreComponent {
8
8
  constructor(...args) {
9
9
  super(...args);
@@ -1,4 +1,4 @@
1
- import { throwError } from "../throwError.js";
1
+ import { throwError } from '../throwError.js';
2
2
  function debug(...texts) {
3
3
  //console.log(...texts)
4
4
  }
@@ -1,6 +1,6 @@
1
- import { compareRequestToRegex } from "./compareRequestToRegex.js";
2
- import { patternToRegex } from "./patternToRegex.js";
3
- import { splitRequest } from "./splitRequest.js";
1
+ import { compareRequestToRegex } from './compareRequestToRegex.js';
2
+ import { patternToRegex } from './patternToRegex.js';
3
+ import { splitRequest } from './splitRequest.js';
4
4
  export function matchPath(pattern, request) {
5
5
  // pathToRegexp(path, keys?, options?)
6
6
  // match(path)
@@ -1,4 +1,4 @@
1
- import { throwError } from "../throwError.js";
1
+ import { throwError } from '../throwError.js';
2
2
  export function patternToRegex(pattern) {
3
3
  // regex: find params like :param
4
4
  const paramLookupRegex = /:[a-zA-Z_]+[a-zA-Z_0-9]*/g;
package/dist/server.js CHANGED
@@ -1,3 +1,3 @@
1
- export * from "./auth/index.js";
2
- export * from "./cliOutput.js";
3
- export * from "./spawnShellCommand.js";
1
+ export * from './auth/index.js';
2
+ export * from './cliOutput.js';
3
+ export * from './spawnShellCommand.js';
@@ -0,0 +1,3 @@
1
+ import type { Mode } from './Mode.js';
2
+ export declare function serverModuleLocation(projectDir: string, mode: Mode, codeLocation: string, relFile: string): string;
3
+ //# sourceMappingURL=serverModuleLocation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serverModuleLocation.d.ts","sourceRoot":"","sources":["../src/serverModuleLocation.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAMrC,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAIlH"}
@@ -0,0 +1,12 @@
1
+ import { existsSync } from 'fs';
2
+ import { join } from 'path';
3
+ import { fixExtension } from './fixExtension.js';
4
+ import { devRawBuildFolder, prodRawBuildFolder } from './settings.js';
5
+ // Where a server-side module the config names (server middleware) is loaded from: the raw
6
+ // pipeline's compiled copy when there is one, else the file in codeDir as before - an app that
7
+ // emits its own server code still has it there.
8
+ export function serverModuleLocation(projectDir, mode, codeLocation, relFile) {
9
+ const rawFolder = mode === 'dev' ? devRawBuildFolder : prodRawBuildFolder;
10
+ const raw = join(projectDir, rawFolder, fixExtension(relFile));
11
+ return existsSync(raw) ? raw : join(codeLocation, relFile);
12
+ }
@@ -4,10 +4,13 @@ export declare const devBuildOuterFolder = ".tungsten/dev";
4
4
  export declare const devBuildFolder = ".tungsten/dev/code";
5
5
  export declare const prodBuildFolder = ".tungsten/prod";
6
6
  export declare const prodBuildCodeFolder = ".tungsten/prod/code";
7
+ export declare const devRawBuildFolder = ".tungsten/dev-raw";
8
+ export declare const prodRawBuildFolder = ".tungsten/prod-raw";
7
9
  export declare const bundleFolder = ".tungsten/prod/.bundle";
8
10
  export declare const staticSiteFolder = ".tungsten/staticSite";
9
11
  export declare const packagesCacheFolder = ".tungsten/packagesCache";
10
12
  export declare const packagesCacheInfoName = "info.json";
13
+ export declare const stylesCacheFolder = ".tungsten/stylesCache";
11
14
  export declare const serverFolder = "server";
12
15
  export declare const clientFolder = ".client";
13
16
  export declare const staticFolder = ".static";
@@ -19,6 +22,7 @@ export declare const frameworkCssFolder = ".tungstenCss";
19
22
  export declare const frameworkCssFile = "tungsten.css";
20
23
  export declare const packagesFolder = ".packages";
21
24
  export declare const unusedStyleReporting: boolean;
25
+ export declare const defaultBrowserTargets = "since 2020";
22
26
  export declare const packageName = "tungsten";
23
27
  export declare const packageNameCapitalized = "Tungsten";
24
28
  export declare const frameworkClientFolder = "_client";
@@ -1 +1 @@
1
- {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../src/settings.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,cAAc,CAAA;AACtC,eAAO,MAAM,gBAAgB,SAAS,CAAA;AACtC,eAAO,MAAM,mBAAmB,kBAAuB,CAAA;AACvD,eAAO,MAAM,cAAc,uBAA+C,CAAA;AAC1E,eAAO,MAAM,eAAe,mBAAwB,CAAA;AACpD,eAAO,MAAM,mBAAmB,wBAA2C,CAAA;AAC3E,eAAO,MAAM,YAAY,2BAA+B,CAAA;AACxD,eAAO,MAAM,gBAAgB,yBAA8B,CAAA;AAC3D,eAAO,MAAM,mBAAmB,4BAAiC,CAAA;AACjE,eAAO,MAAM,qBAAqB,cAAc,CAAA;AAChD,eAAO,MAAM,YAAY,WAAW,CAAA;AAEpC,eAAO,MAAM,YAAY,YAAY,CAAA;AACrC,eAAO,MAAM,YAAY,YAAY,CAAA;AACrC,eAAO,MAAM,YAAY,YAAY,CAAA;AACrC,eAAO,MAAM,YAAY,YAAY,CAAA;AACrC,eAAO,MAAM,kBAAkB,kBAAkB,CAAA;AACjD,eAAO,MAAM,gBAAgB,aAAa,CAAA;AAE1C,eAAO,MAAM,kBAAkB,iBAAiB,CAAA;AAChD,eAAO,MAAM,gBAAgB,iBAAiB,CAAA;AAC9C,eAAO,MAAM,cAAc,cAAc,CAAA;AAEzC,eAAO,MAAM,oBAAoB,EAAE,OAAe,CAAA;AAElD,eAAO,MAAM,WAAW,aAAa,CAAA;AACrC,eAAO,MAAM,sBAAsB,aAAa,CAAA;AAChD,eAAO,MAAM,qBAAqB,YAAY,CAAA;AAC9C,eAAO,MAAM,mBAAmB,SAAS,CAAA"}
1
+ {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../src/settings.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,cAAc,CAAA;AACtC,eAAO,MAAM,gBAAgB,SAAS,CAAA;AACtC,eAAO,MAAM,mBAAmB,kBAAuB,CAAA;AACvD,eAAO,MAAM,cAAc,uBAA+C,CAAA;AAC1E,eAAO,MAAM,eAAe,mBAAwB,CAAA;AACpD,eAAO,MAAM,mBAAmB,wBAA2C,CAAA;AAG3E,eAAO,MAAM,iBAAiB,sBAA2B,CAAA;AACzD,eAAO,MAAM,kBAAkB,uBAA4B,CAAA;AAC3D,eAAO,MAAM,YAAY,2BAA+B,CAAA;AACxD,eAAO,MAAM,gBAAgB,yBAA8B,CAAA;AAC3D,eAAO,MAAM,mBAAmB,4BAAiC,CAAA;AACjE,eAAO,MAAM,qBAAqB,cAAc,CAAA;AAEhD,eAAO,MAAM,iBAAiB,0BAA+B,CAAA;AAC7D,eAAO,MAAM,YAAY,WAAW,CAAA;AAEpC,eAAO,MAAM,YAAY,YAAY,CAAA;AACrC,eAAO,MAAM,YAAY,YAAY,CAAA;AACrC,eAAO,MAAM,YAAY,YAAY,CAAA;AACrC,eAAO,MAAM,YAAY,YAAY,CAAA;AACrC,eAAO,MAAM,kBAAkB,kBAAkB,CAAA;AACjD,eAAO,MAAM,gBAAgB,aAAa,CAAA;AAE1C,eAAO,MAAM,kBAAkB,iBAAiB,CAAA;AAChD,eAAO,MAAM,gBAAgB,iBAAiB,CAAA;AAC9C,eAAO,MAAM,cAAc,cAAc,CAAA;AAEzC,eAAO,MAAM,oBAAoB,EAAE,OAAe,CAAA;AAIlD,eAAO,MAAM,qBAAqB,eAAe,CAAA;AAEjD,eAAO,MAAM,WAAW,aAAa,CAAA;AACrC,eAAO,MAAM,sBAAsB,aAAa,CAAA;AAChD,eAAO,MAAM,qBAAqB,YAAY,CAAA;AAC9C,eAAO,MAAM,mBAAmB,SAAS,CAAA"}
package/dist/settings.js CHANGED
@@ -4,10 +4,16 @@ export const devBuildOuterFolder = `${buildFolder}/dev`;
4
4
  export const devBuildFolder = `${devBuildOuterFolder}/${buildCodeSubPath}`;
5
5
  export const prodBuildFolder = `${buildFolder}/prod`;
6
6
  export const prodBuildCodeFolder = `${prodBuildFolder}/${buildCodeSubPath}`;
7
+ // the raw (node-side) compile of the sources rawDirs/rawPatterns select: a tree of its own beside
8
+ // the served build, since a file can be compiled both ways
9
+ export const devRawBuildFolder = `${buildFolder}/dev-raw`;
10
+ export const prodRawBuildFolder = `${buildFolder}/prod-raw`;
7
11
  export const bundleFolder = `${prodBuildFolder}/.bundle`;
8
12
  export const staticSiteFolder = `${buildFolder}/staticSite`;
9
13
  export const packagesCacheFolder = `${buildFolder}/packagesCache`;
10
14
  export const packagesCacheInfoName = `info.json`;
15
+ // component style blocks' sass output, a json record per module - survives clean('dev')
16
+ export const stylesCacheFolder = `${buildFolder}/stylesCache`;
11
17
  export const serverFolder = 'server';
12
18
  //export const clientFolder = 'client'
13
19
  export const clientFolder = '.client';
@@ -21,6 +27,9 @@ export const frameworkCssFolder = '.tungstenCss';
21
27
  export const frameworkCssFile = 'tungsten.css';
22
28
  export const packagesFolder = '.packages';
23
29
  export const unusedStyleReporting = false;
30
+ // the production bundle's browser floor when the config sets no `targets`: a browserslist query
31
+ // for every browser version released since 2020. Dev applies no floor at all.
32
+ export const defaultBrowserTargets = 'since 2020';
24
33
  export const packageName = 'tungsten';
25
34
  export const packageNameCapitalized = 'Tungsten';
26
35
  export const frameworkClientFolder = '_client';
@@ -1,7 +1,7 @@
1
1
  // Standard Schema v1 (https://standardschema.dev), inlined rather than taken from
2
2
  // @standard-schema/spec so nothing new lands in tungsten's shipped types. Only the output type is
3
3
  // parameterised - the input is always unknown, whether it is process.env or a user's config file.
4
- import { throwError } from "./throwError.js";
4
+ import { throwError } from './throwError.js';
5
5
  // safeParse-shaped, but awaited: the spec lets a schema validate asynchronously
6
6
  export async function validate(schema, value) {
7
7
  const result = await schema['~standard'].validate(value);
@@ -1,7 +1,7 @@
1
1
  import { join } from 'path';
2
- import { fixExtension } from "../fixExtension.js";
3
- import { TungstenError } from "../TungstenError.js";
4
- import { cliLog } from "../cliOutput.js";
2
+ import { fixExtension } from '../fixExtension.js';
3
+ import { TungstenError } from '../TungstenError.js';
4
+ import { cliLog } from '../cliOutput.js';
5
5
  // prod: const appRoutes: AppRoutes = await getRoutes(this.compilationInfo, this.config)
6
6
  // this file is outdated and may not work correctly
7
7
  // should compare this to the functions used by Servers
@@ -2,13 +2,13 @@ import { existsSync, promises as fsPromises } from 'fs';
2
2
  import { join, dirname } from 'path';
3
3
  import fsExtra from 'fs-extra';
4
4
  //import type { SxyFrameworkConfigComplete } from '../FrameworkConfig.js'
5
- import { staticSiteFolder, staticFolder, assetsFolder, publicFolder, bundleFolder, componentCssFolder, frameworkCssFolder } from "../settings.js";
6
- import { getAppRoutes } from "./getAppRoutes.js";
7
- import { cliError, cliLog, cliWarn } from "../cliOutput.js";
8
- import { matchPath } from "../routing/matchPath.js";
9
- import { throwError } from "../throwError.js";
10
- import { RouteKeyIsPath, StringIsPath } from "../routing/RouteTypes.js";
11
- import { findLinks, pathToLink, pathToFileName, rewriteLinks } from "./staticGenFunctions.js";
5
+ import { staticSiteFolder, staticFolder, assetsFolder, publicFolder, bundleFolder, componentCssFolder, frameworkCssFolder } from '../settings.js';
6
+ import { getAppRoutes } from './getAppRoutes.js';
7
+ import { cliError, cliLog, cliWarn } from '../cliOutput.js';
8
+ import { matchPath } from '../routing/matchPath.js';
9
+ import { throwError } from '../throwError.js';
10
+ import { RouteKeyIsPath, StringIsPath } from '../routing/RouteTypes.js';
11
+ import { findLinks, pathToLink, pathToFileName, rewriteLinks } from './staticGenFunctions.js';
12
12
  import { filter as objectFilter, count } from 'sxy-lib/objects.js';
13
13
  export async function staticGen(framework) {
14
14
  if (framework.compilationInfo === undefined) {
@@ -1,7 +1,7 @@
1
1
  import decamelize from 'decamelize';
2
- import { IsIndexableObject } from "../IsIndexableObject.js";
3
- import { todo } from "../todo.js";
4
- import { throwError } from "../throwError.js";
2
+ import { IsIndexableObject } from '../IsIndexableObject.js';
3
+ import { todo } from '../todo.js';
4
+ import { throwError } from '../throwError.js';
5
5
  function kabab(string) {
6
6
  return decamelize(string, {
7
7
  separator: '-'
@@ -1,2 +1,2 @@
1
- import { styleContentSxy } from "./styleContentSxy.js";
1
+ import { styleContentSxy } from './styleContentSxy.js';
2
2
  export const styleContent = styleContentSxy;
@@ -1,12 +1,12 @@
1
1
  import { count } from 'sxy-lib/objects.js';
2
- import { ContentNodeElementIsHtml, ContentNodeElementIsComponent } from "../ContentNode.js";
3
- import { warn } from "../output.js";
4
- import { TungstenError } from "../TungstenError.js";
5
- import { componentBumpClass } from "../componentClassName.js";
6
- import { $props, $type } from "../contentNodeSymbols.js";
7
- import { isDev } from "../isDev.js";
8
- import { unusedStyleReporting } from "../settings.js";
9
- import { getStyleUsage } from "./unusedStyles.js";
2
+ import { ContentNodeElementIsHtml, ContentNodeElementIsComponent } from '../ContentNode.js';
3
+ import { warn } from '../output.js';
4
+ import { TungstenError } from '../TungstenError.js';
5
+ import { componentBumpClass } from '../componentClassName.js';
6
+ import { $props, $type } from '../contentNodeSymbols.js';
7
+ import { isDev } from '../isDev.js';
8
+ import { unusedStyleReporting } from '../settings.js';
9
+ import { getStyleUsage } from './unusedStyles.js';
10
10
  function debug(...texts) {
11
11
  //console.log(...texts)
12
12
  }
@@ -1,4 +1,4 @@
1
- import { warn as safeWarn } from "../output.js";
1
+ import { warn as safeWarn } from '../output.js';
2
2
  // component stylesheets are module level singletons, so holding them here is not a leak
3
3
  const usageByStyles = new Map();
4
4
  // wait for render activity to settle before reporting, so that content rendered a little
@@ -1,4 +1,4 @@
1
- import * as tungsten from "../index.js";
1
+ import * as tungsten from '../index.js';
2
2
  export const deps = [];
3
3
  export default function cjsModule(module, exports, require) {
4
4
  for (const key in tungsten) {
@@ -1,3 +1,3 @@
1
- import * as tungsten from "../index.js";
1
+ import * as tungsten from '../index.js';
2
2
  // @ts-ignore
3
3
  global.__tungsten_framework_modules = tungsten;
@@ -1,5 +1,5 @@
1
1
  import { TungstenBaseComponent, TungstenSimpleComponent } from "../Components.js";
2
- import { componentPackageMock } from "./temp/componentPackageMock.js";
2
+ import { componentPackageMock } from './temp/componentPackageMock.js';
3
3
  const isPromise = value => value instanceof Promise || typeof value === 'object' && value !== null && 'then' in value;
4
4
  // The same list at runtime. Underscore-prefixed members are excluded by rule
5
5
  // (the framework's naming scheme), so only the plain-named ones are listed, and
@@ -6,16 +6,16 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
6
6
  function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
7
7
  function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
8
8
  function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
9
- import { $props, $type } from "../contentNodeSymbols.js";
10
- import { Instance } from "../Instance/Instance.js";
9
+ import { $props, $type } from '../contentNodeSymbols.js';
10
+ import { Instance } from '../Instance/Instance.js';
11
11
  import { hydrateRootComponent, makeDefaultHydrateMeta } from "../hydrate/hydrate.js";
12
- import { contentTreeToRenderingTree } from "../render/contentTreeToRenderingTree.js";
13
- import { renderingNodeToHtml } from "../render/renderingTreeToHtml.js";
14
- import { initStores } from "../Servers/initStores.js";
15
- import { deleteNodeIfRendered } from "../update/integrateUpdateVdom.js";
16
- import { UpdateScheduler } from "../update/UpdateScheduler.js";
17
- import { DomPointer } from "../DomPointer.js";
18
- import { waitForEnvIfLoading } from "./loadEnv.js";
12
+ import { contentTreeToRenderingTree } from '../render/contentTreeToRenderingTree.js';
13
+ import { renderingNodeToHtml } from '../render/renderingTreeToHtml.js';
14
+ import { initStores } from '../Servers/initStores.js';
15
+ import { deleteNodeIfRendered } from '../update/integrateUpdateVdom.js';
16
+ import { UpdateScheduler } from '../update/UpdateScheduler.js';
17
+ import { DomPointer } from '../DomPointer.js';
18
+ import { waitForEnvIfLoading } from './loadEnv.js';
19
19
  // hydrate.tsx references several DOM globals directly (Node.COMMENT_NODE, `instanceof Text`, the
20
20
  // bare `document`) the way real browser code always can - happy-dom only puts these on its own
21
21
  // Window, not on Node.js's global scope. Every hand-written hydration test before this harness
@@ -6,17 +6,17 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
6
6
  function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
7
7
  function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
8
8
  function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
9
- import { Instance } from "../Instance/Instance.js";
10
- import { initStores } from "../Servers/initStores.js";
11
- import { waitForEnvIfLoading } from "./loadEnv.js";
12
- export { loadEnv } from "./loadEnv.js";
13
- export { testEnvVariableName } from "./testEnvIsRequested.js";
14
- export { hydrateTestApp } from "./hydrateTestApp.js";
15
- export { host } from "./host.js";
16
- export { componentPackageMock } from "./temp/componentPackageMock.js";
17
- export { contentHtmlElements } from "./temp/contentHtmlElements.js";
18
- import { createTungstenRootComponent, deleteTungstenRoot } from "../update/integrateUpdateVdom.js";
19
- import { UpdateScheduler } from "../update/UpdateScheduler.js";
9
+ import { Instance } from '../Instance/Instance.js';
10
+ import { initStores } from '../Servers/initStores.js';
11
+ import { waitForEnvIfLoading } from './loadEnv.js';
12
+ export { loadEnv } from './loadEnv.js';
13
+ export { testEnvVariableName } from './testEnvIsRequested.js';
14
+ export { hydrateTestApp } from './hydrateTestApp.js';
15
+ export { host } from './host.js';
16
+ export { componentPackageMock } from './temp/componentPackageMock.js';
17
+ export { contentHtmlElements } from './temp/contentHtmlElements.js';
18
+ import { createTungstenRootComponent, deleteTungstenRoot } from '../update/integrateUpdateVdom.js';
19
+ import { UpdateScheduler } from '../update/UpdateScheduler.js';
20
20
  export function testStore(registration, initialize) {
21
21
  return {
22
22
  registration,
@@ -1,4 +1,4 @@
1
- import { CssNames } from "../CssNames.js";
1
+ import { CssNames } from '../CssNames.js';
2
2
  // The style processors are compiled away by babel-plugin-css-to-js in an app
3
3
  // build. Tungsten's own build deliberately leaves them alone — transforming
4
4
  // here would emit the stylesheet into the framework's output instead of the
@@ -1,6 +1,6 @@
1
- import { getUserConfig } from "../getUserConfig.js";
2
- import { loadEnvsDev } from "../Servers/loadEnvsDev.js";
3
- import { testEnvIsRequested, testEnvVariableName } from "./testEnvIsRequested.js";
1
+ import { getUserConfig } from '../getUserConfig.js';
2
+ import { loadEnvsDev } from '../Servers/loadEnvsDev.js';
3
+ import { testEnvIsRequested, testEnvVariableName } from './testEnvIsRequested.js';
4
4
  let loadPromise;
5
5
  // Populate global.tungstenPublicEnv / global.tungstenPrivateEnv for DOM component tests, once
6
6
  // per process. Compiled client component code reads these as bare globals, so they must exist
@@ -3,5 +3,5 @@
3
3
  // component tests:
4
4
  // setup: ['node_modules/tungsten/dist/testing/loadEnvSetup.js']
5
5
  // (the path is resolved from the project dir). Or call loadEnv() directly in a setup function.
6
- import { loadEnv } from "./loadEnv.js";
6
+ import { loadEnv } from './loadEnv.js';
7
7
  await loadEnv();
@@ -1,5 +1,5 @@
1
- import { isClient as processIsClient } from "../../isClient.js";
2
- import { isServer as processIsServer } from "../../isServer.js";
1
+ import { isClient as processIsClient } from '../../isClient.js';
2
+ import { isServer as processIsServer } from '../../isServer.js';
3
3
  const missing = key => {
4
4
  throw new Error(`componentPackageMock: no ${key} supplied. Pass one in the options if the value is part` + ` of the test, or use createTestApp() for a component that needs a real app.`);
5
5
  };
@@ -1,5 +1,5 @@
1
- import { $props } from "../../contentNodeSymbols.js";
2
- import { ContentNodeIsElement, ContentNodeIsHtml } from "../../ContentNode.js";
1
+ import { $props } from '../../contentNodeSymbols.js';
2
+ import { ContentNodeIsElement, ContentNodeIsHtml } from '../../ContentNode.js';
3
3
  export const contentHtmlElements = content => {
4
4
  if (Array.isArray(content)) {
5
5
  return content.flatMap(contentHtmlElements);
@@ -1,5 +1,5 @@
1
- import { TungstenError } from "./TungstenError.js";
2
- import { packageNameCapitalized } from "./settings.js";
1
+ import { TungstenError } from './TungstenError.js';
2
+ import { packageNameCapitalized } from './settings.js';
3
3
  export function throwError(location, message) {
4
4
  throw new TungstenError(errorMessage(location, message));
5
5
  }
@@ -5,7 +5,7 @@ export type TimeProfiler = {
5
5
  export declare function isProfiling(): boolean;
6
6
  export declare function beginStartupProfiling(profiling: boolean): void;
7
7
  export declare function reportStartupPhase(name: string): void;
8
- export declare function tally(name: string, ms: number): void;
8
+ export declare function tallied<T>(name: string, work: () => T): T;
9
9
  export declare function addEndOfRunReport(report: () => void): void;
10
10
  export declare function reportRunTotal(name: string): void;
11
11
  export declare function createTimeProfiler(profiling?: boolean): TimeProfiler;
@@ -1 +1 @@
1
- {"version":3,"file":"timeProfiler.d.ts","sourceRoot":"","sources":["../src/timeProfiler.ts"],"names":[],"mappings":"AAUA,MAAM,MAAM,YAAY,GAAG;IACvB,WAAW,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,CAAA;IAClD,gBAAgB,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,CAAA;CAChF,CAAA;AA+MD,wBAAgB,WAAW,IAAI,OAAO,CAErC;AAGD,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI,CAG9D;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAKrD;AAOD,wBAAgB,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI,CAKpD;AA0BD,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,IAAI,GAAG,IAAI,CAE1D;AAGD,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CASjD;AAED,wBAAgB,kBAAkB,CAAC,SAAS,UAAO,GAAG,YAAY,CAoCjE"}
1
+ {"version":3,"file":"timeProfiler.d.ts","sourceRoot":"","sources":["../src/timeProfiler.ts"],"names":[],"mappings":"AAUA,MAAM,MAAM,YAAY,GAAG;IACvB,WAAW,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,CAAA;IAClD,gBAAgB,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,CAAA;CAChF,CAAA;AAgND,wBAAgB,WAAW,IAAI,OAAO,CAErC;AAGD,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI,CAG9D;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAKrD;AA0BD,wBAAgB,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,GAAG,CAAC,CAWzD;AAiCD,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,IAAI,GAAG,IAAI,CAE1D;AAGD,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CASjD;AAED,wBAAgB,kBAAkB,CAAC,SAAS,UAAO,GAAG,YAAY,CAoCjE"}