openmrs 4.0.1 → 4.0.2-pre.259

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.
@@ -1 +1 @@
1
- openmrs:build: cache hit, replaying output 99151aa99c5fb526
1
+ openmrs:build: cache hit, replaying output 398c2e0c3f7ffa98
package/README.md CHANGED
@@ -4,7 +4,7 @@ The one stop CLI for using the OpenMRS 3.0 Frontend app.
4
4
 
5
5
  ## Prerequisites
6
6
 
7
- You need Node.js with NPM. We recommend using version 10.18 (LTS) or later.
7
+ You need Node.js with NPM. We recommend using version 16.17 (LTS) or later.
8
8
 
9
9
  ## Installation
10
10
 
@@ -14,7 +14,7 @@ function runDevelop(args) {
14
14
  const apiUrl = (0, utils_1.removeTrailingSlash)(args.apiUrl);
15
15
  const spaPath = (0, utils_1.removeTrailingSlash)(args.spaPath);
16
16
  const app = (0, express_1.default)();
17
- const source = (0, path_1.resolve)(require.resolve("@openmrs/esm-app-shell/package.json"), "..", "lib");
17
+ const source = (0, path_1.resolve)(require.resolve("@openmrs/esm-app-shell/package.json"), "..", "dist");
18
18
  const index = (0, path_1.resolve)(source, "index.html");
19
19
  const indexContent = (0, fs_1.readFileSync)(index, "utf8")
20
20
  .replace(RegExp("<script>[\\s\\S]+</script>"), `
@@ -13,18 +13,14 @@ function loadConfig(configPath) {
13
13
  return content;
14
14
  }
15
15
  function debug(configPath, port) {
16
- const webpack = require("webpack");
16
+ const Webpack = require("webpack");
17
17
  const WebpackDevServer = require("webpack-dev-server");
18
18
  const config = loadConfig(configPath);
19
- const options = Object.assign(Object.assign({}, config.devServer), { port, static: (0, path_1.dirname)(configPath) });
20
- const server = new WebpackDevServer(webpack(config), options);
21
- server.listen(port, "localhost", (err) => {
22
- if (err) {
23
- (0, logger_1.logWarn)(`Error: ${err}`);
24
- }
25
- else {
26
- (0, logger_1.logInfo)(`Listening at http://localhost:${port}`);
27
- }
19
+ const compiler = Webpack(config);
20
+ const devServerOptions = Object.assign(Object.assign({}, config.devServer), { port, static: (0, path_1.dirname)(configPath) });
21
+ const server = new WebpackDevServer(devServerOptions, compiler);
22
+ server.startCallback(() => {
23
+ (0, logger_1.logInfo)(`Listening at http://localhost:${port}`);
28
24
  });
29
25
  }
30
26
  process.on("message", ({ source, port }) => debug(source, port));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openmrs",
3
- "version": "4.0.1",
3
+ "version": "4.0.2-pre.259",
4
4
  "license": "MPL-2.0",
5
5
  "main": "dist/index.js",
6
6
  "bin": "./dist/cli.js",
@@ -30,15 +30,14 @@
30
30
  ],
31
31
  "homepage": "https://github.com/openmrs/openmrs-esm-core#readme",
32
32
  "dependencies": {
33
- "@babel/preset-typescript": "^7.16.7",
34
- "@openmrs/esm-app-shell": "*",
35
- "@openmrs/webpack-config": "*",
33
+ "@openmrs/esm-app-shell": "4.0.2-pre.259",
34
+ "@openmrs/webpack-config": "4.0.2-pre.259",
36
35
  "autoprefixer": "^10.4.2",
37
36
  "axios": "^0.21.1",
38
37
  "browserslist-config-openmrs": "^1.0.1",
39
38
  "copy-webpack-plugin": "^10.0.0",
40
39
  "cssnano": "^5.0.16",
41
- "ejs": "^2.6.2",
40
+ "ejs": "^3.1.8",
42
41
  "glob": "^7.1.3",
43
42
  "html-webpack-plugin": "^5.5.0",
44
43
  "inquirer": "^7.3.3",
@@ -49,9 +48,9 @@
49
48
  "tar": "^6.0.5",
50
49
  "ts-loader": "^9.2.6",
51
50
  "typescript": "~4.5.2",
52
- "webpack": "^5.64.0",
53
- "webpack-cli": "^4.9.1",
54
- "webpack-dev-server": "^4.6.0",
51
+ "webpack": "^5.74.0",
52
+ "webpack-cli": "^4.10.0",
53
+ "webpack-dev-server": "^4.10.1",
55
54
  "webpack-pwa-manifest": "^4.3.0",
56
55
  "workbox-webpack-plugin": "^6.4.1",
57
56
  "yargs": "16.0.3"
@@ -66,5 +65,5 @@
66
65
  "@types/systemjs": "^6.1.0",
67
66
  "@types/tar": "^4.0.3"
68
67
  },
69
- "gitHead": "1bb3ee4d7988fe53aa09cf6b59e5fce712ff9c8a"
68
+ "gitHead": "3eea90227e75ec2c366e8c5f1ba9dbd5b070375b"
70
69
  }
@@ -31,7 +31,7 @@ export function runDevelop(args: DevelopArgs) {
31
31
  const source = resolve(
32
32
  require.resolve("@openmrs/esm-app-shell/package.json"),
33
33
  "..",
34
- "lib"
34
+ "dist"
35
35
  );
36
36
  const index = resolve(source, "index.html");
37
37
  const indexContent = readFileSync(index, "utf8")
@@ -19,24 +19,21 @@ function loadConfig(configPath: string) {
19
19
  }
20
20
 
21
21
  function debug(configPath: string, port: number) {
22
- const webpack = require("webpack");
22
+ const Webpack = require("webpack");
23
23
  const WebpackDevServer = require("webpack-dev-server");
24
24
  const config = loadConfig(configPath);
25
25
 
26
- const options = {
26
+ const compiler = Webpack(config);
27
+ const devServerOptions = {
27
28
  ...config.devServer,
28
29
  port,
29
30
  static: dirname(configPath),
30
31
  };
31
32
 
32
- const server = new WebpackDevServer(webpack(config), options);
33
+ const server = new WebpackDevServer(devServerOptions, compiler);
33
34
 
34
- server.listen(port, "localhost", (err?: Error) => {
35
- if (err) {
36
- logWarn(`Error: ${err}`);
37
- } else {
38
- logInfo(`Listening at http://localhost:${port}`);
39
- }
35
+ server.startCallback(() => {
36
+ logInfo(`Listening at http://localhost:${port}`);
40
37
  });
41
38
  }
42
39