orchid-orm 1.5.19 → 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/.turbo/turbo-test.log +26 -0
- package/CHANGELOG.md +6 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +9 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/codegen/appCodeUpdater.test.ts +10 -5
- package/src/codegen/appCodeUpdater.ts +14 -7
- package/src/orm.test.ts +12 -4
- package/src/transaction.test.ts +2 -0
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
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
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 }))
|