@eyepop.ai/react-native-eyepop 3.7.0 → 3.8.1
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/lib/commonjs/rn_local_file.js +1 -2
- package/lib/commonjs/rn_local_file.js.map +1 -1
- package/lib/module/rn_local_file.js +0 -1
- package/lib/module/rn_local_file.js.map +1 -1
- package/lib/typescript/commonjs/src/rn_local_file.d.ts.map +1 -1
- package/lib/typescript/module/src/rn_local_file.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/rn_local_file.ts +1 -2
|
@@ -5,14 +5,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.resolvePathRN = resolvePathRN;
|
|
7
7
|
require("react-native-polyfill-globals/auto");
|
|
8
|
-
var _es = require("web-streams-polyfill/ponyfill/es6");
|
|
9
8
|
var _reactNativeFileAccess = require("react-native-file-access");
|
|
10
9
|
async function resolvePathRN(source, _) {
|
|
11
10
|
const bufferSize = 1024 * 1024;
|
|
12
11
|
let pos = 0;
|
|
13
12
|
const size = (await _reactNativeFileAccess.FileSystem.stat(source.path)).size;
|
|
14
13
|
let eof = false;
|
|
15
|
-
const stream = new
|
|
14
|
+
const stream = new ReadableStream({
|
|
16
15
|
async pull(controller) {
|
|
17
16
|
if (eof) {
|
|
18
17
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["require","
|
|
1
|
+
{"version":3,"names":["require","_reactNativeFileAccess","resolvePathRN","source","_","bufferSize","pos","size","FileSystem","stat","path","eof","stream","ReadableStream","pull","controller","chunkSize","Math","min","chunkAsB64","readFileChunk","length","chunk","Buffer","from","subarray","enqueue","close","mimeType"],"sourceRoot":"../../src","sources":["rn_local_file.ts"],"mappings":";;;;;;AAAAA,OAAA;AAIA,IAAAC,sBAAA,GAAAD,OAAA;AAEO,eAAeE,aAAaA,CACjCC,MAAkB,EAClBC,CAAS,EACc;EACvB,MAAMC,UAAU,GAAG,IAAI,GAAG,IAAI;EAC9B,IAAIC,GAAG,GAAG,CAAC;EACX,MAAMC,IAAI,GAAG,CAAC,MAAMC,iCAAU,CAACC,IAAI,CAACN,MAAM,CAACO,IAAI,CAAC,EAAEH,IAAI;EACtD,IAAII,GAAG,GAAG,KAAK;EACf,MAAMC,MAAM,GAAG,IAAIC,cAAc,CAAa;IAC5C,MAAMC,IAAIA,CAACC,UAAe,EAAE;MAC1B,IAAIJ,GAAG,EAAE;QACP;MACF;MACA,MAAMK,SAAS,GAAGC,IAAI,CAACC,GAAG,CAACb,UAAU,EAAEE,IAAI,GAAGD,GAAG,CAAC;MAClD,MAAMa,UAAU,GAAG,MAAMX,iCAAU,CAACY,aAAa,CAC/CjB,MAAM,CAACO,IAAI,EACXJ,GAAG,EACHU,SAAS,EACT,QACF,CAAC;MACD,IAAIG,UAAU,CAACE,MAAM,GAAG,CAAC,EAAE;QACzB,MAAMC,KAAK,GAAGC,MAAM,CAACC,IAAI,CAACL,UAAU,EAAE,QAAQ,CAAC,CAACM,QAAQ,CAAC,CAAC,EAAET,SAAS,CAAC;QACtED,UAAU,CAACW,OAAO,CAACJ,KAAK,CAAC;QACzBhB,GAAG,IAAIgB,KAAK,CAACD,MAAM;MACrB,CAAC,MAAM;QACLV,GAAG,GAAG,IAAI;QACVI,UAAU,CAACY,KAAK,CAAC,CAAC;MACpB;IACF;EACF,CAAC,CAAC;EACF,OAAO;IACLf,MAAM,EAAEA,MAAM;IACdL,IAAI,EAAEA,IAAI;IACVqB,QAAQ,EAAEzB,MAAM,CAACyB,QAAQ,IAAI;EAC/B,CAAC;AACH","ignoreList":[]}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import 'react-native-polyfill-globals/auto';
|
|
4
|
-
import { ReadableStream } from 'web-streams-polyfill/ponyfill/es6';
|
|
5
4
|
import { FileSystem } from 'react-native-file-access';
|
|
6
5
|
export async function resolvePathRN(source, _) {
|
|
7
6
|
const bufferSize = 1024 * 1024;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["FileSystem","resolvePathRN","source","_","bufferSize","pos","size","stat","path","eof","stream","ReadableStream","pull","controller","chunkSize","Math","min","chunkAsB64","readFileChunk","length","chunk","Buffer","from","subarray","enqueue","close","mimeType"],"sourceRoot":"../../src","sources":["rn_local_file.ts"],"mappings":";;AAAA,OAAO,oCAAoC;AAI3C,SAASA,UAAU,QAAQ,0BAA0B;AAErD,OAAO,eAAeC,aAAaA,CACjCC,MAAkB,EAClBC,CAAS,EACc;EACvB,MAAMC,UAAU,GAAG,IAAI,GAAG,IAAI;EAC9B,IAAIC,GAAG,GAAG,CAAC;EACX,MAAMC,IAAI,GAAG,CAAC,MAAMN,UAAU,CAACO,IAAI,CAACL,MAAM,CAACM,IAAI,CAAC,EAAEF,IAAI;EACtD,IAAIG,GAAG,GAAG,KAAK;EACf,MAAMC,MAAM,GAAG,IAAIC,cAAc,CAAa;IAC5C,MAAMC,IAAIA,CAACC,UAAe,EAAE;MAC1B,IAAIJ,GAAG,EAAE;QACP;MACF;MACA,MAAMK,SAAS,GAAGC,IAAI,CAACC,GAAG,CAACZ,UAAU,EAAEE,IAAI,GAAGD,GAAG,CAAC;MAClD,MAAMY,UAAU,GAAG,MAAMjB,UAAU,CAACkB,aAAa,CAC/ChB,MAAM,CAACM,IAAI,EACXH,GAAG,EACHS,SAAS,EACT,QACF,CAAC;MACD,IAAIG,UAAU,CAACE,MAAM,GAAG,CAAC,EAAE;QACzB,MAAMC,KAAK,GAAGC,MAAM,CAACC,IAAI,CAACL,UAAU,EAAE,QAAQ,CAAC,CAACM,QAAQ,CAAC,CAAC,EAAET,SAAS,CAAC;QACtED,UAAU,CAACW,OAAO,CAACJ,KAAK,CAAC;QACzBf,GAAG,IAAIe,KAAK,CAACD,MAAM;MACrB,CAAC,MAAM;QACLV,GAAG,GAAG,IAAI;QACVI,UAAU,CAACY,KAAK,CAAC,CAAC;MACpB;IACF;EACF,CAAC,CAAC;EACF,OAAO;IACLf,MAAM,EAAEA,MAAM;IACdJ,IAAI,EAAEA,IAAI;IACVoB,QAAQ,EAAExB,MAAM,CAACwB,QAAQ,IAAI;EAC/B,CAAC;AACH","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rn_local_file.d.ts","sourceRoot":"","sources":["../../../../src/rn_local_file.ts"],"names":[],"mappings":"AAAA,OAAO,oCAAoC,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"rn_local_file.d.ts","sourceRoot":"","sources":["../../../../src/rn_local_file.ts"],"names":[],"mappings":"AAAA,OAAO,oCAAoC,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAI9B,wBAAsB,aAAa,CACjC,MAAM,EAAE,UAAU,EAClB,CAAC,EAAE,MAAM,GACR,OAAO,CAAC,YAAY,CAAC,CAgCvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rn_local_file.d.ts","sourceRoot":"","sources":["../../../../src/rn_local_file.ts"],"names":[],"mappings":"AAAA,OAAO,oCAAoC,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"rn_local_file.d.ts","sourceRoot":"","sources":["../../../../src/rn_local_file.ts"],"names":[],"mappings":"AAAA,OAAO,oCAAoC,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAI9B,wBAAsB,aAAa,CACjC,MAAM,EAAE,UAAU,EAClB,CAAC,EAAE,MAAM,GACR,OAAO,CAAC,YAAY,CAAC,CAgCvB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eyepop.ai/react-native-eyepop",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.8.1",
|
|
4
4
|
"description": "The official Typescript library for EyePop.ai's inference API for React Native",
|
|
5
5
|
"source": "./src/index.ts",
|
|
6
6
|
"main": "./lib/commonjs/index.js",
|
|
@@ -67,8 +67,8 @@
|
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
69
|
"@azure/core-asynciterator-polyfill": "^1.0.2",
|
|
70
|
-
"@eyepop.ai/eyepop": "3.
|
|
71
|
-
"@eyepop.ai/eyepop-render-2d": "3.
|
|
70
|
+
"@eyepop.ai/eyepop": "3.8.1",
|
|
71
|
+
"@eyepop.ai/eyepop-render-2d": "3.8.1",
|
|
72
72
|
"@types/react-native-canvas": "^0.1.14",
|
|
73
73
|
"buffer": "^6.0.3",
|
|
74
74
|
"react": "^19.2.0",
|
package/src/rn_local_file.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import 'react-native-polyfill-globals/auto';
|
|
2
2
|
import { PathSource, StreamSource } from '@eyepop.ai/eyepop';
|
|
3
3
|
import { Logger } from 'pino';
|
|
4
|
-
import { ReadableStream } from 'web-streams-polyfill/ponyfill/es6';
|
|
5
4
|
|
|
6
5
|
import { FileSystem } from 'react-native-file-access';
|
|
7
6
|
|
|
@@ -13,7 +12,7 @@ export async function resolvePathRN(
|
|
|
13
12
|
let pos = 0;
|
|
14
13
|
const size = (await FileSystem.stat(source.path)).size;
|
|
15
14
|
let eof = false;
|
|
16
|
-
const stream = new ReadableStream({
|
|
15
|
+
const stream = new ReadableStream<Uint8Array>({
|
|
17
16
|
async pull(controller: any) {
|
|
18
17
|
if (eof) {
|
|
19
18
|
return;
|