Skip to content

Commit

Permalink
Add descriptions for dapr task properties (#23)
Browse files Browse the repository at this point in the history
* Add descriptions for dapr task properties.

* Add descriptions for daprd task properties.

* Add description for daprd-down task property.

* Update sample JPN localization file.
  • Loading branch information
philliphoff authored Feb 21, 2020
1 parent 4d30b64 commit b030a6f
Show file tree
Hide file tree
Showing 4 changed files with 136 additions and 46 deletions.
51 changes: 46 additions & 5 deletions i18n/jpn/package.i18n.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,48 @@
{
"vscode-dapr.applications.invoke-get.title": "(Japanese) Invoke (GET) application method",
"vscode-dapr.applications.invoke-post.title": "(Japanese) Invoke (POST) application method",
"vscode-dapr.applications.publish-message.title": "(Japanese) Publish message to application",
"vscode-dapr.tasks.scaffoldDaprTasks.title": "(Japanese) Scaffold Dapr Tasks",
"vscode-dapr.views.applications.name": "(Japanese) Applications"
"vscode-dapr.applications.invoke-get.title": "Invoke (GET) application method",
"vscode-dapr.applications.invoke-post.title": "Invoke (POST) application method",
"vscode-dapr.applications.publish-message.title": "Publish message to application",
"vscode-dapr.tasks.scaffoldDaprTasks.title": "Scaffold Dapr Tasks",
"vscode-dapr.views.applications.name": "Applications",

"vscode-dapr.tasks.dapr.properties.appId.description": "An ID for your application, used for service discovery.",
"vscode-dapr.tasks.dapr.properties.appPort.description": "The port your application is listening on.",
"vscode-dapr.tasks.dapr.properties.command.description": "The command and arguments used to start your application.",
"vscode-dapr.tasks.dapr.properties.cwd.description": "The directory in which to start Dapr.",
"vscode-dapr.tasks.dapr.properties.config.description": "The path to the Dapr configuration file.",
"vscode-dapr.tasks.dapr.properties.enableProfiling.description": "Whether to enable pprof profiling via an HTTP endpoint.",
"vscode-dapr.tasks.dapr.properties.grpcPort.description": "The gRPC port for Dapr to listen on.",
"vscode-dapr.tasks.dapr.properties.httpPort.description": "The HTTP port for Dapr to listen on.",
"vscode-dapr.tasks.dapr.properties.image.description": "The image to build the code in (<repository>/<image>).",
"vscode-dapr.tasks.dapr.properties.logLevel.description": "Sets the log verbosity.",
"vscode-dapr.tasks.dapr.properties.maxConcurrency.description": "Controls the concurrency level of the application.",
"vscode-dapr.tasks.dapr.properties.placementHost.description": "The host on which the placement service resides.",
"vscode-dapr.tasks.dapr.properties.profilePort.description": "The port for the profile server to listen on.",
"vscode-dapr.tasks.dapr.properties.protocol.description": "Tells Dapr to use HTTP or gRPC to talk to the application.",
"vscode-dapr.tasks.dapr.properties.redisHost.description": "The host on which the Redis service resides.",

"vscode-dapr.tasks.daprd.properties.allowedOrigins.description": "Allowed HTTP origins.",
"vscode-dapr.tasks.daprd.properties.alsoLogToStdError.description": "Whether to log to standard error as well as files.",
"vscode-dapr.tasks.daprd.properties.appId.description": "An ID for your application, used for service discovery.",
"vscode-dapr.tasks.daprd.properties.appPort.description": "The port the application is listening on.",
"vscode-dapr.tasks.daprd.properties.componentsPath.description": "Path for the components directory. (Standalone mode only.)",
"vscode-dapr.tasks.daprd.properties.config.description": "Path to the configuration file, or the name of a configuration object.",
"vscode-dapr.tasks.daprd.properties.controlPlaneAddress.description": "Address for the Dapr control plane.",
"vscode-dapr.tasks.daprd.properties.enableProfiling.description": "Whether to enable profiling.",
"vscode-dapr.tasks.daprd.properties.grpcPort.description": "The gRPC port for Dapr to listen on.",
"vscode-dapr.tasks.daprd.properties.httpPort.description": "The HTTP port for Dapr to listen on.",
"vscode-dapr.tasks.daprd.properties.logLevel.description": "Sets the log verbosity.",
"vscode-dapr.tasks.daprd.properties.logBacktraceAt.description": "Emit a stack trace when logging hits line <file>:<line>.",
"vscode-dapr.tasks.daprd.properties.logDir.description": "If set, write log files in this directory.",
"vscode-dapr.tasks.daprd.properties.maxConcurrency.description": "Controls the concurrency level when forwarding requests to user code.",
"vscode-dapr.tasks.daprd.properties.mode.description": "Runtime mode for Dapr.",
"vscode-dapr.tasks.daprd.properties.placementAddress.description": "Address for the Dapr placement service.",
"vscode-dapr.tasks.daprd.properties.profilePort.description": "The port for the profile server.",
"vscode-dapr.tasks.daprd.properties.protocol.description": "Protocol for the application.",
"vscode-dapr.tasks.daprd.properties.sentryAddress.description": "Address for the Sentry CA service",
"vscode-dapr.tasks.daprd.properties.stdErrThreshold.description": "Logs at or above this threshold go to stderr.",
"vscode-dapr.tasks.daprd.properties.vLogLevel.description": "Log level for V logs.",
"vscode-dapr.tasks.daprd.properties.vLogFilters.description": "Comma-separated list of <pattern>=<n> settings for file-filtered logging.",

"vscode-dapr.tasks.daprd-down.properties.appId.description": "An ID for your application, used for service discovery."
}
82 changes: 44 additions & 38 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,50 +97,50 @@
"properties": {
"appId": {
"type": "string",
"description": ""
"description": "%vscode-dapr.tasks.dapr.properties.appId.description%"
},
"appPort": {
"type": "integer",
"description": "",
"description": "%vscode-dapr.tasks.dapr.properties.appPort.description%",
"default": -1
},
"command": {
"type": "array",
"description": "",
"description": "%vscode-dapr.tasks.dapr.properties.command.description%",
"additionalItems": {
"type": "string"
}
},
"cwd": {
"type": "string",
"description": ""
"description": "%vscode-dapr.tasks.dapr.properties.cwd.description%"
},
"config": {
"type": "string",
"description": ""
"description": "%vscode-dapr.tasks.dapr.properties.config.description%"
},
"enableProfiling": {
"type": "boolean",
"description": "",
"description": "%vscode-dapr.tasks.dapr.properties.enableProfiling.description%",
"default": false
},
"grpcPort": {
"type": "integer",
"description": "",
"description": "%vscode-dapr.tasks.dapr.properties.grpcPort.description%",
"default": -1
},
"httpPort": {
"type": "integer",
"description": "",
"description": "%vscode-dapr.tasks.dapr.properties.httpPort.description%",
"default": -1
},
"image": {
"type": "string",
"description": ""
"description": "%vscode-dapr.tasks.dapr.properties.image.description%"
},
"logLevel": {
"type": "string",
"description": "",
"description": "%vscode-dapr.tasks.dapr.properties.logLevel.description%",
"enum": [
"debug",
"info",
Expand All @@ -153,21 +153,22 @@
},
"maxConcurrency": {
"type": "integer",
"description": ""
"description": "%vscode-dapr.tasks.dapr.properties.maxConcurrency.description%",
"default": -1
},
"placmentHost": {
"type": "string",
"description": "",
"description": "%vscode-dapr.tasks.dapr.properties.placementHost.description%",
"default": "localhost"
},
"profilePort": {
"type": "integer",
"description": "",
"description": "%vscode-dapr.tasks.dapr.properties.profilePort.description%",
"default": -1
},
"protocol": {
"type": "string",
"description": "",
"description": "%vscode-dapr.tasks.dapr.properties.protocol.description%",
"enum": [
"http",
"grpc"
Expand All @@ -176,7 +177,7 @@
},
"redisHost": {
"type": "string",
"description": "",
"description": "%vscode-dapr.tasks.dapr.properties.redisHost.description%",
"default": "localhost"
}
},
Expand All @@ -189,52 +190,52 @@
"properties": {
"allowedOrigins": {
"type": "string",
"description": "",
"description": "%vscode-dapr.tasks.daprd.properties.allowedOrigins.description%",
"default": "*"
},
"alsoLogToStdError": {
"type": "boolean",
"description": ""
"description": "%vscode-dapr.tasks.daprd.properties.alsoLogToStdError.description%"
},
"appId": {
"type": "string",
"description": ""
"description": "%vscode-dapr.tasks.daprd.properties.appId.description%"
},
"appPort": {
"type": "integer",
"description": ""
"description": "%vscode-dapr.tasks.daprd.properties.appPort.description%"
},
"componentsPath": {
"type": "string",
"description": "",
"description": "%vscode-dapr.tasks.daprd.properties.componentsPath.description%",
"default": "./components"
},
"config": {
"type": "string",
"description": ""
"description": "%vscode-dapr.tasks.daprd.properties.config.description%"
},
"controlPlaneAddress": {
"type": "string",
"description": ""
"description": "%vscode-dapr.tasks.daprd.properties.controlPlaneAddress.description%"
},
"enableProfiling": {
"type": "boolean",
"description": "",
"description": "%vscode-dapr.tasks.daprd.properties.enableProfiling.description%",
"default": false
},
"grpcPort": {
"type": "integer",
"description": "",
"description": "%vscode-dapr.tasks.daprd.properties.grpcPort.description%",
"default": 50001
},
"httpPort": {
"type": "integer",
"description": "",
"description": "%vscode-dapr.tasks.daprd.properties.httpPort.description%",
"default": 3500
},
"logLevel": {
"type": "string",
"description": "",
"description": "%vscode-dapr.tasks.daprd.properties.logLevel.description%",
"enum": [
"debug",
"info",
Expand All @@ -246,20 +247,21 @@
"default": "info"
},
"logBacktraceAt": {
"type": "integer",
"description": ""
"type": "string",
"description": "%vscode-dapr.tasks.daprd.properties.logBacktraceAt.description%"
},
"logDir": {
"type": "string",
"description": ""
"description": "%vscode-dapr.tasks.daprd.properties.logDir.description%"
},
"maxConcurrency": {
"type": "integer",
"description": ""
"description": "%vscode-dapr.tasks.daprd.properties.maxConcurrency.description%",
"default": -1
},
"mode": {
"type": "string",
"description": "",
"description": "%vscode-dapr.tasks.daprd.properties.mode.description%",
"enum": [
"standalone",
"kubernetes"
Expand All @@ -268,25 +270,29 @@
},
"placementAddress": {
"type": "string",
"description": ""
"description": "%vscode-dapr.tasks.daprd.properties.placementAddress.description%"
},
"profilePort": {
"type": "integer",
"description": "",
"description": "%vscode-dapr.tasks.daprd.properties.profilePort.description%",
"default": 7777
},
"protocol": {
"type": "string",
"description": "",
"description": "%vscode-dapr.tasks.daprd.properties.protocol.description%",
"enum": [
"grpc",
"http"
],
"default": "http"
},
"sentryAddress": {
"type": "string",
"description": "%vscode-dapr.tasks.daprd.properties.sentryAddress.description%"
},
"stdErrThreshold": {
"type": "string",
"description": "",
"description": "%vscode-dapr.tasks.daprd.properties.stdErrThreshold.description%",
"enum": [
"debug",
"info",
Expand All @@ -298,7 +304,7 @@
},
"vLogLevel": {
"type": "string",
"description": "",
"description": "%vscode-dapr.tasks.daprd.properties.vLogLevel.description%",
"enum": [
"debug",
"info",
Expand All @@ -310,7 +316,7 @@
},
"vLogFilters": {
"type": "string",
"description": ""
"description": "%vscode-dapr.tasks.daprd.properties.vLogFilters.description%"
}
}
},
Expand All @@ -319,7 +325,7 @@
"properties": {
"appId": {
"type": "string",
"description": ""
"description": "%vscode-dapr.tasks.daprd-down.properties.appId.description%"
}
},
"required": [
Expand Down
43 changes: 42 additions & 1 deletion package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,46 @@
"vscode-dapr.applications.invoke-post.title": "Invoke (POST) application method",
"vscode-dapr.applications.publish-message.title": "Publish message to application",
"vscode-dapr.tasks.scaffoldDaprTasks.title": "Scaffold Dapr Tasks",
"vscode-dapr.views.applications.name": "Applications"
"vscode-dapr.views.applications.name": "Applications",

"vscode-dapr.tasks.dapr.properties.appId.description": "An ID for your application, used for service discovery.",
"vscode-dapr.tasks.dapr.properties.appPort.description": "The port your application is listening on.",
"vscode-dapr.tasks.dapr.properties.command.description": "The command and arguments used to start your application.",
"vscode-dapr.tasks.dapr.properties.cwd.description": "The directory in which to start Dapr.",
"vscode-dapr.tasks.dapr.properties.config.description": "The path to the Dapr configuration file.",
"vscode-dapr.tasks.dapr.properties.enableProfiling.description": "Whether to enable pprof profiling via an HTTP endpoint.",
"vscode-dapr.tasks.dapr.properties.grpcPort.description": "The gRPC port for Dapr to listen on.",
"vscode-dapr.tasks.dapr.properties.httpPort.description": "The HTTP port for Dapr to listen on.",
"vscode-dapr.tasks.dapr.properties.image.description": "The image to build the code in (<repository>/<image>).",
"vscode-dapr.tasks.dapr.properties.logLevel.description": "Sets the log verbosity.",
"vscode-dapr.tasks.dapr.properties.maxConcurrency.description": "Controls the concurrency level of the application.",
"vscode-dapr.tasks.dapr.properties.placementHost.description": "The host on which the placement service resides.",
"vscode-dapr.tasks.dapr.properties.profilePort.description": "The port for the profile server to listen on.",
"vscode-dapr.tasks.dapr.properties.protocol.description": "Tells Dapr to use HTTP or gRPC to talk to the application.",
"vscode-dapr.tasks.dapr.properties.redisHost.description": "The host on which the Redis service resides.",

"vscode-dapr.tasks.daprd.properties.allowedOrigins.description": "Allowed HTTP origins.",
"vscode-dapr.tasks.daprd.properties.alsoLogToStdError.description": "Whether to log to standard error as well as files.",
"vscode-dapr.tasks.daprd.properties.appId.description": "An ID for your application, used for service discovery.",
"vscode-dapr.tasks.daprd.properties.appPort.description": "The port the application is listening on.",
"vscode-dapr.tasks.daprd.properties.componentsPath.description": "Path for the components directory. (Standalone mode only.)",
"vscode-dapr.tasks.daprd.properties.config.description": "Path to the configuration file, or the name of a configuration object.",
"vscode-dapr.tasks.daprd.properties.controlPlaneAddress.description": "Address for the Dapr control plane.",
"vscode-dapr.tasks.daprd.properties.enableProfiling.description": "Whether to enable profiling.",
"vscode-dapr.tasks.daprd.properties.grpcPort.description": "The gRPC port for Dapr to listen on.",
"vscode-dapr.tasks.daprd.properties.httpPort.description": "The HTTP port for Dapr to listen on.",
"vscode-dapr.tasks.daprd.properties.logLevel.description": "Sets the log verbosity.",
"vscode-dapr.tasks.daprd.properties.logBacktraceAt.description": "Emit a stack trace when logging hits line <file>:<line>.",
"vscode-dapr.tasks.daprd.properties.logDir.description": "If set, write log files in this directory.",
"vscode-dapr.tasks.daprd.properties.maxConcurrency.description": "Controls the concurrency level when forwarding requests to user code.",
"vscode-dapr.tasks.daprd.properties.mode.description": "Runtime mode for Dapr.",
"vscode-dapr.tasks.daprd.properties.placementAddress.description": "Address for the Dapr placement service.",
"vscode-dapr.tasks.daprd.properties.profilePort.description": "The port for the profile server.",
"vscode-dapr.tasks.daprd.properties.protocol.description": "Protocol for the application.",
"vscode-dapr.tasks.daprd.properties.sentryAddress.description": "Address for the Sentry CA service",
"vscode-dapr.tasks.daprd.properties.stdErrThreshold.description": "Logs at or above this threshold go to stderr.",
"vscode-dapr.tasks.daprd.properties.vLogLevel.description": "Log level for V logs.",
"vscode-dapr.tasks.daprd.properties.vLogFilters.description": "Comma-separated list of <pattern>=<n> settings for file-filtered logging.",

"vscode-dapr.tasks.daprd-down.properties.appId.description": "An ID for your application, used for service discovery."
}
6 changes: 4 additions & 2 deletions src/tasks/daprdCommandTaskProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export interface DaprdTaskDefinition extends TaskDefinition {
placementAddress?: string;
profilePort?: number;
protocol?: 'grpc' | 'http';
sentryAddress?: string;
stdErrThreshold?: DaprdLogLevel;
vLogLevel?: DaprdLogLevel;
vLogFilters?: string; // TODO: Allow more structured filters.
Expand Down Expand Up @@ -62,9 +63,10 @@ export default class DaprdCommandTaskProvider extends CommandTaskProvider {
.withNamedArg('--placement-address', daprDefinition.placementAddress || "localhost:50005" /* NOTE: The placement address is actually required for daprd. */)
.withNamedArg('--profile-port', daprDefinition.profilePort)
.withNamedArg('--protocol', daprDefinition.protocol)
.withNamedArg('--sentry-address', daprDefinition.sentryAddress)
.withNamedArg('--stderrthreshold', daprDefinition.stdErrThreshold)
.withNamedArg('-v', daprDefinition.vLogLevel)
.withNamedArg('-vmodule', daprDefinition.vLogFilters)
.withNamedArg('--v', daprDefinition.vLogLevel)
.withNamedArg('--vmodule', daprDefinition.vLogFilters)
.build();

return callback(command, { cwd: definition.cwd });
Expand Down

0 comments on commit b030a6f

Please sign in to comment.