runlify 0.0.251 → 0.0.253

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.
Files changed (25) hide show
  1. package/build/projectsGeneration/builders/BaseSavableEntityBuilder.js +2 -2
  2. package/build/projectsGeneration/builders/InfoRegistryBuilder.js +2 -2
  3. package/build/projectsGeneration/builders/SumRegistryBuilder.js +2 -2
  4. package/build/projectsGeneration/builders/SystemMetaBuilder.js +3 -1
  5. package/build/projectsGeneration/generateEntity.js +193 -154
  6. package/build/projectsGeneration/generators/fileTemplates/back/services/entity/class.js +11 -39
  7. package/build/projectsGeneration/generators/fileTemplates/back/services/entity/config.js +49 -19
  8. package/build/projectsGeneration/generators/fileTemplates/back/services/entity/service.js +2 -2
  9. package/build/projectsGeneration/generators/fileTemplates/back/services/serviceConstrictors.js +3 -5
  10. package/build/projectsGeneration/types.js +1 -1
  11. package/build/projectsGeneration/utils.js +16 -14
  12. package/build/types/projectsGeneration/generators/fileTemplates/back/services/entity/class.d.ts +1 -1
  13. package/build/types/projectsGeneration/generators/fileTemplates/back/services/entity/config.d.ts +2 -1
  14. package/build/types/projectsGeneration/utils.d.ts +2 -1
  15. package/package.json +1 -1
  16. package/build/projectsGeneration/generators/fileTemplates/back/services/entity/additionalClass.js +0 -10
  17. package/build/projectsGeneration/generators/fileTemplates/back/services/entity/additionalMethods.js +0 -10
  18. package/build/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/getPostOperations.js +0 -51
  19. package/build/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/getRegistryEntries.js +0 -11
  20. package/build/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/getUnPostOperations.js +0 -19
  21. package/build/types/projectsGeneration/generators/fileTemplates/back/services/entity/additionalClass.d.ts +0 -2
  22. package/build/types/projectsGeneration/generators/fileTemplates/back/services/entity/additionalMethods.d.ts +0 -2
  23. package/build/types/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/getPostOperations.d.ts +0 -3
  24. package/build/types/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/getRegistryEntries.d.ts +0 -2
  25. package/build/types/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/getUnPostOperations.d.ts +0 -3
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getUnPostOperationsTmpl = void 0;
4
- var pluralize_1 = require("pluralize");
5
- var types_1 = require("../../../../../../types");
6
- var utils_1 = require("../../../../../../utils");
7
- var fieldTypeToTsType_1 = require("../../../../../fieldTypeToTsType");
8
- var metaUtils_1 = require("../../../../../../metaUtils");
9
- var getUnPostOperationsTmpl = function (_prefix, document, options) {
10
- if (options === void 0) { options = types_1.defaultBootstrapEntityOptions; }
11
- var contextName = 'Context';
12
- return "import {PrismaPromise} from '@prisma/client';\nimport {".concat(contextName, "} from '../../types';\n").concat(options.skipWarningThisIsGenerated
13
- ? ''
14
- : "\n// ".concat(utils_1.generatedWarning, "\n"), "\nexport const getUnPostOperations = async (ctx: ").concat(contextName, ", id: ").concat((0, fieldTypeToTsType_1.fieldTypeToTsType)((0, metaUtils_1.getKeyField)(document).type), "): Promise<PrismaPromise<any>[]> => {\n const registries: any[] = [").concat(document.registries
15
- .map(function (registry) { return "\n '".concat((0, pluralize_1.singular)(registry), "',"); })
16
- .join(''), "\n ];\n\n return registries.map(registry => ctx.prisma[registry].deleteMany({\n where: {\n registrarTypeId: '").concat((0, pluralize_1.singular)(document.name), "',\n registrarId: id,\n },\n }));\n};\n");
17
- };
18
- exports.getUnPostOperationsTmpl = getUnPostOperationsTmpl;
19
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0VW5Qb3N0T3BlcmF0aW9ucy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9wcm9qZWN0c0dlbmVyYXRpb24vZ2VuZXJhdG9ycy9maWxlVGVtcGxhdGVzL2JhY2svc2VydmljZXMvZW50aXR5L2hvb2tzL2dldFVuUG9zdE9wZXJhdGlvbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQ0EsdUNBQW9DO0FBQ3BDLGlEQUdnQztBQUNoQyxpREFBMEQ7QUFDMUQsc0VBQW9FO0FBQ3BFLHlEQUF5RDtBQUVsRCxJQUFNLHVCQUF1QixHQUFHLFVBQ3JDLE9BQWUsRUFDZixRQUFrQixFQUNsQixPQUErRDtJQUEvRCx3QkFBQSxFQUFBLFVBQWtDLHFDQUE2QjtJQUUvRCxJQUFNLFdBQVcsR0FBRyxTQUFTLENBQUE7SUFFN0IsT0FBTyxpRUFDQyxXQUFXLG9DQUVuQixPQUFPLENBQUMsMEJBQTBCO1FBQ2hDLENBQUMsQ0FBQyxFQUFFO1FBQ0osQ0FBQyxDQUFDLGVBQ0Qsd0JBQWdCLE9BQ3BCLDhEQUVnRCxXQUFXLG1CQUFTLElBQUEscUNBQWlCLEVBQUMsSUFBQSx1QkFBVyxFQUFDLFFBQVEsQ0FBQyxDQUFDLElBQUksQ0FBQyxpRkFDbkYsUUFBUSxDQUFDLFVBQVU7U0FDN0MsR0FBRyxDQUFDLFVBQUMsUUFBUSxJQUFLLE9BQUEsaUJBQVUsSUFBQSxvQkFBUSxFQUFDLFFBQVEsQ0FBQyxPQUFJLEVBQWhDLENBQWdDLENBQUM7U0FDbkQsSUFBSSxDQUFDLEVBQUUsQ0FBQyxvSUFLYSxJQUFBLG9CQUFRLEVBQUMsUUFBUSxDQUFDLElBQUksQ0FBQyxxREFLaEQsQ0FBQTtBQUNELENBQUMsQ0FBQTtBQTlCWSxRQUFBLHVCQUF1QiwyQkE4Qm5DIn0=
@@ -1,2 +0,0 @@
1
- import { EntityWideGenerationArgs } from '../../../../../args';
2
- export declare const prismaServiceClassTmpl: ({ entity, }: EntityWideGenerationArgs) => string;
@@ -1,2 +0,0 @@
1
- import { EntityWideGenerationArgs } from '../../../../../args';
2
- export declare const backAdditionalMethodsTmpl: ({ entity, }: EntityWideGenerationArgs) => string;
@@ -1,3 +0,0 @@
1
- import { Document, InfoRegistry, SumRegistry } from '../../../../../../builders/buildedTypes';
2
- import { BootstrapEntityOptions } from '../../../../../../types';
3
- export declare const getPostOperationsTmpl: (prefix: string, document: Document, allSumRegistries: Map<string, SumRegistry>, allInfoRegistries: Map<string, InfoRegistry>, options?: BootstrapEntityOptions) => string;
@@ -1,2 +0,0 @@
1
- import { Document } from '../../../../../../builders/buildedTypes';
2
- export declare const getRegistryEntriesTmpl: (_prefix: string, document: Document) => string;
@@ -1,3 +0,0 @@
1
- import { Document } from '../../../../../../builders/buildedTypes';
2
- import { BootstrapEntityOptions } from '../../../../../../types';
3
- export declare const getUnPostOperationsTmpl: (_prefix: string, document: Document, options?: BootstrapEntityOptions) => string;