openc3 6.10.4 → 6.10.5
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/lib/openc3/accessors/template_accessor.rb +9 -0
- data/lib/openc3/models/auth_model.rb +2 -1
- data/lib/openc3/models/tool_config_model.rb +12 -0
- data/lib/openc3/utilities/secrets.rb +5 -1
- data/lib/openc3/version.rb +5 -5
- data/templates/tool_angular/package.json +2 -2
- data/templates/tool_react/package.json +1 -1
- data/templates/tool_svelte/package.json +1 -1
- data/templates/tool_vue/package.json +3 -3
- data/templates/widget/package.json +2 -2
- 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: 1439206d21d96fe96217e987cf7fe76c61810fbad73bde8dd26a3206154f3b2f
|
|
4
|
+
data.tar.gz: 114eff9211c6c9eb997f14e67b6e4c278a0a73781ef4c5097248b693049fa3dd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4f1fa618d7da541bb161d2f545810399be14877b42caa1f9f0d12c6d257c903de578dc032816eeb31fa8b000e04f116e471660097adfbd7cf69d82fd6a4bf892
|
|
7
|
+
data.tar.gz: c1af9b3d8c5403d83388036ac591ece57b8c677a7d038b1f63e1bf8e5f0560958200ac5e15a4eacc53c4578e6c154a195454aa9c633e66531544e926d8496c5b
|
|
@@ -58,6 +58,9 @@ module OpenC3
|
|
|
58
58
|
return nil if item.data_type == :DERIVED
|
|
59
59
|
configure()
|
|
60
60
|
|
|
61
|
+
# No template items to read (e.g. command with fixed template string)
|
|
62
|
+
return nil if @item_keys.empty?
|
|
63
|
+
|
|
61
64
|
# Scan the response for all the variables in brackets <VARIABLE>
|
|
62
65
|
values = buffer.scan(@read_regexp)[0]
|
|
63
66
|
if !values || (values.length != @item_keys.length)
|
|
@@ -78,6 +81,12 @@ module OpenC3
|
|
|
78
81
|
result = {}
|
|
79
82
|
configure()
|
|
80
83
|
|
|
84
|
+
# No template items to read (e.g. command with fixed template string)
|
|
85
|
+
if @item_keys.empty?
|
|
86
|
+
items.each { |item| result[item.name] = nil }
|
|
87
|
+
return result
|
|
88
|
+
end
|
|
89
|
+
|
|
81
90
|
# Scan the response for all the variables in brackets <VARIABLE>
|
|
82
91
|
values = buffer.scan(@read_regexp)[0]
|
|
83
92
|
if !values || (values.length != @item_keys.length)
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
# GNU Affero General Public License for more details.
|
|
15
15
|
|
|
16
16
|
# Modified by OpenC3, Inc.
|
|
17
|
-
# All changes Copyright
|
|
17
|
+
# All changes Copyright 2026, OpenC3, Inc.
|
|
18
18
|
# All Rights Reserved
|
|
19
19
|
#
|
|
20
20
|
# This file may also be used under the terms of a commercial license
|
|
@@ -81,6 +81,7 @@ module OpenC3
|
|
|
81
81
|
raise "old_token incorrect" unless verify(old_token)
|
|
82
82
|
end
|
|
83
83
|
Store.set(key, hash(token))
|
|
84
|
+
logout()
|
|
84
85
|
end
|
|
85
86
|
|
|
86
87
|
def self.generate_session
|
|
@@ -24,6 +24,11 @@ require 'openc3/utilities/local_mode'
|
|
|
24
24
|
|
|
25
25
|
module OpenC3
|
|
26
26
|
class ToolConfigModel
|
|
27
|
+
class InvalidNameError < StandardError; end
|
|
28
|
+
|
|
29
|
+
# Allowlist: letters, digits, hyphens, underscores, spaces, and periods
|
|
30
|
+
VALID_NAME_PATTERN = /\A[A-Za-z0-9_\-. ]+\z/
|
|
31
|
+
|
|
27
32
|
def self.config_tool_names(scope: $openc3_scope)
|
|
28
33
|
_, keys = Store.scan(0, match: "#{scope}__config__*", type: 'hash', count: 100)
|
|
29
34
|
# Just return the tool name that is used in the other APIs
|
|
@@ -31,19 +36,26 @@ module OpenC3
|
|
|
31
36
|
end
|
|
32
37
|
|
|
33
38
|
def self.list_configs(tool, scope: $openc3_scope)
|
|
39
|
+
raise InvalidNameError, "Invalid tool name: #{tool}" unless tool.match?(VALID_NAME_PATTERN)
|
|
34
40
|
Store.hkeys("#{scope}__config__#{tool}")
|
|
35
41
|
end
|
|
36
42
|
|
|
37
43
|
def self.load_config(tool, name, scope: $openc3_scope)
|
|
44
|
+
raise InvalidNameError, "Invalid tool name: #{tool}" unless tool.match?(VALID_NAME_PATTERN)
|
|
45
|
+
raise InvalidNameError, "Invalid config name: #{name}" unless name.match?(VALID_NAME_PATTERN)
|
|
38
46
|
Store.hget("#{scope}__config__#{tool}", name)
|
|
39
47
|
end
|
|
40
48
|
|
|
41
49
|
def self.save_config(tool, name, data, local_mode: true, scope: $openc3_scope)
|
|
50
|
+
raise InvalidNameError, "Invalid tool name: #{tool}" unless tool.match?(VALID_NAME_PATTERN)
|
|
51
|
+
raise InvalidNameError, "Invalid config name: #{name}" unless name.match?(VALID_NAME_PATTERN)
|
|
42
52
|
Store.hset("#{scope}__config__#{tool}", name, data)
|
|
43
53
|
LocalMode.save_tool_config(scope, tool, name, data) if local_mode
|
|
44
54
|
end
|
|
45
55
|
|
|
46
56
|
def self.delete_config(tool, name, local_mode: true, scope: $openc3_scope)
|
|
57
|
+
raise InvalidNameError, "Invalid tool name: #{tool}" unless tool.match?(VALID_NAME_PATTERN)
|
|
58
|
+
raise InvalidNameError, "Invalid config name: #{name}" unless name.match?(VALID_NAME_PATTERN)
|
|
47
59
|
Store.hdel("#{scope}__config__#{tool}", name)
|
|
48
60
|
LocalMode.delete_tool_config(scope, tool, name) if local_mode
|
|
49
61
|
end
|
|
@@ -48,7 +48,11 @@ module OpenC3
|
|
|
48
48
|
end
|
|
49
49
|
|
|
50
50
|
def setup(secrets)
|
|
51
|
-
secrets.each do |
|
|
51
|
+
secrets.each do |secret|
|
|
52
|
+
if secret.length < 3
|
|
53
|
+
raise ArgumentError, "Secret must have at least 3 items (type, key, data), got #{secret.length}"
|
|
54
|
+
end
|
|
55
|
+
type, key, data, secret_store = secret
|
|
52
56
|
case type
|
|
53
57
|
when 'ENV'
|
|
54
58
|
@local_secrets[key] = ENV[data]
|
data/lib/openc3/version.rb
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# encoding: ascii-8bit
|
|
2
2
|
|
|
3
|
-
OPENC3_VERSION = '6.10.
|
|
3
|
+
OPENC3_VERSION = '6.10.5'
|
|
4
4
|
module OpenC3
|
|
5
5
|
module Version
|
|
6
6
|
MAJOR = '6'
|
|
7
7
|
MINOR = '10'
|
|
8
|
-
PATCH = '
|
|
8
|
+
PATCH = '5'
|
|
9
9
|
OTHER = ''
|
|
10
|
-
BUILD = '
|
|
10
|
+
BUILD = '8d61f63fc7011fc77e974d0f5031950740d20ebb'
|
|
11
11
|
end
|
|
12
|
-
VERSION = '6.10.
|
|
13
|
-
GEM_VERSION = '6.10.
|
|
12
|
+
VERSION = '6.10.5'
|
|
13
|
+
GEM_VERSION = '6.10.5'
|
|
14
14
|
end
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "<%= tool_name %>",
|
|
3
|
-
"version": "6.10.
|
|
3
|
+
"version": "6.10.5",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"ng": "ng",
|
|
6
6
|
"start": "ng serve",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"@angular/platform-browser-dynamic": "^18.2.6",
|
|
24
24
|
"@angular/router": "^18.2.6",
|
|
25
25
|
"@astrouxds/astro-web-components": "^7.24.0",
|
|
26
|
-
"@openc3/js-common": "6.10.
|
|
26
|
+
"@openc3/js-common": "6.10.5",
|
|
27
27
|
"rxjs": "~7.8.0",
|
|
28
28
|
"single-spa": "^5.9.5",
|
|
29
29
|
"single-spa-angular": "^9.2.0",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "<%= tool_name %>",
|
|
3
|
-
"version": "6.10.
|
|
3
|
+
"version": "6.10.5",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@astrouxds/astro-web-components": "^7.24.0",
|
|
14
|
-
"@openc3/js-common": "6.10.
|
|
15
|
-
"@openc3/vue-common": "6.10.
|
|
14
|
+
"@openc3/js-common": "6.10.5",
|
|
15
|
+
"@openc3/vue-common": "6.10.5",
|
|
16
16
|
"axios": "^1.7.7",
|
|
17
17
|
"date-fns": "^4.1.0",
|
|
18
18
|
"lodash": "^4.17.21",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "<%= widget_name %>",
|
|
3
|
-
"version": "6.10.
|
|
3
|
+
"version": "6.10.5",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"@astrouxds/astro-web-components": "^7.24.0",
|
|
11
|
-
"@openc3/vue-common": "6.10.
|
|
11
|
+
"@openc3/vue-common": "6.10.5",
|
|
12
12
|
"vuetify": "^3.7.1"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|