openmrs 6.3.1-pre.3106 → 6.3.1-pre.3119

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/cli.js CHANGED
@@ -324,6 +324,7 @@ yargs_1.default.command(['start', '$0'], 'Starts the app shell using the provide
324
324
  .describe('open', 'Immediately opens the SPA page URL in the browser.'), (args) => runCommand('runStart', {
325
325
  ...args,
326
326
  }));
327
+ // eslint-disable-next-line @typescript-eslint/no-unused-expressions
327
328
  yargs_1.default
328
329
  .epilog('The SPA assemble config JSON is a JSON file, typically `frontend.json`, which defines parameters for the `build` and `assemble` ' +
329
330
  'commands. The keys used by `build` are:\n' +
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.runAssemble = void 0;
6
+ exports.runAssemble = runAssemble;
7
7
  const promises_1 = require("node:fs/promises");
8
8
  const node_fs_1 = require("node:fs");
9
9
  const node_path_1 = require("node:path");
@@ -52,7 +52,9 @@ async function readConfig(mode, configs, fetchOptions) {
52
52
  // be added back by providing another config override
53
53
  if (Array.isArray(newConfig.frontendModuleExcludes)) {
54
54
  newConfig.frontendModuleExcludes.forEach((exclude) => {
55
- typeof exclude === 'string' && config.frontendModules[exclude] && delete config.frontendModules[exclude];
55
+ if (typeof exclude === 'string' && config.frontendModules[exclude]) {
56
+ delete config.frontendModules[exclude];
57
+ }
56
58
  });
57
59
  }
58
60
  if (newConfig.frontendModules) {
@@ -167,6 +169,7 @@ async function runAssemble(args) {
167
169
  imports: {},
168
170
  };
169
171
  const versionManifest = {
172
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
170
173
  coreVersion: require((0, node_path_1.resolve)(__dirname, '..', '..', 'package.json')).version,
171
174
  frontendModules: {},
172
175
  };
@@ -224,4 +227,3 @@ async function runAssemble(args) {
224
227
  }
225
228
  (0, utils_1.logInfo)(`Finished assembling frontend distribution`);
226
229
  }
227
- exports.runAssemble = runAssemble;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.runBuild = void 0;
3
+ exports.runBuild = runBuild;
4
4
  const fs_1 = require("fs");
5
5
  const utils_1 = require("../utils");
6
6
  const node_path_1 = require("node:path");
@@ -19,6 +19,7 @@ function addConfigFilesFromPaths(configPaths, targetDir) {
19
19
  }
20
20
  }
21
21
  async function runBuild(args) {
22
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
22
23
  const webpack = require('webpack');
23
24
  const buildConfig = loadBuildConfig(args.buildConfig);
24
25
  const configUrls = buildConfig.configUrls || args.configUrls;
@@ -84,10 +85,11 @@ async function runBuild(args) {
84
85
  reject(err ?? new Error(stats?.compilation.errors.toString()));
85
86
  }
86
87
  else {
87
- stats &&
88
+ if (stats) {
88
89
  console.log(stats.toString({
89
90
  colors: true,
90
91
  }));
92
+ }
91
93
  addConfigFilesFromPaths(buildConfig.configPaths || args.configPaths, args.target);
92
94
  (0, utils_1.logInfo)(`Build finished.`);
93
95
  resolve();
@@ -95,4 +97,3 @@ async function runBuild(args) {
95
97
  });
96
98
  });
97
99
  }
98
- exports.runBuild = runBuild;
@@ -1,9 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.runDebug = void 0;
3
+ exports.runDebug = runDebug;
4
4
  const utils_1 = require("../utils");
5
5
  function runDebug(args) {
6
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
6
7
  const webpack = require('webpack');
8
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
7
9
  const WebpackDevServer = require('webpack-dev-server');
8
10
  const config = (0, utils_1.loadWebpackConfig)({
9
11
  importmap: args.importmap,
@@ -35,4 +37,3 @@ function runDebug(args) {
35
37
  });
36
38
  return new Promise(() => { });
37
39
  }
38
- exports.runDebug = runDebug;
@@ -15,18 +15,28 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  var __importDefault = (this && this.__importDefault) || function (mod) {
26
36
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
37
  };
28
38
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.runDevelop = void 0;
39
+ exports.runDevelop = runDevelop;
30
40
  const express_1 = __importDefault(require("express"));
31
41
  const http_proxy_middleware_1 = require("http-proxy-middleware");
32
42
  const node_path_1 = require("node:path");
@@ -151,4 +161,3 @@ async function runDevelop(args) {
151
161
  });
152
162
  return new Promise(() => { });
153
163
  }
154
- exports.runDevelop = runDevelop;
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.runStart = void 0;
6
+ exports.runStart = runStart;
7
7
  const express_1 = __importDefault(require("express"));
8
8
  const http_proxy_middleware_1 = require("http-proxy-middleware");
9
9
  const node_path_1 = require("node:path");
@@ -32,6 +32,7 @@ function runStart(args) {
32
32
  (0, utils_1.logInfo)(`Listening at http://${host}:${port}`);
33
33
  (0, utils_1.logInfo)(`SPA available at ${pageUrl}`);
34
34
  if (open) {
35
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
35
36
  const open = require('open');
36
37
  open(pageUrl, { wait: false }).catch(() => {
37
38
  (0, utils_1.logWarn)(`Unable to open "${pageUrl}" in browser. If you are running in a headless environment, please do not use the --open flag.`);
@@ -40,4 +41,3 @@ function runStart(args) {
40
41
  });
41
42
  return new Promise(() => { });
42
43
  }
43
- exports.runStart = runStart;
package/dist/index.js CHANGED
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  Object.defineProperty(exports, "__esModule", { value: true });
26
36
  exports.commands = void 0;
27
37
  const commands = __importStar(require("./commands"));
package/dist/runner.js CHANGED
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  Object.defineProperty(exports, "__esModule", { value: true });
26
36
  const commands = __importStar(require("./commands"));
27
37
  const utils_1 = require("./utils");
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.loadWebpackConfig = void 0;
3
+ exports.loadWebpackConfig = loadWebpackConfig;
4
4
  const variables_1 = require("./variables");
5
5
  function loadWebpackConfig(options = {}) {
6
6
  const variables = {};
@@ -65,4 +65,3 @@ function loadWebpackConfig(options = {}) {
65
65
  }
66
66
  return config;
67
67
  }
68
- exports.loadWebpackConfig = loadWebpackConfig;
@@ -1,13 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getAppRoutes = exports.getMainBundle = exports.getSharedDependencies = void 0;
3
+ exports.getSharedDependencies = getSharedDependencies;
4
+ exports.getMainBundle = getMainBundle;
5
+ exports.getAppRoutes = getAppRoutes;
4
6
  const node_path_1 = require("node:path");
5
7
  const node_fs_1 = require("node:fs");
6
8
  const semver_1 = require("semver");
7
9
  function getSharedDependencies() {
10
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
8
11
  return require('@openmrs/esm-app-shell/dependencies.json');
9
12
  }
10
- exports.getSharedDependencies = getSharedDependencies;
11
13
  function getMainBundle(project) {
12
14
  const file = project.browser || project.module || project.main;
13
15
  if (!Boolean(file)) {
@@ -19,7 +21,6 @@ function getMainBundle(project) {
19
21
  dir: (0, node_path_1.dirname)(file),
20
22
  };
21
23
  }
22
- exports.getMainBundle = getMainBundle;
23
24
  function getAppRoutes(sourceDirectory, project) {
24
25
  const routesPath = (0, node_path_1.resolve)(sourceDirectory, 'src', 'routes.json');
25
26
  if (!(0, node_fs_1.existsSync)(routesPath)) {
@@ -36,4 +37,3 @@ function getAppRoutes(sourceDirectory, project) {
36
37
  json['version'] = project.version ? (0, semver_1.inc)(project.version, 'prerelease', 'local') : undefined;
37
38
  return json;
38
39
  }
39
- exports.getAppRoutes = getAppRoutes;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.startDevServer = void 0;
3
+ exports.startDevServer = startDevServer;
4
4
  const path_1 = require("path");
5
5
  const child_process_1 = require("child_process");
6
6
  function startDevServer(source, port, cwd = process.cwd(), useRspack = false) {
@@ -9,4 +9,3 @@ function startDevServer(source, port, cwd = process.cwd(), useRspack = false) {
9
9
  ps.send({ source, port, useRspack });
10
10
  return ps;
11
11
  }
12
- exports.startDevServer = startDevServer;
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.contentHash = exports.removeTrailingSlash = exports.trimEnd = void 0;
3
+ exports.trimEnd = trimEnd;
4
+ exports.removeTrailingSlash = removeTrailingSlash;
5
+ exports.contentHash = contentHash;
4
6
  const webpack_1 = require("webpack");
5
7
  function trimEnd(text, chr) {
6
8
  while (text.endsWith(chr)) {
@@ -8,15 +10,12 @@ function trimEnd(text, chr) {
8
10
  }
9
11
  return text;
10
12
  }
11
- exports.trimEnd = trimEnd;
12
13
  function removeTrailingSlash(path) {
13
14
  const i = path.length - 1;
14
15
  return path[i] === '/' ? removeTrailingSlash(path.slice(0, i)) : path;
15
16
  }
16
- exports.removeTrailingSlash = removeTrailingSlash;
17
17
  function contentHash(obj) {
18
18
  const hash = webpack_1.util.createHash('xxhash64');
19
19
  hash.update(JSON.stringify(obj), 'UTF-8');
20
20
  return hash.digest().toString('hex');
21
21
  }
22
- exports.contentHash = contentHash;
@@ -3,7 +3,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.proxyImportmapAndRoutes = exports.getRoutes = exports.getImportMap = exports.getImportmapAndRoutes = exports.mergeImportmapAndRoutes = exports.runProject = exports.checkRoutesJson = exports.checkImportmapJson = void 0;
6
+ exports.checkImportmapJson = checkImportmapJson;
7
+ exports.checkRoutesJson = checkRoutesJson;
8
+ exports.runProject = runProject;
9
+ exports.mergeImportmapAndRoutes = mergeImportmapAndRoutes;
10
+ exports.getImportmapAndRoutes = getImportmapAndRoutes;
11
+ exports.getImportMap = getImportMap;
12
+ exports.getRoutes = getRoutes;
13
+ exports.proxyImportmapAndRoutes = proxyImportmapAndRoutes;
7
14
  const axios_1 = __importDefault(require("axios"));
8
15
  const glob_1 = __importDefault(require("glob"));
9
16
  const node_url_1 = require("node:url");
@@ -81,7 +88,6 @@ function checkImportmapJson(value) {
81
88
  return false;
82
89
  }
83
90
  }
84
- exports.checkImportmapJson = checkImportmapJson;
85
91
  function checkRoutesJson(value) {
86
92
  try {
87
93
  const content = JSON.parse(value);
@@ -92,7 +98,6 @@ function checkRoutesJson(value) {
92
98
  return false;
93
99
  }
94
100
  }
95
- exports.checkRoutesJson = checkRoutesJson;
96
101
  async function matchAny(baseDir, patterns) {
97
102
  const matches = [];
98
103
  await Promise.all(patterns.map((pattern) => new Promise((resolve, reject) => {
@@ -139,6 +144,7 @@ async function runProject(basePort, sourceDirectoryPatterns, useRspack) {
139
144
  (0, logger_1.logFail)(`No "package.json" found in directory "${sourceDirectory}". Skipping ...`);
140
145
  continue;
141
146
  }
147
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
142
148
  const project = require(projectFile);
143
149
  const startup = project['openmrs:develop'];
144
150
  if ((0, node_fs_1.existsSync)(routesFile)) {
@@ -172,7 +178,6 @@ async function runProject(basePort, sourceDirectoryPatterns, useRspack) {
172
178
  (0, logger_1.logInfo)(`Assembled dynamic import map and routes for packages (${Object.keys(importMap).join(', ')}).`);
173
179
  return { importMap, routes, watchedRoutesPaths };
174
180
  }
175
- exports.runProject = runProject;
176
181
  /**
177
182
  * @param importAndRoutes An ImportmapAndRoutes object that holds the current import map and routes registries
178
183
  * @param additionalImportsAndRoutes An object containing any import map entries, routes, and watched route files to add to the setup
@@ -211,13 +216,11 @@ async function mergeImportmapAndRoutes(importAndRoutes, additionalImportsAndRout
211
216
  }
212
217
  return { importMap: importDecl, routes: routesDecl, watchedRoutesPaths };
213
218
  }
214
- exports.mergeImportmapAndRoutes = mergeImportmapAndRoutes;
215
219
  async function getImportmapAndRoutes(importMapPath, routesPath, basePort) {
216
220
  return Promise.all([getImportMap(importMapPath, basePort), getRoutes(routesPath)]).then(([importMap, routes]) => {
217
221
  return { importMap, routes };
218
222
  });
219
223
  }
220
- exports.getImportmapAndRoutes = getImportmapAndRoutes;
221
224
  async function getImportMap(importMapPath, basePort) {
222
225
  if (importMapPath === '@' && basePort) {
223
226
  (0, logger_1.logWarn)('Using the "@" import map is deprecated. Switch to use the "--run-project" flag.');
@@ -254,7 +257,6 @@ async function getImportMap(importMapPath, basePort) {
254
257
  value: importMapPath,
255
258
  };
256
259
  }
257
- exports.getImportMap = getImportMap;
258
260
  async function getRoutes(routesPath) {
259
261
  if (!/https?:\/\//.test(routesPath)) {
260
262
  const path = (0, node_path_1.resolve)(process.cwd(), routesPath);
@@ -281,7 +283,6 @@ async function getRoutes(routesPath) {
281
283
  value: routesPath,
282
284
  };
283
285
  }
284
- exports.getRoutes = getRoutes;
285
286
  /**
286
287
  * @param importmapAndRoutes An ImportmapAndRoutes object that holds the import map and routes registry
287
288
  * @param backend The URL for the backend
@@ -309,4 +310,3 @@ function proxyImportmapAndRoutes(importmapAndRoutes, backend, spaPath) {
309
310
  importMapDecl.value = JSON.stringify(importmap);
310
311
  return { importmap: importMapDecl, routes: routesDecl, watchedRoutesPaths };
311
312
  }
312
- exports.proxyImportmapAndRoutes = proxyImportmapAndRoutes;
@@ -3,18 +3,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.logFail = exports.logWarn = exports.logInfo = void 0;
6
+ exports.logInfo = logInfo;
7
+ exports.logWarn = logWarn;
8
+ exports.logFail = logFail;
7
9
  /* eslint-disable no-console */
8
10
  const chalk_1 = __importDefault(require("chalk"));
9
11
  function logInfo(message) {
10
12
  console.log(`${chalk_1.default.green.bold('[openmrs]')} ${message}`);
11
13
  }
12
- exports.logInfo = logInfo;
13
14
  function logWarn(message) {
14
15
  console.warn(`${chalk_1.default.yellow.bold('[openmrs]')} ${chalk_1.default.yellow(message)}`);
15
16
  }
16
- exports.logWarn = logWarn;
17
17
  function logFail(message) {
18
18
  console.error(`${chalk_1.default.red.bold('[openmrs]')} ${chalk_1.default.red(message)}`);
19
19
  }
20
- exports.logFail = logFail;
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getNpmRegistryConfiguration = void 0;
6
+ exports.getNpmRegistryConfiguration = getNpmRegistryConfiguration;
7
7
  const npm_conf_1 = __importDefault(require("@pnpm/npm-conf"));
8
8
  /**
9
9
  * Utility function to load the appropriate configuration for npmRegistryFetch
@@ -44,4 +44,3 @@ function getNpmRegistryConfiguration(registry) {
44
44
  }
45
45
  return configuration;
46
46
  }
47
- exports.getNpmRegistryConfiguration = getNpmRegistryConfiguration;
@@ -15,15 +15,25 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.untar = void 0;
36
+ exports.untar = untar;
27
37
  const tar = __importStar(require("tar"));
28
38
  const zlib_1 = require("zlib");
29
39
  const TarParser = tar.Parse;
@@ -46,4 +56,3 @@ function untar(stream) {
46
56
  .on('end', () => resolve(files));
47
57
  });
48
58
  }
49
- exports.untar = untar;
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.setEnvVariables = void 0;
3
+ exports.setEnvVariables = setEnvVariables;
4
4
  function setEnvVariables(envVariables) {
5
5
  Object.keys(envVariables).forEach((key) => {
6
6
  process.env[key] = envVariables[key];
7
7
  });
8
8
  }
9
- exports.setEnvVariables = setEnvVariables;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openmrs",
3
- "version": "6.3.1-pre.3106",
3
+ "version": "6.3.1-pre.3119",
4
4
  "license": "MPL-2.0",
5
5
  "main": "dist/index.js",
6
6
  "bin": "./dist/cli.js",
@@ -29,9 +29,9 @@
29
29
  ],
30
30
  "homepage": "https://github.com/openmrs/openmrs-esm-core#readme",
31
31
  "dependencies": {
32
- "@openmrs/esm-app-shell": "6.3.1-pre.3106",
33
- "@openmrs/rspack-config": "6.3.1-pre.3106",
34
- "@openmrs/webpack-config": "6.3.1-pre.3106",
32
+ "@openmrs/esm-app-shell": "6.3.1-pre.3119",
33
+ "@openmrs/rspack-config": "6.3.1-pre.3119",
34
+ "@openmrs/webpack-config": "6.3.1-pre.3119",
35
35
  "@pnpm/npm-conf": "^2.1.0",
36
36
  "@rspack/cli": "^1.3.11",
37
37
  "@rspack/core": "^1.3.11",
@@ -64,7 +64,7 @@
64
64
  "style-loader": "^3.3.4",
65
65
  "swc-loader": "^0.2.6",
66
66
  "tar": "^6.0.5",
67
- "typescript": "^4.7.0",
67
+ "typescript": "^5.8.3",
68
68
  "webpack": "^5.99.9",
69
69
  "webpack-bundle-analyzer": "^4.10.2",
70
70
  "webpack-cli": "^6.0.1",
package/src/cli.ts CHANGED
@@ -398,6 +398,7 @@ yargs.command(
398
398
  }),
399
399
  );
400
400
 
401
+ // eslint-disable-next-line @typescript-eslint/no-unused-expressions
401
402
  yargs
402
403
  .epilog(
403
404
  'The SPA assemble config JSON is a JSON file, typically `frontend.json`, which defines parameters for the `build` and `assemble` ' +
@@ -93,7 +93,9 @@ async function readConfig(
93
93
  // be added back by providing another config override
94
94
  if (Array.isArray(newConfig.frontendModuleExcludes)) {
95
95
  newConfig.frontendModuleExcludes.forEach((exclude) => {
96
- typeof exclude === 'string' && config.frontendModules[exclude] && delete config.frontendModules[exclude];
96
+ if (typeof exclude === 'string' && config.frontendModules[exclude]) {
97
+ delete config.frontendModules[exclude];
98
+ }
97
99
  });
98
100
  }
99
101
 
@@ -239,6 +241,7 @@ export async function runAssemble(args: AssembleArgs) {
239
241
  };
240
242
 
241
243
  const versionManifest = {
244
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
242
245
  coreVersion: require(resolve(__dirname, '..', '..', 'package.json')).version,
243
246
  frontendModules: {},
244
247
  };
@@ -53,6 +53,7 @@ function addConfigFilesFromPaths(configPaths: Array<string>, targetDir: string)
53
53
  }
54
54
 
55
55
  export async function runBuild(args: BuildArgs) {
56
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
56
57
  const webpack: WebpackExport = require('webpack');
57
58
  const buildConfig = loadBuildConfig(args.buildConfig);
58
59
  const configUrls = buildConfig.configUrls || args.configUrls;
@@ -135,12 +136,13 @@ export async function runBuild(args: BuildArgs) {
135
136
  if (err || stats?.hasErrors()) {
136
137
  reject(err ?? new Error(stats?.compilation.errors.toString()));
137
138
  } else {
138
- stats &&
139
+ if (stats) {
139
140
  console.log(
140
141
  stats.toString({
141
142
  colors: true,
142
143
  }),
143
144
  );
145
+ }
144
146
 
145
147
  addConfigFilesFromPaths(buildConfig.configPaths || args.configPaths, args.target);
146
148
 
@@ -14,7 +14,9 @@ export interface DebugArgs {
14
14
  }
15
15
 
16
16
  export function runDebug(args: DebugArgs) {
17
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
17
18
  const webpack = require('webpack');
19
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
18
20
  const WebpackDevServer = require('webpack-dev-server');
19
21
 
20
22
  const config = loadWebpackConfig({
@@ -43,6 +43,7 @@ export function runStart(args: StartArgs) {
43
43
  logInfo(`SPA available at ${pageUrl}`);
44
44
 
45
45
  if (open) {
46
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
46
47
  const open = require('open');
47
48
 
48
49
  open(pageUrl, { wait: false }).catch(() => {
@@ -92,6 +92,7 @@ export function loadWebpackConfig(options: WebpackOptions = {}) {
92
92
 
93
93
  const config:
94
94
  | ((env: Record<string, unknown>) => WebpackConfig)
95
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
95
96
  | WebpackConfig = require('@openmrs/esm-app-shell/webpack.config.js');
96
97
 
97
98
  if (typeof config === 'function') {
@@ -22,6 +22,7 @@ function loadConfig(configPath: string): WebpackConfiguration | RspackConfigurat
22
22
  const content:
23
23
  | WebpackConfiguration
24
24
  | RspackConfiguration
25
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
25
26
  | ((env: Record<string, unknown>) => WebpackConfiguration | RspackConfiguration) = require(configPath);
26
27
  if (typeof content === 'function') {
27
28
  return content(getWebpackEnv());
@@ -3,6 +3,7 @@ import { existsSync, readFileSync, statSync } from 'node:fs';
3
3
  import { inc } from 'semver';
4
4
 
5
5
  export function getSharedDependencies() {
6
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
6
7
  return require('@openmrs/esm-app-shell/dependencies.json');
7
8
  }
8
9
 
@@ -199,6 +199,7 @@ export async function runProject(
199
199
  continue;
200
200
  }
201
201
 
202
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
202
203
  const project = require(projectFile);
203
204
  const startup = project['openmrs:develop'];
204
205