New CLI commands and guide released

91 views
Skip to first unread message

Peter Amiri

unread,
Feb 8, 2022, 2:46:27 PM2/8/22
to cfwh...@googlegroups.com
Hello everyone, 

I wanted to make sure everyone is aware of some activity on the CLI front. The first set of these is a couple of new commands:

wheels generate app
wheels generate app-wizard

And a rework of the CLI Getting Started guide at https://guides.cfwheels.org/docs/commandbox

This work is still in its early stages but these two commands are mature enough for you all to play with and give feedback. 

-Peter

Risto

unread,
Feb 9, 2022, 1:46:52 PM2/9/22
to CFWheels
Nice work! Both commands worked perfectly for me.

Tom King

unread,
Feb 9, 2022, 1:51:58 PM2/9/22
to CFWheels
Yeah huge thanks to Peter taking this on :) 
Life seems to have got in the way recently. Wheels 2.3 coming soon honest !
T

dhga...@gmail.com

unread,
Mar 13, 2022, 5:29:50 PM3/13/22
to CFWheels
Failed for me. On WIndow 7 development machine.

Error: the .../cfwheels-cli\templates does not have the ConfigSettingsContent.txt file.

Here is the files in the folder downloaded:
C:\Users\dan\.CommandBox\cfml\modules\cfwheels-cli\templates>dir
 Volume in drive C has no label.
 Volume Serial Number is CAD8-7075

 Directory of C:\Users\dan\.CommandBox\cfml\modules\cfwheels-cli\templates

03/13/2022  05:04 PM    <DIR>          .
03/13/2022  05:04 PM    <DIR>          ..
03/10/2022  04:53 PM                60 ActionContent.txt
03/13/2022  05:04 PM    <DIR>          bootstrap3
03/10/2022  04:53 PM               270 ConfigAppContent.txt
03/10/2022  04:53 PM               905 ConfigDataSourceH2Content.txt
03/10/2022  04:53 PM               905 ConfigReloadPasswordContent.txt
03/10/2022  04:53 PM               818 ConfigRoutes.txt
03/10/2022  04:53 PM               112 ControllerContent.txt
03/13/2022  05:04 PM    <DIR>          crud
03/10/2022  04:53 PM             1,775 CRUDContent.txt
03/13/2022  05:04 PM    <DIR>          dbmigrate
03/10/2022  04:53 PM               785 DBMigrate.txt
03/10/2022  04:53 PM                57 ModelContent.txt
03/10/2022  04:53 PM               271 ServerJSON.txt
03/13/2022  05:04 PM    <DIR>          tests
03/10/2022  04:53 PM             1,456 urlrewrite.xml
03/10/2022  04:53 PM                43 ViewContent.txt
              12 File(s)          7,457 bytes
               6 Dir(s)  140,844,822,528 bytes free

Here is the commandbox output:

D:\>cd D:\program_files\CommandBox

D:\program_files\CommandBox>box
Listening for transport dt_socket at address: 5005

   ______                                          ______
  / ____/___  ____ ___  ____ ___  ____ _____  ____/ / __ )____  _  __
 / /   / __ \/ __ `__ \/ __ `__ \/ __ `/ __ \/ __  / __  / __ \| |/_/
/ /___/ /_/ / / / / / / / / / / / /_/ / / / / /_/ / /_/ / /_/ />  <
\____/\____/_/ /_/ /_/_/ /_/ /_/\__,_/_/ /_/\__,_/_____/\____/_/|_| (R)  v5.4.2+
00453

                          Don't code like it's 1998. Or 2008 for that matter!

Welcome to CommandBox!
CommandBox> wheels generate app-wizard

ERROR (5.4.2+00453)

file or directory [C:/Users/dan/.CommandBox/cfml/modules/cfwheels-cli/templates/
/ConfigSettingsContent.txt] does not exist


C:\Users\dan\.CommandBox\cfml\modules\cfwheels-cli\commands\wheels\generate\app-
wizard.cfc: line 35
33:   function run( ) {
34:     var appContent      = fileRead( helpers.getTemplate( '/ConfigAppContent.
txt' ) );
35:     var settingsContent = fileRead( helpers.getTemplate( '/ConfigSettingsCon
tent.txt' ) );
36:     var routesContent   = fileRead( helpers.getTemplate( '/ConfigRoutes.txt'
 ) );
37:
called from C:\Users\dan\.CommandBox\cfml\system\services\CommandService.cfc: li
ne 345
called from C:\Users\dan\.CommandBox\cfml\system\services\CommandService.cfc: li
ne 139
called from C:\Users\dan\.CommandBox\cfml\system\Shell.cfc: line 787
called from C:\Users\dan\.CommandBox\cfml\system\Shell.cfc: line 607
called from C:\Users\dan\.CommandBox\cfml\system\Bootstrap.cfm: line 160

lucee.runtime.exp.ExpressionException: file or directory [C:/Users/dan/.CommandB
ox/cfml/modules/cfwheels-cli/templates//ConfigSettingsContent.txt] does not exis
t
        at lucee.commons.io.res.util.ResourceUtil.toResourceExisting(ResourceUti
l.java:227)
        at lucee.runtime.op.Caster.toResource(Caster.java:4579)
        at lucee.runtime.op.Caster.toResource(Caster.java:4572)
        at lucee.runtime.functions.file.FileRead.call(FileRead.java:36)
        at modules.cfwheels_cli405.commands.wheels.generate.app_wizard_cfc180$cf
$6.udfCall(/commandbox/modules/cfwheels-cli/commands/wheels/generate/app-wizard.
cfc:35)
        at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106)
        at lucee.runtime.type.UDFImpl._call(UDFImpl.java:344)
        at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:207)
        at lucee.runtime.ComponentImpl._call(ComponentImpl.java:685)
        at lucee.runtime.ComponentImpl._call(ComponentImpl.java:572)
        at lucee.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:19
30)
        at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(Varia
bleUtilImpl.java:866)
        at lucee.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextI
mpl.java:1766)
        at system.services.commandservice_cfc$cf.udfCall1(/commandbox/system/ser
vices/CommandService.cfc:345)
        at system.services.commandservice_cfc$cf.udfCall(/commandbox/system/serv
ices/CommandService.cfc)
        at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106)
        at lucee.runtime.type.UDFImpl._call(UDFImpl.java:344)
        at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:207)
        at lucee.runtime.type.scope.UndefinedImpl.callWithNamedValues(UndefinedI
mpl.java:802)
        at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(Varia
bleUtilImpl.java:866)
        at lucee.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextI
mpl.java:1766)
        at system.services.commandservice_cfc$cf.udfCall1(/commandbox/system/ser
vices/CommandService.cfc:139)
        at system.services.commandservice_cfc$cf.udfCall(/commandbox/system/serv
ices/CommandService.cfc)
        at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106)
        at lucee.runtime.type.UDFImpl._call(UDFImpl.java:344)
        at lucee.runtime.type.UDFImpl.call(UDFImpl.java:217)
        at lucee.runtime.ComponentImpl._call(ComponentImpl.java:684)
        at lucee.runtime.ComponentImpl._call(ComponentImpl.java:572)
        at lucee.runtime.ComponentImpl.call(ComponentImpl.java:1911)
        at lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(Va
riableUtilImpl.java:787)
        at lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1747)
        at system.shell_cfc$cf.udfCall4(/commandbox/system/Shell.cfc:787)
        at system.shell_cfc$cf.udfCall(/commandbox/system/Shell.cfc)
        at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106)
        at lucee.runtime.type.UDFImpl._call(UDFImpl.java:344)
        at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:207)
        at lucee.runtime.type.scope.UndefinedImpl.callWithNamedValues(UndefinedI
mpl.java:802)
        at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(Varia
bleUtilImpl.java:866)
        at lucee.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextI
mpl.java:1766)
        at system.shell_cfc$cf.udfCall3(/commandbox/system/Shell.cfc:607)
        at system.shell_cfc$cf.udfCall(/commandbox/system/Shell.cfc)
        at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106)
        at lucee.runtime.type.UDFImpl._call(UDFImpl.java:344)
        at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:207)
        at lucee.runtime.ComponentImpl._call(ComponentImpl.java:685)
        at lucee.runtime.ComponentImpl._call(ComponentImpl.java:572)
        at lucee.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:19
30)
        at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(Varia
bleUtilImpl.java:866)
        at lucee.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextI
mpl.java:1766)
        at users.dan._commandbox46.cfml.system.bootstrap_cfm$cf.call(/__commandb
ox_root/Users/dan/.CommandBox/cfml/system/Bootstrap.cfm:160)
        at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:1034)
        at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:926)
        at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:907)
        at f90tcdqfeue4.call(Unknown Source)
        at lucee.runtime.compiler.Renderer.tag(Renderer.java:107)
        at lucee.runtime.compiler.Renderer.script(Renderer.java:97)
        at lucee.runtime.jsr223.ScriptEngineImpl.eval(ScriptEngineImpl.java:63)
        at lucee.runtime.jsr223.ScriptEngineImpl.eval(ScriptEngineImpl.java:194)

        at cliloader.LoaderCLIMain.execute(LoaderCLIMain.java:328)
        at cliloader.LoaderCLIMain.execute(LoaderCLIMain.java:153)
        at cliloader.LoaderCLIMain.main(LoaderCLIMain.java:552)

CommandBox>

Peter Amiri

unread,
Mar 14, 2022, 12:40:13 PM3/14/22
to cfwh...@googlegroups.com
I’m going to assume you’ve updated to the latest CFWHeels CLI. So I won’t ask you to update. ;-)

But can you do a `wheels g app` and see what you get. The app-wizard asks a bunch of questions and then passes them off to the app command. So this will tell us if the issue you are having is with the app command or the app-wizard command.

-Peter


-- 
You received this message because you are subscribed to the Google Groups "CFWheels" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cfwheels+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cfwheels/b16cc5d3-9590-4e89-8600-73b174d7e605n%40googlegroups.com.

Peter Amiri

unread,
Mar 14, 2022, 1:22:47 PM3/14/22
to cfwh...@googlegroups.com
I tested this on my side and it was a bug. I’ve fixed it. A new version of the CLI should be up shortly. I’ll let you know when it is ready to test again.

-Peter

Tom King

unread,
Mar 14, 2022, 5:32:04 PM3/14/22
to CFWheels
0.6.1 of the CLI released.
T
Reply all
Reply to author
Forward
0 new messages