@tarojs/rn-runner 3.8.0-canary.0 → 4.0.0-beta.0

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.
@@ -208,7 +208,6 @@ export { Navbar as default };
208
208
  exports[`build_components named export 1`] = `
209
209
  [
210
210
  "import { Platform as Platform$1, NativeModules, NativeEventEmitter } from 'react-native';
211
- import 'react-native/Libraries/EventEmitter/RCTDeviceEventEmitter';
212
211
  import 'react';
213
212
  import require$$0 from 'crypto';
214
213
 
@@ -286,13 +285,10 @@ var platformModule;if(NativeModulesProxy.ExponentFileSystem){platformModule=Nati
286
285
 
287
286
  var FileSystemSessionType;(function(FileSystemSessionType){FileSystemSessionType[FileSystemSessionType["BACKGROUND"]=0]="BACKGROUND";FileSystemSessionType[FileSystemSessionType["FOREGROUND"]=1]="FOREGROUND";})(FileSystemSessionType||(FileSystemSessionType={}));var FileSystemUploadType;(function(FileSystemUploadType){FileSystemUploadType[FileSystemUploadType["BINARY_CONTENT"]=0]="BINARY_CONTENT";FileSystemUploadType[FileSystemUploadType["MULTIPART"]=1]="MULTIPART";})(FileSystemUploadType||(FileSystemUploadType={}));var EncodingType;(function(EncodingType){EncodingType["UTF8"]="utf8";EncodingType["Base64"]="base64";})(EncodingType||(EncodingType={}));
288
287
 
289
- function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else {result=Super.apply(this,arguments);}return _possibleConstructorReturn(this,result);};}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true;}catch(e){return false;}}if(!ExponentFileSystem){console.warn("No native ExponentFileSystem module found, are you sure the expo-file-system's module is linked properly?");}new EventEmitter(ExponentFileSystem);function normalizeEndingSlash(p){if(p!=null){return p.replace(/\\/*$/,'')+'/';}return null;}var documentDirectory=normalizeEndingSlash(ExponentFileSystem.documentDirectory);var cacheDirectory=normalizeEndingSlash(ExponentFileSystem.cacheDirectory);var bundledAssets=ExponentFileSystem.bundledAssets,bundleDirectory=ExponentFileSystem.bundleDirectory;function getInfoAsync(){return _getInfoAsync.apply(this,arguments);}function _getInfoAsync(){_getInfoAsync=_asyncToGenerator(function*(fileUri){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};if(!ExponentFileSystem.getInfoAsync){throw new UnavailabilityError('expo-file-system','getInfoAsync');}return yield ExponentFileSystem.getInfoAsync(fileUri,options);});return _getInfoAsync.apply(this,arguments);}function readAsStringAsync(){return _readAsStringAsync.apply(this,arguments);}function _readAsStringAsync(){_readAsStringAsync=_asyncToGenerator(function*(fileUri,options){if(!ExponentFileSystem.readAsStringAsync){throw new UnavailabilityError('expo-file-system','readAsStringAsync');}return yield ExponentFileSystem.readAsStringAsync(fileUri,options||{});});return _readAsStringAsync.apply(this,arguments);}function getContentUriAsync(){return _getContentUriAsync.apply(this,arguments);}function _getContentUriAsync(){_getContentUriAsync=_asyncToGenerator(function*(fileUri){if(Platform$1.OS==='android'){if(!ExponentFileSystem.getContentUriAsync){throw new UnavailabilityError('expo-file-system','getContentUriAsync');}return yield ExponentFileSystem.getContentUriAsync(fileUri);}else {return new Promise(function(resolve){resolve(fileUri);});}});return _getContentUriAsync.apply(this,arguments);}function writeAsStringAsync(){return _writeAsStringAsync.apply(this,arguments);}function _writeAsStringAsync(){_writeAsStringAsync=_asyncToGenerator(function*(fileUri,contents){var options=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};if(!ExponentFileSystem.writeAsStringAsync){throw new UnavailabilityError('expo-file-system','writeAsStringAsync');}return yield ExponentFileSystem.writeAsStringAsync(fileUri,contents,options);});return _writeAsStringAsync.apply(this,arguments);}function deleteAsync(){return _deleteAsync.apply(this,arguments);}function _deleteAsync(){_deleteAsync=_asyncToGenerator(function*(fileUri){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};if(!ExponentFileSystem.deleteAsync){throw new UnavailabilityError('expo-file-system','deleteAsync');}return yield ExponentFileSystem.deleteAsync(fileUri,options);});return _deleteAsync.apply(this,arguments);}function deleteLegacyDocumentDirectoryAndroid(){return _deleteLegacyDocumentDirectoryAndroid.apply(this,arguments);}function _deleteLegacyDocumentDirectoryAndroid(){_deleteLegacyDocumentDirectoryAndroid=_asyncToGenerator(function*(){if(Platform$1.OS!=='android'||documentDirectory==null){return;}return yield deleteAsync(documentDirectory+"ExperienceData/",{idempotent:true});});return _deleteLegacyDocumentDirectoryAndroid.apply(this,arguments);}function moveAsync(){return _moveAsync.apply(this,arguments);}function _moveAsync(){_moveAsync=_asyncToGenerator(function*(options){if(!ExponentFileSystem.moveAsync){throw new UnavailabilityError('expo-file-system','moveAsync');}return yield ExponentFileSystem.moveAsync(options);});return _moveAsync.apply(this,arguments);}function copyAsync(){return _copyAsync.apply(this,arguments);}function _copyAsync(){_copyAsync=_asyncToGenerator(function*(options){if(!ExponentFileSystem.copyAsync){throw new UnavailabilityError('expo-file-system','copyAsync');}return yield ExponentFileSystem.copyAsync(options);});return _copyAsync.apply(this,arguments);}function makeDirectoryAsync(){return _makeDirectoryAsync.apply(this,arguments);}function _makeDirectoryAsync(){_makeDirectoryAsync=_asyncToGenerator(function*(fileUri){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};if(!ExponentFileSystem.makeDirectoryAsync){throw new UnavailabilityError('expo-file-system','makeDirectoryAsync');}return yield ExponentFileSystem.makeDirectoryAsync(fileUri,options);});return _makeDirectoryAsync.apply(this,arguments);}function readDirectoryAsync(){return _readDirectoryAsync.apply(this,arguments);}function _readDirectoryAsync(){_readDirectoryAsync=_asyncToGenerator(function*(fileUri){if(!ExponentFileSystem.readDirectoryAsync){throw new UnavailabilityError('expo-file-system','readDirectoryAsync');}return yield ExponentFileSystem.readDirectoryAsync(fileUri,{});});return _readDirectoryAsync.apply(this,arguments);}function getFreeDiskStorageAsync(){return _getFreeDiskStorageAsync.apply(this,arguments);}function _getFreeDiskStorageAsync(){_getFreeDiskStorageAsync=_asyncToGenerator(function*(){if(!ExponentFileSystem.getFreeDiskStorageAsync){throw new UnavailabilityError('expo-file-system','getFreeDiskStorageAsync');}return yield ExponentFileSystem.getFreeDiskStorageAsync();});return _getFreeDiskStorageAsync.apply(this,arguments);}function getTotalDiskCapacityAsync(){return _getTotalDiskCapacityAsync.apply(this,arguments);}function _getTotalDiskCapacityAsync(){_getTotalDiskCapacityAsync=_asyncToGenerator(function*(){if(!ExponentFileSystem.getTotalDiskCapacityAsync){throw new UnavailabilityError('expo-file-system','getTotalDiskCapacityAsync');}return yield ExponentFileSystem.getTotalDiskCapacityAsync();});return _getTotalDiskCapacityAsync.apply(this,arguments);}function downloadAsync(){return _downloadAsync.apply(this,arguments);}function _downloadAsync(){_downloadAsync=_asyncToGenerator(function*(uri,fileUri){var options=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};if(!ExponentFileSystem.downloadAsync){throw new UnavailabilityError('expo-file-system','downloadAsync');}return yield ExponentFileSystem.downloadAsync(uri,fileUri,Object.assign({sessionType:FileSystemSessionType.BACKGROUND},options));});return _downloadAsync.apply(this,arguments);}function uploadAsync(){return _uploadAsync.apply(this,arguments);}function _uploadAsync(){_uploadAsync=_asyncToGenerator(function*(url,fileUri){var options=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};if(!ExponentFileSystem.uploadAsync){throw new UnavailabilityError('expo-file-system','uploadAsync');}return yield ExponentFileSystem.uploadAsync(url,fileUri,Object.assign({sessionType:FileSystemSessionType.BACKGROUND,uploadType:FileSystemUploadType.BINARY_CONTENT},options,{httpMethod:(options.httpMethod||'POST').toUpperCase()}));});return _uploadAsync.apply(this,arguments);}function createDownloadResumable(uri,fileUri,options,callback,resumeData){return new DownloadResumable(uri,fileUri,options,callback,resumeData);}function createUploadTask(url,fileUri,options,callback){return new UploadTask(url,fileUri,options,callback);}var FileSystemCancellableNetworkTask=function(){function FileSystemCancellableNetworkTask(){_classCallCheck(this,FileSystemCancellableNetworkTask);this._uuid=uuid_1.v4();this.taskWasCanceled=false;this.emitter=new EventEmitter(ExponentFileSystem);}_createClass(FileSystemCancellableNetworkTask,[{key:"cancelAsync",value:function(){var _cancelAsync=_asyncToGenerator(function*(){if(!ExponentFileSystem.networkTaskCancelAsync){throw new UnavailabilityError('expo-file-system','networkTaskCancelAsync');}this.removeSubscription();this.taskWasCanceled=true;return yield ExponentFileSystem.networkTaskCancelAsync(this.uuid);});function cancelAsync(){return _cancelAsync.apply(this,arguments);}return cancelAsync;}()},{key:"isTaskCancelled",value:function isTaskCancelled(){if(this.taskWasCanceled){console.warn('This task was already canceled.');return true;}return false;}},{key:"uuid",get:function get(){return this._uuid;}},{key:"addSubscription",value:function addSubscription(){var _this=this;if(this.subscription){return;}this.subscription=this.emitter.addListener(this.getEventName(),function(event){if(event.uuid===_this.uuid){var callback=_this.getCallback();if(callback){callback(event.data);}}});}},{key:"removeSubscription",value:function removeSubscription(){if(!this.subscription){return;}this.emitter.removeSubscription(this.subscription);this.subscription=null;}}]);return FileSystemCancellableNetworkTask;}();var UploadTask=function(_FileSystemCancellabl){_inherits(UploadTask,_FileSystemCancellabl);var _super=_createSuper(UploadTask);function UploadTask(url,fileUri,options,callback){var _options$httpMethod;var _this2;_classCallCheck(this,UploadTask);_this2=_super.call(this);_this2.url=url;_this2.fileUri=fileUri;_this2.callback=callback;var httpMethod=(options==null?void 0:(_options$httpMethod=options.httpMethod)==null?void 0:_options$httpMethod.toUpperCase())||'POST';_this2.options=Object.assign({sessionType:FileSystemSessionType.BACKGROUND,uploadType:FileSystemUploadType.BINARY_CONTENT},options,{httpMethod:httpMethod});return _this2;}_createClass(UploadTask,[{key:"getEventName",value:function getEventName(){return 'expo-file-system.uploadProgress';}},{key:"getCallback",value:function getCallback(){return this.callback;}},{key:"uploadAsync",value:function(){var _uploadAsync2=_asyncToGenerator(function*(){if(!ExponentFileSystem.uploadTaskStartAsync){throw new UnavailabilityError('expo-file-system','uploadTaskStartAsync');}if(this.isTaskCancelled()){return;}this.addSubscription();var result=yield ExponentFileSystem.uploadTaskStartAsync(this.url,this.fileUri,this.uuid,this.options);this.removeSubscription();return result;});function uploadAsync(){return _uploadAsync2.apply(this,arguments);}return uploadAsync;}()}]);return UploadTask;}(FileSystemCancellableNetworkTask);var DownloadResumable=function(_FileSystemCancellabl2){_inherits(DownloadResumable,_FileSystemCancellabl2);var _super2=_createSuper(DownloadResumable);function DownloadResumable(url,_fileUri){var _this3;var options=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var callback=arguments.length>3?arguments[3]:undefined;var resumeData=arguments.length>4?arguments[4]:undefined;_classCallCheck(this,DownloadResumable);_this3=_super2.call(this);_this3.url=url;_this3._fileUri=_fileUri;_this3.options=options;_this3.callback=callback;_this3.resumeData=resumeData;return _this3;}_createClass(DownloadResumable,[{key:"fileUri",get:function get(){return this._fileUri;}},{key:"getEventName",value:function getEventName(){return 'expo-file-system.downloadProgress';}},{key:"getCallback",value:function getCallback(){return this.callback;}},{key:"downloadAsync",value:function(){var _downloadAsync2=_asyncToGenerator(function*(){if(!ExponentFileSystem.downloadResumableStartAsync){throw new UnavailabilityError('expo-file-system','downloadResumableStartAsync');}if(this.isTaskCancelled()){return;}this.addSubscription();return yield ExponentFileSystem.downloadResumableStartAsync(this.url,this._fileUri,this.uuid,this.options,this.resumeData);});function downloadAsync(){return _downloadAsync2.apply(this,arguments);}return downloadAsync;}()},{key:"pauseAsync",value:function(){var _pauseAsync=_asyncToGenerator(function*(){if(!ExponentFileSystem.downloadResumablePauseAsync){throw new UnavailabilityError('expo-file-system','downloadResumablePauseAsync');}if(this.isTaskCancelled()){return {fileUri:this._fileUri,options:this.options,url:this.url};}var pauseResult=yield ExponentFileSystem.downloadResumablePauseAsync(this.uuid);this.removeSubscription();if(pauseResult){this.resumeData=pauseResult.resumeData;return this.savable();}else {throw new Error('Unable to generate a savable pause state');}});function pauseAsync(){return _pauseAsync.apply(this,arguments);}return pauseAsync;}()},{key:"resumeAsync",value:function(){var _resumeAsync=_asyncToGenerator(function*(){if(!ExponentFileSystem.downloadResumableStartAsync){throw new UnavailabilityError('expo-file-system','downloadResumableStartAsync');}if(this.isTaskCancelled()){return;}this.addSubscription();return yield ExponentFileSystem.downloadResumableStartAsync(this.url,this.fileUri,this.uuid,this.options,this.resumeData);});function resumeAsync(){return _resumeAsync.apply(this,arguments);}return resumeAsync;}()},{key:"savable",value:function savable(){return {url:this.url,fileUri:this.fileUri,options:this.options,resumeData:this.resumeData};}}]);return DownloadResumable;}(FileSystemCancellableNetworkTask);var baseReadAsStringAsync=readAsStringAsync;var baseWriteAsStringAsync=writeAsStringAsync;var baseDeleteAsync=deleteAsync;var baseMoveAsync=moveAsync;var baseCopyAsync=copyAsync;var StorageAccessFramework;(function(StorageAccessFramework){StorageAccessFramework.getUriForDirectoryInRoot=function getUriForDirectoryInRoot(folderName){return "content://com.android.externalstorage.documents/tree/primary:"+folderName+"/document/primary:"+folderName;};function requestDirectoryPermissionsAsync(){return _requestDirectoryPermissionsAsync.apply(this,arguments);}function _requestDirectoryPermissionsAsync(){_requestDirectoryPermissionsAsync=_asyncToGenerator(function*(){var initialFileUrl=arguments.length>0&&arguments[0]!==undefined?arguments[0]:null;if(!ExponentFileSystem.requestDirectoryPermissionsAsync){throw new UnavailabilityError('expo-file-system','StorageAccessFramework.requestDirectoryPermissionsAsync');}return yield ExponentFileSystem.requestDirectoryPermissionsAsync(initialFileUrl);});return _requestDirectoryPermissionsAsync.apply(this,arguments);}StorageAccessFramework.requestDirectoryPermissionsAsync=requestDirectoryPermissionsAsync;function readDirectoryAsync(_x16){return _readDirectoryAsync2.apply(this,arguments);}function _readDirectoryAsync2(){_readDirectoryAsync2=_asyncToGenerator(function*(dirUri){if(!ExponentFileSystem.readSAFDirectoryAsync){throw new UnavailabilityError('expo-file-system','StorageAccessFramework.readDirectoryAsync');}return yield ExponentFileSystem.readSAFDirectoryAsync(dirUri,{});});return _readDirectoryAsync2.apply(this,arguments);}StorageAccessFramework.readDirectoryAsync=readDirectoryAsync;function makeDirectoryAsync(_x17,_x18){return _makeDirectoryAsync2.apply(this,arguments);}function _makeDirectoryAsync2(){_makeDirectoryAsync2=_asyncToGenerator(function*(parentUri,dirName){if(!ExponentFileSystem.makeSAFDirectoryAsync){throw new UnavailabilityError('expo-file-system','StorageAccessFramework.makeDirectoryAsync');}return yield ExponentFileSystem.makeSAFDirectoryAsync(parentUri,dirName);});return _makeDirectoryAsync2.apply(this,arguments);}StorageAccessFramework.makeDirectoryAsync=makeDirectoryAsync;function createFileAsync(_x19,_x20,_x21){return _createFileAsync.apply(this,arguments);}function _createFileAsync(){_createFileAsync=_asyncToGenerator(function*(parentUri,fileName,mimeType){if(!ExponentFileSystem.createSAFFileAsync){throw new UnavailabilityError('expo-file-system','StorageAccessFramework.createFileAsync');}return yield ExponentFileSystem.createSAFFileAsync(parentUri,fileName,mimeType);});return _createFileAsync.apply(this,arguments);}StorageAccessFramework.createFileAsync=createFileAsync;StorageAccessFramework.writeAsStringAsync=baseWriteAsStringAsync;StorageAccessFramework.readAsStringAsync=baseReadAsStringAsync;StorageAccessFramework.deleteAsync=baseDeleteAsync;StorageAccessFramework.moveAsync=baseMoveAsync;StorageAccessFramework.copyAsync=baseCopyAsync;})(StorageAccessFramework||(StorageAccessFramework={}));
288
+ function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else {result=Super.apply(this,arguments);}return _possibleConstructorReturn(this,result);};}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true;}catch(e){return false;}}if(!ExponentFileSystem){console.warn("No native ExponentFileSystem module found, are you sure the expo-file-system's module is linked properly?");}new EventEmitter(ExponentFileSystem);function normalizeEndingSlash(p){if(p!=null){return p.replace(/\\/*$/,'')+'/';}return null;}var documentDirectory=normalizeEndingSlash(ExponentFileSystem.documentDirectory);var cacheDirectory=normalizeEndingSlash(ExponentFileSystem.cacheDirectory);var bundledAssets=ExponentFileSystem.bundledAssets,bundleDirectory=ExponentFileSystem.bundleDirectory;function getInfoAsync(){return _getInfoAsync.apply(this,arguments);}function _getInfoAsync(){_getInfoAsync=_asyncToGenerator(function*(fileUri){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};if(!ExponentFileSystem.getInfoAsync){throw new UnavailabilityError('expo-file-system','getInfoAsync');}return yield ExponentFileSystem.getInfoAsync(fileUri,options);});return _getInfoAsync.apply(this,arguments);}function readAsStringAsync(){return _readAsStringAsync.apply(this,arguments);}function _readAsStringAsync(){_readAsStringAsync=_asyncToGenerator(function*(fileUri){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};if(!ExponentFileSystem.readAsStringAsync){throw new UnavailabilityError('expo-file-system','readAsStringAsync');}return yield ExponentFileSystem.readAsStringAsync(fileUri,options);});return _readAsStringAsync.apply(this,arguments);}function getContentUriAsync(){return _getContentUriAsync.apply(this,arguments);}function _getContentUriAsync(){_getContentUriAsync=_asyncToGenerator(function*(fileUri){if(Platform$1.OS==='android'){if(!ExponentFileSystem.getContentUriAsync){throw new UnavailabilityError('expo-file-system','getContentUriAsync');}return yield ExponentFileSystem.getContentUriAsync(fileUri);}else {return fileUri;}});return _getContentUriAsync.apply(this,arguments);}function writeAsStringAsync(){return _writeAsStringAsync.apply(this,arguments);}function _writeAsStringAsync(){_writeAsStringAsync=_asyncToGenerator(function*(fileUri,contents){var options=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};if(!ExponentFileSystem.writeAsStringAsync){throw new UnavailabilityError('expo-file-system','writeAsStringAsync');}return yield ExponentFileSystem.writeAsStringAsync(fileUri,contents,options);});return _writeAsStringAsync.apply(this,arguments);}function deleteAsync(){return _deleteAsync.apply(this,arguments);}function _deleteAsync(){_deleteAsync=_asyncToGenerator(function*(fileUri){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};if(!ExponentFileSystem.deleteAsync){throw new UnavailabilityError('expo-file-system','deleteAsync');}return yield ExponentFileSystem.deleteAsync(fileUri,options);});return _deleteAsync.apply(this,arguments);}function deleteLegacyDocumentDirectoryAndroid(){return _deleteLegacyDocumentDirectoryAndroid.apply(this,arguments);}function _deleteLegacyDocumentDirectoryAndroid(){_deleteLegacyDocumentDirectoryAndroid=_asyncToGenerator(function*(){if(Platform$1.OS!=='android'||documentDirectory==null){return;}return yield deleteAsync(documentDirectory+"ExperienceData/",{idempotent:true});});return _deleteLegacyDocumentDirectoryAndroid.apply(this,arguments);}function moveAsync(){return _moveAsync.apply(this,arguments);}function _moveAsync(){_moveAsync=_asyncToGenerator(function*(options){if(!ExponentFileSystem.moveAsync){throw new UnavailabilityError('expo-file-system','moveAsync');}return yield ExponentFileSystem.moveAsync(options);});return _moveAsync.apply(this,arguments);}function copyAsync(){return _copyAsync.apply(this,arguments);}function _copyAsync(){_copyAsync=_asyncToGenerator(function*(options){if(!ExponentFileSystem.copyAsync){throw new UnavailabilityError('expo-file-system','copyAsync');}return yield ExponentFileSystem.copyAsync(options);});return _copyAsync.apply(this,arguments);}function makeDirectoryAsync(){return _makeDirectoryAsync.apply(this,arguments);}function _makeDirectoryAsync(){_makeDirectoryAsync=_asyncToGenerator(function*(fileUri){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};if(!ExponentFileSystem.makeDirectoryAsync){throw new UnavailabilityError('expo-file-system','makeDirectoryAsync');}return yield ExponentFileSystem.makeDirectoryAsync(fileUri,options);});return _makeDirectoryAsync.apply(this,arguments);}function readDirectoryAsync(){return _readDirectoryAsync.apply(this,arguments);}function _readDirectoryAsync(){_readDirectoryAsync=_asyncToGenerator(function*(fileUri){if(!ExponentFileSystem.readDirectoryAsync){throw new UnavailabilityError('expo-file-system','readDirectoryAsync');}return yield ExponentFileSystem.readDirectoryAsync(fileUri,{});});return _readDirectoryAsync.apply(this,arguments);}function getFreeDiskStorageAsync(){return _getFreeDiskStorageAsync.apply(this,arguments);}function _getFreeDiskStorageAsync(){_getFreeDiskStorageAsync=_asyncToGenerator(function*(){if(!ExponentFileSystem.getFreeDiskStorageAsync){throw new UnavailabilityError('expo-file-system','getFreeDiskStorageAsync');}return yield ExponentFileSystem.getFreeDiskStorageAsync();});return _getFreeDiskStorageAsync.apply(this,arguments);}function getTotalDiskCapacityAsync(){return _getTotalDiskCapacityAsync.apply(this,arguments);}function _getTotalDiskCapacityAsync(){_getTotalDiskCapacityAsync=_asyncToGenerator(function*(){if(!ExponentFileSystem.getTotalDiskCapacityAsync){throw new UnavailabilityError('expo-file-system','getTotalDiskCapacityAsync');}return yield ExponentFileSystem.getTotalDiskCapacityAsync();});return _getTotalDiskCapacityAsync.apply(this,arguments);}function downloadAsync(){return _downloadAsync.apply(this,arguments);}function _downloadAsync(){_downloadAsync=_asyncToGenerator(function*(uri,fileUri){var options=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};if(!ExponentFileSystem.downloadAsync){throw new UnavailabilityError('expo-file-system','downloadAsync');}return yield ExponentFileSystem.downloadAsync(uri,fileUri,Object.assign({sessionType:FileSystemSessionType.BACKGROUND},options));});return _downloadAsync.apply(this,arguments);}function uploadAsync(){return _uploadAsync.apply(this,arguments);}function _uploadAsync(){_uploadAsync=_asyncToGenerator(function*(url,fileUri){var options=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};if(!ExponentFileSystem.uploadAsync){throw new UnavailabilityError('expo-file-system','uploadAsync');}return yield ExponentFileSystem.uploadAsync(url,fileUri,Object.assign({sessionType:FileSystemSessionType.BACKGROUND,uploadType:FileSystemUploadType.BINARY_CONTENT},options,{httpMethod:(options.httpMethod||'POST').toUpperCase()}));});return _uploadAsync.apply(this,arguments);}function createDownloadResumable(uri,fileUri,options,callback,resumeData){return new DownloadResumable(uri,fileUri,options,callback,resumeData);}function createUploadTask(url,fileUri,options,callback){return new UploadTask(url,fileUri,options,callback);}function isUploadProgressData(data){return 'totalBytesSent'in data;}var FileSystemCancellableNetworkTask=function(){function FileSystemCancellableNetworkTask(){_classCallCheck(this,FileSystemCancellableNetworkTask);this._uuid=uuid_1.v4();this.taskWasCanceled=false;this.emitter=new EventEmitter(ExponentFileSystem);}_createClass(FileSystemCancellableNetworkTask,[{key:"cancelAsync",value:function(){var _cancelAsync=_asyncToGenerator(function*(){if(!ExponentFileSystem.networkTaskCancelAsync){throw new UnavailabilityError('expo-file-system','networkTaskCancelAsync');}this.removeSubscription();this.taskWasCanceled=true;return yield ExponentFileSystem.networkTaskCancelAsync(this.uuid);});function cancelAsync(){return _cancelAsync.apply(this,arguments);}return cancelAsync;}()},{key:"isTaskCancelled",value:function isTaskCancelled(){if(this.taskWasCanceled){console.warn('This task was already canceled.');return true;}return false;}},{key:"uuid",get:function get(){return this._uuid;}},{key:"addSubscription",value:function addSubscription(){var _this=this;if(this.subscription){return;}this.subscription=this.emitter.addListener(this.getEventName(),function(event){if(event.uuid===_this.uuid){var callback=_this.getCallback();if(callback){if(isUploadProgressData(event.data)){var data=Object.assign({},event.data,{get totalByteSent(){console.warn('Key "totalByteSent" in File System UploadProgressData is deprecated and will be removed in SDK 49, use "totalBytesSent" instead');return this.totalBytesSent;}});return callback(data);}callback(event.data);}}});}},{key:"removeSubscription",value:function removeSubscription(){if(!this.subscription){return;}this.emitter.removeSubscription(this.subscription);this.subscription=null;}}]);return FileSystemCancellableNetworkTask;}();var UploadTask=function(_FileSystemCancellabl){_inherits(UploadTask,_FileSystemCancellabl);var _super=_createSuper(UploadTask);function UploadTask(url,fileUri,options,callback){var _options$httpMethod;var _this2;_classCallCheck(this,UploadTask);_this2=_super.call(this);_this2.url=url;_this2.fileUri=fileUri;_this2.callback=callback;var httpMethod=(options==null?void 0:(_options$httpMethod=options.httpMethod)==null?void 0:_options$httpMethod.toUpperCase())||'POST';_this2.options=Object.assign({sessionType:FileSystemSessionType.BACKGROUND,uploadType:FileSystemUploadType.BINARY_CONTENT},options,{httpMethod:httpMethod});return _this2;}_createClass(UploadTask,[{key:"getEventName",value:function getEventName(){return 'expo-file-system.uploadProgress';}},{key:"getCallback",value:function getCallback(){return this.callback;}},{key:"uploadAsync",value:function(){var _uploadAsync2=_asyncToGenerator(function*(){if(!ExponentFileSystem.uploadTaskStartAsync){throw new UnavailabilityError('expo-file-system','uploadTaskStartAsync');}if(this.isTaskCancelled()){return;}this.addSubscription();var result=yield ExponentFileSystem.uploadTaskStartAsync(this.url,this.fileUri,this.uuid,this.options);this.removeSubscription();return result;});function uploadAsync(){return _uploadAsync2.apply(this,arguments);}return uploadAsync;}()}]);return UploadTask;}(FileSystemCancellableNetworkTask);var DownloadResumable=function(_FileSystemCancellabl2){_inherits(DownloadResumable,_FileSystemCancellabl2);var _super2=_createSuper(DownloadResumable);function DownloadResumable(url,_fileUri){var _this3;var options=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var callback=arguments.length>3?arguments[3]:undefined;var resumeData=arguments.length>4?arguments[4]:undefined;_classCallCheck(this,DownloadResumable);_this3=_super2.call(this);_this3.url=url;_this3._fileUri=_fileUri;_this3.options=options;_this3.callback=callback;_this3.resumeData=resumeData;return _this3;}_createClass(DownloadResumable,[{key:"fileUri",get:function get(){return this._fileUri;}},{key:"getEventName",value:function getEventName(){return 'expo-file-system.downloadProgress';}},{key:"getCallback",value:function getCallback(){return this.callback;}},{key:"downloadAsync",value:function(){var _downloadAsync2=_asyncToGenerator(function*(){if(!ExponentFileSystem.downloadResumableStartAsync){throw new UnavailabilityError('expo-file-system','downloadResumableStartAsync');}if(this.isTaskCancelled()){return;}this.addSubscription();return yield ExponentFileSystem.downloadResumableStartAsync(this.url,this._fileUri,this.uuid,this.options,this.resumeData);});function downloadAsync(){return _downloadAsync2.apply(this,arguments);}return downloadAsync;}()},{key:"pauseAsync",value:function(){var _pauseAsync=_asyncToGenerator(function*(){if(!ExponentFileSystem.downloadResumablePauseAsync){throw new UnavailabilityError('expo-file-system','downloadResumablePauseAsync');}if(this.isTaskCancelled()){return {fileUri:this._fileUri,options:this.options,url:this.url};}var pauseResult=yield ExponentFileSystem.downloadResumablePauseAsync(this.uuid);this.removeSubscription();if(pauseResult){this.resumeData=pauseResult.resumeData;return this.savable();}else {throw new Error('Unable to generate a savable pause state');}});function pauseAsync(){return _pauseAsync.apply(this,arguments);}return pauseAsync;}()},{key:"resumeAsync",value:function(){var _resumeAsync=_asyncToGenerator(function*(){if(!ExponentFileSystem.downloadResumableStartAsync){throw new UnavailabilityError('expo-file-system','downloadResumableStartAsync');}if(this.isTaskCancelled()){return;}this.addSubscription();return yield ExponentFileSystem.downloadResumableStartAsync(this.url,this.fileUri,this.uuid,this.options,this.resumeData);});function resumeAsync(){return _resumeAsync.apply(this,arguments);}return resumeAsync;}()},{key:"savable",value:function savable(){return {url:this.url,fileUri:this.fileUri,options:this.options,resumeData:this.resumeData};}}]);return DownloadResumable;}(FileSystemCancellableNetworkTask);var baseReadAsStringAsync=readAsStringAsync;var baseWriteAsStringAsync=writeAsStringAsync;var baseDeleteAsync=deleteAsync;var baseMoveAsync=moveAsync;var baseCopyAsync=copyAsync;var StorageAccessFramework;(function(StorageAccessFramework){StorageAccessFramework.getUriForDirectoryInRoot=function getUriForDirectoryInRoot(folderName){return "content://com.android.externalstorage.documents/tree/primary:"+folderName+"/document/primary:"+folderName;};function requestDirectoryPermissionsAsync(){return _requestDirectoryPermissionsAsync.apply(this,arguments);}function _requestDirectoryPermissionsAsync(){_requestDirectoryPermissionsAsync=_asyncToGenerator(function*(){var initialFileUrl=arguments.length>0&&arguments[0]!==undefined?arguments[0]:null;if(!ExponentFileSystem.requestDirectoryPermissionsAsync){throw new UnavailabilityError('expo-file-system','StorageAccessFramework.requestDirectoryPermissionsAsync');}return yield ExponentFileSystem.requestDirectoryPermissionsAsync(initialFileUrl);});return _requestDirectoryPermissionsAsync.apply(this,arguments);}StorageAccessFramework.requestDirectoryPermissionsAsync=requestDirectoryPermissionsAsync;function readDirectoryAsync(_x15){return _readDirectoryAsync2.apply(this,arguments);}function _readDirectoryAsync2(){_readDirectoryAsync2=_asyncToGenerator(function*(dirUri){if(!ExponentFileSystem.readSAFDirectoryAsync){throw new UnavailabilityError('expo-file-system','StorageAccessFramework.readDirectoryAsync');}return yield ExponentFileSystem.readSAFDirectoryAsync(dirUri,{});});return _readDirectoryAsync2.apply(this,arguments);}StorageAccessFramework.readDirectoryAsync=readDirectoryAsync;function makeDirectoryAsync(_x16,_x17){return _makeDirectoryAsync2.apply(this,arguments);}function _makeDirectoryAsync2(){_makeDirectoryAsync2=_asyncToGenerator(function*(parentUri,dirName){if(!ExponentFileSystem.makeSAFDirectoryAsync){throw new UnavailabilityError('expo-file-system','StorageAccessFramework.makeDirectoryAsync');}return yield ExponentFileSystem.makeSAFDirectoryAsync(parentUri,dirName);});return _makeDirectoryAsync2.apply(this,arguments);}StorageAccessFramework.makeDirectoryAsync=makeDirectoryAsync;function createFileAsync(_x18,_x19,_x20){return _createFileAsync.apply(this,arguments);}function _createFileAsync(){_createFileAsync=_asyncToGenerator(function*(parentUri,fileName,mimeType){if(!ExponentFileSystem.createSAFFileAsync){throw new UnavailabilityError('expo-file-system','StorageAccessFramework.createFileAsync');}return yield ExponentFileSystem.createSAFFileAsync(parentUri,fileName,mimeType);});return _createFileAsync.apply(this,arguments);}StorageAccessFramework.createFileAsync=createFileAsync;StorageAccessFramework.writeAsStringAsync=baseWriteAsStringAsync;StorageAccessFramework.readAsStringAsync=baseReadAsStringAsync;StorageAccessFramework.deleteAsync=baseDeleteAsync;StorageAccessFramework.moveAsync=baseMoveAsync;StorageAccessFramework.copyAsync=baseCopyAsync;})(StorageAccessFramework||(StorageAccessFramework={}));
290
289
 
291
290
  var fileBuild = /*#__PURE__*/Object.freeze({
292
291
  __proto__: null,
293
- get EncodingType () { return EncodingType; },
294
- get FileSystemSessionType () { return FileSystemSessionType; },
295
- get FileSystemUploadType () { return FileSystemUploadType; },
296
292
  documentDirectory: documentDirectory,
297
293
  cacheDirectory: cacheDirectory,
298
294
  bundledAssets: bundledAssets,
@@ -452,18 +448,3 @@ export { Cell as default };
452
448
  ",
453
449
  ]
454
450
  `;
455
-
456
- exports[`build_components svg transform 1`] = `
457
- [
458
- "import 'react';
459
- import { jsx } from 'react/jsx-runtime';
460
-
461
- var Logo = require('./assets/rollup-logo-a3c30bf4.svg');
462
-
463
- function index(){return jsx(Logo,{className:"logo",width:120,height:40});}
464
-
465
- export { index as default };
466
- ",
467
- undefined,
468
- ]
469
- `;
@@ -50,7 +50,7 @@ describe('build_components', () => {
50
50
  return {
51
51
  ...others,
52
52
  input: Object.entries(input as Record<string, string>).reduce(
53
- (pre, cur) => Object.assign(pre, { [cur[0].replace('components/', '')]: cur[1] }),
53
+ (pre, cur) => Object.assign(pre, { [cur[0].replace('components' + path.sep, '')]: cur[1] }),
54
54
  {}
55
55
  ),
56
56
  output: { dir: path.resolve(__dirname, './mock/dist/modify-config') }
@@ -68,7 +68,7 @@ describe('build_components', () => {
68
68
  external: ['react', 'react-native', /@tarojs\/components-rn/, /@tarojs\/taro-rn/, /@babel\/runtime/],
69
69
  externalResolve: () => {}
70
70
  })
71
- expect(getCode(result)).toMatchSnapshot()
71
+ expect(getCode(result))
72
72
  })
73
73
 
74
74
  it('named export', async () => {
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,uDAA8D;AAC9D,iDAAqC;AACrC,2BAAwC;AACxC,gCAA+B;AAC/B,+BAAoC;AAEpC,8DAAqD;AAErD,uCAAuC;AACvC,MAAM,KAAK,GAAG,CAAC,iBAAiB,EAAE,UAAU,CAAC,CAAA;AAC7C,SAAS,YAAY;IACnB,KAAK,C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Native build tool for taro",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -21,7 +21,7 @@
21
21
  "npm": ">=6.0.0"
22
22
  },
23
23
  "dependencies": {
24
- "@rollup/plugin-babel": "^5.3.1",
24
+ "@rollup/plugin-babel": "^6.0.3",
25
25
  "@rollup/plugin-commonjs": "^20.0.0",
26
26
  "@rollup/plugin-json": "^4.1.0",
27
27
  "@rollup/plugin-node-resolve": "^13.3.0",
@@ -30,10 +30,10 @@
30
30
  "fs-extra": "^8.0.1",
31
31
  "lodash": "^4.17.21",
32
32
  "rollup-plugin-image-file": "^1.0.2",
33
- "@tarojs/helper": "3.8.0-canary.0",
34
- "@tarojs/rn-style-transformer": "3.8.0-canary.0",
35
- "@tarojs/rn-supporter": "3.8.0-canary.0",
36
- "@tarojs/rn-transformer": "3.8.0-canary.0"
33
+ "@tarojs/rn-supporter": "4.0.0-beta.0",
34
+ "@tarojs/helper": "4.0.0-beta.0",
35
+ "@tarojs/rn-style-transformer": "4.0.0-beta.0",
36
+ "@tarojs/rn-transformer": "4.0.0-beta.0"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@babel/core": "^7.14.5",
@@ -41,20 +41,20 @@
41
41
  "acorn": "^8.0.4",
42
42
  "babel-plugin-global-define": "1.0.3",
43
43
  "babel-plugin-jsx-attributes-array-to-object": "0.3.0",
44
- "expo": "~47.0.3",
45
- "expo-file-system": "~15.1.1",
44
+ "expo": "~48.0.0",
45
+ "expo-file-system": "~15.2.2",
46
46
  "jest": "^29.3.1",
47
47
  "jest-cli": "^29.3.1",
48
48
  "jest-environment-node": "^29.5.0",
49
- "react": "18.1.0",
49
+ "react": "18.2.0",
50
50
  "react-is": "^16.13.0",
51
- "react-native": "^0.70.5",
51
+ "react-native": "^0.71.3",
52
52
  "react-native-root-siblings": "^4.1.1",
53
- "react-test-renderer": "18.1.0",
53
+ "react-test-renderer": "18.2.0",
54
54
  "rollup": "^2.79.0",
55
55
  "ts-jest": "^29.0.5",
56
56
  "typescript": "^4.7.4",
57
- "babel-plugin-transform-react-jsx-to-rn-stylesheet": "3.8.0-canary.0"
57
+ "babel-plugin-transform-react-jsx-to-rn-stylesheet": "4.0.0-beta.0"
58
58
  },
59
59
  "scripts": {
60
60
  "build": "tsc",
@@ -63,6 +63,7 @@
63
63
  "test": "jest --silent",
64
64
  "test:ci": "jest --ci --silent --coverage false",
65
65
  "test:coverage": "jest --coverage",
66
- "test:dev": "jest --watch"
66
+ "test:dev": "jest --watch",
67
+ "updateSnapshot": "jest --updateSnapshot"
67
68
  }
68
69
  }
package/src/index.ts CHANGED
@@ -63,13 +63,13 @@ export default async function build (_appPath: string, config: any): Promise<any
63
63
  spawn(npxCmd, ['react-native', 'start'].concat(cliParams), {
64
64
  stdio: 'inherit'
65
65
  })
66
- if(config.qr) {
66
+ if (config.qr) {
67
67
  previewDev({
68
68
  port: parseInt(config.port) || 8081,
69
69
  })
70
70
  }
71
71
  onFinish(null)
72
- } catch(e) {
72
+ } catch (e) {
73
73
  onFinish(e)
74
74
  }
75
75
  } else {
@@ -110,7 +110,7 @@ export default async function build (_appPath: string, config: any): Promise<any
110
110
  ].concat(cliParams), {
111
111
  stdio: 'inherit'
112
112
  })
113
- if(config.qr) {
113
+ if (config.qr) {
114
114
  process.on('beforeExit', () => {
115
115
  previewProd({
116
116
  out: bundleOutput,
@@ -120,7 +120,7 @@ export default async function build (_appPath: string, config: any): Promise<any
120
120
  })
121
121
  }
122
122
  onFinish(null)
123
- } catch(e) {
123
+ } catch (e) {
124
124
  onFinish(e)
125
125
  }
126
126
  }