@travetto/model-mongo 7.0.0-rc.0 → 7.0.0-rc.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/model-mongo",
3
- "version": "7.0.0-rc.0",
3
+ "version": "7.0.0-rc.1",
4
4
  "description": "Mongo backing for the travetto model module.",
5
5
  "keywords": [
6
6
  "mongo",
@@ -25,10 +25,10 @@
25
25
  "directory": "module/model-mongo"
26
26
  },
27
27
  "dependencies": {
28
- "@travetto/cli": "^7.0.0-rc.0",
29
- "@travetto/config": "^7.0.0-rc.0",
30
- "@travetto/model": "^7.0.0-rc.0",
31
- "@travetto/model-query": "^7.0.0-rc.0",
28
+ "@travetto/cli": "^7.0.0-rc.1",
29
+ "@travetto/config": "^7.0.0-rc.1",
30
+ "@travetto/model": "^7.0.0-rc.1",
31
+ "@travetto/model-query": "^7.0.0-rc.1",
32
32
  "mongodb": "^7.0.0"
33
33
  },
34
34
  "travetto": {
@@ -80,7 +80,7 @@ export class MongoUtil {
80
80
 
81
81
  /**/
82
82
  static extractSimple<T>(base: Class<T> | undefined, o: Record<string, unknown>, path: string = '', recursive: boolean = true): Record<string, unknown> {
83
- const fields = base ? SchemaRegistryIndex.getOptionalConfig(base)?.fields : undefined;
83
+ const fields = base ? SchemaRegistryIndex.getOptional(base)?.getFields() : undefined;
84
84
  const out: Record<string, unknown> = {};
85
85
  const sub = o;
86
86
  const keys = Object.keys(sub);
package/src/service.ts CHANGED
@@ -279,10 +279,7 @@ export class MongoModelService implements
279
279
  return;
280
280
  }
281
281
  const [stream, blobMeta] = await ModelBlobUtil.getInput(input, meta);
282
- const writeStream = this.#bucket.openUploadStream(location, {
283
- contentType: blobMeta.contentType,
284
- metadata: blobMeta,
285
- });
282
+ const writeStream = this.#bucket.openUploadStream(location, { metadata: blobMeta });
286
283
  await pipeline(stream, writeStream);
287
284
 
288
285
  if (existing) {