@elizaos/plugin-sql 1.0.0-beta.0 → 1.0.0-beta.3
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/{chunk-PSEXCDLP.js → chunk-ROCRMD5N.js} +29 -30
- package/dist/chunk-ROCRMD5N.js.map +1 -0
- package/dist/index.js +75 -12
- package/dist/index.js.map +1 -1
- package/dist/migrate.js +3 -7
- package/dist/migrate.js.map +1 -1
- package/package.json +3 -3
- package/dist/chunk-I3JSTNED.js +0 -40
- package/dist/chunk-I3JSTNED.js.map +0 -1
- package/dist/chunk-PSEXCDLP.js.map +0 -1
- package/dist/execa-I2XBH3EI.js +0 -2100
- package/dist/execa-I2XBH3EI.js.map +0 -1
package/dist/migrate.js
CHANGED
|
@@ -1,21 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PGliteClientManager,
|
|
3
|
-
PostgresConnectionManager
|
|
4
|
-
} from "./chunk-PSEXCDLP.js";
|
|
5
|
-
import {
|
|
3
|
+
PostgresConnectionManager,
|
|
6
4
|
__name
|
|
7
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-ROCRMD5N.js";
|
|
8
6
|
|
|
9
7
|
// src/migrate.ts
|
|
10
8
|
import { logger } from "@elizaos/core";
|
|
11
9
|
import { config } from "dotenv";
|
|
12
|
-
import { Pool } from "pg";
|
|
13
10
|
config({ path: "../../.env" });
|
|
14
11
|
async function runMigrations() {
|
|
15
12
|
if (process.env.POSTGRES_URL) {
|
|
16
13
|
try {
|
|
17
|
-
const
|
|
18
|
-
const connectionManager = new PostgresConnectionManager(pool, process.env.POSTGRES_URL);
|
|
14
|
+
const connectionManager = new PostgresConnectionManager(process.env.POSTGRES_URL);
|
|
19
15
|
await connectionManager.initialize();
|
|
20
16
|
await connectionManager.runMigrations();
|
|
21
17
|
logger.success("PostgreSQL migrations completed successfully");
|
package/dist/migrate.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/migrate.ts"],"sourceRoot":"./","sourcesContent":["import { logger } from '@elizaos/core';\nimport { config } from 'dotenv';\nimport { PGliteClientManager } from './pglite/manager.js';\nimport { PostgresConnectionManager } from './pg/manager.js';\
|
|
1
|
+
{"version":3,"sources":["../src/migrate.ts"],"sourceRoot":"./","sourcesContent":["import { logger } from '@elizaos/core';\nimport { config } from 'dotenv';\nimport { PGliteClientManager } from './pglite/manager.js';\nimport { PostgresConnectionManager } from './pg/manager.js';\n\nconfig({ path: '../../.env' });\n\n/**\n * Runs the database migrations based on the environment variable POSTGRES_URL.\n * If the POSTGRES_URL is provided, it indicates the use of a PostgreSQL database and the corresponding migration logic needs to be implemented.\n * If POSTGRES_URL is not provided, it uses a PGlite database and runs the migrations on it.\n * @returns {Promise<void>} A promise that resolves once the migrations are completed successfully or rejects if an error occurs.\n */\nasync function runMigrations() {\n if (process.env.POSTGRES_URL) {\n try {\n const connectionManager = new PostgresConnectionManager(process.env.POSTGRES_URL);\n await connectionManager.initialize();\n await connectionManager.runMigrations();\n // await connectionManager.close();\n logger.success('PostgreSQL migrations completed successfully');\n process.exit(0);\n } catch (error) {\n logger.warn('PostgreSQL migration failed:', error);\n process.exit(1);\n }\n } else {\n logger.info('Using PGlite database');\n const clientManager = new PGliteClientManager({\n dataDir: '../../pglite',\n });\n\n try {\n await clientManager.initialize();\n await clientManager.runMigrations();\n logger.success('PGlite migrations completed successfully');\n await clientManager.close();\n process.exit(0);\n } catch (error) {\n logger.error('PGlite migration failed:', error);\n try {\n await clientManager.close();\n } catch (closeError) {\n logger.error('Failed to close PGlite connection:', closeError);\n }\n process.exit(1);\n }\n }\n}\n\nrunMigrations().catch((error) => {\n logger.error('Unhandled error in migrations:', error);\n process.exit(1);\n});\n"],"mappings":";;;;;;;AAAA,SAAS,cAAc;AACvB,SAAS,cAAc;AAIvB,OAAO,EAAE,MAAM,aAAa,CAAC;AAQ7B,eAAe,gBAAgB;AAC7B,MAAI,QAAQ,IAAI,cAAc;AAC5B,QAAI;AACF,YAAM,oBAAoB,IAAI,0BAA0B,QAAQ,IAAI,YAAY;AAChF,YAAM,kBAAkB,WAAW;AACnC,YAAM,kBAAkB,cAAc;AAEtC,aAAO,QAAQ,8CAA8C;AAC7D,cAAQ,KAAK,CAAC;AAAA,IAChB,SAAS,OAAO;AACd,aAAO,KAAK,gCAAgC,KAAK;AACjD,cAAQ,KAAK,CAAC;AAAA,IAChB;AAAA,EACF,OAAO;AACL,WAAO,KAAK,uBAAuB;AACnC,UAAM,gBAAgB,IAAI,oBAAoB;AAAA,MAC5C,SAAS;AAAA,IACX,CAAC;AAED,QAAI;AACF,YAAM,cAAc,WAAW;AAC/B,YAAM,cAAc,cAAc;AAClC,aAAO,QAAQ,0CAA0C;AACzD,YAAM,cAAc,MAAM;AAC1B,cAAQ,KAAK,CAAC;AAAA,IAChB,SAAS,OAAO;AACd,aAAO,MAAM,4BAA4B,KAAK;AAC9C,UAAI;AACF,cAAM,cAAc,MAAM;AAAA,MAC5B,SAAS,YAAY;AACnB,eAAO,MAAM,sCAAsC,UAAU;AAAA,MAC/D;AACA,cAAQ,KAAK,CAAC;AAAA,IAChB;AAAA,EACF;AACF;AAnCe;AAqCf,cAAc,EAAE,MAAM,CAAC,UAAU;AAC/B,SAAO,MAAM,kCAAkC,KAAK;AACpD,UAAQ,KAAK,CAAC;AAChB,CAAC;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elizaos/plugin-sql",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@electric-sql/pglite": "^0.2.17",
|
|
30
|
-
"@elizaos/core": "^1.0.0-beta.
|
|
30
|
+
"@elizaos/core": "^1.0.0-beta.3",
|
|
31
31
|
"@types/pg": "8.11.10",
|
|
32
32
|
"drizzle-kit": "^0.30.4",
|
|
33
33
|
"drizzle-orm": "^0.39.1",
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"typescript": "5.8.2"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "7fafcbac799e40bd30f1e2acd3239262e79bbb2f"
|
|
55
55
|
}
|
package/dist/chunk-I3JSTNED.js
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
8
|
-
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
9
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
10
|
-
}) : x)(function(x) {
|
|
11
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
12
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
13
|
-
});
|
|
14
|
-
var __commonJS = (cb, mod) => function __require2() {
|
|
15
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
16
|
-
};
|
|
17
|
-
var __copyProps = (to, from, except, desc) => {
|
|
18
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
19
|
-
for (let key of __getOwnPropNames(from))
|
|
20
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
21
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
22
|
-
}
|
|
23
|
-
return to;
|
|
24
|
-
};
|
|
25
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
26
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
27
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
28
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
29
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
30
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
31
|
-
mod
|
|
32
|
-
));
|
|
33
|
-
|
|
34
|
-
export {
|
|
35
|
-
__name,
|
|
36
|
-
__require,
|
|
37
|
-
__commonJS,
|
|
38
|
-
__toESM
|
|
39
|
-
};
|
|
40
|
-
//# sourceMappingURL=chunk-I3JSTNED.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourceRoot":"./","sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/pglite/manager.ts","../src/pg/manager.ts"],"sourceRoot":"./","sourcesContent":["import { dirname as pathDirname, resolve as pathResolve } from 'node:path';\nimport { fileURLToPath } from 'node:url';\nimport { PGlite, type PGliteOptions } from '@electric-sql/pglite';\nimport { fuzzystrmatch } from '@electric-sql/pglite/contrib/fuzzystrmatch';\nimport { vector } from '@electric-sql/pglite/vector';\nimport { logger } from '@elizaos/core';\nimport { drizzle } from 'drizzle-orm/pglite';\nimport { migrate } from 'drizzle-orm/pglite/migrator';\nimport type { IDatabaseClientManager } from '../types';\n\n/**\n * Class representing a database client manager for PGlite.\n * @implements { IDatabaseClientManager }\n */\nexport class PGliteClientManager implements IDatabaseClientManager<PGlite> {\n private client: PGlite;\n private shuttingDown = false;\n private readonly shutdownTimeout = 500;\n\n /**\n * Constructor for creating a new instance of PGlite with the provided options.\n * Initializes the PGlite client with additional extensions.\n * @param {PGliteOptions} options - The options to configure the PGlite client.\n */\n constructor(options: PGliteOptions) {\n this.client = new PGlite({\n ...options,\n extensions: {\n vector,\n fuzzystrmatch,\n },\n });\n this.setupShutdownHandlers();\n }\n\n /**\n * Retrieves the PostgreSQL lite connection.\n *\n * @returns {PGlite} The PostgreSQL lite connection.\n * @throws {Error} If the client manager is currently shutting down.\n */\n public getConnection(): PGlite {\n if (this.shuttingDown) {\n throw new Error('Client manager is shutting down');\n }\n return this.client;\n }\n\n /**\n * Initiates a graceful shutdown of the PGlite client.\n * Checks if the client is already in the process of shutting down.\n * Logs the start of shutdown process and sets shuttingDown flag to true.\n * Sets a timeout for the shutdown process and forces closure of database connection if timeout is reached.\n * Handles the shutdown process, closes the client connection, clears the timeout, and logs the completion of shutdown.\n * Logs any errors that occur during the shutdown process.\n */\n private async gracefulShutdown() {\n if (this.shuttingDown) {\n return;\n }\n\n this.shuttingDown = true;\n logger.info('Starting graceful shutdown of PGlite client...');\n\n const timeout = setTimeout(() => {\n logger.warn('Shutdown timeout reached, forcing database connection closure...');\n this.client.close().finally(() => {\n process.exit(1);\n });\n }, this.shutdownTimeout);\n\n try {\n await this.client.close();\n clearTimeout(timeout);\n logger.info('PGlite client shutdown completed successfully');\n process.exit(0);\n } catch (error) {\n logger.error('Error during graceful shutdown:', error);\n process.exit(1);\n }\n }\n\n /**\n * Sets up shutdown handlers for SIGINT, SIGTERM, and beforeExit events to gracefully shutdown the application.\n * @private\n */\n private setupShutdownHandlers() {\n process.on('SIGINT', async () => {\n await this.gracefulShutdown();\n });\n\n process.on('SIGTERM', async () => {\n await this.gracefulShutdown();\n });\n\n process.on('beforeExit', async () => {\n await this.gracefulShutdown();\n });\n }\n\n /**\n * Initializes the client for PGlite.\n *\n * @returns {Promise<void>} A Promise that resolves when the client is initialized successfully\n */\n public async initialize(): Promise<void> {\n try {\n await this.client.waitReady;\n logger.info('PGlite client initialized successfully');\n } catch (error) {\n logger.error('Failed to initialize PGlite client:', error);\n throw error;\n }\n }\n\n /**\n * Asynchronously closes the resource. If the resource is not already shutting down,\n * it performs a graceful shutdown before closing.\n *\n * @returns A promise that resolves once the resource has been closed.\n */\n public async close(): Promise<void> {\n if (!this.shuttingDown) {\n await this.gracefulShutdown();\n }\n }\n\n /**\n * Check if the system is currently shutting down.\n *\n * @returns {boolean} True if the system is shutting down, false otherwise.\n */\n public isShuttingDown(): boolean {\n return this.shuttingDown;\n }\n\n /**\n * Asynchronously runs database migrations using Drizzle.\n *\n * Drizzle will first check if the migrations are already applied.\n * If there is a diff between database schema and migrations, it will apply the migrations.\n * If they are already applied, it will skip them.\n *\n * @returns {Promise<void>} A Promise that resolves once the migrations are completed successfully.\n */\n async runMigrations(): Promise<void> {\n try {\n const db = drizzle(this.client);\n\n const __filename = fileURLToPath(import.meta.url);\n const __dirname = pathDirname(__filename);\n\n await migrate(db, {\n migrationsFolder: pathResolve(__dirname, '../drizzle/migrations'),\n });\n } catch (error) {\n logger.error('Failed to run database migrations (pglite):', error);\n }\n }\n}\n","import { logger } from '@elizaos/core';\nimport { migrate } from 'drizzle-orm/node-postgres/migrator';\nimport { drizzle } from 'drizzle-orm/node-postgres';\nimport { dirname as pathDirname, resolve as pathResolve } from 'node:path';\nimport { fileURLToPath } from 'node:url';\nimport pkg, { type Pool as PgPool } from 'pg';\nimport type { IDatabaseClientManager } from '../types';\n\nconst { Pool } = pkg;\n\n/**\n * Manages connections to a PostgreSQL database using a connection pool.\n * Implements IDatabaseClientManager interface.\n */\n\nexport class PostgresConnectionManager implements IDatabaseClientManager<PgPool> {\n private pool: PgPool;\n private isShuttingDown = false;\n private readonly connectionTimeout: number = 5000;\n\n /**\n * Constructor for creating a connection pool.\n * @param {string} connectionString - The connection string used to connect to the database.\n */\n constructor(db: PgPool, connectionString: string) {\n const defaultConfig = {\n max: 20,\n idleTimeoutMillis: 30000,\n connectionTimeoutMillis: this.connectionTimeout,\n };\n\n this.pool = new Pool({\n ...defaultConfig,\n connectionString,\n });\n\n this.pool.on('error', (err) => {\n logger.error('Unexpected pool error', err);\n this.handlePoolError(err);\n });\n\n this.setupPoolErrorHandling();\n // this.testConnection();\n }\n\n /**\n * Handles a pool error by attempting to reconnect the pool.\n *\n * @param {Error} error The error that occurred in the pool.\n * @throws {Error} If failed to reconnect the pool.\n */\n private async handlePoolError(error: Error) {\n logger.error('Pool error occurred, attempting to reconnect', {\n error: error.message,\n });\n\n try {\n await this.pool.end();\n\n this.pool = new Pool({\n ...this.pool.options,\n connectionTimeoutMillis: this.connectionTimeout,\n });\n\n await this.testConnection();\n logger.success('Pool reconnection successful');\n } catch (reconnectError) {\n logger.error('Failed to reconnect pool', {\n error: reconnectError instanceof Error ? reconnectError.message : String(reconnectError),\n });\n throw reconnectError;\n }\n }\n\n /**\n * Asynchronously tests the database connection by executing a query to get the current timestamp.\n *\n * @returns {Promise<boolean>} - A Promise that resolves to true if the database connection test is successful.\n */\n async testConnection(): Promise<boolean> {\n let client: pkg.PoolClient | null = null;\n try {\n client = await this.pool.connect();\n const result = await client.query('SELECT NOW()');\n logger.success('Database connection test successful:', result.rows[0]);\n return true;\n } catch (error) {\n logger.error('Database connection test failed:', error);\n throw new Error(`Failed to connect to database: ${(error as Error).message}`);\n } finally {\n if (client) client.release();\n }\n }\n\n /**\n * Sets up event listeners to handle pool cleanup on SIGINT, SIGTERM, and beforeExit events.\n */\n private setupPoolErrorHandling() {\n process.on('SIGINT', async () => {\n await this.cleanup();\n process.exit(0);\n });\n\n process.on('SIGTERM', async () => {\n await this.cleanup();\n process.exit(0);\n });\n\n process.on('beforeExit', async () => {\n await this.cleanup();\n });\n }\n\n /**\n * Get the connection pool.\n * @returns {PgPool} The connection pool\n * @throws {Error} If the connection manager is shutting down or an error occurs when trying to get the connection from the pool\n */\n public getConnection(): PgPool {\n if (this.isShuttingDown) {\n throw new Error('Connection manager is shutting down');\n }\n\n try {\n return this.pool;\n } catch (error) {\n logger.error('Failed to get connection from pool:', error);\n throw error;\n }\n }\n\n /**\n * Asynchronously acquires a database client from the connection pool.\n *\n * @returns {Promise<pkg.PoolClient>} A Promise that resolves with the acquired database client.\n * @throws {Error} If an error occurs while acquiring the database client.\n */\n public async getClient(): Promise<pkg.PoolClient> {\n try {\n return await this.pool.connect();\n } catch (error) {\n logger.error('Failed to acquire a database client:', error);\n throw error;\n }\n }\n\n /**\n * Initializes the PostgreSQL connection manager by testing the connection and logging the result.\n *\n * @returns {Promise<void>} A Promise that resolves once the manager is successfully initialized\n * @throws {Error} If there is an error initializing the connection manager\n */\n public async initialize(): Promise<void> {\n try {\n // await this.testConnection();\n // logger.debug('PostgreSQL connection manager initialized successfully');\n } catch (error) {\n logger.error('Failed to initialize connection manager:', error);\n throw error;\n }\n }\n\n /**\n * Asynchronously close the current process by executing a cleanup function.\n * @returns A promise that resolves once the cleanup is complete.\n */\n public async close(): Promise<void> {\n await this.cleanup();\n }\n\n /**\n * Cleans up and closes the database pool.\n * @returns {Promise<void>} A Promise that resolves when the database pool is closed.\n */\n async cleanup(): Promise<void> {\n try {\n await this.pool.end();\n logger.info('Database pool closed');\n } catch (error) {\n logger.error('Error closing database pool:', error);\n }\n }\n\n /**\n * Asynchronously runs database migrations using the Drizzle library and ensures\n * the database schema is always up to date with the current schema definition.\n *\n * First applies existing migrations, then uses drizzle-kit push to ensure\n * the database schema matches the current schema definition.\n *\n * @returns {Promise<void>} A Promise that resolves once the schema updates are completed successfully.\n */\n async runMigrations(): Promise<void> {\n // try {\n const { existsSync } = await import('fs');\n const db = drizzle(this.pool);\n\n const packagePath = (await import.meta.resolve('@elizaos/plugin-sql')).replace('file://', '');\n\n const packageMigrationsPath = pathResolve(pathDirname(packagePath), '../drizzle/migrations');\n console.log('packageMigrationsPath', packageMigrationsPath);\n\n const __filename = fileURLToPath(import.meta.url);\n const __dirname = pathDirname(__filename);\n const appMigrationPath = pathResolve(__dirname, '../drizzle/migrations');\n\n console.log('appMigrationPath', appMigrationPath);\n\n // if packageMigrationsPath exists, use it, otherwise use appMigrationPath\n const migrationsFolder = existsSync(packageMigrationsPath)\n ? packageMigrationsPath\n : appMigrationPath;\n\n console.log('migrationsFolder', migrationsFolder);\n // await migrate(db, {\n // migrationsFolder,\n // });\n // run npx drizzle-kit push on migrationsFolder cwd\n const { execa } = await import('execa');\n await execa('npx', ['drizzle-kit', 'push'], {\n cwd: migrationsFolder,\n });\n console.log('migrated');\n // wait 2 seconds\n await new Promise((resolve) => setTimeout(resolve, 2000));\n // } catch (error) {\n // logger.error('Failed to run database migrations or schema push (pg):', error);\n // throw error;\n // }\n }\n}\n"],"mappings":";;;;;AAAA,SAAS,WAAW,aAAa,WAAW,mBAAmB;AAC/D,SAAS,qBAAqB;AAC9B,SAAS,cAAkC;AAC3C,SAAS,qBAAqB;AAC9B,SAAS,cAAc;AACvB,SAAS,cAAc;AACvB,SAAS,eAAe;AACxB,SAAS,eAAe;AAOjB,IAAM,sBAAN,MAAoE;AAAA,EAd3E,OAc2E;AAAA;AAAA;AAAA,EACjE;AAAA,EACA,eAAe;AAAA,EACN,kBAAkB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOnC,YAAY,SAAwB;AAClC,SAAK,SAAS,IAAI,OAAO;AAAA,MACvB,GAAG;AAAA,MACH,YAAY;AAAA,QACV;AAAA,QACA;AAAA,MACF;AAAA,IACF,CAAC;AACD,SAAK,sBAAsB;AAAA,EAC7B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQO,gBAAwB;AAC7B,QAAI,KAAK,cAAc;AACrB,YAAM,IAAI,MAAM,iCAAiC;AAAA,IACnD;AACA,WAAO,KAAK;AAAA,EACd;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,MAAc,mBAAmB;AAC/B,QAAI,KAAK,cAAc;AACrB;AAAA,IACF;AAEA,SAAK,eAAe;AACpB,WAAO,KAAK,gDAAgD;AAE5D,UAAM,UAAU,WAAW,MAAM;AAC/B,aAAO,KAAK,kEAAkE;AAC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