Skip to content

Commit

Permalink
Feature/merge 1.15.0 (#5)
Browse files Browse the repository at this point in the history
* chore(schemas): renaming

* refactor(core): refactor code

* refactor(core): overload  function interface

* refactor(core): refactor

* feat(core): add GET /configs/jwt-customizer API

* chore(core,test): update tests and refactor getJwtCustomizer query

* fix(test): fix tests

* refactor(core): refactor

* feat(core): add GET /configs/jwt-customizer API

* feat(core): add DELETE /configs/jwt-customizer API

* fix(core): fix rebase

* refactor(console): implement environment variables input field (1/2) (logto-io#5471)

* refactor(console): extract the KeyValueInput ds component

extract the KeyValueInput ds component

* fix(console): remove unused styles

remove unused styles

* refactor(console): extract the FormField from KeyValueInput

extract the FormField from KeyValueInput

* fix(console): refactor some code based on code review comment

refactor some code based the code review comment

* feat(console,phrases): implement environment variables input field (2/2) (logto-io#5473)

feat(console,phrases): implement environment variables input field

implement environment variables input field

* feat(console,phrases): add test sample code editor (logto-io#5475)

* feat(console,phrases): add test sample code editor

add test sample code editor

* fix(console): remove unused styles

remove unused styles

* refactor(console): refactor the components structure

erfactor the components structure

* refactor(console): clean up the root component

clean up the root component

* feat(console,phrases): add test result component (logto-io#5479)

* feat(console,phrases): add test result component

add test result component

* fix(console): remove unused styles

remove unused styles

* feat(core): create user with avatar and custom data (logto-io#5476)

* feat(core): add password algorithm transition (logto-io#5481)

* chore(console): component rename (logto-io#5480)

rename component XXXPanel -> XXXSection

* fix(console): fix input field background color (logto-io#5478)

* feat(console, phrases): implement the copy, clear and reset button (logto-io#5490)

* refactor(console): replace copy button with CopyToClipboard component

replace copy button with CopyToClipboard component

* feat(console): implement the clear and reset button

implement the clear and reset button

* refactor(console): bind RHF controller to the code editor

bind RHF controller to the code editor

* chore(console): add some comments

add some comments

* feat(core,schemas): update jwt customizer user info context

* feat(console): add change alert and save changes footer (logto-io#5492)

* feat(console): add change alert and save changes footer

add change alert and save changes footer

* chore(console): add useMemo hook

add useMemo hook

* refactor(experience): skip non-object messages in native (logto-io#5491)

* refactor(experience): skip non-object messages in native

* chore: add changeset

* chore(schemas): add cloud scope, service log type and API guard

* refactor(core): update organization invitation apis (logto-io#5474)

* refactor(core): update organization invitation apis

* chore: add api tests

* refactor(core,console): align the jwt token path enum (logto-io#5493)

align the jwt token path enum used in console and core

* feat(console,phrases): integrate jwt customizer api (logto-io#5495)

* feat(console,phrases): integrate jwt customizer api

integrate jwt customizer api

* chore(console): update the comment

update the comment

* fix(console): clear the console logs

clear the console logs

* refactor(console,core,schemas): rename the jwtCustomizer related type and guards (logto-io#5496)

rename the jwtCustomizer related type and guards

* feat(phrases): add i18n phrases for cloud collaboration

* feat(console): add global loading skeleton (logto-io#5498)

add global loading skeleton

* fix(console): fix code edtior set undefined value bug (logto-io#5499)

fix the code editor set undefined value bug

* fix(core): the koa response status guard missing 422 in sso integration API (logto-io#5506)

* chore(schemas): export custom JWT API request body type (logto-io#5510)

chore(schemas): export custom jwt API request body type

* refactor: remove slonik from shared

* refactor: fix errors

* refactor: use silverhand slonik

* chore: upgrade slonik

* refactor: remove unused files

* chore: add changeset for the bug fix PR (logto-io#5507)

add changeset for the bug fix PR

* feat(core): set oidc issuer to custom domain (logto-io#5509)

* feat(core): set oidc issuer to custom domain

* refactor(core): get tenant id return whether is custom domain

* test(core): mock crypto functions in password tests (logto-io#5522)

* refactor: update invitation apis

* feat: allow get invitations by invitee

* refactor(console): refactor the code editor type definition (logto-io#5516)

* refactor(console): refactor the code editor type definition

refactor the code editor type definition

* refactor(console): extract type definition gen process

extract the type definition gen step to the build time. As typescript is not available at run time.

* fix(console): add generate to console build script

add generate to console build script

* fix(console): add prettier format

add prettier format

* refactor(console): replace the field table with type definition code (logto-io#5519)

* refactor(console): replace the field table with type definition code

replace the field table with type definition code

* refactor(console): rebase and pickup the generated type definitions

rebase and pickup the generated type definitions

* feat: return and store connector raw data

* chore: add exception for connector template

* refactor(core): update user context type

* feat: add oidc standard claims to user

* refactor(core,schemas): refactor to improve lib method performance

* fix(console): fix some user related type in console

* refactor(console,phrases): refactor the jwt customizer content (logto-io#5527)

* refactor(console,phrases): refactor the jwt customizer content

refactor the jwt customizer content

* fix(console): add isDev guard

add isDev guard

* refactor(core): refactor oidc sso connector (logto-io#5528)

refactor oidc sso connector

* refactor: fix type issues

* refactor: fix tests

* chore: remove org role scopes field since it relies on pagination setup

* feat: add profile api, update api and database, add tests

* chore: add changeset and api doc

* ci: bump workflow version (logto-io#5533)

* fix(schemas): fix the get interation/consent api bug (logto-io#5503)

* fix(schemas): fix the get interation/consent api bug

fix the get interation/consent api bug

* chore: update changeset

update changeset

* fix: update changeset

update changeset

* refactor(schemas, console): alter the resource scopes description field to nullable (logto-io#5504)

* refactor(schemas, console): alter the resoruce scopes description field nullable

make the resourec scopes description nullable

* fix(test): fix the type issue in the integration test

fix the type issue in the integration test

* fix(console): add the field register

add the field register

* fix: update the changeset

update the changeset

* fix(console,test): update comments and rebase

update comments and rebase the master

* chore: add comments

* feat(core): add POST /configs/jwt-customizer/test API

* refactor(core): use discriminate union for custom jwt test API

* chore: update core dependency

* chore: add todo

* chore: remove 500 status guard

* refactor: refactor

* refactor(core): add cloud-only API prune for API docs

* refactor: remove cloud only operations when needed

* refactor: keep origin customJwtFetcherGuard

* refactor: adopt suggestion

* chore(schemas): remove deprecated `prune:logs` scope (logto-io#5524)

* chore: add status 403 for custom jwt test API

* feat(console): integrate jwt customizer test api (logto-io#5532)

* feat(console): integrate jwt customizer test api

integrate jwt customizer test api

* refactor(console,core): jwt test api integration

jwt test api integration

* chore: add cloud connection scope config for fetching custom jwt

---------

Co-authored-by: Darcy Ye <[email protected]>

* feat(console): add tenant member and invitation lists (logto-io#5501)

* feat(console): add tenant member and invitation lists

* refactor: polish code per comments

* fix: lockfile

* Update README.md (logto-io#5535)

logto-io#1937 (comment)

* refactor: fix test and ci

* feat(core): add the support on custom JWT feature

* fix: cloud connection should bypass custom JWT flow

* chore: update cloud dependency

* refactor(core): add cache for cloud connection data

* refactor: block admin tenant from using creating jwt-customizer API

* refactor: remove credentials cache

* refactor: try catch extraTokenClaims function to avoid breaking the auth process

* style(console): fix the jwt test panel layout (logto-io#5538)

fix the jwt test panel layout

* chore: fix

* chore: fix

* refactor(core): remove unused mark mfa skip function (logto-io#5517)

fixed logto-io#5482

* chore(schemas): add comments for `ReservedPlanId` (logto-io#5542)

* refactor(console): extract shared quota between featured plan and comparison table (logto-io#5543)

* refactor(console): avoid nested modal content for role creation (logto-io#5544)

* refactor: reorder code

* refactor: not update console cloud dependency

* refactor(phrases,core,console): update API and console error handling/display

* chore: add comments

* refactor(schemas,core,console): skip onboarding if user has pending invitations (logto-io#5547)

* fix(core): fix the post domains api error status code (logto-io#5552)

fix the post domains api error status code

* chore: bump @logto dependencies (logto-io#5548)

* chore(phrases): add i18n phrases for console invitation interim pages (logto-io#5553)

* refactor(console): reorg sidebar menu items (logto-io#5550)

* fix(core,phrases): fix custom JWT PUT API block admin tenant logic

* feat: support direct sign-in (logto-io#5536)

* feat: support direct sign-in

* chore: add changesets

* refactor: add test cases

* chore(deps): upgrade logto sdks

* chore(deps): update softprops/action-gh-release action to v2 (logto-io#5486)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(schemas): update customJwtFetcherGuard to specify custom jwt use case

* feat(console): invite members dialog (logto-io#5531)

* feat(console): add console landing page to accept user invitation (logto-io#5554)

* chore(deps): update packges (logto-io#5545)

* chore(deps): upgrade puppeteer

* chore: replace plugin

* refactor: fix tests

* feat(core,schemas): add new Azure OIDC SSO connector (logto-io#5540)

add new Azure OIDC SSO connector

* refactor(core,schemas): refactor the sso connector factory type (logto-io#5541)

* refactor(core,schemas): refactor the sso connector factory type

refactor the sso connector factory type and add providerType to the config data

* fix(core): fix ut

fix ut

* refactor(schemas): add the providerType to the providerDetails return type

add the new providerType property to the providerDetails return type

* refactor(console): refactor useApi (logto-io#5549)

refactor useApi hideToast logic

* refactor(console): refactor sso detail pages (logto-io#5551)

* refactor(console): refactor sso detail pages

refactor sso details pages

* fix(console): fix the sso paywall guard content

fix the sso paywall guard content

* style(console): fix the color code white css (logto-io#5564)

fix the color code white css

* feat(console): support signing-key rotation for oss version (logto-io#5559)

* fix(console,phrases): api resource indicator should be a valid absolute uri (logto-io#5561)

* fix(console,phrases): api resource indicator should be a valid absolute uri

* refactor: use vitest for connectors (logto-io#5562)

* fix(console): fix jwt test context code editor bug (logto-io#5563)

fix jwt test context code editor bug

* fix(console): fix the zod-to-ts type infer bug (logto-io#5566)

fix the zod-to-ts type infer bug

* feat(console): implement interim landing page for new users to join invited tenants (logto-io#5560)

* feat(console): support permission editing (logto-io#5567)

* chore(schemas,core): update custom JWT sample token payload guard

* feat(console): add quick join options in tenant selector dropdown (logto-io#5568)

* feat(console): implement interim landing page for new users to join invited tenants

* feat(console): add quick join options in tenant selector dropdown

* chore(console): update the default user context as well

* refactor: remove jest

* refactor: remove jest

* refactor: add back `build:test` for other packages

* chore: add test coverage pacakge

* refactor: remove jest

* test: wait 0ms after each test

* refactor(console): update tenant settings access per user tenant scopes (logto-io#5571)

* test: add integration tests for jwt (logto-io#5565)

* test: improve integration tests (logto-io#5577)

* refactor(schemas): remove invite member scope from tenant member role (logto-io#5578)

* fix(deps): update dependency snakecase-keys to v7 (logto-io#5556)

* fix(deps): update dependency snakecase-keys to v7

* test: wait for 1ms for every api test

---------

Co-authored-by: Gao Sun <[email protected]>

* fix(deps): update dependency snake-case to v4 (logto-io#5534)

Co-authored-by: Gao Sun <[email protected]>

* chore: add comments for cloud seed data (logto-io#5583)

* feat(schemas): add new scope read:member to both tenant admin and member roles (logto-io#5582)

* chore: update cloud version and the way to call cloud custom JWT API

* fix(console,phrases): should check duplicated emails when inviting members (logto-io#5581)

fix(console,phrases): check duplicated emails when inviting members

* fix(console): revert the custom jwt forms overflow hidden (logto-io#5573)

revert the custom jwt forms overflow hidden styles

* feat(schemas): add util method to convert admin tenant org id to user tenant id (logto-io#5570)

* refactor: use ky in integration tests (logto-io#5584)

* refactor: use ky in integration tests

* refactor: remove node-fetch

* refactor: fix test cases

* refactor: remove waitFor after each test

* feat: support direct sign-in for sso (logto-io#5589)

* chore(core): update GET /configs/jwt-customizer/:tokenPath API error handling (logto-io#5595)

* refactor(core): reorg and separate logto-config APIs into files

* chore(cli): update translate CLI configs

* fix(console): refresh invitation list after inviting members (logto-io#5593)

* test: add tests for username case sensitive (logto-io#5597)

* refactor(console): move organization template into a single page (logto-io#5590)

* refactor(console): move organization template into a single page

* feat(phrases): add org template translations

* feat(console): implement custom jwt landing page

implement custom jwt landing page

* refactor(console): relocalte the component files

relocate the component files

* refactor(console): rename the jwtClaims page

rename the jwtClaims page

* refactor(console,phrases): refactor the customize jwt details page

refactor the customize jwt details page

* refactor(console): remove unused element

remove unused element

* refactor(console): redesign the jwt details page

redesign the jwt details page

* feat(console): update jwt create page button text

update jwt create page button text

* chore(console): align custom JWT path and hide the entrance for OSS

* style(console): refine the SSO connector create model (logto-io#5594)

refine the sso connector create model

* fix(console): only pending invitations can be resent (logto-io#5601)

* fix(core): update expired invitation to expired before inserting a new one (logto-io#5609)

* feat(console): add leave tenant button in tenant settings (logto-io#5600)

* fix(console): joining tenant should navigate user to the new tenant (logto-io#5602)

* chore(core,console): update error handling of testing custom JWT

* feat(core): add PATCH /configs/jwt-customizer API

* fix(console): reset form as soon as JWT customizer is created (logto-io#5612)

* feat(core,schemas): log extraTokenClaims exception (logto-io#5539)

* refactor(console): improve invitation email input field (logto-io#5615)

* refactor(schemas): rename tenant member role to collaborator (logto-io#5616)

* fix(console,phrases): fix a batch of organization invitation console ui issues (logto-io#5614)

* feat(console): support org permission management on new org template page (logto-io#5603)

* feat(console): support org permission management on new org template page

* refactor(console): rename org pages

* refactor(console): rename phrase keys

* refactor(console): rename org to organization

* feat(console): add org role details general settings page (logto-io#5610)

* chore(console,phrases): update content and fix console

* chore(console,toolkit): update custom JWT details page code editor action buttons style

* refactor(console,phrases): rename tenant member role to collaborator (logto-io#5618)

* chore(console,toolkit): update custom JWT details page code editor action buttons style

* chore(core,console,schemas): update variable name and field name

* refactor(experience): fix sso callback page style (logto-io#5624)

* refactor(phrases): add zh-cn phrases in OIDC consent page (logto-io#5606)

* feat(phrases): add i18n phrases for zh-cn about OICD Authorize page

* refactor: apply suggestions from code review

---------

Co-authored-by: Gao Sun <[email protected]>

* chore(console): update style

chore(console): update style

* refactor(console,phrases): display inviter name on tenant invitations table (logto-io#5622)

* refactor(console,phrases): display inviter name on tenant invitations table

* chore: bump @logto/cloud

* chore: update pnpm lockfile

* refactor: update dependency on @logto/cloud and update legacy JWT customizer

* fix(console): temporarily fix pro plan cannot invite members issue (logto-io#5629)

* feat(console): create organization role (logto-io#5630)

* feat(console): add permissions page for org role details page (logto-io#5631)

* refactor(console): reorg resource details page (logto-io#5634)

* feat(core): search organization roles (logto-io#5627)

* feat(core,schemas): add organization resource scope relations (logto-io#5608)

* feat(console): add azure OIDC guide (logto-io#5592)

add azure OIDC guide

* feat(core,schemas): edit and query resource scopes for org role (logto-io#5613)

* fix(console,phrases): update the jwt test section content (logto-io#5641)

update the jwt test section content

* style(console): fix the jwt details page style (logto-io#5642)

* style(console): fix the jwt details page style

fix the jwt details page style

* fix(console): remove the unused style

remove the unused style

* fix(console): remove sticky position

remove sticky position

* feat(console,core,phrases): add quota guard for cloud collaboration in console (logto-io#5644)

* fix(console): fix test result panel overflow bug (logto-io#5643)

fix test result panel overflow bug

* chore(schemas): fix alteration timestamp (logto-io#5645)

chore(schemas): fix alteration scripts order

* feat(console): support searching for organization roles (logto-io#5646)

* chore(schemas): fix alteration down (logto-io#5648)

* refactor(console): show confirm box when inviting a member as admin (logto-io#5649)

* fix(console): should stop requesting invitations api for collaborator role (logto-io#5650)

* feat(console): add guide for organization template page (logto-io#5647)

* refactor(console): collaborator can see tenant domain settings in readonly mode (logto-io#5652)

* refactor(console): hide switching tabs and invite button for collaborators (logto-io#5654)

* refactor(console): improve switch button styles (logto-io#5655)

* fix(console): user should switch account and accept invitation properly in console (logto-io#5657)

* fix(console): bump js sdks to fix the cannot switch user account issue

* fix(console): accept invitation automatically after switching account

* refactor(console): improve tenant member role related experience (logto-io#5659)

* refactor(console,phrases): improve invite email input (logto-io#5661)

* fix(console): go to onboarding process on clicking create new tenant button (logto-io#5663)

* fix(connector): fix microsoft social connector readme (logto-io#5658)

* fix(connector): fix microsoft social connector readme

fix microsoft social connector readme

* fix(connector): improve wording

improve wording

* fix(experience): fix the terms of use not clickable bug (logto-io#5670)

* fix(experience): fix the terms of use not clickable bug

fix the terms of use not clickable bug

* chore: remove changeset

remove changeset

* chore(console): remove dev feature flags for cloud collaboration (logto-io#5666)

* chore(console): update pricing plan items for jwt claims (logto-io#5672)

* refactor(console): redirect to sign-up page on clicking invitation links (logto-io#5669)

* chore: add changeset (logto-io#5668)

add changeset

* refactor(experience): fall back to sign-in page when error (logto-io#5673)

* refactor(experience): fall back to sign-in page for edge cases

* refactor: add unit tests

* refactor: fix tests

* release: version packages (logto-io#5463)

* feat(cli): updated references to slonik lib

---------

Co-authored-by: Darcy Ye <[email protected]>
Co-authored-by: simeng-li <[email protected]>
Co-authored-by: wangsijie <[email protected]>
Co-authored-by: Charles Zhao <[email protected]>
Co-authored-by: Gao Sun <[email protected]>
Co-authored-by: Xiao Yijun <[email protected]>
Co-authored-by: Julian Hackenberg <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: pawn <[email protected]>
Co-authored-by: silverhand-bot <[email protected]>
  • Loading branch information
11 people authored Apr 11, 2024
1 parent d23504c commit 6979496
Show file tree
Hide file tree
Showing 1,212 changed files with 24,415 additions and 6,861 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
env:
INTEGRATION_TEST: true
steps:
- uses: logto-io/actions-package-logto-artifact@v1.1.0
- uses: logto-io/actions-package-logto-artifact@v2
with:
artifact-name: alteration-integration-test-${{ github.sha }}
branch: ${{github.base_ref}}
Expand All @@ -68,7 +68,7 @@ jobs:
DB_URL: postgres://postgres:postgres@localhost:5432/postgres

steps:
- uses: logto-io/actions-run-logto-integration-tests@v1.1.0
- uses: logto-io/actions-run-logto-integration-tests@v2
with:
branch: ${{github.base_ref}}
logto_artifact: alteration-integration-test-${{ github.sha }}
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ jobs:
uses: silverhand-io/actions-node-pnpm-run-steps@v4

- name: Commitlint
run: npx commitlint --from HEAD~${{ github.event.pull_request.commits }} --to HEAD
# Credit to https://stackoverflow.com/a/67365254/12514940
run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose

- name: Commitlint on PR title
run: echo '${{ github.event.pull_request.title }}' | npx commitlint
4 changes: 2 additions & 2 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
INTEGRATION_TEST: true

steps:
- uses: logto-io/actions-package-logto-artifact@v1.1.0
- uses: logto-io/actions-package-logto-artifact@v2
with:
artifact-name: integration-test-${{ github.sha }}

Expand All @@ -34,7 +34,7 @@ jobs:
DB_URL: postgres://postgres:postgres@localhost:5432/postgres

steps:
- uses: logto-io/actions-run-logto-integration-tests@v1.1.0
- uses: logto-io/actions-run-logto-integration-tests@v2
with:
logto_artifact: integration-test-${{ github.sha }}
test_target: ${{ matrix.target }}
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ jobs:
run: ./.scripts/package.sh

- name: Release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
token: ${{ secrets.BOT_PAT }}
body: ""
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,6 @@ dump.rdb

# connectors
/packages/core/connectors

# console auto generated files
/packages/console/src/consts/jwt-customizer-type-definition.ts
2 changes: 1 addition & 1 deletion .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ tasks:
cd packages/core
pnpm build
cd -
pnpm connectors:build
pnpm connectors build
pnpm cli connector link
command: |
gp ports await 5432
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ Logto uses the [default browserslist config](https://github.com/browserslist/bro
- About other bug reports, feature requests, and feedback, you can:
- Directly 🙋 [open an issue](https://github.com/logto-io/logto/issues/new) on GitHub;
- 💬 [join our Discord server](https://discord.gg/vRvwuwgpVX) to have a live chat;
- Engage in our 📍 [public roadmap](https://github.com/logto-io/logto/issues/1937).

## Licensing

Expand Down
10 changes: 6 additions & 4 deletions commitlint.config.cjs → commitlint.config.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
const { rules } = require('@commitlint/config-conventional');
import conventional from '@commitlint/config-conventional';
import { UserConfig } from '@commitlint/types';

const isCi = process.env.CI === 'true';

/** @type {import('@commitlint/types').UserConfig} **/
module.exports = {
const config: UserConfig = {
extends: ['@commitlint/config-conventional'],
rules: {
'type-enum': [2, 'always', [...rules['type-enum'][2], 'api', 'release']],
'type-enum': [2, 'always', [...conventional.rules['type-enum'][2], 'api', 'release']],
'scope-enum': [2, 'always', ['connector', 'console', 'core', 'demo-app', 'test', 'phrases', 'schemas', 'shared', 'experience', 'deps', 'deps-dev', 'cli', 'toolkit', 'cloud', 'app-insights']],
// Slightly increase the tolerance to allow the appending PR number
...(isCi && { 'header-max-length': [2, 'always', 110] }),
'body-max-line-length': [2, 'always', 110],
},
};

export default config;
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"cli": "logto",
"changeset": "changeset",
"alteration": "logto db alt",
"connectors:build": "pnpm -r --filter \"./packages/connectors/connector-*\" build",
"connectors": "pnpm -r --filter \"./packages/connectors/connector-*\"",
"//": "# `changeset version` won't run version lifecycle scripts, see https://github.com/changesets/changesets/issues/860",
"ci:version": "changeset version && pnpm -r version",
"ci:build": "pnpm -r build",
Expand All @@ -25,9 +25,9 @@
},
"devDependencies": {
"@changesets/cli": "^2.26.2",
"@commitlint/cli": "^18.0.0",
"@commitlint/config-conventional": "^18.0.0",
"@commitlint/types": "^18.0.0",
"@commitlint/cli": "^19.0.0",
"@commitlint/config-conventional": "^19.0.0",
"@commitlint/types": "^19.0.0",
"@types/pg": "^8.6.6",
"husky": "^9.0.0",
"pg": "^8.8.0",
Expand Down
13 changes: 0 additions & 13 deletions packages/app-insights/jest.config.js

This file was deleted.

13 changes: 6 additions & 7 deletions packages/app-insights/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,30 +24,29 @@
"scripts": {
"precommit": "lint-staged",
"build": "rm -rf lib/ && tsc -p tsconfig.build.json",
"build:test": "rm -rf lib/ && tsc -p tsconfig.test.json --sourcemap",
"build:test": "pnpm build",
"dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput --incremental",
"lint": "eslint --ext .ts src",
"lint:report": "pnpm lint --format json --output-file report.json",
"test:only": "NODE_OPTIONS=--experimental-vm-modules jest",
"test": "pnpm build:test && pnpm test:only",
"test": "vitest src",
"test:ci": "pnpm run test --silent --coverage",
"prepack": "pnpm build"
},
"devDependencies": {
"@silverhand/eslint-config": "5.0.0",
"@silverhand/eslint-config-react": "5.0.0",
"@silverhand/ts-config": "5.0.0",
"@silverhand/ts-config-react": "5.0.0",
"@types/jest": "^29.4.0",
"@types/node": "^20.9.5",
"@types/react": "^18.0.31",
"@vitest/coverage-v8": "^1.4.0",
"eslint": "^8.44.0",
"history": "^5.3.0",
"jest": "^29.7.0",
"lint-staged": "^15.0.0",
"prettier": "^3.0.0",
"react": "^18.0.0",
"tslib": "^2.4.1",
"typescript": "^5.3.3"
"typescript": "^5.3.3",
"vitest": "^1.4.0"
},
"engines": {
"node": "^20.9.0"
Expand Down
2 changes: 2 additions & 0 deletions packages/app-insights/src/normalize-error.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { describe, expect, it } from 'vitest';

import { normalizeError } from './normalize-error.js';

describe('normalizeError()', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/app-insights/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": "@silverhand/ts-config-react/tsconfig.base",
"compilerOptions": {
"outDir": "lib",
"types": ["node", "jest"],
"types": ["node"],
},
"include": [
"src"
Expand Down
8 changes: 0 additions & 8 deletions packages/app-insights/tsconfig.test.json

This file was deleted.

21 changes: 21 additions & 0 deletions packages/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# Change Log

## 1.15.0

### Patch Changes

- Updated dependencies [5758f84f5]
- Updated dependencies [57d97a4df]
- Updated dependencies [abffb9f95]
- Updated dependencies [746483c49]
- Updated dependencies [2cbc591ff]
- Updated dependencies [57d97a4df]
- Updated dependencies [cc01acbd0]
- Updated dependencies [951865859]
- Updated dependencies [57d97a4df]
- Updated dependencies [2c10c2423]
- @logto/phrases@1.10.0
- @logto/connector-kit@3.0.0
- @logto/core-kit@2.4.0
- @logto/schemas@1.15.0
- @logto/phrases-experience@1.6.1
- @logto/shared@3.1.0

## 1.14.0

### Patch Changes
Expand Down
13 changes: 0 additions & 13 deletions packages/cli/jest.config.js

This file was deleted.

31 changes: 14 additions & 17 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@logto/cli",
"version": "1.14.0",
"version": "1.15.0",
"description": "Logto CLI.",
"author": "Silverhand Inc. <[email protected]>",
"homepage": "https://github.com/logto-io/logto#readme",
Expand All @@ -25,15 +25,14 @@
"precommit": "lint-staged",
"prepare:package-json": "node -p \"'export const packageJson = ' + JSON.stringify(require('./package.json'), undefined, 2) + ';'\" > src/package-json.ts",
"build": "rm -rf lib && pnpm prepare:package-json && tsc -p tsconfig.build.json",
"build:test": "rm -rf lib/ && pnpm prepare:package-json && tsc -p tsconfig.test.json --sourcemap",
"build:test": "pnpm build",
"dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput --incremental",
"start": "node .",
"start:dev": "pnpm build && node .",
"lint": "eslint --ext .ts src",
"lint:report": "pnpm lint --format json --output-file report.json",
"test:only": "NODE_OPTIONS=--experimental-vm-modules jest",
"test": "pnpm build:test && pnpm test:only",
"test:ci": "pnpm test:only",
"test": "vitest src",
"test:ci": "pnpm run test --silent --coverage",
"prepack": "pnpm build"
},
"engines": {
Expand All @@ -43,14 +42,15 @@
"url": "https://github.com/logto-io/logto/issues"
},
"dependencies": {
"@logto/connector-kit": "workspace:^2.1.0",
"@logto/core-kit": "workspace:^2.3.0",
"@logto/connector-kit": "workspace:^3.0.0",
"@logto/core-kit": "workspace:^2.4.0",
"@logto/language-kit": "workspace:^1.1.0",
"@logto/phrases": "workspace:^1.9.0",
"@logto/phrases-experience": "workspace:^1.6.0",
"@logto/schemas": "workspace:1.14.0",
"@logto/phrases": "workspace:^1.10.0",
"@logto/phrases-experience": "workspace:^1.6.1",
"@logto/schemas": "workspace:1.15.0",
"@logto/shared": "workspace:^3.1.0",
"@silverhand/essentials": "^2.9.0",
"@silverhand/slonik": "31.0.0-beta.2",
"chalk": "^5.0.0",
"decamelize": "^6.0.0",
"dotenv": "^16.0.0",
Expand All @@ -65,9 +65,6 @@
"pg-protocol": "^1.6.0",
"roarr": "^7.11.0",
"semver": "^7.3.8",
"slonik": "^30.0.0",
"slonik-interceptor-preset": "^1.2.10",
"slonik-sql-tag-raw": "^1.1.4",
"tar": "^6.1.11",
"typescript": "^5.3.3",
"yargs": "^17.6.0",
Expand All @@ -76,19 +73,19 @@
"devDependencies": {
"@silverhand/eslint-config": "5.0.0",
"@silverhand/ts-config": "5.0.0",
"@withtyped/server": "^0.12.9",
"@types/inquirer": "^9.0.0",
"@types/jest": "^29.4.0",
"@types/node": "^20.9.5",
"@types/semver": "^7.3.12",
"@types/sinon": "^17.0.0",
"@types/tar": "^6.1.2",
"@types/yargs": "^17.0.13",
"@vitest/coverage-v8": "^1.4.0",
"@withtyped/server": "^0.13.3",
"eslint": "^8.44.0",
"jest": "^29.7.0",
"lint-staged": "^15.0.0",
"prettier": "^3.0.0",
"sinon": "^17.0.0"
"sinon": "^17.0.0",
"vitest": "^1.4.0"
},
"eslintConfig": {
"extends": "@silverhand",
Expand Down
26 changes: 13 additions & 13 deletions packages/cli/src/commands/database/alteration/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
import { createMockUtils } from '@logto/shared/esm';
import { createMockPool } from '@silverhand/slonik';
import Sinon from 'sinon';
import { createMockPool } from 'slonik';
import { vi, expect, afterAll, describe, it } from 'vitest';

import { chooseAlterationsByVersion } from './version.js';

const { jest } = import.meta;
const { mockEsmWithActual } = createMockUtils(jest);

const pool = createMockPool({
query: jest.fn(),
query: vi.fn(),
});

const files = Object.freeze([
Expand All @@ -17,16 +14,19 @@ const files = Object.freeze([
{ filename: '1.0.0-1663923772-c.js', path: '/alterations-js/1.0.0-1663923772-c.js' },
]);

await mockEsmWithActual('./utils.js', () => ({
vi.mock('./utils.js', async (importOriginal) => ({
// eslint-disable-next-line @typescript-eslint/ban-types
...(await importOriginal<object>()),
getAlterationFiles: async () => files,
}));

const { getCurrentDatabaseAlterationTimestamp } = await mockEsmWithActual(
'../../../queries/system.js',
() => ({
getCurrentDatabaseAlterationTimestamp: jest.fn(),
})
);
const getCurrentDatabaseAlterationTimestamp = vi.fn();

vi.doMock('../../../queries/system.js', async (importOriginal) => ({
// eslint-disable-next-line @typescript-eslint/ban-types
...(await importOriginal<object>()),
getCurrentDatabaseAlterationTimestamp,
}));

const { getAvailableAlterations } = await import('./index.js');

Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/database/alteration/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { AlterationScript } from '@logto/schemas/lib/types/alteration.js';
import { conditionalString } from '@silverhand/essentials';
import type { DatabasePool } from '@silverhand/slonik';
import chalk from 'chalk';
import type { DatabasePool } from 'slonik';
import type { CommandModule } from 'yargs';

import { createPoolFromConfig } from '../../../database.js';
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/database/ogcio/applications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/* eslint-disable @silverhand/fp/no-mutation */
import { ApplicationType } from '@logto/schemas';
import { generateStandardSecret } from '@logto/shared';
import { sql, type DatabaseTransactionConnection } from 'slonik';
import { sql, type DatabaseTransactionConnection } from '@silverhand/slonik';

import { type OgcioParams } from './index.js';
import { createItem } from './queries.js';
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/database/ogcio/ogcio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/* eslint-disable @silverhand/fp/no-let */

import { defaultTenantId } from '@logto/schemas';
import type { CommonQueryMethods, DatabaseTransactionConnection } from 'slonik';
import type { CommonQueryMethods, DatabaseTransactionConnection } from '@silverhand/slonik';

import { seedApplications } from './applications.js';
import { type OgcioParams } from './index.js';
Expand Down
Loading

0 comments on commit 6979496

Please sign in to comment.