Repository navigation
Expand file tree
/
Copy pathpackage.json
More file actions
324 lines (324 loc) · 9.04 KB
/
Copy pathpackage.json
File metadata and controls
324 lines (324 loc) · 9.04 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
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
{
"name": "envify",
"displayName": "Envify",
"description": "Convert .env to JSON, YAML, shell, docker-compose and Kubernetes — plus .env syntax highlighting, linting, ${VAR} autocomplete, .env file comparison, .env.example sync and formatting.",
"version": "1.5.0",
"publisher": "pawaretdev",
"engines": {
"vscode": "^1.80.0"
},
"categories": [
"Programming Languages",
"Formatters",
"Linters",
"Other"
],
"keywords": [
"env",
"dotenv",
"json",
"yaml",
"convert",
"environment",
"variables",
"env.example",
"compare",
"diff",
"docker-compose",
"kubernetes",
"envify"
],
"icon": "images/icon.png",
"repository": {
"type": "git",
"url": "https://github.com/pawaretdev/envify"
},
"license": "MIT",
"activationEvents": [
"onLanguage:dotenv",
"onStartupFinished"
],
"main": "./out/extension.js",
"contributes": {
"languages": [
{
"id": "dotenv",
"aliases": [
"dotenv",
".env"
],
"filenames": [
".env"
],
"filenamePatterns": [
".env.*",
"*.env"
],
"configuration": "./language-configuration.json"
}
],
"grammars": [
{
"language": "dotenv",
"scopeName": "source.dotenv",
"path": "./syntaxes/dotenv.tmLanguage.json"
}
],
"snippets": [
{
"language": "dotenv",
"path": "./snippets/dotenv.json"
}
],
"commands": [
{
"command": "envify.envToJson",
"title": "Convert .env to JSON",
"category": "Envify"
},
{
"command": "envify.jsonToEnv",
"title": "Convert JSON to .env",
"category": "Envify"
},
{
"command": "envify.envToJsonNewFile",
"title": "Convert .env to JSON (New File)",
"category": "Envify"
},
{
"command": "envify.jsonToEnvNewFile",
"title": "Convert JSON to .env (New File)",
"category": "Envify"
},
{
"command": "envify.envToFormat",
"title": "Convert .env to… (YAML, Shell, docker-compose, Kubernetes)",
"category": "Envify"
},
{
"command": "envify.copyAsJson",
"title": "Copy .env as JSON",
"category": "Envify"
},
{
"command": "envify.copyAsEnv",
"title": "Copy JSON as .env",
"category": "Envify"
},
{
"command": "envify.formatDocument",
"title": "Format .env Document",
"category": "Envify"
},
{
"command": "envify.generateExample",
"title": "Generate .env.example",
"category": "Envify"
},
{
"command": "envify.compareWithExample",
"title": "Compare with .env.example",
"category": "Envify"
},
{
"command": "envify.compareEnvFiles",
"title": "Compare .env Files…",
"category": "Envify"
}
],
"submenus": [
{
"id": "envify.editorSubmenu",
"label": "Envify"
}
],
"menus": {
"editor/context": [
{
"submenu": "envify.editorSubmenu",
"group": "envify"
}
],
"envify.editorSubmenu": [
{
"command": "envify.envToJson",
"group": "1_convert@1"
},
{
"command": "envify.envToJsonNewFile",
"group": "1_convert@2"
},
{
"command": "envify.jsonToEnv",
"group": "1_convert@3"
},
{
"command": "envify.jsonToEnvNewFile",
"group": "1_convert@4"
},
{
"command": "envify.envToFormat",
"group": "1_convert@5"
},
{
"command": "envify.copyAsJson",
"group": "2_copy@1"
},
{
"command": "envify.copyAsEnv",
"group": "2_copy@2"
},
{
"command": "envify.generateExample",
"group": "3_example@1"
},
{
"command": "envify.compareWithExample",
"group": "3_example@2"
},
{
"command": "envify.compareEnvFiles",
"group": "3_example@3"
},
{
"command": "envify.formatDocument",
"group": "4_format@1"
}
],
"explorer/context": [
{
"command": "envify.generateExample",
"group": "envify@1",
"when": "resourceFilename =~ /\\.env/"
},
{
"command": "envify.compareWithExample",
"group": "envify@2",
"when": "resourceFilename =~ /\\.env/"
},
{
"command": "envify.compareEnvFiles",
"group": "envify@3",
"when": "resourceFilename =~ /\\.env/"
}
]
},
"keybindings": [
{
"command": "envify.envToJson",
"key": "ctrl+shift+j",
"mac": "cmd+shift+j",
"when": "editorTextFocus"
},
{
"command": "envify.jsonToEnv",
"key": "ctrl+alt+e",
"mac": "cmd+alt+e",
"when": "editorTextFocus"
},
{
"command": "envify.formatDocument",
"key": "shift+alt+f",
"mac": "shift+alt+f",
"when": "editorTextFocus && (editorLangId == dotenv || resourceFilename =~ /\\.env/)"
}
],
"configuration": {
"title": "Envify",
"properties": {
"envify.json.indent": {
"type": "number",
"default": 2,
"minimum": 0,
"maximum": 8,
"description": "Indent size for JSON output."
},
"envify.json.inferTypes": {
"type": "boolean",
"default": false,
"description": "When converting .env to JSON, turn unquoted true/false/null and numbers into native JSON types. Quoted values always stay strings."
},
"envify.json.sortKeys": {
"type": "boolean",
"default": false,
"description": "Sort keys alphabetically when converting .env to JSON."
},
"envify.env.quoteStyle": {
"type": "string",
"enum": [
"auto",
"always"
],
"enumDescriptions": [
"Quote only values that need it (spaces, #, quotes, newlines, empty).",
"Wrap every value in double quotes."
],
"default": "auto",
"description": "Quoting style when converting JSON to .env."
},
"envify.env.sortKeys": {
"type": "boolean",
"default": false,
"description": "Sort keys alphabetically when converting JSON to .env."
},
"envify.nestedSeparator": {
"type": "string",
"default": "",
"markdownDescription": "Separator for nested keys, e.g. `__` turns `DB__HOST=x` into `{\"DB\":{\"HOST\":\"x\"}}` and flattens nested JSON back to `DB__HOST`. Leave empty to keep keys flat and stringify nested objects."
},
"envify.expandVariables": {
"type": "boolean",
"default": false,
"markdownDescription": "Resolve `${VAR}`, `$VAR` and `${VAR:-default}` references using other keys in the same file when converting. Single-quoted values are never expanded."
},
"envify.example.fileName": {
"type": "string",
"default": ".env.example",
"description": "File name used by Generate / Compare .env.example, resolved next to the .env file."
},
"envify.example.placeholder": {
"type": "string",
"default": "",
"description": "Text placed after = for every key in a generated .env.example."
},
"envify.diagnostics.enabled": {
"type": "boolean",
"default": true,
"description": "Show problems in .env files (invalid lines, duplicate keys, unquoted values with spaces, unclosed quotes, undefined references)."
},
"envify.diagnostics.compareWithExample": {
"type": "boolean",
"default": true,
"description": "Warn when a .env file is missing keys that exist in its sibling .env.example."
},
"envify.codeLens.enabled": {
"type": "boolean",
"default": true,
"markdownDescription": "Show `N keys missing from .env.example | Add` above the first line of a `.env` file. Needs `#envify.diagnostics.enabled#` and `#envify.diagnostics.compareWithExample#`."
},
"envify.showNotifications": {
"type": "boolean",
"default": true,
"description": "Show a notification after each successful conversion."
}
}
}
},
"scripts": {
"vscode:prepublish": "npm run compile",
"compile": "tsc -p ./",
"watch": "tsc -watch -p ./",
"test": "tsc -p ./ && node out/converter.test.js",
"package": "vsce package",
"publish:vscode": "vsce publish",
"publish:ovsx": "ovsx publish"
},
"devDependencies": {
"@types/vscode": "^1.80.0",
"@types/node": "^20.0.0",
"typescript": "^5.3.0",
"@vscode/vsce": "^2.22.0",
"ovsx": "^0.8.0"
}
}