orchid-orm 1.5.18 → 1.5.20

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.mjs CHANGED
@@ -2315,11 +2315,15 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
2315
2315
  class AppCodeUpdaterError extends Error {
2316
2316
  }
2317
2317
  const appCodeUpdater = (config) => {
2318
- const params = __spreadProps(__spreadValues({}, config), {
2319
- tablePath: (name) => path.resolve(config.tablePath(name)),
2320
- mainFilePath: path.resolve(config.mainFilePath)
2321
- });
2322
- return async ({ ast, options, cache: cacheObject }) => {
2318
+ return async ({ ast, options, basePath, cache: cacheObject }) => {
2319
+ const params = __spreadProps(__spreadValues({}, config), {
2320
+ baseTableName: config.baseTableName || "BaseTable",
2321
+ tablePath(name) {
2322
+ const file = config.tablePath(name);
2323
+ return path.isAbsolute(file) ? file : path.resolve(basePath, file);
2324
+ },
2325
+ mainFilePath: path.isAbsolute(config.mainFilePath) ? config.mainFilePath : path.resolve(basePath, config.mainFilePath)
2326
+ });
2323
2327
  const promises = [
2324
2328
  updateMainFile(params.mainFilePath, params.tablePath, ast, options),
2325
2329
  updateTableFile(__spreadProps(__spreadValues({}, params), { ast }))