@logto/cloud 0.2.5-d9576f9 → 0.2.5-f1482ed

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.
Files changed (2) hide show
  1. package/lib/routes/index.d.ts +152 -101
  2. package/package.json +9 -14
@@ -37,6 +37,20 @@ declare enum OrganizationInvitationStatus {
37
37
  Expired = "Expired",
38
38
  Revoked = "Revoked"
39
39
  }
40
+ /** The scopes (permissions) defined by the organization template. */
41
+ export type OrganizationScope = {
42
+ tenantId: string;
43
+ /** The globally unique identifier of the organization scope. */
44
+ id: string;
45
+ /** The organization scope's name, unique within the organization template. */
46
+ name: string;
47
+ /** A brief description of the organization scope. */
48
+ description: string | null;
49
+ };
50
+ declare enum LogtoJwtTokenKeyType {
51
+ AccessToken = "access-token",
52
+ ClientCredentials = "client-credentials"
53
+ }
40
54
  /**
41
55
  * The simplified organization role entity that is returned in the `roles` field
42
56
  * of the organization.
@@ -52,8 +66,8 @@ declare enum TenantTag {
52
66
  declare enum TenantRole {
53
67
  /** Admin of the tenant, who has all permissions. */
54
68
  Admin = "admin",
55
- /** Member of the tenant, who has permissions to operate the tenant data, but not the tenant settings. */
56
- Member = "member"
69
+ /** Collaborator of the tenant, who has permissions to operate the tenant data, but not the tenant settings. */
70
+ Collaborator = "collaborator"
57
71
  }
58
72
  declare const AffiliateProperties: import("@withtyped/server/lib/model/index.js").default<"affiliate_properties", {
59
73
  createdAt: Date;
@@ -63,16 +77,17 @@ declare const AffiliateProperties: import("@withtyped/server/lib/model/index.js"
63
77
  }, "createdAt", "createdAt">;
64
78
  export type AffiliateProperty = InferModelType<typeof AffiliateProperties>;
65
79
  declare const Affiliates: import("@withtyped/server/lib/model/index.js").default<"affiliates", {
66
- id: string;
67
- createdAt: Date;
68
80
  name: string;
69
- }, "createdAt" | "id", "createdAt" | "id">;
81
+ createdAt: Date;
82
+ id: string;
83
+ }, "id" | "createdAt", "id" | "createdAt">;
70
84
  export type Affiliate = InferModelType<typeof Affiliates>;
71
85
  export type AffiliateData = Affiliate & {
72
86
  properties: Array<Pick<AffiliateProperty, "type" | "value">>;
73
87
  };
74
88
  declare const router: import("@withtyped/server").Router<RequestContext, WithAuthContext<Omit<import("@withtyped/server").BaseContext & {
75
89
  request: {
90
+ id?: string | undefined;
76
91
  method?: import("@withtyped/server").RequestMethod | undefined;
77
92
  headers: import("http").IncomingHttpHeaders;
78
93
  url: URL;
@@ -80,6 +95,7 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
80
95
  };
81
96
  }, "request"> & {
82
97
  request: Record<string, unknown> & {
98
+ id?: string | undefined;
83
99
  method?: import("@withtyped/server").RequestMethod | undefined;
84
100
  headers: import("http").IncomingHttpHeaders;
85
101
  url: URL;
@@ -88,8 +104,7 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
88
104
  body?: Json | undefined;
89
105
  bodyRaw?: Buffer | undefined;
90
106
  };
91
- }>, import("@withtyped/server").MergeRoutes<import("@withtyped/server").MergeRoutes<import("@withtyped/server").MergeRoutes<import("@withtyped/server").MergeRoutes<import("@withtyped/server").MergeRoutes<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<{
92
- options: {};
107
+ }>, import("@withtyped/server").MergeRoutes<import("@withtyped/server").MergeRoutes<import("@withtyped/server").MergeRoutes<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<{
93
108
  patch: {
94
109
  "/tenants/:tenantId": import("@withtyped/server").PathGuard<"/:tenantId", unknown, {
95
110
  name?: string | undefined;
@@ -110,11 +125,10 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
110
125
  currentPeriodStart: Date;
111
126
  currentPeriodEnd: Date;
112
127
  };
113
- tag: TenantTag;
114
128
  openInvoices: {
115
129
  status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
116
- createdAt: Date;
117
130
  id: string;
131
+ createdAt: Date;
118
132
  updatedAt: Date;
119
133
  customerId: string | null;
120
134
  billingReason: string | null;
@@ -126,8 +140,10 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
126
140
  hostedInvoiceUrl: string | null;
127
141
  invoicePdf: string | null;
128
142
  }[];
143
+ tag: TenantTag;
129
144
  }>;
130
145
  };
146
+ options: {};
131
147
  get: {
132
148
  "/tenants": import("@withtyped/server").PathGuard<"/", unknown, unknown, {
133
149
  id: string;
@@ -146,11 +162,10 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
146
162
  currentPeriodStart: Date;
147
163
  currentPeriodEnd: Date;
148
164
  };
149
- tag: TenantTag;
150
165
  openInvoices: {
151
166
  status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
152
- createdAt: Date;
153
167
  id: string;
168
+ createdAt: Date;
154
169
  updatedAt: Date;
155
170
  customerId: string | null;
156
171
  billingReason: string | null;
@@ -162,6 +177,7 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
162
177
  hostedInvoiceUrl: string | null;
163
178
  invoicePdf: string | null;
164
179
  }[];
180
+ tag: TenantTag;
165
181
  }[]>;
166
182
  };
167
183
  post: {
@@ -185,11 +201,10 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
185
201
  currentPeriodStart: Date;
186
202
  currentPeriodEnd: Date;
187
203
  };
188
- tag: TenantTag;
189
204
  openInvoices: {
190
205
  status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
191
- createdAt: Date;
192
206
  id: string;
207
+ createdAt: Date;
193
208
  updatedAt: Date;
194
209
  customerId: string | null;
195
210
  billingReason: string | null;
@@ -201,6 +216,7 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
201
216
  hostedInvoiceUrl: string | null;
202
217
  invoicePdf: string | null;
203
218
  }[];
219
+ tag: TenantTag;
204
220
  }>;
205
221
  };
206
222
  put: {};
@@ -210,8 +226,8 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
210
226
  copy: {};
211
227
  head: {};
212
228
  }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
213
- options: {};
214
229
  patch: {};
230
+ options: {};
215
231
  get: {
216
232
  "/tenants/my/subscription": import("@withtyped/server").PathGuard<"/my/subscription", unknown, unknown, {
217
233
  status: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid" | "paused";
@@ -230,8 +246,8 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
230
246
  "/tenants/:tenantId/invoices": import("@withtyped/server").PathGuard<"/:tenantId/invoices", unknown, unknown, {
231
247
  invoices: {
232
248
  status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
233
- createdAt: Date;
234
249
  id: string;
250
+ createdAt: Date;
235
251
  updatedAt: Date;
236
252
  customerId: string | null;
237
253
  billingReason: string | null;
@@ -270,8 +286,8 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
270
286
  copy: {};
271
287
  head: {};
272
288
  }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
273
- options: {};
274
289
  patch: {};
290
+ options: {};
275
291
  get: {
276
292
  "/services/mails/usage": import("@withtyped/server").PathGuard<"/mails/usage", {
277
293
  from?: string | undefined;
@@ -286,6 +302,7 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
286
302
  payload: {
287
303
  code?: string | undefined;
288
304
  link?: string | undefined;
305
+ } & Record<string, string> & {
289
306
  senderName?: string | undefined;
290
307
  companyInformation?: string | undefined;
291
308
  appLogo?: string | undefined;
@@ -301,22 +318,63 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
301
318
  payload: {
302
319
  code?: string | undefined;
303
320
  link?: string | undefined;
304
- };
321
+ } & Record<string, string>;
305
322
  };
306
323
  }, unknown>;
324
+ } & {
325
+ "/services/custom-jwt": import("@withtyped/server").PathGuard<"/custom-jwt", {
326
+ isTest?: string | undefined;
327
+ } | undefined, {
328
+ script: string;
329
+ tokenType: LogtoJwtTokenKeyType.AccessToken;
330
+ token: Record<string, Json>;
331
+ context: Record<string, Json>;
332
+ environmentVariables?: Record<string, string> | undefined;
333
+ } | {
334
+ script: string;
335
+ tokenType: LogtoJwtTokenKeyType.ClientCredentials;
336
+ token: Record<string, Json>;
337
+ environmentVariables?: Record<string, string> | undefined;
338
+ }, Record<string, unknown>>;
339
+ };
340
+ put: {
341
+ "/services/custom-jwt/worker": import("@withtyped/server").PathGuard<"/custom-jwt/worker", unknown, {
342
+ "jwt.accessToken"?: {
343
+ production?: string | undefined;
344
+ test?: string | undefined;
345
+ } | undefined;
346
+ "jwt.clientCredentials"?: {
347
+ production?: string | undefined;
348
+ test?: string | undefined;
349
+ } | undefined;
350
+ }, unknown>;
351
+ };
352
+ delete: {
353
+ "/services/custom-jwt/worker": import("@withtyped/server").PathGuard<"/custom-jwt/worker", unknown, unknown, unknown>;
307
354
  };
308
- put: {};
309
- delete: {};
310
355
  copy: {};
311
356
  head: {};
312
357
  }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
313
- options: {};
314
358
  patch: {};
359
+ options: {};
315
360
  get: {
316
361
  "/subscription-plans": import("@withtyped/server").PathGuard<"/", unknown, unknown, {
317
- createdAt: Date;
318
362
  id: string;
363
+ createdAt: Date;
319
364
  name: string;
365
+ updatedAt: Date;
366
+ stripeProducts: {
367
+ type: "flat" | "tier1" | "tier2" | "tier3";
368
+ id: string;
369
+ name: string;
370
+ price: {
371
+ id: string;
372
+ unitAmountDecimal: string;
373
+ quantity?: 1 | undefined;
374
+ unitAmount?: number | null | undefined;
375
+ };
376
+ description?: string | undefined;
377
+ }[];
320
378
  quota: {
321
379
  mauLimit: number | null;
322
380
  tokenLimit: number | null;
@@ -338,20 +396,9 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
338
396
  organizationsEnabled: boolean;
339
397
  ssoEnabled: boolean;
340
398
  thirdPartyApplicationsLimit: number | null;
399
+ tenantMembersLimit: number | null;
400
+ customJwtEnabled: boolean;
341
401
  };
342
- stripeProducts: {
343
- type: "flat" | "tier1" | "tier2" | "tier3";
344
- id: string;
345
- name: string;
346
- price: {
347
- id: string;
348
- unitAmountDecimal: string;
349
- quantity?: 1 | undefined;
350
- unitAmount?: number | null | undefined;
351
- };
352
- description?: string | undefined;
353
- }[];
354
- updatedAt: Date;
355
402
  }[]>;
356
403
  };
357
404
  post: {};
@@ -360,33 +407,16 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
360
407
  copy: {};
361
408
  head: {};
362
409
  }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
363
- options: {};
364
410
  patch: {};
365
- get: {
366
- "/my/tenant": import("@withtyped/server").PathGuard<"/tenant", unknown, unknown, {
367
- name: string;
368
- id: string;
369
- indicator: string;
370
- isSuspended: boolean;
371
- tag: TenantTag;
372
- }>;
373
- };
374
- post: {};
375
- put: {};
376
- delete: {};
377
- copy: {};
378
- head: {};
379
- }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
380
411
  options: {};
381
- patch: {};
382
412
  get: {
383
413
  "/checkout-session/:id": import("@withtyped/server").PathGuard<"/:id", unknown, unknown, {
384
- status: "open" | "complete" | "expired";
385
- createdAt: Date;
386
414
  id: string;
415
+ createdAt: Date;
387
416
  userId: string;
388
- updatedAt: Date;
417
+ status: "open" | "complete" | "expired";
389
418
  tenantId: string | null;
419
+ updatedAt: Date;
390
420
  planId: string;
391
421
  }>;
392
422
  };
@@ -408,8 +438,8 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
408
438
  copy: {};
409
439
  head: {};
410
440
  }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
411
- options: {};
412
441
  patch: {};
442
+ options: {};
413
443
  get: {
414
444
  "/affiliates": import("@withtyped/server").PathGuard<"/", unknown, unknown, AffiliateData[]>;
415
445
  };
@@ -417,33 +447,33 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
417
447
  "/affiliates": import("@withtyped/server").PathGuard<"/", unknown, {
418
448
  name: string;
419
449
  }, {
420
- createdAt: Date;
421
450
  id: string;
451
+ createdAt: Date;
422
452
  name: string;
423
453
  }>;
424
454
  } & {
425
455
  "/affiliates/:id/properties": import("@withtyped/server").PathGuard<"/:id/properties", unknown, {
426
- value: string;
427
456
  type: "hostname" | "query";
428
- }, {
429
457
  value: string;
430
- type: "hostname" | "query";
458
+ }, {
431
459
  createdAt: Date;
432
460
  affiliateId: string;
461
+ type: "hostname" | "query";
462
+ value: string;
433
463
  }>;
434
464
  };
435
465
  put: {};
436
466
  delete: {
437
467
  "/affiliates/:id/properties": import("@withtyped/server").PathGuard<"/:id/properties", unknown, {
438
- value: string;
439
468
  type: "hostname" | "query";
469
+ value: string;
440
470
  }, unknown>;
441
471
  };
442
472
  copy: {};
443
473
  head: {};
444
474
  }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
445
- options: {};
446
475
  patch: {};
476
+ options: {};
447
477
  get: {};
448
478
  post: {
449
479
  "/affiliate-logs": import("@withtyped/server").PathGuard<"/", unknown, {
@@ -452,8 +482,8 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
452
482
  hostname?: string | undefined;
453
483
  query?: string | undefined;
454
484
  }, {
455
- createdAt: Date;
456
485
  id: string;
486
+ createdAt: Date;
457
487
  affiliateId: string | null;
458
488
  userId: string;
459
489
  createdVia: {
@@ -468,28 +498,44 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
468
498
  copy: {};
469
499
  head: {};
470
500
  }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
471
- options: {};
472
- patch: {};
473
- get: {};
474
- post: {};
475
- put: {};
476
- delete: {
477
- "/logs/expired": import("@withtyped/server").PathGuard<"/expired", {
478
- dryRun?: string | undefined;
479
- }, unknown, {
480
- affectedRows: number;
481
- }>;
482
- };
483
- copy: {};
484
- head: {};
485
- }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
486
- options: {};
487
501
  patch: {
488
502
  "/invitations/:invitationId/status": import("@withtyped/server").PathGuard<"/:invitationId/status", unknown, {
489
503
  status: OrganizationInvitationStatus.Accepted;
490
504
  }, unknown>;
491
505
  };
492
- get: {};
506
+ options: {};
507
+ get: {
508
+ "/invitations": import("@withtyped/server").PathGuard<"/", unknown, unknown, ({
509
+ id: string;
510
+ createdAt: number;
511
+ status: OrganizationInvitationStatus;
512
+ tenantId: string;
513
+ updatedAt: number;
514
+ inviterId: string | null;
515
+ invitee: string;
516
+ acceptedUserId: string | null;
517
+ organizationId: string;
518
+ expiresAt: number;
519
+ organizationRoles: OrganizationRoleEntity[];
520
+ } & {
521
+ tenantTag: TenantTag;
522
+ tenantName: string;
523
+ })[]>;
524
+ } & {
525
+ "/invitations/:invitationId": import("@withtyped/server").PathGuard<"/:invitationId", unknown, unknown, {
526
+ id: string;
527
+ createdAt: number;
528
+ status: OrganizationInvitationStatus;
529
+ tenantId: string;
530
+ updatedAt: number;
531
+ inviterId: string | null;
532
+ invitee: string;
533
+ acceptedUserId: string | null;
534
+ organizationId: string;
535
+ expiresAt: number;
536
+ organizationRoles: OrganizationRoleEntity[];
537
+ }>;
538
+ };
493
539
  post: {};
494
540
  put: {};
495
541
  delete: {};
@@ -498,30 +544,31 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
498
544
  }, "/api">>, "/api">;
499
545
  export declare const tenantAuthRouter: import("@withtyped/server").Router<RequestContext, import("@withtyped/server").WithBodyContext<import("@withtyped/server").BaseContext & {
500
546
  request: {
547
+ id?: string | undefined;
501
548
  method?: import("@withtyped/server").RequestMethod | undefined;
502
549
  headers: import("http").IncomingHttpHeaders;
503
550
  url: URL;
504
551
  body?: unknown;
505
552
  };
506
553
  }>, import("@withtyped/server").MergeRoutes<import("@withtyped/server").BaseRoutes, import("@withtyped/server").RoutesWithPrefix<{
507
- options: {};
508
554
  patch: {
509
555
  "/:tenantId/invitations/:invitationId/status": import("@withtyped/server").PathGuard<"/:tenantId/invitations/:invitationId/status", unknown, {
510
556
  status: OrganizationInvitationStatus.Revoked;
511
557
  }, {
512
- status: OrganizationInvitationStatus;
513
- createdAt: number;
514
558
  id: string;
515
- updatedAt: number;
559
+ createdAt: number;
560
+ status: OrganizationInvitationStatus;
516
561
  tenantId: string;
517
- organizationId: string;
562
+ updatedAt: number;
518
563
  inviterId: string | null;
519
- expiresAt: number;
520
- organizationRoles: OrganizationRoleEntity[];
521
564
  invitee: string;
522
565
  acceptedUserId: string | null;
566
+ organizationId: string;
567
+ expiresAt: number;
568
+ organizationRoles: OrganizationRoleEntity[];
523
569
  }>;
524
570
  };
571
+ options: {};
525
572
  get: {
526
573
  "/:tenantId/members": import("@withtyped/server").PathGuard<"/:tenantId/members", unknown, unknown, {
527
574
  id: string;
@@ -533,37 +580,41 @@ export declare const tenantAuthRouter: import("@withtyped/server").Router<Reques
533
580
  organizationRoles: OrganizationRoleEntity[];
534
581
  }[]>;
535
582
  } & {
536
- "/:tenantId/invitations": import("@withtyped/server").PathGuard<"/:tenantId/invitations", unknown, unknown, {
537
- status: OrganizationInvitationStatus;
538
- createdAt: number;
583
+ "/:tenantId/members/:userId/scopes": import("@withtyped/server").PathGuard<"/:tenantId/members/:userId/scopes", unknown, unknown, OrganizationScope[]>;
584
+ } & {
585
+ "/:tenantId/invitations": import("@withtyped/server").PathGuard<"/:tenantId/invitations", unknown, unknown, ({
539
586
  id: string;
540
- updatedAt: number;
587
+ createdAt: number;
588
+ status: OrganizationInvitationStatus;
541
589
  tenantId: string;
542
- organizationId: string;
590
+ updatedAt: number;
543
591
  inviterId: string | null;
544
- expiresAt: number;
545
- organizationRoles: OrganizationRoleEntity[];
546
592
  invitee: string;
547
593
  acceptedUserId: string | null;
548
- }[]>;
594
+ organizationId: string;
595
+ expiresAt: number;
596
+ organizationRoles: OrganizationRoleEntity[];
597
+ } & {
598
+ inviterName?: string | undefined;
599
+ })[]>;
549
600
  };
550
601
  post: {
551
602
  "/:tenantId/invitations": import("@withtyped/server").PathGuard<"/:tenantId/invitations", unknown, {
552
- roleName: TenantRole;
553
603
  invitee: string;
604
+ roleName: TenantRole;
554
605
  expiresAt?: number | undefined;
555
606
  }, {
556
- status: OrganizationInvitationStatus;
557
- createdAt: number;
558
607
  id: string;
559
- updatedAt: number;
608
+ createdAt: number;
609
+ status: OrganizationInvitationStatus;
560
610
  tenantId: string;
561
- organizationId: string;
611
+ updatedAt: number;
562
612
  inviterId: string | null;
563
- expiresAt: number;
564
- organizationRoles: OrganizationRoleEntity[];
565
613
  invitee: string;
566
614
  acceptedUserId: string | null;
615
+ organizationId: string;
616
+ expiresAt: number;
617
+ organizationRoles: OrganizationRoleEntity[];
567
618
  }>;
568
619
  } & {
569
620
  "/:tenantId/invitations/:invitationId/message": import("@withtyped/server").PathGuard<"/:tenantId/invitations/:invitationId/message", unknown, unknown, unknown>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logto/cloud",
3
- "version": "0.2.5-d9576f9",
3
+ "version": "0.2.5-f1482ed",
4
4
  "description": "Logto Cloud service.",
5
5
  "main": "build/index.js",
6
6
  "author": "Silverhand Inc. <contact@silverhand.io>",
@@ -16,23 +16,21 @@
16
16
  "#src/*": "./build/*"
17
17
  },
18
18
  "devDependencies": {
19
- "@silverhand/eslint-config": "5.0.0",
20
- "@silverhand/jest-config": "5.0.0",
21
- "@silverhand/ts-config": "5.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
24
  "@types/node": "^20.0.0",
27
25
  "@types/yargs": "^17.0.24",
28
26
  "dts-bundle-generator": "^9.3.1",
29
- "eslint": "^8.44.0",
30
- "jest": "^29.5.0",
27
+ "eslint": "^8.57.0",
31
28
  "lint-staged": "^15.0.0",
32
29
  "nodemon": "^3.0.0",
33
- "p-map": "^7.0.1",
34
30
  "prettier": "^3.0.0",
35
- "typescript": "^5.3.3"
31
+ "typescript": "^5.3.3",
32
+ "vite-tsconfig-paths": "^4.3.1",
33
+ "vitest": "^1.5.0"
36
34
  },
37
35
  "engines": {
38
36
  "node": "^20.9.0"
@@ -52,21 +50,18 @@
52
50
  },
53
51
  "dependencies": {
54
52
  "@silverhand/essentials": "^2.9.0",
55
- "@withtyped/server": "^0.13.3"
53
+ "@withtyped/server": "^0.13.6"
56
54
  },
57
55
  "scripts": {
58
56
  "precommit": "lint-staged",
59
57
  "build": "rm -rf build/ && tsc -p tsconfig.build.json && pnpm build:lib",
60
58
  "//": "It is not used to build the service itself.",
61
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
- "build:test": "rm -rf build/ && tsc -p tsconfig.test.json --sourcemap",
63
60
  "lint": "eslint --ext .ts src",
64
61
  "lint:report": "pnpm lint --format json --output-file report.json",
65
62
  "dev": "rm -rf build/ && nodemon",
66
63
  "start": "NODE_ENV=production node .",
67
- "test:only": "NODE_OPTIONS=\"--experimental-vm-modules --max_old_space_size=4096\" jest --logHeapUsage",
68
- "test": "pnpm build:test && pnpm test:only && pnpm build:lib && pnpm test:types",
69
- "test:ci": "pnpm test:only --coverage --silent",
64
+ "test": "vitest && pnpm build:lib && pnpm test:types",
70
65
  "test:types": "tsc -p tsconfig.test.types.json",
71
66
  "cli": "node ./build/cli/index.js"
72
67
  }