@@ -113,7 +113,7 @@ Running this command will ${MigrateController.COMMON_MIGRATE_MESSAGE}`;
113
113
private migrationDependencies : IMigrationDependency [ ] = [
114
114
{
115
115
packageName : constants . SCOPED_TNS_CORE_MODULES ,
116
- verifiedVersion : "7.0.0-rc.57 " ,
116
+ verifiedVersion : "7.0.0" ,
117
117
shouldAddIfMissing : true ,
118
118
} ,
119
119
{
@@ -122,13 +122,13 @@ Running this command will ${MigrateController.COMMON_MIGRATE_MESSAGE}`;
122
122
} ,
123
123
{
124
124
packageName : "@nativescript/types" ,
125
- verifiedVersion : "7.0.0-rc.0 " ,
125
+ verifiedVersion : "7.0.0" ,
126
126
isDev : true ,
127
127
} ,
128
128
{
129
129
packageName : "tns-platform-declarations" ,
130
130
replaceWith : "@nativescript/types" ,
131
- verifiedVersion : "7.0.0-rc.0 " ,
131
+ verifiedVersion : "7.0.0" ,
132
132
isDev : true ,
133
133
} ,
134
134
{
@@ -141,7 +141,7 @@ Running this command will ${MigrateController.COMMON_MIGRATE_MESSAGE}`;
141
141
} ,
142
142
{
143
143
packageName : constants . WEBPACK_PLUGIN_NAME ,
144
- verifiedVersion : "3.0.0-rc.2 " ,
144
+ verifiedVersion : "3.0.0" ,
145
145
shouldAddIfMissing : true ,
146
146
isDev : true ,
147
147
} ,
@@ -879,6 +879,55 @@ Running this command will ${MigrateController.COMMON_MIGRATE_MESSAGE}`;
879
879
delete rootPackageJsonData . nativescript ;
880
880
}
881
881
882
+ // detect path to src and App_Resources
883
+ const possibleAppPaths = [
884
+ path . resolve ( projectData . projectDir , constants . SRC_DIR ) ,
885
+ path . resolve ( projectData . projectDir , constants . APP_FOLDER_NAME ) ,
886
+ ] ;
887
+
888
+ const appPath = possibleAppPaths . find ( ( possiblePath ) =>
889
+ this . $fs . exists ( possiblePath )
890
+ ) ;
891
+ if ( appPath ) {
892
+ const relativeAppPath = path
893
+ . relative ( projectData . projectDir , appPath )
894
+ . replace ( path . sep , "/" ) ;
895
+ this . $logger . trace (
896
+ `Found app source at '${ appPath } '. Writing '${ relativeAppPath } ' to config.`
897
+ ) ;
898
+ const ok = await this . $projectConfigService . setValue (
899
+ "appPath" ,
900
+ relativeAppPath . toString ( )
901
+ ) ;
902
+ this . $logger . trace ( ok ? `Ok...` : "Could not write..." ) ;
903
+ }
904
+
905
+ const possibleAppResourcesPaths = [
906
+ path . resolve (
907
+ projectData . projectDir ,
908
+ appPath ,
909
+ constants . APP_RESOURCES_FOLDER_NAME
910
+ ) ,
911
+ path . resolve ( projectData . projectDir , constants . APP_RESOURCES_FOLDER_NAME ) ,
912
+ ] ;
913
+
914
+ const appResourcesPath = possibleAppResourcesPaths . find ( ( possiblePath ) =>
915
+ this . $fs . exists ( possiblePath )
916
+ ) ;
917
+ if ( appResourcesPath ) {
918
+ const relativeAppResourcesPath = path
919
+ . relative ( projectData . projectDir , appResourcesPath )
920
+ . replace ( path . sep , "/" ) ;
921
+ this . $logger . trace (
922
+ `Found App_Resources at '${ appResourcesPath } '. Writing '${ relativeAppResourcesPath } ' to config.`
923
+ ) ;
924
+ const ok = await this . $projectConfigService . setValue (
925
+ "appResourcesPath" ,
926
+ relativeAppResourcesPath . toString ( )
927
+ ) ;
928
+ this . $logger . trace ( ok ? `Ok...` : "Could not write..." ) ;
929
+ }
930
+
882
931
// save root package.json
883
932
this . $fs . writeJson ( rootPackageJsonPath , rootPackageJsonData ) ;
884
933
0 commit comments