arkormx 0.2.9 → 0.2.10
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/index.cjs +48 -3
- package/dist/index.d.cts +21 -1
- package/dist/index.d.mts +21 -1
- package/dist/index.mjs +48 -4
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -41,6 +41,24 @@ let node_crypto = require("node:crypto");
|
|
|
41
41
|
let node_url = require("node:url");
|
|
42
42
|
let _h3ravel_collect_js = require("@h3ravel/collect.js");
|
|
43
43
|
|
|
44
|
+
//#region src/Attribute.ts
|
|
45
|
+
var Attribute = class Attribute {
|
|
46
|
+
get;
|
|
47
|
+
set;
|
|
48
|
+
constructor(options = {}) {
|
|
49
|
+
this.get = options.get;
|
|
50
|
+
this.set = options.set;
|
|
51
|
+
}
|
|
52
|
+
static make(options) {
|
|
53
|
+
return new Attribute(options);
|
|
54
|
+
}
|
|
55
|
+
static isAttribute(value) {
|
|
56
|
+
if (!value || typeof value !== "object") return false;
|
|
57
|
+
return value instanceof Attribute;
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
//#endregion
|
|
44
62
|
//#region src/casts.ts
|
|
45
63
|
const builtinCasts = {
|
|
46
64
|
string: {
|
|
@@ -4914,11 +4932,15 @@ var Model = class Model {
|
|
|
4914
4932
|
this.fill(attributes);
|
|
4915
4933
|
return new Proxy(this, {
|
|
4916
4934
|
get: (target, key, receiver) => {
|
|
4917
|
-
if (typeof key !== "string"
|
|
4935
|
+
if (typeof key !== "string") return Reflect.get(target, key, receiver);
|
|
4936
|
+
const attributeMutator = target.resolveAttributeMutator(key);
|
|
4937
|
+
if (key in target && !attributeMutator) return Reflect.get(target, key, receiver);
|
|
4918
4938
|
return target.getAttribute(key);
|
|
4919
4939
|
},
|
|
4920
4940
|
set: (target, key, value, receiver) => {
|
|
4921
|
-
if (typeof key !== "string"
|
|
4941
|
+
if (typeof key !== "string") return Reflect.set(target, key, value, receiver);
|
|
4942
|
+
const attributeMutator = target.resolveAttributeMutator(key);
|
|
4943
|
+
if (key in target && !attributeMutator) return Reflect.set(target, key, value, receiver);
|
|
4922
4944
|
target.setAttribute(key, value);
|
|
4923
4945
|
return true;
|
|
4924
4946
|
}
|
|
@@ -5107,18 +5129,22 @@ var Model = class Model {
|
|
|
5107
5129
|
return this;
|
|
5108
5130
|
}
|
|
5109
5131
|
getAttribute(key) {
|
|
5132
|
+
const attributeMutator = this.resolveAttributeMutator(key);
|
|
5110
5133
|
const mutator = this.resolveGetMutator(key);
|
|
5111
5134
|
const cast = this.casts[key];
|
|
5112
5135
|
let value = this.attributes[key];
|
|
5113
5136
|
if (cast) value = resolveCast(cast).get(value);
|
|
5137
|
+
if (attributeMutator?.get) return attributeMutator.get.call(this, value);
|
|
5114
5138
|
if (mutator) return mutator.call(this, value);
|
|
5115
5139
|
return value;
|
|
5116
5140
|
}
|
|
5117
5141
|
setAttribute(key, value) {
|
|
5142
|
+
const attributeMutator = this.resolveAttributeMutator(key);
|
|
5118
5143
|
const mutator = this.resolveSetMutator(key);
|
|
5119
5144
|
const cast = this.casts[key];
|
|
5120
5145
|
let resolved = value;
|
|
5121
|
-
if (
|
|
5146
|
+
if (attributeMutator?.set) resolved = attributeMutator.set.call(this, resolved);
|
|
5147
|
+
else if (mutator) resolved = mutator.call(this, resolved);
|
|
5122
5148
|
if (cast) resolved = resolveCast(cast).set(resolved);
|
|
5123
5149
|
this.attributes[key] = resolved;
|
|
5124
5150
|
return this;
|
|
@@ -5386,6 +5412,24 @@ var Model = class Model {
|
|
|
5386
5412
|
return typeof method === "function" ? method : null;
|
|
5387
5413
|
}
|
|
5388
5414
|
/**
|
|
5415
|
+
* Resolve an Attribute object mutator method for a given key, if it exists.
|
|
5416
|
+
*
|
|
5417
|
+
* @param key
|
|
5418
|
+
* @returns
|
|
5419
|
+
*/
|
|
5420
|
+
resolveAttributeMutator(key) {
|
|
5421
|
+
if (key === "constructor") return null;
|
|
5422
|
+
const methodName = `${(0, _h3ravel_support.str)(key).camel()}`;
|
|
5423
|
+
const prototype = Object.getPrototypeOf(this);
|
|
5424
|
+
if (!prototype) return null;
|
|
5425
|
+
const method = prototype[methodName];
|
|
5426
|
+
if (typeof method !== "function") return null;
|
|
5427
|
+
if (method === Model.prototype[methodName]) return null;
|
|
5428
|
+
const resolved = method.call(this);
|
|
5429
|
+
if (Attribute.isAttribute(resolved)) return resolved;
|
|
5430
|
+
return null;
|
|
5431
|
+
}
|
|
5432
|
+
/**
|
|
5389
5433
|
* Resolve a set mutator method for a given attribute key, if it exists.
|
|
5390
5434
|
*
|
|
5391
5435
|
* @param key
|
|
@@ -5439,6 +5483,7 @@ var Model = class Model {
|
|
|
5439
5483
|
//#endregion
|
|
5440
5484
|
exports.ArkormCollection = ArkormCollection;
|
|
5441
5485
|
exports.ArkormException = ArkormException;
|
|
5486
|
+
exports.Attribute = Attribute;
|
|
5442
5487
|
exports.CliApp = CliApp;
|
|
5443
5488
|
exports.ForeignKeyBuilder = ForeignKeyBuilder;
|
|
5444
5489
|
exports.InitCommand = InitCommand;
|
package/dist/index.d.cts
CHANGED
|
@@ -2,6 +2,19 @@ import { PrismaClient } from "@prisma/client";
|
|
|
2
2
|
import { Collection } from "@h3ravel/collect.js";
|
|
3
3
|
import { Command } from "@h3ravel/musket";
|
|
4
4
|
|
|
5
|
+
//#region src/Attribute.d.ts
|
|
6
|
+
interface AttributeOptions<TGet = unknown, TSet = unknown> {
|
|
7
|
+
get?: (value: unknown) => TGet;
|
|
8
|
+
set?: (value: TSet) => unknown;
|
|
9
|
+
}
|
|
10
|
+
declare class Attribute<TGet = unknown, TSet = unknown> {
|
|
11
|
+
readonly get?: (value: unknown) => TGet;
|
|
12
|
+
readonly set?: (value: TSet) => unknown;
|
|
13
|
+
constructor(options?: AttributeOptions<TGet, TSet>);
|
|
14
|
+
static make<TGet = unknown, TSet = unknown>(options: AttributeOptions<TGet, TSet>): Attribute<TGet, TSet>;
|
|
15
|
+
static isAttribute(value: unknown): value is Attribute;
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
5
18
|
//#region src/types/factories.d.ts
|
|
6
19
|
type FactoryAttributes = Record<string, unknown>;
|
|
7
20
|
interface FactoryModelConstructor<TModel> {
|
|
@@ -873,6 +886,13 @@ declare abstract class Model<TSchema extends PrismaDelegateLike | Record<string,
|
|
|
873
886
|
* @returns
|
|
874
887
|
*/
|
|
875
888
|
private resolveGetMutator;
|
|
889
|
+
/**
|
|
890
|
+
* Resolve an Attribute object mutator method for a given key, if it exists.
|
|
891
|
+
*
|
|
892
|
+
* @param key
|
|
893
|
+
* @returns
|
|
894
|
+
*/
|
|
895
|
+
private resolveAttributeMutator;
|
|
876
896
|
/**
|
|
877
897
|
* Resolve a set mutator method for a given attribute key, if it exists.
|
|
878
898
|
*
|
|
@@ -3162,4 +3182,4 @@ declare class URLDriver {
|
|
|
3162
3182
|
url(page: number): string;
|
|
3163
3183
|
}
|
|
3164
3184
|
//#endregion
|
|
3165
|
-
export { ArkormCollection, ArkormException, CliApp, ForeignKeyBuilder, InitCommand, InlineFactory, LengthAwarePaginator, MIGRATION_BRAND, MakeFactoryCommand, MakeMigrationCommand, MakeModelCommand, MakeSeederCommand, MigrateCommand, MigrateRollbackCommand, Migration, MigrationHistoryCommand, Model, ModelFactory, ModelNotFoundException, ModelsSyncCommand, PRISMA_MODEL_REGEX, Paginator, PrismaDelegateMap, QueryBuilder, SEEDER_BRAND, SchemaBuilder, SeedCommand, Seeder, SeederCallArgument, SeederConstructor, SeederInput, TableBuilder, URLDriver, applyAlterTableOperation, applyCreateTableOperation, applyDropTableOperation, applyMigrationRollbackToPrismaSchema, applyMigrationToPrismaSchema, applyOperationsToPrismaSchema, buildFieldLine, buildIndexLine, buildInverseRelationLine, buildMigrationIdentity, buildMigrationRunId, buildMigrationSource, buildModelBlock, buildRelationLine, computeMigrationChecksum, configureArkormRuntime, createMigrationTimestamp, createPrismaAdapter, createPrismaDelegateMap, defineConfig, defineFactory, deriveCollectionFieldName, deriveInverseRelationAlias, deriveRelationFieldName, ensureArkormConfigLoading, escapeRegex, findAppliedMigration, findModelBlock, formatDefaultValue, formatRelationAction, generateMigrationFile, getDefaultStubsPath, getLastMigrationRun, getLatestAppliedMigrations, getMigrationPlan, getRuntimePaginationURLDriverFactory, getRuntimePrismaClient, getUserConfig, inferDelegateName, isDelegateLike, isMigrationApplied, loadArkormConfig, markMigrationApplied, markMigrationRun, pad, readAppliedMigrationsState, removeAppliedMigration, resetArkormRuntimeForTests, resolveCast, resolveMigrationClassName, resolveMigrationStateFilePath, resolvePrismaType, runMigrationWithPrisma, runPrismaCommand, toMigrationFileSlug, toModelName, writeAppliedMigrationsState };
|
|
3185
|
+
export { ArkormCollection, ArkormException, Attribute, AttributeOptions, CliApp, ForeignKeyBuilder, InitCommand, InlineFactory, LengthAwarePaginator, MIGRATION_BRAND, MakeFactoryCommand, MakeMigrationCommand, MakeModelCommand, MakeSeederCommand, MigrateCommand, MigrateRollbackCommand, Migration, MigrationHistoryCommand, Model, ModelFactory, ModelNotFoundException, ModelsSyncCommand, PRISMA_MODEL_REGEX, Paginator, PrismaDelegateMap, QueryBuilder, SEEDER_BRAND, SchemaBuilder, SeedCommand, Seeder, SeederCallArgument, SeederConstructor, SeederInput, TableBuilder, URLDriver, applyAlterTableOperation, applyCreateTableOperation, applyDropTableOperation, applyMigrationRollbackToPrismaSchema, applyMigrationToPrismaSchema, applyOperationsToPrismaSchema, buildFieldLine, buildIndexLine, buildInverseRelationLine, buildMigrationIdentity, buildMigrationRunId, buildMigrationSource, buildModelBlock, buildRelationLine, computeMigrationChecksum, configureArkormRuntime, createMigrationTimestamp, createPrismaAdapter, createPrismaDelegateMap, defineConfig, defineFactory, deriveCollectionFieldName, deriveInverseRelationAlias, deriveRelationFieldName, ensureArkormConfigLoading, escapeRegex, findAppliedMigration, findModelBlock, formatDefaultValue, formatRelationAction, generateMigrationFile, getDefaultStubsPath, getLastMigrationRun, getLatestAppliedMigrations, getMigrationPlan, getRuntimePaginationURLDriverFactory, getRuntimePrismaClient, getUserConfig, inferDelegateName, isDelegateLike, isMigrationApplied, loadArkormConfig, markMigrationApplied, markMigrationRun, pad, readAppliedMigrationsState, removeAppliedMigration, resetArkormRuntimeForTests, resolveCast, resolveMigrationClassName, resolveMigrationStateFilePath, resolvePrismaType, runMigrationWithPrisma, runPrismaCommand, toMigrationFileSlug, toModelName, writeAppliedMigrationsState };
|
package/dist/index.d.mts
CHANGED
|
@@ -2,6 +2,19 @@ import { Command } from "@h3ravel/musket";
|
|
|
2
2
|
import { Collection } from "@h3ravel/collect.js";
|
|
3
3
|
import { PrismaClient } from "@prisma/client";
|
|
4
4
|
|
|
5
|
+
//#region src/Attribute.d.ts
|
|
6
|
+
interface AttributeOptions<TGet = unknown, TSet = unknown> {
|
|
7
|
+
get?: (value: unknown) => TGet;
|
|
8
|
+
set?: (value: TSet) => unknown;
|
|
9
|
+
}
|
|
10
|
+
declare class Attribute<TGet = unknown, TSet = unknown> {
|
|
11
|
+
readonly get?: (value: unknown) => TGet;
|
|
12
|
+
readonly set?: (value: TSet) => unknown;
|
|
13
|
+
constructor(options?: AttributeOptions<TGet, TSet>);
|
|
14
|
+
static make<TGet = unknown, TSet = unknown>(options: AttributeOptions<TGet, TSet>): Attribute<TGet, TSet>;
|
|
15
|
+
static isAttribute(value: unknown): value is Attribute;
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
5
18
|
//#region src/types/factories.d.ts
|
|
6
19
|
type FactoryAttributes = Record<string, unknown>;
|
|
7
20
|
interface FactoryModelConstructor<TModel> {
|
|
@@ -873,6 +886,13 @@ declare abstract class Model<TSchema extends PrismaDelegateLike | Record<string,
|
|
|
873
886
|
* @returns
|
|
874
887
|
*/
|
|
875
888
|
private resolveGetMutator;
|
|
889
|
+
/**
|
|
890
|
+
* Resolve an Attribute object mutator method for a given key, if it exists.
|
|
891
|
+
*
|
|
892
|
+
* @param key
|
|
893
|
+
* @returns
|
|
894
|
+
*/
|
|
895
|
+
private resolveAttributeMutator;
|
|
876
896
|
/**
|
|
877
897
|
* Resolve a set mutator method for a given attribute key, if it exists.
|
|
878
898
|
*
|
|
@@ -3162,4 +3182,4 @@ declare class URLDriver {
|
|
|
3162
3182
|
url(page: number): string;
|
|
3163
3183
|
}
|
|
3164
3184
|
//#endregion
|
|
3165
|
-
export { ArkormCollection, ArkormException, CliApp, ForeignKeyBuilder, InitCommand, InlineFactory, LengthAwarePaginator, MIGRATION_BRAND, MakeFactoryCommand, MakeMigrationCommand, MakeModelCommand, MakeSeederCommand, MigrateCommand, MigrateRollbackCommand, Migration, MigrationHistoryCommand, Model, ModelFactory, ModelNotFoundException, ModelsSyncCommand, PRISMA_MODEL_REGEX, Paginator, PrismaDelegateMap, QueryBuilder, SEEDER_BRAND, SchemaBuilder, SeedCommand, Seeder, SeederCallArgument, SeederConstructor, SeederInput, TableBuilder, URLDriver, applyAlterTableOperation, applyCreateTableOperation, applyDropTableOperation, applyMigrationRollbackToPrismaSchema, applyMigrationToPrismaSchema, applyOperationsToPrismaSchema, buildFieldLine, buildIndexLine, buildInverseRelationLine, buildMigrationIdentity, buildMigrationRunId, buildMigrationSource, buildModelBlock, buildRelationLine, computeMigrationChecksum, configureArkormRuntime, createMigrationTimestamp, createPrismaAdapter, createPrismaDelegateMap, defineConfig, defineFactory, deriveCollectionFieldName, deriveInverseRelationAlias, deriveRelationFieldName, ensureArkormConfigLoading, escapeRegex, findAppliedMigration, findModelBlock, formatDefaultValue, formatRelationAction, generateMigrationFile, getDefaultStubsPath, getLastMigrationRun, getLatestAppliedMigrations, getMigrationPlan, getRuntimePaginationURLDriverFactory, getRuntimePrismaClient, getUserConfig, inferDelegateName, isDelegateLike, isMigrationApplied, loadArkormConfig, markMigrationApplied, markMigrationRun, pad, readAppliedMigrationsState, removeAppliedMigration, resetArkormRuntimeForTests, resolveCast, resolveMigrationClassName, resolveMigrationStateFilePath, resolvePrismaType, runMigrationWithPrisma, runPrismaCommand, toMigrationFileSlug, toModelName, writeAppliedMigrationsState };
|
|
3185
|
+
export { ArkormCollection, ArkormException, Attribute, AttributeOptions, CliApp, ForeignKeyBuilder, InitCommand, InlineFactory, LengthAwarePaginator, MIGRATION_BRAND, MakeFactoryCommand, MakeMigrationCommand, MakeModelCommand, MakeSeederCommand, MigrateCommand, MigrateRollbackCommand, Migration, MigrationHistoryCommand, Model, ModelFactory, ModelNotFoundException, ModelsSyncCommand, PRISMA_MODEL_REGEX, Paginator, PrismaDelegateMap, QueryBuilder, SEEDER_BRAND, SchemaBuilder, SeedCommand, Seeder, SeederCallArgument, SeederConstructor, SeederInput, TableBuilder, URLDriver, applyAlterTableOperation, applyCreateTableOperation, applyDropTableOperation, applyMigrationRollbackToPrismaSchema, applyMigrationToPrismaSchema, applyOperationsToPrismaSchema, buildFieldLine, buildIndexLine, buildInverseRelationLine, buildMigrationIdentity, buildMigrationRunId, buildMigrationSource, buildModelBlock, buildRelationLine, computeMigrationChecksum, configureArkormRuntime, createMigrationTimestamp, createPrismaAdapter, createPrismaDelegateMap, defineConfig, defineFactory, deriveCollectionFieldName, deriveInverseRelationAlias, deriveRelationFieldName, ensureArkormConfigLoading, escapeRegex, findAppliedMigration, findModelBlock, formatDefaultValue, formatRelationAction, generateMigrationFile, getDefaultStubsPath, getLastMigrationRun, getLatestAppliedMigrations, getMigrationPlan, getRuntimePaginationURLDriverFactory, getRuntimePrismaClient, getUserConfig, inferDelegateName, isDelegateLike, isMigrationApplied, loadArkormConfig, markMigrationApplied, markMigrationRun, pad, readAppliedMigrationsState, removeAppliedMigration, resetArkormRuntimeForTests, resolveCast, resolveMigrationClassName, resolveMigrationStateFilePath, resolvePrismaType, runMigrationWithPrisma, runPrismaCommand, toMigrationFileSlug, toModelName, writeAppliedMigrationsState };
|
package/dist/index.mjs
CHANGED
|
@@ -12,6 +12,24 @@ import { createHash } from "node:crypto";
|
|
|
12
12
|
import { pathToFileURL as pathToFileURL$1 } from "node:url";
|
|
13
13
|
import { Collection } from "@h3ravel/collect.js";
|
|
14
14
|
|
|
15
|
+
//#region src/Attribute.ts
|
|
16
|
+
var Attribute = class Attribute {
|
|
17
|
+
get;
|
|
18
|
+
set;
|
|
19
|
+
constructor(options = {}) {
|
|
20
|
+
this.get = options.get;
|
|
21
|
+
this.set = options.set;
|
|
22
|
+
}
|
|
23
|
+
static make(options) {
|
|
24
|
+
return new Attribute(options);
|
|
25
|
+
}
|
|
26
|
+
static isAttribute(value) {
|
|
27
|
+
if (!value || typeof value !== "object") return false;
|
|
28
|
+
return value instanceof Attribute;
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
//#endregion
|
|
15
33
|
//#region src/casts.ts
|
|
16
34
|
const builtinCasts = {
|
|
17
35
|
string: {
|
|
@@ -4885,11 +4903,15 @@ var Model = class Model {
|
|
|
4885
4903
|
this.fill(attributes);
|
|
4886
4904
|
return new Proxy(this, {
|
|
4887
4905
|
get: (target, key, receiver) => {
|
|
4888
|
-
if (typeof key !== "string"
|
|
4906
|
+
if (typeof key !== "string") return Reflect.get(target, key, receiver);
|
|
4907
|
+
const attributeMutator = target.resolveAttributeMutator(key);
|
|
4908
|
+
if (key in target && !attributeMutator) return Reflect.get(target, key, receiver);
|
|
4889
4909
|
return target.getAttribute(key);
|
|
4890
4910
|
},
|
|
4891
4911
|
set: (target, key, value, receiver) => {
|
|
4892
|
-
if (typeof key !== "string"
|
|
4912
|
+
if (typeof key !== "string") return Reflect.set(target, key, value, receiver);
|
|
4913
|
+
const attributeMutator = target.resolveAttributeMutator(key);
|
|
4914
|
+
if (key in target && !attributeMutator) return Reflect.set(target, key, value, receiver);
|
|
4893
4915
|
target.setAttribute(key, value);
|
|
4894
4916
|
return true;
|
|
4895
4917
|
}
|
|
@@ -5078,18 +5100,22 @@ var Model = class Model {
|
|
|
5078
5100
|
return this;
|
|
5079
5101
|
}
|
|
5080
5102
|
getAttribute(key) {
|
|
5103
|
+
const attributeMutator = this.resolveAttributeMutator(key);
|
|
5081
5104
|
const mutator = this.resolveGetMutator(key);
|
|
5082
5105
|
const cast = this.casts[key];
|
|
5083
5106
|
let value = this.attributes[key];
|
|
5084
5107
|
if (cast) value = resolveCast(cast).get(value);
|
|
5108
|
+
if (attributeMutator?.get) return attributeMutator.get.call(this, value);
|
|
5085
5109
|
if (mutator) return mutator.call(this, value);
|
|
5086
5110
|
return value;
|
|
5087
5111
|
}
|
|
5088
5112
|
setAttribute(key, value) {
|
|
5113
|
+
const attributeMutator = this.resolveAttributeMutator(key);
|
|
5089
5114
|
const mutator = this.resolveSetMutator(key);
|
|
5090
5115
|
const cast = this.casts[key];
|
|
5091
5116
|
let resolved = value;
|
|
5092
|
-
if (
|
|
5117
|
+
if (attributeMutator?.set) resolved = attributeMutator.set.call(this, resolved);
|
|
5118
|
+
else if (mutator) resolved = mutator.call(this, resolved);
|
|
5093
5119
|
if (cast) resolved = resolveCast(cast).set(resolved);
|
|
5094
5120
|
this.attributes[key] = resolved;
|
|
5095
5121
|
return this;
|
|
@@ -5357,6 +5383,24 @@ var Model = class Model {
|
|
|
5357
5383
|
return typeof method === "function" ? method : null;
|
|
5358
5384
|
}
|
|
5359
5385
|
/**
|
|
5386
|
+
* Resolve an Attribute object mutator method for a given key, if it exists.
|
|
5387
|
+
*
|
|
5388
|
+
* @param key
|
|
5389
|
+
* @returns
|
|
5390
|
+
*/
|
|
5391
|
+
resolveAttributeMutator(key) {
|
|
5392
|
+
if (key === "constructor") return null;
|
|
5393
|
+
const methodName = `${str(key).camel()}`;
|
|
5394
|
+
const prototype = Object.getPrototypeOf(this);
|
|
5395
|
+
if (!prototype) return null;
|
|
5396
|
+
const method = prototype[methodName];
|
|
5397
|
+
if (typeof method !== "function") return null;
|
|
5398
|
+
if (method === Model.prototype[methodName]) return null;
|
|
5399
|
+
const resolved = method.call(this);
|
|
5400
|
+
if (Attribute.isAttribute(resolved)) return resolved;
|
|
5401
|
+
return null;
|
|
5402
|
+
}
|
|
5403
|
+
/**
|
|
5360
5404
|
* Resolve a set mutator method for a given attribute key, if it exists.
|
|
5361
5405
|
*
|
|
5362
5406
|
* @param key
|
|
@@ -5408,4 +5452,4 @@ var Model = class Model {
|
|
|
5408
5452
|
};
|
|
5409
5453
|
|
|
5410
5454
|
//#endregion
|
|
5411
|
-
export { ArkormCollection, ArkormException, CliApp, ForeignKeyBuilder, InitCommand, InlineFactory, LengthAwarePaginator, MIGRATION_BRAND, MakeFactoryCommand, MakeMigrationCommand, MakeModelCommand, MakeSeederCommand, MigrateCommand, MigrateRollbackCommand, Migration, MigrationHistoryCommand, Model, ModelFactory, ModelNotFoundException, ModelsSyncCommand, PRISMA_MODEL_REGEX, Paginator, QueryBuilder, SEEDER_BRAND, SchemaBuilder, SeedCommand, Seeder, TableBuilder, URLDriver, applyAlterTableOperation, applyCreateTableOperation, applyDropTableOperation, applyMigrationRollbackToPrismaSchema, applyMigrationToPrismaSchema, applyOperationsToPrismaSchema, buildFieldLine, buildIndexLine, buildInverseRelationLine, buildMigrationIdentity, buildMigrationRunId, buildMigrationSource, buildModelBlock, buildRelationLine, computeMigrationChecksum, configureArkormRuntime, createMigrationTimestamp, createPrismaAdapter, createPrismaDelegateMap, defineConfig, defineFactory, deriveCollectionFieldName, deriveInverseRelationAlias, deriveRelationFieldName, ensureArkormConfigLoading, escapeRegex, findAppliedMigration, findModelBlock, formatDefaultValue, formatRelationAction, generateMigrationFile, getDefaultStubsPath, getLastMigrationRun, getLatestAppliedMigrations, getMigrationPlan, getRuntimePaginationURLDriverFactory, getRuntimePrismaClient, getUserConfig, inferDelegateName, isDelegateLike, isMigrationApplied, loadArkormConfig, markMigrationApplied, markMigrationRun, pad, readAppliedMigrationsState, removeAppliedMigration, resetArkormRuntimeForTests, resolveCast, resolveMigrationClassName, resolveMigrationStateFilePath, resolvePrismaType, runMigrationWithPrisma, runPrismaCommand, toMigrationFileSlug, toModelName, writeAppliedMigrationsState };
|
|
5455
|
+
export { ArkormCollection, ArkormException, Attribute, CliApp, ForeignKeyBuilder, InitCommand, InlineFactory, LengthAwarePaginator, MIGRATION_BRAND, MakeFactoryCommand, MakeMigrationCommand, MakeModelCommand, MakeSeederCommand, MigrateCommand, MigrateRollbackCommand, Migration, MigrationHistoryCommand, Model, ModelFactory, ModelNotFoundException, ModelsSyncCommand, PRISMA_MODEL_REGEX, Paginator, QueryBuilder, SEEDER_BRAND, SchemaBuilder, SeedCommand, Seeder, TableBuilder, URLDriver, applyAlterTableOperation, applyCreateTableOperation, applyDropTableOperation, applyMigrationRollbackToPrismaSchema, applyMigrationToPrismaSchema, applyOperationsToPrismaSchema, buildFieldLine, buildIndexLine, buildInverseRelationLine, buildMigrationIdentity, buildMigrationRunId, buildMigrationSource, buildModelBlock, buildRelationLine, computeMigrationChecksum, configureArkormRuntime, createMigrationTimestamp, createPrismaAdapter, createPrismaDelegateMap, defineConfig, defineFactory, deriveCollectionFieldName, deriveInverseRelationAlias, deriveRelationFieldName, ensureArkormConfigLoading, escapeRegex, findAppliedMigration, findModelBlock, formatDefaultValue, formatRelationAction, generateMigrationFile, getDefaultStubsPath, getLastMigrationRun, getLatestAppliedMigrations, getMigrationPlan, getRuntimePaginationURLDriverFactory, getRuntimePrismaClient, getUserConfig, inferDelegateName, isDelegateLike, isMigrationApplied, loadArkormConfig, markMigrationApplied, markMigrationRun, pad, readAppliedMigrationsState, removeAppliedMigration, resetArkormRuntimeForTests, resolveCast, resolveMigrationClassName, resolveMigrationStateFilePath, resolvePrismaType, runMigrationWithPrisma, runPrismaCommand, toMigrationFileSlug, toModelName, writeAppliedMigrationsState };
|