arkormx 2.11.13 → 2.12.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/dist/cli.mjs +2893 -2809
- package/dist/{index-B9svndOx.d.cts → index-D7YII9Fu.d.cts} +55 -2
- package/dist/{index-zjj05F0G.d.mts → index-XrPjh7V8.d.mts} +55 -2
- package/dist/index.cjs +227 -128
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +272 -175
- package/dist/relationship/index.cjs +1 -1
- package/dist/relationship/index.d.cts +1 -1
- package/dist/relationship/index.d.mts +1 -1
- package/dist/relationship/index.mjs +1 -1
- package/dist/{relationship-DYMxYzUD.mjs → relationship-2jzLUHCB.mjs} +2745 -2729
- package/dist/{relationship-CBYK5LE3.cjs → relationship-BoQDV6gx.cjs} +2098 -2076
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_relationship = require('./relationship-
|
|
2
|
+
const require_relationship = require('./relationship-BoQDV6gx.cjs');
|
|
3
3
|
let pg = require("pg");
|
|
4
4
|
let node_path = require("node:path");
|
|
5
|
+
let node_fs = require("node:fs");
|
|
6
|
+
let jiti = require("jiti");
|
|
7
|
+
let node_url = require("node:url");
|
|
5
8
|
let module$1 = require("module");
|
|
6
9
|
let fs = require("fs");
|
|
7
10
|
let path = require("path");
|
|
8
|
-
let node_fs = require("node:fs");
|
|
9
11
|
let _h3ravel_support = require("@h3ravel/support");
|
|
10
12
|
let node_async_hooks = require("node:async_hooks");
|
|
11
13
|
let kysely = require("kysely");
|
|
@@ -2380,6 +2382,92 @@ const createPrismaDatabaseAdapter = (prisma, mapping = {}) => {
|
|
|
2380
2382
|
*/
|
|
2381
2383
|
const createPrismaCompatibilityAdapter = createPrismaDatabaseAdapter;
|
|
2382
2384
|
|
|
2385
|
+
//#endregion
|
|
2386
|
+
//#region src/helpers/model-resolver.ts
|
|
2387
|
+
const modelExtensions = [
|
|
2388
|
+
".ts",
|
|
2389
|
+
".tsx",
|
|
2390
|
+
".mts",
|
|
2391
|
+
".cts",
|
|
2392
|
+
".js",
|
|
2393
|
+
".mjs",
|
|
2394
|
+
".cjs"
|
|
2395
|
+
];
|
|
2396
|
+
const isModelModule = (value) => typeof value === "object" && value !== null;
|
|
2397
|
+
const isModelConstructor = (value) => {
|
|
2398
|
+
if (typeof value !== "function") return false;
|
|
2399
|
+
const candidate = value;
|
|
2400
|
+
return typeof candidate.query === "function" && typeof candidate.hydrate === "function" && typeof candidate.getTable === "function" && typeof candidate.getPrimaryKey === "function";
|
|
2401
|
+
};
|
|
2402
|
+
const resolveModelExport = (module, modelName) => {
|
|
2403
|
+
if (!isModelModule(module)) return module;
|
|
2404
|
+
return module.default ?? module[modelName] ?? module;
|
|
2405
|
+
};
|
|
2406
|
+
const resolveRuntimeDirectory = (directory) => {
|
|
2407
|
+
if ((0, node_fs.existsSync)(directory)) return directory;
|
|
2408
|
+
const buildOutput = require_relationship.getUserConfig("paths")?.buildOutput;
|
|
2409
|
+
if (typeof buildOutput !== "string" || buildOutput.trim().length === 0) return directory;
|
|
2410
|
+
const relativeSource = (0, node_path.relative)(process.cwd(), directory);
|
|
2411
|
+
if (!relativeSource || relativeSource.startsWith("..")) return directory;
|
|
2412
|
+
const mappedDirectory = (0, node_path.join)(buildOutput, relativeSource);
|
|
2413
|
+
return (0, node_fs.existsSync)(mappedDirectory) ? mappedDirectory : directory;
|
|
2414
|
+
};
|
|
2415
|
+
const resolveRuntimeModelPath = (sourcePath) => {
|
|
2416
|
+
const extension = (0, node_path.extname)(sourcePath).toLowerCase();
|
|
2417
|
+
const candidates = [];
|
|
2418
|
+
if (modelExtensions.includes(extension)) candidates.push(sourcePath);
|
|
2419
|
+
else candidates.push(...modelExtensions.map((modelExtension) => `${sourcePath}${modelExtension}`));
|
|
2420
|
+
const buildOutput = require_relationship.getUserConfig("paths")?.buildOutput;
|
|
2421
|
+
if (typeof buildOutput === "string" && buildOutput.trim().length > 0) candidates.slice().forEach((candidate) => {
|
|
2422
|
+
const relativeSource = (0, node_path.relative)(process.cwd(), candidate);
|
|
2423
|
+
if (!relativeSource || relativeSource.startsWith("..")) return;
|
|
2424
|
+
const mappedFile = (0, node_path.join)(buildOutput, relativeSource);
|
|
2425
|
+
const mappedExtension = (0, node_path.extname)(mappedFile).toLowerCase();
|
|
2426
|
+
if ([
|
|
2427
|
+
".ts",
|
|
2428
|
+
".tsx",
|
|
2429
|
+
".mts",
|
|
2430
|
+
".cts"
|
|
2431
|
+
].includes(mappedExtension)) {
|
|
2432
|
+
const base = mappedFile.slice(0, -mappedExtension.length);
|
|
2433
|
+
candidates.push(`${base}.js`, `${base}.mjs`, `${base}.cjs`);
|
|
2434
|
+
return;
|
|
2435
|
+
}
|
|
2436
|
+
candidates.push(mappedFile);
|
|
2437
|
+
});
|
|
2438
|
+
return candidates.find((candidate) => (0, node_fs.existsSync)(candidate)) ?? sourcePath;
|
|
2439
|
+
};
|
|
2440
|
+
const getModelDirectories = () => {
|
|
2441
|
+
const configured = require_relationship.getUserConfig("paths")?.models;
|
|
2442
|
+
const registered = require_relationship.getRegisteredPaths("models");
|
|
2443
|
+
return [...typeof configured === "string" ? [configured] : [], ...registered].map((directory) => resolveRuntimeDirectory((0, node_path.isAbsolute)(directory) ? directory : (0, node_path.resolve)(directory))).filter((directory, index, all) => all.indexOf(directory) === index);
|
|
2444
|
+
};
|
|
2445
|
+
const loadModel = (modelName, exportName) => {
|
|
2446
|
+
const jiti$1 = (0, jiti.createJiti)(`${(0, node_url.pathToFileURL)((0, node_path.resolve)(".")).href}/`, {
|
|
2447
|
+
interopDefault: false,
|
|
2448
|
+
tsconfigPaths: true,
|
|
2449
|
+
sourceMaps: true
|
|
2450
|
+
});
|
|
2451
|
+
for (const directory of getModelDirectories()) {
|
|
2452
|
+
const modulePath = resolveRuntimeModelPath((0, node_path.join)(directory, modelName));
|
|
2453
|
+
if (!(0, node_fs.existsSync)(modulePath)) continue;
|
|
2454
|
+
const model = resolveModelExport(jiti$1(modulePath), exportName);
|
|
2455
|
+
if (!isModelConstructor(model)) continue;
|
|
2456
|
+
require_relationship.registerModels(model);
|
|
2457
|
+
return model;
|
|
2458
|
+
}
|
|
2459
|
+
};
|
|
2460
|
+
function getModel(modelName) {
|
|
2461
|
+
const normalized = modelName.trim();
|
|
2462
|
+
const exportName = normalized.replace(/\\/g, "/").split("/").pop()?.replace(/\.[^.]+$/, "");
|
|
2463
|
+
if (!normalized || !exportName) throw new Error("Model name is required.");
|
|
2464
|
+
const registeredModel = require_relationship.getRegisteredModels().find((model) => model.name === exportName);
|
|
2465
|
+
if (registeredModel) return registeredModel;
|
|
2466
|
+
const model = loadModel(normalized, exportName);
|
|
2467
|
+
if (model) return model;
|
|
2468
|
+
throw new Error(`Model "${modelName}" not found.`);
|
|
2469
|
+
}
|
|
2470
|
+
|
|
2383
2471
|
//#endregion
|
|
2384
2472
|
//#region src/Arkorm.ts
|
|
2385
2473
|
var Arkorm = class Arkorm {
|
|
@@ -2399,6 +2487,7 @@ var Arkorm = class Arkorm {
|
|
|
2399
2487
|
this.getRegisteredMigrations = Arkorm.getRegisteredMigrations;
|
|
2400
2488
|
this.getRegisteredSeeders = Arkorm.getRegisteredSeeders;
|
|
2401
2489
|
this.getRegisteredModels = Arkorm.getRegisteredModels;
|
|
2490
|
+
this.getModel = Arkorm.getModel;
|
|
2402
2491
|
this.getRegisteredFactories = Arkorm.getRegisteredFactories;
|
|
2403
2492
|
}
|
|
2404
2493
|
/**
|
|
@@ -2526,6 +2615,9 @@ var Arkorm = class Arkorm {
|
|
|
2526
2615
|
static getRegisteredModels() {
|
|
2527
2616
|
return require_relationship.getRegisteredModels();
|
|
2528
2617
|
}
|
|
2618
|
+
static {
|
|
2619
|
+
this.getModel = getModel;
|
|
2620
|
+
}
|
|
2529
2621
|
/**
|
|
2530
2622
|
* Get registered factory constructors or instances.
|
|
2531
2623
|
*
|
|
@@ -3156,6 +3248,58 @@ var CliApp = class {
|
|
|
3156
3248
|
skipped
|
|
3157
3249
|
};
|
|
3158
3250
|
}
|
|
3251
|
+
resolveModelFiles(modelsDir) {
|
|
3252
|
+
if (!(0, fs.existsSync)(modelsDir)) throw new Error(`Models directory not found: ${modelsDir}`);
|
|
3253
|
+
return (0, fs.readdirSync)(modelsDir).filter((file) => file.endsWith(".ts")).map((file) => (0, path.join)(modelsDir, file));
|
|
3254
|
+
}
|
|
3255
|
+
syncModelRegistryTypes(modelFiles) {
|
|
3256
|
+
const registryDir = (0, path.join)((0, fs.realpathSync)(process.cwd()), ".arkormx");
|
|
3257
|
+
const registryPath = (0, path.join)(registryDir, "models.d.ts");
|
|
3258
|
+
const models = modelFiles.map((filePath) => {
|
|
3259
|
+
const parsed = this.parseModelSyncSource((0, fs.readFileSync)(filePath, "utf-8"));
|
|
3260
|
+
if (!parsed) return null;
|
|
3261
|
+
return {
|
|
3262
|
+
className: parsed.className,
|
|
3263
|
+
importPath: this.resolveModelRegistryImportPath(registryPath, filePath)
|
|
3264
|
+
};
|
|
3265
|
+
}).filter((model) => model !== null).sort((left, right) => left.className.localeCompare(right.className));
|
|
3266
|
+
const importLines = models.map((model) => {
|
|
3267
|
+
return `import type { ${model.className} } from '${model.importPath}'`;
|
|
3268
|
+
});
|
|
3269
|
+
const registryLines = models.map((model) => {
|
|
3270
|
+
return ` ${model.className}: typeof ${model.className}`;
|
|
3271
|
+
});
|
|
3272
|
+
const content = [
|
|
3273
|
+
"/* eslint-disable */",
|
|
3274
|
+
"// This file is generated by `arkorm models:sync`.",
|
|
3275
|
+
...importLines,
|
|
3276
|
+
"",
|
|
3277
|
+
"declare module 'arkormx' {",
|
|
3278
|
+
" interface ArkormModelRegistry {",
|
|
3279
|
+
...registryLines,
|
|
3280
|
+
" }",
|
|
3281
|
+
"}",
|
|
3282
|
+
"",
|
|
3283
|
+
"export {}",
|
|
3284
|
+
""
|
|
3285
|
+
].join("\n");
|
|
3286
|
+
if (((0, fs.existsSync)(registryPath) ? (0, fs.readFileSync)(registryPath, "utf-8") : null) === content) return {
|
|
3287
|
+
path: registryPath,
|
|
3288
|
+
updated: false
|
|
3289
|
+
};
|
|
3290
|
+
(0, fs.mkdirSync)(registryDir, { recursive: true });
|
|
3291
|
+
(0, fs.writeFileSync)(registryPath, content);
|
|
3292
|
+
return {
|
|
3293
|
+
path: registryPath,
|
|
3294
|
+
updated: true
|
|
3295
|
+
};
|
|
3296
|
+
}
|
|
3297
|
+
resolveModelRegistryImportPath(registryPath, modelPath) {
|
|
3298
|
+
const realModelPath = (0, fs.realpathSync)(modelPath);
|
|
3299
|
+
const withoutExtension = realModelPath.slice(0, -(0, path.extname)(realModelPath).length);
|
|
3300
|
+
const relativePath = (0, path.relative)((0, path.dirname)(registryPath), withoutExtension).replace(/\\/g, "/");
|
|
3301
|
+
return relativePath.startsWith(".") ? relativePath : `./${relativePath}`;
|
|
3302
|
+
}
|
|
3159
3303
|
applyPersistedFieldMetadata(structure) {
|
|
3160
3304
|
const persistedMetadata = require_relationship.getPersistedTableMetadata(structure.table, {
|
|
3161
3305
|
features: require_relationship.resolvePersistedMetadataFeatures(this.getConfig("features")),
|
|
@@ -3333,8 +3477,7 @@ var CliApp = class {
|
|
|
3333
3477
|
}
|
|
3334
3478
|
async syncModels(options = {}) {
|
|
3335
3479
|
const modelsDir = options.modelsDir ?? this.resolveConfigPath("models", (0, path.join)(process.cwd(), "src", "models"));
|
|
3336
|
-
|
|
3337
|
-
const modelFiles = (0, fs.readdirSync)(modelsDir).filter((file) => file.endsWith(".ts")).map((file) => (0, path.join)(modelsDir, file));
|
|
3480
|
+
const modelFiles = this.resolveModelFiles(modelsDir);
|
|
3338
3481
|
const adapter = this.getConfig("adapter");
|
|
3339
3482
|
if (adapter && typeof adapter.introspectModels === "function") {
|
|
3340
3483
|
const sources = modelFiles.reduce((all, filePath) => {
|
|
@@ -3351,11 +3494,13 @@ var CliApp = class {
|
|
|
3351
3494
|
const parsed = sources.get(filePath);
|
|
3352
3495
|
return parsed ? structuresByTable.get(parsed.table) : void 0;
|
|
3353
3496
|
}, /* @__PURE__ */ new Map());
|
|
3497
|
+
const modelTypes = this.syncModelRegistryTypes(modelFiles);
|
|
3354
3498
|
return {
|
|
3355
3499
|
source: "adapter",
|
|
3356
3500
|
modelsDir,
|
|
3501
|
+
modelTypesPath: modelTypes.path,
|
|
3357
3502
|
total: modelFiles.length,
|
|
3358
|
-
updated: result.updated,
|
|
3503
|
+
updated: modelTypes.updated ? [...result.updated, modelTypes.path] : result.updated,
|
|
3359
3504
|
skipped: result.skipped
|
|
3360
3505
|
};
|
|
3361
3506
|
}
|
|
@@ -3364,6 +3509,19 @@ var CliApp = class {
|
|
|
3364
3509
|
...this.syncModelsFromPrisma(options)
|
|
3365
3510
|
};
|
|
3366
3511
|
}
|
|
3512
|
+
syncModelRegistry(options = {}) {
|
|
3513
|
+
const modelsDir = options.modelsDir ?? this.resolveConfigPath("models", (0, path.join)(process.cwd(), "src", "models"));
|
|
3514
|
+
const modelFiles = this.resolveModelFiles(modelsDir);
|
|
3515
|
+
const modelTypes = this.syncModelRegistryTypes(modelFiles);
|
|
3516
|
+
return {
|
|
3517
|
+
source: "registry",
|
|
3518
|
+
modelsDir,
|
|
3519
|
+
modelTypesPath: modelTypes.path,
|
|
3520
|
+
total: modelFiles.length,
|
|
3521
|
+
updated: modelTypes.updated ? [modelTypes.path] : [],
|
|
3522
|
+
skipped: []
|
|
3523
|
+
};
|
|
3524
|
+
}
|
|
3367
3525
|
/**
|
|
3368
3526
|
* Sync model attribute declarations in model files based on the Prisma schema.
|
|
3369
3527
|
* This method reads the Prisma schema to extract model definitions and their
|
|
@@ -3379,21 +3537,22 @@ var CliApp = class {
|
|
|
3379
3537
|
const schemaPath = options.schemaPath ?? (0, path.join)(process.cwd(), "prisma", "schema.prisma");
|
|
3380
3538
|
const modelsDir = options.modelsDir ?? this.resolveConfigPath("models", (0, path.join)(process.cwd(), "src", "models"));
|
|
3381
3539
|
if (!(0, fs.existsSync)(schemaPath)) throw new Error(`Prisma schema file not found: ${schemaPath}`);
|
|
3382
|
-
if (!(0, fs.existsSync)(modelsDir)) throw new Error(`Models directory not found: ${modelsDir}`);
|
|
3383
3540
|
const schema = (0, fs.readFileSync)(schemaPath, "utf-8");
|
|
3384
3541
|
const prismaEnums = this.parsePrismaEnums(schema);
|
|
3385
3542
|
const prismaModels = this.parsePrismaModels(schema);
|
|
3386
|
-
const modelFiles =
|
|
3543
|
+
const modelFiles = this.resolveModelFiles(modelsDir);
|
|
3387
3544
|
const result = this.syncModelFiles(modelFiles, (filePath, source) => {
|
|
3388
3545
|
const parsed = this.parseModelSyncSource(source);
|
|
3389
3546
|
if (!parsed) return void 0;
|
|
3390
3547
|
return prismaModels.find((model) => model.table === parsed.table) ?? prismaModels.find((model) => model.name === parsed.className);
|
|
3391
3548
|
}, prismaEnums);
|
|
3549
|
+
const modelTypes = this.syncModelRegistryTypes(modelFiles);
|
|
3392
3550
|
return {
|
|
3393
3551
|
schemaPath,
|
|
3394
3552
|
modelsDir,
|
|
3553
|
+
modelTypesPath: modelTypes.path,
|
|
3395
3554
|
total: modelFiles.length,
|
|
3396
|
-
updated: result.updated,
|
|
3555
|
+
updated: modelTypes.updated ? [...result.updated, modelTypes.path] : result.updated,
|
|
3397
3556
|
skipped: result.skipped
|
|
3398
3557
|
};
|
|
3399
3558
|
}
|
|
@@ -3786,6 +3945,7 @@ var MigrateCommand = class extends _h3ravel_musket.Command {
|
|
|
3786
3945
|
{--deploy : Use prisma migrate deploy instead of migrate dev (Prisma compatibility driver only)}
|
|
3787
3946
|
{--skip-generate : Skip prisma generate (Prisma compatibility driver only)}
|
|
3788
3947
|
{--skip-migrate : Skip prisma migrate command}
|
|
3948
|
+
{--r|registry : Sync the generated model registry type augmentation after a successful migration}
|
|
3789
3949
|
{--state-file= : Path to applied migration state file}
|
|
3790
3950
|
{--schema= : Explicit prisma schema path (Prisma compatibility driver only)}
|
|
3791
3951
|
{--migration-name= : Name for prisma migrate dev (Prisma compatibility driver only)}
|
|
@@ -3842,6 +4002,7 @@ var MigrateCommand = class extends _h3ravel_musket.Command {
|
|
|
3842
4002
|
this.error(`Error: ${error instanceof Error ? error.message : String(error)}`);
|
|
3843
4003
|
return;
|
|
3844
4004
|
}
|
|
4005
|
+
if (!this.syncModelRegistryIfRequested()) return;
|
|
3845
4006
|
this.success("No pending migration classes to apply.");
|
|
3846
4007
|
return;
|
|
3847
4008
|
}
|
|
@@ -3900,6 +4061,18 @@ var MigrateCommand = class extends _h3ravel_musket.Command {
|
|
|
3900
4061
|
], process.cwd());
|
|
3901
4062
|
this.success(`Applied ${pending.length} migration(s).`);
|
|
3902
4063
|
pending.forEach(([_, file]) => this.success(this.app.splitLogger("Migrated", file)));
|
|
4064
|
+
this.syncModelRegistryIfRequested();
|
|
4065
|
+
}
|
|
4066
|
+
syncModelRegistryIfRequested() {
|
|
4067
|
+
if (!this.option("registry") && !this.option("r")) return true;
|
|
4068
|
+
try {
|
|
4069
|
+
const result = this.app.syncModelRegistry();
|
|
4070
|
+
this.success(this.app.splitLogger("Model Types", result.modelTypesPath ?? "none"));
|
|
4071
|
+
return true;
|
|
4072
|
+
} catch (error) {
|
|
4073
|
+
this.error(`Error: ${error instanceof Error ? error.message : String(error)}`);
|
|
4074
|
+
return false;
|
|
4075
|
+
}
|
|
3903
4076
|
}
|
|
3904
4077
|
/**
|
|
3905
4078
|
* Load all migration classes from the specified directory.
|
|
@@ -4329,6 +4502,7 @@ var ModelsSyncCommand = class extends _h3ravel_musket.Command {
|
|
|
4329
4502
|
this.signature = `models:sync
|
|
4330
4503
|
{--schema= : Path to prisma schema file used when adapter introspection is unavailable}
|
|
4331
4504
|
{--models= : Path to models directory}
|
|
4505
|
+
{--r|registry-only : Only sync the generated model registry type augmentation}
|
|
4332
4506
|
`;
|
|
4333
4507
|
this.description = "Sync model declare attributes from the active adapter when supported";
|
|
4334
4508
|
}
|
|
@@ -4337,10 +4511,11 @@ var ModelsSyncCommand = class extends _h3ravel_musket.Command {
|
|
|
4337
4511
|
await require_relationship.loadArkormConfig();
|
|
4338
4512
|
let result;
|
|
4339
4513
|
try {
|
|
4340
|
-
|
|
4514
|
+
const options = {
|
|
4341
4515
|
schemaPath: this.option("schema") ? (0, node_path.resolve)(String(this.option("schema"))) : void 0,
|
|
4342
4516
|
modelsDir: this.option("models") ? (0, node_path.resolve)(String(this.option("models"))) : void 0
|
|
4343
|
-
}
|
|
4517
|
+
};
|
|
4518
|
+
result = this.option("registryOnly") || this.option("registry-only") || this.option("r") ? this.app.syncModelRegistry({ modelsDir: options.modelsDir }) : await this.app.syncModels(options);
|
|
4344
4519
|
} catch (error) {
|
|
4345
4520
|
this.error(`Error: ${error instanceof Error ? error.message : String(error)}`);
|
|
4346
4521
|
return;
|
|
@@ -4348,9 +4523,10 @@ var ModelsSyncCommand = class extends _h3ravel_musket.Command {
|
|
|
4348
4523
|
const updatedLines = result.updated.length === 0 ? [this.app.splitLogger("Updated", "none")] : result.updated.map((path) => this.app.splitLogger("Updated", path));
|
|
4349
4524
|
this.success("SUCCESS: Model sync completed with the following results:");
|
|
4350
4525
|
[
|
|
4351
|
-
this.app.splitLogger("Source", result.source === "adapter" ? "adapter introspection" : "prisma schema"),
|
|
4526
|
+
this.app.splitLogger("Source", result.source === "adapter" ? "adapter introspection" : result.source === "registry" ? "model registry" : "prisma schema"),
|
|
4352
4527
|
...result.schemaPath ? [this.app.splitLogger("Schema", result.schemaPath)] : [],
|
|
4353
4528
|
this.app.splitLogger("Models", result.modelsDir),
|
|
4529
|
+
...result.modelTypesPath ? [this.app.splitLogger("Model Types", result.modelTypesPath)] : [],
|
|
4354
4530
|
this.app.splitLogger("Processed", String(result.total)),
|
|
4355
4531
|
...updatedLines,
|
|
4356
4532
|
this.app.splitLogger("Skipped", String(result.skipped.length))
|
|
@@ -9665,115 +9841,50 @@ var Model = class Model {
|
|
|
9665
9841
|
isNotSame(model) {
|
|
9666
9842
|
return !this.isSame(model);
|
|
9667
9843
|
}
|
|
9668
|
-
/**
|
|
9669
|
-
* Define a has one relationship.
|
|
9670
|
-
*
|
|
9671
|
-
* @param related
|
|
9672
|
-
* @param foreignKey
|
|
9673
|
-
* @param localKey
|
|
9674
|
-
* @returns
|
|
9675
|
-
*/
|
|
9676
9844
|
hasOne(related, foreignKey, localKey) {
|
|
9677
9845
|
const constructor = this.constructor;
|
|
9678
|
-
|
|
9846
|
+
const relatedModel = this.resolveRelationshipModel(related, "hasOne");
|
|
9847
|
+
const resolvedLocalKey = localKey ?? constructor.getPrimaryKey();
|
|
9848
|
+
return new require_relationship.HasOneRelation(this, relatedModel, foreignKey ?? this.resolveDefaultHasForeignKey(constructor, resolvedLocalKey), resolvedLocalKey);
|
|
9679
9849
|
}
|
|
9680
|
-
/**
|
|
9681
|
-
* Define a has many relationship.
|
|
9682
|
-
*
|
|
9683
|
-
* @param related
|
|
9684
|
-
* @param foreignKey
|
|
9685
|
-
* @param localKey
|
|
9686
|
-
* @returns
|
|
9687
|
-
*/
|
|
9688
9850
|
hasMany(related, foreignKey, localKey) {
|
|
9689
9851
|
const constructor = this.constructor;
|
|
9690
|
-
|
|
9852
|
+
const relatedModel = this.resolveRelationshipModel(related, "hasMany");
|
|
9853
|
+
const resolvedLocalKey = localKey ?? constructor.getPrimaryKey();
|
|
9854
|
+
return new require_relationship.HasManyRelation(this, relatedModel, foreignKey ?? this.resolveDefaultHasForeignKey(constructor, resolvedLocalKey), resolvedLocalKey);
|
|
9691
9855
|
}
|
|
9692
|
-
/**
|
|
9693
|
-
* Define a belongs to relationship.
|
|
9694
|
-
*
|
|
9695
|
-
* @param related
|
|
9696
|
-
* @param foreignKey
|
|
9697
|
-
* @param ownerKey
|
|
9698
|
-
* @returns
|
|
9699
|
-
*/
|
|
9700
9856
|
belongsTo(related, foreignKey, ownerKey) {
|
|
9701
|
-
|
|
9857
|
+
const relatedModel = this.resolveRelationshipModel(related, "belongsTo");
|
|
9858
|
+
const resolvedOwnerKey = ownerKey ?? relatedModel.getPrimaryKey();
|
|
9859
|
+
return new require_relationship.BelongsToRelation(this, relatedModel, foreignKey ?? this.resolveDefaultBelongsToForeignKey(relatedModel, resolvedOwnerKey), resolvedOwnerKey);
|
|
9702
9860
|
}
|
|
9703
|
-
/**
|
|
9704
|
-
* Define a belongs to many relationship.
|
|
9705
|
-
*
|
|
9706
|
-
* @param related
|
|
9707
|
-
* @param throughTable
|
|
9708
|
-
* @param foreignPivotKey
|
|
9709
|
-
* @param relatedPivotKey
|
|
9710
|
-
* @param parentKey
|
|
9711
|
-
* @param relatedKey
|
|
9712
|
-
* @returns
|
|
9713
|
-
*/
|
|
9714
9861
|
belongsToMany(related, throughTable, foreignPivotKey, relatedPivotKey, parentKey, relatedKey) {
|
|
9715
9862
|
const constructor = this.constructor;
|
|
9716
|
-
|
|
9863
|
+
const relatedModel = this.resolveRelationshipModel(related, "belongsToMany");
|
|
9864
|
+
const resolvedRelatedKey = relatedKey ?? relatedModel.getPrimaryKey();
|
|
9865
|
+
return new require_relationship.BelongsToManyRelation(this, relatedModel, throughTable, foreignPivotKey, relatedPivotKey, parentKey ?? constructor.getPrimaryKey(), resolvedRelatedKey);
|
|
9717
9866
|
}
|
|
9718
|
-
|
|
9719
|
-
* Define a has one through relationship.
|
|
9720
|
-
*
|
|
9721
|
-
* @param related
|
|
9722
|
-
* @param throughTable
|
|
9723
|
-
* @param firstKey
|
|
9724
|
-
* @param secondKey
|
|
9725
|
-
* @param localKey
|
|
9726
|
-
* @param secondLocalKey
|
|
9727
|
-
* @returns
|
|
9728
|
-
*/
|
|
9729
|
-
hasOneThrough(related, throughTable, firstKey, secondKey, localKey, secondLocalKey = "id") {
|
|
9867
|
+
hasOneThrough(related, throughTable, firstKey, secondKey, localKey, secondLocalKey) {
|
|
9730
9868
|
const constructor = this.constructor;
|
|
9731
|
-
|
|
9869
|
+
const relatedModel = this.resolveRelationshipModel(related, "hasOneThrough");
|
|
9870
|
+
return new require_relationship.HasOneThroughRelation(this, relatedModel, throughTable, firstKey, secondKey, localKey ?? constructor.getPrimaryKey(), secondLocalKey ?? "id");
|
|
9732
9871
|
}
|
|
9733
|
-
/**
|
|
9734
|
-
* Define a has many through relationship.
|
|
9735
|
-
*
|
|
9736
|
-
* @param related
|
|
9737
|
-
* @param throughTable
|
|
9738
|
-
* @param firstKey
|
|
9739
|
-
* @param secondKey
|
|
9740
|
-
* @param localKey
|
|
9741
|
-
* @param secondLocalKey
|
|
9742
|
-
* @returns
|
|
9743
|
-
*/
|
|
9744
9872
|
hasManyThrough(related, throughTable, firstKey, secondKey, localKey, secondLocalKey = "id") {
|
|
9745
9873
|
const constructor = this.constructor;
|
|
9746
|
-
|
|
9874
|
+
const relatedModel = this.resolveRelationshipModel(related, "hasManyThrough");
|
|
9875
|
+
return new require_relationship.HasManyThroughRelation(this, relatedModel, throughTable, firstKey, secondKey, localKey ?? constructor.getPrimaryKey(), secondLocalKey);
|
|
9747
9876
|
}
|
|
9748
|
-
/**
|
|
9749
|
-
* Define a polymorphic one to one relationship.
|
|
9750
|
-
*
|
|
9751
|
-
* @param related
|
|
9752
|
-
* @param morphName
|
|
9753
|
-
* @param idColumn
|
|
9754
|
-
* @param typeColumn
|
|
9755
|
-
* @param localKey
|
|
9756
|
-
* @returns
|
|
9757
|
-
*/
|
|
9758
9877
|
morphOne(related, morphName, idColumn, typeColumn, localKey) {
|
|
9759
9878
|
const constructor = this.constructor;
|
|
9879
|
+
const relatedModel = this.resolveRelationshipModel(related, "morphOne");
|
|
9760
9880
|
const columns = this.resolveMorphColumns(morphName, idColumn, typeColumn);
|
|
9761
|
-
return new require_relationship.MorphOneRelation(this,
|
|
9881
|
+
return new require_relationship.MorphOneRelation(this, relatedModel, morphName, columns.idColumn, columns.typeColumn, localKey ?? constructor.getPrimaryKey());
|
|
9762
9882
|
}
|
|
9763
|
-
/**
|
|
9764
|
-
* Define a polymorphic one to many relationship.
|
|
9765
|
-
*
|
|
9766
|
-
* @param related
|
|
9767
|
-
* @param morphName
|
|
9768
|
-
* @param idColumn
|
|
9769
|
-
* @param typeColumn
|
|
9770
|
-
* @param localKey
|
|
9771
|
-
* @returns
|
|
9772
|
-
*/
|
|
9773
9883
|
morphMany(related, morphName, idColumn, typeColumn, localKey) {
|
|
9774
9884
|
const constructor = this.constructor;
|
|
9885
|
+
const relatedModel = this.resolveRelationshipModel(related, "morphMany");
|
|
9775
9886
|
const columns = this.resolveMorphColumns(morphName, idColumn, typeColumn);
|
|
9776
|
-
return new require_relationship.MorphManyRelation(this,
|
|
9887
|
+
return new require_relationship.MorphManyRelation(this, relatedModel, morphName, columns.idColumn, columns.typeColumn, localKey ?? constructor.getPrimaryKey());
|
|
9777
9888
|
}
|
|
9778
9889
|
morphTo(morphName, typeColumnOrRelated, idColumn, ownerKey) {
|
|
9779
9890
|
const related = typeof typeColumnOrRelated === "function" ? typeColumnOrRelated : void 0;
|
|
@@ -9781,51 +9892,37 @@ var Model = class Model {
|
|
|
9781
9892
|
const columns = this.resolveMorphColumns(morphName, idColumn, typeColumn);
|
|
9782
9893
|
return new require_relationship.MorphToRelation(this, morphName, columns.typeColumn, columns.idColumn, ownerKey, related);
|
|
9783
9894
|
}
|
|
9784
|
-
/**
|
|
9785
|
-
* Define a polymorphic many to many relationship.
|
|
9786
|
-
*
|
|
9787
|
-
* @param related
|
|
9788
|
-
* @param morphName
|
|
9789
|
-
* @param throughTable
|
|
9790
|
-
* @param foreignPivotKey
|
|
9791
|
-
* @param morphTypeColumn
|
|
9792
|
-
* @param relatedPivotKey
|
|
9793
|
-
* @param parentKey
|
|
9794
|
-
* @param relatedKey
|
|
9795
|
-
* @returns
|
|
9796
|
-
*/
|
|
9797
9895
|
morphToMany(related, morphName, throughTable, foreignPivotKey, morphTypeColumn, relatedPivotKey, parentKey, relatedKey) {
|
|
9798
9896
|
const constructor = this.constructor;
|
|
9799
9897
|
const namingCase = Model.getNamingCase();
|
|
9800
|
-
const
|
|
9898
|
+
const relatedModel = this.resolveRelationshipModel(related, "morphToMany");
|
|
9899
|
+
const resolvedRelatedKey = relatedKey ?? relatedModel.getPrimaryKey();
|
|
9801
9900
|
const resolvedTable = throughTable ?? this.formatConventionName(`${(0, _h3ravel_support.str)(morphName).plural()}`, namingCase);
|
|
9802
|
-
const resolvedRelatedPivotKey = relatedPivotKey ?? this.formatConventionName(`${(0, _h3ravel_support.str)(
|
|
9901
|
+
const resolvedRelatedPivotKey = relatedPivotKey ?? this.formatConventionName(`${(0, _h3ravel_support.str)(relatedModel.getTable()).singular()}_${resolvedRelatedKey}`, namingCase);
|
|
9803
9902
|
const morphIdColumn = foreignPivotKey ?? this.formatConventionName(`${morphName}_id`, namingCase);
|
|
9804
9903
|
const resolvedMorphTypeColumn = morphTypeColumn ?? this.formatConventionName(`${morphName}_type`, namingCase);
|
|
9805
|
-
return new require_relationship.MorphToManyRelation(this,
|
|
9904
|
+
return new require_relationship.MorphToManyRelation(this, relatedModel, resolvedTable, morphName, morphIdColumn, resolvedMorphTypeColumn, resolvedRelatedPivotKey, parentKey ?? constructor.getPrimaryKey(), resolvedRelatedKey);
|
|
9806
9905
|
}
|
|
9807
|
-
/**
|
|
9808
|
-
* Define the inverse side of a polymorphic many-to-many relationship.
|
|
9809
|
-
*
|
|
9810
|
-
* @param related
|
|
9811
|
-
* @param morphName
|
|
9812
|
-
* @param throughTable
|
|
9813
|
-
* @param foreignPivotKey
|
|
9814
|
-
* @param morphTypeColumn
|
|
9815
|
-
* @param relatedPivotKey
|
|
9816
|
-
* @param parentKey
|
|
9817
|
-
* @param relatedKey
|
|
9818
|
-
* @returns
|
|
9819
|
-
*/
|
|
9820
9906
|
morphedByMany(related, morphName, throughTable, foreignPivotKey, morphTypeColumn, relatedPivotKey, parentKey, relatedKey) {
|
|
9821
9907
|
const constructor = this.constructor;
|
|
9822
9908
|
const namingCase = Model.getNamingCase();
|
|
9823
|
-
const
|
|
9909
|
+
const relatedModel = this.resolveRelationshipModel(related, "morphedByMany");
|
|
9910
|
+
const resolvedRelatedKey = relatedKey ?? relatedModel.getPrimaryKey();
|
|
9824
9911
|
const resolvedTable = throughTable ?? this.formatConventionName(`${(0, _h3ravel_support.str)(morphName).plural()}`, namingCase);
|
|
9825
9912
|
const resolvedForeignPivotKey = foreignPivotKey ?? this.formatConventionName(`${(0, _h3ravel_support.str)(constructor.getTable()).singular()}_${parentKey ?? constructor.getPrimaryKey()}`, namingCase);
|
|
9826
9913
|
const resolvedMorphTypeColumn = morphTypeColumn ?? this.formatConventionName(`${morphName}_type`, namingCase);
|
|
9827
9914
|
const resolvedRelatedPivotKey = relatedPivotKey ?? this.formatConventionName(`${morphName}_id`, namingCase);
|
|
9828
|
-
return new require_relationship.MorphedByManyRelation(this,
|
|
9915
|
+
return new require_relationship.MorphedByManyRelation(this, relatedModel, resolvedTable, morphName, resolvedForeignPivotKey, resolvedMorphTypeColumn, resolvedRelatedPivotKey, parentKey ?? constructor.getPrimaryKey(), resolvedRelatedKey);
|
|
9916
|
+
}
|
|
9917
|
+
resolveRelationshipModel(related, operation) {
|
|
9918
|
+
if (typeof related === "function") return related;
|
|
9919
|
+
return require_relationship.resolveRegisteredModel(related, { operation });
|
|
9920
|
+
}
|
|
9921
|
+
resolveDefaultHasForeignKey(parent, localKey) {
|
|
9922
|
+
return this.formatConventionName(`${(0, _h3ravel_support.str)(parent.getTable()).singular()}_${localKey}`, Model.getNamingCase());
|
|
9923
|
+
}
|
|
9924
|
+
resolveDefaultBelongsToForeignKey(related, ownerKey) {
|
|
9925
|
+
return this.formatConventionName(`${(0, _h3ravel_support.str)(related.getTable()).singular()}_${ownerKey}`, Model.getNamingCase());
|
|
9829
9926
|
}
|
|
9830
9927
|
resolveMorphColumns(morphName, idColumn, typeColumn) {
|
|
9831
9928
|
const namingCase = Model.getNamingCase();
|
|
@@ -10897,6 +10994,7 @@ exports.getLastBatchMigrations = require_relationship.getLastBatchMigrations;
|
|
|
10897
10994
|
exports.getLastMigrationRun = require_relationship.getLastMigrationRun;
|
|
10898
10995
|
exports.getLatestAppliedMigrations = require_relationship.getLatestAppliedMigrations;
|
|
10899
10996
|
exports.getMigrationPlan = require_relationship.getMigrationPlan;
|
|
10997
|
+
exports.getModel = getModel;
|
|
10900
10998
|
exports.getPersistedColumnMap = require_relationship.getPersistedColumnMap;
|
|
10901
10999
|
exports.getPersistedEnumMap = require_relationship.getPersistedEnumMap;
|
|
10902
11000
|
exports.getPersistedEnumTsType = require_relationship.getPersistedEnumTsType;
|
|
@@ -10955,6 +11053,7 @@ exports.resolveMigrationClassName = require_relationship.resolveMigrationClassNa
|
|
|
10955
11053
|
exports.resolveMigrationStateFilePath = require_relationship.resolveMigrationStateFilePath;
|
|
10956
11054
|
exports.resolvePersistedMetadataFeatures = require_relationship.resolvePersistedMetadataFeatures;
|
|
10957
11055
|
exports.resolvePrismaType = require_relationship.resolvePrismaType;
|
|
11056
|
+
exports.resolveRegisteredModel = require_relationship.resolveRegisteredModel;
|
|
10958
11057
|
exports.resolveRuntimeCompatibilityQuerySchema = resolveRuntimeCompatibilityQuerySchema;
|
|
10959
11058
|
exports.resolveRuntimeCompatibilityQuerySchemaOrThrow = resolveRuntimeCompatibilityQuerySchemaOrThrow;
|
|
10960
11059
|
exports.runArkormTransaction = require_relationship.runArkormTransaction;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as buildPrimaryKeyLine, $a as ModelStatic, $i as DelegateFindManyArgs, $n as Arkorm, $o as sum, $r as InsertSpec, $s as CaseExpressionBranch, $t as PersistedTimestampColumn, A as isQuerySchemaLike, Aa as PrismaTransactionCapableClient, Ac as AppliedMigrationRun, Ai as RawQuerySpec, An as Migration, Ao as ModelUpdateData, Ar as createPrismaDatabaseAdapter, As as RelationTableLookupSpec, At as buildMigrationIdentity, B as applyCreateTableOperation, Ba as QuerySchemaUniqueWhere, Bc as SchemaColumnType, Bi as UpsertSpec, Bn as MigrateRollbackCommand, Bo as JsonExpression, Br as AdapterQueryOperation, Bs as Paginator, Bt as markMigrationApplied, C as getRuntimeClient, Ca as PrismaLikeInclude, Cc as MorphToManyRelationMetadata, Ci as QueryNotCondition, Cn as QueryConstraintException, Co as ModelEventHandlerConstructor, Cr as Seeder, Cs as RelationColumnLookupSpec, Ct as supportsDatabaseCreation, D as getRuntimePrismaClient, Da as PrismaLikeSortOrder, Dc as RelationMetadata, Di as QuerySelectColumn, Dn as ArkormException, Do as ModelOrderByInput, Dr as PrismaDatabaseAdapter, Ds as RelationMetadataProvider, Dt as toModelName, E as getRuntimePaginationURLDriverFactory, Ea as PrismaLikeSelect, Ec as PivotModelStatic, Ei as QueryScalarComparisonOperator, En as ArkormErrorContext, Eo as ModelLifecycleState, Er as SeederInput, Es as RelationDefaultValue, Et as toMigrationFileSlug, F as PrimaryKeyGenerationPlanner, Fa as QuerySchemaInclude, Fc as MigrationInstanceLike, Fi as SelectSpec, Fn as resolveGeneratedExpression, Fo as Model, Fr as AdapterDatabaseCreationResult, Fs as RelatedModelForRelationship, Ft as findAppliedMigration, G as applyMigrationToPrismaSchema, Ga as RuntimeClientLike, Gc as SchemaPrimaryKey, Gi as ArkormDebugEvent, Gn as MakeMigrationCommand, Go as count, Gr as DatabaseAdapter, Gs as FactoryDefinition, Gt as resolveMigrationStateFilePath, H as applyMigrationRollbackToDatabase, Ha as QuerySchemaUpdateData, Hc as SchemaForeignKeyAction, Hi as AdapterQueryInspection, Hn as MigrateCommand, Ho as caseWhen, Hr as AggregateOperation, Hs as FactoryAttributeResolver, Ht as readAppliedMigrationsState, I as PRISMA_ENUM_MEMBER_REGEX, Ia as QuerySchemaOrderBy, Ic as PrimaryKeyGeneration, Ii as SoftDeleteQueryMode, In as ForeignKeyBuilder, Io as AggregateExpression, Ir as AdapterInspectionRequest, Is as RelatedModelFromResult, It as getLastBatchMigrations, J as buildFieldLine, Ja as SoftDeleteConfig, Jc as SchemaTableDropOperation, Ji as CastHandler, Jn as DbCommand, Jo as fromExpressionNode, Jr as DatabaseRows, Js as FactoryRelationshipResolver, Jt as writeAppliedMigrationsStateToStore, K as applyOperationsToPrismaSchema, Ka as Serializable, Kc as SchemaTableAlterOperation, Ki as ArkormDebugHandler, Kn as MakeFactoryCommand, Ko as expressionBuilder, Kr as DatabasePrimitive, Ks as FactoryDefinitionAttributes, Kt as supportsDatabaseMigrationState, L as PRISMA_ENUM_REGEX, La as QuerySchemaRow, Lc as PrismaMigrationWorkflowOptions, Li as SortDirection, Ln as SeedCommand, Lo as CaseExpression, Lr as AdapterModelFieldStructure, Ls as WhereCallback, Lt as getLastMigrationRun, M as loadArkormConfig, Ma as PrismaTransactionOptions, Mc as GenerateMigrationOptions, Mi as RelationFilterSpec, Mn as EnumBuilder, Mo as QuerySchemaForModel, Mr as createKyselyAdapter, Ms as EagerLoadRelations, Mt as computeMigrationChecksum, N as resetArkormRuntimeForTests, Na as QuerySchemaCreateData, Nc as GeneratedMigrationFile, Ni as RelationLoadPlan, Nn as TableBuilder, No as QuerySchemaForModelInstance, Nr as AdapterCapabilities, Ns as JoinOn, Nt as createEmptyAppliedMigrationsState, O as getUserConfig, Oa as PrismaLikeWhereInput, Oc as RelationMetadataType, Oi as QueryTarget, On as DB, Oo as ModelRelationshipKey, Or as PrismaDelegateNameMapping, Os as RelationResult, Ot as isMigrationPlanningActive, P as runArkormTransaction, Pa as QuerySchemaFindManyArgs, Pc as MigrationClass, Pi as RelationLoadSpec, Pn as GeneratedColumnExpression, Po as RelatedModelClass, Pr as AdapterCapability, Ps as JoinSource, Pt as deleteAppliedMigrationsStateFromStore, Q as buildModelBlock, Qa as TransactionOptions, Qc as TimestampNaming, Qi as DelegateCreateData, Qn as AttributeOptions, Qo as raw, Qr as InsertManySpec, Qs as BinaryExpressionNode, Qt as PersistedTableMetadata, R as PRISMA_MODEL_REGEX, Ra as QuerySchemaRows, Rc as PrismaSchemaSyncOptions, Ri as UpdateManySpec, Rn as ModelsSyncCommand, Ro as Expression, Rr as AdapterModelIntrospectionOptions, Rs as JoinClause, Rt as getLatestAppliedMigrations, S as getRuntimeAdapter, Sa as PrismaFindManyArgsLike, Sc as MorphOneRelationMetadata, Si as QueryLogicalOperator, Sn as QueryExecutionExceptionContext, So as ModelEventHandler, Sr as SEEDER_BRAND, Ss as RelationAggregateType, St as stripPrismaSchemaModelsAndEnums, T as getRuntimePaginationCurrentPageResolver, Ta as PrismaLikeScalarFilter, Tc as MorphedByManyRelationMetadata, Ti as QueryRawCondition, Tn as MissingDelegateException, To as ModelEventName, Tr as SeederConstructor, Ts as RelationDefaultResolver, Tt as supportsDatabaseReset, U as applyMigrationRollbackToPrismaSchema, Ua as QuerySchemaWhere, Uc as SchemaIndex, Ui as ArkormBootContext, Un as MakeSeederCommand, Uo as coalesce, Ur as AggregateSelection, Us as FactoryAttributes, Ut as readAppliedMigrationsStateFromStore, V as applyDropTableOperation, Va as QuerySchemaUpdateArgs, Vc as SchemaForeignKey, Vi as AdapterBindableModel, Vn as MigrateFreshCommand, Vo as avg, Vr as AdapterTransactionContext, Vs as ArkormCollection, Vt as markMigrationRun, W as applyMigrationToDatabase, Wa as RawSelectInput, Wc as SchemaOperation, Wi as ArkormConfig, Wn as MakeModelCommand, Wo as col, Wr as AggregateSpec, Ws as FactoryCallback, Wt as removeAppliedMigration, X as buildInverseRelationLine, Xa as TransactionCapableClient, Xc as TimestampColumnBehavior, Xi as CastType, Xn as resolveCast, Xo as max, Xr as DeleteManySpec, Xs as MaybePromise, Xt as PersistedMetadataFeatures, Y as buildIndexLine, Ya as TransactionCallback, Yc as SchemaUniqueConstraint, Yi as CastMap, Yn as CliApp, Yo as json, Yr as DatabaseValue, Ys as FactoryState, Yt as PersistedColumnMappingsState, Z as buildMigrationSource, Za as TransactionContext, Zc as TimestampNames, Zi as ClientResolver, Zn as Attribute, Zo as min, Zr as DeleteSpec, Zs as AggregateExpressionNode, Zt as PersistedPrimaryKeyGeneration, _ as emitRuntimeDebugEvent, _a as PaginationOptions, _c as HasManyThroughRelationMetadata, _i as QueryJoinRawConstraint, _n as UnsupportedAdapterFeatureException, _o as ModelAttributes, _r as registerMigrations, _t as resolveEnumName, a as getRuntimeCompatibilityAdapter, aa as DelegateUniqueWhere, ac as FunctionExpressionNode, ai as QueryDayCondition, an as getPersistedEnumTsType, ao as GroupByAggregateSpec, ar as RuntimePathKey, at as deriveRelationAlias, b as getActiveTransactionClient, ba as PrismaClientLike, bc as ModelMetadata, bi as QueryJsonCondition, bn as RelationResolutionException, bo as ModelDeclaredAttributeKey, br as registerSeeders, bs as RelationAggregateConstraint, bt as runMigrationWithPrisma, c as PrismaDelegateMap, ca as DelegateWhere, cc as NullCheckExpressionNode, ci as QueryFullTextCondition, cn as getPersistedTimestampColumns, co as AttributeOrderBy, cr as getRegisteredMigrations, ct as escapeRegex, d as inferDelegateName, da as GetUserConfig, dc as DatabaseTableOptions, di as QueryJoin, dn as resetPersistedColumnMappingsCache, do as AttributeSelect, dr as getRegisteredSeeders, dt as formatDefaultValue, ea as DelegateInclude, ec as CaseExpressionNode, ei as PartitionedSelectSpec, en as applyOperationsToPersistedColumnMappingsState, eo as RelationshipModelStatic, er as Arkormx, es as val, et as buildRelationLine, f as awaitConfiguredModelsRegistration, fa as ModelQuerySchemaLike, fc as DatabaseTablePersistedMetadataOptions, fi as QueryJoinBoolean, fn as resolveColumnMappingsFilePath, fo as AttributeUpdateInput, fr as loadFactoriesFrom, ft as formatEnumDefaultValue, g as disposeArkormRuntime, ga as PaginationMeta, gc as HasManyRelationMetadata, gi as QueryJoinNullConstraint, gn as writePersistedColumnMappingsState, go as ModelAttributeValue, gr as registerFactories, gt as pad, h as defineConfig, ha as PaginationCurrentPageResolver, hc as ColumnMap, hi as QueryJoinNestedConstraint, hn as validatePersistedMetadataFeaturesForMigrations, ho as GlobalScope, hr as loadSeedersFrom, ht as getMigrationPlan, i as RuntimeModuleLoader, ia as DelegateSelect, ic as ExpressionNode, ii as QueryCondition, in as getPersistedEnumMap, io as GroupByAggregateRow, ir as RuntimePathInput, is as defineFactory, it as deriveInverseRelationAlias, j as isTransactionCapableClient, ja as PrismaTransactionContext, jc as AppliedMigrationsState, ji as RelationAggregateSpec, jn as SchemaBuilder, jo as ModelWhereInput, jr as KyselyDatabaseAdapter, js as EagerLoadQueryForRelationship, jt as buildMigrationRunId, k as isDelegateLike, ka as PrismaTransactionCallback, kc as AppliedMigrationEntry, ki as QueryTimeCondition, kn as MIGRATION_BRAND, ko as ModelRelationshipResult, kr as createPrismaCompatibilityAdapter, ks as RelationResultCache, kt as runInMigrationPlanning, l as createPrismaAdapter, la as EagerLoadConstraint, lc as RawExpressionNode, li as QueryGroupByItem, ln as readPersistedColumnMappingsState, lo as AttributeQuerySchema, lr as getRegisteredModels, lt as findEnumBlock, m as configureArkormRuntime, ma as NamingCase, mc as BelongsToRelationMetadata, mi as QueryJoinConstraint, mn as syncPersistedColumnMappingsFromState, mo as DelegateForModelSchema, mr as loadModelsFrom, mt as generateMigrationFile, n as PivotModel, na as DelegateRow, nc as ExpressionBinaryOperator, ni as QueryComparisonCondition, nn as deletePersistedColumnMappingsState, no as EachCallback, nr as RegisteredModel, ns as InlineFactory, nt as createMigrationTimestamp, o as resolveRuntimeCompatibilityQuerySchema, oa as DelegateUpdateArgs, oc as InExpressionNode, oi as QueryExistsCondition, on as getPersistedPrimaryKeyGeneration, oo as QueryBuilder, or as RuntimePathMap, ot as deriveRelationFieldName, p as bindAdapterToModels, pa as ModelTableCase, pc as BelongsToManyRelationMetadata, pi as QueryJoinColumnConstraint, pn as resolvePersistedMetadataFeatures, po as AttributeWhereInput, pr as loadMigrationsFrom, pt as formatRelationAction, q as buildEnumBlock, qa as SimplePaginationMeta, qc as SchemaTableCreateOperation, qi as CastDefinition, qn as InitCommand, qo as fn, qr as DatabaseRow, qs as FactoryModelConstructor, qt as writeAppliedMigrationsState, r as LoadedRuntimeModule, ra as DelegateRows, rc as ExpressionJsonCast, ri as QueryComparisonOperator, rn as getPersistedColumnMap, ro as ExpressionSelectMap, rr as RuntimeConstructor, rs as ModelFactory, rt as deriveCollectionFieldName, s as resolveRuntimeCompatibilityQuerySchemaOrThrow, sa as DelegateUpdateData, sc as JsonExpressionNode, si as QueryExpressionCondition, sn as getPersistedTableMetadata, so as AttributeCreateInput, sr as getRegisteredFactories, st as deriveSingularFieldName, t as URLDriver, ta as DelegateOrderBy, tc as ColumnExpressionNode, ti as QueryColumnComparisonCondition, tn as createEmptyPersistedColumnMappingsState, to as ChunkCallback, tr as RegisteredFactory, ts as where, tt as buildUniqueConstraintLine, u as createPrismaDelegateMap, ua as EagerLoadMap, uc as ValueExpressionNode, ui as QueryGroupCondition, un as rebuildPersistedColumnMappingsState, uo as AttributeSchemaDelegate, ur as getRegisteredPaths, ut as findModelBlock, v as ensureArkormConfigLoading, va as PaginationURLDriver, vc as HasOneRelationMetadata, vi as QueryJoinType, vn as UniqueConstraintResolutionException, vo as ModelAttributesOf, vr as registerModels, vt as resolveMigrationClassName, w as getRuntimeDebugHandler, wa as PrismaLikeOrderBy, wc as MorphToRelationMetadata, wi as QueryOrderBy, wn as ModelNotFoundException, wo as ModelEventListener, wr as SeederCallArgument, ws as RelationConstraint, wt as supportsDatabaseMigrationExecution, x as getDefaultStubsPath, xa as PrismaDelegateLike, xc as MorphManyRelationMetadata, xi as QueryJsonConditionKind, xn as QueryExecutionException, xo as ModelEventDispatcher, xr as resetRuntimeRegistryForTests, xs as RelationAggregateInput, xt as runPrismaCommand, y as getActiveTransactionAdapter, ya as PaginationURLDriverFactory, yc as HasOneThroughRelationMetadata, yi as QueryJoinValueConstraint, yn as ScopeNotDefinedException, yo as ModelCreateData, yr as registerPaths, yt as resolvePrismaType, z as applyAlterTableOperation, za as QuerySchemaSelect, zc as SchemaColumn, zi as UpdateSpec, zn as MigrationHistoryCommand, zo as ExpressionBuilder, zr as AdapterModelStructure, zs as LengthAwarePaginator, zt as isMigrationApplied } from "./index-B9svndOx.cjs";
|
|
2
|
-
export { AdapterBindableModel, AdapterCapabilities, AdapterCapability, AdapterDatabaseCreationResult, AdapterInspectionRequest, AdapterModelFieldStructure, AdapterModelIntrospectionOptions, AdapterModelStructure, AdapterQueryInspection, AdapterQueryOperation, AdapterTransactionContext, AggregateExpression, AggregateExpressionNode, AggregateOperation, AggregateSelection, AggregateSpec, AppliedMigrationEntry, AppliedMigrationRun, AppliedMigrationsState, Arkorm, ArkormBootContext, ArkormCollection, ArkormConfig, ArkormDebugEvent, ArkormDebugHandler, ArkormErrorContext, ArkormException, Arkormx, Attribute, AttributeCreateInput, AttributeOptions, AttributeOrderBy, AttributeQuerySchema, AttributeSchemaDelegate, AttributeSelect, AttributeUpdateInput, AttributeWhereInput, BelongsToManyRelationMetadata, BelongsToRelationMetadata, BinaryExpressionNode, CaseExpression, CaseExpressionBranch, CaseExpressionNode, CastDefinition, CastHandler, CastMap, CastType, ChunkCallback, CliApp, ClientResolver, ColumnExpressionNode, ColumnMap, DB, DatabaseAdapter, DatabasePrimitive, DatabaseRow, DatabaseRows, DatabaseTableOptions, DatabaseTablePersistedMetadataOptions, DatabaseValue, DbCommand, DelegateCreateData, DelegateFindManyArgs, DelegateForModelSchema, DelegateInclude, DelegateOrderBy, DelegateRow, DelegateRows, DelegateSelect, DelegateUniqueWhere, DelegateUpdateArgs, DelegateUpdateData, DelegateWhere, DeleteManySpec, DeleteSpec, EachCallback, EagerLoadConstraint, EagerLoadMap, EagerLoadQueryForRelationship, EagerLoadRelations, EnumBuilder, Expression, ExpressionBinaryOperator, ExpressionBuilder, ExpressionJsonCast, ExpressionNode, ExpressionSelectMap, FactoryAttributeResolver, FactoryAttributes, FactoryCallback, FactoryDefinition, FactoryDefinitionAttributes, FactoryModelConstructor, FactoryRelationshipResolver, FactoryState, ForeignKeyBuilder, FunctionExpressionNode, GenerateMigrationOptions, GeneratedColumnExpression, GeneratedMigrationFile, GetUserConfig, GlobalScope, GroupByAggregateRow, GroupByAggregateSpec, HasManyRelationMetadata, HasManyThroughRelationMetadata, HasOneRelationMetadata, HasOneThroughRelationMetadata, InExpressionNode, InitCommand, InlineFactory, InsertManySpec, InsertSpec, JoinClause, JoinOn, JoinSource, JsonExpression, JsonExpressionNode, KyselyDatabaseAdapter, LengthAwarePaginator, LoadedRuntimeModule, MIGRATION_BRAND, MakeFactoryCommand, MakeMigrationCommand, MakeModelCommand, MakeSeederCommand, MaybePromise, MigrateCommand, MigrateFreshCommand, MigrateRollbackCommand, Migration, MigrationClass, MigrationHistoryCommand, MigrationInstanceLike, MissingDelegateException, Model, ModelAttributeValue, ModelAttributes, ModelAttributesOf, ModelCreateData, ModelDeclaredAttributeKey, ModelEventDispatcher, ModelEventHandler, ModelEventHandlerConstructor, ModelEventListener, ModelEventName, ModelFactory, ModelLifecycleState, ModelMetadata, ModelNotFoundException, ModelOrderByInput, ModelQuerySchemaLike, ModelRelationshipKey, ModelRelationshipResult, ModelStatic, ModelTableCase, ModelUpdateData, ModelWhereInput, ModelsSyncCommand, MorphManyRelationMetadata, MorphOneRelationMetadata, MorphToManyRelationMetadata, MorphToRelationMetadata, MorphedByManyRelationMetadata, NamingCase, NullCheckExpressionNode, PRISMA_ENUM_MEMBER_REGEX, PRISMA_ENUM_REGEX, PRISMA_MODEL_REGEX, PaginationCurrentPageResolver, PaginationMeta, PaginationOptions, PaginationURLDriver, PaginationURLDriverFactory, Paginator, PartitionedSelectSpec, PersistedColumnMappingsState, PersistedMetadataFeatures, PersistedPrimaryKeyGeneration, PersistedTableMetadata, PersistedTimestampColumn, PivotModel, PivotModelStatic, PrimaryKeyGeneration, PrimaryKeyGenerationPlanner, PrismaClientLike, PrismaDatabaseAdapter, PrismaDelegateLike, PrismaDelegateMap, PrismaDelegateNameMapping, PrismaFindManyArgsLike, PrismaLikeInclude, PrismaLikeOrderBy, PrismaLikeScalarFilter, PrismaLikeSelect, PrismaLikeSortOrder, PrismaLikeWhereInput, PrismaMigrationWorkflowOptions, PrismaSchemaSyncOptions, PrismaTransactionCallback, PrismaTransactionCapableClient, PrismaTransactionContext, PrismaTransactionOptions, QueryBuilder, QueryColumnComparisonCondition, QueryComparisonCondition, QueryComparisonOperator, QueryCondition, QueryConstraintException, QueryDayCondition, QueryExecutionException, QueryExecutionExceptionContext, QueryExistsCondition, QueryExpressionCondition, QueryFullTextCondition, QueryGroupByItem, QueryGroupCondition, QueryJoin, QueryJoinBoolean, QueryJoinColumnConstraint, QueryJoinConstraint, QueryJoinNestedConstraint, QueryJoinNullConstraint, QueryJoinRawConstraint, QueryJoinType, QueryJoinValueConstraint, QueryJsonCondition, QueryJsonConditionKind, QueryLogicalOperator, QueryNotCondition, QueryOrderBy, QueryRawCondition, QueryScalarComparisonOperator, QuerySchemaCreateData, QuerySchemaFindManyArgs, QuerySchemaForModel, QuerySchemaForModelInstance, QuerySchemaInclude, QuerySchemaOrderBy, QuerySchemaRow, QuerySchemaRows, QuerySchemaSelect, QuerySchemaUniqueWhere, QuerySchemaUpdateArgs, QuerySchemaUpdateData, QuerySchemaWhere, QuerySelectColumn, QueryTarget, QueryTimeCondition, RawExpressionNode, RawQuerySpec, RawSelectInput, RegisteredFactory, RegisteredModel, RelatedModelClass, RelatedModelForRelationship, RelatedModelFromResult, RelationAggregateConstraint, RelationAggregateInput, RelationAggregateSpec, RelationAggregateType, RelationColumnLookupSpec, RelationConstraint, RelationDefaultResolver, RelationDefaultValue, RelationFilterSpec, RelationLoadPlan, RelationLoadSpec, RelationMetadata, RelationMetadataProvider, RelationMetadataType, RelationResolutionException, RelationResult, RelationResultCache, RelationTableLookupSpec, RelationshipModelStatic, RuntimeClientLike, RuntimeConstructor, RuntimeModuleLoader, RuntimePathInput, RuntimePathKey, RuntimePathMap, SEEDER_BRAND, SchemaBuilder, SchemaColumn, SchemaColumnType, SchemaForeignKey, SchemaForeignKeyAction, SchemaIndex, SchemaOperation, SchemaPrimaryKey, SchemaTableAlterOperation, SchemaTableCreateOperation, SchemaTableDropOperation, SchemaUniqueConstraint, ScopeNotDefinedException, SeedCommand, Seeder, SeederCallArgument, SeederConstructor, SeederInput, SelectSpec, Serializable, SimplePaginationMeta, SoftDeleteConfig, SoftDeleteQueryMode, SortDirection, TableBuilder, TimestampColumnBehavior, TimestampNames, TimestampNaming, TransactionCallback, TransactionCapableClient, TransactionContext, TransactionOptions, URLDriver, UniqueConstraintResolutionException, UnsupportedAdapterFeatureException, UpdateManySpec, UpdateSpec, UpsertSpec, ValueExpressionNode, WhereCallback, applyAlterTableOperation, applyCreateTableOperation, applyDropTableOperation, applyMigrationRollbackToDatabase, applyMigrationRollbackToPrismaSchema, applyMigrationToDatabase, applyMigrationToPrismaSchema, applyOperationsToPersistedColumnMappingsState, applyOperationsToPrismaSchema, avg, awaitConfiguredModelsRegistration, bindAdapterToModels, buildEnumBlock, buildFieldLine, buildIndexLine, buildInverseRelationLine, buildMigrationIdentity, buildMigrationRunId, buildMigrationSource, buildModelBlock, buildPrimaryKeyLine, buildRelationLine, buildUniqueConstraintLine, caseWhen, coalesce, col, computeMigrationChecksum, configureArkormRuntime, count, createEmptyAppliedMigrationsState, createEmptyPersistedColumnMappingsState, createKyselyAdapter, createMigrationTimestamp, createPrismaAdapter, createPrismaCompatibilityAdapter, createPrismaDatabaseAdapter, createPrismaDelegateMap, defineConfig, defineFactory, deleteAppliedMigrationsStateFromStore, deletePersistedColumnMappingsState, deriveCollectionFieldName, deriveInverseRelationAlias, deriveRelationAlias, deriveRelationFieldName, deriveSingularFieldName, disposeArkormRuntime, emitRuntimeDebugEvent, ensureArkormConfigLoading, escapeRegex, expressionBuilder, findAppliedMigration, findEnumBlock, findModelBlock, fn, formatDefaultValue, formatEnumDefaultValue, formatRelationAction, fromExpressionNode, generateMigrationFile, getActiveTransactionAdapter, getActiveTransactionClient, getDefaultStubsPath, getLastBatchMigrations, getLastMigrationRun, getLatestAppliedMigrations, getMigrationPlan, getPersistedColumnMap, getPersistedEnumMap, getPersistedEnumTsType, getPersistedPrimaryKeyGeneration, getPersistedTableMetadata, getPersistedTimestampColumns, getRegisteredFactories, getRegisteredMigrations, getRegisteredModels, getRegisteredPaths, getRegisteredSeeders, getRuntimeAdapter, getRuntimeClient, getRuntimeCompatibilityAdapter, getRuntimeDebugHandler, getRuntimePaginationCurrentPageResolver, getRuntimePaginationURLDriverFactory, getRuntimePrismaClient, getUserConfig, inferDelegateName, isDelegateLike, isMigrationApplied, isMigrationPlanningActive, isQuerySchemaLike, isTransactionCapableClient, json, loadArkormConfig, loadFactoriesFrom, loadMigrationsFrom, loadModelsFrom, loadSeedersFrom, markMigrationApplied, markMigrationRun, max, min, pad, raw, readAppliedMigrationsState, readAppliedMigrationsStateFromStore, readPersistedColumnMappingsState, rebuildPersistedColumnMappingsState, registerFactories, registerMigrations, registerModels, registerPaths, registerSeeders, removeAppliedMigration, resetArkormRuntimeForTests, resetPersistedColumnMappingsCache, resetRuntimeRegistryForTests, resolveCast, resolveColumnMappingsFilePath, resolveEnumName, resolveGeneratedExpression, resolveMigrationClassName, resolveMigrationStateFilePath, resolvePersistedMetadataFeatures, resolvePrismaType, resolveRuntimeCompatibilityQuerySchema, resolveRuntimeCompatibilityQuerySchemaOrThrow, runArkormTransaction, runInMigrationPlanning, runMigrationWithPrisma, runPrismaCommand, stripPrismaSchemaModelsAndEnums, sum, supportsDatabaseCreation, supportsDatabaseMigrationExecution, supportsDatabaseMigrationState, supportsDatabaseReset, syncPersistedColumnMappingsFromState, toMigrationFileSlug, toModelName, val, validatePersistedMetadataFeaturesForMigrations, where, writeAppliedMigrationsState, writeAppliedMigrationsStateToStore, writePersistedColumnMappingsState };
|
|
1
|
+
import { $ as buildPrimaryKeyLine, $a as TransactionContext, $c as SchemaTableCreateOperation, $i as ClientResolver, $n as Arkorm, $o as fn, $r as DeleteSpec, $s as FactoryModelConstructor, $t as PersistedTimestampColumn, A as isQuerySchemaLike, Aa as PrismaLikeWhereInput, Ac as MorphToRelationMetadata, Ai as QueryTarget, An as Migration, Ao as ModelOrderByInput, Ar as PrismaDelegateNameMapping, As as RelationConstraint, At as buildMigrationIdentity, B as applyCreateTableOperation, Ba as QuerySchemaRows, Bc as MigrationClass, Bi as UpdateManySpec, Bn as MigrateRollbackCommand, Bo as RelatedModelClass, Br as AdapterModelIntrospectionOptions, Bs as JoinSource, Bt as markMigrationApplied, C as getRuntimeClient, Ca as PrismaDelegateLike, Cc as HasManyThroughRelationMetadata, Ci as QueryJsonConditionKind, Cn as QueryConstraintException, Co as ModelDeclaredAttributeKey, Cr as resolveRegisteredModel, Ct as supportsDatabaseCreation, D as getRuntimePrismaClient, Da as PrismaLikeScalarFilter, Dc as MorphManyRelationMetadata, Di as QueryRawCondition, Dn as ArkormException, Do as ModelEventListener, Dr as SeederConstructor, Ds as RelationAggregateInput, Dt as toModelName, E as getRuntimePaginationURLDriverFactory, Ea as PrismaLikeOrderBy, Ec as ModelMetadata, Ei as QueryOrderBy, En as ArkormErrorContext, Eo as ModelEventHandlerConstructor, Er as SeederCallArgument, Es as RelationAggregateConstraint, Et as toMigrationFileSlug, F as PrimaryKeyGenerationPlanner, Fa as QuerySchemaCreateData, Fc as AppliedMigrationEntry, Fi as RelationLoadPlan, Fn as resolveGeneratedExpression, Fo as QuerySchemaForModel, Fr as AdapterCapabilities, Fs as RelationResultCache, Ft as findAppliedMigration, G as applyMigrationToPrismaSchema, Ga as QuerySchemaWhere, Gc as SchemaColumn, Gi as ArkormBootContext, Gn as MakeMigrationCommand, Go as ExpressionBuilder, Gr as AggregateSelection, Gs as LengthAwarePaginator, Gt as resolveMigrationStateFilePath, H as applyMigrationRollbackToDatabase, Ha as QuerySchemaUniqueWhere, Hc as PrimaryKeyGeneration, Hi as UpsertSpec, Hn as MigrateCommand, Ho as AggregateExpression, Hr as AdapterQueryOperation, Hs as RelatedModelFromResult, Ht as readAppliedMigrationsState, I as PRISMA_ENUM_MEMBER_REGEX, Ia as QuerySchemaFindManyArgs, Ic as AppliedMigrationRun, Ii as RelationLoadSpec, In as ForeignKeyBuilder, Io as QuerySchemaForModelInstance, Ir as AdapterCapability, Is as RelationTableLookupSpec, It as getLastBatchMigrations, J as buildFieldLine, Ja as Serializable, Jc as SchemaForeignKeyAction, Ji as ArkormDebugHandler, Jn as DbCommand, Jo as caseWhen, Jr as DatabasePrimitive, Js as FactoryAttributeResolver, Jt as writeAppliedMigrationsStateToStore, K as applyOperationsToPrismaSchema, Ka as RawSelectInput, Kc as SchemaColumnType, Ki as ArkormConfig, Kn as MakeFactoryCommand, Ko as JsonExpression, Kr as AggregateSpec, Ks as Paginator, Kt as supportsDatabaseMigrationState, L as PRISMA_ENUM_REGEX, La as QuerySchemaInclude, Lc as AppliedMigrationsState, Li as SelectSpec, Ln as SeedCommand, Lo as RegisteredModelClass, Lr as AdapterDatabaseCreationResult, Ls as EagerLoadQueryForRelationship, Lt as getLastMigrationRun, M as loadArkormConfig, Ma as PrismaTransactionCapableClient, Mc as PivotModelStatic, Mi as RawQuerySpec, Mn as EnumBuilder, Mo as ModelRelationshipResult, Mr as createPrismaDatabaseAdapter, Ms as RelationDefaultValue, Mt as computeMigrationChecksum, N as resetArkormRuntimeForTests, Na as PrismaTransactionContext, Nc as RelationMetadata, Ni as RelationAggregateSpec, Nn as TableBuilder, No as ModelUpdateData, Nr as KyselyDatabaseAdapter, Ns as RelationMetadataProvider, Nt as createEmptyAppliedMigrationsState, O as getUserConfig, Oa as PrismaLikeSelect, Oc as MorphOneRelationMetadata, Oi as QueryScalarComparisonOperator, On as DB, Oo as ModelEventName, Or as SeederInput, Os as RelationAggregateType, Ot as isMigrationPlanningActive, P as runArkormTransaction, Pa as PrismaTransactionOptions, Pc as RelationMetadataType, Pi as RelationFilterSpec, Pn as GeneratedColumnExpression, Po as ModelWhereInput, Pr as createKyselyAdapter, Ps as RelationResult, Pt as deleteAppliedMigrationsStateFromStore, Q as buildModelBlock, Qa as TransactionCapableClient, Qc as SchemaTableAlterOperation, Qi as CastType, Qn as AttributeOptions, Qo as expressionBuilder, Qr as DeleteManySpec, Qs as FactoryDefinitionAttributes, Qt as PersistedTableMetadata, R as PRISMA_MODEL_REGEX, Ra as QuerySchemaOrderBy, Rc as GenerateMigrationOptions, Ri as SoftDeleteQueryMode, Rn as ModelsSyncCommand, Ro as RegisteredModelInstance, Rr as AdapterInspectionRequest, Rs as EagerLoadRelations, Rt as getLatestAppliedMigrations, S as getRuntimeAdapter, Sa as PrismaClientLike, Sc as HasManyRelationMetadata, Si as QueryJsonCondition, Sn as QueryExecutionExceptionContext, So as ModelCreateData, Sr as resetRuntimeRegistryForTests, St as stripPrismaSchemaModelsAndEnums, T as getRuntimePaginationCurrentPageResolver, Ta as PrismaLikeInclude, Tc as HasOneThroughRelationMetadata, Ti as QueryNotCondition, Tn as MissingDelegateException, To as ModelEventHandler, Tr as Seeder, Tt as supportsDatabaseReset, U as applyMigrationRollbackToPrismaSchema, Ua as QuerySchemaUpdateArgs, Uc as PrismaMigrationWorkflowOptions, Ui as AdapterBindableModel, Un as MakeSeederCommand, Uo as CaseExpression, Ur as AdapterTransactionContext, Us as WhereCallback, Ut as readAppliedMigrationsStateFromStore, V as applyDropTableOperation, Va as QuerySchemaSelect, Vc as MigrationInstanceLike, Vi as UpdateSpec, Vn as MigrateFreshCommand, Vo as Model, Vr as AdapterModelStructure, Vs as RelatedModelForRelationship, Vt as markMigrationRun, W as applyMigrationToDatabase, Wa as QuerySchemaUpdateData, Wc as PrismaSchemaSyncOptions, Wi as AdapterQueryInspection, Wn as MakeModelCommand, Wo as Expression, Wr as AggregateOperation, Ws as JoinClause, Wt as removeAppliedMigration, X as buildInverseRelationLine, Xa as SoftDeleteConfig, Xc as SchemaOperation, Xi as CastHandler, Xn as resolveCast, Xo as col, Xr as DatabaseRows, Xs as FactoryCallback, Xt as PersistedMetadataFeatures, Y as buildIndexLine, Ya as SimplePaginationMeta, Yc as SchemaIndex, Yi as CastDefinition, Yn as CliApp, Yo as coalesce, Yr as DatabaseRow, Ys as FactoryAttributes, Yt as PersistedColumnMappingsState, Z as buildMigrationSource, Za as TransactionCallback, Zc as SchemaPrimaryKey, Zi as CastMap, Zn as Attribute, Zo as count, Zr as DatabaseValue, Zs as FactoryDefinition, Zt as PersistedPrimaryKeyGeneration, _ as emitRuntimeDebugEvent, _a as PaginationCurrentPageResolver, _c as DatabaseTableOptions, _i as QueryJoinNestedConstraint, _n as UnsupportedAdapterFeatureException, _o as DelegateForModelSchema, _r as registerFactories, _t as resolveEnumName, a as getRuntimeCompatibilityAdapter, aa as DelegateRows, ac as CaseExpressionBranch, ai as QueryComparisonOperator, an as getPersistedEnumTsType, ao as ExpressionSelectMap, ar as RuntimePathInput, as as sum, at as deriveRelationAlias, b as getActiveTransactionClient, ba as PaginationURLDriver, bc as BelongsToRelationMetadata, bi as QueryJoinType, bn as RelationResolutionException, bo as ModelAttributes, br as registerPaths, bt as runMigrationWithPrisma, c as PrismaDelegateMap, ca as DelegateUpdateArgs, cc as ExpressionBinaryOperator, ci as QueryExistsCondition, cn as getPersistedTimestampColumns, co as QueryBuilder, cr as getRegisteredFactories, cs as InlineFactory, ct as escapeRegex, d as inferDelegateName, da as EagerLoadConstraint, dc as FunctionExpressionNode, di as QueryGroupByItem, dn as resetPersistedColumnMappingsCache, do as AttributeOrderBy, dr as getRegisteredPaths, dt as formatDefaultValue, ea as DelegateCreateData, ec as FactoryRelationshipResolver, ei as InsertManySpec, el as SchemaTableDropOperation, en as applyOperationsToPersistedColumnMappingsState, eo as TransactionOptions, er as Arkormx, es as fromExpressionNode, et as buildRelationLine, f as awaitConfiguredModelsRegistration, fa as EagerLoadMap, fc as InExpressionNode, fi as QueryGroupCondition, fn as resolveColumnMappingsFilePath, fo as AttributeQuerySchema, fr as getRegisteredSeeders, ft as formatEnumDefaultValue, g as disposeArkormRuntime, ga as NamingCase, gc as ValueExpressionNode, gi as QueryJoinConstraint, gn as writePersistedColumnMappingsState, go as AttributeWhereInput, gr as loadSeedersFrom, gt as pad, h as defineConfig, ha as ModelTableCase, hc as RawExpressionNode, hi as QueryJoinColumnConstraint, hn as validatePersistedMetadataFeaturesForMigrations, ho as AttributeUpdateInput, hr as loadModelsFrom, ht as getMigrationPlan, i as RuntimeModuleLoader, ia as DelegateRow, ic as BinaryExpressionNode, ii as QueryComparisonCondition, il as TimestampNaming, in as getPersistedEnumMap, io as EachCallback, ir as RuntimeConstructor, is as raw, it as deriveInverseRelationAlias, j as isTransactionCapableClient, ja as PrismaTransactionCallback, jc as MorphedByManyRelationMetadata, ji as QueryTimeCondition, jn as SchemaBuilder, jo as ModelRelationshipKey, jr as createPrismaCompatibilityAdapter, js as RelationDefaultResolver, jt as buildMigrationRunId, k as isDelegateLike, ka as PrismaLikeSortOrder, kc as MorphToManyRelationMetadata, ki as QuerySelectColumn, kn as MIGRATION_BRAND, ko as ModelLifecycleState, kr as PrismaDatabaseAdapter, ks as RelationColumnLookupSpec, kt as runInMigrationPlanning, l as createPrismaAdapter, la as DelegateUpdateData, lc as ExpressionJsonCast, li as QueryExpressionCondition, ln as readPersistedColumnMappingsState, lo as ArkormModelRegistry, lr as getRegisteredMigrations, ls as ModelFactory, lt as findEnumBlock, m as configureArkormRuntime, ma as ModelQuerySchemaLike, mc as NullCheckExpressionNode, mi as QueryJoinBoolean, mn as syncPersistedColumnMappingsFromState, mo as AttributeSelect, mr as loadMigrationsFrom, mt as generateMigrationFile, n as PivotModel, na as DelegateInclude, nc as MaybePromise, ni as PartitionedSelectSpec, nl as TimestampColumnBehavior, nn as deletePersistedColumnMappingsState, no as RelationshipModelStatic, nr as RegisteredFactory, ns as max, nt as createMigrationTimestamp, o as resolveRuntimeCompatibilityQuerySchema, oa as DelegateSelect, oc as CaseExpressionNode, oi as QueryCondition, on as getPersistedPrimaryKeyGeneration, oo as GroupByAggregateRow, or as RuntimePathKey, os as val, ot as deriveRelationFieldName, p as bindAdapterToModels, pa as GetUserConfig, pc as JsonExpressionNode, pi as QueryJoin, pn as resolvePersistedMetadataFeatures, po as AttributeSchemaDelegate, pr as loadFactoriesFrom, pt as formatRelationAction, q as buildEnumBlock, qa as RuntimeClientLike, qc as SchemaForeignKey, qi as ArkormDebugEvent, qn as InitCommand, qo as avg, qr as DatabaseAdapter, qs as ArkormCollection, qt as writeAppliedMigrationsState, r as LoadedRuntimeModule, ra as DelegateOrderBy, rc as AggregateExpressionNode, ri as QueryColumnComparisonCondition, rl as TimestampNames, rn as getPersistedColumnMap, ro as ChunkCallback, rr as RegisteredModel, rs as min, rt as deriveCollectionFieldName, s as resolveRuntimeCompatibilityQuerySchemaOrThrow, sa as DelegateUniqueWhere, sc as ColumnExpressionNode, si as QueryDayCondition, sn as getPersistedTableMetadata, so as GroupByAggregateSpec, sr as RuntimePathMap, ss as where, st as deriveSingularFieldName, t as URLDriver, ta as DelegateFindManyArgs, tc as FactoryState, ti as InsertSpec, tl as SchemaUniqueConstraint, tn as createEmptyPersistedColumnMappingsState, to as ModelStatic, tr as getModel, ts as json, tt as buildUniqueConstraintLine, u as createPrismaDelegateMap, ua as DelegateWhere, uc as ExpressionNode, ui as QueryFullTextCondition, un as rebuildPersistedColumnMappingsState, uo as AttributeCreateInput, ur as getRegisteredModels, us as defineFactory, ut as findModelBlock, v as ensureArkormConfigLoading, va as PaginationMeta, vc as DatabaseTablePersistedMetadataOptions, vi as QueryJoinNullConstraint, vn as UniqueConstraintResolutionException, vo as GlobalScope, vr as registerMigrations, vt as resolveMigrationClassName, w as getRuntimeDebugHandler, wa as PrismaFindManyArgsLike, wc as HasOneRelationMetadata, wi as QueryLogicalOperator, wn as ModelNotFoundException, wo as ModelEventDispatcher, wr as SEEDER_BRAND, wt as supportsDatabaseMigrationExecution, x as getDefaultStubsPath, xa as PaginationURLDriverFactory, xc as ColumnMap, xi as QueryJoinValueConstraint, xn as QueryExecutionException, xo as ModelAttributesOf, xr as registerSeeders, xt as runPrismaCommand, y as getActiveTransactionAdapter, ya as PaginationOptions, yc as BelongsToManyRelationMetadata, yi as QueryJoinRawConstraint, yn as ScopeNotDefinedException, yo as ModelAttributeValue, yr as registerModels, yt as resolvePrismaType, z as applyAlterTableOperation, za as QuerySchemaRow, zc as GeneratedMigrationFile, zi as SortDirection, zn as MigrationHistoryCommand, zo as RegisteredModelName, zr as AdapterModelFieldStructure, zs as JoinOn, zt as isMigrationApplied } from "./index-D7YII9Fu.cjs";
|
|
2
|
+
export { AdapterBindableModel, AdapterCapabilities, AdapterCapability, AdapterDatabaseCreationResult, AdapterInspectionRequest, AdapterModelFieldStructure, AdapterModelIntrospectionOptions, AdapterModelStructure, AdapterQueryInspection, AdapterQueryOperation, AdapterTransactionContext, AggregateExpression, AggregateExpressionNode, AggregateOperation, AggregateSelection, AggregateSpec, AppliedMigrationEntry, AppliedMigrationRun, AppliedMigrationsState, Arkorm, ArkormBootContext, ArkormCollection, ArkormConfig, ArkormDebugEvent, ArkormDebugHandler, ArkormErrorContext, ArkormException, ArkormModelRegistry, Arkormx, Attribute, AttributeCreateInput, AttributeOptions, AttributeOrderBy, AttributeQuerySchema, AttributeSchemaDelegate, AttributeSelect, AttributeUpdateInput, AttributeWhereInput, BelongsToManyRelationMetadata, BelongsToRelationMetadata, BinaryExpressionNode, CaseExpression, CaseExpressionBranch, CaseExpressionNode, CastDefinition, CastHandler, CastMap, CastType, ChunkCallback, CliApp, ClientResolver, ColumnExpressionNode, ColumnMap, DB, DatabaseAdapter, DatabasePrimitive, DatabaseRow, DatabaseRows, DatabaseTableOptions, DatabaseTablePersistedMetadataOptions, DatabaseValue, DbCommand, DelegateCreateData, DelegateFindManyArgs, DelegateForModelSchema, DelegateInclude, DelegateOrderBy, DelegateRow, DelegateRows, DelegateSelect, DelegateUniqueWhere, DelegateUpdateArgs, DelegateUpdateData, DelegateWhere, DeleteManySpec, DeleteSpec, EachCallback, EagerLoadConstraint, EagerLoadMap, EagerLoadQueryForRelationship, EagerLoadRelations, EnumBuilder, Expression, ExpressionBinaryOperator, ExpressionBuilder, ExpressionJsonCast, ExpressionNode, ExpressionSelectMap, FactoryAttributeResolver, FactoryAttributes, FactoryCallback, FactoryDefinition, FactoryDefinitionAttributes, FactoryModelConstructor, FactoryRelationshipResolver, FactoryState, ForeignKeyBuilder, FunctionExpressionNode, GenerateMigrationOptions, GeneratedColumnExpression, GeneratedMigrationFile, GetUserConfig, GlobalScope, GroupByAggregateRow, GroupByAggregateSpec, HasManyRelationMetadata, HasManyThroughRelationMetadata, HasOneRelationMetadata, HasOneThroughRelationMetadata, InExpressionNode, InitCommand, InlineFactory, InsertManySpec, InsertSpec, JoinClause, JoinOn, JoinSource, JsonExpression, JsonExpressionNode, KyselyDatabaseAdapter, LengthAwarePaginator, LoadedRuntimeModule, MIGRATION_BRAND, MakeFactoryCommand, MakeMigrationCommand, MakeModelCommand, MakeSeederCommand, MaybePromise, MigrateCommand, MigrateFreshCommand, MigrateRollbackCommand, Migration, MigrationClass, MigrationHistoryCommand, MigrationInstanceLike, MissingDelegateException, Model, ModelAttributeValue, ModelAttributes, ModelAttributesOf, ModelCreateData, ModelDeclaredAttributeKey, ModelEventDispatcher, ModelEventHandler, ModelEventHandlerConstructor, ModelEventListener, ModelEventName, ModelFactory, ModelLifecycleState, ModelMetadata, ModelNotFoundException, ModelOrderByInput, ModelQuerySchemaLike, ModelRelationshipKey, ModelRelationshipResult, ModelStatic, ModelTableCase, ModelUpdateData, ModelWhereInput, ModelsSyncCommand, MorphManyRelationMetadata, MorphOneRelationMetadata, MorphToManyRelationMetadata, MorphToRelationMetadata, MorphedByManyRelationMetadata, NamingCase, NullCheckExpressionNode, PRISMA_ENUM_MEMBER_REGEX, PRISMA_ENUM_REGEX, PRISMA_MODEL_REGEX, PaginationCurrentPageResolver, PaginationMeta, PaginationOptions, PaginationURLDriver, PaginationURLDriverFactory, Paginator, PartitionedSelectSpec, PersistedColumnMappingsState, PersistedMetadataFeatures, PersistedPrimaryKeyGeneration, PersistedTableMetadata, PersistedTimestampColumn, PivotModel, PivotModelStatic, PrimaryKeyGeneration, PrimaryKeyGenerationPlanner, PrismaClientLike, PrismaDatabaseAdapter, PrismaDelegateLike, PrismaDelegateMap, PrismaDelegateNameMapping, PrismaFindManyArgsLike, PrismaLikeInclude, PrismaLikeOrderBy, PrismaLikeScalarFilter, PrismaLikeSelect, PrismaLikeSortOrder, PrismaLikeWhereInput, PrismaMigrationWorkflowOptions, PrismaSchemaSyncOptions, PrismaTransactionCallback, PrismaTransactionCapableClient, PrismaTransactionContext, PrismaTransactionOptions, QueryBuilder, QueryColumnComparisonCondition, QueryComparisonCondition, QueryComparisonOperator, QueryCondition, QueryConstraintException, QueryDayCondition, QueryExecutionException, QueryExecutionExceptionContext, QueryExistsCondition, QueryExpressionCondition, QueryFullTextCondition, QueryGroupByItem, QueryGroupCondition, QueryJoin, QueryJoinBoolean, QueryJoinColumnConstraint, QueryJoinConstraint, QueryJoinNestedConstraint, QueryJoinNullConstraint, QueryJoinRawConstraint, QueryJoinType, QueryJoinValueConstraint, QueryJsonCondition, QueryJsonConditionKind, QueryLogicalOperator, QueryNotCondition, QueryOrderBy, QueryRawCondition, QueryScalarComparisonOperator, QuerySchemaCreateData, QuerySchemaFindManyArgs, QuerySchemaForModel, QuerySchemaForModelInstance, QuerySchemaInclude, QuerySchemaOrderBy, QuerySchemaRow, QuerySchemaRows, QuerySchemaSelect, QuerySchemaUniqueWhere, QuerySchemaUpdateArgs, QuerySchemaUpdateData, QuerySchemaWhere, QuerySelectColumn, QueryTarget, QueryTimeCondition, RawExpressionNode, RawQuerySpec, RawSelectInput, RegisteredFactory, RegisteredModel, RegisteredModelClass, RegisteredModelInstance, RegisteredModelName, RelatedModelClass, RelatedModelForRelationship, RelatedModelFromResult, RelationAggregateConstraint, RelationAggregateInput, RelationAggregateSpec, RelationAggregateType, RelationColumnLookupSpec, RelationConstraint, RelationDefaultResolver, RelationDefaultValue, RelationFilterSpec, RelationLoadPlan, RelationLoadSpec, RelationMetadata, RelationMetadataProvider, RelationMetadataType, RelationResolutionException, RelationResult, RelationResultCache, RelationTableLookupSpec, RelationshipModelStatic, RuntimeClientLike, RuntimeConstructor, RuntimeModuleLoader, RuntimePathInput, RuntimePathKey, RuntimePathMap, SEEDER_BRAND, SchemaBuilder, SchemaColumn, SchemaColumnType, SchemaForeignKey, SchemaForeignKeyAction, SchemaIndex, SchemaOperation, SchemaPrimaryKey, SchemaTableAlterOperation, SchemaTableCreateOperation, SchemaTableDropOperation, SchemaUniqueConstraint, ScopeNotDefinedException, SeedCommand, Seeder, SeederCallArgument, SeederConstructor, SeederInput, SelectSpec, Serializable, SimplePaginationMeta, SoftDeleteConfig, SoftDeleteQueryMode, SortDirection, TableBuilder, TimestampColumnBehavior, TimestampNames, TimestampNaming, TransactionCallback, TransactionCapableClient, TransactionContext, TransactionOptions, URLDriver, UniqueConstraintResolutionException, UnsupportedAdapterFeatureException, UpdateManySpec, UpdateSpec, UpsertSpec, ValueExpressionNode, WhereCallback, applyAlterTableOperation, applyCreateTableOperation, applyDropTableOperation, applyMigrationRollbackToDatabase, applyMigrationRollbackToPrismaSchema, applyMigrationToDatabase, applyMigrationToPrismaSchema, applyOperationsToPersistedColumnMappingsState, applyOperationsToPrismaSchema, avg, awaitConfiguredModelsRegistration, bindAdapterToModels, buildEnumBlock, buildFieldLine, buildIndexLine, buildInverseRelationLine, buildMigrationIdentity, buildMigrationRunId, buildMigrationSource, buildModelBlock, buildPrimaryKeyLine, buildRelationLine, buildUniqueConstraintLine, caseWhen, coalesce, col, computeMigrationChecksum, configureArkormRuntime, count, createEmptyAppliedMigrationsState, createEmptyPersistedColumnMappingsState, createKyselyAdapter, createMigrationTimestamp, createPrismaAdapter, createPrismaCompatibilityAdapter, createPrismaDatabaseAdapter, createPrismaDelegateMap, defineConfig, defineFactory, deleteAppliedMigrationsStateFromStore, deletePersistedColumnMappingsState, deriveCollectionFieldName, deriveInverseRelationAlias, deriveRelationAlias, deriveRelationFieldName, deriveSingularFieldName, disposeArkormRuntime, emitRuntimeDebugEvent, ensureArkormConfigLoading, escapeRegex, expressionBuilder, findAppliedMigration, findEnumBlock, findModelBlock, fn, formatDefaultValue, formatEnumDefaultValue, formatRelationAction, fromExpressionNode, generateMigrationFile, getActiveTransactionAdapter, getActiveTransactionClient, getDefaultStubsPath, getLastBatchMigrations, getLastMigrationRun, getLatestAppliedMigrations, getMigrationPlan, getModel, getPersistedColumnMap, getPersistedEnumMap, getPersistedEnumTsType, getPersistedPrimaryKeyGeneration, getPersistedTableMetadata, getPersistedTimestampColumns, getRegisteredFactories, getRegisteredMigrations, getRegisteredModels, getRegisteredPaths, getRegisteredSeeders, getRuntimeAdapter, getRuntimeClient, getRuntimeCompatibilityAdapter, getRuntimeDebugHandler, getRuntimePaginationCurrentPageResolver, getRuntimePaginationURLDriverFactory, getRuntimePrismaClient, getUserConfig, inferDelegateName, isDelegateLike, isMigrationApplied, isMigrationPlanningActive, isQuerySchemaLike, isTransactionCapableClient, json, loadArkormConfig, loadFactoriesFrom, loadMigrationsFrom, loadModelsFrom, loadSeedersFrom, markMigrationApplied, markMigrationRun, max, min, pad, raw, readAppliedMigrationsState, readAppliedMigrationsStateFromStore, readPersistedColumnMappingsState, rebuildPersistedColumnMappingsState, registerFactories, registerMigrations, registerModels, registerPaths, registerSeeders, removeAppliedMigration, resetArkormRuntimeForTests, resetPersistedColumnMappingsCache, resetRuntimeRegistryForTests, resolveCast, resolveColumnMappingsFilePath, resolveEnumName, resolveGeneratedExpression, resolveMigrationClassName, resolveMigrationStateFilePath, resolvePersistedMetadataFeatures, resolvePrismaType, resolveRegisteredModel, resolveRuntimeCompatibilityQuerySchema, resolveRuntimeCompatibilityQuerySchemaOrThrow, runArkormTransaction, runInMigrationPlanning, runMigrationWithPrisma, runPrismaCommand, stripPrismaSchemaModelsAndEnums, sum, supportsDatabaseCreation, supportsDatabaseMigrationExecution, supportsDatabaseMigrationState, supportsDatabaseReset, syncPersistedColumnMappingsFromState, toMigrationFileSlug, toModelName, val, validatePersistedMetadataFeaturesForMigrations, where, writeAppliedMigrationsState, writeAppliedMigrationsStateToStore, writePersistedColumnMappingsState };
|