openvox-editor-services 3.1.0 → 3.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -2
- data/lib/puppet-languageserver/global_queues/validation_queue.rb +1 -0
- data/lib/puppet-languageserver/manifest/validation_provider.rb +13 -5
- data/lib/puppet-languageserver/message_handler.rb +1 -1
- data/lib/puppet_editor_services/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 45f1302baf3215f01f4a9c4addc74551d9ec009b2707f00a3bb0576ca98b0f4d
|
|
4
|
+
data.tar.gz: f9559f9445a8db6bee287a416ef424cf7e880b10c3055d187e4f810b41556b01
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 063ffa9274f4b198a2e365dfa6034811ee55a69c3a9ac9c16613c09c8b08d97dc4f897824b5f3cd74fea1a3c5cd3b930ca04647bc6fbc4ec961e1e036288d6cd
|
|
7
|
+
data.tar.gz: af25e6e058b839432325c8139becb1575f14c15e2017f655fffaa599c85e44bcd4d28cc3995e9374e1556d0f8fdebe162d4edf7b3d9fc90fb85314f8942a4a73
|
data/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## [3.1.
|
|
3
|
+
## [3.1.1](https://github.com/voxpupuli/openvox-editor-services/tree/3.1.1) (2026-07-18)
|
|
4
4
|
|
|
5
|
-
[Full Changelog](https://github.com/voxpupuli/openvox-editor-services/compare/v3.
|
|
5
|
+
[Full Changelog](https://github.com/voxpupuli/openvox-editor-services/compare/v3.1.0...3.1.1)
|
|
6
|
+
|
|
7
|
+
**Fixed bugs:**
|
|
8
|
+
|
|
9
|
+
- fix: use relative flag to fix autoload layout bug [\#14](https://github.com/voxpupuli/openvox-editor-services/pull/14) ([rwaffen](https://github.com/rwaffen))
|
|
10
|
+
- fix: patch autoload behavior [\#13](https://github.com/voxpupuli/openvox-editor-services/pull/13) ([rwaffen](https://github.com/rwaffen))
|
|
11
|
+
|
|
12
|
+
## [v3.1.0](https://github.com/voxpupuli/openvox-editor-services/tree/v3.1.0) (2026-07-03)
|
|
13
|
+
|
|
14
|
+
[Full Changelog](https://github.com/voxpupuli/openvox-editor-services/compare/v3.0.0...v3.1.0)
|
|
6
15
|
|
|
7
16
|
**Implemented enhancements:**
|
|
8
17
|
|
|
@@ -57,6 +57,7 @@ module PuppetLanguageServer
|
|
|
57
57
|
results = case document_store.document_type(job_object.file_uri)
|
|
58
58
|
when :manifest
|
|
59
59
|
options[:tasks_mode] = document_store.plan_file?(job_object.file_uri)
|
|
60
|
+
options[:document_uri] = job_object.file_uri
|
|
60
61
|
PuppetLanguageServer::Manifest::ValidationProvider.validate(session_state, content, options)
|
|
61
62
|
when :epp
|
|
62
63
|
PuppetLanguageServer::Epp::ValidationProvider.validate(content)
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require 'puppet-languageserver/puppet_lint'
|
|
4
|
+
require 'puppet-languageserver/uri_helper'
|
|
4
5
|
module PuppetLanguageServer
|
|
5
6
|
module Manifest
|
|
6
7
|
module ValidationProvider
|
|
@@ -13,11 +14,11 @@ module PuppetLanguageServer
|
|
|
13
14
|
# [ <Int> Number of problems fixed,
|
|
14
15
|
# <String> New Content
|
|
15
16
|
# ]
|
|
16
|
-
def self.fix_validate_errors(session_state, content)
|
|
17
|
-
init_puppet_lint(session_state.documents.store_root_path, ['--fix'])
|
|
17
|
+
def self.fix_validate_errors(session_state, content, document_uri = nil)
|
|
18
|
+
init_puppet_lint(session_state.documents.store_root_path, ['--fix', '--relative'])
|
|
18
19
|
|
|
19
20
|
linter = PuppetLint::Checks.new
|
|
20
|
-
problems = linter.run(
|
|
21
|
+
problems = linter.run(lint_filename(document_uri), content)
|
|
21
22
|
problems_fixed = problems.nil? ? 0 : problems.count { |item| item[:kind] == :fixed }
|
|
22
23
|
|
|
23
24
|
[problems_fixed, linter.manifest]
|
|
@@ -33,11 +34,11 @@ module PuppetLanguageServer
|
|
|
33
34
|
# TODO: Need to implement max_problems
|
|
34
35
|
problems = 0
|
|
35
36
|
|
|
36
|
-
init_puppet_lint(session_state.documents.store_root_path, [])
|
|
37
|
+
init_puppet_lint(session_state.documents.store_root_path, ['--relative'])
|
|
37
38
|
|
|
38
39
|
begin
|
|
39
40
|
linter = PuppetLint::Checks.new
|
|
40
|
-
problems = linter.run(
|
|
41
|
+
problems = linter.run(lint_filename(options[:document_uri]), content)
|
|
41
42
|
unless problems.nil?
|
|
42
43
|
problems.each do |problem|
|
|
43
44
|
# Syntax errors are better handled by the puppet parser, not puppet lint
|
|
@@ -125,6 +126,13 @@ module PuppetLanguageServer
|
|
|
125
126
|
linter_options.parse!(lint_options)
|
|
126
127
|
end
|
|
127
128
|
private_class_method :init_puppet_lint
|
|
129
|
+
|
|
130
|
+
def self.lint_filename(document_uri)
|
|
131
|
+
PuppetLanguageServer::UriHelper.uri_path(document_uri) || LINT_FILENAME
|
|
132
|
+
rescue URI::InvalidURIError
|
|
133
|
+
LINT_FILENAME
|
|
134
|
+
end
|
|
135
|
+
private_class_method :lint_filename
|
|
128
136
|
end
|
|
129
137
|
end
|
|
130
138
|
end
|
|
@@ -133,7 +133,7 @@ module PuppetLanguageServer
|
|
|
133
133
|
|
|
134
134
|
case documents.document_type(file_uri)
|
|
135
135
|
when :manifest
|
|
136
|
-
changes, new_content = PuppetLanguageServer::Manifest::ValidationProvider.fix_validate_errors(session_state, content)
|
|
136
|
+
changes, new_content = PuppetLanguageServer::Manifest::ValidationProvider.fix_validate_errors(session_state, content, file_uri)
|
|
137
137
|
else
|
|
138
138
|
raise "Unable to fixDiagnosticErrors on #{file_uri}"
|
|
139
139
|
end
|