ekms 9.7.1-beta.3 → 9.7.1-beta.5

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.
@@ -32708,6 +32708,24 @@
32708
32708
  0
32709
32709
  ]
32710
32710
  ],
32711
+ [
32712
+ [
32713
+ "is",
32714
+ 0
32715
+ ],
32716
+ [
32717
+ "propertyOf",
32718
+ 0
32719
+ ],
32720
+ [
32721
+ "the",
32722
+ 0
32723
+ ],
32724
+ [
32725
+ "unknown",
32726
+ 0
32727
+ ]
32728
+ ],
32711
32729
  [
32712
32730
  [
32713
32731
  "is",
@@ -50444,6 +50462,32 @@
50444
50462
  0
50445
50463
  ]
50446
50464
  ],
50465
+ [
50466
+ [
50467
+ "arm",
50468
+ 0
50469
+ ],
50470
+ [
50471
+ "means",
50472
+ 0
50473
+ ],
50474
+ [
50475
+ "propertyOf",
50476
+ 0
50477
+ ],
50478
+ [
50479
+ "status",
50480
+ 0
50481
+ ],
50482
+ [
50483
+ "the",
50484
+ 0
50485
+ ],
50486
+ [
50487
+ "unknown",
50488
+ 0
50489
+ ]
50490
+ ],
50447
50491
  [
50448
50492
  [
50449
50493
  "arm",
@@ -54132,6 +54176,40 @@
54132
54176
  0
54133
54177
  ]
54134
54178
  ],
54179
+ [
54180
+ [
54181
+ "disarm",
54182
+ 0
54183
+ ],
54184
+ [
54185
+ "is",
54186
+ 0
54187
+ ],
54188
+ [
54189
+ "means",
54190
+ 0
54191
+ ],
54192
+ [
54193
+ "not",
54194
+ 0
54195
+ ],
54196
+ [
54197
+ "propertyOf",
54198
+ 0
54199
+ ],
54200
+ [
54201
+ "status",
54202
+ 0
54203
+ ],
54204
+ [
54205
+ "the",
54206
+ 0
54207
+ ],
54208
+ [
54209
+ "unknown",
54210
+ 0
54211
+ ]
54212
+ ],
54135
54213
  [
54136
54214
  [
54137
54215
  "disarm",
@@ -55775,6 +55853,32 @@
55775
55853
  0
55776
55854
  ]
55777
55855
  ],
55856
+ [
55857
+ [
55858
+ "arm",
55859
+ 0
55860
+ ],
55861
+ [
55862
+ "means",
55863
+ 0
55864
+ ],
55865
+ [
55866
+ "propertyOf",
55867
+ 0
55868
+ ],
55869
+ [
55870
+ "status",
55871
+ 0
55872
+ ],
55873
+ [
55874
+ "the",
55875
+ 0
55876
+ ],
55877
+ [
55878
+ "unknown",
55879
+ 0
55880
+ ]
55881
+ ],
55778
55882
  [
55779
55883
  [
55780
55884
  "arm",
@@ -55873,6 +55977,40 @@
55873
55977
  0
55874
55978
  ]
55875
55979
  ],
55980
+ [
55981
+ [
55982
+ "disarm",
55983
+ 0
55984
+ ],
55985
+ [
55986
+ "is",
55987
+ 0
55988
+ ],
55989
+ [
55990
+ "means",
55991
+ 0
55992
+ ],
55993
+ [
55994
+ "not",
55995
+ 0
55996
+ ],
55997
+ [
55998
+ "propertyOf",
55999
+ 0
56000
+ ],
56001
+ [
56002
+ "status",
56003
+ 0
56004
+ ],
56005
+ [
56006
+ "the",
56007
+ 0
56008
+ ],
56009
+ [
56010
+ "unknown",
56011
+ 0
56012
+ ]
56013
+ ],
55876
56014
  [
55877
56015
  [
55878
56016
  "disarm",
@@ -56621,6 +56759,24 @@
56621
56759
  0
56622
56760
  ]
56623
56761
  ],
56762
+ [
56763
+ [
56764
+ "is",
56765
+ 0
56766
+ ],
56767
+ [
56768
+ "propertyOf",
56769
+ 0
56770
+ ],
56771
+ [
56772
+ "the",
56773
+ 0
56774
+ ],
56775
+ [
56776
+ "unknown",
56777
+ 0
56778
+ ]
56779
+ ],
56624
56780
  [
56625
56781
  [
56626
56782
  "is",
@@ -5,11 +5,13 @@ const currency_tests = require('./currency.test.json')
5
5
 
6
6
  class API {
7
7
 
8
+ baseAPI = API
9
+
8
10
  initialize() {
9
11
  }
10
12
 
11
13
  // map currency word to the unit that will be put in the context
12
- getUnits() {
14
+ getUnitsAPI() {
13
15
  return {
14
16
  'dollars': 'dollar',
15
17
  'dollar': 'dollar',
@@ -20,7 +22,7 @@ class API {
20
22
  }
21
23
  }
22
24
 
23
- getUnitWords() {
25
+ getUnitWordsAPI() {
24
26
  return [
25
27
  { units: 'dollar', one: 'dollar', many: 'dollars' },
26
28
  { units: 'pound', one: 'pound', many: 'pounds' },
@@ -28,7 +30,7 @@ class API {
28
30
  ]
29
31
  }
30
32
 
31
- convertTo(amount, fromUnits, toUnits) {
33
+ convertToAPI(amount, fromUnits, toUnits) {
32
34
  const conversion = {
33
35
  "dollar": { "euro": 0.82, "pound": 0.71, },
34
36
  "euro": { "dollar": 1.22, "pound": 0.82, },
@@ -78,7 +80,7 @@ const config = {
78
80
  apply: ({objects, api, context}) => {
79
81
  const from = context.from
80
82
  const to = context.to
81
- const value = api.convertTo(from.amount.value, from.units, to.units)
83
+ const value = api.convertToAPI(from.amount.value, from.units, to.units)
82
84
  context.marker = 'currency'
83
85
  context.isAbstract = false
84
86
  context.amount = { value }
@@ -91,12 +93,12 @@ const config = {
91
93
 
92
94
  function initializer({config, objects, apis, addWord, addGenerator, baseConfig, uuid}) {
93
95
  const api = apis('currency')
94
- units = api.getUnits()
96
+ units = api.getUnitsAPI()
95
97
  for (word in units) {
96
98
  def = {"id": "currency", "initial": { units: units[word] }, uuid}
97
99
  addWord(word, def)
98
100
  }
99
- unitWords = api.getUnitWords();
101
+ unitWords = api.getUnitWordsAPI();
100
102
  for (const words of unitWords) {
101
103
  addGenerator({
102
104
  match: ({context}) => context.marker == 'currency' && context.units == words.units && context.value == 1 && context.isAbstract,
package/common/drone.js CHANGED
@@ -1,6 +1,6 @@
1
- const { knowledgeModule, where, debug } = require('./runtime').theprogrammablemind
1
+ const { knowledgeModule, where, debug, OverrideCheck } = require('./runtime').theprogrammablemind
2
2
  const { conjugateVerb } = require('./english_helpers')
3
- const { OverrideCheck, defaultContextCheckProperties, defaultContextCheck, getValue, setValue } = require('./helpers')
3
+ const { defaultContextCheckProperties, defaultContextCheck, getValue, setValue } = require('./helpers')
4
4
  const drone_tests = require('./drone.test.json')
5
5
  const instance = require('./drone.instance.json')
6
6
  const hierarchy = require('./hierarchy')
@@ -315,9 +315,6 @@ The time t needed to turn by angle θ is:
315
315
  */
316
316
  class API {
317
317
  constructor() {
318
- const overrideMethods = Object.getOwnPropertyNames(API.prototype).filter(key => typeof API.prototype[key] === 'function' && key.endsWith('Drone'));
319
- this.overrideCheck = new OverrideCheck(API, overrideMethods)
320
- this.overriden = this.constructor !== API
321
318
  this.startPoint = { x: 0, y: 0 }
322
319
  this.startAngle = Math.PI/2
323
320
  this.startCompass = 'north'
@@ -337,8 +334,10 @@ class API {
337
334
  }
338
335
 
339
336
  initialize({ objects }) {
337
+ const overriden = this.constructor !== API
340
338
  if (this.overriden) {
341
- this.overrideCheck.check(this)
339
+ const overrideCheck = new OverrideCheck(API, 'Drone')
340
+ overrideCheck.check(this)
342
341
  }
343
342
 
344
343
  if (this.minimumSpeedDrone() == null) {