ekms 8.0.0-beta.80 → 8.0.0-beta.82

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 (82) hide show
  1. package/common/animals.instance.json +97 -97
  2. package/common/animals.js +1 -1
  3. package/common/articles.js +1 -1
  4. package/common/asking.js +1 -1
  5. package/common/avatar.js +1 -1
  6. package/common/characters.js +1 -1
  7. package/common/colors.instance.json +403 -403
  8. package/common/colors.js +1 -1
  9. package/common/comparable.instance.json +22 -22
  10. package/common/comparable.js +1 -1
  11. package/common/concept.js +1 -1
  12. package/common/conjunction.js +1 -1
  13. package/common/countable.js +1 -1
  14. package/common/crew.instance.json +485 -393
  15. package/common/crew.js +1 -1
  16. package/common/currency.js +1 -1
  17. package/common/dialogues.js +2 -2
  18. package/common/dimension.instance.json +9 -9
  19. package/common/dimension.js +1 -1
  20. package/common/edible.instance.json +464 -464
  21. package/common/edible.js +1 -1
  22. package/common/emotions.instance.json +105 -45
  23. package/common/emotions.js +1 -1
  24. package/common/evaluate.js +1 -1
  25. package/common/events.js +1 -1
  26. package/common/fastfood.instance.json +2675 -2562
  27. package/common/fastfood.js +1 -1
  28. package/common/formulas.instance.json +2 -2
  29. package/common/formulas.js +1 -1
  30. package/common/gdefaults.js +16 -1
  31. package/common/help.js +2 -2
  32. package/common/helpers.js +24 -21
  33. package/common/hierarchy.js +1 -1
  34. package/common/javascript.js +1 -1
  35. package/common/kirk.instance.json +3 -3
  36. package/common/kirk.js +1 -1
  37. package/common/length.instance.json +268 -248
  38. package/common/length.js +1 -1
  39. package/common/listener.js +1 -1
  40. package/common/math.instance.json +2 -2
  41. package/common/math.js +1 -1
  42. package/common/meta.js +1 -1
  43. package/common/nameable.js +1 -1
  44. package/common/negation.js +1 -1
  45. package/common/numbers.js +1 -1
  46. package/common/ordering.instance.json +75 -127
  47. package/common/ordering.js +1 -1
  48. package/common/ordinals.js +1 -1
  49. package/common/people.instance.json +139 -79
  50. package/common/people.js +1 -1
  51. package/common/percentages.js +1 -1
  52. package/common/pipboy.instance.json +233 -233
  53. package/common/pipboy.js +1 -1
  54. package/common/pokemon.instance.json +125 -125
  55. package/common/pokemon.js +1 -1
  56. package/common/pos.js +1 -1
  57. package/common/pressure.instance.json +128 -152
  58. package/common/pressure.js +1 -1
  59. package/common/properties.instance.json +17 -17
  60. package/common/properties.js +1 -1
  61. package/common/punctuation.js +1 -1
  62. package/common/reports.instance.json +16 -16
  63. package/common/reports.js +1 -1
  64. package/common/scorekeeper.js +1 -1
  65. package/common/sdefaults.js +1 -1
  66. package/common/sizeable.js +1 -1
  67. package/common/spock.instance.json +2 -2
  68. package/common/spock.js +1 -1
  69. package/common/stgame.js +1 -1
  70. package/common/stm.js +9 -7
  71. package/common/tell.js +1 -1
  72. package/common/temperature.instance.json +178 -202
  73. package/common/temperature.js +1 -1
  74. package/common/time.js +1 -1
  75. package/common/tokenize.js +1 -1
  76. package/common/ui.instance.json +34 -556
  77. package/common/ui.js +8 -13
  78. package/common/ui.test.json +641 -5357
  79. package/common/weight.instance.json +307 -319
  80. package/common/weight.js +1 -1
  81. package/common/yesno.js +1 -1
  82. package/package.json +2 -2
@@ -1021,7 +1021,7 @@ knowledgeModule( {
1021
1021
  { property: 'pieces', filter: ['marker', 'value', 'text' ] },
1022
1022
  ],
1023
1023
  context: [
1024
- ...defaultContextCheck,
1024
+ ...defaultContextCheck(),
1025
1025
  // TODO some kind of conditional selector { match: (value) => value.marker == 'count', filter: ['marker', 'value', 'text'] },
1026
1026
  { property: 'comboNumber', filter: ['marker', 'value', 'text' ] },
1027
1027
  ],
@@ -884,11 +884,11 @@
884
884
  ],
885
885
  "ops": [
886
886
  [
887
- "unknown",
887
+ "is",
888
888
  0
889
889
  ],
890
890
  [
891
- "is",
891
+ "unknown",
892
892
  0
893
893
  ],
894
894
  [
@@ -205,7 +205,7 @@ knowledgeModule({
205
205
  contents: tests,
206
206
  checks: {
207
207
  objects: ['formulas'],
208
- context: defaultContextCheck,
208
+ context: defaultContextCheck(),
209
209
  }
210
210
  },
211
211
  })
@@ -29,6 +29,21 @@ let config = {
29
29
  apply: ({context, gp}) => gp(context.response),
30
30
  },
31
31
 
32
+ {
33
+ where: where(),
34
+ match: ({context}) => context.generate,
35
+ apply: async ({context, gs}) => {
36
+ const existing = context.generate.filter((key) => context[key] !== undefined)
37
+ const filtered = existing.filter((key) => {
38
+ if (context[key] && context[key].skipDefault) {
39
+ return false
40
+ }
41
+ return true
42
+ })
43
+ return gs(filtered.map((key) => context[key]))
44
+ }
45
+ },
46
+
32
47
  {
33
48
  where: where(),
34
49
  //({context}) => context.paraphrase && context.modifiers,
@@ -208,7 +223,7 @@ knowledgeModule({
208
223
  name: './gdefaults.test.json',
209
224
  contents: gdefaults_tests,
210
225
  checks: {
211
- context: defaultContextCheck,
226
+ context: defaultContextCheck(),
212
227
  },
213
228
 
214
229
  },
package/common/help.js CHANGED
@@ -67,7 +67,7 @@ const config = {
67
67
 
68
68
  return help
69
69
  },
70
- optional: { withKM: "{ marker: 'km', kms: []}" },
70
+ optional: { 1: "{ marker: 'km', kms: []}" },
71
71
  bridge: "{ ...next(operator), kms: after[0].kms, isResponse: true }"
72
72
  },
73
73
  { id: "withKM", level: 0, bridge: "{ ...next(operator), kms: after[0] }" },
@@ -103,7 +103,7 @@ knowledgeModule({
103
103
  name: './help.test.json',
104
104
  contents: help_tests,
105
105
  checks: {
106
- context: defaultContextCheck,
106
+ context: defaultContextCheck(),
107
107
  },
108
108
  },
109
109
  })
package/common/helpers.js CHANGED
@@ -138,27 +138,30 @@ const toEValue = (context) => {
138
138
  }
139
139
 
140
140
  const defaultContextCheckProperties = ['marker', 'text', 'verbatim', 'isResponse', { property: 'response', filter: ['marker', 'text', 'verbatim'] }]
141
- const defaultContextCheck = [
142
- ...defaultContextCheckProperties,
143
- (object) => {
144
- if (typeof object.value == 'object') {
145
- return { property: 'value', filter: defaultContextCheckProperties }
146
- } else {
147
- return 'value'
148
- }
149
- },
150
- (object) => {
151
- if (!Array.isArray(object.modifiers)) {
152
- return
153
- }
154
- if (typeof object.modifiers[0] == 'object') {
155
- return { property: 'modifiers', filter: defaultContextCheckProperties }
156
- } else {
157
- return 'modifiers'
158
- }
159
- },
160
- { property: 'modifiers', isPropertyList: true, filter: defaultContextCheckProperties }
161
- ]
141
+ const defaultContextCheck = (properties = []) => {
142
+ return [
143
+ ...defaultContextCheckProperties,
144
+ ...properties.map((property) => { return { property, filter: defaultContextCheckProperties } }),
145
+ (object) => {
146
+ if (typeof object.value == 'object') {
147
+ return { property: 'value', filter: defaultContextCheckProperties }
148
+ } else {
149
+ return 'value'
150
+ }
151
+ },
152
+ (object) => {
153
+ if (!Array.isArray(object.modifiers)) {
154
+ return
155
+ }
156
+ if (typeof object.modifiers[0] == 'object') {
157
+ return { property: 'modifiers', filter: defaultContextCheckProperties }
158
+ } else {
159
+ return 'modifiers'
160
+ }
161
+ },
162
+ { property: 'modifiers', isPropertyList: true, filter: defaultContextCheckProperties }
163
+ ]
164
+ }
162
165
 
163
166
  module.exports = {
164
167
  defaultContextCheck,
@@ -304,7 +304,7 @@ knowledgeModule( {
304
304
  checks: {
305
305
  objects: ['children', 'concept', 'parents', 'properties'],
306
306
  checks: {
307
- context: defaultContextCheck,
307
+ context: defaultContextCheck(),
308
308
  },
309
309
 
310
310
  },
@@ -73,7 +73,7 @@ knowledgeModule( {
73
73
  name: './javascript.test.json',
74
74
  contents: javascript_tests,
75
75
  checks: {
76
- context: defaultContextCheck,
76
+ context: defaultContextCheck(),
77
77
  },
78
78
 
79
79
  },
@@ -1435,15 +1435,15 @@
1435
1435
  ],
1436
1436
  "ops": [
1437
1437
  [
1438
- "self",
1438
+ "is",
1439
1439
  0
1440
1440
  ],
1441
1441
  [
1442
- "is",
1442
+ "kirk",
1443
1443
  0
1444
1444
  ],
1445
1445
  [
1446
- "kirk",
1446
+ "self",
1447
1447
  0
1448
1448
  ]
1449
1449
  ],
package/common/kirk.js CHANGED
@@ -27,7 +27,7 @@ knowledgeModule( {
27
27
  name: './kirk.test.json',
28
28
  contents: kirk_tests,
29
29
  checks: {
30
- context: defaultContextCheck,
30
+ context: defaultContextCheck(),
31
31
  },
32
32
 
33
33
  },