@frankieone/one-sdk 1.7.14-rc.3 → 1.7.14-rc.4

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 (29) hide show
  1. package/dist/cli/darwin-amd64/onesdk-cli +0 -0
  2. package/dist/cli/darwin-arm64/onesdk-cli +0 -0
  3. package/dist/cli/linux-amd64/onesdk-cli +0 -0
  4. package/dist/cli/linux-arm64/onesdk-cli +0 -0
  5. package/dist/cli/templateGenerator.js +20 -2
  6. package/dist/cli/windows-amd64/onesdk-cli.exe +0 -0
  7. package/dist/commit.txt +1 -1
  8. package/dist/esm/modules/cli/index.d.ts +7 -1
  9. package/dist/esm/modules/cli/index.d.ts.map +1 -1
  10. package/dist/esm/modules/cli/index.js +3 -3
  11. package/dist/esm/modules/cli/index.js.map +1 -1
  12. package/dist/esm/modules/cli/template/index.d.ts +6 -9
  13. package/dist/esm/modules/cli/template/index.d.ts.map +1 -1
  14. package/dist/esm/modules/cli/template/index.js +63 -5
  15. package/dist/esm/modules/cli/template/index.js.map +1 -1
  16. package/dist/esm/modules/cli/template/templateIdv.d.ts +1 -1
  17. package/dist/esm/modules/cli/template/templateIdv.d.ts.map +1 -1
  18. package/dist/esm/modules/cli/template/templateIdv.js +73 -90
  19. package/dist/esm/modules/cli/template/templateIdv.js.map +1 -1
  20. package/dist/esm/modules/cli/template/templateIdvReview.d.ts +1 -1
  21. package/dist/esm/modules/cli/template/templateIdvReview.d.ts.map +1 -1
  22. package/dist/esm/modules/cli/template/templateIdvReview.js +121 -134
  23. package/dist/esm/modules/cli/template/templateIdvReview.js.map +1 -1
  24. package/dist/esm/modules/cli/template/templateManualKyc.d.ts +1 -1
  25. package/dist/esm/modules/cli/template/templateManualKyc.d.ts.map +1 -1
  26. package/dist/esm/modules/cli/template/templateManualKyc.js +213 -212
  27. package/dist/esm/modules/cli/template/templateManualKyc.js.map +1 -1
  28. package/dist/esm/modules/meta.json +1 -1
  29. package/package.json +2 -2
Binary file
Binary file
Binary file
Binary file
@@ -2,6 +2,15 @@
2
2
 
3
3
  /* eslint-disable no-undef */
4
4
  /* eslint-disable no-console */
5
+ function parseArgs(args) {
6
+ return {
7
+ flowId: args[2],
8
+ env: args[3],
9
+ cid: args[4],
10
+ ccid: args[5],
11
+ apiKey: args[6],
12
+ };
13
+ }
5
14
 
6
15
  (async () => {
7
16
  try {
@@ -17,8 +26,17 @@
17
26
  throw new Error('generateOneSdkFlow is not a function');
18
27
  }
19
28
 
20
- const flowId = process.argv[2];
21
- process.stdout.write(generateOneSdkFlow(flowId));
29
+ const { flowId, env, cid, ccid, apiKey } = parseArgs(process.argv);
30
+
31
+ process.stdout.write(
32
+ generateOneSdkFlow({
33
+ flowId,
34
+ env,
35
+ cid,
36
+ ccid,
37
+ apiKey,
38
+ }),
39
+ );
22
40
  } catch (error) {
23
41
  console.error('Error loading module:', error);
24
42
  }
package/dist/commit.txt CHANGED
@@ -1 +1 @@
1
- ef2b97b9e8b4480c0f4133b451d81c7ffad22a65
1
+ ff831968ea9638416b9aa21f65ac4f7bc695ccdc
@@ -1,2 +1,8 @@
1
- export default function generateOneSdkFlow(flowId: any): any;
1
+ export default function generateOneSdkFlow({ flowId, env, cid, ccid, apiKey }: {
2
+ flowId: any;
3
+ env: any;
4
+ cid: any;
5
+ ccid: any;
6
+ apiKey: any;
7
+ }): string;
2
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../modules/cli/index.js"],"names":[],"mappings":"AAGA,6DAEC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../modules/cli/index.js"],"names":[],"mappings":"AAGA;;;;;;WAEC"}
@@ -1,6 +1,6 @@
1
- import templateObjectMap from './template/index.js';
1
+ import createHTML from './template/index.js';
2
2
  // @param {string} flowId - the id of the flow to generate, idv / idv_review / manual_kyc
3
- export default function generateOneSdkFlow(flowId) {
4
- return templateObjectMap[flowId];
3
+ export default function generateOneSdkFlow({ flowId, env, cid, ccid, apiKey }) {
4
+ return createHTML(flowId)({ env, cid, ccid, apiKey });
5
5
  }
6
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../modules/cli/index.js"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AAEpD,yFAAyF;AACzF,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,MAAM;IAC/C,OAAO,iBAAiB,CAAC,MAAM,CAAC,CAAC;AACnC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../modules/cli/index.js"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,qBAAqB,CAAC;AAE7C,yFAAyF;AACzF,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE;IAC3E,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;AACxD,CAAC"}
@@ -1,10 +1,7 @@
1
- export default templateObjectMap;
2
- declare namespace templateObjectMap {
3
- export { templateIdv as idv };
4
- export { templateIdvReview as idv_review };
5
- export { templateManualKyc as manual_kyc };
6
- }
7
- import { templateIdv } from './templateIdv.js';
8
- import { templateIdvReview } from './templateIdvReview.js';
9
- import { templateManualKyc } from './templateManualKyc.js';
1
+ export default function createHTML(flowId: any): ({ env, cid, ccid, apiKey }: {
2
+ env: any;
3
+ cid: any;
4
+ ccid: any;
5
+ apiKey: any;
6
+ }) => string;
10
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../modules/cli/template/index.js"],"names":[],"mappings":";;;;;;4BAA4B,kBAAkB;kCACZ,wBAAwB;kCACxB,wBAAwB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../modules/cli/template/index.js"],"names":[],"mappings":"AAuDA;;;;;aAkBC"}
@@ -1,10 +1,68 @@
1
1
  import { templateIdv } from './templateIdv.js';
2
2
  import { templateIdvReview } from './templateIdvReview.js';
3
3
  import { templateManualKyc } from './templateManualKyc.js';
4
- const templateObjectMap = {
5
- idv: templateIdv,
6
- idv_review: templateIdvReview,
7
- manual_kyc: templateManualKyc,
4
+ const backendURL = {
5
+ dev: "https://backend.latest.frankiefinancial.io",
6
+ qa: "https://backend.qa.frankiefinancial.io",
7
+ uat: "https://backend.kycaml.uat.frankiefinancial.io",
8
+ prod: "https://backend.kycaml.frankiefinancial.io",
8
9
  };
9
- export default templateObjectMap;
10
+ const js = String.raw;
11
+ const createRequestTokenFunction = ({ env, cid, ccid, apiKey }) => js `
12
+ // Function to get an authentication token from the FrankieOne API
13
+ // This token is required to initialize OneSDK
14
+ async function getToken() {
15
+ // WARNING: This is for testing purposes only
16
+ // In production, token generation should happen server-side for security
17
+
18
+ // Replace these placeholder values with your actual credentials
19
+ const customerId = '${cid}';
20
+ // Optional: leave empty if not applicable (for multi-tenant setups)
21
+ const customerChildId = '${ccid}';
22
+ const apiKey = '${apiKey}';
23
+
24
+ // Create authentication key by base64 encoding the credentials
25
+ const authKey = btoa(
26
+ [customerId, customerChildId, apiKey].filter(Boolean).join(':'),
27
+ );
28
+
29
+ // Replace this with your own logic to generate a unique customer reference
30
+ const customerReference = Math.random().toString(36).substring(2);
31
+
32
+ // Request a machine session token from FrankieOne
33
+ const tokenResponse = await fetch(
34
+ '${backendURL[env]}/auth/v2/machine-session',
35
+ {
36
+ method: 'POST',
37
+ headers: {
38
+ authorization: 'machine ' + authKey,
39
+ 'Content-Type': 'application/json',
40
+ },
41
+ body: JSON.stringify({
42
+ permissions: {
43
+ preset: 'one-sdk',
44
+ reference: customerReference,
45
+ },
46
+ }),
47
+ },
48
+ );
49
+
50
+ return await tokenResponse.json();
51
+ }`;
52
+ export default function createHTML(flowId) {
53
+ return function ({ env, cid, ccid, apiKey }) {
54
+ const getTokenImpl = createRequestTokenFunction({ env, cid, ccid, apiKey });
55
+ switch (flowId) {
56
+ case 'idv':
57
+ return templateIdv(getTokenImpl);
58
+ case 'idv_review':
59
+ return templateIdvReview(getTokenImpl);
60
+ case 'manual_kyc':
61
+ return templateManualKyc(getTokenImpl);
62
+ default:
63
+ return 'Unknown flow ID';
64
+ }
65
+ };
66
+ }
67
+ ;
10
68
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../modules/cli/template/index.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,MAAM,iBAAiB,GAAG;IACxB,GAAG,EAAE,WAAW;IAChB,UAAU,EAAE,iBAAiB;IAC7B,UAAU,EAAE,iBAAiB;CAC9B,CAAC;AACF,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../modules/cli/template/index.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,MAAM,UAAU,GAAG;IACjB,GAAG,EAAE,4CAA4C;IACjD,EAAE,EAAE,wCAAwC;IAC5C,GAAG,EAAE,gDAAgD;IACrD,IAAI,EAAE,4CAA4C;CACnD,CAAC;AAEF,MAAM,EAAE,GAAG,MAAM,CAAC,GAAG,CAAC;AAEtB,MAAM,0BAA0B,GAAG,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,EAAE,CAAA;;;;;;;;4BAQzC,GAAG;;iCAEE,IAAI;wBACb,MAAM;;;;;;;;;;;;WAYnB,UAAU,CAAC,GAAG,CAAC;;;;;;;;;;;;;;;;;MAiBpB,CAAC;AAEP,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,MAAM;IACvC,OAAO,UAAU,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE;QACzC,MAAM,YAAY,GAAG,0BAA0B,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;QAE5E,QAAQ,MAAM,EAAE,CAAC;YACf,KAAK,KAAK;gBACR,OAAO,WAAW,CAAC,YAAY,CAAC,CAAC;YAEnC,KAAK,YAAY;gBACf,OAAO,iBAAiB,CAAC,YAAY,CAAC,CAAC;YAEzC,KAAK,YAAY;gBACf,OAAO,iBAAiB,CAAC,YAAY,CAAC,CAAC;YAEzC;gBACE,OAAO,iBAAiB,CAAC;QAC7B,CAAC;IACH,CAAC,CAAC;AACJ,CAAC;AAAA,CAAC"}
@@ -1,2 +1,2 @@
1
- export const templateIdv: string;
1
+ export function templateIdv(getTokenImpl: any): string;
2
2
  //# sourceMappingURL=templateIdv.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"templateIdv.d.ts","sourceRoot":"","sources":["../../../../../modules/cli/template/templateIdv.js"],"names":[],"mappings":"AAEA,iCAuGW"}
1
+ {"version":3,"file":"templateIdv.d.ts","sourceRoot":"","sources":["../../../../../modules/cli/template/templateIdv.js"],"names":[],"mappings":"AAEO,uDAsFC"}
@@ -1,106 +1,89 @@
1
1
  const html = String.raw;
2
- export const templateIdv = html `<!-- Generated by OneSDK CLI -->
3
- <!-- More information: https://docs.frankieone.com/v1.14.1/docs/about-onesdk -->
2
+ export const templateIdv = (getTokenImpl) => html `<!-- Generated by OneSDK CLI -->
3
+ <!-- More information: https://docs.frankieone.com/v1.14.1/docs/about-onesdk -->
4
4
 
5
- <!doctype html>
6
- <html lang="en">
7
- <head>
8
- <!-- UTF-8 encoding you page is important as some text in the smart UI might not come out as you expect -->
9
- <meta charset="utf-8" />
10
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
11
- <title>OneSDK - IDV</title>
5
+ <!DOCTYPE html>
6
+ <html lang="en">
7
+ <head>
8
+ <!-- UTF-8 encoding ensures proper display of special characters in the UI -->
9
+ <meta charset="utf-8" />
10
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
11
+ <title>OneSDK - IDV</title>
12
12
 
13
- <!-- NOTE: You can change the version of OneSDK to the desired version here -->
14
- <script src="https://assets.frankiefinancial.io/one-sdk/v1/oneSdk.umd.js"></script>
13
+ <!-- Load the OneSDK library from FrankieOne CDN -->
14
+ <!-- You can change the version number in the URL to use a different version -->
15
+ <script src="https://assets.frankiefinancial.io/one-sdk/v1/oneSdk.umd.js"></script>
15
16
 
16
- <script>
17
- async function getToken() {
18
- // WARNING: This is for testing purposes only
19
- // use server-side code to request the token in production for security reasons
17
+ <script>
18
+ ${getTokenImpl}
20
19
 
21
- const customerId = '<CUSTOMER_ID_HERE>';
22
- const customerChildId = '<CUSTOMER_CHILD_ID_HERE>';
23
- const apiKey = '<API_KEY_HERE>';
24
- const authKey = btoa(
25
- customerId + ':' + customerChildId + ':' + apiKey,
26
- );
20
+ // Main function to initialize and start OneSDK
21
+ async function startOneSdk() {
22
+ const sessionToken = await getToken();
27
23
 
28
- const tokenResponse = await fetch(
29
- BACKEND_URL[env] + '/auth/v2/machine-session',
30
- {
31
- method: 'POST',
32
- headers: {
33
- authorization: 'machine ' + authKey,
34
- 'Content-Type': 'application/json',
35
- },
36
- body: JSON.stringify({
37
- permissions: {
38
- preset: 'one-sdk',
39
- reference: '<CUSTOMER_REFERENCE_HERE>',
40
- },
41
- }),
24
+ // Initialize OneSDK with configuration
25
+ const oneSdk = await OneSdk({
26
+ session: {
27
+ token: sessionToken,
28
+ },
29
+ mode: 'production',
30
+ recipe: {
31
+ form: {
32
+ provider: {
33
+ name: 'react',
34
+ // UNCOMMENT AND ADD YOUR KEY to use Google Places address autocomplete
35
+ // googleApiKey: "<GOOGLE_API_KEY>",
42
36
  },
43
- );
37
+ },
38
+ },
39
+ });
44
40
 
45
- return await tokenResponse.json();
46
- }
47
-
48
- async function startOneSdk() {
49
- const sessionToken = await getToken();
41
+ // Create an IDV (Identity Verification) flow instance
42
+ const idv = oneSdk.flow('idv');
50
43
 
51
- const oneSdk = await OneSdk({
52
- session: {
53
- token: sessionToken,
54
- },
55
- mode: 'production',
56
- recipe: {
57
- form: {
58
- provider: {
59
- name: 'react',
60
- // NOTE: This is for the autocomplete feature in the form
61
- // googleApiKey: "<GOOGLE_API_KEY>",
62
- },
63
- },
64
- },
65
- });
44
+ // Mount the IDV flow to the container element
45
+ idv.mount('#idv-el');
66
46
 
67
- const idv = oneSdk.flow('idv');
47
+ // Handle loading states during verification
48
+ idv.on('loading', () => {
49
+ console.log('loading');
50
+ });
68
51
 
69
- idv.mount('#idv-el');
70
- idv.on('loading', () => {
71
- console.log('loading');
72
- });
73
-
74
- idv.on('results', async ({ checkStatus, document, entityId }) => {
75
- if (checkStatus) {
76
- console.log('results succesful');
77
- } else {
78
- console.log('no data returned');
79
- }
80
- });
52
+ // Handle verification results
53
+ idv.on('results', async ({ checkStatus, document, entityId }) => {
54
+ if (checkStatus) {
55
+ console.log('results succesful');
56
+ } else {
57
+ console.log('no data returned');
58
+ }
59
+ });
81
60
 
82
- idv.on('error', ({ message, payload }) => {
83
- console.log('received error');
84
- console.log(message, payload);
85
- });
61
+ // Handle errors during verification
62
+ idv.on('error', ({ message, payload }) => {
63
+ console.log('received error');
64
+ console.log(message, payload);
65
+ });
86
66
 
87
- idv.on('detection_complete', (message) => {
88
- console.log('capture finished');
89
- console.log(message);
90
- });
67
+ // Handle completion of document detection/capture
68
+ idv.on('detection_complete', (message) => {
69
+ console.log('capture finished');
70
+ console.log(message);
71
+ });
91
72
 
92
- idv.on('*', (message) => {
93
- console.log(message);
94
- });
95
- }
96
- </script>
97
- </head>
73
+ // Log all OneSDK events to console for debugging
74
+ idv.on('*', (message) => {
75
+ console.log(message);
76
+ });
77
+ }
78
+ </script>
79
+ </head>
98
80
 
99
- <body style="background-color: white" onload="startOneSdk()">
100
- <div
101
- id="idv-el"
102
- style="top: 0; left: 0; width: 100%; height: 100%; display: block"
103
- ></div>
104
- </body>
105
- </html>`;
81
+ <body style="background-color: white" onload="startOneSdk()">
82
+ <!-- Container element where OneSDK will mount its UI components -->
83
+ <div
84
+ id="idv-el"
85
+ style="top: 0; left: 0; width: 100%; height: 100%; display: block"
86
+ ></div>
87
+ </body>
88
+ </html>`;
106
89
  //# sourceMappingURL=templateIdv.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"templateIdv.js","sourceRoot":"","sources":["../../../../../modules/cli/template/templateIdv.js"],"names":[],"mappings":"AAAA,MAAM,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC;AAExB,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAuGrB,CAAC"}
1
+ {"version":3,"file":"templateIdv.js","sourceRoot":"","sources":["../../../../../modules/cli/template/templateIdv.js"],"names":[],"mappings":"AAAA,MAAM,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC;AAExB,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,YAAY,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;MAgB3C,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAsEV,CAAC"}
@@ -1,2 +1,2 @@
1
- export const templateIdvReview: string;
1
+ export function templateIdvReview(getTokenImpl: any): string;
2
2
  //# sourceMappingURL=templateIdvReview.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"templateIdvReview.d.ts","sourceRoot":"","sources":["../../../../../modules/cli/template/templateIdvReview.js"],"names":[],"mappings":"AAEA,uCA0IW"}
1
+ {"version":3,"file":"templateIdvReview.d.ts","sourceRoot":"","sources":["../../../../../modules/cli/template/templateIdvReview.js"],"names":[],"mappings":"AAEO,6DA6HC"}
@@ -1,141 +1,128 @@
1
1
  const html = String.raw;
2
- export const templateIdvReview = html `<!-- Generated by OneSDK CLI -->
3
- <!-- More information: https://docs.frankieone.com/v1.14.1/docs/about-onesdk -->
4
-
5
- <!doctype html>
6
- <html lang="en">
7
- <head>
8
- <!-- UTF-8 encoding you page is important as some text in the smart UI might not come out as you expect -->
9
- <meta charset="utf-8" />
10
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
11
- <title>OneSDK - IDV+Review</title>
12
-
13
- <!-- NOTE: You can change the version of OneSDK to the desired version here -->
14
- <script src="https://assets.frankiefinancial.io/one-sdk/v1/oneSdk.umd.js"></script>
15
-
16
- <script>
17
- async function getToken() {
18
- // WARNING: This is for testing purposes only
19
- // use server-side code to request the token in production for security reasons
20
-
21
- const customerId = '<CUSTOMER_ID_HERE>';
22
- const customerChildId = '<CUSTOMER_CHILD_ID_HERE>';
23
- const apiKey = '<API_KEY_HERE>';
24
- const authKey = btoa(
25
- customerId + ':' + customerChildId + ':' + apiKey,
26
- );
27
-
28
- const tokenResponse = await fetch(
29
- BACKEND_URL[env] + '/auth/v2/machine-session',
30
- {
31
- method: 'POST',
32
- headers: {
33
- authorization: 'machine ' + authKey,
34
- 'Content-Type': 'application/json',
35
- },
36
- body: JSON.stringify({
37
- permissions: {
38
- preset: 'one-sdk',
39
- // NOTE: Replace this with your customer reference
40
- reference: '<CUSTOMER_REFERENCE_HERE>',
41
- },
42
- }),
43
- },
44
- );
2
+ export const templateIdvReview = (getTokenImpl) => html `<!-- Generated by OneSDK CLI -->
3
+ <!-- More information: https://docs.frankieone.com/v1.14.1/docs/about-onesdk -->
45
4
 
46
- return await tokenResponse.json();
47
- }
5
+ <!DOCTYPE html>
6
+ <html lang="en">
7
+ <head>
8
+ <!-- UTF-8 encoding ensures proper display of special characters in the UI -->
9
+ <meta charset="utf-8" />
10
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
11
+ <title>OneSDK - IDV+Review</title>
48
12
 
49
- async function startOneSdk() {
50
- const sessionToken = await getToken();
13
+ <!-- Load the OneSDK library from FrankieOne CDN -->
14
+ <!-- You can change the version number in the URL to use a different version -->
15
+ <script src="https://assets.frankiefinancial.io/one-sdk/v1/oneSdk.umd.js"></script>
51
16
 
52
- const oneSdk = await OneSdk({
53
- session: {
54
- token: sessionToken,
55
- },
56
- mode: 'production',
57
- recipe: {
58
- form: {
59
- provider: {
60
- name: 'react',
61
- // NOTE: This is for the autocomplete feature in the form
62
- // googleApiKey: "<GOOGLE_API_KEY>",
63
- },
64
- },
17
+ <script>
18
+ ${getTokenImpl}
19
+
20
+ // Main function to initialize and start OneSDK
21
+ async function startOneSdk() {
22
+ const sessionToken = await getToken();
23
+
24
+ // Initialize OneSDK with configuration
25
+ const oneSdk = await OneSdk({
26
+ session: {
27
+ token: sessionToken,
28
+ },
29
+ mode: 'production',
30
+ recipe: {
31
+ form: {
32
+ provider: {
33
+ name: 'react',
34
+ // UNCOMMENT AND ADD YOUR KEY to use Google Places address autocomplete
35
+ // googleApiKey: "<GOOGLE_API_KEY>",
65
36
  },
66
- });
67
-
68
- const idv = oneSdk.flow('idv');
69
- const loading1 = oneSdk.component('form', {
70
- name: 'LOADING',
71
- title: { label: 'Loading...' },
72
- descriptions: [{ label: '' }],
73
- });
74
- const loading2 = oneSdk.component('form', {
75
- name: 'LOADING',
76
- title: { label: 'Processing results...' },
77
- descriptions: [
78
- {
79
- label:
80
- "Hold tight, this can take up to 30 seconds. Please do not refresh this page or click the 'back' button on your browser.",
81
- },
82
- ],
83
- });
84
- const review = oneSdk.component('form', {
85
- name: 'REVIEW',
86
- type: 'ocr',
87
- });
88
-
89
- idv.mount('#idv-el');
90
- let before = true;
91
- idv.on('loading', (display) => {
92
- if (display) {
93
- if (before) {
94
- loading1.mount('#loading1');
95
- }
96
- } else {
97
- if (before) {
98
- loading1.unmount();
99
- }
100
- before = false;
101
- }
102
- console.log(before);
103
- console.log(display);
104
- });
105
-
106
- idv.on('results', async ({ checkStatus, document, entityId }) => {
107
- if (checkStatus) {
108
- console.log('results succesful');
109
- loading2.unmount();
110
- review.mount('#idv-el');
111
- } else {
112
- console.log('no data returned');
113
- }
114
- });
115
-
116
- idv.on('error', ({ message, payload }) => {
117
- console.log('received error');
118
- console.log(message, payload);
119
- });
120
-
121
- idv.on('detection_complete', (message) => {
122
- console.log('capture finished');
123
- console.log(message);
124
- loading2.mount('#loading2');
125
- });
126
-
127
- idv.on('*', (message) => {
128
- console.log(message);
129
- });
37
+ },
38
+ },
39
+ });
40
+
41
+ // Create an IDV flow instance for identity verification
42
+ const idv = oneSdk.flow('idv');
43
+
44
+ // Create loading screens to show during different stages
45
+ const loading1 = oneSdk.component('form', {
46
+ name: 'LOADING',
47
+ title: { label: 'Loading...' },
48
+ descriptions: [{ label: '' }],
49
+ });
50
+
51
+ const loading2 = oneSdk.component('form', {
52
+ name: 'LOADING',
53
+ title: { label: 'Processing results...' },
54
+ descriptions: [
55
+ {
56
+ label:
57
+ "Hold tight, this can take up to 30 seconds. Please do not refresh this page or click the 'back' button on your browser.",
58
+ },
59
+ ],
60
+ });
61
+
62
+ // Create review component for OCR (Optical Character Recognition) review
63
+ const review = oneSdk.component('form', {
64
+ name: 'REVIEW',
65
+ type: 'ocr',
66
+ });
67
+
68
+ // Mount the IDV flow to the container element
69
+ idv.mount('#idv-el');
70
+
71
+ // Handle loading states
72
+ let before = true;
73
+ idv.on('loading', (display) => {
74
+ if (display) {
75
+ if (before) {
76
+ loading1.mount('#loading1');
77
+ }
78
+ } else {
79
+ if (before) {
80
+ loading1.unmount();
81
+ }
82
+ before = false;
83
+ }
84
+ console.log(before);
85
+ console.log(display);
86
+ });
87
+
88
+ // Handle verification results
89
+ idv.on('results', async ({ checkStatus, document, entityId }) => {
90
+ if (checkStatus) {
91
+ console.log('results succesful');
92
+ loading2.unmount();
93
+ review.mount('#idv-el');
94
+ } else {
95
+ console.log('no data returned');
130
96
  }
131
- </script>
132
- </head>
133
-
134
- <body style="background-color: white" onload="startOneSdk()">
135
- <div
136
- id="idv-el"
137
- style="top: 0; left: 0; width: 100%; height: 100%; display: block"
138
- ></div>
139
- </body>
140
- </html>`;
97
+ });
98
+
99
+ // Handle errors during verification
100
+ idv.on('error', ({ message, payload }) => {
101
+ console.log('received error');
102
+ console.log(message, payload);
103
+ });
104
+
105
+ // Handle completion of document detection/capture
106
+ idv.on('detection_complete', (message) => {
107
+ console.log('capture finished');
108
+ console.log(message);
109
+ loading2.mount('#loading2');
110
+ });
111
+
112
+ // Log all events for debugging
113
+ idv.on('*', (message) => {
114
+ console.log(message);
115
+ });
116
+ }
117
+ </script>
118
+ </head>
119
+
120
+ <body style="background-color: white" onload="startOneSdk()">
121
+ <!-- Container element where OneSDK will mount its UI components -->
122
+ <div
123
+ id="idv-el"
124
+ style="top: 0; left: 0; width: 100%; height: 100%; display: block"
125
+ ></div>
126
+ </body>
127
+ </html>`;
141
128
  //# sourceMappingURL=templateIdvReview.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"templateIdvReview.js","sourceRoot":"","sources":["../../../../../modules/cli/template/templateIdvReview.js"],"names":[],"mappings":"AAAA,MAAM,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC;AAExB,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UA0I3B,CAAC"}
1
+ {"version":3,"file":"templateIdvReview.js","sourceRoot":"","sources":["../../../../../modules/cli/template/templateIdvReview.js"],"names":[],"mappings":"AAAA,MAAM,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC;AAExB,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,YAAY,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;MAgBjD,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QA6GV,CAAC"}
@@ -1,2 +1,2 @@
1
- export const templateManualKyc: string;
1
+ export function templateManualKyc(getTokenImpl: any): string;
2
2
  //# sourceMappingURL=templateManualKyc.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"templateManualKyc.d.ts","sourceRoot":"","sources":["../../../../../modules/cli/template/templateManualKyc.js"],"names":[],"mappings":"AAEA,uCAqNW"}
1
+ {"version":3,"file":"templateManualKyc.d.ts","sourceRoot":"","sources":["../../../../../modules/cli/template/templateManualKyc.js"],"names":[],"mappings":"AAEO,6DAsNC"}
@@ -1,216 +1,217 @@
1
1
  const html = String.raw;
2
- export const templateManualKyc = html `<!-- Generated by OneSDK CLI -->
3
- <!-- More information: https://docs.frankieone.com/v1.14.1/docs/about-onesdk -->
4
-
5
- <!doctype html>
6
- <html lang="en">
7
- <head>
8
- <!-- UTF-8 encoding you page is important as some text in the smart UI might not come out as you expect -->
9
- <meta charset="utf-8" />
10
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
11
- <title>OneSDK - Manual KYC</title>
12
-
13
- <!-- NOTE: You can change the version of OneSDK to the desired version here -->
14
- <script src="https://assets.frankiefinancial.io/one-sdk/v1/oneSdk.umd.js"></script>
15
-
16
- <script>
17
- async function getToken() {
18
- // WARNING: This is for testing purposes only
19
- // use server-side code to request the token in production for security reasons
20
-
21
- const customerId = '<CUSTOMER_ID_HERE>';
22
- const customerChildId = '<CUSTOMER_CHILD_ID_HERE>';
23
- const apiKey = '<API_KEY_HERE>';
24
- const authKey = btoa(
25
- customerId + ':' + customerChildId + ':' + apiKey,
26
- );
27
-
28
- const tokenResponse = await fetch(
29
- BACKEND_URL[env] + '/auth/v2/machine-session',
30
- {
31
- method: 'POST',
32
- headers: {
33
- authorization: 'machine ' + authKey,
34
- 'Content-Type': 'application/json',
35
- },
36
- body: JSON.stringify({
37
- permissions: {
38
- preset: 'one-sdk',
39
- // NOTE: Replace this with your customer reference
40
- reference: '<CUSTOMER_REFERENCE_HERE>',
41
- },
42
- }),
2
+ export const templateManualKyc = (getTokenImpl) => html `<!-- Generated by OneSDK CLI
3
+ This is a sample HTML template for integrating FrankieOne's OneSDK * It
4
+ implements a complete KYC (Know Your Customer) flow with multiple steps: *
5
+ Welcome -> Consent -> Personal Details -> Document Upload -> Review -> Result
6
+ -->
7
+
8
+ <!DOCTYPE html>
9
+ <html lang="en">
10
+ <head>
11
+ <!-- UTF-8 encoding ensures proper display of international characters -->
12
+ <meta charset="utf-8" />
13
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
14
+ <title>OneSDK - Manual KYC</title>
15
+
16
+ <!-- Load the OneSDK library from FrankieOne CDN -->
17
+ <!-- You can change the version number in the URL to use a different version -->
18
+ <script src="https://assets.frankiefinancial.io/one-sdk/v1/oneSdk.umd.js"></script>
19
+
20
+ <script>
21
+ ${getTokenImpl}
22
+
23
+ /**
24
+ * Main function to initialize and configure OneSDK
25
+ * Sets up the complete KYC flow with all necessary screens and event handlers
26
+ */
27
+ async function startOneSdk() {
28
+ const sessionToken = await getToken();
29
+
30
+ // Initialize OneSDK with basic configuration
31
+ const oneSdk = await OneSdk({
32
+ session: {
33
+ token: sessionToken,
34
+ },
35
+ mode: 'production',
36
+ recipe: {
37
+ form: {
38
+ provider: {
39
+ name: 'react',
40
+ // UNCOMMENT AND ADD YOUR KEY to use Google Places address autocomplete
41
+ // googleApiKey: "<GOOGLE_API_KEY>",
43
42
  },
44
- );
45
-
46
- return await tokenResponse.json();
47
- }
48
-
49
- async function startOneSdk() {
50
- const sessionToken = await getToken();
51
-
52
- const oneSdk = await OneSdk({
53
- session: {
54
- token: sessionToken,
55
- },
56
- mode: 'production',
57
- recipe: {
58
- form: {
59
- provider: {
60
- name: 'react',
61
- // NOTE: This is for the autocomplete feature in the form
62
- // googleApiKey: "<GOOGLE_API_KEY>",
63
- },
64
- },
65
- },
66
- });
67
-
68
- oneSdkInstance.on('*', console.log);
69
- const appContainer = document.querySelector('#idv-el');
70
-
71
- const welcome = oneSdkInstance.component('form', {
72
- name: 'WELCOME',
73
- mode: 'individual',
74
- type: 'manual',
75
- });
76
-
77
- const consent = oneSdkInstance.component('form', {
78
- name: 'CONSENT',
79
- mode: 'individual',
80
- type: 'manual',
81
- });
82
-
83
- const personal = oneSdkInstance.component('form', {
84
- name: 'PERSONAL',
85
- mode: 'individual',
86
- type: 'manual',
87
- });
88
-
89
- const documents = oneSdkInstance.component('form', {
90
- name: 'DOCUMENT',
91
- mode: 'individual',
92
- type: 'manual',
93
- });
94
-
95
- const review = oneSdkInstance.component('form', {
96
- name: 'REVIEW',
97
- mode: 'individual',
98
- type: 'manual',
99
- verify: true,
100
- customResult: true,
101
- });
102
-
103
- const success = oneSdkInstance.component('form', {
104
- name: 'RESULT',
105
- mode: 'individual',
106
- state: 'SUCCESS',
107
- type: 'manual',
108
- cta: {
109
- label: 'Continue',
110
- },
111
- });
112
-
113
- const failed = oneSdkInstance.component('form', {
114
- name: 'RESULT',
115
- mode: 'individual',
116
- state: 'FAIL',
117
- type: 'manual',
118
- cta: {
119
- label: 'Continue',
120
- },
121
- });
122
-
123
- const partial = oneSdkInstance.component('form', {
124
- name: 'RESULT',
125
- mode: 'individual',
126
- state: 'PARTIAL',
127
- type: 'manual',
128
- });
129
-
130
- const pending = oneSdkInstance.component('form', {
131
- name: 'RESULT',
132
- mode: 'individual',
133
- state: 'PENDING',
134
- type: 'manual',
135
- cta: {
136
- label: 'Continue',
137
- },
138
- });
139
-
140
- const retry = oneSdkInstance.component('form', {
141
- name: 'RETRY',
142
- mode: 'individual',
143
- type: 'manual',
144
- });
145
-
146
- welcome.on('form:welcome:ready', () => {
147
- consent.mount(appContainer);
148
- });
149
-
150
- consent.on('form:consent:ready', async () => {
151
- personal.mount(appContainer);
152
- });
153
-
154
- personal.on('form:personal:ready', async () => {
155
- documents.mount(appContainer);
156
- });
157
-
158
- documents.on('form:document:back', async () => {
159
- personal.mount(appContainer);
160
- });
161
-
162
- documents.on('form:document:ready', async () => {
163
- review.mount(appContainer);
164
- });
165
-
166
- review.on('form:review:success', async () => {
167
- success.mount(appContainer);
168
- });
169
-
170
- review.on('form:review:failed', async () => {
171
- failed.mount(appContainer);
172
- });
173
-
174
- review.on('form:review:pending', () => {
175
- pending.mount(appContainer);
176
- });
177
-
178
- let retryCount = 0;
179
- review.on('form:review:partial', async () => {
180
- if (retryCount < 2) {
181
- retryCount += 1;
182
- partial.mount(appContainer);
183
- } else {
184
- failed.mount(appContainer);
185
- }
186
- });
187
-
188
- pending.on('form:result:pending', async () => {
189
- console.log('form result pending');
190
- });
191
-
192
- success.on('form:result:success', async () => {
193
- console.log('form result success');
194
- });
195
-
196
- failed.on('form:result:failed', async () => {
197
- console.log('form result failed');
198
- });
199
-
200
- partial.on('form:result:partial', async () => {
201
- retry.mount(appContainer);
202
- });
203
-
204
- welcome.mount(appContainer);
43
+ },
44
+ },
45
+ });
46
+
47
+ // Enable debug logging of all OneSDK events
48
+ oneSdkInstance.on('*', console.log);
49
+
50
+ // Get the container where OneSDK UI will be mounted
51
+ const appContainer = document.querySelector('#idv-el');
52
+
53
+ // Create components for each step of the KYC flow
54
+ // Each component is configured with specific options for its purpose
55
+
56
+ // Welcome screen - Initial landing page
57
+ const welcome = oneSdkInstance.component('form', {
58
+ name: 'WELCOME',
59
+ mode: 'individual',
60
+ type: 'manual',
61
+ });
62
+
63
+ // Consent screen - Get user permission
64
+ const consent = oneSdkInstance.component('form', {
65
+ name: 'CONSENT',
66
+ mode: 'individual',
67
+ type: 'manual',
68
+ });
69
+
70
+ // Personal details form
71
+ const personal = oneSdkInstance.component('form', {
72
+ name: 'PERSONAL',
73
+ mode: 'individual',
74
+ type: 'manual',
75
+ });
76
+
77
+ // Document upload screen
78
+ const documents = oneSdkInstance.component('form', {
79
+ name: 'DOCUMENT',
80
+ mode: 'individual',
81
+ type: 'manual',
82
+ });
83
+
84
+ // Review screen - Final verification step
85
+ const review = oneSdkInstance.component('form', {
86
+ name: 'REVIEW',
87
+ mode: 'individual',
88
+ type: 'manual',
89
+ verify: true,
90
+ customResult: true,
91
+ });
92
+
93
+ // Various result screens based on verification outcome
94
+ const success = oneSdkInstance.component('form', {
95
+ name: 'RESULT',
96
+ mode: 'individual',
97
+ state: 'SUCCESS',
98
+ type: 'manual',
99
+ cta: {
100
+ label: 'Continue',
101
+ },
102
+ });
103
+
104
+ const failed = oneSdkInstance.component('form', {
105
+ name: 'RESULT',
106
+ mode: 'individual',
107
+ state: 'FAIL',
108
+ type: 'manual',
109
+ cta: {
110
+ label: 'Continue',
111
+ },
112
+ });
113
+
114
+ const partial = oneSdkInstance.component('form', {
115
+ name: 'RESULT',
116
+ mode: 'individual',
117
+ state: 'PARTIAL',
118
+ type: 'manual',
119
+ });
120
+
121
+ const pending = oneSdkInstance.component('form', {
122
+ name: 'RESULT',
123
+ mode: 'individual',
124
+ state: 'PENDING',
125
+ type: 'manual',
126
+ cta: {
127
+ label: 'Continue',
128
+ },
129
+ });
130
+
131
+ const retry = oneSdkInstance.component('form', {
132
+ name: 'RETRY',
133
+ mode: 'individual',
134
+ type: 'manual',
135
+ });
136
+
137
+ // Set up the flow between screens using event handlers
138
+ // Each handler listens for completion of current screen and shows the next
139
+
140
+ welcome.on('form:welcome:ready', () => {
141
+ consent.mount(appContainer);
142
+ });
143
+
144
+ // When consent is given, show personal details form
145
+ consent.on('form:consent:ready', async () => {
146
+ personal.mount(appContainer);
147
+ });
148
+
149
+ personal.on('form:personal:ready', async () => {
150
+ documents.mount(appContainer);
151
+ });
152
+
153
+ // Allow navigation back to personal details
154
+ documents.on('form:document:back', async () => {
155
+ personal.mount(appContainer);
156
+ });
157
+
158
+ documents.on('form:document:ready', async () => {
159
+ review.mount(appContainer);
160
+ });
161
+
162
+ // Handle different verification outcomes
163
+ review.on('form:review:success', async () => {
164
+ success.mount(appContainer);
165
+ });
166
+
167
+ review.on('form:review:failed', async () => {
168
+ failed.mount(appContainer);
169
+ });
170
+
171
+ review.on('form:review:pending', () => {
172
+ pending.mount(appContainer);
173
+ });
174
+
175
+ // Handle partial success with retry logic
176
+ let retryCount = 0;
177
+ review.on('form:review:partial', async () => {
178
+ if (retryCount < 2) {
179
+ retryCount += 1;
180
+ partial.mount(appContainer);
181
+ } else {
182
+ failed.mount(appContainer);
205
183
  }
206
- </script>
207
- </head>
208
-
209
- <body style="background-color: white" onload="startOneSdk()">
210
- <div
211
- id="idv-el"
212
- style="top: 0; left: 0; width: 100%; height: 100%; display: block"
213
- ></div>
214
- </body>
215
- </html>`;
184
+ });
185
+
186
+ // Log final verification outcomes
187
+ pending.on('form:result:pending', async () => {
188
+ console.log('form result pending');
189
+ });
190
+
191
+ success.on('form:result:success', async () => {
192
+ console.log('form result success');
193
+ });
194
+
195
+ failed.on('form:result:failed', async () => {
196
+ console.log('form result failed');
197
+ });
198
+
199
+ partial.on('form:result:partial', async () => {
200
+ retry.mount(appContainer);
201
+ });
202
+
203
+ // Start the flow by mounting the welcome screen
204
+ welcome.mount(appContainer);
205
+ }
206
+ </script>
207
+ </head>
208
+
209
+ <body style="background-color: white" onload="startOneSdk()">
210
+ <!-- Container where OneSDK will render its UI -->
211
+ <div
212
+ id="idv-el"
213
+ style="top: 0; left: 0; width: 100%; height: 100%; display: block"
214
+ ></div>
215
+ </body>
216
+ </html>`;
216
217
  //# sourceMappingURL=templateManualKyc.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"templateManualKyc.js","sourceRoot":"","sources":["../../../../../modules/cli/template/templateManualKyc.js"],"names":[],"mappings":"AAAA,MAAM,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC;AAExB,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAqN3B,CAAC"}
1
+ {"version":3,"file":"templateManualKyc.js","sourceRoot":"","sources":["../../../../../modules/cli/template/templateManualKyc.js"],"names":[],"mappings":"AAAA,MAAM,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC;AAExB,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,YAAY,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;MAmBjD,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAmMV,CAAC"}
@@ -1 +1 @@
1
- { "version": "1.7.14-rc.3" }
1
+ { "version": "1.7.14-rc.4" }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frankieone/one-sdk",
3
- "version": "1.7.14-rc.3",
3
+ "version": "1.7.14-rc.4",
4
4
  "cliVersion": "0.0.1",
5
5
  "description": "FrankieOne OneSDK",
6
6
  "keywords": [],
@@ -52,7 +52,7 @@
52
52
  "tsc-check": "tsc -p ./tsconfig.modules.json --noEmit",
53
53
  "tsc-check-all": "tsc -p ./tsconfig.json --noEmit",
54
54
  "test": "jest --clearCache && jest --detectOpenHandles --silent --expand",
55
- "test:analyze": "node --expose-gc ./node_modules/.bin/jest --runInBand --silent --coverage --logHeapUsage",
55
+ "test:analyze": "node --expose-gc ./node_modules/.bin/jest --silent --coverage --logHeapUsage",
56
56
  "watch": "webpack --watch",
57
57
  "watch:css": "npx tailwindcss -o styles/f1-style.css --watch",
58
58
  "prepare": "husky"