openmrs 3.4.1-pre.96 → 4.0.0-pre.1

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,2 +1,2 @@
1
- openmrs:build: cache hit, replaying output 727901e651b6322b
1
+ openmrs:build: cache hit, replaying output cd5076ecbe50729d
2
2
  openmrs:build: $ tsc
@@ -0,0 +1,2 @@
1
+ openmrs:lint: cache hit, replaying output e5a5815e893fb907
2
+ openmrs:lint: $ eslint src --ext ts,tsx
@@ -0,0 +1,3 @@
1
+ openmrs:test: cache hit, replaying output b220e87c82fda659
2
+ openmrs:test: $ jest --passWithNoTests
3
+ openmrs:test: No tests found, exiting with code 0
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.4.1-pre.96",
3
+ "version": "4.0.0-pre.1",
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": "^3.4.1-pre.96",
37
- "@openmrs/webpack-config": "^3.4.1-pre.96",
38
- "@types/react": "^16.9.46",
39
- "@types/systemjs": "^6.1.0",
36
+ "@openmrs/esm-app-shell": "^4.0.0-pre.1",
37
+ "@openmrs/webpack-config": "^4.0.0-pre.1",
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": "593214cd88408e07e9c18eab4c204be4a3722c73"
71
+ "gitHead": "9f58b801f07526083a9edc1cc5a1e58660d71eb0"
72
72
  }