@cloudscaile-eng/web-ext-utils 0.0.1 → 0.0.3
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/README.md +59 -1
- package/dist/cs-ext-utils.untrimmed.d.ts +64 -0
- package/dist/index.d.ts +64 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +58 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -57,7 +57,11 @@ import {
|
|
|
57
57
|
toast,
|
|
58
58
|
getUser,
|
|
59
59
|
validateUserPermission,
|
|
60
|
-
triggerLogin
|
|
60
|
+
triggerLogin,
|
|
61
|
+
getCookieConsent,
|
|
62
|
+
updateCookieConsent,
|
|
63
|
+
resetCookieConsent,
|
|
64
|
+
trackAnalyticsEvent
|
|
61
65
|
} from '@cloudscaile-eng/web-ext-utils';
|
|
62
66
|
|
|
63
67
|
// Create extension object
|
|
@@ -91,6 +95,15 @@ const permissions = validateUserPermission(extension, ['payment.refund', 'invent
|
|
|
91
95
|
|
|
92
96
|
// Trigger login with redirect
|
|
93
97
|
triggerLogin(extension, { redirect: '/home/dash' });
|
|
98
|
+
|
|
99
|
+
// Cookie consent
|
|
100
|
+
const consent = getCookieConsent(extension); // { status: 'pending', timestamp: null }
|
|
101
|
+
updateCookieConsent(extension, 'accepted');
|
|
102
|
+
resetCookieConsent(extension);
|
|
103
|
+
|
|
104
|
+
// Track analytics events (no-ops if consent not given)
|
|
105
|
+
trackAnalyticsEvent(extension, 'User', 'Login', 'email');
|
|
106
|
+
trackAnalyticsEvent(extension, 'Purchase', 'Checkout', 'cart', 49);
|
|
94
107
|
```
|
|
95
108
|
|
|
96
109
|
## API Reference
|
|
@@ -112,6 +125,10 @@ Initializes shared resources in the host application.
|
|
|
112
125
|
- `config.validateUserPermission`: Function to validate user permissions.
|
|
113
126
|
- `config.triggerLogin`: Function to trigger login in the host.
|
|
114
127
|
- `config.validateUserPermission`: Function to validate user permissions.
|
|
128
|
+
- `config.getCookieConsent`: Function to retrieve the current cookie consent state.
|
|
129
|
+
- `config.updateCookieConsent`: Function to dispatch consent actions and initialize analytics on acceptance.
|
|
130
|
+
- `config.resetCookieConsent`: Function to reset consent state and stop analytics events.
|
|
131
|
+
- `config.trackAnalyticsEvent`: Function to track an analytics event.
|
|
115
132
|
|
|
116
133
|
#### Returns
|
|
117
134
|
|
|
@@ -240,6 +257,47 @@ Triggers the login process in the host application for the given extension.
|
|
|
240
257
|
|
|
241
258
|
The result of the triggerLogin resource.
|
|
242
259
|
|
|
260
|
+
#### `getCookieConsent(extension)`
|
|
261
|
+
|
|
262
|
+
Returns the current cookie consent state from the host Redux store.
|
|
263
|
+
|
|
264
|
+
**Parameters:**
|
|
265
|
+
|
|
266
|
+
- `extension`: Extension object from `getExtension()`.
|
|
267
|
+
|
|
268
|
+
**Returns:**
|
|
269
|
+
|
|
270
|
+
An object with `status` (`'accepted' | 'declined' | 'pending'`) and `timestamp` (`string | null`).
|
|
271
|
+
|
|
272
|
+
#### `updateCookieConsent(extension, status)`
|
|
273
|
+
|
|
274
|
+
Updates cookie consent by dispatching `acceptConsent` or `declineConsent`. When status is `'accepted'`, also calls `initializeAnalytics` with the tenant's `measurementId`.
|
|
275
|
+
|
|
276
|
+
**Parameters:**
|
|
277
|
+
|
|
278
|
+
- `extension`: Extension object from `getExtension()`.
|
|
279
|
+
- `status`: The consent status to set — `'accepted'` or `'declined'`.
|
|
280
|
+
|
|
281
|
+
#### `resetCookieConsent(extension)`
|
|
282
|
+
|
|
283
|
+
Resets the cookie consent state and stops further analytics events by calling `resetAnalytics()`.
|
|
284
|
+
|
|
285
|
+
**Parameters:**
|
|
286
|
+
|
|
287
|
+
- `extension`: Extension object from `getExtension()`.
|
|
288
|
+
|
|
289
|
+
#### `trackAnalyticsEvent(extension, category, action, label?, value?)`
|
|
290
|
+
|
|
291
|
+
Tracks an analytics event. Silently no-ops if analytics has not been initialized (i.e. consent not yet given).
|
|
292
|
+
|
|
293
|
+
**Parameters:**
|
|
294
|
+
|
|
295
|
+
- `extension`: Extension object from `getExtension()`.
|
|
296
|
+
- `category`: The event category (e.g. `'User'`).
|
|
297
|
+
- `action`: The event action (e.g. `'Login'`).
|
|
298
|
+
- `label`: Optional event label.
|
|
299
|
+
- `value`: Optional numeric event value.
|
|
300
|
+
|
|
243
301
|
## Error Handling
|
|
244
302
|
|
|
245
303
|
- If the host has not initialized resources, individual resource functions will throw an error.
|
|
@@ -19,6 +19,21 @@ export { AxiosRequestConfig }
|
|
|
19
19
|
|
|
20
20
|
export { AxiosResponse }
|
|
21
21
|
|
|
22
|
+
/**
|
|
23
|
+
* Cookie consent state returned by getCookieConsent
|
|
24
|
+
* @public
|
|
25
|
+
*/
|
|
26
|
+
export declare type CookieConsent = {
|
|
27
|
+
status: CookieConsentStatus;
|
|
28
|
+
timestamp: string | null;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Cookie consent status value
|
|
33
|
+
* @public
|
|
34
|
+
*/
|
|
35
|
+
export declare type CookieConsentStatus = 'accepted' | 'declined' | 'pending';
|
|
36
|
+
|
|
22
37
|
export { CssVarsTheme }
|
|
23
38
|
|
|
24
39
|
export { EnhancedStore }
|
|
@@ -51,6 +66,14 @@ export declare interface Extension {
|
|
|
51
66
|
name: string;
|
|
52
67
|
}
|
|
53
68
|
|
|
69
|
+
/**
|
|
70
|
+
* Retrieves the current cookie consent state for the given extension.
|
|
71
|
+
* @param extension - The extension object.
|
|
72
|
+
* @returns The cookie consent state with `status` and `timestamp`.
|
|
73
|
+
* @public
|
|
74
|
+
*/
|
|
75
|
+
export declare function getCookieConsent(extension: Extension): CookieConsent;
|
|
76
|
+
|
|
54
77
|
/**
|
|
55
78
|
* Returns the Event Bus resource for the given extension.
|
|
56
79
|
* @param extension - The extension object.
|
|
@@ -135,6 +158,10 @@ export declare interface HostConfig {
|
|
|
135
158
|
triggerLogin: SharedResources['triggerLogin'];
|
|
136
159
|
theme: SharedResources['theme'];
|
|
137
160
|
initialized?: boolean;
|
|
161
|
+
getCookieConsent: SharedResources['getCookieConsent'];
|
|
162
|
+
updateCookieConsent: SharedResources['updateCookieConsent'];
|
|
163
|
+
resetCookieConsent: SharedResources['resetCookieConsent'];
|
|
164
|
+
trackAnalyticsEvent: SharedResources['trackAnalyticsEvent'];
|
|
138
165
|
}
|
|
139
166
|
|
|
140
167
|
/**
|
|
@@ -150,6 +177,10 @@ export declare interface HostConfig {
|
|
|
150
177
|
* - getUser: Function to get the user information from the host
|
|
151
178
|
* - validateUserPermission: Function to validate user permissions in the host
|
|
152
179
|
* - triggerLogin: Function to trigger login in the host
|
|
180
|
+
* - getCookieConsent: Function to retrieve the current cookie consent state
|
|
181
|
+
* - updateCookieConsent: Function to dispatch consent actions and initialize analytics on acceptance
|
|
182
|
+
* - resetCookieConsent: Function to reset consent state and stop analytics events
|
|
183
|
+
* - trackAnalyticsEvent: Function to track an analytics event
|
|
153
184
|
* @throws Will throw an error if any required configuration is missing
|
|
154
185
|
* @returns Object with method to access shared resources
|
|
155
186
|
* @public
|
|
@@ -193,6 +224,13 @@ export declare type RegisterTranslation = {
|
|
|
193
224
|
*/
|
|
194
225
|
export declare function registerTranslation(extension: Extension, params: RegisterTranslation): boolean;
|
|
195
226
|
|
|
227
|
+
/**
|
|
228
|
+
* Resets the cookie consent state and stops further analytics events for the given extension.
|
|
229
|
+
* @param extension - The extension object.
|
|
230
|
+
* @public
|
|
231
|
+
*/
|
|
232
|
+
export declare function resetCookieConsent(extension: Extension): void;
|
|
233
|
+
|
|
196
234
|
/**
|
|
197
235
|
* Shared resources interface representing data shared between host and micro-frontends
|
|
198
236
|
* @public
|
|
@@ -231,6 +269,10 @@ export declare interface SharedResources {
|
|
|
231
269
|
triggerLogin: (config?: TriggerLoginConfig) => unknown;
|
|
232
270
|
theme: Theme;
|
|
233
271
|
initialized: boolean;
|
|
272
|
+
getCookieConsent: () => CookieConsent;
|
|
273
|
+
updateCookieConsent: (status: CookieConsentStatus) => void;
|
|
274
|
+
resetCookieConsent: () => void;
|
|
275
|
+
trackAnalyticsEvent: (category: string, action: string, label?: string, value?: number) => void;
|
|
234
276
|
}
|
|
235
277
|
|
|
236
278
|
export { StoreEnhancer }
|
|
@@ -256,6 +298,18 @@ export declare function toast(extension: Extension, message: string, type: Toast
|
|
|
256
298
|
*/
|
|
257
299
|
export declare type ToastType = 'success' | 'error' | 'info' | 'warn';
|
|
258
300
|
|
|
301
|
+
/**
|
|
302
|
+
* Tracks an analytics event for the given extension.
|
|
303
|
+
* Silently no-ops if analytics has not been initialized (consent not given).
|
|
304
|
+
* @param extension - The extension object.
|
|
305
|
+
* @param category - The event category.
|
|
306
|
+
* @param action - The event action.
|
|
307
|
+
* @param label - Optional event label.
|
|
308
|
+
* @param value - Optional numeric event value.
|
|
309
|
+
* @public
|
|
310
|
+
*/
|
|
311
|
+
export declare function trackAnalyticsEvent(extension: Extension, category: string, action: string, label?: string, value?: number): void;
|
|
312
|
+
|
|
259
313
|
/**
|
|
260
314
|
* Triggers the login process in the host application for the given extension.
|
|
261
315
|
* @param extension - The extension object.
|
|
@@ -277,6 +331,16 @@ export { Tuple }
|
|
|
277
331
|
|
|
278
332
|
export { UnknownAction }
|
|
279
333
|
|
|
334
|
+
/**
|
|
335
|
+
* Updates the cookie consent status for the given extension.
|
|
336
|
+
* Dispatches acceptConsent or declineConsent; when accepted, also initializes analytics
|
|
337
|
+
* using the tenant's measurementId.
|
|
338
|
+
* @param extension - The extension object.
|
|
339
|
+
* @param status - The consent status to set ('accepted' or 'declined').
|
|
340
|
+
* @public
|
|
341
|
+
*/
|
|
342
|
+
export declare function updateCookieConsent(extension: Extension, status: CookieConsentStatus): void;
|
|
343
|
+
|
|
280
344
|
/**
|
|
281
345
|
* User information object
|
|
282
346
|
* @public
|
package/dist/index.d.ts
CHANGED
|
@@ -19,6 +19,21 @@ export { AxiosRequestConfig }
|
|
|
19
19
|
|
|
20
20
|
export { AxiosResponse }
|
|
21
21
|
|
|
22
|
+
/**
|
|
23
|
+
* Cookie consent state returned by getCookieConsent
|
|
24
|
+
* @public
|
|
25
|
+
*/
|
|
26
|
+
export declare type CookieConsent = {
|
|
27
|
+
status: CookieConsentStatus;
|
|
28
|
+
timestamp: string | null;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Cookie consent status value
|
|
33
|
+
* @public
|
|
34
|
+
*/
|
|
35
|
+
export declare type CookieConsentStatus = 'accepted' | 'declined' | 'pending';
|
|
36
|
+
|
|
22
37
|
export { CssVarsTheme }
|
|
23
38
|
|
|
24
39
|
export { EnhancedStore }
|
|
@@ -51,6 +66,14 @@ export declare interface Extension {
|
|
|
51
66
|
name: string;
|
|
52
67
|
}
|
|
53
68
|
|
|
69
|
+
/**
|
|
70
|
+
* Retrieves the current cookie consent state for the given extension.
|
|
71
|
+
* @param extension - The extension object.
|
|
72
|
+
* @returns The cookie consent state with `status` and `timestamp`.
|
|
73
|
+
* @public
|
|
74
|
+
*/
|
|
75
|
+
export declare function getCookieConsent(extension: Extension): CookieConsent;
|
|
76
|
+
|
|
54
77
|
/**
|
|
55
78
|
* Returns the Event Bus resource for the given extension.
|
|
56
79
|
* @param extension - The extension object.
|
|
@@ -135,6 +158,10 @@ export declare interface HostConfig {
|
|
|
135
158
|
triggerLogin: SharedResources['triggerLogin'];
|
|
136
159
|
theme: SharedResources['theme'];
|
|
137
160
|
initialized?: boolean;
|
|
161
|
+
getCookieConsent: SharedResources['getCookieConsent'];
|
|
162
|
+
updateCookieConsent: SharedResources['updateCookieConsent'];
|
|
163
|
+
resetCookieConsent: SharedResources['resetCookieConsent'];
|
|
164
|
+
trackAnalyticsEvent: SharedResources['trackAnalyticsEvent'];
|
|
138
165
|
}
|
|
139
166
|
|
|
140
167
|
/**
|
|
@@ -150,6 +177,10 @@ export declare interface HostConfig {
|
|
|
150
177
|
* - getUser: Function to get the user information from the host
|
|
151
178
|
* - validateUserPermission: Function to validate user permissions in the host
|
|
152
179
|
* - triggerLogin: Function to trigger login in the host
|
|
180
|
+
* - getCookieConsent: Function to retrieve the current cookie consent state
|
|
181
|
+
* - updateCookieConsent: Function to dispatch consent actions and initialize analytics on acceptance
|
|
182
|
+
* - resetCookieConsent: Function to reset consent state and stop analytics events
|
|
183
|
+
* - trackAnalyticsEvent: Function to track an analytics event
|
|
153
184
|
* @throws Will throw an error if any required configuration is missing
|
|
154
185
|
* @returns Object with method to access shared resources
|
|
155
186
|
* @public
|
|
@@ -193,6 +224,13 @@ export declare type RegisterTranslation = {
|
|
|
193
224
|
*/
|
|
194
225
|
export declare function registerTranslation(extension: Extension, params: RegisterTranslation): boolean;
|
|
195
226
|
|
|
227
|
+
/**
|
|
228
|
+
* Resets the cookie consent state and stops further analytics events for the given extension.
|
|
229
|
+
* @param extension - The extension object.
|
|
230
|
+
* @public
|
|
231
|
+
*/
|
|
232
|
+
export declare function resetCookieConsent(extension: Extension): void;
|
|
233
|
+
|
|
196
234
|
/**
|
|
197
235
|
* Shared resources interface representing data shared between host and micro-frontends
|
|
198
236
|
* @public
|
|
@@ -231,6 +269,10 @@ export declare interface SharedResources {
|
|
|
231
269
|
triggerLogin: (config?: TriggerLoginConfig) => unknown;
|
|
232
270
|
theme: Theme;
|
|
233
271
|
initialized: boolean;
|
|
272
|
+
getCookieConsent: () => CookieConsent;
|
|
273
|
+
updateCookieConsent: (status: CookieConsentStatus) => void;
|
|
274
|
+
resetCookieConsent: () => void;
|
|
275
|
+
trackAnalyticsEvent: (category: string, action: string, label?: string, value?: number) => void;
|
|
234
276
|
}
|
|
235
277
|
|
|
236
278
|
export { StoreEnhancer }
|
|
@@ -256,6 +298,18 @@ export declare function toast(extension: Extension, message: string, type: Toast
|
|
|
256
298
|
*/
|
|
257
299
|
export declare type ToastType = 'success' | 'error' | 'info' | 'warn';
|
|
258
300
|
|
|
301
|
+
/**
|
|
302
|
+
* Tracks an analytics event for the given extension.
|
|
303
|
+
* Silently no-ops if analytics has not been initialized (consent not given).
|
|
304
|
+
* @param extension - The extension object.
|
|
305
|
+
* @param category - The event category.
|
|
306
|
+
* @param action - The event action.
|
|
307
|
+
* @param label - Optional event label.
|
|
308
|
+
* @param value - Optional numeric event value.
|
|
309
|
+
* @public
|
|
310
|
+
*/
|
|
311
|
+
export declare function trackAnalyticsEvent(extension: Extension, category: string, action: string, label?: string, value?: number): void;
|
|
312
|
+
|
|
259
313
|
/**
|
|
260
314
|
* Triggers the login process in the host application for the given extension.
|
|
261
315
|
* @param extension - The extension object.
|
|
@@ -277,6 +331,16 @@ export { Tuple }
|
|
|
277
331
|
|
|
278
332
|
export { UnknownAction }
|
|
279
333
|
|
|
334
|
+
/**
|
|
335
|
+
* Updates the cookie consent status for the given extension.
|
|
336
|
+
* Dispatches acceptConsent or declineConsent; when accepted, also initializes analytics
|
|
337
|
+
* using the tenant's measurementId.
|
|
338
|
+
* @param extension - The extension object.
|
|
339
|
+
* @param status - The consent status to set ('accepted' or 'declined').
|
|
340
|
+
* @public
|
|
341
|
+
*/
|
|
342
|
+
export declare function updateCookieConsent(extension: Extension, status: CookieConsentStatus): void;
|
|
343
|
+
|
|
280
344
|
/**
|
|
281
345
|
* User information object
|
|
282
346
|
* @public
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EACV,aAAa,EACb,aAAa,EACb,KAAK,EACL,aAAa,EACb,aAAa,EACd,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAIlD;;;GAGG;AACH,MAAM,MAAM,aAAa,CAAC,CAAC,GAAG,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,CAAC;AAE3D;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,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E,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -18,7 +18,11 @@ const ERROR_MAPS = {
|
|
|
18
18
|
toast: 'Toast',
|
|
19
19
|
getUser: 'Get User',
|
|
20
20
|
validateUserPermission: 'Validate User Permission',
|
|
21
|
-
triggerLogin: 'Trigger Login'
|
|
21
|
+
triggerLogin: 'Trigger Login',
|
|
22
|
+
getCookieConsent: 'Get Cookie Consent',
|
|
23
|
+
updateCookieConsent: 'Update Cookie Consent',
|
|
24
|
+
resetCookieConsent: 'Reset Cookie Consent',
|
|
25
|
+
trackAnalyticsEvent: 'Track Analytics Event'
|
|
22
26
|
};
|
|
23
27
|
/**
|
|
24
28
|
* Initialize the communication package in the host application
|
|
@@ -33,6 +37,10 @@ const ERROR_MAPS = {
|
|
|
33
37
|
* - getUser: Function to get the user information from the host
|
|
34
38
|
* - validateUserPermission: Function to validate user permissions in the host
|
|
35
39
|
* - triggerLogin: Function to trigger login in the host
|
|
40
|
+
* - getCookieConsent: Function to retrieve the current cookie consent state
|
|
41
|
+
* - updateCookieConsent: Function to dispatch consent actions and initialize analytics on acceptance
|
|
42
|
+
* - resetCookieConsent: Function to reset consent state and stop analytics events
|
|
43
|
+
* - trackAnalyticsEvent: Function to track an analytics event
|
|
36
44
|
* @throws Will throw an error if any required configuration is missing
|
|
37
45
|
* @returns Object with method to access shared resources
|
|
38
46
|
* @public
|
|
@@ -216,4 +224,53 @@ export function triggerLogin(extension, config) {
|
|
|
216
224
|
const triggerLoginResource = getResource('triggerLogin');
|
|
217
225
|
return triggerLoginResource(config);
|
|
218
226
|
}
|
|
227
|
+
/**
|
|
228
|
+
* Retrieves the current cookie consent state for the given extension.
|
|
229
|
+
* @param extension - The extension object.
|
|
230
|
+
* @returns The cookie consent state with `status` and `timestamp`.
|
|
231
|
+
* @public
|
|
232
|
+
*/
|
|
233
|
+
export function getCookieConsent(extension) {
|
|
234
|
+
validateExtension(extension);
|
|
235
|
+
const getCookieConsentResource = getResource('getCookieConsent');
|
|
236
|
+
return getCookieConsentResource();
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* Updates the cookie consent status for the given extension.
|
|
240
|
+
* Dispatches acceptConsent or declineConsent; when accepted, also initializes analytics
|
|
241
|
+
* using the tenant's measurementId.
|
|
242
|
+
* @param extension - The extension object.
|
|
243
|
+
* @param status - The consent status to set ('accepted' or 'declined').
|
|
244
|
+
* @public
|
|
245
|
+
*/
|
|
246
|
+
export function updateCookieConsent(extension, status) {
|
|
247
|
+
validateExtension(extension);
|
|
248
|
+
const updateCookieConsentResource = getResource('updateCookieConsent');
|
|
249
|
+
updateCookieConsentResource(status);
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* Resets the cookie consent state and stops further analytics events for the given extension.
|
|
253
|
+
* @param extension - The extension object.
|
|
254
|
+
* @public
|
|
255
|
+
*/
|
|
256
|
+
export function resetCookieConsent(extension) {
|
|
257
|
+
validateExtension(extension);
|
|
258
|
+
const resetCookieConsentResource = getResource('resetCookieConsent');
|
|
259
|
+
resetCookieConsentResource();
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Tracks an analytics event for the given extension.
|
|
263
|
+
* Silently no-ops if analytics has not been initialized (consent not given).
|
|
264
|
+
* @param extension - The extension object.
|
|
265
|
+
* @param category - The event category.
|
|
266
|
+
* @param action - The event action.
|
|
267
|
+
* @param label - Optional event label.
|
|
268
|
+
* @param value - Optional numeric event value.
|
|
269
|
+
* @public
|
|
270
|
+
*/
|
|
271
|
+
export function trackAnalyticsEvent(extension, category, action, label, value) {
|
|
272
|
+
validateExtension(extension);
|
|
273
|
+
const trackAnalyticsEventResource = getResource('trackAnalyticsEvent');
|
|
274
|
+
trackAnalyticsEventResource(category, action, label, value);
|
|
275
|
+
}
|
|
219
276
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;EAKE;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;EAKE;AA6LF,2CAA2C;AAE3C,IAAI,WAAW,GAA6B;IAC1C,WAAW,EAAE,KAAK;CACnB,CAAC;AAEF,MAAM,UAAU,GAA0D;IACxE,QAAQ,EAAE,mBAAmB;IAC7B,UAAU,EAAE,aAAa;IACzB,QAAQ,EAAE,WAAW;IACrB,cAAc,EAAE,iBAAiB;IACjC,mBAAmB,EAAE,sBAAsB;IAC3C,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,OAAO;IACd,OAAO,EAAE,UAAU;IACnB,sBAAsB,EAAE,0BAA0B;IAClD,YAAY,EAAE,eAAe;IAC7B,gBAAgB,EAAE,oBAAoB;IACtC,mBAAmB,EAAE,uBAAuB;IAC5C,kBAAkB,EAAE,sBAAsB;IAC1C,mBAAmB,EAAE,uBAAuB;CAC7C,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,UAAU,cAAc,CAAC,MAAkB;IAC9C,MAAM,CAAC,IAAI,CAAC,UAAU,CAAoC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;QAC1E,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC;YACjB,MAAM,IAAI,KAAK,CAAC,GAAG,UAAU,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;QACpD,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,WAAW,GAAG;QACZ,GAAG,WAAW;QACd,GAAG,MAAM;QACT,WAAW,EAAE,IAAI;KAClB,CAAC;IAEF,MAAM,CAAC,uBAAuB,GAAG,WAA8B,CAAC;IAEhE,OAAO;QACL,kBAAkB,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,GAAG,WAAW,EAAE,CAAoB;KAClE,CAAC;AACJ,CAAC;AAED;;;;;G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GASG;AACH,MAAM,UAAU,mBAAmB,CACjC,SAAoB,EACpB,QAAgB,EAChB,MAAc,EACd,KAAc,EACd,KAAc;IAEd,iBAAiB,CAAC,SAAS,CAAC,CAAC;IAC7B,MAAM,2BAA2B,GAAG,WAAW,CAAC,qBAAqB,CAAC,CAAC;IACvE,2BAA2B,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;AAC9D,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudscaile-eng/web-ext-utils",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "Utilities for sharing host resources with micro-frontends in web applications",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "CloudScaile Engineering",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"LICENSE"
|
|
21
21
|
],
|
|
22
22
|
"scripts": {
|
|
23
|
-
"build": "rimraf dist && tsc && api-extractor run --local || true",
|
|
23
|
+
"build": "rimraf dist && tsc && node scripts/fix-rtk-types.cjs && api-extractor run --local || true",
|
|
24
24
|
"prepublishOnly": "npm run build",
|
|
25
25
|
"build:lint": "npm run format-check && npm run lint && npm run typecheck",
|
|
26
26
|
"typecheck": "tsc --noEmit",
|