libroadcast-cli 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 +17 -0
- package/dist/index.js +186 -0
- package/package.json +26 -0
- package/src/index.ts +221 -0
- package/tsconfig.json +16 -0
package/README.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
## Installation
|
|
2
|
+
|
|
3
|
+
```bash
|
|
4
|
+
pnpm install
|
|
5
|
+
```
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pnpx tsx src/index.ts delay <broadcastId> <delayInSeconds> [--only-delay] [--no-delay]
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
export LICHESS_TOKEN=lip_yourtoken
|
|
15
|
+
export LICHESS_DOMAIN=http://localhost:8080/
|
|
16
|
+
pnpx tsx src/index.ts delay <broadcastId> <delayInSeconds> [--only-delay] [--no-delay]
|
|
17
|
+
```
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { argv, env } from "process";
|
|
3
|
+
import createClient from "openapi-fetch";
|
|
4
|
+
const LICHESS_TOKEN = env.LICHESS_TOKEN;
|
|
5
|
+
const LICHESS_DOMAIN = env.LICHESS_DOMAIN || "https://lichess.org/";
|
|
6
|
+
if (!LICHESS_TOKEN) {
|
|
7
|
+
console.error("Error: LICHESS_TOKEN environment variable is not set.");
|
|
8
|
+
process.exit(1);
|
|
9
|
+
}
|
|
10
|
+
const args = argv.slice(2);
|
|
11
|
+
const client = createClient({
|
|
12
|
+
baseUrl: LICHESS_DOMAIN,
|
|
13
|
+
headers: {
|
|
14
|
+
Authorization: `Bearer ${LICHESS_TOKEN}`,
|
|
15
|
+
Accept: "application/json",
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
const getBroadcast = (broadcastId) => client
|
|
19
|
+
.GET("/api/broadcast/{broadcastTournamentId}", {
|
|
20
|
+
params: {
|
|
21
|
+
path: { broadcastTournamentId: broadcastId },
|
|
22
|
+
},
|
|
23
|
+
})
|
|
24
|
+
.then((response) => response.data)
|
|
25
|
+
.catch((error) => {
|
|
26
|
+
console.error("Error fetching broadcast:", error);
|
|
27
|
+
return null;
|
|
28
|
+
});
|
|
29
|
+
const setDelayRounds = (rounds, delay, onlyDelay, noDelay) => rounds.forEach((round) => {
|
|
30
|
+
client
|
|
31
|
+
.POST("/broadcast/round/{broadcastRoundId}/edit", {
|
|
32
|
+
params: {
|
|
33
|
+
path: { broadcastRoundId: round.id },
|
|
34
|
+
// @ts-ignore patch param is not yet documented
|
|
35
|
+
query: { patch: 1 },
|
|
36
|
+
},
|
|
37
|
+
// @ts-ignore name of body properties due patch param is implicit
|
|
38
|
+
body: {
|
|
39
|
+
delay: noDelay ? undefined : delay,
|
|
40
|
+
startsAt: round.startsAt && !onlyDelay
|
|
41
|
+
? round.startsAt + delay * 1000
|
|
42
|
+
: undefined,
|
|
43
|
+
},
|
|
44
|
+
})
|
|
45
|
+
.then((response) => {
|
|
46
|
+
if (response.response.ok)
|
|
47
|
+
console.log(`Successfully set delay for round ${round.id} to ${delay} seconds.`);
|
|
48
|
+
else
|
|
49
|
+
console.error(`Failed to set delay for round ${round.id}: ${response.response.statusText}`);
|
|
50
|
+
})
|
|
51
|
+
.catch((error) => {
|
|
52
|
+
console.error(`Error setting delay for round ${round.id}:`, error);
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
const setSourceLCC = (rounds, sourceLCC) => {
|
|
56
|
+
let rN = 1;
|
|
57
|
+
rounds.forEach((round) => {
|
|
58
|
+
client
|
|
59
|
+
.POST("/broadcast/round/{broadcastRoundId}/edit", {
|
|
60
|
+
params: {
|
|
61
|
+
path: { broadcastRoundId: round.id },
|
|
62
|
+
// @ts-ignore patch param is not yet documented
|
|
63
|
+
query: { patch: 1 },
|
|
64
|
+
},
|
|
65
|
+
// @ts-ignore name of body properties due patch param is implicit
|
|
66
|
+
body: {
|
|
67
|
+
// @ts-ignore property is not yet documented
|
|
68
|
+
syncSource: "url",
|
|
69
|
+
syncUrl: `${sourceLCC}/${rN}`,
|
|
70
|
+
},
|
|
71
|
+
})
|
|
72
|
+
.then((response) => {
|
|
73
|
+
if (response.response.ok)
|
|
74
|
+
console.log(`Successfully set source LCC for round ${round.id} to ${sourceLCC}/${rN}.`);
|
|
75
|
+
else
|
|
76
|
+
console.error(`Failed to set source LCC for round ${round.id}: ${response.response.statusText}`);
|
|
77
|
+
})
|
|
78
|
+
.catch((error) => {
|
|
79
|
+
console.error(`Error setting source LCC for round ${round.id}:`, error);
|
|
80
|
+
});
|
|
81
|
+
rN += 1;
|
|
82
|
+
});
|
|
83
|
+
};
|
|
84
|
+
var Command;
|
|
85
|
+
(function (Command) {
|
|
86
|
+
Command["Delay"] = "delay";
|
|
87
|
+
Command["SetLCC"] = "setLCC";
|
|
88
|
+
})(Command || (Command = {}));
|
|
89
|
+
const showHelp = (cmd) => {
|
|
90
|
+
const msg = [
|
|
91
|
+
"Usage: <command> [options]",
|
|
92
|
+
"Commands:",
|
|
93
|
+
" delay <broadcastId> <delayInSeconds> [--onlyDelay] [--noDelay]",
|
|
94
|
+
" Sets the delay for all rounds in the specified broadcast.",
|
|
95
|
+
" Options:",
|
|
96
|
+
" --onlyDelay Set only the delay without changing the start time.",
|
|
97
|
+
" --noDelay Remove the delay from the rounds.",
|
|
98
|
+
" setLCC <broadcastId> <sourceLCCUrl>",
|
|
99
|
+
" Sets the source LCC URL for all rounds in the specified broadcast.",
|
|
100
|
+
];
|
|
101
|
+
switch (cmd) {
|
|
102
|
+
case Command.Delay:
|
|
103
|
+
console.info(msg.slice(2, 7).join("\n"));
|
|
104
|
+
break;
|
|
105
|
+
case Command.SetLCC:
|
|
106
|
+
console.info(msg.slice(7, 8).join("\n"));
|
|
107
|
+
break;
|
|
108
|
+
default:
|
|
109
|
+
console.info(msg.join("\n"));
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
(async () => {
|
|
113
|
+
// check args[0] is --help or -h
|
|
114
|
+
if (args.length === 0 || args[0] === "--help" || args[0] === "-h") {
|
|
115
|
+
showHelp();
|
|
116
|
+
process.exit(0);
|
|
117
|
+
}
|
|
118
|
+
switch (args[0]) {
|
|
119
|
+
case Command.Delay:
|
|
120
|
+
const [broadcastId, delay] = args.slice(1, 3);
|
|
121
|
+
// check arg --help or -h
|
|
122
|
+
if (args.includes("--help") || args.includes("-h")) {
|
|
123
|
+
showHelp(Command.Delay);
|
|
124
|
+
process.exit(0);
|
|
125
|
+
}
|
|
126
|
+
// Validate required args
|
|
127
|
+
if (!broadcastId || !delay) {
|
|
128
|
+
showHelp(Command.Delay);
|
|
129
|
+
process.exit(1);
|
|
130
|
+
}
|
|
131
|
+
const delayNum = parseInt(delay, 10);
|
|
132
|
+
// Validate delay is a number between 0s and 1h
|
|
133
|
+
if (isNaN(delayNum) && delayNum >= 0 && delayNum <= 3600) {
|
|
134
|
+
console.error("Delay must be a number between 0 and 3600 seconds.");
|
|
135
|
+
process.exit(1);
|
|
136
|
+
}
|
|
137
|
+
// check arg --onlyDelay
|
|
138
|
+
const onlyDelay = args.includes("--onlyDelay");
|
|
139
|
+
// check arg --noDelay
|
|
140
|
+
const noDelay = args.includes("--noDelay");
|
|
141
|
+
if (onlyDelay && noDelay) {
|
|
142
|
+
console.error("Cannot use --onlyDelay and --noDelay together.");
|
|
143
|
+
process.exit(1);
|
|
144
|
+
}
|
|
145
|
+
const broadcast = await getBroadcast(broadcastId);
|
|
146
|
+
if (!broadcast?.rounds || broadcast.rounds.length === 0) {
|
|
147
|
+
console.error("No rounds found for the specified broadcast.");
|
|
148
|
+
process.exit(1);
|
|
149
|
+
}
|
|
150
|
+
setDelayRounds(broadcast.rounds, parseInt(delay, 10), onlyDelay, noDelay);
|
|
151
|
+
break;
|
|
152
|
+
case Command.SetLCC:
|
|
153
|
+
const [bId, sourceLCC] = args.slice(1, 3);
|
|
154
|
+
// check arg --help or -h
|
|
155
|
+
if (args.includes("--help") || args.includes("-h")) {
|
|
156
|
+
showHelp(Command.SetLCC);
|
|
157
|
+
process.exit(0);
|
|
158
|
+
}
|
|
159
|
+
// Validate required args
|
|
160
|
+
if (!bId || !sourceLCC) {
|
|
161
|
+
showHelp(Command.SetLCC);
|
|
162
|
+
process.exit(1);
|
|
163
|
+
}
|
|
164
|
+
const bcast = await getBroadcast(bId);
|
|
165
|
+
if (!bcast?.rounds || bcast.rounds.length === 0) {
|
|
166
|
+
console.error("No rounds found for the specified broadcast.");
|
|
167
|
+
process.exit(1);
|
|
168
|
+
}
|
|
169
|
+
// check sourceLCC is a valid URL
|
|
170
|
+
let url;
|
|
171
|
+
try {
|
|
172
|
+
url = new URL(sourceLCC.startsWith("http")
|
|
173
|
+
? sourceLCC
|
|
174
|
+
: `https://view.livechesscloud.com/${sourceLCC}`);
|
|
175
|
+
}
|
|
176
|
+
catch (e) {
|
|
177
|
+
console.error("sourceLCC must be a valid URL or LCC ID.");
|
|
178
|
+
process.exit(1);
|
|
179
|
+
}
|
|
180
|
+
setSourceLCC(bcast.rounds, url.toString());
|
|
181
|
+
break;
|
|
182
|
+
default:
|
|
183
|
+
console.error("Unknown command. Supported commands: delay, setLCC");
|
|
184
|
+
process.exit(1);
|
|
185
|
+
}
|
|
186
|
+
})();
|
package/package.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "libroadcast-cli",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "dist/index.ts",
|
|
6
|
+
"keywords": [],
|
|
7
|
+
"author": "",
|
|
8
|
+
"license": "ISC",
|
|
9
|
+
"packageManager": "pnpm@10.20.0+sha512.cf9998222162dd85864d0a8102e7892e7ba4ceadebbf5a31f9c2fce48dfce317a9c53b9f6464d1ef9042cba2e02ae02a9f7c143a2b438cd93c91840f0192b9dd",
|
|
10
|
+
"type": "module",
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"@lichess-org/types": "^2.0.94",
|
|
13
|
+
"@types/node": "^24.10.0",
|
|
14
|
+
"openapi-fetch": "^0.15.0"
|
|
15
|
+
},
|
|
16
|
+
"devDependencies": {
|
|
17
|
+
"typescript": "^5.9.3"
|
|
18
|
+
},
|
|
19
|
+
"bin": {
|
|
20
|
+
"libroadcast": "./dist/index.js"
|
|
21
|
+
},
|
|
22
|
+
"scripts": {
|
|
23
|
+
"build": "tsc",
|
|
24
|
+
"start": "pnpm build && node ./dist/index.js"
|
|
25
|
+
}
|
|
26
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { argv, env } from "process";
|
|
3
|
+
import createClient from "openapi-fetch";
|
|
4
|
+
import { components, paths } from "@lichess-org/types";
|
|
5
|
+
|
|
6
|
+
const LICHESS_TOKEN = env.LICHESS_TOKEN;
|
|
7
|
+
const LICHESS_DOMAIN = env.LICHESS_DOMAIN || "https://lichess.org/";
|
|
8
|
+
|
|
9
|
+
if (!LICHESS_TOKEN) {
|
|
10
|
+
console.error("Error: LICHESS_TOKEN environment variable is not set.");
|
|
11
|
+
process.exit(1);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const args = argv.slice(2);
|
|
15
|
+
|
|
16
|
+
const client = createClient<paths>({
|
|
17
|
+
baseUrl: LICHESS_DOMAIN,
|
|
18
|
+
headers: {
|
|
19
|
+
Authorization: `Bearer ${LICHESS_TOKEN}`,
|
|
20
|
+
Accept: "application/json",
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
const getBroadcast = (broadcastId: string) =>
|
|
25
|
+
client
|
|
26
|
+
.GET("/api/broadcast/{broadcastTournamentId}", {
|
|
27
|
+
params: {
|
|
28
|
+
path: { broadcastTournamentId: broadcastId },
|
|
29
|
+
},
|
|
30
|
+
})
|
|
31
|
+
.then((response) => response.data)
|
|
32
|
+
.catch((error) => {
|
|
33
|
+
console.error("Error fetching broadcast:", error);
|
|
34
|
+
return null;
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
const setDelayRounds = (
|
|
38
|
+
rounds: components["schemas"]["BroadcastRoundInfo"][],
|
|
39
|
+
delay: number,
|
|
40
|
+
onlyDelay: boolean,
|
|
41
|
+
noDelay: boolean
|
|
42
|
+
) =>
|
|
43
|
+
rounds.forEach((round) => {
|
|
44
|
+
client
|
|
45
|
+
.POST("/broadcast/round/{broadcastRoundId}/edit", {
|
|
46
|
+
params: {
|
|
47
|
+
path: { broadcastRoundId: round.id },
|
|
48
|
+
// @ts-ignore patch param is not yet documented
|
|
49
|
+
query: { patch: 1 },
|
|
50
|
+
},
|
|
51
|
+
// @ts-ignore name of body properties due patch param is implicit
|
|
52
|
+
body: {
|
|
53
|
+
delay: noDelay ? undefined : delay,
|
|
54
|
+
startsAt:
|
|
55
|
+
round.startsAt && !onlyDelay
|
|
56
|
+
? round.startsAt + delay * 1000
|
|
57
|
+
: undefined,
|
|
58
|
+
},
|
|
59
|
+
})
|
|
60
|
+
.then((response) => {
|
|
61
|
+
if (response.response.ok)
|
|
62
|
+
console.log(
|
|
63
|
+
`Successfully set delay for round ${round.id} to ${delay} seconds.`
|
|
64
|
+
);
|
|
65
|
+
else
|
|
66
|
+
console.error(
|
|
67
|
+
`Failed to set delay for round ${round.id}: ${response.response.statusText}`
|
|
68
|
+
);
|
|
69
|
+
})
|
|
70
|
+
.catch((error) => {
|
|
71
|
+
console.error(`Error setting delay for round ${round.id}:`, error);
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
const setSourceLCC = (
|
|
76
|
+
rounds: components["schemas"]["BroadcastRoundInfo"][],
|
|
77
|
+
sourceLCC: string
|
|
78
|
+
) => {
|
|
79
|
+
let rN = 1;
|
|
80
|
+
rounds.forEach((round) => {
|
|
81
|
+
client
|
|
82
|
+
.POST("/broadcast/round/{broadcastRoundId}/edit", {
|
|
83
|
+
params: {
|
|
84
|
+
path: { broadcastRoundId: round.id },
|
|
85
|
+
// @ts-ignore patch param is not yet documented
|
|
86
|
+
query: { patch: 1 },
|
|
87
|
+
},
|
|
88
|
+
// @ts-ignore name of body properties due patch param is implicit
|
|
89
|
+
body: {
|
|
90
|
+
// @ts-ignore property is not yet documented
|
|
91
|
+
syncSource: "url",
|
|
92
|
+
syncUrl: `${sourceLCC}/${rN}`,
|
|
93
|
+
},
|
|
94
|
+
})
|
|
95
|
+
.then((response) => {
|
|
96
|
+
if (response.response.ok)
|
|
97
|
+
console.log(
|
|
98
|
+
`Successfully set source LCC for round ${round.id} to ${sourceLCC}/${rN}.`
|
|
99
|
+
);
|
|
100
|
+
else
|
|
101
|
+
console.error(
|
|
102
|
+
`Failed to set source LCC for round ${round.id}: ${response.response.statusText}`
|
|
103
|
+
);
|
|
104
|
+
})
|
|
105
|
+
.catch((error) => {
|
|
106
|
+
console.error(`Error setting source LCC for round ${round.id}:`, error);
|
|
107
|
+
});
|
|
108
|
+
rN += 1;
|
|
109
|
+
});
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
enum Command {
|
|
113
|
+
Delay = "delay",
|
|
114
|
+
SetLCC = "setLCC",
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
const showHelp = (cmd?: Command) => {
|
|
118
|
+
const msg = [
|
|
119
|
+
"Usage: <command> [options]",
|
|
120
|
+
"Commands:",
|
|
121
|
+
" delay <broadcastId> <delayInSeconds> [--onlyDelay] [--noDelay]",
|
|
122
|
+
" Sets the delay for all rounds in the specified broadcast.",
|
|
123
|
+
" Options:",
|
|
124
|
+
" --onlyDelay Set only the delay without changing the start time.",
|
|
125
|
+
" --noDelay Remove the delay from the rounds.",
|
|
126
|
+
" setLCC <broadcastId> <sourceLCCUrl>",
|
|
127
|
+
" Sets the source LCC URL for all rounds in the specified broadcast.",
|
|
128
|
+
];
|
|
129
|
+
switch (cmd) {
|
|
130
|
+
case Command.Delay:
|
|
131
|
+
console.info(msg.slice(2, 7).join("\n"));
|
|
132
|
+
break;
|
|
133
|
+
case Command.SetLCC:
|
|
134
|
+
console.info(msg.slice(7, 8).join("\n"));
|
|
135
|
+
break;
|
|
136
|
+
default:
|
|
137
|
+
console.info(msg.join("\n"));
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
(async () => {
|
|
142
|
+
// check args[0] is --help or -h
|
|
143
|
+
if (args.length === 0 || args[0] === "--help" || args[0] === "-h") {
|
|
144
|
+
showHelp();
|
|
145
|
+
process.exit(0);
|
|
146
|
+
}
|
|
147
|
+
switch (args[0]) {
|
|
148
|
+
case Command.Delay:
|
|
149
|
+
const [broadcastId, delay] = args.slice(1, 3);
|
|
150
|
+
// check arg --help or -h
|
|
151
|
+
if (args.includes("--help") || args.includes("-h")) {
|
|
152
|
+
showHelp(Command.Delay);
|
|
153
|
+
process.exit(0);
|
|
154
|
+
}
|
|
155
|
+
// Validate required args
|
|
156
|
+
if (!broadcastId || !delay) {
|
|
157
|
+
showHelp(Command.Delay);
|
|
158
|
+
process.exit(1);
|
|
159
|
+
}
|
|
160
|
+
const delayNum = parseInt(delay, 10);
|
|
161
|
+
// Validate delay is a number between 0s and 1h
|
|
162
|
+
if (isNaN(delayNum) && delayNum >= 0 && delayNum <= 3600) {
|
|
163
|
+
console.error("Delay must be a number between 0 and 3600 seconds.");
|
|
164
|
+
process.exit(1);
|
|
165
|
+
}
|
|
166
|
+
// check arg --onlyDelay
|
|
167
|
+
const onlyDelay = args.includes("--onlyDelay");
|
|
168
|
+
// check arg --noDelay
|
|
169
|
+
const noDelay = args.includes("--noDelay");
|
|
170
|
+
if (onlyDelay && noDelay) {
|
|
171
|
+
console.error("Cannot use --onlyDelay and --noDelay together.");
|
|
172
|
+
process.exit(1);
|
|
173
|
+
}
|
|
174
|
+
const broadcast = await getBroadcast(broadcastId);
|
|
175
|
+
if (!broadcast?.rounds || broadcast.rounds.length === 0) {
|
|
176
|
+
console.error("No rounds found for the specified broadcast.");
|
|
177
|
+
process.exit(1);
|
|
178
|
+
}
|
|
179
|
+
setDelayRounds(broadcast.rounds, parseInt(delay, 10), onlyDelay, noDelay);
|
|
180
|
+
break;
|
|
181
|
+
|
|
182
|
+
case Command.SetLCC:
|
|
183
|
+
const [bId, sourceLCC] = args.slice(1, 3);
|
|
184
|
+
// check arg --help or -h
|
|
185
|
+
if (args.includes("--help") || args.includes("-h")) {
|
|
186
|
+
showHelp(Command.SetLCC);
|
|
187
|
+
process.exit(0);
|
|
188
|
+
}
|
|
189
|
+
// Validate required args
|
|
190
|
+
if (!bId || !sourceLCC) {
|
|
191
|
+
showHelp(Command.SetLCC);
|
|
192
|
+
process.exit(1);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
const bcast = await getBroadcast(bId);
|
|
196
|
+
if (!bcast?.rounds || bcast.rounds.length === 0) {
|
|
197
|
+
console.error("No rounds found for the specified broadcast.");
|
|
198
|
+
process.exit(1);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
// check sourceLCC is a valid URL
|
|
202
|
+
let url: URL;
|
|
203
|
+
try {
|
|
204
|
+
url = new URL(
|
|
205
|
+
sourceLCC.startsWith("http")
|
|
206
|
+
? sourceLCC
|
|
207
|
+
: `https://view.livechesscloud.com/${sourceLCC}`
|
|
208
|
+
);
|
|
209
|
+
} catch (e) {
|
|
210
|
+
console.error("sourceLCC must be a valid URL or LCC ID.");
|
|
211
|
+
process.exit(1);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
setSourceLCC(bcast.rounds, url.toString());
|
|
215
|
+
break;
|
|
216
|
+
|
|
217
|
+
default:
|
|
218
|
+
console.error("Unknown command. Supported commands: delay, setLCC");
|
|
219
|
+
process.exit(1);
|
|
220
|
+
}
|
|
221
|
+
})();
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"forceConsistentCasingInFileNames": true,
|
|
4
|
+
"strict": true,
|
|
5
|
+
"noImplicitAny": true,
|
|
6
|
+
"strictNullChecks": true,
|
|
7
|
+
"noUnusedLocals": true,
|
|
8
|
+
"noUnusedParameters": true,
|
|
9
|
+
"lib": ["DOM", "ES2024"],
|
|
10
|
+
"target": "es2024",
|
|
11
|
+
"moduleResolution": "node",
|
|
12
|
+
"module": "ESNext",
|
|
13
|
+
"outDir": "./dist",
|
|
14
|
+
"rootDir": "./src",
|
|
15
|
+
}
|
|
16
|
+
}
|