tpmkms_4wp 8.9.0-beta.16 → 8.9.0-beta.18
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/common/helpers/dialogues.js +6 -6
- package/common/meta.js +2 -1
- package/common/wp.instance.json +8670 -53
- package/common/wp.js +8 -1
- package/common/wp.test.json +11982 -2674
- package/package.json +2 -2
@@ -77,7 +77,7 @@ class API {
|
|
77
77
|
}
|
78
78
|
|
79
79
|
// word is for one or many
|
80
|
-
makeObject({config, context, types=[], doPluralize=true} = {}) {
|
80
|
+
makeObject({config, context, types=[], source_value=undefined, doPluralize=true} = {}) {
|
81
81
|
/*
|
82
82
|
if (!context.unknown) {
|
83
83
|
return context.value
|
@@ -89,9 +89,9 @@ class API {
|
|
89
89
|
}
|
90
90
|
// const concept = pluralize.singular(value)
|
91
91
|
const concept = this.toScopedId(context)
|
92
|
-
|
93
|
-
|
94
|
-
|
92
|
+
if (config.exists(concept)) {
|
93
|
+
return concept
|
94
|
+
}
|
95
95
|
|
96
96
|
// TODO handle the general case
|
97
97
|
const fixUps = (concept) => {
|
@@ -102,9 +102,9 @@ class API {
|
|
102
102
|
}
|
103
103
|
// config.addOperator({ pattern: `(["${fixUps(concept)}"])`, allowDups: true })
|
104
104
|
config.addOperator({ pattern: `(["${concept}"])`, allowDups: true })
|
105
|
-
config.addBridge({ id: concept, level: 0, bridge: `{ ...next(operator), value: '${concept}' }` , allowDups: true })
|
105
|
+
config.addBridge({ id: concept, level: 0, bridge: `{ ...next(operator), value: '${source_value || concept}' }` , allowDups: true })
|
106
106
|
const addConcept = (word, number) => {
|
107
|
-
config.addWord(word, { id: concept, initial: `{ value: "${concept}", number: "${number}" }` } )
|
107
|
+
config.addWord(word, { id: concept, initial: `{ value: "${source_value || concept}", number: "${number}" }` } )
|
108
108
|
const baseTypes = [
|
109
109
|
'theAble',
|
110
110
|
'queryable',
|
package/common/meta.js
CHANGED
@@ -280,7 +280,8 @@ let config = {
|
|
280
280
|
apply: async ({config, context, kms, e, isTest}) => {
|
281
281
|
if (kms.dialogues) {
|
282
282
|
if (context.from.unknown && !context.to.unknown) {
|
283
|
-
kms.dialogues.api.makeObject({ context: context.from, types: [context.to.marker], config });
|
283
|
+
// kms.dialogues.api.makeObject({ context: context.from, types: [context.to.marker], source_value: context.to.value, config });
|
284
|
+
kms.dialogues.api.makeObject({ context: context.from, types: [context.to.marker], source_value: context.to.value, config });
|
284
285
|
}
|
285
286
|
if (context.to.value) {
|
286
287
|
kms.stm.api.setVariable(context.from.value, context.to.value)
|