@@ -24,7 +24,7 @@ import {
24
24
MAX_ASSET_GIF_SIZE ,
25
25
MAX_ASSET_NON_GIF_SIZE ,
26
26
prettyPrintSize ,
27
- WEBVIEW_ASSET_DIRNAME ,
27
+ WEB_VIEW_ASSET_DIRNAME ,
28
28
} from '@devvit/shared-types/Assets.js' ;
29
29
import {
30
30
ACTOR_SRC_PRIMARY_NAME ,
@@ -561,10 +561,10 @@ export default class Upload extends ProjectCommand {
561
561
webViewAssetMap ?: AssetMap ;
562
562
} > {
563
563
const regularAssets = await this . #getAssets( ASSET_DIRNAME , ALLOWED_ASSET_EXTENSIONS ) ;
564
- let webViewAssets = await this . #getAssets( WEBVIEW_ASSET_DIRNAME , [ ] , true ) ;
564
+ let webViewAssets = await this . #getAssets( WEB_VIEW_ASSET_DIRNAME , [ ] , true ) ;
565
565
566
566
if ( ! isWebViewEnabled && webViewAssets . length > 0 ) {
567
- ux . warn ( 'WebView is not enabled for this app. Skipping webview assets.' ) ;
567
+ ux . warn ( 'WebView is not enabled for this app. Skipping WebView assets.' ) ;
568
568
webViewAssets = [ ] ;
569
569
}
570
570
@@ -591,7 +591,7 @@ export default class Upload extends ProjectCommand {
591
591
592
592
// regular assets go to Media Service
593
593
const assetMap = await this . #processRegularAssets( regularAssets ) ;
594
- // webroot assets go to webview storage
594
+ // webroot assets go to WebView storage
595
595
const webViewAssetMap = await this . #processWebViewAssets( webViewAssets ) ;
596
596
597
597
return { assetMap, webViewAssetMap } ;
@@ -600,7 +600,7 @@ export default class Upload extends ProjectCommand {
600
600
async #getAssets(
601
601
folder : string ,
602
602
allowedExtensions : string [ ] = [ ] ,
603
- webviewAssets : boolean = false
603
+ webViewAssets : boolean = false
604
604
) : Promise < MediaSignatureWithContents [ ] > {
605
605
if ( ! ( await dirExists ( path . join ( this . projectRoot , folder ) ) ) ) {
606
606
// Return early if there isn't an assets directory
@@ -633,7 +633,7 @@ export default class Upload extends ProjectCommand {
633
633
filePath : filename ,
634
634
size,
635
635
hash,
636
- isWebviewAsset : webviewAssets ,
636
+ isWebviewAsset : webViewAssets ,
637
637
contents,
638
638
} ;
639
639
} )
@@ -688,13 +688,13 @@ export default class Upload extends ProjectCommand {
688
688
return { } ;
689
689
}
690
690
691
- ux . action . start ( `Checking for new webview assets to upload...` ) ;
691
+ ux . action . start ( `Checking for new WebView assets to upload...` ) ;
692
692
693
693
const assetMap = await this . #uploadNewAssets( assets , true ) ;
694
694
695
- ux . action . stop ( `Found ${ assets . length } new webview asset${ assets . length === 1 ? '' : 's' } .` ) ;
695
+ ux . action . stop ( `Found ${ assets . length } new WebView asset${ assets . length === 1 ? '' : 's' } .` ) ;
696
696
697
- // only return the html files for the webview assets
697
+ // only return the html files for the WebView assets
698
698
return Object . keys ( assetMap ) . reduce < AssetMap > ( ( map , assetPath ) => {
699
699
if ( assetPath . match ( / \. h t m ( l ) ? $ / ) ) {
700
700
map [ assetPath ] = assetMap [ assetPath ] ;
@@ -707,7 +707,7 @@ export default class Upload extends ProjectCommand {
707
707
assets : MediaSignatureWithContents [ ] ,
708
708
webViewAsset : boolean = false
709
709
) : Promise < AssetMap > {
710
- const webViewMsg = webViewAsset ? 'webview ' : '' ;
710
+ const webViewMsg = webViewAsset ? 'WebView ' : '' ;
711
711
712
712
const config = await this . getProjectConfig ( ) ;
713
713
const { statuses } = await this . appClient . CheckIfMediaExists ( {
@@ -778,7 +778,7 @@ export default class Upload extends ProjectCommand {
778
778
const error = err as Error ;
779
779
const msg = `Failed to upload ${ webViewMsg } assets. (${ error . message } )` ;
780
780
if ( webViewAsset ) {
781
- // don't fail on webview uploads in case we just don't have the feature enabled
781
+ // don't fail on WebView uploads in case we just don't have the feature enabled
782
782
ux . action . stop ( msg ) ;
783
783
return { } ;
784
784
} else {
0 commit comments