@contrail/flexplm 1.5.1-alpha.64caad7 → 1.5.1-alpha.8727255

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.
@@ -1709,7 +1709,7 @@ describe('sendToFlexPLM / handleVibeIQFile / sendPublishPayloadEvent', () => {
1709
1709
  afterEach(() => {
1710
1710
  jest.restoreAllMocks();
1711
1711
  });
1712
- it('sendToFlexPLM merges outboundPublishEvent into result and calls sendPublishPayloadEvent in parallel', async () => {
1712
+ it('should merge outboundPublishEvent into result and call sendPublishPayloadEvent in parallel', async () => {
1713
1713
  const bppa = new base_process_publish_assortment_1.BaseProcessPublishAssortment(config, dc, mapFileUtil);
1714
1714
  const flexResponse = { status: 200, data: { ok: true } };
1715
1715
  let flexResolved = false;
@@ -1738,7 +1738,7 @@ describe('sendToFlexPLM / handleVibeIQFile / sendPublishPayloadEvent', () => {
1738
1738
  expect(spyEvent).toHaveBeenCalledWith(passedOutboundPublishEvent);
1739
1739
  expect(result).toEqual({ ...flexResponse, outboundPublishEvent: passedOutboundPublishEvent });
1740
1740
  });
1741
- it('handleVibeIQFile (vibeiqfile) merges outboundPublishEvent into FlexPLM result and calls sendPublishPayloadEvent', async () => {
1741
+ it('should merge outboundPublishEvent into FlexPLM result and call sendPublishPayloadEvent when mode is vibeiqfile', async () => {
1742
1742
  const bppa = new base_process_publish_assortment_1.BaseProcessPublishAssortment(config, dc, mapFileUtil);
1743
1743
  const flexResponse = { status: 200, data: { ok: true } };
1744
1744
  const spyFlex = jest.spyOn(flexplm_connect_1.FlexPLMConnect.prototype, 'sendToFlexPLM')
@@ -1761,7 +1761,7 @@ describe('sendToFlexPLM / handleVibeIQFile / sendPublishPayloadEvent', () => {
1761
1761
  expect(spyEvent).toHaveBeenCalledWith(passedOutboundPublishEvent);
1762
1762
  expect(result).toEqual({ ...flexResponse, outboundPublishEvent: passedOutboundPublishEvent });
1763
1763
  });
1764
- it('handleVibeIQFile (vibeiqfile-dontsendtoflexplm) skips FlexPLM but still calls sendPublishPayloadEvent', async () => {
1764
+ it('should skip FlexPLM but still call sendPublishPayloadEvent when mode is vibeiqfile-dontsendtoflexplm', async () => {
1765
1765
  const bppa = new base_process_publish_assortment_1.BaseProcessPublishAssortment(config, dc, mapFileUtil);
1766
1766
  const spyFlex = jest.spyOn(flexplm_connect_1.FlexPLMConnect.prototype, 'sendToFlexPLM')
1767
1767
  .mockResolvedValue({});
@@ -1777,7 +1777,7 @@ describe('sendToFlexPLM / handleVibeIQFile / sendPublishPayloadEvent', () => {
1777
1777
  outboundPublishEvent: passedOutboundPublishEvent
1778
1778
  });
1779
1779
  });
1780
- it('sendPublishPayloadEvent creates an external-event with initialEvent parsed from config', async () => {
1780
+ it('should create an external-event with initialEvent parsed from config', async () => {
1781
1781
  const bppa = new base_process_publish_assortment_1.BaseProcessPublishAssortment(config, dc, mapFileUtil);
1782
1782
  const outboundPublishEvent = { foo: 'bar' };
1783
1783
  await bppa.sendPublishPayloadEvent(outboundPublishEvent);
@@ -1791,7 +1791,7 @@ describe('sendToFlexPLM / handleVibeIQFile / sendPublishPayloadEvent', () => {
1791
1791
  }
1792
1792
  });
1793
1793
  });
1794
- it('sendPublishPayloadEvent defaults initialEvent to {} when config has no event', async () => {
1794
+ it('should default initialEvent to {} when config has no event', async () => {
1795
1795
  const bareConfig = { taskId: 'task-x' };
1796
1796
  const bppa = new base_process_publish_assortment_1.BaseProcessPublishAssortment(bareConfig, dc, mapFileUtil);
1797
1797
  const outboundPublishEvent = { hello: 'world' };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrail/flexplm",
3
- "version": "1.5.1-alpha.64caad7",
3
+ "version": "1.5.1-alpha.8727255",
4
4
  "description": "Library used for integration with flexplm.",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -2033,7 +2033,7 @@ describe('sendToFlexPLM / handleVibeIQFile / sendPublishPayloadEvent', () => {
2033
2033
  jest.restoreAllMocks();
2034
2034
  });
2035
2035
 
2036
- it('sendToFlexPLM merges outboundPublishEvent into result and calls sendPublishPayloadEvent in parallel', async () => {
2036
+ it('should merge outboundPublishEvent into result and call sendPublishPayloadEvent in parallel', async () => {
2037
2037
  const bppa = new BaseProcessPublishAssortment(config, dc, mapFileUtil);
2038
2038
  const flexResponse = { status: 200, data: { ok: true } };
2039
2039
 
@@ -2067,7 +2067,7 @@ describe('sendToFlexPLM / handleVibeIQFile / sendPublishPayloadEvent', () => {
2067
2067
  expect(result).toEqual({ ...flexResponse, outboundPublishEvent: passedOutboundPublishEvent });
2068
2068
  });
2069
2069
 
2070
- it('handleVibeIQFile (vibeiqfile) merges outboundPublishEvent into FlexPLM result and calls sendPublishPayloadEvent', async () => {
2070
+ it('should merge outboundPublishEvent into FlexPLM result and call sendPublishPayloadEvent when mode is vibeiqfile', async () => {
2071
2071
  const bppa = new BaseProcessPublishAssortment(config, dc, mapFileUtil);
2072
2072
  const flexResponse = { status: 200, data: { ok: true } };
2073
2073
 
@@ -2096,7 +2096,7 @@ describe('sendToFlexPLM / handleVibeIQFile / sendPublishPayloadEvent', () => {
2096
2096
  expect(result).toEqual({ ...flexResponse, outboundPublishEvent: passedOutboundPublishEvent });
2097
2097
  });
2098
2098
 
2099
- it('handleVibeIQFile (vibeiqfile-dontsendtoflexplm) skips FlexPLM but still calls sendPublishPayloadEvent', async () => {
2099
+ it('should skip FlexPLM but still call sendPublishPayloadEvent when mode is vibeiqfile-dontsendtoflexplm', async () => {
2100
2100
  const bppa = new BaseProcessPublishAssortment(config, dc, mapFileUtil);
2101
2101
 
2102
2102
  const spyFlex = jest.spyOn(FlexPLMConnect.prototype, 'sendToFlexPLM')
@@ -2117,7 +2117,7 @@ describe('sendToFlexPLM / handleVibeIQFile / sendPublishPayloadEvent', () => {
2117
2117
  });
2118
2118
  });
2119
2119
 
2120
- it('sendPublishPayloadEvent creates an external-event with initialEvent parsed from config', async () => {
2120
+ it('should create an external-event with initialEvent parsed from config', async () => {
2121
2121
  const bppa = new BaseProcessPublishAssortment(config, dc, mapFileUtil);
2122
2122
  const outboundPublishEvent = { foo: 'bar' };
2123
2123
 
@@ -2134,7 +2134,7 @@ describe('sendToFlexPLM / handleVibeIQFile / sendPublishPayloadEvent', () => {
2134
2134
  });
2135
2135
  });
2136
2136
 
2137
- it('sendPublishPayloadEvent defaults initialEvent to {} when config has no event', async () => {
2137
+ it('should default initialEvent to {} when config has no event', async () => {
2138
2138
  const bareConfig = { taskId: 'task-x' } as unknown as FCConfig;
2139
2139
  const bppa = new BaseProcessPublishAssortment(bareConfig, dc, mapFileUtil);
2140
2140
  const outboundPublishEvent = { hello: 'world' };
@@ -772,7 +772,7 @@ export class BaseProcessPublishAssortment {
772
772
  }
773
773
  }
774
774
 
775
- private async sendPublishPayloadEvent(outboundPublishEvent: any){
775
+ private async sendPublishPayloadEvent(outboundPublishEvent: AsyncEventsPayloadType){
776
776
  console.info('sendPublishPayloadEvent()');
777
777
  let initialEvent = {};
778
778
  if (this.config?.event){