Skip to content

Commit

Permalink
remove ajv
Browse files Browse the repository at this point in the history
  • Loading branch information
adriankeenan committed Sep 8, 2024
1 parent 3420ca0 commit d79d2df
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 78 deletions.
8 changes: 3 additions & 5 deletions infra/cloud-url-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import {HttpOrigin} from "aws-cdk-lib/aws-cloudfront-origins";
import {OutputSet} from "./constructs/output-set";
import {CfnLogGroup, LogGroup, RetentionDays} from "aws-cdk-lib/aws-logs";
import {readFileSync} from "fs";
import {readLinksFromFile} from "./utils";
import {default as links} from '../links.json';

export type LinkRecords = {
[key: string]: string | { url: string, expiresAt: string }
[key: string]: string | { url: string, expiresAt: string|null }
};

type CloudUrlStackProps = StackProps & {
Expand All @@ -29,7 +29,7 @@ export class CloudUrlStack extends Stack {
constructor(scope: Construct, id: string, props?: CloudUrlStackProps) {

if (props?.stage == null) {
throw new Error('Stage not set');
throw new Error('stage context value not set');
}

super(scope, id, {
Expand All @@ -50,8 +50,6 @@ export class CloudUrlStack extends Stack {

const logGroup = this.createLogGroup(functionName);

const links = readLinksFromFile();

const redirectFn = this.createRedirectFunction(functionName, logGroup, links);

const distribution = this.createDistribution(redirectFn);
Expand Down
33 changes: 0 additions & 33 deletions infra/utils.ts

This file was deleted.

39 changes: 0 additions & 39 deletions package-lock.json

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

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"typescript": "~5.4.3"
},
"dependencies": {
"ajv": "^8.17.1",
"aws-cdk-lib": "2.135.0",
"constructs": "^10.0.0",
"source-map-support": "^0.5.21"
Expand Down
2 changes: 2 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
"experimentalDecorators": true,
"strictPropertyInitialization": false,
"allowJs": true,
"resolveJsonModule": true,
"esModuleInterop": true,
"typeRoots": [
"./node_modules/@types"
]
Expand Down

0 comments on commit d79d2df

Please sign in to comment.