openmrs 3.3.2-pre.9 → 4.0.0-pre.0
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/.turbo/turbo-build.log +1 -1
- package/.turbo/turbo-lint.log +2 -0
- package/.turbo/turbo-test.log +3 -0
- package/dist/cli.js +0 -0
- package/dist/commands/serve.js +24 -0
- package/dist/utils/webpackServer.js +43 -0
- package/package.json +6 -6
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
[36mopenmrs:build: [0mcache hit, replaying output [
|
|
1
|
+
[36mopenmrs:build: [0mcache hit, replaying output [2m993b6d9a8dbe6dab[0m
|
|
2
2
|
[36mopenmrs:build: [0m$ tsc
|
package/dist/cli.js
CHANGED
|
File without changes
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.runServe = void 0;
|
|
13
|
+
const path_1 = require("path");
|
|
14
|
+
const webpackServer_1 = require("../utils/webpackServer");
|
|
15
|
+
function runServe({ sourceDirectory, port }) {
|
|
16
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
17
|
+
console.log("run the traaap");
|
|
18
|
+
const baseDir = process.env.INIT_CWD || process.cwd();
|
|
19
|
+
const configPath = (0, path_1.resolve)(baseDir, sourceDirectory, "webpack.config.js");
|
|
20
|
+
console.log("config at", configPath);
|
|
21
|
+
(0, webpackServer_1.debug)(configPath, port);
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
exports.runServe = runServe;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.debug = void 0;
|
|
13
|
+
const path_1 = require("path");
|
|
14
|
+
const logger_1 = require("./logger");
|
|
15
|
+
function getWebpackEnv() {
|
|
16
|
+
return Object.assign(Object.assign({}, process.env), { analyze: process.env.BUNDLE_ANALYZE === "true", production: process.env.NODE_ENV === "production", development: process.env.NODE_ENV === "development" });
|
|
17
|
+
}
|
|
18
|
+
function loadConfig(configPath) {
|
|
19
|
+
const content = require(configPath);
|
|
20
|
+
if (typeof content === "function") {
|
|
21
|
+
return content(getWebpackEnv());
|
|
22
|
+
}
|
|
23
|
+
return content;
|
|
24
|
+
}
|
|
25
|
+
function debug(configPath, port) {
|
|
26
|
+
const webpack = require("webpack");
|
|
27
|
+
const WebpackDevServer = require("webpack-dev-server");
|
|
28
|
+
const config = loadConfig(configPath);
|
|
29
|
+
const options = Object.assign(Object.assign({}, config.devServer), { host: "localhost", port, static: (0, path_1.dirname)(configPath) });
|
|
30
|
+
console.log("debugger.ts: starting dev server with options", options);
|
|
31
|
+
console.log(" and config", config);
|
|
32
|
+
const server = new WebpackDevServer(webpack(config), options);
|
|
33
|
+
(() => __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
try {
|
|
35
|
+
yield server.start();
|
|
36
|
+
}
|
|
37
|
+
catch (err) {
|
|
38
|
+
(0, logger_1.logWarn)(`Error: ${err}`);
|
|
39
|
+
}
|
|
40
|
+
(0, logger_1.logInfo)(`Listening at http://localhost:${port}`);
|
|
41
|
+
}))();
|
|
42
|
+
}
|
|
43
|
+
exports.debug = debug;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openmrs",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0-pre.0",
|
|
4
4
|
"license": "MPL-2.0",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -33,10 +33,8 @@
|
|
|
33
33
|
"homepage": "https://github.com/openmrs/openmrs-esm-core#readme",
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@babel/preset-typescript": "^7.16.7",
|
|
36
|
-
"@openmrs/esm-app-shell": "^
|
|
37
|
-
"@openmrs/webpack-config": "^
|
|
38
|
-
"@types/react": "^16.9.46",
|
|
39
|
-
"@types/systemjs": "^6.1.0",
|
|
36
|
+
"@openmrs/esm-app-shell": "^4.0.0-pre.0",
|
|
37
|
+
"@openmrs/webpack-config": "^4.0.0-pre.0",
|
|
40
38
|
"autoprefixer": "^10.4.2",
|
|
41
39
|
"axios": "^0.21.1",
|
|
42
40
|
"browserslist-config-openmrs": "^1.0.1",
|
|
@@ -65,8 +63,10 @@
|
|
|
65
63
|
"@types/glob": "^7.1.1",
|
|
66
64
|
"@types/inquirer": "^6.5.0",
|
|
67
65
|
"@types/node": "12.12.2",
|
|
66
|
+
"@types/react": "^18.0.9",
|
|
68
67
|
"@types/rimraf": "^2.0.2",
|
|
68
|
+
"@types/systemjs": "^6.1.0",
|
|
69
69
|
"@types/tar": "^4.0.3"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "254a7226212aac82df4434639b2584e24ac240e4"
|
|
72
72
|
}
|