@vendure/cli 3.1.8 → 3.2.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/LICENSE.md +42 -42
- package/dist/cli.js +26 -16
- package/dist/cli.js.map +1 -1
- package/dist/commands/add/add.js +1 -2
- package/dist/commands/add/add.js.map +1 -1
- package/dist/commands/add/api-extension/templates/api-extensions.template.ts +3 -3
- package/dist/commands/add/api-extension/templates/crud-resolver.template.ts +109 -109
- package/dist/commands/add/api-extension/templates/simple-resolver.template.ts +31 -31
- package/dist/commands/add/codegen/add-codegen.js +6 -6
- package/dist/commands/add/codegen/templates/codegen.template.ts +17 -17
- package/dist/commands/add/entity/add-entity.js +2 -2
- package/dist/commands/add/entity/add-entity.js.map +1 -1
- package/dist/commands/add/entity/codemods/add-entity-to-plugin/add-entity-to-plugin.js +1 -2
- package/dist/commands/add/entity/codemods/add-entity-to-plugin/add-entity-to-plugin.js.map +1 -1
- package/dist/commands/add/entity/templates/entity-translation.template.ts +29 -29
- package/dist/commands/add/entity/templates/entity.template.ts +31 -31
- package/dist/commands/add/job-queue/add-job-queue.js +36 -36
- package/dist/commands/add/plugin/create-new-plugin.js +20 -10
- package/dist/commands/add/plugin/create-new-plugin.js.map +1 -1
- package/dist/commands/add/plugin/templates/constants.template.ts +2 -2
- package/dist/commands/add/plugin/templates/plugin.template.ts +25 -25
- package/dist/commands/add/plugin/templates/types.template.ts +7 -7
- package/dist/commands/add/service/add-service.js +21 -21
- package/dist/commands/add/service/templates/basic-service.template.ts +13 -13
- package/dist/commands/add/service/templates/entity-service.template.ts +146 -146
- package/dist/commands/add/ui-extensions/codemods/add-ui-extension-static-prop/add-ui-extension-static-prop.js +6 -7
- package/dist/commands/add/ui-extensions/codemods/add-ui-extension-static-prop/add-ui-extension-static-prop.js.map +1 -1
- package/dist/commands/add/ui-extensions/codemods/update-admin-ui-plugin-init/update-admin-ui-plugin-init.js +7 -8
- package/dist/commands/add/ui-extensions/codemods/update-admin-ui-plugin-init/update-admin-ui-plugin-init.js.map +1 -1
- package/dist/commands/add/ui-extensions/templates/providers.template.ts +3 -3
- package/dist/commands/add/ui-extensions/templates/routes.template.ts +3 -3
- package/dist/commands/migrate/load-vendure-config-file.js +18 -9
- package/dist/commands/migrate/load-vendure-config-file.js.map +1 -1
- package/dist/commands/migrate/migrate.js +1 -2
- package/dist/commands/migrate/migrate.js.map +1 -1
- package/dist/shared/shared-prompts.js +6 -7
- package/dist/shared/shared-prompts.js.map +1 -1
- package/dist/shared/vendure-plugin-ref.js +3 -3
- package/dist/utilities/ast-utils.js +7 -8
- package/dist/utilities/ast-utils.js.map +1 -1
- package/dist/utilities/utils.js +2 -3
- package/dist/utilities/utils.js.map +1 -1
- package/package.json +6 -6
package/LICENSE.md
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
# License
|
|
2
|
-
Copyright (C) Vendure GmbH
|
|
3
|
-
|
|
4
|
-
This software is available under two different licenses:
|
|
5
|
-
* GNU General Public License version 3 (GPLv3) as Vendure Community Edition
|
|
6
|
-
* Vendure Commercial License (VCL)
|
|
7
|
-
|
|
8
|
-
The default Vendure license, without a valid Vendure Commercial License agreement, is the Open-Source GPLv3 license.
|
|
9
|
-
|
|
10
|
-
## GNU General Public License version 3 (GPLv3)
|
|
11
|
-
|
|
12
|
-
If you decide to choose the GPLv3 license, you must comply with the following terms:
|
|
13
|
-
|
|
14
|
-
This program is free software: you can redistribute it and/or modify
|
|
15
|
-
it under the terms of the GNU General Public License as published by
|
|
16
|
-
the Free Software Foundation, either version 3 of the License, or
|
|
17
|
-
(at your option) any later version.
|
|
18
|
-
|
|
19
|
-
This program is distributed in the hope that it will be useful,
|
|
20
|
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
21
|
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
22
|
-
GNU General Public License for more details.
|
|
23
|
-
|
|
24
|
-
You should have received a copy of the GNU General Public License
|
|
25
|
-
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
26
|
-
|
|
27
|
-
Additional permission under GNU GPL version 3 section 7:
|
|
28
|
-
|
|
29
|
-
An additional exception under section 7 of the GPL is included in the plugin-exception.txt file,
|
|
30
|
-
which allows you to distribute Vendure plugins (i.e. extensions) under a different license.
|
|
31
|
-
|
|
32
|
-
## Vendure Commercial License (VCL)
|
|
33
|
-
|
|
34
|
-
Alternatively, commercial and supported versions of the program - also known as
|
|
35
|
-
Commercial Distributions - must be used in accordance with the terms and conditions
|
|
36
|
-
contained in a separate written agreement between you and Vendure GmbH.
|
|
37
|
-
For more information about the Vendure Commercial License (VCL) please contact contact@vendure.io.
|
|
38
|
-
|
|
39
|
-
Please see also:
|
|
40
|
-
|
|
41
|
-
- [Licensing FAQ - license-faq.md](license/license-faq.md)
|
|
42
|
-
- [GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 - gpl-3.0.txt](license/gpl-3.0.txt)
|
|
1
|
+
# License
|
|
2
|
+
Copyright (C) Vendure GmbH
|
|
3
|
+
|
|
4
|
+
This software is available under two different licenses:
|
|
5
|
+
* GNU General Public License version 3 (GPLv3) as Vendure Community Edition
|
|
6
|
+
* Vendure Commercial License (VCL)
|
|
7
|
+
|
|
8
|
+
The default Vendure license, without a valid Vendure Commercial License agreement, is the Open-Source GPLv3 license.
|
|
9
|
+
|
|
10
|
+
## GNU General Public License version 3 (GPLv3)
|
|
11
|
+
|
|
12
|
+
If you decide to choose the GPLv3 license, you must comply with the following terms:
|
|
13
|
+
|
|
14
|
+
This program is free software: you can redistribute it and/or modify
|
|
15
|
+
it under the terms of the GNU General Public License as published by
|
|
16
|
+
the Free Software Foundation, either version 3 of the License, or
|
|
17
|
+
(at your option) any later version.
|
|
18
|
+
|
|
19
|
+
This program is distributed in the hope that it will be useful,
|
|
20
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
21
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
22
|
+
GNU General Public License for more details.
|
|
23
|
+
|
|
24
|
+
You should have received a copy of the GNU General Public License
|
|
25
|
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
26
|
+
|
|
27
|
+
Additional permission under GNU GPL version 3 section 7:
|
|
28
|
+
|
|
29
|
+
An additional exception under section 7 of the GPL is included in the plugin-exception.txt file,
|
|
30
|
+
which allows you to distribute Vendure plugins (i.e. extensions) under a different license.
|
|
31
|
+
|
|
32
|
+
## Vendure Commercial License (VCL)
|
|
33
|
+
|
|
34
|
+
Alternatively, commercial and supported versions of the program - also known as
|
|
35
|
+
Commercial Distributions - must be used in accordance with the terms and conditions
|
|
36
|
+
contained in a separate written agreement between you and Vendure GmbH.
|
|
37
|
+
For more information about the Vendure Commercial License (VCL) please contact contact@vendure.io.
|
|
38
|
+
|
|
39
|
+
Please see also:
|
|
40
|
+
|
|
41
|
+
- [Licensing FAQ - license-faq.md](license/license-faq.md)
|
|
42
|
+
- [GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 - gpl-3.0.txt](license/gpl-3.0.txt)
|
package/dist/cli.js
CHANGED
|
@@ -16,13 +16,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
16
16
|
}) : function(o, v) {
|
|
17
17
|
o["default"] = v;
|
|
18
18
|
});
|
|
19
|
-
var __importStar = (this && this.__importStar) || function (
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
};
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
26
36
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
27
37
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
28
38
|
};
|
|
@@ -34,15 +44,15 @@ const version = require('../package.json').version;
|
|
|
34
44
|
program
|
|
35
45
|
.version(version)
|
|
36
46
|
.usage(`vendure <command>`)
|
|
37
|
-
.description(picocolors_1.default.blue(`
|
|
38
|
-
888
|
|
39
|
-
888
|
|
40
|
-
888
|
|
41
|
-
888 888 .d88b. 88888b. .d88888 888 888 888d888 .d88b.
|
|
42
|
-
888 888 d8P Y8b 888 "88b d88" 888 888 888 888P" d8P Y8b
|
|
43
|
-
Y88 88P 88888888 888 888 888 888 888 888 888 88888888
|
|
44
|
-
Y8bd8P Y8b. 888 888 Y88b 888 Y88b 888 888 Y8b.
|
|
45
|
-
Y88P "Y8888 888 888 "Y88888 "Y88888 888 "Y8888
|
|
47
|
+
.description(picocolors_1.default.blue(`
|
|
48
|
+
888
|
|
49
|
+
888
|
|
50
|
+
888
|
|
51
|
+
888 888 .d88b. 88888b. .d88888 888 888 888d888 .d88b.
|
|
52
|
+
888 888 d8P Y8b 888 "88b d88" 888 888 888 888P" d8P Y8b
|
|
53
|
+
Y88 88P 88888888 888 888 888 888 888 888 888 88888888
|
|
54
|
+
Y8bd8P Y8b. 888 888 Y88b 888 Y88b 888 888 Y8b.
|
|
55
|
+
Y88P "Y8888 888 888 "Y88888 "Y88888 888 "Y8888
|
|
46
56
|
`));
|
|
47
57
|
program
|
|
48
58
|
.command('add')
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,yCAAoC;AACpC,4DAA4B;AAE5B,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAG9B,MAAM,OAAO,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC,OAAO,CAAC;AAEnD,OAAO;KACF,OAAO,CAAC,OAAO,CAAC;KAChB,KAAK,CAAC,mBAAmB,CAAC;KAC1B,WAAW,CACR,oBAAE,CAAC,IAAI,CAAC;;;;;;;;;CASf,CAAC,CACG,CAAC;AAEN,OAAO;KACF,OAAO,CAAC,KAAK,CAAC;KACd,WAAW,CAAC,uCAAuC,CAAC;KACpD,MAAM,CAAC,KAAK,IAAI,EAAE;IACf,MAAM,EAAE,UAAU,EAAE,GAAG,wDAAa,oBAAoB,GAAC,CAAC;IAC1D,MAAM,UAAU,EAAE,CAAC;IACnB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC;AAEP,OAAO;KACF,OAAO,CAAC,SAAS,CAAC;KAClB,WAAW,CAAC,8CAA8C,CAAC;KAC3D,MAAM,CAAC,KAAK,IAAI,EAAE;IACf,MAAM,EAAE,cAAc,EAAE,GAAG,wDAAa,4BAA4B,GAAC,CAAC;IACtE,MAAM,cAAc,EAAE,CAAC;IACvB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC;AAEP,KAAK,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC"}
|
package/dist/commands/add/add.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.addCommand =
|
|
6
|
+
exports.addCommand = addCommand;
|
|
7
7
|
const prompts_1 = require("@clack/prompts");
|
|
8
8
|
const picocolors_1 = __importDefault(require("picocolors"));
|
|
9
9
|
const constants_1 = require("../../constants");
|
|
@@ -66,5 +66,4 @@ async function addCommand() {
|
|
|
66
66
|
(0, prompts_1.outro)('❌ Error');
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
|
-
exports.addCommand = addCommand;
|
|
70
69
|
//# sourceMappingURL=add.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add.js","sourceRoot":"","sources":["../../../src/commands/add/add.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"add.js","sourceRoot":"","sources":["../../../src/commands/add/add.ts"],"names":[],"mappings":";;;;;AAiBA,gCAkDC;AAnED,4CAAsF;AACtF,4DAA4B;AAE5B,+CAA2C;AAE3C,iDAA8D;AAE9D,yEAA2E;AAC3E,uDAA0D;AAC1D,oDAAuD;AACvD,6DAA+D;AAC/D,kEAAoE;AACpE,uDAA0D;AAC1D,yEAA2E;AAE3E,MAAM,gBAAgB,GAAG,wBAAwB,CAAC;AAE3C,KAAK,UAAU,UAAU;IAE5B,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAClB,IAAA,eAAK,EAAC,oBAAE,CAAC,IAAI,CAAC,oDAAoD,CAAC,CAAC,CAAC;IACrE,MAAM,WAAW,GAA2B;QACxC,0CAAsB;QACtB,6BAAgB;QAChB,+BAAiB;QACjB,0CAAsB;QACtB,kCAAkB;QAClB,0CAAsB;QACtB,+BAAiB;KACpB,CAAC;IACF,MAAM,WAAW,GAAG,MAAM,IAAA,gBAAM,EAAC;QAC7B,OAAO,EAAE,sCAAsC;QAC/C,OAAO,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;YAC3B,KAAK,EAAE,CAAC,CAAC,EAAE;YACX,KAAK,EAAE,GAAG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AAC,CAAC,CAAC,OAAO,CAAC,CAAC;QACjE,IAAI,CAAC,YAAY,IAAI,CAAC,CAAC,KAAK,EAAE,CAAC;YAC3B,aAAG,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;QACvB,CAAC;QACD,IAAA,eAAK,EAAC,SAAS,CAAC,CAAC;IACrB,CAAC;AACL,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import gql from 'graphql-tag';
|
|
2
|
-
|
|
3
|
-
export const adminApiExtensions = gql``;
|
|
1
|
+
import gql from 'graphql-tag';
|
|
2
|
+
|
|
3
|
+
export const adminApiExtensions = gql``;
|
|
@@ -1,109 +1,109 @@
|
|
|
1
|
-
import { Args, Mutation, Query, Resolver } from '@nestjs/graphql';
|
|
2
|
-
import { DeletionResponse, Permission } from '@vendure/common/lib/generated-types';
|
|
3
|
-
import { CustomFieldsObject } from '@vendure/common/lib/shared-types';
|
|
4
|
-
import {
|
|
5
|
-
Allow,
|
|
6
|
-
Ctx,
|
|
7
|
-
PaginatedList,
|
|
8
|
-
RequestContext,
|
|
9
|
-
Transaction,
|
|
10
|
-
Relations,
|
|
11
|
-
VendureEntity,
|
|
12
|
-
ID,
|
|
13
|
-
TranslationInput,
|
|
14
|
-
ListQueryOptions,
|
|
15
|
-
RelationPaths,
|
|
16
|
-
} from '@vendure/core';
|
|
17
|
-
|
|
18
|
-
class TemplateEntity extends VendureEntity {
|
|
19
|
-
constructor() {
|
|
20
|
-
super();
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
class TemplateService {
|
|
25
|
-
findAll(ctx: RequestContext, options?: any, relations?: any): Promise<PaginatedList<TemplateEntity>> {
|
|
26
|
-
throw new Error('Method not implemented.');
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
findOne(ctx: RequestContext, id: ID, relations?: any): Promise<TemplateEntity | null> {
|
|
30
|
-
throw new Error('Method not implemented.');
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
create(ctx: RequestContext, input: any): Promise<TemplateEntity> {
|
|
34
|
-
throw new Error('Method not implemented.');
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
update(ctx: RequestContext, input: any): Promise<TemplateEntity> {
|
|
38
|
-
throw new Error('Method not implemented.');
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
delete(ctx: RequestContext, id: ID): Promise<DeletionResponse> {
|
|
42
|
-
throw new Error('Method not implemented.');
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
// These can be replaced by generated types if you set up code generation
|
|
47
|
-
interface CreateEntityInput {
|
|
48
|
-
// Define the input fields here
|
|
49
|
-
customFields?: CustomFieldsObject;
|
|
50
|
-
translations: Array<TranslationInput<TemplateEntity>>;
|
|
51
|
-
}
|
|
52
|
-
interface UpdateEntityInput {
|
|
53
|
-
id: ID;
|
|
54
|
-
// Define the input fields here
|
|
55
|
-
customFields?: CustomFieldsObject;
|
|
56
|
-
translations: Array<TranslationInput<TemplateEntity>>;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
@Resolver()
|
|
60
|
-
export class EntityAdminResolver {
|
|
61
|
-
constructor(private templateService: TemplateService) {}
|
|
62
|
-
|
|
63
|
-
@Query()
|
|
64
|
-
@Allow(Permission.SuperAdmin)
|
|
65
|
-
async entity(
|
|
66
|
-
@Ctx() ctx: RequestContext,
|
|
67
|
-
@Args() args: { id: ID },
|
|
68
|
-
@Relations(TemplateEntity) relations: RelationPaths<TemplateEntity>,
|
|
69
|
-
): Promise<TemplateEntity | null> {
|
|
70
|
-
return this.templateService.findOne(ctx, args.id, relations);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
@Query()
|
|
74
|
-
@Allow(Permission.SuperAdmin)
|
|
75
|
-
async entities(
|
|
76
|
-
@Ctx() ctx: RequestContext,
|
|
77
|
-
@Args() args: { options: ListQueryOptions<TemplateEntity> },
|
|
78
|
-
@Relations(TemplateEntity) relations: RelationPaths<TemplateEntity>,
|
|
79
|
-
): Promise<PaginatedList<TemplateEntity>> {
|
|
80
|
-
return this.templateService.findAll(ctx, args.options || undefined, relations);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
@Mutation()
|
|
84
|
-
@Transaction()
|
|
85
|
-
@Allow(Permission.SuperAdmin)
|
|
86
|
-
async createEntity(
|
|
87
|
-
@Ctx() ctx: RequestContext,
|
|
88
|
-
@Args() args: { input: CreateEntityInput },
|
|
89
|
-
): Promise<TemplateEntity> {
|
|
90
|
-
return this.templateService.create(ctx, args.input);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
@Mutation()
|
|
94
|
-
@Transaction()
|
|
95
|
-
@Allow(Permission.SuperAdmin)
|
|
96
|
-
async updateEntity(
|
|
97
|
-
@Ctx() ctx: RequestContext,
|
|
98
|
-
@Args() args: { input: UpdateEntityInput },
|
|
99
|
-
): Promise<TemplateEntity> {
|
|
100
|
-
return this.templateService.update(ctx, args.input);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
@Mutation()
|
|
104
|
-
@Transaction()
|
|
105
|
-
@Allow(Permission.SuperAdmin)
|
|
106
|
-
async deleteEntity(@Ctx() ctx: RequestContext, @Args() args: { id: ID }): Promise<DeletionResponse> {
|
|
107
|
-
return this.templateService.delete(ctx, args.id);
|
|
108
|
-
}
|
|
109
|
-
}
|
|
1
|
+
import { Args, Mutation, Query, Resolver } from '@nestjs/graphql';
|
|
2
|
+
import { DeletionResponse, Permission } from '@vendure/common/lib/generated-types';
|
|
3
|
+
import { CustomFieldsObject } from '@vendure/common/lib/shared-types';
|
|
4
|
+
import {
|
|
5
|
+
Allow,
|
|
6
|
+
Ctx,
|
|
7
|
+
PaginatedList,
|
|
8
|
+
RequestContext,
|
|
9
|
+
Transaction,
|
|
10
|
+
Relations,
|
|
11
|
+
VendureEntity,
|
|
12
|
+
ID,
|
|
13
|
+
TranslationInput,
|
|
14
|
+
ListQueryOptions,
|
|
15
|
+
RelationPaths,
|
|
16
|
+
} from '@vendure/core';
|
|
17
|
+
|
|
18
|
+
class TemplateEntity extends VendureEntity {
|
|
19
|
+
constructor() {
|
|
20
|
+
super();
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
class TemplateService {
|
|
25
|
+
findAll(ctx: RequestContext, options?: any, relations?: any): Promise<PaginatedList<TemplateEntity>> {
|
|
26
|
+
throw new Error('Method not implemented.');
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
findOne(ctx: RequestContext, id: ID, relations?: any): Promise<TemplateEntity | null> {
|
|
30
|
+
throw new Error('Method not implemented.');
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
create(ctx: RequestContext, input: any): Promise<TemplateEntity> {
|
|
34
|
+
throw new Error('Method not implemented.');
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
update(ctx: RequestContext, input: any): Promise<TemplateEntity> {
|
|
38
|
+
throw new Error('Method not implemented.');
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
delete(ctx: RequestContext, id: ID): Promise<DeletionResponse> {
|
|
42
|
+
throw new Error('Method not implemented.');
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// These can be replaced by generated types if you set up code generation
|
|
47
|
+
interface CreateEntityInput {
|
|
48
|
+
// Define the input fields here
|
|
49
|
+
customFields?: CustomFieldsObject;
|
|
50
|
+
translations: Array<TranslationInput<TemplateEntity>>;
|
|
51
|
+
}
|
|
52
|
+
interface UpdateEntityInput {
|
|
53
|
+
id: ID;
|
|
54
|
+
// Define the input fields here
|
|
55
|
+
customFields?: CustomFieldsObject;
|
|
56
|
+
translations: Array<TranslationInput<TemplateEntity>>;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
@Resolver()
|
|
60
|
+
export class EntityAdminResolver {
|
|
61
|
+
constructor(private templateService: TemplateService) {}
|
|
62
|
+
|
|
63
|
+
@Query()
|
|
64
|
+
@Allow(Permission.SuperAdmin)
|
|
65
|
+
async entity(
|
|
66
|
+
@Ctx() ctx: RequestContext,
|
|
67
|
+
@Args() args: { id: ID },
|
|
68
|
+
@Relations(TemplateEntity) relations: RelationPaths<TemplateEntity>,
|
|
69
|
+
): Promise<TemplateEntity | null> {
|
|
70
|
+
return this.templateService.findOne(ctx, args.id, relations);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
@Query()
|
|
74
|
+
@Allow(Permission.SuperAdmin)
|
|
75
|
+
async entities(
|
|
76
|
+
@Ctx() ctx: RequestContext,
|
|
77
|
+
@Args() args: { options: ListQueryOptions<TemplateEntity> },
|
|
78
|
+
@Relations(TemplateEntity) relations: RelationPaths<TemplateEntity>,
|
|
79
|
+
): Promise<PaginatedList<TemplateEntity>> {
|
|
80
|
+
return this.templateService.findAll(ctx, args.options || undefined, relations);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
@Mutation()
|
|
84
|
+
@Transaction()
|
|
85
|
+
@Allow(Permission.SuperAdmin)
|
|
86
|
+
async createEntity(
|
|
87
|
+
@Ctx() ctx: RequestContext,
|
|
88
|
+
@Args() args: { input: CreateEntityInput },
|
|
89
|
+
): Promise<TemplateEntity> {
|
|
90
|
+
return this.templateService.create(ctx, args.input);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
@Mutation()
|
|
94
|
+
@Transaction()
|
|
95
|
+
@Allow(Permission.SuperAdmin)
|
|
96
|
+
async updateEntity(
|
|
97
|
+
@Ctx() ctx: RequestContext,
|
|
98
|
+
@Args() args: { input: UpdateEntityInput },
|
|
99
|
+
): Promise<TemplateEntity> {
|
|
100
|
+
return this.templateService.update(ctx, args.input);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
@Mutation()
|
|
104
|
+
@Transaction()
|
|
105
|
+
@Allow(Permission.SuperAdmin)
|
|
106
|
+
async deleteEntity(@Ctx() ctx: RequestContext, @Args() args: { id: ID }): Promise<DeletionResponse> {
|
|
107
|
+
return this.templateService.delete(ctx, args.id);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { Args, Mutation, Query, Resolver } from '@nestjs/graphql';
|
|
2
|
-
import { Permission } from '@vendure/common/lib/generated-types';
|
|
3
|
-
import { ID } from '@vendure/common/lib/shared-types';
|
|
4
|
-
import { Allow, Ctx, RequestContext, Transaction } from '@vendure/core';
|
|
5
|
-
|
|
6
|
-
class TemplateService {
|
|
7
|
-
async exampleQueryHandler(ctx: RequestContext, id: ID) {
|
|
8
|
-
return true;
|
|
9
|
-
}
|
|
10
|
-
async exampleMutationHandler(ctx: RequestContext, id: ID) {
|
|
11
|
-
return true;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
@Resolver()
|
|
16
|
-
export class SimpleAdminResolver {
|
|
17
|
-
constructor(private templateService: TemplateService) {}
|
|
18
|
-
|
|
19
|
-
@Query()
|
|
20
|
-
@Allow(Permission.SuperAdmin)
|
|
21
|
-
async exampleQuery(@Ctx() ctx: RequestContext, @Args() args: { id: ID }): Promise<boolean> {
|
|
22
|
-
return this.templateService.exampleQueryHandler(ctx, args.id);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
@Mutation()
|
|
26
|
-
@Transaction()
|
|
27
|
-
@Allow(Permission.SuperAdmin)
|
|
28
|
-
async exampleMutation(@Ctx() ctx: RequestContext, @Args() args: { id: ID }): Promise<boolean> {
|
|
29
|
-
return this.templateService.exampleMutationHandler(ctx, args.id);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
1
|
+
import { Args, Mutation, Query, Resolver } from '@nestjs/graphql';
|
|
2
|
+
import { Permission } from '@vendure/common/lib/generated-types';
|
|
3
|
+
import { ID } from '@vendure/common/lib/shared-types';
|
|
4
|
+
import { Allow, Ctx, RequestContext, Transaction } from '@vendure/core';
|
|
5
|
+
|
|
6
|
+
class TemplateService {
|
|
7
|
+
async exampleQueryHandler(ctx: RequestContext, id: ID) {
|
|
8
|
+
return true;
|
|
9
|
+
}
|
|
10
|
+
async exampleMutationHandler(ctx: RequestContext, id: ID) {
|
|
11
|
+
return true;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@Resolver()
|
|
16
|
+
export class SimpleAdminResolver {
|
|
17
|
+
constructor(private templateService: TemplateService) {}
|
|
18
|
+
|
|
19
|
+
@Query()
|
|
20
|
+
@Allow(Permission.SuperAdmin)
|
|
21
|
+
async exampleQuery(@Ctx() ctx: RequestContext, @Args() args: { id: ID }): Promise<boolean> {
|
|
22
|
+
return this.templateService.exampleQueryHandler(ctx, args.id);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@Mutation()
|
|
26
|
+
@Transaction()
|
|
27
|
+
@Allow(Permission.SuperAdmin)
|
|
28
|
+
async exampleMutation(@Ctx() ctx: RequestContext, @Args() args: { id: ID }): Promise<boolean> {
|
|
29
|
+
return this.templateService.exampleMutationHandler(ctx, args.id);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -86,12 +86,12 @@ async function addCodegen(options) {
|
|
|
86
86
|
codegenFile.addEntryToGeneratesObject({
|
|
87
87
|
name: `'${uiExtensionsPath}/gql/'`,
|
|
88
88
|
kind: ts_morph_1.StructureKind.PropertyAssignment,
|
|
89
|
-
initializer: `{
|
|
90
|
-
preset: 'client',
|
|
91
|
-
documents: '${uiExtensionsPath}/**/*.ts',
|
|
92
|
-
presetConfig: {
|
|
93
|
-
fragmentMasking: false,
|
|
94
|
-
},
|
|
89
|
+
initializer: `{
|
|
90
|
+
preset: 'client',
|
|
91
|
+
documents: '${uiExtensionsPath}/**/*.ts',
|
|
92
|
+
presetConfig: {
|
|
93
|
+
fragmentMasking: false,
|
|
94
|
+
},
|
|
95
95
|
}`,
|
|
96
96
|
});
|
|
97
97
|
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import type { CodegenConfig } from '@graphql-codegen/cli';
|
|
2
|
-
|
|
3
|
-
const config: CodegenConfig = {
|
|
4
|
-
overwrite: true,
|
|
5
|
-
// This assumes your server is running on the standard port
|
|
6
|
-
// and with the default admin API path. Adjust accordingly.
|
|
7
|
-
schema: 'http://localhost:3000/admin-api',
|
|
8
|
-
config: {
|
|
9
|
-
// This tells codegen that the `Money` scalar is a number
|
|
10
|
-
scalars: { Money: 'number' },
|
|
11
|
-
// This ensures generated enums do not conflict with the built-in types.
|
|
12
|
-
namingConvention: { enumValues: 'keep' },
|
|
13
|
-
},
|
|
14
|
-
generates: {},
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export default config;
|
|
1
|
+
import type { CodegenConfig } from '@graphql-codegen/cli';
|
|
2
|
+
|
|
3
|
+
const config: CodegenConfig = {
|
|
4
|
+
overwrite: true,
|
|
5
|
+
// This assumes your server is running on the standard port
|
|
6
|
+
// and with the default admin API path. Adjust accordingly.
|
|
7
|
+
schema: 'http://localhost:3000/admin-api',
|
|
8
|
+
config: {
|
|
9
|
+
// This tells codegen that the `Money` scalar is a number
|
|
10
|
+
scalars: { Money: 'number' },
|
|
11
|
+
// This ensures generated enums do not conflict with the built-in types.
|
|
12
|
+
namingConvention: { enumValues: 'keep' },
|
|
13
|
+
},
|
|
14
|
+
generates: {},
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export default config;
|
|
@@ -3,7 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.addEntityCommand = void 0;
|
|
7
|
+
exports.getCustomEntityName = getCustomEntityName;
|
|
7
8
|
const prompts_1 = require("@clack/prompts");
|
|
8
9
|
const change_case_1 = require("change-case");
|
|
9
10
|
const path_1 = __importDefault(require("path"));
|
|
@@ -153,5 +154,4 @@ async function getCustomEntityName(_cancelledMessage) {
|
|
|
153
154
|
}
|
|
154
155
|
return (0, change_case_1.pascalCase)(entityName);
|
|
155
156
|
}
|
|
156
|
-
exports.getCustomEntityName = getCustomEntityName;
|
|
157
157
|
//# sourceMappingURL=add-entity.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-entity.js","sourceRoot":"","sources":["../../../../src/commands/add/entity/add-entity.ts"],"names":[],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"add-entity.js","sourceRoot":"","sources":["../../../../src/commands/add/entity/add-entity.ts"],"names":[],"mappings":";;;;;;AA+KA,kDAkBC;AAjMD,4CAA8E;AAC9E,6CAAoD;AACpD,gDAAwB;AAGxB,kDAAqD;AACrD,6DAA8E;AAC9E,2DAAuD;AACvD,mEAA8E;AAE9E,4DAA0D;AAC1D,oDAAiE;AAEjE,+FAAyF;AAEzF,MAAM,gBAAgB,GAAG,sBAAsB,CAAC;AAanC,QAAA,gBAAgB,GAAG,IAAI,wBAAU,CAAC;IAC3C,EAAE,EAAE,YAAY;IAChB,QAAQ,EAAE,gBAAgB;IAC1B,WAAW,EAAE,8BAA8B;IAC3C,GAAG,EAAE,OAAO,CAAC,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC;CACrC,CAAC,CAAC;AAEH,KAAK,UAAU,SAAS,CACpB,OAAmC;;IAEnC,MAAM,qBAAqB,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,CAAC;IAC9C,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,IAAA,+BAAc,EAAC,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,CAAC,CAAC;IACtF,MAAM,aAAa,GAAG,qBAAqB,aAArB,qBAAqB,cAArB,qBAAqB,GAAI,CAAC,MAAM,IAAA,6BAAY,EAAC,OAAO,EAAE,gBAAgB,CAAC,CAAC,CAAC;IAC/F,MAAM,mBAAmB,GAAiB,EAAE,CAAC;IAE7C,MAAM,gBAAgB,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS,mCAAI,CAAC,MAAM,mBAAmB,CAAC,gBAAgB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CAAE,aAAa,GAAG,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,KAAK,cAAc,CAAC,mCAAI,CAAC,CAAC,CAAC;IAChG,IAAI,KAAK,GAAG,CAAC,CAAC,EAAE,CAAC;QACb,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,gBAAgB,CAAC,KAAK,CAAC,CAAC;IACzC,CAAC;AACL,CAAC;AAEM,KAAK,UAAU,mBAAmB,CAAC,iBAAyB;IAC/D,MAAM,UAAU,GAAG,MAAM,IAAA,cAAI,EAAC;QAC1B,OAAO,EAAE,wCAAwC;QACjD,YAAY,EAAE,EAAE;QAChB,QAAQ,EAAE,KAAK,CAAC,EAAE;YACd,IAAI,CAAC,KAAK,EAAE,CAAC;gBACT,OAAO,wCAAwC,CAAC;YACpD,CAAC;YACD,IAAI,CAAC,2BAAe,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;gBAC/B,OAAO,oEAAoE,CAAC;YAChF,CAAC;QACL,CAAC;KACJ,CAAC,CAAC;IACH,IAAI,IAAA,kBAAQ,EAAC,UAAU,CAAC,EAAE,CAAC;QACvB,IAAA,gBAAM,EAAC,iBAAiB,CAAC,CAAC;QAC1B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;IACD,OAAO,IAAA,wBAAU,EAAC,UAAU,CAAC,CAAC;AAClC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.addEntityToPlugin =
|
|
3
|
+
exports.addEntityToPlugin = addEntityToPlugin;
|
|
4
4
|
const ast_utils_1 = require("../../../../../utilities/ast-utils");
|
|
5
5
|
function addEntityToPlugin(plugin, entityClass) {
|
|
6
6
|
if (!entityClass) {
|
|
@@ -13,5 +13,4 @@ function addEntityToPlugin(plugin, entityClass) {
|
|
|
13
13
|
namedImports: [entityClassName],
|
|
14
14
|
});
|
|
15
15
|
}
|
|
16
|
-
exports.addEntityToPlugin = addEntityToPlugin;
|
|
17
16
|
//# sourceMappingURL=add-entity-to-plugin.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-entity-to-plugin.js","sourceRoot":"","sources":["../../../../../../src/commands/add/entity/codemods/add-entity-to-plugin/add-entity-to-plugin.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"add-entity-to-plugin.js","sourceRoot":"","sources":["../../../../../../src/commands/add/entity/codemods/add-entity-to-plugin/add-entity-to-plugin.ts"],"names":[],"mappings":";;AAKA,8CAWC;AAbD,kEAAsE;AAEtE,SAAgB,iBAAiB,CAAC,MAAwB,EAAE,WAA6B;IACrF,IAAI,CAAC,WAAW,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;IACnD,CAAC;IACD,MAAM,eAAe,GAAG,WAAW,CAAC,OAAO,EAAY,CAAC;IACxD,MAAM,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;IAElC,IAAA,4BAAgB,EAAC,MAAM,CAAC,gBAAgB,CAAC,aAAa,EAAE,EAAE;QACtD,eAAe,EAAE,WAAW,CAAC,aAAa,EAAE;QAC5C,YAAY,EAAE,CAAC,eAAe,CAAC;KAClC,CAAC,CAAC;AACP,CAAC"}
|