theprogrammablemind_4wp 9.1.1-beta.30 → 9.1.1-beta.31
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.
- package/index.js +3 -1
- package/package.json +1 -1
- package/src/config.js +22 -2
package/index.js
CHANGED
@@ -6,6 +6,7 @@ const Digraph = require('./src/digraph')
|
|
6
6
|
const client = require('./client')
|
7
7
|
const flattens = require('./src/flatten')
|
8
8
|
const unflatten = require('./src/unflatten')
|
9
|
+
const debug = require('./src/debug')
|
9
10
|
|
10
11
|
module.exports = {
|
11
12
|
process: client.process,
|
@@ -26,5 +27,6 @@ module.exports = {
|
|
26
27
|
Digraph,
|
27
28
|
flattens: flattens.flattens,
|
28
29
|
flatten: flattens.flatten,
|
29
|
-
unflatten: unflatten.unflatten
|
30
|
+
unflatten: unflatten.unflatten,
|
31
|
+
debug
|
30
32
|
}
|
package/package.json
CHANGED
package/src/config.js
CHANGED
@@ -576,6 +576,13 @@ const addWord = (config, uuid) => ({ word, id, initial }) => {
|
|
576
576
|
|
577
577
|
const normalizeConfig = (config) => {
|
578
578
|
if (config) {
|
579
|
+
if (!config.objects) {
|
580
|
+
config.objects = {
|
581
|
+
namespaced: {},
|
582
|
+
server: {},
|
583
|
+
}
|
584
|
+
}
|
585
|
+
|
579
586
|
for (const bag of bags) {
|
580
587
|
if (config[bag]) {
|
581
588
|
config[bag] = config[bag].map(normalizeGenerator)
|
@@ -962,7 +969,8 @@ class Config {
|
|
962
969
|
},
|
963
970
|
objects: {
|
964
971
|
// this is where the namespaced configs have their objects
|
965
|
-
namespaced: {}
|
972
|
+
namespaced: {},
|
973
|
+
server: {},
|
966
974
|
},
|
967
975
|
description: '',
|
968
976
|
words: {
|
@@ -1326,6 +1334,8 @@ class Config {
|
|
1326
1334
|
|
1327
1335
|
toData (data) {
|
1328
1336
|
Object.assign(data, this.config)
|
1337
|
+
// greg99 delete data.objects
|
1338
|
+
data.objects = data.objects.server
|
1329
1339
|
config_toServer(data)
|
1330
1340
|
}
|
1331
1341
|
|
@@ -1767,6 +1777,9 @@ class Config {
|
|
1767
1777
|
if (!config.objects) {
|
1768
1778
|
config.objects = {
|
1769
1779
|
namespaced: {
|
1780
|
+
},
|
1781
|
+
// sent to server
|
1782
|
+
server: {
|
1770
1783
|
}
|
1771
1784
|
}
|
1772
1785
|
}
|
@@ -2286,7 +2299,10 @@ class Config {
|
|
2286
2299
|
await cp.rebuild(options) // in copy
|
2287
2300
|
} else {
|
2288
2301
|
if (!cp.config.objects) {
|
2289
|
-
cp.config.objects = {
|
2302
|
+
cp.config.objects = {
|
2303
|
+
namespaced: {},
|
2304
|
+
server: {},
|
2305
|
+
}
|
2290
2306
|
} else if (!cp.config.objects.namespaced) {
|
2291
2307
|
cp.config.objects.namespaced = {}
|
2292
2308
|
}
|
@@ -3379,8 +3395,12 @@ class Config {
|
|
3379
3395
|
if (!skipObjects) {
|
3380
3396
|
// namespaced is special
|
3381
3397
|
const namespaced = this.config.objects.namespaced
|
3398
|
+
const server = this.config.objects.server
|
3382
3399
|
Object.assign(this.config[key], more[key])
|
3383
3400
|
this.config.objects.namespaced = namespaced
|
3401
|
+
for (let skey in server) {
|
3402
|
+
this.config.objects.server[skey] = server[skey]
|
3403
|
+
}
|
3384
3404
|
}
|
3385
3405
|
} else if (key === 'associations') {
|
3386
3406
|
const configAssociations = this.config.associations
|