@h3ravel/arquebus 0.7.0 → 0.7.1
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/bin/index.cjs +1 -1
- package/bin/index.js +1 -1
- package/dist/relations/chunk-Bop6jNiL.js +15 -0
- package/dist/relations/index.cjs +71 -1
- package/dist/relations/index.d.ts +5082 -2
- package/dist/relations/index.js +14 -16
- package/package.json +1 -1
package/bin/index.cjs
CHANGED
package/bin/index.js
CHANGED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import "node:module";
|
|
2
|
+
|
|
3
|
+
//#region rolldown:runtime
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __export = (all) => {
|
|
6
|
+
let target = {};
|
|
7
|
+
for (var name in all) __defProp(target, name, {
|
|
8
|
+
get: all[name],
|
|
9
|
+
enumerable: true
|
|
10
|
+
});
|
|
11
|
+
return target;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
15
|
+
export { __export as t };
|
package/dist/relations/index.cjs
CHANGED
|
@@ -320,6 +320,7 @@ var collection_default = Collection;
|
|
|
320
320
|
|
|
321
321
|
//#endregion
|
|
322
322
|
//#region src/relations/concerns/interacts-with-pivot-table.ts
|
|
323
|
+
var interacts_with_pivot_table_exports = /* @__PURE__ */ __export({ default: () => interacts_with_pivot_table_default });
|
|
323
324
|
const InteractsWithPivotTable = (Relation$1) => {
|
|
324
325
|
return class extends Relation$1 {
|
|
325
326
|
newExistingPivot(attributes = []) {
|
|
@@ -546,6 +547,7 @@ var InvalidArgumentError = class extends BaseError {};
|
|
|
546
547
|
|
|
547
548
|
//#endregion
|
|
548
549
|
//#region src/relations/relation.ts
|
|
550
|
+
var relation_exports = /* @__PURE__ */ __export({ default: () => relation_default });
|
|
549
551
|
var Relation = class {
|
|
550
552
|
query;
|
|
551
553
|
parent;
|
|
@@ -638,6 +640,7 @@ var relation_default = Relation;
|
|
|
638
640
|
|
|
639
641
|
//#endregion
|
|
640
642
|
//#region src/relations/belongs-to-many.ts
|
|
643
|
+
var belongs_to_many_exports = /* @__PURE__ */ __export({ default: () => belongs_to_many_default });
|
|
641
644
|
var BelongsToMany = class extends compose(relation_default, interacts_with_pivot_table_default) {
|
|
642
645
|
table;
|
|
643
646
|
foreignPivotKey;
|
|
@@ -2002,6 +2005,7 @@ var has_hooks_default = HasHooks;
|
|
|
2002
2005
|
|
|
2003
2006
|
//#endregion
|
|
2004
2007
|
//#region src/relations/has-one-or-many.ts
|
|
2008
|
+
var has_one_or_many_exports = /* @__PURE__ */ __export({ default: () => has_one_or_many_default });
|
|
2005
2009
|
const HasOneOrMany = (Relation$1) => {
|
|
2006
2010
|
return class extends Relation$1 {
|
|
2007
2011
|
getRelationValue(dictionary, key, type) {
|
|
@@ -2071,6 +2075,7 @@ var has_one_or_many_default = HasOneOrMany;
|
|
|
2071
2075
|
|
|
2072
2076
|
//#endregion
|
|
2073
2077
|
//#region src/relations/has-many.ts
|
|
2078
|
+
var has_many_exports = /* @__PURE__ */ __export({ default: () => has_many_default });
|
|
2074
2079
|
var HasMany = class extends compose(relation_default, has_one_or_many_default) {
|
|
2075
2080
|
foreignKey;
|
|
2076
2081
|
localKey;
|
|
@@ -2110,6 +2115,7 @@ var has_many_default = HasMany;
|
|
|
2110
2115
|
|
|
2111
2116
|
//#endregion
|
|
2112
2117
|
//#region src/relations/concerns/supports-default-models.ts
|
|
2118
|
+
var supports_default_models_exports = /* @__PURE__ */ __export({ default: () => supports_default_models_default });
|
|
2113
2119
|
const SupportsDefaultModels = (Relation$1) => {
|
|
2114
2120
|
return class extends Relation$1 {
|
|
2115
2121
|
_withDefault;
|
|
@@ -2130,6 +2136,7 @@ var supports_default_models_default = SupportsDefaultModels;
|
|
|
2130
2136
|
|
|
2131
2137
|
//#endregion
|
|
2132
2138
|
//#region src/relations/has-one.ts
|
|
2139
|
+
var has_one_exports = /* @__PURE__ */ __export({ default: () => has_one_default });
|
|
2133
2140
|
var HasOne = class extends compose(relation_default, has_one_or_many_default, supports_default_models_default) {
|
|
2134
2141
|
foreignKey;
|
|
2135
2142
|
localKey;
|
|
@@ -2172,6 +2179,7 @@ var has_one_default = HasOne;
|
|
|
2172
2179
|
|
|
2173
2180
|
//#endregion
|
|
2174
2181
|
//#region src/relations/has-many-through.ts
|
|
2182
|
+
var has_many_through_exports = /* @__PURE__ */ __export({ default: () => has_many_through_default });
|
|
2175
2183
|
var HasManyThrough = class extends relation_default {
|
|
2176
2184
|
throughParent;
|
|
2177
2185
|
farParent;
|
|
@@ -2354,6 +2362,7 @@ var has_many_through_default = HasManyThrough;
|
|
|
2354
2362
|
|
|
2355
2363
|
//#endregion
|
|
2356
2364
|
//#region src/relations/has-one-through.ts
|
|
2365
|
+
var has_one_through_exports = /* @__PURE__ */ __export({ default: () => has_one_through_default });
|
|
2357
2366
|
var HasOneThrough = class extends compose(has_many_through_default, supports_default_models_default) {
|
|
2358
2367
|
async getResults() {
|
|
2359
2368
|
return await this.first() || this.getDefaultFor(this.farParent);
|
|
@@ -3374,6 +3383,7 @@ var model_default = Model;
|
|
|
3374
3383
|
|
|
3375
3384
|
//#endregion
|
|
3376
3385
|
//#region src/relations/belongs-to.ts
|
|
3386
|
+
var belongs_to_exports = /* @__PURE__ */ __export({ default: () => belongs_to_default });
|
|
3377
3387
|
var BelongsTo = class extends compose(relation_default, supports_default_models_default) {
|
|
3378
3388
|
foreignKey;
|
|
3379
3389
|
ownerKey;
|
|
@@ -3461,4 +3471,64 @@ var BelongsTo = class extends compose(relation_default, supports_default_models_
|
|
|
3461
3471
|
};
|
|
3462
3472
|
var belongs_to_default = BelongsTo;
|
|
3463
3473
|
|
|
3464
|
-
//#endregion
|
|
3474
|
+
//#endregion
|
|
3475
|
+
Object.defineProperty(exports, 'BelongsTo', {
|
|
3476
|
+
enumerable: true,
|
|
3477
|
+
get: function () {
|
|
3478
|
+
return belongs_to_exports;
|
|
3479
|
+
}
|
|
3480
|
+
});
|
|
3481
|
+
Object.defineProperty(exports, 'BelongsToMany', {
|
|
3482
|
+
enumerable: true,
|
|
3483
|
+
get: function () {
|
|
3484
|
+
return belongs_to_many_exports;
|
|
3485
|
+
}
|
|
3486
|
+
});
|
|
3487
|
+
Object.defineProperty(exports, 'HasMany', {
|
|
3488
|
+
enumerable: true,
|
|
3489
|
+
get: function () {
|
|
3490
|
+
return has_many_exports;
|
|
3491
|
+
}
|
|
3492
|
+
});
|
|
3493
|
+
Object.defineProperty(exports, 'HasManyThrough', {
|
|
3494
|
+
enumerable: true,
|
|
3495
|
+
get: function () {
|
|
3496
|
+
return has_many_through_exports;
|
|
3497
|
+
}
|
|
3498
|
+
});
|
|
3499
|
+
Object.defineProperty(exports, 'HasOne', {
|
|
3500
|
+
enumerable: true,
|
|
3501
|
+
get: function () {
|
|
3502
|
+
return has_one_exports;
|
|
3503
|
+
}
|
|
3504
|
+
});
|
|
3505
|
+
Object.defineProperty(exports, 'HasOneOrMany', {
|
|
3506
|
+
enumerable: true,
|
|
3507
|
+
get: function () {
|
|
3508
|
+
return has_one_or_many_exports;
|
|
3509
|
+
}
|
|
3510
|
+
});
|
|
3511
|
+
Object.defineProperty(exports, 'HasOneThrough', {
|
|
3512
|
+
enumerable: true,
|
|
3513
|
+
get: function () {
|
|
3514
|
+
return has_one_through_exports;
|
|
3515
|
+
}
|
|
3516
|
+
});
|
|
3517
|
+
Object.defineProperty(exports, 'InteractsWithPivotTable', {
|
|
3518
|
+
enumerable: true,
|
|
3519
|
+
get: function () {
|
|
3520
|
+
return interacts_with_pivot_table_exports;
|
|
3521
|
+
}
|
|
3522
|
+
});
|
|
3523
|
+
Object.defineProperty(exports, 'Relation', {
|
|
3524
|
+
enumerable: true,
|
|
3525
|
+
get: function () {
|
|
3526
|
+
return relation_exports;
|
|
3527
|
+
}
|
|
3528
|
+
});
|
|
3529
|
+
Object.defineProperty(exports, 'SupportsDefaultModels', {
|
|
3530
|
+
enumerable: true,
|
|
3531
|
+
get: function () {
|
|
3532
|
+
return supports_default_models_exports;
|
|
3533
|
+
}
|
|
3534
|
+
});
|