theprogrammablemind_4wp 7.5.8-beta.3 → 7.5.8-beta.31
Sign up to get free protection for your applications and to get access to all the features.
- package/client.js +121 -50
- package/index.js +1 -0
- package/package.json +1 -1
- package/src/config.js +363 -179
- package/src/helpers.js +1 -1
- package/src/semantics.js +6 -1
package/src/helpers.js
CHANGED
package/src/semantics.js
CHANGED
@@ -6,7 +6,7 @@ class Semantic {
|
|
6
6
|
// constructor ({match, apply, uuid, index, km, notes}) {
|
7
7
|
constructor (semantic) {
|
8
8
|
semantic = normalizeSemantic(semantic)
|
9
|
-
const { match, apply, uuid, index, km, notes, priority, debug, where, applyWrapped, property } = semantic
|
9
|
+
const { match, apply, uuid, index, km, notes, priority, debug, where, applyWrapped, property, oneShot, id } = semantic
|
10
10
|
this.matcher = match
|
11
11
|
this._apply = apply
|
12
12
|
this._applyWrapped = applyWrapped
|
@@ -18,6 +18,8 @@ class Semantic {
|
|
18
18
|
this.notes = notes
|
19
19
|
this.callId = debug
|
20
20
|
this.where = where
|
21
|
+
this.oneShot = oneShot
|
22
|
+
this.id = id
|
21
23
|
}
|
22
24
|
|
23
25
|
toLabel () {
|
@@ -197,6 +199,9 @@ class Semantics {
|
|
197
199
|
const log = (message) => { this.logs.push(message) }
|
198
200
|
try {
|
199
201
|
contextPrime = semantic.apply(args, context, s, log, options)
|
202
|
+
if (!contextPrime.controlKeepMotivation && semantic.oneShot) {
|
203
|
+
args.config.removeSemantic(semantic)
|
204
|
+
}
|
200
205
|
} catch( e ) {
|
201
206
|
contextPrime = null
|
202
207
|
let errorMessage
|