gitship-core 0.0.2 → 0.0.4
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/dist/db.d.ts +31 -0
- package/dist/db.js +325 -0
- package/dist/db.js.map +1 -0
- package/dist/engine.d.ts +2 -0
- package/dist/engine.js +373 -0
- package/dist/engine.js.map +1 -0
- package/dist/github.d.ts +25 -0
- package/dist/github.js +98 -0
- package/dist/github.js.map +1 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/dist/paths.d.ts +13 -0
- package/dist/paths.js +33 -0
- package/dist/paths.js.map +1 -0
- package/dist/queue.d.ts +10 -0
- package/dist/queue.js +102 -0
- package/dist/queue.js.map +1 -0
- package/package.json +4 -1
- package/src/db.ts +0 -425
- package/src/engine.ts +0 -477
- package/src/github.ts +0 -124
- package/src/paths.ts +0 -35
- package/src/queue.ts +0 -130
- package/tsconfig.json +0 -8
- /package/{src/index.ts → dist/index.d.ts} +0 -0
package/dist/db.d.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import Database from "better-sqlite3";
|
|
2
|
+
import { Project, Webhook, Deployment, DeploymentStep, DeploymentStatus } from "gitship-shared";
|
|
3
|
+
export declare function getDb(): Database.Database;
|
|
4
|
+
export declare function addProject(project: Omit<Project, "created_at" | "updated_at">): Project;
|
|
5
|
+
export declare function getProject(idOrName: string): Project | null;
|
|
6
|
+
export declare function getProjects(): Project[];
|
|
7
|
+
export declare function removeProject(id: string): void;
|
|
8
|
+
export declare function saveWebhook(webhook: Webhook): void;
|
|
9
|
+
export declare function getWebhookByProjectId(projectId: string): Webhook | null;
|
|
10
|
+
export declare function createDeployment(deployment: Omit<Deployment, "created_at">): Deployment;
|
|
11
|
+
export declare function updateDeploymentStatus(id: string, status: DeploymentStatus, fields?: Partial<Deployment>): void;
|
|
12
|
+
export declare function getDeployment(id: string): Deployment | null;
|
|
13
|
+
export declare function getDeployments(projectId?: string, limit?: number): Deployment[];
|
|
14
|
+
export declare function getQueuedDeployments(projectId: string): Deployment[];
|
|
15
|
+
export declare function getRunningDeployment(projectId: string): Deployment | null;
|
|
16
|
+
export declare function createDeploymentStep(step: DeploymentStep): void;
|
|
17
|
+
export declare function updateDeploymentStep(id: string, fields: Partial<DeploymentStep>): void;
|
|
18
|
+
export declare function getDeploymentSteps(deploymentId: string): DeploymentStep[];
|
|
19
|
+
export declare function appendDeploymentLog(deploymentId: string, text: string): void;
|
|
20
|
+
export declare function getDeploymentLog(deploymentId: string): string | null;
|
|
21
|
+
export interface ProjectStats {
|
|
22
|
+
totalDeployments: number;
|
|
23
|
+
successRate: number;
|
|
24
|
+
avgDeployTimeMs: number;
|
|
25
|
+
avgBuildTimeMs: number;
|
|
26
|
+
slowestDeployMs: number;
|
|
27
|
+
fastestDeployMs: number;
|
|
28
|
+
}
|
|
29
|
+
export declare function getStats(projectId?: string): ProjectStats;
|
|
30
|
+
export declare function isWebhookDeliveryProcessed(id: string): boolean;
|
|
31
|
+
export declare function recordWebhookDelivery(id: string): void;
|
package/dist/db.js
ADDED
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
import Database from "better-sqlite3";
|
|
2
|
+
import fs from "fs";
|
|
3
|
+
import { DB_PATH, ensureDirsExist } from "./paths.js";
|
|
4
|
+
let dbInstance = null;
|
|
5
|
+
export function getDb() {
|
|
6
|
+
if (dbInstance)
|
|
7
|
+
return dbInstance;
|
|
8
|
+
ensureDirsExist();
|
|
9
|
+
dbInstance = new Database(DB_PATH);
|
|
10
|
+
try {
|
|
11
|
+
fs.chmodSync(DB_PATH, 0o600);
|
|
12
|
+
}
|
|
13
|
+
catch { }
|
|
14
|
+
dbInstance.pragma("journal_mode = WAL");
|
|
15
|
+
dbInstance.pragma("foreign_keys = ON");
|
|
16
|
+
initDb(dbInstance);
|
|
17
|
+
return dbInstance;
|
|
18
|
+
}
|
|
19
|
+
function initDb(db) {
|
|
20
|
+
db.exec(`
|
|
21
|
+
CREATE TABLE IF NOT EXISTS projects (
|
|
22
|
+
id TEXT PRIMARY KEY,
|
|
23
|
+
name TEXT UNIQUE NOT NULL,
|
|
24
|
+
owner TEXT NOT NULL,
|
|
25
|
+
repo TEXT NOT NULL,
|
|
26
|
+
branch TEXT NOT NULL,
|
|
27
|
+
target_type TEXT NOT NULL,
|
|
28
|
+
target_host TEXT,
|
|
29
|
+
target_path TEXT NOT NULL,
|
|
30
|
+
install_cmd TEXT,
|
|
31
|
+
build_cmd TEXT,
|
|
32
|
+
restart_cmd TEXT,
|
|
33
|
+
healthcheck_path TEXT,
|
|
34
|
+
healthcheck_port INTEGER,
|
|
35
|
+
healthcheck_retries INTEGER,
|
|
36
|
+
healthcheck_interval_ms INTEGER,
|
|
37
|
+
healthcheck_timeout_ms INTEGER,
|
|
38
|
+
webhook_secret TEXT NOT NULL,
|
|
39
|
+
created_at INTEGER NOT NULL,
|
|
40
|
+
updated_at INTEGER NOT NULL
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
CREATE TABLE IF NOT EXISTS webhooks (
|
|
44
|
+
id TEXT PRIMARY KEY,
|
|
45
|
+
project_id TEXT NOT NULL,
|
|
46
|
+
github_webhook_id INTEGER,
|
|
47
|
+
url TEXT NOT NULL,
|
|
48
|
+
secret TEXT NOT NULL,
|
|
49
|
+
active INTEGER NOT NULL DEFAULT 1,
|
|
50
|
+
created_at INTEGER NOT NULL,
|
|
51
|
+
FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
CREATE TABLE IF NOT EXISTS deployments (
|
|
55
|
+
id TEXT PRIMARY KEY,
|
|
56
|
+
project_id TEXT NOT NULL,
|
|
57
|
+
branch TEXT NOT NULL,
|
|
58
|
+
commit_sha TEXT,
|
|
59
|
+
commit_message TEXT,
|
|
60
|
+
author TEXT,
|
|
61
|
+
status TEXT NOT NULL,
|
|
62
|
+
started_at INTEGER,
|
|
63
|
+
finished_at INTEGER,
|
|
64
|
+
total_duration_ms INTEGER,
|
|
65
|
+
rollback_of_id TEXT,
|
|
66
|
+
created_at INTEGER NOT NULL,
|
|
67
|
+
FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE
|
|
68
|
+
);
|
|
69
|
+
|
|
70
|
+
CREATE TABLE IF NOT EXISTS deployment_steps (
|
|
71
|
+
id TEXT PRIMARY KEY,
|
|
72
|
+
deployment_id TEXT NOT NULL,
|
|
73
|
+
step_name TEXT NOT NULL,
|
|
74
|
+
status TEXT NOT NULL,
|
|
75
|
+
started_at INTEGER,
|
|
76
|
+
finished_at INTEGER,
|
|
77
|
+
duration_ms INTEGER,
|
|
78
|
+
FOREIGN KEY (deployment_id) REFERENCES deployments(id) ON DELETE CASCADE
|
|
79
|
+
);
|
|
80
|
+
|
|
81
|
+
CREATE TABLE IF NOT EXISTS deployment_logs (
|
|
82
|
+
deployment_id TEXT PRIMARY KEY,
|
|
83
|
+
log_data TEXT NOT NULL,
|
|
84
|
+
FOREIGN KEY (deployment_id) REFERENCES deployments(id) ON DELETE CASCADE
|
|
85
|
+
);
|
|
86
|
+
|
|
87
|
+
CREATE TABLE IF NOT EXISTS webhook_deliveries (
|
|
88
|
+
id TEXT PRIMARY KEY,
|
|
89
|
+
created_at INTEGER NOT NULL
|
|
90
|
+
);
|
|
91
|
+
`);
|
|
92
|
+
}
|
|
93
|
+
// Project Repositories
|
|
94
|
+
export function addProject(project) {
|
|
95
|
+
const db = getDb();
|
|
96
|
+
const now = Date.now();
|
|
97
|
+
const fullProject = { ...project, created_at: now, updated_at: now };
|
|
98
|
+
const stmt = db.prepare(`
|
|
99
|
+
INSERT INTO projects (id, name, owner, repo, branch, target_type, target_host, target_path, install_cmd, build_cmd, restart_cmd, healthcheck_path, healthcheck_port, healthcheck_retries, healthcheck_interval_ms, healthcheck_timeout_ms, webhook_secret, created_at, updated_at)
|
|
100
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
101
|
+
ON CONFLICT(name) DO UPDATE SET
|
|
102
|
+
owner = excluded.owner,
|
|
103
|
+
repo = excluded.repo,
|
|
104
|
+
branch = excluded.branch,
|
|
105
|
+
target_type = excluded.target_type,
|
|
106
|
+
target_host = excluded.target_host,
|
|
107
|
+
target_path = excluded.target_path,
|
|
108
|
+
install_cmd = excluded.install_cmd,
|
|
109
|
+
build_cmd = excluded.build_cmd,
|
|
110
|
+
restart_cmd = excluded.restart_cmd,
|
|
111
|
+
healthcheck_path = excluded.healthcheck_path,
|
|
112
|
+
healthcheck_port = excluded.healthcheck_port,
|
|
113
|
+
healthcheck_retries = excluded.healthcheck_retries,
|
|
114
|
+
healthcheck_interval_ms = excluded.healthcheck_interval_ms,
|
|
115
|
+
healthcheck_timeout_ms = excluded.healthcheck_timeout_ms,
|
|
116
|
+
webhook_secret = excluded.webhook_secret,
|
|
117
|
+
updated_at = excluded.updated_at
|
|
118
|
+
`);
|
|
119
|
+
stmt.run(fullProject.id, fullProject.name, fullProject.owner, fullProject.repo, fullProject.branch, fullProject.target_type, fullProject.target_host || null, fullProject.target_path, fullProject.install_cmd || null, fullProject.build_cmd || null, fullProject.restart_cmd || null, fullProject.healthcheck_path || null, fullProject.healthcheck_port || null, fullProject.healthcheck_retries || null, fullProject.healthcheck_interval_ms || null, fullProject.healthcheck_timeout_ms || null, fullProject.webhook_secret, fullProject.created_at, fullProject.updated_at);
|
|
120
|
+
return fullProject;
|
|
121
|
+
}
|
|
122
|
+
export function getProject(idOrName) {
|
|
123
|
+
const db = getDb();
|
|
124
|
+
const stmt = db.prepare("SELECT * FROM projects WHERE id = ? OR name = ?");
|
|
125
|
+
const res = stmt.get(idOrName, idOrName);
|
|
126
|
+
return res || null;
|
|
127
|
+
}
|
|
128
|
+
export function getProjects() {
|
|
129
|
+
const db = getDb();
|
|
130
|
+
const stmt = db.prepare("SELECT * FROM projects ORDER BY name ASC");
|
|
131
|
+
return stmt.all();
|
|
132
|
+
}
|
|
133
|
+
export function removeProject(id) {
|
|
134
|
+
const db = getDb();
|
|
135
|
+
const stmt = db.prepare("DELETE FROM projects WHERE id = ?");
|
|
136
|
+
stmt.run(id);
|
|
137
|
+
}
|
|
138
|
+
// Webhook Repositories
|
|
139
|
+
export function saveWebhook(webhook) {
|
|
140
|
+
const db = getDb();
|
|
141
|
+
const stmt = db.prepare(`
|
|
142
|
+
INSERT INTO webhooks (id, project_id, github_webhook_id, url, secret, active, created_at)
|
|
143
|
+
VALUES (?, ?, ?, ?, ?, ?, ?)
|
|
144
|
+
ON CONFLICT(id) DO UPDATE SET
|
|
145
|
+
github_webhook_id = excluded.github_webhook_id,
|
|
146
|
+
url = excluded.url,
|
|
147
|
+
secret = excluded.secret,
|
|
148
|
+
active = excluded.active
|
|
149
|
+
`);
|
|
150
|
+
stmt.run(webhook.id, webhook.project_id, webhook.github_webhook_id, webhook.url, webhook.secret, webhook.active ? 1 : 0, webhook.created_at);
|
|
151
|
+
}
|
|
152
|
+
export function getWebhookByProjectId(projectId) {
|
|
153
|
+
const db = getDb();
|
|
154
|
+
const stmt = db.prepare("SELECT * FROM webhooks WHERE project_id = ?");
|
|
155
|
+
const res = stmt.get(projectId);
|
|
156
|
+
if (!res)
|
|
157
|
+
return null;
|
|
158
|
+
return {
|
|
159
|
+
...res,
|
|
160
|
+
active: res.active === 1,
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
// Deployment Repositories
|
|
164
|
+
export function createDeployment(deployment) {
|
|
165
|
+
const db = getDb();
|
|
166
|
+
const now = Date.now();
|
|
167
|
+
const fullDeployment = { ...deployment, created_at: now };
|
|
168
|
+
const stmt = db.prepare(`
|
|
169
|
+
INSERT INTO deployments (id, project_id, branch, commit_sha, commit_message, author, status, started_at, finished_at, total_duration_ms, rollback_of_id, created_at)
|
|
170
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
171
|
+
`);
|
|
172
|
+
stmt.run(fullDeployment.id, fullDeployment.project_id, fullDeployment.branch, fullDeployment.commit_sha || null, fullDeployment.commit_message || null, fullDeployment.author || null, fullDeployment.status, fullDeployment.started_at || null, fullDeployment.finished_at || null, fullDeployment.total_duration_ms || null, fullDeployment.rollback_of_id || null, fullDeployment.created_at);
|
|
173
|
+
// Initialize empty logs for this deployment
|
|
174
|
+
const logStmt = db.prepare("INSERT INTO deployment_logs (deployment_id, log_data) VALUES (?, ?)");
|
|
175
|
+
logStmt.run(fullDeployment.id, "");
|
|
176
|
+
return fullDeployment;
|
|
177
|
+
}
|
|
178
|
+
export function updateDeploymentStatus(id, status, fields = {}) {
|
|
179
|
+
const db = getDb();
|
|
180
|
+
const updates = ["status = ?"];
|
|
181
|
+
const params = [status];
|
|
182
|
+
for (const [key, val] of Object.entries(fields)) {
|
|
183
|
+
if (key !== "id" && key !== "status") {
|
|
184
|
+
updates.push(`${key} = ?`);
|
|
185
|
+
params.push(val);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
params.push(id);
|
|
189
|
+
const stmt = db.prepare(`UPDATE deployments SET ${updates.join(", ")} WHERE id = ?`);
|
|
190
|
+
stmt.run(...params);
|
|
191
|
+
}
|
|
192
|
+
export function getDeployment(id) {
|
|
193
|
+
const db = getDb();
|
|
194
|
+
const stmt = db.prepare("SELECT * FROM deployments WHERE id = ?");
|
|
195
|
+
const res = stmt.get(id);
|
|
196
|
+
return res || null;
|
|
197
|
+
}
|
|
198
|
+
export function getDeployments(projectId, limit) {
|
|
199
|
+
const db = getDb();
|
|
200
|
+
let query = "SELECT * FROM deployments";
|
|
201
|
+
const params = [];
|
|
202
|
+
if (projectId) {
|
|
203
|
+
query += " WHERE project_id = ?";
|
|
204
|
+
params.push(projectId);
|
|
205
|
+
}
|
|
206
|
+
query += " ORDER BY created_at DESC";
|
|
207
|
+
if (limit) {
|
|
208
|
+
query += " LIMIT ?";
|
|
209
|
+
params.push(limit);
|
|
210
|
+
}
|
|
211
|
+
const stmt = db.prepare(query);
|
|
212
|
+
return stmt.all(...params);
|
|
213
|
+
}
|
|
214
|
+
export function getQueuedDeployments(projectId) {
|
|
215
|
+
const db = getDb();
|
|
216
|
+
const stmt = db.prepare("SELECT * FROM deployments WHERE project_id = ? AND status = 'QUEUED' ORDER BY created_at ASC");
|
|
217
|
+
return stmt.all(projectId);
|
|
218
|
+
}
|
|
219
|
+
export function getRunningDeployment(projectId) {
|
|
220
|
+
const db = getDb();
|
|
221
|
+
const stmt = db.prepare("SELECT * FROM deployments WHERE project_id = ? AND status = 'RUNNING'");
|
|
222
|
+
const res = stmt.get(projectId);
|
|
223
|
+
return res || null;
|
|
224
|
+
}
|
|
225
|
+
// Steps Repositories
|
|
226
|
+
export function createDeploymentStep(step) {
|
|
227
|
+
const db = getDb();
|
|
228
|
+
const stmt = db.prepare(`
|
|
229
|
+
INSERT INTO deployment_steps (id, deployment_id, step_name, status, started_at, finished_at, duration_ms)
|
|
230
|
+
VALUES (?, ?, ?, ?, ?, ?, ?)
|
|
231
|
+
`);
|
|
232
|
+
stmt.run(step.id, step.deployment_id, step.step_name, step.status, step.started_at, step.finished_at, step.duration_ms);
|
|
233
|
+
}
|
|
234
|
+
export function updateDeploymentStep(id, fields) {
|
|
235
|
+
const db = getDb();
|
|
236
|
+
const updates = [];
|
|
237
|
+
const params = [];
|
|
238
|
+
for (const [key, val] of Object.entries(fields)) {
|
|
239
|
+
if (key !== "id") {
|
|
240
|
+
updates.push(`${key} = ?`);
|
|
241
|
+
params.push(val);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
params.push(id);
|
|
245
|
+
const stmt = db.prepare(`UPDATE deployment_steps SET ${updates.join(", ")} WHERE id = ?`);
|
|
246
|
+
stmt.run(...params);
|
|
247
|
+
}
|
|
248
|
+
export function getDeploymentSteps(deploymentId) {
|
|
249
|
+
const db = getDb();
|
|
250
|
+
const stmt = db.prepare("SELECT * FROM deployment_steps WHERE deployment_id = ? ORDER BY started_at ASC");
|
|
251
|
+
return stmt.all(deploymentId);
|
|
252
|
+
}
|
|
253
|
+
// Log Repositories
|
|
254
|
+
export function appendDeploymentLog(deploymentId, text) {
|
|
255
|
+
const db = getDb();
|
|
256
|
+
const stmt = db.prepare(`
|
|
257
|
+
UPDATE deployment_logs
|
|
258
|
+
SET log_data = log_data || ?
|
|
259
|
+
WHERE deployment_id = ?
|
|
260
|
+
`);
|
|
261
|
+
stmt.run(text, deploymentId);
|
|
262
|
+
}
|
|
263
|
+
export function getDeploymentLog(deploymentId) {
|
|
264
|
+
const db = getDb();
|
|
265
|
+
const stmt = db.prepare("SELECT log_data FROM deployment_logs WHERE deployment_id = ?");
|
|
266
|
+
const res = stmt.get(deploymentId);
|
|
267
|
+
return res ? res.log_data : null;
|
|
268
|
+
}
|
|
269
|
+
export function getStats(projectId) {
|
|
270
|
+
const db = getDb();
|
|
271
|
+
const filter = projectId ? "WHERE project_id = ?" : "WHERE 1=1";
|
|
272
|
+
const params = projectId ? [projectId] : [];
|
|
273
|
+
const totalRow = db.prepare(`SELECT count(*) as count FROM deployments ${filter}`).get(...params);
|
|
274
|
+
const total = totalRow.count;
|
|
275
|
+
if (total === 0) {
|
|
276
|
+
return {
|
|
277
|
+
totalDeployments: 0,
|
|
278
|
+
successRate: 0,
|
|
279
|
+
avgDeployTimeMs: 0,
|
|
280
|
+
avgBuildTimeMs: 0,
|
|
281
|
+
slowestDeployMs: 0,
|
|
282
|
+
fastestDeployMs: 0,
|
|
283
|
+
};
|
|
284
|
+
}
|
|
285
|
+
const successRow = db.prepare(`SELECT count(*) as count FROM deployments ${filter} AND status = 'SUCCESS'`).get(...params);
|
|
286
|
+
const successRate = total > 0 ? (successRow.count / total) * 100 : 0;
|
|
287
|
+
const durationRow = db.prepare(`
|
|
288
|
+
SELECT
|
|
289
|
+
avg(total_duration_ms) as avg_duration,
|
|
290
|
+
max(total_duration_ms) as max_duration,
|
|
291
|
+
min(total_duration_ms) as min_duration
|
|
292
|
+
FROM deployments
|
|
293
|
+
${filter} AND status = 'SUCCESS'
|
|
294
|
+
`).get(...params);
|
|
295
|
+
const buildDurationRow = db.prepare(`
|
|
296
|
+
SELECT avg(ds.duration_ms) as avg_build
|
|
297
|
+
FROM deployment_steps ds
|
|
298
|
+
JOIN deployments d ON ds.deployment_id = d.id
|
|
299
|
+
${projectId ? "WHERE d.project_id = ?" : "WHERE 1=1"} AND ds.step_name = 'build' AND ds.status = 'SUCCESS'
|
|
300
|
+
`).get(projectId ? [projectId] : []);
|
|
301
|
+
return {
|
|
302
|
+
totalDeployments: total,
|
|
303
|
+
successRate: parseFloat(successRate.toFixed(1)),
|
|
304
|
+
avgDeployTimeMs: Math.round(durationRow.avg_duration || 0),
|
|
305
|
+
avgBuildTimeMs: Math.round(buildDurationRow.avg_build || 0),
|
|
306
|
+
slowestDeployMs: durationRow.max_duration || 0,
|
|
307
|
+
fastestDeployMs: durationRow.min_duration || 0,
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
export function isWebhookDeliveryProcessed(id) {
|
|
311
|
+
const db = getDb();
|
|
312
|
+
const stmt = db.prepare("SELECT count(*) as count FROM webhook_deliveries WHERE id = ?");
|
|
313
|
+
const res = stmt.get(id);
|
|
314
|
+
return res.count > 0;
|
|
315
|
+
}
|
|
316
|
+
export function recordWebhookDelivery(id) {
|
|
317
|
+
const db = getDb();
|
|
318
|
+
const now = Date.now();
|
|
319
|
+
const insertStmt = db.prepare("INSERT OR IGNORE INTO webhook_deliveries (id, created_at) VALUES (?, ?)");
|
|
320
|
+
insertStmt.run(id, now);
|
|
321
|
+
// Prune older than 24 hours (86,400,000 ms)
|
|
322
|
+
const pruneStmt = db.prepare("DELETE FROM webhook_deliveries WHERE created_at < ?");
|
|
323
|
+
pruneStmt.run(now - 86400000);
|
|
324
|
+
}
|
|
325
|
+
//# sourceMappingURL=db.js.map
|
package/dist/db.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"db.js","sourceRoot":"","sources":["../src/db.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,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