js-dos 7.2.3 → 7.2.7

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.
Files changed (50) hide show
  1. package/.github/workflows/codeql-analysis.yml +70 -0
  2. package/README.md +6 -5
  3. package/dist/emulators-ui-loader.png +0 -0
  4. package/dist/js-dos.css +208 -15
  5. package/dist/js-dos.js +2 -2
  6. package/dist/js-dos.js.map +1 -1
  7. package/dist/types/src/backend/jj/jj-config.d.ts +6 -0
  8. package/dist/types/src/backend/jj/latency.d.ts +8 -0
  9. package/dist/types/src/{personal.d.ts → backend/v7/personal.d.ts} +0 -0
  10. package/dist/types/src/backend/v7/v7-config.d.ts +8 -0
  11. package/dist/types/src/components/region.d.ts +6 -0
  12. package/dist/types/src/components/sidebar/active-token.d.ts +2 -0
  13. package/dist/types/src/components/sidebar/create-token.d.ts +2 -0
  14. package/dist/types/src/components/sidebar/latency-info.d.ts +7 -0
  15. package/dist/types/src/components/sidebar/main.d.ts +2 -0
  16. package/dist/types/src/components/sidebar/networking.d.ts +2 -0
  17. package/dist/types/src/components/tip.d.ts +2 -0
  18. package/dist/types/src/hardware-transport-layer.d.ts +4 -2
  19. package/dist/types/src/icons.d.ts +18 -0
  20. package/dist/types/src/player-app.d.ts +18 -0
  21. package/dist/types/src/player.d.ts +2 -1
  22. package/dist/types/src/xhr.d.ts +1 -0
  23. package/dist/types/{sls → v7-services}/src/personal.d.ts +0 -0
  24. package/dist/wdosbox.js +1 -1
  25. package/dist/wdosbox.js.symbols +3132 -3071
  26. package/dist/wdosbox.wasm +0 -0
  27. package/examples/digger/index.html +9 -7
  28. package/package.json +7 -4
  29. package/v7-services/.env +6 -0
  30. package/v7-services/ok.yaml +24 -0
  31. package/v7-services/package.json +17 -0
  32. package/v7-services/redeploy-ok.sh +25 -0
  33. package/v7-services/serverless.yml +140 -0
  34. package/v7-services/src/networking/day.ts +5 -0
  35. package/v7-services/src/networking/get-free-token.ts +33 -0
  36. package/v7-services/src/networking/get-token-cost.ts +31 -0
  37. package/v7-services/src/networking/get-token-info.ts +16 -0
  38. package/v7-services/src/networking/ipx/put-ipx-ip.ts +20 -0
  39. package/v7-services/src/networking/ipx/start-ipx.ts +16 -0
  40. package/v7-services/src/networking/ipx/stop-ipx.ts +19 -0
  41. package/v7-services/src/networking/limits.ts +3 -0
  42. package/v7-services/src/networking/token.ts +238 -0
  43. package/v7-services/src/ok.ts +7 -0
  44. package/v7-services/src/personal-acl.ts +33 -0
  45. package/v7-services/src/personal-put.ts +35 -0
  46. package/v7-services/src/personal.ts +18 -0
  47. package/v7-services/src/responses.ts +28 -0
  48. package/v7-services/src/user.ts +3 -0
  49. package/v7-services/yarn.lock +4400 -0
  50. package/dist/emulators-ui-loader.gif +0 -0
@@ -0,0 +1,70 @@
1
+ # For most projects, this workflow file will not need changing; you simply need
2
+ # to commit it to your repository.
3
+ #
4
+ # You may wish to alter this file to override the set of languages analyzed,
5
+ # or to provide custom queries or build logic.
6
+ #
7
+ # ******** NOTE ********
8
+ # We have attempted to detect the languages in your repository. Please check
9
+ # the `language` matrix defined below to confirm you have the correct set of
10
+ # supported CodeQL languages.
11
+ #
12
+ name: "CodeQL"
13
+
14
+ on:
15
+ push:
16
+ branches: [ 7.xx ]
17
+ pull_request:
18
+ # The branches below must be a subset of the branches above
19
+ branches: [ 7.xx ]
20
+ schedule:
21
+ - cron: '33 3 * * 6'
22
+
23
+ jobs:
24
+ analyze:
25
+ name: Analyze
26
+ runs-on: ubuntu-latest
27
+ permissions:
28
+ actions: read
29
+ contents: read
30
+ security-events: write
31
+
32
+ strategy:
33
+ fail-fast: false
34
+ matrix:
35
+ language: [ 'typescript' ]
36
+ # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
37
+ # Learn more about CodeQL language support at https://git.io/codeql-language-support
38
+
39
+ steps:
40
+ - name: Checkout repository
41
+ uses: actions/checkout@v2
42
+
43
+ # Initializes the CodeQL tools for scanning.
44
+ - name: Initialize CodeQL
45
+ uses: github/codeql-action/init@v1
46
+ with:
47
+ languages: ${{ matrix.language }}
48
+ # If you wish to specify custom queries, you can do so here or in a config file.
49
+ # By default, queries listed here will override any specified in a config file.
50
+ # Prefix the list here with "+" to use these queries and those in the config file.
51
+ # queries: ./path/to/local/query, your-org/your-repo/queries@main
52
+
53
+ # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
54
+ # If this step fails, then you should remove it and run the build manually (see below)
55
+ - name: Autobuild
56
+ uses: github/codeql-action/autobuild@v1
57
+
58
+ # ℹ️ Command-line programs to run using the OS shell.
59
+ # 📚 https://git.io/JvXDl
60
+
61
+ # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
62
+ # and modify them (or add more) to build your code if your project
63
+ # uses a compiled language
64
+
65
+ #- run: |
66
+ # make bootstrap
67
+ # make release
68
+
69
+ - name: Perform CodeQL Analysis
70
+ uses: github/codeql-action/analyze@v1
package/README.md CHANGED
@@ -5,9 +5,11 @@ js-dos is a javascript library that allows you to run DOS programs in browser. j
5
5
 
6
6
  [Documentation](https://js-dos.com/).
7
7
 
8
- Subscribe our [twitter](https://twitter.com/doszone_db/) channel for updates.
8
+ Ask a technical question in [Q&A](https://talks.dos.zone/c/questions-answers/).
9
+
10
+ Join our [discord](https://discord.com/invite/hMVYEbG), [telegram](https://t.me/doszone) community.
9
11
 
10
- Join our [discord](https://discord.com/invite/hMVYEbG) community.
12
+ Subscribe our [twitter](https://twitter.com/doszone_db/) channel for updates.
11
13
 
12
14
  ## Building
13
15
 
@@ -17,7 +19,7 @@ yarn
17
19
  NODE_ENV=production yarn run gulp
18
20
  ```
19
21
 
20
- Also you can build js and css separately:
22
+ Also, you can build js and css separately:
21
23
 
22
24
  ```
23
25
  yarn run gulp js
@@ -26,14 +28,13 @@ yarn run gulp css
26
28
 
27
29
  ## Example
28
30
 
29
- To run builtin example do:
31
+ To run built-in example do:
30
32
 
31
33
  ```
32
34
  hs .
33
35
  firefox examples/digger/index.html
34
36
  ```
35
37
 
36
-
37
38
  # Legacy js-dos
38
39
 
39
40
  ## js-dos 6.22
Binary file
package/dist/js-dos.css CHANGED
@@ -68,7 +68,7 @@
68
68
  }
69
69
 
70
70
  .emulator-loader {
71
- background: url(emulators-ui-loader.gif) no-repeat;
71
+ background: url(emulators-ui-loader.png) no-repeat;
72
72
  background-size: cover;
73
73
  width: 50px;
74
74
  height: 50px;
@@ -155,7 +155,7 @@
155
155
  border-color: rgba(255, 255, 255, 0.5);
156
156
 
157
157
  border-style: solid;
158
- box-shadow: 0 0 2px 2px rgb(255 255 255 / 50%), inset 0 0 2px 2px rgb(255 255 255 / 50%);
158
+ box-shadow: 0 0 2px 2px rgba(255, 255, 255, 0.5), inset 0 0 2px 2px rgba(255, 255, 255, 0.5);
159
159
  }
160
160
 
161
161
  .emulator-button {
@@ -209,7 +209,7 @@
209
209
  }
210
210
 
211
211
  .emulator-options {
212
- justify-content: end;
212
+ justify-content: flex-end;
213
213
  flex-wrap: wrap-reverse;
214
214
  display: flex;
215
215
  flex-direction: row;
@@ -244,7 +244,7 @@
244
244
  /* simple-keyboard */
245
245
  .hg-theme-default{width:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;box-sizing:border-box;overflow:hidden;touch-action:manipulation}.hg-theme-default .hg-button span{pointer-events:none}.hg-theme-default button.hg-button{border-width:0;outline:0;font-size:inherit}.hg-theme-default{font-family:"HelveticaNeue-Light","Helvetica Neue Light","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;background-color:#ececec;padding:5px;border-radius:5px}.hg-theme-default .hg-button{display:inline-block;flex-grow:1}.hg-theme-default .hg-row{display:flex}.hg-theme-default .hg-row:not(:last-child){margin-bottom:5px}.hg-theme-default .hg-row .hg-button-container,.hg-theme-default .hg-row .hg-button:not(:last-child){margin-right:5px}.hg-theme-default .hg-row>div:last-child{margin-right:0}.hg-theme-default .hg-row .hg-button-container{display:flex}.hg-theme-default .hg-button{box-shadow:0 0 3px -1px rgba(0,0,0,.3);height:40px;border-radius:5px;box-sizing:border-box;padding:5px;background:#fff;border-bottom:1px solid #b5b5b5;cursor:pointer;display:flex;align-items:center;justify-content:center;-webkit-tap-highlight-color:rgba(0,0,0,0)}.hg-theme-default .hg-button.hg-activeButton{background:#efefef}.hg-theme-default.hg-layout-numeric .hg-button{width:33.3%;height:60px;align-items:center;display:flex;justify-content:center}.hg-theme-default .hg-button.hg-button-numpadadd,.hg-theme-default .hg-button.hg-button-numpadenter{height:85px}.hg-theme-default .hg-button.hg-button-numpad0{width:105px}.hg-theme-default .hg-button.hg-button-com{max-width:85px}.hg-theme-default .hg-button.hg-standardBtn.hg-button-at{max-width:45px}.hg-theme-default .hg-button.hg-selectedButton{background:rgba(5,25,70,.53);color:#fff}.hg-theme-default .hg-button.hg-standardBtn[data-skbtn=".com"]{max-width:82px}.hg-theme-default .hg-button.hg-standardBtn[data-skbtn="@"]{max-width:60px}
246
246
 
247
- /*! tailwindcss v2.2.17 | MIT License | https://tailwindcss.com */
247
+ /*! tailwindcss v2.2.19 | MIT License | https://tailwindcss.com */
248
248
 
249
249
  /*! modern-normalize v1.1.0 | MIT License | https://github.com/sindresorhus/modern-normalize */
250
250
 
@@ -469,6 +469,11 @@ button,
469
469
  Remove the inner border and padding in Firefox.
470
470
  */
471
471
 
472
+ ::-moz-focus-inner {
473
+ border-style: none;
474
+ padding: 0;
475
+ }
476
+
472
477
  /**
473
478
  Restore the focus styles unset by the previous rule.
474
479
  */
@@ -498,6 +503,11 @@ progress {
498
503
  Correct the cursor style of increment and decrement buttons in Safari.
499
504
  */
500
505
 
506
+ ::-webkit-inner-spin-button,
507
+ ::-webkit-outer-spin-button {
508
+ height: auto;
509
+ }
510
+
501
511
  /**
502
512
  1. Correct the odd appearance in Chrome and Safari.
503
513
  2. Correct the outline style in Safari.
@@ -507,11 +517,22 @@ Correct the cursor style of increment and decrement buttons in Safari.
507
517
  Remove the inner padding in Chrome and Safari on macOS.
508
518
  */
509
519
 
520
+ ::-webkit-search-decoration {
521
+ -webkit-appearance: none;
522
+ }
523
+
510
524
  /**
511
525
  1. Correct the inability to style clickable types in iOS and Safari.
512
526
  2. Change font properties to 'inherit' in Safari.
513
527
  */
514
528
 
529
+ ::-webkit-file-upload-button {
530
+ -webkit-appearance: button;
531
+ /* 1 */
532
+ font: inherit;
533
+ /* 2 */
534
+ }
535
+
515
536
  /*
516
537
  Interactive
517
538
  ===========
@@ -809,8 +830,12 @@ video {
809
830
  top: 0px;
810
831
  }
811
832
 
812
- .top-1 {
813
- top: 0.25rem;
833
+ .top-2 {
834
+ top: 0.5rem;
835
+ }
836
+
837
+ .top-5 {
838
+ top: 1.25rem;
814
839
  }
815
840
 
816
841
  .top-1\/2 {
@@ -821,20 +846,24 @@ video {
821
846
  right: 0px;
822
847
  }
823
848
 
824
- .bottom-0 {
825
- bottom: 0px;
849
+ .right-2 {
850
+ right: 0.5rem;
826
851
  }
827
852
 
828
- .bottom-2 {
829
- bottom: 0.5rem;
853
+ .right-5 {
854
+ right: 1.25rem;
855
+ }
856
+
857
+ .bottom-0 {
858
+ bottom: 0px;
830
859
  }
831
860
 
832
861
  .left-0 {
833
862
  left: 0px;
834
863
  }
835
864
 
836
- .left-1 {
837
- left: 0.25rem;
865
+ .left-2 {
866
+ left: 0.5rem;
838
867
  }
839
868
 
840
869
  .left-10 {
@@ -845,6 +874,14 @@ video {
845
874
  z-index: 50;
846
875
  }
847
876
 
877
+ .col-span-2 {
878
+ grid-column: span 2 / span 2;
879
+ }
880
+
881
+ .float-left {
882
+ float: left;
883
+ }
884
+
848
885
  .mx-2 {
849
886
  margin-left: 0.5rem;
850
887
  margin-right: 0.5rem;
@@ -863,6 +900,10 @@ video {
863
900
  margin-top: 0.5rem;
864
901
  }
865
902
 
903
+ .-mt-1 {
904
+ margin-top: -0.25rem;
905
+ }
906
+
866
907
  .-mt-6 {
867
908
  margin-top: -1.5rem;
868
909
  }
@@ -887,6 +928,14 @@ video {
887
928
  margin-left: 0.5rem;
888
929
  }
889
930
 
931
+ .inline-block {
932
+ display: inline-block;
933
+ }
934
+
935
+ .inline {
936
+ display: inline;
937
+ }
938
+
890
939
  .flex {
891
940
  display: flex;
892
941
  }
@@ -895,6 +944,10 @@ video {
895
944
  display: table;
896
945
  }
897
946
 
947
+ .grid {
948
+ display: grid;
949
+ }
950
+
898
951
  .hidden {
899
952
  display: none;
900
953
  }
@@ -903,6 +956,10 @@ video {
903
956
  height: 1rem;
904
957
  }
905
958
 
959
+ .h-5 {
960
+ height: 1.25rem;
961
+ }
962
+
906
963
  .h-6 {
907
964
  height: 1.5rem;
908
965
  }
@@ -919,6 +976,10 @@ video {
919
976
  height: 100%;
920
977
  }
921
978
 
979
+ .max-h-72 {
980
+ max-height: 18rem;
981
+ }
982
+
922
983
  .w-4 {
923
984
  width: 1rem;
924
985
  }
@@ -939,6 +1000,14 @@ video {
939
1000
  width: 2.5rem;
940
1001
  }
941
1002
 
1003
+ .w-24 {
1004
+ width: 6rem;
1005
+ }
1006
+
1007
+ .w-64 {
1008
+ width: 16rem;
1009
+ }
1010
+
942
1011
  .w-full {
943
1012
  width: 100%;
944
1013
  }
@@ -1037,6 +1106,11 @@ video {
1037
1106
  }
1038
1107
  }
1039
1108
 
1109
+ .animate-spin {
1110
+ -webkit-animation: spin 1s linear infinite;
1111
+ animation: spin 1s linear infinite;
1112
+ }
1113
+
1040
1114
  .animate-pulse {
1041
1115
  -webkit-animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
1042
1116
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
@@ -1046,6 +1120,14 @@ video {
1046
1120
  cursor: pointer;
1047
1121
  }
1048
1122
 
1123
+ .cursor-not-allowed {
1124
+ cursor: not-allowed;
1125
+ }
1126
+
1127
+ .grid-cols-2 {
1128
+ grid-template-columns: repeat(2, minmax(0, 1fr));
1129
+ }
1130
+
1049
1131
  .flex-row {
1050
1132
  flex-direction: row;
1051
1133
  }
@@ -1054,6 +1136,10 @@ video {
1054
1136
  flex-direction: column;
1055
1137
  }
1056
1138
 
1139
+ .flex-wrap {
1140
+ flex-wrap: wrap;
1141
+ }
1142
+
1057
1143
  .items-center {
1058
1144
  align-items: center;
1059
1145
  }
@@ -1062,22 +1148,54 @@ video {
1062
1148
  justify-content: center;
1063
1149
  }
1064
1150
 
1151
+ .justify-between {
1152
+ justify-content: space-between;
1153
+ }
1154
+
1155
+ .justify-around {
1156
+ justify-content: space-around;
1157
+ }
1158
+
1065
1159
  .justify-evenly {
1066
1160
  justify-content: space-evenly;
1067
1161
  }
1068
1162
 
1163
+ .gap-4 {
1164
+ gap: 1rem;
1165
+ }
1166
+
1069
1167
  .self-center {
1070
1168
  align-self: center;
1071
1169
  }
1072
1170
 
1171
+ .overflow-auto {
1172
+ overflow: auto;
1173
+ }
1174
+
1073
1175
  .overflow-hidden {
1074
1176
  overflow: hidden;
1075
1177
  }
1076
1178
 
1179
+ .overflow-y-auto {
1180
+ overflow-y: auto;
1181
+ }
1182
+
1183
+ .overflow-x-hidden {
1184
+ overflow-x: hidden;
1185
+ }
1186
+
1077
1187
  .overflow-ellipsis {
1078
1188
  text-overflow: ellipsis;
1079
1189
  }
1080
1190
 
1191
+ .whitespace-nowrap {
1192
+ white-space: nowrap;
1193
+ }
1194
+
1195
+ .break-words {
1196
+ overflow-wrap: break-word;
1197
+ }
1198
+
1081
1199
  .rounded {
1082
1200
  border-radius: 0.25rem;
1083
1201
  }
@@ -1108,6 +1226,10 @@ video {
1108
1226
  border-bottom-width: 2px;
1109
1227
  }
1110
1228
 
1229
+ .border-b {
1230
+ border-bottom-width: 1px;
1231
+ }
1232
+
1111
1233
  .border-l-2 {
1112
1234
  border-left-width: 2px;
1113
1235
  }
@@ -1117,6 +1239,11 @@ video {
1117
1239
  border-color: rgba(156, 163, 175, var(--tw-border-opacity));
1118
1240
  }
1119
1241
 
1242
+ .border-gray-800 {
1243
+ --tw-border-opacity: 1;
1244
+ border-color: rgba(31, 41, 55, var(--tw-border-opacity));
1245
+ }
1246
+
1120
1247
  .border-green-200 {
1121
1248
  --tw-border-opacity: 1;
1122
1249
  border-color: rgba(167, 243, 208, var(--tw-border-opacity));
@@ -1137,6 +1264,20 @@ video {
1137
1264
  background-color: rgba(229, 231, 235, var(--tw-bg-opacity));
1138
1265
  }
1139
1266
 
1267
+ .bg-red-200 {
1268
+ --tw-bg-opacity: 1;
1269
+ background-color: rgba(254, 202, 202, var(--tw-bg-opacity));
1270
+ }
1271
+
1272
+ .bg-green-200 {
1273
+ --tw-bg-opacity: 1;
1274
+ background-color: rgba(167, 243, 208, var(--tw-bg-opacity));
1275
+ }
1276
+
1277
+ .p-2 {
1278
+ padding: 0.5rem;
1279
+ }
1280
+
1140
1281
  .px-2 {
1141
1282
  padding-left: 0.5rem;
1142
1283
  padding-right: 0.5rem;
@@ -1152,6 +1293,11 @@ video {
1152
1293
  padding-right: 2rem;
1153
1294
  }
1154
1295
 
1296
+ .py-1 {
1297
+ padding-top: 0.25rem;
1298
+ padding-bottom: 0.25rem;
1299
+ }
1300
+
1155
1301
  .pt-6 {
1156
1302
  padding-top: 1.5rem;
1157
1303
  }
@@ -1172,8 +1318,27 @@ video {
1172
1318
  padding-left: 0.5rem;
1173
1319
  }
1174
1320
 
1175
- .font-mono {
1176
- font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
1321
+ .text-center {
1322
+ text-align: center;
1323
+ }
1324
+
1325
+ .text-right {
1326
+ text-align: right;
1327
+ }
1328
+
1329
+ .text-xs {
1330
+ font-size: 0.75rem;
1331
+ line-height: 1rem;
1332
+ }
1333
+
1334
+ .text-sm {
1335
+ font-size: 0.875rem;
1336
+ line-height: 1.25rem;
1337
+ }
1338
+
1339
+ .text-lg {
1340
+ font-size: 1.125rem;
1341
+ line-height: 1.75rem;
1177
1342
  }
1178
1343
 
1179
1344
  .font-bold {
@@ -1224,6 +1389,16 @@ video {
1224
1389
  color: rgba(96, 165, 250, var(--tw-text-opacity));
1225
1390
  }
1226
1391
 
1392
+ .text-blue-600 {
1393
+ --tw-text-opacity: 1;
1394
+ color: rgba(37, 99, 235, var(--tw-text-opacity));
1395
+ }
1396
+
1397
+ .text-pink-400 {
1398
+ --tw-text-opacity: 1;
1399
+ color: rgba(244, 114, 182, var(--tw-text-opacity));
1400
+ }
1401
+
1227
1402
  .hover\:text-gray-800:hover {
1228
1403
  --tw-text-opacity: 1;
1229
1404
  color: rgba(31, 41, 55, var(--tw-text-opacity));
@@ -1246,6 +1421,11 @@ video {
1246
1421
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
1247
1422
  }
1248
1423
 
1424
+ .shadow-lg {
1425
+ --tw-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
1426
+ box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
1427
+ }
1428
+
1249
1429
  *, ::before, ::after {
1250
1430
  --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/);
1251
1431
  --tw-ring-offset-width: 0px;
@@ -1282,6 +1462,19 @@ video {
1282
1462
  transition-duration: 1000ms;
1283
1463
  }
1284
1464
 
1465
+ .sidebar-header {
1466
+ margin-top: 2rem;
1467
+ margin-bottom: 0.5rem;
1468
+ border-bottom-width: 2px;
1469
+ --tw-border-opacity: 1;
1470
+ border-color: rgba(167, 243, 208, var(--tw-border-opacity));
1471
+ padding-bottom: 0.5rem;
1472
+ text-align: center;
1473
+ text-transform: uppercase;
1474
+ --tw-text-opacity: 1;
1475
+ color: rgba(75, 85, 99, var(--tw-text-opacity));
1476
+ }
1477
+
1285
1478
  @media (min-width: 640px) {
1286
1479
  .sm\:w-80 {
1287
1480
  width: 20rem;
@@ -1298,4 +1491,4 @@ video {
1298
1491
  }
1299
1492
 
1300
1493
  @media (min-width: 1536px) {
1301
- }
1494
+ }