openmrs 6.3.1-pre.3105 → 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' +
@@ -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
  };
@@ -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();
@@ -3,7 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
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,
@@ -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.`);
@@ -7,6 +7,7 @@ const node_path_1 = require("node:path");
7
7
  const node_fs_1 = require("node:fs");
8
8
  const semver_1 = require("semver");
9
9
  function getSharedDependencies() {
10
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
10
11
  return require('@openmrs/esm-app-shell/dependencies.json');
11
12
  }
12
13
  function getMainBundle(project) {
@@ -144,6 +144,7 @@ async function runProject(basePort, sourceDirectoryPatterns, useRspack) {
144
144
  (0, logger_1.logFail)(`No "package.json" found in directory "${sourceDirectory}". Skipping ...`);
145
145
  continue;
146
146
  }
147
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
147
148
  const project = require(projectFile);
148
149
  const startup = project['openmrs:develop'];
149
150
  if ((0, node_fs_1.existsSync)(routesFile)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openmrs",
3
- "version": "6.3.1-pre.3105",
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.3105",
33
- "@openmrs/rspack-config": "6.3.1-pre.3105",
34
- "@openmrs/webpack-config": "6.3.1-pre.3105",
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",
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