@amplication/code-gen-types
Advanced tools
Comparing version 2.0.13-beta.1 to 2.0.13
{ | ||
"name": "@amplication/code-gen-types", | ||
"version": "2.0.13-beta.1", | ||
"version": "2.0.13", | ||
"description": "This library supplies all the contracts for Amplication Code Generation. The purpose is to make the contracts available for inclusion in plugins.", | ||
@@ -5,0 +5,0 @@ "main": "./src/index.js", |
@@ -105,3 +105,3 @@ import type { namedTypes } from "ast-types"; | ||
*/ | ||
replaceModulesCode(fn: (code: string) => string): Promise<void>; | ||
replaceModulesCode(fn: (path: string, code: string) => string): Promise<void>; | ||
/** | ||
@@ -108,0 +108,0 @@ * @returns An array of modules |
@@ -97,3 +97,3 @@ "use strict"; | ||
for await (const module of Object.values(this.map)) { | ||
module.code = fn(module.code); | ||
module.code = fn(module.path, module.code); | ||
this.map[module.path] = module; | ||
@@ -100,0 +100,0 @@ } |
@@ -49,24 +49,2 @@ import type { namedTypes } from "ast-types"; | ||
} | ||
export interface CreateEntityControllerGrpcParams extends EventParams { | ||
template: namedTypes.File; | ||
entityName: string; | ||
entityServiceModule: string; | ||
templateMapping: { | ||
[key: string]: any; | ||
}; | ||
controllerBaseId: namedTypes.Identifier; | ||
serviceId: namedTypes.Identifier; | ||
} | ||
export interface CreateEntityControllerGrpcBaseParams extends EventParams { | ||
template: namedTypes.File; | ||
entity: Entity; | ||
entityName: string; | ||
entityType: string; | ||
entityServiceModule: string; | ||
templateMapping: { | ||
[key: string]: any; | ||
}; | ||
controllerBaseId: namedTypes.Identifier; | ||
serviceId: namedTypes.Identifier; | ||
} | ||
export interface CreateEntityControllerToManyRelationMethodsParams extends EventParams { | ||
@@ -84,14 +62,2 @@ field: EntityLookupField; | ||
} | ||
export interface CreateEntityControllerGrpcToManyRelationMethodsParams extends EventParams { | ||
field: EntityLookupField; | ||
entity: Entity; | ||
entityType: string; | ||
whereUniqueInput: NamedClassDeclaration; | ||
serviceId: namedTypes.Identifier; | ||
methods: namedTypes.ClassMethod[]; | ||
toManyFile: namedTypes.File; | ||
toManyMapping: { | ||
[key: string]: any; | ||
}; | ||
} | ||
export interface CreateEntityResolverToManyRelationMethodsParams extends EventParams { | ||
@@ -98,0 +64,0 @@ field: EntityLookupField; |
@@ -1,2 +0,2 @@ | ||
import { CreateAdminUIParams, CreateServerAuthParams, CreateEntityControllerBaseParams, CreateEntityControllerParams, CreateEntityServiceBaseParams, CreateEntityServiceParams, CreateEntityResolverBaseParams, CreateEntityResolverParams, CreateMessageBrokerClientOptionsFactoryParams, CreateMessageBrokerNestJSModuleParams, CreateMessageBrokerParams, CreateMessageBrokerServiceBaseParams, CreateMessageBrokerServiceParams, CreateMessageBrokerTopicsEnumParams, CreatePrismaSchemaParams, CreateServerAppModuleParams, CreateServerDockerComposeDBParams, CreateServerDockerComposeParams, CreateServerDotEnvParams, CreateServerPackageJsonParams, CreateServerParams, CreateEntityModuleParams, CreateEntityModuleBaseParams, CreateSwaggerParams, CreateSeedParams, CreateEntityControllerSpecParams, CreateAdminUIPackageJsonParams, CreateEntityControllerToManyRelationMethodsParams, CreateEntityResolverToManyRelationMethodsParams, CreateEntityResolverToOneRelationMethodsParams, CreateServerGitIgnoreParams, CreateAdminGitIgnoreParams, CreateDTOsParams, LoadStaticFilesParams, CreateServerDockerComposeDevParams, CreateConnectMicroservicesParams, CreateAdminAppModuleParams, CreateAdminDotEnvParams, CreateEntityControllerGrpcParams, CreateEntityControllerGrpcBaseParams, CreateEntityControllerGrpcToManyRelationMethodsParams } from "./plugin-events-params"; | ||
import { CreateAdminUIParams, CreateServerAuthParams, CreateEntityControllerBaseParams, CreateEntityControllerParams, CreateEntityServiceBaseParams, CreateEntityServiceParams, CreateEntityResolverBaseParams, CreateEntityResolverParams, CreateMessageBrokerClientOptionsFactoryParams, CreateMessageBrokerNestJSModuleParams, CreateMessageBrokerParams, CreateMessageBrokerServiceBaseParams, CreateMessageBrokerServiceParams, CreateMessageBrokerTopicsEnumParams, CreatePrismaSchemaParams, CreateServerAppModuleParams, CreateServerDockerComposeDBParams, CreateServerDockerComposeParams, CreateServerDotEnvParams, CreateServerPackageJsonParams, CreateServerParams, CreateEntityModuleParams, CreateEntityModuleBaseParams, CreateSwaggerParams, CreateSeedParams, CreateEntityControllerSpecParams, CreateAdminUIPackageJsonParams, CreateEntityControllerToManyRelationMethodsParams, CreateEntityResolverToManyRelationMethodsParams, CreateEntityResolverToOneRelationMethodsParams, CreateServerGitIgnoreParams, CreateAdminGitIgnoreParams, CreateDTOsParams, LoadStaticFilesParams, CreateServerDockerComposeDevParams, CreateConnectMicroservicesParams, CreateAdminAppModuleParams, CreateAdminDotEnvParams } from "./plugin-events-params"; | ||
import { EventNames, PluginEventType } from "./plugins-types"; | ||
@@ -15,4 +15,2 @@ export type Events = { | ||
[EventNames.CreateEntityControllerBase]?: PluginEventType<CreateEntityControllerBaseParams>; | ||
[EventNames.CreateEntityControllerGrpc]?: PluginEventType<CreateEntityControllerGrpcParams>; | ||
[EventNames.CreateEntityControllerGrpcBase]?: PluginEventType<CreateEntityControllerGrpcBaseParams>; | ||
[EventNames.CreateServerDockerCompose]?: PluginEventType<CreateServerDockerComposeParams>; | ||
@@ -41,3 +39,2 @@ [EventNames.CreateServerDockerComposeDB]?: PluginEventType<CreateServerDockerComposeDBParams>; | ||
[EventNames.CreateEntityControllerToManyRelationMethods]?: PluginEventType<CreateEntityControllerToManyRelationMethodsParams>; | ||
[EventNames.CreateEntityControllerGrpcToManyRelationMethods]?: PluginEventType<CreateEntityControllerGrpcToManyRelationMethodsParams>; | ||
[EventNames.CreateEntityResolverToManyRelationMethods]?: PluginEventType<CreateEntityResolverToManyRelationMethodsParams>; | ||
@@ -44,0 +41,0 @@ [EventNames.CreateEntityResolverToOneRelationMethods]?: PluginEventType<CreateEntityResolverToOneRelationMethodsParams>; |
@@ -55,4 +55,2 @@ import type { Promisable } from "type-fest"; | ||
CreateEntityControllerBase = "CreateEntityControllerBase", | ||
CreateEntityControllerGrpc = "CreateEntityControllerGrpc", | ||
CreateEntityControllerGrpcBase = "CreateEntityControllerGrpcBase", | ||
CreateEntityControllerSpec = "CreateEntityControllerSpec", | ||
@@ -89,3 +87,2 @@ CreateServerAuth = "CreateServerAuth", | ||
CreateEntityControllerToManyRelationMethods = "CreateEntityControllerToManyRelationMethods", | ||
CreateEntityControllerGrpcToManyRelationMethods = "createEntityControllerGrpcToManyRelationMethods", | ||
CreateEntityResolverToManyRelationMethods = "CreateEntityResolverToManyRelationMethods", | ||
@@ -92,0 +89,0 @@ CreateEntityResolverToOneRelationMethods = "CreateEntityResolverToOneRelationMethods", |
@@ -8,4 +8,2 @@ "use strict"; | ||
EventNames["CreateEntityControllerBase"] = "CreateEntityControllerBase"; | ||
EventNames["CreateEntityControllerGrpc"] = "CreateEntityControllerGrpc"; | ||
EventNames["CreateEntityControllerGrpcBase"] = "CreateEntityControllerGrpcBase"; | ||
EventNames["CreateEntityControllerSpec"] = "CreateEntityControllerSpec"; | ||
@@ -42,3 +40,2 @@ EventNames["CreateServerAuth"] = "CreateServerAuth"; | ||
EventNames["CreateEntityControllerToManyRelationMethods"] = "CreateEntityControllerToManyRelationMethods"; | ||
EventNames["CreateEntityControllerGrpcToManyRelationMethods"] = "createEntityControllerGrpcToManyRelationMethods"; | ||
EventNames["CreateEntityResolverToManyRelationMethods"] = "CreateEntityResolverToManyRelationMethods"; | ||
@@ -45,0 +42,0 @@ EventNames["CreateEntityResolverToOneRelationMethods"] = "CreateEntityResolverToOneRelationMethods"; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1
157385
3701
1