cobolx 1.0.1 → 1.0.2-canary.25
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.
- package/.github/workflows/ci.yml +17 -9
- package/Cargo.lock +207 -242
- package/Cargo.toml +1 -1
- package/bin/check-update.js +44 -0
- package/bin/cobolx.js +54 -0
- package/package.json +5 -2
- package/scripts/prepare-version.js +44 -0
- package/src/agent/client.rs +12 -3
- package/src/ui/tui.rs +3 -0
package/.github/workflows/ci.yml
CHANGED
|
@@ -66,7 +66,7 @@ jobs:
|
|
|
66
66
|
|
|
67
67
|
create-release:
|
|
68
68
|
name: Create GitHub Release
|
|
69
|
-
if: startsWith(github.ref, 'refs/tags/')
|
|
69
|
+
if: startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/heads/release/')
|
|
70
70
|
runs-on: ubuntu-latest
|
|
71
71
|
needs: [fmt, clippy, test, audit]
|
|
72
72
|
permissions:
|
|
@@ -75,11 +75,16 @@ jobs:
|
|
|
75
75
|
- name: Checkout Source Code
|
|
76
76
|
uses: actions/checkout@v4
|
|
77
77
|
|
|
78
|
+
- name: Prepare Dynamic Version
|
|
79
|
+
run: node scripts/prepare-version.js
|
|
80
|
+
|
|
78
81
|
- name: Create Release
|
|
79
82
|
uses: softprops/action-gh-release@v2
|
|
80
83
|
with:
|
|
84
|
+
tag_name: v${{ env.RELEASE_VERSION }}
|
|
85
|
+
name: v${{ env.RELEASE_VERSION }}
|
|
81
86
|
draft: false
|
|
82
|
-
prerelease:
|
|
87
|
+
prerelease: ${{ env.IS_CANARY == 'true' }}
|
|
83
88
|
generate_release_notes: true
|
|
84
89
|
|
|
85
90
|
build-binaries:
|
|
@@ -92,8 +97,7 @@ jobs:
|
|
|
92
97
|
needs.clippy.result == 'success' &&
|
|
93
98
|
needs.test.result == 'success' &&
|
|
94
99
|
needs.audit.result == 'success' &&
|
|
95
|
-
|
|
96
|
-
(startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.head_ref, 'release/'))
|
|
100
|
+
needs.create-release.result == 'success'
|
|
97
101
|
permissions:
|
|
98
102
|
contents: write
|
|
99
103
|
strategy:
|
|
@@ -115,6 +119,9 @@ jobs:
|
|
|
115
119
|
- name: Checkout Source Code
|
|
116
120
|
uses: actions/checkout@v4
|
|
117
121
|
|
|
122
|
+
- name: Prepare Dynamic Version
|
|
123
|
+
run: node scripts/prepare-version.js
|
|
124
|
+
|
|
118
125
|
- name: Install Stable Toolchain
|
|
119
126
|
uses: actions-rust-lang/setup-rust-toolchain@v1
|
|
120
127
|
with:
|
|
@@ -128,13 +135,11 @@ jobs:
|
|
|
128
135
|
archive: $bin-$target
|
|
129
136
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
130
137
|
use-cross: ${{ matrix.use-cross || false }}
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
138
|
+
ref: refs/tags/v${{ env.RELEASE_VERSION }}
|
|
134
139
|
|
|
135
140
|
publish-npm:
|
|
136
141
|
name: Publish to npm
|
|
137
|
-
if: startsWith(github.ref, 'refs/tags/')
|
|
142
|
+
if: startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/heads/release/')
|
|
138
143
|
runs-on: ubuntu-latest
|
|
139
144
|
needs: [build-binaries]
|
|
140
145
|
permissions:
|
|
@@ -144,6 +149,9 @@ jobs:
|
|
|
144
149
|
- name: Checkout Source Code
|
|
145
150
|
uses: actions/checkout@v4
|
|
146
151
|
|
|
152
|
+
- name: Prepare Dynamic Version
|
|
153
|
+
run: node scripts/prepare-version.js
|
|
154
|
+
|
|
147
155
|
- name: Set up Node.js
|
|
148
156
|
uses: actions/setup-node@v4
|
|
149
157
|
with:
|
|
@@ -154,4 +162,4 @@ jobs:
|
|
|
154
162
|
run: npm install -g npm@latest
|
|
155
163
|
|
|
156
164
|
- name: Publish to npm
|
|
157
|
-
run: npm publish --access public --provenance
|
|
165
|
+
run: npm publish --tag ${{ env.NPM_TAG }} --access public --provenance
|
package/Cargo.lock
CHANGED
|
@@ -134,6 +134,12 @@ version = "1.0.4"
|
|
|
134
134
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
135
135
|
checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
|
|
136
136
|
|
|
137
|
+
[[package]]
|
|
138
|
+
name = "cfg_aliases"
|
|
139
|
+
version = "0.2.1"
|
|
140
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
141
|
+
checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724"
|
|
142
|
+
|
|
137
143
|
[[package]]
|
|
138
144
|
name = "chrono"
|
|
139
145
|
version = "0.4.45"
|
|
@@ -217,26 +223,6 @@ dependencies = [
|
|
|
217
223
|
"static_assertions",
|
|
218
224
|
]
|
|
219
225
|
|
|
220
|
-
[[package]]
|
|
221
|
-
name = "core-foundation"
|
|
222
|
-
version = "0.9.4"
|
|
223
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
224
|
-
checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f"
|
|
225
|
-
dependencies = [
|
|
226
|
-
"core-foundation-sys",
|
|
227
|
-
"libc",
|
|
228
|
-
]
|
|
229
|
-
|
|
230
|
-
[[package]]
|
|
231
|
-
name = "core-foundation"
|
|
232
|
-
version = "0.10.1"
|
|
233
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
234
|
-
checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6"
|
|
235
|
-
dependencies = [
|
|
236
|
-
"core-foundation-sys",
|
|
237
|
-
"libc",
|
|
238
|
-
]
|
|
239
|
-
|
|
240
226
|
[[package]]
|
|
241
227
|
name = "core-foundation-sys"
|
|
242
228
|
version = "0.8.7"
|
|
@@ -306,15 +292,6 @@ version = "1.16.0"
|
|
|
306
292
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
307
293
|
checksum = "91622ff5e7162018101f2fea40d6ebf4a78bbe5a49736a2020649edf9693679e"
|
|
308
294
|
|
|
309
|
-
[[package]]
|
|
310
|
-
name = "encoding_rs"
|
|
311
|
-
version = "0.8.35"
|
|
312
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
313
|
-
checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3"
|
|
314
|
-
dependencies = [
|
|
315
|
-
"cfg-if",
|
|
316
|
-
]
|
|
317
|
-
|
|
318
295
|
[[package]]
|
|
319
296
|
name = "equivalent"
|
|
320
297
|
version = "1.0.2"
|
|
@@ -355,12 +332,6 @@ version = "0.1.9"
|
|
|
355
332
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
356
333
|
checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582"
|
|
357
334
|
|
|
358
|
-
[[package]]
|
|
359
|
-
name = "fnv"
|
|
360
|
-
version = "1.0.7"
|
|
361
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
362
|
-
checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
|
|
363
|
-
|
|
364
335
|
[[package]]
|
|
365
336
|
name = "foldhash"
|
|
366
337
|
version = "0.1.5"
|
|
@@ -373,21 +344,6 @@ version = "0.2.0"
|
|
|
373
344
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
374
345
|
checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb"
|
|
375
346
|
|
|
376
|
-
[[package]]
|
|
377
|
-
name = "foreign-types"
|
|
378
|
-
version = "0.3.2"
|
|
379
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
380
|
-
checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1"
|
|
381
|
-
dependencies = [
|
|
382
|
-
"foreign-types-shared",
|
|
383
|
-
]
|
|
384
|
-
|
|
385
|
-
[[package]]
|
|
386
|
-
name = "foreign-types-shared"
|
|
387
|
-
version = "0.1.1"
|
|
388
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
389
|
-
checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
|
|
390
|
-
|
|
391
347
|
[[package]]
|
|
392
348
|
name = "form_urlencoded"
|
|
393
349
|
version = "1.2.2"
|
|
@@ -464,38 +420,35 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
464
420
|
checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0"
|
|
465
421
|
dependencies = [
|
|
466
422
|
"cfg-if",
|
|
423
|
+
"js-sys",
|
|
467
424
|
"libc",
|
|
468
425
|
"wasi",
|
|
426
|
+
"wasm-bindgen",
|
|
469
427
|
]
|
|
470
428
|
|
|
471
429
|
[[package]]
|
|
472
430
|
name = "getrandom"
|
|
473
|
-
version = "0.4
|
|
431
|
+
version = "0.3.4"
|
|
474
432
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
475
|
-
checksum = "
|
|
433
|
+
checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd"
|
|
476
434
|
dependencies = [
|
|
477
435
|
"cfg-if",
|
|
436
|
+
"js-sys",
|
|
478
437
|
"libc",
|
|
479
|
-
"r-efi",
|
|
438
|
+
"r-efi 5.3.0",
|
|
439
|
+
"wasip2",
|
|
440
|
+
"wasm-bindgen",
|
|
480
441
|
]
|
|
481
442
|
|
|
482
443
|
[[package]]
|
|
483
|
-
name = "
|
|
484
|
-
version = "0.4.
|
|
444
|
+
name = "getrandom"
|
|
445
|
+
version = "0.4.3"
|
|
485
446
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
486
|
-
checksum = "
|
|
447
|
+
checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099"
|
|
487
448
|
dependencies = [
|
|
488
|
-
"
|
|
489
|
-
"
|
|
490
|
-
"
|
|
491
|
-
"futures-core",
|
|
492
|
-
"futures-sink",
|
|
493
|
-
"http",
|
|
494
|
-
"indexmap",
|
|
495
|
-
"slab",
|
|
496
|
-
"tokio",
|
|
497
|
-
"tokio-util",
|
|
498
|
-
"tracing",
|
|
449
|
+
"cfg-if",
|
|
450
|
+
"libc",
|
|
451
|
+
"r-efi 6.0.0",
|
|
499
452
|
]
|
|
500
453
|
|
|
501
454
|
[[package]]
|
|
@@ -591,7 +544,6 @@ dependencies = [
|
|
|
591
544
|
"bytes",
|
|
592
545
|
"futures-channel",
|
|
593
546
|
"futures-core",
|
|
594
|
-
"h2",
|
|
595
547
|
"http",
|
|
596
548
|
"http-body",
|
|
597
549
|
"httparse",
|
|
@@ -615,22 +567,7 @@ dependencies = [
|
|
|
615
567
|
"tokio",
|
|
616
568
|
"tokio-rustls",
|
|
617
569
|
"tower-service",
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
[[package]]
|
|
621
|
-
name = "hyper-tls"
|
|
622
|
-
version = "0.6.0"
|
|
623
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
624
|
-
checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0"
|
|
625
|
-
dependencies = [
|
|
626
|
-
"bytes",
|
|
627
|
-
"http-body-util",
|
|
628
|
-
"hyper",
|
|
629
|
-
"hyper-util",
|
|
630
|
-
"native-tls",
|
|
631
|
-
"tokio",
|
|
632
|
-
"tokio-native-tls",
|
|
633
|
-
"tower-service",
|
|
570
|
+
"webpki-roots",
|
|
634
571
|
]
|
|
635
572
|
|
|
636
573
|
[[package]]
|
|
@@ -651,11 +588,9 @@ dependencies = [
|
|
|
651
588
|
"percent-encoding",
|
|
652
589
|
"pin-project-lite",
|
|
653
590
|
"socket2",
|
|
654
|
-
"system-configuration",
|
|
655
591
|
"tokio",
|
|
656
592
|
"tower-service",
|
|
657
593
|
"tracing",
|
|
658
|
-
"windows-registry",
|
|
659
594
|
]
|
|
660
595
|
|
|
661
596
|
[[package]]
|
|
@@ -785,16 +720,6 @@ dependencies = [
|
|
|
785
720
|
"icu_properties",
|
|
786
721
|
]
|
|
787
722
|
|
|
788
|
-
[[package]]
|
|
789
|
-
name = "indexmap"
|
|
790
|
-
version = "2.14.0"
|
|
791
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
792
|
-
checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9"
|
|
793
|
-
dependencies = [
|
|
794
|
-
"equivalent",
|
|
795
|
-
"hashbrown 0.17.1",
|
|
796
|
-
]
|
|
797
|
-
|
|
798
723
|
[[package]]
|
|
799
724
|
name = "ipnet"
|
|
800
725
|
version = "2.12.0"
|
|
@@ -911,16 +836,16 @@ dependencies = [
|
|
|
911
836
|
]
|
|
912
837
|
|
|
913
838
|
[[package]]
|
|
914
|
-
name = "
|
|
915
|
-
version = "
|
|
839
|
+
name = "lru-slab"
|
|
840
|
+
version = "0.1.2"
|
|
916
841
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
917
|
-
checksum = "
|
|
842
|
+
checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154"
|
|
918
843
|
|
|
919
844
|
[[package]]
|
|
920
|
-
name = "
|
|
921
|
-
version = "
|
|
845
|
+
name = "memchr"
|
|
846
|
+
version = "2.8.2"
|
|
922
847
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
923
|
-
checksum = "
|
|
848
|
+
checksum = "88904434abc2901f197fe8cc55f0445e7ded921dba5911dad2e2b39b48e663c4"
|
|
924
849
|
|
|
925
850
|
[[package]]
|
|
926
851
|
name = "mio"
|
|
@@ -945,23 +870,6 @@ dependencies = [
|
|
|
945
870
|
"windows-sys 0.61.2",
|
|
946
871
|
]
|
|
947
872
|
|
|
948
|
-
[[package]]
|
|
949
|
-
name = "native-tls"
|
|
950
|
-
version = "0.2.18"
|
|
951
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
952
|
-
checksum = "465500e14ea162429d264d44189adc38b199b62b1c21eea9f69e4b73cb03bbf2"
|
|
953
|
-
dependencies = [
|
|
954
|
-
"libc",
|
|
955
|
-
"log",
|
|
956
|
-
"openssl",
|
|
957
|
-
"openssl-probe",
|
|
958
|
-
"openssl-sys",
|
|
959
|
-
"schannel",
|
|
960
|
-
"security-framework",
|
|
961
|
-
"security-framework-sys",
|
|
962
|
-
"tempfile",
|
|
963
|
-
]
|
|
964
|
-
|
|
965
873
|
[[package]]
|
|
966
874
|
name = "num-traits"
|
|
967
875
|
version = "0.2.19"
|
|
@@ -983,49 +891,6 @@ version = "1.70.2"
|
|
|
983
891
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
984
892
|
checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe"
|
|
985
893
|
|
|
986
|
-
[[package]]
|
|
987
|
-
name = "openssl"
|
|
988
|
-
version = "0.10.81"
|
|
989
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
990
|
-
checksum = "77823a27f0babb03091cb9ed9ef80af3b39dbc82f97e8fa530374b7dafd87a45"
|
|
991
|
-
dependencies = [
|
|
992
|
-
"bitflags",
|
|
993
|
-
"cfg-if",
|
|
994
|
-
"foreign-types",
|
|
995
|
-
"libc",
|
|
996
|
-
"openssl-macros",
|
|
997
|
-
"openssl-sys",
|
|
998
|
-
]
|
|
999
|
-
|
|
1000
|
-
[[package]]
|
|
1001
|
-
name = "openssl-macros"
|
|
1002
|
-
version = "0.1.1"
|
|
1003
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1004
|
-
checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
|
|
1005
|
-
dependencies = [
|
|
1006
|
-
"proc-macro2",
|
|
1007
|
-
"quote",
|
|
1008
|
-
"syn",
|
|
1009
|
-
]
|
|
1010
|
-
|
|
1011
|
-
[[package]]
|
|
1012
|
-
name = "openssl-probe"
|
|
1013
|
-
version = "0.2.1"
|
|
1014
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1015
|
-
checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe"
|
|
1016
|
-
|
|
1017
|
-
[[package]]
|
|
1018
|
-
name = "openssl-sys"
|
|
1019
|
-
version = "0.9.117"
|
|
1020
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1021
|
-
checksum = "b47e7e6bb2c38cd930d25a23b40fa52e068c10e85f3e03a7f5ba5aaca5713695"
|
|
1022
|
-
dependencies = [
|
|
1023
|
-
"cc",
|
|
1024
|
-
"libc",
|
|
1025
|
-
"pkg-config",
|
|
1026
|
-
"vcpkg",
|
|
1027
|
-
]
|
|
1028
|
-
|
|
1029
894
|
[[package]]
|
|
1030
895
|
name = "option-ext"
|
|
1031
896
|
version = "0.2.0"
|
|
@@ -1088,6 +953,15 @@ dependencies = [
|
|
|
1088
953
|
"zerovec",
|
|
1089
954
|
]
|
|
1090
955
|
|
|
956
|
+
[[package]]
|
|
957
|
+
name = "ppv-lite86"
|
|
958
|
+
version = "0.2.21"
|
|
959
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
960
|
+
checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9"
|
|
961
|
+
dependencies = [
|
|
962
|
+
"zerocopy",
|
|
963
|
+
]
|
|
964
|
+
|
|
1091
965
|
[[package]]
|
|
1092
966
|
name = "proc-macro2"
|
|
1093
967
|
version = "1.0.106"
|
|
@@ -1097,6 +971,61 @@ dependencies = [
|
|
|
1097
971
|
"unicode-ident",
|
|
1098
972
|
]
|
|
1099
973
|
|
|
974
|
+
[[package]]
|
|
975
|
+
name = "quinn"
|
|
976
|
+
version = "0.11.11"
|
|
977
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
978
|
+
checksum = "0c1a41e437b6bbd489372cd4971de128e85c855f56c57f283d20ff016cf7c0a8"
|
|
979
|
+
dependencies = [
|
|
980
|
+
"bytes",
|
|
981
|
+
"cfg_aliases",
|
|
982
|
+
"pin-project-lite",
|
|
983
|
+
"quinn-proto",
|
|
984
|
+
"quinn-udp",
|
|
985
|
+
"rustc-hash",
|
|
986
|
+
"rustls",
|
|
987
|
+
"socket2",
|
|
988
|
+
"thiserror 2.0.18",
|
|
989
|
+
"tokio",
|
|
990
|
+
"tracing",
|
|
991
|
+
"web-time",
|
|
992
|
+
]
|
|
993
|
+
|
|
994
|
+
[[package]]
|
|
995
|
+
name = "quinn-proto"
|
|
996
|
+
version = "0.11.15"
|
|
997
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
998
|
+
checksum = "4fcb935c5bec503c2f0e306bdd3e58bb9029dcb14fa8d9ac76e3a5256ac0763e"
|
|
999
|
+
dependencies = [
|
|
1000
|
+
"bytes",
|
|
1001
|
+
"getrandom 0.3.4",
|
|
1002
|
+
"lru-slab",
|
|
1003
|
+
"rand",
|
|
1004
|
+
"ring",
|
|
1005
|
+
"rustc-hash",
|
|
1006
|
+
"rustls",
|
|
1007
|
+
"rustls-pki-types",
|
|
1008
|
+
"slab",
|
|
1009
|
+
"thiserror 2.0.18",
|
|
1010
|
+
"tinyvec",
|
|
1011
|
+
"tracing",
|
|
1012
|
+
"web-time",
|
|
1013
|
+
]
|
|
1014
|
+
|
|
1015
|
+
[[package]]
|
|
1016
|
+
name = "quinn-udp"
|
|
1017
|
+
version = "0.5.14"
|
|
1018
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1019
|
+
checksum = "addec6a0dcad8a8d96a771f815f0eaf55f9d1805756410b39f5fa81332574cbd"
|
|
1020
|
+
dependencies = [
|
|
1021
|
+
"cfg_aliases",
|
|
1022
|
+
"libc",
|
|
1023
|
+
"once_cell",
|
|
1024
|
+
"socket2",
|
|
1025
|
+
"tracing",
|
|
1026
|
+
"windows-sys 0.52.0",
|
|
1027
|
+
]
|
|
1028
|
+
|
|
1100
1029
|
[[package]]
|
|
1101
1030
|
name = "quote"
|
|
1102
1031
|
version = "1.0.46"
|
|
@@ -1106,12 +1035,47 @@ dependencies = [
|
|
|
1106
1035
|
"proc-macro2",
|
|
1107
1036
|
]
|
|
1108
1037
|
|
|
1038
|
+
[[package]]
|
|
1039
|
+
name = "r-efi"
|
|
1040
|
+
version = "5.3.0"
|
|
1041
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1042
|
+
checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f"
|
|
1043
|
+
|
|
1109
1044
|
[[package]]
|
|
1110
1045
|
name = "r-efi"
|
|
1111
1046
|
version = "6.0.0"
|
|
1112
1047
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1113
1048
|
checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf"
|
|
1114
1049
|
|
|
1050
|
+
[[package]]
|
|
1051
|
+
name = "rand"
|
|
1052
|
+
version = "0.9.4"
|
|
1053
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1054
|
+
checksum = "44c5af06bb1b7d3216d91932aed5265164bf384dc89cd6ba05cf59a35f5f76ea"
|
|
1055
|
+
dependencies = [
|
|
1056
|
+
"rand_chacha",
|
|
1057
|
+
"rand_core",
|
|
1058
|
+
]
|
|
1059
|
+
|
|
1060
|
+
[[package]]
|
|
1061
|
+
name = "rand_chacha"
|
|
1062
|
+
version = "0.9.0"
|
|
1063
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1064
|
+
checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb"
|
|
1065
|
+
dependencies = [
|
|
1066
|
+
"ppv-lite86",
|
|
1067
|
+
"rand_core",
|
|
1068
|
+
]
|
|
1069
|
+
|
|
1070
|
+
[[package]]
|
|
1071
|
+
name = "rand_core"
|
|
1072
|
+
version = "0.9.5"
|
|
1073
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1074
|
+
checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c"
|
|
1075
|
+
dependencies = [
|
|
1076
|
+
"getrandom 0.3.4",
|
|
1077
|
+
]
|
|
1078
|
+
|
|
1115
1079
|
[[package]]
|
|
1116
1080
|
name = "ratatui"
|
|
1117
1081
|
version = "0.26.3"
|
|
@@ -1179,30 +1143,27 @@ checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147"
|
|
|
1179
1143
|
dependencies = [
|
|
1180
1144
|
"base64",
|
|
1181
1145
|
"bytes",
|
|
1182
|
-
"encoding_rs",
|
|
1183
1146
|
"futures-core",
|
|
1184
1147
|
"futures-util",
|
|
1185
|
-
"h2",
|
|
1186
1148
|
"http",
|
|
1187
1149
|
"http-body",
|
|
1188
1150
|
"http-body-util",
|
|
1189
1151
|
"hyper",
|
|
1190
1152
|
"hyper-rustls",
|
|
1191
|
-
"hyper-tls",
|
|
1192
1153
|
"hyper-util",
|
|
1193
1154
|
"js-sys",
|
|
1194
1155
|
"log",
|
|
1195
|
-
"mime",
|
|
1196
|
-
"native-tls",
|
|
1197
1156
|
"percent-encoding",
|
|
1198
1157
|
"pin-project-lite",
|
|
1158
|
+
"quinn",
|
|
1159
|
+
"rustls",
|
|
1199
1160
|
"rustls-pki-types",
|
|
1200
1161
|
"serde",
|
|
1201
1162
|
"serde_json",
|
|
1202
1163
|
"serde_urlencoded",
|
|
1203
1164
|
"sync_wrapper",
|
|
1204
1165
|
"tokio",
|
|
1205
|
-
"tokio-
|
|
1166
|
+
"tokio-rustls",
|
|
1206
1167
|
"tokio-util",
|
|
1207
1168
|
"tower",
|
|
1208
1169
|
"tower-http",
|
|
@@ -1212,6 +1173,7 @@ dependencies = [
|
|
|
1212
1173
|
"wasm-bindgen-futures",
|
|
1213
1174
|
"wasm-streams",
|
|
1214
1175
|
"web-sys",
|
|
1176
|
+
"webpki-roots",
|
|
1215
1177
|
]
|
|
1216
1178
|
|
|
1217
1179
|
[[package]]
|
|
@@ -1253,6 +1215,12 @@ dependencies = [
|
|
|
1253
1215
|
"sqlite-wasm-rs",
|
|
1254
1216
|
]
|
|
1255
1217
|
|
|
1218
|
+
[[package]]
|
|
1219
|
+
name = "rustc-hash"
|
|
1220
|
+
version = "2.1.2"
|
|
1221
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1222
|
+
checksum = "94300abf3f1ae2e2b8ffb7b58043de3d399c73fa6f4b73826402a5c457614dbe"
|
|
1223
|
+
|
|
1256
1224
|
[[package]]
|
|
1257
1225
|
name = "rustix"
|
|
1258
1226
|
version = "1.1.4"
|
|
@@ -1273,6 +1241,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
1273
1241
|
checksum = "6b92b125634d9b795e7beca796cc790df15a7fb38323bf3196fda83292d06b1f"
|
|
1274
1242
|
dependencies = [
|
|
1275
1243
|
"once_cell",
|
|
1244
|
+
"ring",
|
|
1276
1245
|
"rustls-pki-types",
|
|
1277
1246
|
"rustls-webpki",
|
|
1278
1247
|
"subtle",
|
|
@@ -1285,6 +1254,7 @@ version = "1.14.1"
|
|
|
1285
1254
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1286
1255
|
checksum = "30a7197ae7eb376e574fe940d068c30fe0462554a3ddbe4eca7838e049c937a9"
|
|
1287
1256
|
dependencies = [
|
|
1257
|
+
"web-time",
|
|
1288
1258
|
"zeroize",
|
|
1289
1259
|
]
|
|
1290
1260
|
|
|
@@ -1311,44 +1281,12 @@ version = "1.0.23"
|
|
|
1311
1281
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1312
1282
|
checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f"
|
|
1313
1283
|
|
|
1314
|
-
[[package]]
|
|
1315
|
-
name = "schannel"
|
|
1316
|
-
version = "0.1.29"
|
|
1317
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1318
|
-
checksum = "91c1b7e4904c873ef0710c1f407dde2e6287de2bebc1bbbf7d430bb7cbffd939"
|
|
1319
|
-
dependencies = [
|
|
1320
|
-
"windows-sys 0.61.2",
|
|
1321
|
-
]
|
|
1322
|
-
|
|
1323
1284
|
[[package]]
|
|
1324
1285
|
name = "scopeguard"
|
|
1325
1286
|
version = "1.2.0"
|
|
1326
1287
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1327
1288
|
checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
|
|
1328
1289
|
|
|
1329
|
-
[[package]]
|
|
1330
|
-
name = "security-framework"
|
|
1331
|
-
version = "3.7.0"
|
|
1332
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1333
|
-
checksum = "b7f4bc775c73d9a02cde8bf7b2ec4c9d12743edf609006c7facc23998404cd1d"
|
|
1334
|
-
dependencies = [
|
|
1335
|
-
"bitflags",
|
|
1336
|
-
"core-foundation 0.10.1",
|
|
1337
|
-
"core-foundation-sys",
|
|
1338
|
-
"libc",
|
|
1339
|
-
"security-framework-sys",
|
|
1340
|
-
]
|
|
1341
|
-
|
|
1342
|
-
[[package]]
|
|
1343
|
-
name = "security-framework-sys"
|
|
1344
|
-
version = "2.17.0"
|
|
1345
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1346
|
-
checksum = "6ce2691df843ecc5d231c0b14ece2acc3efb62c0a398c7e1d875f3983ce020e3"
|
|
1347
|
-
dependencies = [
|
|
1348
|
-
"core-foundation-sys",
|
|
1349
|
-
"libc",
|
|
1350
|
-
]
|
|
1351
|
-
|
|
1352
1290
|
[[package]]
|
|
1353
1291
|
name = "serde"
|
|
1354
1292
|
version = "1.0.228"
|
|
@@ -1562,27 +1500,6 @@ dependencies = [
|
|
|
1562
1500
|
"syn",
|
|
1563
1501
|
]
|
|
1564
1502
|
|
|
1565
|
-
[[package]]
|
|
1566
|
-
name = "system-configuration"
|
|
1567
|
-
version = "0.7.0"
|
|
1568
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1569
|
-
checksum = "a13f3d0daba03132c0aa9767f98351b3488edc2c100cda2d2ec2b04f3d8d3c8b"
|
|
1570
|
-
dependencies = [
|
|
1571
|
-
"bitflags",
|
|
1572
|
-
"core-foundation 0.9.4",
|
|
1573
|
-
"system-configuration-sys",
|
|
1574
|
-
]
|
|
1575
|
-
|
|
1576
|
-
[[package]]
|
|
1577
|
-
name = "system-configuration-sys"
|
|
1578
|
-
version = "0.6.0"
|
|
1579
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1580
|
-
checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4"
|
|
1581
|
-
dependencies = [
|
|
1582
|
-
"core-foundation-sys",
|
|
1583
|
-
"libc",
|
|
1584
|
-
]
|
|
1585
|
-
|
|
1586
1503
|
[[package]]
|
|
1587
1504
|
name = "tempfile"
|
|
1588
1505
|
version = "3.27.0"
|
|
@@ -1646,6 +1563,21 @@ dependencies = [
|
|
|
1646
1563
|
"zerovec",
|
|
1647
1564
|
]
|
|
1648
1565
|
|
|
1566
|
+
[[package]]
|
|
1567
|
+
name = "tinyvec"
|
|
1568
|
+
version = "1.11.0"
|
|
1569
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1570
|
+
checksum = "3e61e67053d25a4e82c844e8424039d9745781b3fc4f32b8d55ed50f5f667ef3"
|
|
1571
|
+
dependencies = [
|
|
1572
|
+
"tinyvec_macros",
|
|
1573
|
+
]
|
|
1574
|
+
|
|
1575
|
+
[[package]]
|
|
1576
|
+
name = "tinyvec_macros"
|
|
1577
|
+
version = "0.1.1"
|
|
1578
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1579
|
+
checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
|
|
1580
|
+
|
|
1649
1581
|
[[package]]
|
|
1650
1582
|
name = "tokio"
|
|
1651
1583
|
version = "1.52.3"
|
|
@@ -1674,16 +1606,6 @@ dependencies = [
|
|
|
1674
1606
|
"syn",
|
|
1675
1607
|
]
|
|
1676
1608
|
|
|
1677
|
-
[[package]]
|
|
1678
|
-
name = "tokio-native-tls"
|
|
1679
|
-
version = "0.3.1"
|
|
1680
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1681
|
-
checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2"
|
|
1682
|
-
dependencies = [
|
|
1683
|
-
"native-tls",
|
|
1684
|
-
"tokio",
|
|
1685
|
-
]
|
|
1686
|
-
|
|
1687
1609
|
[[package]]
|
|
1688
1610
|
name = "tokio-rustls"
|
|
1689
1611
|
version = "0.26.4"
|
|
@@ -1857,6 +1779,15 @@ version = "0.11.1+wasi-snapshot-preview1"
|
|
|
1857
1779
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1858
1780
|
checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b"
|
|
1859
1781
|
|
|
1782
|
+
[[package]]
|
|
1783
|
+
name = "wasip2"
|
|
1784
|
+
version = "1.0.4+wasi-0.2.12"
|
|
1785
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1786
|
+
checksum = "b67efb37e106e55ce722a510d6b5f9c17f083e5fc79afc2badeb12cc313d9487"
|
|
1787
|
+
dependencies = [
|
|
1788
|
+
"wit-bindgen",
|
|
1789
|
+
]
|
|
1790
|
+
|
|
1860
1791
|
[[package]]
|
|
1861
1792
|
name = "wasm-bindgen"
|
|
1862
1793
|
version = "0.2.125"
|
|
@@ -1935,6 +1866,25 @@ dependencies = [
|
|
|
1935
1866
|
"wasm-bindgen",
|
|
1936
1867
|
]
|
|
1937
1868
|
|
|
1869
|
+
[[package]]
|
|
1870
|
+
name = "web-time"
|
|
1871
|
+
version = "1.1.0"
|
|
1872
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1873
|
+
checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb"
|
|
1874
|
+
dependencies = [
|
|
1875
|
+
"js-sys",
|
|
1876
|
+
"wasm-bindgen",
|
|
1877
|
+
]
|
|
1878
|
+
|
|
1879
|
+
[[package]]
|
|
1880
|
+
name = "webpki-roots"
|
|
1881
|
+
version = "1.0.8"
|
|
1882
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1883
|
+
checksum = "bf85cb06032201fa7c6f829d7db5a7e5aa45bcc0655327713065f6f0576731bf"
|
|
1884
|
+
dependencies = [
|
|
1885
|
+
"rustls-pki-types",
|
|
1886
|
+
]
|
|
1887
|
+
|
|
1938
1888
|
[[package]]
|
|
1939
1889
|
name = "winapi"
|
|
1940
1890
|
version = "0.3.9"
|
|
@@ -1998,17 +1948,6 @@ version = "0.2.1"
|
|
|
1998
1948
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1999
1949
|
checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
|
|
2000
1950
|
|
|
2001
|
-
[[package]]
|
|
2002
|
-
name = "windows-registry"
|
|
2003
|
-
version = "0.6.1"
|
|
2004
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2005
|
-
checksum = "02752bf7fbdcce7f2a27a742f798510f3e5ad88dbe84871e5168e2120c3d5720"
|
|
2006
|
-
dependencies = [
|
|
2007
|
-
"windows-link",
|
|
2008
|
-
"windows-result",
|
|
2009
|
-
"windows-strings",
|
|
2010
|
-
]
|
|
2011
|
-
|
|
2012
1951
|
[[package]]
|
|
2013
1952
|
name = "windows-result"
|
|
2014
1953
|
version = "0.4.1"
|
|
@@ -2184,6 +2123,12 @@ version = "0.52.6"
|
|
|
2184
2123
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2185
2124
|
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
|
|
2186
2125
|
|
|
2126
|
+
[[package]]
|
|
2127
|
+
name = "wit-bindgen"
|
|
2128
|
+
version = "0.57.1"
|
|
2129
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2130
|
+
checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e"
|
|
2131
|
+
|
|
2187
2132
|
[[package]]
|
|
2188
2133
|
name = "writeable"
|
|
2189
2134
|
version = "0.6.3"
|
|
@@ -2213,6 +2158,26 @@ dependencies = [
|
|
|
2213
2158
|
"synstructure",
|
|
2214
2159
|
]
|
|
2215
2160
|
|
|
2161
|
+
[[package]]
|
|
2162
|
+
name = "zerocopy"
|
|
2163
|
+
version = "0.8.52"
|
|
2164
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2165
|
+
checksum = "ce1022995ff5ff5d841ad7d994facc23098cd40152f2c1d11cd607c6f530653f"
|
|
2166
|
+
dependencies = [
|
|
2167
|
+
"zerocopy-derive",
|
|
2168
|
+
]
|
|
2169
|
+
|
|
2170
|
+
[[package]]
|
|
2171
|
+
name = "zerocopy-derive"
|
|
2172
|
+
version = "0.8.52"
|
|
2173
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2174
|
+
checksum = "1ae7f38b72ec2a254e2b87ef277cf2cd4fb97cbebf944faa6f33354da0867930"
|
|
2175
|
+
dependencies = [
|
|
2176
|
+
"proc-macro2",
|
|
2177
|
+
"quote",
|
|
2178
|
+
"syn",
|
|
2179
|
+
]
|
|
2180
|
+
|
|
2216
2181
|
[[package]]
|
|
2217
2182
|
name = "zerofrom"
|
|
2218
2183
|
version = "0.1.8"
|
package/Cargo.toml
CHANGED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const https = require('https');
|
|
4
|
+
|
|
5
|
+
const pkg = require('../package.json');
|
|
6
|
+
const noticeFile = path.join(__dirname, '.update-notice');
|
|
7
|
+
|
|
8
|
+
const options = {
|
|
9
|
+
hostname: 'registry.npmjs.org',
|
|
10
|
+
path: `/${pkg.name}/latest`,
|
|
11
|
+
timeout: 3000,
|
|
12
|
+
headers: {
|
|
13
|
+
'User-Agent': 'cobolx-cli-update-checker'
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const req = https.get(options, (res) => {
|
|
18
|
+
if (res.statusCode !== 200) return;
|
|
19
|
+
let data = '';
|
|
20
|
+
res.on('data', (chunk) => { data += chunk; });
|
|
21
|
+
res.on('end', () => {
|
|
22
|
+
try {
|
|
23
|
+
const info = JSON.parse(data);
|
|
24
|
+
const latest = info.version;
|
|
25
|
+
if (latest && latest !== pkg.version) {
|
|
26
|
+
const msg = [
|
|
27
|
+
'\x1b[33m---------------------------------------------------------\x1b[0m',
|
|
28
|
+
` 💡 \x1b[36mUpdate available:\x1b[0m \x1b[32m${latest}\x1b[0m (current: ${pkg.version})`,
|
|
29
|
+
` Run \x1b[33mnpm update -g ${pkg.name}\x1b[0m to update!`,
|
|
30
|
+
'\x1b[33m---------------------------------------------------------\x1b[0m'
|
|
31
|
+
].join('\n');
|
|
32
|
+
fs.writeFileSync(noticeFile, msg, 'utf8');
|
|
33
|
+
}
|
|
34
|
+
} catch (e) {
|
|
35
|
+
// ignore
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
req.on('error', () => {
|
|
41
|
+
// ignore
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
req.end();
|
package/bin/cobolx.js
CHANGED
|
@@ -14,6 +14,21 @@ if (!fs.existsSync(binaryPath)) {
|
|
|
14
14
|
process.exit(1);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
+
// 1. Check for pending update notification from previous background checks
|
|
18
|
+
const noticeFile = path.join(__dirname, '.update-notice');
|
|
19
|
+
if (fs.existsSync(noticeFile)) {
|
|
20
|
+
try {
|
|
21
|
+
const notice = fs.readFileSync(noticeFile, 'utf8').trim();
|
|
22
|
+
if (notice) {
|
|
23
|
+
console.log('\n' + notice);
|
|
24
|
+
}
|
|
25
|
+
fs.unlinkSync(noticeFile);
|
|
26
|
+
} catch (err) {
|
|
27
|
+
// ignore
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// 2. Start the native binary child process
|
|
17
32
|
const args = process.argv.slice(2);
|
|
18
33
|
const child = spawn(binaryPath, args, { stdio: 'inherit' });
|
|
19
34
|
|
|
@@ -23,5 +38,44 @@ child.on('error', (err) => {
|
|
|
23
38
|
});
|
|
24
39
|
|
|
25
40
|
child.on('close', (code) => {
|
|
41
|
+
// 3. Trigger background update check
|
|
42
|
+
triggerBackgroundUpdateCheck();
|
|
26
43
|
process.exit(code ?? 0);
|
|
27
44
|
});
|
|
45
|
+
|
|
46
|
+
function triggerBackgroundUpdateCheck() {
|
|
47
|
+
try {
|
|
48
|
+
const pkg = require('../package.json');
|
|
49
|
+
const cacheFile = path.join(__dirname, '.last-update-check');
|
|
50
|
+
const CHECK_INTERVAL = 24 * 60 * 60 * 1000; // 24 hours
|
|
51
|
+
const now = Date.now();
|
|
52
|
+
|
|
53
|
+
let lastCheck = 0;
|
|
54
|
+
if (fs.existsSync(cacheFile)) {
|
|
55
|
+
lastCheck = parseInt(fs.readFileSync(cacheFile, 'utf8'), 10) || 0;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
if (now - lastCheck < CHECK_INTERVAL) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// Write new timestamp immediately to throttle requests
|
|
63
|
+
fs.writeFileSync(cacheFile, now.toString(), 'utf8');
|
|
64
|
+
|
|
65
|
+
// Spawn a detached background process to check for updates
|
|
66
|
+
const checkerScript = path.join(__dirname, 'check-update.js');
|
|
67
|
+
|
|
68
|
+
// Ignore outputs or pipe to a log file
|
|
69
|
+
const logFile = path.join(__dirname, '.checker-log');
|
|
70
|
+
const out = fs.openSync(logFile, 'a');
|
|
71
|
+
|
|
72
|
+
const child = spawn(process.execPath, [checkerScript], {
|
|
73
|
+
detached: true,
|
|
74
|
+
stdio: ['ignore', out, out]
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
child.unref();
|
|
78
|
+
} catch (err) {
|
|
79
|
+
// ignore
|
|
80
|
+
}
|
|
81
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cobolx",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2-canary.25",
|
|
4
4
|
"description": "CobolX CLI",
|
|
5
5
|
"main": "bin/cobolx.js",
|
|
6
6
|
"bin": {
|
|
@@ -23,5 +23,8 @@
|
|
|
23
23
|
"bugs": {
|
|
24
24
|
"url": "https://github.com/WSPlXA/cobolX/issues"
|
|
25
25
|
},
|
|
26
|
-
"homepage": "https://github.com/WSPlXA/cobolX#readme"
|
|
26
|
+
"homepage": "https://github.com/WSPlXA/cobolX#readme",
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"cobolx": "^1.0.2-canary.24"
|
|
29
|
+
}
|
|
27
30
|
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
|
|
4
|
+
const githubRef = process.env.GITHUB_REF || '';
|
|
5
|
+
const runNumber = process.env.GITHUB_RUN_NUMBER || '0';
|
|
6
|
+
const runAttempt = process.env.GITHUB_RUN_ATTEMPT || '1';
|
|
7
|
+
const githubEnv = process.env.GITHUB_ENV;
|
|
8
|
+
|
|
9
|
+
const pkgPath = path.join(__dirname, '../package.json');
|
|
10
|
+
const cargoPath = path.join(__dirname, '../Cargo.toml');
|
|
11
|
+
|
|
12
|
+
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
|
|
13
|
+
const baseVersion = pkg.version;
|
|
14
|
+
|
|
15
|
+
let version = baseVersion;
|
|
16
|
+
let isCanary = 'false';
|
|
17
|
+
let npmTag = 'latest';
|
|
18
|
+
|
|
19
|
+
if (githubRef.startsWith('refs/tags/v')) {
|
|
20
|
+
version = githubRef.replace('refs/tags/v', '');
|
|
21
|
+
} else {
|
|
22
|
+
const attemptSuffix = runAttempt !== '1' ? `.${runAttempt}` : '';
|
|
23
|
+
version = `${baseVersion}-canary.${runNumber}${attemptSuffix}`;
|
|
24
|
+
isCanary = 'true';
|
|
25
|
+
npmTag = 'canary';
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
console.log(`Setting version to: ${version}`);
|
|
29
|
+
console.log(`Is Canary: ${isCanary}`);
|
|
30
|
+
console.log(`NPM Tag: ${npmTag}`);
|
|
31
|
+
|
|
32
|
+
// Update package.json
|
|
33
|
+
pkg.version = version;
|
|
34
|
+
fs.writeFileSync(pkgPath, JSON.stringify(pkg, null, 2) + '\n', 'utf8');
|
|
35
|
+
|
|
36
|
+
// Update Cargo.toml
|
|
37
|
+
let cargo = fs.readFileSync(cargoPath, 'utf8');
|
|
38
|
+
cargo = cargo.replace(/version\s*=\s*"[^"]+"/, `version = "${version}"`);
|
|
39
|
+
fs.writeFileSync(cargoPath, cargo, 'utf8');
|
|
40
|
+
|
|
41
|
+
// Write to GITHUB_ENV
|
|
42
|
+
if (githubEnv && fs.existsSync(githubEnv)) {
|
|
43
|
+
fs.appendFileSync(githubEnv, `RELEASE_VERSION=${version}\nIS_CANARY=${isCanary}\nNPM_TAG=${npmTag}\n`, 'utf8');
|
|
44
|
+
}
|
package/src/agent/client.rs
CHANGED
|
@@ -877,10 +877,19 @@ impl AgentRouter {
|
|
|
877
877
|
sandbox: &Path,
|
|
878
878
|
user_path: &str,
|
|
879
879
|
) -> Result<std::path::PathBuf, String> {
|
|
880
|
-
|
|
881
|
-
|
|
880
|
+
// Strip leading separators from non-absolute paths so that an LLM-generated
|
|
881
|
+
// path like "/docs/README.md" is treated as "docs/README.md" relative to the
|
|
882
|
+
// sandbox root, rather than escaping to the drive root on Windows.
|
|
883
|
+
let normalized = if std::path::Path::new(user_path).is_absolute() {
|
|
884
|
+
user_path.to_string()
|
|
882
885
|
} else {
|
|
883
|
-
|
|
886
|
+
user_path.trim_start_matches(['/', '\\']).to_string()
|
|
887
|
+
};
|
|
888
|
+
|
|
889
|
+
let candidate = if std::path::Path::new(&normalized).is_absolute() {
|
|
890
|
+
std::path::PathBuf::from(&normalized)
|
|
891
|
+
} else {
|
|
892
|
+
sandbox.join(&normalized)
|
|
884
893
|
};
|
|
885
894
|
|
|
886
895
|
// Resolve the sandbox root first so the comparison is reliable even if the
|
package/src/ui/tui.rs
CHANGED
|
@@ -600,6 +600,9 @@ pub fn run_tui() -> Result<(), io::Error> {
|
|
|
600
600
|
// Non-blocking poll for crossterm events
|
|
601
601
|
if event::poll(std::time::Duration::from_millis(50))? {
|
|
602
602
|
if let Event::Key(key) = event::read()? {
|
|
603
|
+
if key.kind != event::KeyEventKind::Press {
|
|
604
|
+
continue;
|
|
605
|
+
}
|
|
603
606
|
if key.code == KeyCode::Char('c')
|
|
604
607
|
&& key.modifiers.contains(event::KeyModifiers::CONTROL)
|
|
605
608
|
{
|