@logto/cloud 0.2.5-4f1d80b → 0.2.5-4f7a3b5

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/package.json CHANGED
@@ -1,43 +1,45 @@
1
1
  {
2
2
  "name": "@logto/cloud",
3
- "version": "0.2.5-4f1d80b",
3
+ "version": "0.2.5-4f7a3b5",
4
4
  "description": "Logto Cloud service.",
5
5
  "main": "build/index.js",
6
6
  "author": "Silverhand Inc. <contact@silverhand.io>",
7
7
  "license": "Elastic-2.0",
8
8
  "type": "module",
9
9
  "files": [
10
- "build"
10
+ "lib"
11
11
  ],
12
12
  "exports": {
13
- "./routes": "./build/routes/index.js"
13
+ "./routes": "./lib/routes/index.js"
14
14
  },
15
15
  "imports": {
16
16
  "#src/*": "./build/*"
17
17
  },
18
18
  "devDependencies": {
19
- "@silverhand/eslint-config": "3.0.1",
20
- "@silverhand/jest-config": "3.0.0",
21
- "@silverhand/ts-config": "3.0.0",
19
+ "@silverhand/eslint-config": "6.0.1",
20
+ "@silverhand/ts-config": "6.0.0",
22
21
  "@types/accepts": "^1.3.5",
23
22
  "@types/http-proxy": "^1.17.9",
24
- "@types/jest": "^29.4.0",
25
23
  "@types/mime-types": "^2.1.1",
26
- "@types/node": "^18.11.18",
24
+ "@types/node": "^22.14.0",
27
25
  "@types/yargs": "^17.0.24",
28
- "dts-bundle-generator": "^8.0.1",
29
- "eslint": "^8.21.0",
30
- "jest": "^29.5.0",
31
- "lint-staged": "^13.0.0",
26
+ "dts-bundle-generator": "^9.3.1",
27
+ "eslint": "^8.57.0",
28
+ "lint-staged": "^15.0.0",
32
29
  "nodemon": "^3.0.0",
33
- "prettier": "^2.8.1",
34
- "typescript": "^5.0.0"
30
+ "prettier": "^3.0.0",
31
+ "typescript": "^5.3.3",
32
+ "vite-tsconfig-paths": "^5.0.0",
33
+ "vitest": "^3.1.1"
35
34
  },
36
35
  "engines": {
37
- "node": "^18.12.0"
36
+ "node": "^22.14.0"
38
37
  },
39
38
  "eslintConfig": {
40
39
  "extends": "@silverhand",
40
+ "rules": {
41
+ "no-console": "error"
42
+ },
41
43
  "ignorePatterns": [
42
44
  "types.test.ts"
43
45
  ]
@@ -47,22 +49,19 @@
47
49
  "access": "public"
48
50
  },
49
51
  "dependencies": {
50
- "@silverhand/essentials": "^2.7.0",
51
- "@withtyped/server": "^0.12.7"
52
+ "@silverhand/essentials": "^2.9.2",
53
+ "@withtyped/server": "^0.14.0"
52
54
  },
53
55
  "scripts": {
54
56
  "precommit": "lint-staged",
55
- "build": "rm -rf build/ && tsc -p tsconfig.build.json",
57
+ "build": "rm -rf build/ && tsc -p tsconfig.build.json && pnpm build:lib",
56
58
  "//": "It is not used to build the service itself.",
57
- "build:lib": "rm -rf build/ && dts-bundle-generator src/routes/index.ts --project tsconfig.build.json -o build/routes/index.d.ts",
58
- "build:test": "rm -rf build/ && tsc -p tsconfig.test.json --sourcemap",
59
+ "build:lib": "rm -rf lib/ && dts-bundle-generator src/routes/index.ts --project tsconfig.build.lib.json -o lib/routes/index.d.ts",
59
60
  "lint": "eslint --ext .ts src",
60
61
  "lint:report": "pnpm lint --format json --output-file report.json",
61
62
  "dev": "rm -rf build/ && nodemon",
62
63
  "start": "NODE_ENV=production node .",
63
- "test:only": "NODE_OPTIONS=\"--experimental-vm-modules --max_old_space_size=4096\" jest --logHeapUsage",
64
- "test": "pnpm build:test && pnpm test:only && pnpm build:lib && pnpm test:types",
65
- "test:ci": "pnpm test:only --coverage --silent",
64
+ "test": "vitest && pnpm build:lib && pnpm test:types",
66
65
  "test:types": "tsc -p tsconfig.test.types.json",
67
66
  "cli": "node ./build/cli/index.js"
68
67
  }
@@ -1,257 +0,0 @@
1
- // Generated by dts-bundle-generator v8.0.1
2
-
3
- import { RequestContext } from '@withtyped/server';
4
-
5
- export type WithAuthContext<Context = RequestContext> = Context & {
6
- auth: {
7
- id: string;
8
- scopes: string[];
9
- };
10
- };
11
- declare enum TenantTag {
12
- Development = "development",
13
- Staging = "staging",
14
- Production = "production"
15
- }
16
- declare enum VerificationCodeType {
17
- SignIn = "SignIn",
18
- Register = "Register",
19
- ForgotPassword = "ForgotPassword",
20
- /** @deprecated */
21
- Continue = "Continue",
22
- Generic = "Generic",
23
- /** @deprecated Use `Generic` type template for sending test sms/email use case */
24
- Test = "Test"
25
- }
26
- declare const router: import("@withtyped/server").Router<WithAuthContext, import("@withtyped/server").MergeRoutes<import("@withtyped/server").MergeRoutes<import("@withtyped/server").MergeRoutes<import("@withtyped/server").MergeRoutes<import("@withtyped/server").BaseRoutes, import("@withtyped/server").RoutesWithPrefix<{
27
- options: {};
28
- patch: {
29
- "/tenants/:tenantId": import("@withtyped/server").PathGuard<"/:tenantId", unknown, {
30
- name?: string | undefined;
31
- tag?: TenantTag | undefined;
32
- }, {
33
- name: string;
34
- id: string;
35
- indicator: string;
36
- tag: TenantTag;
37
- }>;
38
- };
39
- get: {
40
- "/tenants": import("@withtyped/server").PathGuard<"/", unknown, unknown, {
41
- id: string;
42
- name: string;
43
- indicator: string;
44
- tag: TenantTag;
45
- subscriptionPlan: {
46
- id: string;
47
- name: string;
48
- quota: {
49
- mauLimit: number | null;
50
- applicationsLimit: number;
51
- machineToMachineLimit: number;
52
- resourcesLimit: number;
53
- scopesPerResourceLimit: number;
54
- customDomainEnabled: boolean;
55
- omniSignInEnabled: boolean;
56
- builtInEmailConnectorEnabled: boolean;
57
- socialConnectorsLimit: number | null;
58
- standardConnectorsLimit: number;
59
- rolesLimit: number;
60
- scopesPerRoleLimit: number | null;
61
- hooksLimit: number;
62
- auditLogsRetentionDays: number;
63
- };
64
- stripeProducts: {
65
- description?: string | undefined;
66
- id: string;
67
- name: string;
68
- type: "flat" | "tier1" | "tier2" | "tier3";
69
- price: {
70
- quantity?: 1 | undefined;
71
- unitAmount?: number | null | undefined;
72
- id: string;
73
- unitAmountDecimal: string;
74
- };
75
- }[];
76
- createdAt: Date;
77
- updatedAt: Date;
78
- };
79
- }[]>;
80
- } & {
81
- "/tenants/my": import("@withtyped/server").PathGuard<"/my", unknown, unknown, {
82
- id: string;
83
- name: string;
84
- indicator: string;
85
- tag: TenantTag;
86
- subscriptionPlan: {
87
- id: string;
88
- name: string;
89
- quota: {
90
- mauLimit: number | null;
91
- applicationsLimit: number;
92
- machineToMachineLimit: number;
93
- resourcesLimit: number;
94
- scopesPerResourceLimit: number;
95
- customDomainEnabled: boolean;
96
- omniSignInEnabled: boolean;
97
- builtInEmailConnectorEnabled: boolean;
98
- socialConnectorsLimit: number | null;
99
- standardConnectorsLimit: number;
100
- rolesLimit: number;
101
- scopesPerRoleLimit: number | null;
102
- hooksLimit: number;
103
- auditLogsRetentionDays: number;
104
- };
105
- stripeProducts: {
106
- description?: string | undefined;
107
- id: string;
108
- name: string;
109
- type: "flat" | "tier1" | "tier2" | "tier3";
110
- price: {
111
- quantity?: 1 | undefined;
112
- unitAmount?: number | null | undefined;
113
- id: string;
114
- unitAmountDecimal: string;
115
- };
116
- }[];
117
- createdAt: Date;
118
- updatedAt: Date;
119
- };
120
- }>;
121
- };
122
- post: {
123
- "/tenants": import("@withtyped/server").PathGuard<"/", unknown, {
124
- name?: string | undefined;
125
- tag?: TenantTag | undefined;
126
- }, {
127
- name: string;
128
- id: string;
129
- indicator: string;
130
- tag: TenantTag;
131
- }>;
132
- };
133
- put: {};
134
- head: {};
135
- delete: {
136
- "/tenants/:tenantId": import("@withtyped/server").PathGuard<"/:tenantId", unknown, unknown, unknown>;
137
- };
138
- copy: {};
139
- }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
140
- options: {};
141
- patch: {};
142
- get: {
143
- "/services/mails/usage": import("@withtyped/server").PathGuard<"/mails/usage", {
144
- from?: string | undefined;
145
- }, unknown, unknown>;
146
- };
147
- post: {
148
- "/services/send-email": import("@withtyped/server").PathGuard<"/send-email", unknown, {
149
- data: {
150
- type: VerificationCodeType;
151
- to: string;
152
- payload: {
153
- senderName?: string | undefined;
154
- companyInformation?: string | undefined;
155
- appLogo?: string | undefined;
156
- code: string;
157
- };
158
- };
159
- }, unknown>;
160
- } & {
161
- "/services/mails": import("@withtyped/server").PathGuard<"/mails", unknown, {
162
- data: {
163
- type: VerificationCodeType;
164
- to: string;
165
- payload: {
166
- senderName?: string | undefined;
167
- companyInformation?: string | undefined;
168
- appLogo?: string | undefined;
169
- code: string;
170
- };
171
- };
172
- }, unknown>;
173
- } & {
174
- "/services/send-sms": import("@withtyped/server").PathGuard<"/send-sms", unknown, {
175
- data: {
176
- type: VerificationCodeType;
177
- to: string;
178
- payload: {
179
- senderName?: string | undefined;
180
- companyInformation?: string | undefined;
181
- appLogo?: string | undefined;
182
- code: string;
183
- };
184
- };
185
- }, unknown>;
186
- };
187
- put: {};
188
- head: {};
189
- delete: {};
190
- copy: {};
191
- }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
192
- options: {};
193
- patch: {};
194
- get: {
195
- "/subscription-plans": import("@withtyped/server").PathGuard<"/", unknown, unknown, {
196
- id: string;
197
- name: string;
198
- quota: {
199
- mauLimit: number | null;
200
- applicationsLimit: number;
201
- machineToMachineLimit: number;
202
- resourcesLimit: number;
203
- scopesPerResourceLimit: number;
204
- customDomainEnabled: boolean;
205
- omniSignInEnabled: boolean;
206
- builtInEmailConnectorEnabled: boolean;
207
- socialConnectorsLimit: number | null;
208
- standardConnectorsLimit: number;
209
- rolesLimit: number;
210
- scopesPerRoleLimit: number | null;
211
- hooksLimit: number;
212
- auditLogsRetentionDays: number;
213
- };
214
- stripeProducts: {
215
- description?: string | undefined;
216
- id: string;
217
- name: string;
218
- type: "flat" | "tier1" | "tier2" | "tier3";
219
- price: {
220
- quantity?: 1 | undefined;
221
- unitAmount?: number | null | undefined;
222
- id: string;
223
- unitAmountDecimal: string;
224
- };
225
- }[];
226
- createdAt: Date;
227
- updatedAt: Date;
228
- }[]>;
229
- };
230
- post: {};
231
- put: {};
232
- head: {};
233
- delete: {};
234
- copy: {};
235
- }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
236
- options: {};
237
- patch: {};
238
- get: {};
239
- post: {
240
- "/checkout-session": import("@withtyped/server").PathGuard<"/", unknown, {
241
- tenantId?: string | undefined;
242
- cancelCallbackUrl?: string | undefined;
243
- planId: string;
244
- successCallbackUrl: string;
245
- }, unknown>;
246
- };
247
- put: {};
248
- head: {};
249
- delete: {};
250
- copy: {};
251
- }, "/api">>, "/api">;
252
-
253
- export {
254
- router as default,
255
- };
256
-
257
- export {};