File tree Expand file tree Collapse file tree 10 files changed +19
-19
lines changed
Expand file tree Collapse file tree 10 files changed +19
-19
lines changed Original file line number Diff line number Diff line change @@ -192,26 +192,26 @@ public function getFiles()
192192 ],
193193 [
194194 'scope ' => 'service ' ,
195- 'destination ' => '/app/{{ spec.title | caseUcfirst}}/services/{{ service.name | caseDash}}.php ' ,
196- 'template ' => 'cli/app/services/ service.php.twig ' ,
195+ 'destination ' => '/app/{{service.name | caseDash}}.php ' ,
196+ 'template ' => 'cli/app/service.php.twig ' ,
197197 'minify ' => false ,
198198 ],
199199 [
200200 'scope ' => 'default ' ,
201- 'destination ' => 'app/{{ spec.title | caseUcfirst}}/services/ client.php ' ,
202- 'template ' => 'cli/app/services/ client.php.twig ' ,
201+ 'destination ' => 'app/client.php ' ,
202+ 'template ' => 'cli/app/client.php.twig ' ,
203203 'minify ' => false ,
204204 ],
205205 [
206206 'scope ' => 'default ' ,
207- 'destination ' => 'app/{{ spec.title | caseUcfirst}}/services/ help.php ' ,
208- 'template ' => 'cli/app/services/ help.php.twig ' ,
207+ 'destination ' => 'app/help.php ' ,
208+ 'template ' => 'cli/app/help.php.twig ' ,
209209 'minify ' => false ,
210210 ],
211211 [
212212 'scope ' => 'default ' ,
213- 'destination ' => 'app/{{ spec.title | caseUcfirst}}/services/ init.php ' ,
214- 'template ' => 'cli/app/services/ init.php.twig ' ,
213+ 'destination ' => 'app/init.php ' ,
214+ 'template ' => 'cli/app/init.php.twig ' ,
215215 'minify ' => false ,
216216 ],
217217 [
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ use Utopia\Validator\Wildcard;
1010use Utopia\CLI\Console ;
1111use {{ spec.title | caseUcfirst }}\Parser ;
1212
13- const USER_PREFERENCES_FILE = __DIR__ . " /../../. preferences/.prefs.json" ;
13+ const USER_PREFERENCES_FILE = __DIR__ . " /.preferences/.prefs.json" ;
1414const PREFERENCE_ENDPOINT = " endpoint" ;
1515
1616/**
Original file line number Diff line number Diff line change 6363{% for parameter in method.parameters.body %}
6464{% if parameter.type == 'file' and method.packaging %}
6565 ${{ parameter.name | caseCamel }} = \urldecode(${{ parameter.name | caseCamel }});
66- $cloudFunctionPath = realpath(__DIR__.'/../../../ files/'.${{ parameter.name | caseCamel }});
66+ $cloudFunctionPath = realpath(__DIR__.'/../files/'.${{ parameter.name | caseCamel }});
6767 $cloudFunctionParentDir = escapeshellarg(dirname($cloudFunctionPath , 1));
6868 $cloudFunctionDirName = escapeshellarg(basename($cloudFunctionPath ));
6969 if (file_exists($cloudFunctionPath ) === false ) {
7070 throw new Exception(" Path doesn ' t exist. Please ensure that the path is within the current directory. ");
7171 }
7272 $archiveName = ' code . tar . gz ' ;
73- $volumeMountPoint = realpath(__DIR__.' / .. / .. / .. / files / ' );
73+ $volumeMountPoint = realpath(__DIR__.' / .. / files / ' );
7474 exec("tar -zcvf $archiveName -C $cloudFunctionParentDir $cloudFunctionDirName && mv $archiveName $volumeMountPoint");
7575 $archivePath = realpath($volumeMountPoint."/$archiveName");
7676 $cFile = new \CURLFile($archivePath, ' application / x - gzip ' , basename($archivePath));
7777 $params[' {{ parameter . name }}' ] = $cFile;
7878{% elseif parameter.type == ' file ' %}
79- ${{ parameter.name | caseCamel }} = realpath(__DIR__.' / .. / .. / .. / files / ' .\urldecode(${{ parameter.name | caseCamel }}));
79+ ${{ parameter.name | caseCamel }} = realpath(__DIR__.' / .. / files / ' .\urldecode(${{ parameter.name | caseCamel }}));
8080 if (file_exists(${{ parameter.name | caseCamel }}) === false ) {
8181 throw new Exception("Path doesn' t exist . Please ensure that the path is within the current directory . " );
8282 }
Original file line number Diff line number Diff line change 11#! /bin/sh
22
33if [[ $# -eq 0 ]]; then
4- php /usr/local/code/app/{{ spec.title | caseUcfirst}}/services/ client.php help
4+ php /usr/local/code/app/client.php help
55else
6- php /usr/local/code/app/{{ spec.title | caseUcfirst}}/services/ client.php $@
6+ php /usr/local/code/app/client.php $@
77fi
Original file line number Diff line number Diff line change 11#! /bin/sh
22
3- php /usr/local/code/app/{{ spec.title | caseUcfirst}}/services/ help.php $@
3+ php /usr/local/code/app/help.php $@
Original file line number Diff line number Diff line change 11#! /bin/sh
22
3- php /usr/local/code/app/{{ spec.title | caseUcfirst}}/services/ init.php init $@
3+ php /usr/local/code/app/init.php init $@
Original file line number Diff line number Diff line change 11#! /bin/sh
22
33if [[ $# -eq 0 ]]; then
4- php /usr/local/code/app/{{ spec.title | caseUcfirst}}/services/{{ service.name | caseDash}}.php help
4+ php /usr/local/code/app/{{service.name | caseDash}}.php help
55else
6- php /usr/local/code/app/{{ spec.title | caseUcfirst}}/services/{{ service.name | caseDash}}.php $@
6+ php /usr/local/code/app/{{service.name | caseDash}}.php $@
77fi
Original file line number Diff line number Diff line change 11#! /bin/sh
22
3- php /usr/local/code/app/{{ spec.title | caseUcfirst}}/services/ client.php version
3+ php /usr/local/code/app/client.php version
You can’t perform that action at this time.
0 commit comments