Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ ClientBin/
[Ss]tyle[Cc]op.*
~$*
*~
\#*
.#*
*.dbmdl
*.[Pp]ublish.xml
*.pfx
Expand Down
7 changes: 6 additions & 1 deletion cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,12 @@ async function readJsonFile(/** @type {string} */ filename) {
}

function isIgnoredFile(/** @type {string} */ file) {
return file === '.DS_Store'
return (
file === '.DS_Store' ||
file.startsWith('#') ||
file.startsWith('.#') ||
file.endsWith('~')
)
}

async function forEachCatalogUrl(
Expand Down
11 changes: 11 additions & 0 deletions src/api/json/catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -1360,6 +1360,11 @@
"fileMatch": ["**/packages/*/spec"],
"url": "https://www.schemastore.org/bosh-package-spec.json"
},
{
"name": "BOSH Ops File",
"description": "Ops File for BOSH CLI",
"url": "https://www.schemastore.org/bosh-ops-file.json"
},
{
"name": "Boyka Framework",
"description": "Boyka Framework config file",
Expand Down Expand Up @@ -11116,6 +11121,12 @@
"description": "Workflow definition for the yaml-workflow engine — params, tasks, steps, imports, and flows",
"fileMatch": ["**/*.yaml-workflow.yaml", "**/*.yaml-workflow.yml"],
"url": "https://raw.githubusercontent.com/orieg/yaml-workflow/main/schema/workflow-schema.json"
},
{
"name": "servercn",
"description": "Servercn is the backend component registry for node.js inspired by shadcn/ui",
"fileMatch": ["servercn.config.json", "servercn.json"],
"url": "https://www.akkaldhami.com.np/schema/servercn.config.json"
}
]
}
3 changes: 3 additions & 0 deletions src/negative_test/bosh-ops-file/missing-type.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# yaml-language-server: $schema=../../schemas/json/bosh-ops-file.json
- path: /name
value: other-cf
2 changes: 2 additions & 0 deletions src/negative_test/bosh-ops-file/remove-missing-path.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# yaml-language-server: $schema=../../schemas/json/bosh-ops-file.json
- type: remove
3 changes: 3 additions & 0 deletions src/negative_test/bosh-ops-file/replace-missing-path.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# yaml-language-server: $schema=../../schemas/json/bosh-ops-file.json
- type: replace
value: other-cf
3 changes: 3 additions & 0 deletions src/negative_test/bosh-ops-file/replace-missing-value.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# yaml-language-server: $schema=../../schemas/json/bosh-ops-file.json
- type: replace
path: /name
36 changes: 36 additions & 0 deletions src/schemas/json/bosh-ops-file.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://www.schemastore.org/bosh-ops-file.json",
"$comment": "Schema built from https://bosh.io/docs/cli-ops-files/.",
"$ref": "#/definitions/Operations",
"title": "BOSH Ops File",
"description": "A collection of operations for interpolating a YAML file.\n\nDocs: https://bosh.io/docs/cli-ops-files/",
"definitions": {
"Operations": {
"type": "array",
"items": {
"anyOf": [
{ "$ref": "#/definitions/Replace" },
{ "$ref": "#/definitions/Remove" }
]
}
},
"Replace": {
"type": "object",
"required": ["type", "path", "value"],
"properties": {
"type": { "const": "replace" },
"path": { "type": "string" },
"value": {}
}
},
"Remove": {
"type": "object",
"required": ["type", "path"],
"properties": {
"type": { "const": "remove" },
"path": { "type": "string" }
}
}
}
}
7 changes: 7 additions & 0 deletions src/test/bosh-ops-file/acceptance.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# yaml-language-server: $schema=../../schemas/json/bosh-ops-file.json
- type: replace
path: /name
value: other-cf

- type: remove
path: /key