tpmkms_4wp 9.1.1-beta.9 → 9.2.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.
- package/common/colors.instance.json +28 -0
- package/common/edible.instance.json +56 -0
- package/common/fastfood.instance.json +280 -36
- package/common/helpers/menus.js +22 -0
- package/common/helpers.js +16 -0
- package/common/menus.instance.json +5213 -1381
- package/common/menus.js +62 -6
- package/common/menus.test.json +13997 -132
- package/common/pipboy.instance.json +56 -0
- package/common/reports.instance.json +2 -2
- package/common/sdefaults.js +3 -3
- package/common/stm.js +2 -1
- package/common/tester.js +24 -2
- package/common/ui.instance.json +445 -0
- package/common/ui.js +6 -3
- package/common/ui.test.json +6794 -0
- package/common/wp.instance.json +6234 -0
- package/package.json +2 -2
package/common/tester.js
CHANGED
@@ -3,13 +3,20 @@ const { defaultContextCheck } = require('./helpers')
|
|
3
3
|
const tester_tests = require('./tester.test.json')
|
4
4
|
const ArgumentParser = require('argparse').ArgumentParser
|
5
5
|
|
6
|
+
const testModuleNameFn = () => {
|
7
|
+
const parser = new ArgumentParser({ description: 'Get test module name' })
|
8
|
+
parser.add_argument('-tmn', '--testModuleName', { help: 'List of module to run the tests from' })
|
9
|
+
const [args, unknown] = parser.parse_known_args()
|
10
|
+
return args.testModuleName
|
11
|
+
}
|
12
|
+
const testModuleName = testModuleNameFn()
|
13
|
+
|
6
14
|
const parser = new ArgumentParser({
|
7
15
|
description: 'Test modules together'
|
8
16
|
})
|
9
17
|
|
10
18
|
parser.add_argument('-m', '--modules', { help: 'List of modules to load' })
|
11
19
|
const [args, unknown] = parser.parse_known_args()
|
12
|
-
|
13
20
|
process.argv = [process.argv[0], process.argv[1], ...unknown]
|
14
21
|
|
15
22
|
const createConfig = async () => {
|
@@ -29,12 +36,26 @@ const createConfig = async () => {
|
|
29
36
|
global.theprogrammablemind = {
|
30
37
|
loadForTesting: {}
|
31
38
|
}
|
39
|
+
|
32
40
|
const includes = args.modules.split(',').map((module) => {
|
33
41
|
global.theprogrammablemind.loadForTesting[module] = true
|
34
42
|
const km = require(`./${module}`)
|
35
43
|
return km
|
36
44
|
})
|
37
45
|
|
46
|
+
const fixtures = async (args) => {
|
47
|
+
const { config, kms, apis } = args;
|
48
|
+
if (kms[testModuleName].testConfig?.fixtures) {
|
49
|
+
const fixtures = kms.menus.testConfig?.fixtures
|
50
|
+
kms.menus.testConfig.fixtures = null
|
51
|
+
const testModuleApi = apis(testModuleName)
|
52
|
+
const objects = testModuleApi._objects
|
53
|
+
args.objects = objects
|
54
|
+
await fixtures({ ...args, objects, api: testModuleApi })
|
55
|
+
kms.menus.testConfig.fixtures = fixtures
|
56
|
+
}
|
57
|
+
}
|
58
|
+
|
38
59
|
knowledgeModule({
|
39
60
|
config: { name: 'tester' },
|
40
61
|
includes,
|
@@ -43,6 +64,7 @@ knowledgeModule({
|
|
43
64
|
description: 'Testing modules loaded together',
|
44
65
|
test: {
|
45
66
|
name: './tester.test.json',
|
46
|
-
contents: tester_tests
|
67
|
+
contents: tester_tests,
|
68
|
+
fixtures,
|
47
69
|
},
|
48
70
|
})
|
package/common/ui.instance.json
CHANGED
@@ -29,6 +29,46 @@
|
|
29
29
|
"article",
|
30
30
|
false
|
31
31
|
],
|
32
|
+
[
|
33
|
+
"ascending",
|
34
|
+
"hierarchyAble",
|
35
|
+
false
|
36
|
+
],
|
37
|
+
[
|
38
|
+
"ascending",
|
39
|
+
"isEdee",
|
40
|
+
false
|
41
|
+
],
|
42
|
+
[
|
43
|
+
"ascending",
|
44
|
+
"isEder",
|
45
|
+
false
|
46
|
+
],
|
47
|
+
[
|
48
|
+
"ascending",
|
49
|
+
"object",
|
50
|
+
false
|
51
|
+
],
|
52
|
+
[
|
53
|
+
"ascending",
|
54
|
+
"property",
|
55
|
+
false
|
56
|
+
],
|
57
|
+
[
|
58
|
+
"ascending",
|
59
|
+
"queryable",
|
60
|
+
false
|
61
|
+
],
|
62
|
+
[
|
63
|
+
"ascending",
|
64
|
+
"sort_ordering",
|
65
|
+
false
|
66
|
+
],
|
67
|
+
[
|
68
|
+
"ascending",
|
69
|
+
"theAble",
|
70
|
+
false
|
71
|
+
],
|
32
72
|
[
|
33
73
|
"between",
|
34
74
|
"preposition",
|
@@ -49,6 +89,11 @@
|
|
49
89
|
"verb",
|
50
90
|
false
|
51
91
|
],
|
92
|
+
[
|
93
|
+
"comparable",
|
94
|
+
"theAble",
|
95
|
+
false
|
96
|
+
],
|
52
97
|
[
|
53
98
|
"concept",
|
54
99
|
"queryable",
|
@@ -59,11 +104,56 @@
|
|
59
104
|
"theAble",
|
60
105
|
false
|
61
106
|
],
|
107
|
+
[
|
108
|
+
"condition",
|
109
|
+
"condition",
|
110
|
+
false
|
111
|
+
],
|
62
112
|
[
|
63
113
|
"countable",
|
64
114
|
"hierarchyAble",
|
65
115
|
false
|
66
116
|
],
|
117
|
+
[
|
118
|
+
"descending",
|
119
|
+
"hierarchyAble",
|
120
|
+
false
|
121
|
+
],
|
122
|
+
[
|
123
|
+
"descending",
|
124
|
+
"isEdee",
|
125
|
+
false
|
126
|
+
],
|
127
|
+
[
|
128
|
+
"descending",
|
129
|
+
"isEder",
|
130
|
+
false
|
131
|
+
],
|
132
|
+
[
|
133
|
+
"descending",
|
134
|
+
"object",
|
135
|
+
false
|
136
|
+
],
|
137
|
+
[
|
138
|
+
"descending",
|
139
|
+
"property",
|
140
|
+
false
|
141
|
+
],
|
142
|
+
[
|
143
|
+
"descending",
|
144
|
+
"queryable",
|
145
|
+
false
|
146
|
+
],
|
147
|
+
[
|
148
|
+
"descending",
|
149
|
+
"sort_ordering",
|
150
|
+
false
|
151
|
+
],
|
152
|
+
[
|
153
|
+
"descending",
|
154
|
+
"theAble",
|
155
|
+
false
|
156
|
+
],
|
67
157
|
[
|
68
158
|
"direction",
|
69
159
|
"direction",
|
@@ -74,6 +164,16 @@
|
|
74
164
|
"queryable",
|
75
165
|
false
|
76
166
|
],
|
167
|
+
[
|
168
|
+
"divideByExpression",
|
169
|
+
"mathematicalExpression",
|
170
|
+
false
|
171
|
+
],
|
172
|
+
[
|
173
|
+
"divideByOperator",
|
174
|
+
"mathematical_operator",
|
175
|
+
false
|
176
|
+
],
|
77
177
|
[
|
78
178
|
"doubleQuote",
|
79
179
|
"queryable",
|
@@ -119,6 +219,11 @@
|
|
119
219
|
"queryable",
|
120
220
|
false
|
121
221
|
],
|
222
|
+
[
|
223
|
+
"highest",
|
224
|
+
"condition",
|
225
|
+
false
|
226
|
+
],
|
122
227
|
[
|
123
228
|
"ifAble",
|
124
229
|
"ifAble",
|
@@ -139,6 +244,16 @@
|
|
139
244
|
"verb",
|
140
245
|
false
|
141
246
|
],
|
247
|
+
[
|
248
|
+
"isEdee",
|
249
|
+
"isEdee",
|
250
|
+
false
|
251
|
+
],
|
252
|
+
[
|
253
|
+
"isEder",
|
254
|
+
"isEder",
|
255
|
+
false
|
256
|
+
],
|
142
257
|
[
|
143
258
|
"isQuery",
|
144
259
|
"verb",
|
@@ -179,11 +294,126 @@
|
|
179
294
|
"action",
|
180
295
|
false
|
181
296
|
],
|
297
|
+
[
|
298
|
+
"lowest",
|
299
|
+
"condition",
|
300
|
+
false
|
301
|
+
],
|
302
|
+
[
|
303
|
+
"mathematical",
|
304
|
+
"hierarchyAble",
|
305
|
+
false
|
306
|
+
],
|
307
|
+
[
|
308
|
+
"mathematical",
|
309
|
+
"isEdee",
|
310
|
+
false
|
311
|
+
],
|
312
|
+
[
|
313
|
+
"mathematical",
|
314
|
+
"isEder",
|
315
|
+
false
|
316
|
+
],
|
317
|
+
[
|
318
|
+
"mathematical",
|
319
|
+
"object",
|
320
|
+
false
|
321
|
+
],
|
322
|
+
[
|
323
|
+
"mathematical",
|
324
|
+
"operator_modifier",
|
325
|
+
false
|
326
|
+
],
|
327
|
+
[
|
328
|
+
"mathematical",
|
329
|
+
"property",
|
330
|
+
false
|
331
|
+
],
|
332
|
+
[
|
333
|
+
"mathematical",
|
334
|
+
"queryable",
|
335
|
+
false
|
336
|
+
],
|
337
|
+
[
|
338
|
+
"mathematical",
|
339
|
+
"theAble",
|
340
|
+
false
|
341
|
+
],
|
342
|
+
[
|
343
|
+
"mathematicalExpression",
|
344
|
+
"concept",
|
345
|
+
false
|
346
|
+
],
|
347
|
+
[
|
348
|
+
"mathematicalExpression",
|
349
|
+
"number",
|
350
|
+
false
|
351
|
+
],
|
352
|
+
[
|
353
|
+
"mathematical_operator",
|
354
|
+
"adjective",
|
355
|
+
true
|
356
|
+
],
|
357
|
+
[
|
358
|
+
"mathematical_operator",
|
359
|
+
"concept",
|
360
|
+
false
|
361
|
+
],
|
362
|
+
[
|
363
|
+
"mathematical_operator",
|
364
|
+
"hierarchyAble",
|
365
|
+
false
|
366
|
+
],
|
367
|
+
[
|
368
|
+
"mathematical_operator",
|
369
|
+
"isEdee",
|
370
|
+
false
|
371
|
+
],
|
372
|
+
[
|
373
|
+
"mathematical_operator",
|
374
|
+
"isEder",
|
375
|
+
false
|
376
|
+
],
|
377
|
+
[
|
378
|
+
"mathematical_operator",
|
379
|
+
"object",
|
380
|
+
false
|
381
|
+
],
|
382
|
+
[
|
383
|
+
"mathematical_operator",
|
384
|
+
"operator",
|
385
|
+
false
|
386
|
+
],
|
387
|
+
[
|
388
|
+
"mathematical_operator",
|
389
|
+
"property",
|
390
|
+
false
|
391
|
+
],
|
392
|
+
[
|
393
|
+
"mathematical_operator",
|
394
|
+
"queryable",
|
395
|
+
false
|
396
|
+
],
|
397
|
+
[
|
398
|
+
"mathematical_operator",
|
399
|
+
"theAble",
|
400
|
+
false
|
401
|
+
],
|
182
402
|
[
|
183
403
|
"memorable",
|
184
404
|
"theAble",
|
185
405
|
false
|
186
406
|
],
|
407
|
+
[
|
408
|
+
"minusExpression",
|
409
|
+
"mathematicalExpression",
|
410
|
+
false
|
411
|
+
],
|
412
|
+
[
|
413
|
+
"minusOperator",
|
414
|
+
"mathematical_operator",
|
415
|
+
false
|
416
|
+
],
|
187
417
|
[
|
188
418
|
"modifies",
|
189
419
|
"verb",
|
@@ -234,6 +464,51 @@
|
|
234
464
|
"theAble",
|
235
465
|
false
|
236
466
|
],
|
467
|
+
[
|
468
|
+
"operator",
|
469
|
+
"concept",
|
470
|
+
false
|
471
|
+
],
|
472
|
+
[
|
473
|
+
"operator",
|
474
|
+
"hierarchyAble",
|
475
|
+
false
|
476
|
+
],
|
477
|
+
[
|
478
|
+
"operator",
|
479
|
+
"isEdee",
|
480
|
+
false
|
481
|
+
],
|
482
|
+
[
|
483
|
+
"operator",
|
484
|
+
"isEder",
|
485
|
+
false
|
486
|
+
],
|
487
|
+
[
|
488
|
+
"operator",
|
489
|
+
"object",
|
490
|
+
false
|
491
|
+
],
|
492
|
+
[
|
493
|
+
"operator",
|
494
|
+
"property",
|
495
|
+
false
|
496
|
+
],
|
497
|
+
[
|
498
|
+
"operator",
|
499
|
+
"queryable",
|
500
|
+
false
|
501
|
+
],
|
502
|
+
[
|
503
|
+
"operator",
|
504
|
+
"theAble",
|
505
|
+
false
|
506
|
+
],
|
507
|
+
[
|
508
|
+
"operator_modifier",
|
509
|
+
"adjective",
|
510
|
+
false
|
511
|
+
],
|
237
512
|
[
|
238
513
|
"orAble",
|
239
514
|
"ifAble",
|
@@ -249,6 +524,51 @@
|
|
249
524
|
"theAble",
|
250
525
|
false
|
251
526
|
],
|
527
|
+
[
|
528
|
+
"ordering",
|
529
|
+
"concept",
|
530
|
+
false
|
531
|
+
],
|
532
|
+
[
|
533
|
+
"ordering",
|
534
|
+
"hierarchyAble",
|
535
|
+
false
|
536
|
+
],
|
537
|
+
[
|
538
|
+
"ordering",
|
539
|
+
"isEdee",
|
540
|
+
false
|
541
|
+
],
|
542
|
+
[
|
543
|
+
"ordering",
|
544
|
+
"isEder",
|
545
|
+
false
|
546
|
+
],
|
547
|
+
[
|
548
|
+
"ordering",
|
549
|
+
"object",
|
550
|
+
false
|
551
|
+
],
|
552
|
+
[
|
553
|
+
"ordering",
|
554
|
+
"property",
|
555
|
+
false
|
556
|
+
],
|
557
|
+
[
|
558
|
+
"ordering",
|
559
|
+
"queryable",
|
560
|
+
false
|
561
|
+
],
|
562
|
+
[
|
563
|
+
"ordering",
|
564
|
+
"theAble",
|
565
|
+
false
|
566
|
+
],
|
567
|
+
[
|
568
|
+
"ordering_modifier",
|
569
|
+
"adjective",
|
570
|
+
false
|
571
|
+
],
|
252
572
|
[
|
253
573
|
"ordinal",
|
254
574
|
"listable",
|
@@ -259,6 +579,16 @@
|
|
259
579
|
"adjective",
|
260
580
|
false
|
261
581
|
],
|
582
|
+
[
|
583
|
+
"plusExpression",
|
584
|
+
"mathematicalExpression",
|
585
|
+
false
|
586
|
+
],
|
587
|
+
[
|
588
|
+
"plusOperator",
|
589
|
+
"mathematical_operator",
|
590
|
+
false
|
591
|
+
],
|
262
592
|
[
|
263
593
|
"preposition",
|
264
594
|
"preposition",
|
@@ -334,6 +664,101 @@
|
|
334
664
|
"verb",
|
335
665
|
false
|
336
666
|
],
|
667
|
+
[
|
668
|
+
"sort",
|
669
|
+
"hierarchyAble",
|
670
|
+
false
|
671
|
+
],
|
672
|
+
[
|
673
|
+
"sort",
|
674
|
+
"isEdee",
|
675
|
+
false
|
676
|
+
],
|
677
|
+
[
|
678
|
+
"sort",
|
679
|
+
"isEder",
|
680
|
+
false
|
681
|
+
],
|
682
|
+
[
|
683
|
+
"sort",
|
684
|
+
"object",
|
685
|
+
false
|
686
|
+
],
|
687
|
+
[
|
688
|
+
"sort",
|
689
|
+
"ordering_modifier",
|
690
|
+
false
|
691
|
+
],
|
692
|
+
[
|
693
|
+
"sort",
|
694
|
+
"property",
|
695
|
+
false
|
696
|
+
],
|
697
|
+
[
|
698
|
+
"sort",
|
699
|
+
"queryable",
|
700
|
+
false
|
701
|
+
],
|
702
|
+
[
|
703
|
+
"sort",
|
704
|
+
"theAble",
|
705
|
+
false
|
706
|
+
],
|
707
|
+
[
|
708
|
+
"sortOrdering",
|
709
|
+
"adjective",
|
710
|
+
false
|
711
|
+
],
|
712
|
+
[
|
713
|
+
"sort_ordering",
|
714
|
+
"adjective",
|
715
|
+
true
|
716
|
+
],
|
717
|
+
[
|
718
|
+
"sort_ordering",
|
719
|
+
"concept",
|
720
|
+
false
|
721
|
+
],
|
722
|
+
[
|
723
|
+
"sort_ordering",
|
724
|
+
"hierarchyAble",
|
725
|
+
false
|
726
|
+
],
|
727
|
+
[
|
728
|
+
"sort_ordering",
|
729
|
+
"isEdee",
|
730
|
+
false
|
731
|
+
],
|
732
|
+
[
|
733
|
+
"sort_ordering",
|
734
|
+
"isEder",
|
735
|
+
false
|
736
|
+
],
|
737
|
+
[
|
738
|
+
"sort_ordering",
|
739
|
+
"object",
|
740
|
+
false
|
741
|
+
],
|
742
|
+
[
|
743
|
+
"sort_ordering",
|
744
|
+
"ordering",
|
745
|
+
false
|
746
|
+
],
|
747
|
+
[
|
748
|
+
"sort_ordering",
|
749
|
+
"property",
|
750
|
+
false
|
751
|
+
],
|
752
|
+
[
|
753
|
+
"sort_ordering",
|
754
|
+
"queryable",
|
755
|
+
false
|
756
|
+
],
|
757
|
+
[
|
758
|
+
"sort_ordering",
|
759
|
+
"theAble",
|
760
|
+
false
|
761
|
+
],
|
337
762
|
[
|
338
763
|
"stm_before",
|
339
764
|
"adjective",
|
@@ -379,6 +804,16 @@
|
|
379
804
|
"queryable",
|
380
805
|
false
|
381
806
|
],
|
807
|
+
[
|
808
|
+
"timesExpression",
|
809
|
+
"mathematicalExpression",
|
810
|
+
false
|
811
|
+
],
|
812
|
+
[
|
813
|
+
"timesOperator",
|
814
|
+
"mathematical_operator",
|
815
|
+
false
|
816
|
+
],
|
382
817
|
[
|
383
818
|
"to",
|
384
819
|
"preposition",
|
@@ -439,10 +874,20 @@
|
|
439
874
|
"object",
|
440
875
|
false
|
441
876
|
],
|
877
|
+
[
|
878
|
+
"x",
|
879
|
+
"number",
|
880
|
+
false
|
881
|
+
],
|
442
882
|
[
|
443
883
|
"xfx",
|
444
884
|
"queryable",
|
445
885
|
false
|
886
|
+
],
|
887
|
+
[
|
888
|
+
"y",
|
889
|
+
"number",
|
890
|
+
false
|
446
891
|
]
|
447
892
|
],
|
448
893
|
"metadata": {
|
package/common/ui.js
CHANGED
@@ -2,6 +2,7 @@ const { knowledgeModule, where, Digraph } = require('./runtime').theprogrammable
|
|
2
2
|
const { defaultContextCheck } = require('./helpers')
|
3
3
|
const dialogues = require('./dialogues')
|
4
4
|
const ordinals = require('./ordinals')
|
5
|
+
const math = require('./math')
|
5
6
|
const countable = require('./countable')
|
6
7
|
const ui_tests = require('./ui.test.json')
|
7
8
|
const ui_instance = require('./ui.instance.json')
|
@@ -128,11 +129,13 @@ const config = {
|
|
128
129
|
localHierarchy: [['thisitthat', 'moveable']],
|
129
130
|
optional: { 1: "{ marker: 'moveable', pullFromContext: true, default: true, skipDefault: true }" },
|
130
131
|
bridge: "{ ...next(operator), operator: operator, moveable: after[0], direction: after[1], generate: ['operator', 'moveable', 'direction' ] }",
|
131
|
-
semantic: ({api, context}) => {
|
132
|
+
semantic: async ({api, context, e}) => {
|
132
133
|
if (context.direction?.steps?.quantity) {
|
133
134
|
api.move(context.direction.value, context.direction.steps.quantity.value, context.direction.steps.marker)
|
134
135
|
} else {
|
135
|
-
|
136
|
+
const steps = await e(context.direction.steps)
|
137
|
+
api.move(context.direction.value, steps?.evalue || 1)
|
138
|
+
// api.move(context.direction.value, context.direction.steps ? context.direction.steps.value : 1)
|
136
139
|
}
|
137
140
|
}
|
138
141
|
},
|
@@ -175,7 +178,7 @@ const template = {
|
|
175
178
|
|
176
179
|
knowledgeModule({
|
177
180
|
config,
|
178
|
-
includes: [dialogues, ordinals, countable],
|
181
|
+
includes: [dialogues, ordinals, countable, math],
|
179
182
|
api: () => new API(),
|
180
183
|
|
181
184
|
module,
|