@@ -66,51 +66,23 @@ export default async function installPlugin(
6666 try {
6767 if ( ! isDependency ) loaderDialog . show ( ) ;
6868
69- let plugin ;
70- if (
71- pluginUrl . includes ( constants . API_BASE ) ||
72- pluginUrl . startsWith ( "file:" ) ||
73- pluginUrl . startsWith ( "content:" )
74- ) {
75- // Use native downloader for Acode registry URLs (includes auth token)
76- const tempPath = cordova . file . cacheDirectory + "plugin_download.zip" ;
77- console . log ( "downloadPluginUrl" , pluginUrl , "to" , tempPath ) ;
78-
79- await new Promise ( ( resolve , reject ) => {
80- cordova . exec ( resolve , reject , "Authenticator" , "downloadPlugin" , [
81- pluginUrl ,
82- tempPath ,
83- ] ) ;
84- } ) ;
69+ const tempPath = cordova . file . cacheDirectory + "plugin_download.zip" ;
8570
86- plugin = await fsOperation ( tempPath ) . readFile (
87- undefined ,
88- ( loaded , total ) => {
89- loaderDialog . setMessage (
90- `${ strings . loading } ${ ( ( loaded / total ) * 100 ) . toFixed ( 2 ) } %` ,
91- ) ;
92- } ,
93- ) ;
94- } else {
95- const tempPath = cordova . file . cacheDirectory + "plugin_download.zip" ;
96-
97- console . log ( "downloadPluginUrl" , pluginUrl , "to" , tempPath ) ;
98- await new Promise ( ( resolve , reject ) => {
99- cordova . exec ( resolve , reject , "Authenticator" , "downloadPlugin" , [
100- pluginUrl ,
101- tempPath ,
102- ] ) ;
103- } ) ;
71+ await new Promise ( ( resolve , reject ) => {
72+ cordova . exec ( resolve , reject , "Authenticator" , "downloadPlugin" , [
73+ pluginUrl ,
74+ tempPath ,
75+ ] ) ;
76+ } ) ;
10477
105- plugin = await fsOperation ( tempPath ) . readFile (
106- undefined ,
107- ( loaded , total ) => {
108- loaderDialog . setMessage (
109- `${ strings . loading } ${ ( ( loaded / total ) * 100 ) . toFixed ( 2 ) } %` ,
110- ) ;
111- } ,
112- ) ;
113- }
78+ let plugin = await fsOperation ( tempPath ) . readFile (
79+ undefined ,
80+ ( loaded , total ) => {
81+ loaderDialog . setMessage (
82+ `${ strings . loading } ${ ( ( loaded / total ) * 100 ) . toFixed ( 2 ) } %` ,
83+ ) ;
84+ } ,
85+ ) ;
11486
11587 if ( plugin ) {
11688 const zip = new JSZip ( ) ;
0 commit comments