titanpl 6.0.0 → 7.0.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.
Files changed (227) hide show
  1. package/package.json +2 -6
  2. package/packages/cli/index.js +25 -11
  3. package/packages/cli/package.json +4 -4
  4. package/packages/cli/src/commands/build-ext.js +157 -0
  5. package/packages/cli/src/commands/build.js +12 -0
  6. package/packages/cli/src/commands/create.js +160 -0
  7. package/packages/cli/src/commands/init.js +5 -11
  8. package/packages/cli/src/commands/run-ext.js +104 -0
  9. package/{titanpl-sdk → packages/core-source}/LICENSE +1 -1
  10. package/packages/core-source/README.md +128 -0
  11. package/packages/core-source/V8_SERIALIZATION.md +125 -0
  12. package/packages/core-source/configure.js +50 -0
  13. package/packages/core-source/globals.d.ts +2238 -0
  14. package/packages/core-source/index.d.ts +515 -0
  15. package/packages/core-source/index.js +639 -0
  16. package/packages/core-source/jsconfig.json +12 -0
  17. package/packages/core-source/mkctx.config.json +7 -0
  18. package/packages/core-source/native/Cargo.lock +1559 -0
  19. package/packages/core-source/native/Cargo.toml +30 -0
  20. package/packages/core-source/native/src/crypto_impl.rs +139 -0
  21. package/packages/core-source/native/src/lib.rs +702 -0
  22. package/packages/core-source/native/src/storage_impl.rs +73 -0
  23. package/packages/core-source/native/src/v8_impl.rs +93 -0
  24. package/packages/core-source/package-lock.json +1464 -0
  25. package/packages/core-source/package.json +53 -0
  26. package/packages/core-source/tests/buffer.test.js +78 -0
  27. package/packages/core-source/tests/cookies.test.js +117 -0
  28. package/packages/core-source/tests/crypto.test.js +142 -0
  29. package/packages/core-source/tests/fs.test.js +176 -0
  30. package/packages/core-source/tests/ls.test.js +149 -0
  31. package/packages/core-source/tests/net.test.js +84 -0
  32. package/packages/core-source/tests/os.test.js +81 -0
  33. package/packages/core-source/tests/path.test.js +102 -0
  34. package/packages/core-source/tests/response.test.js +146 -0
  35. package/packages/core-source/tests/session.test.js +110 -0
  36. package/packages/core-source/tests/setup.js +325 -0
  37. package/packages/core-source/tests/time.test.js +57 -0
  38. package/packages/core-source/tests/url.test.js +82 -0
  39. package/packages/core-source/titan-ext.d.ts +2 -0
  40. package/packages/core-source/titan.json +9 -0
  41. package/packages/core-source/vitest.config.js +8 -0
  42. package/packages/engine-darwin-arm64/README.md +0 -2
  43. package/packages/engine-darwin-arm64/package.json +1 -1
  44. package/packages/engine-linux-x64/README.md +0 -2
  45. package/packages/engine-linux-x64/package.json +1 -1
  46. package/packages/engine-win32-x64/README.md +0 -1
  47. package/packages/engine-win32-x64/bin/titan-server.exe +0 -0
  48. package/packages/engine-win32-x64/package.json +1 -1
  49. package/packages/native/README.md +0 -1
  50. package/packages/native/index.d.ts +25 -4
  51. package/packages/native/index.js +7 -0
  52. package/packages/native/package.json +2 -2
  53. package/packages/native/t.native.d.ts +167 -2
  54. package/packages/packet/index.js +103 -94
  55. package/packages/packet/package.json +1 -1
  56. package/packages/route/package.json +1 -1
  57. package/packages/sdk/index.js +2 -0
  58. package/packages/sdk/package.json +18 -0
  59. package/packages/sdk/test/index.js +120 -0
  60. package/templates/common/_tanfig.json +19 -13
  61. package/templates/extension/index.d.ts +26 -22
  62. package/templates/extension/index.js +15 -15
  63. package/templates/extension/native/Cargo.toml +5 -3
  64. package/templates/extension/native/src/lib.rs +2 -3
  65. package/templates/extension/package.json +10 -20
  66. package/templates/extension/titan.json +5 -16
  67. package/templates/extension/utils/registerExtension.js +44 -0
  68. package/templates/js/package.json +8 -8
  69. package/templates/rust-js/package.json +5 -5
  70. package/templates/rust-ts/package.json +5 -5
  71. package/templates/ts/package.json +8 -8
  72. package/packages/packet/node_modules/typescript/LICENSE.txt +0 -55
  73. package/packages/packet/node_modules/typescript/README.md +0 -50
  74. package/packages/packet/node_modules/typescript/SECURITY.md +0 -41
  75. package/packages/packet/node_modules/typescript/ThirdPartyNoticeText.txt +0 -193
  76. package/packages/packet/node_modules/typescript/bin/tsc +0 -2
  77. package/packages/packet/node_modules/typescript/bin/tsserver +0 -2
  78. package/packages/packet/node_modules/typescript/lib/_tsc.js +0 -133818
  79. package/packages/packet/node_modules/typescript/lib/_tsserver.js +0 -659
  80. package/packages/packet/node_modules/typescript/lib/_typingsInstaller.js +0 -222
  81. package/packages/packet/node_modules/typescript/lib/cs/diagnosticMessages.generated.json +0 -2122
  82. package/packages/packet/node_modules/typescript/lib/de/diagnosticMessages.generated.json +0 -2122
  83. package/packages/packet/node_modules/typescript/lib/es/diagnosticMessages.generated.json +0 -2122
  84. package/packages/packet/node_modules/typescript/lib/fr/diagnosticMessages.generated.json +0 -2122
  85. package/packages/packet/node_modules/typescript/lib/it/diagnosticMessages.generated.json +0 -2122
  86. package/packages/packet/node_modules/typescript/lib/ja/diagnosticMessages.generated.json +0 -2122
  87. package/packages/packet/node_modules/typescript/lib/ko/diagnosticMessages.generated.json +0 -2122
  88. package/packages/packet/node_modules/typescript/lib/lib.d.ts +0 -22
  89. package/packages/packet/node_modules/typescript/lib/lib.decorators.d.ts +0 -384
  90. package/packages/packet/node_modules/typescript/lib/lib.decorators.legacy.d.ts +0 -22
  91. package/packages/packet/node_modules/typescript/lib/lib.dom.asynciterable.d.ts +0 -41
  92. package/packages/packet/node_modules/typescript/lib/lib.dom.d.ts +0 -39429
  93. package/packages/packet/node_modules/typescript/lib/lib.dom.iterable.d.ts +0 -571
  94. package/packages/packet/node_modules/typescript/lib/lib.es2015.collection.d.ts +0 -147
  95. package/packages/packet/node_modules/typescript/lib/lib.es2015.core.d.ts +0 -597
  96. package/packages/packet/node_modules/typescript/lib/lib.es2015.d.ts +0 -28
  97. package/packages/packet/node_modules/typescript/lib/lib.es2015.generator.d.ts +0 -77
  98. package/packages/packet/node_modules/typescript/lib/lib.es2015.iterable.d.ts +0 -605
  99. package/packages/packet/node_modules/typescript/lib/lib.es2015.promise.d.ts +0 -81
  100. package/packages/packet/node_modules/typescript/lib/lib.es2015.proxy.d.ts +0 -128
  101. package/packages/packet/node_modules/typescript/lib/lib.es2015.reflect.d.ts +0 -144
  102. package/packages/packet/node_modules/typescript/lib/lib.es2015.symbol.d.ts +0 -46
  103. package/packages/packet/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts +0 -326
  104. package/packages/packet/node_modules/typescript/lib/lib.es2016.array.include.d.ts +0 -116
  105. package/packages/packet/node_modules/typescript/lib/lib.es2016.d.ts +0 -21
  106. package/packages/packet/node_modules/typescript/lib/lib.es2016.full.d.ts +0 -23
  107. package/packages/packet/node_modules/typescript/lib/lib.es2016.intl.d.ts +0 -31
  108. package/packages/packet/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts +0 -21
  109. package/packages/packet/node_modules/typescript/lib/lib.es2017.d.ts +0 -26
  110. package/packages/packet/node_modules/typescript/lib/lib.es2017.date.d.ts +0 -31
  111. package/packages/packet/node_modules/typescript/lib/lib.es2017.full.d.ts +0 -23
  112. package/packages/packet/node_modules/typescript/lib/lib.es2017.intl.d.ts +0 -44
  113. package/packages/packet/node_modules/typescript/lib/lib.es2017.object.d.ts +0 -49
  114. package/packages/packet/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts +0 -135
  115. package/packages/packet/node_modules/typescript/lib/lib.es2017.string.d.ts +0 -45
  116. package/packages/packet/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts +0 -53
  117. package/packages/packet/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts +0 -77
  118. package/packages/packet/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts +0 -53
  119. package/packages/packet/node_modules/typescript/lib/lib.es2018.d.ts +0 -24
  120. package/packages/packet/node_modules/typescript/lib/lib.es2018.full.d.ts +0 -24
  121. package/packages/packet/node_modules/typescript/lib/lib.es2018.intl.d.ts +0 -83
  122. package/packages/packet/node_modules/typescript/lib/lib.es2018.promise.d.ts +0 -30
  123. package/packages/packet/node_modules/typescript/lib/lib.es2018.regexp.d.ts +0 -37
  124. package/packages/packet/node_modules/typescript/lib/lib.es2019.array.d.ts +0 -79
  125. package/packages/packet/node_modules/typescript/lib/lib.es2019.d.ts +0 -24
  126. package/packages/packet/node_modules/typescript/lib/lib.es2019.full.d.ts +0 -24
  127. package/packages/packet/node_modules/typescript/lib/lib.es2019.intl.d.ts +0 -23
  128. package/packages/packet/node_modules/typescript/lib/lib.es2019.object.d.ts +0 -33
  129. package/packages/packet/node_modules/typescript/lib/lib.es2019.string.d.ts +0 -37
  130. package/packages/packet/node_modules/typescript/lib/lib.es2019.symbol.d.ts +0 -24
  131. package/packages/packet/node_modules/typescript/lib/lib.es2020.bigint.d.ts +0 -765
  132. package/packages/packet/node_modules/typescript/lib/lib.es2020.d.ts +0 -27
  133. package/packages/packet/node_modules/typescript/lib/lib.es2020.date.d.ts +0 -42
  134. package/packages/packet/node_modules/typescript/lib/lib.es2020.full.d.ts +0 -24
  135. package/packages/packet/node_modules/typescript/lib/lib.es2020.intl.d.ts +0 -474
  136. package/packages/packet/node_modules/typescript/lib/lib.es2020.number.d.ts +0 -28
  137. package/packages/packet/node_modules/typescript/lib/lib.es2020.promise.d.ts +0 -47
  138. package/packages/packet/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts +0 -99
  139. package/packages/packet/node_modules/typescript/lib/lib.es2020.string.d.ts +0 -44
  140. package/packages/packet/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts +0 -41
  141. package/packages/packet/node_modules/typescript/lib/lib.es2021.d.ts +0 -23
  142. package/packages/packet/node_modules/typescript/lib/lib.es2021.full.d.ts +0 -24
  143. package/packages/packet/node_modules/typescript/lib/lib.es2021.intl.d.ts +0 -166
  144. package/packages/packet/node_modules/typescript/lib/lib.es2021.promise.d.ts +0 -48
  145. package/packages/packet/node_modules/typescript/lib/lib.es2021.string.d.ts +0 -33
  146. package/packages/packet/node_modules/typescript/lib/lib.es2021.weakref.d.ts +0 -78
  147. package/packages/packet/node_modules/typescript/lib/lib.es2022.array.d.ts +0 -121
  148. package/packages/packet/node_modules/typescript/lib/lib.es2022.d.ts +0 -25
  149. package/packages/packet/node_modules/typescript/lib/lib.es2022.error.d.ts +0 -75
  150. package/packages/packet/node_modules/typescript/lib/lib.es2022.full.d.ts +0 -24
  151. package/packages/packet/node_modules/typescript/lib/lib.es2022.intl.d.ts +0 -145
  152. package/packages/packet/node_modules/typescript/lib/lib.es2022.object.d.ts +0 -26
  153. package/packages/packet/node_modules/typescript/lib/lib.es2022.regexp.d.ts +0 -39
  154. package/packages/packet/node_modules/typescript/lib/lib.es2022.string.d.ts +0 -25
  155. package/packages/packet/node_modules/typescript/lib/lib.es2023.array.d.ts +0 -924
  156. package/packages/packet/node_modules/typescript/lib/lib.es2023.collection.d.ts +0 -21
  157. package/packages/packet/node_modules/typescript/lib/lib.es2023.d.ts +0 -22
  158. package/packages/packet/node_modules/typescript/lib/lib.es2023.full.d.ts +0 -24
  159. package/packages/packet/node_modules/typescript/lib/lib.es2023.intl.d.ts +0 -56
  160. package/packages/packet/node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts +0 -65
  161. package/packages/packet/node_modules/typescript/lib/lib.es2024.collection.d.ts +0 -29
  162. package/packages/packet/node_modules/typescript/lib/lib.es2024.d.ts +0 -26
  163. package/packages/packet/node_modules/typescript/lib/lib.es2024.full.d.ts +0 -24
  164. package/packages/packet/node_modules/typescript/lib/lib.es2024.object.d.ts +0 -29
  165. package/packages/packet/node_modules/typescript/lib/lib.es2024.promise.d.ts +0 -35
  166. package/packages/packet/node_modules/typescript/lib/lib.es2024.regexp.d.ts +0 -25
  167. package/packages/packet/node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts +0 -68
  168. package/packages/packet/node_modules/typescript/lib/lib.es2024.string.d.ts +0 -29
  169. package/packages/packet/node_modules/typescript/lib/lib.es5.d.ts +0 -4601
  170. package/packages/packet/node_modules/typescript/lib/lib.es6.d.ts +0 -23
  171. package/packages/packet/node_modules/typescript/lib/lib.esnext.array.d.ts +0 -35
  172. package/packages/packet/node_modules/typescript/lib/lib.esnext.collection.d.ts +0 -96
  173. package/packages/packet/node_modules/typescript/lib/lib.esnext.d.ts +0 -29
  174. package/packages/packet/node_modules/typescript/lib/lib.esnext.decorators.d.ts +0 -28
  175. package/packages/packet/node_modules/typescript/lib/lib.esnext.disposable.d.ts +0 -193
  176. package/packages/packet/node_modules/typescript/lib/lib.esnext.error.d.ts +0 -24
  177. package/packages/packet/node_modules/typescript/lib/lib.esnext.float16.d.ts +0 -445
  178. package/packages/packet/node_modules/typescript/lib/lib.esnext.full.d.ts +0 -24
  179. package/packages/packet/node_modules/typescript/lib/lib.esnext.intl.d.ts +0 -21
  180. package/packages/packet/node_modules/typescript/lib/lib.esnext.iterator.d.ts +0 -148
  181. package/packages/packet/node_modules/typescript/lib/lib.esnext.promise.d.ts +0 -34
  182. package/packages/packet/node_modules/typescript/lib/lib.esnext.sharedmemory.d.ts +0 -25
  183. package/packages/packet/node_modules/typescript/lib/lib.scripthost.d.ts +0 -322
  184. package/packages/packet/node_modules/typescript/lib/lib.webworker.asynciterable.d.ts +0 -41
  185. package/packages/packet/node_modules/typescript/lib/lib.webworker.d.ts +0 -13150
  186. package/packages/packet/node_modules/typescript/lib/lib.webworker.importscripts.d.ts +0 -23
  187. package/packages/packet/node_modules/typescript/lib/lib.webworker.iterable.d.ts +0 -340
  188. package/packages/packet/node_modules/typescript/lib/pl/diagnosticMessages.generated.json +0 -2122
  189. package/packages/packet/node_modules/typescript/lib/pt-br/diagnosticMessages.generated.json +0 -2122
  190. package/packages/packet/node_modules/typescript/lib/ru/diagnosticMessages.generated.json +0 -2122
  191. package/packages/packet/node_modules/typescript/lib/tr/diagnosticMessages.generated.json +0 -2122
  192. package/packages/packet/node_modules/typescript/lib/tsc.js +0 -8
  193. package/packages/packet/node_modules/typescript/lib/tsserver.js +0 -8
  194. package/packages/packet/node_modules/typescript/lib/tsserverlibrary.d.ts +0 -17
  195. package/packages/packet/node_modules/typescript/lib/tsserverlibrary.js +0 -21
  196. package/packages/packet/node_modules/typescript/lib/typesMap.json +0 -497
  197. package/packages/packet/node_modules/typescript/lib/typescript.d.ts +0 -11437
  198. package/packages/packet/node_modules/typescript/lib/typescript.js +0 -200276
  199. package/packages/packet/node_modules/typescript/lib/typingsInstaller.js +0 -8
  200. package/packages/packet/node_modules/typescript/lib/watchGuard.js +0 -53
  201. package/packages/packet/node_modules/typescript/lib/zh-cn/diagnosticMessages.generated.json +0 -2122
  202. package/packages/packet/node_modules/typescript/lib/zh-tw/diagnosticMessages.generated.json +0 -2122
  203. package/packages/packet/node_modules/typescript/package.json +0 -120
  204. package/titanpl-sdk/README.md +0 -111
  205. package/titanpl-sdk/assets/titanpl-sdk.png +0 -0
  206. package/titanpl-sdk/bin/run.js +0 -274
  207. package/titanpl-sdk/index.js +0 -5
  208. package/titanpl-sdk/package-lock.json +0 -28
  209. package/titanpl-sdk/package.json +0 -40
  210. package/titanpl-sdk/templates/app/actions/hello.js +0 -5
  211. package/titanpl-sdk/templates/app/app.js +0 -7
  212. package/titanpl-sdk/templates/jsconfig.json +0 -19
  213. package/titanpl-sdk/templates/server/Cargo.toml +0 -52
  214. package/titanpl-sdk/templates/server/src/action_management.rs +0 -175
  215. package/titanpl-sdk/templates/server/src/errors.rs +0 -12
  216. package/titanpl-sdk/templates/server/src/extensions/builtin.rs +0 -1060
  217. package/titanpl-sdk/templates/server/src/extensions/external.rs +0 -338
  218. package/titanpl-sdk/templates/server/src/extensions/mod.rs +0 -580
  219. package/titanpl-sdk/templates/server/src/extensions/titan_core.js +0 -249
  220. package/titanpl-sdk/templates/server/src/fast_path.rs +0 -719
  221. package/titanpl-sdk/templates/server/src/main.rs +0 -607
  222. package/titanpl-sdk/templates/server/src/runtime.rs +0 -284
  223. package/titanpl-sdk/templates/server/src/utils.rs +0 -33
  224. package/titanpl-sdk/templates/titan/bundle.js +0 -259
  225. package/titanpl-sdk/templates/titan/dev.js +0 -390
  226. package/titanpl-sdk/templates/titan/error-box.js +0 -277
  227. package/titanpl-sdk/templates/titan/titan.js +0 -129
@@ -1,25 +0,0 @@
1
- /*! *****************************************************************************
2
- Copyright (c) Microsoft Corporation. All rights reserved.
3
- Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4
- this file except in compliance with the License. You may obtain a copy of the
5
- License at http://www.apache.org/licenses/LICENSE-2.0
6
-
7
- THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8
- KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
9
- WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
10
- MERCHANTABLITY OR NON-INFRINGEMENT.
11
-
12
- See the Apache Version 2.0 License for specific language governing permissions
13
- and limitations under the License.
14
- ***************************************************************************** */
15
-
16
-
17
- /// <reference no-default-lib="true"/>
18
-
19
- interface Atomics {
20
- /**
21
- * Performs a finite-time microwait by signaling to the operating system or
22
- * CPU that the current executing code is in a spin-wait loop.
23
- */
24
- pause(n?: number): void;
25
- }
@@ -1,322 +0,0 @@
1
- /*! *****************************************************************************
2
- Copyright (c) Microsoft Corporation. All rights reserved.
3
- Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4
- this file except in compliance with the License. You may obtain a copy of the
5
- License at http://www.apache.org/licenses/LICENSE-2.0
6
-
7
- THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8
- KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
9
- WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
10
- MERCHANTABLITY OR NON-INFRINGEMENT.
11
-
12
- See the Apache Version 2.0 License for specific language governing permissions
13
- and limitations under the License.
14
- ***************************************************************************** */
15
-
16
-
17
- /// <reference no-default-lib="true"/>
18
-
19
- /////////////////////////////
20
- /// Windows Script Host APIS
21
- /////////////////////////////
22
-
23
- interface ActiveXObject {
24
- new (s: string): any;
25
- }
26
- declare var ActiveXObject: ActiveXObject;
27
-
28
- interface ITextWriter {
29
- Write(s: string): void;
30
- WriteLine(s: string): void;
31
- Close(): void;
32
- }
33
-
34
- interface TextStreamBase {
35
- /**
36
- * The column number of the current character position in an input stream.
37
- */
38
- Column: number;
39
-
40
- /**
41
- * The current line number in an input stream.
42
- */
43
- Line: number;
44
-
45
- /**
46
- * Closes a text stream.
47
- * It is not necessary to close standard streams; they close automatically when the process ends. If
48
- * you close a standard stream, be aware that any other pointers to that standard stream become invalid.
49
- */
50
- Close(): void;
51
- }
52
-
53
- interface TextStreamWriter extends TextStreamBase {
54
- /**
55
- * Sends a string to an output stream.
56
- */
57
- Write(s: string): void;
58
-
59
- /**
60
- * Sends a specified number of blank lines (newline characters) to an output stream.
61
- */
62
- WriteBlankLines(intLines: number): void;
63
-
64
- /**
65
- * Sends a string followed by a newline character to an output stream.
66
- */
67
- WriteLine(s: string): void;
68
- }
69
-
70
- interface TextStreamReader extends TextStreamBase {
71
- /**
72
- * Returns a specified number of characters from an input stream, starting at the current pointer position.
73
- * Does not return until the ENTER key is pressed.
74
- * Can only be used on a stream in reading mode; causes an error in writing or appending mode.
75
- */
76
- Read(characters: number): string;
77
-
78
- /**
79
- * Returns all characters from an input stream.
80
- * Can only be used on a stream in reading mode; causes an error in writing or appending mode.
81
- */
82
- ReadAll(): string;
83
-
84
- /**
85
- * Returns an entire line from an input stream.
86
- * Although this method extracts the newline character, it does not add it to the returned string.
87
- * Can only be used on a stream in reading mode; causes an error in writing or appending mode.
88
- */
89
- ReadLine(): string;
90
-
91
- /**
92
- * Skips a specified number of characters when reading from an input text stream.
93
- * Can only be used on a stream in reading mode; causes an error in writing or appending mode.
94
- * @param characters Positive number of characters to skip forward. (Backward skipping is not supported.)
95
- */
96
- Skip(characters: number): void;
97
-
98
- /**
99
- * Skips the next line when reading from an input text stream.
100
- * Can only be used on a stream in reading mode, not writing or appending mode.
101
- */
102
- SkipLine(): void;
103
-
104
- /**
105
- * Indicates whether the stream pointer position is at the end of a line.
106
- */
107
- AtEndOfLine: boolean;
108
-
109
- /**
110
- * Indicates whether the stream pointer position is at the end of a stream.
111
- */
112
- AtEndOfStream: boolean;
113
- }
114
-
115
- declare var WScript: {
116
- /**
117
- * Outputs text to either a message box (under WScript.exe) or the command console window followed by
118
- * a newline (under CScript.exe).
119
- */
120
- Echo(s: any): void;
121
-
122
- /**
123
- * Exposes the write-only error output stream for the current script.
124
- * Can be accessed only while using CScript.exe.
125
- */
126
- StdErr: TextStreamWriter;
127
-
128
- /**
129
- * Exposes the write-only output stream for the current script.
130
- * Can be accessed only while using CScript.exe.
131
- */
132
- StdOut: TextStreamWriter;
133
- Arguments: { length: number; Item(n: number): string; };
134
-
135
- /**
136
- * The full path of the currently running script.
137
- */
138
- ScriptFullName: string;
139
-
140
- /**
141
- * Forces the script to stop immediately, with an optional exit code.
142
- */
143
- Quit(exitCode?: number): number;
144
-
145
- /**
146
- * The Windows Script Host build version number.
147
- */
148
- BuildVersion: number;
149
-
150
- /**
151
- * Fully qualified path of the host executable.
152
- */
153
- FullName: string;
154
-
155
- /**
156
- * Gets/sets the script mode - interactive(true) or batch(false).
157
- */
158
- Interactive: boolean;
159
-
160
- /**
161
- * The name of the host executable (WScript.exe or CScript.exe).
162
- */
163
- Name: string;
164
-
165
- /**
166
- * Path of the directory containing the host executable.
167
- */
168
- Path: string;
169
-
170
- /**
171
- * The filename of the currently running script.
172
- */
173
- ScriptName: string;
174
-
175
- /**
176
- * Exposes the read-only input stream for the current script.
177
- * Can be accessed only while using CScript.exe.
178
- */
179
- StdIn: TextStreamReader;
180
-
181
- /**
182
- * Windows Script Host version
183
- */
184
- Version: string;
185
-
186
- /**
187
- * Connects a COM object's event sources to functions named with a given prefix, in the form prefix_event.
188
- */
189
- ConnectObject(objEventSource: any, strPrefix: string): void;
190
-
191
- /**
192
- * Creates a COM object.
193
- * @param strProgiID
194
- * @param strPrefix Function names in the form prefix_event will be bound to this object's COM events.
195
- */
196
- CreateObject(strProgID: string, strPrefix?: string): any;
197
-
198
- /**
199
- * Disconnects a COM object from its event sources.
200
- */
201
- DisconnectObject(obj: any): void;
202
-
203
- /**
204
- * Retrieves an existing object with the specified ProgID from memory, or creates a new one from a file.
205
- * @param strPathname Fully qualified path to the file containing the object persisted to disk.
206
- * For objects in memory, pass a zero-length string.
207
- * @param strProgID
208
- * @param strPrefix Function names in the form prefix_event will be bound to this object's COM events.
209
- */
210
- GetObject(strPathname: string, strProgID?: string, strPrefix?: string): any;
211
-
212
- /**
213
- * Suspends script execution for a specified length of time, then continues execution.
214
- * @param intTime Interval (in milliseconds) to suspend script execution.
215
- */
216
- Sleep(intTime: number): void;
217
- };
218
-
219
- /**
220
- * WSH is an alias for WScript under Windows Script Host
221
- */
222
- declare var WSH: typeof WScript;
223
-
224
- /**
225
- * Represents an Automation SAFEARRAY
226
- */
227
- declare class SafeArray<T = any> {
228
- private constructor();
229
- private SafeArray_typekey: SafeArray<T>;
230
- }
231
-
232
- /**
233
- * Allows enumerating over a COM collection, which may not have indexed item access.
234
- */
235
- interface Enumerator<T = any> {
236
- /**
237
- * Returns true if the current item is the last one in the collection, or the collection is empty,
238
- * or the current item is undefined.
239
- */
240
- atEnd(): boolean;
241
-
242
- /**
243
- * Returns the current item in the collection
244
- */
245
- item(): T;
246
-
247
- /**
248
- * Resets the current item in the collection to the first item. If there are no items in the collection,
249
- * the current item is set to undefined.
250
- */
251
- moveFirst(): void;
252
-
253
- /**
254
- * Moves the current item to the next item in the collection. If the enumerator is at the end of
255
- * the collection or the collection is empty, the current item is set to undefined.
256
- */
257
- moveNext(): void;
258
- }
259
-
260
- interface EnumeratorConstructor {
261
- new <T = any>(safearray: SafeArray<T>): Enumerator<T>;
262
- new <T = any>(collection: { Item(index: any): T; }): Enumerator<T>;
263
- new <T = any>(collection: any): Enumerator<T>;
264
- }
265
-
266
- declare var Enumerator: EnumeratorConstructor;
267
-
268
- /**
269
- * Enables reading from a COM safe array, which might have an alternate lower bound, or multiple dimensions.
270
- */
271
- interface VBArray<T = any> {
272
- /**
273
- * Returns the number of dimensions (1-based).
274
- */
275
- dimensions(): number;
276
-
277
- /**
278
- * Takes an index for each dimension in the array, and returns the item at the corresponding location.
279
- */
280
- getItem(dimension1Index: number, ...dimensionNIndexes: number[]): T;
281
-
282
- /**
283
- * Returns the smallest available index for a given dimension.
284
- * @param dimension 1-based dimension (defaults to 1)
285
- */
286
- lbound(dimension?: number): number;
287
-
288
- /**
289
- * Returns the largest available index for a given dimension.
290
- * @param dimension 1-based dimension (defaults to 1)
291
- */
292
- ubound(dimension?: number): number;
293
-
294
- /**
295
- * Returns a Javascript array with all the elements in the VBArray. If there are multiple dimensions,
296
- * each successive dimension is appended to the end of the array.
297
- * Example: [[1,2,3],[4,5,6]] becomes [1,2,3,4,5,6]
298
- */
299
- toArray(): T[];
300
- }
301
-
302
- interface VBArrayConstructor {
303
- new <T = any>(safeArray: SafeArray<T>): VBArray<T>;
304
- }
305
-
306
- declare var VBArray: VBArrayConstructor;
307
-
308
- /**
309
- * Automation date (VT_DATE)
310
- */
311
- declare class VarDate {
312
- private constructor();
313
- private VarDate_typekey: VarDate;
314
- }
315
-
316
- interface DateConstructor {
317
- new (vd: VarDate): Date;
318
- }
319
-
320
- interface Date {
321
- getVarDate: () => VarDate;
322
- }
@@ -1,41 +0,0 @@
1
- /*! *****************************************************************************
2
- Copyright (c) Microsoft Corporation. All rights reserved.
3
- Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4
- this file except in compliance with the License. You may obtain a copy of the
5
- License at http://www.apache.org/licenses/LICENSE-2.0
6
-
7
- THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8
- KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
9
- WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
10
- MERCHANTABLITY OR NON-INFRINGEMENT.
11
-
12
- See the Apache Version 2.0 License for specific language governing permissions
13
- and limitations under the License.
14
- ***************************************************************************** */
15
-
16
-
17
- /// <reference no-default-lib="true"/>
18
-
19
- /////////////////////////////
20
- /// Worker Async Iterable APIs
21
- /////////////////////////////
22
-
23
- interface FileSystemDirectoryHandleAsyncIterator<T> extends AsyncIteratorObject<T, BuiltinIteratorReturn, unknown> {
24
- [Symbol.asyncIterator](): FileSystemDirectoryHandleAsyncIterator<T>;
25
- }
26
-
27
- interface FileSystemDirectoryHandle {
28
- [Symbol.asyncIterator](): FileSystemDirectoryHandleAsyncIterator<[string, FileSystemHandle]>;
29
- entries(): FileSystemDirectoryHandleAsyncIterator<[string, FileSystemHandle]>;
30
- keys(): FileSystemDirectoryHandleAsyncIterator<string>;
31
- values(): FileSystemDirectoryHandleAsyncIterator<FileSystemHandle>;
32
- }
33
-
34
- interface ReadableStreamAsyncIterator<T> extends AsyncIteratorObject<T, BuiltinIteratorReturn, unknown> {
35
- [Symbol.asyncIterator](): ReadableStreamAsyncIterator<T>;
36
- }
37
-
38
- interface ReadableStream<R = any> {
39
- [Symbol.asyncIterator](options?: ReadableStreamIteratorOptions): ReadableStreamAsyncIterator<R>;
40
- values(options?: ReadableStreamIteratorOptions): ReadableStreamAsyncIterator<R>;
41
- }