@openmrs/esm-offline 6.3.1-pre.3106 → 6.3.1-pre.3124

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,3 +1,3 @@
1
- [0] Successfully compiled: 11 files with swc (141.13ms)
1
+ [0] Successfully compiled: 11 files with swc (106.36ms)
2
2
  [0] swc --strip-leading-paths src -d dist exited with code 0
3
3
  [1] tsc --project tsconfig.build.json exited with code 0
@@ -22,13 +22,13 @@ export interface DynamicOfflineDataHandler {
22
22
  * of this single handler.
23
23
  * If `false`, the handler would have to (re-)sync the data in order for offline mode to properly work.
24
24
  * @param identifier The identifier of the offline data. See {@link DynamicOfflineData} for details.
25
- * @param abortSignal An {@link AbortSignal} which can be used to cancel the operation.
25
+ * @param abortSignal An `AbortSignal` which can be used to cancel the operation.
26
26
  */
27
27
  isSynced(identifier: string, abortSignal?: AbortSignal): Promise<boolean>;
28
28
  /**
29
29
  * Synchronizes the given offline data.
30
30
  * @param identifier The identifier of the offline data. See {@link DynamicOfflineData} for details.
31
- * @param abortSignal An {@link AbortSignal} which can be used to cancel the operation.
31
+ * @param abortSignal An `AbortSignal` which can be used to cancel the operation.
32
32
  */
33
33
  sync(identifier: string, abortSignal?: AbortSignal): Promise<void>;
34
34
  }
@@ -144,13 +144,13 @@ export declare function removeDynamicOfflineDataFor(userId: string, type: string
144
144
  /**
145
145
  * Synchronizes all offline data entries of the given {@link type} for the currently logged in user.
146
146
  * @param type The type of the offline data. See {@link DynamicOfflineData} for details.
147
- * @param abortSignal An {@link AbortSignal} which can be used to cancel the operation.
147
+ * @param abortSignal An `AbortSignal` which can be used to cancel the operation.
148
148
  */
149
149
  export declare function syncAllDynamicOfflineData(type: string, abortSignal?: AbortSignal): Promise<void>;
150
150
  /**
151
151
  * Synchronizes a single offline data entry of the given {@link type} for the currently logged in user.
152
152
  * @param type The type of the offline data. See {@link DynamicOfflineData} for details.
153
153
  * @param identifier The identifier of the offline data. See {@link DynamicOfflineData} for details.
154
- * @param abortSignal An {@link AbortSignal} which can be used to cancel the operation.
154
+ * @param abortSignal An `AbortSignal` which can be used to cancel the operation.
155
155
  */
156
156
  export declare function syncDynamicOfflineData(type: string, identifier: string, abortSignal?: AbortSignal): Promise<void>;
@@ -113,7 +113,7 @@ const dynamicOfflineDataHandlers = {};
113
113
  /**
114
114
  * Synchronizes all offline data entries of the given {@link type} for the currently logged in user.
115
115
  * @param type The type of the offline data. See {@link DynamicOfflineData} for details.
116
- * @param abortSignal An {@link AbortSignal} which can be used to cancel the operation.
116
+ * @param abortSignal An `AbortSignal` which can be used to cancel the operation.
117
117
  */ export async function syncAllDynamicOfflineData(type, abortSignal) {
118
118
  const dataEntriesToSync = await getDynamicOfflineDataEntries(type);
119
119
  await Promise.all(dataEntriesToSync.map(async (entry)=>syncDynamicOfflineData(entry.type, entry.identifier, abortSignal)));
@@ -122,7 +122,7 @@ const dynamicOfflineDataHandlers = {};
122
122
  * Synchronizes a single offline data entry of the given {@link type} for the currently logged in user.
123
123
  * @param type The type of the offline data. See {@link DynamicOfflineData} for details.
124
124
  * @param identifier The identifier of the offline data. See {@link DynamicOfflineData} for details.
125
- * @param abortSignal An {@link AbortSignal} which can be used to cancel the operation.
125
+ * @param abortSignal An `AbortSignal` which can be used to cancel the operation.
126
126
  */ export async function syncDynamicOfflineData(type, identifier, abortSignal) {
127
127
  // If this function is called without the offline data being registered, we're implicitly doing
128
128
  // that instead of throwing. This mitigates race conditions with user input and generally
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmrs/esm-offline",
3
- "version": "6.3.1-pre.3106",
3
+ "version": "6.3.1-pre.3124",
4
4
  "license": "MPL-2.0",
5
5
  "description": "Helper utilities for OpenMRS",
6
6
  "type": "module",
@@ -60,9 +60,9 @@
60
60
  "workbox-window": "^6.1.5"
61
61
  },
62
62
  "devDependencies": {
63
- "@openmrs/esm-api": "6.3.1-pre.3106",
64
- "@openmrs/esm-globals": "6.3.1-pre.3106",
65
- "@openmrs/esm-state": "6.3.1-pre.3106",
63
+ "@openmrs/esm-api": "6.3.1-pre.3124",
64
+ "@openmrs/esm-globals": "6.3.1-pre.3124",
65
+ "@openmrs/esm-state": "6.3.1-pre.3124",
66
66
  "@swc/cli": "^0.7.7",
67
67
  "@swc/core": "^1.11.29",
68
68
  "@types/uuid": "^9.0.1",
@@ -27,13 +27,13 @@ export interface DynamicOfflineDataHandler {
27
27
  * of this single handler.
28
28
  * If `false`, the handler would have to (re-)sync the data in order for offline mode to properly work.
29
29
  * @param identifier The identifier of the offline data. See {@link DynamicOfflineData} for details.
30
- * @param abortSignal An {@link AbortSignal} which can be used to cancel the operation.
30
+ * @param abortSignal An `AbortSignal` which can be used to cancel the operation.
31
31
  */
32
32
  isSynced(identifier: string, abortSignal?: AbortSignal): Promise<boolean>;
33
33
  /**
34
34
  * Synchronizes the given offline data.
35
35
  * @param identifier The identifier of the offline data. See {@link DynamicOfflineData} for details.
36
- * @param abortSignal An {@link AbortSignal} which can be used to cancel the operation.
36
+ * @param abortSignal An `AbortSignal` which can be used to cancel the operation.
37
37
  */
38
38
  sync(identifier: string, abortSignal?: AbortSignal): Promise<void>;
39
39
  }
@@ -236,7 +236,7 @@ export async function removeDynamicOfflineDataFor(userId: string, type: string,
236
236
  /**
237
237
  * Synchronizes all offline data entries of the given {@link type} for the currently logged in user.
238
238
  * @param type The type of the offline data. See {@link DynamicOfflineData} for details.
239
- * @param abortSignal An {@link AbortSignal} which can be used to cancel the operation.
239
+ * @param abortSignal An `AbortSignal` which can be used to cancel the operation.
240
240
  */
241
241
  export async function syncAllDynamicOfflineData(type: string, abortSignal?: AbortSignal): Promise<void> {
242
242
  const dataEntriesToSync = await getDynamicOfflineDataEntries(type);
@@ -249,7 +249,7 @@ export async function syncAllDynamicOfflineData(type: string, abortSignal?: Abor
249
249
  * Synchronizes a single offline data entry of the given {@link type} for the currently logged in user.
250
250
  * @param type The type of the offline data. See {@link DynamicOfflineData} for details.
251
251
  * @param identifier The identifier of the offline data. See {@link DynamicOfflineData} for details.
252
- * @param abortSignal An {@link AbortSignal} which can be used to cancel the operation.
252
+ * @param abortSignal An `AbortSignal` which can be used to cancel the operation.
253
253
  */
254
254
  export async function syncDynamicOfflineData(
255
255
  type: string,
@@ -30,6 +30,7 @@ export interface OnImportMapChangedMessage extends OmrsServiceWorkerMessage<'onI
30
30
  importMap: ImportMap;
31
31
  }
32
32
 
33
+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type
33
34
  export interface ClearDynamicRoutesMessage extends OmrsServiceWorkerMessage<'clearDynamicRoutes'> {}
34
35
 
35
36
  export interface RegisterDynamicRouteMessage extends OmrsServiceWorkerMessage<'registerDynamicRoute'> {