Skip to content

Commit

Permalink
Merge branch 'develop' into feature/SPRIND-84
Browse files Browse the repository at this point in the history
# Conflicts:
#	.gitignore
#	packages/tsconfig.json
#	pnpm-lock.yaml
  • Loading branch information
Brummos committed Oct 29, 2024
2 parents a87ef75 + 9e12eec commit 25695ae
Show file tree
Hide file tree
Showing 159 changed files with 18,350 additions and 11,158 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-test-on-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: pnpm/action-setup@v3
- uses: pnpm/action-setup@v4
with:
version: 8
version: 9
- name: Use Node.js
uses: actions/setup-node@v4
with:
Expand Down
18 changes: 12 additions & 6 deletions .github/workflows/build-test-publish-on-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: pnpm/action-setup@v3
- uses: pnpm/action-setup@v4
with:
version: 8
version: 9
- name: Use Node.js
uses: actions/setup-node@v4
with:
Expand Down Expand Up @@ -75,18 +75,24 @@ jobs:
- name: show diff to track issues with lock file
run: git diff -u

- name: Sets PREID
env:
name: "${{github.ref_name}}"
run: |
echo "PRE_ID=${name//[\/_-]/.}" >> $GITHUB_ENV
- name: publish @latest when on main
if: github.ref == 'refs/heads/main'
run: pnpm publish:latest
run: lerna publish --conventional-commits --force-publish --include-merged-tags --sync-dist-version --create-release github --yes --dist-tag latest --registry https://registry.npmjs.org

- name: publish @next when on develop
if: github.ref == 'refs/heads/develop'
run: pnpm publish:next
run: lerna publish --conventional-prerelease --force-publish --canary --sync-dist-version --no-git-tag-version --include-merged-tags --preid next --pre-dist-tag next --yes --registry https://registry.npmjs.org

- name: publish @next when on fix branch
if: startsWith(github.ref, 'refs/heads/fix')
run: pnpm publish:next
run: lerna publish --conventional-prerelease --force-publish --canary --sync-dist-version --no-git-tag-version --include-merged-tags --preid fix --pre-dist-tag fix --yes --registry https://registry.npmjs.org

- name: publish @unstable when on unstable branch
if: startsWith(github.ref, 'refs/heads/feat')
run: pnpm publish:unstable
run: lerna publish --conventional-prerelease --force-publish --canary --sync-dist-version --no-git-tag-version --include-merged-tags --preid $PRE_ID --pre-dist-tag unstable --yes --throttle-size 75 --registry https://registry.npmjs.org
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,15 @@ test/*.js
/packages/issuance-branding/plugin.schema.json
/packages/oid4vci-issuer-rest-client/plugin.schema.json
/packages/xstate-persistence/plugin.schema.json
/packages/credential-store/plugin.schema.json
/packages/pd-manager/plugin.schema.json
/packages/oidf-client/plugin.schema.json

**/.env.energyshr
**/.env.local
/packages/web3-provider-headless/__tests__/config.json
/packages/event-logger/plugin.schema.json
/packages/public-key-hosting/__tests__/database/test.sqlite

.nx/cache
.nx/workspace-data
2 changes: 1 addition & 1 deletion jest.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"<rootDir>/packages/siopv2-oid4vp-rp-rest-api/.yalc/"
],
"transformIgnorePatterns": [
"<rootDir>/node_modules/.pnpm/(?!(nist-weierstrauss|multiformatsgggggg|@digitalcredentials\\+vc-status-list)@)"
"<rootDir>/node_modules/.pnpm/(?!(nist-weierstrauss|multiformatsgggggg|@digitalcredentials\\+vc-status-list|valibot)@)"
],
"testMatch": [
"**/__tests__/**/*.test.*",
Expand Down
18 changes: 18 additions & 0 deletions nx.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"targetDefaults": {
"build": { "cache": true, "dependsOn": ["^build"], "outputs": ["{workspaceRoot}/coverage" ,"{projectRoot}/coverage", "{projectRoot}/dist"] },
"build:clean": { "dependsOn": [] },
"start:prod": { "dependsOn": ["build"] },
"start:dev": { "dependsOn": [] },
"generate-plugin-schema": { "dependsOn": [] },
"typeorm": { "dependsOn": [] },
"typeorm-sqlite:migration:generate": { "dependsOn": [] },
"typeorm-sqlite:migration:run": { "dependsOn": [] },
"typeorm-postgres:migration:generate": { "dependsOn": [] },
"typeorm-postgres:migration:run": { "dependsOn": [] },
"build:copyfilesdis": { "dependsOn": [] },
"start:energyshr": { "dependsOn": [] },
"start:dev2": { "dependsOn": [] }
},
"nxCloudId": "66ff23d99fb700eb0f2270df"
}
14 changes: 8 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,9 @@
"@babel/preset-typescript": "^7.24.7",
"@types/debug": "^4.1.12",
"@types/jest": "^27.5.2",
"@types/node": "^18.19.41",
"@types/node": "^20.17.1",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"codecov": "^3.8.3",
"cross-fetch": "^3.1.8",
"did-jwt": "6.11.6",
"eslint": "^8.57.0",
Expand All @@ -67,6 +66,7 @@
"json-schema": "^0.4.0",
"lerna": "^8.1.6",
"lerna-changelog": "^2.2.0",
"nx": "^19.8.8",
"oas-resolver": "^2.5.6",
"openapi-types": "^12.1.3",
"patch-package": "^8.0.0",
Expand All @@ -76,10 +76,10 @@
"semantic-release": "^19.0.5",
"ts-jest": "^27.1.5",
"ts-node": "^10.9.2",
"typescript": "5.4.2"
"typescript": "5.6.3"
},
"engines": {
"node": ">= 20.0.0"
"node": ">= 20.0.0 < 22"
},
"prettier": {
"endOfLine": "auto",
Expand Down Expand Up @@ -113,7 +113,7 @@
"@veramo/url-handler": "4.2.0",
"@sphereon/ssi-types": "workspace:*",
"@sphereon/ssi-sdk.core": "workspace:*",
"@sphereon/pex": "5.0.0-unstable.9",
"@sphereon/pex": "5.0.0-unstable.18",
"@sphereon/pex-models": "^2.3.1",
"@noble/hashes": "1.2.0",
"debug": "^4.3.5",
Expand All @@ -123,7 +123,9 @@
"typeorm": "^0.3.20",
"@transmute/jsonld": "^0.0.4",
"jsonld": "npm:@digitalcredentials/jsonld@^6.0.0",
"node-fetch": "2.7.0"
"node-fetch": "2.7.0",
"typescript": "5.6.3",
"@types/node": "^20.17.1"
},
"patchedDependencies": {
"@veramo/[email protected]": "patches/@[email protected]",
Expand Down
3 changes: 2 additions & 1 deletion packages/agent-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,6 @@
"Sphereon",
"SSI",
"Agent"
]
],
"nx": {}
}
9 changes: 7 additions & 2 deletions packages/agent-config/src/dataSources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,19 @@ export const getDbConnection = async (
return DataSources.singleInstance().getDbConnection(connectionName)
}

export const dropDatabase = async (dbName: string): Promise<void> => {
export const dropDatabase = async (dbName: string, opts?: { removeDataSource?: boolean }): Promise<void> => {
const { removeDataSource = false } = { ...opts }
if (!DataSources.singleInstance().has(dbName)) {
return Promise.reject(Error(`No database present with name: ${dbName}`))
}

const connection: DataSource = await getDbConnection(dbName)
await connection.dropDatabase()
DataSources.singleInstance().delete(dbName)
if (removeDataSource) {
DataSources.singleInstance().delete(dbName)
} else if (!connection.isInitialized) {
await connection.initialize()
}
}

/**
Expand Down
9 changes: 5 additions & 4 deletions packages/contact-manager-rest-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
},
"dependencies": {
"@sphereon/ssi-express-support": "workspace:*",
"@sphereon/ssi-sdk-ext.key-manager": "0.24.1-unstable.130",
"@sphereon/ssi-sdk-ext.key-utils": "0.24.1-unstable.130",
"@sphereon/ssi-sdk-ext.key-manager": "0.25.0",
"@sphereon/ssi-sdk-ext.key-utils": "0.25.0",
"@sphereon/ssi-sdk.contact-manager": "workspace:*",
"@sphereon/ssi-sdk.core": "workspace:*",
"@sphereon/ssi-sdk.data-store": "workspace:*",
Expand Down Expand Up @@ -42,7 +42,7 @@
"@types/express": "^4.17.21",
"@types/express-http-proxy": "^1.6.6",
"@types/morgan": "^1.9.9",
"@types/node": "^18.19.41",
"@types/node": "^20.17.1",
"@types/passport": "^1.0.16",
"@types/passport-azure-ad": "^4.3.6",
"@types/uuid": "^9.0.8",
Expand Down Expand Up @@ -79,5 +79,6 @@
"contact-management",
"REST",
"API"
]
],
"nx": {}
}
3 changes: 2 additions & 1 deletion packages/contact-manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,6 @@
"Veramo",
"OpenID",
"Contact Manager"
]
],
"nx": {}
}
5 changes: 3 additions & 2 deletions packages/credential-store/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"generate-plugin-schema": "ts-node ../../packages/dev/bin/sphereon.js dev generate-plugin-schema"
},
"dependencies": {
"@sphereon/pex": "5.0.0-unstable.9",
"@sphereon/pex": "5.0.0-unstable.18",
"@sphereon/pex-models": "^2.3.1",
"@sphereon/ssi-sdk.data-store": "workspace:*",
"cross-fetch": "^3.1.8",
Expand Down Expand Up @@ -49,5 +49,6 @@
"SSI",
"Veramo",
"Credential Manager"
]
],
"nx": {}
}
4 changes: 2 additions & 2 deletions packages/credential-store/src/agent/CredentialStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
UpdateCredentialStateArgs,
DocumentType,
parseRawDocument,
defaultHasher
defaultHasher,
} from '@sphereon/ssi-sdk.data-store'
import { IVerifiableCredential } from '@sphereon/ssi-types'
import { IAgentPlugin } from '@veramo/core'
Expand All @@ -22,7 +22,7 @@ import {
OptionalUniqueDigitalCredential,
UniqueDigitalCredential,
} from '../types/ICredentialStore'
import { TClaimsColumns} from '../types/claims'
import { TClaimsColumns } from '../types/claims'

// Exposing the methods here for any REST implementation
export const credentialStoreMethods: Array<string> = [
Expand Down
Empty file.
Loading

0 comments on commit 25695ae

Please sign in to comment.