Skip to content

Commit

Permalink
Merge pull request #172 from Sphereon-Opensource/develop
Browse files Browse the repository at this point in the history
New release
  • Loading branch information
nklomp authored Mar 19, 2024
2 parents d35ef78 + 86aa383 commit efe16f1
Show file tree
Hide file tree
Showing 214 changed files with 11,477 additions and 7,225 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ test/*.js
/packages/vc-handler-ld-local/plugin.schema.json
/packages/issuance-branding/plugin.schema.json
/packages/oid4vci-issuer-rest-client/plugin.schema.json
/packages/xstate-persistence/plugin.schema.json

**/.env.energyshr
**/.env.local
Expand Down
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@
"@babel/plugin-transform-runtime": "^7.22.2",
"@babel/preset-env": "^7.22.2",
"@babel/preset-typescript": "^7.21.5",
"@types/debug": "^4.1.7",
"@types/debug": "^4.1.12",
"@types/jest": "^27.5.2",
"@types/node": "^18.15.11",
"@types/node": "^18.19.26",
"@typescript-eslint/eslint-plugin": "^5.59.2",
"@typescript-eslint/parser": "^5.59.2",
"codecov": "^3.8.3",
"cross-fetch": "^3.1.8",
"did-jwt": "6.11.6",
"eslint": "^8.35.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^8.7.0",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-import": "^2.27.5",
Expand All @@ -67,17 +67,17 @@
"lerna-changelog": "^2.2.0",
"oas-resolver": "^2.5.6",
"openapi-types": "^12.1.0",
"patch-package": "^6.5.1",
"prettier": "^2.8.8",
"patch-package": "^8.0.0",
"prettier": "^3.2.5",
"pretty-quick": "^3.1.3",
"rimraf": "^4.4.0",
"semantic-release": "^19.0.5",
"ts-jest": "^27.1.5",
"ts-node": "^10.9.1",
"typescript": "4.9.5"
"ts-node": "^10.9.2",
"typescript": "5.4.2"
},
"engines": {
"node": ">= 16.0.0"
"node": ">= 18.0.0"
},
"prettier": {
"endOfLine": "auto",
Expand Down Expand Up @@ -115,8 +115,8 @@
"did-jwt": "6.11.6",
"did-jwt-vc": "3.1.3",
"ethr-did": "2.3.9",
"typeorm": "0.3.17",
"@mattrglobal/jsonld[email protected]>jsonld": "4.0.1",
"typeorm": "^0.3.20",
"@transmute/jsonld": "^0.0.4",
"jsonld": "link:./node_modules/.pnpm/@[email protected]/node_modules/@digitalcredentials/jsonld",
"isomorphic-webcrypto": "link:./node_modules/@sphereon/isomorphic-webcrypto"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/agent-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
"@veramo/core": "4.2.0",
"debug": "^4.3.4",
"jsonpointer": "^5.0.1",
"typeorm": "^0.3.12",
"typeorm": "^0.3.20",
"url-parse": "^1.5.10",
"yaml": "^2.2.2"
},
"devDependencies": {
"@types/debug": "^4.1.8",
"@types/url-parse": "^1.4.8",
"typescript": "4.9.5"
"typescript": "5.4.2"
},
"files": [
"dist/**/*",
Expand Down
6 changes: 3 additions & 3 deletions packages/agent-config/src/agentCreator.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { TAgent, IPluginMethodMap, IAgentOptions } from '@veramo/core'
import { createObjects } from './objectCreator.js'
import fs from 'fs'
import yaml from 'yaml'

/**
Expand Down Expand Up @@ -47,7 +46,7 @@ export async function createAgentFromConfig<T extends IPluginMethodMap>(config:
* @public
*/
export async function createAgent<T extends IPluginMethodMap, C = Record<string, any>>(
options: IAgentOptions & { context?: C }
options: IAgentOptions & { context?: C },
): Promise<TAgent<T> & { context?: C }> {
//@ts-ignore
return new Agent(options) as TAgent<T>
Expand All @@ -57,11 +56,12 @@ export async function createAgent<T extends IPluginMethodMap, C = Record<string,
* Parses a yaml config file and returns a config object
* @param filePath
*/
export const getConfig = async (filePath: fs.PathLike): Promise<{ version?: number; [x: string]: any }> => {
export const getConfig = async (filePath: string | Buffer | URL): Promise<{ version?: number; [x: string]: any }> => {
let fileContent: string

// read file async
try {
const fs = await import('fs')
fileContent = await fs.promises.readFile(filePath, 'utf8')
} catch (e) {
console.log('Config file not found: ' + filePath)
Expand Down
2 changes: 1 addition & 1 deletion packages/agent-config/src/dataSources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export class DataSources {
debug(`WARNING: Automatic migrations need to be disabled in this app! Adjust the database configuration and set synchronize to false`)
} else if (config.migrationsRun) {
debug(
`Migrations are currently managed from config. Please set migrationsRun and synchronize to false to get consistent behaviour. We run migrations from code explicitly`
`Migrations are currently managed from config. Please set migrationsRun and synchronize to false to get consistent behaviour. We run migrations from code explicitly`,
)
} else {
debug(`Running ${dataSource.migrations.length} migration(s) from code if needed...`)
Expand Down
2 changes: 1 addition & 1 deletion packages/contact-manager-rest-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"passport": "^0.6.0",
"passport-http-bearer": "^1.0.1",
"ts-node": "^10.9.1",
"typeorm": "^0.3.12"
"typeorm": "^0.3.20"
},
"files": [
"dist/**/*",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ export default (testContext: { getAgent: () => ConfiguredAgent; setup: () => Pro
await expect(
agent.cmGetIdentity({
identityId,
})
}),
).rejects.toThrow(`No identity found for id: ${identityId}`)
})

Expand Down Expand Up @@ -269,7 +269,7 @@ export default (testContext: { getAgent: () => ConfiguredAgent; setup: () => Pro
}

await expect(agent.cmAddIdentity({ contactId: defaultContact.id, identity })).rejects.toThrow(
`Identity with correlation type url should contain a connection`
`Identity with correlation type url should contain a connection`,
)
})

Expand Down
4 changes: 2 additions & 2 deletions packages/contact-manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
},
"dependencies": {
"@sphereon/ssi-sdk.data-store": "workspace:*",
"debug": "^4.3.4",
"cross-fetch": "^3.1.8",
"typeorm": "^0.3.12"
"typeorm": "^0.3.20"
},
"devDependencies": {
"@sphereon/ssi-sdk.agent-config": "workspace:*",
"@sphereon/ssi-sdk.data-store": "workspace:*",
"@veramo/remote-client": "4.2.0",
"@veramo/remote-server": "4.2.0"
},
Expand Down
3 changes: 2 additions & 1 deletion packages/contact-manager/src/agent/ContactManager.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {
AbstractContactStore,
BaseContactEntity,
ElectronicAddress,
Identity,
NonPersistedContact,
Expand Down Expand Up @@ -259,7 +260,7 @@ export class ContactManager implements IAgentPlugin {
return this.store.removePhysicalAddress(args).then((): boolean => true)
}

private getContactInformationFrom(contact: any): NonPersistedContact {
private getContactInformationFrom(contact: NonPersistedContact | BaseContactEntity): NonPersistedContact {
if (isNaturalPerson(contact)) {
return { firstName: contact.firstName, middleName: contact.middleName, lastName: contact.lastName, displayName: contact.displayName }
} else if (isOrganization(contact)) {
Expand Down
3 changes: 1 addition & 2 deletions packages/contact-manager/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
"compilerOptions": {
"rootDir": "src",
"outDir": "dist",
"declarationDir": "dist",
"strictPropertyInitialization": false
"declarationDir": "dist"
},
"references": [
{
Expand Down
3 changes: 2 additions & 1 deletion packages/data-store/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@
"@sphereon/ssi-sdk.core": "workspace:*",
"@sphereon/ssi-types": "workspace:*",
"@veramo/core": "4.2.0",
"@veramo/utils": "4.2.0",
"class-validator": "^0.14.0",
"debug": "^4.3.4",
"typeorm": "^0.3.12"
"typeorm": "^0.3.20"
},
"devDependencies": {
"pg": "^8.11.3",
Expand Down
Loading

0 comments on commit efe16f1

Please sign in to comment.