@crowdin/app-project-module 3.0.0 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out/app-test/integration/index.js +3 -3
- package/out/app-test/integration/mocks/mock-axios.js +5 -4
- package/out/app-test/integration/mocks/mock-crowdin-api-client.js +6 -6
- package/out/app-test/integration/update-crowdin.js +5 -5
- package/out/app-test/integration/update-integration.js +5 -5
- package/out/modules/integration/handlers/user-error-detail.d.ts +2 -0
- package/out/modules/integration/handlers/user-error-detail.js +48 -0
- package/out/modules/integration/handlers/user-errors.d.ts +6 -0
- package/out/modules/integration/handlers/user-errors.js +39 -17
- package/out/modules/integration/index.js +8 -0
- package/out/static/ui/error.bundle.js +286 -91
- package/out/static/ui/error.bundle.js.map +1 -1
- package/out/static/ui/form.bundle.js +398 -289
- package/out/static/ui/form.bundle.js.map +1 -1
- package/out/static/ui/login.bundle.js +351 -121
- package/out/static/ui/login.bundle.js.map +1 -1
- package/out/static/ui/main.bundle.js +832 -386
- package/out/static/ui/main.bundle.js.map +1 -1
- package/out/static/ui/subscription.bundle.js +277 -88
- package/out/static/ui/subscription.bundle.js.map +1 -1
- package/out/storage/drizzle/d1/index.js +2 -1
- package/out/storage/drizzle/d1/migrations/user-errors-indexes.d.ts +7 -0
- package/out/storage/drizzle/d1/migrations/user-errors-indexes.js +27 -0
- package/out/storage/drizzle/index.d.ts +8 -1
- package/out/storage/drizzle/index.js +75 -4
- package/out/storage/drizzle/postgresql/config.d.ts +3 -2
- package/out/storage/drizzle/postgresql/config.js +2 -1
- package/out/storage/drizzle/postgresql/migrations/0003_user_errors_pagination_index.sql +5 -0
- package/out/storage/drizzle/postgresql/migrations/meta/0003_snapshot.json +646 -0
- package/out/storage/drizzle/postgresql/migrations/meta/_journal.json +7 -0
- package/out/storage/drizzle/sqlite/config.d.ts +3 -2
- package/out/storage/drizzle/sqlite/config.js +2 -1
- package/out/storage/drizzle/sqlite/migrations/0002_user_errors_indexes.sql +4 -0
- package/out/storage/drizzle/sqlite/migrations/meta/0002_snapshot.json +687 -0
- package/out/storage/drizzle/sqlite/migrations/meta/_journal.json +7 -0
- package/out/storage/types.d.ts +30 -0
- package/package.json +12 -11
package/out/storage/types.d.ts
CHANGED
|
@@ -13,6 +13,27 @@ export interface UserErrors {
|
|
|
13
13
|
crowdinId: string;
|
|
14
14
|
integrationId?: string;
|
|
15
15
|
}
|
|
16
|
+
export interface UserErrorListItem {
|
|
17
|
+
id: number;
|
|
18
|
+
action: string;
|
|
19
|
+
message: string;
|
|
20
|
+
createdAt: string;
|
|
21
|
+
}
|
|
22
|
+
export interface UserErrorsFilter {
|
|
23
|
+
crowdinId: string;
|
|
24
|
+
integrationId?: string;
|
|
25
|
+
search?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface GetUserErrorsParams extends UserErrorsFilter {
|
|
28
|
+
limit: number;
|
|
29
|
+
offset: number;
|
|
30
|
+
orderDirection?: 'asc' | 'desc';
|
|
31
|
+
}
|
|
32
|
+
export interface GetUserErrorParams {
|
|
33
|
+
id: number;
|
|
34
|
+
crowdinId: string;
|
|
35
|
+
integrationId?: string;
|
|
36
|
+
}
|
|
16
37
|
export type DB_TYPE = 'sqlite' | 'postgresql' | 'd1';
|
|
17
38
|
export type DRIZZLE_DB = SQLITE_DB | POSTGRESQL_DB | D1_DB;
|
|
18
39
|
export interface Storage {
|
|
@@ -48,7 +69,16 @@ export interface Storage {
|
|
|
48
69
|
getWebhooks(fileId: string, integrationId: string, crowdinId: string, provider: Provider): Promise<IntegrationWebhooks | undefined>;
|
|
49
70
|
saveWebhooks(fileId: string, integrationId: string, crowdinId: string, provider: Provider): Promise<void>;
|
|
50
71
|
deleteWebhooks(fileIds: string[], integrationId: string, crowdinId: string, provider: Provider): Promise<void>;
|
|
72
|
+
/**
|
|
73
|
+
* @deprecated loads every error log together with its full `data` payload, which can
|
|
74
|
+
* exhaust memory on large tables. Use {@link Storage.getUserErrors} together with
|
|
75
|
+
* {@link Storage.countUserErrors} for the list and {@link Storage.getUserError} for a
|
|
76
|
+
* single record.
|
|
77
|
+
*/
|
|
51
78
|
getAllUserErrors(crowdinId: string, integrationId?: string): Promise<UserErrors[] | undefined>;
|
|
79
|
+
getUserErrors(params: GetUserErrorsParams): Promise<UserErrorListItem[]>;
|
|
80
|
+
countUserErrors(params: UserErrorsFilter): Promise<number>;
|
|
81
|
+
getUserError(params: GetUserErrorParams): Promise<UserErrors | undefined>;
|
|
52
82
|
saveUserError(action: string, message: string, data: string, createdAt: string, crowdinId: string, integrationId?: string): Promise<void>;
|
|
53
83
|
deleteUserErrors(date: string, crowdinId: string, integrationId?: string): Promise<void>;
|
|
54
84
|
deleteAllUsersErrorsOlderThan(date: string): Promise<void>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crowdin/app-project-module",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "Module that generates for you all common endpoints for serving standalone Crowdin App",
|
|
5
5
|
"main": "out/index.js",
|
|
6
6
|
"types": "out/index.d.ts",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
39
|
"scripts": {
|
|
40
|
-
"sandbox": "vite --config sandbox/vite.config.
|
|
40
|
+
"sandbox": "vite --config sandbox/vite.config.mts",
|
|
41
41
|
"build": "pnpm run build-css && pnpm run build-main && pnpm run build-ui",
|
|
42
42
|
"build-css": "tailwindcss -i ./ui/styles/tailwind.css -o ./static/css/styles.css --minify",
|
|
43
43
|
"build-main": "tsc -p ./ && cp -R static out && cp logo.png out && pnpm run copy-migrations",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"axios": "^1.20.0",
|
|
67
67
|
"better-sqlite3": "^13.0.3",
|
|
68
68
|
"cors": "^2.8.6",
|
|
69
|
-
"drizzle-orm": "
|
|
69
|
+
"drizzle-orm": "0.45.2",
|
|
70
70
|
"express": "^5.2.1",
|
|
71
71
|
"express-rate-limit": "^8.7.0",
|
|
72
72
|
"jsonwebtoken": "^9.0.3",
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"@aws-sdk/client-s3": "^3.1128.0",
|
|
98
98
|
"@aws-sdk/s3-request-presigner": "^3.1128.0",
|
|
99
99
|
"@base-ui/react": "^1.8.0",
|
|
100
|
-
"@cloudflare/workers-types": "^
|
|
100
|
+
"@cloudflare/workers-types": "^5.20260910.1",
|
|
101
101
|
"@eslint/eslintrc": "^3.3.7",
|
|
102
102
|
"@eslint/js": "^10.0.1",
|
|
103
103
|
"@headless-tree/core": "1.7.0",
|
|
@@ -115,16 +115,16 @@
|
|
|
115
115
|
"@rollup/plugin-replace": "^6.0.3",
|
|
116
116
|
"@rollup/plugin-typescript": "12.3.0",
|
|
117
117
|
"@tailwindcss/cli": "^4.3.3",
|
|
118
|
-
"@testing-library/jest-dom": "
|
|
118
|
+
"@testing-library/jest-dom": "^7.0.1",
|
|
119
119
|
"@testing-library/react": "16.3.3",
|
|
120
120
|
"@testing-library/user-event": "14.6.7",
|
|
121
|
-
"@types/better-sqlite3": "^
|
|
121
|
+
"@types/better-sqlite3": "^9.6.0",
|
|
122
122
|
"@types/cors": "^2.8.19",
|
|
123
123
|
"@types/express": "^5.0.6",
|
|
124
124
|
"@types/express-serve-static-core": "^5.1.3",
|
|
125
125
|
"@types/jest": "^30.0.0",
|
|
126
126
|
"@types/jsonwebtoken": "^9.0.10",
|
|
127
|
-
"@types/node": "^
|
|
127
|
+
"@types/node": "^22",
|
|
128
128
|
"@types/pg": "^8.23.1",
|
|
129
129
|
"@types/react": "^19.2.18",
|
|
130
130
|
"@types/react-dom": "^19.2.7",
|
|
@@ -132,7 +132,7 @@
|
|
|
132
132
|
"@types/swagger-jsdoc": "^6.0.4",
|
|
133
133
|
"@typescript-eslint/eslint-plugin": "^8.70.0",
|
|
134
134
|
"@typescript-eslint/parser": "^8.70.0",
|
|
135
|
-
"@vitejs/plugin-react": "^
|
|
135
|
+
"@vitejs/plugin-react": "^6.1.1",
|
|
136
136
|
"auto-changelog": "^2.6.1",
|
|
137
137
|
"class-variance-authority": "^0.7.1",
|
|
138
138
|
"clsx": "^2.1.1",
|
|
@@ -142,9 +142,10 @@
|
|
|
142
142
|
"eslint-plugin-prettier": "^5.5.6",
|
|
143
143
|
"jest": "^30.5.1",
|
|
144
144
|
"jest-environment-jsdom": "^30.5.1",
|
|
145
|
-
"jest-junit": "^
|
|
146
|
-
"lucide-react": "^
|
|
145
|
+
"jest-junit": "^17.0.0",
|
|
146
|
+
"lucide-react": "^1.44.0",
|
|
147
147
|
"next-themes": "^0.4.6",
|
|
148
|
+
"oxc-transform-react": "^0.145.0",
|
|
148
149
|
"prettier": "^3.9.6",
|
|
149
150
|
"radix-ui": "^1.6.7",
|
|
150
151
|
"rollup": "^4.63.1",
|
|
@@ -155,7 +156,7 @@
|
|
|
155
156
|
"ts-jest": "^29.4.12",
|
|
156
157
|
"tw-animate-css": "^1.4.0",
|
|
157
158
|
"typescript": "^5.9.3",
|
|
158
|
-
"vite": "^
|
|
159
|
+
"vite": "^8.3.0"
|
|
159
160
|
},
|
|
160
161
|
"repository": {
|
|
161
162
|
"type": "git",
|