@vendure/cli 2.1.7 → 2.1.9
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.
|
@@ -4,7 +4,7 @@ exports.renderServiceWithEntity = exports.renderService = void 0;
|
|
|
4
4
|
function renderService(context) {
|
|
5
5
|
return `
|
|
6
6
|
import { Inject, Injectable } from '@nestjs/common';
|
|
7
|
-
import { RequestContext, TransactionalConnection } from '@vendure/core';
|
|
7
|
+
import { RequestContext, TransactionalConnection, patchEntity } from '@vendure/core';
|
|
8
8
|
|
|
9
9
|
import { ${context.pluginInitOptionsName} } from '../constants';
|
|
10
10
|
import { PluginInitOptions } from '../types';
|
|
@@ -70,7 +70,7 @@ export class ${context.service.className} {
|
|
|
70
70
|
|
|
71
71
|
async update(ctx: RequestContext, input: Update${context.customEntityName}Input): Promise<${context.customEntityName}> {
|
|
72
72
|
const example = await this.connection.getEntityOrThrow(ctx, ${context.customEntityName}, input.id);
|
|
73
|
-
const updated =
|
|
73
|
+
const updated = patchEntity(example, input);
|
|
74
74
|
return this.connection.getRepository(ctx, ${context.customEntityName}).save(updated);
|
|
75
75
|
}
|
|
76
76
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vendure/cli",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.9",
|
|
4
4
|
"description": "A modern, headless ecommerce framework",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@clack/prompts": "^0.7.0",
|
|
37
|
-
"@vendure/common": "^2.1.
|
|
37
|
+
"@vendure/common": "^2.1.9",
|
|
38
38
|
"change-case": "^4.1.2",
|
|
39
39
|
"commander": "^11.0.0",
|
|
40
40
|
"fs-extra": "^11.1.1",
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"typescript": "4.9.5"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "217745d62cdc338d6551c34224256443c20baf10"
|
|
47
47
|
}
|