Right now all CLI commands rely on copying the user's collection into the .znap folder, including additional dependencies and generating the binary files that will be used for serve and deploy. When path is used by a dependency, it breaks because it tries to refer to a path that cannot be reached from there.
Some of the options are:
Change the path on runtime to the absolute path so the executable still works.
Avoid using relative paths (breaks our examples folder)
Given that we want an examples folder to hold multiple entries and be able to use the same flow as end users, the first option seems to be the way to go.
To visualize the problem you can clone the repository, cd into examples/send-donation and run znap serve my-actions. Since it uses path for znap it will throw due to a reference to an invalid path. All examples will reference znap via relative path, it would be ideal if this just worked.
Right now all CLI commands rely on copying the user's collection into the .znap folder, including additional dependencies and generating the binary files that will be used for serve and deploy. When
path
is used by a dependency, it breaks because it tries to refer to a path that cannot be reached from there.Some of the options are:
Given that we want an examples folder to hold multiple entries and be able to use the same flow as end users, the first option seems to be the way to go.
To visualize the problem you can clone the repository,
cd
intoexamples/send-donation
and runznap serve my-actions
. Since it usespath
for znap it will throw due to a reference to an invalid path. All examples will referenceznap
via relative path, it would be ideal if this just worked.