ekms 9.5.1-beta.5 → 9.5.1-beta.6

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 +21 -61
  2. package/common/asking.js +102 -100
  3. package/common/can.instance.json +17 -0
  4. package/common/can.js +188 -0
  5. package/common/characters.js +3 -3
  6. package/common/colors.instance.json +38 -10
  7. package/common/comparable.instance.json +2 -2
  8. package/common/concept.test.json +54 -40
  9. package/common/conjunction.js +13 -5
  10. package/common/crew.instance.json +26 -26
  11. package/common/crew.js +1 -1
  12. package/common/currency.js +1 -1
  13. package/common/dates.instance.json +87 -3
  14. package/common/dialogues.js +11 -8
  15. package/common/dimension.instance.json +1 -1
  16. package/common/edible.instance.json +79 -95
  17. package/common/emotions.instance.json +6 -10
  18. package/common/emotions.js +1 -1
  19. package/common/english_helpers.js +277 -67
  20. package/common/fastfood.instance.json +235 -807
  21. package/common/fastfood.js +4 -4
  22. package/common/formulas.instance.json +1 -1
  23. package/common/gdefaults.js +41 -9
  24. package/common/help.js +2 -2
  25. package/common/helpers/concept.js +1 -1
  26. package/common/helpers/conjunction.js +54 -44
  27. package/common/helpers/dateTimeSelectors.js +2 -2
  28. package/common/helpers/dialogues.js +1 -1
  29. package/common/helpers/formulas.js +13 -11
  30. package/common/helpers/menus.js +12 -12
  31. package/common/helpers/meta.js +8 -8
  32. package/common/helpers/properties.js +76 -15
  33. package/common/helpers.js +82 -46
  34. package/common/hierarchy.js +3 -3
  35. package/common/kirk.instance.json +1 -1
  36. package/common/length.instance.json +2 -2
  37. package/common/math.instance.json +20 -20
  38. package/common/math.js +45 -44
  39. package/common/menus.instance.json +3 -3
  40. package/common/menus.js +1 -1
  41. package/common/meta.js +49 -33
  42. package/common/ordering.instance.json +16 -28
  43. package/common/ordering.js +1 -1
  44. package/common/ordering.test.json +354 -296
  45. package/common/people.instance.json +36 -47
  46. package/common/people.js +1 -1
  47. package/common/people.test.json +952 -681
  48. package/common/pipboy.instance.json +72 -16
  49. package/common/pokemon.instance.json +8 -8
  50. package/common/pokemon.js +1 -1
  51. package/common/pressure.instance.json +2 -2
  52. package/common/properties.instance.json +1 -1
  53. package/common/properties.js +16 -3
  54. package/common/reminders.js +1 -1
  55. package/common/reports.instance.json +3 -3
  56. package/common/reports.js +18 -16
  57. package/common/scorekeeper.js +4 -4
  58. package/common/sdefaults.js +22 -2
  59. package/common/spock.instance.json +1 -1
  60. package/common/stgame.js +1 -1
  61. package/common/stm.js +2 -2
  62. package/common/tell.js +1 -1
  63. package/common/temperature.instance.json +2 -2
  64. package/common/tester.js +3 -3
  65. package/common/time.js +3 -3
  66. package/common/tokenize.js +1 -1
  67. package/common/weight.instance.json +2 -2
  68. package/common/wp.instance.json +62 -6
  69. package/common/wp.js +4 -4
  70. package/package.json +4 -2
@@ -1666,7 +1666,7 @@
1666
1666
  "dead": true,
1667
1667
  "range": {
1668
1668
  "start": 0,
1669
- "end": 12
1669
+ "end": 2
1670
1670
  },
1671
1671
  "types": [
1672
1672
  "self"
package/common/stgame.js CHANGED
@@ -63,7 +63,7 @@ class SpockAPI {
63
63
  }
64
64
  }
65
65
 
66
- const createCharactersHelper = async () => {
66
+ async function createCharactersHelper() {
67
67
  const characters = await createCharacters()
68
68
  const kirk = await createKirk()
69
69
  const spock = await createSpock()
package/common/stm.js CHANGED
@@ -74,7 +74,7 @@ class API {
74
74
 
75
75
  const findPrevious = !!context.stm_previous
76
76
  const forAll = []
77
- const addForAll = (context) => {
77
+ function addForAll(context) {
78
78
  if (!forAll.find( (c) => c.stm.id == context.stm.id)) {
79
79
  forAll.push(context)
80
80
  }
@@ -247,7 +247,7 @@ const config = {
247
247
  ],
248
248
  }
249
249
 
250
- const initializer = ({config}) => {
250
+ function initializer({config}) {
251
251
  config.addArgs(({kms}) => ({
252
252
  mentioned: (args) => {
253
253
  kms.stm.api.mentioned(args)
package/common/tell.js CHANGED
@@ -98,7 +98,7 @@ const config = {
98
98
  ],
99
99
  };
100
100
 
101
- const initializer = ({config, isModule}) => {
101
+ function initializer({config, isModule}) {
102
102
  if (!isModule) {
103
103
  config.addSemantic({
104
104
  match: ({context, hierarchy}) => context.happening && hierarchy.isA(context.marker, 'event'),
@@ -1112,7 +1112,7 @@
1112
1112
  "word": "temperature",
1113
1113
  "range": {
1114
1114
  "start": 0,
1115
- "end": 25
1115
+ "end": 10
1116
1116
  },
1117
1117
  "dead": true,
1118
1118
  "types": [
@@ -2719,7 +2719,7 @@
2719
2719
  "text": "celcius fahrenheit and kelvin",
2720
2720
  "range": {
2721
2721
  "start": 0,
2722
- "end": 53
2722
+ "end": 28
2723
2723
  },
2724
2724
  "types": [
2725
2725
  "list",
package/common/tester.js CHANGED
@@ -2,7 +2,7 @@ const { knowledgeModule, where } = require('./runtime').theprogrammablemind
2
2
  const tester_tests = require('./tester.test.json')
3
3
  const ArgumentParser = require('argparse').ArgumentParser
4
4
 
5
- const testModuleNameFn = () => {
5
+ function testModuleNameFn() {
6
6
  const parser = new ArgumentParser({ description: 'Get test module name' })
7
7
  parser.add_argument('-tmn', '--testModuleName', { help: 'List of module to run the tests from' })
8
8
  const [args, unknown] = parser.parse_known_args()
@@ -18,7 +18,7 @@ parser.add_argument('-m', '--modules', { help: 'List of modules to load' })
18
18
  const [args, unknown] = parser.parse_known_args()
19
19
  process.argv = [process.argv[0], process.argv[1], ...unknown]
20
20
 
21
- const createConfig = async () => {
21
+ async function createConfig() {
22
22
  const config = new Config({ name: 'tester' })
23
23
  global.theprogrammablemind = {
24
24
  loadForTesting: {}
@@ -42,7 +42,7 @@ const includes = args.modules.split(',').map((module) => {
42
42
  return km
43
43
  })
44
44
 
45
- const fixtures = async (args) => {
45
+ async function fixtures(args) {
46
46
  const { config, kms, apis } = args;
47
47
  if (kms[testModuleName].testConfig?.fixtures) {
48
48
  const fixtures = kms.menus.testConfig?.fixtures
package/common/time.js CHANGED
@@ -6,7 +6,7 @@ const numbers = require('./numbers')
6
6
  const helpers = require('./helpers')
7
7
  const time_tests = require('./time.test.json')
8
8
 
9
- const pad = (v, l) => {
9
+ function pad(v, l) {
10
10
  const s = String(v)
11
11
  const n = l - s.length
12
12
  return "0".repeat(n) + s
@@ -141,7 +141,7 @@ const config = {
141
141
  where: where(),
142
142
  match: ({context}) => context.marker == 'time' && context.evalue && context.format == 24,
143
143
  apply: ({g, context}) => {
144
- const pad = (num, size) => {
144
+ function pad(num, size) {
145
145
  num = num.toString();
146
146
  while (num.length < size) num = "0" + num;
147
147
  return num;
@@ -187,7 +187,7 @@ const config = {
187
187
  ],
188
188
  };
189
189
 
190
- const initializer = ({api, config, objects, kms, isModule}) => {
190
+ function initializer({api, config, objects, kms, isModule}) {
191
191
  if (!isModule) {
192
192
  kms.time.api.newDate = () => new Date("December 25, 1995 1:59:58 pm" )
193
193
  }
@@ -44,7 +44,7 @@ const config = {
44
44
  },
45
45
  };
46
46
 
47
- const initializer = ({objects, config, isModule}) => {
47
+ function initializer({objects, config, isModule}) {
48
48
  config.addArgs(
49
49
  ({addPattern}) => ({
50
50
  addSuffix: (suffix) => {
@@ -2510,7 +2510,7 @@
2510
2510
  "word": "weight",
2511
2511
  "range": {
2512
2512
  "start": 0,
2513
- "end": 20
2513
+ "end": 5
2514
2514
  },
2515
2515
  "dead": true,
2516
2516
  "types": [
@@ -4464,7 +4464,7 @@
4464
4464
  "text": "kilograms grams pounds (troy ounces) ounces and tons",
4465
4465
  "range": {
4466
4466
  "start": 0,
4467
- "end": 71
4467
+ "end": 51
4468
4468
  },
4469
4469
  "types": [
4470
4470
  "list",
@@ -6577,7 +6577,7 @@
6577
6577
  "word": "words",
6578
6578
  "range": {
6579
6579
  "start": 0,
6580
- "end": 78
6580
+ "end": 4
6581
6581
  },
6582
6582
  "dead": true,
6583
6583
  "types": [
@@ -10357,7 +10357,7 @@
10357
10357
  "word": "characters",
10358
10358
  "range": {
10359
10359
  "start": 0,
10360
- "end": 68
10360
+ "end": 9
10361
10361
  },
10362
10362
  "dead": true,
10363
10363
  "types": [
@@ -13959,7 +13959,7 @@
13959
13959
  "word": "paragraphs",
13960
13960
  "range": {
13961
13961
  "start": 0,
13962
- "end": 82
13962
+ "end": 9
13963
13963
  },
13964
13964
  "dead": true,
13965
13965
  "types": [
@@ -17728,7 +17728,7 @@
17728
17728
  "word": "text",
17729
17729
  "range": {
17730
17730
  "start": 0,
17731
- "end": 24
17731
+ "end": 3
17732
17732
  },
17733
17733
  "dead": true,
17734
17734
  "types": [
@@ -24660,7 +24660,7 @@
24660
24660
  "text": "bold, italic, code, capitalize, lowercase and underline",
24661
24661
  "range": {
24662
24662
  "start": 0,
24663
- "end": 65
24663
+ "end": 54
24664
24664
  },
24665
24665
  "types": [
24666
24666
  "list",
@@ -24903,6 +24903,20 @@
24903
24903
  0
24904
24904
  ]
24905
24905
  ],
24906
+ [
24907
+ [
24908
+ "is",
24909
+ 0
24910
+ ],
24911
+ [
24912
+ "list",
24913
+ 1
24914
+ ],
24915
+ [
24916
+ "unknown",
24917
+ 0
24918
+ ]
24919
+ ],
24906
24920
  [
24907
24921
  [
24908
24922
  "is",
@@ -48018,7 +48032,7 @@
48018
48032
  "text": "uppercased, lowercased, capitalized, bolded, italicized and underlined",
48019
48033
  "range": {
48020
48034
  "start": 0,
48021
- "end": 88
48035
+ "end": 69
48022
48036
  },
48023
48037
  "types": [
48024
48038
  "capitalized_wp",
@@ -48293,6 +48307,20 @@
48293
48307
  0
48294
48308
  ]
48295
48309
  ],
48310
+ [
48311
+ [
48312
+ "is",
48313
+ 0
48314
+ ],
48315
+ [
48316
+ "list",
48317
+ 1
48318
+ ],
48319
+ [
48320
+ "unknown",
48321
+ 0
48322
+ ]
48323
+ ],
48296
48324
  [
48297
48325
  [
48298
48326
  "is",
@@ -55003,6 +55031,34 @@
55003
55031
  0
55004
55032
  ]
55005
55033
  ],
55034
+ [
55035
+ [
55036
+ "is",
55037
+ 0
55038
+ ],
55039
+ [
55040
+ "list",
55041
+ 1
55042
+ ],
55043
+ [
55044
+ "unknown",
55045
+ 0
55046
+ ]
55047
+ ],
55048
+ [
55049
+ [
55050
+ "is",
55051
+ 0
55052
+ ],
55053
+ [
55054
+ "list",
55055
+ 1
55056
+ ],
55057
+ [
55058
+ "unknown",
55059
+ 0
55060
+ ]
55061
+ ],
55006
55062
  [
55007
55063
  [
55008
55064
  "is",
package/common/wp.js CHANGED
@@ -115,11 +115,11 @@ class API {
115
115
  }
116
116
  }
117
117
 
118
- const root = (id) => {
118
+ function root(id) {
119
119
  return id.split('_')[0]
120
120
  }
121
121
 
122
- const setUpdate = (isA, update, states) => {
122
+ function setUpdate(isA, update, states) {
123
123
  let color;
124
124
  const styles = []
125
125
  for (const state of states) {
@@ -146,10 +146,10 @@ const config = {
146
146
  name: 'wp',
147
147
  };
148
148
 
149
- const changeState = ({api, isA, context, toArray, element, state}) => {
149
+ function changeState({api, isA, context, toArray, element, state}) {
150
150
  let scope
151
151
 
152
- const getElement = (selector, update) => {
152
+ function getElement(selector, update) {
153
153
  const unit = root(selector.marker)
154
154
  const conditions = []
155
155
  let scope;
package/package.json CHANGED
@@ -162,6 +162,8 @@
162
162
  "common/asking.test.json",
163
163
  "common/avatar.js",
164
164
  "common/avatar.test.json",
165
+ "common/can.instance.json",
166
+ "common/can.js",
165
167
  "common/characters.js",
166
168
  "common/characters.test.json",
167
169
  "common/colors.instance.json",
@@ -354,8 +356,8 @@
354
356
  "scriptjs": "^2.5.9",
355
357
  "table": "^6.7.1",
356
358
  "uuid": "^9.0.0",
357
- "theprogrammablemind": "9.5.1-beta.5"
359
+ "theprogrammablemind": "9.5.1-beta.6"
358
360
  },
359
- "version": "9.5.1-beta.5",
361
+ "version": "9.5.1-beta.6",
360
362
  "license": "UNLICENSED"
361
363
  }