tpmkms_4wp 9.3.0-beta.5 → 9.3.0-beta.51
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/animals.instance.json +0 -65
- package/common/asking.js +16 -2
- package/common/colors.instance.json +28 -70
- package/common/comparable.instance.json +0 -15
- package/common/concept.test.json +279 -193
- package/common/crew.instance.json +0 -166
- package/common/dateTimeSelectors.instance.json +151 -0
- package/common/dateTimeSelectors.js +171 -0
- package/common/dateTimeSelectors.test.json +85622 -0
- package/common/dates.instance.json +285 -479
- package/common/dates.js +111 -10
- package/common/dates.test.json +11021 -514
- package/common/dialogues.js +8 -46
- package/common/dimension.instance.json +0 -5
- package/common/edible.instance.json +56 -160
- package/common/emotions.instance.json +0 -5
- package/common/evaluate.js +1 -1
- package/common/events.js +1 -1
- package/common/fastfood.instance.json +149 -880
- package/common/fastfood.test.json +16291 -6597
- package/common/formulas.instance.json +0 -5
- package/common/helpers/dateTimeSelectors.js +198 -0
- package/common/helpers/dialogues.js +11 -8
- package/common/helpers/properties.js +2 -2
- package/common/helpers.js +57 -32
- package/common/hierarchy.js +9 -9
- package/common/kirk.instance.json +0 -5
- package/common/length.instance.json +0 -75
- package/common/math.instance.json +0 -5
- package/common/menus.instance.json +0 -35
- package/common/meta.js +2 -2
- package/common/numbers.js +1 -1
- package/common/numbers.test.json +89 -23
- package/common/ordering.instance.json +0 -10
- package/common/people.instance.json +36 -40
- package/common/percentages.js +1 -1
- package/common/pipboy.instance.json +56 -85
- package/common/pipboy.test.json +4377 -3386
- package/common/pokemon.instance.json +0 -65
- package/common/pressure.instance.json +0 -20
- package/common/properties.instance.json +0 -5
- package/common/properties.js +4 -4
- package/common/reminders.instance.json +196 -10
- package/common/reminders.js +273 -79
- package/common/reminders.test.json +71435 -23
- package/common/reports.instance.json +2 -12
- package/common/scorekeeper.test.json +3565 -7550
- package/common/spock.instance.json +0 -5
- package/common/temperature.instance.json +112 -20
- package/common/time.js +63 -30
- package/common/time.test.json +4124 -124
- package/common/ui.instance.json +0 -5
- package/common/ui.js +3 -1
- package/common/weight.instance.json +0 -60
- package/common/wp.instance.json +56 -70
- package/common/wp.test.json +8057 -3867
- package/main.js +2 -0
- package/package.json +8 -4
@@ -243,11 +243,6 @@
|
|
243
243
|
"article",
|
244
244
|
false
|
245
245
|
],
|
246
|
-
[
|
247
|
-
"evaluate",
|
248
|
-
"verb",
|
249
|
-
false
|
250
|
-
],
|
251
246
|
[
|
252
247
|
"every",
|
253
248
|
"article",
|
@@ -1675,11 +1670,6 @@
|
|
1675
1670
|
"article",
|
1676
1671
|
false
|
1677
1672
|
],
|
1678
|
-
[
|
1679
|
-
"evaluate",
|
1680
|
-
"verb",
|
1681
|
-
false
|
1682
|
-
],
|
1683
1673
|
[
|
1684
1674
|
"every",
|
1685
1675
|
"article",
|
@@ -3919,11 +3909,6 @@
|
|
3919
3909
|
"article",
|
3920
3910
|
false
|
3921
3911
|
],
|
3922
|
-
[
|
3923
|
-
"evaluate",
|
3924
|
-
"verb",
|
3925
|
-
false
|
3926
|
-
],
|
3927
3912
|
[
|
3928
3913
|
"every",
|
3929
3914
|
"article",
|
@@ -5265,6 +5250,36 @@
|
|
5265
5250
|
0
|
5266
5251
|
]
|
5267
5252
|
],
|
5253
|
+
[
|
5254
|
+
[
|
5255
|
+
"celcius",
|
5256
|
+
0
|
5257
|
+
],
|
5258
|
+
[
|
5259
|
+
"divideByOperator",
|
5260
|
+
0
|
5261
|
+
],
|
5262
|
+
[
|
5263
|
+
"equals",
|
5264
|
+
0
|
5265
|
+
],
|
5266
|
+
[
|
5267
|
+
"fahrenheit",
|
5268
|
+
0
|
5269
|
+
],
|
5270
|
+
[
|
5271
|
+
"integer",
|
5272
|
+
0
|
5273
|
+
],
|
5274
|
+
[
|
5275
|
+
"plusOperator",
|
5276
|
+
0
|
5277
|
+
],
|
5278
|
+
[
|
5279
|
+
"timesOperator",
|
5280
|
+
0
|
5281
|
+
]
|
5282
|
+
],
|
5268
5283
|
[
|
5269
5284
|
[
|
5270
5285
|
"celcius",
|
@@ -6397,11 +6412,6 @@
|
|
6397
6412
|
"article",
|
6398
6413
|
false
|
6399
6414
|
],
|
6400
|
-
[
|
6401
|
-
"evaluate",
|
6402
|
-
"verb",
|
6403
|
-
false
|
6404
|
-
],
|
6405
6415
|
[
|
6406
6416
|
"every",
|
6407
6417
|
"article",
|
@@ -7955,6 +7965,32 @@
|
|
7955
7965
|
0
|
7956
7966
|
]
|
7957
7967
|
],
|
7968
|
+
[
|
7969
|
+
[
|
7970
|
+
"celcius",
|
7971
|
+
0
|
7972
|
+
],
|
7973
|
+
[
|
7974
|
+
"divideByOperator",
|
7975
|
+
0
|
7976
|
+
],
|
7977
|
+
[
|
7978
|
+
"equals",
|
7979
|
+
0
|
7980
|
+
],
|
7981
|
+
[
|
7982
|
+
"integer",
|
7983
|
+
0
|
7984
|
+
],
|
7985
|
+
[
|
7986
|
+
"plusOperator",
|
7987
|
+
0
|
7988
|
+
],
|
7989
|
+
[
|
7990
|
+
"timesOperator",
|
7991
|
+
0
|
7992
|
+
]
|
7993
|
+
],
|
7958
7994
|
[
|
7959
7995
|
[
|
7960
7996
|
"celcius",
|
@@ -9432,6 +9468,36 @@
|
|
9432
9468
|
0
|
9433
9469
|
]
|
9434
9470
|
],
|
9471
|
+
[
|
9472
|
+
[
|
9473
|
+
"celcius",
|
9474
|
+
0
|
9475
|
+
],
|
9476
|
+
[
|
9477
|
+
"divideByOperator",
|
9478
|
+
0
|
9479
|
+
],
|
9480
|
+
[
|
9481
|
+
"equals",
|
9482
|
+
0
|
9483
|
+
],
|
9484
|
+
[
|
9485
|
+
"fahrenheit",
|
9486
|
+
0
|
9487
|
+
],
|
9488
|
+
[
|
9489
|
+
"integer",
|
9490
|
+
0
|
9491
|
+
],
|
9492
|
+
[
|
9493
|
+
"plusOperator",
|
9494
|
+
0
|
9495
|
+
],
|
9496
|
+
[
|
9497
|
+
"timesOperator",
|
9498
|
+
0
|
9499
|
+
]
|
9500
|
+
],
|
9435
9501
|
[
|
9436
9502
|
[
|
9437
9503
|
"celcius",
|
@@ -9586,6 +9652,32 @@
|
|
9586
9652
|
0
|
9587
9653
|
]
|
9588
9654
|
],
|
9655
|
+
[
|
9656
|
+
[
|
9657
|
+
"celcius",
|
9658
|
+
0
|
9659
|
+
],
|
9660
|
+
[
|
9661
|
+
"divideByOperator",
|
9662
|
+
0
|
9663
|
+
],
|
9664
|
+
[
|
9665
|
+
"equals",
|
9666
|
+
0
|
9667
|
+
],
|
9668
|
+
[
|
9669
|
+
"integer",
|
9670
|
+
0
|
9671
|
+
],
|
9672
|
+
[
|
9673
|
+
"plusOperator",
|
9674
|
+
0
|
9675
|
+
],
|
9676
|
+
[
|
9677
|
+
"timesOperator",
|
9678
|
+
0
|
9679
|
+
]
|
9680
|
+
],
|
9589
9681
|
[
|
9590
9682
|
[
|
9591
9683
|
"celcius",
|
package/common/time.js
CHANGED
@@ -29,6 +29,14 @@ class API {
|
|
29
29
|
context.event = promise
|
30
30
|
}
|
31
31
|
|
32
|
+
now() {
|
33
|
+
if (this.args.isProcess || this.args.isTest) {
|
34
|
+
return new Date(2025, 5, 29, 14, 52, 0)
|
35
|
+
} else {
|
36
|
+
return new Date()
|
37
|
+
}
|
38
|
+
}
|
39
|
+
|
32
40
|
newDate() {
|
33
41
|
return new Date()
|
34
42
|
}
|
@@ -41,8 +49,11 @@ const config = {
|
|
41
49
|
name: 'time',
|
42
50
|
operators: [
|
43
51
|
"([time])",
|
52
|
+
"([atTime|at] (time))",
|
44
53
|
"([use] (([timeUnit]) [timeFormat|format]))",
|
45
|
-
"(([number|]) [ampm|])"
|
54
|
+
// "(([number|]) [ampm|])",
|
55
|
+
"((time) [ampm|])",
|
56
|
+
"([hourMinutes|] (integer) (colon) (integer))",
|
46
57
|
//"(([anyConcept]) [equals|is] ([anyConcept]))",
|
47
58
|
//"(([what0|what]) [equals] (<the> ([timeConcept])))",
|
48
59
|
//"(<whatP|what> ([anyConcept]))",
|
@@ -53,26 +64,47 @@ const config = {
|
|
53
64
|
// how many hours are in a day
|
54
65
|
],
|
55
66
|
bridges: [
|
56
|
-
{
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
67
|
+
{
|
68
|
+
id: 'hourMinutes',
|
69
|
+
isA: ['time'],
|
70
|
+
convolution: true,
|
71
|
+
bridge: "{ ...next(operator), hour: after[0], colon: after[1], minute: after[2], interpolate: '${hour}${colon}${minute}' }",
|
72
|
+
},
|
73
|
+
{
|
74
|
+
id: "atTime",
|
75
|
+
words: ['@'],
|
76
|
+
isA: ['preposition'],
|
77
|
+
bridge: "{ ...next(operator), time: after[0], operator: operator, interpolate: '${operator} ${time}' }"
|
78
|
+
},
|
79
|
+
{
|
80
|
+
id: "time",
|
81
|
+
bridge: "{ ...next(operator) }"
|
82
|
+
},
|
63
83
|
{
|
64
|
-
|
65
|
-
|
84
|
+
id: "ampm",
|
85
|
+
isA: ['adjective'],
|
86
|
+
localHierarchy: [
|
87
|
+
['integer', 'time'],
|
88
|
+
],
|
89
|
+
bridge: "{ ...next(before[0]), marker: if(isA(before[0].marker, 'integer'), operator('time'), before[0].marker), ampm: operator, time: before[0], interpolate: concat(default(before[0].interpolate, '${time}'), ' ${ampm}') }",
|
90
|
+
},
|
91
|
+
{
|
92
|
+
id: "timeFormat",
|
93
|
+
bridge: "{ ...before[0], ...next(operator) }"
|
94
|
+
},
|
95
|
+
{
|
96
|
+
id: "timeUnit",
|
66
97
|
words: [
|
67
98
|
...helpers.words('hour', { initial: "{ units: 'hour' }" }),
|
68
99
|
...helpers.words('minute', { initial: "{ units: 'minute' }" }),
|
69
100
|
...helpers.words('second', { initial: "{ units: 'second' }" }),
|
70
101
|
],
|
71
|
-
|
102
|
+
bridge: "{ ...next(operator) }"
|
72
103
|
},
|
73
|
-
{
|
74
|
-
|
75
|
-
|
104
|
+
{
|
105
|
+
id: "use",
|
106
|
+
bridge: "{ ...next(operator), format: after[0] }",
|
107
|
+
generatorp: ({g, context}) => `use ${context.format.quantity.value} hour time`
|
76
108
|
},
|
77
109
|
],
|
78
110
|
hierarchy: [
|
@@ -84,26 +116,21 @@ const config = {
|
|
84
116
|
|
85
117
|
"words": {
|
86
118
|
"literals": {
|
87
|
-
// " ([0-9]+)": [{
|
88
|
-
// " (1[0-2]|[1-9])": [{
|
89
|
-
"am": [{
|
90
|
-
"pm": [{
|
91
|
-
//" (1[0-2]|[1-9]) ?pm": [{
|
92
|
-
//" (1[0-2]|[1-9]) ?am": [{
|
119
|
+
// " ([0-9]+)": [{id: "count", "initial": "{ value: int(group[0]) }" }],
|
120
|
+
// " (1[0-2]|[1-9])": [{id: "hourUnits", "initial": "{ hour: int(group[0]) }" }],
|
121
|
+
"am": [{id: "ampm", "initial": "{ ampm: 'am', determined: true }" }],
|
122
|
+
"pm": [{id: "ampm", "initial": "{ ampm: 'pm', determined: true }" }],
|
123
|
+
//" (1[0-2]|[1-9]) ?pm": [{id: "count", "initial": "{ hour: int(group[0]), part: 'pm' }" }],
|
124
|
+
//" (1[0-2]|[1-9]) ?am": [{id: "count", "initial": "{ hour: int(group[0]), part: 'am' }" }],
|
93
125
|
/*
|
94
|
-
" hours?": [{
|
95
|
-
" minutes?": [{
|
96
|
-
" seconds?": [{
|
126
|
+
" hours?": [{id: "timeUnit", "initial": "{ units: 'hour' }" }],
|
127
|
+
" minutes?": [{id: "timeUnit", "initial": "{ units: 'hour' }" }],
|
128
|
+
" seconds?": [{id: "timeUnit", "initial": "{ units: 'seconds' }" }],
|
97
129
|
*/
|
98
130
|
}
|
99
131
|
},
|
100
132
|
|
101
133
|
generators: [
|
102
|
-
{
|
103
|
-
where: where(),
|
104
|
-
match: ({context}) => context.marker == 'ampm' && context.paraphrase,
|
105
|
-
apply: async ({g, context, gp}) => `${await gp(context.hour)} ${context.ampm}`
|
106
|
-
},
|
107
134
|
{
|
108
135
|
where: where(),
|
109
136
|
match: ({context}) => context.marker == 'time' && context.evalue && context.format == 12,
|
@@ -194,7 +221,13 @@ knowledgeModule({
|
|
194
221
|
name: './time.test.json',
|
195
222
|
contents: time_tests,
|
196
223
|
checks: {
|
197
|
-
|
198
|
-
|
224
|
+
context: defaultContextCheck([{
|
225
|
+
event: {
|
226
|
+
defaults: true,
|
227
|
+
one: { variable: 'defaults' },
|
228
|
+
two: { variable: 'defaults' },
|
229
|
+
}
|
230
|
+
}]),
|
231
|
+
},
|
199
232
|
},
|
200
233
|
})
|