@technicity/data-service-generator 0.23.0-next.11 → 0.23.0-next.13

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.
@@ -106,7 +106,8 @@ async function generate(input) {
106
106
  tables = tables.filter((x) => !input.excludeTables?.includes(x));
107
107
  }
108
108
  ctx.log.debug({ tableCount: tables.length, tables }, "tables after filter");
109
- const data = await Promise.all(tables.flatMap((x) => [
109
+ // Process table-by-table to avoid exhausting DB connection pool (e.g. Cloud SQL limits)
110
+ const data = (await Promise.all(tables.map((x) => Promise.all([
110
111
  getGetOneData(x, includeMappedFields, tables),
111
112
  getGetListData(x),
112
113
  getGetListPaginatedData(x),
@@ -115,7 +116,7 @@ async function generate(input) {
115
116
  getPatchListData(x),
116
117
  getDeleteOneData(x),
117
118
  getDeleteListData(x)
118
- ]));
119
+ ])))).flat();
119
120
  ctx.log.debug({ inputLength: data.length }, "SDK input data collected");
120
121
  const artifacts = await getArtifacts(tables, includeMappedFields, specialCaseUuidColumn);
121
122
  ctx.log.debug("getArtifacts() completed");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@technicity/data-service-generator",
3
- "version": "0.23.0-next.11",
3
+ "version": "0.23.0-next.13",
4
4
  "main": "./dist/index.js",
5
5
  "files": [
6
6
  "dist"