tpmkms_4wp 8.0.0-beta.20 → 8.0.0-beta.22

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 (70) hide show
  1. package/common/animals.instance.json +0 -88
  2. package/common/animals.js +2 -2
  3. package/common/avatar.js +2 -2
  4. package/common/characters.js +12 -16
  5. package/common/colors.instance.json +0 -344
  6. package/common/colors.js +2 -2
  7. package/common/comparable.js +2 -15
  8. package/common/concept.js +13 -10
  9. package/common/countable.js +5 -5
  10. package/common/crew.instance.json +0 -416
  11. package/common/crew.js +4 -4
  12. package/common/currency.js +7 -7
  13. package/common/dialogues.js +52 -121
  14. package/common/dimension.instance.json +4 -4
  15. package/common/dimension.js +12 -12
  16. package/common/dimension.test.json +242 -1248
  17. package/common/edible.instance.json +30 -134
  18. package/common/edible.js +2 -2
  19. package/common/emotions.instance.json +0 -60
  20. package/common/emotions.js +4 -4
  21. package/common/events.js +6 -6
  22. package/common/fastfood.instance.json +929 -1408
  23. package/common/fastfood.js +24 -24
  24. package/common/formulas.instance.json +6 -6
  25. package/common/formulas.js +12 -12
  26. package/common/gdefaults.js +13 -13
  27. package/common/help.js +4 -4
  28. package/common/helpers/concept.js +0 -1
  29. package/common/helpers/dialogues.js +2 -3
  30. package/common/helpers/properties.js +48 -58
  31. package/common/hierarchy.js +12 -16
  32. package/common/javascript.js +8 -8
  33. package/common/kirk.js +2 -2
  34. package/common/length.instance.json +0 -60
  35. package/common/length.js +2 -2
  36. package/common/math.instance.json +12 -12
  37. package/common/math.js +7 -7
  38. package/common/meta.js +22 -29
  39. package/common/negation.js +1 -1
  40. package/common/numbers.js +2 -2
  41. package/common/ordering.js +5 -5
  42. package/common/people.js +4 -5
  43. package/common/percentages.js +4 -4
  44. package/common/pipboy.instance.json +30 -154
  45. package/common/pipboy.js +29 -32
  46. package/common/pokemon.instance.json +0 -44
  47. package/common/pokemon.js +4 -4
  48. package/common/pos.js +1 -1
  49. package/common/pressure.js +2 -2
  50. package/common/properties.js +52 -125
  51. package/common/punctuation.js +2 -2
  52. package/common/reports.instance.json +1 -1
  53. package/common/reports.js +59 -76
  54. package/common/scorekeeper.js +13 -21
  55. package/common/sdefaults.js +5 -5
  56. package/common/sizeable.js +2 -2
  57. package/common/spock.js +2 -2
  58. package/common/stgame.js +13 -9
  59. package/common/stm.js +4 -4
  60. package/common/tell.js +10 -10
  61. package/common/temperature.instance.json +0 -60
  62. package/common/temperature.js +2 -2
  63. package/common/tester.js +2 -2
  64. package/common/testing.js +5 -5
  65. package/common/time.js +7 -7
  66. package/common/tokenize.js +1 -1
  67. package/common/ui.js +9 -9
  68. package/common/weight.js +2 -2
  69. package/common/yesno.js +1 -1
  70. package/package.json +2 -2
@@ -2225,36 +2225,6 @@
2225
2225
  1
2226
2226
  ]
2227
2227
  ],
2228
- [
2229
- [
2230
- "is",
2231
- 0
2232
- ],
2233
- [
2234
- "list",
2235
- 0
2236
- ],
2237
- [
2238
- "propertyOf",
2239
- 0
2240
- ],
2241
- [
2242
- "temperature",
2243
- 0
2244
- ],
2245
- [
2246
- "unit",
2247
- 0
2248
- ],
2249
- [
2250
- "unknown",
2251
- 0
2252
- ],
2253
- [
2254
- "unknown",
2255
- 1
2256
- ]
2257
- ],
2258
2228
  [
2259
2229
  [
2260
2230
  "is",
@@ -5932,36 +5902,6 @@
5932
5902
  1
5933
5903
  ]
5934
5904
  ],
5935
- [
5936
- [
5937
- "is",
5938
- 0
5939
- ],
5940
- [
5941
- "list",
5942
- 0
5943
- ],
5944
- [
5945
- "propertyOf",
5946
- 0
5947
- ],
5948
- [
5949
- "temperature",
5950
- 0
5951
- ],
5952
- [
5953
- "unit",
5954
- 0
5955
- ],
5956
- [
5957
- "unknown",
5958
- 0
5959
- ],
5960
- [
5961
- "unknown",
5962
- 1
5963
- ]
5964
- ],
5965
5905
  [
5966
5906
  [
5967
5907
  "is",
@@ -14,9 +14,9 @@ const template = {
14
14
  ],
15
15
  }
16
16
 
17
- const createConfig = () => {
17
+ const createConfig = async () => {
18
18
  const config = new Config({ name: 'temperature' }, module)
19
- config.add(dimension())
19
+ await config.add(dimension)
20
20
  return config
21
21
  }
22
22
 
package/common/tester.js CHANGED
@@ -12,7 +12,7 @@ const [args, unknown] = parser.parse_known_args()
12
12
 
13
13
  process.argv = [process.argv[0], process.argv[1], ...unknown]
14
14
 
15
- const createConfig = () => {
15
+ const createConfig = async () => {
16
16
  const config = new Config({ name: 'tester' })
17
17
  global.theprogrammablemind = {
18
18
  loadForTesting: {}
@@ -21,7 +21,7 @@ const createConfig = () => {
21
21
  global.theprogrammablemind.loadForTesting[module] = true
22
22
  const km = require(`./${module}`)
23
23
  // km.rebuild({ isModule: false }) // load the usually defaults
24
- config.add(km())
24
+ await config.add(km)
25
25
  }
26
26
  return config
27
27
  }
package/common/testing.js CHANGED
@@ -13,9 +13,9 @@ let configStruct = {
13
13
  {
14
14
  where: where(),
15
15
  id: 'testingEvaluate',
16
- generatorp: ({context, g}) => `${context.word} ${g(context.value)}`,
17
- semantic: ({context, e}) => {
18
- context.evalue = e(context.value)
16
+ generatorp: async ({context, g}) => `${context.word} ${await g(context.value)}`,
17
+ semantic: async ({context, e}) => {
18
+ context.evalue = await e(context.value)
19
19
  context.isResponse = true
20
20
  },
21
21
  bridge: "{ ...next(operator), value: after[0] }",
@@ -30,9 +30,9 @@ let configStruct = {
30
30
  ],
31
31
  };
32
32
 
33
- const createConfig = () => {
33
+ const createConfig = async () => {
34
34
  const config = new Config(configStruct, module)
35
- config.add(gdefaults())
35
+ await config.add(gdefaults)
36
36
  return config
37
37
  }
38
38
 
package/common/time.js CHANGED
@@ -103,12 +103,12 @@ const configStruct = {
103
103
  {
104
104
  where: where(),
105
105
  match: ({context}) => context.marker == 'ampm' && context.paraphrase,
106
- apply: ({g, context, gp}) => `${gp(context.hour)} ${context.ampm}`
106
+ apply: async ({g, context, gp}) => `${await gp(context.hour)} ${context.ampm}`
107
107
  },
108
108
  {
109
109
  where: where(),
110
110
  match: ({context}) => context.marker == 'time' && context.evalue && context.format == 12,
111
- apply: ({g, context}) => {
111
+ apply: ({context}) => {
112
112
  let hh = context.evalue.getHours();
113
113
  let ampm = 'am'
114
114
  if (hh > 12) {
@@ -170,12 +170,12 @@ const configStruct = {
170
170
  ],
171
171
  };
172
172
 
173
- const createConfig = () => {
173
+ const createConfig = async () => {
174
174
  const config = new Config(configStruct, module)
175
175
  config.stop_auto_rebuild()
176
- config.add(tell()).add(numbers()).add(countable())
177
- config.api = api
178
- config.initializer( ({config, objects, kms, isModule}) => {
176
+ await config.add(tell, numbers, countable)
177
+ await config.setApi(api)
178
+ await config.initializer( ({config, objects, kms, isModule}) => {
179
179
  if (!isModule) {
180
180
  kms.time.api.newDate = () => new Date("December 25, 1995 1:59:58 pm" )
181
181
  }
@@ -187,7 +187,7 @@ const createConfig = () => {
187
187
  apply: api.semantics
188
188
  })
189
189
  })
190
- config.restart_auto_rebuild()
190
+ await config.restart_auto_rebuild()
191
191
  return config
192
192
  }
193
193
 
@@ -31,7 +31,7 @@ let configStruct = {
31
31
  },
32
32
  };
33
33
 
34
- createConfig = () => new Config(configStruct, module)
34
+ createConfig = async () => new Config(configStruct, module)
35
35
 
36
36
  knowledgeModule( {
37
37
  module,
package/common/ui.js CHANGED
@@ -58,7 +58,7 @@ const configStruct = {
58
58
  {
59
59
  where: where(),
60
60
  match: ({context, isA}) => isA(context, 'direction'),
61
- apply: ({context, insert, s, fragments}) => {
61
+ apply: async ({context, insert, s, fragments}) => {
62
62
  const direction = context
63
63
  const fragment = fragments("move direction")
64
64
  const mappings = [{
@@ -66,8 +66,8 @@ const configStruct = {
66
66
  match: ({context}) => context.value == 'direction',
67
67
  apply: ({context}) => Object.assign(context, direction),
68
68
  }]
69
- const instantiation = fragment.instantiate(mappings)
70
- s(instantiation)
69
+ const instantiation = await fragment.instantiate(mappings)
70
+ await s(instantiation)
71
71
  }
72
72
  },
73
73
  ],
@@ -117,7 +117,7 @@ const configStruct = {
117
117
  isA: ['verby'],
118
118
  level: 0,
119
119
  bridge: "{ ...next(operator), action: after[0] }",
120
- generatorp: ({context, g}) => `stop ${g(context.action)}`,
120
+ generatorp: async ({context, g}) => `stop ${await g(context.action)}`,
121
121
  semantic: ({api, context}) => {
122
122
  api.stop(context.action.value)
123
123
  }
@@ -128,7 +128,7 @@ const configStruct = {
128
128
  isA: ['verby'],
129
129
  level: 0,
130
130
  bridge: "{ ...next(operator), direction: after[0] }",
131
- generatorp: ({context, g}) => `move ${g(context.direction)}`,
131
+ generatorp: async ({context, g}) => `move ${await g(context.direction)}`,
132
132
  semantic: ({api, context}) => {
133
133
  api.move(context.direction.value, context.direction.steps ? context.direction.steps.value : 1)
134
134
  }
@@ -183,12 +183,12 @@ const template = {
183
183
  ],
184
184
  }
185
185
 
186
- const createConfig = () => {
186
+ const createConfig = async () => {
187
187
  const config = new Config(configStruct, module)
188
188
  config.stop_auto_rebuild()
189
- config.add(dialogues(), math())
190
- config.api = new API()
191
- config.restart_auto_rebuild()
189
+ await config.add(dialogues, math)
190
+ await config.setApi(new API())
191
+ await config.restart_auto_rebuild()
192
192
  return config
193
193
  }
194
194
 
package/common/weight.js CHANGED
@@ -34,9 +34,9 @@ const template = {
34
34
  ],
35
35
  }
36
36
 
37
- const createConfig = () => {
37
+ const createConfig = async () => {
38
38
  const config = new Config({ name: 'weight' }, module)
39
- config.add(dimension())
39
+ await config.add(dimension)
40
40
  return config
41
41
  }
42
42
 
package/common/yesno.js CHANGED
@@ -22,7 +22,7 @@ let configStruct = {
22
22
  ],
23
23
  };
24
24
 
25
- const createConfig = () => new Config(configStruct, module).add(gdefaults())
25
+ const createConfig = async () => new Config(configStruct, module).add(gdefaults)
26
26
 
27
27
  knowledgeModule( {
28
28
  module,
package/package.json CHANGED
@@ -280,8 +280,8 @@
280
280
  "table": "^6.7.1",
281
281
  "base-64": "^1.0.0",
282
282
  "argparse": "^2.0.1",
283
- "theprogrammablemind_4wp": "8.0.0-beta.20"
283
+ "theprogrammablemind_4wp": "8.0.0-beta.22"
284
284
  },
285
- "version": "8.0.0-beta.20",
285
+ "version": "8.0.0-beta.22",
286
286
  "license": "UNLICENSED"
287
287
  }