From c29bfcd9d49d398ab13fc062a8b563b627f65a14 Mon Sep 17 00:00:00 2001 From: Li Tan Date: Thu, 28 Dec 2023 07:27:18 -0800 Subject: [PATCH 1/3] updated dapr task for resources-path --- src/tasks/daprCommandTaskProvider.ts | 3 ++- src/tasks/daprdCommandTaskProvider.ts | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/tasks/daprCommandTaskProvider.ts b/src/tasks/daprCommandTaskProvider.ts index c6f5644..8e979de 100644 --- a/src/tasks/daprCommandTaskProvider.ts +++ b/src/tasks/daprCommandTaskProvider.ts @@ -43,7 +43,7 @@ export interface DaprTaskDefinition extends TaskDefinition { placementHostAddress?: string; profilePort?: number; resourcesPath?: string; - resourcesPaths?: string[]; +resourcesPaths?: string[]; runFile?: string; type: 'dapr'; unixDomainSocket?: string; @@ -122,6 +122,7 @@ function createCommandLineBuilder(daprPathProvider: () => string, daprDefinition .withNamedArg('--app-protocol', daprDefinition.appProtocol) .withNamedArg('--app-ssl', daprDefinition.appSsl, { assignValue: true }) .withNamedArg('--components-path', daprDefinition.componentsPath) + .withNamedArg('--resources-path', daprDefinition.resourcesPath) .withNamedArg('--config', daprDefinition.config) .withNamedArg('--dapr-grpc-port', daprDefinition.grpcPort) .withNamedArg('--dapr-http-max-request-size', daprDefinition.httpMaxRequestSize) diff --git a/src/tasks/daprdCommandTaskProvider.ts b/src/tasks/daprdCommandTaskProvider.ts index 76ea78c..d4dd6c4 100644 --- a/src/tasks/daprdCommandTaskProvider.ts +++ b/src/tasks/daprdCommandTaskProvider.ts @@ -26,6 +26,7 @@ export interface DaprdTaskDefinition extends TaskDefinition { appProtocol?: 'grpc' | 'http'; appSsl?: boolean; args?: string[]; + command?: string[]; componentsPath?: string; config?: string; controlPlaneAddress?: string; @@ -50,7 +51,7 @@ export interface DaprdTaskDefinition extends TaskDefinition { profilePort?: number; publicPort?: number; resourcesPath?: string; - resourcesPaths?: string[]; +resourcesPaths?: string[]; sentryAddress?: string; type: 'daprd'; unixDomainSocket?: string; @@ -109,10 +110,11 @@ export default class DaprdCommandTaskProvider extends CommandTaskProvider { .withNamedArg('--placement-host-address', daprDefinition.placementHostAddress ?? `${process.env.DAPR_PLACEMENT_HOST_ADDRESS ?? 'localhost'}:${environmentProvider.isWindows ? 6050 : 50005}` /* NOTE: The placement address is actually required for daprd. */) .withNamedArg('--profile-port', daprDefinition.profilePort) .withNamedArg('--resources-path', daprDefinition.resourcesPath) - .withArrayArgs('--resources-path', daprDefinition.resourcesPaths) +.withArrayArgs('--resources-path', daprDefinition.resourcesPaths) .withNamedArg('--sentry-address', daprDefinition.sentryAddress) .withNamedArg('--unix-domain-socket', daprDefinition.unixDomainSocket) .withArgs(daprDefinition.args) + .withArgs(daprDefinition.command) .build(); await callback(command, { cwd: definition.cwd }); From ffff0a1cc65f16795882cbc3c599fb62e6885dcc Mon Sep 17 00:00:00 2001 From: Li Tan Date: Thu, 28 Dec 2023 07:30:53 -0800 Subject: [PATCH 2/3] fixed linting --- src/tasks/daprCommandTaskProvider.ts | 2 +- src/tasks/daprdCommandTaskProvider.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tasks/daprCommandTaskProvider.ts b/src/tasks/daprCommandTaskProvider.ts index 8e979de..81db46a 100644 --- a/src/tasks/daprCommandTaskProvider.ts +++ b/src/tasks/daprCommandTaskProvider.ts @@ -43,7 +43,7 @@ export interface DaprTaskDefinition extends TaskDefinition { placementHostAddress?: string; profilePort?: number; resourcesPath?: string; -resourcesPaths?: string[]; + resourcesPaths?: string[]; runFile?: string; type: 'dapr'; unixDomainSocket?: string; diff --git a/src/tasks/daprdCommandTaskProvider.ts b/src/tasks/daprdCommandTaskProvider.ts index d4dd6c4..d9c6843 100644 --- a/src/tasks/daprdCommandTaskProvider.ts +++ b/src/tasks/daprdCommandTaskProvider.ts @@ -51,7 +51,7 @@ export interface DaprdTaskDefinition extends TaskDefinition { profilePort?: number; publicPort?: number; resourcesPath?: string; -resourcesPaths?: string[]; + resourcesPaths?: string[]; sentryAddress?: string; type: 'daprd'; unixDomainSocket?: string; @@ -110,7 +110,7 @@ export default class DaprdCommandTaskProvider extends CommandTaskProvider { .withNamedArg('--placement-host-address', daprDefinition.placementHostAddress ?? `${process.env.DAPR_PLACEMENT_HOST_ADDRESS ?? 'localhost'}:${environmentProvider.isWindows ? 6050 : 50005}` /* NOTE: The placement address is actually required for daprd. */) .withNamedArg('--profile-port', daprDefinition.profilePort) .withNamedArg('--resources-path', daprDefinition.resourcesPath) -.withArrayArgs('--resources-path', daprDefinition.resourcesPaths) + .withArrayArgs('--resources-path', daprDefinition.resourcesPaths) .withNamedArg('--sentry-address', daprDefinition.sentryAddress) .withNamedArg('--unix-domain-socket', daprDefinition.unixDomainSocket) .withArgs(daprDefinition.args) From f7dce070ed4f6387d667b6ba1448fe69e6b712e9 Mon Sep 17 00:00:00 2001 From: Li Tan Date: Thu, 28 Dec 2023 08:13:51 -0800 Subject: [PATCH 3/3] updated command description --- package.json | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/package.json b/package.json index 183f5d7..6c953ba 100644 --- a/package.json +++ b/package.json @@ -555,6 +555,13 @@ "type": "string" } }, + "command": { + "type": "array", + "description": "%vscode-dapr.tasks.daprd.properties.command.description%", + "additionalItems": { + "type": "string" + } + }, "componentsPath": { "type": "string", "description": "%vscode-dapr.tasks.daprd.properties.componentsPath.description%",