@openmrs/esm-api 5.5.0 → 5.5.1-pre.1651

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,14 +1,14 @@
1
- @openmrs/esm-api:build: cache hit, replaying output 33ab08d27237bd5b
2
- @openmrs/esm-api:build: asset openmrs-esm-api.js 53.2 KiB [emitted] [minimized] (name: main) 2 related assets
3
- @openmrs/esm-api:build: orphan modules 440 KiB [orphan] 237 modules
4
- @openmrs/esm-api:build: runtime modules 670 bytes 3 modules
5
- @openmrs/esm-api:build: built modules 139 KiB [built]
6
- @openmrs/esm-api:build:  modules by path external "@openmrs/ 168 bytes
7
- @openmrs/esm-api:build:  external "@openmrs/esm-config" 42 bytes [built] [code generated]
8
- @openmrs/esm-api:build:  external "@openmrs/esm-navigation" 42 bytes [built] [code generated]
9
- @openmrs/esm-api:build:  external "@openmrs/esm-error-handling" 42 bytes [built] [code generated]
10
- @openmrs/esm-api:build:  external "@openmrs/esm-offline" 42 bytes [built] [code generated]
11
- @openmrs/esm-api:build:  cacheable modules 139 KiB
12
- @openmrs/esm-api:build:  ./src/index.ts + 51 modules 135 KiB [built] [code generated]
13
- @openmrs/esm-api:build:  ../esm-state/dist/openmrs-esm-state.js 4.17 KiB [built] [code generated]
14
- @openmrs/esm-api:build: webpack 5.88.0 compiled successfully in 4044 ms
1
+ @openmrs/esm-api:build: cache hit, replaying output b8e8d1a0c1fe31bb
2
+ @openmrs/esm-api:build: asset openmrs-esm-api.js 53.2 KiB [emitted] [minimized] (name: main) 2 related assets
3
+ @openmrs/esm-api:build: orphan modules 440 KiB [orphan] 237 modules
4
+ @openmrs/esm-api:build: runtime modules 670 bytes 3 modules
5
+ @openmrs/esm-api:build: built modules 139 KiB [built]
6
+ @openmrs/esm-api:build:  modules by path external "@openmrs/ 168 bytes
7
+ @openmrs/esm-api:build:  external "@openmrs/esm-config" 42 bytes [built] [code generated]
8
+ @openmrs/esm-api:build:  external "@openmrs/esm-navigation" 42 bytes [built] [code generated]
9
+ @openmrs/esm-api:build:  external "@openmrs/esm-error-handling" 42 bytes [built] [code generated]
10
+ @openmrs/esm-api:build:  external "@openmrs/esm-offline" 42 bytes [built] [code generated]
11
+ @openmrs/esm-api:build:  cacheable modules 139 KiB
12
+ @openmrs/esm-api:build:  ./src/index.ts + 51 modules 135 KiB [built] [code generated]
13
+ @openmrs/esm-api:build:  ../esm-state/dist/openmrs-esm-state.js 4.17 KiB [built] [code generated]
14
+ @openmrs/esm-api:build: webpack 5.88.0 compiled successfully in 4220 ms
package/mock.ts ADDED
@@ -0,0 +1,27 @@
1
+ import { of } from 'rxjs';
2
+ import { type SessionStore } from '@openmrs/esm-api';
3
+ import { createGlobalStore } from '@openmrs/esm-state/mock';
4
+
5
+ export const setSessionLocation = jest.fn(() => Promise.resolve());
6
+ export const openmrsFetch = jest.fn((url?: string) => new Promise(() => {}));
7
+ export const openmrsObservableFetch = jest.fn(() => of({ data: { entry: [] } }));
8
+ export function getCurrentUser() {
9
+ return of({ authenticated: false });
10
+ }
11
+ export const mockSessionStore = createGlobalStore<SessionStore>('mock-session-store', {
12
+ loaded: false,
13
+ session: null,
14
+ });
15
+ export const getSessionStore = jest.fn(() => mockSessionStore);
16
+ export const setCurrentVisit = jest.fn();
17
+ export const newWorkspaceItem = jest.fn();
18
+ export const restBaseURL = '/ws/rest/v1';
19
+ export const fhirBaseUrl = '/ws/fhir2/R4';
20
+ export const attachmentUrl = '/ws/rest/v1/attachment';
21
+ export const getAttachmentByUuid = jest.fn();
22
+ export const getAttachments = jest.fn();
23
+ export const createAttachment = jest.fn();
24
+ export const deleteAttachmentPermanently = jest.fn();
25
+ export const clearCurrentUser = jest.fn();
26
+ export const refetchCurrentUser = jest.fn();
27
+ export const setUserLanguage = jest.fn();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmrs/esm-api",
3
- "version": "5.5.0",
3
+ "version": "5.5.1-pre.1651",
4
4
  "license": "MPL-2.0",
5
5
  "description": "The javascript module for interacting with the OpenMRS API",
6
6
  "browser": "dist/openmrs-esm-api.js",
@@ -48,11 +48,12 @@
48
48
  "@openmrs/esm-offline": "5.x"
49
49
  },
50
50
  "devDependencies": {
51
- "@openmrs/esm-config": "5.5.0",
52
- "@openmrs/esm-error-handling": "5.5.0",
53
- "@openmrs/esm-navigation": "5.5.0",
54
- "@openmrs/esm-state": "5.5.0",
51
+ "@openmrs/esm-config": "5.5.1-pre.1651",
52
+ "@openmrs/esm-error-handling": "5.5.1-pre.1651",
53
+ "@openmrs/esm-navigation": "5.5.1-pre.1651",
54
+ "@openmrs/esm-state": "5.5.1-pre.1651",
55
55
  "rxjs": "^6.5.3",
56
56
  "webpack": "^5.88.0"
57
- }
57
+ },
58
+ "stableVersion": "5.5.0"
58
59
  }