ts-prorm-orm 1.1.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/CHANGELOG.md +1111 -0
- package/LICENSE +21 -0
- package/README.md +573 -0
- package/dist/audit/history-query.js +180 -0
- package/dist/audit/index.js +23 -0
- package/dist/audit/logger.js +236 -0
- package/dist/cache/cache-manager.js +84 -0
- package/dist/cache/index.js +16 -0
- package/dist/cache/redis-cluster-cache.js +557 -0
- package/dist/cli.js +2200 -0
- package/dist/compliance/audit-trail.js +68 -0
- package/dist/compliance/backup-verification.js +685 -0
- package/dist/compliance/breach-detector.js +505 -0
- package/dist/compliance/consent-record.js +227 -0
- package/dist/compliance/consent-versioning.js +331 -0
- package/dist/compliance/cross-border-log.js +530 -0
- package/dist/compliance/data-classifier.js +258 -0
- package/dist/compliance/data-lineage.js +565 -0
- package/dist/compliance/data-masker.js +303 -0
- package/dist/compliance/data-portability.js +265 -0
- package/dist/compliance/data-retention.js +195 -0
- package/dist/compliance/dsar-workflow.js +342 -0
- package/dist/compliance/field-encryption.js +223 -0
- package/dist/compliance/immutable-record.js +148 -0
- package/dist/compliance/index.js +260 -0
- package/dist/compliance/privacy-impact-assessment.js +364 -0
- package/dist/compliance/pseudonymization.js +269 -0
- package/dist/compliance/query-firewall.js +1182 -0
- package/dist/compliance/rate-limiter.js +580 -0
- package/dist/compliance/right-to-erasure.js +117 -0
- package/dist/compliance/row-level-security.js +246 -0
- package/dist/compliance/security-decorator.js +574 -0
- package/dist/compliance/security-monitor.js +525 -0
- package/dist/compliance/sensitive-data-discovery.js +476 -0
- package/dist/compliance/session-isolation.js +472 -0
- package/dist/compliance/tls-enforcer.js +108 -0
- package/dist/compliance/worm-storage.js +712 -0
- package/dist/connection-manager.js +198 -0
- package/dist/connection-pool.js +519 -0
- package/dist/decorators/audit.js +136 -0
- package/dist/decorators/belongs-to-many.js +115 -0
- package/dist/decorators/belongs-to.js +115 -0
- package/dist/decorators/check.js +435 -0
- package/dist/decorators/collate.js +329 -0
- package/dist/decorators/comment.js +205 -0
- package/dist/decorators/database-settings.js +236 -0
- package/dist/decorators/default.js +244 -0
- package/dist/decorators/encryption.js +235 -0
- package/dist/decorators/engine.js +97 -0
- package/dist/decorators/fk-constraints.js +594 -0
- package/dist/decorators/foreign-table.js +136 -0
- package/dist/decorators/generated.js +274 -0
- package/dist/decorators/has-many.js +127 -0
- package/dist/decorators/has-one.js +116 -0
- package/dist/decorators/hstore.js +129 -0
- package/dist/decorators/index.js +355 -0
- package/dist/decorators/json-column.js +83 -0
- package/dist/decorators/jsonb.js +101 -0
- package/dist/decorators/orm-decorators.js +425 -0
- package/dist/decorators/permissions.js +294 -0
- package/dist/decorators/procedure.js +210 -0
- package/dist/decorators/query-options.js +556 -0
- package/dist/decorators/range.js +167 -0
- package/dist/decorators/set-column.js +83 -0
- package/dist/decorators/spatial.js +114 -0
- package/dist/decorators/storage.js +580 -0
- package/dist/decorators/timezone.js +512 -0
- package/dist/decorators/trigger.js +90 -0
- package/dist/decorators/uuid.js +135 -0
- package/dist/decorators/view.js +258 -0
- package/dist/diagrams/chen-diagram.js +354 -0
- package/dist/diagrams/class-diagram.js +384 -0
- package/dist/diagrams/dependency-diagram.js +432 -0
- package/dist/diagrams/er-diagram.js +605 -0
- package/dist/diagrams/flow-diagram.js +394 -0
- package/dist/diagrams/gantt-diagram.js +411 -0
- package/dist/diagrams/index-diagram.js +353 -0
- package/dist/diagrams/index.js +184 -0
- package/dist/diagrams/migration-diagram.js +316 -0
- package/dist/diagrams/model-diagram.js +616 -0
- package/dist/diagrams/package-diagram.js +376 -0
- package/dist/diagrams/palette.js +85 -0
- package/dist/diagrams/relational-diagram.js +455 -0
- package/dist/diagrams/schemadoc-diagram.js +309 -0
- package/dist/diagrams/sequence-diagram.js +307 -0
- package/dist/diagrams/state-diagram.js +344 -0
- package/dist/diagrams/svg-dom.js +111 -0
- package/dist/diagrams/tree-diagram.js +250 -0
- package/dist/dialects/clickhouse/index.js +1742 -0
- package/dist/dialects/cockroachdb/index.js +4677 -0
- package/dist/dialects/cratedb/index.js +441 -0
- package/dist/dialects/databricks/index.js +517 -0
- package/dist/dialects/db2/index.js +2225 -0
- package/dist/dialects/dialect.js +720 -0
- package/dist/dialects/duckdb/index.js +2014 -0
- package/dist/dialects/exasol/index.js +357 -0
- package/dist/dialects/firebird/index.js +495 -0
- package/dist/dialects/greenplum/index.js +457 -0
- package/dist/dialects/hana/index.js +1741 -0
- package/dist/dialects/mariadb/index.js +3590 -0
- package/dist/dialects/mssql/index.js +2296 -0
- package/dist/dialects/mysql/index.js +4058 -0
- package/dist/dialects/oracle/index.js +2999 -0
- package/dist/dialects/postgres/index.js +5319 -0
- package/dist/dialects/query-stream-helper.js +152 -0
- package/dist/dialects/questdb/index.js +433 -0
- package/dist/dialects/redshift/index.js +2277 -0
- package/dist/dialects/singlestore/index.js +354 -0
- package/dist/dialects/snowflake/index.js +2082 -0
- package/dist/dialects/spanner/index.js +1768 -0
- package/dist/dialects/sqlite/index.js +3382 -0
- package/dist/dialects/tidb/index.js +377 -0
- package/dist/dialects/timescaledb/index.js +164 -0
- package/dist/dialects/trino/index.js +420 -0
- package/dist/dialects/turso/index.js +227 -0
- package/dist/dialects/vertica/index.js +317 -0
- package/dist/dialects/yugabytedb/index.js +424 -0
- package/dist/errors/index.js +472 -0
- package/dist/errors/utils.js +340 -0
- package/dist/errors.js +21 -0
- package/dist/extensions/catalog/cloud-warehouse-features.js +207 -0
- package/dist/extensions/catalog/mssql-features.js +147 -0
- package/dist/extensions/catalog/mysql-mariadb-plugins.js +229 -0
- package/dist/extensions/catalog/oracle-db2-features.js +196 -0
- package/dist/extensions/catalog/postgres-extensions.js +516 -0
- package/dist/extensions/index.js +71 -0
- package/dist/extensions/types.js +13 -0
- package/dist/foreign-data.js +173 -0
- package/dist/hooks/hooks-manager.js +350 -0
- package/dist/hooks/index.js +37 -0
- package/dist/index.js +463 -0
- package/dist/logging.js +335 -0
- package/dist/migrations/index.js +40 -0
- package/dist/migrations/migration.js +196 -0
- package/dist/migrations/migrator.js +411 -0
- package/dist/migrations/prormmigration.js +275 -0
- package/dist/migrations/query-interface.js +435 -0
- package/dist/migrations/seeder.js +353 -0
- package/dist/models/associations.js +852 -0
- package/dist/models/constraints.js +288 -0
- package/dist/models/data-types.js +2518 -0
- package/dist/models/decorators.js +445 -0
- package/dist/models/index.js +33 -0
- package/dist/models/indexes.js +531 -0
- package/dist/models/methods.js +382 -0
- package/dist/models/model-manager.js +103 -0
- package/dist/models/model.js +5349 -0
- package/dist/models/operators.js +67 -0
- package/dist/models/scopes.js +189 -0
- package/dist/models/typescript-types.js +26 -0
- package/dist/nosql/aerospike/index.js +205 -0
- package/dist/nosql/allegrograph/index.js +169 -0
- package/dist/nosql/arangodb/index.js +364 -0
- package/dist/nosql/azure-blob/index.js +206 -0
- package/dist/nosql/beanstalkd/index.js +231 -0
- package/dist/nosql/beequeue/index.js +210 -0
- package/dist/nosql/bigchaindb/index.js +195 -0
- package/dist/nosql/bigtable/index.js +224 -0
- package/dist/nosql/blazegraph/index.js +173 -0
- package/dist/nosql/bullmq/index.js +191 -0
- package/dist/nosql/cassandra/index.js +174 -0
- package/dist/nosql/chroma/index.js +190 -0
- package/dist/nosql/cloudflare-kv/index.js +220 -0
- package/dist/nosql/coherence/index.js +200 -0
- package/dist/nosql/cosmosdb/index.js +157 -0
- package/dist/nosql/couchbase/index.js +213 -0
- package/dist/nosql/dax/index.js +212 -0
- package/dist/nosql/deno-kv/index.js +206 -0
- package/dist/nosql/dgraph/index.js +171 -0
- package/dist/nosql/doris/index.js +169 -0
- package/dist/nosql/druid/index.js +162 -0
- package/dist/nosql/dynamodb/index.js +937 -0
- package/dist/nosql/elasticsearch/index.js +377 -0
- package/dist/nosql/etcd/index.js +502 -0
- package/dist/nosql/eventhubs/index.js +213 -0
- package/dist/nosql/eventstore/index.js +254 -0
- package/dist/nosql/faunadb/index.js +188 -0
- package/dist/nosql/firestore/index.js +177 -0
- package/dist/nosql/fluree/index.js +148 -0
- package/dist/nosql/fuseki/index.js +170 -0
- package/dist/nosql/gcs/index.js +172 -0
- package/dist/nosql/gearman/index.js +160 -0
- package/dist/nosql/geode/index.js +196 -0
- package/dist/nosql/graphdb/index.js +169 -0
- package/dist/nosql/graylog/index.js +188 -0
- package/dist/nosql/gridgain/index.js +171 -0
- package/dist/nosql/hazelcast/index.js +162 -0
- package/dist/nosql/hbase/index.js +230 -0
- package/dist/nosql/ignite/index.js +173 -0
- package/dist/nosql/immudb/index.js +184 -0
- package/dist/nosql/index.js +232 -0
- package/dist/nosql/infinispan/index.js +200 -0
- package/dist/nosql/influxdb/index.js +0 -0
- package/dist/nosql/kafka/index.js +234 -0
- package/dist/nosql/keyspaces/index.js +189 -0
- package/dist/nosql/kinesis/index.js +253 -0
- package/dist/nosql/leveldb/index.js +153 -0
- package/dist/nosql/lmdb/index.js +160 -0
- package/dist/nosql/loki/index.js +201 -0
- package/dist/nosql/marklogic/index.js +204 -0
- package/dist/nosql/materialize/index.js +145 -0
- package/dist/nosql/meilisearch/index.js +154 -0
- package/dist/nosql/memcached/index.js +223 -0
- package/dist/nosql/milvus/index.js +410 -0
- package/dist/nosql/minio/index.js +265 -0
- package/dist/nosql/momento/index.js +179 -0
- package/dist/nosql/mongodb/index.js +461 -0
- package/dist/nosql/nats/index.js +247 -0
- package/dist/nosql/nedb/index.js +164 -0
- package/dist/nosql/neo4j/index.js +450 -0
- package/dist/nosql/neptune/index.js +470 -0
- package/dist/nosql/nsq/index.js +200 -0
- package/dist/nosql/opensearch/index.js +186 -0
- package/dist/nosql/orientdb/index.js +175 -0
- package/dist/nosql/papertrail/index.js +200 -0
- package/dist/nosql/pinecone/index.js +0 -0
- package/dist/nosql/pinot/index.js +133 -0
- package/dist/nosql/pouchdb/index.js +172 -0
- package/dist/nosql/prometheus/index.js +174 -0
- package/dist/nosql/provendb/index.js +147 -0
- package/dist/nosql/pubsub/index.js +187 -0
- package/dist/nosql/pulsar/index.js +232 -0
- package/dist/nosql/qdrant/index.js +295 -0
- package/dist/nosql/qldb/index.js +192 -0
- package/dist/nosql/r2/index.js +281 -0
- package/dist/nosql/rabbitmq/index.js +237 -0
- package/dist/nosql/ravendb/index.js +175 -0
- package/dist/nosql/redis/index.js +607 -0
- package/dist/nosql/redpanda/index.js +237 -0
- package/dist/nosql/resque/index.js +203 -0
- package/dist/nosql/rethinkdb/index.js +232 -0
- package/dist/nosql/rocksdb/index.js +152 -0
- package/dist/nosql/rockset/index.js +126 -0
- package/dist/nosql/s3/index.js +298 -0
- package/dist/nosql/scylladb/index.js +178 -0
- package/dist/nosql/signoz/index.js +227 -0
- package/dist/nosql/sns/index.js +201 -0
- package/dist/nosql/solr/index.js +231 -0
- package/dist/nosql/splunk/index.js +227 -0
- package/dist/nosql/sqs/index.js +246 -0
- package/dist/nosql/stardog/index.js +169 -0
- package/dist/nosql/starrocks/index.js +170 -0
- package/dist/nosql/store.js +2 -0
- package/dist/nosql/sumologic/index.js +213 -0
- package/dist/nosql/surrealdb/index.js +179 -0
- package/dist/nosql/terminusdb/index.js +151 -0
- package/dist/nosql/tigergraph/index.js +469 -0
- package/dist/nosql/typesense/index.js +148 -0
- package/dist/nosql/unqlite/index.js +157 -0
- package/dist/nosql/upstash/index.js +167 -0
- package/dist/nosql/vercel-kv/index.js +166 -0
- package/dist/nosql/victoriametrics/index.js +213 -0
- package/dist/nosql/virtuoso/index.js +169 -0
- package/dist/nosql/weaviate/index.js +276 -0
- package/dist/operators/index.js +108 -0
- package/dist/operators.js +2690 -0
- package/dist/prisma-migrate/index.js +38 -0
- package/dist/prisma-migrate/migration-generator.js +125 -0
- package/dist/prisma-migrate/model-generator.js +172 -0
- package/dist/prisma-migrate/relations.js +100 -0
- package/dist/prisma-migrate/schema-parser.js +167 -0
- package/dist/prisma-migrate/type-mapper.js +40 -0
- package/dist/prorm.js +6832 -0
- package/dist/query-builders/cte-builder.js +80 -0
- package/dist/query-builders/functions/aggregate.js +390 -0
- package/dist/query-builders/functions/conditional.js +503 -0
- package/dist/query-builders/functions/datetime.js +695 -0
- package/dist/query-builders/functions/fulltext.js +439 -0
- package/dist/query-builders/functions/index.js +93 -0
- package/dist/query-builders/functions/json.js +427 -0
- package/dist/query-builders/functions/math.js +399 -0
- package/dist/query-builders/functions/string.js +518 -0
- package/dist/query-builders/functions/window.js +328 -0
- package/dist/query-builders/include-builder.js +323 -0
- package/dist/query-builders/index-expression-builder.js +242 -0
- package/dist/query-builders/index.js +161 -0
- package/dist/query-builders/insert-builder.js +164 -0
- package/dist/query-builders/model-helpers.js +38 -0
- package/dist/query-builders/order-limit-builder.js +239 -0
- package/dist/query-builders/sql-compiler.js +2040 -0
- package/dist/query-builders/subquery-builder.js +152 -0
- package/dist/query-builders/update-builder.js +182 -0
- package/dist/query-builders/view-builder.js +218 -0
- package/dist/query-builders/where-builder.js +1532 -0
- package/dist/query-interface.js +622 -0
- package/dist/query-optimizers/batch-optimizer.js +426 -0
- package/dist/query-optimizers/explain-plans.js +415 -0
- package/dist/query-optimizers/index.js +51 -0
- package/dist/query-optimizers/prepared-statement-cache.js +423 -0
- package/dist/query-optimizers/query-hints.js +438 -0
- package/dist/query-optimizers/query-optimizer.js +278 -0
- package/dist/query-optimizers/slow-query-logger.js +271 -0
- package/dist/replica-manager.js +507 -0
- package/dist/schema/index.js +15 -0
- package/dist/schema/migration-generator.js +374 -0
- package/dist/schema/schema-differ.js +549 -0
- package/dist/schema/types.js +6 -0
- package/dist/sql-constants.js +300 -0
- package/dist/sqlite-advanced.js +1047 -0
- package/dist/streams/index.js +12 -0
- package/dist/streams/transforms.js +178 -0
- package/dist/transaction.js +456 -0
- package/dist/types/index.js +180 -0
- package/dist/user-management.js +127 -0
- package/dist/utils/date.js +300 -0
- package/dist/utils/index.js +1079 -0
- package/dist/utils/string.js +161 -0
- package/dist/validators/index.js +19 -0
- package/dist/validators/validator.js +911 -0
- package/package.json +190 -0
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Foreign Data Wrapper (FDW) support for PostgreSQL
|
|
4
|
+
*
|
|
5
|
+
* Provides management of:
|
|
6
|
+
* - Foreign servers (CREATE/ALTER/DROP FOREIGN SERVER)
|
|
7
|
+
* - User mappings (CREATE/ALTER/DROP USER MAPPING)
|
|
8
|
+
* - Foreign tables (CREATE/DROP FOREIGN TABLE, IMPORT FOREIGN SCHEMA)
|
|
9
|
+
*
|
|
10
|
+
* FDW is a PostgreSQL-only feature; attempting to use these APIs with SQLite
|
|
11
|
+
* or MySQL will throw a DatabaseError.
|
|
12
|
+
*/
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.ForeignDataManager = exports.KNOWN_FDWS = void 0;
|
|
15
|
+
exports.buildOptionsClause = buildOptionsClause;
|
|
16
|
+
// ---------------------------------------------------------------------------
|
|
17
|
+
// Well-known FDW extension names
|
|
18
|
+
// ---------------------------------------------------------------------------
|
|
19
|
+
/**
|
|
20
|
+
* Catalog of well-known Foreign Data Wrapper extension names.
|
|
21
|
+
*/
|
|
22
|
+
exports.KNOWN_FDWS = {
|
|
23
|
+
POSTGRES: 'postgres_fdw', // PostgreSQL -> PostgreSQL
|
|
24
|
+
MYSQL: 'mysql_fdw', // PostgreSQL -> MySQL/MariaDB
|
|
25
|
+
REDIS: 'redis_fdw', // PostgreSQL -> Redis
|
|
26
|
+
MONGO: 'mongo_fdw', // PostgreSQL -> MongoDB
|
|
27
|
+
FILE: 'file_fdw', // PostgreSQL -> CSV/files (built-in)
|
|
28
|
+
S3: 'parquet_s3_fdw', // PostgreSQL -> S3/Parquet
|
|
29
|
+
SQLITE: 'sqlite_fdw', // PostgreSQL -> SQLite
|
|
30
|
+
ORACLE: 'oracle_fdw', // PostgreSQL -> Oracle
|
|
31
|
+
ODBC: 'odbc_fdw', // PostgreSQL -> any ODBC source
|
|
32
|
+
TDS: 'tds_fdw', // PostgreSQL -> SQL Server/Sybase
|
|
33
|
+
CSTORE: 'cstore_fdw', // Columnar storage
|
|
34
|
+
MULTICORN: 'multicorn', // Python-based FDW framework
|
|
35
|
+
};
|
|
36
|
+
// ---------------------------------------------------------------------------
|
|
37
|
+
// ForeignDataManager
|
|
38
|
+
// ---------------------------------------------------------------------------
|
|
39
|
+
/**
|
|
40
|
+
* Manages Foreign Data Wrapper objects (servers, user mappings, foreign tables)
|
|
41
|
+
* for a Prorm instance.
|
|
42
|
+
*
|
|
43
|
+
* All operations delegate SQL generation to the underlying dialect so that
|
|
44
|
+
* non-PostgreSQL dialects can throw meaningful errors at a single point.
|
|
45
|
+
*/
|
|
46
|
+
class ForeignDataManager {
|
|
47
|
+
constructor(prorm) {
|
|
48
|
+
this.prorm = prorm;
|
|
49
|
+
}
|
|
50
|
+
// -------------------------------------------------------------------------
|
|
51
|
+
// Foreign Servers
|
|
52
|
+
// -------------------------------------------------------------------------
|
|
53
|
+
/**
|
|
54
|
+
* CREATE FOREIGN SERVER
|
|
55
|
+
*/
|
|
56
|
+
async createServer(name, opts) {
|
|
57
|
+
const sql = this.prorm.dialect.buildCreateServerQuery(name, opts);
|
|
58
|
+
await this.prorm.dialect.query(sql);
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* ALTER FOREIGN SERVER
|
|
62
|
+
*/
|
|
63
|
+
async alterServer(name, opts) {
|
|
64
|
+
const sql = this.prorm.dialect.buildAlterServerQuery(name, opts);
|
|
65
|
+
await this.prorm.dialect.query(sql);
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* DROP FOREIGN SERVER
|
|
69
|
+
*/
|
|
70
|
+
async dropServer(name, opts) {
|
|
71
|
+
const sql = this.prorm.dialect.buildDropServerQuery(name, opts);
|
|
72
|
+
await this.prorm.dialect.query(sql);
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* List all foreign servers visible in the current database.
|
|
76
|
+
*/
|
|
77
|
+
async getServers() {
|
|
78
|
+
const sql = this.prorm.dialect.getServersQuery();
|
|
79
|
+
const result = await this.prorm.dialect.query(sql, { raw: true });
|
|
80
|
+
return (result.rows ?? []).map((row) => ({
|
|
81
|
+
name: row.srvname,
|
|
82
|
+
fdw: row.fdwname,
|
|
83
|
+
options: parsePgOptions(row.srvoptions),
|
|
84
|
+
}));
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Return true if a foreign server with the given name exists.
|
|
88
|
+
*/
|
|
89
|
+
async serverExists(name) {
|
|
90
|
+
const servers = await this.getServers();
|
|
91
|
+
return servers.some((s) => s.name === name);
|
|
92
|
+
}
|
|
93
|
+
// -------------------------------------------------------------------------
|
|
94
|
+
// User Mappings
|
|
95
|
+
// -------------------------------------------------------------------------
|
|
96
|
+
/**
|
|
97
|
+
* CREATE USER MAPPING
|
|
98
|
+
*/
|
|
99
|
+
async createUserMapping(opts) {
|
|
100
|
+
const sql = this.prorm.dialect.buildCreateUserMappingQuery(opts);
|
|
101
|
+
await this.prorm.dialect.query(sql);
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* ALTER USER MAPPING (re-uses the same SQL builder as CREATE with altered keywords)
|
|
105
|
+
*/
|
|
106
|
+
async alterUserMapping(opts) {
|
|
107
|
+
const sql = this.prorm.dialect.buildAlterUserMappingQuery(opts);
|
|
108
|
+
await this.prorm.dialect.query(sql);
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* DROP USER MAPPING
|
|
112
|
+
*/
|
|
113
|
+
async dropUserMapping(serverName, user = 'CURRENT_USER', opts) {
|
|
114
|
+
const sql = this.prorm.dialect.buildDropUserMappingQuery(serverName, user, opts);
|
|
115
|
+
await this.prorm.dialect.query(sql);
|
|
116
|
+
}
|
|
117
|
+
// -------------------------------------------------------------------------
|
|
118
|
+
// Foreign Tables
|
|
119
|
+
// -------------------------------------------------------------------------
|
|
120
|
+
/**
|
|
121
|
+
* CREATE FOREIGN TABLE
|
|
122
|
+
*/
|
|
123
|
+
async createForeignTable(tableName, opts) {
|
|
124
|
+
const sql = this.prorm.dialect.buildCreateForeignTableQuery(tableName, opts);
|
|
125
|
+
await this.prorm.dialect.query(sql);
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* DROP FOREIGN TABLE
|
|
129
|
+
*/
|
|
130
|
+
async dropForeignTable(tableName, opts) {
|
|
131
|
+
const sql = this.prorm.dialect.buildDropForeignTableQuery(tableName, opts);
|
|
132
|
+
await this.prorm.dialect.query(sql);
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* IMPORT FOREIGN SCHEMA
|
|
136
|
+
*/
|
|
137
|
+
async importForeignSchema(remoteSchema, serverName, opts) {
|
|
138
|
+
const sql = this.prorm.dialect.buildImportForeignSchemaQuery(remoteSchema, serverName, opts);
|
|
139
|
+
await this.prorm.dialect.query(sql);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
exports.ForeignDataManager = ForeignDataManager;
|
|
143
|
+
// ---------------------------------------------------------------------------
|
|
144
|
+
// Helpers
|
|
145
|
+
// ---------------------------------------------------------------------------
|
|
146
|
+
/**
|
|
147
|
+
* Parse a PostgreSQL options array (e.g. ['"host=localhost"', '"port=5432"'])
|
|
148
|
+
* into a plain Record<string, string>.
|
|
149
|
+
*/
|
|
150
|
+
function parsePgOptions(raw) {
|
|
151
|
+
if (!raw || !Array.isArray(raw))
|
|
152
|
+
return {};
|
|
153
|
+
const out = {};
|
|
154
|
+
for (const item of raw) {
|
|
155
|
+
// Items come back as 'key=value' or '"key=value"'
|
|
156
|
+
const cleaned = item.replace(/^"(.*)"$/, '$1');
|
|
157
|
+
const eqIdx = cleaned.indexOf('=');
|
|
158
|
+
if (eqIdx === -1)
|
|
159
|
+
continue;
|
|
160
|
+
const key = cleaned.slice(0, eqIdx);
|
|
161
|
+
const val = cleaned.slice(eqIdx + 1);
|
|
162
|
+
out[key] = val;
|
|
163
|
+
}
|
|
164
|
+
return out;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Build a PostgreSQL OPTIONS (...) clause from a plain object.
|
|
168
|
+
* Each value is single-quoted and existing single quotes are escaped.
|
|
169
|
+
*/
|
|
170
|
+
function buildOptionsClause(opts) {
|
|
171
|
+
const pairs = Object.entries(opts).map(([k, v]) => `${k} '${v.replace(/'/g, "''")}'`);
|
|
172
|
+
return `OPTIONS (${pairs.join(', ')})`;
|
|
173
|
+
}
|
|
@@ -0,0 +1,350 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Hooks Manager for the TypeScript ORM
|
|
4
|
+
* Provides a centralized system for managing Prorm-style model hooks
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.HooksManager = void 0;
|
|
8
|
+
exports.createHooksObject = createHooksObject;
|
|
9
|
+
exports.addHookMethods = addHookMethods;
|
|
10
|
+
exports.beforeValidate = beforeValidate;
|
|
11
|
+
exports.afterValidate = afterValidate;
|
|
12
|
+
exports.beforeCreate = beforeCreate;
|
|
13
|
+
exports.afterCreate = afterCreate;
|
|
14
|
+
exports.beforeUpdate = beforeUpdate;
|
|
15
|
+
exports.afterUpdate = afterUpdate;
|
|
16
|
+
exports.beforeDestroy = beforeDestroy;
|
|
17
|
+
exports.afterDestroy = afterDestroy;
|
|
18
|
+
exports.beforeSave = beforeSave;
|
|
19
|
+
exports.afterSave = afterSave;
|
|
20
|
+
exports.beforeBulkCreate = beforeBulkCreate;
|
|
21
|
+
exports.afterBulkCreate = afterBulkCreate;
|
|
22
|
+
exports.beforeBulkUpdate = beforeBulkUpdate;
|
|
23
|
+
exports.afterBulkUpdate = afterBulkUpdate;
|
|
24
|
+
exports.beforeBulkDestroy = beforeBulkDestroy;
|
|
25
|
+
exports.afterBulkDestroy = afterBulkDestroy;
|
|
26
|
+
exports.beforeFind = beforeFind;
|
|
27
|
+
exports.afterFind = afterFind;
|
|
28
|
+
// ==================== Hooks Manager Class ====================
|
|
29
|
+
/**
|
|
30
|
+
* HooksManager - Manages all lifecycle hooks for a model
|
|
31
|
+
*/
|
|
32
|
+
class HooksManager {
|
|
33
|
+
constructor(modelName = 'AnonymousModel') {
|
|
34
|
+
this.hooks = new Map();
|
|
35
|
+
this.modelName = modelName;
|
|
36
|
+
this.initializeHooks();
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Initialize all hook types as empty Sets
|
|
40
|
+
*/
|
|
41
|
+
initializeHooks() {
|
|
42
|
+
const hookNames = [
|
|
43
|
+
'beforeValidate',
|
|
44
|
+
'afterValidate',
|
|
45
|
+
'beforeCreate',
|
|
46
|
+
'afterCreate',
|
|
47
|
+
'beforeUpdate',
|
|
48
|
+
'afterUpdate',
|
|
49
|
+
'beforeDestroy',
|
|
50
|
+
'afterDestroy',
|
|
51
|
+
'beforeSave',
|
|
52
|
+
'afterSave',
|
|
53
|
+
'beforeBulkCreate',
|
|
54
|
+
'afterBulkCreate',
|
|
55
|
+
'beforeBulkUpdate',
|
|
56
|
+
'afterBulkUpdate',
|
|
57
|
+
'beforeBulkDestroy',
|
|
58
|
+
'afterBulkDestroy',
|
|
59
|
+
'beforeFind',
|
|
60
|
+
'afterFind',
|
|
61
|
+
];
|
|
62
|
+
for (const hookName of hookNames) {
|
|
63
|
+
this.hooks.set(hookName, new Set());
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Get all hooks
|
|
68
|
+
*/
|
|
69
|
+
getHooks() {
|
|
70
|
+
return this.hooks;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Get hooks for a specific hook name
|
|
74
|
+
*/
|
|
75
|
+
getHook(hookName) {
|
|
76
|
+
return this.hooks.get(hookName) || new Set();
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Add a hook callback
|
|
80
|
+
*/
|
|
81
|
+
addHook(hookName, callback) {
|
|
82
|
+
const normalizedName = this.normalizeHookName(hookName);
|
|
83
|
+
if (!this.hooks.has(normalizedName)) {
|
|
84
|
+
this.hooks.set(normalizedName, new Set());
|
|
85
|
+
}
|
|
86
|
+
const hookSet = this.hooks.get(normalizedName);
|
|
87
|
+
hookSet.add(callback);
|
|
88
|
+
return this;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Remove a hook callback
|
|
92
|
+
*/
|
|
93
|
+
removeHook(hookName, callback) {
|
|
94
|
+
const normalizedName = this.normalizeHookName(hookName);
|
|
95
|
+
const hookSet = this.hooks.get(normalizedName);
|
|
96
|
+
if (hookSet) {
|
|
97
|
+
hookSet.delete(callback);
|
|
98
|
+
}
|
|
99
|
+
return this;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Run all callbacks for a specific hook
|
|
103
|
+
*/
|
|
104
|
+
async runHook(hookName, ...args) {
|
|
105
|
+
const normalizedName = this.normalizeHookName(hookName);
|
|
106
|
+
const hookSet = this.hooks.get(normalizedName);
|
|
107
|
+
if (!hookSet || hookSet.size === 0) {
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
const isBulkHook = normalizedName.startsWith('beforeBulk') || normalizedName.startsWith('afterBulk');
|
|
111
|
+
const isFindHook = normalizedName === 'beforeFind' || normalizedName === 'afterFind';
|
|
112
|
+
for (const callback of hookSet) {
|
|
113
|
+
try {
|
|
114
|
+
if (isBulkHook) {
|
|
115
|
+
// Bulk hooks receive (instances, options)
|
|
116
|
+
await callback(args[0], args[1]);
|
|
117
|
+
}
|
|
118
|
+
else if (isFindHook) {
|
|
119
|
+
// Find hooks receive (options)
|
|
120
|
+
await callback(args[0]);
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
// Instance hooks receive (instance, options)
|
|
124
|
+
await callback(args[0], args[1]);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
catch (error) {
|
|
128
|
+
throw new Error(`Error in ${this.modelName}.${normalizedName} hook: ${error instanceof Error ? error.message : String(error)}`);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Check if a hook has registered callbacks
|
|
134
|
+
*/
|
|
135
|
+
hasHook(hookName) {
|
|
136
|
+
const normalizedName = this.normalizeHookName(hookName);
|
|
137
|
+
const hookSet = this.hooks.get(normalizedName);
|
|
138
|
+
return hookSet ? hookSet.size > 0 : false;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Get the count of hooks for a specific hook name
|
|
142
|
+
*/
|
|
143
|
+
getHookCount(hookName) {
|
|
144
|
+
const normalizedName = this.normalizeHookName(hookName);
|
|
145
|
+
const hookSet = this.hooks.get(normalizedName);
|
|
146
|
+
return hookSet ? hookSet.size : 0;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Clear all hooks
|
|
150
|
+
*/
|
|
151
|
+
clearHooks() {
|
|
152
|
+
for (const hookSet of this.hooks.values()) {
|
|
153
|
+
hookSet.clear();
|
|
154
|
+
}
|
|
155
|
+
return this;
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Clear hooks for a specific hook name
|
|
159
|
+
*/
|
|
160
|
+
clearHook(hookName) {
|
|
161
|
+
const normalizedName = this.normalizeHookName(hookName);
|
|
162
|
+
const hookSet = this.hooks.get(normalizedName);
|
|
163
|
+
if (hookSet) {
|
|
164
|
+
hookSet.clear();
|
|
165
|
+
}
|
|
166
|
+
return this;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Normalize hook name to camelCase
|
|
170
|
+
*/
|
|
171
|
+
normalizeHookName(hookName) {
|
|
172
|
+
return hookName
|
|
173
|
+
.replace(/^(before|after)_/i, (_, prefix) => prefix + hookName.charAt(prefix.length).toUpperCase())
|
|
174
|
+
.replace(/_([a-z])/g, (_, letter) => letter.toUpperCase());
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
exports.HooksManager = HooksManager;
|
|
178
|
+
// ==================== Hook Wrapper Functions ====================
|
|
179
|
+
/**
|
|
180
|
+
* Create a hooks object compatible with Model options
|
|
181
|
+
*/
|
|
182
|
+
function createHooksObject(hooksManager) {
|
|
183
|
+
const hooksObj = {};
|
|
184
|
+
const hookNames = [
|
|
185
|
+
'beforeValidate',
|
|
186
|
+
'afterValidate',
|
|
187
|
+
'beforeCreate',
|
|
188
|
+
'afterCreate',
|
|
189
|
+
'beforeUpdate',
|
|
190
|
+
'afterUpdate',
|
|
191
|
+
'beforeDestroy',
|
|
192
|
+
'afterDestroy',
|
|
193
|
+
'beforeSave',
|
|
194
|
+
'afterSave',
|
|
195
|
+
'beforeBulkCreate',
|
|
196
|
+
'afterBulkCreate',
|
|
197
|
+
'beforeBulkUpdate',
|
|
198
|
+
'afterBulkUpdate',
|
|
199
|
+
'beforeBulkDestroy',
|
|
200
|
+
'afterBulkDestroy',
|
|
201
|
+
'beforeFind',
|
|
202
|
+
'afterFind',
|
|
203
|
+
];
|
|
204
|
+
for (const hookName of hookNames) {
|
|
205
|
+
hooksObj[hookName] = async (instance, options) => {
|
|
206
|
+
await hooksManager.runHook(hookName, instance, options);
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
return hooksObj;
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Mixin function to add hook methods to a Model class
|
|
213
|
+
*/
|
|
214
|
+
function addHookMethods(target, hooksManager) {
|
|
215
|
+
/**
|
|
216
|
+
* Add a hook
|
|
217
|
+
*/
|
|
218
|
+
target.addHook = function (hookName, callback) {
|
|
219
|
+
return hooksManager.addHook(hookName, callback);
|
|
220
|
+
};
|
|
221
|
+
/**
|
|
222
|
+
* Remove a hook
|
|
223
|
+
*/
|
|
224
|
+
target.removeHook = function (hookName, callback) {
|
|
225
|
+
return hooksManager.removeHook(hookName, callback);
|
|
226
|
+
};
|
|
227
|
+
/**
|
|
228
|
+
* Run a hook
|
|
229
|
+
*/
|
|
230
|
+
target.runHook = async function (hookName, ...args) {
|
|
231
|
+
return hooksManager.runHook(hookName, ...args);
|
|
232
|
+
};
|
|
233
|
+
/**
|
|
234
|
+
* Check if a hook exists
|
|
235
|
+
*/
|
|
236
|
+
target.hasHook = function (hookName) {
|
|
237
|
+
return hooksManager.hasHook(hookName);
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
// ==================== Convenience Hook Creators ====================
|
|
241
|
+
/**
|
|
242
|
+
* Create a beforeValidate hook wrapper
|
|
243
|
+
*/
|
|
244
|
+
function beforeValidate(callback) {
|
|
245
|
+
return { beforeValidate: callback };
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Create an afterValidate hook wrapper
|
|
249
|
+
*/
|
|
250
|
+
function afterValidate(callback) {
|
|
251
|
+
return { afterValidate: callback };
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* Create a beforeCreate hook wrapper
|
|
255
|
+
*/
|
|
256
|
+
function beforeCreate(callback) {
|
|
257
|
+
return { beforeCreate: callback };
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* Create an afterCreate hook wrapper
|
|
261
|
+
*/
|
|
262
|
+
function afterCreate(callback) {
|
|
263
|
+
return { afterCreate: callback };
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* Create a beforeUpdate hook wrapper
|
|
267
|
+
*/
|
|
268
|
+
function beforeUpdate(callback) {
|
|
269
|
+
return { beforeUpdate: callback };
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* Create an afterUpdate hook wrapper
|
|
273
|
+
*/
|
|
274
|
+
function afterUpdate(callback) {
|
|
275
|
+
return { afterUpdate: callback };
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* Create a beforeDestroy hook wrapper
|
|
279
|
+
*/
|
|
280
|
+
function beforeDestroy(callback) {
|
|
281
|
+
return { beforeDestroy: callback };
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* Create an afterDestroy hook wrapper
|
|
285
|
+
*/
|
|
286
|
+
function afterDestroy(callback) {
|
|
287
|
+
return { afterDestroy: callback };
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* Create a beforeSave hook wrapper
|
|
291
|
+
*/
|
|
292
|
+
function beforeSave(callback) {
|
|
293
|
+
return { beforeSave: callback };
|
|
294
|
+
}
|
|
295
|
+
/**
|
|
296
|
+
* Create an afterSave hook wrapper
|
|
297
|
+
*/
|
|
298
|
+
function afterSave(callback) {
|
|
299
|
+
return { afterSave: callback };
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* Create a beforeBulkCreate hook wrapper
|
|
303
|
+
*/
|
|
304
|
+
function beforeBulkCreate(callback) {
|
|
305
|
+
return { beforeBulkCreate: callback };
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* Create an afterBulkCreate hook wrapper
|
|
309
|
+
*/
|
|
310
|
+
function afterBulkCreate(callback) {
|
|
311
|
+
return { afterBulkCreate: callback };
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* Create a beforeBulkUpdate hook wrapper
|
|
315
|
+
*/
|
|
316
|
+
function beforeBulkUpdate(callback) {
|
|
317
|
+
return { beforeBulkUpdate: callback };
|
|
318
|
+
}
|
|
319
|
+
/**
|
|
320
|
+
* Create an afterBulkUpdate hook wrapper
|
|
321
|
+
*/
|
|
322
|
+
function afterBulkUpdate(callback) {
|
|
323
|
+
return { afterBulkUpdate: callback };
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
* Create a beforeBulkDestroy hook wrapper
|
|
327
|
+
*/
|
|
328
|
+
function beforeBulkDestroy(callback) {
|
|
329
|
+
return { beforeBulkDestroy: callback };
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
332
|
+
* Create an afterBulkDestroy hook wrapper
|
|
333
|
+
*/
|
|
334
|
+
function afterBulkDestroy(callback) {
|
|
335
|
+
return { afterBulkDestroy: callback };
|
|
336
|
+
}
|
|
337
|
+
/**
|
|
338
|
+
* Create a beforeFind hook wrapper
|
|
339
|
+
*/
|
|
340
|
+
function beforeFind(callback) {
|
|
341
|
+
return { beforeFind: callback };
|
|
342
|
+
}
|
|
343
|
+
/**
|
|
344
|
+
* Create an afterFind hook wrapper
|
|
345
|
+
*/
|
|
346
|
+
function afterFind(callback) {
|
|
347
|
+
return { afterFind: callback };
|
|
348
|
+
}
|
|
349
|
+
// ==================== Default Export ====================
|
|
350
|
+
exports.default = HooksManager;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Hooks module exports for the TypeScript ORM
|
|
4
|
+
* Provides a comprehensive hooks system for model lifecycle events
|
|
5
|
+
*/
|
|
6
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
|
+
};
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.afterFind = exports.beforeFind = exports.afterBulkDestroy = exports.beforeBulkDestroy = exports.afterBulkUpdate = exports.beforeBulkUpdate = exports.afterBulkCreate = exports.beforeBulkCreate = exports.afterSave = exports.beforeSave = exports.afterDestroy = exports.beforeDestroy = exports.afterUpdate = exports.beforeUpdate = exports.afterCreate = exports.beforeCreate = exports.afterValidate = exports.beforeValidate = exports.addHookMethods = exports.createHooksObject = exports.default = exports.HooksManager = void 0;
|
|
11
|
+
// Main HooksManager class
|
|
12
|
+
var hooks_manager_1 = require("./hooks-manager");
|
|
13
|
+
Object.defineProperty(exports, "HooksManager", { enumerable: true, get: function () { return hooks_manager_1.HooksManager; } });
|
|
14
|
+
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(hooks_manager_1).default; } });
|
|
15
|
+
// Hook wrapper functions
|
|
16
|
+
var hooks_manager_2 = require("./hooks-manager");
|
|
17
|
+
Object.defineProperty(exports, "createHooksObject", { enumerable: true, get: function () { return hooks_manager_2.createHooksObject; } });
|
|
18
|
+
Object.defineProperty(exports, "addHookMethods", { enumerable: true, get: function () { return hooks_manager_2.addHookMethods; } });
|
|
19
|
+
// Individual hook creators
|
|
20
|
+
Object.defineProperty(exports, "beforeValidate", { enumerable: true, get: function () { return hooks_manager_2.beforeValidate; } });
|
|
21
|
+
Object.defineProperty(exports, "afterValidate", { enumerable: true, get: function () { return hooks_manager_2.afterValidate; } });
|
|
22
|
+
Object.defineProperty(exports, "beforeCreate", { enumerable: true, get: function () { return hooks_manager_2.beforeCreate; } });
|
|
23
|
+
Object.defineProperty(exports, "afterCreate", { enumerable: true, get: function () { return hooks_manager_2.afterCreate; } });
|
|
24
|
+
Object.defineProperty(exports, "beforeUpdate", { enumerable: true, get: function () { return hooks_manager_2.beforeUpdate; } });
|
|
25
|
+
Object.defineProperty(exports, "afterUpdate", { enumerable: true, get: function () { return hooks_manager_2.afterUpdate; } });
|
|
26
|
+
Object.defineProperty(exports, "beforeDestroy", { enumerable: true, get: function () { return hooks_manager_2.beforeDestroy; } });
|
|
27
|
+
Object.defineProperty(exports, "afterDestroy", { enumerable: true, get: function () { return hooks_manager_2.afterDestroy; } });
|
|
28
|
+
Object.defineProperty(exports, "beforeSave", { enumerable: true, get: function () { return hooks_manager_2.beforeSave; } });
|
|
29
|
+
Object.defineProperty(exports, "afterSave", { enumerable: true, get: function () { return hooks_manager_2.afterSave; } });
|
|
30
|
+
Object.defineProperty(exports, "beforeBulkCreate", { enumerable: true, get: function () { return hooks_manager_2.beforeBulkCreate; } });
|
|
31
|
+
Object.defineProperty(exports, "afterBulkCreate", { enumerable: true, get: function () { return hooks_manager_2.afterBulkCreate; } });
|
|
32
|
+
Object.defineProperty(exports, "beforeBulkUpdate", { enumerable: true, get: function () { return hooks_manager_2.beforeBulkUpdate; } });
|
|
33
|
+
Object.defineProperty(exports, "afterBulkUpdate", { enumerable: true, get: function () { return hooks_manager_2.afterBulkUpdate; } });
|
|
34
|
+
Object.defineProperty(exports, "beforeBulkDestroy", { enumerable: true, get: function () { return hooks_manager_2.beforeBulkDestroy; } });
|
|
35
|
+
Object.defineProperty(exports, "afterBulkDestroy", { enumerable: true, get: function () { return hooks_manager_2.afterBulkDestroy; } });
|
|
36
|
+
Object.defineProperty(exports, "beforeFind", { enumerable: true, get: function () { return hooks_manager_2.beforeFind; } });
|
|
37
|
+
Object.defineProperty(exports, "afterFind", { enumerable: true, get: function () { return hooks_manager_2.afterFind; } });
|