├── .gitignore ├── LICENSE ├── README.md ├── deployment ├── .gitignore ├── .npmignore ├── README.md ├── bin │ ├── config.schema.json │ ├── config.ts │ └── deployment.ts ├── cdk.json ├── jest.config.js ├── lib │ ├── constructs │ │ └── approvedNodeLambdaConstruct.ts │ ├── pipeline.ts │ ├── stack.ts │ └── stage.ts ├── package-lock.json ├── package.json └── tsconfig.json └── source ├── .gitignore ├── package-lock.json ├── package.json ├── scripts ├── api-gateway-event.json └── local.js ├── src ├── api │ ├── chat │ │ └── route.ts │ └── index.ts ├── app.ts ├── lambdaServer.ts ├── middleware │ └── errorResponder.ts └── server.ts └── tsconfig.json /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Cole Murray 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # serverless-gpt-lambda-cdk 2 | 3 | A serverless express GPT chat endpoint using AWS Lambda deployed with AWS CDK. This starter kit provides you with everything you need to set up a serverless endpoint that interacts with GPT models on AWS infrastructure. 4 | 5 | ## Features 6 | 7 | - **Serverless**: Runs on AWS Lambda, reducing costs and scaling effortlessly. 8 | - **Express**: Familiar ExpressJS setup making it easy for Node.js developers to get started. 9 | - **AWS CDK**: Infrastructure as code, ensuring consistent deployments. 10 | - **GPT-Enabled**: Integrated with GPT, allowing for natural language interactions. 11 | 12 | ## Pre-requisites 13 | 14 | 1. AWS account 15 | 2. AWS CLI installed and configured 16 | 3. Node.js & NPM 17 | 4. AWS CDK installed (`npm install -g aws-cdk`) 18 | 19 | ## Setup & Deployment 20 | 21 | 1. **Clone the Repository**: 22 | ```bash 23 | git clone https://github.com/devkit-io/serverless-gpt-lambda-cdk.git 24 | cd serverless-gpt-lambda-cdk 25 | ``` 26 | 27 | 2. **Install Dependencies**: 28 | ```bash 29 | npm install 30 | ``` 31 | 32 | 3. **Bootstrap AWS CDK** (if you haven't done this before): 33 | ```bash 34 | cdk bootstrap 35 | ``` 36 | 37 | 4. **Deploy to AWS**: 38 | ```bash 39 | cdk deploy 40 | ``` 41 | 42 | After deployment, the CDK will output the API Gateway URL where your serverless endpoint is accessible. 43 | 44 | ## Usage 45 | 46 | Send a POST request to the deployed endpoint: 47 | 48 | ``` 49 | POST /api/v1/chat 50 | { 51 | "messages": [ { "role": "user", "content": "Hello, GPT!"}] 52 | } 53 | ``` 54 | 55 | Response: 56 | ```json 57 | { 58 | "role": "assistant", 59 | "content": "Hello, how can i help?" 60 | } 61 | ``` 62 | 63 | ## Contribution 64 | 65 | Contributions are welcome! Fork the repo, make your changes, and submit a pull request. 66 | 67 | ## License 68 | 69 | MIT License. See [LICENSE](LICENSE) for more information. 70 | 71 | ## Support & Issues 72 | 73 | For any support or issues, please raise an issue on the GitHub repository. 74 | 75 | --- 76 | 77 | Happy coding, and enjoy your serverless GPT chatbot! 78 | -------------------------------------------------------------------------------- /deployment/.gitignore: -------------------------------------------------------------------------------- 1 | *.DS_Store 2 | *.js 3 | !jest.config.js 4 | *.d.ts 5 | node_modules 6 | 7 | # CDK asset staging directory 8 | .cdk.staging 9 | cdk.out 10 | cdk.context.json 11 | 12 | # Parcel default cache directory 13 | .parcel-cache 14 | -------------------------------------------------------------------------------- /deployment/.npmignore: -------------------------------------------------------------------------------- 1 | *.ts 2 | !*.d.ts 3 | 4 | # CDK asset staging directory 5 | .cdk.staging 6 | cdk.out 7 | -------------------------------------------------------------------------------- /deployment/README.md: -------------------------------------------------------------------------------- 1 | # Welcome to your CDK TypeScript project! 2 | 3 | This is a blank project for TypeScript development with CDK. 4 | 5 | The `cdk.json` file tells the CDK Toolkit how to execute your app. 6 | 7 | ## Useful commands 8 | 9 | * `npm run build` compile typescript to js 10 | * `npm run watch` watch for changes and compile 11 | * `npm run test` perform the jest unit tests 12 | * `cdk deploy` deploy this stack to your default AWS account/region 13 | * `cdk diff` compare deployed stack with current state 14 | * `cdk synth` emits the synthesized CloudFormation template 15 | * `npx npm-check-updates -u` update all libraries 16 | -------------------------------------------------------------------------------- /deployment/bin/config.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "type": "object", 4 | "title": "CDK Configuration", 5 | "required": [ 6 | "repoOwner", 7 | "repoName", 8 | "codeBranch", 9 | "connectionArn", 10 | "account", 11 | "region" 12 | ], 13 | "properties": { 14 | "repoOwner": { 15 | "type": "string", 16 | "description": "The owner of the repository." 17 | }, 18 | "repoName": { 19 | "type": "string", 20 | "description": "The name of the repository." 21 | }, 22 | "codeBranch": { 23 | "type": "string", 24 | "description": "The branch of the code.", 25 | "default": "main" 26 | }, 27 | "connectionArn": { 28 | "type": "string", 29 | "pattern": "^arn:aws:codestar-connections:[a-z0-9-]+:[0-9]{12}:connection/[a-z0-9-]+$", 30 | "description": "The ARN for the CodeStar connection." 31 | }, 32 | "account": { 33 | "type": "string", 34 | "pattern": "^[0-9]{12}$", 35 | "description": "The AWS account number." 36 | }, 37 | "region": { 38 | "type": "string", 39 | "description": "The AWS region for the deployment." 40 | }, 41 | "openAiSecretName": { 42 | "type": "string", 43 | "pattern": "^[a-zA-Z0-9\\/+=,.@_-]{1,256}$", 44 | "description": "The ARN for the OpenAI secret." 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /deployment/bin/config.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | export const configuration = { 4 | repoOwner: "__REPO_OWNER__", 5 | repoName: "__REPO_NAME__", 6 | codeBranch: "__CODE_BRANCH__", 7 | connectionArn: "__CONNECTION_ARN__", 8 | account: "__ACCOUNT__", 9 | region: "__REGION__", 10 | openAiSecretName: "__OPENAI_SECRET_NAME__" 11 | } -------------------------------------------------------------------------------- /deployment/bin/deployment.ts: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | import * as cdk from 'aws-cdk-lib'; 3 | import {BackendPipelineStack} from '../lib/pipeline'; 4 | import {configuration as config} from "./config" 5 | 6 | const app = new cdk.App(); 7 | new BackendPipelineStack(app, `${config.repoName}-GptPipelineStack`, { 8 | env: { 9 | account: config.account, 10 | region: config.region 11 | }, 12 | repoOwner: config.repoOwner, 13 | repoName: config.repoName, 14 | branch: config.codeBranch, 15 | connectionArn: config.connectionArn, 16 | account: config.account, 17 | region: config.region, 18 | openAiSecretName: config.openAiSecretName, 19 | }); 20 | -------------------------------------------------------------------------------- /deployment/cdk.json: -------------------------------------------------------------------------------- 1 | { 2 | "app": "npx ts-node bin/deployment.ts", 3 | "context": { 4 | "aws-cdk:enableDiffNoFail": "true", 5 | "@aws-cdk/core:stackRelativeExports": "true", 6 | "@aws-cdk/core:newStyleStackSynthesis": true 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /deployment/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | roots: ['/test'], 3 | testMatch: ['**/*.test.ts'], 4 | transform: { 5 | '^.+\\.tsx?$': 'ts-jest' 6 | } 7 | }; 8 | -------------------------------------------------------------------------------- /deployment/lib/constructs/approvedNodeLambdaConstruct.ts: -------------------------------------------------------------------------------- 1 | import {DockerImage, Duration} from 'aws-cdk-lib'; 2 | import {Alarm, Metric} from 'aws-cdk-lib/aws-cloudwatch'; 3 | import {LambdaDeploymentConfig, LambdaDeploymentGroup} from 'aws-cdk-lib/aws-codedeploy'; 4 | import {Alias, AssetCode, Function, IFunction, Runtime} from 'aws-cdk-lib/aws-lambda'; 5 | import {Construct} from 'constructs'; 6 | 7 | export interface ApprovedLambdaProps { 8 | readonly alarmThreshold?: number; 9 | readonly alarmEvaluationPeriod?: number; 10 | readonly codeDir: string; 11 | readonly bundleCommand?: string[]; 12 | readonly bundleEnvironment?: Record; 13 | readonly description: string; 14 | readonly handler: string; 15 | readonly image?: DockerImage; 16 | readonly memorySize?: number; 17 | readonly runtimeDuration?: Duration; 18 | readonly runtimeEnvironment?: Record; 19 | } 20 | 21 | export interface ApprovedNodeLambdaProps extends ApprovedLambdaProps { 22 | } 23 | 24 | export class ApprovedNodeLambda extends Construct { 25 | readonly alarm: Alarm; 26 | readonly lambda: IFunction; 27 | readonly deploymentGroup: LambdaDeploymentGroup; 28 | 29 | constructor(scope: Construct, id: string, props: ApprovedNodeLambdaProps) { 30 | super(scope, id); 31 | 32 | const codeAsset = AssetCode.fromAsset(props.codeDir, { 33 | bundling: { 34 | image: Runtime.NODEJS_18_X.bundlingImage, 35 | command: props.bundleCommand ?? [ 36 | 'bash', '-c', ` 37 | export npm_config_cache=/tmp/.npm && 38 | npm install && 39 | npm run build && 40 | cp -au node_modules /asset-output && 41 | cp -au build/* /asset-output 42 | `, 43 | ], 44 | environment: props.bundleEnvironment, 45 | }, 46 | }); 47 | 48 | const task = new Function(this, 'function', { 49 | runtime: Runtime.NODEJS_18_X, 50 | timeout: props.runtimeDuration ?? Duration.minutes(1), 51 | description: props.description, 52 | handler: props.handler, 53 | code: codeAsset, 54 | memorySize: props.memorySize ?? 2048, 55 | environment: props.runtimeEnvironment ?? {} 56 | }); 57 | 58 | this.lambda = task; 59 | 60 | const funcErrorMetric = new Metric({ 61 | metricName: 'Errors', 62 | namespace: 'AWS/Lambda', 63 | dimensionsMap: { 64 | FunctionName: task.functionName, 65 | }, 66 | statistic: 'Sum', 67 | period: Duration.minutes(1), 68 | }); 69 | 70 | this.alarm = new Alarm(this, 'RollbackAlarm', { 71 | metric: funcErrorMetric, 72 | threshold: props.alarmThreshold ?? 1, 73 | evaluationPeriods: props.alarmEvaluationPeriod ?? 1, 74 | }); 75 | 76 | const alias = new Alias(this, 'x', { 77 | aliasName: 'Current', 78 | version: task.currentVersion, 79 | }); 80 | 81 | this.deploymentGroup = new LambdaDeploymentGroup(this, 'DeploymentGroup', { 82 | alias, 83 | deploymentConfig: LambdaDeploymentConfig.LINEAR_10PERCENT_EVERY_1MINUTE, 84 | alarms: [this.alarm], 85 | }); 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /deployment/lib/pipeline.ts: -------------------------------------------------------------------------------- 1 | import {BackendServiceStage} from "./stage"; 2 | import {ComputeType} from "aws-cdk-lib/aws-codebuild"; 3 | import {CodeBuildStep, CodePipeline, CodePipelineSource, ManualApprovalStep} from "aws-cdk-lib/pipelines"; 4 | import {PolicyStatement} from "aws-cdk-lib/aws-iam"; 5 | import {Stack, StackProps} from "aws-cdk-lib"; 6 | import {Construct} from "constructs"; 7 | 8 | interface PipelineStackProps extends StackProps { 9 | repoName: string, 10 | repoOwner: string, 11 | branch: string, 12 | connectionArn: string, 13 | account: string, 14 | region: string; 15 | openAiSecretName: string, 16 | } 17 | 18 | export class BackendPipelineStack extends Stack { 19 | 20 | constructor(scope: Construct, id: string, props: PipelineStackProps) { 21 | super(scope, id, props); 22 | 23 | let source = CodePipelineSource.connection(`${props.repoOwner}/${props.repoName}`, props.branch, { 24 | connectionArn: props.connectionArn 25 | }); 26 | 27 | const synth = new CodeBuildStep('Synth', { 28 | input: source, 29 | commands: [ 30 | 'cd deployment/', 31 | 'export npm_config_cache=/tmp/.npm', // simplifies local development to avoid root owned .npm cache 32 | 'npm ci', 33 | 'npm run build', 34 | 'npx cdk synth' 35 | ], 36 | primaryOutputDirectory: 'deployment/cdk.out', 37 | }); 38 | 39 | 40 | const pipeline = new CodePipeline(this, 'pipeline', { 41 | crossAccountKeys: false, 42 | synth: synth, 43 | selfMutation: true, 44 | codeBuildDefaults: { 45 | buildEnvironment: { 46 | privileged: true, 47 | computeType: ComputeType.MEDIUM 48 | }, 49 | rolePolicy: [new PolicyStatement({ 50 | resources: ["*"], 51 | actions: ["secretsmanager:GetSecretValue"] 52 | })] 53 | } 54 | }); 55 | 56 | const prod = new BackendServiceStage(this, 'ProdBackend', { 57 | openAiSecretName: props.openAiSecretName, 58 | }); 59 | 60 | pipeline.addStage(prod, { 61 | pre: [ 62 | new ManualApprovalStep("Promote to Prod") 63 | ] 64 | }); 65 | } 66 | } -------------------------------------------------------------------------------- /deployment/lib/stack.ts: -------------------------------------------------------------------------------- 1 | import {Stack, StackProps} from "aws-cdk-lib"; 2 | import {Construct} from "constructs"; 3 | import {ApprovedNodeLambda} from "./constructs/approvedNodeLambdaConstruct"; 4 | import {Cors, LambdaIntegration, RestApi} from "aws-cdk-lib/aws-apigateway"; 5 | import {Secret} from "aws-cdk-lib/aws-secretsmanager"; 6 | 7 | export interface DeploymentStackProps extends StackProps { 8 | openAiSecretName: string; 9 | envVars?: Record, 10 | } 11 | 12 | export class DeploymentStack extends Stack { 13 | constructor(scope: Construct, id: string, props: DeploymentStackProps) { 14 | super(scope, id, props); 15 | 16 | const openAiSecret = Secret.fromSecretNameV2(this, 'openAiSecret', props.openAiSecretName); 17 | 18 | const serverFunction = new ApprovedNodeLambda(this, 'backend-server', { 19 | codeDir: '../source/', 20 | description: 'backend server lambda function', 21 | handler: 'src/lambdaServer.handler', 22 | runtimeEnvironment: props.envVars ?? {} 23 | }); 24 | 25 | openAiSecret.grantRead(serverFunction.lambda); 26 | 27 | const api = new RestApi(this, 'api', { 28 | restApiName: 'BackendApi', 29 | description: 'Api gateway for backend api', 30 | binaryMediaTypes: ['*/*'] 31 | }); 32 | 33 | api.root.addProxy({ 34 | defaultCorsPreflightOptions: { 35 | allowOrigins: Cors.ALL_ORIGINS, 36 | allowMethods: Cors.ALL_METHODS, 37 | }, 38 | defaultIntegration: new LambdaIntegration(serverFunction.lambda, { 39 | proxy: true 40 | }), 41 | 42 | }); 43 | } 44 | } -------------------------------------------------------------------------------- /deployment/lib/stage.ts: -------------------------------------------------------------------------------- 1 | import {Stage, StageProps} from "aws-cdk-lib"; 2 | import {Construct} from "constructs"; 3 | import {DeploymentStack} from "./stack"; 4 | 5 | interface BackendServiceStageProps extends StageProps { 6 | openAiSecretName: string; 7 | envVars?: Record, 8 | 9 | } 10 | 11 | export class BackendServiceStage extends Stage { 12 | 13 | constructor(scope: Construct, id: string, props: BackendServiceStageProps) { 14 | super(scope, id, props); 15 | 16 | new DeploymentStack(this, 'BackendStack', { 17 | openAiSecretName: props.openAiSecretName, 18 | }); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /deployment/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "deployment", 3 | "version": "0.1.0", 4 | "bin": { 5 | "deployment": "bin/deployment.js" 6 | }, 7 | "scripts": { 8 | "build": "tsc", 9 | "watch": "tsc -w", 10 | "test": "jest", 11 | "cdk": "cdk" 12 | }, 13 | "devDependencies": { 14 | "@types/jest": "^29.5.3", 15 | "@types/node": "20.4.5", 16 | "jest": "^29.6.2", 17 | "ts-jest": "^29.1.1", 18 | "aws-cdk": "2.89.0", 19 | "ts-node": "^10.9.1", 20 | "typescript": "~5.1.6" 21 | }, 22 | "dependencies": { 23 | "aws-cdk-lib": "2.89.0", 24 | "constructs": "^10.2.69", 25 | "source-map-support": "^0.5.21" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /deployment/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2018", 4 | "module": "commonjs", 5 | "lib": ["es2018"], 6 | "declaration": true, 7 | "strict": true, 8 | "noImplicitAny": true, 9 | "strictNullChecks": true, 10 | "noImplicitThis": true, 11 | "alwaysStrict": true, 12 | "noUnusedLocals": false, 13 | "noUnusedParameters": false, 14 | "noImplicitReturns": true, 15 | "noFallthroughCasesInSwitch": false, 16 | "inlineSourceMap": true, 17 | "inlineSources": true, 18 | "experimentalDecorators": true, 19 | "strictPropertyInitialization": false, 20 | "typeRoots": ["./node_modules/@types"] 21 | }, 22 | "exclude": ["cdk.out"] 23 | } 24 | -------------------------------------------------------------------------------- /source/.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | node_modules/* 3 | -------------------------------------------------------------------------------- /source/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "app-backend", 3 | "version": "1.0.0", 4 | "lockfileVersion": 3, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "app-backend", 9 | "version": "1.0.0", 10 | "license": "ISC", 11 | "dependencies": { 12 | "@types/express": "^4.17.17", 13 | "@types/node": "^20.4.2", 14 | "@vendia/serverless-express": "^4.10.4", 15 | "aws-sdk": "^2.1478.0", 16 | "cors": "^2.8.5", 17 | "express": "^4.18.2", 18 | "openai": "^4.12.4", 19 | "ts-node": "^10.9.1", 20 | "typescript": "^5.1.6", 21 | "uuid": "^9.0.0" 22 | }, 23 | "devDependencies": { 24 | "@types/cors": "^2.8.13", 25 | "@types/uuid": "^9.0.2", 26 | "dotenv": "^16.3.1" 27 | } 28 | }, 29 | "node_modules/@cspotcode/source-map-support": { 30 | "version": "0.8.1", 31 | "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", 32 | "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", 33 | "dependencies": { 34 | "@jridgewell/trace-mapping": "0.3.9" 35 | }, 36 | "engines": { 37 | "node": ">=12" 38 | } 39 | }, 40 | "node_modules/@jridgewell/resolve-uri": { 41 | "version": "3.1.1", 42 | "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", 43 | "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", 44 | "engines": { 45 | "node": ">=6.0.0" 46 | } 47 | }, 48 | "node_modules/@jridgewell/sourcemap-codec": { 49 | "version": "1.4.15", 50 | "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", 51 | "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" 52 | }, 53 | "node_modules/@jridgewell/trace-mapping": { 54 | "version": "0.3.9", 55 | "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", 56 | "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", 57 | "dependencies": { 58 | "@jridgewell/resolve-uri": "^3.0.3", 59 | "@jridgewell/sourcemap-codec": "^1.4.10" 60 | } 61 | }, 62 | "node_modules/@tsconfig/node10": { 63 | "version": "1.0.9", 64 | "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", 65 | "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==" 66 | }, 67 | "node_modules/@tsconfig/node12": { 68 | "version": "1.0.11", 69 | "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", 70 | "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==" 71 | }, 72 | "node_modules/@tsconfig/node14": { 73 | "version": "1.0.3", 74 | "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", 75 | "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==" 76 | }, 77 | "node_modules/@tsconfig/node16": { 78 | "version": "1.0.4", 79 | "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", 80 | "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==" 81 | }, 82 | "node_modules/@types/body-parser": { 83 | "version": "1.19.2", 84 | "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz", 85 | "integrity": "sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==", 86 | "dependencies": { 87 | "@types/connect": "*", 88 | "@types/node": "*" 89 | } 90 | }, 91 | "node_modules/@types/connect": { 92 | "version": "3.4.35", 93 | "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz", 94 | "integrity": "sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==", 95 | "dependencies": { 96 | "@types/node": "*" 97 | } 98 | }, 99 | "node_modules/@types/cors": { 100 | "version": "2.8.13", 101 | "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.13.tgz", 102 | "integrity": "sha512-RG8AStHlUiV5ysZQKq97copd2UmVYw3/pRMLefISZ3S1hK104Cwm7iLQ3fTKx+lsUH2CE8FlLaYeEA2LSeqYUA==", 103 | "dev": true, 104 | "dependencies": { 105 | "@types/node": "*" 106 | } 107 | }, 108 | "node_modules/@types/express": { 109 | "version": "4.17.17", 110 | "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.17.tgz", 111 | "integrity": "sha512-Q4FmmuLGBG58btUnfS1c1r/NQdlp3DMfGDGig8WhfpA2YRUtEkxAjkZb0yvplJGYdF1fsQ81iMDcH24sSCNC/Q==", 112 | "dependencies": { 113 | "@types/body-parser": "*", 114 | "@types/express-serve-static-core": "^4.17.33", 115 | "@types/qs": "*", 116 | "@types/serve-static": "*" 117 | } 118 | }, 119 | "node_modules/@types/express-serve-static-core": { 120 | "version": "4.17.35", 121 | "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.35.tgz", 122 | "integrity": "sha512-wALWQwrgiB2AWTT91CB62b6Yt0sNHpznUXeZEcnPU3DRdlDIz74x8Qg1UUYKSVFi+va5vKOLYRBI1bRKiLLKIg==", 123 | "dependencies": { 124 | "@types/node": "*", 125 | "@types/qs": "*", 126 | "@types/range-parser": "*", 127 | "@types/send": "*" 128 | } 129 | }, 130 | "node_modules/@types/http-errors": { 131 | "version": "2.0.1", 132 | "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.1.tgz", 133 | "integrity": "sha512-/K3ds8TRAfBvi5vfjuz8y6+GiAYBZ0x4tXv1Av6CWBWn0IlADc+ZX9pMq7oU0fNQPnBwIZl3rmeLp6SBApbxSQ==" 134 | }, 135 | "node_modules/@types/mime": { 136 | "version": "1.3.2", 137 | "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.2.tgz", 138 | "integrity": "sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw==" 139 | }, 140 | "node_modules/@types/node": { 141 | "version": "20.4.10", 142 | "resolved": "https://registry.npmjs.org/@types/node/-/node-20.4.10.tgz", 143 | "integrity": "sha512-vwzFiiy8Rn6E0MtA13/Cxxgpan/N6UeNYR9oUu6kuJWxu6zCk98trcDp8CBhbtaeuq9SykCmXkFr2lWLoPcvLg==" 144 | }, 145 | "node_modules/@types/node-fetch": { 146 | "version": "2.6.7", 147 | "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.7.tgz", 148 | "integrity": "sha512-lX17GZVpJ/fuCjguZ5b3TjEbSENxmEk1B2z02yoXSK9WMEWRivhdSY73wWMn6bpcCDAOh6qAdktpKHIlkDk2lg==", 149 | "dependencies": { 150 | "@types/node": "*", 151 | "form-data": "^4.0.0" 152 | } 153 | }, 154 | "node_modules/@types/qs": { 155 | "version": "6.9.7", 156 | "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz", 157 | "integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==" 158 | }, 159 | "node_modules/@types/range-parser": { 160 | "version": "1.2.4", 161 | "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.4.tgz", 162 | "integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==" 163 | }, 164 | "node_modules/@types/send": { 165 | "version": "0.17.1", 166 | "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.1.tgz", 167 | "integrity": "sha512-Cwo8LE/0rnvX7kIIa3QHCkcuF21c05Ayb0ZfxPiv0W8VRiZiNW/WuRupHKpqqGVGf7SUA44QSOUKaEd9lIrd/Q==", 168 | "dependencies": { 169 | "@types/mime": "^1", 170 | "@types/node": "*" 171 | } 172 | }, 173 | "node_modules/@types/serve-static": { 174 | "version": "1.15.2", 175 | "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.2.tgz", 176 | "integrity": "sha512-J2LqtvFYCzaj8pVYKw8klQXrLLk7TBZmQ4ShlcdkELFKGwGMfevMLneMMRkMgZxotOD9wg497LpC7O8PcvAmfw==", 177 | "dependencies": { 178 | "@types/http-errors": "*", 179 | "@types/mime": "*", 180 | "@types/node": "*" 181 | } 182 | }, 183 | "node_modules/@types/uuid": { 184 | "version": "9.0.2", 185 | "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.2.tgz", 186 | "integrity": "sha512-kNnC1GFBLuhImSnV7w4njQkUiJi0ZXUycu1rUaouPqiKlXkh77JKgdRnTAp1x5eBwcIwbtI+3otwzuIDEuDoxQ==", 187 | "dev": true 188 | }, 189 | "node_modules/@vendia/serverless-express": { 190 | "version": "4.10.4", 191 | "resolved": "https://registry.npmjs.org/@vendia/serverless-express/-/serverless-express-4.10.4.tgz", 192 | "integrity": "sha512-OH2cX+LqtrayCIkHAkShiLnvrgqGDvwIQEex5dHc/uJitBQjIz3q7dZtfU7cZ5vcR9Vkide5xJQDBEMbXoWLeA==", 193 | "engines": { 194 | "node": ">=12" 195 | } 196 | }, 197 | "node_modules/abort-controller": { 198 | "version": "3.0.0", 199 | "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", 200 | "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", 201 | "dependencies": { 202 | "event-target-shim": "^5.0.0" 203 | }, 204 | "engines": { 205 | "node": ">=6.5" 206 | } 207 | }, 208 | "node_modules/accepts": { 209 | "version": "1.3.8", 210 | "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", 211 | "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", 212 | "dependencies": { 213 | "mime-types": "~2.1.34", 214 | "negotiator": "0.6.3" 215 | }, 216 | "engines": { 217 | "node": ">= 0.6" 218 | } 219 | }, 220 | "node_modules/acorn": { 221 | "version": "8.10.0", 222 | "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", 223 | "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", 224 | "bin": { 225 | "acorn": "bin/acorn" 226 | }, 227 | "engines": { 228 | "node": ">=0.4.0" 229 | } 230 | }, 231 | "node_modules/acorn-walk": { 232 | "version": "8.2.0", 233 | "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", 234 | "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", 235 | "engines": { 236 | "node": ">=0.4.0" 237 | } 238 | }, 239 | "node_modules/agentkeepalive": { 240 | "version": "4.5.0", 241 | "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.5.0.tgz", 242 | "integrity": "sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew==", 243 | "dependencies": { 244 | "humanize-ms": "^1.2.1" 245 | }, 246 | "engines": { 247 | "node": ">= 8.0.0" 248 | } 249 | }, 250 | "node_modules/arg": { 251 | "version": "4.1.3", 252 | "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", 253 | "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==" 254 | }, 255 | "node_modules/array-flatten": { 256 | "version": "1.1.1", 257 | "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", 258 | "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" 259 | }, 260 | "node_modules/asynckit": { 261 | "version": "0.4.0", 262 | "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", 263 | "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" 264 | }, 265 | "node_modules/available-typed-arrays": { 266 | "version": "1.0.5", 267 | "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", 268 | "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", 269 | "engines": { 270 | "node": ">= 0.4" 271 | }, 272 | "funding": { 273 | "url": "https://github.com/sponsors/ljharb" 274 | } 275 | }, 276 | "node_modules/aws-sdk": { 277 | "version": "2.1478.0", 278 | "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1478.0.tgz", 279 | "integrity": "sha512-F+Ud9FxMD4rwvGbEXn7qc25Q19N4p+9klRjiH1llFLYssPw6TRtY464Cry/jG4OzuYkE/DsnhcwVFEJjGvMmuQ==", 280 | "dependencies": { 281 | "buffer": "4.9.2", 282 | "events": "1.1.1", 283 | "ieee754": "1.1.13", 284 | "jmespath": "0.16.0", 285 | "querystring": "0.2.0", 286 | "sax": "1.2.1", 287 | "url": "0.10.3", 288 | "util": "^0.12.4", 289 | "uuid": "8.0.0", 290 | "xml2js": "0.5.0" 291 | }, 292 | "engines": { 293 | "node": ">= 10.0.0" 294 | } 295 | }, 296 | "node_modules/aws-sdk/node_modules/uuid": { 297 | "version": "8.0.0", 298 | "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.0.0.tgz", 299 | "integrity": "sha512-jOXGuXZAWdsTH7eZLtyXMqUb9EcWMGZNbL9YcGBJl4MH4nrxHmZJhEHvyLFrkxo+28uLb/NYRcStH48fnD0Vzw==", 300 | "bin": { 301 | "uuid": "dist/bin/uuid" 302 | } 303 | }, 304 | "node_modules/base-64": { 305 | "version": "0.1.0", 306 | "resolved": "https://registry.npmjs.org/base-64/-/base-64-0.1.0.tgz", 307 | "integrity": "sha512-Y5gU45svrR5tI2Vt/X9GPd3L0HNIKzGu202EjxrXMpuc2V2CiKgemAbUUsqYmZJvPtCXoUKjNZwBJzsNScUbXA==" 308 | }, 309 | "node_modules/base64-js": { 310 | "version": "1.5.1", 311 | "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", 312 | "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", 313 | "funding": [ 314 | { 315 | "type": "github", 316 | "url": "https://github.com/sponsors/feross" 317 | }, 318 | { 319 | "type": "patreon", 320 | "url": "https://www.patreon.com/feross" 321 | }, 322 | { 323 | "type": "consulting", 324 | "url": "https://feross.org/support" 325 | } 326 | ] 327 | }, 328 | "node_modules/body-parser": { 329 | "version": "1.20.1", 330 | "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", 331 | "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", 332 | "dependencies": { 333 | "bytes": "3.1.2", 334 | "content-type": "~1.0.4", 335 | "debug": "2.6.9", 336 | "depd": "2.0.0", 337 | "destroy": "1.2.0", 338 | "http-errors": "2.0.0", 339 | "iconv-lite": "0.4.24", 340 | "on-finished": "2.4.1", 341 | "qs": "6.11.0", 342 | "raw-body": "2.5.1", 343 | "type-is": "~1.6.18", 344 | "unpipe": "1.0.0" 345 | }, 346 | "engines": { 347 | "node": ">= 0.8", 348 | "npm": "1.2.8000 || >= 1.4.16" 349 | } 350 | }, 351 | "node_modules/buffer": { 352 | "version": "4.9.2", 353 | "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", 354 | "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==", 355 | "dependencies": { 356 | "base64-js": "^1.0.2", 357 | "ieee754": "^1.1.4", 358 | "isarray": "^1.0.0" 359 | } 360 | }, 361 | "node_modules/bytes": { 362 | "version": "3.1.2", 363 | "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", 364 | "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", 365 | "engines": { 366 | "node": ">= 0.8" 367 | } 368 | }, 369 | "node_modules/call-bind": { 370 | "version": "1.0.2", 371 | "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", 372 | "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", 373 | "dependencies": { 374 | "function-bind": "^1.1.1", 375 | "get-intrinsic": "^1.0.2" 376 | }, 377 | "funding": { 378 | "url": "https://github.com/sponsors/ljharb" 379 | } 380 | }, 381 | "node_modules/charenc": { 382 | "version": "0.0.2", 383 | "resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz", 384 | "integrity": "sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==", 385 | "engines": { 386 | "node": "*" 387 | } 388 | }, 389 | "node_modules/combined-stream": { 390 | "version": "1.0.8", 391 | "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", 392 | "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", 393 | "dependencies": { 394 | "delayed-stream": "~1.0.0" 395 | }, 396 | "engines": { 397 | "node": ">= 0.8" 398 | } 399 | }, 400 | "node_modules/content-disposition": { 401 | "version": "0.5.4", 402 | "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", 403 | "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", 404 | "dependencies": { 405 | "safe-buffer": "5.2.1" 406 | }, 407 | "engines": { 408 | "node": ">= 0.6" 409 | } 410 | }, 411 | "node_modules/content-type": { 412 | "version": "1.0.5", 413 | "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", 414 | "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", 415 | "engines": { 416 | "node": ">= 0.6" 417 | } 418 | }, 419 | "node_modules/cookie": { 420 | "version": "0.5.0", 421 | "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", 422 | "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", 423 | "engines": { 424 | "node": ">= 0.6" 425 | } 426 | }, 427 | "node_modules/cookie-signature": { 428 | "version": "1.0.6", 429 | "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", 430 | "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" 431 | }, 432 | "node_modules/cors": { 433 | "version": "2.8.5", 434 | "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", 435 | "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", 436 | "dependencies": { 437 | "object-assign": "^4", 438 | "vary": "^1" 439 | }, 440 | "engines": { 441 | "node": ">= 0.10" 442 | } 443 | }, 444 | "node_modules/create-require": { 445 | "version": "1.1.1", 446 | "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", 447 | "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==" 448 | }, 449 | "node_modules/crypt": { 450 | "version": "0.0.2", 451 | "resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz", 452 | "integrity": "sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==", 453 | "engines": { 454 | "node": "*" 455 | } 456 | }, 457 | "node_modules/debug": { 458 | "version": "2.6.9", 459 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", 460 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", 461 | "dependencies": { 462 | "ms": "2.0.0" 463 | } 464 | }, 465 | "node_modules/delayed-stream": { 466 | "version": "1.0.0", 467 | "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", 468 | "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", 469 | "engines": { 470 | "node": ">=0.4.0" 471 | } 472 | }, 473 | "node_modules/depd": { 474 | "version": "2.0.0", 475 | "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", 476 | "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", 477 | "engines": { 478 | "node": ">= 0.8" 479 | } 480 | }, 481 | "node_modules/destroy": { 482 | "version": "1.2.0", 483 | "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", 484 | "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", 485 | "engines": { 486 | "node": ">= 0.8", 487 | "npm": "1.2.8000 || >= 1.4.16" 488 | } 489 | }, 490 | "node_modules/diff": { 491 | "version": "4.0.2", 492 | "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", 493 | "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", 494 | "engines": { 495 | "node": ">=0.3.1" 496 | } 497 | }, 498 | "node_modules/digest-fetch": { 499 | "version": "1.3.0", 500 | "resolved": "https://registry.npmjs.org/digest-fetch/-/digest-fetch-1.3.0.tgz", 501 | "integrity": "sha512-CGJuv6iKNM7QyZlM2T3sPAdZWd/p9zQiRNS9G+9COUCwzWFTs0Xp8NF5iePx7wtvhDykReiRRrSeNb4oMmB8lA==", 502 | "dependencies": { 503 | "base-64": "^0.1.0", 504 | "md5": "^2.3.0" 505 | } 506 | }, 507 | "node_modules/dotenv": { 508 | "version": "16.3.1", 509 | "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz", 510 | "integrity": "sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==", 511 | "dev": true, 512 | "engines": { 513 | "node": ">=12" 514 | }, 515 | "funding": { 516 | "url": "https://github.com/motdotla/dotenv?sponsor=1" 517 | } 518 | }, 519 | "node_modules/ee-first": { 520 | "version": "1.1.1", 521 | "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", 522 | "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" 523 | }, 524 | "node_modules/encodeurl": { 525 | "version": "1.0.2", 526 | "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", 527 | "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", 528 | "engines": { 529 | "node": ">= 0.8" 530 | } 531 | }, 532 | "node_modules/escape-html": { 533 | "version": "1.0.3", 534 | "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", 535 | "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" 536 | }, 537 | "node_modules/etag": { 538 | "version": "1.8.1", 539 | "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", 540 | "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", 541 | "engines": { 542 | "node": ">= 0.6" 543 | } 544 | }, 545 | "node_modules/event-target-shim": { 546 | "version": "5.0.1", 547 | "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", 548 | "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", 549 | "engines": { 550 | "node": ">=6" 551 | } 552 | }, 553 | "node_modules/events": { 554 | "version": "1.1.1", 555 | "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", 556 | "integrity": "sha512-kEcvvCBByWXGnZy6JUlgAp2gBIUjfCAV6P6TgT1/aaQKcmuAEC4OZTV1I4EWQLz2gxZw76atuVyvHhTxvi0Flw==", 557 | "engines": { 558 | "node": ">=0.4.x" 559 | } 560 | }, 561 | "node_modules/express": { 562 | "version": "4.18.2", 563 | "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", 564 | "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", 565 | "dependencies": { 566 | "accepts": "~1.3.8", 567 | "array-flatten": "1.1.1", 568 | "body-parser": "1.20.1", 569 | "content-disposition": "0.5.4", 570 | "content-type": "~1.0.4", 571 | "cookie": "0.5.0", 572 | "cookie-signature": "1.0.6", 573 | "debug": "2.6.9", 574 | "depd": "2.0.0", 575 | "encodeurl": "~1.0.2", 576 | "escape-html": "~1.0.3", 577 | "etag": "~1.8.1", 578 | "finalhandler": "1.2.0", 579 | "fresh": "0.5.2", 580 | "http-errors": "2.0.0", 581 | "merge-descriptors": "1.0.1", 582 | "methods": "~1.1.2", 583 | "on-finished": "2.4.1", 584 | "parseurl": "~1.3.3", 585 | "path-to-regexp": "0.1.7", 586 | "proxy-addr": "~2.0.7", 587 | "qs": "6.11.0", 588 | "range-parser": "~1.2.1", 589 | "safe-buffer": "5.2.1", 590 | "send": "0.18.0", 591 | "serve-static": "1.15.0", 592 | "setprototypeof": "1.2.0", 593 | "statuses": "2.0.1", 594 | "type-is": "~1.6.18", 595 | "utils-merge": "1.0.1", 596 | "vary": "~1.1.2" 597 | }, 598 | "engines": { 599 | "node": ">= 0.10.0" 600 | } 601 | }, 602 | "node_modules/finalhandler": { 603 | "version": "1.2.0", 604 | "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", 605 | "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", 606 | "dependencies": { 607 | "debug": "2.6.9", 608 | "encodeurl": "~1.0.2", 609 | "escape-html": "~1.0.3", 610 | "on-finished": "2.4.1", 611 | "parseurl": "~1.3.3", 612 | "statuses": "2.0.1", 613 | "unpipe": "~1.0.0" 614 | }, 615 | "engines": { 616 | "node": ">= 0.8" 617 | } 618 | }, 619 | "node_modules/for-each": { 620 | "version": "0.3.3", 621 | "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", 622 | "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", 623 | "dependencies": { 624 | "is-callable": "^1.1.3" 625 | } 626 | }, 627 | "node_modules/form-data": { 628 | "version": "4.0.0", 629 | "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", 630 | "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", 631 | "dependencies": { 632 | "asynckit": "^0.4.0", 633 | "combined-stream": "^1.0.8", 634 | "mime-types": "^2.1.12" 635 | }, 636 | "engines": { 637 | "node": ">= 6" 638 | } 639 | }, 640 | "node_modules/form-data-encoder": { 641 | "version": "1.7.2", 642 | "resolved": "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-1.7.2.tgz", 643 | "integrity": "sha512-qfqtYan3rxrnCk1VYaA4H+Ms9xdpPqvLZa6xmMgFvhO32x7/3J/ExcTd6qpxM0vH2GdMI+poehyBZvqfMTto8A==" 644 | }, 645 | "node_modules/formdata-node": { 646 | "version": "4.4.1", 647 | "resolved": "https://registry.npmjs.org/formdata-node/-/formdata-node-4.4.1.tgz", 648 | "integrity": "sha512-0iirZp3uVDjVGt9p49aTaqjk84TrglENEDuqfdlZQ1roC9CWlPk6Avf8EEnZNcAqPonwkG35x4n3ww/1THYAeQ==", 649 | "dependencies": { 650 | "node-domexception": "1.0.0", 651 | "web-streams-polyfill": "4.0.0-beta.3" 652 | }, 653 | "engines": { 654 | "node": ">= 12.20" 655 | } 656 | }, 657 | "node_modules/formdata-node/node_modules/web-streams-polyfill": { 658 | "version": "4.0.0-beta.3", 659 | "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-4.0.0-beta.3.tgz", 660 | "integrity": "sha512-QW95TCTaHmsYfHDybGMwO5IJIM93I/6vTRk+daHTWFPhwh+C8Cg7j7XyKrwrj8Ib6vYXe0ocYNrmzY4xAAN6ug==", 661 | "engines": { 662 | "node": ">= 14" 663 | } 664 | }, 665 | "node_modules/forwarded": { 666 | "version": "0.2.0", 667 | "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", 668 | "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", 669 | "engines": { 670 | "node": ">= 0.6" 671 | } 672 | }, 673 | "node_modules/fresh": { 674 | "version": "0.5.2", 675 | "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", 676 | "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", 677 | "engines": { 678 | "node": ">= 0.6" 679 | } 680 | }, 681 | "node_modules/function-bind": { 682 | "version": "1.1.1", 683 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", 684 | "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" 685 | }, 686 | "node_modules/get-intrinsic": { 687 | "version": "1.2.1", 688 | "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", 689 | "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", 690 | "dependencies": { 691 | "function-bind": "^1.1.1", 692 | "has": "^1.0.3", 693 | "has-proto": "^1.0.1", 694 | "has-symbols": "^1.0.3" 695 | }, 696 | "funding": { 697 | "url": "https://github.com/sponsors/ljharb" 698 | } 699 | }, 700 | "node_modules/gopd": { 701 | "version": "1.0.1", 702 | "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", 703 | "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", 704 | "dependencies": { 705 | "get-intrinsic": "^1.1.3" 706 | }, 707 | "funding": { 708 | "url": "https://github.com/sponsors/ljharb" 709 | } 710 | }, 711 | "node_modules/has": { 712 | "version": "1.0.3", 713 | "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", 714 | "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", 715 | "dependencies": { 716 | "function-bind": "^1.1.1" 717 | }, 718 | "engines": { 719 | "node": ">= 0.4.0" 720 | } 721 | }, 722 | "node_modules/has-proto": { 723 | "version": "1.0.1", 724 | "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", 725 | "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", 726 | "engines": { 727 | "node": ">= 0.4" 728 | }, 729 | "funding": { 730 | "url": "https://github.com/sponsors/ljharb" 731 | } 732 | }, 733 | "node_modules/has-symbols": { 734 | "version": "1.0.3", 735 | "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", 736 | "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", 737 | "engines": { 738 | "node": ">= 0.4" 739 | }, 740 | "funding": { 741 | "url": "https://github.com/sponsors/ljharb" 742 | } 743 | }, 744 | "node_modules/has-tostringtag": { 745 | "version": "1.0.0", 746 | "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", 747 | "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", 748 | "dependencies": { 749 | "has-symbols": "^1.0.2" 750 | }, 751 | "engines": { 752 | "node": ">= 0.4" 753 | }, 754 | "funding": { 755 | "url": "https://github.com/sponsors/ljharb" 756 | } 757 | }, 758 | "node_modules/http-errors": { 759 | "version": "2.0.0", 760 | "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", 761 | "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", 762 | "dependencies": { 763 | "depd": "2.0.0", 764 | "inherits": "2.0.4", 765 | "setprototypeof": "1.2.0", 766 | "statuses": "2.0.1", 767 | "toidentifier": "1.0.1" 768 | }, 769 | "engines": { 770 | "node": ">= 0.8" 771 | } 772 | }, 773 | "node_modules/humanize-ms": { 774 | "version": "1.2.1", 775 | "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", 776 | "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==", 777 | "dependencies": { 778 | "ms": "^2.0.0" 779 | } 780 | }, 781 | "node_modules/iconv-lite": { 782 | "version": "0.4.24", 783 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", 784 | "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", 785 | "dependencies": { 786 | "safer-buffer": ">= 2.1.2 < 3" 787 | }, 788 | "engines": { 789 | "node": ">=0.10.0" 790 | } 791 | }, 792 | "node_modules/ieee754": { 793 | "version": "1.1.13", 794 | "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", 795 | "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==" 796 | }, 797 | "node_modules/inherits": { 798 | "version": "2.0.4", 799 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 800 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" 801 | }, 802 | "node_modules/ipaddr.js": { 803 | "version": "1.9.1", 804 | "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", 805 | "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", 806 | "engines": { 807 | "node": ">= 0.10" 808 | } 809 | }, 810 | "node_modules/is-arguments": { 811 | "version": "1.1.1", 812 | "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", 813 | "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", 814 | "dependencies": { 815 | "call-bind": "^1.0.2", 816 | "has-tostringtag": "^1.0.0" 817 | }, 818 | "engines": { 819 | "node": ">= 0.4" 820 | }, 821 | "funding": { 822 | "url": "https://github.com/sponsors/ljharb" 823 | } 824 | }, 825 | "node_modules/is-buffer": { 826 | "version": "1.1.6", 827 | "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", 828 | "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" 829 | }, 830 | "node_modules/is-callable": { 831 | "version": "1.2.7", 832 | "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", 833 | "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", 834 | "engines": { 835 | "node": ">= 0.4" 836 | }, 837 | "funding": { 838 | "url": "https://github.com/sponsors/ljharb" 839 | } 840 | }, 841 | "node_modules/is-generator-function": { 842 | "version": "1.0.10", 843 | "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", 844 | "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", 845 | "dependencies": { 846 | "has-tostringtag": "^1.0.0" 847 | }, 848 | "engines": { 849 | "node": ">= 0.4" 850 | }, 851 | "funding": { 852 | "url": "https://github.com/sponsors/ljharb" 853 | } 854 | }, 855 | "node_modules/is-typed-array": { 856 | "version": "1.1.12", 857 | "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz", 858 | "integrity": "sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==", 859 | "dependencies": { 860 | "which-typed-array": "^1.1.11" 861 | }, 862 | "engines": { 863 | "node": ">= 0.4" 864 | }, 865 | "funding": { 866 | "url": "https://github.com/sponsors/ljharb" 867 | } 868 | }, 869 | "node_modules/isarray": { 870 | "version": "1.0.0", 871 | "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", 872 | "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" 873 | }, 874 | "node_modules/jmespath": { 875 | "version": "0.16.0", 876 | "resolved": "https://registry.npmjs.org/jmespath/-/jmespath-0.16.0.tgz", 877 | "integrity": "sha512-9FzQjJ7MATs1tSpnco1K6ayiYE3figslrXA72G2HQ/n76RzvYlofyi5QM+iX4YRs/pu3yzxlVQSST23+dMDknw==", 878 | "engines": { 879 | "node": ">= 0.6.0" 880 | } 881 | }, 882 | "node_modules/make-error": { 883 | "version": "1.3.6", 884 | "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", 885 | "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==" 886 | }, 887 | "node_modules/md5": { 888 | "version": "2.3.0", 889 | "resolved": "https://registry.npmjs.org/md5/-/md5-2.3.0.tgz", 890 | "integrity": "sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g==", 891 | "dependencies": { 892 | "charenc": "0.0.2", 893 | "crypt": "0.0.2", 894 | "is-buffer": "~1.1.6" 895 | } 896 | }, 897 | "node_modules/media-typer": { 898 | "version": "0.3.0", 899 | "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", 900 | "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", 901 | "engines": { 902 | "node": ">= 0.6" 903 | } 904 | }, 905 | "node_modules/merge-descriptors": { 906 | "version": "1.0.1", 907 | "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", 908 | "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" 909 | }, 910 | "node_modules/methods": { 911 | "version": "1.1.2", 912 | "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", 913 | "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", 914 | "engines": { 915 | "node": ">= 0.6" 916 | } 917 | }, 918 | "node_modules/mime": { 919 | "version": "1.6.0", 920 | "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", 921 | "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", 922 | "bin": { 923 | "mime": "cli.js" 924 | }, 925 | "engines": { 926 | "node": ">=4" 927 | } 928 | }, 929 | "node_modules/mime-db": { 930 | "version": "1.52.0", 931 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", 932 | "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", 933 | "engines": { 934 | "node": ">= 0.6" 935 | } 936 | }, 937 | "node_modules/mime-types": { 938 | "version": "2.1.35", 939 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", 940 | "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", 941 | "dependencies": { 942 | "mime-db": "1.52.0" 943 | }, 944 | "engines": { 945 | "node": ">= 0.6" 946 | } 947 | }, 948 | "node_modules/ms": { 949 | "version": "2.0.0", 950 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 951 | "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" 952 | }, 953 | "node_modules/negotiator": { 954 | "version": "0.6.3", 955 | "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", 956 | "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", 957 | "engines": { 958 | "node": ">= 0.6" 959 | } 960 | }, 961 | "node_modules/node-domexception": { 962 | "version": "1.0.0", 963 | "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", 964 | "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", 965 | "funding": [ 966 | { 967 | "type": "github", 968 | "url": "https://github.com/sponsors/jimmywarting" 969 | }, 970 | { 971 | "type": "github", 972 | "url": "https://paypal.me/jimmywarting" 973 | } 974 | ], 975 | "engines": { 976 | "node": ">=10.5.0" 977 | } 978 | }, 979 | "node_modules/node-fetch": { 980 | "version": "2.7.0", 981 | "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", 982 | "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", 983 | "dependencies": { 984 | "whatwg-url": "^5.0.0" 985 | }, 986 | "engines": { 987 | "node": "4.x || >=6.0.0" 988 | }, 989 | "peerDependencies": { 990 | "encoding": "^0.1.0" 991 | }, 992 | "peerDependenciesMeta": { 993 | "encoding": { 994 | "optional": true 995 | } 996 | } 997 | }, 998 | "node_modules/object-assign": { 999 | "version": "4.1.1", 1000 | "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", 1001 | "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", 1002 | "engines": { 1003 | "node": ">=0.10.0" 1004 | } 1005 | }, 1006 | "node_modules/object-inspect": { 1007 | "version": "1.12.3", 1008 | "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", 1009 | "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", 1010 | "funding": { 1011 | "url": "https://github.com/sponsors/ljharb" 1012 | } 1013 | }, 1014 | "node_modules/on-finished": { 1015 | "version": "2.4.1", 1016 | "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", 1017 | "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", 1018 | "dependencies": { 1019 | "ee-first": "1.1.1" 1020 | }, 1021 | "engines": { 1022 | "node": ">= 0.8" 1023 | } 1024 | }, 1025 | "node_modules/openai": { 1026 | "version": "4.12.4", 1027 | "resolved": "https://registry.npmjs.org/openai/-/openai-4.12.4.tgz", 1028 | "integrity": "sha512-oPNVJkpgxDUKF6WGGdHEZh5m/kjmYxS2Y1q7YVFCkvKUGthb8OGYRGCFBRPq5CQJezifzABTZRlVYnXLd6L4vQ==", 1029 | "dependencies": { 1030 | "@types/node": "^18.11.18", 1031 | "@types/node-fetch": "^2.6.4", 1032 | "abort-controller": "^3.0.0", 1033 | "agentkeepalive": "^4.2.1", 1034 | "digest-fetch": "^1.3.0", 1035 | "form-data-encoder": "1.7.2", 1036 | "formdata-node": "^4.3.2", 1037 | "node-fetch": "^2.6.7", 1038 | "web-streams-polyfill": "^3.2.1" 1039 | }, 1040 | "bin": { 1041 | "openai": "bin/cli" 1042 | } 1043 | }, 1044 | "node_modules/openai/node_modules/@types/node": { 1045 | "version": "18.18.6", 1046 | "resolved": "https://registry.npmjs.org/@types/node/-/node-18.18.6.tgz", 1047 | "integrity": "sha512-wf3Vz+jCmOQ2HV1YUJuCWdL64adYxumkrxtc+H1VUQlnQI04+5HtH+qZCOE21lBE7gIrt+CwX2Wv8Acrw5Ak6w==" 1048 | }, 1049 | "node_modules/parseurl": { 1050 | "version": "1.3.3", 1051 | "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", 1052 | "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", 1053 | "engines": { 1054 | "node": ">= 0.8" 1055 | } 1056 | }, 1057 | "node_modules/path-to-regexp": { 1058 | "version": "0.1.7", 1059 | "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", 1060 | "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" 1061 | }, 1062 | "node_modules/proxy-addr": { 1063 | "version": "2.0.7", 1064 | "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", 1065 | "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", 1066 | "dependencies": { 1067 | "forwarded": "0.2.0", 1068 | "ipaddr.js": "1.9.1" 1069 | }, 1070 | "engines": { 1071 | "node": ">= 0.10" 1072 | } 1073 | }, 1074 | "node_modules/punycode": { 1075 | "version": "1.3.2", 1076 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", 1077 | "integrity": "sha512-RofWgt/7fL5wP1Y7fxE7/EmTLzQVnB0ycyibJ0OOHIlJqTNzglYFxVwETOcIoJqJmpDXJ9xImDv+Fq34F/d4Dw==" 1078 | }, 1079 | "node_modules/qs": { 1080 | "version": "6.11.0", 1081 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", 1082 | "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", 1083 | "dependencies": { 1084 | "side-channel": "^1.0.4" 1085 | }, 1086 | "engines": { 1087 | "node": ">=0.6" 1088 | }, 1089 | "funding": { 1090 | "url": "https://github.com/sponsors/ljharb" 1091 | } 1092 | }, 1093 | "node_modules/querystring": { 1094 | "version": "0.2.0", 1095 | "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", 1096 | "integrity": "sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g==", 1097 | "deprecated": "The querystring API is considered Legacy. new code should use the URLSearchParams API instead.", 1098 | "engines": { 1099 | "node": ">=0.4.x" 1100 | } 1101 | }, 1102 | "node_modules/range-parser": { 1103 | "version": "1.2.1", 1104 | "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", 1105 | "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", 1106 | "engines": { 1107 | "node": ">= 0.6" 1108 | } 1109 | }, 1110 | "node_modules/raw-body": { 1111 | "version": "2.5.1", 1112 | "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", 1113 | "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", 1114 | "dependencies": { 1115 | "bytes": "3.1.2", 1116 | "http-errors": "2.0.0", 1117 | "iconv-lite": "0.4.24", 1118 | "unpipe": "1.0.0" 1119 | }, 1120 | "engines": { 1121 | "node": ">= 0.8" 1122 | } 1123 | }, 1124 | "node_modules/safe-buffer": { 1125 | "version": "5.2.1", 1126 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", 1127 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", 1128 | "funding": [ 1129 | { 1130 | "type": "github", 1131 | "url": "https://github.com/sponsors/feross" 1132 | }, 1133 | { 1134 | "type": "patreon", 1135 | "url": "https://www.patreon.com/feross" 1136 | }, 1137 | { 1138 | "type": "consulting", 1139 | "url": "https://feross.org/support" 1140 | } 1141 | ] 1142 | }, 1143 | "node_modules/safer-buffer": { 1144 | "version": "2.1.2", 1145 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", 1146 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" 1147 | }, 1148 | "node_modules/sax": { 1149 | "version": "1.2.1", 1150 | "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.1.tgz", 1151 | "integrity": "sha512-8I2a3LovHTOpm7NV5yOyO8IHqgVsfK4+UuySrXU8YXkSRX7k6hCV9b3HrkKCr3nMpgj+0bmocaJJWpvp1oc7ZA==" 1152 | }, 1153 | "node_modules/send": { 1154 | "version": "0.18.0", 1155 | "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", 1156 | "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", 1157 | "dependencies": { 1158 | "debug": "2.6.9", 1159 | "depd": "2.0.0", 1160 | "destroy": "1.2.0", 1161 | "encodeurl": "~1.0.2", 1162 | "escape-html": "~1.0.3", 1163 | "etag": "~1.8.1", 1164 | "fresh": "0.5.2", 1165 | "http-errors": "2.0.0", 1166 | "mime": "1.6.0", 1167 | "ms": "2.1.3", 1168 | "on-finished": "2.4.1", 1169 | "range-parser": "~1.2.1", 1170 | "statuses": "2.0.1" 1171 | }, 1172 | "engines": { 1173 | "node": ">= 0.8.0" 1174 | } 1175 | }, 1176 | "node_modules/send/node_modules/ms": { 1177 | "version": "2.1.3", 1178 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", 1179 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" 1180 | }, 1181 | "node_modules/serve-static": { 1182 | "version": "1.15.0", 1183 | "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", 1184 | "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", 1185 | "dependencies": { 1186 | "encodeurl": "~1.0.2", 1187 | "escape-html": "~1.0.3", 1188 | "parseurl": "~1.3.3", 1189 | "send": "0.18.0" 1190 | }, 1191 | "engines": { 1192 | "node": ">= 0.8.0" 1193 | } 1194 | }, 1195 | "node_modules/setprototypeof": { 1196 | "version": "1.2.0", 1197 | "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", 1198 | "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" 1199 | }, 1200 | "node_modules/side-channel": { 1201 | "version": "1.0.4", 1202 | "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", 1203 | "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", 1204 | "dependencies": { 1205 | "call-bind": "^1.0.0", 1206 | "get-intrinsic": "^1.0.2", 1207 | "object-inspect": "^1.9.0" 1208 | }, 1209 | "funding": { 1210 | "url": "https://github.com/sponsors/ljharb" 1211 | } 1212 | }, 1213 | "node_modules/statuses": { 1214 | "version": "2.0.1", 1215 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", 1216 | "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", 1217 | "engines": { 1218 | "node": ">= 0.8" 1219 | } 1220 | }, 1221 | "node_modules/toidentifier": { 1222 | "version": "1.0.1", 1223 | "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", 1224 | "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", 1225 | "engines": { 1226 | "node": ">=0.6" 1227 | } 1228 | }, 1229 | "node_modules/tr46": { 1230 | "version": "0.0.3", 1231 | "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", 1232 | "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" 1233 | }, 1234 | "node_modules/ts-node": { 1235 | "version": "10.9.1", 1236 | "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", 1237 | "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", 1238 | "dependencies": { 1239 | "@cspotcode/source-map-support": "^0.8.0", 1240 | "@tsconfig/node10": "^1.0.7", 1241 | "@tsconfig/node12": "^1.0.7", 1242 | "@tsconfig/node14": "^1.0.0", 1243 | "@tsconfig/node16": "^1.0.2", 1244 | "acorn": "^8.4.1", 1245 | "acorn-walk": "^8.1.1", 1246 | "arg": "^4.1.0", 1247 | "create-require": "^1.1.0", 1248 | "diff": "^4.0.1", 1249 | "make-error": "^1.1.1", 1250 | "v8-compile-cache-lib": "^3.0.1", 1251 | "yn": "3.1.1" 1252 | }, 1253 | "bin": { 1254 | "ts-node": "dist/bin.js", 1255 | "ts-node-cwd": "dist/bin-cwd.js", 1256 | "ts-node-esm": "dist/bin-esm.js", 1257 | "ts-node-script": "dist/bin-script.js", 1258 | "ts-node-transpile-only": "dist/bin-transpile.js", 1259 | "ts-script": "dist/bin-script-deprecated.js" 1260 | }, 1261 | "peerDependencies": { 1262 | "@swc/core": ">=1.2.50", 1263 | "@swc/wasm": ">=1.2.50", 1264 | "@types/node": "*", 1265 | "typescript": ">=2.7" 1266 | }, 1267 | "peerDependenciesMeta": { 1268 | "@swc/core": { 1269 | "optional": true 1270 | }, 1271 | "@swc/wasm": { 1272 | "optional": true 1273 | } 1274 | } 1275 | }, 1276 | "node_modules/type-is": { 1277 | "version": "1.6.18", 1278 | "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", 1279 | "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", 1280 | "dependencies": { 1281 | "media-typer": "0.3.0", 1282 | "mime-types": "~2.1.24" 1283 | }, 1284 | "engines": { 1285 | "node": ">= 0.6" 1286 | } 1287 | }, 1288 | "node_modules/typescript": { 1289 | "version": "5.1.6", 1290 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz", 1291 | "integrity": "sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==", 1292 | "bin": { 1293 | "tsc": "bin/tsc", 1294 | "tsserver": "bin/tsserver" 1295 | }, 1296 | "engines": { 1297 | "node": ">=14.17" 1298 | } 1299 | }, 1300 | "node_modules/unpipe": { 1301 | "version": "1.0.0", 1302 | "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", 1303 | "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", 1304 | "engines": { 1305 | "node": ">= 0.8" 1306 | } 1307 | }, 1308 | "node_modules/url": { 1309 | "version": "0.10.3", 1310 | "resolved": "https://registry.npmjs.org/url/-/url-0.10.3.tgz", 1311 | "integrity": "sha512-hzSUW2q06EqL1gKM/a+obYHLIO6ct2hwPuviqTTOcfFVc61UbfJ2Q32+uGL/HCPxKqrdGB5QUwIe7UqlDgwsOQ==", 1312 | "dependencies": { 1313 | "punycode": "1.3.2", 1314 | "querystring": "0.2.0" 1315 | } 1316 | }, 1317 | "node_modules/util": { 1318 | "version": "0.12.5", 1319 | "resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz", 1320 | "integrity": "sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==", 1321 | "dependencies": { 1322 | "inherits": "^2.0.3", 1323 | "is-arguments": "^1.0.4", 1324 | "is-generator-function": "^1.0.7", 1325 | "is-typed-array": "^1.1.3", 1326 | "which-typed-array": "^1.1.2" 1327 | } 1328 | }, 1329 | "node_modules/utils-merge": { 1330 | "version": "1.0.1", 1331 | "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", 1332 | "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", 1333 | "engines": { 1334 | "node": ">= 0.4.0" 1335 | } 1336 | }, 1337 | "node_modules/uuid": { 1338 | "version": "9.0.0", 1339 | "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz", 1340 | "integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==", 1341 | "bin": { 1342 | "uuid": "dist/bin/uuid" 1343 | } 1344 | }, 1345 | "node_modules/v8-compile-cache-lib": { 1346 | "version": "3.0.1", 1347 | "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", 1348 | "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==" 1349 | }, 1350 | "node_modules/vary": { 1351 | "version": "1.1.2", 1352 | "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", 1353 | "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", 1354 | "engines": { 1355 | "node": ">= 0.8" 1356 | } 1357 | }, 1358 | "node_modules/web-streams-polyfill": { 1359 | "version": "3.2.1", 1360 | "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz", 1361 | "integrity": "sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==", 1362 | "engines": { 1363 | "node": ">= 8" 1364 | } 1365 | }, 1366 | "node_modules/webidl-conversions": { 1367 | "version": "3.0.1", 1368 | "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", 1369 | "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" 1370 | }, 1371 | "node_modules/whatwg-url": { 1372 | "version": "5.0.0", 1373 | "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", 1374 | "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", 1375 | "dependencies": { 1376 | "tr46": "~0.0.3", 1377 | "webidl-conversions": "^3.0.0" 1378 | } 1379 | }, 1380 | "node_modules/which-typed-array": { 1381 | "version": "1.1.11", 1382 | "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.11.tgz", 1383 | "integrity": "sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew==", 1384 | "dependencies": { 1385 | "available-typed-arrays": "^1.0.5", 1386 | "call-bind": "^1.0.2", 1387 | "for-each": "^0.3.3", 1388 | "gopd": "^1.0.1", 1389 | "has-tostringtag": "^1.0.0" 1390 | }, 1391 | "engines": { 1392 | "node": ">= 0.4" 1393 | }, 1394 | "funding": { 1395 | "url": "https://github.com/sponsors/ljharb" 1396 | } 1397 | }, 1398 | "node_modules/xml2js": { 1399 | "version": "0.5.0", 1400 | "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.5.0.tgz", 1401 | "integrity": "sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==", 1402 | "dependencies": { 1403 | "sax": ">=0.6.0", 1404 | "xmlbuilder": "~11.0.0" 1405 | }, 1406 | "engines": { 1407 | "node": ">=4.0.0" 1408 | } 1409 | }, 1410 | "node_modules/xmlbuilder": { 1411 | "version": "11.0.1", 1412 | "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", 1413 | "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==", 1414 | "engines": { 1415 | "node": ">=4.0" 1416 | } 1417 | }, 1418 | "node_modules/yn": { 1419 | "version": "3.1.1", 1420 | "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", 1421 | "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", 1422 | "engines": { 1423 | "node": ">=6" 1424 | } 1425 | } 1426 | } 1427 | } 1428 | -------------------------------------------------------------------------------- /source/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "app-backend", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "ts-node src/server.ts", 8 | "startLambda": "ts-node src/lambdaServer.ts", 9 | "local": "node scripts/local.js", 10 | "build": "tsc", 11 | "serve": "node build/server.js" 12 | }, 13 | "keywords": [], 14 | "author": "", 15 | "license": "ISC", 16 | "dependencies": { 17 | "@types/express": "^4.17.17", 18 | "@types/node": "^20.4.2", 19 | "@vendia/serverless-express": "^4.10.4", 20 | "aws-sdk": "^2.1478.0", 21 | "cors": "^2.8.5", 22 | "express": "^4.18.2", 23 | "openai": "^4.12.4", 24 | "ts-node": "^10.9.1", 25 | "typescript": "^5.1.6", 26 | "uuid": "^9.0.0" 27 | }, 28 | "devDependencies": { 29 | "@types/cors": "^2.8.13", 30 | "@types/uuid": "^9.0.2", 31 | "dotenv": "^16.3.1" 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /source/scripts/api-gateway-event.json: -------------------------------------------------------------------------------- 1 | { 2 | "resource": "/{proxy+}", 3 | "path": "/api/v1/health_check", 4 | "httpMethod": "GET", 5 | "headers": { 6 | "Accept": "*/*", 7 | "Accept-Encoding": "gzip, deflate, br", 8 | "Accept-Language": "en-US,en;q=0.9", 9 | "cache-control": "no-cache", 10 | "CloudFront-Forwarded-Proto": "https", 11 | "CloudFront-Is-Desktop-Viewer": "true", 12 | "CloudFront-Is-Mobile-Viewer": "false", 13 | "CloudFront-Is-SmartTV-Viewer": "false", 14 | "CloudFront-Is-Tablet-Viewer": "false", 15 | "CloudFront-Viewer-Country": "US", 16 | "content-type": "application/json", 17 | "Host": "xxxxxx.execute-api.us-east-1.amazonaws.com", 18 | "origin": "https://xxxxxx.execute-api.us-east-1.amazonaws.com", 19 | "pragma": "no-cache", 20 | "Referer": "https://xxxxxx.execute-api.us-east-1.amazonaws.com/prod/", 21 | "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36", 22 | "Via": "2.0 00f0a41f749793b9dd653153037c957e.cloudfront.net (CloudFront)", 23 | "X-Amz-Cf-Id": "2D5N65SYHJdnJfEmAV_hC0Mw3QvkbUXDumJKAL786IGHRdq_MggPtA==", 24 | "X-Amzn-Trace-Id": "Root=1-5cdf30d0-31a428004abe13807f9445b0", 25 | "X-Forwarded-For": "11.111.111.111, 11.111.111.111", 26 | "X-Forwarded-Port": "443", 27 | "X-Forwarded-Proto": "https" 28 | }, 29 | "multiValueHeaders": { 30 | "Accept": [ 31 | "*/*" 32 | ], 33 | "Accept-Encoding": [ 34 | "gzip, deflate, br" 35 | ], 36 | "Accept-Language": [ 37 | "en-US,en;q=0.9" 38 | ], 39 | "cache-control": [ 40 | "no-cache" 41 | ], 42 | "CloudFront-Forwarded-Proto": [ 43 | "https" 44 | ], 45 | "CloudFront-Is-Desktop-Viewer": [ 46 | "true" 47 | ], 48 | "CloudFront-Is-Mobile-Viewer": [ 49 | "false" 50 | ], 51 | "CloudFront-Is-SmartTV-Viewer": [ 52 | "false" 53 | ], 54 | "CloudFront-Is-Tablet-Viewer": [ 55 | "false" 56 | ], 57 | "CloudFront-Viewer-Country": [ 58 | "US" 59 | ], 60 | "content-type": [ 61 | "application/json" 62 | ], 63 | "Host": [ 64 | "xxxxxx.execute-api.us-east-1.amazonaws.com" 65 | ], 66 | "origin": [ 67 | "https://xxxxxx.execute-api.us-east-1.amazonaws.com" 68 | ], 69 | "pragma": [ 70 | "no-cache" 71 | ], 72 | "Referer": [ 73 | "https://xxxxxx.execute-api.us-east-1.amazonaws.com/prod/" 74 | ], 75 | "User-Agent": [ 76 | "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36" 77 | ], 78 | "Via": [ 79 | "2.0 00f0a41f749793b9dd653153037c957e.cloudfront.net (CloudFront)" 80 | ], 81 | "X-Amz-Cf-Id": [ 82 | "2D5N65SYHJdnJfEmAV_hC0Mw3QvkbUXDumJKAL786IGHRdq_MggPtA==" 83 | ], 84 | "X-Amzn-Trace-Id": [ 85 | "Root=1-5cdf30d0-31a428004abe13807f9445b0" 86 | ], 87 | "X-Forwarded-For": [ 88 | "11.111.111.111, 11.111.111.111" 89 | ], 90 | "X-Forwarded-Port": [ 91 | "443" 92 | ], 93 | "X-Forwarded-Proto": [ 94 | "https" 95 | ] 96 | }, 97 | "queryStringParameters": null, 98 | "multiValueQueryStringParameters": null, 99 | "pathParameters": { 100 | "proxy": "api/v1/health_check" 101 | }, 102 | "stageVariables": {}, 103 | "requestContext": { 104 | "resourceId": "xxxxx", 105 | "resourcePath": "/{proxy+}", 106 | "httpMethod": "GET", 107 | "extendedRequestId": "Z2SQlEORIAMFjpA=", 108 | "requestTime": "17/May/2019:22:08:16 +0000", 109 | "path": "/api/v1/health_check", 110 | "accountId": "xxxxxxxx", 111 | "protocol": "HTTP/1.1", 112 | "stage": "prod", 113 | "domainPrefix": "xxxxxx", 114 | "requestTimeEpoch": 1558130896565, 115 | "requestId": "4589cf16-78f0-11e9-9c65-816a9b037cec", 116 | "identity": { 117 | "cognitoIdentityPoolId": null, 118 | "accountId": null, 119 | "cognitoIdentityId": null, 120 | "caller": null, 121 | "sourceIp": "11.111.111.111", 122 | "principalOrgId": null, 123 | "accessKey": null, 124 | "cognitoAuthenticationType": null, 125 | "cognitoAuthenticationProvider": null, 126 | "userArn": null, 127 | "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36", 128 | "user": null 129 | }, 130 | "domainName": "xxxxxx.execute-api.us-east-1.amazonaws.com", 131 | "apiId": "xxxxxx" 132 | }, 133 | "body": "{\"name\": \"Sandy Samantha Salamander\"}", 134 | "isBase64Encoded": false 135 | } -------------------------------------------------------------------------------- /source/scripts/local.js: -------------------------------------------------------------------------------- 1 | const lambdaFunction = require('../build/lambdaServer.js') 2 | const apiGatewayEvent = require('./api-gateway-event.json') 3 | 4 | const context = { 5 | succeed: v => { 6 | console.info(v) 7 | process.exit(0) 8 | } 9 | } 10 | const server = lambdaFunction.handler(apiGatewayEvent, context).then((e, v) => { 11 | if (e) console.error(e) 12 | if (v) console.info(v) 13 | process.exit(0) 14 | }) 15 | 16 | process.stdin.resume() 17 | 18 | function exitHandler (options, err) { 19 | if (options.cleanup && server && server.close) { 20 | server.close() 21 | } 22 | 23 | if (err) console.error(err.stack) 24 | if (options.exit) process.exit() 25 | } 26 | 27 | process.on('exit', exitHandler.bind(null, { cleanup: true })) 28 | process.on('SIGINT', exitHandler.bind(null, { exit: true })) // ctrl+c event 29 | process.on('SIGTSTP', exitHandler.bind(null, { exit: true })) // ctrl+v event 30 | process.on('uncaughtException', exitHandler.bind(null, { exit: true })) -------------------------------------------------------------------------------- /source/src/api/chat/route.ts: -------------------------------------------------------------------------------- 1 | import OpenAI from "openai"; 2 | import {Request, Response} from "express"; 3 | 4 | const generatePrompt = () => { 5 | return ( 6 | `You are developer GPT, expert in software engineering and programming.` 7 | ) 8 | } 9 | 10 | 11 | export async function handler(req: Request, res: Response) { 12 | try { 13 | const {messages} = req.body; 14 | 15 | 16 | // update to use parameters from the request to personalize the prompt 17 | const systemPrompt = generatePrompt(); 18 | 19 | const client = new OpenAI({ 20 | apiKey: process.env.OPENAI_API_KEY 21 | }); 22 | const completion = await client.chat.completions.create({ 23 | model: "gpt-4", 24 | messages: [ 25 | { 26 | role: "system", 27 | content: systemPrompt, 28 | }, 29 | ...messages, 30 | ], 31 | stream: false, 32 | }); 33 | 34 | const result = completion.choices[0].message; 35 | if (!result || !result?.content) { 36 | throw Error("No result"); 37 | } else { 38 | console.log(result); 39 | 40 | res.status(200).send(result); 41 | } 42 | 43 | } catch (err) { 44 | console.error(err); 45 | res.sendStatus(500); 46 | } 47 | } -------------------------------------------------------------------------------- /source/src/api/index.ts: -------------------------------------------------------------------------------- 1 | import {Router} from "express"; 2 | import {handler} from "./chat/route"; 3 | 4 | const router = Router(); 5 | 6 | 7 | router.post('/chat', handler); 8 | 9 | router.get('/health_check', (req, res) => { 10 | console.debug("health check running"); 11 | res.status(200).json({message: 'ok'}) 12 | }); 13 | 14 | export default router; -------------------------------------------------------------------------------- /source/src/app.ts: -------------------------------------------------------------------------------- 1 | import express from "express"; 2 | import cors from "cors"; 3 | import apiRoutes from "./api"; 4 | import {errorResponder} from "./middleware/errorResponder"; 5 | 6 | export const app = express(); 7 | 8 | app.use(cors({origin: '*'})); 9 | app.use(express.json()); 10 | app.use(express.urlencoded({extended: true})) 11 | app.use('/api/v1', apiRoutes); 12 | app.use(errorResponder); -------------------------------------------------------------------------------- /source/src/lambdaServer.ts: -------------------------------------------------------------------------------- 1 | import serverlessExpress from '@vendia/serverless-express'; 2 | import {app} from './app'; 3 | import AWS from 'aws-sdk'; 4 | 5 | let serverlessExpressInstance: any; 6 | 7 | async function retrieveSecret(secretName: string): Promise { 8 | const secretsManager = new AWS.SecretsManager({ 9 | region: process.env.AWS_REGION ?? 'us-west-2' 10 | }); 11 | 12 | try { 13 | const data = await secretsManager.getSecretValue({ SecretId: secretName }).promise(); 14 | 15 | if (data && data.SecretString) { 16 | return data.SecretString; 17 | } 18 | 19 | // If the secret is binary, you can access it using `data.SecretBinary`. 20 | 21 | return undefined; 22 | } catch (err) { 23 | console.error('Error retrieving the secret:', err); 24 | throw err; 25 | } 26 | } 27 | 28 | async function asyncTask () { 29 | const openAiSecret = await retrieveSecret('prod/Openai'); 30 | return {openAiSecret} 31 | } 32 | 33 | async function setup (event: any, context: any) { 34 | const {openAiSecret} = await asyncTask(); 35 | process.env.OPENAI_API_KEY = openAiSecret; 36 | 37 | serverlessExpressInstance = serverlessExpress({ app }) 38 | return serverlessExpressInstance(event, context) 39 | } 40 | 41 | export function handler (event: any, context: any) { 42 | if (serverlessExpressInstance) return serverlessExpressInstance(event, context) 43 | 44 | return setup(event, context) 45 | } 46 | 47 | -------------------------------------------------------------------------------- /source/src/middleware/errorResponder.ts: -------------------------------------------------------------------------------- 1 | import { NextFunction, Request, Response } from "express"; 2 | 3 | export function errorResponder(error: any, req: Request, res: Response, next: NextFunction) { 4 | const errorCode = error.code ? error.code : 500; 5 | const message = error.message ? error.message : "Server error occurred"; 6 | 7 | res.status(errorCode).send(message); 8 | } 9 | -------------------------------------------------------------------------------- /source/src/server.ts: -------------------------------------------------------------------------------- 1 | import * as dotenv from 'dotenv'; 2 | import {app} from "./app"; 3 | 4 | dotenv.config(); 5 | const port = 3000; 6 | 7 | app.listen(port, () => { 8 | console.log(`Server is running at http://localhost:${port}`); 9 | }); 10 | -------------------------------------------------------------------------------- /source/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2016", 4 | "module": "commonjs", 5 | "rootDir": "./src", 6 | "outDir": "./build", 7 | "esModuleInterop": true, 8 | "forceConsistentCasingInFileNames": true, 9 | "strict": true, 10 | "skipLibCheck": true 11 | } 12 | } 13 | --------------------------------------------------------------------------------