@datastax/astra-db-ts
Advanced tools
Comparing version 1.0.0-alpha.1 to 1.0.0-alpha.2
@@ -16,4 +16,17 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.DEFAULT_DATA_API_PATH = exports.DEFAULT_DEVOPS_API_ENDPOINT = exports.DEFAULT_DEVOPS_API_AUTH_HEADER = exports.DEFAULT_DATA_API_AUTH_HEADER = exports.DEFAULT_TIMEOUT = exports.DEFAULT_NAMESPACE = exports.HttpMethods = exports.CLIENT_USER_AGENT = void 0; | ||
exports.DEFAULT_DATA_API_PATH = exports.DEFAULT_DEVOPS_API_ENDPOINT = exports.DEFAULT_DEVOPS_API_AUTH_HEADER = exports.DEFAULT_DATA_API_AUTH_HEADER = exports.DEFAULT_TIMEOUT = exports.DEFAULT_NAMESPACE = exports.HttpMethods = exports.CLIENT_USER_AGENT = exports.RAG_STACK_REQUESTED_WITH = void 0; | ||
const version_1 = require("../version"); | ||
exports.RAG_STACK_REQUESTED_WITH = (() => { | ||
try { | ||
// eslint-disable-next-line @typescript-eslint/no-var-requires | ||
const lib = require('ragstack-ai'); | ||
if (!lib['LIB_NAME'] || !lib['LIB_VERSION']) { | ||
return ''; | ||
} | ||
return lib['LIB_NAME'] + '/' + lib['LIB_VERSION']; | ||
} | ||
catch (e) { | ||
return ''; | ||
} | ||
})(); | ||
/** | ||
@@ -20,0 +33,0 @@ * @internal |
@@ -16,2 +16,14 @@ "use strict"; | ||
// noinspection ExceptionCaughtLocallyJS | ||
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { | ||
if (kind === "m") throw new TypeError("Private method is not writable"); | ||
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); | ||
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); | ||
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; | ||
}; | ||
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { | ||
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); | ||
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); | ||
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); | ||
}; | ||
var _DataAPIHttpClient_props; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -28,4 +40,11 @@ exports.reviver = exports.replacer = exports.DataAPIHttpClient = void 0; | ||
class DataAPIHttpClient extends api_1.HttpClient { | ||
constructor() { | ||
super(...arguments); | ||
constructor(props) { | ||
super({ | ||
...props, | ||
mkAuthHeader: (token) => ({ [api_1.DEFAULT_DATA_API_AUTH_HEADER]: token }), | ||
fetchCtx: { | ||
preferred: props.fetchCtx.preferred, | ||
closed: props.fetchCtx.closed, | ||
}, | ||
}); | ||
Object.defineProperty(this, "collection", { | ||
@@ -43,3 +62,12 @@ enumerable: true, | ||
}); | ||
_DataAPIHttpClient_props.set(this, void 0); | ||
this.namespace = props.namespace; | ||
__classPrivateFieldSet(this, _DataAPIHttpClient_props, props, "f"); | ||
} | ||
withCollection(namespace, collection) { | ||
const clone = new DataAPIHttpClient(__classPrivateFieldGet(this, _DataAPIHttpClient_props, "f")); | ||
clone.collection = collection; | ||
clone.namespace = namespace; | ||
return clone; | ||
} | ||
timeoutManager(timeoutMs) { | ||
@@ -113,2 +141,3 @@ return mkTimeoutManager(timeoutMs); | ||
exports.DataAPIHttpClient = DataAPIHttpClient; | ||
_DataAPIHttpClient_props = new WeakMap(); | ||
const mkTimeoutManager = (maxMs) => { | ||
@@ -115,0 +144,0 @@ const timeout = maxMs ?? api_1.DEFAULT_TIMEOUT; |
@@ -15,7 +15,6 @@ "use strict"; | ||
// limitations under the License. | ||
// noinspection ExceptionCaughtLocallyJS | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.DevOpsAPIHttpClient = void 0; | ||
const http_client_1 = require("../api/http-client"); | ||
const axios_1 = require("axios"); | ||
const http1_1 = require("../api/http1"); | ||
const errors_1 = require("../devops/errors"); | ||
@@ -30,4 +29,10 @@ const timeout_managers_1 = require("../api/timeout-managers"); | ||
constructor(props) { | ||
super(props); | ||
this.requestStrategy = new http1_1.HTTP1Strategy(http1_1.HTTP1AuthHeaderFactories.DevOpsAPI); | ||
super({ | ||
...props, | ||
mkAuthHeader: (token) => ({ [constants_1.DEFAULT_DEVOPS_API_AUTH_HEADER]: `Bearer ${token}` }), | ||
fetchCtx: { | ||
preferred: props.fetchCtx.http1, | ||
closed: props.fetchCtx.closed, | ||
} | ||
}); | ||
} | ||
@@ -47,5 +52,8 @@ async request(req, options, started = 0) { | ||
params: req.params, | ||
data: req.data, | ||
data: JSON.stringify(req.data), | ||
timeoutManager, | ||
}); | ||
if (resp.status >= 400) { | ||
throw new errors_1.DevOpsAPIResponseError(resp); | ||
} | ||
if (this.monitorCommands && !isLongRunning) { | ||
@@ -63,6 +71,3 @@ this.emitter.emit('adminCommandSucceeded', new devops_1.AdminCommandSucceededEvent(req, false, resp, started)); | ||
} | ||
if (!(e instanceof axios_1.AxiosError)) { | ||
throw e; | ||
} | ||
throw new errors_1.DevOpsAPIResponseError(e); | ||
throw e; | ||
} | ||
@@ -69,0 +74,0 @@ } |
@@ -28,6 +28,5 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.hrTimeMs = exports.HttpClient = void 0; | ||
exports.buildUserAgent = exports.hrTimeMs = exports.HttpClient = void 0; | ||
const constants_1 = require("../api/constants"); | ||
const http1_1 = require("../api/http1"); | ||
const http2_1 = require("../api/http2"); | ||
const fetch_h2_1 = require("fetch-h2"); | ||
/** | ||
@@ -44,3 +43,3 @@ * @internal | ||
}); | ||
Object.defineProperty(this, "userAgent", { | ||
Object.defineProperty(this, "emitter", { | ||
enumerable: true, | ||
@@ -51,3 +50,3 @@ configurable: true, | ||
}); | ||
Object.defineProperty(this, "requestStrategy", { | ||
Object.defineProperty(this, "monitorCommands", { | ||
enumerable: true, | ||
@@ -58,3 +57,3 @@ configurable: true, | ||
}); | ||
Object.defineProperty(this, "emitter", { | ||
Object.defineProperty(this, "fetchCtx", { | ||
enumerable: true, | ||
@@ -65,3 +64,4 @@ configurable: true, | ||
}); | ||
Object.defineProperty(this, "monitorCommands", { | ||
_HttpClient_applicationToken.set(this, void 0); | ||
Object.defineProperty(this, "baseHeaders", { | ||
enumerable: true, | ||
@@ -72,3 +72,2 @@ configurable: true, | ||
}); | ||
_HttpClient_applicationToken.set(this, void 0); | ||
__classPrivateFieldSet(this, _HttpClient_applicationToken, options.applicationToken, "f"); | ||
@@ -78,37 +77,8 @@ this.baseUrl = options.baseUrl; | ||
this.monitorCommands = options.monitorCommands; | ||
this.requestStrategy = | ||
(options.requestStrategy) | ||
? options.requestStrategy : | ||
(options.useHttp2 !== false) | ||
? new http2_1.HTTP2Strategy(this.baseUrl) | ||
: new http1_1.HTTP1Strategy(http1_1.HTTP1AuthHeaderFactories.DataAPI); | ||
this.fetchCtx = options.fetchCtx; | ||
if (options.baseApiPath) { | ||
this.baseUrl += '/' + options.baseApiPath; | ||
} | ||
this.userAgent = options.userAgent ?? buildUserAgent(constants_1.CLIENT_USER_AGENT, options.caller); | ||
this.baseHeaders = options.mkAuthHeader?.(__classPrivateFieldGet(this, _HttpClient_applicationToken, "f")) ?? {}; | ||
} | ||
close() { | ||
this.requestStrategy.close?.(); | ||
} | ||
isClosed() { | ||
return this.requestStrategy.closed; | ||
} | ||
isUsingHttp2() { | ||
return this.requestStrategy instanceof http2_1.HTTP2Strategy; | ||
} | ||
cloneInto(cls, initialize) { | ||
const clone = new cls({ | ||
baseUrl: this.baseUrl, | ||
applicationToken: __classPrivateFieldGet(this, _HttpClient_applicationToken, "f"), | ||
requestStrategy: this.requestStrategy, | ||
userAgent: this.userAgent, | ||
emitter: this.emitter, | ||
monitorCommands: this.monitorCommands, | ||
}); | ||
initialize(clone); | ||
return clone; | ||
} | ||
set applicationToken(token) { | ||
__classPrivateFieldSet(this, _HttpClient_applicationToken, token, "f"); | ||
} | ||
get applicationToken() { | ||
@@ -118,16 +88,33 @@ return __classPrivateFieldGet(this, _HttpClient_applicationToken, "f"); | ||
async _request(info) { | ||
const fullInfo = { | ||
url: info.url, | ||
data: info.data, | ||
method: info.method, | ||
params: info.params ?? {}, | ||
token: __classPrivateFieldGet(this, _HttpClient_applicationToken, "f"), | ||
userAgent: this.userAgent, | ||
timeoutManager: info.timeoutManager, | ||
reviver: info.reviver, | ||
}; | ||
if (this.fetchCtx.closed.ref) { | ||
throw new Error('Can\'t make requests on a closed client'); | ||
} | ||
if (info.timeoutManager.msRemaining <= 0) { | ||
throw info.timeoutManager.mkTimeoutError(fullInfo); | ||
throw info.timeoutManager.mkTimeoutError(info); | ||
} | ||
return await this.requestStrategy.request(fullInfo); | ||
const params = info.params ?? {}; | ||
Object.keys(params).forEach(key => params[key] === undefined && delete params[key]); | ||
const url = (Object.keys(params).length > 0) | ||
? `${info.url}?${new URLSearchParams(params).toString()}` | ||
: info.url; | ||
try { | ||
const resp = await this.fetchCtx.preferred.fetch(url, { | ||
body: info.data, | ||
method: info.method, | ||
timeout: info.timeoutManager.msRemaining, | ||
headers: this.baseHeaders, | ||
}); | ||
const respBody = await resp.text(); | ||
return { | ||
data: respBody ? JSON.parse(respBody, info.reviver) : undefined, | ||
headers: resp.headers, | ||
status: resp.status, | ||
}; | ||
} | ||
catch (e) { | ||
if (e instanceof fetch_h2_1.TimeoutError) { | ||
throw info.timeoutManager.mkTimeoutError(info); | ||
} | ||
throw e; | ||
} | ||
} | ||
@@ -145,3 +132,3 @@ } | ||
exports.hrTimeMs = hrTimeMs; | ||
function buildUserAgent(client, caller) { | ||
function buildUserAgent(caller) { | ||
const callers = ((!caller) | ||
@@ -155,4 +142,5 @@ ? [] : | ||
}).join(' '); | ||
return `${callerString} ${client}`.trim(); | ||
return `${constants_1.RAG_STACK_REQUESTED_WITH} ${callerString} ${constants_1.CLIENT_USER_AGENT}`.trim(); | ||
} | ||
exports.buildUserAgent = buildUserAgent; | ||
//# sourceMappingURL=http-client.js.map |
@@ -30,4 +30,2 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__exportStar(require("./http1"), exports); | ||
__exportStar(require("./http2"), exports); | ||
__exportStar(require("./http-client"), exports); | ||
@@ -34,0 +32,0 @@ __exportStar(require("./data-api-http-client"), exports); |
@@ -50,3 +50,3 @@ "use strict"; | ||
}); | ||
this.ms = ms || Infinity; | ||
this.ms = ms || 2147483647; | ||
this._started = false; | ||
@@ -53,0 +53,0 @@ } |
@@ -36,2 +36,4 @@ "use strict"; | ||
const utils_1 = require("../data-api/utils"); | ||
const fetch_h2_1 = require("fetch-h2"); | ||
const api_1 = require("../api"); | ||
/** | ||
@@ -86,4 +88,23 @@ * The base class for the {@link DataAPIClient} event emitter to make it properly typed. Should probably never need | ||
validateRootOpts(options); | ||
const baseCtxOptions = { | ||
userAgent: (0, api_1.buildUserAgent)(options?.caller), | ||
overwriteUserAgent: true, | ||
}; | ||
const http1Ctx = (0, fetch_h2_1.context)({ | ||
...baseCtxOptions, | ||
httpsProtocols: ['http1'], | ||
}); | ||
const preferredCtx = (options?.preferHttp2 !== false) | ||
? (0, fetch_h2_1.context)(baseCtxOptions) | ||
: http1Ctx; | ||
__classPrivateFieldSet(this, _DataAPIClient_options, { | ||
...options, | ||
fetchCtx: { | ||
http1: http1Ctx, | ||
preferred: preferredCtx, | ||
preferredType: (options?.preferHttp2 !== false) | ||
? 'http2' | ||
: 'http1', | ||
closed: { ref: false }, | ||
}, | ||
dbOptions: { | ||
@@ -130,2 +151,18 @@ monitorCommands: false, | ||
} | ||
/** | ||
* Closes the client and disconnects all underlying connections. This should be called when the client is no longer | ||
* needed to free up resources. | ||
* | ||
* The client will be no longer usable after this method is called. | ||
* | ||
* @remarks | ||
* This method is idempotent and can be called multiple times without issue. | ||
* | ||
* @returns A promise that resolves when the client has been closed. | ||
*/ | ||
async close() { | ||
__classPrivateFieldGet(this, _DataAPIClient_options, "f").fetchCtx.closed.ref = true; | ||
await __classPrivateFieldGet(this, _DataAPIClient_options, "f").fetchCtx.preferred.disconnectAll(); | ||
await __classPrivateFieldGet(this, _DataAPIClient_options, "f").fetchCtx.http1.disconnectAll(); | ||
} | ||
} | ||
@@ -140,2 +177,3 @@ exports.DataAPIClient = DataAPIClient; | ||
(0, utils_1.validateOption)('caller', opts.caller, 'object', validateCaller); | ||
(0, utils_1.validateOption)('preferHttp2 option', opts.preferHttp2, 'boolean'); | ||
(0, db_1.validateDbOpts)(opts.dbOptions); | ||
@@ -142,0 +180,0 @@ (0, astra_admin_1.validateAdminOpts)(opts.adminOptions); |
@@ -32,3 +32,2 @@ "use strict"; | ||
__exportStar(require("./data-api-client"), exports); | ||
__exportStar(require("./types"), exports); | ||
//# sourceMappingURL=index.js.map |
@@ -24,3 +24,2 @@ "use strict"; | ||
const object_hash_1 = __importDefault(require("object-hash")); | ||
const api_1 = require("../api"); | ||
const types_1 = require("../data-api/types"); | ||
@@ -96,6 +95,3 @@ /** | ||
Object.defineProperty(this, '_httpClient', { | ||
value: httpClient.cloneInto(api_1.DataAPIHttpClient, c => { | ||
c.collection = this.collectionName; | ||
c.namespace = this.namespace; | ||
}), | ||
value: httpClient.withCollection(this.namespace, this.collectionName), | ||
enumerable: false, | ||
@@ -102,0 +98,0 @@ }); |
@@ -135,10 +135,9 @@ "use strict"; | ||
baseApiPath: dbOpts?.dataApiPath || api_1.DEFAULT_DATA_API_PATH, | ||
caller: options.caller, | ||
useHttp2: dbOpts.useHttp2, | ||
emitter: options.emitter, | ||
monitorCommands: dbOpts.monitorCommands, | ||
fetchCtx: options.fetchCtx, | ||
namespace: this.namespace, | ||
}), | ||
enumerable: false, | ||
}); | ||
this._httpClient.namespace = this.namespace; | ||
Object.defineProperty(this, '_id', { | ||
@@ -188,3 +187,3 @@ value: (0, utils_1.extractDbIdFromUrl)(endpoint), | ||
} | ||
return (0, astra_db_admin_1.mkDbAdmin)(this, this._httpClient, __classPrivateFieldGet(this, _Db_defaultOpts, "f"), options); | ||
return (0, astra_db_admin_1.mkDbAdmin)(this, __classPrivateFieldGet(this, _Db_defaultOpts, "f"), options); | ||
} | ||
@@ -423,43 +422,5 @@ /** | ||
} | ||
/** | ||
* @returns the request strategy used by the underlying HTTP client. | ||
*/ | ||
httpStrategy() { | ||
return this._httpClient.isUsingHttp2() | ||
? 'http2' | ||
: 'http1'; | ||
} | ||
/** | ||
* Returns if the underlying HTTP/2 session was explicitly closed by the {@link Db.close} method (or through ERM with | ||
* the `using` clause). | ||
* | ||
* If the client's using HTTP/1, this method will return `undefined`. | ||
* | ||
* @returns whether the client was explicitly closed if using HTTP/2. | ||
*/ | ||
isClosed() { | ||
return this._httpClient.isClosed(); | ||
} | ||
/** | ||
* Closes the underlying HTTP/2 session, if the client is using HTTP/2. Closing the session will prevent any further | ||
* requests from being made from this Db instance. | ||
* | ||
* This method is idempotent. If the client is using HTTP/1, this method will do nothing. | ||
*/ | ||
close() { | ||
this._httpClient.close(); | ||
} | ||
/** | ||
* Closes the underlying HTTP/2 session, if the client is using HTTP/2. Closing the session will prevent any further | ||
* requests from being made from this Db instance. | ||
* | ||
* This method is idempotent. If the client is using HTTP/1, this method will do nothing. | ||
* | ||
* Meant for usage with the `using` clause in ERM (Explicit Resource Management). | ||
*/ | ||
[(_Db_defaultOpts = new WeakMap(), Symbol.dispose)]() { | ||
this.close(); | ||
} | ||
} | ||
exports.Db = Db; | ||
_Db_defaultOpts = new WeakMap(); | ||
/** | ||
@@ -501,5 +462,5 @@ * @internal | ||
(0, utils_1.validateOption)('dataApiPath option', opts.dataApiPath, 'string'); | ||
(0, utils_1.validateOption)('useHttp2 option', opts.useHttp2, 'boolean'); | ||
// validateOption('useHttp2 option', opts.useHttp2, 'boolean'); | ||
} | ||
exports.validateDbOpts = validateDbOpts; | ||
//# sourceMappingURL=db.js.map |
@@ -65,5 +65,5 @@ "use strict"; | ||
applicationToken: adminOpts.adminToken, | ||
caller: options.caller, | ||
monitorCommands: adminOpts.monitorCommands, | ||
emitter: options.emitter, | ||
fetchCtx: options.fetchCtx, | ||
}), | ||
@@ -184,3 +184,3 @@ enumerable: false, | ||
}, { | ||
id: (resp) => resp.headers.location, | ||
id: (resp) => resp.headers.get('location'), | ||
target: 'ACTIVE', | ||
@@ -191,3 +191,3 @@ legalStates: ['INITIALIZING', 'PENDING'], | ||
}); | ||
const db = (0, db_1.mkDb)(__classPrivateFieldGet(this, _AstraAdmin_defaultOpts, "f"), resp.headers.location, definition.region, { ...options?.dbOptions, namespace: definition.keyspace }); | ||
const db = (0, db_1.mkDb)(__classPrivateFieldGet(this, _AstraAdmin_defaultOpts, "f"), resp.headers.get('location'), definition.region, { ...options?.dbOptions, namespace: definition.keyspace }); | ||
return db.admin(__classPrivateFieldGet(this, _AstraAdmin_defaultOpts, "f").adminOptions); | ||
@@ -194,0 +194,0 @@ } |
@@ -39,3 +39,3 @@ "use strict"; | ||
*/ | ||
constructor(_db, httpClient, options) { | ||
constructor(_db, options) { | ||
super(); | ||
@@ -54,6 +54,10 @@ Object.defineProperty(this, "_httpClient", { | ||
}); | ||
const adminOpts = options.adminOptions; | ||
Object.defineProperty(this, '_httpClient', { | ||
value: httpClient.cloneInto(api_1.DevOpsAPIHttpClient, (c) => { | ||
c.baseUrl = options.endpointUrl ?? api_1.DEFAULT_DEVOPS_API_ENDPOINT; | ||
c.monitorCommands = options.monitorCommands; | ||
value: new api_1.DevOpsAPIHttpClient({ | ||
baseUrl: adminOpts.endpointUrl ?? api_1.DEFAULT_DEVOPS_API_ENDPOINT, | ||
applicationToken: adminOpts.adminToken, | ||
monitorCommands: adminOpts.monitorCommands, | ||
fetchCtx: options.fetchCtx, | ||
emitter: options.emitter, | ||
}), | ||
@@ -66,5 +70,2 @@ enumerable: false, | ||
}); | ||
if (options.adminToken) { | ||
this._httpClient.applicationToken = options.adminToken; | ||
} | ||
} | ||
@@ -264,7 +265,10 @@ /** | ||
*/ | ||
function mkDbAdmin(db, httpClient, rootOpts, options) { | ||
function mkDbAdmin(db, rootOpts, options) { | ||
(0, astra_admin_1.validateAdminOpts)(options); | ||
return new AstraDbAdmin(db, httpClient, { | ||
...rootOpts.adminOptions, | ||
...options, | ||
return new AstraDbAdmin(db, { | ||
...rootOpts, | ||
adminOptions: { | ||
...rootOpts.adminOptions, | ||
...options, | ||
}, | ||
}); | ||
@@ -271,0 +275,0 @@ } |
@@ -86,4 +86,5 @@ "use strict"; | ||
*/ | ||
constructor(error) { | ||
super(error.response?.data.errors[0]?.message ?? error.message); | ||
constructor(resp) { | ||
const message = resp.data?.errors?.find(e => e.message)?.message ?? 'Something went wrong'; | ||
super(message); | ||
/** | ||
@@ -107,4 +108,4 @@ * The error descriptors returned by the API to describe what went wrong. | ||
}); | ||
this.errors = extractErrorDescriptors(error); | ||
this.status = error.response?.status; | ||
this.errors = extractErrorDescriptors(resp); | ||
this.status = resp.status; | ||
this.name = 'DevOpsAPIResponseError'; | ||
@@ -155,4 +156,4 @@ } | ||
exports.DevOpsUnexpectedStateError = DevOpsUnexpectedStateError; | ||
function extractErrorDescriptors(error) { | ||
const errors = error.response?.data.errors || []; | ||
function extractErrorDescriptors(resp) { | ||
const errors = resp.data?.errors || []; | ||
return errors.map((e) => ({ | ||
@@ -159,0 +160,0 @@ id: e.ID, |
@@ -5,3 +5,3 @@ "use strict"; | ||
exports.LIB_NAME = 'astra-db-ts'; | ||
exports.LIB_VERSION = "1.0.0-alpha.1"; | ||
exports.LIB_VERSION = "1.0.0-alpha.2"; | ||
//# sourceMappingURL=version.js.map |
{ | ||
"name": "@datastax/astra-db-ts", | ||
"version": "1.0.0-alpha.1", | ||
"version": "1.0.0-alpha.2", | ||
"description": "Astra DB TS Client", | ||
@@ -54,2 +54,3 @@ "contributors": [ | ||
"test:all": "env ASTRA_RUN_LONG_TESTS=1 ASTRA_RUN_ADMIN_TESTS=1 ts-mocha --paths -p tsconfig.json tests/unit/**/*.test.ts tests/integration/**/*.test.ts tests/integration/**/**/*.test.ts", | ||
"test:prerelease": "npm run test:all -- -b --exit", | ||
"test:coverage": "nyc npm run test:all -- -b", | ||
@@ -65,19 +66,10 @@ "test:types": "tsc --noEmit --skipLibCheck", | ||
"devDependencies": { | ||
"@babel/cli": "^7.17.10", | ||
"@babel/core": "^7.18.2", | ||
"@babel/plugin-proposal-class-properties": "^7.17.12", | ||
"@babel/plugin-proposal-object-rest-spread": "^7.18.0", | ||
"@babel/preset-env": "^7.18.2", | ||
"@babel/preset-typescript": "^7.17.12", | ||
"@microsoft/api-extractor": "^7.43.0", | ||
"@types/expect": "^24.3.0", | ||
"@types/mocha": "^9.1.1", | ||
"@types/node": "^17.0.36", | ||
"@types/object-hash": "^3.0.6", | ||
"@types/sinon": "10.0.15", | ||
"@typescript-eslint/eslint-plugin": "^7.0.2", | ||
"@typescript-eslint/parser": "^7.0.2", | ||
"@typescript-eslint/eslint-plugin": "^7.6.0", | ||
"@typescript-eslint/parser": "^7.6.0", | ||
"dotenv": "^16.0.1", | ||
"eslint": "^8.56.0", | ||
"jsdoc-babel": "^0.5.0", | ||
"eslint": "^8.57.0", | ||
"nyc": "^15.1.0", | ||
@@ -89,4 +81,4 @@ "ts-mocha": "^10.0.0", | ||
"dependencies": { | ||
"axios": "^1.6.7", | ||
"bson-objectid": "^2.0.4", | ||
"fetch-h2": "^3.0.2", | ||
"object-hash": "^3.0.0", | ||
@@ -93,0 +85,0 @@ "typed-emitter": "^2.1.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 2 instances in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
12
0
564755
127
12124
+ Addedfetch-h2@^3.0.2
+ Added@types/tough-cookie@4.0.5(transitive)
+ Addedalready@2.2.1(transitive)
+ Addedcallguard@2.0.0(transitive)
+ Addedfetch-h2@3.0.2(transitive)
+ Addedget-stream@6.0.1(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedpsl@1.13.0(transitive)
+ Addedpunycode@2.3.1(transitive)
+ Addedquerystringify@2.2.0(transitive)
+ Addedreadable-stream@3.6.2(transitive)
+ Addedrequires-port@1.0.0(transitive)
+ Addedsafe-buffer@5.2.1(transitive)
+ Addedstring_decoder@1.3.0(transitive)
+ Addedthrough2@4.0.2(transitive)
+ Addedto-arraybuffer@1.0.1(transitive)
+ Addedtough-cookie@4.1.4(transitive)
+ Addeduniversalify@0.2.0(transitive)
+ Addedurl-parse@1.5.10(transitive)
+ Addedutil-deprecate@1.0.2(transitive)
- Removedaxios@^1.6.7
- Removedasynckit@0.4.0(transitive)
- Removedaxios@1.7.7(transitive)
- Removedcombined-stream@1.0.8(transitive)
- Removeddelayed-stream@1.0.0(transitive)
- Removedfollow-redirects@1.15.9(transitive)
- Removedform-data@4.0.1(transitive)
- Removedmime-db@1.52.0(transitive)
- Removedmime-types@2.1.35(transitive)
- Removedproxy-from-env@1.1.0(transitive)