snow-flow-test 10.0.1-test.154 → 10.0.1-test.155
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/package.json
CHANGED
|
@@ -74,12 +74,15 @@ async function addTriggerViaGraphQL(
|
|
|
74
74
|
else if (triggerType.endsWith('e')) variations.push(triggerType + 'd');
|
|
75
75
|
else variations.push(triggerType + 'ed', triggerType + 'd');
|
|
76
76
|
|
|
77
|
+
// Resolve reference fields that may be objects {display_value, link} or plain strings
|
|
78
|
+
const str = (val: any) => typeof val === 'object' && val !== null ? (val.display_value || val.value || '') : (val || '');
|
|
79
|
+
|
|
77
80
|
const assignFound = (found: any, matched: string) => {
|
|
78
81
|
trigDefId = found.sys_id;
|
|
79
|
-
trigName = found.name || triggerType;
|
|
80
|
-
trigType = found.type || triggerType;
|
|
81
|
-
trigCategory = found.category
|
|
82
|
-
steps.def_lookup = { id: found.sys_id, type: found.type, name: found.name, category: found.category, matched };
|
|
82
|
+
trigName = str(found.name) || triggerType;
|
|
83
|
+
trigType = str(found.type) || triggerType;
|
|
84
|
+
trigCategory = str(found.category);
|
|
85
|
+
steps.def_lookup = { id: found.sys_id, type: str(found.type), name: str(found.name), category: str(found.category), matched };
|
|
83
86
|
};
|
|
84
87
|
|
|
85
88
|
// Try exact match on type and name for each variation
|