Skip to content

Commit f84964c

Browse files
committed
feat: add configuration files, schemas, and icons for Forge app and contributor
1 parent d75fb29 commit f84964c

File tree

8 files changed

+458
-0
lines changed

8 files changed

+458
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"iconDefinitions": {
3+
"forge-config": {
4+
"iconPath": "../media/forge-file.svg"
5+
},
6+
"forge-contributor": {
7+
"iconPath": "../media/forge-contributor.svg"
8+
}
9+
},
10+
"fileNames": {
11+
".forge.yaml": "forge-config",
12+
".forge.yml": "forge-config",
13+
"forge.contributor.yaml": "forge-contributor",
14+
"forge.contributor.yml": "forge-contributor"
15+
}
16+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"comments": {
3+
"lineComment": "#"
4+
},
5+
"brackets": [
6+
["{", "}"],
7+
["[", "]"],
8+
["(", ")"]
9+
],
10+
"autoClosingPairs": [
11+
{ "open": "{", "close": "}" },
12+
{ "open": "[", "close": "]" },
13+
{ "open": "(", "close": ")" },
14+
{ "open": "'", "close": "'", "notIn": ["string"] },
15+
{ "open": "\"", "close": "\"", "notIn": ["string"] }
16+
],
17+
"surroundingPairs": [
18+
["{", "}"],
19+
["[", "]"],
20+
["(", ")"],
21+
["'", "'"],
22+
["\"", "\""]
23+
],
24+
"folding": {
25+
"offSide": true
26+
},
27+
"indentationRules": {
28+
"increaseIndentPattern": "^\\s*.*:(?:\\s*$|\\s+#)",
29+
"decreaseIndentPattern": "^$"
30+
}
31+
}
Lines changed: 11 additions & 0 deletions
Loading

vscode-forge/media/forge-file.svg

Lines changed: 10 additions & 0 deletions
Loading

vscode-forge/media/forge-icon.png

2.69 KB
Loading

vscode-forge/package.json

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"directory": "vscode-forge"
1111
},
1212
"license": "MIT",
13+
"icon": "media/forge-icon.png",
1314
"engines": {
1415
"vscode": "^1.85.0"
1516
},
@@ -76,6 +77,32 @@
7677
}
7778
]
7879
},
80+
"languages": [
81+
{
82+
"id": "forge-yaml",
83+
"aliases": ["Forge Config", "forge-yaml"],
84+
"filenames": [".forge.yaml", ".forge.yml"],
85+
"configuration": "./language-configuration.json"
86+
},
87+
{
88+
"id": "forge-contributor-yaml",
89+
"aliases": ["Forge Contributor", "forge-contributor-yaml"],
90+
"filenames": ["forge.contributor.yaml", "forge.contributor.yml"],
91+
"configuration": "./language-configuration.json"
92+
}
93+
],
94+
"grammars": [
95+
{
96+
"language": "forge-yaml",
97+
"scopeName": "source.yaml",
98+
"path": ""
99+
},
100+
{
101+
"language": "forge-contributor-yaml",
102+
"scopeName": "source.yaml",
103+
"path": ""
104+
}
105+
],
79106
"jsonValidation": [
80107
{
81108
"fileMatch": "**/.forge.yaml",
@@ -84,6 +111,29 @@
84111
{
85112
"fileMatch": "**/.forge.yml",
86113
"url": "./schema/forge.schema.json"
114+
},
115+
{
116+
"fileMatch": "apps/**/.forge.yaml",
117+
"url": "./schema/forge-app.schema.json"
118+
},
119+
{
120+
"fileMatch": "apps/**/.forge.yml",
121+
"url": "./schema/forge-app.schema.json"
122+
},
123+
{
124+
"fileMatch": "**/forge.contributor.yaml",
125+
"url": "./schema/forge-contributor.schema.json"
126+
},
127+
{
128+
"fileMatch": "**/forge.contributor.yml",
129+
"url": "./schema/forge-contributor.schema.json"
130+
}
131+
],
132+
"iconThemes": [
133+
{
134+
"id": "forge-icons",
135+
"label": "Forge File Icons",
136+
"path": "./fileicons/forge-icon-theme.json"
87137
}
88138
],
89139
"configuration": {
@@ -100,6 +150,13 @@
100150
"description": "How often (ms) to refresh the metrics panel."
101151
}
102152
}
153+
},
154+
"configurationDefaults": {
155+
"yaml.schemas": {
156+
"./schema/forge.schema.json": "**/.forge.{yaml,yml}",
157+
"./schema/forge-app.schema.json": "apps/**/.forge.{yaml,yml}",
158+
"./schema/forge-contributor.schema.json": "**/forge.contributor.{yaml,yml}"
159+
}
103160
}
104161
},
105162
"scripts": {
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "https://forge.dev/schema/forge-app.schema.json",
4+
"title": "Forge App Configuration",
5+
"description": "Schema for app-level .forge.yaml files located in apps/<name>/.forge.yaml.",
6+
"type": "object",
7+
"properties": {
8+
"app": {
9+
"type": "object",
10+
"description": "App metadata.",
11+
"properties": {
12+
"name": {
13+
"type": "string",
14+
"description": "Application name."
15+
},
16+
"type": {
17+
"type": "string",
18+
"description": "Application type.",
19+
"enum": ["web", "cli", "worker", "grpc"]
20+
},
21+
"version": {
22+
"type": "string",
23+
"description": "Application version (semver recommended)."
24+
}
25+
},
26+
"required": ["name"],
27+
"additionalProperties": false
28+
},
29+
"dev": {
30+
"type": "object",
31+
"description": "App-specific development configuration. Overrides project-level dev settings.",
32+
"properties": {
33+
"port": {
34+
"type": "integer",
35+
"description": "Development server port.",
36+
"minimum": 1,
37+
"maximum": 65535
38+
},
39+
"host": {
40+
"type": "string",
41+
"description": "Development server host.",
42+
"default": "localhost"
43+
},
44+
"env_file": {
45+
"type": "string",
46+
"description": "Path to .env file for this app."
47+
},
48+
"docker": {
49+
"$ref": "./forge.schema.json#/$defs/DockerDevConfig"
50+
}
51+
},
52+
"additionalProperties": false
53+
},
54+
"build": {
55+
"type": "object",
56+
"description": "App-specific build configuration.",
57+
"properties": {
58+
"output": {
59+
"type": "string",
60+
"description": "Output binary name or path."
61+
},
62+
"dockerfile": {
63+
"type": "string",
64+
"description": "Path to Dockerfile for this app."
65+
},
66+
"tags": {
67+
"type": "array",
68+
"description": "Build tags.",
69+
"items": { "type": "string" }
70+
},
71+
"ldflags": {
72+
"type": "string",
73+
"description": "Linker flags."
74+
}
75+
},
76+
"additionalProperties": false
77+
}
78+
},
79+
"additionalProperties": false
80+
}

0 commit comments

Comments
 (0)