@@ -15,7 +15,7 @@ const {
1515 exportModuleWithWidgets,
1616 regex
1717} = require ( "./module-automation/commons" ) ;
18-
18+ const { getOssFiles , copyFilesToMpk } = require ( "./module-automation/utils" ) ;
1919const repoRootPath = join ( __dirname , "../../" ) ;
2020const [ moduleFolderNameInRepo , version ] = process . env . TAG . split ( "-v" ) ;
2121
@@ -46,6 +46,7 @@ async function main() {
4646async function createNativeMobileResourcesModule ( ) {
4747 console . log ( "Creating the Native Mobile Resource module." ) ;
4848 const moduleFolder = join ( repoRootPath , "packages/jsActions" , moduleFolderNameInRepo ) ;
49+ const ossFiles = await getOssFiles ( moduleFolder , true ) ;
4950 const tmpFolder = join ( repoRootPath , "tmp" , moduleFolderNameInRepo ) ;
5051 const widgetFolders = await readdir ( join ( repoRootPath , "packages/pluggableWidgets" ) ) ;
5152 const nativeWidgetFolders = widgetFolders
@@ -63,7 +64,7 @@ async function createNativeMobileResourcesModule() {
6364 await commitAndCreatePullRequest ( moduleInfo ) ;
6465 await updateNativeComponentsTestProject ( moduleInfo , tmpFolder , nativeWidgetFolders ) ;
6566 const mpkOutput = await createMPK ( tmpFolder , moduleInfo , regex . excludeFiles ) ;
66- await exportModuleWithWidgets ( moduleInfo . moduleNameInModeler , mpkOutput , nativeWidgetFolders ) ;
67+ await exportModuleWithWidgets ( moduleInfo . moduleNameInModeler , mpkOutput , nativeWidgetFolders , ossFiles ) ;
6768 await createGithubRelease ( moduleInfo , moduleChangelogs , mpkOutput ) ;
6869 if ( process . env . CI !== "true" ) {
6970 try {
@@ -78,6 +79,7 @@ async function createNativeMobileResourcesModule() {
7879async function createNanoflowCommonsModule ( ) {
7980 console . log ( "Creating the Nanoflow Commons module." ) ;
8081 const moduleFolder = join ( repoRootPath , "packages/jsActions" , moduleFolderNameInRepo ) ;
82+ const ossFiles = await getOssFiles ( moduleFolder , true ) ;
8183 const tmpFolder = join ( repoRootPath , "tmp" , moduleFolderNameInRepo ) ;
8284 let moduleInfo = {
8385 ...( await getPackageInfo ( moduleFolder ) ) ,
@@ -91,6 +93,7 @@ async function createNanoflowCommonsModule() {
9193 await commitAndCreatePullRequest ( moduleInfo ) ;
9294 await updateNativeComponentsTestProject ( moduleInfo , tmpFolder ) ;
9395 const mpkOutput = await createMPK ( tmpFolder , moduleInfo , regex . excludeFiles ) ;
96+ await copyFilesToMpk ( ossFiles , mpkOutput , moduleInfo . moduleNameInModeler ) ;
9497 await createGithubRelease ( moduleInfo , moduleChangelogs , mpkOutput ) ;
9598 if ( process . env . CI !== "true" ) {
9699 try {
0 commit comments