Skip to content

Commit 13f5914

Browse files
committed
PR review changes
1 parent db6dd77 commit 13f5914

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

composer.lock

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ function getSSLPage($url) {
4242
$platform = 'console';
4343
// $platform = 'server';
4444

45-
$spec = getSSLPage("https://raw.githubusercontent.com/appwrite/appwrite/feat-sites/app/config/specs/swagger2-latest-{$platform}.json");
45+
$spec = getSSLPage("https://raw.githubusercontent.com/appwrite/appwrite/1.7.x/app/config/specs/swagger2-latest-{$platform}.json");
4646

4747
if(empty($spec)) {
4848
throw new Exception('Failed to fetch spec from Appwrite server');

templates/cli/lib/commands/command.js.twig

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ const {{ service.name | caseLower }}{{ method.name | caseUcfirst }} = async ({
9090
{% autoescape false %}
9191
.description(`{{ method.description | replace({'`':'\''}) | replace({'\n':' '}) | replace({'\n \n':' '}) }}`)
9292
{% for parameter in method.parameters.all %}
93-
.{% if parameter.required and not parameter.nullable %}requiredOption{% else %}option{% endif %}(`--{{ parameter.name | escapeKeyword | caseKebab }}{% if parameter | typeName == 'boolean' %} [value]{% else %} {% if parameter.array.type|length > 0 %}[{% else %}<{% endif %}{{ parameter.name | escapeKeyword | caseKebab }}{% if parameter.array.type|length > 0 %}...{% endif %}{% if parameter.array.type|length > 0 %}]{% else %}>{% endif %}{% endif %}`, `{{ parameter.description | replace({'`':'\''}) | replace({'\n':' '}) | replace({'\n \n':' '}) }}`{% if parameter | typeName == 'boolean' %}, (value, previous) => value === undefined ? true : parseBool(value){% elseif parameter | typeName == 'number' %}, parseInteger{% endif %})
93+
.{% if parameter.required and not parameter.nullable %}requiredOption{% else %}option{% endif %}(`--{{ parameter.name | escapeKeyword | caseKebab }}{% if parameter | typeName == 'boolean' %} [value]{% else %} {% if parameter.array.type|length > 0 %}[{% else %}<{% endif %}{{ parameter.name | escapeKeyword | caseKebab }}{% if parameter.array.type|length > 0 %}...{% endif %}{% if parameter.array.type|length > 0 %}]{% else %}>{% endif %}{% endif %}`, `{{ parameter.description | replace({'`':'\''}) | replace({'\n':' '}) | replace({'\n \n':' '}) }}`{% if parameter | typeName == 'boolean' %}, (value) => value === undefined ? true : parseBool(value){% elseif parameter | typeName == 'number' %}, parseInteger{% endif %})
9494
{% endfor %}
9595
{% if method.type == 'location' %}
9696
.requiredOption(`--destination <path>`, `output file path.`)

templates/cli/lib/commands/push.js.twig

+7-7
Original file line numberDiff line numberDiff line change
@@ -1144,13 +1144,12 @@ const pushFunction = async ({ functionId, async, code, withVariables } = { retur
11441144
parseOutput: false
11451145
});
11461146

1147-
1147+
let domain = '';
11481148
try {
1149-
let variables = await consoleVariables({ parseOutput: false, sdk: await sdkForConsole() });
1150-
domain = variables['_APP_DOMAIN_FUNCTIONS'];
1151-
domain = ID.unique() + '.' + domain;
1149+
const variables = await consoleVariables({ parseOutput: false, sdk: await sdkForConsole() });
1150+
domain = ID.unique() + '.' + variables['_APP_DOMAIN_FUNCTIONS'];
11521151
} catch (error) {
1153-
console.error('Error fetching console variables:', error);
1152+
console.error('Error fetching console variables.');
11541153
throw error;
11551154
}
11561155

@@ -1162,7 +1161,7 @@ const pushFunction = async ({ functionId, async, code, withVariables } = { retur
11621161
}
11631162
);
11641163
} catch (error) {
1165-
console.error('Error creating function rule:', error);
1164+
console.error('Error creating function rule.');
11661165
throw error;
11671166
}
11681167

@@ -1265,7 +1264,8 @@ const pushFunction = async ({ functionId, async, code, withVariables } = { retur
12651264
queries: [
12661265
JSON.stringify({ method: 'limit', values: [1] }),
12671266
JSON.stringify({ method: 'equal', "attribute": "deploymentResourceType", "values": ["function"] }),
1268-
JSON.stringify({ method: 'equal', "attribute": "deploymentResourceId", "values": [func['$id']] })
1267+
JSON.stringify({ method: 'equal', "attribute": "deploymentResourceId", "values": [func['$id']] }),
1268+
JSON.stringify({ method: 'equal', "attribute": "trigger", "values": ["manual"] }),
12691269
],
12701270
});
12711271

0 commit comments

Comments
 (0)