tungsten 0.4.12 → 0.4.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.build-complete +1 -1
- package/dist/.tsbuildinfo +1 -0
- package/dist/AnyComponent.d.ts.map +1 -1
- package/dist/Components.d.ts.map +1 -1
- package/dist/Components.js +11 -8
- package/dist/DomPointer.js +1 -1
- package/dist/DomRegion.js +2 -2
- package/dist/Framework.js +1 -1
- package/dist/FrameworkConfig.d.ts.map +1 -1
- package/dist/Instance/Instance.js +1 -1
- package/dist/RenderedContentNode.d.ts.map +1 -1
- package/dist/RenderedContentNode.js +2 -1
- package/dist/Sass.d.ts.map +1 -1
- package/dist/Sass.js +1 -0
- package/dist/Servers/DevServer.d.ts.map +1 -1
- package/dist/Servers/DevServer.js +4 -3
- package/dist/Servers/ProdServer.js +1 -1
- package/dist/Servers/StaticSiteServer.js +1 -1
- package/dist/Servers/loadEnvsDev.d.ts +1 -1
- package/dist/Servers/loadEnvsDev.d.ts.map +1 -1
- package/dist/Servers/loadEnvsDev.js +4 -2
- package/dist/Servers/routing.d.ts.map +1 -1
- package/dist/Servers/routing.js +1 -1
- package/dist/Store/Store.js +1 -1
- package/dist/Store/TypeSafeStore.js +1 -1
- package/dist/Store/makeStore.js +1 -1
- package/dist/Store/registerStore.js +1 -1
- package/dist/TElement.js +1 -1
- package/dist/TungstenApp.js +6 -2
- package/dist/api/getExport.d.ts.map +1 -1
- package/dist/api/getExport.js +1 -0
- package/dist/babelPlugins/BabelTransformBindDirect.js +2 -0
- package/dist/babelPlugins/BabelTransformBindVar.d.ts.map +1 -1
- package/dist/babelPlugins/BabelTransformComponentState.d.ts.map +1 -1
- package/dist/babelPlugins/BabelTransformComponentStyles.d.ts.map +1 -1
- package/dist/babelPlugins/BabelTransformComponentStyles.js +5 -4
- package/dist/babelPlugins/BabelTransformCssImports.d.ts.map +1 -1
- package/dist/babelPlugins/BabelTransformCssImports.js +2 -2
- package/dist/babelPlugins/BabelTransformDependencyImportsOld.js +1 -1
- package/dist/babelPlugins/BabelTransformDeproxyState.d.ts.map +1 -1
- package/dist/babelPlugins/BabelTransformPackageImports.d.ts.map +1 -1
- package/dist/babelPlugins/BabelTransformPackageImports.js +10 -5
- package/dist/babelPlugins/BabelTransformRemoveBlocks.d.ts.map +1 -1
- package/dist/babelPlugins/transformPackageImports/BabelTransformDependencyImportsCjs.d.ts.map +1 -1
- package/dist/babelPlugins/transformPackageImports/BabelTransformDependencyImportsCjs.js +2 -1
- package/dist/babelPlugins/transformPackageImports/BabelTransformDependencyImportsEsm.d.ts.map +1 -1
- package/dist/babelPlugins/transformPackageImports/BabelTransformDependencyImportsEsm.js +2 -1
- package/dist/bin/args.js +1 -1
- package/dist/bin/commands/build.js +1 -1
- package/dist/bin/commands/compileSimplePackage.js +1 -0
- package/dist/bin/index.d.ts.map +1 -1
- package/dist/bin/index.js +11 -3
- package/dist/bin/vendorHook.d.ts +3 -0
- package/dist/bin/vendorHook.d.ts.map +1 -0
- package/dist/bin/vendorHook.js +34 -0
- package/dist/browserStorage.js +4 -2
- package/dist/build/babel.user.common.config.d.ts +2 -0
- package/dist/build/babel.user.common.config.d.ts.map +1 -1
- package/dist/build/babel.user.common.config.js +10 -4
- package/dist/build/compileJavascript.d.ts.map +1 -1
- package/dist/build/compileJavascript.js +40 -27
- package/dist/build/compileStyles.js +4 -4
- package/dist/build/copyAssets.js +3 -3
- package/dist/build/copyPublicFiles.js +3 -3
- package/dist/build/frameworkStylesheets.js +1 -1
- package/dist/build/getAllSxyClientModules.d.ts.map +1 -1
- package/dist/build/getAllSxyClientModules.js +4 -28
- package/dist/build/getSxyClientPackageAliases.d.ts.map +1 -1
- package/dist/build/makeBabelUserDevConfig.d.ts.map +1 -1
- package/dist/build/makeBabelUserProdConfig.d.ts.map +1 -1
- package/dist/build/rollupExtractComponentStylesheets.js +1 -1
- package/dist/build/sassImportParser.js +2 -2
- package/dist/build/tallyBabel.d.ts +3 -0
- package/dist/build/tallyBabel.d.ts.map +1 -0
- package/dist/build/tallyBabel.js +11 -0
- package/dist/clone.js +4 -4
- package/dist/compat/context.d.ts.map +1 -1
- package/dist/compat/types.d.ts.map +1 -1
- package/dist/componentProxyHandlers.d.ts.map +1 -1
- package/dist/componentProxyHandlers.js +5 -9
- package/dist/components/Stylesheet.d.ts +1 -2
- package/dist/components/Stylesheet.d.ts.map +1 -1
- package/dist/components/Stylesheet.js +1 -1
- package/dist/components/bindable/BindableCheckbox.d.ts.map +1 -1
- package/dist/components/bindable/BindableInput.d.ts.map +1 -1
- package/dist/components/bindable/BindableInputTypedLegacy.d.ts.map +1 -1
- package/dist/components/bindable/BindableRadio.d.ts.map +1 -1
- package/dist/components/bindable/BindableTextarea.d.ts.map +1 -1
- package/dist/components/library/RichTextEditor/RichTextEditor.js +2 -2
- package/dist/components/library/RichTextEditor/contentTree.js +1 -1
- package/dist/concat.d.ts.map +1 -1
- package/dist/concat.js +2 -2
- package/dist/copy.d.ts.map +1 -1
- package/dist/createRoutes.d.ts +1 -1
- package/dist/createRoutes.d.ts.map +1 -1
- package/dist/env/Env.js +2 -2
- package/dist/env/getEnvSchemas.d.ts +2 -2
- package/dist/env/getEnvSchemas.d.ts.map +1 -1
- package/dist/env/getEnvSchemas.js +7 -5
- package/dist/env/windowGlobalEnvStatement.d.ts.map +1 -1
- package/dist/findProjectDir.d.ts.map +1 -1
- package/dist/findProjectDir.js +18 -4
- package/dist/findUserConfig.js +2 -2
- package/dist/foreach.js +1 -0
- package/dist/frameworkConfigSchema.js +2 -2
- package/dist/getComponent.d.ts.map +1 -1
- package/dist/getComponentDev.d.ts.map +1 -1
- package/dist/getRoutes.d.ts.map +1 -1
- package/dist/getRoutes.js +13 -22
- package/dist/getRoutesDevs.d.ts.map +1 -1
- package/dist/getStackTrace.js +1 -1
- package/dist/glob.d.ts +5 -0
- package/dist/glob.d.ts.map +1 -0
- package/dist/glob.js +103 -0
- package/dist/helpers/getFetchCompatibleHeaders.js +2 -2
- package/dist/hmr/applyHmrModule.js +5 -5
- package/dist/hmr/componentIdentity.js +1 -1
- package/dist/hmr/instanceRegistry.js +2 -2
- package/dist/hooks/useReducer.d.ts.map +1 -1
- package/dist/hooks/useState.d.ts.map +1 -1
- package/dist/hooks/useState.js +2 -8
- package/dist/hydrate/hydrate.d.ts +1 -1
- package/dist/hydrate/hydrate.d.ts.map +1 -1
- package/dist/hydrate/hydrate.js +26 -24
- package/dist/hydrate/reconcileHydratedAttributes.js +2 -2
- package/dist/makeFinalConfig.d.ts.map +1 -1
- package/dist/makeFinalConfig.js +2 -2
- package/dist/markOptionSelected.js +1 -1
- package/dist/mergeConfigs.d.ts.map +1 -1
- package/dist/mergeConfigs.js +11 -2
- package/dist/mutatingFunctions.js +3 -3
- package/dist/postcssPlugins/TransformCssNames.js +2 -2
- package/dist/rawHtml/parseHtml.js +1 -1
- package/dist/render/componentNodeToRenderingTree.d.ts.map +1 -1
- package/dist/render/componentNodeToRenderingTree.js +6 -17
- package/dist/render/contentToHtml.d.ts.map +1 -1
- package/dist/render/contentToHtml.js +1 -1
- package/dist/render/getFunctionBodyAsString.d.ts.map +1 -1
- package/dist/render/getFunctionBodyAsString.js +2 -5
- package/dist/render/processProps.js +2 -2
- package/dist/render/renderingTreeToHtml.d.ts.map +1 -1
- package/dist/render/rootToHtml.d.ts.map +1 -1
- package/dist/routing/Route.js +1 -1
- package/dist/routing/RouteDataFunction.type.d.ts.map +1 -1
- package/dist/routing/RoutesWithSafeParams.js +1 -1
- package/dist/routing/WebRedirect.d.ts.map +1 -1
- package/dist/routing/compareRequestToRegex.js +2 -2
- package/dist/routing/getPathPriority.js +1 -1
- package/dist/serverRpc.d.ts.map +1 -1
- package/dist/slash.d.ts +2 -0
- package/dist/slash.d.ts.map +1 -0
- package/dist/slash.js +5 -0
- package/dist/spawnShellCommand.js +1 -1
- package/dist/staticGen/staticGen.d.ts.map +1 -1
- package/dist/staticGen/staticGen.js +9 -7
- package/dist/staticGen/staticGenFunctions.js +1 -1
- package/dist/style/jssToCss.d.ts.map +1 -1
- package/dist/style/jssToCss.js +11 -9
- package/dist/style/unusedStyles.d.ts.map +1 -1
- package/dist/testing/host.js +11 -11
- package/dist/testing/hydrateTestApp.d.ts.map +1 -1
- package/dist/testing/hydrateTestApp.js +9 -9
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/installTestStyleProcessors.js +1 -1
- package/dist/testing/loadEnv.d.ts +4 -1
- package/dist/testing/loadEnv.d.ts.map +1 -1
- package/dist/testing/loadEnv.js +2 -2
- package/dist/testing/temp/componentPackageMock.js +3 -3
- package/dist/timeProfiler.d.ts +4 -0
- package/dist/timeProfiler.d.ts.map +1 -1
- package/dist/timeProfiler.js +16 -0
- package/dist/todo.js +2 -1
- package/dist/update/integrateUpdateVdom.d.ts.map +1 -1
- package/dist/update/integrateUpdateVdom.js +17 -14
- package/dist/update/integrateUpdateVdomPrebuild.js +5 -5
- package/dist/watch.js +2 -2
- package/package.json +10 -29
- package/types/modules.d.ts +0 -1
- package/vendor/babel-core.js +26 -0
- package/vendor/babel-parser.js +9 -0
- package/vendor/babel-plugin-syntax-import-assertions.js +50 -0
- package/vendor/babel-preset-react.js +872 -0
- package/vendor/babel-preset-typescript.js +26 -0
- package/vendor/babel-types.js +9 -0
- package/vendor/chalk-extensions.js +1994 -0
- package/vendor/chalk.js +647 -0
- package/vendor/chokidar.js +6889 -0
- package/vendor/chunk-1TN2rK3j.js +1218 -0
- package/vendor/chunk-1UuLTU0U.js +34 -0
- package/vendor/chunk-B_NeooyV.js +86 -0
- package/vendor/chunk-C12hSZn7.js +88 -0
- package/vendor/chunk-C3YkUGz5.js +19 -0
- package/vendor/chunk-C3fcZDjl.js +41964 -0
- package/vendor/chunk-C9FSKeSx.js +14603 -0
- package/vendor/chunk-CPArXGxa.js +14623 -0
- package/vendor/cjs-module-lexer.js +6 -0
- package/vendor/dotenv.js +412 -0
- package/vendor/express.js +40577 -0
- package/vendor/import-meta-resolve.js +2201 -0
- package/vendor/manifest.json +29 -0
- package/vendor/postcss.js +8546 -0
- package/vendor/serialize-javascript.js +293 -0
- package/vendor/sxy-lib-arrays.js +113 -0
- package/vendor/sxy-lib-object-copy.js +1781 -0
- package/vendor/sxy-lib-objects.js +156 -0
- package/vendor/sxy-lib-promises.js +47 -0
- package/vendor/sxy-package-investigator.js +202 -0
- package/vendor/valibot.js +7664 -0
- package/dist/Servers/hono/DevServerHono.d.ts +0 -2
- package/dist/Servers/hono/DevServerHono.d.ts.map +0 -1
- package/dist/Servers/hono/DevServerHono.js +0 -423
- package/dist/Servers/hono/ProdServerHono.d.ts +0 -2
- package/dist/Servers/hono/ProdServerHono.d.ts.map +0 -1
- package/dist/Servers/hono/ProdServerHono.js +0 -220
- package/dist/Servers/hono/TungstenServerHono.d.ts +0 -6
- package/dist/Servers/hono/TungstenServerHono.d.ts.map +0 -1
- package/dist/Servers/hono/TungstenServerHono.js +0 -36
- package/dist/api/ApiEndpointHono.d.ts +0 -3
- package/dist/api/ApiEndpointHono.d.ts.map +0 -1
- package/dist/api/ApiEndpointHono.js +0 -1
- package/dist/api/ApiRouteHono.d.ts +0 -7
- package/dist/api/ApiRouteHono.d.ts.map +0 -1
- package/dist/api/ApiRouteHono.js +0 -1
- package/dist/api/ApiRoutesHono.d.ts +0 -5
- package/dist/api/ApiRoutesHono.d.ts.map +0 -1
- package/dist/api/ApiRoutesHono.js +0 -1
- package/dist/api/getApiRoutesHono.d.ts +0 -6
- package/dist/api/getApiRoutesHono.d.ts.map +0 -1
- package/dist/api/getApiRoutesHono.js +0 -14
- package/dist/build/compilePackages.d.ts +0 -2
- package/dist/build/compilePackages.d.ts.map +0 -1
- package/dist/build/compilePackages.js +0 -89
- package/dist/build/findRequiredUserModule.d.ts +0 -2
- package/dist/build/findRequiredUserModule.d.ts.map +0 -1
- package/dist/build/findRequiredUserModule.js +0 -36
- package/dist/build/processPackage.d.ts +0 -4
- package/dist/build/processPackage.d.ts.map +0 -1
- package/dist/build/processPackage.js +0 -91
- package/dist/build/tallyBabelPlugins.d.ts +0 -3
- package/dist/build/tallyBabelPlugins.d.ts.map +0 -1
- package/dist/build/tallyBabelPlugins.js +0 -63
- package/dist/testing/loadEnvSetup.d.ts +0 -2
- package/dist/testing/loadEnvSetup.d.ts.map +0 -1
- package/dist/testing/loadEnvSetup.js +0 -7
- package/sxy-loader.config.js +0 -7
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
// to relative imports e.g. '../../axios', pointing to local (and transpiled?)
|
|
13
13
|
// copies of that package
|
|
14
14
|
import { dirname, relative } from 'path';
|
|
15
|
-
import slash from 'slash';
|
|
15
|
+
import slash from '../slash.js';
|
|
16
16
|
import { createRequire } from 'module';
|
|
17
17
|
export function MakeBabelTransformDependencyImports(opts) {
|
|
18
18
|
return function BabelTransformDependencyImports(babel) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BabelTransformDeproxyState.d.ts","sourceRoot":"","sources":["../../src/babelPlugins/BabelTransformDeproxyState.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AACnD,OAAO,KAAK,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"BabelTransformDeproxyState.d.ts","sourceRoot":"","sources":["../../src/babelPlugins/BabelTransformDeproxyState.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AACnD,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtD,OAAO,KAAK,EAAE,oBAAoB,EAAE,cAAc,EAAc,sBAAsB,EAAoB,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAanJ,wBAAgB,8BAA8B,KACC,OAAO,SAAS;;;mCAiDpB,QAAQ,CAAC,oBAAoB,CAAC;6BASpC,QAAQ,CAAC,cAAc,CAAC;kCAgBnB,QAAQ,CAAC,mBAAmB,CAAC;qCAW1B,QAAQ,CAAC,sBAAsB,CAAC;;gBAWrD,SAAS;EAgBhC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BabelTransformPackageImports.d.ts","sourceRoot":"","sources":["../../src/babelPlugins/BabelTransformPackageImports.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAMrD,OAAO,EAGH,QAAQ,EACX,MAAM,aAAa,CAAA;AACpB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"BabelTransformPackageImports.d.ts","sourceRoot":"","sources":["../../src/babelPlugins/BabelTransformPackageImports.ts"],"names":[],"mappings":"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"}
|
|
@@ -9,13 +9,12 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
9
9
|
// The end of the page ('index.js') is determining through import
|
|
10
10
|
// resolution
|
|
11
11
|
import { join, dirname, relative } from 'path';
|
|
12
|
-
import slash from 'slash';
|
|
13
|
-
import precinct from 'precinct';
|
|
12
|
+
import slash from '../slash.js';
|
|
14
13
|
import { existsSync, mkdirSync, promises as fsPromises, readFileSync, writeFileSync } from 'fs';
|
|
15
14
|
import { createRequire } from 'module';
|
|
16
15
|
import { transformFileSync as babelTransformFileSync, transformSync as babelTransformSync } from '@babel/core';
|
|
17
16
|
import babelPluginSyntaxImportAssertionsModule from '@babel/plugin-syntax-import-assertions';
|
|
18
|
-
import {
|
|
17
|
+
import { mapToObject } from 'sxy-lib/arrays.js';
|
|
19
18
|
const babelPluginSyntaxImportAssertions = babelPluginSyntaxImportAssertionsModule.default;
|
|
20
19
|
import { init as lexerInit, parse as lexerParse } from 'cjs-module-lexer';
|
|
21
20
|
lexerInit();
|
|
@@ -34,6 +33,12 @@ import { throwError } from '../throwError.js';
|
|
|
34
33
|
import { isProfiling, tallied } from '../timeProfiler.js';
|
|
35
34
|
//import { copyPackageModulesToPackagesFolder } from '../build/copyPackageModulesToPackagesFolder.js'
|
|
36
35
|
const require = createRequire(import.meta.url);
|
|
36
|
+
// precinct drags in typescript and the typescript-eslint parser (~250 modules), so it is only
|
|
37
|
+
// paid for on a packages-cache miss
|
|
38
|
+
let precinctLoaded;
|
|
39
|
+
function precinct() {
|
|
40
|
+
return precinctLoaded ??= require('precinct'); // eslint-disable-line @typescript-eslint/no-unsafe-type-assertion -- require() is untyped
|
|
41
|
+
}
|
|
37
42
|
function debug(...texts) {
|
|
38
43
|
//console.log(...texts)
|
|
39
44
|
}
|
|
@@ -219,7 +224,7 @@ export function MakeBabelTransformPackageImports(opts) {
|
|
|
219
224
|
const {
|
|
220
225
|
file
|
|
221
226
|
} = fileInfo;
|
|
222
|
-
const precinctResults = tallied('precinct.paperwork', () => precinct.paperwork(file, {
|
|
227
|
+
const precinctResults = tallied('precinct.paperwork', () => precinct().paperwork(file, {
|
|
223
228
|
includeCore: false
|
|
224
229
|
}));
|
|
225
230
|
const deps = precinctResults.map(d => {
|
|
@@ -723,7 +728,7 @@ export function MakeBabelTransformPackageImports(opts) {
|
|
|
723
728
|
reexports
|
|
724
729
|
} = lexerParse(code);
|
|
725
730
|
//console.log('lexInner exports', exports)
|
|
726
|
-
const exportsMap =
|
|
731
|
+
const exportsMap = mapToObject(exports, value => [value, true]);
|
|
727
732
|
//console.log('lexInner exports map', exportsMap)
|
|
728
733
|
for (const re of reexports) {
|
|
729
734
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BabelTransformRemoveBlocks.d.ts","sourceRoot":"","sources":["../../src/babelPlugins/BabelTransformRemoveBlocks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"BabelTransformRemoveBlocks.d.ts","sourceRoot":"","sources":["../../src/babelPlugins/BabelTransformRemoveBlocks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAC3C,OAAO,EAAc,qBAAqB,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAE7E,KAAK,IAAI,GAAG;IACR,KAAK,EAAE,MAAM,EAAE,CAAA;CAClB,CAAA;AAED,wBAAgB,8BAA8B,CAAC,IAAI,EAAE,IAAI;;0BAmBvB,QAAQ,CAAC,WAAW,CAAC;oCAWX,QAAQ,CAAC,qBAAqB,CAAC;;EAS1E"}
|
package/dist/babelPlugins/transformPackageImports/BabelTransformDependencyImportsCjs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BabelTransformDependencyImportsCjs.d.ts","sourceRoot":"","sources":["../../../src/babelPlugins/transformPackageImports/BabelTransformDependencyImportsCjs.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,KAAK,SAAS,MAAM,aAAa,CAAA;AAC7C,OAAO,EAAE,SAAS,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"BabelTransformDependencyImportsCjs.d.ts","sourceRoot":"","sources":["../../../src/babelPlugins/transformPackageImports/BabelTransformDependencyImportsCjs.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,KAAK,SAAS,MAAM,aAAa,CAAA;AAC7C,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACjD,KAAK,KAAK,GAAG,OAAO,SAAS,CAAC;AAK9B,OAAO,EACH,oBAAoB,EAAE,sBAAsB,EAC5C,KAAK,cAAc,EAAmB,KAAK,iBAAiB,EAC/D,MAAM,cAAc,CAAA;AAIrB,OAAO,KAAK,EACR,oBAAoB,EAAE,qBAAqB,EAAE,oCAAoC,EACjF,uCAAuC,EAAE,oBAAoB,EAChE,MAAM,oCAAoC,CAAA;AAU3C,KAAK,IAAI,GAAG;IACR,UAAU,EAAE,MAAM,EAAE,CAAA;CACvB,CAAA;AAED,KAAK,KAAK,GAAG;IACT,oBAAoB,EAAE,oBAAoB,CAAA;IAC1C,qBAAqB,EAAE,qBAAqB,CAAA;IAC5C,oCAAoC,EAAE,oCAAoC,CAAA;IAC1E,uCAAuC,EAAE,uCAAuC,CAAA;IAChF,oBAAoB,EAAE,oBAAoB,CAAA;CAC7C,CAAA;AAED,wBAAgB,sCAAsC,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,IACxB,OAAO,KAAK;eAoC5C,SAAS;;kCAcmB,QAAQ,CAAC,iBAAiB,CAAC;uCAKtB,QAAQ,CAAC,sBAAsB,CAAC;qCAOlC,QAAQ,CAAC,oBAAoB,CAAC;6BAO/C,QAAQ,CAAC,cAAc,CAAC;;EAiE5D"}
|
|
@@ -7,8 +7,9 @@
|
|
|
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 slash from '../../slash.js';
|
|
12
13
|
import { isBareImport } from '../isBareImport.js';
|
|
13
14
|
import { cliWarn } from '../../cliOutput.js';
|
|
14
15
|
import { warn } from '../../output.js';
|
package/dist/babelPlugins/transformPackageImports/BabelTransformDependencyImportsEsm.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BabelTransformDependencyImportsEsm.d.ts","sourceRoot":"","sources":["../../../src/babelPlugins/transformPackageImports/BabelTransformDependencyImportsEsm.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,KAAK,SAAS,MAAM,aAAa,CAAA;AAC7C,OAAO,EAAE,SAAS,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"BabelTransformDependencyImportsEsm.d.ts","sourceRoot":"","sources":["../../../src/babelPlugins/transformPackageImports/BabelTransformDependencyImportsEsm.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,KAAK,SAAS,MAAM,aAAa,CAAA;AAC7C,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACjD,KAAK,KAAK,GAAG,OAAO,SAAS,CAAC;AAM9B,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAI9G,OAAO,KAAK,EACR,oBAAoB,EAAE,qBAAqB,EAAE,oCAAoC,EACjF,oBAAoB,EAAE,gBAAgB,EACzC,MAAM,oCAAoC,CAAA;AAM3C,KAAK,IAAI,GAAG;IACR,UAAU,EAAE,MAAM,EAAE,CAAA;CACvB,CAAA;AAED,KAAK,KAAK,GAAG;IACT,oBAAoB,EAAE,oBAAoB,CAAA;IAC1C,qBAAqB,EAAE,qBAAqB,CAAA;IAC5C,oCAAoC,EAAE,oCAAoC,CAAA;IAC1E,oBAAoB,EAAE,oBAAoB,CAAA;IAC1C,gBAAgB,EAAE,gBAAgB,CAAA;CACrC,CAAA;AAED,wBAAgB,sCAAsC,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,IACxB,OAAO,KAAK;eA0B5C,SAAS;;gCAWQ,QAAQ,CAAC,iBAAiB,CAAC;uCAYX,QAAQ,CAAC,sBAAsB,CAAC;qCAalC,QAAQ,CAAC,oBAAoB,CAAC;6BAa/C,QAAQ,CAAC,cAAc,CAAC;;EAiC5D"}
|
|
@@ -7,8 +7,9 @@
|
|
|
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 slash from '../../slash.js';
|
|
12
13
|
import { isBareImport } from '../isBareImport.js';
|
|
13
14
|
import { throwError } from 'tungsten/throwError.js';
|
|
14
15
|
import { cliError, cliOut } from 'tungsten/cliOutput.js';
|
package/dist/bin/args.js
CHANGED
|
@@ -59,7 +59,7 @@ export function cliArgs(specs, options = {}) {
|
|
|
59
59
|
parsed[name] = flag.startsWith('--no-') ? !on : on;
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
return parsed; // eslint-disable-line
|
|
62
|
+
return parsed; // eslint-disable-line @typescript-eslint/no-unsafe-type-assertion -- built from specs' own keys
|
|
63
63
|
}
|
|
64
64
|
// '--ignore-dirs <dir>...' -> its flag, that it takes a value, and that it may be given more than once
|
|
65
65
|
function shapeOf(spec) {
|
|
@@ -34,7 +34,7 @@ await sxyFramework.build('prod');
|
|
|
34
34
|
// }
|
|
35
35
|
// //// end dev
|
|
36
36
|
if (sxyFramework.config.staticSite) {
|
|
37
|
-
// eslint-disable-line @typescript-eslint/no-non-null-assertion,
|
|
37
|
+
// eslint-disable-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-unsafe-type-assertion -- config better be set
|
|
38
38
|
if (!quiet) cliOut(`Building static site`);
|
|
39
39
|
await sxyFramework.clean('staticSite');
|
|
40
40
|
await sxyFramework.staticGen();
|
package/dist/bin/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/bin/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/bin/index.ts"],"names":[],"mappings":"AAoHA,OAAO,EAAE,CAAA"}
|
package/dist/bin/index.js
CHANGED
|
@@ -10,13 +10,21 @@ const profile = args.includes('--profile');
|
|
|
10
10
|
// while it populates, so a single run straight after a rebuild looks like a regression.
|
|
11
11
|
// NODE_DISABLE_COMPILE_CACHE=1 turns it off (NODE_COMPILE_CACHE does not - it names the cache
|
|
12
12
|
// directory, so a value of 0 makes a folder called 0).
|
|
13
|
-
|
|
13
|
+
// OFF for a trial (2026-09-07): Robert is checking whether occasional slow starts persist without
|
|
14
|
+
// it. Measured worth ~200ms warm. Set TUNGSTEN_COMPILE_CACHE=1 to turn it back on meanwhile.
|
|
15
|
+
const compileCacheWanted = process.env.TUNGSTEN_COMPILE_CACHE === '1';
|
|
16
|
+
const compileCache = compileCacheWanted ? enableCompileCache() : undefined;
|
|
14
17
|
// reported under --profile because "is it even on?" is otherwise only answerable by inspecting
|
|
15
18
|
// the cache directory's timestamps - status 1 is enabled, 2 already enabled, 3 disabled
|
|
16
19
|
if (profile) {
|
|
17
|
-
cliOut(`compile cache: status ${compileCache.status}
|
|
20
|
+
cliOut(compileCache === undefined ? `compile cache: off (trial - TUNGSTEN_COMPILE_CACHE=1 enables)` : `compile cache: status ${compileCache.status} ${compileCache.directory ?? compileCache.message ?? ''}`);
|
|
18
21
|
}
|
|
19
22
|
// hooks have to be registered before the command module - and so its import tree - is loaded
|
|
23
|
+
const {
|
|
24
|
+
registerVendorHook
|
|
25
|
+
} = await import('./vendorHook.js');
|
|
26
|
+
const vendorStatus = registerVendorHook();
|
|
27
|
+
if (profile) cliOut(`vendor bundle: ${vendorStatus}`);
|
|
20
28
|
const profileModulesArg = args.find(arg => arg === '--profile-modules' || arg.startsWith('--profile-modules='));
|
|
21
29
|
if (profileModulesArg !== undefined) {
|
|
22
30
|
const {
|
|
@@ -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.)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vendorHook.d.ts","sourceRoot":"","sources":["../../src/bin/vendorHook.ts"],"names":[],"mappings":"AAYA,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAA;AAE1D,wBAAgB,kBAAkB,IAAI,gBAAgB,CA2BrD"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { registerHooks } from 'node:module';
|
|
2
|
+
import { existsSync, readFileSync, statSync } from 'node:fs';
|
|
3
|
+
import { dirname, join } from 'node:path';
|
|
4
|
+
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
5
|
+
import { cliWarn } from '../cliOutput.js';
|
|
6
|
+
export function registerVendorHook() {
|
|
7
|
+
const packageDir = dirname(dirname(dirname(fileURLToPath(import.meta.url))));
|
|
8
|
+
const vendorDir = join(packageDir, 'vendor');
|
|
9
|
+
const manifestPath = join(vendorDir, 'manifest.json');
|
|
10
|
+
if (!existsSync(manifestPath)) return 'none';
|
|
11
|
+
const manifest = JSON.parse(readFileSync(manifestPath, 'utf8')); // eslint-disable-line @typescript-eslint/no-unsafe-type-assertion -- our own file
|
|
12
|
+
const lockfile = join(packageDir, 'pnpm-lock.yaml');
|
|
13
|
+
// a linked checkout whose dependencies moved on: fall back rather than run a stale bundle
|
|
14
|
+
if (manifest.lockfile !== undefined && existsSync(lockfile)) {
|
|
15
|
+
const stat = statSync(lockfile);
|
|
16
|
+
if (stat.size !== manifest.lockfile.size || stat.mtimeMs !== manifest.lockfile.mtimeMs) {
|
|
17
|
+
cliWarn('vendor bundle is older than pnpm-lock.yaml - loading dependencies from node_modules (pnpm build-vendor)');
|
|
18
|
+
return 'stale';
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
const entries = new Map(Object.entries(manifest.specifiers).map(([specifier, name]) => [specifier, pathToFileURL(join(vendorDir, `${name}.js`)).href]));
|
|
22
|
+
registerHooks({
|
|
23
|
+
resolve(specifier, context, next) {
|
|
24
|
+
const url = entries.get(specifier);
|
|
25
|
+
// require() callers want module.exports, which the ESM wrappers do not hand back the same way
|
|
26
|
+
if (url === undefined || context.conditions.includes('require')) return next(specifier, context);
|
|
27
|
+
return {
|
|
28
|
+
url,
|
|
29
|
+
shortCircuit: true
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
return 'active';
|
|
34
|
+
}
|
package/dist/browserStorage.js
CHANGED
|
@@ -38,7 +38,7 @@ export class TungstenLocalStorage {
|
|
|
38
38
|
_defineProperty(this, "clear", () => {
|
|
39
39
|
localStorage.clear();
|
|
40
40
|
for (const key in _classPrivateFieldGet(_subscribers, this)) {
|
|
41
|
-
_classPrivateFieldGet(_push, this).call(this, key, undefined); // eslint-disable-line
|
|
41
|
+
_classPrivateFieldGet(_push, this).call(this, key, undefined); // eslint-disable-line @typescript-eslint/no-unsafe-type-assertion -- TS is being a wanker about keys of object
|
|
42
42
|
}
|
|
43
43
|
});
|
|
44
44
|
_defineProperty(this, "key", index => localStorage.key(index));
|
|
@@ -60,6 +60,7 @@ export class TungstenLocalStorage {
|
|
|
60
60
|
if (subs) {
|
|
61
61
|
for (const element of subs) {
|
|
62
62
|
if ('shouldStoreComponentUpdate' in element && element.shouldStoreComponentUpdate !== undefined) {
|
|
63
|
+
// eslint-disable-line @typescript-eslint/no-unnecessary-condition -- the field can be declared yet unset
|
|
63
64
|
if (!element.shouldStoreComponentUpdate(key, value)) {
|
|
64
65
|
continue;
|
|
65
66
|
}
|
|
@@ -95,7 +96,7 @@ export class TungstenSessionStorage {
|
|
|
95
96
|
_defineProperty(this, "clear", () => {
|
|
96
97
|
sessionStorage.clear();
|
|
97
98
|
for (const key in _classPrivateFieldGet(_subscribers2, this)) {
|
|
98
|
-
_classPrivateFieldGet(_push2, this).call(this, key, undefined); // eslint-disable-line
|
|
99
|
+
_classPrivateFieldGet(_push2, this).call(this, key, undefined); // eslint-disable-line @typescript-eslint/no-unsafe-type-assertion -- TS is being a wanker about keys of object
|
|
99
100
|
}
|
|
100
101
|
});
|
|
101
102
|
_defineProperty(this, "key", index => sessionStorage.key(index));
|
|
@@ -117,6 +118,7 @@ export class TungstenSessionStorage {
|
|
|
117
118
|
if (subs) {
|
|
118
119
|
for (const element of subs) {
|
|
119
120
|
if ('shouldStoreComponentUpdate' in element && element.shouldStoreComponentUpdate !== undefined) {
|
|
121
|
+
// eslint-disable-line @typescript-eslint/no-unnecessary-condition -- the field can be declared yet unset
|
|
120
122
|
if (!element.shouldStoreComponentUpdate(key, value)) {
|
|
121
123
|
continue;
|
|
122
124
|
}
|
|
@@ -1 +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,UAAU,EAAoB,MAAM,aAAa,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"}
|
|
@@ -1,22 +1,26 @@
|
|
|
1
1
|
import { MakeBabelTransformJsxExtensionsToJs } from "../babelPlugins/BabelTransformJsxExtensionsToJs.js";
|
|
2
2
|
import { buildFolder } from "../settings.js";
|
|
3
|
+
import { createRequire } from "module";
|
|
3
4
|
import babelPresetReactModule from "@babel/preset-react";
|
|
4
|
-
import babelPresetTypescriptModule from "@babel/preset-typescript";
|
|
5
5
|
const babelPresetReact = babelPresetReactModule.default;
|
|
6
|
-
const
|
|
6
|
+
const require = createRequire(import.meta.url);
|
|
7
7
|
// config `typescript: true`: appended after preset-react so babel runs it first (presets run last
|
|
8
8
|
// to first). allowDeclareFields matches tsc's useDefineForClassFields: `x: T` stays a field,
|
|
9
9
|
// `declare x: T` is erased - without it babel erases both.
|
|
10
|
+
// required on demand: ~95 modules that only this flag needs
|
|
10
11
|
export function typescriptPreset() {
|
|
12
|
+
const babelPresetTypescript = require("@babel/preset-typescript").default;
|
|
11
13
|
return [babelPresetTypescript, {
|
|
12
14
|
allowDeclareFields: true
|
|
13
15
|
}];
|
|
14
16
|
}
|
|
15
|
-
import babelPluginCssToJs from "babel-plugin-css-to-js";
|
|
16
17
|
const regexEscape = r => r.replaceAll(".", "\\.");
|
|
17
18
|
const ignoreRegex = new RegExp(`(node_modules|${regexEscape(buildFolder)})`);
|
|
18
19
|
const userCommonConfig = {
|
|
19
20
|
ignore: [ignoreRegex],
|
|
21
|
+
// the config is all here: no per-file search up the tree for .babelrc / babel.config.*
|
|
22
|
+
babelrc: false,
|
|
23
|
+
configFile: false,
|
|
20
24
|
presets: [[babelPresetReact, {
|
|
21
25
|
"runtime": "automatic",
|
|
22
26
|
"importSource": "tungsten"
|
|
@@ -29,6 +33,8 @@ const userCommonConfig = {
|
|
|
29
33
|
// widen to allow pushing
|
|
30
34
|
// no alias plugin: preset-react's `tungsten/jsx-runtime` import resolves through the package's
|
|
31
35
|
// exports map (node, rollup, the packages plugin) and the dev import map has the same key
|
|
32
|
-
plugins: [MakeBabelTransformJsxExtensionsToJs()
|
|
36
|
+
plugins: [MakeBabelTransformJsxExtensionsToJs()
|
|
37
|
+
// no css-to-js: the lowercase css`…` tag it compiled is not used; css="…" is a plain string prop
|
|
38
|
+
] // widen to allow pushing
|
|
33
39
|
};
|
|
34
40
|
export default userCommonConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compileJavascript.d.ts","sourceRoot":"","sources":["../../src/build/compileJavascript.ts"],"names":[],"mappings":"AAGA,OAAO,QAAQ,MAAM,UAAU,CAAA;AAO/B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAA;AACpE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AACvD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAmBtC,KAAK,uBAAuB,GAAG;IAC3B,OAAO,EAAE,QAAQ,CAAC,SAAS,GAAG,IAAI,CAAA;IAClC,WAAW,EAAE,QAAQ,CAAC,SAAS,GAAG,IAAI,CAAA;IACtC,aAAa,EAAE,aAAa,CAAA;IAC5B,cAAc,EAAE,OAAO,CAAA;CAC1B,CAAA;AAED,MAAM,MAAM,0BAA0B,GAAG;IACrC,OAAO,EAAE,OAAO,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb,MAAM,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG;IACnC,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAE5B,gBAAgB,CAAC,EAAE,MAAM,CAAA;IAEzB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,eAAe,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,0BAA0B,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,SAAS,CAAA;IAE3F,KAAK,CAAC,EAAE,OAAO,CAAA;IAEf,KAAK,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAuBD,wBAAsB,iBAAiB,CACnC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,uBAAuB,EACtD,YAAY,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,EACrE,aAAa,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,UAAO,EAC1E,OAAO,GAAE,wBAA6B,GACvC,OAAO,CAAC,uBAAuB,CAAC,
|
|
1
|
+
{"version":3,"file":"compileJavascript.d.ts","sourceRoot":"","sources":["../../src/build/compileJavascript.ts"],"names":[],"mappings":"AAGA,OAAO,QAAQ,MAAM,UAAU,CAAA;AAO/B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAA;AACpE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AACvD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAmBtC,KAAK,uBAAuB,GAAG;IAC3B,OAAO,EAAE,QAAQ,CAAC,SAAS,GAAG,IAAI,CAAA;IAClC,WAAW,EAAE,QAAQ,CAAC,SAAS,GAAG,IAAI,CAAA;IACtC,aAAa,EAAE,aAAa,CAAA;IAC5B,cAAc,EAAE,OAAO,CAAA;CAC1B,CAAA;AAED,MAAM,MAAM,0BAA0B,GAAG;IACrC,OAAO,EAAE,OAAO,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb,MAAM,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG;IACnC,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAE5B,gBAAgB,CAAC,EAAE,MAAM,CAAA;IAEzB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,eAAe,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,0BAA0B,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,SAAS,CAAA;IAE3F,KAAK,CAAC,EAAE,OAAO,CAAA;IAEf,KAAK,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAuBD,wBAAsB,iBAAiB,CACnC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,uBAAuB,EACtD,YAAY,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,EACrE,aAAa,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,UAAO,EAC1E,OAAO,GAAE,wBAA6B,GACvC,OAAO,CAAC,uBAAuB,CAAC,CA4gBlC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { join, dirname } from 'path';
|
|
1
|
+
import { join, dirname, isAbsolute } from 'path';
|
|
2
2
|
import { pathToFileURL } from 'url';
|
|
3
3
|
import chokidar from 'chokidar';
|
|
4
|
-
import {
|
|
4
|
+
import { transformSync as babelTransformSync } from '@babel/core';
|
|
5
5
|
import fs, { promises as fsPromises } from 'fs';
|
|
6
|
-
import slash from 'slash';
|
|
6
|
+
import slash from '../slash.js';
|
|
7
7
|
import serializeJavascript from 'serialize-javascript';
|
|
8
|
-
import {
|
|
8
|
+
import { glob } from '../glob.js';
|
|
9
9
|
import { devRawBuildFolder, packagesCacheFolder, prodRawBuildFolder, stylesCacheFolder } from '../settings.js';
|
|
10
10
|
import { frameworkVersion } from './frameworkDestLocation.js';
|
|
11
11
|
import { makeBabelUserDevConfig } from './makeBabelUserDevConfig.js';
|
|
@@ -13,7 +13,7 @@ import { makeBabelUserProdConfig } from './makeBabelUserProdConfig.js';
|
|
|
13
13
|
import { makeBabelRawConfig } from './makeBabelRawConfig.js';
|
|
14
14
|
import { cliOut, cliLog, cliError, cliWarn } from '../cliOutput.js'; // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
15
15
|
import { createTimeProfiler, isProfiling, tallied } from '../timeProfiler.js';
|
|
16
|
-
import {
|
|
16
|
+
import { tallyBabel } from './tallyBabel.js';
|
|
17
17
|
import { TungstenError } from '../TungstenError.js';
|
|
18
18
|
import { getFrameworkDir } from '../getFrameworkDir.js';
|
|
19
19
|
// The graph writeDependencyGraph() left behind on the previous run, naming a compiled copy of every
|
|
@@ -52,9 +52,8 @@ export async function compileJavascript(projectDir, appConfig, codeLocation, sou
|
|
|
52
52
|
const skipPackageCompilationFiles = new Set();
|
|
53
53
|
async function refreshSkipPackageCompilationFiles() {
|
|
54
54
|
skipPackageCompilationFiles.clear();
|
|
55
|
-
const matchingFiles = await
|
|
56
|
-
cwd: codeLocation
|
|
57
|
-
absolute: true
|
|
55
|
+
const matchingFiles = await glob(skipPackageCompilationPatterns, {
|
|
56
|
+
cwd: codeLocation
|
|
58
57
|
});
|
|
59
58
|
for (const file of matchingFiles) skipPackageCompilationFiles.add(slash(file));
|
|
60
59
|
}
|
|
@@ -76,8 +75,8 @@ export async function compileJavascript(projectDir, appConfig, codeLocation, sou
|
|
|
76
75
|
// per-plugin attribution of the transform's time, only when someone is looking: the wrappers
|
|
77
76
|
// run per AST node
|
|
78
77
|
if (isProfiling()) {
|
|
79
|
-
|
|
80
|
-
|
|
78
|
+
tallyBabel(config);
|
|
79
|
+
tallyBabel(rawConfig);
|
|
81
80
|
if (mode === 'dev' && compilePackages) {
|
|
82
81
|
cliWarn(`profiling serves linked packages from the packages cache -` + ` pass --fresh after rebuilding one, or this run compiles stale code`);
|
|
83
82
|
}
|
|
@@ -114,12 +113,15 @@ export async function compileJavascript(projectDir, appConfig, codeLocation, sou
|
|
|
114
113
|
failedFiles.delete(file);
|
|
115
114
|
return;
|
|
116
115
|
}
|
|
116
|
+
// each transform runs synchronously up to its write, so both are in flight together
|
|
117
|
+
const writes = [];
|
|
117
118
|
if (client) {
|
|
118
|
-
transformTo(file, config, join(buildCodeLocation, outputRel(file)), 'babel transform', true);
|
|
119
|
+
writes.push(transformTo(file, sourceContent, config, join(buildCodeLocation, outputRel(file)), 'babel transform', true));
|
|
119
120
|
}
|
|
120
121
|
if (raw) {
|
|
121
|
-
transformTo(file, rawConfig, join(rawBuildLocation, outputRel(file)), 'babel transform (raw)', false);
|
|
122
|
+
writes.push(transformTo(file, sourceContent, rawConfig, join(rawBuildLocation, outputRel(file)), 'babel transform (raw)', false));
|
|
122
123
|
}
|
|
124
|
+
await Promise.all(writes);
|
|
123
125
|
failedFiles.delete(file);
|
|
124
126
|
} catch (e) {
|
|
125
127
|
failedFiles.add(file);
|
|
@@ -128,12 +130,17 @@ export async function compileJavascript(projectDir, appConfig, codeLocation, sou
|
|
|
128
130
|
throw e;
|
|
129
131
|
}
|
|
130
132
|
}
|
|
131
|
-
// One pipeline's transform and write.
|
|
132
|
-
// during it. Babel's work is cpu-bound on one thread either way, so the async
|
|
133
|
-
// concurrent calls bought no parallelism, only scheduling. The plugins defer their
|
|
134
|
-
// into opts.promises rather than awaiting in a visitor, which is what makes sync
|
|
135
|
-
|
|
136
|
-
|
|
133
|
+
// One pipeline's transform and write. The transform is sync, so it can be tallied exactly -
|
|
134
|
+
// nothing else runs during it. Babel's work is cpu-bound on one thread either way, so the async
|
|
135
|
+
// API's 291 concurrent calls bought no parallelism, only scheduling. The plugins defer their
|
|
136
|
+
// async work into opts.promises rather than awaiting in a visitor, which is what makes sync
|
|
137
|
+
// viable. Async so the client and raw writes of one file could overlap; see the write below.
|
|
138
|
+
async function transformTo(file, sourceContent, babelConfig, dest, tallyName, guardExportWipe) {
|
|
139
|
+
// the content already read above: transformFileSync would read the file a second time
|
|
140
|
+
const result = tallied(tallyName, () => babelTransformSync(sourceContent, {
|
|
141
|
+
...babelConfig,
|
|
142
|
+
filename: file
|
|
143
|
+
}));
|
|
137
144
|
if (result === null) throw new TungstenError(`Err: babel transform on file ${file} returned null`);
|
|
138
145
|
const {
|
|
139
146
|
code
|
|
@@ -180,10 +187,13 @@ export async function compileJavascript(projectDir, appConfig, codeLocation, sou
|
|
|
180
187
|
pendingExportWipes.delete(file);
|
|
181
188
|
}
|
|
182
189
|
}
|
|
190
|
+
// Sync on purpose (measured 2026-09, qtc-2, 202 files, phase time minus babel's): sync
|
|
191
|
+
// ~400ms, fsPromises mkdir + writeFile ~520ms, memoising the mkdir no better. Babel saturates
|
|
192
|
+
// the main thread so completions only queue, and the promise api's open/write/close costs
|
|
193
|
+
// more there than a 1.5ms blocking write. Long ago the promise version also misbehaved.
|
|
183
194
|
fs.mkdirSync(dirname(dest), {
|
|
184
195
|
recursive: true
|
|
185
196
|
});
|
|
186
|
-
//// Using the sync version here, because the promise version keeps bugging out - node bug?
|
|
187
197
|
fs.writeFileSync(dest, code);
|
|
188
198
|
}
|
|
189
199
|
async function deleteTransformedFile(file) {
|
|
@@ -238,13 +248,16 @@ export async function compileJavascript(projectDir, appConfig, codeLocation, sou
|
|
|
238
248
|
const ignoreDirs = typeof appConfig.ignoreDirs === 'string' ? [appConfig.ignoreDirs] : appConfig.ignoreDirs;
|
|
239
249
|
ignored.push(...ignoreDirs.map(folder => slash(`${codeLocation}/${folder}/**`)));
|
|
240
250
|
}
|
|
251
|
+
// patterns are relative to the code dir, like the dirs above and the selections below; raw they
|
|
252
|
+
// resolved against the cwd, so `client/testing/**` never matched <code>/client/testing/…
|
|
253
|
+
const fromCodeDir = pattern => isAbsolute(pattern) ? slash(pattern) : slash(`${codeLocation}/${pattern}`);
|
|
241
254
|
if (appConfig.ignorePatterns !== undefined && appConfig.ignorePatterns !== '') {
|
|
242
255
|
if (Array.isArray(appConfig.ignorePatterns)) {
|
|
243
256
|
for (const pattern of appConfig.ignorePatterns) {
|
|
244
|
-
ignored.push(pattern);
|
|
257
|
+
ignored.push(fromCodeDir(pattern));
|
|
245
258
|
}
|
|
246
259
|
} else {
|
|
247
|
-
ignored.push(appConfig.ignorePatterns);
|
|
260
|
+
ignored.push(fromCodeDir(appConfig.ignorePatterns));
|
|
248
261
|
}
|
|
249
262
|
}
|
|
250
263
|
// test files are a category, not noise: excluded here like ignoreDirs/ignorePatterns, but a
|
|
@@ -255,7 +268,8 @@ export async function compileJavascript(projectDir, appConfig, codeLocation, sou
|
|
|
255
268
|
ignored.push(...testDirs.map(folder => slash(`${codeLocation}/${folder}/**`)));
|
|
256
269
|
}
|
|
257
270
|
if (appConfig.testPatterns !== undefined && appConfig.testPatterns !== '') {
|
|
258
|
-
|
|
271
|
+
const testPatterns = Array.isArray(appConfig.testPatterns) ? appConfig.testPatterns : [appConfig.testPatterns];
|
|
272
|
+
ignored.push(...testPatterns.map(fromCodeDir));
|
|
259
273
|
}
|
|
260
274
|
}
|
|
261
275
|
if (appConfig.exclude !== undefined) ignored.push(slash(`${codeLocation}/${appConfig.exclude}`));
|
|
@@ -275,9 +289,8 @@ export async function compileJavascript(projectDir, appConfig, codeLocation, sou
|
|
|
275
289
|
let clientFiles = null;
|
|
276
290
|
let rawFiles = new Set();
|
|
277
291
|
async function selectedFiles(selection) {
|
|
278
|
-
const files = await
|
|
279
|
-
cwd: codeLocation
|
|
280
|
-
absolute: true
|
|
292
|
+
const files = await glob(selection, {
|
|
293
|
+
cwd: codeLocation
|
|
281
294
|
});
|
|
282
295
|
return new Set(files.map(file => slash(file)));
|
|
283
296
|
}
|
|
@@ -298,7 +311,7 @@ export async function compileJavascript(projectDir, appConfig, codeLocation, sou
|
|
|
298
311
|
// phases record into the profiler module's shared timeline, so this instance need not be the
|
|
299
312
|
// one the command created - it only has to be enabled when --profile is
|
|
300
313
|
const profiler = createTimeProfiler(isProfiling());
|
|
301
|
-
const paths = await profiler.timeProfileAsync('find source files', () =>
|
|
314
|
+
const paths = await profiler.timeProfileAsync('find source files', () => glob([watchGlob, ...ignored.map(x => `!${x}`)]));
|
|
302
315
|
// the transforms are started inside the phase, not just awaited there: a resource is charged to
|
|
303
316
|
// the phase that created it, so starting them outside credits all the work to the parent
|
|
304
317
|
const transformResults = await profiler.timeProfileAsync(`transform ${paths.length} files`, () => {
|
|
@@ -340,7 +353,7 @@ export async function compileJavascript(projectDir, appConfig, codeLocation, sou
|
|
|
340
353
|
await fsPromises.mkdir(dirname(pending.dest), {
|
|
341
354
|
recursive: true
|
|
342
355
|
});
|
|
343
|
-
|
|
356
|
+
await fsPromises.writeFile(pending.dest, pending.code);
|
|
344
357
|
failedFiles.delete(file);
|
|
345
358
|
const failures = await settleDeferredWork();
|
|
346
359
|
success = failures.length === 0 && failedFiles.size === 0;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import slash from 'slash';
|
|
1
|
+
import slash from '../slash.js';
|
|
2
2
|
import chokidar from 'chokidar';
|
|
3
3
|
import { join, dirname, resolve } from 'path';
|
|
4
4
|
import { pathToFileURL } from 'url';
|
|
5
5
|
import { promises as fsPromises, utimesSync } from 'fs';
|
|
6
6
|
import * as sass from 'sass';
|
|
7
|
-
import {
|
|
7
|
+
import { glob } from '../glob.js';
|
|
8
8
|
import { staticFolder } from '../settings.js';
|
|
9
9
|
import { cliError, cliOut } from '../cliOutput.js'; // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
10
10
|
import { throwError } from '../throwError.js';
|
|
@@ -59,7 +59,7 @@ function findSxssDependencies(data, file, regex, extension) {
|
|
|
59
59
|
// [...xxx] converts it to a plain array
|
|
60
60
|
let results = [...data.matchAll(regex)]
|
|
61
61
|
// the matches group is on position 1, so we map to get just the match group
|
|
62
|
-
.map(x => x[1]); // eslint-disable-line
|
|
62
|
+
.map(x => x[1]); // eslint-disable-line @typescript-eslint/no-unsafe-type-assertion
|
|
63
63
|
if (extension === '.sass') results = results.map(dep => {
|
|
64
64
|
if ((dep.startsWith(`'`) || dep.startsWith(`"`)) && dep.endsWith(dep[0])) {
|
|
65
65
|
return dep.slice(1, -1);
|
|
@@ -216,7 +216,7 @@ export async function compileStyles(projectDir, config, styleImportBase, buildLo
|
|
|
216
216
|
const ignoreGlob = buildLocation + '/**/*';
|
|
217
217
|
debug('Styles watchGlob', watchGlob);
|
|
218
218
|
if (!watch) {
|
|
219
|
-
const files = await
|
|
219
|
+
const files = await glob(slash(watchGlob));
|
|
220
220
|
await Promise.all(files.map(file => processAndCopyFile(sourceLocation, staticLocation, slash(file), styleImportBase, cssFiles, cssDependencies, cssdependers)));
|
|
221
221
|
return null;
|
|
222
222
|
}
|
package/dist/build/copyAssets.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import slash from 'slash';
|
|
1
|
+
import slash from '../slash.js';
|
|
2
2
|
import chokidar from 'chokidar';
|
|
3
3
|
import { join, dirname } from 'path';
|
|
4
4
|
import { promises as fsPromises } from 'fs';
|
|
5
|
-
import {
|
|
5
|
+
import { glob } from '../glob.js';
|
|
6
6
|
import { cliOut } from '../cliOutput.js';
|
|
7
7
|
async function copyFile(assetsLocation, targetLocation, filePathFull, event) {
|
|
8
8
|
const relFile = filePathFull.slice(assetsLocation.length + 1);
|
|
@@ -23,7 +23,7 @@ export async function copyAssets(projectDir, config, buildLocation, watch = true
|
|
|
23
23
|
const watchGlob = assetsLocation + '/**/*';
|
|
24
24
|
//const ignoreGlob = buildLocation + '/**/*'
|
|
25
25
|
if (!watch) {
|
|
26
|
-
const files = await
|
|
26
|
+
const files = await glob(slash(watchGlob));
|
|
27
27
|
await Promise.all(files.map(file => copyFile(assetsLocation, targetLocation, slash(file), 'add')));
|
|
28
28
|
return null;
|
|
29
29
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import slash from 'slash';
|
|
1
|
+
import slash from '../slash.js';
|
|
2
2
|
import chokidar from 'chokidar';
|
|
3
3
|
import { join, dirname } from 'path';
|
|
4
4
|
import { promises as fsPromises } from 'fs';
|
|
5
|
-
import {
|
|
5
|
+
import { glob } from '../glob.js';
|
|
6
6
|
import { cliOut } from '../cliOutput.js';
|
|
7
7
|
async function copyFile(assetsLocation, targetLocation, filePathFull, event) {
|
|
8
8
|
const relFile = filePathFull.slice(assetsLocation.length + 1);
|
|
@@ -24,7 +24,7 @@ export async function copyPublicFiles(projectDir, config, buildLocation, watch =
|
|
|
24
24
|
const watchGlob = publicLocation + '/**/*';
|
|
25
25
|
//const ignoreGlob = buildLocation + '/**/*'
|
|
26
26
|
if (!watch) {
|
|
27
|
-
const files = await
|
|
27
|
+
const files = await glob(slash(watchGlob));
|
|
28
28
|
await Promise.all(files.map(file => copyFile(publicLocation, targetLocation, slash(file), 'add')));
|
|
29
29
|
return null;
|
|
30
30
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { existsSync, promises as fsPromises } from 'fs';
|
|
2
2
|
import { dirname, join } from 'path';
|
|
3
|
-
import slash from 'slash';
|
|
3
|
+
import slash from '../slash.js';
|
|
4
4
|
import { frameworkCssFile, frameworkCssFolder, frameworkDistFolder } from '../settings.js';
|
|
5
5
|
// Component stylesheets named by a `$stylesheet` static on a package component, collected while
|
|
6
6
|
// the package import tree is walked so only components the app actually imports contribute.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getAllSxyClientModules.d.ts","sourceRoot":"","sources":["../../src/build/getAllSxyClientModules.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getAllSxyClientModules.d.ts","sourceRoot":"","sources":["../../src/build/getAllSxyClientModules.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAErC,MAAM,MAAM,qBAAqB,GAAG,MAAM,EAAE,CAAA;AAK5C,wBAAgB,2BAA2B,IAAI,qBAAqB,CAEnE"}
|
|
@@ -1,30 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import { frameworkDistFolder } from '../settings.js';
|
|
1
|
+
// the module list this used to walk with sxy-dependency-tree has been empty for a long time; the
|
|
2
|
+
// walk went with it (typescript + typescript-estree, ~250 modules at dev start). The servers
|
|
3
|
+
// still guard on the field being defined.
|
|
5
4
|
export function getAllTungstenClientModules() {
|
|
6
|
-
|
|
7
|
-
const tungstenModules = [];
|
|
8
|
-
for (const module of []) {
|
|
9
|
-
const fullPath = join(frameworkLocation, frameworkDistFolder, module);
|
|
10
|
-
const nonExistent = [];
|
|
11
|
-
const dependencies = dependencyTree.toList({
|
|
12
|
-
filename: fullPath,
|
|
13
|
-
directory: frameworkLocation,
|
|
14
|
-
nonExistent
|
|
15
|
-
});
|
|
16
|
-
for (const dependency of dependencies) {
|
|
17
|
-
if (!tungstenModules.includes(dependency)) {
|
|
18
|
-
tungstenModules.push(dependency);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
//const distCodeLocation = frameworkLocation+'/'+frameworkDistFolder+'/'
|
|
23
|
-
const tungstenModulesDetailed = tungstenModules.map(module => {
|
|
24
|
-
return {
|
|
25
|
-
abs: module,
|
|
26
|
-
rel: module.slice((frameworkLocation + '/').length) // relative to base
|
|
27
|
-
};
|
|
28
|
-
});
|
|
29
|
-
return tungstenModulesDetailed;
|
|
5
|
+
return [];
|
|
30
6
|
}
|