Skip to content

Commit

Permalink
Merge pull request #38 from tmfg/feature/fix-imports
Browse files Browse the repository at this point in the history
Fix imports
  • Loading branch information
Joonas-M-S authored Jan 19, 2024
2 parents a19ef76 + 611e658 commit 1342994
Show file tree
Hide file tree
Showing 64 changed files with 837 additions and 949 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@
!/.npmrc
!/.prettierignore
!/.prettierrc.json
!/jest.config.js
!/jest.config.cjs
!/LICENSE
!/package.json
!/pnpm-lock.yaml
!/README.md
!/tsconfig.json
!/tsconfig.test.json
!/tsconfig.eslint.json

!src/
Expand Down
25 changes: 25 additions & 0 deletions jest.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
module.exports = {
roots: [
'<rootDir>/test',
],
testMatch: [
'**/*.test.ts',
],
testResultsProcessor: 'jest-junit',
preset: 'ts-jest',
coverageThreshold: {
global: {
lines: 60,
},
},
transform: {
"\\.[jt]s?$": ["ts-jest", {
useESM: true,
tsconfig: "<rootDir>/tsconfig.test.json"
}],
},
moduleNameMapper: {
"(.+)\\.js": "$1"
},
extensionsToTreatAsEsm: [".ts"]
}
15 changes: 0 additions & 15 deletions jest.config.js

This file was deleted.

127 changes: 109 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"name": "@digitraffic/common",
"version": "2024.1.10-1",
"version": "2024.1.18-1",
"description": "",
"type": "module",
"repository": {
"type": "git",
"url": "https://github.com/tmfg/digitraffic-common.git"
Expand All @@ -16,7 +17,8 @@
"eslint-report": "eslint . --format html",
"ci:eslint-report": "eslint . --format html -o report.html || true",
"clean": "rimraf dist output",
"test": "jest --detectOpenHandles --forceExit --coverage --coverageDirectory=output/coverage/jest",
"test": "node --max-old-space-size=1536 --expose-gc ./node_modules/jest/bin/jest.js --no-cache --detectOpenHandles --forceExit --coverage --coverageDirectory=output/coverage/jest --logHeapUsage --runInBand",
"test:inspect": "node --inspect-brk --expose-gc ./node_modules/jest/bin/jest.js --detectOpenHandles --forceExit --coverage --coverageDirectory=output/coverage/jest --logHeapUsage --runInBand",
"test:watch": "jest --detectOpenHandles --forceExit --coverage --coverageDirectory=output/coverage/jest --watch",
"prepublishOnly": "pnpm clean && pnpm build && pnpm test"
},
Expand All @@ -27,6 +29,92 @@
"dist/**/*.d.ts",
"src/**/*.ts"
],
"exports": {
".": "./dist/index.js",
"./dist/database/database": "./dist/database/database.js",
"./dist/database/cached": "./dist/database/cached.js",
"./dist/database/models": "./dist/database/models.js",
"./dist/database/last-updated": "./dist/database/last-updated.js",
"./dist/types/urn": "./dist/types/urn.js",
"./dist/types/util-types": "./dist/types/util-types.js",
"./dist/types/either": "./dist/types/either.js",
"./dist/types/validator": "./dist/types/validator.js",
"./dist/types/nullable": "./dist/types/nullable.js",
"./dist/types/aws-env": "./dist/types/aws-env.js",
"./dist/types/async-timeout-error": "./dist/types/async-timeout-error.js",
"./dist/types/input-error": "./dist/types/input-error.js",
"./dist/types/http-error": "./dist/types/http-error.js",
"./dist/types/language": "./dist/types/language.js",
"./dist/types/traffictype": "./dist/types/traffictype.js",
"./dist/test/testutils": "./dist/test/testutils.js",
"./dist/test/db-testutils": "./dist/test/db-testutils.js",
"./dist/test/httpserver": "./dist/test/httpserver.js",
"./dist/test/secrets-manager": "./dist/test/secrets-manager.js",
"./dist/test/asserter": "./dist/test/asserter.js",
"./dist/marine/rtz": "./dist/marine/rtz.js",
"./dist/marine/id_utils": "./dist/marine/id_utils.js",
"./dist/index": "./dist/index.js",
"./dist/utils/api-model": "./dist/utils/api-model.js",
"./dist/utils/logging": "./dist/utils/logging.js",
"./dist/utils/base64": "./dist/utils/base64.js",
"./dist/utils/date-utils": "./dist/utils/date-utils.js",
"./dist/utils/geojson-types": "./dist/utils/geojson-types.js",
"./dist/utils/slack": "./dist/utils/slack.js",
"./dist/utils/utils": "./dist/utils/utils.js",
"./dist/utils/retry": "./dist/utils/retry.js",
"./dist/utils/geometry": "./dist/utils/geometry.js",
"./dist/aws/infra/sqs-integration": "./dist/aws/infra/sqs-integration.js",
"./dist/aws/infra/stacks/network-stack": "./dist/aws/infra/stacks/network-stack.js",
"./dist/aws/infra/stacks/db-stack": "./dist/aws/infra/stacks/db-stack.js",
"./dist/aws/infra/stacks/db-proxy-stack": "./dist/aws/infra/stacks/db-proxy-stack.js",
"./dist/aws/infra/stacks/intra-stack-configuration": "./dist/aws/infra/stacks/intra-stack-configuration.js",
"./dist/aws/infra/stacks/db-dns-stack": "./dist/aws/infra/stacks/db-dns-stack.js",
"./dist/aws/infra/documentation": "./dist/aws/infra/documentation.js",
"./dist/aws/infra/usage-plans": "./dist/aws/infra/usage-plans.js",
"./dist/aws/infra/scheduler": "./dist/aws/infra/scheduler.js",
"./dist/aws/infra/import-util": "./dist/aws/infra/import-util.js",
"./dist/aws/infra/sqs-queue": "./dist/aws/infra/sqs-queue.js",
"./dist/aws/infra/api/response": "./dist/aws/infra/api/response.js",
"./dist/aws/infra/api/static-integration": "./dist/aws/infra/api/static-integration.js",
"./dist/aws/infra/api/responses": "./dist/aws/infra/api/responses.js",
"./dist/aws/infra/api/handler-factory": "./dist/aws/infra/api/handler-factory.js",
"./dist/aws/infra/api/integration": "./dist/aws/infra/api/integration.js",
"./dist/aws/infra/stack/stack-checking-aspect": "./dist/aws/infra/stack/stack-checking-aspect.js",
"./dist/aws/infra/stack/rest_apis": "./dist/aws/infra/stack/rest_apis.js",
"./dist/aws/infra/stack/lambda-configs": "./dist/aws/infra/stack/lambda-configs.js",
"./dist/aws/infra/stack/monitoredfunction": "./dist/aws/infra/stack/monitoredfunction.js",
"./dist/aws/infra/stack/subscription": "./dist/aws/infra/stack/subscription.js",
"./dist/aws/infra/stack/parameters": "./dist/aws/infra/stack/parameters.js",
"./dist/aws/infra/stack/stack": "./dist/aws/infra/stack/stack.js",
"./dist/aws/infra/security-rule": "./dist/aws/infra/security-rule.js",
"./dist/aws/infra/canaries/database-checker": "./dist/aws/infra/canaries/database-checker.js",
"./dist/aws/infra/canaries/canary": "./dist/aws/infra/canaries/canary.js",
"./dist/aws/infra/canaries/url-checker": "./dist/aws/infra/canaries/url-checker.js",
"./dist/aws/infra/canaries/database-canary": "./dist/aws/infra/canaries/database-canary.js",
"./dist/aws/infra/canaries/canary-alarm": "./dist/aws/infra/canaries/canary-alarm.js",
"./dist/aws/infra/canaries/canary-role": "./dist/aws/infra/canaries/canary-role.js",
"./dist/aws/infra/canaries/url-canary": "./dist/aws/infra/canaries/url-canary.js",
"./dist/aws/infra/canaries/canary-parameters": "./dist/aws/infra/canaries/canary-parameters.js",
"./dist/aws/infra/canaries/canary-keys": "./dist/aws/infra/canaries/canary-keys.js",
"./dist/aws/types/proxytypes": "./dist/aws/types/proxytypes.js",
"./dist/aws/types/tags": "./dist/aws/types/tags.js",
"./dist/aws/types/mediatypes": "./dist/aws/types/mediatypes.js",
"./dist/aws/types/model-with-reference": "./dist/aws/types/model-with-reference.js",
"./dist/aws/types/errors": "./dist/aws/types/errors.js",
"./dist/aws/types/lambda-response": "./dist/aws/types/lambda-response.js",
"./dist/aws/runtime/dt-logger-default": "./dist/aws/runtime/dt-logger-default.js",
"./dist/aws/runtime/secrets/secret": "./dist/aws/runtime/secrets/secret.js",
"./dist/aws/runtime/secrets/proxy-holder": "./dist/aws/runtime/secrets/proxy-holder.js",
"./dist/aws/runtime/secrets/dbsecret": "./dist/aws/runtime/secrets/dbsecret.js",
"./dist/aws/runtime/secrets/rds-holder": "./dist/aws/runtime/secrets/rds-holder.js",
"./dist/aws/runtime/secrets/secret-holder": "./dist/aws/runtime/secrets/secret-holder.js",
"./dist/aws/runtime/dt-logger": "./dist/aws/runtime/dt-logger.js",
"./dist/aws/runtime/s3": "./dist/aws/runtime/s3.js",
"./dist/aws/runtime/messaging": "./dist/aws/runtime/messaging.js",
"./dist/aws/runtime/apikey": "./dist/aws/runtime/apikey.js",
"./dist/aws/runtime/environment": "./dist/aws/runtime/environment.js",
"./dist/aws/runtime/digitraffic-integration-response": "./dist/aws/runtime/digitraffic-integration-response.js"
},
"peerDependencies": {
"@types/geojson": "^7946.0.12",
"aws-cdk-lib": "^2.103.0",
Expand All @@ -40,9 +128,11 @@
"geojson-validation": "^1.0.2",
"node-ttl": "^0.2.0",
"pg-native": "^3.0.1",
"pg-promise": "^11.5.4"
"pg-promise": "^11.5.4",
"lodash": "~4.17.21"
},
"devDependencies": {
"@jest/globals": "^29.7.0",
"@types/aws-lambda": "8.10.131",
"@types/etag": "1.8.3",
"@types/geojson": "7946.0.13",
Expand All @@ -51,32 +141,33 @@
"@types/node": "20.10.7",
"@types/sinon": "17.0.2",
"@typescript-eslint/eslint-plugin": "~6.18.1",
"@typescript-eslint/parser": "^6.18.1",
"@typescript-eslint/parser": "^6.19.0",
"@types/geojson-validation": "^1.0.2",
"eslint": "~8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-deprecation": "~2.0.0",
"jest": "^29.7.0",
"jest-junit": "^16.0.0",
"prettier": "^3.2.4",
"rimraf": "^5.0.5",
"sinon": "17.0.1",
"ts-jest": "^29.1.1",

"typescript": "~5.3.3",
"velocityjs": "2.0.6",

"aws-cdk-lib": "~2.118.0",
"aws-sdk": "~2.1531.0",
"axios": "^1.6.5",
"change-case": "5.3.0",
"constructs": "10.3.0",
"date-fns": "~2.30.0",
"date-fns-tz": "~2.0.0",
"eslint": "~8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-deprecation": "~2.0.0",
"etag": "^1.8.1",
"geojson-validation": "^1.0.2",
"jest": "^29.7.0",
"jest-junit": "^16.0.0",
"lint-staged": "^15.2.0",
"lodash": "~4.17.21",
"node-ttl": "^0.2.0",
"pg-native": "^3.0.1",
"pg-promise": "^11.5.4",
"prettier": "^3.1.1",
"rimraf": "^5.0.5",
"sinon": "17.0.1",
"ts-jest": "^29.1.1",
"typescript": "~5.3.3",
"velocityjs": "2.0.6"
"pg-promise": "^11.5.4"
},
"dependencies": {
"@aws-sdk/client-s3": "~3.472.0",
Expand Down
Loading

0 comments on commit 1342994

Please sign in to comment.