Skip to content

Commit

Permalink
refactor: add npm workspaces and update typescript settings
Browse files Browse the repository at this point in the history
  • Loading branch information
uid10804 committed Aug 19, 2023
1 parent f2e6b80 commit 2021214
Show file tree
Hide file tree
Showing 9 changed files with 26,825 additions and 3,749 deletions.
27,610 changes: 26,804 additions & 806 deletions package-lock.json

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
"devDependencies": {
"cz-conventional-changelog": "3.3.0"
},
"workspaces": [
"packages/*"
],
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
Expand Down
5 changes: 4 additions & 1 deletion packages/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,8 @@
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
}
},
"files": [
"lib/**/*"
]
}
10 changes: 5 additions & 5 deletions packages/server/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
{
"compilerOptions": {
"incremental": false,
"composite": true,
"moduleResolution": "node",
"module": "commonjs",
"target": "ES2019",
"declaration": true,
"esModuleInterop": true,
"declaration": true,
"declarationMap": true,
"outDir": "lib",
"rootDir": "./src",
"composite": false,
"strictPropertyInitialization": false,
"noImplicitAny": false,
"lib": ["es2015"],
"sourceMap": false,
"resolveJsonModule": true
"resolveJsonModule": true,
"typeRoots": ["./node_modules/@types"]
},
"include": ["src/**/*.ts"],
"include": ["src/**/*.ts", "src/validations/requestschema.json"],
"exclude": ["tests"]
}
2,931 changes: 1 addition & 2,930 deletions packages/server/tsconfig.tsbuildinfo

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions packages/template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"dependencies": {
"express": "4.17",
"json-serverless-lib": "^1.6.16",
"json-serverless-lib": "file:../server",
"serverless-http": "^2.6.0"
},
"devDependencies": {
Expand All @@ -37,4 +37,4 @@
"package.json",
"package-lock.json"
]
}
}
4 changes: 2 additions & 2 deletions packages/template/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ custom:
provider:
stage: ${self:custom.file.stage, 'dev'}
name: aws
runtime: nodejs18.x
runtime: nodejs16.x
region: ${self:custom.region}
stackName: ${self:custom.appconfig.stackName}
stackTags: # Tags that will be added to each of the deployment resources
jsonsls: ${self:custom.appconfig.stackName}
environment:
s3Bucket: ${self:custom.file.s3Bucket}
s3File: ${self:custom.file.s3File}
basePath: /${self:custom.file.stage}
basePath: ${self:custom.file.stage}
authPath: /jsonsls/${self:service}-${self:provider.stage}
region: ${self:custom.region}
AWS_NODEJS_CONNECTION_REUSE_ENABLED: 1
Expand Down
2 changes: 1 addition & 1 deletion packages/template/src/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const environment = new CloudEnvironment();
const swagger = new Swagger(
server,
new SwaggerConfig(appConfig.readOnly, appConfig.enableApiKeyAuth),
`/${config.stage}`,
`/${environment.basePath}`,
appConfig.routes.apiRoutePath,
'./package.json',
appConfig.routes.swaggerSpecRoutePath
Expand Down
5 changes: 3 additions & 2 deletions packages/template/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@
"strictPropertyInitialization": false,
"noImplicitAny": false,
"lib": ["es2015"],
"sourceMap": false,
"resolveJsonModule": true
"sourceMap": true,
"resolveJsonModule": true,
"typeRoots": ["./node_modules/@types"]
},
"include": ["src/**/*"]
}

0 comments on commit 2021214

Please sign in to comment.