mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 09:36:44 +00:00
chore(core): Add exemptions to fix intermittent type error on build (#16420)
This commit is contained in:
@@ -102,6 +102,7 @@ export class ImportCredentialsCommand extends BaseCommand {
|
||||
}
|
||||
|
||||
private async storeCredential(credential: Partial<CredentialsEntity>, project: Project) {
|
||||
// @ts-ignore CAT-957
|
||||
const result = await this.transactionManager.upsert(CredentialsEntity, credential, ['id']);
|
||||
|
||||
const sharingExists = await this.transactionManager.existsBy(SharedCredentials, {
|
||||
|
||||
@@ -447,6 +447,7 @@ export class CredentialsHelper extends ICredentialsHelper {
|
||||
type,
|
||||
};
|
||||
|
||||
// @ts-ignore CAT-957
|
||||
await this.credentialsRepository.update(findQuery, newCredentialsData);
|
||||
}
|
||||
|
||||
|
||||
@@ -388,6 +388,7 @@ export class CredentialsService {
|
||||
await this.externalHooks.run('credentials.update', [newCredentialData]);
|
||||
|
||||
// Update the credentials in DB
|
||||
// @ts-ignore CAT-957
|
||||
await this.credentialsRepository.update(credentialId, newCredentialData);
|
||||
|
||||
// We sadly get nothing back from "update". Neither if it updated a record
|
||||
|
||||
@@ -562,6 +562,7 @@ export class SourceControlImportService {
|
||||
newSharedCredential.projectId = remoteOwnerProject?.id ?? personalProject.id;
|
||||
newSharedCredential.role = 'credential:owner';
|
||||
|
||||
// @ts-ignore CAT-957
|
||||
await this.sharedCredentialsRepository.upsert({ ...newSharedCredential }, [
|
||||
'credentialsId',
|
||||
'projectId',
|
||||
@@ -616,6 +617,7 @@ export class SourceControlImportService {
|
||||
);
|
||||
}
|
||||
|
||||
// @ts-ignore CAT-957
|
||||
const tagCopy = this.tagRepository.create(tag);
|
||||
await this.tagRepository.upsert(tagCopy, {
|
||||
skipUpdateIfNoValuesChanged: true,
|
||||
@@ -672,6 +674,7 @@ export class SourceControlImportService {
|
||||
},
|
||||
});
|
||||
|
||||
// @ts-ignore CAT-957
|
||||
await this.folderRepository.upsert(folderCopy, {
|
||||
skipUpdateIfNoValuesChanged: true,
|
||||
conflictPaths: { id: true },
|
||||
|
||||
@@ -104,6 +104,7 @@ export async function deleteWorkflow(workflow: WorkflowEntity): Promise<Workflow
|
||||
}
|
||||
|
||||
export async function updateWorkflow(workflowId: string, updateData: WorkflowEntity) {
|
||||
// @ts-ignore CAT-957
|
||||
return await Container.get(WorkflowRepository).update(workflowId, updateData);
|
||||
}
|
||||
|
||||
|
||||
@@ -57,6 +57,7 @@ export class ImportService {
|
||||
|
||||
const exists = workflow.id ? await tx.existsBy(WorkflowEntity, { id: workflow.id }) : false;
|
||||
|
||||
// @ts-ignore CAT-957
|
||||
const upsertResult = await tx.upsert(WorkflowEntity, workflow, ['id']);
|
||||
const workflowId = upsertResult.identifiers.at(0)?.id as string;
|
||||
|
||||
|
||||
@@ -383,6 +383,7 @@ export class ProjectService {
|
||||
) {
|
||||
await em.insert(
|
||||
ProjectRelation,
|
||||
// @ts-ignore CAT-957
|
||||
relations.map((v) =>
|
||||
this.projectRelationRepository.create({
|
||||
projectId: project.id,
|
||||
|
||||
@@ -41,6 +41,7 @@ export class PublicApiKeyService {
|
||||
) {
|
||||
const apiKey = this.generateApiKey(user, expiresAt);
|
||||
await this.apiKeyRepository.insert(
|
||||
// @ts-ignore CAT-957
|
||||
this.apiKeyRepository.create({
|
||||
userId: user.id,
|
||||
apiKey,
|
||||
|
||||
@@ -341,6 +341,7 @@ export class EnterpriseWorkflowService {
|
||||
await this.shareCredentialsWithProject(user, shareCredentials, destinationProject.id);
|
||||
|
||||
// 9. Move workflow to the right folder if any
|
||||
// @ts-ignore CAT-957
|
||||
await this.workflowRepository.update({ id: workflow.id }, { parentFolder });
|
||||
|
||||
// 10. try to activate it again if it was active
|
||||
|
||||
@@ -169,6 +169,7 @@ export class WorkflowsController {
|
||||
project.id,
|
||||
transactionManager,
|
||||
);
|
||||
// @ts-ignore CAT-957
|
||||
await transactionManager.update(WorkflowEntity, { id: workflow.id }, { parentFolder });
|
||||
} catch {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user