imodel 0.16.0 → 0.16.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.
package/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * imodel v0.16.0
2
+ * imodel v0.16.1
3
3
  * (c) 2019-2026 undefined
4
4
  * @license undefined
5
5
  */
package/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * imodel v0.16.0
2
+ * imodel v0.16.1
3
3
  * (c) 2019-2026 undefined
4
4
  * @license undefined
5
5
  */
@@ -781,7 +781,7 @@ async function getInsertValue(data, columns, fieldColumns, skip, ignore) {
781
781
  }
782
782
  }
783
783
  const val = data[k];
784
- if (!skipCreatable && !column.uncreatable && val !== undefined) {
784
+ if ((skipCreatable || !column.uncreatable) && val !== undefined) {
785
785
  insertValue[col] = val;
786
786
  continue;
787
787
  }
@@ -3008,11 +3008,11 @@ class Connection {
3008
3008
  }, data, keys, ignoreConflict) {
3009
3009
  const [columns, fieldColumns] = toColumns(fields);
3010
3010
  const isArray = Array.isArray(data);
3011
- const insertValues = (isArray ? data : [data]
3011
+ const insertValues = await Promise.all((isArray ? data : [data]
3012
3012
  // @ts-ignore
3013
3013
  ).map(d => getInsertValue(d, columns, fieldColumns, {
3014
3014
  uncreatable: true
3015
- }));
3015
+ })));
3016
3016
  if (!insertValues.length) {
3017
3017
  throw new Error();
3018
3018
  }
package/migrate.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * imodel v0.16.0
2
+ * imodel v0.16.1
3
3
  * (c) 2019-2026 undefined
4
4
  * @license undefined
5
5
  */
package/migrate.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * imodel v0.16.0
2
+ * imodel v0.16.1
3
3
  * (c) 2019-2026 undefined
4
4
  * @license undefined
5
5
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "imodel",
3
- "version": "0.16.0",
3
+ "version": "0.16.1",
4
4
  "main": "index.mjs",
5
5
  "type": "module",
6
6
  "repository": {