@infomaximum/package-cli 1.4.0-rc → 1.4.0-rc2

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.
@@ -3,6 +3,7 @@ import CopyWebpackPlugin from "copy-webpack-plugin";
3
3
  import { archiveExt, buildWidgetConfigName, widgetArchiveName, } from "./common.js";
4
4
  import path from "path";
5
5
  import { JsonModifyWebpackPlugin } from "@infomaximum/json-modify-webpack-plugin";
6
+ import { require } from "../../utils.js";
6
7
  const packageFilename = "main";
7
8
  export const getPackageConfig = (mode, PATHS) => {
8
9
  const widgetVersion = require(PATHS.appPackageJson).version;
@@ -6,6 +6,7 @@ import TerserWebpackPlugin from "terser-webpack-plugin";
6
6
  import { TsconfigPathsPlugin } from "tsconfig-paths-webpack-plugin";
7
7
  import { JsonModifyWebpackPlugin } from "@infomaximum/json-modify-webpack-plugin";
8
8
  import webpack, {} from "webpack";
9
+ import { require } from "../../utils.js";
9
10
  const { ProgressPlugin } = webpack;
10
11
  const isProduction = (mode) => mode === "production";
11
12
  const isDevelopment = (mode) => mode === "development";
package/dist/paths.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import fs from "node:fs";
2
2
  import path from "node:path";
3
+ import { require } from "./utils.js";
3
4
  const appDirectory = fs.realpathSync(process.cwd());
4
5
  const resolveApp = (relativePath) => path.resolve(appDirectory, relativePath);
5
6
  const moduleFileExtensions = [
package/dist/utils.js CHANGED
@@ -3,6 +3,8 @@ import fs from "node:fs/promises";
3
3
  import path from "node:path";
4
4
  import https from "node:https";
5
5
  import { spawn } from "node:child_process";
6
+ import Module from "node:module";
7
+ export const require = Module.createRequire(import.meta.url);
6
8
  export function capitalizeFirstLetter(str = "") {
7
9
  return str.charAt(0).toUpperCase() + str.slice(1);
8
10
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infomaximum/package-cli",
3
- "version": "1.4.0-rc",
3
+ "version": "1.4.0-rc2",
4
4
  "exports": "./dist/index.js",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",