@@ -52,15 +52,19 @@ export async function baseTargets(withDeps = false) {
5252 expect ( moduleA . type ) . toBe ( `MODULE` ) ;
5353 expect ( moduleA . extension ) . toBe ( `rpgle` ) ;
5454 expect ( moduleA . relativePath ) . toBe ( path . join ( `qrpglesrc` , `moduleA.rpgle` ) ) ;
55- moduleA . exports = [ `SUMNUMS` ] ;
55+ moduleA . functions = [
56+ { name : `SUMNUMS` , export : true , lineRange : [ 0 , 0 ] } ,
57+ ]
5658
5759 // Module MODULEB.MODULE, which exports TOLOWER
5860 const moduleB = await targets . resolvePathToObject ( path . join ( cwd , `qrpglesrc` , `moduleB.sqlrpgle` ) ) ;
5961 expect ( moduleB . systemName ) . toBe ( `MODULEB` ) ;
6062 expect ( moduleB . type ) . toBe ( `MODULE` ) ;
6163 expect ( moduleB . extension ) . toBe ( `sqlrpgle` ) ;
6264 expect ( moduleB . relativePath ) . toBe ( path . join ( `qrpglesrc` , `moduleB.sqlrpgle` ) ) ;
63- moduleB . exports = [ `TOLOWER` ] ;
65+ moduleB . functions = [
66+ { name : `TOLOWER` , export : true , lineRange : [ 0 , 0 ] } ,
67+ ] ;
6468
6569 // SRVPGMA.SRVPGM, which imports TOLOWER from MODULEB.MODULE and therefore exports TOLOWER
6670 const srvpgmAModule = await targets . resolvePathToObject ( path . join ( cwd , `qsrvsrc` , `srvpgmA.bnd` ) ) ;
@@ -69,7 +73,9 @@ export async function baseTargets(withDeps = false) {
6973 expect ( srvpgmAModule . extension ) . toBe ( `bnd` ) ;
7074 expect ( srvpgmAModule . relativePath ) . toBe ( path . join ( `qsrvsrc` , `srvpgmA.bnd` ) ) ;
7175 srvpgmAModule . imports = [ `TOLOWER` ] ;
72- srvpgmAModule . exports = [ `TOLOWER` ] ;
76+ srvpgmAModule . functions = [
77+ { name : `TOLOWER` , export : true , lineRange : [ 0 , 0 ] } ,
78+ ] ;
7379
7480 // FILEA.FILE
7581 const fileA = await targets . resolvePathToObject ( path . join ( cwd , `qddssrc` , `fileA.sql` ) ) ;
@@ -87,7 +93,9 @@ export async function baseTargets(withDeps = false) {
8793
8894 // ORDENTSRV.SRVPGM, which exports/imports FIXTOTALS
8995 const ORDENTSRV = await targets . resolvePathToObject ( path . join ( cwd , `qbndsrc` , `ordentsrv.binder` ) ) ;
90- ORDENTSRV . exports = [ `FIXTOTALS` ] ;
96+ ORDENTSRV . functions = [
97+ { name : `FIXTOTALS` , export : true , lineRange : [ 0 , 0 ] }
98+ ]
9199 ORDENTSRV . imports = [ `FIXTOTALS` ] ;
92100 expect ( ORDENTSRV . systemName ) . toBe ( `ORDENTSRV` ) ;
93101 expect ( ORDENTSRV . type ) . toBe ( `SRVPGM` ) ;
@@ -96,15 +104,19 @@ export async function baseTargets(withDeps = false) {
96104
97105 // ORDENTMOD.MODULE which exports FIXTOTALS
98106 const ORDENTMOD = await targets . resolvePathToObject ( path . join ( cwd , `qrpglesrc` , `ordentmod.rpgle` ) ) ;
99- ORDENTMOD . exports = [ `FIXTOTALS` ] ;
107+ ORDENTMOD . functions = [
108+ { name : `FIXTOTALS` , export : true , lineRange : [ 0 , 0 ] }
109+ ] ;
100110 expect ( ORDENTMOD . systemName ) . toBe ( `ORDENTMOD` ) ;
101111 expect ( ORDENTMOD . type ) . toBe ( `MODULE` ) ;
102112 expect ( ORDENTMOD . extension ) . toBe ( `rpgle` ) ;
103113 expect ( ORDENTMOD . relativePath ) . toBe ( path . join ( `qrpglesrc` , `ordentmod.rpgle` ) ) ;
104114
105115 // UNUSEDSRV.SRVPGM, which exports BIGNOPE and is not used.
106116 const UNUSEDSRV = await targets . resolvePathToObject ( path . join ( cwd , `qbndsrc` , `unusedsrv.binder` ) ) ;
107- UNUSEDSRV . exports = [ `BIGNOPE` ] ;
117+ UNUSEDSRV . functions = [
118+ { name : `BIGNOPE` , export : true , lineRange : [ 0 , 0 ] }
119+ ] ;
108120 expect ( UNUSEDSRV . systemName ) . toBe ( `UNUSEDSRV` ) ;
109121 expect ( UNUSEDSRV . type ) . toBe ( `SRVPGM` ) ;
110122 expect ( UNUSEDSRV . extension ) . toBe ( `binder` ) ;
@@ -138,26 +150,37 @@ export async function multiModuleObjects() {
138150
139151 // Module that is required by the MYWEBAPP.PGM
140152 const handlerAMod = await targets . resolvePathToObject ( path . join ( cwd , `qrpglesrc` , `handlerA.rpgle` ) ) ;
141- handlerAMod . exports = [ `ROUTEHANDLERA` ] ;
153+ handlerAMod . functions = [
154+ { name : `ROUTEHANDLERA` , export : true , lineRange : [ 0 , 0 ] }
155+ ]
142156 handlerAMod . imports = [ `JSON_SQLRESULTSET` , `IL_RESPONSEWRITESTREAM` ] ;
143157
144158 // Another module that is required by the MYWEBAPP.PGM
145159 const handlerBMod = await targets . resolvePathToObject ( path . join ( cwd , `qrpglesrc` , `handlerB.rpgle` ) ) ;
146- handlerBMod . exports = [ `ROUTEHANDLERB` ] ;
160+ handlerBMod . functions = [
161+ { name : `ROUTEHANDLERB` , export : true , lineRange : [ 0 , 0 ] }
162+ ]
147163 handlerBMod . imports = [ `API_VALIDATE` , `JSON_SQLRESULTSET` , `IL_RESPONSEWRITESTREAM` ] ;
148164
149165 // Another module that is part of the JWTHANDLER.SRVPGM object
150166 const jwtHandlerMod = await targets . resolvePathToObject ( path . join ( cwd , `qrpglesrc` , `jwtHandler.rpgle` ) ) ;
151- jwtHandlerMod . exports = [ `JWT_MIDDLEWARE` ] ;
167+ jwtHandlerMod . functions = [
168+ { name : `JWT_MIDDLEWARE` , export : true , lineRange : [ 0 , 0 ] }
169+ ]
152170
153171 // Another module that is part of the JWTHANDLER.SRVPGM object
154172 const validateMod = await targets . resolvePathToObject ( path . join ( cwd , `qrpglesrc` , `validate.rpgle` ) ) ;
155- validateMod . exports = [ `API_VALIDATE` ] ;
173+ validateMod . functions = [
174+ { name : `API_VALIDATE` , export : true , lineRange : [ 0 , 0 ] }
175+ ] ;
156176
157177 // Service program for JWTHANDLER, used by MYWEBAPP
158178 const jwtHandlerSrv = await targets . resolvePathToObject ( path . join ( cwd , `qsrvsrc` , `utils.binder` ) ) ;
159179 jwtHandlerSrv . imports = [ `JWT_MIDDLEWARE` , `API_VALIDATE` ] ;
160- jwtHandlerSrv . exports = [ `JWT_MIDDLEWARE` , `API_VALIDATE` ] ;
180+ jwtHandlerSrv . functions = [
181+ { name : `JWT_MIDDLEWARE` , export : true , lineRange : [ 0 , 0 ] } ,
182+ { name : `API_VALIDATE` , export : true , lineRange : [ 0 , 0 ] }
183+ ] ;
161184
162185 targets . createOrAppend ( myWebApp ) ;
163186 targets . createOrAppend ( handlerAMod ) ;
0 commit comments