Skip to content

Commit cbe5512

Browse files
committed
refactor: remove commit restart option
1 parent 6d07747 commit cbe5512

File tree

5 files changed

+13
-16
lines changed

5 files changed

+13
-16
lines changed

.changeset/stupid-hotels-vanish.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@squarecloud/api": minor
3+
---
4+
5+
Remove commit `restart` option. Instead call `application.restart()` manually.

package-lock.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"node": ">=18.0.0"
1818
},
1919
"dependencies": {
20-
"@squarecloud/api-types": "^0.3.2",
20+
"@squarecloud/api-types": "^0.3.3",
2121
"form-data": "^4.0.1",
2222
"zod": "^3.23.8"
2323
},

src/structures/application/base.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -183,11 +183,7 @@ export class BaseApplication {
183183
* @param restart - Whether the application should be restarted after the commit
184184
* @returns `true` for success or `false` for fail
185185
*/
186-
async commit(
187-
file: string | Buffer,
188-
fileName?: string,
189-
restart?: boolean,
190-
): Promise<boolean> {
186+
async commit(file: string | Buffer, fileName?: string): Promise<boolean> {
191187
assertPathLike(file, "COMMIT_DATA");
192188

193189
if (fileName) {
@@ -203,7 +199,6 @@ export class BaseApplication {
203199

204200
const data = await this.client.api.request(Routes.apps.commit(this.id), {
205201
method: "POST",
206-
query: { restart: Boolean(restart) },
207202
body: formData.getBuffer(),
208203
headers: formData.getHeaders(),
209204
});

src/types/api.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,11 @@ import type {
1313
APIReadFile,
1414
APIServiceStatus,
1515
APIUserInfo,
16-
APIWebsiteApplication,
1716
RESTDeleteAPIFileDeleteQuery,
1817
RESTGetAPIFileContentQuery,
1918
RESTGetAPIFilesListQuery,
2019
RESTPatchAPIFileMoveJSONBody,
2120
RESTPostAPIApplicationBackupResult,
22-
RESTPostAPIApplicationCommitQuery,
2321
RESTPostAPIApplicationUploadResult,
2422
RESTPostAPIGithubWebhookJSONBody,
2523
RESTPostAPIGithubWebhookResult,
@@ -78,7 +76,6 @@ export interface APIEndpoints {
7876
};
7977
"apps/commit": {
8078
method: "POST";
81-
query: RESTPostAPIApplicationCommitQuery;
8279
body: Buffer;
8380
response: undefined;
8481
};

0 commit comments

Comments
 (0)