diff --git a/README.md b/README.md index 17c0ed46f7..fe0cfbe697 100644 --- a/README.md +++ b/README.md @@ -9,10 +9,10 @@ For detailed architecture, development guidelines, and contribution documentatio ## Projects 1. **eav-ui** main Angular project. Build using `ng` -1. **field-custom-gps** an extension field with gps-picker & map. Build using `webpack` -1. **field-string-wysiwyg** an extension field for wysiwyg. Build using `webpack` +1. **field-custom-gps** an extension field with gps-picker & map. Build using `esbuild` +1. **field-string-wysiwyg** an extension field for wysiwyg. Build using `esbuild` -There are various projects in here, some building with angular `ng build` and others directly with webpack. +The main application uses Angular's application builder; the extension fields use esbuild. ## Building the Main Angular Project @@ -22,13 +22,13 @@ To build, use the normal `ng` syntax, like `ng build` or `ng build --watch` For more guidance on building and deploying to Dnn/Oqtane, see -## Building Webpack projects +## Building extension projects -Just run `webpack --env parts=PARTNAME` where PARTNAME is `wysiwyg`, `gps`, `all` (which is like using `'wysiwyg,gps'`). +Run `node ./build-helpers/build-parts.js --parts=PARTNAME`, where PARTNAME is `wysiwyg`, `gps`, `all`, or a comma-separated combination. -You can also use `--watch` like `webpack --env parts=all --watch` +Add `--watch` for continuous builds, for example `node ./build-helpers/build-parts.js --parts=all --watch`. -You can also use `--mode=production` like `webpack --env parts=wysiwyg --mode=production` +Add `--production` for minified output with externally hosted source maps. ## Dev info diff --git a/angular.json b/angular.json index f33d73df6f..40b1da634f 100644 --- a/angular.json +++ b/angular.json @@ -22,12 +22,15 @@ "prefix": "app", "architect": { "build": { - "builder": "@angular-devkit/build-angular:browser", + "builder": "@angular/build:application", "options": { - "outputPath": "dist/eav-ui", + "outputPath": { + "base": "dist/eav-ui", + "browser": "" + }, "index": "projects/eav-ui/src/index-raw.html", - "main": "projects/eav-ui/src/main.ts", - "polyfills": "projects/eav-ui/src/polyfills.ts", + "browser": "projects/eav-ui/src/main.ts", + "polyfills": ["projects/eav-ui/src/polyfills.ts"], "tsConfig": "projects/eav-ui/tsconfig.app.json", "inlineStyleLanguage": "css", "assets": ["projects/eav-ui/src/assets"], @@ -37,6 +40,11 @@ "projects/eav-ui/src/app/edit/assets/scripts/dropzone-dragging-helper.js", "projects/eav-ui/src/app/edit/assets/scripts/clipboard-paste/paste.js" ], + "loader": { + ".png": "file", + ".rawts": "text", + ".svg": "text" + }, "allowedCommonJsDependencies": ["dayjs"] }, "configurations": { @@ -51,17 +59,13 @@ "outputHashing": "bundles", "sourceMap": true, "namedChunks": true, - "extractLicenses": true, - "vendorChunk": true, - "buildOptimizer": true + "extractLicenses": true }, "development": { "optimization": false, "sourceMap": true, "namedChunks": true, - "extractLicenses": false, - "vendorChunk": true, - "buildOptimizer": false + "extractLicenses": false } }, "defaultConfiguration": "development" diff --git a/build-helpers/build-parts.js b/build-helpers/build-parts.js new file mode 100644 index 0000000000..7e13b39be1 --- /dev/null +++ b/build-helpers/build-parts.js @@ -0,0 +1,122 @@ +const fs = require('node:fs'); +const path = require('node:path'); +const { fileURLToPath } = require('node:url'); +const esbuild = require('esbuild'); +const sass = require('sass'); +const buildConfig = require('../../2sxc-ui/packages/2sxc-load-build-config').BuildConfig; + +const root = path.resolve(__dirname, '..'); +const args = new Set(process.argv.slice(2)); +const partsArg = process.argv.find(arg => arg.startsWith('--parts=')); +const production = args.has('--production'); +const watch = args.has('--watch'); +const copy = !args.has('--no-copy'); +const selected = (partsArg?.slice('--parts='.length) ?? '').split(','); +const parts = selected.includes('all') ? ['wysiwyg', 'gps'] : selected; + +if (!partsArg || parts.some(part => !['wysiwyg', 'gps'].includes(part))) { + throw new Error('Specify --parts=all, --parts=wysiwyg, --parts=gps, or a comma-separated combination.'); +} + +const definitions = { + gps: { + project: 'field-custom-gps', + entries: ['src/main/main.ts', 'src/preview/preview.ts'], + }, + wysiwyg: { + project: 'field-string-wysiwyg', + entries: [ + 'src/field-string-wysiwyg/field-string-wysiwyg.ts', + 'src/field-string-wysiwyg/field-string-wysiwyg-preview.ts', + 'src/field-string-wysiwyg/field-string-wysiwyg-editor.ts', + ], + copy: [ + ['src/i18n', 'i18n'], + ['src/assets/2sxc-tinymce-skin', '.'], + ], + }, +}; + +const sassTextPlugin = { + name: 'sass-as-text', + setup(build) { + build.onLoad({ filter: /\.s[ac]ss$/ }, async ({ path: file }) => { + const result = await sass.compileAsync(file, { loadPaths: [path.dirname(file)] }); + return { contents: result.css, loader: 'text', watchFiles: [...result.loadedUrls].map(fileURLToPath) }; + }); + }, +}; + +function copyDirectory(source, target) { + if (fs.existsSync(source)) fs.cpSync(source, target, { recursive: true, force: true }); +} + +function copyToTargets(output, project) { + for (const target of [...buildConfig.Sources, ...buildConfig.JsTargets]) { + copyDirectory(output, path.join(target, 'extensions', project)); + } +} + +async function buildPart(name) { + const definition = definitions[name]; + const projectRoot = path.join(root, 'projects', definition.project); + const output = path.join(root, 'dist', 'extensions', definition.project); + fs.rmSync(output, { recursive: true, force: true }); + fs.mkdirSync(output, { recursive: true }); + + const copyAssets = () => { + for (const [source, target] of definition.copy ?? []) { + copyDirectory(path.join(projectRoot, source), path.join(output, target)); + } + }; + + const afterBuildPlugin = { + name: 'copy-build-output', + setup(build) { + build.onEnd(result => { + if (result.errors.length) + return; + copyAssets(); + if (production) { + const bundle = path.join(output, 'index.js'); + const sourceMapUrl = `https://sources.2sxc.org/${require('../package.json').version}/extensions/${definition.project}/index.js.map`; + fs.appendFileSync(bundle, `\n//# sourceMappingURL=${sourceMapUrl}\n`); + } + if (copy) copyToTargets(output, definition.project); + console.log(`Built ${name} to ${path.relative(root, output)}`); + }); + }, + }; + + const context = await esbuild.context({ + absWorkingDir: projectRoot, + stdin: { + contents: definition.entries.map(entry => `import './${entry.replaceAll('\\', '/')}';`).join('\n'), + resolveDir: projectRoot, + sourcefile: `${name}-entries.ts`, + loader: 'ts', + }, + outfile: path.join(output, 'index.js'), + bundle: true, + define: { __PRODUCTION__: JSON.stringify(production) }, + loader: { '.html': 'text', '.css': 'text', '.svg': 'text', '.rawts': 'text' }, + minify: production, + plugins: [sassTextPlugin, afterBuildPlugin], + sourcemap: production ? 'external' : true, + sourcesContent: !production, + target: 'es2022', + tsconfig: path.join(projectRoot, 'tsconfig.json'), + }); + + if (watch) + await context.watch(); + else { + await context.rebuild(); + await context.dispose(); + } +} + +Promise.all(parts.map(buildPart)).catch(error => { + console.error(error); + process.exitCode = 1; +}); diff --git a/build-helpers/external-source-maps-elements.js b/build-helpers/external-source-maps-elements.js deleted file mode 100644 index d453261949..0000000000 --- a/build-helpers/external-source-maps-elements.js +++ /dev/null @@ -1,38 +0,0 @@ -const webpack = require('webpack'); - -/* - 2dm: change source map generation based on production mode - our goal is to not include source maps in the distribution - but have them when developing -*/ -function setExternalSourceMaps(configuration, path) { - const nodeEnv = (process.env.NODE_ENV || 'development').trim(); // trim is important because of an issue with package.json - const isProd = nodeEnv === 'production'; - const pjson = require('../package.json'); - - console.log('isprod', isProd, '; process.env... ', process.env.NODE_ENV); - - if (isProd) { - // devTool option is not needed anymore for prod - // but for development it's just easier to use then SourceMapDevToolPlugin - configuration.devtool = false; - - if (!configuration.plugins) { configuration.plugins = []; } - - const sourceMapDevToolPlugin = new webpack.SourceMapDevToolPlugin({ - // this is the url of our local sourcemap server - publicPath: 'https://sources.2sxc.org/' + pjson.version + path, - filename: '[file].map', - }); - - configuration.plugins = [ - // ... other plugins - ...configuration.plugins, - sourceMapDevToolPlugin, - ]; - } - - return configuration; -} - -module.exports = setExternalSourceMaps; diff --git a/build-helpers/multi-output.js b/build-helpers/multi-output.js deleted file mode 100644 index 618439f15e..0000000000 --- a/build-helpers/multi-output.js +++ /dev/null @@ -1,29 +0,0 @@ -// Important: this is duplicate code from 2sxc-ui -> webpack-helpers.js -const WebpackShellPlugin = require('webpack-shell-plugin-next'); - -function createCopyAfterBuildPlugin(source, targets, addon) { - console.log('createCopyAfterBuildPlugin:source', source, '; targets', targets, '; addon', addon); - if (!source || !targets) return null; - if (!Array.isArray(targets)) throw "Targets should be an array"; - if (!addon) throw "addon parameter missing - something like 'inpage'"; - const commands = [ - 'echo Webpack Compile done - will now copy from project assets to DNN', - // folders in robocopy need to have a space after the name before closing " - special bug - // 'robocopy /mir /nfl /ndl /njs "' + source + ' " "' + target + ' " & exit 0' - ]; - targets.forEach(t => { - commands.push('robocopy /mir /nfl /ndl /njs "' + source + ' " "' + t + addon + ' " & exit 0'); - }); - return new WebpackShellPlugin({ - // must use onBuildExit and not onBuildEnd, as i18n files are otherwise not ready yet - onBuildExit: { - scripts: commands, - parallel: false, - blocking: true, - safe: true, // experimental... - }, - dev: false // run on every build end, not just once - }) -} - -module.exports.createCopyAfterBuildPlugin = createCopyAfterBuildPlugin; diff --git a/package-lock.json b/package-lock.json index ee8b6e2bef..bf0dd274ac 100644 --- a/package-lock.json +++ b/package-lock.json @@ -65,10 +65,9 @@ "@vitest/coverage-v8": "^4.1.0", "chalk": "^4.1.2", "chokidar": "^3.6.0", - "clean-webpack-plugin": "^4.0.0", "concurrently": "^9.1.2", - "copy-webpack-plugin": "^14.0.0", "dependency-cruiser": "^16.10.0", + "esbuild": "^0.27.3", "eslint": "^9.28.0", "eslint-plugin-import": "^2.31.0", "fs-extra": "^10.1.0", @@ -76,17 +75,11 @@ "monaco-editor": "^0.52.2", "papaparse": "^5.5.2", "prettier": "^3.5.3", - "raw-loader": "^4.0.2", + "sass": "^1.99.0", "source-map-explorer": "^2.5.3", - "ts-loader": "^9.5.2", "ts-node": "^10.9.2", "typescript": "^6.0.3", - "url-loader": "^4.1.1", - "vitest": "^4.1.0", - "webpack": "^5.105.4", - "webpack-bundle-analyzer": "^4.10.2", - "webpack-cli": "^4.10.0", - "webpack-shell-plugin-next": "^2.3.2" + "vitest": "^4.1.0" } }, "node_modules/@2sic.com/2sxc-typings": { @@ -8738,17 +8731,6 @@ "@types/send": "*" } }, - "node_modules/@types/glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/minimatch": "*", - "@types/node": "*" - } - }, "node_modules/@types/google.maps": { "version": "3.58.1", "resolved": "https://registry.npmjs.org/@types/google.maps/-/google.maps-3.58.1.tgz", @@ -8811,13 +8793,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@types/minimatch": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.2.tgz", - "integrity": "sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==", - "dev": true, - "license": "MIT" - }, "node_modules/@types/node": { "version": "22.19.15", "resolved": "https://registry.npmjs.org/@types/node/-/node-22.19.15.tgz", @@ -9575,45 +9550,6 @@ "@xtuc/long": "4.2.2" } }, - "node_modules/@webpack-cli/configtest": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.2.0.tgz", - "integrity": "sha512-4FB8Tj6xyVkyqjj1OaTqCjXYULB9FMkqQ8yGrZjRDrYh0nOE+7Lhs45WioWQQMV+ceFlE368Ukhe6xdvJM9Egg==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "webpack": "4.x.x || 5.x.x", - "webpack-cli": "4.x.x" - } - }, - "node_modules/@webpack-cli/info": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-1.5.0.tgz", - "integrity": "sha512-e8tSXZpw2hPl2uMJY6fsMswaok5FdlGNRTktvFk2sD8RjH0hE2+XistawJx1vmKteh4NmGmNUrp+Tb2w+udPcQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "envinfo": "^7.7.3" - }, - "peerDependencies": { - "webpack-cli": "4.x.x" - } - }, - "node_modules/@webpack-cli/serve": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.7.0.tgz", - "integrity": "sha512-oxnCNGj88fL+xzV+dacXs44HcDwf1ovs3AuEzvP7mqXw7fQntqIhQ1BRmynh4qEKQSSSRSWVyXRjmTbZIX9V2Q==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "webpack-cli": "4.x.x" - }, - "peerDependenciesMeta": { - "webpack-dev-server": { - "optional": true - } - } - }, "node_modules/@xtuc/ieee754": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", @@ -10023,29 +9959,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/array-union": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", - "integrity": "sha512-Dxr6QJj/RdU/hCaBjOfxW+q6lyuVE6JFWIrAUpuOOhoJJoQ99cUn3igRaHVB5P9WrgFVN0FfArM3x0cueOU8ng==", - "dev": true, - "license": "MIT", - "dependencies": { - "array-uniq": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/array-uniq": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", - "integrity": "sha512-MNha4BWQ6JbwhFhj03YK552f7cb3AzoE8SzeljgChvL1dl3IcvggXVz1DilzySZkCja+CXuZbdW7yATchWn8/Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/array.prototype.findlastindex": { "version": "1.2.6", "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.6.tgz", @@ -10957,22 +10870,6 @@ "node": ">=6.0" } }, - "node_modules/clean-webpack-plugin": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/clean-webpack-plugin/-/clean-webpack-plugin-4.0.0.tgz", - "integrity": "sha512-WuWE1nyTNAyW5T7oNyys2EN0cfP2fdRxhxnIQWiAp0bMabPdHhoGxM8A6YL2GhqwgrPnnaemVE7nv5XJ2Fhh2w==", - "dev": true, - "license": "MIT", - "dependencies": { - "del": "^4.1.1" - }, - "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "webpack": ">=4.0.0 <6.0.0" - } - }, "node_modules/cli-cursor": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-5.0.0.tgz", @@ -11868,13 +11765,6 @@ "integrity": "sha512-YbwwqR/uYpeoP4pu043q+LTDLFBLApUP6VxRihdfNTqu4ubqMlGDLd6ErXhEgsyvY0K6nCs7nggYumAN+9uEuQ==", "license": "MIT" }, - "node_modules/debounce": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/debounce/-/debounce-1.2.1.tgz", - "integrity": "sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug==", - "dev": true, - "license": "MIT" - }, "node_modules/debug": { "version": "4.4.3", "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", @@ -11996,25 +11886,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/del": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/del/-/del-4.1.1.tgz", - "integrity": "sha512-QwGuEUouP2kVwQenAsOof5Fv8K9t3D8Ca8NxcXKrIpEHjTXK5J2nXLdP+ALI1cgv8wj7KuwBhTwBkOZSJKM5XQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/glob": "^7.1.1", - "globby": "^6.1.0", - "is-path-cwd": "^2.0.0", - "is-path-in-cwd": "^2.0.0", - "p-map": "^2.0.0", - "pify": "^4.0.1", - "rimraf": "^2.6.3" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/depd": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", @@ -12367,19 +12238,6 @@ "node": ">=6" } }, - "node_modules/envinfo": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.21.0.tgz", - "integrity": "sha512-Lw7I8Zp5YKHFCXL7+Dz95g4CcbMEpgvqZNNq3AmlT5XAV6CgAAk6gyAMqn2zjw08K9BHfcNuKrMiCPLByGafow==", - "dev": true, - "license": "MIT", - "bin": { - "envinfo": "dist/cli.js" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/environment": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/environment/-/environment-1.1.0.tgz", @@ -13397,16 +13255,6 @@ "fast-string-width": "^3.0.2" } }, - "node_modules/fastest-levenshtein": { - "version": "1.0.16", - "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", - "integrity": "sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4.9.1" - } - }, "node_modules/fastq": { "version": "1.20.1", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.20.1.tgz", @@ -14027,86 +13875,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/globby": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", - "integrity": "sha512-KVbFv2TQtbzCoxAnfD6JcHZTYCzyliEaaeM/gH8qQdkKr5s0OP9scEgvdcngyk7AVdY6YVW/TJHd+lQ/Df3Daw==", - "dev": true, - "license": "MIT", - "dependencies": { - "array-union": "^1.0.1", - "glob": "^7.0.3", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/globby/node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true, - "license": "MIT" - }, - "node_modules/globby/node_modules/brace-expansion": { - "version": "1.1.15", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.15.tgz", - "integrity": "sha512-EwOCDEex4quD37XhqM3omwtMoJjr//isUZz1JopUNWms+4Z2ViyM/k1YIRePpoVNnQhENnxtFjLaxNHrT7xIUg==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/globby/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/globby/node_modules/minimatch": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", - "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/globby/node_modules/pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/gopd": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", @@ -14707,26 +14475,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/import-local": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz", - "integrity": "sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==", - "dev": true, - "license": "MIT", - "dependencies": { - "pkg-dir": "^4.2.0", - "resolve-cwd": "^3.0.0" - }, - "bin": { - "import-local-fixture": "fixtures/cli.js" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", @@ -15185,42 +14933,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-path-cwd": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz", - "integrity": "sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/is-path-in-cwd": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-2.1.0.tgz", - "integrity": "sha512-rNocXHgipO+rvnP6dk3zI20RpOtrAM/kzbB258Uw5BWr3TpXi861yzjo16Dn4hUox07iw5AyeMLHWsujkjzvRQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-path-inside": "^2.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/is-path-in-cwd/node_modules/is-path-inside": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-2.1.0.tgz", - "integrity": "sha512-wiyhTzfDWsvwAW53OBWF5zuvaOGlZ6PwYxAbPVDhpm+gM09xKQGjBq/8uYN12aDvMxnAnq3dxTyoSoRNmg5YFg==", - "dev": true, - "license": "MIT", - "dependencies": { - "path-is-inside": "^1.0.2" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/is-path-inside": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-4.0.0.tgz", @@ -17421,16 +17133,6 @@ "opencollective-postinstall": "index.js" } }, - "node_modules/opener": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.2.tgz", - "integrity": "sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==", - "dev": true, - "license": "(WTFPL OR MIT)", - "bin": { - "opener": "bin/opener-bin.js" - } - }, "node_modules/optionator": { "version": "0.9.4", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", @@ -17560,16 +17262,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/p-map": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz", - "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/p-retry": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-6.2.1.tgz", @@ -17598,16 +17290,6 @@ "node": ">= 4" } }, - "node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/pacote": { "version": "21.5.1", "resolved": "https://registry.npmjs.org/pacote/-/pacote-21.5.1.tgz", @@ -17877,13 +17559,6 @@ "node": ">=0.10.0" } }, - "node_modules/path-is-inside": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w==", - "dev": true, - "license": "(WTFPL OR MIT)" - }, "node_modules/path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", @@ -17985,33 +17660,11 @@ "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", "dev": true, "license": "MIT", + "optional": true, "engines": { "node": ">=6" } }, - "node_modules/pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==", - "dev": true, - "license": "MIT", - "dependencies": { - "pinkie": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/piscina": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/piscina/-/piscina-5.2.0.tgz", @@ -18035,97 +17688,28 @@ "node": ">=16.20.0" } }, - "node_modules/pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "node_modules/pkijs": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/pkijs/-/pkijs-3.4.0.tgz", + "integrity": "sha512-emEcLuomt2j03vxD54giVB4SxTjnsqkU692xZOZXHDVoYyypEm+b3jpiTcc+Cf+myooc+/Ly0z01jqeNHVgJGw==", "dev": true, - "license": "MIT", + "license": "BSD-3-Clause", "dependencies": { - "find-up": "^4.0.0" + "@noble/hashes": "1.4.0", + "asn1js": "^3.0.6", + "bytestreamjs": "^2.0.1", + "pvtsutils": "^1.3.6", + "pvutils": "^1.1.3", + "tslib": "^2.8.1" }, "engines": { - "node": ">=8" + "node": ">=16.0.0" } }, - "node_modules/pkg-dir/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pkg-dir/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pkg-dir/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/pkg-dir/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pkijs": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/pkijs/-/pkijs-3.4.0.tgz", - "integrity": "sha512-emEcLuomt2j03vxD54giVB4SxTjnsqkU692xZOZXHDVoYyypEm+b3jpiTcc+Cf+myooc+/Ly0z01jqeNHVgJGw==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@noble/hashes": "1.4.0", - "asn1js": "^3.0.6", - "bytestreamjs": "^2.0.1", - "pvtsutils": "^1.3.6", - "pvutils": "^1.1.3", - "tslib": "^2.8.1" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/pkijs/node_modules/@noble/hashes": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", - "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", + "node_modules/pkijs/node_modules/@noble/hashes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", "dev": true, "license": "MIT", "engines": { @@ -18561,95 +18145,6 @@ "node": ">= 0.10" } }, - "node_modules/raw-loader": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/raw-loader/-/raw-loader-4.0.2.tgz", - "integrity": "sha512-ZnScIV3ag9A4wPX/ZayxL/jZH+euYb6FcUinPcgiQW0+UBtEv0O6Q3lGd3cqJ+GHH+rksEv3Pj99oxJ3u3VIKA==", - "dev": true, - "license": "MIT", - "dependencies": { - "loader-utils": "^2.0.0", - "schema-utils": "^3.0.0" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "^4.0.0 || ^5.0.0" - } - }, - "node_modules/raw-loader/node_modules/ajv": { - "version": "6.14.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.14.0.tgz", - "integrity": "sha512-IWrosm/yrn43eiKqkfkHis7QioDleaXQHdDVPKg0FSwwd/DuvyX79TZnFOnYpB7dcsFAMmtFztZuXPDvSePkFw==", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/raw-loader/node_modules/ajv-keywords": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", - "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "ajv": "^6.9.1" - } - }, - "node_modules/raw-loader/node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true, - "license": "MIT" - }, - "node_modules/raw-loader/node_modules/loader-utils": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz", - "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", - "dev": true, - "license": "MIT", - "dependencies": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^2.1.2" - }, - "engines": { - "node": ">=8.9.0" - } - }, - "node_modules/raw-loader/node_modules/schema-utils": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", - "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/json-schema": "^7.0.8", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, "node_modules/readable-stream": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", @@ -18865,29 +18360,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/resolve-cwd": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", - "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", - "dev": true, - "license": "MIT", - "dependencies": { - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/resolve-cwd/node_modules/resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", @@ -18975,73 +18447,6 @@ "dev": true, "license": "MIT" }, - "node_modules/rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", - "deprecated": "Rimraf versions prior to v4 are no longer supported", - "dev": true, - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - } - }, - "node_modules/rimraf/node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true, - "license": "MIT" - }, - "node_modules/rimraf/node_modules/brace-expansion": { - "version": "1.1.15", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.15.tgz", - "integrity": "sha512-EwOCDEex4quD37XhqM3omwtMoJjr//isUZz1JopUNWms+4Z2ViyM/k1YIRePpoVNnQhENnxtFjLaxNHrT7xIUg==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/rimraf/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/rimraf/node_modules/minimatch": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", - "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, "node_modules/rollup": { "version": "4.60.2", "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.60.2.tgz", @@ -21024,27 +20429,6 @@ "typescript": ">=4.8.4" } }, - "node_modules/ts-loader": { - "version": "9.5.4", - "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.5.4.tgz", - "integrity": "sha512-nCz0rEwunlTZiy6rXFByQU1kVVpCIgUpc/psFiKVrUwrizdnIbRFu8w7bxhUF0X613DYwT4XzrZHpVyMe758hQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.1.0", - "enhanced-resolve": "^5.0.0", - "micromatch": "^4.0.0", - "semver": "^7.3.4", - "source-map": "^0.7.4" - }, - "engines": { - "node": ">=12.0.0" - }, - "peerDependencies": { - "typescript": "*", - "webpack": "^5.0.0" - } - }, "node_modules/ts-morph": { "version": "27.0.2", "resolved": "https://registry.npmjs.org/ts-morph/-/ts-morph-27.0.2.tgz", @@ -21487,125 +20871,6 @@ "punycode": "^2.1.0" } }, - "node_modules/url-loader": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/url-loader/-/url-loader-4.1.1.tgz", - "integrity": "sha512-3BTV812+AVHHOJQO8O5MkWgZ5aosP7GnROJwvzLS9hWDj00lZ6Z0wNak423Lp9PBZN05N+Jk/N5Si8jRAlGyWA==", - "dev": true, - "license": "MIT", - "dependencies": { - "loader-utils": "^2.0.0", - "mime-types": "^2.1.27", - "schema-utils": "^3.0.0" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "file-loader": "*", - "webpack": "^4.0.0 || ^5.0.0" - }, - "peerDependenciesMeta": { - "file-loader": { - "optional": true - } - } - }, - "node_modules/url-loader/node_modules/ajv": { - "version": "6.14.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.14.0.tgz", - "integrity": "sha512-IWrosm/yrn43eiKqkfkHis7QioDleaXQHdDVPKg0FSwwd/DuvyX79TZnFOnYpB7dcsFAMmtFztZuXPDvSePkFw==", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/url-loader/node_modules/ajv-keywords": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", - "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "ajv": "^6.9.1" - } - }, - "node_modules/url-loader/node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true, - "license": "MIT" - }, - "node_modules/url-loader/node_modules/loader-utils": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz", - "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", - "dev": true, - "license": "MIT", - "dependencies": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^2.1.2" - }, - "engines": { - "node": ">=8.9.0" - } - }, - "node_modules/url-loader/node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/url-loader/node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dev": true, - "license": "MIT", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/url-loader/node_modules/schema-utils": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", - "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/json-schema": "^7.0.8", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -21956,203 +21221,6 @@ } } }, - "node_modules/webpack-bundle-analyzer": { - "version": "4.10.2", - "resolved": "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.10.2.tgz", - "integrity": "sha512-vJptkMm9pk5si4Bv922ZbKLV8UTT4zib4FPgXMhgzUny0bfDDkLXAVQs3ly3fS4/TN9ROFtb0NFrm04UXFE/Vw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@discoveryjs/json-ext": "0.5.7", - "acorn": "^8.0.4", - "acorn-walk": "^8.0.0", - "commander": "^7.2.0", - "debounce": "^1.2.1", - "escape-string-regexp": "^4.0.0", - "gzip-size": "^6.0.0", - "html-escaper": "^2.0.2", - "opener": "^1.5.2", - "picocolors": "^1.0.0", - "sirv": "^2.0.3", - "ws": "^7.3.1" - }, - "bin": { - "webpack-bundle-analyzer": "lib/bin/analyzer.js" - }, - "engines": { - "node": ">= 10.13.0" - } - }, - "node_modules/webpack-bundle-analyzer/node_modules/@discoveryjs/json-ext": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", - "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/webpack-bundle-analyzer/node_modules/@polka/url": { - "version": "1.0.0-next.29", - "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.29.tgz", - "integrity": "sha512-wwQAWhWSuHaag8c4q/KN/vCoeOJYshAIvMQwD4GpSb3OiZklFfvAgmj0VCBBImRpuF/aFgIRzllXlVX93Jevww==", - "dev": true, - "license": "MIT" - }, - "node_modules/webpack-bundle-analyzer/node_modules/commander": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", - "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 10" - } - }, - "node_modules/webpack-bundle-analyzer/node_modules/sirv": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/sirv/-/sirv-2.0.4.tgz", - "integrity": "sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@polka/url": "^1.0.0-next.24", - "mrmime": "^2.0.0", - "totalist": "^3.0.0" - }, - "engines": { - "node": ">= 10" - } - }, - "node_modules/webpack-bundle-analyzer/node_modules/ws": { - "version": "7.5.11", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.11.tgz", - "integrity": "sha512-zS54Oen9bITtp7kp2XM3AydrCIq1D+HwJOuH+c+e4LfpL/lotP5osijd+UoMnxwAam1GN8R4KtLAyIrIcBNpiA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.3.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, - "node_modules/webpack-cli": { - "version": "4.10.0", - "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.10.0.tgz", - "integrity": "sha512-NLhDfH/h4O6UOy+0LSso42xvYypClINuMNBVVzX4vX98TmTaTUxwRbXdhucbFMd2qLaCTcLq/PdYrvi8onw90w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@discoveryjs/json-ext": "^0.5.0", - "@webpack-cli/configtest": "^1.2.0", - "@webpack-cli/info": "^1.5.0", - "@webpack-cli/serve": "^1.7.0", - "colorette": "^2.0.14", - "commander": "^7.0.0", - "cross-spawn": "^7.0.3", - "fastest-levenshtein": "^1.0.12", - "import-local": "^3.0.2", - "interpret": "^2.2.0", - "rechoir": "^0.7.0", - "webpack-merge": "^5.7.3" - }, - "bin": { - "webpack-cli": "bin/cli.js" - }, - "engines": { - "node": ">=10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "4.x.x || 5.x.x" - }, - "peerDependenciesMeta": { - "@webpack-cli/generators": { - "optional": true - }, - "@webpack-cli/migrate": { - "optional": true - }, - "webpack-bundle-analyzer": { - "optional": true - }, - "webpack-dev-server": { - "optional": true - } - } - }, - "node_modules/webpack-cli/node_modules/@discoveryjs/json-ext": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", - "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/webpack-cli/node_modules/commander": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", - "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 10" - } - }, - "node_modules/webpack-cli/node_modules/interpret": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-2.2.0.tgz", - "integrity": "sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/webpack-cli/node_modules/rechoir": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.1.tgz", - "integrity": "sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==", - "dev": true, - "license": "MIT", - "dependencies": { - "resolve": "^1.9.0" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/webpack-cli/node_modules/webpack-merge": { - "version": "5.10.0", - "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.10.0.tgz", - "integrity": "sha512-+4zXKdx7UnO+1jaN4l2lHVD+mFvnlZQP/6ljaJVb4SZiwIKeUnrT5l0gkT8z+n4hKpC+jpOv6O9R+gLtag7pSA==", - "dev": true, - "license": "MIT", - "dependencies": { - "clone-deep": "^4.0.1", - "flat": "^5.0.2", - "wildcard": "^2.0.0" - }, - "engines": { - "node": ">=10.0.0" - } - }, "node_modules/webpack-dev-middleware": { "version": "7.4.5", "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-7.4.5.tgz", @@ -22643,16 +21711,6 @@ "node": ">=18.0.0" } }, - "node_modules/webpack-shell-plugin-next": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/webpack-shell-plugin-next/-/webpack-shell-plugin-next-2.3.3.tgz", - "integrity": "sha512-3TMY32HKeEiaKqv6o6MSM3sN/G2HgtPWldINI5YkTyY31XB7I/awarZICBoSusbCYwW13oowG+Xrw9zg3mfT7w==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "webpack": "^5.18.0" - } - }, "node_modules/webpack-sources": { "version": "3.3.4", "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.3.4.tgz", diff --git a/package.json b/package.json index f77534bc73..7a7dbbb065 100644 --- a/package.json +++ b/package.json @@ -13,17 +13,17 @@ "// TESTING CODE COVERAGE": "This is the test command which shows how much of the code is covered by tests", "test-coverage": "ng test --no-watch --code-coverage", "release": "set NODE_ENV=production && npm run prod-all", - "dev-all": "npm run build-prepare && webpack --env parts=all && ng build --configuration development && npm run deploy", - "dev-all-and-deploy": "npm run build-prepare && concurrently \"webpack --env parts=all --watch\" npm:dev-main npm:deploy-watch", + "dev-all": "npm run build-prepare && node ./build-helpers/build-parts.js --parts=all && ng build --configuration development && npm run deploy", + "dev-all-and-deploy": "npm run build-prepare && concurrently \"node ./build-helpers/build-parts.js --parts=all --watch\" npm:dev-main npm:deploy-watch", "// RECOMMENDATION 1": "This is probably the most used command: dev-main", "dev-main": "ng build --configuration development --watch", "dev-main-and-deploy": "concurrently npm:dev-main npm:deploy-watch", - "dev-gps": "webpack --env parts=gps --watch", - "dev-wysiwyg": "webpack --env parts=wysiwyg --watch", + "dev-gps": "node ./build-helpers/build-parts.js --parts=gps --watch", + "dev-wysiwyg": "node ./build-helpers/build-parts.js --parts=wysiwyg --watch", "deploy": "node ./build-helpers/copy-to-dnn", "// RECOMMENDATION 2": "This is probably best used with dev-main: deploy-watch", "deploy-watch": "node ./build-helpers/copy-to-dnn --watch", - "prod-all": "npm run build-prepare && webpack --env parts=all --mode=production && npm run prod-main && npm run deploy", + "prod-all": "npm run build-prepare && node ./build-helpers/build-parts.js --parts=all --production && npm run prod-main && npm run deploy", "prod-main": "ng build --configuration production && npm run postbuild", "postbuild": "node ./build-helpers/external-source-maps-main.js", "prod-main-watch": "ng build --configuration production && npm run postbuild --watch", @@ -105,9 +105,7 @@ "@vitest/coverage-v8": "^4.1.0", "chalk": "^4.1.2", "chokidar": "^3.6.0", - "clean-webpack-plugin": "^4.0.0", "concurrently": "^9.1.2", - "copy-webpack-plugin": "^14.0.0", "dependency-cruiser": "^16.10.0", "eslint": "^9.28.0", "eslint-plugin-import": "^2.31.0", @@ -116,16 +114,11 @@ "monaco-editor": "^0.52.2", "papaparse": "^5.5.2", "prettier": "^3.5.3", - "raw-loader": "^4.0.2", "source-map-explorer": "^2.5.3", - "ts-loader": "^9.5.2", "ts-node": "^10.9.2", "typescript": "^6.0.3", - "url-loader": "^4.1.1", "vitest": "^4.1.0", - "webpack": "^5.105.4", - "webpack-bundle-analyzer": "^4.10.2", - "webpack-cli": "^4.10.0", - "webpack-shell-plugin-next": "^2.3.2" + "esbuild": "^0.27.3", + "sass": "^1.99.0" } } diff --git a/projects/eav-ui/src/app/app-administration/app-extensions/app-extensions.ts b/projects/eav-ui/src/app/app-administration/app-extensions/app-extensions.ts index baaceb5036..abbab4b413 100644 --- a/projects/eav-ui/src/app/app-administration/app-extensions/app-extensions.ts +++ b/projects/eav-ui/src/app/app-administration/app-extensions/app-extensions.ts @@ -1,4 +1,3 @@ -import appExtensionMask from '!raw-loader!./app-extension-mask.svg'; import { ColDef, GridOptions } from '@ag-grid-community/core'; import { Component, computed, inject, OnInit, signal } from '@angular/core'; import { MatButtonModule } from '@angular/material/button'; @@ -20,6 +19,7 @@ import { SxcGridModule } from '../../shared/modules/sxc-grid-module/sxc-grid.mod import { DialogRoutingService } from '../../shared/routing/dialog-routing.service'; import { EntityService } from '../../shared/services/entity.service'; import { convertFormToUrl } from '../../shared/url/url-converter'; +import appExtensionMask from './app-extension-mask.svg'; import { AppExtensionsService } from './app-extensions.service'; import { AppExtensionActions } from './extension-actions/extension-actions'; import { DefaultExtensionEdition, Extension } from './extension.model'; diff --git a/projects/eav-ui/src/app/app-administration/views/views.ts b/projects/eav-ui/src/app/app-administration/views/views.ts index cb8346ab62..7b5aae5756 100644 --- a/projects/eav-ui/src/app/app-administration/views/views.ts +++ b/projects/eav-ui/src/app/app-administration/views/views.ts @@ -1,4 +1,4 @@ -import polymorphLogo from '!url-loader!./polymorph-logo.png'; +import polymorphLogo from './polymorph-logo.png'; import { GridOptions } from '@ag-grid-community/core'; import { ChangeDetectorRef, Component, computed, inject, OnInit, signal, ViewContainerRef } from '@angular/core'; import { MatButtonModule } from '@angular/material/button'; diff --git a/projects/eav-ui/src/app/apps-management/sub-dialogs/registration/registration.ts b/projects/eav-ui/src/app/apps-management/sub-dialogs/registration/registration.ts index c9865da891..c078fd3eb4 100644 --- a/projects/eav-ui/src/app/apps-management/sub-dialogs/registration/registration.ts +++ b/projects/eav-ui/src/app/apps-management/sub-dialogs/registration/registration.ts @@ -1,4 +1,4 @@ -import patronsLogo from '!raw-loader!./assets/2sxc-patrons.svg'; +import patronsLogo from './assets/2sxc-patrons.svg'; import { Component, computed, HostBinding, signal, ViewContainerRef } from '@angular/core'; import { MatButtonModule } from '@angular/material/button'; import { MatCardModule } from '@angular/material/card'; diff --git a/projects/eav-ui/src/app/edit/assets/icons/load-icons.service.ts b/projects/eav-ui/src/app/edit/assets/icons/load-icons.service.ts index a657bac9cd..28e1b3ee00 100644 --- a/projects/eav-ui/src/app/edit/assets/icons/load-icons.service.ts +++ b/projects/eav-ui/src/app/edit/assets/icons/load-icons.service.ts @@ -1,20 +1,20 @@ -import appleFilled from '!raw-loader!./2sxc/Material-Icon-Adam-48-filled.svg'; -import appleOutlined from '!raw-loader!./2sxc/Material-Icon-Adam-48-outlined.svg'; -import draftBranch from '!raw-loader!./font-awesome/draft-branch.svg'; -import fileArchive from '!raw-loader!./font-awesome/file-archive.svg'; -import fileAudio from '!raw-loader!./font-awesome/file-audio.svg'; -import fileCode from '!raw-loader!./font-awesome/file-code.svg'; -import fileExcel from '!raw-loader!./font-awesome/file-excel.svg'; -import fileImage from '!raw-loader!./font-awesome/file-image.svg'; -import filePdf from '!raw-loader!./font-awesome/file-pdf.svg'; -import filePowerpoint from '!raw-loader!./font-awesome/file-powerpoint.svg'; -import fileText from '!raw-loader!./font-awesome/file-text.svg'; -import fileVideo from '!raw-loader!./font-awesome/file-video.svg'; -import fileWord from '!raw-loader!./font-awesome/file-word.svg'; -import file from '!raw-loader!./font-awesome/file.svg'; -import folderPlus from '!raw-loader!./font-awesome/folder-plus.svg'; -import folder from '!raw-loader!./font-awesome/folder.svg'; -import sitemap from '!raw-loader!./font-awesome/sitemap.svg'; +import appleFilled from './2sxc/Material-Icon-Adam-48-filled.svg'; +import appleOutlined from './2sxc/Material-Icon-Adam-48-outlined.svg'; +import draftBranch from './font-awesome/draft-branch.svg'; +import fileArchive from './font-awesome/file-archive.svg'; +import fileAudio from './font-awesome/file-audio.svg'; +import fileCode from './font-awesome/file-code.svg'; +import fileExcel from './font-awesome/file-excel.svg'; +import fileImage from './font-awesome/file-image.svg'; +import filePdf from './font-awesome/file-pdf.svg'; +import filePowerpoint from './font-awesome/file-powerpoint.svg'; +import fileText from './font-awesome/file-text.svg'; +import fileVideo from './font-awesome/file-video.svg'; +import fileWord from './font-awesome/file-word.svg'; +import file from './font-awesome/file.svg'; +import folderPlus from './font-awesome/folder-plus.svg'; +import folder from './font-awesome/folder.svg'; +import sitemap from './font-awesome/sitemap.svg'; import { Injectable } from '@angular/core'; import { MatIconRegistry } from '@angular/material/icon'; import { DomSanitizer } from '@angular/platform-browser'; diff --git a/projects/eav-ui/src/app/edit/formulas/designer/intellisense-v2.ts b/projects/eav-ui/src/app/edit/formulas/designer/intellisense-v2.ts index b53c36c8ea..7fa82ad1ab 100644 --- a/projects/eav-ui/src/app/edit/formulas/designer/intellisense-v2.ts +++ b/projects/eav-ui/src/app/edit/formulas/designer/intellisense-v2.ts @@ -8,7 +8,7 @@ import { PickerItem } from '../../fields/picker/models/picker-item.model'; import { FormulaPropsParameters, FormulaRunOneHelpersFactory } from '../formula-run-one-helpers.factory'; // Import the type definitions for intellisense -import editorTypesForIntellisense from '!raw-loader!./editor-intellisense-function-v2.rawts'; +import editorTypesForIntellisense from './editor-intellisense-function-v2.rawts'; export class IntellisenseV2 { /** diff --git a/projects/eav-ui/src/app/shared/icons/index.ts b/projects/eav-ui/src/app/shared/icons/index.ts index d2b718a3b6..66a09bd0b7 100644 --- a/projects/eav-ui/src/app/shared/icons/index.ts +++ b/projects/eav-ui/src/app/shared/icons/index.ts @@ -1,5 +1,5 @@ // Font-Awesome -import codeCurly from '!raw-loader!../../assets/icons/code-curly.svg'; +import codeCurly from '../../assets/icons/code-curly.svg'; export const iconsFontAwesome: Record = { 'code-curly': codeCurly, diff --git a/projects/eav-ui/src/typings.d.ts b/projects/eav-ui/src/typings.d.ts index b4a168286c..469e849510 100644 --- a/projects/eav-ui/src/typings.d.ts +++ b/projects/eav-ui/src/typings.d.ts @@ -9,12 +9,17 @@ declare module "*.json" { export default value; } -declare module '!raw-loader!*' { +declare module '*.svg' { const contents: string; export default contents; } -declare module '!url-loader!*' { +declare module '*.rawts' { + const contents: string; + export default contents; +} + +declare module '*.png' { const urlLoaderContents: string; export default urlLoaderContents; } diff --git a/projects/field-custom-gps/global.d.ts b/projects/field-custom-gps/global.d.ts index f5f22a3fd2..fa997901fb 100644 --- a/projects/field-custom-gps/global.d.ts +++ b/projects/field-custom-gps/global.d.ts @@ -34,8 +34,3 @@ declare module "*.rawts" { const content: string; export default content; } - -declare module "!raw-loader!*" { - const contents: string; - export default contents; -} diff --git a/projects/field-custom-gps/webpack.config.js b/projects/field-custom-gps/webpack.config.js deleted file mode 100644 index c1b76973d4..0000000000 --- a/projects/field-custom-gps/webpack.config.js +++ /dev/null @@ -1,79 +0,0 @@ -const path = require('path'); -const { CleanWebpackPlugin } = require('clean-webpack-plugin'); -const webpack = require('webpack'); -const setExternalSourceMaps = require('../../build-helpers/external-source-maps-elements'); -const multiOutput = require('../../build-helpers/multi-output'); -// const buildConfig = require('@2sic.com/2sxc-load-build-config').BuildConfig; -const buildConfig = require('../../../2sxc-ui/packages/2sxc-load-build-config').BuildConfig; -const distPath = path.resolve(__dirname, '../../dist/extensions/field-custom-gps'); - -/** Checks webpack configuration to remove console.log, not node process.env.NODE_ENV used for external source maps */ -let isProduction = false; -const args = process.argv.slice(2); -args.forEach((val, index) => { - // console.log(`${index}: ${val}`); - if (val === '--mode=production') { - isProduction = true; - } -}); - -const configuration = { - mode: 'development', - entry: ['./projects/field-custom-gps/src/main/main.ts', './projects/field-custom-gps/src/preview/preview.ts'], - plugins: [ - new CleanWebpackPlugin(), - new webpack.DefinePlugin({ - '__PRODUCTION__': JSON.stringify(isProduction), - }), - multiOutput.createCopyAfterBuildPlugin(distPath, [...buildConfig.Sources, ...buildConfig.JsTargets], '/extensions/field-custom-gps'), - ].filter(item => item !== null), - devtool: 'source-map', - module: { - rules: [ - { - test: /\.ts?$/, - use: 'ts-loader', - exclude: /node_modules/ - }, - { - test: /\.html$/i, - use: 'raw-loader', - }, - { - test: /\.css$/, - use: 'raw-loader', - }, - { - test: /\.svg$/, - use: 'raw-loader', - }, - { - test: /\.s[ac]ss$/i, - use: [ - // Use CSS as a string - 'raw-loader', - // Compiles Sass to CSS - { - loader: 'sass-loader', - options: { - implementation: require('sass'), - // sourceMap: true, - }, - }, - ], - }, - ] - }, - resolve: { - extensions: ['.tsx', '.ts', '.js'] - }, - output: { - filename: 'index.js', - path: distPath, - }, -}; - -/* change source map generation based on production mode */ -setExternalSourceMaps(configuration, '/extensions/field-custom-gps/'); - -module.exports = configuration; diff --git a/projects/field-string-wysiwyg/global.d.ts b/projects/field-string-wysiwyg/global.d.ts index 9f2e8eea81..2060726b6a 100644 --- a/projects/field-string-wysiwyg/global.d.ts +++ b/projects/field-string-wysiwyg/global.d.ts @@ -26,8 +26,3 @@ declare module "*.rawts" { const content: string; export default content; } - -declare module "!raw-loader!*" { - const contents: string; - export default contents; -} diff --git a/projects/field-string-wysiwyg/src/editor/load-icons.helper.ts b/projects/field-string-wysiwyg/src/editor/load-icons.helper.ts index db71b0f1ce..2a1f55527c 100644 --- a/projects/field-string-wysiwyg/src/editor/load-icons.helper.ts +++ b/projects/field-string-wysiwyg/src/editor/load-icons.helper.ts @@ -49,14 +49,14 @@ const customTinyMceIcons: Record = { }; // Rich Text Editor Icons -import imageLeft from '!raw-loader!../assets/icons/rich/image-left.svg'; -import imageRight from '!raw-loader!../assets/icons/rich/image-right.svg'; -import imageCenter from '!raw-loader!../assets/icons/rich/image-center.svg'; -import splitter0 from '!raw-loader!../assets/icons/rich/split-0.svg'; -import splitters from '!raw-loader!../assets/icons/rich/split-s.svg'; // todo -import splitterm from '!raw-loader!../assets/icons/rich/split-m.svg'; -import splitterl from '!raw-loader!../assets/icons/rich/split-l.svg'; -// import splitterxl from '!raw-loader!../assets/icons/rich/split-xl.svg'; +import imageLeft from '../assets/icons/rich/Image-left.svg'; +import imageRight from '../assets/icons/rich/Image-right.svg'; +import imageCenter from '../assets/icons/rich/image-center.svg'; +import splitter0 from '../assets/icons/rich/split-0.svg'; +import splitters from '../assets/icons/rich/split-s.svg'; // todo +import splitterm from '../assets/icons/rich/split-m.svg'; +import splitterl from '../assets/icons/rich/split-l.svg'; +// import splitterxl from '../assets/icons/rich/split-xl.svg'; // Rich Text Editor Icons const richIcons = { diff --git a/projects/field-string-wysiwyg/webpack.config.js b/projects/field-string-wysiwyg/webpack.config.js deleted file mode 100644 index 628048330b..0000000000 --- a/projects/field-string-wysiwyg/webpack.config.js +++ /dev/null @@ -1,100 +0,0 @@ -const path = require('path'); -const { CleanWebpackPlugin } = require('clean-webpack-plugin'); -const CopyPlugin = require('copy-webpack-plugin'); -const webpack = require('webpack'); -const setExternalSourceMaps = require('../../build-helpers/external-source-maps-elements'); -const multiOutput = require('../../build-helpers/multi-output'); -// const buildConfig = require('@2sic.com/2sxc-load-build-config').BuildConfig; -const buildConfig = require('../../../2sxc-ui/packages/2sxc-load-build-config').BuildConfig; -const distWysiwyg = path.resolve(__dirname, '../../dist/extensions/field-string-wysiwyg'); - -/** Checks webpack configuration to remove console.log, not node process.env.NODE_ENV used for external source maps */ -let isProduction = false; -const args = process.argv.slice(2); -args.forEach((val, index) => { - // console.log(`${index}: ${val}`); - if (val === '--mode=production') { - isProduction = true; - } -}); - -const configuration = { - mode: 'development', - entry: [ - './projects/field-string-wysiwyg/src/field-string-wysiwyg/field-string-wysiwyg.ts', - './projects/field-string-wysiwyg/src/field-string-wysiwyg/field-string-wysiwyg-preview.ts', - './projects/field-string-wysiwyg/src/field-string-wysiwyg/field-string-wysiwyg-editor.ts', - ], - plugins: [ - new CleanWebpackPlugin(), - new webpack.DefinePlugin({ - '__PRODUCTION__': JSON.stringify(isProduction), - }), - new CopyPlugin({ - patterns: [ - { - from: './projects/field-string-wysiwyg/src/i18n/*.js', - to: './i18n/[name][ext]', - }, - { - from: './projects/field-string-wysiwyg/src/assets/2sxc-tinymce-skin', - to: './', - }, - ], - }), - multiOutput.createCopyAfterBuildPlugin(distWysiwyg, [...buildConfig.Sources, ...buildConfig.JsTargets], './extensions/field-string-wysiwyg'), - ].filter(item => item !== null), - devtool: 'source-map', - module: { - rules: [ - { - test: /\.ts?$/, - use: 'ts-loader', - exclude: /node_modules/ - }, - { - test: /\.html$/i, - use: 'raw-loader', - }, - { - test: /\.css$/, - use: 'raw-loader', - }, - { - test: /\.svg$/, - use: 'raw-loader', - }, - { - test: /\.s[ac]ss$/i, - use: [ - // Use CSS as a string - 'raw-loader', - // Compiles Sass to CSS - { - loader: 'sass-loader', - options: { - implementation: require('sass'), - // sourceMap: true, - }, - }, - ], - }, - ] - }, - resolve: { - extensions: ['.tsx', '.ts', '.js'] - }, - output: { - filename: 'index.js', - path: distWysiwyg, - }, - performance: { - maxEntrypointSize: 1500000, - maxAssetSize: 1500000, - } -}; - -/* change source map generation based on production mode */ -setExternalSourceMaps(configuration, '/extensions/field-string-wysiwyg/'); - -module.exports = configuration; diff --git a/webpack.config.js b/webpack.config.js deleted file mode 100644 index e6bd97e774..0000000000 --- a/webpack.config.js +++ /dev/null @@ -1,30 +0,0 @@ -module.exports = (env) => { - const envParam = 'parts'; - const all = 'all'; - const wysiwyg = 'wysiwyg'; - const gps = 'gps'; - - console.log('===== Will build the parts of the UI ====='); - - if (!env[envParam]) { - throw `Parts parameter missing, please specify something like --env ${envParam}=${all}`; - } - - const parts = env.parts === all - ? [wysiwyg, gps] - : env.parts.split(','); - - const configs = parts.reduce((result, part) => { - if (part === wysiwyg) { - const wysiwygConfig = require('./projects/field-string-wysiwyg/webpack.config.js'); - result.push(wysiwygConfig); - } else if (part === gps) { - const gpsConfig = require('./projects/field-custom-gps/webpack.config.js'); - result.push(gpsConfig); - } - return result; - }, []); - - console.log('Will run', configs.length, 'parts:', parts.join(',')); - return configs; -};