0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00

refactor: update ci and package (#6167)

* refactor: update ci and package

* chore: fix tests
This commit is contained in:
Gao Sun 2024-07-03 10:35:19 +08:00 committed by GitHub
parent afd2d22886
commit c7010bbaaa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 15 additions and 31 deletions

View file

@ -59,4 +59,4 @@ jobs:
GH_REPO: ${{ github.repository }} GH_REPO: ${{ github.repository }}
GH_TOKEN: ${{ github.token }} GH_TOKEN: ${{ github.token }}
GH_DEBUG: api GH_DEBUG: api
run: gh workflow run rerun.yml -F run_id=${{ github.run_id }} run: gh workflow run rerun.yml -r ${{ github.head_ref || github.ref_name }} -F run_id=${{ github.run_id }}

View file

@ -1,4 +1,6 @@
# From this genius: https://github.com/orgs/community/discussions/67654#discussioncomment-8038649 # From this genius: https://github.com/orgs/community/discussions/67654#discussioncomment-8038649
name: Rerun workflow
on: on:
workflow_dispatch: workflow_dispatch:
inputs: inputs:

View file

@ -27,7 +27,7 @@
"@logto/connector-kit": "workspace:^3.0.0", "@logto/connector-kit": "workspace:^3.0.0",
"@logto/core-kit": "workspace:^", "@logto/core-kit": "workspace:^",
"@logto/js": "^4.1.4", "@logto/js": "^4.1.4",
"@logto/node": "^2.4.7", "@logto/node": "^2.5.4",
"@logto/schemas": "workspace:^1.17.0", "@logto/schemas": "workspace:^1.17.0",
"@logto/shared": "workspace:^3.1.1", "@logto/shared": "workspace:^3.1.1",
"@silverhand/eslint-config": "6.0.1", "@silverhand/eslint-config": "6.0.1",

View file

@ -1,7 +1,7 @@
import assert from 'node:assert'; import assert from 'node:assert';
import { UserScope, buildOrganizationUrn } from '@logto/core-kit'; import { UserScope, buildOrganizationUrn } from '@logto/core-kit';
import { LogtoError } from '@logto/js'; import { LogtoRequestError } from '@logto/js';
import { InteractionEvent, MfaFactor } from '@logto/schemas'; import { InteractionEvent, MfaFactor } from '@logto/schemas';
import { createUserMfaVerification, deleteUser } from '#src/api/admin-user.js'; import { createUserMfaVerification, deleteUser } from '#src/api/admin-user.js';
@ -100,12 +100,8 @@ describe('get access token for organization', () => {
.getOrganizationTokenClaims(newOrganization.id) .getOrganizationTokenClaims(newOrganization.id)
.catch((error: unknown) => error); .catch((error: unknown) => error);
assert(error instanceof LogtoError); assert(error instanceof LogtoRequestError);
expect(error.code).toBe('unexpected_response_error'); expect(error.code).toBe('oidc.access_denied');
expect(error.data).toMatchObject({
code: 'oidc.access_denied',
error: 'access_denied',
});
}); });
it('should throw when organization requires mfa but user has not configured', async () => { it('should throw when organization requires mfa but user has not configured', async () => {
@ -116,12 +112,8 @@ describe('get access token for organization', () => {
.getOrganizationTokenClaims(testOrganizationId) .getOrganizationTokenClaims(testOrganizationId)
.catch((error: unknown) => error); .catch((error: unknown) => error);
assert(error instanceof LogtoError); assert(error instanceof LogtoRequestError);
expect(error.code).toBe('unexpected_response_error'); expect(error.code).toBe('oidc.access_denied');
expect(error.data).toMatchObject({
code: 'oidc.access_denied',
error: 'access_denied',
});
}); });
it('should be able to get access token for organization when user has mfa configured', async () => { it('should be able to get access token for organization when user has mfa configured', async () => {

View file

@ -3790,8 +3790,8 @@ importers:
specifier: ^4.1.4 specifier: ^4.1.4
version: 4.1.4 version: 4.1.4
'@logto/node': '@logto/node':
specifier: ^2.4.7 specifier: ^2.5.4
version: 2.4.7 version: 2.5.4
'@logto/schemas': '@logto/schemas':
specifier: workspace:^1.17.0 specifier: workspace:^1.17.0
version: link:../schemas version: link:../schemas
@ -5248,9 +5248,6 @@ packages:
'@logto/browser@2.2.15': '@logto/browser@2.2.15':
resolution: {integrity: sha512-sQf2jYTHMuU8tVqkgaoWrKy3mhuyuLqsUDmDr6TBRv6jjFQMnniI6/5jHlqnllCs6B5x8qsjctcqcYiqKQmc5g==} resolution: {integrity: sha512-sQf2jYTHMuU8tVqkgaoWrKy3mhuyuLqsUDmDr6TBRv6jjFQMnniI6/5jHlqnllCs6B5x8qsjctcqcYiqKQmc5g==}
'@logto/client@2.6.6':
resolution: {integrity: sha512-QT7jMnzEIWHBNrf9/M8p1OErRBbbNZjoekXGji5aZCyUh975hh8+GEBL21HV71FT3H/5Cq4Gf1GzUbAIW3izMA==}
'@logto/client@2.7.2': '@logto/client@2.7.2':
resolution: {integrity: sha512-jsmuDl9QpXfR3uLEMPE67tvYoL5XcjJi+4yGqucYPjd4GH6SUHp3N9skk8C/OyygnKDPLY+ttwD0LaIbpGvn+Q==} resolution: {integrity: sha512-jsmuDl9QpXfR3uLEMPE67tvYoL5XcjJi+4yGqucYPjd4GH6SUHp3N9skk8C/OyygnKDPLY+ttwD0LaIbpGvn+Q==}
@ -5261,8 +5258,8 @@ packages:
'@logto/js@4.1.4': '@logto/js@4.1.4':
resolution: {integrity: sha512-6twud1nFBQmj89/aflzej6yD1QwXfPiYmRtyYuN4a7O9OaaW3X/kJBVwjKUn5NC9IUt+rd+jXsI3QJXENfaLAw==} resolution: {integrity: sha512-6twud1nFBQmj89/aflzej6yD1QwXfPiYmRtyYuN4a7O9OaaW3X/kJBVwjKUn5NC9IUt+rd+jXsI3QJXENfaLAw==}
'@logto/node@2.4.7': '@logto/node@2.5.4':
resolution: {integrity: sha512-AlANeqY1NIt93EBcRzrTmyAVHXOHpszTJK+qe1ok50rmZlTmX2p7yQvrg0/Ehwf/+4Rla5vooAR+HIFMaOmPpQ==} resolution: {integrity: sha512-bhcvaTjGEdDoNroiLHiKacX9G8lP43xGWou/0UiH97Ukar70JRymF4fWqX8zyVM6V4ChW1j9lohErVvLCtQYgw==}
'@logto/react@3.0.13': '@logto/react@3.0.13':
resolution: {integrity: sha512-t3aHYtgJLocawGtL5hVO05/At6qa5WUAxqTj7FhxI4BDpewD2KZCVfbQyr9YXrPg60mTzkk0r00oEEO3oZqSVA==} resolution: {integrity: sha512-t3aHYtgJLocawGtL5hVO05/At6qa5WUAxqTj7FhxI4BDpewD2KZCVfbQyr9YXrPg60mTzkk0r00oEEO3oZqSVA==}
@ -14963,13 +14960,6 @@ snapshots:
'@silverhand/essentials': 2.9.1 '@silverhand/essentials': 2.9.1
js-base64: 3.7.5 js-base64: 3.7.5
'@logto/client@2.6.6':
dependencies:
'@logto/js': 4.1.4
'@silverhand/essentials': 2.9.1
camelcase-keys: 7.0.2
jose: 5.2.4
'@logto/client@2.7.2': '@logto/client@2.7.2':
dependencies: dependencies:
'@logto/js': 4.1.4 '@logto/js': 4.1.4
@ -14989,9 +14979,9 @@ snapshots:
'@silverhand/essentials': 2.9.1 '@silverhand/essentials': 2.9.1
camelcase-keys: 7.0.2 camelcase-keys: 7.0.2
'@logto/node@2.4.7': '@logto/node@2.5.4':
dependencies: dependencies:
'@logto/client': 2.6.6 '@logto/client': 2.7.2
'@silverhand/essentials': 2.9.1 '@silverhand/essentials': 2.9.1
js-base64: 3.7.5 js-base64: 3.7.5