daytona 0.161.0 → 0.162.0
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/README.md +1 -1
- data/lib/daytona/sdk/version.rb +1 -1
- data/lib/daytona/util.rb +44 -23
- metadata +5 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6438205c2f0a51d6a42f26622f5788e1f782817016a7279c546fd6e5f5f56230
|
|
4
|
+
data.tar.gz: e890cafc75745dffe19ddb005266268aae7913b9fef00367131851b0e932639b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e935fc087a7a1ae74571a58ffc862e8007f9328601574fcf595cedcd3da19951a68d269de314bd1d3cce4b3dddaf73a2a9947967a9aea1521aa11686adaab571
|
|
7
|
+
data.tar.gz: b4b3c19344b98ed59a3115e2c44a8917ddeead371d709380669b26a83b63cd00ca60d616bc6095c1b05b8156e441ac91064ba70b4bbfbb51ebedef0168179e57
|
data/README.md
CHANGED
|
@@ -185,4 +185,4 @@ completions = lsp_server.completions(
|
|
|
185
185
|
|
|
186
186
|
## Contributing
|
|
187
187
|
|
|
188
|
-
Daytona is Open Source under the [Apache License 2.0](https://github.com/daytonaio/daytona/blob/main/libs/sdk-ruby/LICENSE), and is the [copyright of its contributors](https://github.com/daytonaio/daytona/blob/main/NOTICE). If you would like to contribute to the software, read the Developer Certificate of Origin Version 1.1 (https://developercertificate.org/). Afterwards, navigate to the [contributing guide](
|
|
188
|
+
Daytona is Open Source under the [Apache License 2.0](https://github.com/daytonaio/daytona/blob/main/libs/sdk-ruby/LICENSE), and is the [copyright of its contributors](https://github.com/daytonaio/daytona/blob/main/NOTICE). If you would like to contribute to the software, read the Developer Certificate of Origin Version 1.1 (https://developercertificate.org/). Afterwards, navigate to the [contributing guide](../../CONTRIBUTING.md) to get started.
|
data/lib/daytona/sdk/version.rb
CHANGED
data/lib/daytona/util.rb
CHANGED
|
@@ -4,25 +4,52 @@ require 'net/http'
|
|
|
4
4
|
|
|
5
5
|
module Daytona
|
|
6
6
|
module Util
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
7
|
+
STDOUT_PREFIX = "\x01\x01\01"
|
|
8
|
+
private_constant :STDOUT_PREFIX
|
|
9
|
+
|
|
10
|
+
STDERR_PREFIX = "\x02\x02\02"
|
|
11
|
+
private_constant :STDERR_PREFIX
|
|
12
|
+
|
|
13
|
+
PREFIX_LEN = STDOUT_PREFIX.bytesize
|
|
14
|
+
private_constant :PREFIX_LEN
|
|
15
|
+
|
|
16
|
+
def self.demux(line)
|
|
17
|
+
out_parts = []
|
|
18
|
+
err_parts = []
|
|
19
|
+
state = nil
|
|
20
|
+
pos = 0
|
|
21
|
+
|
|
22
|
+
while pos < line.bytesize
|
|
23
|
+
si = line.index(STDOUT_PREFIX, pos)
|
|
24
|
+
ei = line.index(STDERR_PREFIX, pos)
|
|
25
|
+
|
|
26
|
+
if si && (ei.nil? || si < ei)
|
|
27
|
+
next_idx = si
|
|
28
|
+
next_state = :stdout
|
|
29
|
+
elsif ei
|
|
30
|
+
next_idx = ei
|
|
31
|
+
next_state = :stderr
|
|
32
|
+
else
|
|
33
|
+
case state
|
|
34
|
+
when :stdout then out_parts << line[pos..]
|
|
35
|
+
when :stderr then err_parts << line[pos..]
|
|
36
|
+
end
|
|
37
|
+
break
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
if pos < next_idx
|
|
41
|
+
chunk = line[pos...next_idx]
|
|
42
|
+
case state
|
|
43
|
+
when :stdout then out_parts << chunk
|
|
44
|
+
when :stderr then err_parts << chunk
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
state = next_state
|
|
49
|
+
pos = next_idx + PREFIX_LEN
|
|
23
50
|
end
|
|
24
51
|
|
|
25
|
-
[
|
|
52
|
+
[out_parts.join, err_parts.join]
|
|
26
53
|
end
|
|
27
54
|
|
|
28
55
|
# @param uri [URI]
|
|
@@ -46,11 +73,5 @@ module Daytona
|
|
|
46
73
|
Sdk.logger.debug("Async stream (#{uri}) timeout: #{e.inspect}")
|
|
47
74
|
end
|
|
48
75
|
end
|
|
49
|
-
|
|
50
|
-
STDOUT_PREFIX = "\x01\x01\01"
|
|
51
|
-
private_constant :STDOUT_PREFIX
|
|
52
|
-
|
|
53
|
-
STDERR_PREFIX = "\x02\x02\02"
|
|
54
|
-
private_constant :STDERR_PREFIX
|
|
55
76
|
end
|
|
56
77
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: daytona
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.162.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Daytona Platforms Inc.
|
|
@@ -85,28 +85,28 @@ dependencies:
|
|
|
85
85
|
requirements:
|
|
86
86
|
- - '='
|
|
87
87
|
- !ruby/object:Gem::Version
|
|
88
|
-
version: 0.
|
|
88
|
+
version: 0.162.0
|
|
89
89
|
type: :runtime
|
|
90
90
|
prerelease: false
|
|
91
91
|
version_requirements: !ruby/object:Gem::Requirement
|
|
92
92
|
requirements:
|
|
93
93
|
- - '='
|
|
94
94
|
- !ruby/object:Gem::Version
|
|
95
|
-
version: 0.
|
|
95
|
+
version: 0.162.0
|
|
96
96
|
- !ruby/object:Gem::Dependency
|
|
97
97
|
name: daytona_toolbox_api_client
|
|
98
98
|
requirement: !ruby/object:Gem::Requirement
|
|
99
99
|
requirements:
|
|
100
100
|
- - '='
|
|
101
101
|
- !ruby/object:Gem::Version
|
|
102
|
-
version: 0.
|
|
102
|
+
version: 0.162.0
|
|
103
103
|
type: :runtime
|
|
104
104
|
prerelease: false
|
|
105
105
|
version_requirements: !ruby/object:Gem::Requirement
|
|
106
106
|
requirements:
|
|
107
107
|
- - '='
|
|
108
108
|
- !ruby/object:Gem::Version
|
|
109
|
-
version: 0.
|
|
109
|
+
version: 0.162.0
|
|
110
110
|
- !ruby/object:Gem::Dependency
|
|
111
111
|
name: dotenv
|
|
112
112
|
requirement: !ruby/object:Gem::Requirement
|