Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(experience): experience api migration #6407

Merged
merged 8 commits into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 12 additions & 0 deletions .changeset/fresh-shrimps-rhyme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
"@logto/experience": minor
---

migrate experience app using Experience API.

Migrate experience app API requests from legacy [Interaction API](https://openapi.logto.io/group/endpoint-interaction) to the new [Experience API](https://openapi.logto.io/group/endpoint-experience), except the following endpoints:

- `GET /api/interaction/consent`
- `POST /api/interaction/consent`

Those endpoints are used in the third-party application's consent page only. Remain unchanged.
gao-sun marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"prepack": "pnpm -r prepack",
"dev": "pnpm -r prepack && pnpm start:dev",
"dev:cloud": "IS_CLOUD=1 CONSOLE_PUBLIC_URL=/ pnpm dev",
"start:dev": "pnpm -r --parallel --filter=!@logto/integration-tests --filter \"!./packages/connectors/connector-*\" dev",
"start:dev": "pnpm -r --parallel --filter=!@logto/integration-tests --filter=!@logto/experience-legacy --filter \"!./packages/connectors/connector-*\" dev",
"start": "cd packages/core && NODE_ENV=production node .",
"cli": "logto",
"translate": "logto-translate",
Expand Down
1 change: 1 addition & 0 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"@logto/core-kit": "workspace:^2.5.0",
"@logto/demo-app": "workspace:*",
"@logto/experience": "workspace:*",
"@logto/experience-legacy": "workspace:*",
"@logto/language-kit": "workspace:^1.1.0",
"@logto/phrases": "workspace:^1.13.0",
"@logto/phrases-experience": "workspace:^1.7.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/middleware/koa-spa-proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ type Properties = {

export default function koaSpaProxy<StateT, ContextT extends IRouterParamContext, ResponseBodyT>({
mountedApps,
packagePath = 'experience',
packagePath = EnvSet.values.isDevFeaturesEnabled ? 'experience' : 'experience-legacy',
port = 5001,
prefix = '',
queries,
Expand Down
22 changes: 22 additions & 0 deletions packages/experience-legacy/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/** @type {import('eslint').Linter.Config} */
module.exports = {
extends: '@silverhand/react',
rules: {
'jsx-a11y/no-autofocus': 'off',
'unicorn/prefer-string-replace-all': 'off',
},
overrides: [
{
files: ['*.config.js', '*.config.ts', '*.d.ts'],
rules: {
'import/no-unused-modules': 'off',
},
},
{
files: ['*.d.ts'],
rules: {
'import/no-unassigned-import': 'off',
},
},
],
};
Loading
Loading