diff --git a/apps/nexus/bun.lockb b/apps/nexus/bun.lockb deleted file mode 100644 index f857839b..00000000 Binary files a/apps/nexus/bun.lockb and /dev/null differ diff --git a/bun.lockb b/bun.lockb index 8f26ac39..48156696 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/infra/api.ts b/infra/api.ts new file mode 100644 index 00000000..8b431c48 --- /dev/null +++ b/infra/api.ts @@ -0,0 +1,22 @@ +import { isPermanentStage } from "./stage"; + +//TODO: Use this instead of wrangler +// export const api = new sst.cloudflare.Worker("apiApi", { +// url: true, +// handler: "packages/api/src/index.ts", +// // live: true, +// }); + +if (!isPermanentStage) { + new sst.x.DevCommand("apiDev", { + dev: { + command: "bun run dev", + directory: "packages/api", + autostart: true, + }, + }) +} + +// export const outputs = { +// api: api.url +// } \ No newline at end of file diff --git a/infra/www.ts b/infra/www.ts index 03bf6d60..4a2f9cc7 100644 --- a/infra/www.ts +++ b/infra/www.ts @@ -1,5 +1,7 @@ //Deploys the website to cloudflare pages under the domain nestri.io (redirects all requests to www.nestri.io to avoid duplicate content) +import { isPermanentStage } from "./stage"; + export const www = new cloudflare.PagesProject("www", { name: "nestri", accountId: "8405b2acb6746935b975bc2cfcb5c288", @@ -33,14 +35,15 @@ export const www = new cloudflare.PagesProject("www", { //TODO: Maybe handle building Qwik ourselves? This prevents us from relying on CF too much, we are open-source anyway 🤷🏾‍♂️ //TODO: Add a local dev server for Qwik that can be linked with whatever we want //TODO: Link the www PageRule with whatever we give to the local dev server - -export const wwwDev = new sst.x.DevCommand("www", { - dev: { - command: "bun run dev", - directory: "apps/www", - autostart: true, - }, -}) +if (!isPermanentStage) { + new sst.x.DevCommand("www", { + dev: { + command: "bun run dev", + directory: "apps/www", + autostart: true, + }, + }) +} // //This creates a resource that can be accessed by itself // new sst.Linkable.wrap(cloudflare.PageRule, (resource) => ({ diff --git a/apps/nexus/.gitignore b/packages/api/.gitignore similarity index 100% rename from apps/nexus/.gitignore rename to packages/api/.gitignore diff --git a/apps/nexus/README.md b/packages/api/README.md similarity index 100% rename from apps/nexus/README.md rename to packages/api/README.md diff --git a/apps/nexus/assets/favicon.ico b/packages/api/assets/favicon.ico similarity index 100% rename from apps/nexus/assets/favicon.ico rename to packages/api/assets/favicon.ico diff --git a/apps/nexus/assets/favicon.svg b/packages/api/assets/favicon.svg similarity index 100% rename from apps/nexus/assets/favicon.svg rename to packages/api/assets/favicon.svg diff --git a/apps/nexus/package.json b/packages/api/package.json similarity index 100% rename from apps/nexus/package.json rename to packages/api/package.json diff --git a/apps/nexus/src/image/avatar.ts b/packages/api/src/image/avatar.ts similarity index 100% rename from apps/nexus/src/image/avatar.ts rename to packages/api/src/image/avatar.ts diff --git a/apps/nexus/src/image/banner.ts b/packages/api/src/image/banner.ts similarity index 100% rename from apps/nexus/src/image/banner.ts rename to packages/api/src/image/banner.ts diff --git a/apps/nexus/src/image/cover.ts b/packages/api/src/image/cover.ts similarity index 100% rename from apps/nexus/src/image/cover.ts rename to packages/api/src/image/cover.ts diff --git a/apps/nexus/src/image/index.ts b/packages/api/src/image/index.ts similarity index 100% rename from apps/nexus/src/image/index.ts rename to packages/api/src/image/index.ts diff --git a/apps/nexus/src/index.ts b/packages/api/src/index.ts similarity index 100% rename from apps/nexus/src/index.ts rename to packages/api/src/index.ts diff --git a/apps/nexus/src/types/api.d.ts b/packages/api/src/types/api.d.ts similarity index 100% rename from apps/nexus/src/types/api.d.ts rename to packages/api/src/types/api.d.ts diff --git a/apps/nexus/src/utils/create-avatar.tsx b/packages/api/src/utils/create-avatar.tsx similarity index 100% rename from apps/nexus/src/utils/create-avatar.tsx rename to packages/api/src/utils/create-avatar.tsx diff --git a/apps/nexus/src/utils/gradient.ts b/packages/api/src/utils/gradient.ts similarity index 100% rename from apps/nexus/src/utils/gradient.ts rename to packages/api/src/utils/gradient.ts diff --git a/apps/nexus/src/utils/index.ts b/packages/api/src/utils/index.ts similarity index 100% rename from apps/nexus/src/utils/index.ts rename to packages/api/src/utils/index.ts diff --git a/apps/nexus/tsconfig.json b/packages/api/tsconfig.json similarity index 100% rename from apps/nexus/tsconfig.json rename to packages/api/tsconfig.json diff --git a/apps/nexus/wrangler.toml b/packages/api/wrangler.toml similarity index 100% rename from apps/nexus/wrangler.toml rename to packages/api/wrangler.toml diff --git a/sst-env.d.ts b/sst-env.d.ts index 9ee5cc1b..be8895f6 100644 --- a/sst-env.d.ts +++ b/sst-env.d.ts @@ -7,6 +7,10 @@ declare module "sst" { "type": "sst.sst.Secret" "value": string } + "Relay": { + "type": "sst.aws.Service" + "url": string + } } } export {}