@rockcarver/frodo-lib 2.0.0-25 → 2.0.0-26

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/build.zip CHANGED
Binary file
@@ -1 +1 @@
1
- {"version":3,"file":"NodeApi.js","names":["_util","_interopRequireDefault","require","_ForgeRockUtils","_JsonUtils","_BaseApi","obj","__esModule","default","asyncGeneratorStep","gen","resolve","reject","_next","_throw","key","arg","info","value","error","done","Promise","then","_asyncToGenerator","fn","self","args","arguments","apply","err","undefined","queryAllNodeTypesURLTemplate","queryAllNodesByTypeURLTemplate","queryAllNodesURLTemplate","nodeURLTemplate","createNodeURLTemplate","apiVersion","getNodeApiConfig","getNodeTypes","_x","_getNodeTypes","_ref","state","urlString","util","format","getHost","getCurrentRealmPath","data","generateAmApi","resource","post","withCredentials","headers","getNodes","_x2","_getNodes","_ref2","getNodesByType","_x3","_getNodesByType","_ref3","nodeType","get","getNode","_x4","_getNode","_ref4","nodeId","createNode","_x5","_createNode","_ref5","nodeData","putNode","_x6","_putNode","_ref6","cleanData","deleteDeepByKey","put","deleteNode","_x7","_deleteNode","_ref7","delete"],"sources":["../../src/api/NodeApi.ts"],"sourcesContent":["import util from 'util';\n\nimport { State } from '../shared/State';\nimport { getCurrentRealmPath } from '../utils/ForgeRockUtils';\nimport { deleteDeepByKey } from '../utils/JsonUtils';\nimport {\n type IdObjectSkeletonInterface,\n type NoIdObjectSkeletonInterface,\n type PagedResult,\n type QueryResult,\n} from './ApiTypes';\nimport { generateAmApi } from './BaseApi';\nimport { type AmServiceType } from './ServiceApi';\n\nconst queryAllNodeTypesURLTemplate =\n '%s/json%s/realm-config/authentication/authenticationtrees/nodes?_action=getAllTypes';\nconst queryAllNodesByTypeURLTemplate =\n '%s/json%s/realm-config/authentication/authenticationtrees/nodes/%s?_queryFilter=true';\nconst queryAllNodesURLTemplate =\n '%s/json%s/realm-config/authentication/authenticationtrees/nodes?_action=nextdescendents';\nconst nodeURLTemplate =\n '%s/json%s/realm-config/authentication/authenticationtrees/nodes/%s/%s';\nconst createNodeURLTemplate =\n '%s/json%s/realm-config/authentication/authenticationtrees/nodes/%s?_action=create';\n\nconst apiVersion = 'protocol=2.1,resource=1.0';\nconst getNodeApiConfig = () => {\n return {\n apiVersion,\n };\n};\n\nexport interface NodeRefSkeletonInterface {\n connections: Record<string, string>;\n displayName: string;\n nodeType: string;\n x: number;\n y: number;\n}\n\nexport interface InnerNodeRefSkeletonInterface {\n _id: string;\n displayName: string;\n nodeType: string;\n}\n\nexport type NodeSkeleton = IdObjectSkeletonInterface & {\n _type: AmServiceType;\n nodes?: InnerNodeRefSkeletonInterface[];\n tree?: string;\n identityResource?: string;\n};\n\nexport type NodeTypeSkeleton = IdObjectSkeletonInterface & {\n name: string;\n collection: boolean;\n tags: string[];\n metadata: {\n tags: string[];\n [k: string]: string | number | boolean | string[];\n };\n help: string;\n};\n\n/**\n * Get all node types\n * @returns {Promise<QueryResult<NodeTypeSkeleton>>} a promise that resolves to an array of node type objects\n */\nexport async function getNodeTypes({\n state,\n}: {\n state: State;\n}): Promise<QueryResult<NodeTypeSkeleton>> {\n const urlString = util.format(\n queryAllNodeTypesURLTemplate,\n state.getHost(),\n getCurrentRealmPath(state)\n );\n const { data } = await generateAmApi({\n resource: getNodeApiConfig(),\n state,\n }).post(\n urlString,\n {},\n {\n withCredentials: true,\n headers: { 'Accept-Encoding': 'gzip, deflate, br' },\n }\n );\n return data;\n}\n\n/**\n * Get all nodes\n * @returns {Promise} a promise that resolves to an object containing an array of node objects\n */\nexport async function getNodes({\n state,\n}: {\n state: State;\n}): Promise<QueryResult<NodeSkeleton>> {\n const urlString = util.format(\n queryAllNodesURLTemplate,\n state.getHost(),\n getCurrentRealmPath(state)\n );\n const { data } = await generateAmApi({\n resource: getNodeApiConfig(),\n state,\n }).post(\n urlString,\n {},\n {\n withCredentials: true,\n headers: { 'Accept-Encoding': 'gzip, deflate, br' },\n }\n );\n return data;\n}\n\n/**\n * Get all nodes by type\n * @param {string} nodeType node type\n * @returns {Promise<PagedResult<NodeSkeleton>>} a promise that resolves to an object containing an array of node objects of the requested type\n */\nexport async function getNodesByType({\n nodeType,\n state,\n}: {\n nodeType: string;\n state: State;\n}): Promise<PagedResult<NodeSkeleton>> {\n const urlString = util.format(\n queryAllNodesByTypeURLTemplate,\n state.getHost(),\n getCurrentRealmPath(state),\n nodeType\n );\n const { data } = await generateAmApi({\n resource: getNodeApiConfig(),\n state,\n }).get(urlString, {\n withCredentials: true,\n });\n return data;\n}\n\n/**\n * Get node by uuid and type\n * @param {string} nodeId node uuid\n * @param {string} nodeType node type\n * @returns {Promise<NodeSkeleton>} a promise that resolves to a node object\n */\nexport async function getNode({\n nodeId,\n nodeType,\n state,\n}: {\n nodeId: string;\n nodeType: string;\n state: State;\n}) {\n const urlString = util.format(\n nodeURLTemplate,\n state.getHost(),\n getCurrentRealmPath(state),\n nodeType,\n nodeId\n );\n const { data } = await generateAmApi({\n resource: getNodeApiConfig(),\n state,\n }).get(urlString, {\n withCredentials: true,\n });\n return data;\n}\n\n/**\n * Create node by type\n * @param {string} nodeType node type\n * @param {object} nodeData node object\n * @returns {Promise<NodeSkeleton>} a promise that resolves to a node object\n */\nexport async function createNode({\n nodeType,\n nodeData,\n state,\n}: {\n nodeType: string;\n nodeData: NodeSkeleton;\n state: State;\n}): Promise<NodeSkeleton> {\n const urlString = util.format(\n createNodeURLTemplate,\n state.getHost(),\n getCurrentRealmPath(state),\n nodeType\n );\n const { data } = await generateAmApi({\n resource: getNodeApiConfig(),\n state,\n }).post(urlString, nodeData, {\n withCredentials: true,\n headers: { 'Accept-Encoding': 'gzip, deflate, br' },\n });\n return data;\n}\n\n/**\n * Put node by uuid and type\n * @param {string} nodeId node uuid\n * @param {string} nodeType node type\n * @param {object} nodeData node object\n * @returns {Promise} a promise that resolves to an object containing a node object\n */\nexport async function putNode({\n nodeId,\n nodeType,\n nodeData,\n state,\n}: {\n nodeId: string;\n nodeType: string;\n nodeData: NodeSkeleton | NoIdObjectSkeletonInterface;\n state: State;\n}) {\n // until we figure out a way to use transport keys in Frodo,\n // we'll have to drop those encrypted attributes.\n const cleanData = deleteDeepByKey(nodeData, '-encrypted');\n const urlString = util.format(\n nodeURLTemplate,\n state.getHost(),\n getCurrentRealmPath(state),\n nodeType,\n nodeId\n );\n const { data } = await generateAmApi({\n resource: getNodeApiConfig(),\n state,\n }).put(urlString, cleanData, {\n withCredentials: true,\n });\n return data;\n}\n\n/**\n * Delete node by uuid and type\n * @param {String} nodeId node uuid\n * @param {String} nodeType node type\n * @returns {Promise} a promise that resolves to an object containing a node object\n */\nexport async function deleteNode({\n nodeId,\n nodeType,\n state,\n}: {\n nodeId: string;\n nodeType: string;\n state: State;\n}) {\n const urlString = util.format(\n nodeURLTemplate,\n state.getHost(),\n getCurrentRealmPath(state),\n nodeType,\n nodeId\n );\n const { data } = await generateAmApi({\n resource: getNodeApiConfig(),\n state,\n }).delete(urlString, {\n withCredentials: true,\n });\n return data;\n}\n"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAwB,IAAAC,eAAA,GAAAD,OAAA;AAAA,IAAAE,UAAA,GAAAF,OAAA;AAAA,IAAAG,QAAA,GAAAH,OAAA;AAAA,SAAAD,uBAAAK,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,mBAAAC,GAAA,EAAAC,OAAA,EAAAC,MAAA,EAAAC,KAAA,EAAAC,MAAA,EAAAC,GAAA,EAAAC,GAAA,cAAAC,IAAA,GAAAP,GAAA,CAAAK,GAAA,EAAAC,GAAA,OAAAE,KAAA,GAAAD,IAAA,CAAAC,KAAA,WAAAC,KAAA,IAAAP,MAAA,CAAAO,KAAA,iBAAAF,IAAA,CAAAG,IAAA,IAAAT,OAAA,CAAAO,KAAA,YAAAG,OAAA,CAAAV,OAAA,CAAAO,KAAA,E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C1BoB,QAAQ,EACRM,MACF,CAAC;IACD,IAAM;MAAEpB;IAAK,CAAC,SAAS,IAAAC,sBAAa,EAAC;MACnCC,QAAQ,EAAEb,gBAAgB,CAAC,CAAC;MAC5BK;IACF,CAAC,CAAC,CAACsC,GAAG,CAACrC,SAAS,EAAEmC,SAAS,EAAE;MAC3B1B,eAAe,EAAE;IACnB,CAAC,CAAC;IACF,OAAOJ,IAAI;EACb,CAAC;EAAA,OAAA4B,QAAA,CAAAhD,KAAA,OAAAD,SAAA;AAAA;AAAA,SAQqBsD,UAAUA,CAAAC,GAAA;EAAA,OAAAC,WAAA,CAAAvD,KAAA,OAAAD,SAAA;AAAA;AAAA,SAAAwD,YAAA;EAAAA,WAAA,GAAA5D,iBAAA,CAAzB,WAAA6D,KAAA,EAQJ;IAAA,IAR8B;MAC/BhB,MAAM;MACNN,QAAQ;MACRpB;IAKF,CAAC,GAAA0C,KAAA;IACC,IAAMzC,SAAS,GAAGC,aAAI,CAACC,MAAM,CAC3BX,eAAe,EACfQ,KAAK,CAACI,OAAO,CAAC,CAAC,EACf,IAAAC,mCAAmB,EAACL,KAAK,CAAC,EAC1BoB,QAAQ,EACRM,MACF,CAAC;IACD,IAAM;MAAEpB;IAAK,CAAC,SAAS,IAAAC,sBAAa,EAAC;MACnCC,QAAQ,EAAEb,gBAAgB,CAAC,CAAC;MAC5BK;IACF,CAAC,CAAC,CAAC2C,MAAM,CAAC1C,SAAS,EAAE;MACnBS,eAAe,EAAE;IACnB,CAAC,CAAC;IACF,OAAOJ,IAAI;EACb,CAAC;EAAA,OAAAmC,WAAA,CAAAvD,KAAA,OAAAD,SAAA;AAAA"}
1
+ {"version":3,"file":"NodeApi.js","names":["_util","_interopRequireDefault","require","_ForgeRockUtils","_JsonUtils","_BaseApi","obj","__esModule","default","asyncGeneratorStep","gen","resolve","reject","_next","_throw","key","arg","info","value","error","done","Promise","then","_asyncToGenerator","fn","self","args","arguments","apply","err","undefined","queryAllNodeTypesURLTemplate","queryAllNodesByTypeURLTemplate","queryAllNodesURLTemplate","nodeURLTemplate","createNodeURLTemplate","apiVersion","getNodeApiConfig","getNodeTypes","_x","_getNodeTypes","_ref","state","urlString","util","format","getHost","getCurrentRealmPath","data","generateAmApi","resource","post","withCredentials","headers","getNodes","_x2","_getNodes","_ref2","getNodesByType","_x3","_getNodesByType","_ref3","nodeType","get","getNode","_x4","_getNode","_ref4","nodeId","createNode","_x5","_createNode","_ref5","nodeData","putNode","_x6","_putNode","_ref6","cleanData","deleteDeepByKey","put","deleteNode","_x7","_deleteNode","_ref7","delete"],"sources":["../../src/api/NodeApi.ts"],"sourcesContent":["import util from 'util';\n\nimport { State } from '../shared/State';\nimport { getCurrentRealmPath } from '../utils/ForgeRockUtils';\nimport { deleteDeepByKey } from '../utils/JsonUtils';\nimport {\n type IdObjectSkeletonInterface,\n type NoIdObjectSkeletonInterface,\n type PagedResult,\n type QueryResult,\n} from './ApiTypes';\nimport { generateAmApi } from './BaseApi';\nimport { type AmServiceType } from './ServiceApi';\n\nconst queryAllNodeTypesURLTemplate =\n '%s/json%s/realm-config/authentication/authenticationtrees/nodes?_action=getAllTypes';\nconst queryAllNodesByTypeURLTemplate =\n '%s/json%s/realm-config/authentication/authenticationtrees/nodes/%s?_queryFilter=true';\nconst queryAllNodesURLTemplate =\n '%s/json%s/realm-config/authentication/authenticationtrees/nodes?_action=nextdescendents';\nconst nodeURLTemplate =\n '%s/json%s/realm-config/authentication/authenticationtrees/nodes/%s/%s';\nconst createNodeURLTemplate =\n '%s/json%s/realm-config/authentication/authenticationtrees/nodes/%s?_action=create';\n\nconst apiVersion = 'protocol=2.1,resource=1.0';\nconst getNodeApiConfig = () => {\n return {\n apiVersion,\n };\n};\n\nexport interface NodeRefSkeletonInterface {\n connections: Record<string, string>;\n displayName: string;\n nodeType: string;\n x: number;\n y: number;\n}\n\nexport interface InnerNodeRefSkeletonInterface {\n _id: string;\n displayName: string;\n nodeType: string;\n}\n\nexport type NodeSkeleton = IdObjectSkeletonInterface & {\n _type: AmServiceType;\n nodes?: InnerNodeRefSkeletonInterface[];\n tree?: string;\n identityResource?: string;\n script?: string;\n emailTemplateName?: string;\n filteredProviders?: string[];\n};\n\nexport type NodeTypeSkeleton = IdObjectSkeletonInterface & {\n name: string;\n collection: boolean;\n tags: string[];\n metadata: {\n tags: string[];\n [k: string]: string | number | boolean | string[];\n };\n help: string;\n};\n\n/**\n * Get all node types\n * @returns {Promise<QueryResult<NodeTypeSkeleton>>} a promise that resolves to an array of node type objects\n */\nexport async function getNodeTypes({\n state,\n}: {\n state: State;\n}): Promise<QueryResult<NodeTypeSkeleton>> {\n const urlString = util.format(\n queryAllNodeTypesURLTemplate,\n state.getHost(),\n getCurrentRealmPath(state)\n );\n const { data } = await generateAmApi({\n resource: getNodeApiConfig(),\n state,\n }).post(\n urlString,\n {},\n {\n withCredentials: true,\n headers: { 'Accept-Encoding': 'gzip, deflate, br' },\n }\n );\n return data;\n}\n\n/**\n * Get all nodes\n * @returns {Promise} a promise that resolves to an object containing an array of node objects\n */\nexport async function getNodes({\n state,\n}: {\n state: State;\n}): Promise<QueryResult<NodeSkeleton>> {\n const urlString = util.format(\n queryAllNodesURLTemplate,\n state.getHost(),\n getCurrentRealmPath(state)\n );\n const { data } = await generateAmApi({\n resource: getNodeApiConfig(),\n state,\n }).post(\n urlString,\n {},\n {\n withCredentials: true,\n headers: { 'Accept-Encoding': 'gzip, deflate, br' },\n }\n );\n return data;\n}\n\n/**\n * Get all nodes by type\n * @param {string} nodeType node type\n * @returns {Promise<PagedResult<NodeSkeleton>>} a promise that resolves to an object containing an array of node objects of the requested type\n */\nexport async function getNodesByType({\n nodeType,\n state,\n}: {\n nodeType: string;\n state: State;\n}): Promise<PagedResult<NodeSkeleton>> {\n const urlString = util.format(\n queryAllNodesByTypeURLTemplate,\n state.getHost(),\n getCurrentRealmPath(state),\n nodeType\n );\n const { data } = await generateAmApi({\n resource: getNodeApiConfig(),\n state,\n }).get(urlString, {\n withCredentials: true,\n });\n return data;\n}\n\n/**\n * Get node by uuid and type\n * @param {string} nodeId node uuid\n * @param {string} nodeType node type\n * @returns {Promise<NodeSkeleton>} a promise that resolves to a node object\n */\nexport async function getNode({\n nodeId,\n nodeType,\n state,\n}: {\n nodeId: string;\n nodeType: string;\n state: State;\n}): Promise<NodeSkeleton> {\n const urlString = util.format(\n nodeURLTemplate,\n state.getHost(),\n getCurrentRealmPath(state),\n nodeType,\n nodeId\n );\n const { data } = await generateAmApi({\n resource: getNodeApiConfig(),\n state,\n }).get(urlString, {\n withCredentials: true,\n });\n return data;\n}\n\n/**\n * Create node by type\n * @param {string} nodeType node type\n * @param {object} nodeData node object\n * @returns {Promise<NodeSkeleton>} a promise that resolves to a node object\n */\nexport async function createNode({\n nodeType,\n nodeData,\n state,\n}: {\n nodeType: string;\n nodeData: NodeSkeleton;\n state: State;\n}): Promise<NodeSkeleton> {\n const urlString = util.format(\n createNodeURLTemplate,\n state.getHost(),\n getCurrentRealmPath(state),\n nodeType\n );\n const { data } = await generateAmApi({\n resource: getNodeApiConfig(),\n state,\n }).post(urlString, nodeData, {\n withCredentials: true,\n headers: { 'Accept-Encoding': 'gzip, deflate, br' },\n });\n return data;\n}\n\n/**\n * Put node by uuid and type\n * @param {string} nodeId node uuid\n * @param {string} nodeType node type\n * @param {object} nodeData node object\n * @returns {Promise} a promise that resolves to an object containing a node object\n */\nexport async function putNode({\n nodeId,\n nodeType,\n nodeData,\n state,\n}: {\n nodeId: string;\n nodeType: string;\n nodeData: NodeSkeleton | NoIdObjectSkeletonInterface;\n state: State;\n}) {\n // until we figure out a way to use transport keys in Frodo,\n // we'll have to drop those encrypted attributes.\n const cleanData = deleteDeepByKey(nodeData, '-encrypted');\n const urlString = util.format(\n nodeURLTemplate,\n state.getHost(),\n getCurrentRealmPath(state),\n nodeType,\n nodeId\n );\n const { data } = await generateAmApi({\n resource: getNodeApiConfig(),\n state,\n }).put(urlString, cleanData, {\n withCredentials: true,\n });\n return data;\n}\n\n/**\n * Delete node by uuid and type\n * @param {String} nodeId node uuid\n * @param {String} nodeType node type\n * @returns {Promise} a promise that resolves to an object containing a node object\n */\nexport async function deleteNode({\n nodeId,\n nodeType,\n state,\n}: {\n nodeId: string;\n nodeType: string;\n state: State;\n}) {\n const urlString = util.format(\n nodeURLTemplate,\n state.getHost(),\n getCurrentRealmPath(state),\n nodeType,\n nodeId\n );\n const { data } = await generateAmApi({\n resource: getNodeApiConfig(),\n state,\n }).delete(urlString, {\n withCredentials: true,\n });\n return data;\n}\n"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAwB,IAAAC,eAAA,GAAAD,OAAA;AAAA,IAAAE,UAAA,GAAAF,OAAA;AAAA,IAAAG,QAAA,GAAAH,OAAA;AAAA,SAAAD,uBAAAK,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,mBAAAC,GAAA,EAAAC,OAAA,EAAAC,MAAA,EAAAC,KAAA,EAAAC,MAAA,EAAAC,GAAA,EAAAC,GAAA,cAAAC,IAAA,GAAAP,GAAA,CAAAK,GAAA,EAAAC,GAAA,OAAAE,KAAA,GAAAD,IAAA,CAAAC,KAAA,WAAAC,KAAA,IAAAP,MAAA,CAAAO,KAAA,iBAAAF,IAAA,CAAAG,IAAA,IAAAT,OAAA,CAAAO,KAAA,YAAAG,OAAA,CAAAV,OAAA,CAAAO,KAAA,EAAAI,IAAA,CAAAT,KAAA,EAAAC,MAAA;AAAA,SAAAS,kBAAAC,EAAA,6BAAAC,IAAA,SAAAC,IAAA,GAAAC,SAAA,aAAAN,OAAA,WAAAV,OAAA,EAAAC,MAAA,QAAAF,GAAA,GAAAc,EAAA,CAAAI,KAAA,CAAAH,IAAA,EAAAC,IAAA,YAAAb,MAAAK,KAAA,IAAAT,kBAAA,CAAAC,GAAA,EAAAC,OAAA,EAAAC,MAAA,EAAAC,KAAA,EAAAC,M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AD,SAAA;AAAA;AAAA,SAQqBsD,UAAUA,CAAAC,GAAA;EAAA,OAAAC,WAAA,CAAAvD,KAAA,OAAAD,SAAA;AAAA;AAAA,SAAAwD,YAAA;EAAAA,WAAA,GAAA5D,iBAAA,CAAzB,WAAA6D,KAAA,EAQJ;IAAA,IAR8B;MAC/BhB,MAAM;MACNN,QAAQ;MACRpB;IAKF,CAAC,GAAA0C,KAAA;IACC,IAAMzC,SAAS,GAAGC,aAAI,CAACC,MAAM,CAC3BX,eAAe,EACfQ,KAAK,CAACI,OAAO,CAAC,CAAC,EACf,IAAAC,mCAAmB,EAACL,KAAK,CAAC,EAC1BoB,QAAQ,EACRM,MACF,CAAC;IACD,IAAM;MAAEpB;IAAK,CAAC,SAAS,IAAAC,sBAAa,EAAC;MACnCC,QAAQ,EAAEb,gBAAgB,CAAC,CAAC;MAC5BK;IACF,CAAC,CAAC,CAAC2C,MAAM,CAAC1C,SAAS,EAAE;MACnBS,eAAe,EAAE;IACnB,CAAC,CAAC;IACF,OAAOJ,IAAI;EACb,CAAC;EAAA,OAAAmC,WAAA,CAAAvD,KAAA,OAAAD,SAAA;AAAA"}
@@ -422,6 +422,10 @@ function _exportJourney() {
422
422
  },
423
423
  state
424
424
  } = _ref3;
425
+ (0, _Console.debugMessage)({
426
+ message: "JourneyOps.exportJourney: start [journey=".concat(journeyId, "]"),
427
+ state
428
+ });
425
429
  var exportData = createSingleTreeExportTemplate({
426
430
  state
427
431
  });
@@ -609,85 +613,90 @@ function _exportJourney() {
609
613
  state
610
614
  });
611
615
  try {
612
- var innerNodeDataResults = yield Promise.all(innerNodePromises);
613
- for (var innerNodeObject of innerNodeDataResults) {
614
- var innerNodeId = innerNodeObject._id;
615
- var innerNodeType = innerNodeObject._type._id;
616
- if (verbose) (0, _Console.printMessage)({
617
- message: " - ".concat(innerNodeId, " (").concat(innerNodeType, ")"),
618
- type: 'info',
619
- newline: true,
620
- state
621
- });
622
- exportData.innerNodes[innerNodeId] = innerNodeObject;
623
-
624
- // handle script node types
625
- if (deps && scriptedNodes.includes(innerNodeType)) {
626
- scriptPromises.push((0, _ScriptApi.getScript)({
627
- scriptId: innerNodeObject.script,
616
+ var settledPromises = yield Promise.allSettled(innerNodePromises);
617
+ for (var settledPromise of settledPromises) {
618
+ if (settledPromise.status === 'fulfilled' && settledPromise.value) {
619
+ var innerNodeObject = settledPromise.value;
620
+ var innerNodeId = innerNodeObject._id;
621
+ var innerNodeType = innerNodeObject._type._id;
622
+ if (verbose) (0, _Console.printMessage)({
623
+ message: " - ".concat(innerNodeId, " (").concat(innerNodeType, ")"),
624
+ type: 'info',
625
+ newline: true,
628
626
  state
629
- }));
630
- }
627
+ });
628
+ exportData.innerNodes[innerNodeId] = innerNodeObject;
631
629
 
632
- // frodo supports email templates in platform deployments
633
- if (deps && state.getDeploymentType() === _Constants.default.CLOUD_DEPLOYMENT_TYPE_KEY || state.getDeploymentType() === _Constants.default.FORGEOPS_DEPLOYMENT_TYPE_KEY) {
634
- if (emailTemplateNodes.includes(innerNodeType)) {
635
- try {
636
- var _emailTemplate = yield (0, _EmailTemplateOps.readEmailTemplate)({
637
- templateId: innerNodeObject.emailTemplateName,
638
- state
639
- });
640
- emailTemplatePromises.push(_emailTemplate);
641
- } catch (error) {
642
- var _error$response6;
643
- error.message = "Error reading email template ".concat(innerNodeObject.emailTemplateName, ": ").concat(((_error$response6 = error.response) === null || _error$response6 === void 0 || (_error$response6 = _error$response6.data) === null || _error$response6 === void 0 ? void 0 : _error$response6.message) || error.message);
644
- errors.push(error);
645
- }
630
+ // handle script node types
631
+ if (deps && scriptedNodes.includes(innerNodeType)) {
632
+ scriptPromises.push((0, _ScriptApi.getScript)({
633
+ scriptId: innerNodeObject.script,
634
+ state
635
+ }));
646
636
  }
647
- }
648
637
 
649
- // handle SAML2 node dependencies
650
- if (deps && innerNodeType === 'product-Saml2Node') {
651
- if (!allSaml2Providers) {
652
- try {
653
- allSaml2Providers = yield (0, _Saml2Ops.readSaml2ProviderStubs)({
654
- state
655
- });
656
- } catch (error) {
657
- var _error$response7;
658
- error.message = "Error reading saml2 providers: ".concat(((_error$response7 = error.response) === null || _error$response7 === void 0 || (_error$response7 = _error$response7.data) === null || _error$response7 === void 0 ? void 0 : _error$response7.message) || error.message);
659
- errors.push(error);
638
+ // frodo supports email templates in platform deployments
639
+ if (deps && state.getDeploymentType() === _Constants.default.CLOUD_DEPLOYMENT_TYPE_KEY || state.getDeploymentType() === _Constants.default.FORGEOPS_DEPLOYMENT_TYPE_KEY) {
640
+ if (emailTemplateNodes.includes(innerNodeType)) {
641
+ try {
642
+ var _emailTemplate = yield (0, _EmailTemplateOps.readEmailTemplate)({
643
+ templateId: innerNodeObject.emailTemplateName,
644
+ state
645
+ });
646
+ emailTemplatePromises.push(_emailTemplate);
647
+ } catch (error) {
648
+ var _error$response6;
649
+ error.message = "Error reading email template ".concat(innerNodeObject.emailTemplateName, ": ").concat(((_error$response6 = error.response) === null || _error$response6 === void 0 || (_error$response6 = _error$response6.data) === null || _error$response6 === void 0 ? void 0 : _error$response6.message) || error.message);
650
+ errors.push(error);
651
+ }
660
652
  }
661
653
  }
662
- if (!allCirclesOfTrust) {
663
- try {
664
- allCirclesOfTrust = yield (0, _CirclesOfTrustOps.readCirclesOfTrust)({
665
- state
666
- });
667
- } catch (error) {
668
- var _error$response8;
669
- error.message = "Error reading circles of trust: ".concat(((_error$response8 = error.response) === null || _error$response8 === void 0 || (_error$response8 = _error$response8.data) === null || _error$response8 === void 0 ? void 0 : _error$response8.message) || error.message);
670
- errors.push(error);
654
+
655
+ // handle SAML2 node dependencies
656
+ if (deps && innerNodeType === 'product-Saml2Node') {
657
+ if (!allSaml2Providers) {
658
+ try {
659
+ allSaml2Providers = yield (0, _Saml2Ops.readSaml2ProviderStubs)({
660
+ state
661
+ });
662
+ } catch (error) {
663
+ var _error$response7;
664
+ error.message = "Error reading saml2 providers: ".concat(((_error$response7 = error.response) === null || _error$response7 === void 0 || (_error$response7 = _error$response7.data) === null || _error$response7 === void 0 ? void 0 : _error$response7.message) || error.message);
665
+ errors.push(error);
666
+ }
667
+ }
668
+ if (!allCirclesOfTrust) {
669
+ try {
670
+ allCirclesOfTrust = yield (0, _CirclesOfTrustOps.readCirclesOfTrust)({
671
+ state
672
+ });
673
+ } catch (error) {
674
+ var _error$response8;
675
+ error.message = "Error reading circles of trust: ".concat(((_error$response8 = error.response) === null || _error$response8 === void 0 || (_error$response8 = _error$response8.data) === null || _error$response8 === void 0 ? void 0 : _error$response8.message) || error.message);
676
+ errors.push(error);
677
+ }
671
678
  }
679
+ saml2ConfigPromises.push(getSaml2NodeDependencies(innerNodeObject, allSaml2Providers, allCirclesOfTrust, state));
672
680
  }
673
- saml2ConfigPromises.push(getSaml2NodeDependencies(innerNodeObject, allSaml2Providers, allCirclesOfTrust, state));
674
- }
675
681
 
676
- // If this is a SocialProviderHandlerNode get each enabled social identity provider.
677
- if (deps && !socialProviderPromise && innerNodeType === 'SocialProviderHandlerNode') {
678
- socialProviderPromise = (0, _SocialIdentityProvidersApi.getSocialIdentityProviders)({
679
- state
680
- });
681
- }
682
+ // If this is a SocialProviderHandlerNode get each enabled social identity provider.
683
+ if (deps && !socialProviderPromise && innerNodeType === 'SocialProviderHandlerNode') {
684
+ socialProviderPromise = (0, _SocialIdentityProvidersApi.getSocialIdentityProviders)({
685
+ state
686
+ });
687
+ }
682
688
 
683
- // If this is a SelectIdPNode and filteredProviters is not already set to empty array set filteredSocialProviers.
684
- if (deps && !filteredSocialProviders && innerNodeType === 'SelectIdPNode' && innerNodeObject.filteredProviders) {
685
- filteredSocialProviders = filteredSocialProviders || [];
686
- for (var _filteredProvider of innerNodeObject.filteredProviders) {
687
- if (!filteredSocialProviders.includes(_filteredProvider)) {
688
- filteredSocialProviders.push(_filteredProvider);
689
+ // If this is a SelectIdPNode and filteredProviters is not already set to empty array set filteredSocialProviers.
690
+ if (deps && !filteredSocialProviders && innerNodeType === 'SelectIdPNode' && innerNodeObject.filteredProviders) {
691
+ filteredSocialProviders = filteredSocialProviders || [];
692
+ for (var _filteredProvider of innerNodeObject.filteredProviders) {
693
+ if (!filteredSocialProviders.includes(_filteredProvider)) {
694
+ filteredSocialProviders.push(_filteredProvider);
695
+ }
689
696
  }
690
697
  }
698
+ } else if (settledPromise.status === 'rejected') {
699
+ errors.push(new Error(settledPromise.reason));
691
700
  }
692
701
  }
693
702
  } catch (error) {
@@ -703,15 +712,15 @@ function _exportJourney() {
703
712
  });
704
713
  try {
705
714
  var settledEmailTemplatePromises = yield Promise.allSettled(emailTemplatePromises);
706
- for (var settledPromise of settledEmailTemplatePromises) {
707
- if (settledPromise.status === 'fulfilled' && settledPromise.value) {
715
+ for (var _settledPromise of settledEmailTemplatePromises) {
716
+ if (_settledPromise.status === 'fulfilled' && _settledPromise.value) {
708
717
  if (verbose) (0, _Console.printMessage)({
709
- message: " - ".concat(settledPromise.value._id.split('/')[1]).concat(settledPromise.value.displayName ? " (".concat(settledPromise.value.displayName, ")") : ''),
718
+ message: " - ".concat(_settledPromise.value._id.split('/')[1]).concat(_settledPromise.value.displayName ? " (".concat(_settledPromise.value.displayName, ")") : ''),
710
719
  type: 'info',
711
720
  newline: true,
712
721
  state
713
722
  });
714
- exportData.emailTemplates[settledPromise.value._id.split('/')[1]] = settledPromise.value;
723
+ exportData.emailTemplates[_settledPromise.value._id.split('/')[1]] = _settledPromise.value;
715
724
  }
716
725
  }
717
726
  } catch (error) {
@@ -850,6 +859,10 @@ function _exportJourney() {
850
859
  var errorMessages = errors.map(error => error.message).join('\n');
851
860
  throw new Error("Export error:\n".concat(errorMessages));
852
861
  }
862
+ (0, _Console.debugMessage)({
863
+ message: "JourneyOps.exportJourney: end [journey=".concat(journeyId, "]"),
864
+ state
865
+ });
853
866
  return exportData;
854
867
  });
855
868
  return _exportJourney.apply(this, arguments);