@logto/cloud 0.2.5-1116646 → 0.2.5-1738dbe

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,63 +1,69 @@
1
1
  {
2
2
  "name": "@logto/cloud",
3
- "version": "0.2.5-1116646",
3
+ "version": "0.2.5-1738dbe",
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",
27
- "dts-bundle-generator": "^8.0.1",
28
- "eslint": "^8.21.0",
29
- "jest": "^29.5.0",
30
- "lint-staged": "^13.0.0",
31
- "nodemon": "^2.0.19",
32
- "prettier": "^2.8.1",
33
- "typescript": "^5.0.0"
24
+ "@types/node": "^22.14.0",
25
+ "@types/yargs": "^17.0.24",
26
+ "dts-bundle-generator": "^9.3.1",
27
+ "eslint": "^8.57.0",
28
+ "lint-staged": "^15.0.0",
29
+ "nodemon": "^3.0.0",
30
+ "prettier": "^3.0.0",
31
+ "typescript": "^5.3.3",
32
+ "vite-tsconfig-paths": "^5.0.0",
33
+ "vitest": "^3.1.1"
34
34
  },
35
35
  "engines": {
36
- "node": "^18.12.0"
36
+ "node": "^22.14.0"
37
37
  },
38
38
  "eslintConfig": {
39
- "extends": "@silverhand"
39
+ "extends": "@silverhand",
40
+ "rules": {
41
+ "no-console": "error"
42
+ },
43
+ "ignorePatterns": [
44
+ "types.test.ts"
45
+ ]
40
46
  },
41
47
  "prettier": "@silverhand/eslint-config/.prettierrc",
42
48
  "publishConfig": {
43
49
  "access": "public"
44
50
  },
45
51
  "dependencies": {
46
- "@withtyped/server": "^0.12.0"
52
+ "@silverhand/essentials": "^2.9.2",
53
+ "@withtyped/server": "^0.14.0"
47
54
  },
48
55
  "scripts": {
49
56
  "precommit": "lint-staged",
50
- "build": "rm -rf build/ && tsc -p tsconfig.build.json",
57
+ "build": "rm -rf build/ && tsc -p tsconfig.build.json && pnpm build:lib",
51
58
  "//": "It is not used to build the service itself.",
52
- "build:lib": "rm -rf build/ && dts-bundle-generator src/routes/index.ts --project tsconfig.build.json -o build/routes/index.d.ts",
53
- "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",
54
60
  "lint": "eslint --ext .ts src",
55
61
  "lint:report": "pnpm lint --format json --output-file report.json",
56
62
  "dev": "rm -rf build/ && nodemon",
57
63
  "start": "NODE_ENV=production node .",
58
- "test:only": "NODE_OPTIONS=\"--experimental-vm-modules --max_old_space_size=4096\" jest --logHeapUsage",
59
- "test": "pnpm build:test && pnpm test:only",
60
- "test:ci": "pnpm test:only --coverage --silent",
61
- "test:types": "tsc -p tsconfig.test.types.json"
64
+ "test": "vitest && pnpm build:lib && pnpm test:types",
65
+ "test:types": "tsc -p tsconfig.test.types.json",
66
+ "test:only": "vitest",
67
+ "cli": "node ./build/cli/index.js"
62
68
  }
63
69
  }
@@ -1,171 +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 const Tenants: import("@withtyped/server/model").default<"tenants", {
18
- id: string;
19
- dbUser: string | null;
20
- dbUserPassword: string | null;
21
- name: string;
22
- tag: TenantTag;
23
- createdAt: Date;
24
- }, "name" | "createdAt" | "tag", "createdAt">;
25
- export type TenantModel = InferModelType<typeof Tenants>;
26
- export type TenantInfo = Pick<TenantModel, "id" | "name" | "tag"> & {
27
- indicator: string;
28
- };
29
- declare enum VerificationCodeType {
30
- SignIn = "SignIn",
31
- Register = "Register",
32
- ForgotPassword = "ForgotPassword",
33
- /** @deprecated */
34
- Continue = "Continue",
35
- Generic = "Generic",
36
- /** @deprecated Use `Generic` type template for sending test sms/email use case */
37
- Test = "Test"
38
- }
39
- declare enum ProductType {
40
- FlatRate = "FlatRate",
41
- Tier1 = "tier1",
42
- Tier2 = "tier2",
43
- Tier3 = "tier3"
44
- }
45
- declare const _default: import("@withtyped/server").Router<WithAuthContext, import("@withtyped/server").MergeRoutes<import("@withtyped/server").MergeRoutes<import("@withtyped/server").MergeRoutes<import("@withtyped/server").BaseRoutes, import("@withtyped/server").RoutesWithPrefix<{
46
- options: {};
47
- patch: {
48
- "/tenants/:tenantId": import("@withtyped/server").PathGuard<"/:tenantId", unknown, {
49
- name?: string | undefined;
50
- tag?: TenantTag | undefined;
51
- }, TenantInfo>;
52
- };
53
- get: {
54
- "/tenants": import("@withtyped/server").PathGuard<"/", unknown, unknown, TenantInfo[]>;
55
- };
56
- post: {
57
- "/tenants": import("@withtyped/server").PathGuard<"/", unknown, {
58
- name?: string | undefined;
59
- tag?: TenantTag | undefined;
60
- }, TenantInfo>;
61
- };
62
- put: {};
63
- head: {};
64
- delete: {
65
- "/tenants/:tenantId": import("@withtyped/server").PathGuard<"/:tenantId", unknown, unknown, unknown>;
66
- };
67
- copy: {};
68
- }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
69
- options: {};
70
- patch: {};
71
- get: {
72
- "/services/mails/usage": import("@withtyped/server").PathGuard<"/mails/usage", {
73
- from?: string | undefined;
74
- }, unknown, unknown>;
75
- };
76
- post: {
77
- "/services/send-email": import("@withtyped/server").PathGuard<"/send-email", unknown, {
78
- data: {
79
- type: VerificationCodeType;
80
- to: string;
81
- payload: {
82
- fromName?: string | undefined;
83
- companyAddress?: string | undefined;
84
- appLogo?: string | undefined;
85
- code: string;
86
- };
87
- };
88
- }, unknown>;
89
- } & {
90
- "/services/mails": import("@withtyped/server").PathGuard<"/mails", unknown, {
91
- data: {
92
- type: VerificationCodeType;
93
- to: string;
94
- payload: {
95
- fromName?: string | undefined;
96
- companyAddress?: string | undefined;
97
- appLogo?: string | undefined;
98
- code: string;
99
- };
100
- };
101
- }, unknown>;
102
- } & {
103
- "/services/send-sms": import("@withtyped/server").PathGuard<"/send-sms", unknown, {
104
- data: {
105
- type: VerificationCodeType;
106
- to: string;
107
- payload: {
108
- fromName?: string | undefined;
109
- companyAddress?: string | undefined;
110
- appLogo?: string | undefined;
111
- code: string;
112
- };
113
- };
114
- }, unknown>;
115
- };
116
- put: {};
117
- head: {};
118
- delete: {};
119
- copy: {};
120
- }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
121
- options: {};
122
- patch: {};
123
- get: {
124
- "/subscription-plans": import("@withtyped/server").PathGuard<"/", unknown, unknown, {
125
- id: string;
126
- name: string;
127
- products: {
128
- description?: string | undefined;
129
- id: string;
130
- name: string;
131
- type: ProductType;
132
- price: {
133
- quantity?: 1 | undefined;
134
- unitAmount?: number | null | undefined;
135
- id: string;
136
- unitAmountDecimal: string;
137
- };
138
- }[];
139
- quota: {
140
- tenantLimit: number | null;
141
- mauLimit: number | null;
142
- applicationsLimit: number;
143
- machineToMachineLimit: number;
144
- resourcesLimit: number;
145
- scopesPerResourceLimit: number;
146
- customDomainEnabled: boolean;
147
- omniSignInEnabled: boolean;
148
- builtInEmailConnectorEnabled: boolean;
149
- socialConnectorsLimit: number | null;
150
- standardConnectorsLimit: number;
151
- rolesLimit: number;
152
- scopesPerRoleLimit: number | null;
153
- hooksLimit: number;
154
- auditLogsRetentionDays: number;
155
- };
156
- createdAt: Date;
157
- updatedAt: Date;
158
- }[]>;
159
- };
160
- post: {};
161
- put: {};
162
- head: {};
163
- delete: {};
164
- copy: {};
165
- }, "/api">>, "/api">;
166
-
167
- export {
168
- _default as default,
169
- };
170
-
171
- export {};