novac 2.2.0 → 2.2.2

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 (122) hide show
  1. package/LICENSE +0 -0
  2. package/README.md +0 -0
  3. package/bin/novac +6 -3
  4. package/bin/nvc +0 -0
  5. package/bin/nvml +0 -0
  6. package/demo.nv +0 -0
  7. package/demo_builtins.nv +0 -0
  8. package/demo_http.nv +0 -0
  9. package/examples/bf.nv +5 -13
  10. package/examples/math.nv +2 -2
  11. package/kits/kitffmpeg/kitdef.js +1174 -0
  12. package/kits/libos/kitdef.js +3135 -0
  13. package/kits/libtasker/kitdef.js +125 -0
  14. package/package.json +1 -1
  15. package/scripts/update-bin.js +0 -0
  16. package/src/core/executor.js +7 -4
  17. package/src/core/lexer.js +2 -2
  18. package/src/index.js +0 -0
  19. package/novac/LICENSE +0 -21
  20. package/novac/README.md +0 -1823
  21. package/novac/bin/novac +0 -950
  22. package/novac/bin/nvc +0 -522
  23. package/novac/bin/nvml +0 -542
  24. package/novac/demo.nv +0 -245
  25. package/novac/demo_builtins.nv +0 -209
  26. package/novac/demo_http.nv +0 -62
  27. package/novac/examples/bf.nv +0 -69
  28. package/novac/examples/math.nv +0 -21
  29. package/novac/kits/kitai/kitdef.js +0 -2185
  30. package/novac/kits/kitansi/kitdef.js +0 -1402
  31. package/novac/kits/kitformat/kitdef.js +0 -1485
  32. package/novac/kits/kitgps/kitdef.js +0 -1862
  33. package/novac/kits/kitlibfs/kitdef.js +0 -231
  34. package/novac/kits/kitlibproc/kitdef.js +0 -78
  35. package/novac/kits/kitmatrix/ex.js +0 -19
  36. package/novac/kits/kitmatrix/kitdef.js +0 -960
  37. package/novac/kits/kitmpatch/kitdef.js +0 -906
  38. package/novac/kits/kitnovacweb/README.md +0 -1572
  39. package/novac/kits/kitnovacweb/demo.nv +0 -12
  40. package/novac/kits/kitnovacweb/demo.nvml +0 -71
  41. package/novac/kits/kitnovacweb/index.nova +0 -12
  42. package/novac/kits/kitnovacweb/kitdef.js +0 -692
  43. package/novac/kits/kitnovacweb/nova.kit.json +0 -8
  44. package/novac/kits/kitnovacweb/nvml/executor.js +0 -739
  45. package/novac/kits/kitnovacweb/nvml/index.js +0 -67
  46. package/novac/kits/kitnovacweb/nvml/lexer.js +0 -263
  47. package/novac/kits/kitnovacweb/nvml/parser.js +0 -508
  48. package/novac/kits/kitnovacweb/nvml/renderer.js +0 -924
  49. package/novac/kits/kitparse/kitdef.js +0 -1688
  50. package/novac/kits/kitregex++/kitdef.js +0 -1353
  51. package/novac/kits/kitrequire/kitdef.js +0 -1599
  52. package/novac/kits/kitx11/kitdef.js +0 -1
  53. package/novac/kits/kitx11/kitx11.js +0 -2472
  54. package/novac/kits/kitx11/kitx11_conn.js +0 -948
  55. package/novac/kits/kitx11/kitx11_worker.js +0 -121
  56. package/novac/kits/libtea/tf.js +0 -2691
  57. package/novac/kits/libterm/ex.js +0 -285
  58. package/novac/kits/libterm/kitdef.js +0 -1927
  59. package/novac/node_modules/chalk/license +0 -9
  60. package/novac/node_modules/chalk/package.json +0 -83
  61. package/novac/node_modules/chalk/readme.md +0 -297
  62. package/novac/node_modules/chalk/source/index.d.ts +0 -325
  63. package/novac/node_modules/chalk/source/index.js +0 -225
  64. package/novac/node_modules/chalk/source/utilities.js +0 -33
  65. package/novac/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +0 -236
  66. package/novac/node_modules/chalk/source/vendor/ansi-styles/index.js +0 -223
  67. package/novac/node_modules/chalk/source/vendor/supports-color/browser.d.ts +0 -1
  68. package/novac/node_modules/chalk/source/vendor/supports-color/browser.js +0 -34
  69. package/novac/node_modules/chalk/source/vendor/supports-color/index.d.ts +0 -55
  70. package/novac/node_modules/chalk/source/vendor/supports-color/index.js +0 -190
  71. package/novac/node_modules/commander/LICENSE +0 -22
  72. package/novac/node_modules/commander/Readme.md +0 -1176
  73. package/novac/node_modules/commander/esm.mjs +0 -16
  74. package/novac/node_modules/commander/index.js +0 -24
  75. package/novac/node_modules/commander/lib/argument.js +0 -150
  76. package/novac/node_modules/commander/lib/command.js +0 -2777
  77. package/novac/node_modules/commander/lib/error.js +0 -39
  78. package/novac/node_modules/commander/lib/help.js +0 -747
  79. package/novac/node_modules/commander/lib/option.js +0 -380
  80. package/novac/node_modules/commander/lib/suggestSimilar.js +0 -101
  81. package/novac/node_modules/commander/package-support.json +0 -19
  82. package/novac/node_modules/commander/package.json +0 -82
  83. package/novac/node_modules/commander/typings/esm.d.mts +0 -3
  84. package/novac/node_modules/commander/typings/index.d.ts +0 -1113
  85. package/novac/node_modules/node-addon-api/LICENSE.md +0 -9
  86. package/novac/node_modules/node-addon-api/README.md +0 -95
  87. package/novac/node_modules/node-addon-api/common.gypi +0 -21
  88. package/novac/node_modules/node-addon-api/except.gypi +0 -25
  89. package/novac/node_modules/node-addon-api/index.js +0 -14
  90. package/novac/node_modules/node-addon-api/napi-inl.deprecated.h +0 -186
  91. package/novac/node_modules/node-addon-api/napi-inl.h +0 -7165
  92. package/novac/node_modules/node-addon-api/napi.h +0 -3364
  93. package/novac/node_modules/node-addon-api/node_addon_api.gyp +0 -42
  94. package/novac/node_modules/node-addon-api/node_api.gyp +0 -9
  95. package/novac/node_modules/node-addon-api/noexcept.gypi +0 -26
  96. package/novac/node_modules/node-addon-api/nothing.c +0 -0
  97. package/novac/node_modules/node-addon-api/package-support.json +0 -21
  98. package/novac/node_modules/node-addon-api/package.json +0 -480
  99. package/novac/node_modules/node-addon-api/tools/README.md +0 -73
  100. package/novac/node_modules/node-addon-api/tools/check-napi.js +0 -99
  101. package/novac/node_modules/node-addon-api/tools/clang-format.js +0 -71
  102. package/novac/node_modules/node-addon-api/tools/conversion.js +0 -301
  103. package/novac/node_modules/serialize-javascript/LICENSE +0 -27
  104. package/novac/node_modules/serialize-javascript/README.md +0 -149
  105. package/novac/node_modules/serialize-javascript/index.js +0 -297
  106. package/novac/node_modules/serialize-javascript/package.json +0 -33
  107. package/novac/package.json +0 -27
  108. package/novac/scripts/update-bin.js +0 -24
  109. package/novac/src/core/bstd.js +0 -1035
  110. package/novac/src/core/config.js +0 -155
  111. package/novac/src/core/describe.js +0 -187
  112. package/novac/src/core/emitter.js +0 -499
  113. package/novac/src/core/error.js +0 -86
  114. package/novac/src/core/executor.js +0 -5606
  115. package/novac/src/core/formatter.js +0 -686
  116. package/novac/src/core/lexer.js +0 -1026
  117. package/novac/src/core/nova_builtins.js +0 -717
  118. package/novac/src/core/nova_thread_worker.js +0 -166
  119. package/novac/src/core/parser.js +0 -2181
  120. package/novac/src/core/types.js +0 -112
  121. package/novac/src/index.js +0 -28
  122. package/novac/src/runtime/stdlib.js +0 -244
@@ -1,190 +0,0 @@
1
- import process from 'node:process';
2
- import os from 'node:os';
3
- import tty from 'node:tty';
4
-
5
- // From: https://github.com/sindresorhus/has-flag/blob/main/index.js
6
- /// function hasFlag(flag, argv = globalThis.Deno?.args ?? process.argv) {
7
- function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process.argv) {
8
- const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');
9
- const position = argv.indexOf(prefix + flag);
10
- const terminatorPosition = argv.indexOf('--');
11
- return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
12
- }
13
-
14
- const {env} = process;
15
-
16
- let flagForceColor;
17
- if (
18
- hasFlag('no-color')
19
- || hasFlag('no-colors')
20
- || hasFlag('color=false')
21
- || hasFlag('color=never')
22
- ) {
23
- flagForceColor = 0;
24
- } else if (
25
- hasFlag('color')
26
- || hasFlag('colors')
27
- || hasFlag('color=true')
28
- || hasFlag('color=always')
29
- ) {
30
- flagForceColor = 1;
31
- }
32
-
33
- function envForceColor() {
34
- if ('FORCE_COLOR' in env) {
35
- if (env.FORCE_COLOR === 'true') {
36
- return 1;
37
- }
38
-
39
- if (env.FORCE_COLOR === 'false') {
40
- return 0;
41
- }
42
-
43
- return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
44
- }
45
- }
46
-
47
- function translateLevel(level) {
48
- if (level === 0) {
49
- return false;
50
- }
51
-
52
- return {
53
- level,
54
- hasBasic: true,
55
- has256: level >= 2,
56
- has16m: level >= 3,
57
- };
58
- }
59
-
60
- function _supportsColor(haveStream, {streamIsTTY, sniffFlags = true} = {}) {
61
- const noFlagForceColor = envForceColor();
62
- if (noFlagForceColor !== undefined) {
63
- flagForceColor = noFlagForceColor;
64
- }
65
-
66
- const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
67
-
68
- if (forceColor === 0) {
69
- return 0;
70
- }
71
-
72
- if (sniffFlags) {
73
- if (hasFlag('color=16m')
74
- || hasFlag('color=full')
75
- || hasFlag('color=truecolor')) {
76
- return 3;
77
- }
78
-
79
- if (hasFlag('color=256')) {
80
- return 2;
81
- }
82
- }
83
-
84
- // Check for Azure DevOps pipelines.
85
- // Has to be above the `!streamIsTTY` check.
86
- if ('TF_BUILD' in env && 'AGENT_NAME' in env) {
87
- return 1;
88
- }
89
-
90
- if (haveStream && !streamIsTTY && forceColor === undefined) {
91
- return 0;
92
- }
93
-
94
- const min = forceColor || 0;
95
-
96
- if (env.TERM === 'dumb') {
97
- return min;
98
- }
99
-
100
- if (process.platform === 'win32') {
101
- // Windows 10 build 10586 is the first Windows release that supports 256 colors.
102
- // Windows 10 build 14931 is the first release that supports 16m/TrueColor.
103
- const osRelease = os.release().split('.');
104
- if (
105
- Number(osRelease[0]) >= 10
106
- && Number(osRelease[2]) >= 10_586
107
- ) {
108
- return Number(osRelease[2]) >= 14_931 ? 3 : 2;
109
- }
110
-
111
- return 1;
112
- }
113
-
114
- if ('CI' in env) {
115
- if (['GITHUB_ACTIONS', 'GITEA_ACTIONS', 'CIRCLECI'].some(key => key in env)) {
116
- return 3;
117
- }
118
-
119
- if (['TRAVIS', 'APPVEYOR', 'GITLAB_CI', 'BUILDKITE', 'DRONE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
120
- return 1;
121
- }
122
-
123
- return min;
124
- }
125
-
126
- if ('TEAMCITY_VERSION' in env) {
127
- return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
128
- }
129
-
130
- if (env.COLORTERM === 'truecolor') {
131
- return 3;
132
- }
133
-
134
- if (env.TERM === 'xterm-kitty') {
135
- return 3;
136
- }
137
-
138
- if (env.TERM === 'xterm-ghostty') {
139
- return 3;
140
- }
141
-
142
- if (env.TERM === 'wezterm') {
143
- return 3;
144
- }
145
-
146
- if ('TERM_PROGRAM' in env) {
147
- const version = Number.parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
148
-
149
- switch (env.TERM_PROGRAM) {
150
- case 'iTerm.app': {
151
- return version >= 3 ? 3 : 2;
152
- }
153
-
154
- case 'Apple_Terminal': {
155
- return 2;
156
- }
157
- // No default
158
- }
159
- }
160
-
161
- if (/-256(color)?$/i.test(env.TERM)) {
162
- return 2;
163
- }
164
-
165
- if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
166
- return 1;
167
- }
168
-
169
- if ('COLORTERM' in env) {
170
- return 1;
171
- }
172
-
173
- return min;
174
- }
175
-
176
- export function createSupportsColor(stream, options = {}) {
177
- const level = _supportsColor(stream, {
178
- streamIsTTY: stream && stream.isTTY,
179
- ...options,
180
- });
181
-
182
- return translateLevel(level);
183
- }
184
-
185
- const supportsColor = {
186
- stdout: createSupportsColor({isTTY: tty.isatty(1)}),
187
- stderr: createSupportsColor({isTTY: tty.isatty(2)}),
188
- };
189
-
190
- export default supportsColor;
@@ -1,22 +0,0 @@
1
- (The MIT License)
2
-
3
- Copyright (c) 2011 TJ Holowaychuk <tj@vision-media.ca>
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining
6
- a copy of this software and associated documentation files (the
7
- 'Software'), to deal in the Software without restriction, including
8
- without limitation the rights to use, copy, modify, merge, publish,
9
- distribute, sublicense, and/or sell copies of the Software, and to
10
- permit persons to whom the Software is furnished to do so, subject to
11
- the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be
14
- included in all copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
17
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.