theprogrammablemind_4wp 8.3.0-beta.6 → 8.3.0-beta.7
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +1 -1
- package/src/config.js +21 -26
- package/src/helpers.js +13 -13
package/package.json
CHANGED
package/src/config.js
CHANGED
@@ -1171,47 +1171,42 @@ class Config {
|
|
1171
1171
|
return bridge
|
1172
1172
|
})
|
1173
1173
|
} else {
|
1174
|
-
|
1175
|
-
|
1176
|
-
|
1177
|
-
|
1178
|
-
|
1179
|
-
|
1180
|
-
|
1181
|
-
|
1182
|
-
|
1183
|
-
|
1184
|
-
|
1185
|
-
|
1186
|
-
|
1187
|
-
|
1188
|
-
|
1174
|
+
/* done in updateQueries now
|
1175
|
+
config.generators = (config.generators || []).map((generator) => {
|
1176
|
+
generator = { ...generator }
|
1177
|
+
delete generator.where
|
1178
|
+
generator.match = generator.match.toString()
|
1179
|
+
generator.apply = generator.apply.toString()
|
1180
|
+
return generator
|
1181
|
+
})
|
1182
|
+
config.semantics = (config.semantics || []).map((semantic) => {
|
1183
|
+
semantic = { ...semantic }
|
1184
|
+
delete semantic.where
|
1185
|
+
semantic.match = semantic.match.toString()
|
1186
|
+
semantic.apply = semantic.apply.toString()
|
1187
|
+
return semantic
|
1188
|
+
})
|
1189
1189
|
config.bridges = (config.bridges || []).map((bridge) => {
|
1190
1190
|
bridge = { ...bridge }
|
1191
1191
|
delete bridge.where
|
1192
1192
|
if (bridge.generatorp) {
|
1193
|
-
bridge.generatorp =
|
1193
|
+
bridge.generatorp = bridge.generatorp.toString()
|
1194
1194
|
}
|
1195
1195
|
if (bridge.generatorr) {
|
1196
|
-
bridge.generatorr =
|
1196
|
+
bridge.generatorr = bridge.generatorr.toString()
|
1197
1197
|
}
|
1198
1198
|
if (bridge.generatorpr) {
|
1199
|
-
bridge.generatorpr =
|
1199
|
+
bridge.generatorpr = bridge.generatorpr.toString()
|
1200
1200
|
}
|
1201
1201
|
if (bridge.evaluator) {
|
1202
|
-
bridge.evaluator =
|
1202
|
+
bridge.evaluator = bridge.evaluator.toString()
|
1203
1203
|
}
|
1204
1204
|
if (bridge.semantic) {
|
1205
|
-
bridge.semantic =
|
1206
|
-
}
|
1207
|
-
if (bridge.evaluators) {
|
1208
|
-
bridge.evaluators = bridge.evaluators.map(toCanonical).toString()
|
1209
|
-
}
|
1210
|
-
if (bridge.semantics) {
|
1211
|
-
bridge.semantics = bridge.semantics.map(toCanonical).toString()
|
1205
|
+
bridge.semantic = bridge.semantic.toString()
|
1212
1206
|
}
|
1213
1207
|
return bridge
|
1214
1208
|
})
|
1209
|
+
*/
|
1215
1210
|
}
|
1216
1211
|
return config
|
1217
1212
|
}
|
package/src/helpers.js
CHANGED
@@ -312,24 +312,18 @@ const updateQueries = (queryOrConfig) => {
|
|
312
312
|
|
313
313
|
const functionsToStrings = (config) => {
|
314
314
|
config = { ...config }
|
315
|
-
|
316
|
-
if (
|
317
|
-
return { ...
|
315
|
+
defToStrings = (def) => {
|
316
|
+
if (def.apply) {
|
317
|
+
return { ...def, match: def.match.toString(), apply: def.apply.toString() }
|
318
318
|
} else {
|
319
|
-
return [
|
319
|
+
return [def[0].toString(), def[1].toString()]
|
320
320
|
}
|
321
321
|
}
|
322
322
|
if (config.generators) {
|
323
|
-
config.generators = config.generators.map(
|
323
|
+
config.generators = config.generators.map(defToStrings)
|
324
324
|
}
|
325
325
|
if (config.semantics) {
|
326
|
-
config.semantics = config.semantics.map(
|
327
|
-
if (semantic.apply) {
|
328
|
-
return { ...semantic, match: semantic.match.toString(), apply: semantic.apply.toString() }
|
329
|
-
} else {
|
330
|
-
return [semantic[0].toString(), semantic[1].toString()]
|
331
|
-
}
|
332
|
-
})
|
326
|
+
config.semantics = config.semantics.map(defToStrings)
|
333
327
|
}
|
334
328
|
if (config.bridges) {
|
335
329
|
config.bridges = config.bridges.map((bridge) => {
|
@@ -338,7 +332,7 @@ const functionsToStrings = (config) => {
|
|
338
332
|
bridge.generator = bridge.generator.toString()
|
339
333
|
}
|
340
334
|
if (bridge.generators) {
|
341
|
-
bridge.generators = bridge.generators.map(
|
335
|
+
bridge.generators = bridge.generators.map(defToStrings)
|
342
336
|
}
|
343
337
|
if (bridge.generatorp) {
|
344
338
|
bridge.generatorp = bridge.generatorp.toString()
|
@@ -349,9 +343,15 @@ const functionsToStrings = (config) => {
|
|
349
343
|
if (bridge.semantic) {
|
350
344
|
bridge.semantic = bridge.semantic.toString()
|
351
345
|
}
|
346
|
+
if (bridge.semantics) {
|
347
|
+
bridge.semantics = bridge.semantics.toString()
|
348
|
+
}
|
352
349
|
if (bridge.evaluator) {
|
353
350
|
bridge.evaluator = bridge.evaluator.toString()
|
354
351
|
}
|
352
|
+
if (bridge.evaluators) {
|
353
|
+
bridge.evaluators = bridge.evaluators.toString()
|
354
|
+
}
|
355
355
|
return bridge
|
356
356
|
})
|
357
357
|
}
|