Skip to content

Commit 3097c41

Browse files
committed
(GH-732) Add PDK new task to the command palette
1 parent 73d0bbb commit 3097c41

File tree

3 files changed

+24
-4
lines changed

3 files changed

+24
-4
lines changed

package.json

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,11 @@
165165
"category": "Puppet",
166166
"title": "PDK New Defined type"
167167
},
168+
{
169+
"command": "extension.pdkNewFact",
170+
"category": "Puppet",
171+
"title": "PDK New Fact"
172+
},
168173
{
169174
"command": "extension.puppetResource",
170175
"category": "Puppet",
@@ -262,6 +267,9 @@
262267
{
263268
"command": "extension.pdkNewDefinedType"
264269
},
270+
{
271+
"command": "extension.pdkNewFact"
272+
},
265273
{
266274
"command": "extension.puppetResource",
267275
"when": "editorLangId == 'puppet'"
@@ -292,15 +300,20 @@
292300
"command": "extension.pdkNewDefinedType",
293301
"group": "pdk@4"
294302
},
303+
{
304+
"when": "editorLangId == 'puppet'",
305+
"command": "extension.pdkNewFact",
306+
"group": "pdk@5"
307+
},
295308
{
296309
"when": "editorLangId == 'puppet' ",
297310
"command": "extension.pdkValidate",
298-
"group": "pdk@5"
311+
"group": "pdk@6"
299312
},
300313
{
301314
"when": "editorLangId == 'puppet'",
302315
"command": "extension.pdkTestUnit",
303-
"group": "pdk@6"
316+
"group": "pdk@7"
304317
},
305318
{
306319
"when": "editorLangId == 'puppet'",
@@ -331,14 +344,19 @@
331344
},
332345
{
333346
"when": "editorLangId == 'puppet'",
334-
"command": "extension.pdkValidate",
347+
"command": "extension.pdkNewFact",
335348
"group": "pdk@4"
336349
},
337350
{
338351
"when": "editorLangId == 'puppet'",
339-
"command": "extension.pdkTestUnit",
352+
"command": "extension.pdkValidate",
340353
"group": "pdk@5"
341354
},
355+
{
356+
"when": "editorLangId == 'puppet'",
357+
"command": "extension.pdkTestUnit",
358+
"group": "pdk@6"
359+
},
342360
{
343361
"when": "editorLangId == 'puppet'",
344362
"command": "puppet.puppetShowNodeGraphToSide",

src/feature/PDKFeature.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ export class PDKFeature implements IFeature {
4747
{ id: 'extension.pdkNewClass', request: 'pdk new class', type: 'Puppet class' },
4848
{ id: 'extension.pdkNewTask', request: 'pdk new task', type: 'Bolt task' },
4949
{ id: 'extension.pdkNewDefinedType', request: 'pdk new defined_type', type: 'Puppet defined_type' },
50+
{ id: 'extension.pdkNewFact', request: 'pdk new fact', type: 'Puppet Fact' },
5051
].forEach((command) => {
5152
context.subscriptions.push(
5253
vscode.commands.registerCommand(command.id, async () => {

src/messages.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ export class PDKCommandStrings {
7979
static PdkNewModuleCommandId = 'extension.pdkNewModule';
8080
static PdkNewClassCommandId = 'extension.pdkNewClass';
8181
static PdkNewTaskCommandId = 'extension.pdkNewTask';
82+
static PdkNewFactCommandId = 'extension.pdkNewFact';
8283
static PdkNewDefinedTypeCommandId = 'extension.pdkNewDefinedType';
8384
static PdkValidateCommandId = 'extension.pdkValidate';
8485
static PdkTestUnitCommandId = 'extension.pdkTestUnit';

0 commit comments

Comments
 (0)