diff --git a/packages/static-hosting/lib/handlers/package-lock.json b/packages/static-hosting/lib/handlers/package-lock.json deleted file mode 100644 index e53631d1..00000000 --- a/packages/static-hosting/lib/handlers/package-lock.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "name": "handlers", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "license": "ISC", - "dependencies": { - "@types/aws-lambda": "^8.10.77", - "@types/node": "^15.12.4", - "source-map-support": "^0.5.19" - } - }, - "node_modules/@types/aws-lambda": { - "version": "8.10.101", - "resolved": "https://registry.npmjs.org/@types/aws-lambda/-/aws-lambda-8.10.101.tgz", - "integrity": "sha512-84geGyVc0H9P9aGbcg/vkDh5akJq0bEf3tizHNR2d1gcm0wsp9IZ/SW6rPxvgjJFi3OeVxDc8WTKCAjoZbogzg==" - }, - "node_modules/@types/node": { - "version": "15.14.9", - "resolved": "https://registry.npmjs.org/@types/node/-/node-15.14.9.tgz", - "integrity": "sha512-qjd88DrCxupx/kJD5yQgZdcYKZKSIGBVDIBE1/LTGcNm3d2Np/jxojkdePDdfnBHJc5W7vSMpbJ1aB7p/Py69A==" - }, - "node_modules/buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" - }, - "node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-support": { - "version": "0.5.21", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - } - }, - "dependencies": { - "@types/aws-lambda": { - "version": "8.10.101", - "resolved": "https://registry.npmjs.org/@types/aws-lambda/-/aws-lambda-8.10.101.tgz", - "integrity": "sha512-84geGyVc0H9P9aGbcg/vkDh5akJq0bEf3tizHNR2d1gcm0wsp9IZ/SW6rPxvgjJFi3OeVxDc8WTKCAjoZbogzg==" - }, - "@types/node": { - "version": "15.14.9", - "resolved": "https://registry.npmjs.org/@types/node/-/node-15.14.9.tgz", - "integrity": "sha512-qjd88DrCxupx/kJD5yQgZdcYKZKSIGBVDIBE1/LTGcNm3d2Np/jxojkdePDdfnBHJc5W7vSMpbJ1aB7p/Py69A==" - }, - "buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - }, - "source-map-support": { - "version": "0.5.21", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - } - } -} diff --git a/packages/static-hosting/lib/handlers/package.json b/packages/static-hosting/lib/handlers/package.json deleted file mode 100644 index 91a89b13..00000000 --- a/packages/static-hosting/lib/handlers/package.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "author": "", - "license": "ISC", - "dependencies": { - "@types/aws-lambda": "^8.10.77", - "@types/node": "^15.12.4", - "source-map-support": "^0.5.19" - } -} diff --git a/packages/static-hosting/lib/handlers/remap.ts b/packages/static-hosting/lib/handlers/remap.ts deleted file mode 100644 index f6218552..00000000 --- a/packages/static-hosting/lib/handlers/remap.ts +++ /dev/null @@ -1,15 +0,0 @@ -import "source-map-support/register"; -import { CloudFrontRequestEvent, CloudFrontRequest } from "aws-lambda"; - -const REMAP_PATH = process.env.REMAP_PATH; - -// Lambda handler for replacing the path of a request with another -export const handler = async ( - event: CloudFrontRequestEvent -): Promise => { - const request = event.Records[0].cf.request; - - request.uri = REMAP_PATH; - - return request; -}; diff --git a/packages/static-hosting/lib/handlers/tsconfig.json b/packages/static-hosting/lib/handlers/tsconfig.json deleted file mode 100644 index 555b6306..00000000 --- a/packages/static-hosting/lib/handlers/tsconfig.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "compilerOptions": { - "lib": ["es2019"], - "removeComments": true, - "moduleResolution": "node", - "noUnusedLocals": true, - "noUnusedParameters": true, - "sourceMap": true, - "target": "es2017", - "outDir": "lib", - "typeRoots": ["./types", "../node_modules/@types"] - }, - "include": ["./**/*.ts"], - "exclude": [ - "node_modules/**/*", - ".build/**/*", - "_warmup/**/*", - ".vscode/**/*", - "types" - ] -}