Skip to content

Commit 6809d52

Browse files
committed
fix circular dependency error
1 parent a09482c commit 6809d52

File tree

25 files changed

+51
-49
lines changed

25 files changed

+51
-49
lines changed

.changeset/cuddly-mice-sing.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@squarecloud/api": patch
3+
---
4+
5+
Fix circular dependency error

.changeset/pre.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"mode": "pre",
2+
"mode": "exit",
33
"tag": "next",
44
"initialVersions": {
55
"@squarecloud/api": "3.5.0"

src/assertions/common.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import {
1+
import type {
22
APIObjectAssertionProps,
33
LiteralAssertionProps,
44
} from "@/types/assertions";
5-
import * as z from "zod";
5+
import type * as z from "zod";
66
import { SquareCloudAPIError } from "../structures";
77

88
export function handleLiteralAssertion({

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
CacheManager,
66
UserManager,
77
} from "./managers";
8-
import { ClientEvents, TypedEventEmitter } from "./types";
8+
import { type ClientEvents, TypedEventEmitter } from "./types";
99

1010
export class SquareCloudAPI extends TypedEventEmitter<ClientEvents> {
1111
static apiInfo = {

src/managers/api.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
import { APIPayload, APIUserInfo, APIVersion } from "@squarecloud/api-types/v2";
2-
import { APIApplicationEndpoints, SquareCloudAPIError } from "..";
1+
import type {
2+
APIPayload,
3+
APIUserInfo,
4+
APIVersion,
5+
} from "@squarecloud/api-types/v2";
6+
import { type APIApplicationEndpoints, SquareCloudAPIError } from "..";
37

48
export class APIManager {
59
public readonly baseUrl = "https://api.squarecloud.app";

src/managers/application/backup.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Application, SquareCloudAPIError } from "@/index";
1+
import { type Application, SquareCloudAPIError } from "@/index";
22

33
export class ApplicationBackupManager {
44
constructor(public readonly application: Application) {}

src/managers/application/cache.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ApplicationStatus } from "@/structures";
1+
import type { ApplicationStatus } from "@/structures";
22

33
export type ApplicationCacheKey = "status" | "backup" | "logs";
44

src/managers/application/deploys.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { assertString } from "@/assertions/literal";
2-
import { Application } from "@/index";
2+
import type { Application } from "@/index";
33

44
export class ApplicationDeploysManager {
55
constructor(public readonly application: Application) {}

src/managers/application/files.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { join } from "path";
22
import { assertPathLike, assertString } from "@/assertions/literal";
3-
import { Application } from "@/index";
3+
import type { Application } from "@/index";
44
import { readFile } from "fs/promises";
55

66
export class ApplicationFilesManager {

src/managers/application/index.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import { assertPathLike, assertString } from "@/assertions/literal";
22
import {
3-
Application,
4-
Collection,
3+
type Application,
4+
type Collection,
55
SimpleApplicationStatus,
6-
SquareCloudAPI,
6+
type SquareCloudAPI,
77
SquareCloudAPIError,
88
User,
99
} from "@/index";
10-
import { BaseApplication } from "@/structures/application/base";
11-
import { RESTPostAPIApplicationUploadResult } from "@squarecloud/api-types/v2";
10+
import type { BaseApplication } from "@/structures/application/base";
11+
import type { RESTPostAPIApplicationUploadResult } from "@squarecloud/api-types/v2";
1212
import FormData from "form-data";
1313
import { readFile } from "fs/promises";
1414

0 commit comments

Comments
 (0)