Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@squiz/dxp-ai-client

Package Overview
Dependencies
Maintainers
50
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@squiz/dxp-ai-client - npm Package Compare versions

Comparing version 0.20.0 to 0.20.1

6

CHANGELOG.md
# @squiz/dxp-ai-client
## 0.20.1
### Patch Changes
- 5ee41b8: Fixed issue where command executor wouldn't reject if outputs from execution could not be fetched.
## 0.20.0

@@ -4,0 +10,0 @@

11

dist/utils/CommandExecutor/AbstractCommandExecutor.js

@@ -15,3 +15,10 @@ "use strict";

setTimeout(async () => {
const result = await fetch();
let result;
try {
result = await fetch();
}
catch (error) {
reject(error);
return;
}
switch (result.status) {

@@ -40,2 +47,2 @@ case 'executing':

exports.AbstractCommandExecutor = AbstractCommandExecutor;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQWJzdHJhY3RDb21tYW5kRXhlY3V0b3IuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvdXRpbHMvQ29tbWFuZEV4ZWN1dG9yL0Fic3RyYWN0Q29tbWFuZEV4ZWN1dG9yLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUdBLE1BQXNCLHVCQUF1QjtJQUl0QjtJQUNBO0lBSmIsTUFBTSxDQUFDLHlCQUF5QixHQUFHLElBQUksQ0FBQztJQUVoRCxZQUNxQixNQUFvQixFQUNwQixVQUFtQyxFQUFFO1FBRHJDLFdBQU0sR0FBTixNQUFNLENBQWM7UUFDcEIsWUFBTyxHQUFQLE9BQU8sQ0FBOEI7SUFDdkQsQ0FBQztJQUlNLEtBQUssQ0FBQywwQkFBMEIsQ0FDeEMsV0FBbUIsRUFDbkIsS0FBdUI7UUFFdkIsT0FBTyxJQUFJLE9BQU8sQ0FBQyxDQUFDLE9BQU8sRUF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HQuc3RhdHVzKSB7XG4gICAgICAgICAgY2FzZSAnZXhlY3V0aW5nJzpcbiAgICAgICAgICBjYXNlICdwZW5kaW5nJzpcbiAgICAgICAgICAgIHJlc29sdmUodGhpcy53YWl0VW50aWxFeGVjdXRpb25Db21wbGV0ZShleGVjdXRpb25JZCwgZmV0Y2gpKTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N1Y2NlZWRlZCc6XG4gICAgICAgICAgICByZXNvbHZlKHJlc3VsdCk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdmYWlsZWQnOlxuICAgICAgICAgICAgcmVqZWN0KG5ldyBFcnJvcihgRXhlY3V0aW9uIHdpdGggSUQgXCIke2V4ZWN1dGlvbklkfVwiIGZhaWxlZC5gKSk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdjYW5jZWxsZWQnOlxuICAgICAgICAgICAgcmVqZWN0KG5ldyBFcnJvcihgRXhlY3V0aW9uIHdpdGggSUQgXCIke2V4ZWN1dGlvbklkfVwiIHdhcyBjYW5jZWxsZWQuYCkpO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgIHJlamVjdChuZXcgRXJyb3IoYEV4ZWN1dGlvbiB3aXRoIElEIFwiJHtleGVjdXRpb25JZH1cIiBoYXMgYW4gdW5leHBlY3RlZCBzdGF0dXMgb2YgXCIke3Jlc3VsdC5zdGF0dXN9XCIuYCkpO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgIH0sIHRoaXMub3B0aW9ucy5wb2xsRnJlcXVlbmN5TXMgfHwgQWJzdHJhY3RDb21tYW5kRXhlY3V0b3IuREVGQVVMVF9QT0xMX0ZSRVFVRU5DWV9NUyk7XG4gICAgfSk7XG4gIH1cbn1cbiJdfQ==
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoi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IGNhc2UgJ3N1Y2NlZWRlZCc6XG4gICAgICAgICAgICByZXNvbHZlKHJlc3VsdCk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdmYWlsZWQnOlxuICAgICAgICAgICAgcmVqZWN0KG5ldyBFcnJvcihgRXhlY3V0aW9uIHdpdGggSUQgXCIke2V4ZWN1dGlvbklkfVwiIGZhaWxlZC5gKSk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdjYW5jZWxsZWQnOlxuICAgICAgICAgICAgcmVqZWN0KG5ldyBFcnJvcihgRXhlY3V0aW9uIHdpdGggSUQgXCIke2V4ZWN1dGlvbklkfVwiIHdhcyBjYW5jZWxsZWQuYCkpO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgIHJlamVjdChuZXcgRXJyb3IoYEV4ZWN1dGlvbiB3aXRoIElEIFwiJHtleGVjdXRpb25JZH1cIiBoYXMgYW4gdW5leHBlY3RlZCBzdGF0dXMgb2YgXCIke3Jlc3VsdC5zdGF0dXN9XCIuYCkpO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgIH0sIHRoaXMub3B0aW9ucy5wb2xsRnJlcXVlbmN5TXMgfHwgQWJzdHJhY3RDb21tYW5kRXhlY3V0b3IuREVGQVVMVF9QT0xMX0ZSRVFVRU5DWV9NUyk7XG4gICAgfSk7XG4gIH1cbn1cbiJdfQ==

@@ -81,4 +81,14 @@ "use strict";

});
it('Throws if fetching the execution outputs fails', async () => {
const aiId = 'mock-ai-id';
const executionId = 'mock-execution-id';
const command = 'processChatMessage';
const inputs = { query: 'space facts' };
const error = new Error('Failed to fetch execution outputs.');
jest.spyOn(client.chatbotExecution, 'execute').mockResolvedValue({ executionId });
jest.spyOn(client.chatbotExecution, 'getExecutionOutput').mockRejectedValue(error);
await expect(commandExecutor.execute(aiId, command, inputs)).rejects.toThrow(error);
});
});
});
//# source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Vycm9yKTtcbiAgICB9KTtcbiAgfSk7XG59KTtcbiJdfQ==

@@ -82,3 +82,13 @@ "use strict";

});
it('Throws if fetching the execution outputs fails', async () => {
const aiId = 'mock-ai-id';
const executionId = 'mock-execution-id';
const command = 'processMessage';
const inputs = { Query: 'space facts' };
const error = new Error('Failed to fetch execution outputs.');
jest.spyOn(client.generative, 'execute').mockResolvedValue({ executionId });
jest.spyOn(client.generative, 'getExecutionOutput').mockRejectedValue(error);
await expect(commandExecutor.execute(aiId, command, inputs)).rejects.toThrow(error);
});
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiR2VuZXJhdGl2ZUNvbW1hbmRFeGVjdXRvci5zcGVjLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3V0aWxzL0NvbW1hbmRFeGVjdXRvci9HZW5lcmF0aXZlQ29tbWFuZEV4ZWN1dG9yLnNwZWMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSwrREFBbUc7QUFDbkcsMkVBQXdFO0FBRXhFLFFBQVEsQ0FBQywyQkFBMkIsRUFBRSxHQUFHLEVBQUU7SUFDekMsSUFBSSxNQUFvQixDQUFDO0lBQ3pCLElBQUksZUFBMEMsQ0FBQztJQUUvQyxVQUFVLENBQUMsR0FBRyxFQUFFO1FBQ2QsTUFBTSxHQUFHLElBQUksa0JBQUcsQ0FBQyxFQUFnQixDQUFDLENBQUM7UUFDbkMsZUFBZSxHQUFHLElBQUkscURBQXlCLENBQUMsTUFBTSxDQUFDLENBQUM7UUFFeEQsSUFBSSxDQUFDLEtBQUssQ0FBQyxNQUFNLEVBQUUsWUFBWSxDQUFDLENBQUMsa0JBQWtCLENBQUMsQ0FBQyxRQUFRLEVBQUUsRUFBRTtZQUMvRCxRQUFRLEVBQUUsQ0FBQztZQUVYLE9BQU8sQ0FBUSxDQUFDO1FBQ2xCLENBQUMsQ0FBQyxDQUFDO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bGVkIHRvIGZldGNoIGV4ZWN1dGlvbiBvdXRwdXRzLicpO1xuXG4gICAgamVzdC5zcHlPbihjbGllbnQuZ2VuZXJhdGl2ZSwgJ2V4ZWN1dGUnKS5tb2NrUmVzb2x2ZWRWYWx1ZSh7IGV4ZWN1dGlvbklkIH0pO1xuICAgIGplc3Quc3B5T24oY2xpZW50LmdlbmVyYXRpdmUsICdnZXRFeGVjdXRpb25PdXRwdXQnKS5tb2NrUmVqZWN0ZWRWYWx1ZShlcnJvcik7XG5cbiAgICBhd2FpdCBleHBlY3QoY29tbWFuZEV4ZWN1dG9yLmV4ZWN1dGUoYWlJZCwgY29tbWFuZCwgaW5wdXRzKSkucmVqZWN0cy50b1Rocm93KGVycm9yKTtcbiAgfSk7XG59KTtcbiJdfQ==

2

package.json

@@ -5,3 +5,3 @@ {

"private": false,
"version": "0.20.0",
"version": "0.20.1",
"description": "Exposes the DXP AI service as a package for consumers",

@@ -8,0 +8,0 @@ "main": "dist/index.js",

@@ -20,4 +20,11 @@ import { Api, ExecutionOutputsResponse } from '../../generated/DxpAiService';

setTimeout(async () => {
const result = await fetch();
let result: T;
try {
result = await fetch();
} catch (error: unknown) {
reject(error);
return;
}
switch (result.status) {

@@ -24,0 +31,0 @@ case 'executing':

@@ -93,3 +93,16 @@ import { Api, FlowsGetExecutionOutputsStatusEnum, HttpClient } from '../../generated/DxpAiService';

);
it('Throws if fetching the execution outputs fails', async () => {
const aiId = 'mock-ai-id';
const executionId = 'mock-execution-id';
const command = 'processChatMessage';
const inputs = { query: 'space facts' };
const error = new Error('Failed to fetch execution outputs.');
jest.spyOn(client.chatbotExecution, 'execute').mockResolvedValue({ executionId });
jest.spyOn(client.chatbotExecution, 'getExecutionOutput').mockRejectedValue(error);
await expect(commandExecutor.execute(aiId, command, inputs)).rejects.toThrow(error);
});
});
});

@@ -94,2 +94,15 @@ import { Api, FlowsGetExecutionOutputsStatusEnum, HttpClient } from '../../generated/DxpAiService';

});
it('Throws if fetching the execution outputs fails', async () => {
const aiId = 'mock-ai-id';
const executionId = 'mock-execution-id';
const command = 'processMessage';
const inputs = { Query: 'space facts' };
const error = new Error('Failed to fetch execution outputs.');
jest.spyOn(client.generative, 'execute').mockResolvedValue({ executionId });
jest.spyOn(client.generative, 'getExecutionOutput').mockRejectedValue(error);
await expect(commandExecutor.execute(aiId, command, inputs)).rejects.toThrow(error);
});
});

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc