From 5218e984a2bb84b7f47a06c804dd304cfd299b59 Mon Sep 17 00:00:00 2001 From: Kishan Parmar Date: Sat, 20 Jan 2024 12:30:09 +0530 Subject: [PATCH] fix(cli): fix windows command error --- packages/cli/src/lib/commands/create-piece.ts | 20 +++++++++---------- .../cli/src/lib/commands/create-trigger.ts | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/cli/src/lib/commands/create-piece.ts b/packages/cli/src/lib/commands/create-piece.ts index 7913ee72d8..4ac92badd5 100644 --- a/packages/cli/src/lib/commands/create-piece.ts +++ b/packages/cli/src/lib/commands/create-piece.ts @@ -51,16 +51,16 @@ const nxGenerateNodeLibrary = async ( packageName: string, pieceType: string ) => { - const nxGenerateCommand = ` - npx nx generate @nx/node:library ${pieceName} \ - --directory=pieces/${pieceType} \ - --importPath=${packageName} \ - --publishable \ - --buildable \ - --standaloneConfig \ - --strict \ - --unitTestRunner=none - `; + const nxGenerateCommand = [ + `npx nx generate @nx/node:library ${pieceName}`, + `--directory=pieces/${pieceType}`, + `--importPath=${packageName}`, + '--publishable', + '--buildable', + '--standaloneConfig', + '--strict', + '--unitTestRunner=none' + ].join(' ') console.log(chalk.blue(`🛠️ Executing nx command: ${nxGenerateCommand}`)); diff --git a/packages/cli/src/lib/commands/create-trigger.ts b/packages/cli/src/lib/commands/create-trigger.ts index b7e4dfdb4b..39c0351277 100644 --- a/packages/cli/src/lib/commands/create-trigger.ts +++ b/packages/cli/src/lib/commands/create-trigger.ts @@ -8,7 +8,7 @@ import { displayNameToCamelCase, displayNameToKebabCase, findPieceSourceDirector function createTriggerTemplate(displayName: string, description: string, technique: string) { const camelCase = displayNameToCamelCase(displayName) - let triggerTemplate: string = '' + let triggerTemplate = '' if (technique === 'polling') { triggerTemplate = ` import { createTrigger, TriggerStrategy, PiecePropValueSchema } from '@activepieces/pieces-framework';