@nativescript/core 9.1.0-alpha.0 → 9.1.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/application/application.android.d.ts +16 -0
- package/application/application.android.js +6 -1
- package/application/application.android.js.map +1 -1
- package/application/application.d.ts +6 -0
- package/application/application.ios.d.ts +6 -2
- package/application/application.ios.js +104 -12
- package/application/application.ios.js.map +1 -1
- package/globals/index.js +4 -1
- package/globals/index.js.map +1 -1
- package/http/http-interfaces.d.ts +9 -10
- package/http/http-interfaces.js.map +1 -1
- package/http/http-request/http-request-common.d.ts +1 -0
- package/http/http-request/http-request-common.js +8 -0
- package/http/http-request/http-request-common.js.map +1 -1
- package/http/http-request/index.android.d.ts +1 -2
- package/http/http-request/index.android.js +54 -260
- package/http/http-request/index.android.js.map +1 -1
- package/http/http-request/index.d.ts +1 -1
- package/http/http-request/index.ios.d.ts +1 -2
- package/http/http-request/index.ios.js +35 -214
- package/http/http-request/index.ios.js.map +1 -1
- package/http/http-request-internal/http-request-internal-common.d.ts +2 -0
- package/http/http-request-internal/http-request-internal-common.js +12 -0
- package/http/http-request-internal/http-request-internal-common.js.map +1 -0
- package/http/http-request-internal/index.android.d.ts +10 -0
- package/http/http-request-internal/index.android.js +204 -0
- package/http/http-request-internal/index.android.js.map +1 -0
- package/http/http-request-internal/index.d.ts +28 -0
- package/http/http-request-internal/index.ios.d.ts +10 -0
- package/http/http-request-internal/index.ios.js +181 -0
- package/http/http-request-internal/index.ios.js.map +1 -0
- package/http/index.d.ts +1 -1
- package/http/index.js.map +1 -1
- package/image-source/index.android.js +2 -2
- package/image-source/index.android.js.map +1 -1
- package/image-source/index.ios.js +2 -2
- package/image-source/index.ios.js.map +1 -1
- package/package.json +3 -1
- package/platforms/android/widgets-release.aar +0 -0
- package/platforms/ios/src/NativeScriptEmbedder.h +1 -2
- package/platforms/ios/src/NativeScriptEmbedder.m +0 -2
- package/platforms/ios/src/NativeScriptMainWindow.swift +0 -4
- package/platforms/ios/src/NativeScriptUtils.h +0 -2
- package/platforms/ios/src/NativeScriptUtils.m +0 -2
- package/platforms/ios/src/UIView+NativeScript.h +0 -2
- package/platforms/ios/src/UIView+NativeScript.m +0 -2
- package/references.d.ts +0 -1
- package/ui/action-bar/index.ios.js +0 -1
- package/ui/action-bar/index.ios.js.map +1 -1
- package/ui/builder/index.js +9 -1
- package/ui/builder/index.js.map +1 -1
- package/ui/button/index.android.d.ts +2 -9
- package/ui/button/index.android.js +7 -24
- package/ui/button/index.android.js.map +1 -1
- package/ui/button/index.ios.d.ts +2 -9
- package/ui/button/index.ios.js +17 -72
- package/ui/button/index.ios.js.map +1 -1
- package/ui/core/bindable/index.js +2 -1
- package/ui/core/bindable/index.js.map +1 -1
- package/ui/core/view/index.android.d.ts +1 -0
- package/ui/core/view/index.android.js +38 -29
- package/ui/core/view/index.android.js.map +1 -1
- package/ui/core/view/index.d.ts +18 -2
- package/ui/core/view/index.ios.d.ts +2 -1
- package/ui/core/view/index.ios.js +22 -28
- package/ui/core/view/index.ios.js.map +1 -1
- package/ui/core/view/view-common.d.ts +14 -2
- package/ui/core/view/view-common.js +18 -6
- package/ui/core/view/view-common.js.map +1 -1
- package/ui/core/view/view-helper/index.d.ts +1 -0
- package/ui/core/view/view-helper/index.ios.d.ts +24 -0
- package/ui/core/view/view-helper/index.ios.js +58 -11
- package/ui/core/view/view-helper/index.ios.js.map +1 -1
- package/ui/core/view/view-interfaces.d.ts +10 -0
- package/ui/core/view-base/index.d.ts +24 -9
- package/ui/core/view-base/index.js +50 -29
- package/ui/core/view-base/index.js.map +1 -1
- package/ui/frame/fragment.transitions.android.d.ts +13 -13
- package/ui/frame/fragment.transitions.android.js.map +1 -1
- package/ui/frame/frame-common.d.ts +2 -1
- package/ui/frame/frame-common.js +10 -0
- package/ui/frame/frame-common.js.map +1 -1
- package/ui/frame/frame-helper-for-android.d.ts +4 -4
- package/ui/frame/frame-helper-for-android.js +17 -8
- package/ui/frame/frame-helper-for-android.js.map +1 -1
- package/ui/frame/index.android.d.ts +6 -11
- package/ui/frame/index.android.js +18 -59
- package/ui/frame/index.android.js.map +1 -1
- package/ui/frame/index.d.ts +12 -21
- package/ui/frame/index.ios.d.ts +2 -2
- package/ui/frame/index.ios.js.map +1 -1
- package/ui/index.js +0 -1
- package/ui/index.js.map +1 -1
- package/ui/label/index.ios.d.ts +2 -5
- package/ui/label/index.ios.js +12 -44
- package/ui/label/index.ios.js.map +1 -1
- package/ui/layouts/absolute-layout/index.ios.js +5 -1
- package/ui/layouts/absolute-layout/index.ios.js.map +1 -1
- package/ui/layouts/dock-layout/index.ios.js +5 -1
- package/ui/layouts/dock-layout/index.ios.js.map +1 -1
- package/ui/layouts/flexbox-layout/index.ios.js +5 -1
- package/ui/layouts/flexbox-layout/index.ios.js.map +1 -1
- package/ui/layouts/grid-layout/index.ios.js +5 -1
- package/ui/layouts/grid-layout/index.ios.js.map +1 -1
- package/ui/layouts/layout-base.android.d.ts +3 -10
- package/ui/layouts/layout-base.android.js +7 -24
- package/ui/layouts/layout-base.android.js.map +1 -1
- package/ui/layouts/layout-base.ios.js.map +1 -1
- package/ui/layouts/liquid-glass/index.ios.d.ts +3 -1
- package/ui/layouts/liquid-glass/index.ios.js +51 -4
- package/ui/layouts/liquid-glass/index.ios.js.map +1 -1
- package/ui/layouts/liquid-glass-container/index.ios.d.ts +1 -0
- package/ui/layouts/liquid-glass-container/index.ios.js +50 -4
- package/ui/layouts/liquid-glass-container/index.ios.js.map +1 -1
- package/ui/layouts/stack-layout/index.ios.js +5 -1
- package/ui/layouts/stack-layout/index.ios.js.map +1 -1
- package/ui/layouts/wrap-layout/index.ios.js +5 -1
- package/ui/layouts/wrap-layout/index.ios.js.map +1 -1
- package/ui/list-view/index.d.ts +13 -1
- package/ui/list-view/index.ios.d.ts +3 -1
- package/ui/list-view/index.ios.js +48 -10
- package/ui/list-view/index.ios.js.map +1 -1
- package/ui/list-view/list-view-common.d.ts +14 -0
- package/ui/list-view/list-view-common.js +4 -0
- package/ui/list-view/list-view-common.js.map +1 -1
- package/ui/page/index.d.ts +1 -1
- package/ui/page/index.ios.d.ts +1 -0
- package/ui/page/index.ios.js +31 -17
- package/ui/page/index.ios.js.map +1 -1
- package/ui/page/page-common.d.ts +5 -2
- package/ui/page/page-common.js.map +1 -1
- package/ui/repeater/index.d.ts +2 -1
- package/ui/repeater/index.js.map +1 -1
- package/ui/scroll-view/index.d.ts +13 -0
- package/ui/scroll-view/index.ios.js +21 -7
- package/ui/scroll-view/index.ios.js.map +1 -1
- package/ui/scroll-view/scroll-view-common.d.ts +6 -0
- package/ui/scroll-view/scroll-view-common.js +8 -0
- package/ui/scroll-view/scroll-view-common.js.map +1 -1
- package/ui/segmented-bar/segmented-bar-common.d.ts +5 -1
- package/ui/segmented-bar/segmented-bar-common.js.map +1 -1
- package/ui/styling/background.ios.js +4 -0
- package/ui/styling/background.ios.js.map +1 -1
- package/ui/styling/style/index.d.ts +1 -0
- package/ui/styling/style/index.js.map +1 -1
- package/ui/styling/style-properties.d.ts +1 -0
- package/ui/styling/style-properties.js +41 -32
- package/ui/styling/style-properties.js.map +1 -1
- package/ui/styling/style-scope.js +1 -1
- package/ui/styling/style-scope.js.map +1 -1
- package/ui/tab-view/index.ios.d.ts +10 -1
- package/ui/tab-view/index.ios.js +21 -4
- package/ui/tab-view/index.ios.js.map +1 -1
- package/ui/tab-view/tab-view-common.d.ts +5 -1
- package/ui/tab-view/tab-view-common.js.map +1 -1
- package/ui/text-base/index.android.d.ts +3 -10
- package/ui/text-base/index.android.js +8 -25
- package/ui/text-base/index.android.js.map +1 -1
- package/ui/text-field/index.ios.d.ts +3 -9
- package/ui/text-field/index.ios.js +47 -31
- package/ui/text-field/index.ios.js.map +1 -1
- package/ui/text-view/index.ios.d.ts +2 -9
- package/ui/text-view/index.ios.js +20 -72
- package/ui/text-view/index.ios.js.map +1 -1
- package/ui/transition/index.d.ts +2 -1
- package/ui/transition/modal-transition.ios.js +33 -5
- package/ui/transition/modal-transition.ios.js.map +1 -1
- package/ui/transition/page-transition.ios.d.ts +5 -0
- package/ui/transition/page-transition.ios.js +296 -33
- package/ui/transition/page-transition.ios.js.map +1 -1
- package/ui/transition/shared-transition-helper.android.d.ts +3 -0
- package/ui/transition/shared-transition-helper.android.js +9 -0
- package/ui/transition/shared-transition-helper.android.js.map +1 -1
- package/ui/transition/shared-transition-helper.d.ts +7 -0
- package/ui/transition/shared-transition-helper.ios.d.ts +36 -0
- package/ui/transition/shared-transition-helper.ios.js +765 -89
- package/ui/transition/shared-transition-helper.ios.js.map +1 -1
- package/ui/transition/shared-transition.d.ts +66 -0
- package/ui/transition/shared-transition.js +57 -2
- package/ui/transition/shared-transition.js.map +1 -1
- package/utils/constants.ios.js.map +1 -1
- package/utils/native-helper.android.d.ts +66 -2
- package/utils/native-helper.android.js.map +1 -1
- package/utils/native-helper.ios.d.ts +105 -2
- package/utils/native-helper.ios.js +15 -4
- package/utils/native-helper.ios.js.map +1 -1
- package/utils/native-helper.types.d.ts +2 -0
- package/utils/platform-check.d.ts +1 -1
- package/utils/platform-check.js.map +1 -1
- package/application-settings/index.macos.d.ts +0 -1
- package/application-settings/index.macos.js +0 -2
- package/application-settings/index.macos.js.map +0 -1
- package/file-system/file-system-access.macos.d.ts +0 -1
- package/file-system/file-system-access.macos.js +0 -2
- package/file-system/file-system-access.macos.js.map +0 -1
- package/http/http-request/index.macos.d.ts +0 -3
- package/http/http-request/index.macos.js +0 -168
- package/http/http-request/index.macos.js.map +0 -1
- package/http/http-shared.d.ts +0 -3
- package/http/http-shared.js +0 -2
- package/http/http-shared.js.map +0 -1
- package/http/index.macos.d.ts +0 -8
- package/http/index.macos.js +0 -70
- package/http/index.macos.js.map +0 -1
- package/index.macos.d.ts +0 -9
- package/index.macos.js +0 -8
- package/index.macos.js.map +0 -1
- package/platform/device/index.macos.d.ts +0 -17
- package/platform/device/index.macos.js +0 -50
- package/platform/device/index.macos.js.map +0 -1
- package/platform/index.macos.d.ts +0 -14
- package/platform/index.macos.js +0 -15
- package/platform/index.macos.js.map +0 -1
- package/platform/screen/index.macos.d.ts +0 -14
- package/platform/screen/index.macos.js +0 -30
- package/platform/screen/index.macos.js.map +0 -1
- package/text/index.macos.d.ts +0 -1
- package/text/index.macos.js +0 -2
- package/text/index.macos.js.map +0 -1
- package/ui/dialogs/index.macos.d.ts +0 -43
- package/ui/dialogs/index.macos.js +0 -134
- package/ui/dialogs/index.macos.js.map +0 -1
- package/utils/constants.macos.d.ts +0 -2
- package/utils/constants.macos.js +0 -6
- package/utils/constants.macos.js.map +0 -1
- package/utils/index.macos.d.ts +0 -26
- package/utils/index.macos.js +0 -62
- package/utils/index.macos.js.map +0 -1
- package/utils/native-helper.macos.d.ts +0 -17
- package/utils/native-helper.macos.js +0 -61
- package/utils/native-helper.macos.js.map +0 -1
|
@@ -1,274 +1,68 @@
|
|
|
1
1
|
import { ImageSource } from '../../image-source';
|
|
2
|
-
import { Screen } from '../../platform/screen';
|
|
3
2
|
import { File } from '../../file-system';
|
|
4
3
|
import { HttpResponseEncoding } from '../http-interfaces';
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const pendingRequests = {};
|
|
16
|
-
let debugRequests;
|
|
17
|
-
if (__DEV__) {
|
|
18
|
-
debugRequests = new Map();
|
|
19
|
-
}
|
|
20
|
-
let completeCallback;
|
|
21
|
-
function ensureCompleteCallback() {
|
|
22
|
-
if (completeCallback) {
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
completeCallback = new org.nativescript.widgets.Async.CompleteCallback({
|
|
26
|
-
onComplete: function (result, context) {
|
|
27
|
-
// as a context we will receive the id of the request
|
|
28
|
-
onRequestComplete(context, result);
|
|
29
|
-
},
|
|
30
|
-
onError: function (error, context) {
|
|
31
|
-
onRequestError(error, context);
|
|
32
|
-
},
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
function onRequestComplete(requestId, result) {
|
|
36
|
-
const callbacks = pendingRequests[requestId];
|
|
37
|
-
delete pendingRequests[requestId];
|
|
38
|
-
if (result.error) {
|
|
39
|
-
callbacks.rejectCallback(new Error(result.error.toString()));
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
// read the headers
|
|
43
|
-
const headers = {};
|
|
44
|
-
if (result.headers) {
|
|
45
|
-
const jHeaders = result.headers;
|
|
46
|
-
const length = jHeaders.size();
|
|
47
|
-
let pair;
|
|
48
|
-
for (let i = 0; i < length; i++) {
|
|
49
|
-
pair = jHeaders.get(i);
|
|
50
|
-
addHeader(headers, pair.key, pair.value);
|
|
4
|
+
import { requestInternal } from '../http-request-internal';
|
|
5
|
+
import { getFilenameFromUrl, parseJSON } from './http-request-common';
|
|
6
|
+
const contentHandler = {
|
|
7
|
+
toArrayBuffer() {
|
|
8
|
+
return Uint8Array.from(this.raw.toByteArray()).buffer;
|
|
9
|
+
},
|
|
10
|
+
toString(encoding) {
|
|
11
|
+
let str;
|
|
12
|
+
if (encoding) {
|
|
13
|
+
str = decodeResponse(this.raw, encoding);
|
|
51
14
|
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
const debugRequestInfo = debugRequests.get(requestId);
|
|
55
|
-
if (debugRequestInfo) {
|
|
56
|
-
const debugRequest = debugRequestInfo.debugRequest;
|
|
57
|
-
let mime = (headers['Content-Type'] ?? 'text/plain');
|
|
58
|
-
if (typeof mime === 'string') {
|
|
59
|
-
mime = mime.split(';')[0] ?? 'text/plain';
|
|
60
|
-
}
|
|
61
|
-
debugRequest.mimeType = mime;
|
|
62
|
-
debugRequest.data = result.raw;
|
|
63
|
-
const debugResponse = {
|
|
64
|
-
url: result.url,
|
|
65
|
-
status: result.statusCode,
|
|
66
|
-
statusText: result.statusText,
|
|
67
|
-
headers: headers,
|
|
68
|
-
mimeType: mime,
|
|
69
|
-
fromDiskCache: false,
|
|
70
|
-
timing: {
|
|
71
|
-
requestTime: debugRequestInfo.timestamp,
|
|
72
|
-
proxyStart: -1,
|
|
73
|
-
proxyEnd: -1,
|
|
74
|
-
dnsStart: -1,
|
|
75
|
-
dnsEnd: -1,
|
|
76
|
-
connectStart: -1,
|
|
77
|
-
connectEnd: -1,
|
|
78
|
-
sslStart: -1,
|
|
79
|
-
sslEnd: -1,
|
|
80
|
-
serviceWorkerFetchStart: -1,
|
|
81
|
-
serviceWorkerFetchReady: -1,
|
|
82
|
-
serviceWorkerFetchEnd: -1,
|
|
83
|
-
sendStart: -1,
|
|
84
|
-
sendEnd: -1,
|
|
85
|
-
receiveHeadersEnd: -1,
|
|
86
|
-
},
|
|
87
|
-
};
|
|
88
|
-
debugRequest.responseReceived(debugResponse);
|
|
89
|
-
debugRequest.loadingFinished();
|
|
90
|
-
debugRequests.delete(requestId);
|
|
15
|
+
else {
|
|
16
|
+
str = this.toNativeString(encoding);
|
|
91
17
|
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
content: {
|
|
95
|
-
raw: result.raw,
|
|
96
|
-
toArrayBuffer: () => Uint8Array.from(result.raw.toByteArray()).buffer,
|
|
97
|
-
toString: (encoding) => {
|
|
98
|
-
let str;
|
|
99
|
-
if (encoding) {
|
|
100
|
-
str = decodeResponse(result.raw, encoding);
|
|
101
|
-
}
|
|
102
|
-
else {
|
|
103
|
-
str = result.responseAsString;
|
|
104
|
-
}
|
|
105
|
-
if (typeof str === 'string') {
|
|
106
|
-
return str;
|
|
107
|
-
}
|
|
108
|
-
else {
|
|
109
|
-
throw new Error('Response content may not be converted to string');
|
|
110
|
-
}
|
|
111
|
-
},
|
|
112
|
-
toJSON: (encoding) => {
|
|
113
|
-
let str;
|
|
114
|
-
if (encoding) {
|
|
115
|
-
str = decodeResponse(result.raw, encoding);
|
|
116
|
-
}
|
|
117
|
-
else {
|
|
118
|
-
str = result.responseAsString;
|
|
119
|
-
}
|
|
120
|
-
return parseJSON(str);
|
|
121
|
-
},
|
|
122
|
-
toImage: () => {
|
|
123
|
-
return new Promise((resolveImage, rejectImage) => {
|
|
124
|
-
if (result.responseAsImage != null) {
|
|
125
|
-
resolveImage(new ImageSource(result.responseAsImage));
|
|
126
|
-
}
|
|
127
|
-
else {
|
|
128
|
-
rejectImage(new Error('Response content may not be converted to an Image'));
|
|
129
|
-
}
|
|
130
|
-
});
|
|
131
|
-
},
|
|
132
|
-
toFile: (destinationFilePath) => {
|
|
133
|
-
if (!destinationFilePath) {
|
|
134
|
-
destinationFilePath = getFilenameFromUrl(callbacks.url);
|
|
135
|
-
}
|
|
136
|
-
let stream;
|
|
137
|
-
try {
|
|
138
|
-
// ensure destination path exists by creating any missing parent directories
|
|
139
|
-
const file = File.fromPath(destinationFilePath);
|
|
140
|
-
const javaFile = new java.io.File(destinationFilePath);
|
|
141
|
-
stream = new java.io.FileOutputStream(javaFile);
|
|
142
|
-
stream.write(result.raw.toByteArray());
|
|
143
|
-
return file;
|
|
144
|
-
}
|
|
145
|
-
catch (exception) {
|
|
146
|
-
throw new Error(`Cannot save file with path: ${destinationFilePath}.`);
|
|
147
|
-
}
|
|
148
|
-
finally {
|
|
149
|
-
if (stream) {
|
|
150
|
-
stream.close();
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
},
|
|
154
|
-
},
|
|
155
|
-
statusCode: result.statusCode,
|
|
156
|
-
headers: headers,
|
|
157
|
-
});
|
|
158
|
-
}
|
|
159
|
-
function onRequestError(error, requestId) {
|
|
160
|
-
const callbacks = pendingRequests[requestId];
|
|
161
|
-
delete pendingRequests[requestId];
|
|
162
|
-
if (callbacks) {
|
|
163
|
-
callbacks.rejectCallback(new Error(error));
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
function buildJavaOptions(options) {
|
|
167
|
-
if (typeof options.url !== 'string') {
|
|
168
|
-
throw new Error('Http request must provide a valid url.');
|
|
169
|
-
}
|
|
170
|
-
const javaOptions = new org.nativescript.widgets.Async.Http.RequestOptions();
|
|
171
|
-
javaOptions.url = options.url;
|
|
172
|
-
if (typeof options.method === 'string') {
|
|
173
|
-
javaOptions.method = options.method;
|
|
174
|
-
}
|
|
175
|
-
if (typeof options.content === 'string' || options.content instanceof FormData) {
|
|
176
|
-
const nativeString = new java.lang.String(options.content.toString());
|
|
177
|
-
const nativeBytes = nativeString.getBytes('UTF-8');
|
|
178
|
-
const nativeBuffer = java.nio.ByteBuffer.wrap(nativeBytes);
|
|
179
|
-
javaOptions.content = nativeBuffer;
|
|
180
|
-
}
|
|
181
|
-
else if (options.content instanceof ArrayBuffer) {
|
|
182
|
-
const typedArray = new Uint8Array(options.content);
|
|
183
|
-
const nativeBuffer = java.nio.ByteBuffer.wrap(Array.from(typedArray));
|
|
184
|
-
javaOptions.content = nativeBuffer;
|
|
185
|
-
}
|
|
186
|
-
if (typeof options.timeout === 'number') {
|
|
187
|
-
javaOptions.timeout = options.timeout;
|
|
188
|
-
}
|
|
189
|
-
if (typeof options.dontFollowRedirects === 'boolean') {
|
|
190
|
-
javaOptions.dontFollowRedirects = options.dontFollowRedirects;
|
|
191
|
-
}
|
|
192
|
-
if (options.headers) {
|
|
193
|
-
const arrayList = new java.util.ArrayList();
|
|
194
|
-
const pair = org.nativescript.widgets.Async.Http.KeyValuePair;
|
|
195
|
-
for (const key in options.headers) {
|
|
196
|
-
arrayList.add(new pair(key, options.headers[key] + ''));
|
|
18
|
+
if (typeof str === 'string') {
|
|
19
|
+
return str;
|
|
197
20
|
}
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
21
|
+
else {
|
|
22
|
+
throw new Error('Response content may not be converted to string');
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
toJSON(encoding) {
|
|
26
|
+
let str;
|
|
27
|
+
if (encoding) {
|
|
28
|
+
str = decodeResponse(this.raw, encoding);
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
str = this.toNativeString(encoding);
|
|
32
|
+
}
|
|
33
|
+
return parseJSON(str);
|
|
34
|
+
},
|
|
35
|
+
toImage() {
|
|
36
|
+
return this.toNativeImage().then((value) => new ImageSource(value));
|
|
37
|
+
},
|
|
38
|
+
toFile(destinationFilePath) {
|
|
39
|
+
if (!destinationFilePath) {
|
|
40
|
+
destinationFilePath = getFilenameFromUrl(this.requestURL);
|
|
41
|
+
}
|
|
42
|
+
let stream;
|
|
211
43
|
try {
|
|
212
|
-
//
|
|
213
|
-
const
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
if (__DEV__) {
|
|
219
|
-
const network = domainDebugger.getNetwork();
|
|
220
|
-
const debugRequest = network && network.create();
|
|
221
|
-
if (options.url && debugRequest) {
|
|
222
|
-
const timestamp = Date.now() / 1000;
|
|
223
|
-
debugRequests.set(requestIdCounter, {
|
|
224
|
-
debugRequest,
|
|
225
|
-
timestamp,
|
|
226
|
-
});
|
|
227
|
-
const request = {
|
|
228
|
-
url: options.url,
|
|
229
|
-
method: 'GET',
|
|
230
|
-
headers: options.headers,
|
|
231
|
-
timestamp,
|
|
232
|
-
};
|
|
233
|
-
debugRequest.requestWillBeSent(request);
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
// remember the callbacks so that we can use them when the CompleteCallback is called
|
|
237
|
-
const callbacks = {
|
|
238
|
-
url: options.url,
|
|
239
|
-
resolveCallback: resolve,
|
|
240
|
-
rejectCallback: reject,
|
|
241
|
-
};
|
|
242
|
-
pendingRequests[requestIdCounter] = callbacks;
|
|
243
|
-
ensureCompleteCallback();
|
|
244
|
-
//make the actual async call
|
|
245
|
-
org.nativescript.widgets.Async.Http.MakeRequest(javaOptions, completeCallback, new java.lang.Integer(requestIdCounter));
|
|
246
|
-
// increment the id counter
|
|
247
|
-
requestIdCounter++;
|
|
44
|
+
// ensure destination path exists by creating any missing parent directories
|
|
45
|
+
const file = File.fromPath(destinationFilePath);
|
|
46
|
+
const javaFile = new java.io.File(destinationFilePath);
|
|
47
|
+
stream = new java.io.FileOutputStream(javaFile);
|
|
48
|
+
stream.write(this.raw.toByteArray());
|
|
49
|
+
return file;
|
|
248
50
|
}
|
|
249
|
-
catch (
|
|
250
|
-
|
|
51
|
+
catch (exception) {
|
|
52
|
+
throw new Error(`Cannot save file with path: ${destinationFilePath}.`);
|
|
251
53
|
}
|
|
252
|
-
|
|
54
|
+
finally {
|
|
55
|
+
if (stream) {
|
|
56
|
+
stream.close();
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
export function request(options) {
|
|
62
|
+
return requestInternal(options, contentHandler);
|
|
253
63
|
}
|
|
254
64
|
function decodeResponse(raw, encoding) {
|
|
255
|
-
|
|
256
|
-
if (encoding === HttpResponseEncoding.GBK) {
|
|
257
|
-
charsetName = 'GBK';
|
|
258
|
-
}
|
|
65
|
+
const charsetName = encoding === HttpResponseEncoding.GBK ? 'GBK' : 'UTF-8';
|
|
259
66
|
return raw.toString(charsetName);
|
|
260
67
|
}
|
|
261
|
-
export function addHeader(headers, key, value) {
|
|
262
|
-
if (!headers[key]) {
|
|
263
|
-
headers[key] = value;
|
|
264
|
-
}
|
|
265
|
-
else if (Array.isArray(headers[key])) {
|
|
266
|
-
headers[key].push(value);
|
|
267
|
-
}
|
|
268
|
-
else {
|
|
269
|
-
const values = [headers[key]];
|
|
270
|
-
values.push(value);
|
|
271
|
-
headers[key] = values;
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
68
|
//# sourceMappingURL=index.android.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.android.js","sourceRoot":"","sources":["../../../../../packages/core/http/http-request/index.android.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index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AC;AAClC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { HttpRequestOptions, HttpResponse, Headers } from '../http-interfaces';
|
|
2
|
+
|
|
2
3
|
/**
|
|
3
4
|
* Makes a generic http request using the provided options and returns a HttpResponse Object.
|
|
4
5
|
* @param options An object that specifies various request options.
|
|
5
6
|
*/
|
|
6
7
|
export const request: (options: HttpRequestOptions) => Promise<HttpResponse>;
|
|
7
|
-
export function addHeader(headers: Headers, key: string, value: string): void;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import type { HttpRequestOptions, HttpResponse
|
|
1
|
+
import type { HttpRequestOptions, HttpResponse } from '../http-interfaces';
|
|
2
2
|
export declare function request(options: HttpRequestOptions): Promise<HttpResponse>;
|
|
3
|
-
export declare function addHeader(headers: Headers, key: string, value: string): void;
|
|
@@ -1,221 +1,42 @@
|
|
|
1
|
-
import { SDK_VERSION } from '../../utils/constants';
|
|
2
|
-
import { isRealDevice } from '../../utils/native-helper';
|
|
3
|
-
import * as types from '../../utils/types';
|
|
4
|
-
import * as domainDebugger from '../../debugger';
|
|
5
|
-
import { getFilenameFromUrl } from './http-request-common';
|
|
6
1
|
import { ImageSource } from '../../image-source';
|
|
7
2
|
import { File } from '../../file-system';
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
const queue = NSOperationQueue.mainQueue;
|
|
19
|
-
function parseJSON(source) {
|
|
20
|
-
const src = source.trim();
|
|
21
|
-
if (src.lastIndexOf(')') === src.length - 1) {
|
|
22
|
-
return JSON.parse(src.substring(src.indexOf('(') + 1, src.lastIndexOf(')')));
|
|
23
|
-
}
|
|
24
|
-
return JSON.parse(src);
|
|
25
|
-
}
|
|
26
|
-
var NSURLSessionTaskDelegateImpl = (function (_super) {
|
|
27
|
-
__extends(NSURLSessionTaskDelegateImpl, _super);
|
|
28
|
-
function NSURLSessionTaskDelegateImpl() {
|
|
29
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
30
|
-
}
|
|
31
|
-
NSURLSessionTaskDelegateImpl.prototype.URLSessionTaskWillPerformHTTPRedirectionNewRequestCompletionHandler = function (session, task, response, request, completionHandler) {
|
|
32
|
-
completionHandler(null);
|
|
33
|
-
};
|
|
34
|
-
NSURLSessionTaskDelegateImpl.ObjCProtocols = [NSURLSessionTaskDelegate];
|
|
35
|
-
return NSURLSessionTaskDelegateImpl;
|
|
36
|
-
}(NSObject));
|
|
37
|
-
const sessionTaskDelegateInstance = NSURLSessionTaskDelegateImpl.new();
|
|
38
|
-
let defaultSession;
|
|
39
|
-
function ensureDefaultSession() {
|
|
40
|
-
if (!defaultSession) {
|
|
41
|
-
defaultSession = NSURLSession.sessionWithConfigurationDelegateDelegateQueue(sessionConfig, null, queue);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
let sessionNotFollowingRedirects;
|
|
45
|
-
function ensureSessionNotFollowingRedirects() {
|
|
46
|
-
if (!sessionNotFollowingRedirects) {
|
|
47
|
-
sessionNotFollowingRedirects = NSURLSession.sessionWithConfigurationDelegateDelegateQueue(sessionConfig, sessionTaskDelegateInstance, queue);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
export function request(options) {
|
|
51
|
-
return new Promise((resolve, reject) => {
|
|
52
|
-
if (!options.url) {
|
|
53
|
-
reject(new Error('Request url was empty.'));
|
|
54
|
-
return;
|
|
3
|
+
import { requestInternal } from '../http-request-internal';
|
|
4
|
+
import { getFilenameFromUrl, parseJSON } from './http-request-common';
|
|
5
|
+
const contentHandler = {
|
|
6
|
+
toArrayBuffer() {
|
|
7
|
+
return interop.bufferFromData(this.raw);
|
|
8
|
+
},
|
|
9
|
+
toString(encoding) {
|
|
10
|
+
const str = this.toNativeString(encoding);
|
|
11
|
+
if (typeof str === 'string') {
|
|
12
|
+
return str;
|
|
55
13
|
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
const debugRequest = network && network.create();
|
|
59
|
-
const urlRequest = NSMutableURLRequest.requestWithURL(NSURL.URLWithString(options.url));
|
|
60
|
-
urlRequest.HTTPMethod = types.isDefined(options.method) ? options.method : GET;
|
|
61
|
-
urlRequest.setValueForHTTPHeaderField(USER_AGENT, USER_AGENT_HEADER);
|
|
62
|
-
if (options.headers) {
|
|
63
|
-
for (const header in options.headers) {
|
|
64
|
-
urlRequest.setValueForHTTPHeaderField(options.headers[header] + '', header);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
if (types.isString(options.content) || options.content instanceof FormData) {
|
|
68
|
-
urlRequest.HTTPBody = NSString.stringWithString(options.content.toString()).dataUsingEncoding(4);
|
|
69
|
-
}
|
|
70
|
-
else if (options.content instanceof ArrayBuffer) {
|
|
71
|
-
const buffer = options.content;
|
|
72
|
-
urlRequest.HTTPBody = NSData.dataWithData(buffer);
|
|
73
|
-
}
|
|
74
|
-
if (types.isNumber(options.timeout)) {
|
|
75
|
-
urlRequest.timeoutInterval = options.timeout / 1000;
|
|
76
|
-
}
|
|
77
|
-
let session;
|
|
78
|
-
if (types.isBoolean(options.dontFollowRedirects) && options.dontFollowRedirects) {
|
|
79
|
-
ensureSessionNotFollowingRedirects();
|
|
80
|
-
session = sessionNotFollowingRedirects;
|
|
81
|
-
}
|
|
82
|
-
else {
|
|
83
|
-
ensureDefaultSession();
|
|
84
|
-
session = defaultSession;
|
|
85
|
-
}
|
|
86
|
-
let timestamp = -1;
|
|
87
|
-
const dataTask = session.dataTaskWithRequestCompletionHandler(urlRequest, function (data, response, error) {
|
|
88
|
-
if (error) {
|
|
89
|
-
reject(new Error(error.localizedDescription));
|
|
90
|
-
}
|
|
91
|
-
else {
|
|
92
|
-
const headers = {};
|
|
93
|
-
if (response && response.allHeaderFields) {
|
|
94
|
-
const headerFields = response.allHeaderFields;
|
|
95
|
-
headerFields.enumerateKeysAndObjectsUsingBlock((key, value, stop) => {
|
|
96
|
-
addHeader(headers, key, value);
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
if (debugRequest) {
|
|
100
|
-
debugRequest.mimeType = response.MIMEType;
|
|
101
|
-
debugRequest.data = data;
|
|
102
|
-
const debugResponse = {
|
|
103
|
-
url: options.url,
|
|
104
|
-
status: response.statusCode,
|
|
105
|
-
statusText: NSHTTPURLResponse.localizedStringForStatusCode(response.statusCode),
|
|
106
|
-
headers: headers,
|
|
107
|
-
mimeType: response.MIMEType,
|
|
108
|
-
fromDiskCache: false,
|
|
109
|
-
timing: {
|
|
110
|
-
requestTime: timestamp,
|
|
111
|
-
proxyStart: -1,
|
|
112
|
-
proxyEnd: -1,
|
|
113
|
-
dnsStart: -1,
|
|
114
|
-
dnsEnd: -1,
|
|
115
|
-
connectStart: -1,
|
|
116
|
-
connectEnd: -1,
|
|
117
|
-
sslStart: -1,
|
|
118
|
-
sslEnd: -1,
|
|
119
|
-
serviceWorkerFetchStart: -1,
|
|
120
|
-
serviceWorkerFetchReady: -1,
|
|
121
|
-
serviceWorkerFetchEnd: -1,
|
|
122
|
-
sendStart: -1,
|
|
123
|
-
sendEnd: -1,
|
|
124
|
-
receiveHeadersEnd: -1,
|
|
125
|
-
},
|
|
126
|
-
headersSize: headers?.length ?? -1,
|
|
127
|
-
};
|
|
128
|
-
debugRequest.responseReceived(debugResponse);
|
|
129
|
-
debugRequest.loadingFinished();
|
|
130
|
-
}
|
|
131
|
-
resolve({
|
|
132
|
-
content: {
|
|
133
|
-
raw: data,
|
|
134
|
-
toArrayBuffer: () => interop.bufferFromData(data),
|
|
135
|
-
toString: (encoding) => {
|
|
136
|
-
const str = NSDataToString(data, encoding);
|
|
137
|
-
if (typeof str === 'string') {
|
|
138
|
-
return str;
|
|
139
|
-
}
|
|
140
|
-
else {
|
|
141
|
-
throw new Error('Response content may not be converted to string');
|
|
142
|
-
}
|
|
143
|
-
},
|
|
144
|
-
toJSON: (encoding) => parseJSON(NSDataToString(data, encoding)),
|
|
145
|
-
toImage: () => {
|
|
146
|
-
return new Promise((resolve, reject) => {
|
|
147
|
-
UIImage.tns_decodeImageWithDataCompletion(data, (image) => {
|
|
148
|
-
if (image) {
|
|
149
|
-
resolve(new ImageSource(image));
|
|
150
|
-
}
|
|
151
|
-
else {
|
|
152
|
-
reject(new Error('Response content may not be converted to an Image'));
|
|
153
|
-
}
|
|
154
|
-
});
|
|
155
|
-
});
|
|
156
|
-
},
|
|
157
|
-
toFile: (destinationFilePath) => {
|
|
158
|
-
if (!destinationFilePath) {
|
|
159
|
-
destinationFilePath = getFilenameFromUrl(options.url);
|
|
160
|
-
}
|
|
161
|
-
if (data instanceof NSData) {
|
|
162
|
-
// ensure destination path exists by creating any missing parent directories
|
|
163
|
-
const file = File.fromPath(destinationFilePath);
|
|
164
|
-
data.writeToFileAtomically(destinationFilePath, true);
|
|
165
|
-
return file;
|
|
166
|
-
}
|
|
167
|
-
else {
|
|
168
|
-
reject(new Error(`Cannot save file with path: ${destinationFilePath}.`));
|
|
169
|
-
}
|
|
170
|
-
},
|
|
171
|
-
},
|
|
172
|
-
statusCode: response.statusCode,
|
|
173
|
-
headers: headers,
|
|
174
|
-
});
|
|
175
|
-
}
|
|
176
|
-
});
|
|
177
|
-
if (options.url && debugRequest) {
|
|
178
|
-
timestamp = Date.now() / 1000;
|
|
179
|
-
const request = {
|
|
180
|
-
url: options.url,
|
|
181
|
-
method: 'GET',
|
|
182
|
-
headers: options.headers,
|
|
183
|
-
timestamp,
|
|
184
|
-
headersSize: options?.headers?.length ?? -1,
|
|
185
|
-
};
|
|
186
|
-
debugRequest.requestWillBeSent(request);
|
|
187
|
-
}
|
|
188
|
-
dataTask.resume();
|
|
14
|
+
else {
|
|
15
|
+
throw new Error('Response content may not be converted to string');
|
|
189
16
|
}
|
|
190
|
-
|
|
191
|
-
|
|
17
|
+
},
|
|
18
|
+
toJSON(encoding) {
|
|
19
|
+
return parseJSON(this.toNativeString(encoding));
|
|
20
|
+
},
|
|
21
|
+
toImage() {
|
|
22
|
+
return this.toNativeImage().then((value) => new ImageSource(value));
|
|
23
|
+
},
|
|
24
|
+
toFile(destinationFilePath) {
|
|
25
|
+
if (!destinationFilePath) {
|
|
26
|
+
destinationFilePath = getFilenameFromUrl(this.requestURL);
|
|
192
27
|
}
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
return encodedString.toString();
|
|
207
|
-
}
|
|
208
|
-
export function addHeader(headers, key, value) {
|
|
209
|
-
if (!headers[key]) {
|
|
210
|
-
headers[key] = value;
|
|
211
|
-
}
|
|
212
|
-
else if (Array.isArray(headers[key])) {
|
|
213
|
-
headers[key].push(value);
|
|
214
|
-
}
|
|
215
|
-
else {
|
|
216
|
-
const values = [headers[key]];
|
|
217
|
-
values.push(value);
|
|
218
|
-
headers[key] = values;
|
|
219
|
-
}
|
|
28
|
+
if (this.raw instanceof NSData) {
|
|
29
|
+
// ensure destination path exists by creating any missing parent directories
|
|
30
|
+
const file = File.fromPath(destinationFilePath);
|
|
31
|
+
this.raw.writeToFileAtomically(destinationFilePath, true);
|
|
32
|
+
return file;
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
throw new Error(`Cannot save file with path: ${destinationFilePath}.`);
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
export function request(options) {
|
|
40
|
+
return requestInternal(options, contentHandler);
|
|
220
41
|
}
|
|
221
42
|
//# sourceMappingURL=index.ios.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.ios.js","sourceRoot":"","sources":["../../../../../packages/core/http/http-request/index.ios.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.ios.js","sourceRoot":"","sources":["../../../../../packages/core/http/http-request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