@incodetech/core 2.0.0-alpha.2 → 2.0.0-alpha.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.
Files changed (134) hide show
  1. package/package.json +4 -1
  2. package/.turbo/turbo-build.log +0 -33
  3. package/.turbo/turbo-coverage.log +0 -22
  4. package/.turbo/turbo-format.log +0 -6
  5. package/.turbo/turbo-lint$colon$fix.log +0 -77
  6. package/.turbo/turbo-lint.log +0 -95
  7. package/.turbo/turbo-test.log +0 -870
  8. package/.turbo/turbo-typecheck.log +0 -5
  9. package/coverage/base.css +0 -224
  10. package/coverage/block-navigation.js +0 -87
  11. package/coverage/favicon.png +0 -0
  12. package/coverage/index.html +0 -221
  13. package/coverage/prettify.css +0 -1
  14. package/coverage/prettify.js +0 -2
  15. package/coverage/sort-arrow-sprite.png +0 -0
  16. package/coverage/sorter.js +0 -210
  17. package/coverage/src/camera/cameraService.ts.html +0 -580
  18. package/coverage/src/camera/cameraServices.ts.html +0 -163
  19. package/coverage/src/camera/cameraStateMachine.ts.html +0 -877
  20. package/coverage/src/camera/index.html +0 -146
  21. package/coverage/src/email/emailActor.ts.html +0 -130
  22. package/coverage/src/email/emailManager.ts.html +0 -1366
  23. package/coverage/src/email/emailStateMachine.ts.html +0 -1186
  24. package/coverage/src/email/index.html +0 -146
  25. package/coverage/src/flow/flowActor.ts.html +0 -124
  26. package/coverage/src/flow/flowAnalyzer.ts.html +0 -196
  27. package/coverage/src/flow/flowManager.ts.html +0 -790
  28. package/coverage/src/flow/flowServices.ts.html +0 -124
  29. package/coverage/src/flow/flowStateMachine.ts.html +0 -631
  30. package/coverage/src/flow/index.html +0 -221
  31. package/coverage/src/flow/moduleLoader.ts.html +0 -304
  32. package/coverage/src/flow/orchestratedFlowManager.ts.html +0 -778
  33. package/coverage/src/flow/orchestratedFlowStateMachine.ts.html +0 -1060
  34. package/coverage/src/http/api.ts.html +0 -355
  35. package/coverage/src/http/endpoints.ts.html +0 -136
  36. package/coverage/src/http/index.html +0 -131
  37. package/coverage/src/index.html +0 -116
  38. package/coverage/src/phone/index.html +0 -146
  39. package/coverage/src/phone/phoneActor.ts.html +0 -130
  40. package/coverage/src/phone/phoneManager.ts.html +0 -1459
  41. package/coverage/src/phone/phoneStateMachine.ts.html +0 -1351
  42. package/coverage/src/recordings/index.html +0 -116
  43. package/coverage/src/recordings/recordingsRepository.ts.html +0 -229
  44. package/coverage/src/selfie/index.html +0 -191
  45. package/coverage/src/selfie/selfieActor.ts.html +0 -136
  46. package/coverage/src/selfie/selfieErrorUtils.ts.html +0 -283
  47. package/coverage/src/selfie/selfieManager.ts.html +0 -988
  48. package/coverage/src/selfie/selfieStateMachine.ts.html +0 -2497
  49. package/coverage/src/selfie/selfieUploadService.ts.html +0 -328
  50. package/coverage/src/selfie/types.ts.html +0 -394
  51. package/coverage/src/setup.ts.html +0 -598
  52. package/src/camera/cameraActor.ts +0 -21
  53. package/src/camera/cameraService.test.ts +0 -437
  54. package/src/camera/cameraService.ts +0 -165
  55. package/src/camera/cameraServices.test.ts +0 -66
  56. package/src/camera/cameraServices.ts +0 -26
  57. package/src/camera/cameraStateMachine.test.ts +0 -602
  58. package/src/camera/cameraStateMachine.ts +0 -264
  59. package/src/camera/index.ts +0 -5
  60. package/src/camera/types.ts +0 -17
  61. package/src/device/getBrowser.ts +0 -31
  62. package/src/device/getDeviceClass.ts +0 -29
  63. package/src/device/index.ts +0 -2
  64. package/src/email/__mocks__/emailMocks.ts +0 -59
  65. package/src/email/emailActor.ts +0 -15
  66. package/src/email/emailManager.test.ts +0 -573
  67. package/src/email/emailManager.ts +0 -427
  68. package/src/email/emailServices.ts +0 -66
  69. package/src/email/emailStateMachine.test.ts +0 -741
  70. package/src/email/emailStateMachine.ts +0 -367
  71. package/src/email/index.ts +0 -39
  72. package/src/email/types.ts +0 -60
  73. package/src/events/addEvent.ts +0 -20
  74. package/src/events/types.ts +0 -7
  75. package/src/flow/__mocks__/flowMocks.ts +0 -84
  76. package/src/flow/flowActor.ts +0 -13
  77. package/src/flow/flowAnalyzer.test.ts +0 -266
  78. package/src/flow/flowAnalyzer.ts +0 -37
  79. package/src/flow/flowCompletionService.ts +0 -21
  80. package/src/flow/flowManager.test.ts +0 -560
  81. package/src/flow/flowManager.ts +0 -235
  82. package/src/flow/flowServices.test.ts +0 -109
  83. package/src/flow/flowServices.ts +0 -13
  84. package/src/flow/flowStateMachine.test.ts +0 -334
  85. package/src/flow/flowStateMachine.ts +0 -182
  86. package/src/flow/index.ts +0 -21
  87. package/src/flow/moduleLoader.test.ts +0 -136
  88. package/src/flow/moduleLoader.ts +0 -73
  89. package/src/flow/orchestratedFlowManager.test.ts +0 -240
  90. package/src/flow/orchestratedFlowManager.ts +0 -231
  91. package/src/flow/orchestratedFlowStateMachine.test.ts +0 -199
  92. package/src/flow/orchestratedFlowStateMachine.ts +0 -325
  93. package/src/flow/types.ts +0 -434
  94. package/src/http/__mocks__/api.ts +0 -88
  95. package/src/http/api.test.ts +0 -231
  96. package/src/http/api.ts +0 -90
  97. package/src/http/endpoints.ts +0 -17
  98. package/src/index.ts +0 -33
  99. package/src/permissions/index.ts +0 -2
  100. package/src/permissions/permissionServices.ts +0 -31
  101. package/src/permissions/types.ts +0 -3
  102. package/src/phone/__mocks__/phoneMocks.ts +0 -71
  103. package/src/phone/index.ts +0 -39
  104. package/src/phone/phoneActor.ts +0 -15
  105. package/src/phone/phoneManager.test.ts +0 -393
  106. package/src/phone/phoneManager.ts +0 -458
  107. package/src/phone/phoneServices.ts +0 -98
  108. package/src/phone/phoneStateMachine.test.ts +0 -918
  109. package/src/phone/phoneStateMachine.ts +0 -422
  110. package/src/phone/types.ts +0 -83
  111. package/src/recordings/recordingsRepository.test.ts +0 -87
  112. package/src/recordings/recordingsRepository.ts +0 -48
  113. package/src/recordings/streamingEvents.ts +0 -10
  114. package/src/selfie/__mocks__/selfieMocks.ts +0 -26
  115. package/src/selfie/index.ts +0 -14
  116. package/src/selfie/selfieActor.ts +0 -17
  117. package/src/selfie/selfieErrorUtils.test.ts +0 -116
  118. package/src/selfie/selfieErrorUtils.ts +0 -66
  119. package/src/selfie/selfieManager.test.ts +0 -297
  120. package/src/selfie/selfieManager.ts +0 -301
  121. package/src/selfie/selfieServices.ts +0 -362
  122. package/src/selfie/selfieStateMachine.test.ts +0 -283
  123. package/src/selfie/selfieStateMachine.ts +0 -804
  124. package/src/selfie/selfieUploadService.test.ts +0 -90
  125. package/src/selfie/selfieUploadService.ts +0 -81
  126. package/src/selfie/types.ts +0 -103
  127. package/src/session/index.ts +0 -5
  128. package/src/session/sessionService.ts +0 -78
  129. package/src/setup.test.ts +0 -61
  130. package/src/setup.ts +0 -171
  131. package/tsconfig.json +0 -13
  132. package/tsdown.config.ts +0 -22
  133. package/vitest.config.ts +0 -37
  134. package/vitest.setup.ts +0 -135
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@incodetech/core",
3
- "version": "2.0.0-alpha.2",
3
+ "version": "2.0.0-alpha.3",
4
4
  "type": "module",
5
5
  "main": "./dist/index.esm.js",
6
6
  "types": "./dist/index.d.ts",
@@ -30,6 +30,9 @@
30
30
  "import": "./dist/camera.esm.js"
31
31
  }
32
32
  },
33
+ "files": [
34
+ "dist"
35
+ ],
33
36
  "devDependencies": {
34
37
  "@biomejs/biome": "^2.3.7",
35
38
  "@vitest/coverage-v8": "^4.0.13",
@@ -1,33 +0,0 @@
1
-
2
- > @incodetech/core@2.0.0-alpha.1 build /Users/alexisnavarro/dev/incode-web-sdk/packages/core
3
- > tsdown -c tsdown.config.ts
4
-
5
- ℹ tsdown v0.16.6 powered by rolldown v1.0.0-beta.51
6
- ℹ Using tsdown config: /Users/alexisnavarro/dev/incode-web-sdk/packages/core/tsdown.config.ts
7
- ℹ entry: src/index.ts, src/flow/index.ts, src/selfie/index.ts, src/phone/index.ts, src/email/index.ts
8
- ℹ target: es2021
9
- ℹ tsconfig: tsconfig.json
10
- ℹ Build start
11
- ℹ Cleaning 17 files
12
- ℹ dist/selfie.esm.js 29.95 kB │ gzip: 7.04 kB
13
- ℹ dist/flow.esm.js 16.62 kB │ gzip: 3.71 kB
14
- ℹ dist/phone.esm.js 15.15 kB │ gzip: 3.90 kB
15
- ℹ dist/email.esm.js 12.99 kB │ gzip: 3.51 kB
16
- ℹ dist/index.esm.js 1.77 kB │ gzip: 0.82 kB
17
- ℹ dist/lib-CyIAFRfr.esm.js 518.11 kB │ gzip: 111.32 kB
18
- ℹ dist/xstate.esm-B_rda9yU.esm.js 106.95 kB │ gzip: 26.21 kB
19
- ℹ dist/endpoints-Cej4yooX.esm.js 61.87 kB │ gzip: 14.35 kB
20
- ℹ dist/setup-DURCOSag.esm.js 5.77 kB │ gzip: 1.97 kB
21
- ℹ dist/chunk-C_Yo44FK.esm.js 1.86 kB │ gzip: 0.80 kB
22
- ℹ dist/addEvent-B_EPO4lN.esm.js 0.42 kB │ gzip: 0.28 kB
23
- ℹ dist/selfie.d.ts 24.12 kB │ gzip: 6.44 kB
24
- ℹ dist/flow.d.ts 18.80 kB │ gzip: 5.38 kB
25
- ℹ dist/phone.d.ts 9.53 kB │ gzip: 2.92 kB
26
- ℹ dist/email.d.ts 8.48 kB │ gzip: 2.62 kB
27
- ℹ dist/index.d.ts 8.45 kB │ gzip: 2.54 kB
28
- ℹ dist/warmup-Dr7OcFND.d.ts 1.83 kB │ gzip: 0.83 kB
29
- ℹ dist/Manager-6BwbaI_H.d.ts 0.67 kB │ gzip: 0.39 kB
30
- ℹ dist/types-tq1ypYSL.d.ts 0.23 kB │ gzip: 0.16 kB
31
- ℹ dist/StateMachine-7c1gcu94.d.ts 0.11 kB │ gzip: 0.08 kB
32
- ℹ 20 files, total: 843.68 kB
33
- ✔ Build complete in 1529ms
@@ -1,22 +0,0 @@
1
-
2
- > @incodetech/core@1.0.0 coverage /Users/alexisnavarro/dev/incode-web-sdk/packages/core
3
- > vitest run --coverage
4
-
5
-
6
- RUN v4.0.13 /Users/alexisnavarro/dev/incode-web-sdk/packages/core
7
- Coverage enabled with v8
8
-
9
- ✓ src/index.test.ts (1 test) 2ms
10
-
11
- Test Files 1 passed (1)
12
- Tests 1 passed (1)
13
- Start at 14:40:55
14
- Duration 162ms (transform 21ms, setup 0ms, collect 26ms, tests 2ms, environment 0ms, prepare 13ms)
15
-
16
- % Coverage report from v8
17
- ----------|---------|----------|---------|---------|-------------------
18
- File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
19
- ----------|---------|----------|---------|---------|-------------------
20
- All files | 100 | 100 | 100 | 100 |
21
- index.ts | 100 | 100 | 100 | 100 |
22
- ----------|---------|----------|---------|---------|-------------------
@@ -1,6 +0,0 @@
1
-
2
- 
3
- > @incodetech/core@1.0.0 format /Users/alexisnavarro/dev/incode-web-sdk/packages/core
4
- > biome format . --write
5
-
6
- Formatted 21 files in 15ms. Fixed 5 files.
@@ -1,77 +0,0 @@
1
-
2
- 
3
- > @incodetech/core@1.0.0 lint:fix /Users/alexisnavarro/dev/incode-web-sdk/packages/core
4
- > biome lint . --write
5
-
6
- src/id/IdCaptureStateMachine.test.ts:21:3 ]8;;https://biomejs.dev/linter/rules/no-unused-imports\lint/correctness/noUnusedImports]8;;\  FIXABLE  ━━━━━━━━━━
7
-
8
-  ⚠ Several of these imports are unused.
9
-  
10
-   19 │   createIdCaptureMachine,
11
-   20 │   type IdCaptureConfig,
12
-  > 21 │   type IdCaptureContext,
13
-     │   ^^^^^^^^^^^^^^^^^^^^^^
14
-  > 22 │   type IdCaptureEvent,
15
-     │   ^^^^^^^^^^^^^^^^^^^
16
-   23 │   type QualityFeedback,
17
-   24 │ } from "./IdCaptureStateMachine";
18
-  
19
-  ℹ Unused imports might be the result of an incomplete refactoring.
20
-  
21
-  ℹ Unsafe fix: Remove the unused imports.
22
-  
23
-    19  19 │     createIdCaptureMachine,
24
-    20  20 │     type IdCaptureConfig,
25
-    21      │ - ··type·IdCaptureContext,
26
-    22      │ - ··type·IdCaptureEvent,
27
-    23  21 │     type QualityFeedback,
28
-    24  22 │   } from "./IdCaptureStateMachine";
29
-  
30
- 
31
- src/id/IdCaptureStateMachine.test.ts:25:13 ]8;;https://biomejs.dev/linter/rules/no-unused-imports\lint/correctness/noUnusedImports]8;;\  FIXABLE  ━━━━━━━━━━
32
-
33
-  ⚠ This import is unused.
34
-  
35
-   23 │   type QualityFeedback,
36
-   24 │ } from "./IdCaptureStateMachine";
37
-  > 25 │ import type { StateMachine } from "@incodetech/infra";
38
-     │             ^^^^^^^^^^^^^^^^
39
-   26 │ 
40
-   27 │ // Mock timers for async event queue processing
41
-  
42
-  ℹ Unused imports might be the result of an incomplete refactoring.
43
-  
44
-  ℹ Unsafe fix: Remove the unused imports.
45
-  
46
-    23  23 │     type QualityFeedback,
47
-    24  24 │   } from "./IdCaptureStateMachine";
48
-    25      │ - import·type·{·StateMachine·}·from·"@incodetech/infra";
49
-    26  25 │   
50
-    27  26 │   // Mock timers for async event queue processing
51
-  
52
- 
53
- src/id/IdCaptureStateMachine.ts:170:16 ]8;;https://biomejs.dev/linter/rules/no-unused-function-parameters\lint/correctness/noUnusedFunctionParameters]8;;\  FIXABLE  ━━━━━━━━━━
54
-
55
-  ⚠ This parameter is unused.
56
-  
57
-   168 │             target: "ERROR",
58
-   169 │             actions: [
59
-  > 170 │               (ctx, event) => {
60
-      │                ^^^
61
-   171 │                 return {
62
-   172 │                   error: (
63
-  
64
-  ℹ Unused parameters might be the result of an incomplete refactoring.
65
-  
66
-  ℹ Unsafe fix: If this is intentional, prepend ctx with an underscore.
67
-  
68
-   168 168 │               target: "ERROR",
69
-   169 169 │               actions: [
70
-   170     │ - ··············(ctx,·event)·=>·{
71
-       170 │ + ··············(_ctx,·event)·=>·{
72
-   171 171 │                   return {
73
-   172 172 │                     error: (
74
-  
75
- 
76
- Checked 5 files in 40ms. No fixes applied.
77
- Found 3 warnings.
@@ -1,95 +0,0 @@
1
-
2
- 
3
- > @incodetech/core@1.0.0 lint /Users/alexisnavarro/dev/incode-web-sdk/packages/core
4
- > biome lint .
5
-
6
- src/flow/flowStateMachine.test.ts:5:3 ]8;;https://biomejs.dev/linter/rules/no-unused-imports\lint/correctness/noUnusedImports]8;;\  FIXABLE  ━━━━━━━━━━
7
-
8
-  ⚠ Several of these imports are unused.
9
-  
10
-   3 │ import {
11
-   4 │   createFailingGetFlow,
12
-  > 5 │   createMockFlow,
13
-    │   ^^^^^^^^^^^^^^
14
-   6 │   createMockGetFlow,
15
-   7 │   mockFlow,
16
-  
17
-  ℹ Unused imports might be the result of an incomplete refactoring.
18
-  
19
-  ℹ Unsafe fix: Remove the unused imports.
20
-  
21
-    3  3 │   import {
22
-    4  4 │     createFailingGetFlow,
23
-    5     │ - ··createMockFlow,
24
-    6  5 │     createMockGetFlow,
25
-    7  6 │     mockFlow,
26
-  
27
- 
28
- src/id/IdCaptureServices.ts:10:52 ]8;;https://biomejs.dev/linter/rules/no-confusing-void-type\lint/suspicious/noConfusingVoidType]8;;\  FIXABLE  ━━━━━━━━━━
29
-
30
-  ⚠ void is confusing inside a union type.
31
-  
32
-    8 │ type IdCaptureSnapshot = SnapshotFrom<IdCaptureMachine>;
33
-    9 │ 
34
-  > 10 │ type ServiceReturn = void | (() => void) | Promise<void | (() => void)>;
35
-     │                                                    ^^^^
36
-   11 │ 
37
-   12 │ export type IdCaptureServices = {
38
-  
39
-  ℹ Unsafe fix: Use undefined instead.
40
-  
41
-    8  8 │   type IdCaptureSnapshot = SnapshotFrom<IdCaptureMachine>;
42
-    9  9 │   
43
-    10     │ - type·ServiceReturn·=·void·|·(()·=>·void)·|·Promise<void·|·(()·=>·void)>;
44
-        10 │ + type·ServiceReturn·=·void·|·(()·=>·void)·|·Promise<undefined·|·(()·=>·void)>;
45
-    11  11 │   
46
-    12  12 │   export type IdCaptureServices = {
47
-  
48
- 
49
- src/id/IdCaptureServices.ts:3:3 ]8;;https://biomejs.dev/linter/rules/no-unused-imports\lint/correctness/noUnusedImports]8;;\  FIXABLE  ━━━━━━━━━━
50
-
51
-  ⚠ Several of these imports are unused.
52
-  
53
-   1 │ import type { SnapshotFrom } from '@incodetech/infra';
54
-   2 │ import type {
55
-  > 3 │   IdCaptureContext,
56
-    │   ^^^^^^^^^^^^^^^^
57
-   4 │   IdCaptureEvent,
58
-   5 │   IdCaptureMachine,
59
-  
60
-  ℹ Unused imports might be the result of an incomplete refactoring.
61
-  
62
-  ℹ Unsafe fix: Remove the unused imports.
63
-  
64
-    1  1 │   import type { SnapshotFrom } from '@incodetech/infra';
65
-    2  2 │   import type {
66
-    3     │ - ··IdCaptureContext,
67
-    4  3 │     IdCaptureEvent,
68
-    5  4 │     IdCaptureMachine,
69
-  
70
- 
71
- src/id/IdCaptureStateMachine.ts:276:40 ]8;;https://biomejs.dev/linter/rules/no-unused-function-parameters\lint/correctness/noUnusedFunctionParameters]8;;\  FIXABLE  ━━━━━━━━━━
72
-
73
-  ⚠ This parameter is unused.
74
-  
75
-   274 │ export type IdCaptureActor = ActorRefFrom<IdCaptureMachine>;
76
-   275 │ 
77
-  > 276 │ export function createIdCaptureMachine(config: IdCaptureConfig) {
78
-      │                                        ^^^^^^
79
-   277 │   return idCaptureMachine;
80
-   278 │ }
81
-  
82
-  ℹ Unused parameters might be the result of an incomplete refactoring.
83
-  
84
-  ℹ Unsafe fix: If this is intentional, prepend config with an underscore.
85
-  
86
-   274 274 │   export type IdCaptureActor = ActorRefFrom<IdCaptureMachine>;
87
-   275 275 │   
88
-   276     │ - export·function·createIdCaptureMachine(config:·IdCaptureConfig)·{
89
-       276 │ + export·function·createIdCaptureMachine(_config:·IdCaptureConfig)·{
90
-   277 277 │     return idCaptureMachine;
91
-   278 278 │   }
92
-  
93
- 
94
- Checked 21 files in 8ms. No fixes applied.
95
- Found 4 warnings.