-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.json
204 lines (204 loc) · 5.85 KB
/
config.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
{
"name": "TextEditor",
"viewName": "Text Editor",
"type": "executer",
"main": "app.js",
"execProgram": "node",
"version": "1.7.0",
"description": "Basic create, read, edit, search functions for text files",
"imgUrl": "logo.png",
"category": [
"Basic Tools"
],
"keywords": [
"text",
"file",
"vault",
"search",
"replace",
"line",
"regexp",
"write",
"append"
],
"methods": [
{
"name": "createFile",
"viewName": "Create New File",
"params": [
{
"name": "PATH",
"viewName": "File Path",
"type": "string",
"required": true,
"description": "Path and filename for the new file",
"placeholder": "scripts/export.sh"
},
{
"name": "CONTENT",
"viewName": "File Content",
"type": "text",
"required": true,
"description": "The initial contents of the file",
"placeholder": "#!/bin/bash\ntar -czvf logs-$(date +%F).tgz /var/log/*.log"
},
{
"name": "overwrite",
"viewName": "Overwrite Existing",
"description": "If enabled, any existing file at the File Path will be overwritten.",
"type": "boolean",
"default": true
},
{
"name": "return",
"viewName": "Return File Content",
"type": "boolean",
"default": false,
"description": "If enabled, after writing the file, the contents are also returned to Final Result."
}
]
},
{
"name": "createVaultFile",
"viewName": "Create File From Vault",
"params": [
{
"name": "PATH",
"viewName": "File Path",
"type": "string",
"required": true,
"description": "Path and filename for the new file",
"placeholder": "secrets/gcp_creds.json"
},
{
"name": "CONTENT",
"viewName": "File Content",
"type": "vault",
"required": true,
"description": "The Kaholo vault item continaing the contents for the file"
},
{
"name": "overwrite",
"viewName": "Overwrite Existing",
"description": "If enabled, any existing file at the File Path will be overwritten.",
"type": "boolean",
"default": true
}
]
},
{
"name": "appendToFile",
"viewName": "Append To File",
"params": [
{
"name": "PATH",
"viewName": "File Path",
"type": "string",
"required": true,
"description": "Path and filename for file to be appended",
"placeholder": "logs/build_results.log"
},
{
"name": "CONTENT",
"viewName": "Content",
"type": "text",
"required": true,
"description": "The text to append to the file",
"placeholder": "project kaholo-enterprise built successfully"
},
{
"name": "dontCreate",
"viewName": "Don't Create",
"type": "boolean",
"description": "If enabled, append only if file at File Path already exists"
},
{
"name": "return",
"viewName": "Return New Content",
"type": "boolean",
"default": "false",
"description": "If enabled, after appending the entire contents of the file are returned to Final Result."
}
]
},
{
"name": "searchInFile",
"viewName": "Search In File",
"params": [
{
"name": "PATH",
"viewName": "File Path",
"type": "string",
"required": true,
"description": "Path and filename for file to search",
"placeholder": "project/log/build.log"
},
{
"name": "REGEX",
"viewName": "RegExp",
"type": "string",
"description": "Regular expressions are patterns used to match character combinations in strings.",
"placeholder": "^.*ERROR.*$"
},
{
"name": "return",
"viewName": "Return Matches",
"type": "boolean",
"default": false,
"description": "If enabled, all matches are returned. Otherwise only found: true/false"
}
]
},
{
"name": "replaceText",
"viewName": "Replace Text In File",
"params": [
{
"name": "PATH",
"viewName": "File Path",
"type": "string",
"required": true,
"description": "Path and filename for the file to have replacements made",
"placeholder": "scripts/export.sh"
},
{
"name": "REGEX",
"viewName": "Search RegExp Expression",
"type": "string",
"required": true,
"description": "Regular expression used to match strings in the file",
"placeholder": "[eE][rR][rR][oO][rR]"
},
{
"name": "REPLACE",
"viewName": "Replace Value",
"type": "text",
"required": false,
"description": "The string to replace those matching the Search RegExp Expression",
"placeholder": "(Leave undefined to simply delete matches)"
},
{
"name": "return",
"viewName": "Return New Content",
"type": "boolean",
"default": false,
"description": "If enabled, after replacing the entire contents of the file are returned to Final Result."
}
]
},
{
"name": "getFileContent",
"viewName": "Read File Content",
"params": [
{
"name": "PATH",
"viewName": "File Path",
"type": "string",
"required": true,
"description": "Path and filename for the file to read",
"placeholder": "scripts/export.sh"
}
]
}
]
}