device-passport 1.0.0 → 1.2.0

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.
Files changed (61) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/README.md +110 -2
  3. package/assets/ego-profile-manager.png +0 -0
  4. package/dist/adapters/index.cjs +19 -0
  5. package/dist/adapters/index.d.cts +66 -0
  6. package/dist/adapters/index.d.mts +66 -0
  7. package/dist/adapters/index.d.ts +66 -0
  8. package/dist/adapters/index.mjs +3 -0
  9. package/dist/ego/index.cjs +22 -0
  10. package/dist/ego/index.d.cts +5 -0
  11. package/dist/ego/index.d.mts +5 -0
  12. package/dist/ego/index.d.ts +5 -0
  13. package/dist/ego/index.mjs +8 -0
  14. package/dist/evaluator/index.cjs +140 -0
  15. package/dist/evaluator/index.d.cts +204 -0
  16. package/dist/evaluator/index.d.mts +204 -0
  17. package/dist/evaluator/index.d.ts +204 -0
  18. package/dist/evaluator/index.mjs +119 -0
  19. package/dist/geo/index.cjs +50 -0
  20. package/dist/geo/index.d.cts +213 -0
  21. package/dist/geo/index.d.mts +213 -0
  22. package/dist/geo/index.d.ts +213 -0
  23. package/dist/geo/index.mjs +18 -0
  24. package/dist/index.cjs +110 -3940
  25. package/dist/index.d.cts +45 -1091
  26. package/dist/index.d.mts +45 -1091
  27. package/dist/index.d.ts +45 -1091
  28. package/dist/index.mjs +11 -3849
  29. package/dist/shared/device-passport.BGfRcQNh.mjs +565 -0
  30. package/dist/shared/device-passport.BKtmLzPt.cjs +1266 -0
  31. package/dist/shared/device-passport.BPQj0qdT.mjs +1238 -0
  32. package/dist/shared/device-passport.CDS7xrj8.d.ts +469 -0
  33. package/dist/shared/device-passport.C_F1vBE8.d.cts +79 -0
  34. package/dist/shared/device-passport.C_F1vBE8.d.mts +79 -0
  35. package/dist/shared/device-passport.C_F1vBE8.d.ts +79 -0
  36. package/dist/shared/device-passport.CfLes-lq.d.cts +469 -0
  37. package/dist/shared/device-passport.Cjxlv8xI.cjs +245 -0
  38. package/dist/shared/device-passport.CsOWqPIr.d.cts +77 -0
  39. package/dist/shared/device-passport.CyQtcZeD.mjs +237 -0
  40. package/dist/shared/device-passport.D7pEnyp2.d.ts +77 -0
  41. package/dist/shared/device-passport.D9xW6R0B.cjs +1571 -0
  42. package/dist/shared/device-passport.DirQmSd4.d.cts +47 -0
  43. package/dist/shared/device-passport.DirQmSd4.d.mts +47 -0
  44. package/dist/shared/device-passport.DirQmSd4.d.ts +47 -0
  45. package/dist/shared/device-passport.EK4RX7Xd.cjs +584 -0
  46. package/dist/shared/device-passport.ZBspe4ZW.d.mts +77 -0
  47. package/dist/shared/device-passport.dVEqzSEb.d.mts +469 -0
  48. package/dist/shared/device-passport.gNo82fQ5.mjs +1537 -0
  49. package/dist/shared/device-passport.kekU28UM.mjs +705 -0
  50. package/dist/shared/device-passport.qL4tjwc0.cjs +718 -0
  51. package/dist/storage/index.cjs +10 -0
  52. package/dist/storage/index.d.cts +97 -0
  53. package/dist/storage/index.d.mts +97 -0
  54. package/dist/storage/index.d.ts +97 -0
  55. package/dist/storage/index.mjs +3 -0
  56. package/dist/types/index.cjs +2 -0
  57. package/dist/types/index.d.cts +397 -0
  58. package/dist/types/index.d.mts +397 -0
  59. package/dist/types/index.d.ts +397 -0
  60. package/dist/types/index.mjs +1 -0
  61. package/package.json +32 -2
@@ -0,0 +1,47 @@
1
+ /**
2
+ * StorageAdapter interface for DevicePassport persistence.
3
+ * Implementations provide pluggable storage backends (Memory, File, Redis, DB, etc.)
4
+ */
5
+ interface StorageAdapter<T = any> {
6
+ /**
7
+ * Retrieve an item by key.
8
+ * Returns null if key does not exist.
9
+ */
10
+ get(key: string): Promise<T | null>;
11
+ /**
12
+ * Store an item with the given key.
13
+ */
14
+ set(key: string, value: T): Promise<void>;
15
+ /**
16
+ * Check if a key exists in storage.
17
+ */
18
+ has(key: string): Promise<boolean>;
19
+ /**
20
+ * Delete an item by key.
21
+ * Returns true if item existed and was deleted, false otherwise.
22
+ */
23
+ delete(key: string): Promise<boolean>;
24
+ /**
25
+ * Return all keys currently stored.
26
+ */
27
+ keys(): Promise<string[]>;
28
+ /**
29
+ * Clear all items in this storage.
30
+ */
31
+ clear(): Promise<void>;
32
+ /**
33
+ * Optional synchronous capability.
34
+ *
35
+ * Backends that can read and write without a microtask boundary (MemoryStorage,
36
+ * JSONFileStorage) implement these; adapters backed by a network or database
37
+ * usually do not. Callers must feature-detect before using them.
38
+ */
39
+ getSync?(key: string): T | null;
40
+ setSync?(key: string, value: T): void;
41
+ hasSync?(key: string): boolean;
42
+ deleteSync?(key: string): boolean;
43
+ keysSync?(): string[];
44
+ clearSync?(): void;
45
+ }
46
+
47
+ export type { StorageAdapter as S };
@@ -0,0 +1,47 @@
1
+ /**
2
+ * StorageAdapter interface for DevicePassport persistence.
3
+ * Implementations provide pluggable storage backends (Memory, File, Redis, DB, etc.)
4
+ */
5
+ interface StorageAdapter<T = any> {
6
+ /**
7
+ * Retrieve an item by key.
8
+ * Returns null if key does not exist.
9
+ */
10
+ get(key: string): Promise<T | null>;
11
+ /**
12
+ * Store an item with the given key.
13
+ */
14
+ set(key: string, value: T): Promise<void>;
15
+ /**
16
+ * Check if a key exists in storage.
17
+ */
18
+ has(key: string): Promise<boolean>;
19
+ /**
20
+ * Delete an item by key.
21
+ * Returns true if item existed and was deleted, false otherwise.
22
+ */
23
+ delete(key: string): Promise<boolean>;
24
+ /**
25
+ * Return all keys currently stored.
26
+ */
27
+ keys(): Promise<string[]>;
28
+ /**
29
+ * Clear all items in this storage.
30
+ */
31
+ clear(): Promise<void>;
32
+ /**
33
+ * Optional synchronous capability.
34
+ *
35
+ * Backends that can read and write without a microtask boundary (MemoryStorage,
36
+ * JSONFileStorage) implement these; adapters backed by a network or database
37
+ * usually do not. Callers must feature-detect before using them.
38
+ */
39
+ getSync?(key: string): T | null;
40
+ setSync?(key: string, value: T): void;
41
+ hasSync?(key: string): boolean;
42
+ deleteSync?(key: string): boolean;
43
+ keysSync?(): string[];
44
+ clearSync?(): void;
45
+ }
46
+
47
+ export type { StorageAdapter as S };
@@ -0,0 +1,47 @@
1
+ /**
2
+ * StorageAdapter interface for DevicePassport persistence.
3
+ * Implementations provide pluggable storage backends (Memory, File, Redis, DB, etc.)
4
+ */
5
+ interface StorageAdapter<T = any> {
6
+ /**
7
+ * Retrieve an item by key.
8
+ * Returns null if key does not exist.
9
+ */
10
+ get(key: string): Promise<T | null>;
11
+ /**
12
+ * Store an item with the given key.
13
+ */
14
+ set(key: string, value: T): Promise<void>;
15
+ /**
16
+ * Check if a key exists in storage.
17
+ */
18
+ has(key: string): Promise<boolean>;
19
+ /**
20
+ * Delete an item by key.
21
+ * Returns true if item existed and was deleted, false otherwise.
22
+ */
23
+ delete(key: string): Promise<boolean>;
24
+ /**
25
+ * Return all keys currently stored.
26
+ */
27
+ keys(): Promise<string[]>;
28
+ /**
29
+ * Clear all items in this storage.
30
+ */
31
+ clear(): Promise<void>;
32
+ /**
33
+ * Optional synchronous capability.
34
+ *
35
+ * Backends that can read and write without a microtask boundary (MemoryStorage,
36
+ * JSONFileStorage) implement these; adapters backed by a network or database
37
+ * usually do not. Callers must feature-detect before using them.
38
+ */
39
+ getSync?(key: string): T | null;
40
+ setSync?(key: string, value: T): void;
41
+ hasSync?(key: string): boolean;
42
+ deleteSync?(key: string): boolean;
43
+ keysSync?(): string[];
44
+ clearSync?(): void;
45
+ }
46
+
47
+ export type { StorageAdapter as S };