@casual-simulation/aux-common 3.2.6 → 3.2.7-alpha.6227012901

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 (212) hide show
  1. package/Errors.d.ts +29 -0
  2. package/Errors.js +2 -0
  3. package/Errors.js.map +1 -0
  4. package/{aux-format-2 → bots}/AuxStateHelpers.d.ts +2 -33
  5. package/{aux-format-2 → bots}/AuxStateHelpers.js +1 -116
  6. package/bots/AuxStateHelpers.js.map +1 -0
  7. package/bots/Bot.d.ts +1 -1
  8. package/bots/BotCalculations.d.ts +4 -1
  9. package/bots/BotCalculations.js +62 -0
  10. package/bots/BotCalculations.js.map +1 -1
  11. package/bots/BotEvents.d.ts +859 -3401
  12. package/bots/BotEvents.js +133 -1529
  13. package/bots/BotEvents.js.map +1 -1
  14. package/bots/StateUpdatedEvent.d.ts +1 -1
  15. package/bots/StateUpdatedEvent.js +1 -1
  16. package/bots/StateUpdatedEvent.js.map +1 -1
  17. package/bots/index.d.ts +1 -0
  18. package/bots/index.js +1 -0
  19. package/bots/index.js.map +1 -1
  20. package/common/Action.d.ts +17 -0
  21. package/common/Action.js +2 -0
  22. package/common/Action.js.map +1 -0
  23. package/common/ConnectionIndicator.d.ts +29 -0
  24. package/common/ConnectionIndicator.js +23 -0
  25. package/common/ConnectionIndicator.js.map +1 -0
  26. package/common/ConnectionInfo.d.ts +30 -0
  27. package/common/ConnectionInfo.js +14 -0
  28. package/common/ConnectionInfo.js.map +1 -0
  29. package/common/ConnectionToken.d.ts +37 -0
  30. package/common/ConnectionToken.js +93 -0
  31. package/common/ConnectionToken.js.map +1 -0
  32. package/common/CurrentVersion.d.ts +26 -0
  33. package/common/CurrentVersion.js +2 -0
  34. package/common/CurrentVersion.js.map +1 -0
  35. package/common/Iterators.d.ts +19 -0
  36. package/common/Iterators.js +39 -0
  37. package/common/Iterators.js.map +1 -0
  38. package/common/LoadingProgress.d.ts +26 -0
  39. package/common/LoadingProgress.js +2 -0
  40. package/common/LoadingProgress.js.map +1 -0
  41. package/common/RemoteActions.d.ts +558 -0
  42. package/common/RemoteActions.js +128 -0
  43. package/common/RemoteActions.js.map +1 -0
  44. package/common/StatusUpdate.d.ts +108 -0
  45. package/common/StatusUpdate.js +2 -0
  46. package/common/StatusUpdate.js.map +1 -0
  47. package/common/StatusUpdateUtils.d.ts +3 -0
  48. package/common/StatusUpdateUtils.js +11 -0
  49. package/common/StatusUpdateUtils.js.map +1 -0
  50. package/common/index.d.ts +11 -0
  51. package/common/index.js +11 -0
  52. package/common/index.js.map +1 -0
  53. package/index.d.ts +4 -1
  54. package/index.js +4 -1
  55. package/index.js.map +1 -1
  56. package/package.json +3 -4
  57. package/partitions/AuxPartition.d.ts +1 -11
  58. package/partitions/AuxPartition.js.map +1 -1
  59. package/partitions/AuxPartitionConfig.d.ts +39 -123
  60. package/partitions/MemoryPartition.d.ts +2 -2
  61. package/partitions/MemoryPartition.js +2 -2
  62. package/partitions/MemoryPartition.js.map +1 -1
  63. package/partitions/OtherPlayersPartition.d.ts +6 -7
  64. package/partitions/OtherPlayersPartition.js +40 -54
  65. package/partitions/OtherPlayersPartition.js.map +1 -1
  66. package/partitions/PartitionUtils.d.ts +28 -1
  67. package/partitions/PartitionUtils.js +174 -1
  68. package/partitions/PartitionUtils.js.map +1 -1
  69. package/partitions/ProxyBridgePartition.d.ts +1 -3
  70. package/partitions/ProxyBridgePartition.js +0 -14
  71. package/partitions/ProxyBridgePartition.js.map +1 -1
  72. package/partitions/RemoteYjsPartition.d.ts +7 -6
  73. package/partitions/RemoteYjsPartition.js +55 -75
  74. package/partitions/RemoteYjsPartition.js.map +1 -1
  75. package/partitions/YjsPartition.d.ts +1 -2
  76. package/partitions/YjsPartition.js +3 -6
  77. package/partitions/YjsPartition.js.map +1 -1
  78. package/partitions/index.d.ts +1 -7
  79. package/partitions/index.js +1 -7
  80. package/partitions/index.js.map +1 -1
  81. package/test/FuzzingHelpers.d.ts +1 -1
  82. package/test/FuzzingHelpers.js +1 -1
  83. package/test/FuzzingHelpers.js.map +1 -1
  84. package/test/TestHelpers.d.ts +8 -0
  85. package/test/TestHelpers.js +23 -0
  86. package/test/TestHelpers.js.map +1 -1
  87. package/utils.d.ts +10 -5
  88. package/utils.js +19 -7
  89. package/utils.js.map +1 -1
  90. package/websockets/AuthenticatedConnectionClient.d.ts +26 -0
  91. package/websockets/AuthenticatedConnectionClient.js +61 -0
  92. package/websockets/AuthenticatedConnectionClient.js.map +1 -0
  93. package/websockets/ConnectionClient.d.ts +59 -0
  94. package/websockets/ConnectionClient.js +2 -0
  95. package/websockets/ConnectionClient.js.map +1 -0
  96. package/websockets/InstRecordsClient.d.ts +118 -0
  97. package/websockets/InstRecordsClient.js +387 -0
  98. package/websockets/InstRecordsClient.js.map +1 -0
  99. package/websockets/InstRecordsClientTimeSyncConnection.d.ts +13 -0
  100. package/websockets/InstRecordsClientTimeSyncConnection.js +16 -0
  101. package/websockets/InstRecordsClientTimeSyncConnection.js.map +1 -0
  102. package/websockets/MemoryConnectionClient.d.ts +19 -0
  103. package/websockets/MemoryConnectionClient.js +41 -0
  104. package/websockets/MemoryConnectionClient.js.map +1 -0
  105. package/websockets/WebsocketEvents.d.ts +2670 -0
  106. package/websockets/WebsocketEvents.js +189 -0
  107. package/websockets/WebsocketEvents.js.map +1 -0
  108. package/websockets/index.d.ts +7 -0
  109. package/websockets/index.js +7 -0
  110. package/websockets/index.js.map +1 -0
  111. package/yjs/YjsHelpers.d.ts +1 -1
  112. package/LoadingProgress.d.ts +0 -54
  113. package/LoadingProgress.js +0 -105
  114. package/LoadingProgress.js.map +0 -1
  115. package/aux-format-2/AuxCausalTree2.d.ts +0 -98
  116. package/aux-format-2/AuxCausalTree2.js +0 -616
  117. package/aux-format-2/AuxCausalTree2.js.map +0 -1
  118. package/aux-format-2/AuxOpTypes.d.ts +0 -268
  119. package/aux-format-2/AuxOpTypes.js +0 -240
  120. package/aux-format-2/AuxOpTypes.js.map +0 -1
  121. package/aux-format-2/AuxStateHelpers.js.map +0 -1
  122. package/aux-format-2/AuxWeaveHelpers.d.ts +0 -132
  123. package/aux-format-2/AuxWeaveHelpers.js +0 -335
  124. package/aux-format-2/AuxWeaveHelpers.js.map +0 -1
  125. package/aux-format-2/AuxWeaveReducer.d.ts +0 -37
  126. package/aux-format-2/AuxWeaveReducer.js +0 -980
  127. package/aux-format-2/AuxWeaveReducer.js.map +0 -1
  128. package/aux-format-2/index.d.ts +0 -7
  129. package/aux-format-2/index.js +0 -7
  130. package/aux-format-2/index.js.map +0 -1
  131. package/partitions/AuxPartitionRealtimeEditModeProvider.d.ts +0 -9
  132. package/partitions/AuxPartitionRealtimeEditModeProvider.js +0 -21
  133. package/partitions/AuxPartitionRealtimeEditModeProvider.js.map +0 -1
  134. package/partitions/BotClient.d.ts +0 -24
  135. package/partitions/BotClient.js +0 -2
  136. package/partitions/BotClient.js.map +0 -1
  137. package/partitions/BotPartition.d.ts +0 -45
  138. package/partitions/BotPartition.js +0 -186
  139. package/partitions/BotPartition.js.map +0 -1
  140. package/partitions/CausalRepoPartition.d.ts +0 -45
  141. package/partitions/CausalRepoPartition.js +0 -157
  142. package/partitions/CausalRepoPartition.js.map +0 -1
  143. package/partitions/MemoryBotClient.d.ts +0 -11
  144. package/partitions/MemoryBotClient.js +0 -41
  145. package/partitions/MemoryBotClient.js.map +0 -1
  146. package/partitions/RemoteCausalRepoHistoryPartition.d.ts +0 -53
  147. package/partitions/RemoteCausalRepoHistoryPartition.js +0 -206
  148. package/partitions/RemoteCausalRepoHistoryPartition.js.map +0 -1
  149. package/partitions/RemoteCausalRepoPartition.d.ts +0 -72
  150. package/partitions/RemoteCausalRepoPartition.js +0 -468
  151. package/partitions/RemoteCausalRepoPartition.js.map +0 -1
  152. package/runtime/AuxCompiler.d.ts +0 -258
  153. package/runtime/AuxCompiler.js +0 -722
  154. package/runtime/AuxCompiler.js.map +0 -1
  155. package/runtime/AuxDevice.d.ts +0 -28
  156. package/runtime/AuxDevice.js +0 -2
  157. package/runtime/AuxDevice.js.map +0 -1
  158. package/runtime/AuxGlobalContext.d.ts +0 -571
  159. package/runtime/AuxGlobalContext.js +0 -606
  160. package/runtime/AuxGlobalContext.js.map +0 -1
  161. package/runtime/AuxLibrary.d.ts +0 -2702
  162. package/runtime/AuxLibrary.js +0 -11046
  163. package/runtime/AuxLibrary.js.map +0 -1
  164. package/runtime/AuxLibraryDefinitions.def +0 -13139
  165. package/runtime/AuxRealtimeEditModeProvider.d.ts +0 -35
  166. package/runtime/AuxRealtimeEditModeProvider.js +0 -34
  167. package/runtime/AuxRealtimeEditModeProvider.js.map +0 -1
  168. package/runtime/AuxResults.d.ts +0 -77
  169. package/runtime/AuxResults.js +0 -6
  170. package/runtime/AuxResults.js.map +0 -1
  171. package/runtime/AuxRuntime.d.ts +0 -253
  172. package/runtime/AuxRuntime.js +0 -2700
  173. package/runtime/AuxRuntime.js.map +0 -1
  174. package/runtime/AuxRuntimeDynamicImports.d.ts +0 -14
  175. package/runtime/AuxRuntimeDynamicImports.js +0 -24
  176. package/runtime/AuxRuntimeDynamicImports.js.map +0 -1
  177. package/runtime/AuxVersion.d.ts +0 -39
  178. package/runtime/AuxVersion.js +0 -2
  179. package/runtime/AuxVersion.js.map +0 -1
  180. package/runtime/CasualOSError.d.ts +0 -37
  181. package/runtime/CasualOSError.js +0 -25
  182. package/runtime/CasualOSError.js.map +0 -1
  183. package/runtime/CompiledBot.d.ts +0 -106
  184. package/runtime/CompiledBot.js +0 -44
  185. package/runtime/CompiledBot.js.map +0 -1
  186. package/runtime/PerformanceNowPolyfill.d.ts +0 -1
  187. package/runtime/PerformanceNowPolyfill.js +0 -8
  188. package/runtime/PerformanceNowPolyfill.js.map +0 -1
  189. package/runtime/RuntimeBot.d.ts +0 -176
  190. package/runtime/RuntimeBot.js +0 -732
  191. package/runtime/RuntimeBot.js.map +0 -1
  192. package/runtime/RuntimeStateVersion.d.ts +0 -23
  193. package/runtime/RuntimeStateVersion.js +0 -22
  194. package/runtime/RuntimeStateVersion.js.map +0 -1
  195. package/runtime/Transpiler.d.ts +0 -174
  196. package/runtime/Transpiler.js +0 -611
  197. package/runtime/Transpiler.js.map +0 -1
  198. package/runtime/Utils.d.ts +0 -74
  199. package/runtime/Utils.js +0 -488
  200. package/runtime/Utils.js.map +0 -1
  201. package/runtime/index.d.ts +0 -9
  202. package/runtime/index.js +0 -9
  203. package/runtime/index.js.map +0 -1
  204. package/runtime/test/RuntimeTestHelpers.d.ts +0 -11
  205. package/runtime/test/RuntimeTestHelpers.js +0 -26
  206. package/runtime/test/RuntimeTestHelpers.js.map +0 -1
  207. package/runtime/test/TestScriptBotFactory.d.ts +0 -16
  208. package/runtime/test/TestScriptBotFactory.js +0 -107
  209. package/runtime/test/TestScriptBotFactory.js.map +0 -1
  210. /package/{runtime/BlobPolyfill.d.ts → BlobPolyfill.d.ts} +0 -0
  211. /package/{runtime/BlobPolyfill.js → BlobPolyfill.js} +0 -0
  212. /package/{runtime/BlobPolyfill.js.map → BlobPolyfill.js.map} +0 -0
@@ -1,74 +0,0 @@
1
- import { RealtimeEditMode } from './RuntimeBot';
2
- import { AuxPartitionRealtimeStrategy } from '../partitions/AuxPartition';
3
- import { Easing, EaseType, Bot } from '../bots';
4
- import './BlobPolyfill';
5
- /**
6
- * Converts the given error to a copiable value.
7
- * Returns a new value that can be sent over to web workers.
8
- * @param err The error to convert.
9
- */
10
- export declare function convertErrorToCopiableValue(err: unknown): any;
11
- /**
12
- * Converts the given value to a copiable value.
13
- * Copiable values are strings, numbers, booleans, arrays, and objects made of any of those types.
14
- * Non-copiable values are functions and errors.
15
- * @param value
16
- */
17
- export declare function convertToCopiableValue(value: any): any;
18
- export declare function realtimeStrategyToRealtimeEditMode(strategy: AuxPartitionRealtimeStrategy): RealtimeEditMode;
19
- export declare class DeepObjectError extends Error {
20
- constructor();
21
- }
22
- export declare function getDefaultEasing(easing: Easing | EaseType | ((progress: number) => number)): Easing;
23
- export declare function getEasing(easing: Easing | EaseType | ((progress: number) => number)): any;
24
- export declare function getTweenEasing(easing: Easing): any;
25
- /**
26
- * Embeds the given base64 string into a PDF document that references CasualOS.
27
- * @param str The base64 string to embed.
28
- */
29
- export declare function embedBase64InPdf(str: string): string;
30
- /**
31
- * Gets the Base64 data that was embedded in the given PDF document by embedBase64InPdf().
32
- */
33
- export declare function getEmbeddedBase64FromPdf(pdf: string): string;
34
- /**
35
- * Formats the given token and service (bundle ID) into a string that can be used as an auth token for records requests.
36
- */
37
- export declare function formatAuthToken(token: string, service: string): string;
38
- /**
39
- * Parses the given auth token into a token and service (bundle ID) pair.
40
- * The returned token is the token that was returned from the auth API and the service is the bundle ID of the app that requested it.
41
- */
42
- export declare function parseAuthToken(token: string): [string, string];
43
- /**
44
- * Constructs a Uint8Array from the given hexadecimal formatted string.
45
- * @param hex The hexadecimal string.
46
- */
47
- export declare function fromHexString(hex: string): Uint8Array;
48
- /**
49
- * Constructs a hexidecimal formatted string from the given array of bytes.
50
- * @param bytes The bytes that should be hex formatted.
51
- */
52
- export declare function toHexString(bytes: Uint8Array): string;
53
- /**
54
- * Checks each of the tags in the given bot to ensure that the bot is copiable and returns a new bot with serializable values if the given bot is contains non-serializable values.
55
- * @param bot The bot to check.
56
- */
57
- export declare function ensureBotIsSerializable(bot: Bot): Bot;
58
- /**
59
- * Checks that the given tag is copiable and returns the copiable version of the value if it is not.
60
- * @param value The value to check.
61
- */
62
- export declare function ensureTagIsSerializable(value: any): any;
63
- /**
64
- * Determines if the given value represents a promise.
65
- * @param value The value to check.
66
- */
67
- export declare function isPromise<T>(value: unknown): value is Promise<T>;
68
- export declare const RUNTIME_PROMISE: unique symbol;
69
- export interface RuntimePromise<T> extends Promise<T> {
70
- [RUNTIME_PROMISE]: true;
71
- }
72
- export declare function isRuntimePromise<T>(value: unknown): value is RuntimePromise<T>;
73
- export declare function markAsRuntimePromise<T>(promise: Promise<T>): RuntimePromise<T>;
74
- //# sourceMappingURL=Utils.d.ts.map
package/runtime/Utils.js DELETED
@@ -1,488 +0,0 @@
1
- import { RealtimeEditMode } from './RuntimeBot';
2
- import { createBot, formatBotDate, formatBotRotation, formatBotVector, hasValue, isBot, isRuntimeBot, ORIGINAL_OBJECT, } from '../bots/BotCalculations';
3
- import { forOwn } from 'lodash';
4
- import TWEEN from '@tweenjs/tween.js';
5
- import './BlobPolyfill';
6
- import { DateTime } from 'luxon';
7
- import { Rotation, Vector2, Vector3 } from '../math';
8
- /**
9
- * Converts the given error to a copiable value.
10
- * Returns a new value that can be sent over to web workers.
11
- * @param err The error to convert.
12
- */
13
- export function convertErrorToCopiableValue(err) {
14
- if (err instanceof Error) {
15
- let obj = {
16
- message: err.message,
17
- name: err.name,
18
- stack: err.stack,
19
- };
20
- if (err.response) {
21
- let response = err.response;
22
- obj.response = {
23
- data: response.data,
24
- headers: response.headers,
25
- status: response.status,
26
- statusText: response.statusText,
27
- };
28
- }
29
- return obj;
30
- }
31
- else {
32
- return err;
33
- }
34
- }
35
- /**
36
- * Converts the given value to a copiable value.
37
- * Copiable values are strings, numbers, booleans, arrays, and objects made of any of those types.
38
- * Non-copiable values are functions and errors.
39
- * @param value
40
- */
41
- export function convertToCopiableValue(value) {
42
- try {
43
- return _convertToCopiableValue(value, 0, new Map());
44
- }
45
- catch (err) {
46
- if (err instanceof DeepObjectError) {
47
- return '[Nested object]';
48
- }
49
- throw err;
50
- }
51
- }
52
- function _convertToCopiableValue(value, depth, map) {
53
- if (depth > 1000) {
54
- throw new DeepObjectError();
55
- }
56
- if (typeof value === 'function') {
57
- return `[Function ${value.name}]`;
58
- }
59
- else if (value instanceof Error) {
60
- return `${value.name}: ${value.message}`;
61
- }
62
- else if (typeof value === 'object') {
63
- if (map.has(value)) {
64
- return map.get(value);
65
- }
66
- if (isRuntimeBot(value)) {
67
- const result = {
68
- id: value.id,
69
- tags: value.tags.toJSON(),
70
- };
71
- if (hasValue(value.space)) {
72
- result.space = value.space;
73
- }
74
- map.set(value, result);
75
- return result;
76
- }
77
- else if (isBot(value)) {
78
- const result = {
79
- id: value.id,
80
- tags: value.tags,
81
- };
82
- map.set(value, result);
83
- return result;
84
- }
85
- else if (Array.isArray(value)) {
86
- const result = [];
87
- map.set(value, result);
88
- result.push(...value.map((val) => _convertToCopiableValue(val, depth + 1, map)));
89
- return result;
90
- }
91
- else if (value === null || value === undefined) {
92
- return value;
93
- }
94
- else if (value instanceof Date) {
95
- return value;
96
- }
97
- else if (value instanceof Blob) {
98
- return value;
99
- }
100
- else if (value instanceof ArrayBuffer) {
101
- return value;
102
- }
103
- else if (ArrayBuffer.isView(value)) {
104
- return value;
105
- }
106
- else if (value instanceof DateTime) {
107
- return formatBotDate(value);
108
- }
109
- else if (value instanceof Vector2 || value instanceof Vector3) {
110
- return formatBotVector(value);
111
- }
112
- else if (value instanceof Rotation) {
113
- return formatBotRotation(value);
114
- }
115
- else {
116
- let result = {};
117
- map.set(value, result);
118
- forOwn(value, (val, key, object) => {
119
- result[key] = _convertToCopiableValue(val, depth + 1, map);
120
- });
121
- return result;
122
- }
123
- }
124
- return value;
125
- }
126
- export function realtimeStrategyToRealtimeEditMode(strategy) {
127
- return strategy === 'immediate'
128
- ? RealtimeEditMode.Immediate
129
- : RealtimeEditMode.Delayed;
130
- }
131
- export class DeepObjectError extends Error {
132
- constructor() {
133
- super('Object too deeply nested.');
134
- }
135
- }
136
- export function getDefaultEasing(easing) {
137
- return hasValue(easing)
138
- ? typeof easing === 'function'
139
- ? { mode: 'inout', type: 'linear' }
140
- : typeof easing === 'string'
141
- ? {
142
- mode: 'inout',
143
- type: easing,
144
- }
145
- : easing
146
- : {
147
- mode: 'inout',
148
- type: 'linear',
149
- };
150
- }
151
- export function getEasing(easing) {
152
- if (typeof easing === 'function') {
153
- return easing;
154
- }
155
- const value = getDefaultEasing(easing);
156
- return getTweenEasing(value);
157
- }
158
- export function getTweenEasing(easing) {
159
- switch (easing.type) {
160
- case 'linear':
161
- default:
162
- return TWEEN.Easing.Linear.None;
163
- case 'circular':
164
- return resolveEaseType(easing.mode, TWEEN.Easing.Circular);
165
- case 'cubic':
166
- return resolveEaseType(easing.mode, TWEEN.Easing.Cubic);
167
- case 'exponential':
168
- return resolveEaseType(easing.mode, TWEEN.Easing.Exponential);
169
- case 'elastic':
170
- return resolveEaseType(easing.mode, TWEEN.Easing.Elastic);
171
- case 'quadratic':
172
- return resolveEaseType(easing.mode, TWEEN.Easing.Quadratic);
173
- case 'quartic':
174
- return resolveEaseType(easing.mode, TWEEN.Easing.Quartic);
175
- case 'quintic':
176
- return resolveEaseType(easing.mode, TWEEN.Easing.Quintic);
177
- case 'sinusoidal':
178
- return resolveEaseType(easing.mode, TWEEN.Easing.Sinusoidal);
179
- }
180
- }
181
- function resolveEaseType(mode, val) {
182
- if ('None' in val) {
183
- return val.None;
184
- }
185
- else {
186
- switch (mode) {
187
- case 'in':
188
- return val.In;
189
- case 'out':
190
- return val.Out;
191
- case 'inout':
192
- default:
193
- return val.InOut;
194
- }
195
- }
196
- }
197
- /**
198
- * Embeds the given base64 string into a PDF document that references CasualOS.
199
- * @param str The base64 string to embed.
200
- */
201
- export function embedBase64InPdf(str) {
202
- return `%PDF-1.3
203
- %����
204
-
205
- 1 0 obj
206
- <<
207
- /Type /Catalog
208
- /Outlines 2 0 R
209
- /Pages 3 0 R
210
- >>
211
- endobj
212
-
213
- 2 0 obj
214
- <<
215
- /Type /Outlines
216
- /Count 0
217
- >>
218
- endobj
219
-
220
- 3 0 obj
221
- <<
222
- /Type /Pages
223
- /Count 1
224
- /Kids [ 4 0 R ]
225
- >>
226
- endobj
227
-
228
- 4 0 obj
229
- <<
230
- /Type /Page
231
- /Parent 3 0 R
232
- /Resources <<
233
- /Font <<
234
- /F1 9 0 R
235
- >>
236
- /ProcSet 8 0 R
237
- >>
238
- /MediaBox [0 0 512 512]
239
- /Annots [ 25 0 R ]
240
- /Contents 5 0 R
241
- >>
242
- endobj
243
-
244
- 5 0 obj
245
- << /Length 1074 >>
246
- stream
247
- BT
248
- /F1 28 Tf
249
- 183 412 Td
250
- ( CasualOS ) Tj
251
- ET
252
- BT
253
- /F1 16 Tf
254
- 150 256 Td
255
- ( Open) Tj
256
- ET
257
- BT
258
- 0 0 1 rg
259
- 0 0 1 RG
260
- /F1 16 Tf
261
- 193.25 256 Td
262
- ( https://casualos.com ) Tj
263
- ET
264
- endstream
265
- endobj
266
-
267
- 8 0 obj
268
- [/PDF /Text]
269
- endobj
270
-
271
- 9 0 obj
272
- <<
273
- /Type /Font
274
- /Subtype /Type1
275
- /Name /F1
276
- /BaseFont /Helvetica
277
- /Encoding /WinAnsiEncoding
278
- >>
279
- endobj
280
-
281
- 10 0 obj
282
- <<
283
- /Creator (Casual Simulation)
284
- /Producer (CasualOS)
285
- /CreationDate (D:20210720000000)
286
- >>
287
- endobj
288
-
289
- 25 0 obj % object ID 26 which is referenced by the OBJR in Object 11
290
- <<
291
- /Type /Annot
292
- /Subtype /Link
293
- /Border [0 0 0] %a colorless border
294
- /Rect [193.25 245 350 276] %the boundaries defining target area where link annotation is active
295
- /A <</S /URI /URI (https://casualos.com)>> % The action that the link should perform (Go to casualos.com)
296
- >>
297
- endobj
298
-
299
- 9999909 0 obj
300
- (${str})
301
- endobj
302
-
303
- xref
304
- 0 11
305
- 0000000000 65535 f
306
- 0000000019 00000 n
307
- 0000000093 00000 n
308
- 0000000147 00000 n
309
- 0000000222 00000 n
310
- 0000000390 00000 n
311
- 0000001522 00000 n
312
- 0000001690 00000 n
313
- 0000002423 00000 n
314
- 0000002456 00000 n
315
- 0000002574 00000 n
316
-
317
- trailer
318
- <<
319
- /Size 11
320
- /Root 1 0 R
321
- /Info 10 0 R
322
- >>
323
-
324
- startxref
325
- 2714
326
- %%EOF
327
- `;
328
- }
329
- /**
330
- * Gets the Base64 data that was embedded in the given PDF document by embedBase64InPdf().
331
- */
332
- export function getEmbeddedBase64FromPdf(pdf) {
333
- const objStart = pdf.lastIndexOf('9999909 0 obj');
334
- if (objStart < 0) {
335
- return null;
336
- }
337
- const pdfFromObj = pdf.slice(objStart);
338
- const objEnd = pdfFromObj.indexOf('endobj');
339
- if (objEnd < 0) {
340
- return null;
341
- }
342
- const obj = pdfFromObj.slice(0, objEnd);
343
- const openParenthesis = obj.indexOf('(');
344
- const closeParenthesis = obj.indexOf(')');
345
- if (openParenthesis < 0 || closeParenthesis < 0) {
346
- return null;
347
- }
348
- const base64 = obj.slice(openParenthesis + 1, closeParenthesis);
349
- return base64;
350
- }
351
- /**
352
- * Formats the given token and service (bundle ID) into a string that can be used as an auth token for records requests.
353
- */
354
- export function formatAuthToken(token, service) {
355
- return `${token}.${service}`;
356
- }
357
- /**
358
- * Parses the given auth token into a token and service (bundle ID) pair.
359
- * The returned token is the token that was returned from the auth API and the service is the bundle ID of the app that requested it.
360
- */
361
- export function parseAuthToken(token) {
362
- const dotIndex = token.indexOf('.');
363
- if (dotIndex < 0) {
364
- return null;
365
- }
366
- const tokenWithoutService = token.slice(0, dotIndex);
367
- const service = token.slice(dotIndex + 1);
368
- return [tokenWithoutService, service];
369
- }
370
- /**
371
- * Constructs a Uint8Array from the given hexadecimal formatted string.
372
- * @param hex The hexadecimal string.
373
- */
374
- export function fromHexString(hex) {
375
- const numBytes = hex.length / 2;
376
- const a = new Uint8Array(numBytes);
377
- hex = hex.toLowerCase();
378
- for (let i = 0; i < a.length; i++) {
379
- let char = i * 2;
380
- let char1 = hex.charCodeAt(char);
381
- let char2 = hex.charCodeAt(char + 1);
382
- let val = fromHexCode(char1) * 16 + fromHexCode(char2);
383
- a[i] = val;
384
- }
385
- return a;
386
- }
387
- /**
388
- * Constructs a hexidecimal formatted string from the given array of bytes.
389
- * @param bytes The bytes that should be hex formatted.
390
- */
391
- export function toHexString(bytes) {
392
- let str = '';
393
- for (let i = 0; i < bytes.length; i++) {
394
- let byte = bytes[i];
395
- let temp = byte.toString(16);
396
- if (temp.length < 2) {
397
- str += '0' + temp;
398
- }
399
- else {
400
- str += temp;
401
- }
402
- }
403
- return str;
404
- }
405
- const _0CharCode = '0'.charCodeAt(0);
406
- const _9CharCode = '9'.charCodeAt(0);
407
- const aCharCode = 'a'.charCodeAt(0);
408
- const fCharCode = 'f'.charCodeAt(0);
409
- function fromHexCode(code) {
410
- if (code >= _0CharCode && code <= _9CharCode) {
411
- return code - _0CharCode;
412
- }
413
- else if (code >= aCharCode && code <= fCharCode) {
414
- return code - aCharCode + 10;
415
- }
416
- throw new Error('Invalid hex code: ' + code);
417
- }
418
- /**
419
- * Checks each of the tags in the given bot to ensure that the bot is copiable and returns a new bot with serializable values if the given bot is contains non-serializable values.
420
- * @param bot The bot to check.
421
- */
422
- export function ensureBotIsSerializable(bot) {
423
- let newBot;
424
- for (let tag in bot.tags) {
425
- const value = bot.tags[tag];
426
- if (value instanceof DateTime ||
427
- value instanceof Vector2 ||
428
- value instanceof Vector3 ||
429
- value instanceof Rotation) {
430
- updateTag(tag, convertToCopiableValue(value));
431
- }
432
- else if (hasValue(value) &&
433
- typeof value === 'object' &&
434
- ORIGINAL_OBJECT in value) {
435
- updateTag(tag, value[ORIGINAL_OBJECT]);
436
- }
437
- }
438
- return newBot !== null && newBot !== void 0 ? newBot : bot;
439
- function updateTag(tag, value) {
440
- if (!newBot) {
441
- newBot = createBot(bot.id, Object.assign({}, bot.tags), bot.space);
442
- }
443
- newBot.tags[tag] = value;
444
- }
445
- }
446
- /**
447
- * Checks that the given tag is copiable and returns the copiable version of the value if it is not.
448
- * @param value The value to check.
449
- */
450
- export function ensureTagIsSerializable(value) {
451
- if (value instanceof DateTime ||
452
- value instanceof Vector2 ||
453
- value instanceof Vector3 ||
454
- value instanceof Rotation) {
455
- return convertToCopiableValue(value);
456
- }
457
- else if (hasValue(value) &&
458
- typeof value === 'object' &&
459
- ORIGINAL_OBJECT in value) {
460
- return value[ORIGINAL_OBJECT];
461
- }
462
- return value;
463
- }
464
- /**
465
- * Determines if the given value represents a promise.
466
- * @param value The value to check.
467
- */
468
- export function isPromise(value) {
469
- return (typeof value === 'object' &&
470
- value !== null &&
471
- value instanceof Promise &&
472
- typeof value.then === 'function' &&
473
- typeof value.catch === 'function');
474
- }
475
- export const RUNTIME_PROMISE = Symbol('RUNTIME_PROMISE');
476
- export function isRuntimePromise(value) {
477
- return isPromise(value) && RUNTIME_PROMISE in value;
478
- }
479
- export function markAsRuntimePromise(promise) {
480
- Object.defineProperty(promise, RUNTIME_PROMISE, {
481
- value: true,
482
- configurable: false,
483
- enumerable: false,
484
- writable: false,
485
- });
486
- return promise;
487
- }
488
- //# sourceMappingURL=Utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Utils.js","sourceRoot":"","sources":["Utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EACH,SAAS,EACT,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,QAAQ,EACR,KAAK,EACL,YAAY,EACZ,eAAe,GAClB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,KAAgC,MAAM,mBAAmB,CAAC;AACjE,OAAO,gBAAgB,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAErD;;;;GAIG;AACH,MAAM,UAAU,2BAA2B,CAAC,GAAY;IACpD,IAAI,GAAG,YAAY,KAAK,EAAE;QACtB,IAAI,GAAG,GAAQ;YACX,OAAO,EAAE,GAAG,CAAC,OAAO;YACpB,IAAI,EAAE,GAAG,CAAC,IAAI;YACd,KAAK,EAAE,GAAG,CAAC,KAAK;SACnB,CAAC;QAEF,IAAU,GAAI,CAAC,QAAQ,EAAE;YACrB,IAAI,QAAQ,GAAS,GAAI,CAAC,QAAQ,CAAC;YACnC,GAAG,CAAC,QAAQ,GAAG;gBACX,IAAI,EAAE,QAAQ,CAAC,IAAI;gBACnB,OAAO,EAAE,QAAQ,CAAC,OAAO;gBACzB,MAAM,EA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AAK,CAAC;AACjB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAI,KAAc;IACvC,OAAO,CACH,OAAO,KAAK,KAAK,QAAQ;QACzB,KAAK,KAAK,IAAI;QACd,KAAK,YAAY,OAAO;QACxB,OAAQ,KAAa,CAAC,IAAI,KAAK,UAAU;QACzC,OAAQ,KAAa,CAAC,KAAK,KAAK,UAAU,CAC7C,CAAC;AACN,CAAC;AAED,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;AAMzD,MAAM,UAAU,gBAAgB,CAC5B,KAAc;IAEd,OAAO,SAAS,CAAC,KAAK,CAAC,IAAI,eAAe,IAAI,KAAK,CAAC;AACxD,CAAC;AAED,MAAM,UAAU,oBAAoB,CAChC,OAAmB;IAEnB,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,eAAe,EAAE;QAC5C,KAAK,EAAE,IAAI;QACX,YAAY,EAAE,KAAK;QACnB,UAAU,EAAE,KAAK;QACjB,QAAQ,EAAE,KAAK;KAClB,CAAC,CAAC;IAEH,OAAO,OAA4B,CAAC;AACxC,CAAC"}
@@ -1,9 +0,0 @@
1
- export * from './AuxResults';
2
- export * from './AuxRuntime';
3
- export * from './Transpiler';
4
- export * from './AuxDevice';
5
- export * from './AuxVersion';
6
- export * from './RuntimeStateVersion';
7
- export * from './AuxRealtimeEditModeProvider';
8
- export * from './Utils';
9
- //# sourceMappingURL=index.d.ts.map
package/runtime/index.js DELETED
@@ -1,9 +0,0 @@
1
- export * from './AuxResults';
2
- export * from './AuxRuntime';
3
- export * from './Transpiler';
4
- export * from './AuxDevice';
5
- export * from './AuxVersion';
6
- export * from './RuntimeStateVersion';
7
- export * from './AuxRealtimeEditModeProvider';
8
- export * from './Utils';
9
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,SAAS,CAAC"}
@@ -1,11 +0,0 @@
1
- import { DateTime } from 'luxon';
2
- import { Vector2 } from '../../math/Vector2';
3
- import { Vector3 } from '../../math/Vector3';
4
- import { Rotation } from '../../math/Rotation';
5
- export declare const customDataTypeCases: (readonly ["DateTime", DateTime, "📅1999-11-19T05:42:08Z"] | readonly ["Vector2", Vector2, "➡️1,2"] | readonly ["Vector3", Vector3, "➡️1,2,3"] | readonly ["Rotation", Rotation, "🔁0,0,0,1"])[];
6
- export declare const allDataTypeCases: (readonly ["DateTime", DateTime, "📅1999-11-19T05:42:08Z"] | readonly ["Vector2", Vector2, "➡️1,2"] | readonly ["Vector3", Vector3, "➡️1,2,3"] | readonly ["Rotation", Rotation, "🔁0,0,0,1"] | readonly ["Number", 123, 123] | readonly ["true", true, true] | readonly ["false", false, false] | readonly ["String", "abc", "abc"] | readonly ["Infinity", number, number] | readonly ["-Infinity", number, number] | readonly ["Object", {
7
- readonly abc: "def";
8
- }, {
9
- readonly abc: "def";
10
- }] | readonly ["Array", readonly [1, 2, 3], readonly [1, 2, 3]])[];
11
- //# sourceMappingURL=RuntimeTestHelpers.d.ts.map
@@ -1,26 +0,0 @@
1
- import { DateTime } from 'luxon';
2
- import { Vector2 } from '../../math/Vector2';
3
- import { Vector3 } from '../../math/Vector3';
4
- import { Rotation } from '../../math/Rotation';
5
- export const customDataTypeCases = [
6
- [
7
- 'DateTime',
8
- DateTime.utc(1999, 11, 19, 5, 42, 8),
9
- '📅1999-11-19T05:42:08Z',
10
- ],
11
- ['Vector2', new Vector2(1, 2), '➡️1,2'],
12
- ['Vector3', new Vector3(1, 2, 3), '➡️1,2,3'],
13
- ['Rotation', new Rotation(), '🔁0,0,0,1'],
14
- ];
15
- export const allDataTypeCases = [
16
- ...customDataTypeCases,
17
- ['Number', 123, 123],
18
- ['true', true, true],
19
- ['false', false, false],
20
- ['String', 'abc', 'abc'],
21
- ['Infinity', Infinity, Infinity],
22
- ['-Infinity', -Infinity, -Infinity],
23
- ['Object', { abc: 'def' }, { abc: 'def' }],
24
- ['Array', [1, 2, 3], [1, 2, 3]],
25
- ];
26
- //# sourceMappingURL=RuntimeTestHelpers.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RuntimeTestHelpers.js","sourceRoot":"","sources":["RuntimeTestHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAG/C,MAAM,CAAC,MAAM,mBAAmB,GAAG;IAC/B;QACI,UAAU;QACV,QAAQ,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;QACpC,wBAAwB;KAClB;IACV,CAAC,SAAS,EAAE,IAAI,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,OAAO,CAAU;IAChD,CAAC,SAAS,EAAE,IAAI,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,SAAS,CAAU;IACrD,CAAC,UAAU,EAAE,IAAI,QAAQ,EAAE,EAAE,WAAW,CAAU;CACrD,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC5B,GAAG,mBAAmB;IACtB,CAAC,QAAQ,EAAE,GAAG,EAAE,GAAG,CAAU;IAC7B,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CAAU;IAC7B,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,CAAU;IAChC,CAAC,QAAQ,EAAE,KAAK,EAAE,KAAK,CAAU;IACjC,CAAC,UAAU,EAAE,QAAQ,EAAE,QAAQ,CAAU;IACzC,CAAC,WAAW,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAU;IAC5C,CAAC,QAAQ,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,CAAU;IACnD,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAU;CAC3C,CAAC"}
@@ -1,16 +0,0 @@
1
- import { BotTags, BotSpace, Bot, BotSignatures, RuntimeBot } from '../../bots';
2
- import { RuntimeBotInterface, RuntimeBotFactory, RealtimeEditMode } from '../RuntimeBot';
3
- export declare class TestScriptBotFactory implements RuntimeBotFactory {
4
- createRuntimeBot(bot: Bot): RuntimeBot;
5
- destroyScriptBot(): RealtimeEditMode;
6
- }
7
- /**
8
- * Creates a dummy script bot.
9
- * That is, a bot which uses the given values directly and does not marshall changes back to a runtime.
10
- * @param id The ID of the bot.
11
- * @param tags The tags the bot should have.
12
- * @param space The space of the bot.
13
- */
14
- export declare function createDummyRuntimeBot(id: string, tags?: BotTags, space?: BotSpace, signatures?: BotSignatures): RuntimeBot;
15
- export declare const testScriptBotInterface: RuntimeBotInterface;
16
- //# sourceMappingURL=TestScriptBotFactory.d.ts.map