@amedia/user 0.13.31 → 0.13.33
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 +2 -1
- package/dist/actions/authentication.spec.d.ts +0 -3
- package/dist/autologin/index.spec.d.ts +0 -3
- package/dist/cache/engines/global.d.ts +17 -0
- package/dist/cache/index.spec.d.ts +0 -3
- package/dist/clients/mercury.spec.d.ts +0 -3
- package/dist/clients/mercuryLog.spec.d.ts +0 -3
- package/dist/eventHandlers/state.spec.d.ts +0 -3
- package/dist/eventHandlers/storage.spec.d.ts +0 -3
- package/dist/eventHandlers/userAttributes.spec.d.ts +0 -3
- package/dist/index-authentcation.spec.d.ts +0 -3
- package/dist/index-storage.spec.d.ts +0 -3
- package/dist/index-subscription.spec.d.ts +0 -3
- package/dist/index.d.ts +30 -42
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +3 -3
- package/dist/index.js +1 -1
- package/dist/index.js.map +3 -3
- package/dist/janitor/index.spec.d.ts +0 -3
- package/dist/janitor/jobs/accessCookieRefresher.spec.d.ts +0 -3
- package/dist/janitor/jobs/daxsubCookie.spec.d.ts +0 -3
- package/dist/lib/PaywallUnlockRequest.spec.d.ts +0 -3
- package/dist/utils/expectBootLogs.d.ts +2 -0
- package/dist/utils/localhostCheck.d.ts +1 -0
- package/eik.json +1 -1
- package/jest.config.js +2 -1
- package/package.json +2 -2
- package/setupJest.js +0 -5
- package/src/actions/authentication.spec.ts +0 -6
- package/src/actions/authorization.spec.ts +0 -4
- package/src/actions/preferences.spec.ts +0 -1
- package/src/actions/userData.spec.ts +0 -6
- package/src/autologin/index.spec.ts +1 -11
- package/src/autologin/thirdPartyCookie.spec.ts +0 -5
- package/src/cache/engines/global.ts +15 -0
- package/src/cache/index.spec.ts +0 -6
- package/src/clients/europa.spec.ts +0 -3
- package/src/clients/jupiter.spec.ts +0 -3
- package/src/clients/mercury.spec.ts +0 -10
- package/src/clients/mercuryLog.spec.ts +0 -10
- package/src/clients/nebula.spec.ts +0 -3
- package/src/clients/pluto.spec.ts +0 -3
- package/src/eventHandlers/activation.ts +5 -1
- package/src/eventHandlers/state.spec.ts +1 -12
- package/src/eventHandlers/storage.spec.ts +1 -12
- package/src/eventHandlers/userAttributes.spec.ts +1 -12
- package/src/index-authentcation.spec.ts +0 -14
- package/src/index-storage.spec.ts +1 -15
- package/src/index-subscription.spec.ts +1 -15
- package/src/index.ts +7 -4
- package/src/janitor/index.spec.ts +18 -0
- package/src/janitor/index.ts +9 -0
- package/src/janitor/jobs/accessCookieRefresher.spec.ts +0 -8
- package/src/janitor/jobs/daxsubCookie.spec.ts +1 -15
- package/src/janitor/jobs/removeUserStorage.spec.ts +0 -5
- package/src/lib/PaywallUnlockRequest.spec.ts +17 -14
- package/src/lib/PaywallUnlockRequest.ts +6 -0
- package/src/lib/UserDataRequest.spec.ts +16 -11
- package/src/lib/UserDataRequest.ts +9 -1
- package/src/utils/debouncer.spec.ts +0 -5
- package/src/utils/expectBootLogs.ts +9 -0
- package/src/utils/getOrUpdate.spec.ts +0 -2
- package/src/utils/localhostCheck.ts +9 -0
- package/src/utils/log.spec.ts +0 -5
- package/testSetup.js +18 -0
- package/@types/global.d.ts +0 -15
- package/amedia-user-js.iml +0 -9
- package/dist/cache/engines/indexeddb.d.ts +0 -7
- package/dist/index.js.LICENSE.txt +0 -14
- package/dist/lib/PaywallUnlocker.d.ts +0 -16
- package/dist/lib/PaywallUnlocker.spec.d.ts +0 -4
- package/dist/lib/User.d.ts +0 -21
- package/dist/utils/logValidationError.d.ts +0 -1
- package/esm/actions/authentication.d.ts +0 -5
- package/esm/actions/authentication.spec.d.ts +0 -4
- package/esm/actions/authorization.d.ts +0 -9
- package/esm/actions/preferences.d.ts +0 -9
- package/esm/actions/preferences.spec.d.ts +0 -1
- package/esm/actions/storage.d.ts +0 -4
- package/esm/actions/userData.d.ts +0 -2
- package/esm/autologin/index.d.ts +0 -1
- package/esm/autologin/thirdPartyCookie.d.ts +0 -3
- package/esm/autologin/thirdPartyCookie.spec.d.ts +0 -1
- package/esm/cache/engines/global.d.ts +0 -21
- package/esm/cache/engines/global.spec.d.ts +0 -1
- package/esm/cache/engines/indexeddb.d.ts +0 -7
- package/esm/cache/index.d.ts +0 -11
- package/esm/cache/index.spec.d.ts +0 -4
- package/esm/cache/types.d.ts +0 -11
- package/esm/clients/europa.d.ts +0 -28
- package/esm/clients/europa.spec.d.ts +0 -1
- package/esm/clients/jupiter.d.ts +0 -30
- package/esm/clients/jupiter.spec.d.ts +0 -1
- package/esm/clients/mercury.d.ts +0 -18
- package/esm/clients/mercury.spec.d.ts +0 -4
- package/esm/clients/nebula.d.ts +0 -2
- package/esm/clients/nebula.spec.d.ts +0 -1
- package/esm/clients/pluto.d.ts +0 -3
- package/esm/clients/pluto.spec.d.ts +0 -1
- package/esm/eventHandlers/activation.d.ts +0 -15
- package/esm/eventHandlers/authentication.d.ts +0 -17
- package/esm/eventHandlers/userAttributes.d.ts +0 -24
- package/esm/exceptions/PaywallError.d.ts +0 -7
- package/esm/index-authentcation.spec.d.ts +0 -4
- package/esm/index-storage.spec.d.ts +0 -4
- package/esm/index-subscription.spec.d.ts +0 -4
- package/esm/index.d.ts +0 -26
- package/esm/janitor/index.d.ts +0 -10
- package/esm/janitor/jobs/accessCookieRefresher.d.ts +0 -1
- package/esm/janitor/jobs/accessCookieRefresher.spec.d.ts +0 -4
- package/esm/lib/PaywallUnlocker.d.ts +0 -16
- package/esm/lib/PaywallUnlocker.spec.d.ts +0 -4
- package/esm/lib/User.d.ts +0 -21
- package/esm/lib/cookie.d.ts +0 -5
- package/esm/lib/rpc.d.ts +0 -6
- package/esm/store/index.d.ts +0 -22
- package/esm/store/index.spec.d.ts +0 -1
- package/esm/types.d.ts +0 -22
- package/esm/user.js +0 -2
- package/esm/user.js.map +0 -1
- package/esm/utils/customEventWrapper.d.ts +0 -17
- package/esm/utils/deepEquals.d.ts +0 -4
- package/esm/utils/getOrUpdate.d.ts +0 -6
- package/esm/utils/getOrUpdate.spec.d.ts +0 -1
- package/esm/utils/location.d.ts +0 -3
- package/esm/utils/log.d.ts +0 -26
- package/esm/utils/queue.d.ts +0 -12
- package/esm/utils/url.d.ts +0 -6
- package/esm/utils/url.spec.d.ts +0 -1
package/README.md
CHANGED
|
@@ -168,4 +168,5 @@ To publish a new version do the following:
|
|
|
168
168
|
|
|
169
169
|
- Update version number in `eik.json` to the same version as in `package.json`
|
|
170
170
|
- Run `npm run eik:package` (no publishing will be done unless packages passes lint, typings, tests and builds successfully)
|
|
171
|
-
- Run `npx eik package-alias user <version from eik.json> <Alias version>`
|
|
171
|
+
- Run `npx eik package-alias @amedia/user <version from eik.json> <Alias version>`
|
|
172
|
+
Example: `npx eik package-alias @amedia/user 0.13.31 0`
|
|
@@ -1,4 +1,21 @@
|
|
|
1
1
|
import { CacheEntry, Engine } from '../types';
|
|
2
|
+
declare global {
|
|
3
|
+
export var amediaUserCache: {
|
|
4
|
+
[index: string]: CacheEntry;
|
|
5
|
+
};
|
|
6
|
+
interface Window {
|
|
7
|
+
amediaUserCache?: {
|
|
8
|
+
[index: string]: CacheEntry;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
namespace NodeJS {
|
|
12
|
+
interface Global {
|
|
13
|
+
amediaUserCache?: {
|
|
14
|
+
[index: string]: CacheEntry;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
2
19
|
export declare const get: (key: string) => Promise<CacheEntry>;
|
|
3
20
|
export declare const set: (key: string, data: unknown, expires: number) => Promise<void>;
|
|
4
21
|
export declare const remove: (key: string) => Promise<void>;
|
package/dist/index.d.ts
CHANGED
|
@@ -6,9 +6,6 @@ declare module '@amedia/user/actions/authentication' {
|
|
|
6
6
|
|
|
7
7
|
}
|
|
8
8
|
declare module '@amedia/user/actions/authentication.spec' {
|
|
9
|
-
/**
|
|
10
|
-
* @jest-environment jsdom
|
|
11
|
-
*/
|
|
12
9
|
export {};
|
|
13
10
|
|
|
14
11
|
}
|
|
@@ -82,9 +79,6 @@ declare module '@amedia/user/autologin/index' {
|
|
|
82
79
|
|
|
83
80
|
}
|
|
84
81
|
declare module '@amedia/user/autologin/index.spec' {
|
|
85
|
-
/**
|
|
86
|
-
* @jest-environment jsdom
|
|
87
|
-
*/
|
|
88
82
|
export {};
|
|
89
83
|
|
|
90
84
|
}
|
|
@@ -100,6 +94,23 @@ declare module '@amedia/user/autologin/thirdPartyCookie.spec' {
|
|
|
100
94
|
}
|
|
101
95
|
declare module '@amedia/user/cache/engines/global' {
|
|
102
96
|
import { CacheEntry, Engine } from '@amedia/user/cache/types';
|
|
97
|
+
global {
|
|
98
|
+
export var amediaUserCache: {
|
|
99
|
+
[index: string]: CacheEntry;
|
|
100
|
+
};
|
|
101
|
+
interface Window {
|
|
102
|
+
amediaUserCache?: {
|
|
103
|
+
[index: string]: CacheEntry;
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
namespace NodeJS {
|
|
107
|
+
interface Global {
|
|
108
|
+
amediaUserCache?: {
|
|
109
|
+
[index: string]: CacheEntry;
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
103
114
|
export const get: (key: string) => Promise<CacheEntry>;
|
|
104
115
|
export const set: (key: string, data: unknown, expires: number) => Promise<void>;
|
|
105
116
|
export const remove: (key: string) => Promise<void>;
|
|
@@ -127,9 +138,6 @@ declare module '@amedia/user/cache/index' {
|
|
|
127
138
|
|
|
128
139
|
}
|
|
129
140
|
declare module '@amedia/user/cache/index.spec' {
|
|
130
|
-
/**
|
|
131
|
-
* @jest-environment jsdom
|
|
132
|
-
*/
|
|
133
141
|
export {};
|
|
134
142
|
|
|
135
143
|
}
|
|
@@ -222,9 +230,6 @@ declare module '@amedia/user/clients/mercury' {
|
|
|
222
230
|
|
|
223
231
|
}
|
|
224
232
|
declare module '@amedia/user/clients/mercury.spec' {
|
|
225
|
-
/**
|
|
226
|
-
* @jest-environment jsdom
|
|
227
|
-
*/
|
|
228
233
|
export {};
|
|
229
234
|
|
|
230
235
|
}
|
|
@@ -240,9 +245,6 @@ declare module '@amedia/user/clients/mercuryLog' {
|
|
|
240
245
|
|
|
241
246
|
}
|
|
242
247
|
declare module '@amedia/user/clients/mercuryLog.spec' {
|
|
243
|
-
/**
|
|
244
|
-
* @jest-environment jsdom
|
|
245
|
-
*/
|
|
246
248
|
export {};
|
|
247
249
|
|
|
248
250
|
}
|
|
@@ -341,9 +343,6 @@ declare module '@amedia/user/eventHandlers/state' {
|
|
|
341
343
|
|
|
342
344
|
}
|
|
343
345
|
declare module '@amedia/user/eventHandlers/state.spec' {
|
|
344
|
-
/**
|
|
345
|
-
* @jest-environment jsdom
|
|
346
|
-
*/
|
|
347
346
|
export {};
|
|
348
347
|
|
|
349
348
|
}
|
|
@@ -352,9 +351,6 @@ declare module '@amedia/user/eventHandlers/storage' {
|
|
|
352
351
|
|
|
353
352
|
}
|
|
354
353
|
declare module '@amedia/user/eventHandlers/storage.spec' {
|
|
355
|
-
/**
|
|
356
|
-
* @jest-environment jsdom
|
|
357
|
-
*/
|
|
358
354
|
export {};
|
|
359
355
|
|
|
360
356
|
}
|
|
@@ -363,9 +359,6 @@ declare module '@amedia/user/eventHandlers/userAttributes' {
|
|
|
363
359
|
|
|
364
360
|
}
|
|
365
361
|
declare module '@amedia/user/eventHandlers/userAttributes.spec' {
|
|
366
|
-
/**
|
|
367
|
-
* @jest-environment jsdom
|
|
368
|
-
*/
|
|
369
362
|
export {};
|
|
370
363
|
|
|
371
364
|
}
|
|
@@ -381,23 +374,14 @@ declare module '@amedia/user/exceptions/PaywallError' {
|
|
|
381
374
|
|
|
382
375
|
}
|
|
383
376
|
declare module '@amedia/user/index-authentcation.spec' {
|
|
384
|
-
/**
|
|
385
|
-
* @jest-environment jsdom
|
|
386
|
-
*/
|
|
387
377
|
export {};
|
|
388
378
|
|
|
389
379
|
}
|
|
390
380
|
declare module '@amedia/user/index-storage.spec' {
|
|
391
|
-
/**
|
|
392
|
-
* @jest-environment jsdom
|
|
393
|
-
*/
|
|
394
381
|
export {};
|
|
395
382
|
|
|
396
383
|
}
|
|
397
384
|
declare module '@amedia/user/index-subscription.spec' {
|
|
398
|
-
/**
|
|
399
|
-
* @jest-environment jsdom
|
|
400
|
-
*/
|
|
401
385
|
export {};
|
|
402
386
|
|
|
403
387
|
}
|
|
@@ -436,15 +420,16 @@ declare module '@amedia/user/janitor/index' {
|
|
|
436
420
|
export const runJanitor: () => Promise<void>;
|
|
437
421
|
export {};
|
|
438
422
|
|
|
423
|
+
}
|
|
424
|
+
declare module '@amedia/user/janitor/index.spec' {
|
|
425
|
+
export {};
|
|
426
|
+
|
|
439
427
|
}
|
|
440
428
|
declare module '@amedia/user/janitor/jobs/accessCookieRefresher' {
|
|
441
429
|
export default function accessCookieRefresher(): Promise<[void, void]>;
|
|
442
430
|
|
|
443
431
|
}
|
|
444
432
|
declare module '@amedia/user/janitor/jobs/accessCookieRefresher.spec' {
|
|
445
|
-
/**
|
|
446
|
-
* @jest-environment jsdom
|
|
447
|
-
*/
|
|
448
433
|
export {};
|
|
449
434
|
|
|
450
435
|
}
|
|
@@ -455,9 +440,6 @@ declare module '@amedia/user/janitor/jobs/daxsubCookie' {
|
|
|
455
440
|
|
|
456
441
|
}
|
|
457
442
|
declare module '@amedia/user/janitor/jobs/daxsubCookie.spec' {
|
|
458
|
-
/**
|
|
459
|
-
* @jest-environment jsdom
|
|
460
|
-
*/
|
|
461
443
|
export {};
|
|
462
444
|
|
|
463
445
|
}
|
|
@@ -490,9 +472,6 @@ declare module '@amedia/user/lib/PaywallUnlockRequest' {
|
|
|
490
472
|
|
|
491
473
|
}
|
|
492
474
|
declare module '@amedia/user/lib/PaywallUnlockRequest.spec' {
|
|
493
|
-
/**
|
|
494
|
-
* @jest-environment jsdom
|
|
495
|
-
*/
|
|
496
475
|
export {};
|
|
497
476
|
|
|
498
477
|
}
|
|
@@ -659,6 +638,11 @@ declare module '@amedia/user/utils/debouncer.spec' {
|
|
|
659
638
|
declare module '@amedia/user/utils/deepEquals' {
|
|
660
639
|
export const deepEquals: (a: unknown, b: unknown) => boolean;
|
|
661
640
|
|
|
641
|
+
}
|
|
642
|
+
declare module '@amedia/user/utils/expectBootLogs' {
|
|
643
|
+
const _default: () => void;
|
|
644
|
+
export default _default;
|
|
645
|
+
|
|
662
646
|
}
|
|
663
647
|
declare module '@amedia/user/utils/getOrUpdate' {
|
|
664
648
|
import { Runtype, Static } from 'runtypes';
|
|
@@ -672,6 +656,10 @@ declare module '@amedia/user/utils/getOrUpdate' {
|
|
|
672
656
|
declare module '@amedia/user/utils/getOrUpdate.spec' {
|
|
673
657
|
export {};
|
|
674
658
|
|
|
659
|
+
}
|
|
660
|
+
declare module '@amedia/user/utils/localhostCheck' {
|
|
661
|
+
export const isRunningOnLocalhost: () => boolean;
|
|
662
|
+
|
|
675
663
|
}
|
|
676
664
|
declare module '@amedia/user/utils/location' {
|
|
677
665
|
export const reload: () => void;
|