ame-super-app-web
Advanced tools
Comparing version 4.1.0-beta.0 to 4.1.0-beta.1
@@ -9,3 +9,3 @@ import UploadFileInput from "../model/input/UploadFileInput"; | ||
private readonly defaultUploadTimeout; | ||
constructor(); | ||
constructor(enforceSecureHttp?: boolean); | ||
selectFile(file?: any): Promise<SelectFileOutput>; | ||
@@ -12,0 +12,0 @@ uploadFile(params: UploadFileInput): Promise<HttpResponse>; |
@@ -10,5 +10,5 @@ "use strict"; | ||
class FileService { | ||
constructor() { | ||
constructor(enforceSecureHttp) { | ||
this.defaultUploadTimeout = 30 * 1000; | ||
this.httpService = new HttpService_1.default(); | ||
this.httpService = new HttpService_1.default(enforceSecureHttp); | ||
this.selectedFiles = {}; | ||
@@ -15,0 +15,0 @@ } |
@@ -11,7 +11,7 @@ "use strict"; | ||
constructor(ameSuperApp) { | ||
var _a; | ||
var _a, _b; | ||
this.superApp = ameSuperApp; | ||
this.askUserDataCache = new CacheService_1.default(); | ||
this.httpService = new HttpService_1.default((_a = ameSuperApp.context) === null || _a === void 0 ? void 0 : _a.secureHttp); | ||
this.fileService = new FileService_1.default(); | ||
this.fileService = new FileService_1.default((_b = ameSuperApp.context) === null || _b === void 0 ? void 0 : _b.secureHttp); | ||
} | ||
@@ -18,0 +18,0 @@ ctx() { |
@@ -1,2 +0,2 @@ | ||
declare const _default: "4.1.0-beta.0"; | ||
declare const _default: "4.1.0-beta.1"; | ||
export default _default; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = "4.1.0-beta.0"; | ||
exports.default = "4.1.0-beta.1"; | ||
//# sourceMappingURL=version.js.map |
@@ -65,3 +65,16 @@ "use strict"; | ||
})); | ||
test("downloadFile unsecure http block", () => tslib_1.__awaiter(void 0, void 0, void 0, function* () { | ||
const fileService = new FileService_1.default(); | ||
const resSelect = yield fileService.selectFile({ fakeFileContent: "1234" }); | ||
const res = yield fileService | ||
.uploadFile({ | ||
url: "http://localhost:4000/upload", | ||
fileId: resSelect.id, | ||
}) | ||
.catch((e) => e); | ||
expect(res).toBeDefined(); | ||
expect(res).toBeInstanceOf(Error); | ||
expect(res.message).toBe("http.not.allowed"); | ||
})); | ||
}); | ||
//# sourceMappingURL=FileService.test.js.map |
{ | ||
"name": "ame-super-app-web", | ||
"version": "4.1.0-beta.0", | ||
"version": "4.1.0-beta.1", | ||
"_versionBetaExample": "1.0.2-beta.0", | ||
@@ -5,0 +5,0 @@ "__versionBetaExample": "1.0.2-alpha.0", |
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
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
1030995
4418