tpmkms_4wp 8.0.0-beta.3 → 8.0.0-beta.30
Sign up to get free protection for your applications and to get access to all the features.
- package/common/animals.instance.json +2542 -1375
- package/common/animals.js +2 -2
- package/common/avatar.js +2 -2
- package/common/characters.js +9 -11
- package/common/colors.instance.json +6646 -3529
- package/common/colors.js +2 -2
- package/common/colors.test.json +345 -780
- package/common/comparable.js +2 -15
- package/common/concept.js +17 -11
- package/common/countable.js +5 -5
- package/common/crew.instance.json +12534 -6597
- package/common/crew.js +4 -4
- package/common/crew.test.json +714 -452
- package/common/currency.js +7 -7
- package/common/dialogues.js +53 -138
- package/common/dimension.instance.json +246 -265
- package/common/dimension.js +12 -12
- package/common/dimension.test.json +446 -1640
- package/common/edible.instance.json +19308 -10008
- package/common/edible.js +2 -2
- package/common/emotions.instance.json +122 -129
- package/common/emotions.js +4 -4
- package/common/events.js +6 -6
- package/common/fastfood.instance.json +219409 -111252
- package/common/fastfood.js +24 -24
- package/common/formulas.instance.json +222 -256
- package/common/formulas.js +14 -14
- package/common/gdefaults.js +13 -13
- package/common/help.js +4 -4
- package/common/help.test.json +10 -22
- package/common/helpers/concept.js +9 -6
- package/common/helpers/dialogues.js +2 -3
- package/common/helpers/properties.js +48 -58
- package/common/hierarchy.js +12 -16
- package/common/javascript.js +8 -8
- package/common/kirk.instance.json +564 -290
- package/common/kirk.js +2 -2
- package/common/length.instance.json +5153 -4677
- package/common/length.js +2 -2
- package/common/math.instance.json +152 -1169
- package/common/math.js +11 -11
- package/common/meta.js +22 -29
- package/common/negation.instance.json +2 -0
- package/common/negation.js +38 -0
- package/common/negation.test.json +308 -0
- package/common/numbers.js +3 -3
- package/common/ordering.instance.json +292 -230
- package/common/ordering.js +5 -5
- package/common/people.instance.json +1902 -1015
- package/common/people.js +4 -5
- package/common/percentages.instance.json +2 -0
- package/common/percentages.js +57 -0
- package/common/percentages.test.json +751 -0
- package/common/pipboy.instance.json +7720 -6386
- package/common/pipboy.js +29 -32
- package/common/pokemon.instance.json +3954 -2081
- package/common/pokemon.js +4 -4
- package/common/pos.js +1 -1
- package/common/pressure.instance.json +1265 -1193
- package/common/pressure.js +2 -2
- package/common/properties.instance.json +106 -61
- package/common/properties.js +54 -125
- package/common/punctuation.js +2 -2
- package/common/reports.instance.json +557 -559
- package/common/reports.js +54 -74
- package/common/scorekeeper.js +13 -21
- package/common/sdefaults.js +13 -3
- package/common/sizeable.js +2 -2
- package/common/spock.instance.json +564 -290
- package/common/spock.js +2 -2
- package/common/stgame.js +13 -9
- package/common/stm.js +4 -4
- package/common/tell.js +10 -10
- package/common/temperature.instance.json +1297 -1209
- package/common/temperature.js +2 -2
- package/common/tester.js +2 -2
- package/common/testing.js +5 -5
- package/common/time.js +7 -7
- package/common/tokenize.js +1 -1
- package/common/ui.instance.json +238 -259
- package/common/ui.js +9 -9
- package/common/weight.instance.json +4905 -4166
- package/common/weight.js +2 -2
- package/common/yesno.js +1 -1
- package/main.js +51 -46
- package/package.json +13 -6
package/common/hierarchy.js
CHANGED
@@ -61,7 +61,7 @@ let configStruct = {
|
|
61
61
|
notes: 'what type is pikachu',
|
62
62
|
where: where(),
|
63
63
|
match: ({context, hierarchy}) => hierarchy.isA(context.marker, 'is') && context.query && !['what'].includes(context.one.marker) && !['what'].includes(context.two.marker) && (context.one.query || context.two.query),
|
64
|
-
apply: ({context, hierarchy, km, log, e
|
64
|
+
apply: async ({context, hierarchy, km, log, e}) => {
|
65
65
|
const one = context.one;
|
66
66
|
const two = context.two;
|
67
67
|
let concept, value;
|
@@ -72,7 +72,7 @@ let configStruct = {
|
|
72
72
|
concept = two;
|
73
73
|
value = one;
|
74
74
|
}
|
75
|
-
let instance = e(value)
|
75
|
+
let instance = await e(value)
|
76
76
|
if (instance.verbatim) {
|
77
77
|
context.evalue = { verbatim: instance.verbatim }
|
78
78
|
context.isResponse = true
|
@@ -80,9 +80,6 @@ let configStruct = {
|
|
80
80
|
}
|
81
81
|
instance = getTypes(km, concept, instance)
|
82
82
|
|
83
|
-
// instance.focusable = ['one', 'two']
|
84
|
-
// concept = JSON.parse(JSON.stringify(value))
|
85
|
-
// greg
|
86
83
|
concept = _.cloneDeep(value)
|
87
84
|
concept.isQuery = undefined
|
88
85
|
|
@@ -106,10 +103,10 @@ let configStruct = {
|
|
106
103
|
notes: 'type of pikachu', // the types of type is the next one
|
107
104
|
where: where(),
|
108
105
|
match: ({context}) => context.marker == 'type' && context.evaluate && context.object && context.objects[context.objects.length-1].number == 'one' && pluralize.isSingular(context.objects[0].word),
|
109
|
-
apply: ({context, objects, e, gs, km, log
|
106
|
+
apply: async ({context, objects, e, gs, km, log}) => {
|
110
107
|
const concept = context.objects[0];
|
111
108
|
const value = context.objects[1];
|
112
|
-
let instance = e(value)
|
109
|
+
let instance = await e(value)
|
113
110
|
if (instance.verbatim) {
|
114
111
|
context.evalue = { verbatim: instance.verbatim }
|
115
112
|
return
|
@@ -135,14 +132,14 @@ let configStruct = {
|
|
135
132
|
}
|
136
133
|
return hierarchy.isA(context.marker, 'is') && context.query && args( { types: ['hierarchyAble', 'hierarchyAble'], properties: ['one', 'two'] } )
|
137
134
|
},
|
138
|
-
apply: ({context, km, objects, g}) => {
|
135
|
+
apply: async ({context, km, objects, g}) => {
|
139
136
|
const api = km('properties').api
|
140
137
|
const one = context.one
|
141
138
|
const two = context.two
|
142
139
|
const oneId = pluralize.singular(one.value);
|
143
140
|
if (!api.conceptExists(oneId)) {
|
144
141
|
context.evalue = {
|
145
|
-
verbatim: `I don't know about ${g({ ...one, paraphrase: true})}`
|
142
|
+
verbatim: `I don't know about ${await g({ ...one, paraphrase: true})}`
|
146
143
|
}
|
147
144
|
context.isResponse = true
|
148
145
|
return
|
@@ -150,7 +147,7 @@ let configStruct = {
|
|
150
147
|
const twoId = pluralize.singular(two.value);
|
151
148
|
if (!api.conceptExists(twoId)) {
|
152
149
|
context.evalue = {
|
153
|
-
verbatim: `I don't know about ${g({ ...two, paraphrase: true})}`
|
150
|
+
verbatim: `I don't know about ${await g({ ...two, paraphrase: true})}`
|
154
151
|
}
|
155
152
|
context.isResponse = true
|
156
153
|
return
|
@@ -201,7 +198,6 @@ let configStruct = {
|
|
201
198
|
},
|
202
199
|
{
|
203
200
|
notes: 'humans are mammels',
|
204
|
-
// match: ({context, listable}) => listable(context, 'unknown') && context.same,
|
205
201
|
where: where(),
|
206
202
|
match: ({context, listable, hierarchy, isA, callId}) => {
|
207
203
|
if (!context.same) {
|
@@ -270,7 +266,7 @@ let configStruct = {
|
|
270
266
|
notes: 'types of type', // what are the types of animals
|
271
267
|
where: where(),
|
272
268
|
match: ({context}) => context.marker == 'type' && context.evaluate && context.object,
|
273
|
-
apply: ({context, objects,
|
269
|
+
apply: ({context, objects, km, isA}) => {
|
274
270
|
const api = km('properties').api
|
275
271
|
const conceptApi = km('concept').api
|
276
272
|
const type = pluralize.singular(context.object.value);
|
@@ -288,16 +284,16 @@ let configStruct = {
|
|
288
284
|
]
|
289
285
|
};
|
290
286
|
|
291
|
-
const createConfig = () => {
|
287
|
+
const createConfig = async () => {
|
292
288
|
const config = new Config(configStruct, module)
|
293
289
|
config.stop_auto_rebuild()
|
294
|
-
config.add(properties
|
295
|
-
config.initializer( ({apis, hierarchy}) => {
|
290
|
+
await config.add(properties)
|
291
|
+
await config.initializer( ({apis, hierarchy}) => {
|
296
292
|
apis('stm').addIsA( (child, parent) => {
|
297
293
|
return hierarchy.isA(child, parent)
|
298
294
|
})
|
299
295
|
})
|
300
|
-
config.restart_auto_rebuild()
|
296
|
+
await config.restart_auto_rebuild()
|
301
297
|
return config
|
302
298
|
}
|
303
299
|
|
package/common/javascript.js
CHANGED
@@ -36,14 +36,14 @@ let configStruct = {
|
|
36
36
|
{
|
37
37
|
where: where(),
|
38
38
|
match: ({context}) => context.marker == 'assignment' && context.paraphrase,
|
39
|
-
apply: ({context, g}) => `let ${g(context.variable)} = ${g(context.value)}`
|
39
|
+
apply: async ({context, g}) => `let ${await g(context.variable)} = ${await g(context.value)}`
|
40
40
|
},
|
41
41
|
{
|
42
42
|
where: where(),
|
43
43
|
match: ({context}) => context.marker == 'assignment' && context.isResponse,
|
44
|
-
apply: ({context, g}) => {
|
45
|
-
const value = g(context.variable)
|
46
|
-
return `${g(context.variable)} == ${g(context.value)}`
|
44
|
+
apply: async ({context, g}) => {
|
45
|
+
// const value = await g(context.variable)
|
46
|
+
return `${await g(context.variable)} == ${await g(context.value)}`
|
47
47
|
}
|
48
48
|
},
|
49
49
|
],
|
@@ -60,15 +60,15 @@ let configStruct = {
|
|
60
60
|
],
|
61
61
|
};
|
62
62
|
|
63
|
-
const createConfig = () => {
|
63
|
+
const createConfig = async () => {
|
64
64
|
const config = new Config(configStruct, module)
|
65
65
|
config.stop_auto_rebuild()
|
66
|
-
config.add(dialogues
|
66
|
+
await config.add(dialogues)
|
67
67
|
|
68
|
-
config.initializer( ({objects, uuid}) => {
|
68
|
+
await config.initializer( ({objects, uuid}) => {
|
69
69
|
objects.variables = {}
|
70
70
|
})
|
71
|
-
config.restart_auto_rebuild()
|
71
|
+
await config.restart_auto_rebuild()
|
72
72
|
return config
|
73
73
|
}
|
74
74
|
|