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

Switch from subpackages to one package #16

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Link } from "@shorty/core/link";
import { Link } from "@/functions/core/link";
import { ApiHandler, useJsonBody } from "sst/node/api";

export const handler = ApiHandler(async (_evt) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Link } from "@shorty/core/link";
import { Link } from "@/functions/core/link";
import { ApiHandler, usePathParam } from "sst/node/api";

export const handler = ApiHandler(async (_evt) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Link } from "@shorty/core/link";
import { Link } from "@/functions/core/link";
import { ApiHandler, usePathParam } from "sst/node/api";

export const handler = ApiHandler(async (_evt) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Link } from "@shorty/core/link";
import { Link } from "@/functions/core/link";
import { ApiHandler, useJsonBody, usePathParam } from "sst/node/api";

export const handler = ApiHandler(async (_evt) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Link } from "@shorty/core/link";
import { Link } from "@/functions/core/link";
import { ApiHandler, usePathParam } from "sst/node/api";

export const handler = ApiHandler(async (_evt) => {
Expand Down
20 changes: 10 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 8 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"lint": "next lint"
},
"dependencies": {
"@aws-sdk/client-dynamodb": "^3.332.0",
"@emotion/cache": "^11.11.0",
"@emotion/react": "^11.11.0",
"@emotion/server": "^11.11.0",
Expand All @@ -17,16 +18,21 @@
"@mui/material": "^5.13.3",
"@types/react": "^18.2.6",
"@types/react-dom": "^18.2.4",
"electrodb": "^2.5.1",
"next": "^13.4.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"typescript": "^5.0.4"
"typescript": "^5.0.4",
"ulid": "^2.3.0"
},
"devDependencies": {
"@types/node": "^20.1.7",
"@types/aws-lambda": "^8.10.115",
"aws-cdk-lib": "2.72.1",
"constructs": "10.1.156",
"eslint": "^8.42.0",
"sst": "^2.8.22"
"sst": "^2.8.23",
"vitest": "^0.31.1"
},
"workspaces": [
"packages/*"
Expand Down
19 changes: 0 additions & 19 deletions packages/core/package.json

This file was deleted.

1 change: 0 additions & 1 deletion packages/core/sst-env.d.ts

This file was deleted.

6 changes: 0 additions & 6 deletions packages/core/tsconfig.json

This file was deleted.

15 changes: 0 additions & 15 deletions packages/functions/package.json

This file was deleted.

1 change: 0 additions & 1 deletion packages/functions/sst-env.d.ts

This file was deleted.

10 changes: 0 additions & 10 deletions packages/functions/tsconfig.json

This file was deleted.

10 changes: 5 additions & 5 deletions stacks/API.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,31 +21,31 @@ export function API({ stack }: StackContext) {
"GET /s/{shortPath}": {
function: {
functionName: nameFor("Redirect"),
handler: "packages/functions/src/redirect.handler",
handler: "functions/redirect.handler",
},
},
"GET /link/{id}": {
function: {
functionName: nameFor("LinkGet"),
handler: "packages/functions/src/link/get.handler",
handler: "functions/link/get.handler",
},
},
"POST /link": {
function: {
functionName: nameFor("LinkCreate"),
handler: "packages/functions/src/link/create.handler",
handler: "functions/link/create.handler",
},
},
"PATCH /link/{uid}": {
function: {
functionName: nameFor("LinkPatch"),
handler: "packages/functions/src/link/patch.handler",
handler: "functions/link/patch.handler",
},
},
"GET /links": {
function: {
functionName: nameFor("LinkList"),
handler: "packages/functions/src/link/list.handler",
handler: "functions/link/list.handler",
},
},
},
Expand Down