Repository navigation
Expand file tree
/
Copy pathpackage.json
More file actions
203 lines (203 loc) · 7.57 KB
/
Copy pathpackage.json
File metadata and controls
203 lines (203 loc) · 7.57 KB
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
{
"name": "dalec-vscode-tools",
"displayName": "DALEC VSCode Tools",
"description": "dalec vscode extension for developers",
"version": "0.0.5",
"publisher": "ms-kubernetes-tools",
"icon": "resources/dalec.png",
"engines": {
"vscode": "^1.110.0"
},
"categories": [
"Other"
],
"extensionDependencies": [
"redhat.vscode-yaml"
],
"activationEvents": [
"onDebug:dalec-buildx",
"onLanguage:yaml",
"workspaceContains:**/*.yaml",
"workspaceContains:**/*.yml"
],
"preview": true,
"main": "./dist/extension.js",
"contributes": {
"breakpoints": [
{
"language": "yaml"
}
],
"commands": [
{
"command": "dalec-vscode-tools.buildCurrentSpec",
"title": "Dalec: Build Current Spec"
},
{
"command": "dalec-vscode-tools.debugCurrentSpec",
"title": "Dalec: Debug Current Spec"
},
{
"command": "dalec-vscode-tools.buildSpecificTarget",
"title": "Dalec: Build Specific Target"
},
{
"command": "dalec-vscode-tools.rerunLastAction",
"title": "Dalec: Rerun Last Action"
},
{
"command": "dalec-vscode-tools.createNewSpec",
"title": "Dalec: New Spec"
}
],
"snippets": [
{
"language": "yaml",
"path": "./snippets/dalec.code-snippets"
}
],
"menus": {
"editor/context": [
{
"command": "dalec-vscode-tools.buildCurrentSpec",
"when": "resourceLangId == yaml",
"group": "navigation"
},
{
"command": "dalec-vscode-tools.debugCurrentSpec",
"when": "resourceLangId == yaml",
"group": "navigation"
}
],
"explorer/context": [
{
"command": "dalec-vscode-tools.buildCurrentSpec",
"when": "resourceLangId == yaml",
"group": "navigation"
},
{
"command": "dalec-vscode-tools.debugCurrentSpec",
"when": "resourceLangId == yaml",
"group": "navigation"
}
]
},
"configuration": {
"title": "Dalec Spec",
"properties": {
"dalec-spec.buildxCommand": {
"type": "string",
"default": "docker buildx",
"description": "Command used to invoke buildx (e.g. 'docker buildx' or '/path/to/buildx')."
},
"dalec-spec.syntaxDirectives": {
"type": "array",
"items": {
"type": "string"
},
"default": [
"ghcr.io/project-dalec/dalec/frontend:latest"
],
"markdownDescription": "List of accepted Dalec frontend syntax directives. Files with `# syntax=<directive>` matching any of these values will be treated as valid Dalec specs.\n\n**Wildcard support:** Only suffix wildcards using `*` are supported. The `*` must be at the end of the pattern.\n\n**Examples:**\n- `ghcr.io/org/image:latest` — matches exactly `ghcr.io/org/image:latest`\n- `ghcr.io/org/image:*` — matches `ghcr.io/org/image:latest`, `ghcr.io/org/image:v1.0`, etc.\n- `my-registry.io/dalec:*` — matches any tag for `my-registry.io/dalec`\n\n**Not supported:**\n- `ghcr.io/*/image:latest` (wildcards in the middle)\n- `*.io/org/image:latest` (wildcards at the start)\n- `ghcr.io/org/image:v1.*` (wildcards not at the end)"
},
"dalec-spec.allowLegacyDirectives": {
"type": "boolean",
"default": true,
"markdownDescription": "When enabled, also accept legacy/built-in directives (`ghcr.io/project-dalec/dalec/frontend:*`, `ghcr.io/azure/dalec/frontend:*`, and any image containing 'dalec'). Set to `false` to only accept directives listed in `syntaxDirectives`.\n\n**Warning:** If this is `false` and `syntaxDirectives` is empty, no Dalec specs will be recognized."
},
"dalec-spec.outputBaseDirectory": {
"type": "string",
"default": ".dalec-output",
"markdownDescription": "Base directory for build outputs. Target-specific subdirectories will be created within this directory (e.g., `.dalec-output/rpm/`, `.dalec-output/deb/`). This is used when output flags reference the `${baseDir}` variable."
},
"dalec-spec.defaultOutputFlags": {
"type": "object",
"default": {
"container": "",
"rpm": "type=local,dest=${baseDir}/rpm",
"deb": "type=local,dest=${baseDir}/deb"
},
"markdownDescription": "Default `--output` flags for different target types. The key can be a target name pattern (e.g., 'rpm', 'deb', 'container') and the value is the output flag content (without `--output`).\n\n**Variable Substitution:**\n- `${baseDir}` — Replaced with the value of `outputBaseDirectory` setting\n\n**Examples:**\n- `\"container\": \"\"` — No default output for container targets (uses `-t` for tagging)\n- `\"rpm\": \"type=local,dest=${baseDir}/rpm\"` — Outputs rpm artifacts to `.dalec-output/rpm/`\n- `\"deb\": \"type=local,dest=${baseDir}/deb\"` — Outputs deb artifacts to `.dalec-output/deb/`\n- `\"oci\": \"type=oci,dest=${baseDir}/oci\"` — Outputs OCI image to directory\n\n**Note:** When an output flag is specified, `-t` (tag) will not be automatically added. Leave empty or unset to use default tagging behavior for container images.",
"additionalProperties": {
"type": "string"
}
}
}
},
"debuggers": [
{
"type": "dalec-buildx",
"label": "Dalec Buildx (docker buildx dap)",
"configurationAttributes": {
"launch": {
"required": [
"target"
],
"properties": {
"target": {
"type": "string",
"description": "Name of the dalec target to debug",
"default": ""
},
"specFile": {
"type": "string",
"description": "Path to the dalec spec file (defaults to active editor)",
"default": ""
},
"context": {
"type": "string",
"description": "Build context directory (defaults to workspace root)",
"default": ""
},
"buildArgs": {
"type": "object",
"description": "Additional --build-arg values keyed by arg name",
"default": {}
}
}
}
},
"initialConfigurations": [
{
"name": "Dalec: Buildx Debug Current Spec",
"type": "dalec-buildx",
"request": "launch",
"target": "example",
"specFile": "${file}"
}
]
}
]
},
"scripts": {
"vscode:prepublish": "npm run package",
"compile": "webpack",
"watch": "webpack --watch",
"package": "webpack --mode production --devtool hidden-source-map",
"compile-tests": "tsc -p . --outDir out",
"watch-tests": "tsc -p . -w --outDir out",
"pretest": "npm run compile-tests && npm run compile && npm run lint",
"lint": "eslint src",
"test": "vscode-test"
},
"devDependencies": {
"@types/mocha": "^10.0.10",
"@types/node": "26.x",
"@types/vscode": "^1.115.0",
"@vscode/test-cli": "^0.0.15",
"@vscode/test-electron": "^3.0.0",
"eslint": "^10.6.0",
"ts-loader": "^9.6.2",
"typescript": "^6.0.3",
"typescript-eslint": "^8.63.0",
"webpack": "^5.108.4",
"webpack-cli": "^7.2.1"
},
"dependencies": {
"yaml": "^2.9.0"
},
"repository": {
"type": "git",
"url": "https://github.com/project-dalec/dalec-vscode-extension"
}
}