esoftplay 0.0.269-beta6ae30d2 → 0.0.269-beta7339f70
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/bin/build.js +2 -1
- package/modules/lib/curl.ts +8 -8
- package/modules/lib/picture.tsx +4 -2
- package/package.json +1 -1
package/bin/build.js
CHANGED
|
@@ -218,7 +218,8 @@ if (fs.existsSync(packjson)) {
|
|
|
218
218
|
}
|
|
219
219
|
}`
|
|
220
220
|
|
|
221
|
-
|
|
221
|
+
if (!fs.existsSync(easjson))
|
|
222
|
+
writeFileSyncWithLog(easjson, easconfg);
|
|
222
223
|
|
|
223
224
|
|
|
224
225
|
const metroConfig = `// Learn more https://docs.expo.io/guides/customizing-metro
|
package/modules/lib/curl.ts
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
import esp from 'esoftplay/esp';
|
|
5
5
|
import { LibCrypt } from 'esoftplay/cache/lib/crypt/import';
|
|
6
6
|
import { reportApiError } from "esoftplay/error";
|
|
7
|
-
import { File } from 'expo-file-system';
|
|
8
7
|
|
|
8
|
+
//api_logger_import
|
|
9
9
|
|
|
10
10
|
/** Klik [disini](https://github.com/dev-esoftplay/mobile-docs/blob/main/modules/lib/curl.md) untuk melihat dokumentasi*/
|
|
11
11
|
export default class m {
|
|
@@ -30,7 +30,7 @@ export default class m {
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
constructor(uri?: string, post?: any, onDone?: (res: any, msg: string) => void, onFailed?: (error: any, timeout: boolean) => void, debug?: number) {
|
|
33
|
-
this.header = { version:
|
|
33
|
+
this.header = { version: esp.config()?.publish_id }
|
|
34
34
|
// this.maxRetry = 2;
|
|
35
35
|
this.setUri = this.setUri.bind(this);
|
|
36
36
|
this.setUrl = this.setUrl.bind(this);
|
|
@@ -356,12 +356,11 @@ export default class m {
|
|
|
356
356
|
if (post) {
|
|
357
357
|
if (upload) {
|
|
358
358
|
let fd = new FormData();
|
|
359
|
-
|
|
359
|
+
Object.keys(post).map(function (key) {
|
|
360
360
|
if (post[key] !== undefined) {
|
|
361
|
-
|
|
362
|
-
fd.append(key, file as any, post[key].name)
|
|
361
|
+
fd.append(key, post[key])
|
|
363
362
|
}
|
|
364
|
-
})
|
|
363
|
+
});
|
|
365
364
|
this.post = fd
|
|
366
365
|
} else {
|
|
367
366
|
let ps = Object.keys(post).map((key) => {
|
|
@@ -384,9 +383,10 @@ export default class m {
|
|
|
384
383
|
this.setUrl(esp.config("url"))
|
|
385
384
|
}
|
|
386
385
|
await this.setHeader();
|
|
387
|
-
if (
|
|
386
|
+
if (upload)
|
|
387
|
+
this.header["Content-Type"] = "multipart/form-data"
|
|
388
|
+
else
|
|
388
389
|
this.header["Content-Type"] = "application/x-www-form-urlencoded;charset=UTF-8"
|
|
389
|
-
|
|
390
390
|
let options: any = {
|
|
391
391
|
method: !this.post ? "GET" : "POST",
|
|
392
392
|
headers: this.header,
|
package/modules/lib/picture.tsx
CHANGED
|
@@ -17,7 +17,7 @@ export interface LibPictureProps {
|
|
|
17
17
|
/** Klik [disini](https://github.com/dev-esoftplay/mobile-docs/blob/main/modules/lib/picture.md) untuk melihat dokumentasi*/
|
|
18
18
|
export default function m(props: LibPictureProps): any {
|
|
19
19
|
|
|
20
|
-
let resizeMode
|
|
20
|
+
let resizeMode: any
|
|
21
21
|
if (props?.style?.resizeMode == 'cover')
|
|
22
22
|
resizeMode = "cover"
|
|
23
23
|
else if (props?.style?.resizeMode == 'contain')
|
|
@@ -35,6 +35,8 @@ export default function m(props: LibPictureProps): any {
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
return (
|
|
38
|
-
<Image {...props}
|
|
38
|
+
<Image {...props}
|
|
39
|
+
recyclingKey={props.source.uri}
|
|
40
|
+
source={source} contentFit={resizeMode} allowDownscaling cachePolicy={"memory-disk"} />
|
|
39
41
|
)
|
|
40
42
|
}
|
package/package.json
CHANGED