diff --git a/android/build.gradle b/android/build.gradle index 63e2264..c38f9e4 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -93,6 +93,6 @@ dependencies { // VCL: implementation "com.nimbusds:nimbus-jose-jwt:9.37.3" - implementation "io.velocitycareerlabs:vcl:2.4.4" + implementation "io.velocitycareerlabs:vcl:2.4.5" } diff --git a/android/src/main/java/io/velocitycareerlabs/reactnative/utlis/Converter.kt b/android/src/main/java/io/velocitycareerlabs/reactnative/utlis/Converter.kt index 2771722..d581003 100644 --- a/android/src/main/java/io/velocitycareerlabs/reactnative/utlis/Converter.kt +++ b/android/src/main/java/io/velocitycareerlabs/reactnative/utlis/Converter.kt @@ -186,7 +186,7 @@ object Converter { fun deepLinkToMap(deepLink: VCLDeepLink?): ReadableMap? { deepLink?.value?.let { val retVal = Arguments.createMap() - retVal.putString("value", deepLink?.value) + retVal.putString("value", deepLink.value) return retVal } return null @@ -216,7 +216,7 @@ object Converter { presentationRequestMap: ReadableMap? ) = VCLPresentationRequest( jwt = mapToJwt(presentationRequestMap?.getMapOpt("jwt")), - publicJwk = mapToPublicJwk(presentationRequestMap?.getMapOpt("publicJwk")), + verifiedProfile = mapToVerifiedProfile(presentationRequestMap?.getMapOpt("verifiedProfile")), deepLink = mapToDeepLink(presentationRequestMap?.getMapOpt("deepLink")) ?: VCLDeepLink(""), pushDelegate = mapToPushDelegate(presentationRequestMap?.getMapOpt("pushDelegate")), didJwk = mapToDidJwk(presentationRequestMap?.getMapOpt("didJwk")), @@ -230,9 +230,7 @@ object Converter { val jwtMap = Arguments.createMap() jwtMap.putString("encodedJwt", presentationRequest.jwt.encodedJwt) presentationRequestMap.putMap("jwt", jwtMap) - val jwkMap = Arguments.createMap() - jwkMap.putString("valueStr", presentationRequest.publicJwk.valueStr) - presentationRequestMap.putMap("publicJwk", jwkMap) + presentationRequestMap.putMap("verifiedProfile", verifiedProfileToMap(presentationRequest.verifiedProfile)) presentationRequestMap.putString("iss", presentationRequest.iss) presentationRequestMap.putString("exchangeId", presentationRequest.exchangeId) presentationRequestMap.putString( @@ -702,6 +700,12 @@ object Converter { return verifiedProfileMap } + fun mapToVerifiedProfile( + verifiedProfileMap: ReadableMap? + ): VCLVerifiedProfile { + return VCLVerifiedProfile(payload = verifiedProfileMap?.getMapOpt("payload")?.toJsonObject() ?: JSONObject("{}")) + } + fun mapToJwtDescriptor( jwtDescriptorDictionary: ReadableMap ) = VCLJwtDescriptor( diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 218464a..0060fb0 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -1054,12 +1054,12 @@ PODS: - React-logger (= 0.73.6) - React-perflogger (= 0.73.6) - SocketRocket (0.6.1) - - VCL (2.4.4) - - velocitycareerlabs-vcl-react-native (2.4.4): + - VCL (2.4.5) + - velocitycareerlabs-vcl-react-native (2.4.5): - glog - RCT-Folly (= 2022.05.16.00) - React-Core - - VCL (= 2.4.4) + - VCL (= 2.4.5) - Yoga (1.14.0) DEPENDENCIES: @@ -1276,8 +1276,8 @@ SPEC CHECKSUMS: React-utils: d16c1d2251c088ad817996621947d0ac8167b46c ReactCommon: 2aa35648354bd4c4665b9a5084a7d37097b89c10 SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 - VCL: f6e7a7405597ba3fdb16eecd183931e7605ff774 - velocitycareerlabs-vcl-react-native: 8a51df815522d7a5e2293fedddf4c17ef8bea12b + VCL: 1fa98c349e0e1291d5f327909bbcd1711baff153 + velocitycareerlabs-vcl-react-native: 5364eb5f474ed7292435d06f5edd3792b139ec5a Yoga: 805bf71192903b20fc14babe48080582fee65a80 PODFILE CHECKSUM: b019a9f171e06cc915918d81c74115c30ea1b65c diff --git a/example/src/App.tsx b/example/src/App.tsx index d73d830..d4c4cfb 100644 --- a/example/src/App.tsx +++ b/example/src/App.tsx @@ -41,7 +41,7 @@ import vcl, { type VCLInitializationDescriptor, type VCLPresentationRequestDescriptor, type VCLDidJwk, - VCLError, + type VCLError, type VCLCredentialTypes, VCLStatusCode, VCLXVnfProtocolVersion, @@ -75,7 +75,7 @@ export default function App() { setInitState(InitState.Initializing); const initializationDescriptor: VCLInitializationDescriptor = { - environment: environment, + environment, xVnfProtocolVersion: VCLXVnfProtocolVersion.XVnfProtocolVersion2, cacheSequence: 0, cryptoServicesDescriptor: { @@ -103,14 +103,17 @@ export default function App() { setInitState(InitState.InitializationSucceed); }, (err: VCLError) => { - console.log('VCL Failed to generate did:jwk with error:', err); + console.log( + 'VCL Failed to generate did:jwk with error:', + JSON.stringify(err) + ); setInitState(InitState.InitializationFailed); setError(err); } ); }, (err: VCLError) => { - console.log('VCL Initialization with error:', err); + console.log('VCL Initialization with error:', JSON.stringify(err)); setInitState(InitState.InitializationFailed); setError(err); } @@ -120,10 +123,10 @@ export default function App() { const getCountries = () => { vcl.getCountries().then( (countries: VCLCountries) => { - console.log('VCL Countries received:', countries); + console.log('VCL Countries received:', JSON.stringify(countries)); }, (err: VCLError) => { - console.log('VCL getCountries Error:', err); + console.log('VCL getCountries Error:', JSON.stringify(err)); } ); }; @@ -133,11 +136,11 @@ export default function App() { (credentialTypesScemas: VCLCredentialTypeSchemas) => { console.log( 'VCL Credential type schemas received:', - credentialTypesScemas + JSON.stringify(credentialTypesScemas) ); }, (err: VCLError) => { - console.log('VCL getCredentialTypeSchemas Error:', err); + console.log('VCL getCredentialTypeSchemas Error:', JSON.stringify(err)); } ); }; @@ -145,16 +148,19 @@ export default function App() { const getCredentialTypes = () => { vcl.getCredentialTypes().then( (credentialTypes: VCLCredentialTypes) => { - console.log('VCL Credential Types received:', credentialTypes); + console.log( + 'VCL Credential Types received:', + JSON.stringify(credentialTypes) + ); }, (err: VCLError) => { - console.log('VCL getCredentialTypeSchemas Error:', err); + console.log('VCL getCredentialTypeSchemas Error:', JSON.stringify(err)); } ); }; const getPresentationRequest = () => { - var deepLink: VCLDeepLink = { + let deepLink: VCLDeepLink = { value: Constants.PresentationRequestDeepLinkStrDev, }; if (environment === VCLEnvironment.Staging.valueOf()) { @@ -163,7 +169,7 @@ export default function App() { }; } const pesentationRequestDescriptor: VCLPresentationRequestDescriptor = { - deepLink: deepLink, + deepLink, pushDelegate: { pushToken: 'push_token', pushUrl: 'push_delegate', @@ -172,17 +178,20 @@ export default function App() { }; vcl.getPresentationRequest(pesentationRequestDescriptor).then( (presentationRequest: VCLPresentationRequest) => { - console.log('VCL Presentation Request received:', presentationRequest); + console.log( + 'VCL Presentation Request received:', + JSON.stringify(presentationRequest) + ); submitPresentation(presentationRequest); }, (err: VCLError) => { if (err.statusCode === VCLStatusCode.VerificationError) { console.log( 'VCL Presentation Request service type VERIFICATION failed:', - err.message + JSON.stringify(err) ); } else { - console.log('VCL Presentation Request failed:', err); + console.log('VCL Presentation Request failed:', JSON.stringify(err)); } } ); @@ -190,32 +199,38 @@ export default function App() { const submitPresentation = (presentationRequest: VCLPresentationRequest) => { const presentationSubmission: VCLPresentationSubmission = { - presentationRequest: presentationRequest, + presentationRequest, verifiableCredentials: Constants.PresentationSelectionsList, }; vcl.submitPresentation(presentationSubmission).then( (presentationSubmissionResult: VCLSubmissionResult) => { console.log( 'VCL Presentation submission result:', - presentationSubmissionResult + JSON.stringify(presentationSubmissionResult) ); const exchangeDescriptor: VCLExchangeDescriptor = { - presentationSubmission: presentationSubmission, + presentationSubmission, submissionResult: presentationSubmissionResult, }; vcl.getExchangeProgress(exchangeDescriptor).then( (exchange: VCLExchange) => { - console.log('VCL Presentation submission progress:', exchange); + console.log( + 'VCL Presentation submission progress:', + JSON.stringify(exchange) + ); }, (err: VCLError) => { - console.log('VCL Presentation submission progress failed:', err); + console.log( + 'VCL Presentation submission progress failed:', + JSON.stringify(err) + ); } ); }, (err: VCLError) => { - console.log('VCL Presentation submission failed:', err); + console.log('VCL Presentation submission failed:', JSON.stringify(err)); } ); }; @@ -233,9 +248,12 @@ export default function App() { } vcl.searchForOrganizations(organizationDescriptor).then( (organizations: VCLOrganizations) => { - console.log('VCL Organizations received:', organizations); + console.log( + 'VCL Organizations received:', + JSON.stringify(organizations) + ); - let serviceCredentialAgentIssuer: VCLServiceCredentialAgentIssuer = { + const serviceCredentialAgentIssuer: VCLServiceCredentialAgentIssuer = { payload: organizations.all[0]?.serviceCredentialAgentIssuers[0]?.payload ?? {}, @@ -243,7 +261,7 @@ export default function App() { getCredentialManifestByService(serviceCredentialAgentIssuer); }, (err: VCLError) => { - console.log('VCL Organizations search failed: ', err); + console.log('VCL Organizations search failed: ', JSON.stringify(err)); } ); }; @@ -251,7 +269,7 @@ export default function App() { const getCredentialManifestByService = ( serviceCredentialAgentIssuer: VCLServiceCredentialAgentIssuer ) => { - let credentialManifestDescriptorByOrganization: VCLCredentialManifestDescriptorByService = + const credentialManifestDescriptorByOrganization: VCLCredentialManifestDescriptorByService = { service: serviceCredentialAgentIssuer, credentialTypes: [ @@ -263,24 +281,27 @@ export default function App() { }; vcl.getCredentialManifest(credentialManifestDescriptorByOrganization).then( (credentialManifest: VCLCredentialManifest) => { - console.log('VCL Credential Manifest received:', credentialManifest); + console.log( + 'VCL Credential Manifest received:', + JSON.stringify(credentialManifest) + ); generateOffers(credentialManifest); }, (err: VCLError) => { if (err.statusCode === VCLStatusCode.VerificationError) { console.log( 'VCL Credential Manifest service type VERIFICATION failed:', - err.message + JSON.stringify(err) ); } else { - console.log('VCL Credential Manifest failed:', err); + console.log('VCL Credential Manifest failed:', JSON.stringify(err)); } } ); }; const getCredentialManifestByDeepLink = () => { - var deepLink: VCLDeepLink = { + let deepLink: VCLDeepLink = { value: Constants.CredentialManifestDeepLinkStrDev, }; if (environment === VCLEnvironment.Staging.valueOf()) { @@ -288,61 +309,64 @@ export default function App() { value: Constants.CredentialManifestDeepLinkStrStaging, }; } - let credentialManifestDescriptorByDeepLink: VCLCredentialManifestDescriptorByDeepLink = + const credentialManifestDescriptorByDeepLink: VCLCredentialManifestDescriptorByDeepLink = { - deepLink: deepLink, + deepLink, didJwk: didJwkRef.current, }; vcl.getCredentialManifest(credentialManifestDescriptorByDeepLink).then( (credentialManifest: VCLCredentialManifest) => { - console.log('VCL Credential Manifest received:', credentialManifest); + console.log( + 'VCL Credential Manifest received:', + JSON.stringify(credentialManifest) + ); generateOffers(credentialManifest); }, (err: VCLError) => { if (err.statusCode === VCLStatusCode.VerificationError) { console.log( 'VCL Credential Manifest service type VERIFICATION failed:', - err.message + JSON.stringify(err) ); } else { - console.log('VCL Credential Manifest failed:', err); + console.log('VCL Credential Manifest failed:', JSON.stringify(err)); } } ); }; const refreshCredentials = () => { - let service: VCLService = { + const service: VCLService = { payload: JSON.parse(Constants.IssuingServiceJsonStr), }; - let credentialManifestDescriptorRefresh: VCLCredentialManifestDescriptorRefresh = + const credentialManifestDescriptorRefresh: VCLCredentialManifestDescriptorRefresh = { - service: service, + service, credentialIds: Constants.CredentialIdsToRefresh, didJwk: didJwkRef.current, }; vcl.getCredentialManifest(credentialManifestDescriptorRefresh).then( (credentialManifest: VCLCredentialManifest) => { console.log( - `VCL Credentials refreshed, credential manifest: ${credentialManifest.jwt.encodedJwt}` + `VCL Credentials refreshed, credential manifest: ${JSON.stringify(credentialManifest)}` ); }, (err: VCLError) => { if (err.statusCode === VCLStatusCode.VerificationError) { console.log( 'VCL Refresh Credentials service type VERIFICATION failed:', - err.message + JSON.stringify(err) ); } else { - console.log('VCL Refresh Credentials failed:', err); + console.log('VCL Refresh Credentials failed:', JSON.stringify(err)); } } ); }; const generateOffers = (credentialManifest: VCLCredentialManifest) => { - let generateOffersDescriptor: VCLGenerateOffersDescriptor = { - credentialManifest: credentialManifest, + const generateOffersDescriptor: VCLGenerateOffersDescriptor = { + credentialManifest, types: Constants.CredentialTypes, identificationVerifiableCredentials: Constants.IdentificationList, }; @@ -370,7 +394,7 @@ export default function App() { ); }, (err: VCLError) => { - console.log('VCL generateOffers Error:', err); + console.log('VCL generateOffers Error:', JSON.stringify(err)); } ); }; @@ -410,13 +434,13 @@ export default function App() { credentialManifest: VCLCredentialManifest, generatedOffers: VCLOffers ) => { - let approvedRejectedOfferIds = + const approvedRejectedOfferIds = Utils.getApprovedRejectedOfferIdsMock(generatedOffers); - let finalizeOffersDescriptor: VCLFinalizeOffersDescriptor = { - credentialManifest: credentialManifest, + const finalizeOffersDescriptor: VCLFinalizeOffersDescriptor = { + credentialManifest, offers: generatedOffers, - approvedOfferIds: approvedRejectedOfferIds[0] as string[], - rejectedOfferIds: approvedRejectedOfferIds[1] as string[], + approvedOfferIds: approvedRejectedOfferIds[0]!, + rejectedOfferIds: approvedRejectedOfferIds[1]!, }; vcl .finalizeOffers(finalizeOffersDescriptor, generatedOffers.sessionToken) @@ -424,16 +448,16 @@ export default function App() { (jwtVerifiableCredentials: VCLJwtVerifiableCredentials) => { console.log( 'VCL Finalized Offers received:', - jwtVerifiableCredentials + JSON.stringify(jwtVerifiableCredentials) ); console.log('VCL finalized Offers'); console.log( 'VCL Passed Credentials:', - jwtVerifiableCredentials.passedCredentials + JSON.stringify(jwtVerifiableCredentials.passedCredentials) ); console.log( 'VCL Failed Credentials:', - jwtVerifiableCredentials.failedCredentials + JSON.stringify(jwtVerifiableCredentials.failedCredentials) ); }, (err: VCLError) => { @@ -443,7 +467,7 @@ export default function App() { }; const getCredentialTypesUIFormSchema = () => { - let credentialTypesUIFormSchemaDescriptor: VCLCredentialTypesUIFormSchemaDescriptor = + const credentialTypesUIFormSchemaDescriptor: VCLCredentialTypesUIFormSchemaDescriptor = { credentialType: Constants.ResidentPermitV10, countryCode: VCLCountryCodes.CA, @@ -454,11 +478,14 @@ export default function App() { (credentialTypesUIFormSchema: VCLCredentialTypesUIFormSchema) => { console.log( 'VCL Credential Types UI Form Schema received:', - credentialTypesUIFormSchema + JSON.stringify(credentialTypesUIFormSchema) ); }, (err: VCLError) => { - console.log('VCL getCredentialTypesFormSchema Error:', err); + console.log( + 'VCL getCredentialTypesFormSchema Error:', + JSON.stringify(err) + ); } ); }; @@ -466,18 +493,16 @@ export default function App() { const getVerifiedProfile = () => { vcl.getVerifiedProfile(Constants.VerifiedProfileDescriptor).then( (verifiedProfile: VCLVerifiedProfile) => { - console.log('VCL Verified Profile: ', verifiedProfile.payload); + console.log('VCL Verified Profile: ', JSON.stringify(verifiedProfile)); }, (err: VCLError) => { if (err.statusCode === VCLStatusCode.VerificationError) { console.log( - 'VCL Profile verification is faile dwith error:', - err, - 'and error code: ', - err.message + 'VCL Profile verification failed dwith error:', + JSON.stringify(err) ); } else { - console.log('VCL Verified profile failed:', err); + console.log('VCL Verified profile failed:', JSON.stringify(err)); } } ); @@ -489,7 +514,7 @@ export default function App() { console.log('VCL verified jwt:', isVerified); }, (err: VCLError) => { - console.log('VCL verify Error:', err); + console.log('VCL verify Error:', JSON.stringify(err)); } ); }; @@ -506,10 +531,10 @@ export default function App() { ) .then( (jwt: VCLJwt) => { - console.log('VCL generated signed jwt:', jwt); + console.log('VCL generated signed jwt:', JSON.stringify(jwt)); }, (err: VCLError) => { - console.log('VCL sign Error:', err); + console.log('VCL sign Error:', JSON.stringify(err)); } ); }; @@ -518,10 +543,10 @@ export default function App() { vcl.generateDidJwk(didJwkDescriptor).then( (resDidJwk: VCLDidJwk) => { didJwkRef.current = resDidJwk; - console.log('VCL did:jwk generated: ', resDidJwk); + console.log('VCL did:jwk generated: ', JSON.stringify(resDidJwk)); }, (err: VCLError) => { - console.log('VCL did:jwk generation failed:', err); + console.log('VCL did:jwk generation failed:', JSON.stringify(err)); } ); }; diff --git a/example/src/Constants.ts b/example/src/Constants.ts index 9b7be80..d858de1 100644 --- a/example/src/Constants.ts +++ b/example/src/Constants.ts @@ -36,16 +36,20 @@ export abstract class Constants { static readonly AdamSmithDriversLicenseJwt = 'eyJ0eXAiOiJKV1QiLCJraWQiOiJkaWQ6dmVsb2NpdHk6djI6MHg2MjU2YjE4OTIxZWFiZDM5MzUxZWMyM2YxYzk0Zjg4MDYwNGU3MGU3OjIxMTQ4ODcxODM1NTAwODo2NzYyI2tleS0xIiwiYWxnIjoiRVMyNTZLIn0.eyJ2YyI6eyJAY29udGV4dCI6WyJodHRwczovL3d3dy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jhHNm1QY2RJYUxOR2JvelBBIiwianRpIjoiZGlkOnZlbG9jaXR5OnYyOjB4NjI1NmIxODkyMWVhYmQzOTM1MWVjMjNmMWM5NGY4ODA2MDRlNzBlNzoyMTE0ODg3MTgzNTUwMDg6NDE2NiIsImlhdCI6MTY1Mjg5Njg2OSwibmJmIjoxNjUyODk2ODY5fQ.fi0qJFzHiDEWTGUu0ME1aG36-j2jm7xxA2DWPs_Ra7ftl-ALMu0FY3A38klbkJQYCaXWHFH0hBbcQ5Z3uZCeew'; // Credential id is taken from jti field static readonly CredentialId1 = 'did:velocity:v2:0x2bef092530ccc122f5fe439b78eddf6010685e88:248532930732481:1963'; + static readonly CredentialId2 = 'did:velocity:v2:0x2bef092530ccc122f5fe439b78eddf6010685e88:248532930732481:1963'; + static readonly CredentialIdsToRefresh = [ Constants.CredentialId1, Constants.CredentialId2, @@ -93,11 +97,13 @@ export abstract class Constants { // University of Massachusetts Amherst static readonly DidDev = 'did:ion:EiApMLdMb4NPb8sae9-hXGHP79W1gisApVSE80USPEbtJA'; + static readonly DidStaging = 'did:ion:EiC8GZpBYJXt5UhqxZJbixJyMjrGw0yw8yFN6HjaM1ogSw'; static readonly OrganizationsSearchDescriptorByDidDev: VCLOrganizationsSearchDescriptor = { filter: { did: Constants.DidDev } }; + static readonly OrganizationsSearchDescriptorByDidStaging: VCLOrganizationsSearchDescriptor = { filter: { did: Constants.DidStaging } }; @@ -123,10 +129,12 @@ export abstract class Constants { encodedJwt: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NksiLCJqd2siOnsia3R5IjoiRUMiLCJjcnYiOiJzZWNwMjU2azEiLCJ4IjoiQ1JFNzc0WV8ydkctdTZka2UwSmQzYVhrd1R4WkE2TV96cDZ2TkR0Vmt5NCIsInkiOiJZLWhIdS1FSXlHSGFRRTdmamxZVVlBZ2lVanFqZFc2VXlIaHI2OVFZTS04IiwidXNlIjoic2lnIn19.eyJwMSI6InYxIiwicDIiOiJ2MTIiLCJuYmYiOjE2OTQ0MzUyMjAsImp0aSI6Ijk4YTc4MGFmLTIyZGYtNGU3ZC1iYTZjLTBmYjE0Njk2Zjg0NSIsImlzcyI6ImlzczEyMyIsInN1YiI6IlpHNXQwT1ZrT08iLCJpYXQiOjE2OTQ0MzUyMjB9.kaEGDsRFjFylIAQ1DDX0GQyWBD1y5rG7WNpFZbrL1DFPrfFgDrydXXOCaBbr8TN81kPrbkscsHUuioY-tGCxMw', }; + static readonly SomeJwkPublic: VCLPublicJwk = { valueStr: '{ "kty": "EC", "crv": "secp256k1", "x": "CRE774Y_2vG-u6dke0Jd3aXkwTxZA6M_zp6vNDtVky4", "y": "Y-hHu-EIyGHaQE7fjlYUYAgiUjqjdW6UyHhr69QYM-8", "use": "sig" }', }; + static readonly SomePayload = JSON.parse('{"p1":"v1", "p2":"v12"}'); private static readonly BaseUrl = 'mockvendor.velocitycareerlabs.io'; diff --git a/example/src/Utils.ts b/example/src/Utils.ts index 833fafe..0ae654b 100644 --- a/example/src/Utils.ts +++ b/example/src/Utils.ts @@ -11,8 +11,8 @@ export class Utils { static readonly getApprovedRejectedOfferIdsMock = ( offers: VCLOffers ): string[][] => { - var approvedOfferIds: string[] = []; - var rejectedOfferIds: string[] = []; + const approvedOfferIds: string[] = []; + const rejectedOfferIds: string[] = []; if (offers.all.length > 0) { approvedOfferIds.push(offers.all[0]?.id || ''); } diff --git a/ios/Utils/Converter.swift b/ios/Utils/Converter.swift index a394af0..ff6f917 100644 --- a/ios/Utils/Converter.swift +++ b/ios/Utils/Converter.swift @@ -215,7 +215,7 @@ func dictionaryToPresentationRequest( ) -> VCLPresentationRequest { return VCLPresentationRequest( jwt: dictionaryToJwt(presentationRequestDictionary?["jwt"] as? [String : Any]), - publicJwk: dictionaryToPublicJwk(presentationRequestDictionary?["publicJwk"] as? [String: Any]), + verifiedProfile: dictionaryToVerifiedProfile(presentationRequestDictionary?["verifiedProfile"] as? [String: Any]), deepLink: dictionaryToDeepLink(presentationRequestDictionary?["deepLink"] as? [String : Any]) ?? VCLDeepLink(value: ""), pushDelegate: dictionaryToPushDelegate(presentationRequestDictionary?["pushDelegate"] as? [String : Any]), didJwk: dictionaryToDidJwk(presentationRequestDictionary?["didJwk"] as? [String : Any]), @@ -228,9 +228,7 @@ func presentationRequestToDictionary( ) -> [String: Any] { var presentationRequestDictionary = [String: Any]() presentationRequestDictionary["jwt"] = ["encodedJwt": presentationRequest.jwt.encodedJwt] - var publicJwkDictionary = [String: Any]() - publicJwkDictionary["valueStr"] = presentationRequest.publicJwk.valueStr - presentationRequestDictionary["publicJwk"] = publicJwkDictionary + presentationRequestDictionary["verifiedProfile"] = verifiedProfileToDictionary(presentationRequest.verifiedProfile) presentationRequestDictionary["iss"] = presentationRequest.iss presentationRequestDictionary["exchangeId"] = presentationRequest.exchangeId presentationRequestDictionary["presentationDefinitionId"] = presentationRequest.presentationDefinitionId @@ -645,6 +643,12 @@ func verifiedProfileToDictionary( return verifiedProfileDictionary } +func dictionaryToVerifiedProfile( + _ verifiedProfileDictionary: [String: Any]? +) -> VCLVerifiedProfile { + return VCLVerifiedProfile(payload: verifiedProfileDictionary?["payload"] as? [String : Any] ?? [String : Any]()) +} + func dictionaryToJwtDescriptor( _ jwtDescriptorDictionary: [String: Any] ) -> VCLJwtDescriptor { diff --git a/package.json b/package.json index 862e388..0f82627 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@velocitycareerlabs/vcl-react-native", - "version": "2.4.4", + "version": "2.4.5", "description": "Velocity Career Labs React Native SDK", "main": "lib/commonjs/index", "module": "lib/module/index", @@ -59,11 +59,16 @@ "@release-it/conventional-changelog": "^8.0.1", "@types/jest": "^29.5.5", "@types/react": "^18.2.44", + "@typescript-eslint/eslint-plugin": "^6.4.0", "commitlint": "^19.1.0", "del-cli": "^5.1.0", - "eslint": "^8.51.0", + "eslint": "^8.0.1", "eslint-config-prettier": "^9.0.0", + "eslint-plugin-import": "^2.25.2", + "eslint-plugin-n": "^15.0.0 || ^16.0.0 ", "eslint-plugin-prettier": "^5.0.1", + "eslint-plugin-react": "^7.34.1", + "eslint-plugin-react-native": "^4.1.0", "jest": "^29.7.0", "prettier": "^3.0.3", "react": "18.2.0", diff --git a/src/api/Dictionary.ts b/src/api/Dictionary.ts index a67d199..218ed38 100644 --- a/src/api/Dictionary.ts +++ b/src/api/Dictionary.ts @@ -5,6 +5,4 @@ * SPDX-License-Identifier: Apache-2.0 */ -export type Dictionary = { - [key: string]: T; -}; +export type Dictionary = Record; diff --git a/src/api/entities/VCLCredentialManifest.ts b/src/api/entities/VCLCredentialManifest.ts index 4407856..915108a 100644 --- a/src/api/entities/VCLCredentialManifest.ts +++ b/src/api/entities/VCLCredentialManifest.ts @@ -13,7 +13,7 @@ import type { VCLVerifiedProfile } from './VCLVerifiedProfile'; export interface VCLCredentialManifest { jwt: VCLJwt; - vendorOriginContext?: String; + vendorOriginContext?: string; verifiedProfile: VCLVerifiedProfile; deepLink?: VCLDeepLink; iss: string; diff --git a/src/api/entities/VCLCredentialTypes.ts b/src/api/entities/VCLCredentialTypes.ts index 36e26cc..f0b79b9 100644 --- a/src/api/entities/VCLCredentialTypes.ts +++ b/src/api/entities/VCLCredentialTypes.ts @@ -8,6 +8,6 @@ import type { Dictionary } from '../Dictionary'; export interface VCLCredentialTypes { - all: Dictionary[]; - recommendedTypes: Dictionary[]; + all: Array>; + recommendedTypes: Array>; } diff --git a/src/api/entities/VCLJwtDescriptor.ts b/src/api/entities/VCLJwtDescriptor.ts index 6c9bbe4..9a06393 100644 --- a/src/api/entities/VCLJwtDescriptor.ts +++ b/src/api/entities/VCLJwtDescriptor.ts @@ -27,5 +27,5 @@ export interface VCLJwtDescriptor { /** * The issuer DID */ - aud?: String; + aud?: string; } diff --git a/src/api/entities/VCLPresentationRequest.ts b/src/api/entities/VCLPresentationRequest.ts index 7f678be..7f85cde 100644 --- a/src/api/entities/VCLPresentationRequest.ts +++ b/src/api/entities/VCLPresentationRequest.ts @@ -7,13 +7,13 @@ import type { VCLDidJwk } from './VCLDidJwk'; import type { VCLJwt } from './VCLJwt'; -import type { VCLPublicJwk } from './VCLPublicJwk'; import type { VCLToken } from './VCLToken'; +import type { VCLVerifiedProfile } from './VCLVerifiedProfile'; export interface VCLPresentationRequest { exchangeId: string; jwt: VCLJwt; - publicJwk: VCLPublicJwk; + verifiedProfile: VCLVerifiedProfile; keyID: string; presentationDefinitionId: string; iss: string; diff --git a/src/api/entities/VCLToken.ts b/src/api/entities/VCLToken.ts index 0d08692..f56662d 100644 --- a/src/api/entities/VCLToken.ts +++ b/src/api/entities/VCLToken.ts @@ -7,5 +7,5 @@ export interface VCLToken { value: string; - expiresIn?: BigInt; + expiresIn?: bigint; } diff --git a/velocitycareerlabs-vcl-react-native.podspec b/velocitycareerlabs-vcl-react-native.podspec index 3f91117..74930f8 100644 --- a/velocitycareerlabs-vcl-react-native.podspec +++ b/velocitycareerlabs-vcl-react-native.podspec @@ -19,7 +19,7 @@ Pod::Spec.new do |s| # https://github.com/CocoaPods/CocoaPods/issues/7234#issuecomment-346136322 # s.static_framework = true - s.dependency "VCL", "2.4.4" + s.dependency "VCL", "2.4.5" # Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0. # See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79. diff --git a/yarn.lock b/yarn.lock index f473021..1ad0c33 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1880,7 +1880,7 @@ __metadata: languageName: node linkType: hard -"@eslint-community/eslint-utils@npm:^4.2.0, @eslint-community/eslint-utils@npm:^4.4.0": +"@eslint-community/eslint-utils@npm:^4.1.2, @eslint-community/eslint-utils@npm:^4.2.0, @eslint-community/eslint-utils@npm:^4.4.0": version: 4.4.0 resolution: "@eslint-community/eslint-utils@npm:4.4.0" dependencies: @@ -1891,7 +1891,7 @@ __metadata: languageName: node linkType: hard -"@eslint-community/regexpp@npm:^4.5.1, @eslint-community/regexpp@npm:^4.6.1": +"@eslint-community/regexpp@npm:^4.5.1, @eslint-community/regexpp@npm:^4.6.0, @eslint-community/regexpp@npm:^4.6.1": version: 4.10.0 resolution: "@eslint-community/regexpp@npm:4.10.0" checksum: 2a6e345429ea8382aaaf3a61f865cae16ed44d31ca917910033c02dc00d505d939f10b81e079fa14d43b51499c640138e153b7e40743c4c094d9df97d4e56f7b @@ -3266,6 +3266,13 @@ __metadata: languageName: node linkType: hard +"@types/json5@npm:^0.0.29": + version: 0.0.29 + resolution: "@types/json5@npm:0.0.29" + checksum: e60b153664572116dfea673c5bda7778dbff150498f44f998e34b5886d8afc47f16799280e4b6e241c0472aef1bc36add771c569c68fc5125fc2ae519a3eb9ac + languageName: node + linkType: hard + "@types/minimist@npm:^1.2.2": version: 1.2.5 resolution: "@types/minimist@npm:1.2.5" @@ -3352,7 +3359,7 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/eslint-plugin@npm:^6.7.4": +"@typescript-eslint/eslint-plugin@npm:^6.4.0, @typescript-eslint/eslint-plugin@npm:^6.7.4": version: 6.21.0 resolution: "@typescript-eslint/eslint-plugin@npm:6.21.0" dependencies: @@ -3555,11 +3562,16 @@ __metadata: "@release-it/conventional-changelog": ^8.0.1 "@types/jest": ^29.5.5 "@types/react": ^18.2.44 + "@typescript-eslint/eslint-plugin": ^6.4.0 commitlint: ^19.1.0 del-cli: ^5.1.0 - eslint: ^8.51.0 + eslint: ^8.0.1 eslint-config-prettier: ^9.0.0 + eslint-plugin-import: ^2.25.2 + eslint-plugin-n: "^15.0.0 || ^16.0.0 " eslint-plugin-prettier: ^5.0.1 + eslint-plugin-react: ^7.34.1 + eslint-plugin-react-native: ^4.1.0 jest: ^29.7.0 prettier: ^3.0.3 react: 18.2.0 @@ -3887,7 +3899,21 @@ __metadata: languageName: node linkType: hard -"array.prototype.flat@npm:^1.3.1": +"array.prototype.findlastindex@npm:^1.2.3": + version: 1.2.5 + resolution: "array.prototype.findlastindex@npm:1.2.5" + dependencies: + call-bind: ^1.0.7 + define-properties: ^1.2.1 + es-abstract: ^1.23.2 + es-errors: ^1.3.0 + es-object-atoms: ^1.0.0 + es-shim-unscopables: ^1.0.2 + checksum: 2c81cff2a75deb95bf1ed89b6f5f2bfbfb882211e3b7cc59c3d6b87df774cd9d6b36949a8ae39ac476e092c1d4a4905f5ee11a86a456abb10f35f8211ae4e710 + languageName: node + linkType: hard + +"array.prototype.flat@npm:^1.3.1, array.prototype.flat@npm:^1.3.2": version: 1.3.2 resolution: "array.prototype.flat@npm:1.3.2" dependencies: @@ -4333,6 +4359,22 @@ __metadata: languageName: node linkType: hard +"builtin-modules@npm:^3.3.0": + version: 3.3.0 + resolution: "builtin-modules@npm:3.3.0" + checksum: db021755d7ed8be048f25668fe2117620861ef6703ea2c65ed2779c9e3636d5c3b82325bd912244293959ff3ae303afa3471f6a15bf5060c103e4cc3a839749d + languageName: node + linkType: hard + +"builtins@npm:^5.0.1": + version: 5.1.0 + resolution: "builtins@npm:5.1.0" + dependencies: + semver: ^7.0.0 + checksum: 76327fa85b8e253b26e52f79988148013ea742691b4ab15f7228ebee47dd757832da308c9d4e4fc89763a1773e3f25a9836fff6315df85c7c6c72190436bf11d + languageName: node + linkType: hard + "bundle-name@npm:^3.0.0": version: 3.0.0 resolution: "bundle-name@npm:3.0.0" @@ -5239,6 +5281,15 @@ __metadata: languageName: node linkType: hard +"debug@npm:^3.2.7": + version: 3.2.7 + resolution: "debug@npm:3.2.7" + dependencies: + ms: ^2.1.1 + checksum: b3d8c5940799914d30314b7c3304a43305fd0715581a919dacb8b3176d024a782062368405b47491516d2091d6462d4d11f2f4974a405048094f8bfebfa3071c + languageName: node + linkType: hard + "decamelize-keys@npm:^1.1.0": version: 1.1.1 resolution: "decamelize-keys@npm:1.1.1" @@ -5876,6 +5927,17 @@ __metadata: languageName: node linkType: hard +"eslint-compat-utils@npm:^0.5.0": + version: 0.5.0 + resolution: "eslint-compat-utils@npm:0.5.0" + dependencies: + semver: ^7.5.4 + peerDependencies: + eslint: ">=6.0.0" + checksum: 85ec8ad39e2fe73824d05d21d13ea4ae6531ce3421f2938f6d9a17090eb3b031994736369778ed9dce673a39dac0054ad2f5ad20b4b18877d1f94aeba597c3df + languageName: node + linkType: hard + "eslint-config-prettier@npm:^8.5.0": version: 8.10.0 resolution: "eslint-config-prettier@npm:8.10.0" @@ -5898,6 +5960,42 @@ __metadata: languageName: node linkType: hard +"eslint-import-resolver-node@npm:^0.3.9": + version: 0.3.9 + resolution: "eslint-import-resolver-node@npm:0.3.9" + dependencies: + debug: ^3.2.7 + is-core-module: ^2.13.0 + resolve: ^1.22.4 + checksum: 439b91271236b452d478d0522a44482e8c8540bf9df9bd744062ebb89ab45727a3acd03366a6ba2bdbcde8f9f718bab7fe8db64688aca75acf37e04eafd25e22 + languageName: node + linkType: hard + +"eslint-module-utils@npm:^2.8.0": + version: 2.8.1 + resolution: "eslint-module-utils@npm:2.8.1" + dependencies: + debug: ^3.2.7 + peerDependenciesMeta: + eslint: + optional: true + checksum: 3cecd99b6baf45ffc269167da0f95dcb75e5aa67b93d73a3bab63e2a7eedd9cdd6f188eed048e2f57c1b77db82c9cbf2adac20b512fa70e597d863dd3720170d + languageName: node + linkType: hard + +"eslint-plugin-es-x@npm:^7.5.0": + version: 7.6.0 + resolution: "eslint-plugin-es-x@npm:7.6.0" + dependencies: + "@eslint-community/eslint-utils": ^4.1.2 + "@eslint-community/regexpp": ^4.6.0 + eslint-compat-utils: ^0.5.0 + peerDependencies: + eslint: ">=8" + checksum: a37db377d31fce0d6f5d25b9a27cf93669273197f4a2a1697037c6ddff5f0284291d6fe8689ce38eb703c582b0ccaa5daebde5d07190fb36f9b32131cd144f92 + languageName: node + linkType: hard + "eslint-plugin-eslint-comments@npm:^3.2.0": version: 3.2.0 resolution: "eslint-plugin-eslint-comments@npm:3.2.0" @@ -5923,6 +6021,33 @@ __metadata: languageName: node linkType: hard +"eslint-plugin-import@npm:^2.25.2": + version: 2.29.1 + resolution: "eslint-plugin-import@npm:2.29.1" + dependencies: + array-includes: ^3.1.7 + array.prototype.findlastindex: ^1.2.3 + array.prototype.flat: ^1.3.2 + array.prototype.flatmap: ^1.3.2 + debug: ^3.2.7 + doctrine: ^2.1.0 + eslint-import-resolver-node: ^0.3.9 + eslint-module-utils: ^2.8.0 + hasown: ^2.0.0 + is-core-module: ^2.13.1 + is-glob: ^4.0.3 + minimatch: ^3.1.2 + object.fromentries: ^2.0.7 + object.groupby: ^1.0.1 + object.values: ^1.1.7 + semver: ^6.3.1 + tsconfig-paths: ^3.15.0 + peerDependencies: + eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 + checksum: e65159aef808136d26d029b71c8c6e4cb5c628e65e5de77f1eb4c13a379315ae55c9c3afa847f43f4ff9df7e54515c77ffc6489c6a6f81f7dd7359267577468c + languageName: node + linkType: hard + "eslint-plugin-jest@npm:^26.5.3": version: 26.9.0 resolution: "eslint-plugin-jest@npm:26.9.0" @@ -5940,6 +6065,27 @@ __metadata: languageName: node linkType: hard +"eslint-plugin-n@npm:^15.0.0 || ^16.0.0 ": + version: 16.6.2 + resolution: "eslint-plugin-n@npm:16.6.2" + dependencies: + "@eslint-community/eslint-utils": ^4.4.0 + builtins: ^5.0.1 + eslint-plugin-es-x: ^7.5.0 + get-tsconfig: ^4.7.0 + globals: ^13.24.0 + ignore: ^5.2.4 + is-builtin-module: ^3.2.1 + is-core-module: ^2.12.1 + minimatch: ^3.1.2 + resolve: ^1.22.2 + semver: ^7.5.3 + peerDependencies: + eslint: ">=7.0.0" + checksum: 3b468da0038cf25af582608983491b33ac2d481b6a94a0ff2e715d3b85e1ff8cb93df4cd67b689d520bea1bfb8f2b717f01606bf6b2ea19fe8f9c0999ea7057d + languageName: node + linkType: hard + "eslint-plugin-prettier@npm:^4.2.1": version: 4.2.1 resolution: "eslint-plugin-prettier@npm:4.2.1" @@ -5991,7 +6137,7 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-react-native@npm:^4.0.0": +"eslint-plugin-react-native@npm:^4.0.0, eslint-plugin-react-native@npm:^4.1.0": version: 4.1.0 resolution: "eslint-plugin-react-native@npm:4.1.0" dependencies: @@ -6002,7 +6148,7 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-react@npm:^7.30.1": +"eslint-plugin-react@npm:^7.30.1, eslint-plugin-react@npm:^7.34.1": version: 7.34.1 resolution: "eslint-plugin-react@npm:7.34.1" dependencies: @@ -6064,7 +6210,7 @@ __metadata: languageName: node linkType: hard -"eslint@npm:^8.51.0": +"eslint@npm:^8.0.1": version: 8.57.0 resolution: "eslint@npm:8.57.0" dependencies: @@ -6755,6 +6901,15 @@ __metadata: languageName: node linkType: hard +"get-tsconfig@npm:^4.7.0": + version: 4.7.3 + resolution: "get-tsconfig@npm:4.7.3" + dependencies: + resolve-pkg-maps: ^1.0.0 + checksum: d124e6900f8beb3b71f215941096075223158d0abb09fb5daa8d83299f6c17d5e95a97d12847b387e9e716bb9bd256a473f918fb8020f3b1acc0b1e5c2830bbf + languageName: node + linkType: hard + "get-uri@npm:^6.0.1": version: 6.0.3 resolution: "get-uri@npm:6.0.3" @@ -6896,7 +7051,7 @@ __metadata: languageName: node linkType: hard -"globals@npm:^13.19.0": +"globals@npm:^13.19.0, globals@npm:^13.24.0": version: 13.24.0 resolution: "globals@npm:13.24.0" dependencies: @@ -7537,6 +7692,15 @@ __metadata: languageName: node linkType: hard +"is-builtin-module@npm:^3.2.1": + version: 3.2.1 + resolution: "is-builtin-module@npm:3.2.1" + dependencies: + builtin-modules: ^3.3.0 + checksum: e8f0ffc19a98240bda9c7ada84d846486365af88d14616e737d280d378695c8c448a621dcafc8332dbf0fcd0a17b0763b845400709963fa9151ddffece90ae88 + languageName: node + linkType: hard + "is-callable@npm:^1.1.3, is-callable@npm:^1.1.4, is-callable@npm:^1.2.7": version: 1.2.7 resolution: "is-callable@npm:1.2.7" @@ -7555,7 +7719,7 @@ __metadata: languageName: node linkType: hard -"is-core-module@npm:^2.13.0, is-core-module@npm:^2.5.0, is-core-module@npm:^2.8.1": +"is-core-module@npm:^2.12.1, is-core-module@npm:^2.13.0, is-core-module@npm:^2.13.1, is-core-module@npm:^2.5.0, is-core-module@npm:^2.8.1": version: 2.13.1 resolution: "is-core-module@npm:2.13.1" dependencies: @@ -8772,6 +8936,17 @@ __metadata: languageName: node linkType: hard +"json5@npm:^1.0.2": + version: 1.0.2 + resolution: "json5@npm:1.0.2" + dependencies: + minimist: ^1.2.0 + bin: + json5: lib/cli.js + checksum: 866458a8c58a95a49bef3adba929c625e82532bcff1fe93f01d29cb02cac7c3fe1f4b79951b7792c2da9de0b32871a8401a6e3c5b36778ad852bf5b8a61165d7 + languageName: node + linkType: hard + "json5@npm:^2.1.1, json5@npm:^2.2.1, json5@npm:^2.2.3": version: 2.2.3 resolution: "json5@npm:2.2.3" @@ -9739,7 +9914,7 @@ __metadata: languageName: node linkType: hard -"ms@npm:2.1.3": +"ms@npm:2.1.3, ms@npm:^2.1.1": version: 2.1.3 resolution: "ms@npm:2.1.3" checksum: aa92de608021b242401676e35cfa5aa42dd70cbdc082b916da7fb925c542173e36bce97ea3e804923fe92c0ad991434e4a38327e15a1b5b5f945d66df615ae6d @@ -10023,6 +10198,17 @@ __metadata: languageName: node linkType: hard +"object.groupby@npm:^1.0.1": + version: 1.0.3 + resolution: "object.groupby@npm:1.0.3" + dependencies: + call-bind: ^1.0.7 + define-properties: ^1.2.1 + es-abstract: ^1.23.2 + checksum: 0d30693ca3ace29720bffd20b3130451dca7a56c612e1926c0a1a15e4306061d84410bdb1456be2656c5aca53c81b7a3661eceaa362db1bba6669c2c9b6d1982 + languageName: node + linkType: hard + "object.hasown@npm:^1.1.3": version: 1.1.4 resolution: "object.hasown@npm:1.1.4" @@ -11233,6 +11419,13 @@ __metadata: languageName: node linkType: hard +"resolve-pkg-maps@npm:^1.0.0": + version: 1.0.0 + resolution: "resolve-pkg-maps@npm:1.0.0" + checksum: 1012afc566b3fdb190a6309cc37ef3b2dcc35dff5fa6683a9d00cd25c3247edfbc4691b91078c97adc82a29b77a2660c30d791d65dab4fc78bfc473f60289977 + languageName: node + linkType: hard + "resolve.exports@npm:^2.0.0": version: 2.0.2 resolution: "resolve.exports@npm:2.0.2" @@ -11240,7 +11433,7 @@ __metadata: languageName: node linkType: hard -"resolve@npm:^1.1.6, resolve@npm:^1.14.2, resolve@npm:^1.20.0, resolve@npm:^1.22.1": +"resolve@npm:^1.1.6, resolve@npm:^1.14.2, resolve@npm:^1.20.0, resolve@npm:^1.22.1, resolve@npm:^1.22.2, resolve@npm:^1.22.4": version: 1.22.8 resolution: "resolve@npm:1.22.8" dependencies: @@ -11266,7 +11459,7 @@ __metadata: languageName: node linkType: hard -"resolve@patch:resolve@^1.1.6#~builtin, resolve@patch:resolve@^1.14.2#~builtin, resolve@patch:resolve@^1.20.0#~builtin, resolve@patch:resolve@^1.22.1#~builtin": +"resolve@patch:resolve@^1.1.6#~builtin, resolve@patch:resolve@^1.14.2#~builtin, resolve@patch:resolve@^1.20.0#~builtin, resolve@patch:resolve@^1.22.1#~builtin, resolve@patch:resolve@^1.22.2#~builtin, resolve@patch:resolve@^1.22.4#~builtin": version: 1.22.8 resolution: "resolve@patch:resolve@npm%3A1.22.8#~builtin::version=1.22.8&hash=c3c19d" dependencies: @@ -11489,7 +11682,7 @@ __metadata: languageName: node linkType: hard -"semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.5.2, semver@npm:^7.5.3, semver@npm:^7.5.4, semver@npm:^7.6.0": +"semver@npm:^7.0.0, semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.5.2, semver@npm:^7.5.3, semver@npm:^7.5.4, semver@npm:^7.6.0": version: 7.6.0 resolution: "semver@npm:7.6.0" dependencies: @@ -12011,6 +12204,13 @@ __metadata: languageName: node linkType: hard +"strip-bom@npm:^3.0.0": + version: 3.0.0 + resolution: "strip-bom@npm:3.0.0" + checksum: 8d50ff27b7ebe5ecc78f1fe1e00fcdff7af014e73cf724b46fb81ef889eeb1015fc5184b64e81a2efe002180f3ba431bdd77e300da5c6685d702780fbf0c8d5b + languageName: node + linkType: hard + "strip-bom@npm:^4.0.0": version: 4.0.0 resolution: "strip-bom@npm:4.0.0" @@ -12275,6 +12475,18 @@ __metadata: languageName: node linkType: hard +"tsconfig-paths@npm:^3.15.0": + version: 3.15.0 + resolution: "tsconfig-paths@npm:3.15.0" + dependencies: + "@types/json5": ^0.0.29 + json5: ^1.0.2 + minimist: ^1.2.6 + strip-bom: ^3.0.0 + checksum: 59f35407a390d9482b320451f52a411a256a130ff0e7543d18c6f20afab29ac19fbe55c360a93d6476213cc335a4d76ce90f67df54c4e9037f7d240920832201 + languageName: node + linkType: hard + "tslib@npm:^1.8.1": version: 1.14.1 resolution: "tslib@npm:1.14.1" @@ -12514,22 +12726,22 @@ __metadata: linkType: hard "typescript@npm:^5.2.2": - version: 5.4.3 - resolution: "typescript@npm:5.4.3" + version: 5.4.5 + resolution: "typescript@npm:5.4.5" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: d74d731527e35e64d8d2dcf2f897cf8cfbc3428be0ad7c48434218ba4ae41239f53be7c90714089db1068c05cae22436af2ecba71fd36ecc5e7a9118af060198 + checksum: 53c879c6fa1e3bcb194b274d4501ba1985894b2c2692fa079db03c5a5a7140587a1e04e1ba03184605d35f439b40192d9e138eb3279ca8eee313c081c8bcd9b0 languageName: node linkType: hard "typescript@patch:typescript@^5.2.2#~builtin": - version: 5.4.3 - resolution: "typescript@patch:typescript@npm%3A5.4.3#~builtin::version=5.4.3&hash=14eedb" + version: 5.4.5 + resolution: "typescript@patch:typescript@npm%3A5.4.5#~builtin::version=5.4.5&hash=14eedb" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 3a62fe90aa79d68c9ce38ea5edb2957e62801c733b99f0e5a2b8b50922761f68f7d9a40d28c544b449866e81185cddb93cba2496d0ff3fa52ef5b1f8bcace38c + checksum: 2373c693f3b328f3b2387c3efafe6d257b057a142f9a79291854b14ff4d5367d3d730810aee981726b677ae0fd8329b23309da3b6aaab8263dbdccf1da07a3ba languageName: node linkType: hard