Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: CLI Local development #862

Merged
merged 13 commits into from
Jun 17, 2024
5 changes: 5 additions & 0 deletions src/SDK/Language/CLI.php
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,11 @@ public function getFiles(): array
'destination' => 'lib/commands/push.js',
'template' => 'cli/lib/commands/push.js.twig',
],
[
'scope' => 'default',
'destination' => 'lib/commands/run.js',
'template' => 'cli/lib/commands/run.js.twig',
],
Meldiron marked this conversation as resolved.
Show resolved Hide resolved
[
'scope' => 'service',
'destination' => '/lib/commands/{{service.name | caseDash}}.js',
Expand Down
2 changes: 2 additions & 0 deletions templates/cli/base/params.twig
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

const func = localConfig.getFunction(functionId);

ignorer.add('.appwrite');

if (func.ignore) {
ignorer.add(func.ignore);
} else if (fs.existsSync(pathLib.join({{ parameter.name | caseCamel | escapeKeyword }}, '.gitignore'))) {
Expand Down
2 changes: 2 additions & 0 deletions templates/cli/index.js.twig
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const { client } = require("./lib/commands/generic");
const { login, logout, whoami, migrate } = require("./lib/commands/generic");
const { init } = require("./lib/commands/init");
const { pull } = require("./lib/commands/pull");
const { run } = require("./lib/commands/run");
const { push } = require("./lib/commands/push");
{% else %}
const { migrate } = require("./lib/commands/generic");
Expand Down Expand Up @@ -62,6 +63,7 @@ program
.addCommand(init)
.addCommand(pull)
.addCommand(push)
.addCommand(run)
.addCommand(logout)
{% endif %}
{% for service in spec.services %}
Expand Down
Loading