@h3ravel/arquebus 0.6.6 → 0.6.8

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.
Files changed (33) hide show
  1. package/README.md +5 -4
  2. package/bin/index.cjs +270 -425
  3. package/bin/{index.js → index.mjs} +230 -409
  4. package/bin/seeders-C0schOjT.mjs +3 -0
  5. package/bin/seeders-D-v59HCz.cjs +3 -0
  6. package/dist/browser/index.cjs +4 -12
  7. package/dist/browser/index.d.cts +203 -203
  8. package/dist/browser/{index.d.ts → index.d.mts} +203 -203
  9. package/dist/browser/{index.js → index.mjs} +4 -11
  10. package/dist/index.cjs +21 -59
  11. package/dist/index.d.cts +133 -133
  12. package/dist/{index.d.ts → index.d.mts} +133 -133
  13. package/dist/{index.js → index.mjs} +21 -54
  14. package/dist/inspector/index.cjs +15 -46
  15. package/dist/inspector/{index.js → index.mjs} +15 -43
  16. package/dist/migrations/{chunk-PECeCxCb.js → chunk-BD38OWEx.mjs} +1 -1
  17. package/dist/migrations/index.cjs +20 -57
  18. package/dist/migrations/index.d.cts +186 -186
  19. package/dist/migrations/{index.d.ts → index.d.mts} +186 -186
  20. package/dist/migrations/{index.js → index.mjs} +22 -54
  21. package/dist/seeders/index.cjs +1 -5
  22. package/dist/seeders/index.d.cts +184 -184
  23. package/dist/seeders/{index.d.ts → index.d.mts} +184 -184
  24. package/dist/seeders/{index.js → index.mjs} +2 -3
  25. package/dist/stubs/seeder-js.stub +4 -4
  26. package/dist/stubs/seeder-ts.stub +5 -0
  27. package/package.json +5 -4
  28. package/bin/seeders-8GJzfIIN.js +0 -3
  29. package/bin/seeders-ByeSoCAQ.cjs +0 -131
  30. package/bin/seeders-CltigymO.js +0 -79
  31. package/bin/seeders-_xJ6VGVS.cjs +0 -3
  32. /package/bin/{index.d.ts → index.d.mts} +0 -0
  33. /package/dist/inspector/{index.d.ts → index.d.mts} +0 -0
@@ -0,0 +1,3 @@
1
+ import { t as runner_default } from "./index.mjs";
2
+
3
+ export { runner_default as SeederRunner };
@@ -0,0 +1,3 @@
1
+ const require_index = require('./index.cjs');
2
+
3
+ exports.SeederRunner = require_index.runner_default;
@@ -33,7 +33,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
33
33
  let collect_js = require("collect.js");
34
34
  collect_js = __toESM(collect_js);
35
35
  let radashi = require("radashi");
36
- radashi = __toESM(radashi);
37
36
  let dayjs_plugin_advancedFormat_js = require("dayjs/plugin/advancedFormat.js");
38
37
  dayjs_plugin_advancedFormat_js = __toESM(dayjs_plugin_advancedFormat_js);
39
38
  let dayjs = require("dayjs");
@@ -341,9 +340,7 @@ const HasAttributes = (Model$1) => {
341
340
  }
342
341
  originalIsEquivalent(key) {
343
342
  if (this.original[key] === void 0) return false;
344
- const attribute = this.attributes[key];
345
- const original = this.original[key];
346
- if (attribute === original) return true;
343
+ if (this.attributes[key] === this.original[key]) return true;
347
344
  else return false;
348
345
  }
349
346
  setAttributes(attributes) {
@@ -525,8 +522,7 @@ const HasAttributes = (Model$1) => {
525
522
  return new Date(value);
526
523
  }
527
524
  asDate(value) {
528
- const date = this.asDateTime(value);
529
- return (0, dayjs.default)(date).startOf("day").toDate();
525
+ return (0, dayjs.default)(this.asDateTime(value)).startOf("day").toDate();
530
526
  }
531
527
  };
532
528
  };
@@ -641,10 +637,7 @@ const HasRelations = (Instance) => {
641
637
  return this.relations[relation] !== void 0;
642
638
  }
643
639
  related(relation) {
644
- if (typeof this[getRelationMethod(relation)] !== "function") {
645
- const message = `Model [${this.constructor.name}]'s relation [${relation}] doesn't exist.`;
646
- throw new RelationNotFoundError(message);
647
- }
640
+ if (typeof this[getRelationMethod(relation)] !== "function") throw new RelationNotFoundError(`Model [${this.constructor.name}]'s relation [${relation}] doesn't exist.`);
648
641
  return this[getRelationMethod(relation)]();
649
642
  }
650
643
  async getRelated(relation) {
@@ -662,8 +655,7 @@ const HasRelations = (Instance) => {
662
655
  guessBelongsToRelation() {
663
656
  var _e$stack;
664
657
  const frame = (_e$stack = (/* @__PURE__ */ new Error()).stack) === null || _e$stack === void 0 ? void 0 : _e$stack.split("\n")[2];
665
- const functionName = frame === null || frame === void 0 ? void 0 : frame.split(" ")[5];
666
- return getRelationName(functionName);
658
+ return getRelationName(frame === null || frame === void 0 ? void 0 : frame.split(" ")[5]);
667
659
  }
668
660
  joiningTable(related, instance = null) {
669
661
  return [instance ? instance.joiningTableSegment() : snakeCase(related.name), this.joiningTableSegment()].sort().join("_").toLocaleLowerCase();