Compare commits
No commits in common. "95112d3f31e1fd0b0311a52291bcd49f61b27045" and "cc36f7c1bd420d23e8c8ba5d12e90a41e27b68a2" have entirely different histories.
95112d3f31
...
cc36f7c1bd
3
index.d.ts
vendored
3
index.d.ts
vendored
@ -31,14 +31,11 @@ export default class SecureFile {
|
|||||||
history(id: string): Promise<History>;
|
history(id: string): Promise<History>;
|
||||||
}
|
}
|
||||||
export declare class Unauthorized extends Error {
|
export declare class Unauthorized extends Error {
|
||||||
type: string;
|
|
||||||
constructor();
|
constructor();
|
||||||
}
|
}
|
||||||
export declare class NotFound extends Error {
|
export declare class NotFound extends Error {
|
||||||
type: string;
|
|
||||||
constructor();
|
constructor();
|
||||||
}
|
}
|
||||||
export declare class BadRequest extends Error {
|
export declare class BadRequest extends Error {
|
||||||
type: string;
|
|
||||||
constructor();
|
constructor();
|
||||||
}
|
}
|
||||||
|
12
index.js
12
index.js
@ -270,9 +270,7 @@ exports.default = SecureFile;
|
|||||||
var Unauthorized = /** @class */ (function (_super) {
|
var Unauthorized = /** @class */ (function (_super) {
|
||||||
__extends(Unauthorized, _super);
|
__extends(Unauthorized, _super);
|
||||||
function Unauthorized() {
|
function Unauthorized() {
|
||||||
var _this = _super.call(this, "Not authorized") || this;
|
return _super.call(this, "Not authorized") || this;
|
||||||
_this.type = "unauthorized";
|
|
||||||
return _this;
|
|
||||||
}
|
}
|
||||||
return Unauthorized;
|
return Unauthorized;
|
||||||
}(Error));
|
}(Error));
|
||||||
@ -280,9 +278,7 @@ exports.Unauthorized = Unauthorized;
|
|||||||
var NotFound = /** @class */ (function (_super) {
|
var NotFound = /** @class */ (function (_super) {
|
||||||
__extends(NotFound, _super);
|
__extends(NotFound, _super);
|
||||||
function NotFound() {
|
function NotFound() {
|
||||||
var _this = _super.call(this, "Not found") || this;
|
return _super.call(this, "Not found") || this;
|
||||||
_this.type = "notfound";
|
|
||||||
return _this;
|
|
||||||
}
|
}
|
||||||
return NotFound;
|
return NotFound;
|
||||||
}(Error));
|
}(Error));
|
||||||
@ -290,9 +286,7 @@ exports.NotFound = NotFound;
|
|||||||
var BadRequest = /** @class */ (function (_super) {
|
var BadRequest = /** @class */ (function (_super) {
|
||||||
__extends(BadRequest, _super);
|
__extends(BadRequest, _super);
|
||||||
function BadRequest() {
|
function BadRequest() {
|
||||||
var _this = _super.call(this, "Bad request") || this;
|
return _super.call(this, "Bad request") || this;
|
||||||
_this.type = "badrequest";
|
|
||||||
return _this;
|
|
||||||
}
|
}
|
||||||
return BadRequest;
|
return BadRequest;
|
||||||
}(Error));
|
}(Error));
|
||||||
|
6
index.ts
6
index.ts
@ -139,26 +139,20 @@ export default class SecureFile {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export class Unauthorized extends Error {
|
export class Unauthorized extends Error {
|
||||||
type: string;
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super("Not authorized");
|
super("Not authorized");
|
||||||
this.type = "unauthorized"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class NotFound extends Error {
|
export class NotFound extends Error {
|
||||||
type: string;
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super("Not found");
|
super("Not found");
|
||||||
this.type = "notfound"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class BadRequest extends Error {
|
export class BadRequest extends Error {
|
||||||
type: string;
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super("Bad request");
|
super("Bad request");
|
||||||
this.type = "badrequest"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "secure-file-wrapper",
|
"name": "secure-file-wrapper",
|
||||||
"version": "1.0.9",
|
"version": "1.0.8",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"author": "Fabian Stamm <dev@fabianstamm.de>",
|
"author": "Fabian Stamm <dev@fabianstamm.de>",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
Reference in New Issue
Block a user