openmrs 6.3.1-pre.3104 → 6.3.1-pre.3106

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,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 = runAssemble;
6
+ exports.runAssemble = void 0;
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");
@@ -224,3 +224,4 @@ async function runAssemble(args) {
224
224
  }
225
225
  (0, utils_1.logInfo)(`Finished assembling frontend distribution`);
226
226
  }
227
+ exports.runAssemble = runAssemble;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.runBuild = runBuild;
3
+ exports.runBuild = void 0;
4
4
  const fs_1 = require("fs");
5
5
  const utils_1 = require("../utils");
6
6
  const node_path_1 = require("node:path");
@@ -95,3 +95,4 @@ async function runBuild(args) {
95
95
  });
96
96
  });
97
97
  }
98
+ exports.runBuild = runBuild;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.runDebug = runDebug;
3
+ exports.runDebug = void 0;
4
4
  const utils_1 = require("../utils");
5
5
  function runDebug(args) {
6
6
  const webpack = require('webpack');
@@ -35,3 +35,4 @@ function runDebug(args) {
35
35
  });
36
36
  return new Promise(() => { });
37
37
  }
38
+ exports.runDebug = runDebug;
@@ -15,28 +15,18 @@ 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 () {
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
- })();
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
+ };
35
25
  var __importDefault = (this && this.__importDefault) || function (mod) {
36
26
  return (mod && mod.__esModule) ? mod : { "default": mod };
37
27
  };
38
28
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.runDevelop = runDevelop;
29
+ exports.runDevelop = void 0;
40
30
  const express_1 = __importDefault(require("express"));
41
31
  const http_proxy_middleware_1 = require("http-proxy-middleware");
42
32
  const node_path_1 = require("node:path");
@@ -161,3 +151,4 @@ async function runDevelop(args) {
161
151
  });
162
152
  return new Promise(() => { });
163
153
  }
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 = runStart;
6
+ exports.runStart = void 0;
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");
@@ -40,3 +40,4 @@ function runStart(args) {
40
40
  });
41
41
  return new Promise(() => { });
42
42
  }
43
+ exports.runStart = runStart;
package/dist/index.js CHANGED
@@ -15,23 +15,13 @@ 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 () {
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
- })();
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
+ };
35
25
  Object.defineProperty(exports, "__esModule", { value: true });
36
26
  exports.commands = void 0;
37
27
  const commands = __importStar(require("./commands"));
package/dist/runner.js CHANGED
@@ -15,23 +15,13 @@ 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 () {
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
- })();
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
+ };
35
25
  Object.defineProperty(exports, "__esModule", { value: true });
36
26
  const commands = __importStar(require("./commands"));
37
27
  const utils_1 = require("./utils");
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.loadWebpackConfig = loadWebpackConfig;
3
+ exports.loadWebpackConfig = void 0;
4
4
  const variables_1 = require("./variables");
5
5
  function loadWebpackConfig(options = {}) {
6
6
  const variables = {};
@@ -65,3 +65,4 @@ function loadWebpackConfig(options = {}) {
65
65
  }
66
66
  return config;
67
67
  }
68
+ exports.loadWebpackConfig = loadWebpackConfig;
@@ -1,14 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getSharedDependencies = getSharedDependencies;
4
- exports.getMainBundle = getMainBundle;
5
- exports.getAppRoutes = getAppRoutes;
3
+ exports.getAppRoutes = exports.getMainBundle = exports.getSharedDependencies = void 0;
6
4
  const node_path_1 = require("node:path");
7
5
  const node_fs_1 = require("node:fs");
8
6
  const semver_1 = require("semver");
9
7
  function getSharedDependencies() {
10
8
  return require('@openmrs/esm-app-shell/dependencies.json');
11
9
  }
10
+ exports.getSharedDependencies = getSharedDependencies;
12
11
  function getMainBundle(project) {
13
12
  const file = project.browser || project.module || project.main;
14
13
  if (!Boolean(file)) {
@@ -20,6 +19,7 @@ function getMainBundle(project) {
20
19
  dir: (0, node_path_1.dirname)(file),
21
20
  };
22
21
  }
22
+ exports.getMainBundle = getMainBundle;
23
23
  function getAppRoutes(sourceDirectory, project) {
24
24
  const routesPath = (0, node_path_1.resolve)(sourceDirectory, 'src', 'routes.json');
25
25
  if (!(0, node_fs_1.existsSync)(routesPath)) {
@@ -36,3 +36,4 @@ function getAppRoutes(sourceDirectory, project) {
36
36
  json['version'] = project.version ? (0, semver_1.inc)(project.version, 'prerelease', 'local') : undefined;
37
37
  return json;
38
38
  }
39
+ exports.getAppRoutes = getAppRoutes;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.startDevServer = startDevServer;
3
+ exports.startDevServer = void 0;
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,3 +9,4 @@ 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,8 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.trimEnd = trimEnd;
4
- exports.removeTrailingSlash = removeTrailingSlash;
5
- exports.contentHash = contentHash;
3
+ exports.contentHash = exports.removeTrailingSlash = exports.trimEnd = void 0;
6
4
  const webpack_1 = require("webpack");
7
5
  function trimEnd(text, chr) {
8
6
  while (text.endsWith(chr)) {
@@ -10,12 +8,15 @@ function trimEnd(text, chr) {
10
8
  }
11
9
  return text;
12
10
  }
11
+ exports.trimEnd = trimEnd;
13
12
  function removeTrailingSlash(path) {
14
13
  const i = path.length - 1;
15
14
  return path[i] === '/' ? removeTrailingSlash(path.slice(0, i)) : path;
16
15
  }
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,14 +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.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;
6
+ exports.proxyImportmapAndRoutes = exports.getRoutes = exports.getImportMap = exports.getImportmapAndRoutes = exports.mergeImportmapAndRoutes = exports.runProject = exports.checkRoutesJson = exports.checkImportmapJson = void 0;
14
7
  const axios_1 = __importDefault(require("axios"));
15
8
  const glob_1 = __importDefault(require("glob"));
16
9
  const node_url_1 = require("node:url");
@@ -88,6 +81,7 @@ function checkImportmapJson(value) {
88
81
  return false;
89
82
  }
90
83
  }
84
+ exports.checkImportmapJson = checkImportmapJson;
91
85
  function checkRoutesJson(value) {
92
86
  try {
93
87
  const content = JSON.parse(value);
@@ -98,6 +92,7 @@ function checkRoutesJson(value) {
98
92
  return false;
99
93
  }
100
94
  }
95
+ exports.checkRoutesJson = checkRoutesJson;
101
96
  async function matchAny(baseDir, patterns) {
102
97
  const matches = [];
103
98
  await Promise.all(patterns.map((pattern) => new Promise((resolve, reject) => {
@@ -177,6 +172,7 @@ async function runProject(basePort, sourceDirectoryPatterns, useRspack) {
177
172
  (0, logger_1.logInfo)(`Assembled dynamic import map and routes for packages (${Object.keys(importMap).join(', ')}).`);
178
173
  return { importMap, routes, watchedRoutesPaths };
179
174
  }
175
+ exports.runProject = runProject;
180
176
  /**
181
177
  * @param importAndRoutes An ImportmapAndRoutes object that holds the current import map and routes registries
182
178
  * @param additionalImportsAndRoutes An object containing any import map entries, routes, and watched route files to add to the setup
@@ -215,11 +211,13 @@ async function mergeImportmapAndRoutes(importAndRoutes, additionalImportsAndRout
215
211
  }
216
212
  return { importMap: importDecl, routes: routesDecl, watchedRoutesPaths };
217
213
  }
214
+ exports.mergeImportmapAndRoutes = mergeImportmapAndRoutes;
218
215
  async function getImportmapAndRoutes(importMapPath, routesPath, basePort) {
219
216
  return Promise.all([getImportMap(importMapPath, basePort), getRoutes(routesPath)]).then(([importMap, routes]) => {
220
217
  return { importMap, routes };
221
218
  });
222
219
  }
220
+ exports.getImportmapAndRoutes = getImportmapAndRoutes;
223
221
  async function getImportMap(importMapPath, basePort) {
224
222
  if (importMapPath === '@' && basePort) {
225
223
  (0, logger_1.logWarn)('Using the "@" import map is deprecated. Switch to use the "--run-project" flag.');
@@ -256,6 +254,7 @@ async function getImportMap(importMapPath, basePort) {
256
254
  value: importMapPath,
257
255
  };
258
256
  }
257
+ exports.getImportMap = getImportMap;
259
258
  async function getRoutes(routesPath) {
260
259
  if (!/https?:\/\//.test(routesPath)) {
261
260
  const path = (0, node_path_1.resolve)(process.cwd(), routesPath);
@@ -282,6 +281,7 @@ async function getRoutes(routesPath) {
282
281
  value: routesPath,
283
282
  };
284
283
  }
284
+ exports.getRoutes = getRoutes;
285
285
  /**
286
286
  * @param importmapAndRoutes An ImportmapAndRoutes object that holds the import map and routes registry
287
287
  * @param backend The URL for the backend
@@ -309,3 +309,4 @@ function proxyImportmapAndRoutes(importmapAndRoutes, backend, spaPath) {
309
309
  importMapDecl.value = JSON.stringify(importmap);
310
310
  return { importmap: importMapDecl, routes: routesDecl, watchedRoutesPaths };
311
311
  }
312
+ exports.proxyImportmapAndRoutes = proxyImportmapAndRoutes;
@@ -3,17 +3,18 @@ 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.logInfo = logInfo;
7
- exports.logWarn = logWarn;
8
- exports.logFail = logFail;
6
+ exports.logFail = exports.logWarn = exports.logInfo = void 0;
9
7
  /* eslint-disable no-console */
10
8
  const chalk_1 = __importDefault(require("chalk"));
11
9
  function logInfo(message) {
12
10
  console.log(`${chalk_1.default.green.bold('[openmrs]')} ${message}`);
13
11
  }
12
+ exports.logInfo = logInfo;
14
13
  function logWarn(message) {
15
14
  console.warn(`${chalk_1.default.yellow.bold('[openmrs]')} ${chalk_1.default.yellow(message)}`);
16
15
  }
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 = getNpmRegistryConfiguration;
6
+ exports.getNpmRegistryConfiguration = void 0;
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,3 +44,4 @@ function getNpmRegistryConfiguration(registry) {
44
44
  }
45
45
  return configuration;
46
46
  }
47
+ exports.getNpmRegistryConfiguration = getNpmRegistryConfiguration;
@@ -15,25 +15,15 @@ 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 () {
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
- })();
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
+ };
35
25
  Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.untar = untar;
26
+ exports.untar = void 0;
37
27
  const tar = __importStar(require("tar"));
38
28
  const zlib_1 = require("zlib");
39
29
  const TarParser = tar.Parse;
@@ -56,3 +46,4 @@ function untar(stream) {
56
46
  .on('end', () => resolve(files));
57
47
  });
58
48
  }
49
+ exports.untar = untar;
@@ -1,8 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.setEnvVariables = setEnvVariables;
3
+ exports.setEnvVariables = void 0;
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.3104",
3
+ "version": "6.3.1-pre.3106",
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.3104",
33
- "@openmrs/rspack-config": "6.3.1-pre.3104",
34
- "@openmrs/webpack-config": "6.3.1-pre.3104",
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",
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": "^5.8.3",
67
+ "typescript": "^4.7.0",
68
68
  "webpack": "^5.99.9",
69
69
  "webpack-bundle-analyzer": "^4.10.2",
70
70
  "webpack-cli": "^6.0.1",