@nhtio/lucid-resourceful 1.20251213.0 → 1.20251213.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.
@@ -46841,7 +46841,7 @@ var Application = class extends Macroable {
46841
46841
  */
46842
46842
  stubs = {
46843
46843
  create: async () => {
46844
- const { StubsManager } = await Promise.resolve().then(() => require("./manager-OLS5T3G7-Dpikdw6h.cjs"));
46844
+ const { StubsManager } = await Promise.resolve().then(() => require("./manager-OLS5T3G7-CVhmzDda.cjs"));
46845
46845
  return new StubsManager(this, this.makePath(this.rcFile.directories.stubs));
46846
46846
  }
46847
46847
  };
@@ -47455,7 +47455,7 @@ var RouterFactory = class {
47455
47455
  * Returns an instance of the application class
47456
47456
  */
47457
47457
  #getApp() {
47458
- return this.#parameters.app || new AppFactory().create(new URL("./app/", typeof document === "undefined" ? require("url").pathToFileURL(__filename).href : _documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === "SCRIPT" && _documentCurrentScript.src || new URL("index-CIB7pnnu.cjs", document.baseURI).href));
47458
+ return this.#parameters.app || new AppFactory().create(new URL("./app/", typeof document === "undefined" ? require("url").pathToFileURL(__filename).href : _documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === "SCRIPT" && _documentCurrentScript.src || new URL("index-D3sBFptu.cjs", document.baseURI).href));
47459
47459
  }
47460
47460
  /**
47461
47461
  * Returns an instance of the encryptor to encrypt
@@ -54477,25 +54477,23 @@ function withResourceful(options = {}) {
54477
54477
  `HasManyThrough relationship '${relationshipKey}' missing required through configuration`
54478
54478
  );
54479
54479
  }
54480
- const foreignColumn = throughModel.$keys.attributesToColumns.get(foreignKey);
54481
- const localColumn = this.$keys.attributesToColumns.get(localKey);
54482
- const throughForeignColumn = RelatedModel.$keys.attributesToColumns.get(throughForeignKey) || throughForeignKey;
54483
- const throughLocalColumn = throughModel.$keys.attributesToColumns.get(throughLocalKey) || throughLocalKey;
54484
- if (!throughLocalColumn || !throughForeignColumn || !foreignColumn || !localColumn) {
54480
+ const throughForeignKeyColumn = throughModel.$keys.attributesToColumns.get(foreignKey) || foreignKey;
54481
+ const throughLocalKeyColumn = throughModel.$keys.attributesToColumns.get(throughLocalKey) || throughLocalKey;
54482
+ const relatedThroughForeignKeyColumn = RelatedModel.$keys.attributesToColumns.get(throughForeignKey) || throughForeignKey;
54483
+ if (!throughForeignKeyColumn || !throughLocalKeyColumn || !relatedThroughForeignKeyColumn) {
54485
54484
  const missing = [
54486
- !throughLocalColumn ? "throughLocalColumn" : void 0,
54487
- !throughForeignColumn ? "throughForeignColumn" : void 0,
54488
- !foreignColumn ? "foreignColumn" : void 0,
54489
- !localColumn ? "localColumn" : void 0
54485
+ !throughForeignKeyColumn ? "throughForeignKeyColumn" : void 0,
54486
+ !throughLocalKeyColumn ? "throughLocalKeyColumn" : void 0,
54487
+ !relatedThroughForeignKeyColumn ? "relatedThroughForeignKeyColumn" : void 0
54490
54488
  ].filter((x) => x !== void 0);
54491
54489
  throw new errors$2.E_INVALID_RELATIONSHIP_EXCEPTION(
54492
54490
  `HasManyThrough relationship '${relationshipKey}' has invalid key mappings. Missing: ${missing.join(", ")}`
54493
54491
  );
54494
54492
  }
54495
54493
  query.whereExists((subQuery) => {
54496
- subQuery.from(throughModel.table).select(1).where(`${throughModel.table}.${throughLocalColumn}`, uid).whereColumn(
54497
- `${throughModel.table}.${foreignColumn}`,
54498
- `${RelatedModel.table}.${throughForeignColumn}`
54494
+ subQuery.from(throughModel.table).select(1).where(`${throughModel.table}.${throughForeignKeyColumn}`, uid).whereColumn(
54495
+ `${throughModel.table}.${throughLocalKeyColumn}`,
54496
+ `${RelatedModel.table}.${relatedThroughForeignKeyColumn}`
54499
54497
  ).limit(1);
54500
54498
  });
54501
54499
  }
@@ -64995,7 +64993,7 @@ async function configure(command) {
64995
64993
  }
64996
64994
  ]);
64997
64995
  }
64998
- const version = "1.20251213.0";
64996
+ const version = "1.20251213.1";
64999
64997
  exports.configure = configure;
65000
64998
  exports.debug_default = debug_default;
65001
64999
  exports.getResourcefulModelCreatePayloadValidationSchema = getResourcefulModelCreatePayloadValidationSchema;
@@ -65012,4 +65010,4 @@ exports.resourcefulRouterMacro = resourcefulRouterMacro;
65012
65010
  exports.string_builder_default = string_builder_default;
65013
65011
  exports.version = version;
65014
65012
  exports.withResourceful = withResourceful;
65015
- //# sourceMappingURL=index-CIB7pnnu.cjs.map
65013
+ //# sourceMappingURL=index-D3sBFptu.cjs.map