@chevre/domain 21.21.0-alpha.4 → 21.21.0-alpha.6

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.
@@ -139,11 +139,8 @@ class MongoRepository {
139
139
  identifier: { $eq: identifier },
140
140
  version: { $eq: version }
141
141
  };
142
- const setOnInsert = {
143
- about, creator, identifier, project, version,
144
- dateCreated: now,
145
- typeOf: factory.creativeWorkType.NoteDigitalDocument
146
- };
142
+ const setOnInsert = Object.assign({ about, creator, identifier, project, version, dateCreated: now, typeOf: factory.creativeWorkType.NoteDigitalDocument }, (!options.overwrite) ? { text } : undefined // overwriteでない場合はinsert時にtextをセット
143
+ );
147
144
  // 変更可能な属性のみ上書き
148
145
  const setFields = {
149
146
  dateModified: now,
@@ -181,8 +181,8 @@ function createInformNoteTasks(params) {
181
181
  const informUrl = String((_a = informResource.recipient) === null || _a === void 0 ? void 0 : _a.url);
182
182
  notes4inform.forEach((note4inform) => {
183
183
  var _a;
184
- const { about, identifier, project, text, typeOf, version } = note4inform;
185
- const informObject = { about, identifier, project, text, typeOf, version }; // 明示的に必要最低限の属性のみ通知
184
+ const { about, id, identifier, project, text, typeOf, version } = note4inform;
185
+ const informObject = { about, id, identifier, project, text, typeOf, version }; // 明示的に必要最低限の属性のみ通知
186
186
  const informActionAttributes = {
187
187
  agent: project,
188
188
  object: informObject,
package/package.json CHANGED
@@ -111,5 +111,5 @@
111
111
  "postversion": "git push origin --tags",
112
112
  "prepublishOnly": "npm run clean && npm run build && npm test && npm run doc"
113
113
  },
114
- "version": "21.21.0-alpha.4"
114
+ "version": "21.21.0-alpha.6"
115
115
  }