sprint-es 0.0.80 → 0.0.82
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/cjs/cli.cjs +27 -27
- package/dist/cjs/index.cjs +43 -0
- package/dist/esm/cli.js +28 -28
- package/dist/esm/index.js +43 -0
- package/dist/types/sprint.d.ts +3 -0
- package/dist/types/sprint.d.ts.map +1 -1
- package/dist/types/types.d.ts +12 -0
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/cjs/cli.cjs
CHANGED
|
@@ -117,7 +117,7 @@ function scanDirectory(dir, extensions) {
|
|
|
117
117
|
}
|
|
118
118
|
return files;
|
|
119
119
|
}
|
|
120
|
-
function extractRoutesFromFile(filePath) {
|
|
120
|
+
function extractRoutesFromFile(filePath, schemaNames) {
|
|
121
121
|
const routes = [];
|
|
122
122
|
try {
|
|
123
123
|
const content = fs.readFileSync(filePath, "utf-8");
|
|
@@ -126,42 +126,44 @@ function extractRoutesFromFile(filePath) {
|
|
|
126
126
|
for (const line of lines) {
|
|
127
127
|
const trimmed = line.trim();
|
|
128
128
|
for (const method of routerMethods) {
|
|
129
|
-
const match = trimmed.match(new RegExp(`router\\.${method}\\s*\\(\\s*['"\`]([^'"\`]+)['"\`]`));
|
|
129
|
+
const match = trimmed.match(new RegExp(`router\\.${method}\\s*\\(\\s*['"\`]([^'"\`]+)['"\`]\\s*,\\s*([^,)]+)`));
|
|
130
130
|
if (match) {
|
|
131
|
+
const routePath = match[1];
|
|
132
|
+
const firstArg = match[2].trim().split(",")[0].trim();
|
|
133
|
+
const hasSchema = schemaNames.has(firstArg);
|
|
131
134
|
routes.push({
|
|
132
135
|
file: filePath,
|
|
133
|
-
path:
|
|
136
|
+
path: routePath,
|
|
134
137
|
method: method.toUpperCase(),
|
|
135
|
-
hasSchema
|
|
138
|
+
hasSchema
|
|
136
139
|
});
|
|
137
140
|
break;
|
|
138
141
|
}
|
|
139
142
|
}
|
|
140
143
|
}
|
|
141
|
-
} catch {
|
|
144
|
+
} catch (e) {
|
|
145
|
+
console.error("Error extracting routes:", e);
|
|
142
146
|
}
|
|
143
147
|
return routes;
|
|
144
148
|
}
|
|
145
|
-
function
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
149
|
+
function extractAllSchemaNames(projectRoot2) {
|
|
150
|
+
const schemaNames = /* @__PURE__ */ new Set();
|
|
151
|
+
const schemasPath = path.join(projectRoot2, "src/schemas");
|
|
152
|
+
if (!fs.existsSync(schemasPath)) {
|
|
153
|
+
return schemaNames;
|
|
154
|
+
}
|
|
155
|
+
const schemaFiles = scanDirectory(schemasPath, [".ts", ".js"]);
|
|
156
|
+
for (const file of schemaFiles) {
|
|
157
|
+
try {
|
|
158
|
+
const content = fs.readFileSync(file, "utf-8");
|
|
159
|
+
const matches = content.matchAll(/export\s+const\s+(\w+)\s*=/g);
|
|
160
|
+
for (const match of matches) {
|
|
161
|
+
schemaNames.add(match[1]);
|
|
155
162
|
}
|
|
163
|
+
} catch {
|
|
156
164
|
}
|
|
157
|
-
const directSchemaPattern = new RegExp(`router\\.${method.toLowerCase()}\\s*\\(\\s*['"\`]${routePath.replace("/", "\\/")}['"\`]\\s*,\\s*defineRouteSchema`);
|
|
158
|
-
if (directSchemaPattern.test(content)) {
|
|
159
|
-
return true;
|
|
160
|
-
}
|
|
161
|
-
return false;
|
|
162
|
-
} catch {
|
|
163
|
-
return false;
|
|
164
165
|
}
|
|
166
|
+
return schemaNames;
|
|
165
167
|
}
|
|
166
168
|
function hasSchemaInMiddleware(filePath) {
|
|
167
169
|
try {
|
|
@@ -209,15 +211,13 @@ async function runDoctor() {
|
|
|
209
211
|
logger.info("🔍 Sprint Doctor - Analyzing routes and middlewares...\n");
|
|
210
212
|
const routesPath = path.join(projectRoot, "src/routes");
|
|
211
213
|
const middlewaresPath = path.join(projectRoot, "src/middlewares");
|
|
214
|
+
const schemaNames = extractAllSchemaNames(projectRoot);
|
|
212
215
|
const routeFiles = scanDirectory(routesPath, [".ts", ".js"]);
|
|
213
216
|
const middlewareFiles = scanDirectory(middlewaresPath, [".ts", ".js"]);
|
|
214
217
|
const allRoutes = [];
|
|
215
218
|
for (const file of routeFiles) {
|
|
216
|
-
const routes = extractRoutesFromFile(file);
|
|
217
|
-
|
|
218
|
-
route.hasSchema = checkRouteHasSchema(file, route.path, route.method);
|
|
219
|
-
allRoutes.push(route);
|
|
220
|
-
}
|
|
219
|
+
const routes = extractRoutesFromFile(file, schemaNames);
|
|
220
|
+
allRoutes.push(...routes);
|
|
221
221
|
}
|
|
222
222
|
const middlewares = [];
|
|
223
223
|
for (const file of middlewareFiles) {
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -124,6 +124,13 @@ class Sprint {
|
|
|
124
124
|
enabled: false
|
|
125
125
|
}
|
|
126
126
|
};
|
|
127
|
+
this.graphql = {
|
|
128
|
+
enabled: false,
|
|
129
|
+
graphiql: {
|
|
130
|
+
enabled: false
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
this.graphqlSchema = null;
|
|
127
134
|
this.registeredRoutes = [];
|
|
128
135
|
this.app = express();
|
|
129
136
|
loadSprintConfig().then((config) => {
|
|
@@ -141,6 +148,12 @@ class Sprint {
|
|
|
141
148
|
swaggerUi: {
|
|
142
149
|
enabled: false
|
|
143
150
|
}
|
|
151
|
+
},
|
|
152
|
+
graphql: {
|
|
153
|
+
enabled: false,
|
|
154
|
+
graphiql: {
|
|
155
|
+
enabled: false
|
|
156
|
+
}
|
|
144
157
|
}
|
|
145
158
|
};
|
|
146
159
|
const finalConfig = deepMerge(defaults, config || {});
|
|
@@ -157,6 +170,12 @@ class Sprint {
|
|
|
157
170
|
enabled: finalConfig.openapi?.swaggerUi?.enabled ?? false
|
|
158
171
|
}
|
|
159
172
|
};
|
|
173
|
+
this.graphql = {
|
|
174
|
+
enabled: finalConfig.graphql?.enabled ?? false,
|
|
175
|
+
graphiql: {
|
|
176
|
+
enabled: finalConfig.graphql?.graphiql?.enabled ?? false
|
|
177
|
+
}
|
|
178
|
+
};
|
|
160
179
|
this.loadDefaults();
|
|
161
180
|
this.loadHealthcheck();
|
|
162
181
|
this.routesLoaded = this.init();
|
|
@@ -184,6 +203,27 @@ class Sprint {
|
|
|
184
203
|
}
|
|
185
204
|
}
|
|
186
205
|
}
|
|
206
|
+
if (this.graphql.enabled) {
|
|
207
|
+
try {
|
|
208
|
+
const { createHandler } = await import("graphql-http/lib/use/express");
|
|
209
|
+
const { ruruHTML } = await import("ruru/server");
|
|
210
|
+
const graphqlPath = "/graphql";
|
|
211
|
+
this.app.all(graphqlPath, createHandler({
|
|
212
|
+
schema: this.graphqlSchema
|
|
213
|
+
}));
|
|
214
|
+
if (this.graphql.graphiql.enabled) {
|
|
215
|
+
const graphiqlPath = "/grapiql";
|
|
216
|
+
this.app.get(graphiqlPath, (_, res) => {
|
|
217
|
+
res.type("html");
|
|
218
|
+
res.end(ruruHTML({ endpoint: graphqlPath }));
|
|
219
|
+
});
|
|
220
|
+
if (isVerbose) console.log(`[Sprint] GraphiQL IDE: http://localhost:${this.port}${graphiqlPath}`);
|
|
221
|
+
}
|
|
222
|
+
if (isVerbose) console.log(`[Sprint] GraphQL endpoint: http://localhost:${this.port}${graphqlPath}`);
|
|
223
|
+
} catch (err) {
|
|
224
|
+
console.warn("[Sprint] Failed to load graphql-http or ruru:", err);
|
|
225
|
+
}
|
|
226
|
+
}
|
|
187
227
|
if (finalConfig.autoListen) this.listen();
|
|
188
228
|
});
|
|
189
229
|
});
|
|
@@ -666,6 +706,9 @@ class Sprint {
|
|
|
666
706
|
}
|
|
667
707
|
return this.app.use(pathOrHandler);
|
|
668
708
|
}
|
|
709
|
+
setGraphQLSchema(schema) {
|
|
710
|
+
this.graphqlSchema = schema;
|
|
711
|
+
}
|
|
669
712
|
listen(callback) {
|
|
670
713
|
const isDev2 = process.env.NODE_ENV === "development";
|
|
671
714
|
const basePort = this.app.get("port") || 5e3;
|
package/dist/esm/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { existsSync, readdirSync, statSync
|
|
2
|
+
import { existsSync, readFileSync, readdirSync, statSync } from "fs";
|
|
3
3
|
import * as crypto from "crypto";
|
|
4
4
|
import { join, resolve } from "path";
|
|
5
5
|
import { spawn } from "child_process";
|
|
@@ -99,7 +99,7 @@ function scanDirectory(dir, extensions) {
|
|
|
99
99
|
}
|
|
100
100
|
return files;
|
|
101
101
|
}
|
|
102
|
-
function extractRoutesFromFile(filePath) {
|
|
102
|
+
function extractRoutesFromFile(filePath, schemaNames) {
|
|
103
103
|
const routes = [];
|
|
104
104
|
try {
|
|
105
105
|
const content = readFileSync(filePath, "utf-8");
|
|
@@ -108,42 +108,44 @@ function extractRoutesFromFile(filePath) {
|
|
|
108
108
|
for (const line of lines) {
|
|
109
109
|
const trimmed = line.trim();
|
|
110
110
|
for (const method of routerMethods) {
|
|
111
|
-
const match = trimmed.match(new RegExp(`router\\.${method}\\s*\\(\\s*['"\`]([^'"\`]+)['"\`]`));
|
|
111
|
+
const match = trimmed.match(new RegExp(`router\\.${method}\\s*\\(\\s*['"\`]([^'"\`]+)['"\`]\\s*,\\s*([^,)]+)`));
|
|
112
112
|
if (match) {
|
|
113
|
+
const routePath = match[1];
|
|
114
|
+
const firstArg = match[2].trim().split(",")[0].trim();
|
|
115
|
+
const hasSchema = schemaNames.has(firstArg);
|
|
113
116
|
routes.push({
|
|
114
117
|
file: filePath,
|
|
115
|
-
path:
|
|
118
|
+
path: routePath,
|
|
116
119
|
method: method.toUpperCase(),
|
|
117
|
-
hasSchema
|
|
120
|
+
hasSchema
|
|
118
121
|
});
|
|
119
122
|
break;
|
|
120
123
|
}
|
|
121
124
|
}
|
|
122
125
|
}
|
|
123
|
-
} catch {
|
|
126
|
+
} catch (e) {
|
|
127
|
+
console.error("Error extracting routes:", e);
|
|
124
128
|
}
|
|
125
129
|
return routes;
|
|
126
130
|
}
|
|
127
|
-
function
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
131
|
+
function extractAllSchemaNames(projectRoot2) {
|
|
132
|
+
const schemaNames = /* @__PURE__ */ new Set();
|
|
133
|
+
const schemasPath = join(projectRoot2, "src/schemas");
|
|
134
|
+
if (!existsSync(schemasPath)) {
|
|
135
|
+
return schemaNames;
|
|
136
|
+
}
|
|
137
|
+
const schemaFiles = scanDirectory(schemasPath, [".ts", ".js"]);
|
|
138
|
+
for (const file of schemaFiles) {
|
|
139
|
+
try {
|
|
140
|
+
const content = readFileSync(file, "utf-8");
|
|
141
|
+
const matches = content.matchAll(/export\s+const\s+(\w+)\s*=/g);
|
|
142
|
+
for (const match of matches) {
|
|
143
|
+
schemaNames.add(match[1]);
|
|
137
144
|
}
|
|
145
|
+
} catch {
|
|
138
146
|
}
|
|
139
|
-
const directSchemaPattern = new RegExp(`router\\.${method.toLowerCase()}\\s*\\(\\s*['"\`]${routePath.replace("/", "\\/")}['"\`]\\s*,\\s*defineRouteSchema`);
|
|
140
|
-
if (directSchemaPattern.test(content)) {
|
|
141
|
-
return true;
|
|
142
|
-
}
|
|
143
|
-
return false;
|
|
144
|
-
} catch {
|
|
145
|
-
return false;
|
|
146
147
|
}
|
|
148
|
+
return schemaNames;
|
|
147
149
|
}
|
|
148
150
|
function hasSchemaInMiddleware(filePath) {
|
|
149
151
|
try {
|
|
@@ -191,15 +193,13 @@ async function runDoctor() {
|
|
|
191
193
|
logger.info("🔍 Sprint Doctor - Analyzing routes and middlewares...\n");
|
|
192
194
|
const routesPath = join(projectRoot, "src/routes");
|
|
193
195
|
const middlewaresPath = join(projectRoot, "src/middlewares");
|
|
196
|
+
const schemaNames = extractAllSchemaNames(projectRoot);
|
|
194
197
|
const routeFiles = scanDirectory(routesPath, [".ts", ".js"]);
|
|
195
198
|
const middlewareFiles = scanDirectory(middlewaresPath, [".ts", ".js"]);
|
|
196
199
|
const allRoutes = [];
|
|
197
200
|
for (const file of routeFiles) {
|
|
198
|
-
const routes = extractRoutesFromFile(file);
|
|
199
|
-
|
|
200
|
-
route.hasSchema = checkRouteHasSchema(file, route.path, route.method);
|
|
201
|
-
allRoutes.push(route);
|
|
202
|
-
}
|
|
201
|
+
const routes = extractRoutesFromFile(file, schemaNames);
|
|
202
|
+
allRoutes.push(...routes);
|
|
203
203
|
}
|
|
204
204
|
const middlewares = [];
|
|
205
205
|
for (const file of middlewareFiles) {
|
package/dist/esm/index.js
CHANGED
|
@@ -99,6 +99,13 @@ class Sprint {
|
|
|
99
99
|
enabled: false
|
|
100
100
|
}
|
|
101
101
|
};
|
|
102
|
+
this.graphql = {
|
|
103
|
+
enabled: false,
|
|
104
|
+
graphiql: {
|
|
105
|
+
enabled: false
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
this.graphqlSchema = null;
|
|
102
109
|
this.registeredRoutes = [];
|
|
103
110
|
this.app = express();
|
|
104
111
|
loadSprintConfig().then((config) => {
|
|
@@ -116,6 +123,12 @@ class Sprint {
|
|
|
116
123
|
swaggerUi: {
|
|
117
124
|
enabled: false
|
|
118
125
|
}
|
|
126
|
+
},
|
|
127
|
+
graphql: {
|
|
128
|
+
enabled: false,
|
|
129
|
+
graphiql: {
|
|
130
|
+
enabled: false
|
|
131
|
+
}
|
|
119
132
|
}
|
|
120
133
|
};
|
|
121
134
|
const finalConfig = deepMerge(defaults, config || {});
|
|
@@ -132,6 +145,12 @@ class Sprint {
|
|
|
132
145
|
enabled: finalConfig.openapi?.swaggerUi?.enabled ?? false
|
|
133
146
|
}
|
|
134
147
|
};
|
|
148
|
+
this.graphql = {
|
|
149
|
+
enabled: finalConfig.graphql?.enabled ?? false,
|
|
150
|
+
graphiql: {
|
|
151
|
+
enabled: finalConfig.graphql?.graphiql?.enabled ?? false
|
|
152
|
+
}
|
|
153
|
+
};
|
|
135
154
|
this.loadDefaults();
|
|
136
155
|
this.loadHealthcheck();
|
|
137
156
|
this.routesLoaded = this.init();
|
|
@@ -159,6 +178,27 @@ class Sprint {
|
|
|
159
178
|
}
|
|
160
179
|
}
|
|
161
180
|
}
|
|
181
|
+
if (this.graphql.enabled) {
|
|
182
|
+
try {
|
|
183
|
+
const { createHandler } = await import("graphql-http/lib/use/express");
|
|
184
|
+
const { ruruHTML } = await import("ruru/server");
|
|
185
|
+
const graphqlPath = "/graphql";
|
|
186
|
+
this.app.all(graphqlPath, createHandler({
|
|
187
|
+
schema: this.graphqlSchema
|
|
188
|
+
}));
|
|
189
|
+
if (this.graphql.graphiql.enabled) {
|
|
190
|
+
const graphiqlPath = "/grapiql";
|
|
191
|
+
this.app.get(graphiqlPath, (_, res) => {
|
|
192
|
+
res.type("html");
|
|
193
|
+
res.end(ruruHTML({ endpoint: graphqlPath }));
|
|
194
|
+
});
|
|
195
|
+
if (isVerbose) console.log(`[Sprint] GraphiQL IDE: http://localhost:${this.port}${graphiqlPath}`);
|
|
196
|
+
}
|
|
197
|
+
if (isVerbose) console.log(`[Sprint] GraphQL endpoint: http://localhost:${this.port}${graphqlPath}`);
|
|
198
|
+
} catch (err) {
|
|
199
|
+
console.warn("[Sprint] Failed to load graphql-http or ruru:", err);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
162
202
|
if (finalConfig.autoListen) this.listen();
|
|
163
203
|
});
|
|
164
204
|
});
|
|
@@ -641,6 +681,9 @@ class Sprint {
|
|
|
641
681
|
}
|
|
642
682
|
return this.app.use(pathOrHandler);
|
|
643
683
|
}
|
|
684
|
+
setGraphQLSchema(schema) {
|
|
685
|
+
this.graphqlSchema = schema;
|
|
686
|
+
}
|
|
644
687
|
listen(callback) {
|
|
645
688
|
const isDev2 = process.env.NODE_ENV === "development";
|
|
646
689
|
const basePort = this.app.get("port") || 5e3;
|
package/dist/types/sprint.d.ts
CHANGED
|
@@ -15,6 +15,8 @@ export declare class Sprint {
|
|
|
15
15
|
private server;
|
|
16
16
|
private loadedMiddlewares;
|
|
17
17
|
private openapi;
|
|
18
|
+
private graphql;
|
|
19
|
+
private graphqlSchema;
|
|
18
20
|
private registeredRoutes;
|
|
19
21
|
constructor();
|
|
20
22
|
private init;
|
|
@@ -43,6 +45,7 @@ export declare class Sprint {
|
|
|
43
45
|
delete(path: string, handler: Handler): express.Application;
|
|
44
46
|
patch(path: string, handler: Handler): express.Application;
|
|
45
47
|
use(pathOrHandler: string | Handler | MiddlewareConfig, maybeHandler?: Handler): express.Application;
|
|
48
|
+
setGraphQLSchema(schema: any): void;
|
|
46
49
|
listen(callback?: () => void): void;
|
|
47
50
|
}
|
|
48
51
|
//# sourceMappingURL=sprint.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sprint.d.ts","sourceRoot":"","sources":["../../src/sprint.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,OAAO,EAA+B,gBAAgB,EAAoB,MAAM,SAAS,CAAC;AACnG,OAAO,OAAO,EAAE,EAAE,WAAW,EAAoD,MAAM,SAAS,CAAC;AAejG,eAAO,MAAM,aAAa,SAAQ,CAAC;AACnC,eAAO,MAAM,YAAY,SAAS,CAAC;AAwCnC,qBAAa,MAAM;IACR,GAAG,EAAE,WAAW,CAAC;IACxB,OAAO,CAAC,IAAI,CAAwD;IACpE,OAAO,CAAC,UAAU,CAAsB;IACxC,OAAO,CAAC,eAAe,CAA2B;IAClD,OAAO,CAAC,YAAY,CAAwB;IAC5C,OAAO,CAAC,SAAS,CAAkB;IACnC,OAAO,CAAC,eAAe,CAAkB;IACzC,OAAO,CAAC,MAAM,CAAc;IAC5B,OAAO,CAAC,YAAY,CAAiB;IACrC,OAAO,CAAC,MAAM,CAAe;IAC7B,OAAO,CAAC,iBAAiB,CAA0B;IACnD,OAAO,CAAC,OAAO,CAUb;IACF,OAAO,CAAC,gBAAgB,CAIhB;;
|
|
1
|
+
{"version":3,"file":"sprint.d.ts","sour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AE,OAAO,EAAE,OAAO;IAClC,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO;IACrC,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO;IACpC,GAAG,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,GAAG,gBAAgB,EAAE,YAAY,CAAC,EAAE,OAAO;IAY9E,gBAAgB,CAAC,MAAM,EAAE,GAAG,GAAG,IAAI;IAIvC,MAAM,CAAC,QAAQ,CAAC,EAAE,MAAM,IAAI,GAAG,IAAI;CA0DzC"}
|
package/dist/types/types.d.ts
CHANGED
|
@@ -90,6 +90,12 @@ export interface SprintOptions {
|
|
|
90
90
|
enabled?: boolean;
|
|
91
91
|
};
|
|
92
92
|
};
|
|
93
|
+
graphql?: {
|
|
94
|
+
enabled?: boolean;
|
|
95
|
+
graphiql?: {
|
|
96
|
+
enabled?: boolean;
|
|
97
|
+
};
|
|
98
|
+
};
|
|
93
99
|
}
|
|
94
100
|
export interface SprintConfig {
|
|
95
101
|
port?: string | number | null;
|
|
@@ -107,6 +113,12 @@ export interface SprintConfig {
|
|
|
107
113
|
enabled?: boolean;
|
|
108
114
|
};
|
|
109
115
|
};
|
|
116
|
+
graphql?: {
|
|
117
|
+
enabled?: boolean;
|
|
118
|
+
graphiql?: {
|
|
119
|
+
enabled?: boolean;
|
|
120
|
+
};
|
|
121
|
+
};
|
|
110
122
|
}
|
|
111
123
|
export type { NextFunction } from 'express';
|
|
112
124
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC1E,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpD,MAAM,MAAM,mBAAmB,GAAG,CAAC,GAAG,EA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