@mayahq/maya-db
Advanced tools
Comparing version 0.0.10 to 0.0.11
@@ -6,6 +6,6 @@ import { DatabaseTree, SetQueryOpts, StorageBlock, StorageCollection } from '../../storage/storage'; | ||
apiUrl: string; | ||
auth: any; | ||
constructor({ apiUrl, auth }: { | ||
headers: any; | ||
constructor({ apiUrl, headers }: { | ||
apiUrl: string; | ||
auth: any; | ||
headers: any; | ||
}); | ||
@@ -12,0 +12,0 @@ _executeOperation(op: DbRequest): Promise<import("axios").AxiosResponse<any, any>>; |
@@ -65,5 +65,5 @@ "use strict"; | ||
function HttpIoClient(_a) { | ||
var apiUrl = _a.apiUrl, auth = _a.auth; | ||
var apiUrl = _a.apiUrl, headers = _a.headers; | ||
this.apiUrl = apiUrl; | ||
this.auth = auth; | ||
this.headers = headers; | ||
} | ||
@@ -81,5 +81,3 @@ HttpIoClient.prototype._executeOperation = function (op) { | ||
data: op, | ||
headers: { | ||
Authorization: __assign({}, this.auth) | ||
} | ||
headers: __assign({}, this.headers) | ||
}; | ||
@@ -86,0 +84,0 @@ return [4 /*yield*/, (0, axios_1.default)(request)]; |
@@ -49,3 +49,3 @@ "use strict"; | ||
apiUrl: API_URL, | ||
auth: {} | ||
headers: {} | ||
}); | ||
@@ -493,2 +493,21 @@ var rootCollection = new collection_1.Collection({ | ||
}); }); | ||
test.only('Localization middleware works', function () { return __awaiter(void 0, void 0, void 0, function () { | ||
var authIoClient, col; | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: | ||
authIoClient = new http_1.HttpIoClient({ | ||
apiUrl: API_URL, | ||
headers: { | ||
Authorization: "Bearer ".concat(process.env.MAYA_AUTH_TOKEN) | ||
} | ||
}); | ||
return [4 /*yield*/, authIoClient.createCollection('/httptest/localized')]; | ||
case 1: | ||
col = _a.sent(); | ||
expect(col).toBeTruthy(); | ||
return [2 /*return*/]; | ||
} | ||
}); | ||
}); }); | ||
}); |
import mongoose from 'mongoose'; | ||
export declare const MayaDbBlockSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any>, any, any>; | ||
declare const MayaDbBlock: mongoose.Model<any, {}, {}, {}>; | ||
interface BlockDoc extends mongoose.Document { | ||
path: string; | ||
parentPath: string; | ||
lockAcquiredBy: string; | ||
lockExpiresAt: number; | ||
data: string; | ||
} | ||
export declare const MayaDbBlockSchema: mongoose.Schema<BlockDoc, mongoose.Model<BlockDoc, any, any>, undefined, {}>; | ||
declare const MayaDbBlock: mongoose.Model<BlockDoc, {}, {}>; | ||
export default MayaDbBlock; |
import mongoose from 'mongoose'; | ||
export declare const MayaDbCollectionSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any>, any, any>; | ||
declare const MayaDbCollection: mongoose.Model<any, {}, {}, {}>; | ||
interface CollectionDoc extends mongoose.Document { | ||
path: string; | ||
parentPath: string; | ||
} | ||
export declare const MayaDbCollectionSchema: mongoose.Schema<CollectionDoc, mongoose.Model<CollectionDoc, any, any>, undefined, {}>; | ||
declare const MayaDbCollection: mongoose.Model<CollectionDoc, {}, {}>; | ||
export default MayaDbCollection; |
@@ -49,3 +49,3 @@ "use strict"; | ||
apiUrl: API_URL, | ||
auth: {} | ||
headers: {} | ||
}); | ||
@@ -52,0 +52,0 @@ var rootCollection = new collection_1.Collection({ |
{ | ||
"name": "@mayahq/maya-db", | ||
"version": "0.0.10", | ||
"version": "0.0.11", | ||
"description": "A small, encrypted simple document database meant for client-side use.", | ||
@@ -5,0 +5,0 @@ "main": "lib/src/index.js", |
@@ -30,3 +30,3 @@ { | ||
// "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ | ||
// "strictNullChecks": true, /* Enable strict null checks. */ | ||
"strictNullChecks": false, /* Enable strict null checks. */ | ||
// "strictFunctionTypes": true, /* Enable strict checking of function types. */ | ||
@@ -33,0 +33,0 @@ // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ |
Sorry, the diff of this file is not supported yet
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
247049
4985
9