@logto/cloud 0.2.5-25a9c6d → 0.2.5-299028a

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