@tak-ps/node-cot 12.17.1 → 12.18.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 (120) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/lib/data-package.js +64 -16
  3. package/dist/lib/data-package.js.map +1 -1
  4. package/dist/lib/types/iconset.js +12 -4
  5. package/dist/lib/types/iconset.js.map +1 -1
  6. package/dist/lib/xml/basemap.js +1 -1
  7. package/dist/lib/xml/basemap.js.map +1 -1
  8. package/dist/lib/xml/iconset.js +29 -2
  9. package/dist/lib/xml/iconset.js.map +1 -1
  10. package/dist/package.json +1 -1
  11. package/dist/tsconfig.tsbuildinfo +1 -1
  12. package/lib/data-package.ts +70 -17
  13. package/lib/types/iconset.ts +14 -4
  14. package/lib/xml/basemap.ts +2 -2
  15. package/lib/xml/iconset.ts +36 -3
  16. package/lib/xml-document.ts +1 -1
  17. package/package.json +1 -1
  18. package/tsconfig.json +1 -0
  19. package/dist/test/basemaps.test.js +0 -16
  20. package/dist/test/basemaps.test.js.map +0 -1
  21. package/dist/test/chat.test.js +0 -97
  22. package/dist/test/chat.test.js.map +0 -1
  23. package/dist/test/cot-fileshare.test.js +0 -89
  24. package/dist/test/cot-fileshare.test.js.map +0 -1
  25. package/dist/test/cot-itak.test.js +0 -95
  26. package/dist/test/cot-itak.test.js.map +0 -1
  27. package/dist/test/cot-mma.test.js +0 -108
  28. package/dist/test/cot-mma.test.js.map +0 -1
  29. package/dist/test/cot-polyline.test.js +0 -98
  30. package/dist/test/cot-polyline.test.js.map +0 -1
  31. package/dist/test/cot-range-and-bearing.test.js +0 -98
  32. package/dist/test/cot-range-and-bearing.test.js.map +0 -1
  33. package/dist/test/cot-routes.test.js +0 -466
  34. package/dist/test/cot-routes.test.js.map +0 -1
  35. package/dist/test/cot-types.test.js +0 -7
  36. package/dist/test/cot-types.test.js.map +0 -1
  37. package/dist/test/cot-uas-tool.test.js +0 -286
  38. package/dist/test/cot-uas-tool.test.js.map +0 -1
  39. package/dist/test/cot-video.test.js +0 -196
  40. package/dist/test/cot-video.test.js.map +0 -1
  41. package/dist/test/cot_is.test.js +0 -353
  42. package/dist/test/cot_is.test.js.map +0 -1
  43. package/dist/test/data-package.test.js +0 -234
  44. package/dist/test/data-package.test.js.map +0 -1
  45. package/dist/test/diff.test.js +0 -73
  46. package/dist/test/diff.test.js.map +0 -1
  47. package/dist/test/flow-tags.test.js +0 -19
  48. package/dist/test/flow-tags.test.js.map +0 -1
  49. package/dist/test/force-delete.js +0 -46
  50. package/dist/test/force-delete.js.map +0 -1
  51. package/dist/test/from_geojson.test.js +0 -287
  52. package/dist/test/from_geojson.test.js.map +0 -1
  53. package/dist/test/newlines.test.js +0 -79
  54. package/dist/test/newlines.test.js.map +0 -1
  55. package/dist/test/reversal-geojson.test.js +0 -15
  56. package/dist/test/reversal-geojson.test.js.map +0 -1
  57. package/dist/test/reversal-proto.test.js +0 -54
  58. package/dist/test/reversal-proto.test.js.map +0 -1
  59. package/dist/test/stream.js +0 -10
  60. package/dist/test/stream.js.map +0 -1
  61. package/dist/test/taskings-mission.test.js +0 -140
  62. package/dist/test/taskings-mission.test.js.map +0 -1
  63. package/dist/test/util.test.js +0 -25
  64. package/dist/test/util.test.js.map +0 -1
  65. package/dist/test/validation.test.js +0 -13
  66. package/dist/test/validation.test.js.map +0 -1
  67. package/test/basemaps/Bing_Hybrid.xml +0 -12
  68. package/test/basemaps/Bing_Maps.xml +0 -10
  69. package/test/basemaps/USGSBasemap.xml +0 -10
  70. package/test/basemaps/USGSImageryOnly.xml +0 -10
  71. package/test/basemaps/USGSImageryTopo.xml +0 -10
  72. package/test/basemaps/USGSShadedRelief.xml +0 -10
  73. package/test/basemaps/opentopomap.xml +0 -10
  74. package/test/basemaps.test.ts +0 -19
  75. package/test/chat.test.ts +0 -103
  76. package/test/cot-fileshare.test.ts +0 -92
  77. package/test/cot-itak.test.ts +0 -100
  78. package/test/cot-mma.test.ts +0 -111
  79. package/test/cot-polyline.test.ts +0 -103
  80. package/test/cot-range-and-bearing.test.ts +0 -100
  81. package/test/cot-routes.test.ts +0 -468
  82. package/test/cot-types.test.ts +0 -8
  83. package/test/cot-uas-tool.test.ts +0 -295
  84. package/test/cot-video.test.ts +0 -204
  85. package/test/cot_is.test.ts +0 -431
  86. package/test/data-package.test.ts +0 -314
  87. package/test/diff.test.ts +0 -80
  88. package/test/fixtures/archived.geojson +0 -20
  89. package/test/fixtures/attachments.geojson +0 -20
  90. package/test/fixtures/basic.geojson +0 -19
  91. package/test/fixtures/circle.geojson +0 -30
  92. package/test/fixtures/color.geojson +0 -21
  93. package/test/fixtures/fileshare.geojson +0 -28
  94. package/test/fixtures/geofence.geojson +0 -25
  95. package/test/fixtures/hae.geojson +0 -19
  96. package/test/fixtures/icon.geojson +0 -20
  97. package/test/fixtures/linestring.geojson +0 -28
  98. package/test/fixtures/marti-mission.geojson +0 -22
  99. package/test/fixtures/metadata.geojson +0 -24
  100. package/test/fixtures/mission-layer.geojson +0 -31
  101. package/test/fixtures/mission.geojson +0 -25
  102. package/test/fixtures/polygon.geojson +0 -33
  103. package/test/fixtures/props.geojson +0 -22
  104. package/test/fixtures/sensor.geojson +0 -31
  105. package/test/fixtures/video-connection.geojson +0 -27
  106. package/test/fixtures/video.geojson +0 -24
  107. package/test/flow-tags.test.ts +0 -21
  108. package/test/force-delete.ts +0 -50
  109. package/test/from_geojson.test.ts +0 -323
  110. package/test/newlines.test.ts +0 -83
  111. package/test/packages/AttachmentInManifest.zip +0 -0
  112. package/test/packages/COMilePosts.zip +0 -0
  113. package/test/packages/CameraCOTs.zip +0 -0
  114. package/test/packages/QuickPic.zip +0 -0
  115. package/test/reversal-geojson.test.ts +0 -19
  116. package/test/reversal-proto.test.ts +0 -60
  117. package/test/stream.ts +0 -10
  118. package/test/taskings-mission.test.ts +0 -148
  119. package/test/util.test.ts +0 -34
  120. package/test/validation.test.ts +0 -13
@@ -1,431 +0,0 @@
1
- import test from 'tape';
2
- import CoT from '../index.js';
3
-
4
- test('CoT.is_friend', (t) => {
5
- let cot = CoT.from_geojson({
6
- type: 'Feature',
7
- properties: {
8
- type: 'a-f-B'
9
- },
10
- geometry: { type: 'Point', coordinates: [0,0] }
11
- });
12
-
13
- t.ok(cot.is_friend());
14
-
15
- cot = CoT.from_geojson({
16
- type: 'Feature',
17
- properties: {
18
- type: 'a-h-B'
19
- },
20
- geometry: { type: 'Point', coordinates: [0,0] }
21
- });
22
-
23
- t.notOk(cot.is_friend());
24
-
25
- t.end();
26
- });
27
-
28
- test('CoT.is_hostile', (t) => {
29
- let cot = CoT.from_geojson({
30
- type: 'Feature',
31
- properties: {
32
- type: 'a-h-B'
33
- },
34
- geometry: { type: 'Point', coordinates: [0,0] }
35
- });
36
-
37
- t.ok(cot.is_hostile());
38
-
39
- cot = CoT.from_geojson({
40
- type: 'Feature',
41
- properties: {
42
- type: 'a-f-B'
43
- },
44
- geometry: { type: 'Point', coordinates: [0,0] }
45
- });
46
-
47
- t.notOk(cot.is_hostile());
48
-
49
- t.end();
50
- });
51
-
52
- test('CoT.is_unknown', (t) => {
53
- let cot = CoT.from_geojson({
54
- type: 'Feature',
55
- properties: {
56
- type: 'a-u-B'
57
- },
58
- geometry: { type: 'Point', coordinates: [0,0] }
59
- });
60
-
61
- t.ok(cot.is_unknown());
62
-
63
- cot = CoT.from_geojson({
64
- type: 'Feature',
65
- properties: {
66
- type: 'a-f-B'
67
- },
68
- geometry: { type: 'Point', coordinates: [0,0] }
69
- });
70
-
71
- t.notOk(cot.is_unknown());
72
-
73
- t.end();
74
- });
75
-
76
- test('CoT.is_pending', (t) => {
77
- let cot = CoT.from_geojson({
78
- type: 'Feature',
79
- properties: {
80
- type: 'a-p-B'
81
- },
82
- geometry: { type: 'Point', coordinates: [0,0] }
83
- });
84
-
85
- t.ok(cot.is_pending());
86
-
87
- cot = CoT.from_geojson({
88
- type: 'Feature',
89
- properties: {
90
- type: 'a-f-B'
91
- },
92
- geometry: { type: 'Point', coordinates: [0,0] }
93
- });
94
-
95
- t.notOk(cot.is_pending());
96
-
97
- t.end();
98
- });
99
-
100
- test('CoT.is_assumed', (t) => {
101
- let cot = CoT.from_geojson({
102
- type: 'Feature',
103
- properties: {
104
- type: 'a-a-B'
105
- },
106
- geometry: { type: 'Point', coordinates: [0,0] }
107
- });
108
-
109
- t.ok(cot.is_assumed());
110
-
111
- cot = CoT.from_geojson({
112
- type: 'Feature',
113
- properties: {
114
- type: 'a-f-B'
115
- },
116
- geometry: { type: 'Point', coordinates: [0,0] }
117
- });
118
-
119
- t.notOk(cot.is_assumed());
120
- t.end();
121
- });
122
-
123
- test('CoT.is_neutral', (t) => {
124
- let cot = CoT.from_geojson({
125
- type: 'Feature',
126
- properties: {
127
- type: 'a-n-B'
128
- },
129
- geometry: { type: 'Point', coordinates: [0,0] }
130
- });
131
-
132
- t.ok(cot.is_neutral());
133
-
134
- cot = CoT.from_geojson({
135
- type: 'Feature',
136
- properties: {
137
- type: 'a-f-B'
138
- },
139
- geometry: { type: 'Point', coordinates: [0,0] }
140
- });
141
-
142
- t.notOk(cot.is_neutral());
143
- t.end();
144
- });
145
-
146
- test('CoT.is_suspect', (t) => {
147
- let cot = CoT.from_geojson({
148
- type: 'Feature',
149
- properties: {
150
- type: 'a-s-B'
151
- },
152
- geometry: { type: 'Point', coordinates: [0,0] }
153
- });
154
-
155
- t.ok(cot.is_suspect());
156
-
157
- cot = CoT.from_geojson({
158
- type: 'Feature',
159
- properties: {
160
- type: 'a-f-B'
161
- },
162
- geometry: { type: 'Point', coordinates: [0,0] }
163
- });
164
-
165
- t.notOk(cot.is_suspect());
166
- t.end();
167
- });
168
-
169
- test('CoT.is_joker', (t) => {
170
- let cot = CoT.from_geojson({
171
- type: 'Feature',
172
- properties: {
173
- type: 'a-j-B'
174
- },
175
- geometry: { type: 'Point', coordinates: [0,0] }
176
- });
177
-
178
- t.ok(cot.is_joker());
179
-
180
- cot = CoT.from_geojson({
181
- type: 'Feature',
182
- properties: {
183
- type: 'a-f-B'
184
- },
185
- geometry: { type: 'Point', coordinates: [0,0] }
186
- });
187
-
188
- t.notOk(cot.is_joker());
189
- t.end();
190
- });
191
-
192
- test('CoT.is_faker', (t) => {
193
- let cot = CoT.from_geojson({
194
- type: 'Feature',
195
- properties: {
196
- type: 'a-k-B'
197
- },
198
- geometry: { type: 'Point', coordinates: [0,0] }
199
- });
200
-
201
- t.ok(cot.is_faker());
202
-
203
- cot = CoT.from_geojson({
204
- type: 'Feature',
205
- properties: {
206
- type: 'a-f-B'
207
- },
208
- geometry: { type: 'Point', coordinates: [0,0] }
209
- });
210
-
211
- t.notOk(cot.is_faker());
212
- t.end();
213
- });
214
-
215
- test('CoT.is_atom', (t) => {
216
- let cot = CoT.from_geojson({
217
- type: 'Feature',
218
- properties: {
219
- type: 'a-'
220
- },
221
- geometry: { type: 'Point', coordinates: [0,0] }
222
- });
223
-
224
- t.ok(cot.is_atom());
225
-
226
- cot = CoT.from_geojson({
227
- type: 'Feature',
228
- properties: {
229
- type: 'h'
230
- },
231
- geometry: { type: 'Point', coordinates: [0,0] }
232
- });
233
-
234
- t.notOk(cot.is_atom());
235
- t.end();
236
- });
237
-
238
- test('CoT.is_airborne', (t) => {
239
- let cot = CoT.from_geojson({
240
- type: 'Feature',
241
- properties: {
242
- type: 'a-f-A'
243
- },
244
- geometry: { type: 'Point', coordinates: [0,0] }
245
- });
246
-
247
- t.ok(cot.is_airborne());
248
-
249
- cot = CoT.from_geojson({
250
- type: 'Feature',
251
- properties: {
252
- type: 'a-h-G'
253
- },
254
- geometry: { type: 'Point', coordinates: [0,0] }
255
- });
256
-
257
- t.notOk(cot.is_airborne());
258
- t.end();
259
- });
260
-
261
- test('CoT.is_ground', (t) => {
262
- let cot = CoT.from_geojson({
263
- type: 'Feature',
264
- properties: {
265
- type: 'a-f-G'
266
- },
267
- geometry: { type: 'Point', coordinates: [0,0] }
268
- });
269
-
270
- t.ok(cot.is_ground());
271
-
272
- cot = CoT.from_geojson({
273
- type: 'Feature',
274
- properties: {
275
- type: 'a-h-A'
276
- },
277
- geometry: { type: 'Point', coordinates: [0,0] }
278
- });
279
-
280
- t.notOk(cot.is_ground());
281
- t.end();
282
- });
283
-
284
- test('CoT.is_installation', (t) => {
285
- let cot = CoT.from_geojson({
286
- type: 'Feature',
287
- properties: {
288
- type: 'a-f-G-I'
289
- },
290
- geometry: { type: 'Point', coordinates: [0,0] }
291
- });
292
-
293
- t.ok(cot.is_installation());
294
-
295
- cot = CoT.from_geojson({
296
- type: 'Feature',
297
- properties: {
298
- type: 'a-f-G'
299
- },
300
- geometry: { type: 'Point', coordinates: [0,0] }
301
- });
302
-
303
- t.notOk(cot.is_installation());
304
-
305
- cot = CoT.from_geojson({
306
- type: 'Feature',
307
- properties: {
308
- type: 'a-h-A'
309
- },
310
- geometry: { type: 'Point', coordinates: [0,0] }
311
- });
312
-
313
- t.notOk(cot.is_installation());
314
- t.end();
315
- });
316
-
317
- test('CoT.is_vehicle', (t) => {
318
- let cot = CoT.from_geojson({
319
- type: 'Feature',
320
- properties: {
321
- type: 'a-f-G-E-V'
322
- },
323
- geometry: { type: 'Point', coordinates: [0,0] }
324
- });
325
-
326
- t.ok(cot.is_vehicle());
327
-
328
- cot = CoT.from_geojson({
329
- type: 'Feature',
330
- properties: {
331
- type: 'a-h-G-E-V'
332
- },
333
- geometry: { type: 'Point', coordinates: [0,0] }
334
- });
335
-
336
- t.ok(cot.is_vehicle());
337
-
338
- cot = CoT.from_geojson({
339
- type: 'Feature',
340
- properties: {
341
- type: 'a-f-G-E'
342
- },
343
- geometry: { type: 'Point', coordinates: [0,0] }
344
- });
345
-
346
- t.notOk(cot.is_vehicle());
347
- t.end();
348
- });
349
-
350
- test('CoT.is_equipment', (t) => {
351
- let cot = CoT.from_geojson({
352
- type: 'Feature',
353
- properties: {
354
- type: 'a-f-G-E'
355
- },
356
- geometry: { type: 'Point', coordinates: [0,0] }
357
- });
358
-
359
- t.ok(cot.is_equipment());
360
-
361
- cot = CoT.from_geojson({
362
- type: 'Feature',
363
- properties: {
364
- type: 'a-f-G'
365
- },
366
- geometry: { type: 'Point', coordinates: [0,0] }
367
- });
368
-
369
- t.notOk(cot.is_equipment());
370
-
371
- t.end();
372
- });
373
-
374
- test('CoT.is_surface', (t) => {
375
- let cot = CoT.from_geojson({
376
- type: 'Feature',
377
- properties: {
378
- type: 'a-f-S'
379
- },
380
- geometry: { type: 'Point', coordinates: [0,0] }
381
- });
382
-
383
- t.ok(cot.is_surface());
384
-
385
- cot = CoT.from_geojson({
386
- type: 'Feature',
387
- properties: {
388
- type: 'a-f-G'
389
- },
390
- geometry: { type: 'Point', coordinates: [0,0] }
391
- });
392
-
393
- t.notOk(cot.is_surface());
394
- t.end();
395
- });
396
-
397
- test('CoT.is_subsurface', (t) => {
398
- let cot = CoT.from_geojson({
399
- type: 'Feature',
400
- properties: {
401
- type: 'a-f-U'
402
- },
403
- geometry: { type: 'Point', coordinates: [0,0] }
404
- });
405
-
406
- t.ok(cot.is_subsurface());
407
-
408
- cot = CoT.from_geojson({
409
- type: 'Feature',
410
- properties: {
411
- type: 'a-f-G'
412
- },
413
- geometry: { type: 'Point', coordinates: [0,0] }
414
- });
415
-
416
- t.notOk(cot.is_subsurface());
417
- t.end();
418
- });
419
-
420
- test('CoT.is_uav', (t) => {
421
- const cot = CoT.from_geojson({
422
- type: 'Feature',
423
- properties: {
424
- type: 'a-f-A-M-F-Q-r'
425
- },
426
- geometry: { type: 'Point', coordinates: [0,0] }
427
- });
428
-
429
- t.ok(cot.is_uav());
430
- t.end();
431
- });