openmrs 4.0.3-pre.360 → 4.0.3-pre.365

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 bd871d2d12300da5
1
+ openmrs:build: cache hit, replaying output 53de9e747d745244
@@ -29,8 +29,9 @@ function runDevelop(args) {
29
29
  </script>
30
30
  `)
31
31
  .replace(/href="\/openmrs\/spa/g, `href="${spaPath}`)
32
- .replace(/src="\/openmrs\/spa/g, `src="${spaPath}`);
33
- const pageUrl = `http://${host}:${port}${spaPath}/`;
32
+ .replace(/src="\/openmrs\/spa/g, `src="${spaPath}`)
33
+ .replace(/https:\/\/dev3.openmrs.org\/openmrs\/spa\/importmap\.json/g, `http://${host}:${port}${spaPath}/importmap.json`);
34
+ const pageUrl = `http://${host}:${port}${spaPath}`;
34
35
  // Set up routes. Note that different middlewares have different rules
35
36
  // about route precedence.
36
37
  //
@@ -43,14 +44,11 @@ function runDevelop(args) {
43
44
  // extension.
44
45
  const indexHtmlPathMatcher = new RegExp(`^${spaPath}/(?!.*\\.js$)(?!.*\\.woff2?$)(?!.*\\.json$)(?!.*\\....$).*$`);
45
46
  // Route for custom `importmap.json` goes above static assets
46
- app.get(`${spaPath}/importmap.json`, (_, res) => {
47
- if (importmap.type === "inline") {
47
+ if (importmap.type === "inline") {
48
+ app.get(`${spaPath}/importmap.json`, (_, res) => {
48
49
  res.contentType("application/json").send(importmap.value);
49
- }
50
- else {
51
- res.redirect(importmap.value);
52
- }
53
- });
50
+ });
51
+ }
54
52
  // Route for custom `index.html` goes above static assets
55
53
  app.get(indexHtmlPathMatcher, (_, res) => res.contentType("text/html").send(indexContent));
56
54
  // Return static assets for any request for which we have one, except importmap.json and index.html
@@ -30,7 +30,7 @@ function readImportmap(path, backend, spaPath) {
30
30
  else if (path === "importmap.json") {
31
31
  if (backend && spaPath) {
32
32
  try {
33
- return yield fetchRemoteImportmap(`${backend}/${spaPath}/importmap.json`);
33
+ return yield fetchRemoteImportmap(`${backend}${spaPath}importmap.json`);
34
34
  }
35
35
  catch (_a) { }
36
36
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openmrs",
3
- "version": "4.0.3-pre.360",
3
+ "version": "4.0.3-pre.365",
4
4
  "license": "MPL-2.0",
5
5
  "main": "dist/index.js",
6
6
  "bin": "./dist/cli.js",
@@ -30,8 +30,8 @@
30
30
  ],
31
31
  "homepage": "https://github.com/openmrs/openmrs-esm-core#readme",
32
32
  "dependencies": {
33
- "@openmrs/esm-app-shell": "4.0.3-pre.360",
34
- "@openmrs/webpack-config": "4.0.3-pre.360",
33
+ "@openmrs/esm-app-shell": "4.0.3-pre.365",
34
+ "@openmrs/webpack-config": "4.0.3-pre.365",
35
35
  "autoprefixer": "^10.4.2",
36
36
  "axios": "^0.21.1",
37
37
  "browserslist-config-openmrs": "^1.0.1",
@@ -65,5 +65,5 @@
65
65
  "@types/systemjs": "^6.1.0",
66
66
  "@types/tar": "^4.0.3"
67
67
  },
68
- "gitHead": "b0c3780034a2253b7a0b09efbe165e415ad24efe"
68
+ "gitHead": "a9fec7419126ebd2e9339889d982c7acf4a0de2c"
69
69
  }
@@ -50,9 +50,13 @@ export function runDevelop(args: DevelopArgs) {
50
50
  `
51
51
  )
52
52
  .replace(/href="\/openmrs\/spa/g, `href="${spaPath}`)
53
- .replace(/src="\/openmrs\/spa/g, `src="${spaPath}`);
53
+ .replace(/src="\/openmrs\/spa/g, `src="${spaPath}`)
54
+ .replace(
55
+ /https:\/\/dev3.openmrs.org\/openmrs\/spa\/importmap\.json/g,
56
+ `http://${host}:${port}${spaPath}/importmap.json`
57
+ );
54
58
 
55
- const pageUrl = `http://${host}:${port}${spaPath}/`;
59
+ const pageUrl = `http://${host}:${port}${spaPath}`;
56
60
 
57
61
  // Set up routes. Note that different middlewares have different rules
58
62
  // about route precedence.
@@ -70,13 +74,11 @@ export function runDevelop(args: DevelopArgs) {
70
74
  );
71
75
 
72
76
  // Route for custom `importmap.json` goes above static assets
73
- app.get(`${spaPath}/importmap.json`, (_, res) => {
74
- if (importmap.type === "inline") {
77
+ if (importmap.type === "inline") {
78
+ app.get(`${spaPath}/importmap.json`, (_, res) => {
75
79
  res.contentType("application/json").send(importmap.value);
76
- } else {
77
- res.redirect(importmap.value);
78
- }
79
- });
80
+ });
81
+ }
80
82
 
81
83
  // Route for custom `index.html` goes above static assets
82
84
  app.get(indexHtmlPathMatcher, (_, res) =>
@@ -15,9 +15,7 @@ async function readImportmap(path: string, backend?: string, spaPath?: string) {
15
15
  } else if (path === "importmap.json") {
16
16
  if (backend && spaPath) {
17
17
  try {
18
- return await fetchRemoteImportmap(
19
- `${backend}/${spaPath}/importmap.json`
20
- );
18
+ return await fetchRemoteImportmap(`${backend}${spaPath}importmap.json`);
21
19
  } catch {}
22
20
  }
23
21