tungsten 0.2.22 → 0.2.24
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/Framework.js +5 -5
- package/dist/bin/commands/compile.js +8 -8
- package/dist/build/bundle.js +3 -1
- package/dist/build/clientModuleAliases.d.ts +1 -3
- package/dist/build/clientModuleAliases.d.ts.map +1 -1
- package/dist/build/clientModuleAliases.js +4 -3
- package/dist/build/compileStyles.d.ts.map +1 -1
- package/dist/build/compileStyles.js +17 -20
- package/dist/build/createClientFiles.d.ts.map +1 -1
- package/dist/build/createClientFiles.js +5 -4
- package/dist/build/devBundle.rollup.config.d.ts.map +1 -1
- package/dist/build/devBundle.rollup.config.js +1 -2
- package/dist/build/processPackage.d.ts.map +1 -1
- package/dist/build/processPackage.js +3 -3
- package/dist/build/rollup.user.prod.config.d.ts.map +1 -1
- package/dist/build/rollup.user.prod.config.js +1 -2
- package/dist/removeRecursive.d.ts +2 -0
- package/dist/removeRecursive.d.ts.map +1 -0
- package/dist/removeRecursive.js +12 -0
- package/dist/staticGen/staticGen.d.ts.map +1 -1
- package/dist/staticGen/staticGen.js +5 -3
- package/package.json +3 -24
- package/types/modules.d.ts +32 -1
package/dist/Framework.js
CHANGED
|
@@ -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 slash from 'slash'
|
|
5
|
-
import rmfr from 'rmfr';
|
|
6
5
|
import { join } from 'path';
|
|
6
|
+
import { removeRecursive } from "./removeRecursive.js";
|
|
7
7
|
import { filter as objectFilter, remap as objectRemap } from 'sxy-lib/objects.js';
|
|
8
8
|
import { buildCodeSubPath, buildFolder, devBuildOuterFolder, prodBuildFolder, prodBuildCodeFolder, bundleFolder, staticSiteFolder } from "./settings.js";
|
|
9
9
|
import { DevServer } from "./Servers/DevServer.js";
|
|
@@ -65,22 +65,22 @@ export class Framework {
|
|
|
65
65
|
switch (mode) {
|
|
66
66
|
case 'prod':
|
|
67
67
|
{
|
|
68
|
-
await Promise.all([
|
|
68
|
+
await Promise.all([removeRecursive(join(projectDir, prodBuildFolder)), removeRecursive(join(projectDir, bundleFolder))]);
|
|
69
69
|
break;
|
|
70
70
|
}
|
|
71
71
|
case 'staticSite':
|
|
72
72
|
{
|
|
73
|
-
await
|
|
73
|
+
await removeRecursive(join(projectDir, staticSiteFolder));
|
|
74
74
|
break;
|
|
75
75
|
}
|
|
76
76
|
case 'dev':
|
|
77
77
|
{
|
|
78
|
-
await
|
|
78
|
+
await removeRecursive(join(projectDir, devBuildOuterFolder));
|
|
79
79
|
break;
|
|
80
80
|
}
|
|
81
81
|
default:
|
|
82
82
|
{
|
|
83
|
-
await
|
|
83
|
+
await removeRecursive(join(projectDir, buildFolder));
|
|
84
84
|
break;
|
|
85
85
|
}
|
|
86
86
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { dirname, join, resolve } from 'path';
|
|
2
2
|
import { promises as fsPromises } from 'fs';
|
|
3
|
-
import
|
|
3
|
+
import { removeRecursive } from "../../removeRecursive.js";
|
|
4
4
|
import { compileJavascript } from "../../build/compileJavascript.js";
|
|
5
5
|
import { compileStyles } from "../../build/compileStyles.js";
|
|
6
6
|
import { copyAssets } from "../../build/copyAssets.js";
|
|
@@ -101,7 +101,7 @@ if (buildLocation.toLowerCase() === resolve(projectDir).toLowerCase()) {
|
|
|
101
101
|
process.exit(1);
|
|
102
102
|
}
|
|
103
103
|
async function clearReadyFile() {
|
|
104
|
-
if (readyFileLocation !== undefined) await
|
|
104
|
+
if (readyFileLocation !== undefined) await removeRecursive(readyFileLocation);
|
|
105
105
|
}
|
|
106
106
|
async function markReady() {
|
|
107
107
|
if (readyFileLocation === undefined) return;
|
|
@@ -115,23 +115,23 @@ async function markReady() {
|
|
|
115
115
|
targets: [...targets],
|
|
116
116
|
updatedAt: new Date().toISOString()
|
|
117
117
|
}));
|
|
118
|
-
await
|
|
118
|
+
await removeRecursive(readyFileLocation);
|
|
119
119
|
await fsPromises.rename(temporaryLocation, readyFileLocation);
|
|
120
120
|
}
|
|
121
121
|
await clearReadyFile();
|
|
122
122
|
const cleanTasks = [];
|
|
123
123
|
if (clean && targets.has('js')) {
|
|
124
|
-
cleanTasks.push(
|
|
124
|
+
cleanTasks.push(removeRecursive(buildCodeLocation), removeRecursive(join(buildLocation, componentCssFolder)), removeRecursive(join(buildLocation, packagesFolder)), removeRecursive(packagesCacheLocation));
|
|
125
125
|
}
|
|
126
126
|
if (clean && targets.has('css')) {
|
|
127
|
-
cleanTasks.push(
|
|
127
|
+
cleanTasks.push(removeRecursive(join(buildLocation, staticFolder)));
|
|
128
128
|
}
|
|
129
129
|
if (clean && targets.has('client')) {
|
|
130
|
-
cleanTasks.push(
|
|
130
|
+
cleanTasks.push(removeRecursive(join(buildLocation, clientFolder)), removeRecursive(join(buildLocation, '.tungsten.config.js')));
|
|
131
131
|
}
|
|
132
132
|
if (clean) {
|
|
133
|
-
if (targets.has('assets')) cleanTasks.push(
|
|
134
|
-
if (targets.has('public')) cleanTasks.push(
|
|
133
|
+
if (targets.has('assets')) cleanTasks.push(removeRecursive(join(buildLocation, assetsFolder)));
|
|
134
|
+
if (targets.has('public')) cleanTasks.push(removeRecursive(join(buildLocation, publicFolder)));
|
|
135
135
|
cliOut(`Cleaning compile output: ${[...targets].join(', ')}`);
|
|
136
136
|
await Promise.all(cleanTasks);
|
|
137
137
|
}
|
package/dist/build/bundle.js
CHANGED
|
@@ -13,7 +13,9 @@ export async function bundle(projectDir /*, appConfig: FrameworkConfigComplete*/
|
|
|
13
13
|
// let rootComponent = appConfig.rootComponent as string
|
|
14
14
|
// if (rootComponent.endsWith('.jsx')) rootComponent = rootComponent.slice(0, -1)
|
|
15
15
|
// }
|
|
16
|
-
const externalModules = [
|
|
16
|
+
const externalModules = [
|
|
17
|
+
//'node-fetch'
|
|
18
|
+
];
|
|
17
19
|
const command = `cd ${frameworkDir} && npx rollup` + ` --input "${join(projectDir, prodBuildFolder, clientFolder, 'client.js')}"` + ` --file "${join(projectDir, bundleFolder, 'client.js')}"` + ` --config "${join(frameworkDir, frameworkDistFolder, 'build/rollup.user.prod.config.js')}"` + (externalModules.length > 0 ? ` --external ${externalModules.join(',')}` : ``) + ` --inlineDynamicImports --format iife`;
|
|
18
20
|
cliLog('bundle command:', command);
|
|
19
21
|
const subProcess = spawnShellCommand(command, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clientModuleAliases.d.ts","sourceRoot":"","sources":["../../src/build/clientModuleAliases.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"clientModuleAliases.d.ts","sourceRoot":"","sources":["../../src/build/clientModuleAliases.ts"],"names":[],"mappings":""}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
export const clientModulesAliases = {
|
|
2
|
-
|
|
3
|
-
}
|
|
1
|
+
// export const clientModulesAliases = {
|
|
2
|
+
// 'redaxios': 'tungsten/node_modules/redaxios/dist/redaxios.js'
|
|
3
|
+
// }
|
|
4
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compileStyles.d.ts","sourceRoot":"","sources":["../../src/build/compileStyles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"compileStyles.d.ts","sourceRoot":"","sources":["../../src/build/compileStyles.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAA;AAgOpE,wBAAsB,aAAa,CAC/B,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,uBAAuB,EAC/B,eAAe,EAAE,MAAM,EACvB,aAAa,EAAE,MAAM,EACrB,KAAK,UAAO,oBA8Ff"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import slash from 'slash';
|
|
2
2
|
import chokidar from 'chokidar';
|
|
3
3
|
import { join, dirname, resolve } from 'path';
|
|
4
|
+
import { pathToFileURL } from 'url';
|
|
4
5
|
import { promises as fsPromises, utimesSync } from 'fs';
|
|
5
6
|
import * as sass from 'sass';
|
|
6
7
|
import { globby } from 'globby';
|
|
@@ -19,16 +20,13 @@ function arrayToObjectTrue(array) {
|
|
|
19
20
|
}
|
|
20
21
|
function sassToCss(data, file, importBase) {
|
|
21
22
|
try {
|
|
22
|
-
return sass.
|
|
23
|
-
|
|
24
|
-
file,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
}).css.toString();
|
|
23
|
+
return sass.compileString(data, {
|
|
24
|
+
syntax: 'indented',
|
|
25
|
+
url: pathToFileURL(file),
|
|
26
|
+
importers: [{
|
|
27
|
+
findFileUrl: url => pathToFileURL(resolveSassImport(url, file, importBase))
|
|
28
|
+
}]
|
|
29
|
+
}).css;
|
|
32
30
|
} catch (error) {
|
|
33
31
|
if (error instanceof Error) {
|
|
34
32
|
return error;
|
|
@@ -40,15 +38,13 @@ function sassToCss(data, file, importBase) {
|
|
|
40
38
|
}
|
|
41
39
|
function scssToCss(data, file, importBase) {
|
|
42
40
|
try {
|
|
43
|
-
return sass.
|
|
44
|
-
|
|
45
|
-
file,
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
}).css.toString();
|
|
41
|
+
return sass.compileString(data, {
|
|
42
|
+
syntax: 'scss',
|
|
43
|
+
url: pathToFileURL(file),
|
|
44
|
+
importers: [{
|
|
45
|
+
findFileUrl: url => pathToFileURL(resolveScssImport(url, file, importBase))
|
|
46
|
+
}]
|
|
47
|
+
}).css;
|
|
52
48
|
} catch (error) {
|
|
53
49
|
if (error instanceof Error) {
|
|
54
50
|
return error;
|
|
@@ -213,7 +209,8 @@ export async function compileStyles(projectDir, config, styleImportBase, buildLo
|
|
|
213
209
|
// C is needed by B,A
|
|
214
210
|
// D is needed by C,B,A
|
|
215
211
|
const cssFiles = {};
|
|
216
|
-
const sourceLocation = config.sourceDir
|
|
212
|
+
const sourceLocation = config.sourceDir // eslint-disable-line @typescript-eslint/strict-boolean-expressions
|
|
213
|
+
? join(projectDir, config.sourceDir) : join(projectDir, config.codeDir);
|
|
217
214
|
const staticLocation = join(buildLocation, staticFolder);
|
|
218
215
|
const watchGlob = sourceLocation + '/**/*.{css,scss,sass,less}';
|
|
219
216
|
const ignoreGlob = buildLocation + '/**/*';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createClientFiles.d.ts","sourceRoot":"","sources":["../../src/build/createClientFiles.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAOtC,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAA;AAG/D,wBAAsB,iBAAiB,CACnC,MAAM,EAAE,uBAAuB,EAC/B,IAAI,EAAE,IAAI,EACV,aAAa,CAAC,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"createClientFiles.d.ts","sourceRoot":"","sources":["../../src/build/createClientFiles.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAOtC,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAA;AAG/D,wBAAsB,iBAAiB,CACnC,MAAM,EAAE,uBAAuB,EAC/B,IAAI,EAAE,IAAI,EACV,aAAa,CAAC,EAAE,MAAM,iBAiFzB"}
|
|
@@ -11,11 +11,12 @@ export async function createClientFiles(config, mode, buildLocation) {
|
|
|
11
11
|
const routesLocation = config.routesLocation;
|
|
12
12
|
//if (routesLocation !== null) {
|
|
13
13
|
const [routeFilePath, routesExportName] = routesLocation;
|
|
14
|
-
|
|
15
|
-
//
|
|
16
|
-
fsPromises.mkdir(join(specificBuildFolder, `${clientFolder}`), {
|
|
14
|
+
// ensure the folder exists -- must complete before anything below writes into it,
|
|
15
|
+
// so it can't just be another entry in the promises array (they all start eagerly)
|
|
16
|
+
await fsPromises.mkdir(join(specificBuildFolder, `${clientFolder}`), {
|
|
17
17
|
recursive: true
|
|
18
|
-
})
|
|
18
|
+
});
|
|
19
|
+
const promises = [
|
|
19
20
|
// client.js file
|
|
20
21
|
fsPromises.copyFile(join(frameworkDir, frameworkDistFolder, frameworkClientFolder, 'client.js'),
|
|
21
22
|
// from
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"devBundle.rollup.config.d.ts","sourceRoot":"","sources":["../../src/build/devBundle.rollup.config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"devBundle.rollup.config.d.ts","sourceRoot":"","sources":["../../src/build/devBundle.rollup.config.ts"],"names":[],"mappings":"AAUA,KAAK,YAAY,GAAG;IAChB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CACrB,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,YAkBnB,CAAA;AAED,eAAe,YAAY,CAAA"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { nodeResolve } from "@rollup/plugin-node-resolve";
|
|
2
2
|
import commonjs from "@rollup/plugin-commonjs";
|
|
3
3
|
//import { babel } from "@rollup/plugin-babel"
|
|
4
|
-
import
|
|
5
|
-
//import terser from "@rollup/plugin-terser" // to do
|
|
4
|
+
import terser from "@rollup/plugin-terser";
|
|
6
5
|
//import gzip from "rollup-plugin-gzip"
|
|
7
6
|
import jsonModule from "@rollup/plugin-json";
|
|
8
7
|
const json = typeof jsonModule === "function" ? jsonModule : jsonModule.default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"processPackage.d.ts","sourceRoot":"","sources":["../../src/build/processPackage.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"processPackage.d.ts","sourceRoot":"","sources":["../../src/build/processPackage.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAG/D,OAAO,EAAE,oBAAoB,EAA4D,MAAM,2BAA2B,CAAA;AAwB1H,wBAAsB,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAoGxK"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import rmfr from 'rmfr';
|
|
2
1
|
import { transform } from 'cjstoesm';
|
|
3
2
|
import { promises as fsPromises } from 'fs';
|
|
4
3
|
import fsExtra from 'fs-extra';
|
|
5
4
|
import { packagesCacheFolder, packagesFolder } from "../settings.js";
|
|
5
|
+
import { removeRecursive } from "../removeRecursive.js";
|
|
6
6
|
import { cliLog } from "../cliOutput.js";
|
|
7
7
|
//import { getFrameworkDir } from '../getFrameworkDir.js'
|
|
8
8
|
//// Don't think we are using this
|
|
@@ -43,7 +43,7 @@ export async function processPackage(projectDir, packagesCacheInfo, packageName,
|
|
|
43
43
|
console.log(`Didn't find ${packageAndVersion} in packages cached - proceeding`);
|
|
44
44
|
//
|
|
45
45
|
// check if package is esm or cjs?
|
|
46
|
-
|
|
46
|
+
await removeRecursive(targetLocation);
|
|
47
47
|
await fsPromises.mkdir(targetLocation);
|
|
48
48
|
//console.log('json for ', packageName, json)
|
|
49
49
|
if (packageJson.type === undefined && packageJson.type !== 'module') {
|
|
@@ -52,7 +52,7 @@ export async function processPackage(projectDir, packagesCacheInfo, packageName,
|
|
|
52
52
|
const input = `${sourceLocation}/**/*`;
|
|
53
53
|
/// change to cache loc
|
|
54
54
|
//const outDir = targetLocation
|
|
55
|
-
|
|
55
|
+
await removeRecursive(cacheLocation);
|
|
56
56
|
await fsPromises.mkdir(cacheLocation);
|
|
57
57
|
await transform({
|
|
58
58
|
input: input,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rollup.user.prod.config.d.ts","sourceRoot":"","sources":["../../src/build/rollup.user.prod.config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rollup.user.prod.config.d.ts","sourceRoot":"","sources":["../../src/build/rollup.user.prod.config.ts"],"names":[],"mappings":"AAaA,KAAK,YAAY,GAAG;IAChB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CACrB,CAAA;AAeD,QAAA,MAAM,YAAY,EAAE,YAkBnB,CAAA;AAED,eAAe,YAAY,CAAA"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { nodeResolve } from "@rollup/plugin-node-resolve";
|
|
2
2
|
import commonjs from "@rollup/plugin-commonjs";
|
|
3
3
|
import { babel } from "@rollup/plugin-babel";
|
|
4
|
-
import
|
|
5
|
-
//import terser from "@rollup/plugin-terser" // to do
|
|
4
|
+
import terser from "@rollup/plugin-terser";
|
|
6
5
|
//import gzip from "rollup-plugin-gzip"
|
|
7
6
|
import jsonModule from "@rollup/plugin-json";
|
|
8
7
|
import { MakeBabelTransformRemoveServerBlocks } from "../babelPlugins/BabelTransformRemoveServerBlocks.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"removeRecursive.d.ts","sourceRoot":"","sources":["../src/removeRecursive.ts"],"names":[],"mappings":"AAOA,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE3D"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { promises as fsPromises } from 'fs';
|
|
2
|
+
// replaces the old rmfr dependency - node has covered this natively since 14.14
|
|
3
|
+
// force: resolve quietly when the path is already gone, matching rm -rf
|
|
4
|
+
// maxRetries: windows often holds handles on build output for a moment after a
|
|
5
|
+
// watcher or child process lets go, which surfaces as EBUSY/EPERM
|
|
6
|
+
export function removeRecursive(path) {
|
|
7
|
+
return fsPromises.rm(path, {
|
|
8
|
+
recursive: true,
|
|
9
|
+
force: true,
|
|
10
|
+
maxRetries: 3
|
|
11
|
+
});
|
|
12
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"staticGen.d.ts","sourceRoot":"","sources":["../../src/staticGen/staticGen.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"staticGen.d.ts","sourceRoot":"","sources":["../../src/staticGen/staticGen.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAiBhD,wBAAsB,SAAS,CAAC,SAAS,EAAE,SAAS,iBA2LnD"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { existsSync, promises as fsPromises } from 'fs';
|
|
2
2
|
import { join, dirname } from 'path';
|
|
3
3
|
import fsExtra from 'fs-extra';
|
|
4
|
-
import axios from 'axios';
|
|
5
4
|
//import type { SxyFrameworkConfigComplete } from '../FrameworkConfig.js'
|
|
6
5
|
import { staticSiteFolder, staticFolder, assetsFolder, publicFolder, bundleFolder, componentCssFolder } from "../settings.js";
|
|
7
6
|
import { getAppRoutes } from "./getAppRoutes.js";
|
|
@@ -86,8 +85,11 @@ export async function staticGen(framework) {
|
|
|
86
85
|
let links;
|
|
87
86
|
try {
|
|
88
87
|
console.log('get URL', url);
|
|
89
|
-
const response = await
|
|
90
|
-
|
|
88
|
+
const response = await fetch(url);
|
|
89
|
+
// fetch, unlike axios, resolves on non-2xx - so check explicitly, or we'd
|
|
90
|
+
// write error pages out as static HTML
|
|
91
|
+
if (!response.ok) throwError('renderPath', `Get request to ${url} returned an invalid status: ${response.status}`);
|
|
92
|
+
let result = await response.text();
|
|
91
93
|
links = findLinks(result);
|
|
92
94
|
const newPaths = [];
|
|
93
95
|
for (const link of links) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tungsten",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.24",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -36,9 +36,8 @@
|
|
|
36
36
|
"@rollup/plugin-commonjs": "^22.0.2",
|
|
37
37
|
"@rollup/plugin-json": "^6.1.0",
|
|
38
38
|
"@rollup/plugin-node-resolve": "^14.1.0",
|
|
39
|
+
"@rollup/plugin-terser": "^1.0.0",
|
|
39
40
|
"arktype": "^2.2.0",
|
|
40
|
-
"axios": "^0.27.2",
|
|
41
|
-
"babel-loader": "^8.4.1",
|
|
42
41
|
"babel-plugin-css-to-js": "^0.0.4",
|
|
43
42
|
"babel-plugin-sxy-module-resolver": "^4.1.9",
|
|
44
43
|
"babel-plugin-sxy-transform-cjs-to-esm": "^0.2.6",
|
|
@@ -48,7 +47,6 @@
|
|
|
48
47
|
"chokidar": "^3.6.0",
|
|
49
48
|
"cjs-module-lexer": "^1.4.3",
|
|
50
49
|
"cjstoesm": "^2.1.2",
|
|
51
|
-
"compression-webpack-plugin": "^10.0.0",
|
|
52
50
|
"cookie-parser": "^1.4.7",
|
|
53
51
|
"cross-env": "^7.0.3",
|
|
54
52
|
"decamelize": "^6.0.1",
|
|
@@ -59,26 +57,18 @@
|
|
|
59
57
|
"fs-extra": "^10.1.0",
|
|
60
58
|
"globby": "^13.2.2",
|
|
61
59
|
"hono": "^4.12.8",
|
|
62
|
-
"html-webpack-plugin": "^5.6.6",
|
|
63
60
|
"import-meta-resolve": "^2.2.2",
|
|
64
61
|
"ini": "^4.1.3",
|
|
65
|
-
"install": "^0.13.0",
|
|
66
62
|
"lodash.clonedeep": "^4.5.0",
|
|
67
|
-
"mini-css-extract-plugin": "^2.10.1",
|
|
68
|
-
"node-fetch": "^3.3.2",
|
|
69
|
-
"npm": "^11.12.0",
|
|
70
63
|
"npm-run-all": "^4.1.5",
|
|
71
64
|
"open": "^8.4.2",
|
|
72
65
|
"path-to-regexp": "^6.3.0",
|
|
73
66
|
"postcss": "^8.5.8",
|
|
74
67
|
"precinct": "^12.2.0",
|
|
75
68
|
"react-router": "^6.30.3",
|
|
76
|
-
"redaxios": "^0.5.1",
|
|
77
69
|
"require-resolve-hook": "^1.1.0",
|
|
78
|
-
"rmfr": "^2.0.0",
|
|
79
70
|
"rollup": "^2.80.0",
|
|
80
71
|
"rollup-plugin-gzip": "^3.1.2",
|
|
81
|
-
"rollup-plugin-terser": "^7.0.2",
|
|
82
72
|
"sass": "^1.98.0",
|
|
83
73
|
"serialize-javascript": "^6.0.2",
|
|
84
74
|
"slash": "^4.0.0",
|
|
@@ -88,8 +78,6 @@
|
|
|
88
78
|
"sxy-lib-object-copy": "^2.0.5",
|
|
89
79
|
"sxy-loader": "^3.1.0",
|
|
90
80
|
"sxy-package-investigator": "^1.0.0",
|
|
91
|
-
"terser-webpack-plugin": "^5.4.0",
|
|
92
|
-
"util": "^0.12.5",
|
|
93
81
|
"zod": "^4.3.6"
|
|
94
82
|
},
|
|
95
83
|
"devDependencies": {
|
|
@@ -98,7 +86,6 @@
|
|
|
98
86
|
"@types/babel-types": "^7.0.16",
|
|
99
87
|
"@types/babel__core": "^7.20.5",
|
|
100
88
|
"@types/babel__generator": "^7.27.0",
|
|
101
|
-
"@types/bcrypt": "^5.0.2",
|
|
102
89
|
"@types/bcryptjs": "^2.4.6",
|
|
103
90
|
"@types/chai": "^4.3.20",
|
|
104
91
|
"@types/cookie-parser": "^1.4.10",
|
|
@@ -111,7 +98,6 @@
|
|
|
111
98
|
"@types/prop-types": "^15.7.15",
|
|
112
99
|
"@types/react": "19.1.9",
|
|
113
100
|
"@types/react-dom": "19.1.7",
|
|
114
|
-
"@types/rmfr": "^2.0.5",
|
|
115
101
|
"@types/serialize-javascript": "^5.0.4",
|
|
116
102
|
"@typescript-eslint/eslint-plugin": "^5.62.0",
|
|
117
103
|
"@typescript-eslint/parser": "^5.62.0",
|
|
@@ -119,25 +105,18 @@
|
|
|
119
105
|
"babel-plugin-sxy-transform-import-extensions": "^1.0.5",
|
|
120
106
|
"babel-plugin-transform-import-extension": "^1.0.3",
|
|
121
107
|
"chai": "^4.5.0",
|
|
122
|
-
"chai-subset": "^1.6.0",
|
|
123
108
|
"csstype": "^3.2.3",
|
|
124
109
|
"eslint": "^8.57.1",
|
|
125
110
|
"eslint-import-resolver-typescript": "^2.7.1",
|
|
126
111
|
"eslint-plugin-import": "^2.32.0",
|
|
127
112
|
"eslint-plugin-no-type-assertion": "^1.3.0",
|
|
128
113
|
"happy-dom": "^20.10.6",
|
|
129
|
-
"progress-webpack-plugin": "^1.0.16",
|
|
130
114
|
"prop-types": "^15.8.1",
|
|
131
115
|
"rimraf": "^5.0.10",
|
|
132
|
-
"rmrf": "^2.0.4",
|
|
133
116
|
"rollup-plugin-visualizer": "^5.14.0",
|
|
134
|
-
"supertest": "^6.3.4",
|
|
135
117
|
"sxy-test-runner": "^2.2.2",
|
|
136
118
|
"sxy-types": "^1.0.23",
|
|
137
|
-
"typescript": "^6.0.3"
|
|
138
|
-
"webpack-bundle-analyzer": "^4.10.2",
|
|
139
|
-
"webpack-cli": "^4.10.0",
|
|
140
|
-
"webpack-stats-plugin": "^1.1.3"
|
|
119
|
+
"typescript": "^6.0.3"
|
|
141
120
|
},
|
|
142
121
|
"peerDependencies": {
|
|
143
122
|
"react": "^18.2.0 || ^19.0.0",
|
package/types/modules.d.ts
CHANGED
|
@@ -4,4 +4,35 @@ declare module 'babel-plugin-css-to-js'
|
|
|
4
4
|
declare module '@babel/plugin-transform-class-properties'
|
|
5
5
|
declare module '@rollup/plugin-node-resolve'
|
|
6
6
|
declare module '@rollup/plugin-commonjs'
|
|
7
|
-
|
|
7
|
+
// Its shipped types resolve as CJS under NodeNext (no "type":"module", no import/require
|
|
8
|
+
// conditions in its exports map), so tsc sees a namespace and the default export isn't
|
|
9
|
+
// callable. Redeclared here instead. terser's own types aren't reachable -- it's a
|
|
10
|
+
// transitive dep, so pnpm keeps it out of the top-level node_modules -- hence the
|
|
11
|
+
// hand-written option list; nested option objects are left loose on purpose.
|
|
12
|
+
declare module '@rollup/plugin-terser' {
|
|
13
|
+
import type { Plugin } from 'rollup'
|
|
14
|
+
|
|
15
|
+
type TerserNested = Record<string, unknown>
|
|
16
|
+
|
|
17
|
+
export interface Options {
|
|
18
|
+
compress?: boolean | TerserNested
|
|
19
|
+
ecma?: 5 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020
|
|
20
|
+
enclose?: boolean | string
|
|
21
|
+
format?: TerserNested
|
|
22
|
+
ie8?: boolean
|
|
23
|
+
keep_classnames?: boolean | RegExp
|
|
24
|
+
keep_fnames?: boolean | RegExp
|
|
25
|
+
mangle?: boolean | TerserNested
|
|
26
|
+
module?: boolean
|
|
27
|
+
parse?: TerserNested
|
|
28
|
+
safari10?: boolean
|
|
29
|
+
sourceMap?: boolean | TerserNested
|
|
30
|
+
toplevel?: boolean
|
|
31
|
+
/** Added by the plugin, not terser itself. */
|
|
32
|
+
nameCache?: Record<string, unknown>
|
|
33
|
+
/** Added by the plugin, not terser itself. */
|
|
34
|
+
maxWorkers?: number
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export default function terser(options?: Options): Plugin
|
|
38
|
+
}
|