@meru2802/aux-server 1.0.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/README.md +168 -0
- package/dist/config/index.d.ts +37 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +76 -0
- package/dist/config/swagger.d.ts +2 -0
- package/dist/config/swagger.d.ts.map +1 -0
- package/dist/config/swagger.js +267 -0
- package/dist/controllers/BaseController.d.ts +16 -0
- package/dist/controllers/BaseController.d.ts.map +1 -0
- package/dist/controllers/BaseController.js +28 -0
- package/dist/controllers/apiController.d.ts +8 -0
- package/dist/controllers/apiController.d.ts.map +1 -0
- package/dist/controllers/apiController.js +60 -0
- package/dist/controllers/coreController.d.ts +11 -0
- package/dist/controllers/coreController.d.ts.map +1 -0
- package/dist/controllers/coreController.js +470 -0
- package/dist/controllers/healthController.d.ts +9 -0
- package/dist/controllers/healthController.d.ts.map +1 -0
- package/dist/controllers/healthController.js +35 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +97 -0
- package/dist/lib/utils/index.d.ts +10 -0
- package/dist/lib/utils/index.d.ts.map +1 -0
- package/dist/lib/utils/index.js +78 -0
- package/dist/lib/utils/index.test.d.ts +3 -0
- package/dist/lib/utils/index.test.d.ts.map +1 -0
- package/dist/lib/utils/index.test.js +197 -0
- package/dist/middleware/BaseMiddleware.d.ts +13 -0
- package/dist/middleware/BaseMiddleware.d.ts.map +1 -0
- package/dist/middleware/BaseMiddleware.js +22 -0
- package/dist/middleware/authMiddleware.d.ts +9 -0
- package/dist/middleware/authMiddleware.d.ts.map +1 -0
- package/dist/middleware/authMiddleware.js +287 -0
- package/dist/middleware/index.d.ts +11 -0
- package/dist/middleware/index.d.ts.map +1 -0
- package/dist/middleware/index.js +125 -0
- package/dist/routes/apiRoutes.d.ts +5 -0
- package/dist/routes/apiRoutes.d.ts.map +1 -0
- package/dist/routes/apiRoutes.js +46 -0
- package/dist/routes/coreRoutes.d.ts +5 -0
- package/dist/routes/coreRoutes.d.ts.map +1 -0
- package/dist/routes/coreRoutes.js +158 -0
- package/dist/routes/healthRoutes.d.ts +4 -0
- package/dist/routes/healthRoutes.d.ts.map +1 -0
- package/dist/routes/healthRoutes.js +63 -0
- package/dist/routes/index.d.ts +3 -0
- package/dist/routes/index.d.ts.map +1 -0
- package/dist/routes/index.js +31 -0
- package/dist/routes/swaggerRoutes.d.ts +3 -0
- package/dist/routes/swaggerRoutes.d.ts.map +1 -0
- package/dist/routes/swaggerRoutes.js +35 -0
- package/dist/services/ApplicationService.d.ts +26 -0
- package/dist/services/ApplicationService.d.ts.map +1 -0
- package/dist/services/ApplicationService.js +46 -0
- package/dist/services/DatabaseService.d.ts +17 -0
- package/dist/services/DatabaseService.d.ts.map +1 -0
- package/dist/services/DatabaseService.js +38 -0
- package/dist/services/HttpServerService.d.ts +29 -0
- package/dist/services/HttpServerService.d.ts.map +1 -0
- package/dist/services/HttpServerService.js +101 -0
- package/dist/services/ServiceContainer.d.ts +26 -0
- package/dist/services/ServiceContainer.d.ts.map +1 -0
- package/dist/services/ServiceContainer.js +39 -0
- package/dist/services/WebSocketService.d.ts +27 -0
- package/dist/services/WebSocketService.d.ts.map +1 -0
- package/dist/services/WebSocketService.js +180 -0
- package/dist/types/index.d.ts +218 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +19 -0
- package/dist/types/schemas/index.d.ts +31 -0
- package/dist/types/schemas/index.d.ts.map +1 -0
- package/dist/types/schemas/index.js +226 -0
- package/package.json +55 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import z from "zod";
|
|
2
|
+
import { AgentType } from "..";
|
|
3
|
+
export declare const generateDownloadLinkSchema: z.ZodObject<{
|
|
4
|
+
deviceGroupId: z.ZodOptional<z.ZodString>;
|
|
5
|
+
deviceGroupName: z.ZodOptional<z.ZodString>;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
export declare const createDeviceGroupSchema: z.ZodObject<{
|
|
8
|
+
deviceGroupName: z.ZodString;
|
|
9
|
+
description: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string, string | undefined>>;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
export declare const addUserToGroupSchema: z.ZodObject<{
|
|
12
|
+
deviceGroupName: z.ZodOptional<z.ZodString>;
|
|
13
|
+
deviceGroupId: z.ZodOptional<z.ZodString>;
|
|
14
|
+
users: z.ZodArray<z.ZodString>;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
export declare const generateConnectUrlsSchema: z.ZodObject<{
|
|
17
|
+
meshNodeId: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
18
|
+
userId: z.ZodString;
|
|
19
|
+
}, z.core.$strip>;
|
|
20
|
+
export declare const getEndpointInstallScriptSchema: z.ZodObject<{
|
|
21
|
+
clientId: z.ZodNumber;
|
|
22
|
+
siteId: z.ZodNumber;
|
|
23
|
+
agentType: z.ZodEnum<typeof AgentType>;
|
|
24
|
+
endpointUrl: z.ZodURL;
|
|
25
|
+
}, z.core.$strict>;
|
|
26
|
+
export type GenerateDownloadLinkRequest = z.infer<typeof generateDownloadLinkSchema>;
|
|
27
|
+
export type CreateDeviceGroupRequest = z.infer<typeof createDeviceGroupSchema>;
|
|
28
|
+
export type AddUserToGroupRequest = z.infer<typeof addUserToGroupSchema>;
|
|
29
|
+
export type GenerateConnectUrlsRequest = z.infer<typeof generateConnectUrlsSchema>;
|
|
30
|
+
export type GetEndpointInstallScriptRequest = z.infer<typeof getEndpointInstallScriptSchema>;
|
|
31
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/schemas/index.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AACpB,OAAO,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AAE/B,eAAO,MAAM,0BAA0B;;;iBAoEpC,CAAC;AAEJ,eAAO,MAAM,uBAAuB;;;iBA+BlC,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;iBAoH9B,CAAC;AAEJ,eAAO,MAAM,yBAAyB;;;iBA0DpC,CAAC;AAEH,eAAO,MAAM,8BAA8B;;;;;kBA4BhC,CAAC;AAEZ,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAC/C,OAAO,0BAA0B,CAClC,CAAC;AACF,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAC/E,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AACzE,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAC9C,OAAO,yBAAyB,CACjC,CAAC;AACF,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CACnD,OAAO,8BAA8B,CACtC,CAAC"}
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getEndpointInstallScriptSchema = exports.generateConnectUrlsSchema = exports.addUserToGroupSchema = exports.createDeviceGroupSchema = exports.generateDownloadLinkSchema = void 0;
|
|
7
|
+
const zod_1 = __importDefault(require("zod"));
|
|
8
|
+
const __1 = require("..");
|
|
9
|
+
exports.generateDownloadLinkSchema = zod_1.default
|
|
10
|
+
.object({
|
|
11
|
+
deviceGroupId: zod_1.default
|
|
12
|
+
.string()
|
|
13
|
+
.min(1, "Mesh identifier cannot be empty")
|
|
14
|
+
.refine((value) => value.startsWith("mesh//"), {
|
|
15
|
+
message: "Mesh identifier must start with 'mesh//'",
|
|
16
|
+
})
|
|
17
|
+
.refine((value) => {
|
|
18
|
+
// Extract the part after "mesh//"
|
|
19
|
+
const identifierPart = value.slice(6);
|
|
20
|
+
if (identifierPart.length === 0) {
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
const validPattern = /^[A-Za-z0-9+/=$-]+$/;
|
|
24
|
+
return validPattern.test(identifierPart);
|
|
25
|
+
}, {
|
|
26
|
+
message: "Invalid mesh identifier format. Must contain only alphanumeric characters and valid special characters after 'mesh//'",
|
|
27
|
+
})
|
|
28
|
+
.refine((value) => {
|
|
29
|
+
const identifierPart = value.slice(6);
|
|
30
|
+
return identifierPart.length >= 10; // Adjust minimum length as needed
|
|
31
|
+
}, {
|
|
32
|
+
message: "Mesh identifier too short. Must have at least 10 characters after 'mesh//'",
|
|
33
|
+
})
|
|
34
|
+
.optional(),
|
|
35
|
+
deviceGroupName: zod_1.default
|
|
36
|
+
.string()
|
|
37
|
+
.min(1, "Device group name cannot be empty")
|
|
38
|
+
.max(100, "Device group name cannot exceed 100 characters")
|
|
39
|
+
.refine((value) => {
|
|
40
|
+
// Allow alphanumeric characters, hyphens, underscores, and spaces
|
|
41
|
+
const validPattern = /^[A-Za-z0-9\s\-_]+$/;
|
|
42
|
+
return validPattern.test(value);
|
|
43
|
+
}, {
|
|
44
|
+
message: "Device group name can only contain alphanumeric characters, spaces, hyphens, and underscores",
|
|
45
|
+
})
|
|
46
|
+
.optional(),
|
|
47
|
+
})
|
|
48
|
+
.refine((data) => {
|
|
49
|
+
const hasId = data.deviceGroupId !== undefined && data.deviceGroupId !== "";
|
|
50
|
+
const hasName = data.deviceGroupName !== undefined && data.deviceGroupName !== "";
|
|
51
|
+
return hasId || hasName;
|
|
52
|
+
}, {
|
|
53
|
+
message: "At least one of deviceGroupId or deviceGroupName must be provided",
|
|
54
|
+
path: ["deviceGroupId", "deviceGroupName"],
|
|
55
|
+
});
|
|
56
|
+
exports.createDeviceGroupSchema = zod_1.default.object({
|
|
57
|
+
deviceGroupName: zod_1.default
|
|
58
|
+
.string()
|
|
59
|
+
.min(1, "Device Group name cannot be empty")
|
|
60
|
+
.max(100, "Device group name cannot exceed 100 characters")
|
|
61
|
+
.refine((value) => {
|
|
62
|
+
// Allow alphanumeric characters, hyphens, underscores, and spaces
|
|
63
|
+
const validPattern = /^[A-Za-z0-9\s\-_]+$/;
|
|
64
|
+
return validPattern.test(value);
|
|
65
|
+
}, {
|
|
66
|
+
message: "Device group name can only contain alphanumeric characters, spaces, hyphens, and underscores",
|
|
67
|
+
})
|
|
68
|
+
.refine((value) => {
|
|
69
|
+
// Ensure it doesn't start or end with whitespace
|
|
70
|
+
return value.trim() === value;
|
|
71
|
+
}, {
|
|
72
|
+
message: "Device group name cannot start or end with whitespace",
|
|
73
|
+
}),
|
|
74
|
+
description: zod_1.default
|
|
75
|
+
.string()
|
|
76
|
+
.max(500, "Description cannot exceed 500 characters")
|
|
77
|
+
.optional()
|
|
78
|
+
.transform((value) => value || ""), // Transform undefined to empty string
|
|
79
|
+
});
|
|
80
|
+
exports.addUserToGroupSchema = zod_1.default
|
|
81
|
+
.object({
|
|
82
|
+
deviceGroupName: zod_1.default
|
|
83
|
+
.string()
|
|
84
|
+
.min(1, "Device group name cannot be empty")
|
|
85
|
+
.max(100, "Device group name cannot exceed 100 characters")
|
|
86
|
+
.refine((value) => {
|
|
87
|
+
// Allow alphanumeric characters, hyphens, underscores, and spaces
|
|
88
|
+
const validPattern = /^[A-Za-z0-9\s\-_]+$/;
|
|
89
|
+
return validPattern.test(value);
|
|
90
|
+
}, {
|
|
91
|
+
message: "Device group name can only contain alphanumeric characters, spaces, hyphens, and underscores",
|
|
92
|
+
})
|
|
93
|
+
.optional(),
|
|
94
|
+
deviceGroupId: zod_1.default
|
|
95
|
+
.string()
|
|
96
|
+
.min(1, "Mesh identifier cannot be empty")
|
|
97
|
+
.refine((value) => value.startsWith("mesh//"), {
|
|
98
|
+
message: "Mesh identifier must start with 'mesh//'",
|
|
99
|
+
})
|
|
100
|
+
.refine((value) => {
|
|
101
|
+
// Extract the part after "mesh//"
|
|
102
|
+
const identifierPart = value.slice(6);
|
|
103
|
+
if (identifierPart.length === 0) {
|
|
104
|
+
return false;
|
|
105
|
+
}
|
|
106
|
+
const validPattern = /^[A-Za-z0-9+/=$-]+$/;
|
|
107
|
+
return validPattern.test(identifierPart);
|
|
108
|
+
}, {
|
|
109
|
+
message: "Invalid mesh identifier format. Must contain only alphanumeric characters and valid special characters after 'mesh//'",
|
|
110
|
+
})
|
|
111
|
+
.refine((value) => {
|
|
112
|
+
const identifierPart = value.slice(6);
|
|
113
|
+
return identifierPart.length >= 10; // Adjust minimum length as needed
|
|
114
|
+
}, {
|
|
115
|
+
message: "Mesh identifier too short. Must have at least 10 characters after 'mesh//'",
|
|
116
|
+
})
|
|
117
|
+
.optional(),
|
|
118
|
+
users: zod_1.default
|
|
119
|
+
.array(zod_1.default
|
|
120
|
+
.string()
|
|
121
|
+
.min(1, "Username cannot be empty")
|
|
122
|
+
.max(50, "Username cannot exceed 50 characters")
|
|
123
|
+
.refine((value) => {
|
|
124
|
+
// Allow alphanumeric characters, dots, hyphens, and underscores
|
|
125
|
+
const validPattern = /^[A-Za-z0-9.\-_]+$/;
|
|
126
|
+
return validPattern.test(value);
|
|
127
|
+
}, {
|
|
128
|
+
message: "Username can only contain alphanumeric characters, dots, hyphens, and underscores",
|
|
129
|
+
})
|
|
130
|
+
.refine((value) => {
|
|
131
|
+
// Ensure it doesn't start or end with dots
|
|
132
|
+
return !value.startsWith(".") && !value.endsWith(".");
|
|
133
|
+
}, {
|
|
134
|
+
message: "Username cannot start or end with a dot",
|
|
135
|
+
})
|
|
136
|
+
.refine((value) => {
|
|
137
|
+
// Ensure it doesn't contain consecutive dots
|
|
138
|
+
return !value.includes("..");
|
|
139
|
+
}, {
|
|
140
|
+
message: "Username cannot contain consecutive dots",
|
|
141
|
+
}))
|
|
142
|
+
.min(1, "At least one user must be provided")
|
|
143
|
+
.max(100, "Cannot add more than 100 users at once")
|
|
144
|
+
.refine((users) => {
|
|
145
|
+
// Ensure no duplicate usernames
|
|
146
|
+
const uniqueUsers = new Set(users);
|
|
147
|
+
return uniqueUsers.size === users.length;
|
|
148
|
+
}, {
|
|
149
|
+
message: "Duplicate usernames are not allowed",
|
|
150
|
+
}),
|
|
151
|
+
})
|
|
152
|
+
.refine((data) => {
|
|
153
|
+
const hasName = data.deviceGroupName !== undefined && data.deviceGroupName !== "";
|
|
154
|
+
const hasId = data.deviceGroupId !== undefined && data.deviceGroupId !== "";
|
|
155
|
+
return hasName && hasId;
|
|
156
|
+
}, {
|
|
157
|
+
message: "Both deviceGroupName and deviceGroupId must be provided",
|
|
158
|
+
path: ["deviceGroupName", "deviceGroupId"],
|
|
159
|
+
});
|
|
160
|
+
exports.generateConnectUrlsSchema = zod_1.default.object({
|
|
161
|
+
meshNodeId: zod_1.default
|
|
162
|
+
.string()
|
|
163
|
+
.min(1, "Hex identifier cannot be empty")
|
|
164
|
+
.refine((value) => {
|
|
165
|
+
const hexPattern = /^[0-9A-Fa-f]+$/;
|
|
166
|
+
return hexPattern.test(value);
|
|
167
|
+
}, {
|
|
168
|
+
message: "Invalid hex identifier format. Must contain only hexadecimal characters (0-9, A-F, a-f)",
|
|
169
|
+
})
|
|
170
|
+
.refine((value) => {
|
|
171
|
+
// Minimum length check (at least 8 characters / 4 bytes)
|
|
172
|
+
return value.length >= 8;
|
|
173
|
+
}, {
|
|
174
|
+
message: "Hex identifier too short. Must have at least 8 characters",
|
|
175
|
+
})
|
|
176
|
+
.transform((value) => value.toUpperCase()),
|
|
177
|
+
userId: zod_1.default
|
|
178
|
+
.string()
|
|
179
|
+
.min(1, "User ID cannot be empty")
|
|
180
|
+
.max(50, "User ID cannot exceed 50 characters")
|
|
181
|
+
.refine((value) => {
|
|
182
|
+
// Allow alphanumeric characters, dots, hyphens, and underscores
|
|
183
|
+
const validPattern = /^[A-Za-z0-9.\-_]+$/;
|
|
184
|
+
return validPattern.test(value);
|
|
185
|
+
}, {
|
|
186
|
+
message: "User ID can only contain alphanumeric characters, dots, hyphens, and underscores",
|
|
187
|
+
})
|
|
188
|
+
.refine((value) => {
|
|
189
|
+
// Ensure it doesn't start or end with dots
|
|
190
|
+
return !value.startsWith(".") && !value.endsWith(".");
|
|
191
|
+
}, {
|
|
192
|
+
message: "User ID cannot start or end with a dot",
|
|
193
|
+
})
|
|
194
|
+
.refine((value) => {
|
|
195
|
+
// Ensure it doesn't contain consecutive dots
|
|
196
|
+
return !value.includes("..");
|
|
197
|
+
}, {
|
|
198
|
+
message: "User ID cannot contain consecutive dots",
|
|
199
|
+
}),
|
|
200
|
+
});
|
|
201
|
+
exports.getEndpointInstallScriptSchema = zod_1.default
|
|
202
|
+
.object({
|
|
203
|
+
clientId: zod_1.default
|
|
204
|
+
.number()
|
|
205
|
+
.int()
|
|
206
|
+
.positive()
|
|
207
|
+
.max(Number.MAX_SAFE_INTEGER)
|
|
208
|
+
.describe("Unique client identifier"),
|
|
209
|
+
siteId: zod_1.default
|
|
210
|
+
.number()
|
|
211
|
+
.int()
|
|
212
|
+
.positive()
|
|
213
|
+
.max(Number.MAX_SAFE_INTEGER)
|
|
214
|
+
.describe("Unique site identifier"),
|
|
215
|
+
agentType: zod_1.default.enum(__1.AgentType).describe("Type of agent to install"),
|
|
216
|
+
endpointUrl: zod_1.default
|
|
217
|
+
.url()
|
|
218
|
+
.regex(/^https:\/\//, "Endpoint URL must use HTTPS")
|
|
219
|
+
.max(4096, "Endpoint URL too long")
|
|
220
|
+
.refine((url) => {
|
|
221
|
+
const executableExtensions = /\.(exe|msi|dmg|pkg|deb|rpm|AppImage)$/i;
|
|
222
|
+
return executableExtensions.test(url);
|
|
223
|
+
}, "Endpoint URL must point to an executable installer file")
|
|
224
|
+
.describe("Direct download URL for the endpoint installer"),
|
|
225
|
+
})
|
|
226
|
+
.strict();
|
package/package.json
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@meru2802/aux-server",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Nexus EPM auxillary server to facilitate additional functionality required by Scogo Iceberg",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"files": [
|
|
7
|
+
"dist"
|
|
8
|
+
],
|
|
9
|
+
"publishConfig": {
|
|
10
|
+
"access": "public"
|
|
11
|
+
},
|
|
12
|
+
"devDependencies": {
|
|
13
|
+
"@changesets/cli": "^2.29.4",
|
|
14
|
+
"@types/base-64": "^1.0.2",
|
|
15
|
+
"@types/cookie-parser": "^1.4.9",
|
|
16
|
+
"@types/cors": "^2.8.17",
|
|
17
|
+
"@types/express": "^4.17.21",
|
|
18
|
+
"@types/node": "^22.15.3",
|
|
19
|
+
"@types/pg": "^8.15.2",
|
|
20
|
+
"@types/qs": "^6.14.0",
|
|
21
|
+
"@types/swagger-jsdoc": "^6.0.4",
|
|
22
|
+
"@types/swagger-ui-express": "^4.1.6",
|
|
23
|
+
"@types/ws": "^8.5.12",
|
|
24
|
+
"eslint": "^9.26.0",
|
|
25
|
+
"typescript": "5.8.2",
|
|
26
|
+
"@repo/typescript-config": "0.0.0",
|
|
27
|
+
"@repo/eslint-config": "0.0.0"
|
|
28
|
+
},
|
|
29
|
+
"keywords": [],
|
|
30
|
+
"author": "meru2802",
|
|
31
|
+
"license": "ISC",
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@meru2802/rmm-lib": "^1.0.0",
|
|
34
|
+
"axios": "^1.9.0",
|
|
35
|
+
"base-64": "^1.0.0",
|
|
36
|
+
"cookie-parser": "^1.4.7",
|
|
37
|
+
"cors": "^2.8.5",
|
|
38
|
+
"express": "^4.19.2",
|
|
39
|
+
"helmet": "^8.0.0",
|
|
40
|
+
"pg": "^8.16.0",
|
|
41
|
+
"qs": "^6.14.0",
|
|
42
|
+
"swagger-jsdoc": "^6.2.8",
|
|
43
|
+
"swagger-ui-express": "^5.0.0",
|
|
44
|
+
"ws": "^8.18.0",
|
|
45
|
+
"zod": "^4.0.14"
|
|
46
|
+
},
|
|
47
|
+
"scripts": {
|
|
48
|
+
"build": "pnpm --package=typescript dlx tsc -b",
|
|
49
|
+
"start": "node ./dist/index.js",
|
|
50
|
+
"dev": "pnpm run build && pnpm run start",
|
|
51
|
+
"dev:watch": "pnpm --package=nodemon dlx nodemon --watch src --ext ts --exec \"pnpm run dev\"",
|
|
52
|
+
"clean": "rm -rf dist",
|
|
53
|
+
"generate-secret": "node -e \"console.log('HMAC_SECRET_KEY=' + require('crypto').randomBytes(32).toString('hex'))\""
|
|
54
|
+
}
|
|
55
|
+
}
|