tpmkms_4wp 9.3.0 → 9.4.1
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/animals.js +2 -3
- package/common/animals.test.json +1607 -1
- package/common/articles.js +2 -4
- package/common/asking.js +21 -5
- package/common/avatar.js +4 -12
- package/common/characters.js +2 -2
- package/common/colors.instance.json +0 -70
- package/common/colors.js +2 -2
- package/common/comparable.instance.json +0 -15
- package/common/comparable.js +2 -2
- package/common/concept.js +1 -2
- package/common/concept.test.json +279 -193
- package/common/conjunction.js +3 -5
- package/common/countable.js +2 -14
- package/common/crew.instance.json +0 -130
- package/common/crew.js +2 -2
- package/common/currency.js +2 -3
- package/common/dateTimeSelectors.instance.json +175 -0
- package/common/dateTimeSelectors.js +168 -0
- package/common/dateTimeSelectors.test.json +85622 -0
- package/common/dates.instance.json +504 -486
- package/common/dates.js +128 -16
- package/common/dates.test.json +16867 -373
- package/common/dialogues.js +13 -49
- package/common/dimension.instance.json +0 -5
- package/common/dimension.js +4 -4
- package/common/edible.instance.json +0 -216
- package/common/edible.js +2 -2
- package/common/emotions.instance.json +0 -5
- package/common/emotions.js +2 -2
- package/common/errors.js +3 -0
- package/common/evaluate.js +2 -2
- package/common/events.js +1 -2
- package/common/fastfood.instance.json +28 -975
- package/common/fastfood.js +2 -4
- package/common/fastfood.test.json +16291 -6597
- package/common/formulas.instance.json +0 -5
- package/common/formulas.js +3 -1
- package/common/gdefaults.js +7 -4
- package/common/help.js +2 -2
- 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 +23 -47
- package/common/hierarchy.js +12 -13
- package/common/javascript.js +2 -3
- package/common/kirk.instance.json +30 -119
- package/common/kirk.js +2 -3
- package/common/length.instance.json +0 -75
- package/common/length.js +2 -3
- package/common/listener.js +3 -1
- package/common/math.instance.json +0 -5
- package/common/math.js +2 -3
- package/common/menus.instance.json +0 -35
- package/common/menus.js +3 -1
- package/common/meta.js +4 -5
- package/common/nameable.js +3 -1
- package/common/negation.js +2 -2
- package/common/numbers.js +7 -4
- package/common/numbers.test.json +89 -23
- package/common/ordering.instance.json +0 -10
- package/common/ordering.js +2 -3
- package/common/ordinals.js +2 -3
- package/common/people.instance.json +0 -40
- package/common/people.js +2 -3
- package/common/percentages.js +3 -4
- package/common/percentages.test.json +57 -11
- package/common/pipboy.instance.json +0 -85
- package/common/pipboy.js +1 -1
- package/common/pipboy.test.json +4377 -3386
- package/common/pokemon.instance.json +0 -65
- package/common/pokemon.js +1 -2
- package/common/pos.js +2 -2
- package/common/pressure.instance.json +0 -20
- package/common/pressure.js +2 -2
- package/common/properties.instance.json +0 -5
- package/common/properties.js +11 -13
- package/common/punctuation.js +2 -2
- package/common/reminders.instance.json +237 -0
- package/common/reminders.js +394 -0
- package/common/reminders.test.json +81932 -0
- package/common/reports.instance.json +2 -12
- package/common/reports.js +1 -1
- package/common/scorekeeper.js +2 -2
- package/common/scorekeeper.test.json +3565 -7550
- package/common/sdefaults.js +1 -1
- package/common/self.instance.json +2 -0
- package/common/self.js +49 -0
- package/common/self.test.json +2 -0
- package/common/sizeable.js +2 -2
- package/common/spock.instance.json +30 -119
- package/common/spock.js +1 -1
- package/common/stgame.js +1 -1
- package/common/stm.js +1 -1
- package/common/tell.js +2 -2
- package/common/temperature.instance.json +84 -20
- package/common/temperature.js +2 -2
- package/common/tester.js +0 -1
- package/common/testing.js +0 -1
- package/common/time.js +57 -30
- package/common/time.test.json +4159 -205
- package/common/tokenize.js +1 -1
- package/common/ui.instance.json +0 -5
- package/common/ui.js +4 -2
- package/common/weight.instance.json +0 -60
- package/common/weight.js +2 -2
- package/common/wp.instance.json +386 -72
- package/common/wp.js +1 -5
- package/common/wp.test.json +8057 -3867
- package/common/yesno.js +2 -2
- package/main.js +6 -0
- package/package.json +16 -4
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,7 @@ knowledgeModule({
|
|
194
221
|
name: './time.test.json',
|
195
222
|
contents: time_tests,
|
196
223
|
checks: {
|
197
|
-
|
198
|
-
|
224
|
+
context: [defaultContextCheck({ extra: ['one', 'two', 'events', 'time', 'ampm'] })],
|
225
|
+
}
|
199
226
|
},
|
200
227
|
})
|