Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ Make sure you've read the contributing guidelines (CONTRIBUTING.md)

| Question | Answer |
| --------------- | ------ |
| Bug fix | ✔/✖ |
| New feature | ✔/✖ |
| Breaking change | ✔/✖ |
| Deprecations | ✔/✖ |
| Documentation | ✔/✖ |
| Tests added | ✔/✖ |
| Chore | ✔/✖ |
| Bug fix | ✔/✖ |
| New feature | ✔/✖ |
| Breaking change | ✔/✖ |
| Deprecations | ✔/✖ |
| Documentation | ✔/✖ |
| Tests added | ✔/✖ |
| Chore | ✔/✖ |

Related issues: #XXX , #XXX ...
Closes #XXX ...
Expand Down
15,535 changes: 7,504 additions & 8,031 deletions package-lock.json

Large diffs are not rendered by default.

50 changes: 26 additions & 24 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"start:dev": "npm run build && cd dist && cross-env CONFIG_OFFLINE_MODE=true node --enable-source-maps --import ./instrumentation.mjs ./index.js",
"assets:copy": "copyfiles -f ./config/* ./dist/config && copyfiles -f ./openapi3.yaml ./dist/ && copyfiles ./package.json dist",
"clean": "rimraf dist",
"generate:openapi-types": "openapi-helpers ./openapi3.yaml ./src/openapi.d.ts --format --add-typed-request-handler",
"generate:openapi-types": "openapi-helpers generate types ./openapi3.yaml ./src/openapi.d.ts --format --add-typed-request-handler",
"prepare": "node .husky/install.mjs"
},
"directories": {
Expand All @@ -30,31 +30,33 @@
"license": "ISC",
"dependencies": {
"@godaddy/terminus": "^4.12.1",
"@map-colonies/config": "^3.0.0",
"@map-colonies/error-express-handler": "^3.0.0",
"@map-colonies/express-access-log-middleware": "^3.0.1",
"@map-colonies/js-logger": "^2.0.0",
"@map-colonies/openapi-express-viewer": "^4.0.0",
"@map-colonies/config": "^4.0.1",
"@map-colonies/error-express-handler": "^4.0.0",
"@map-colonies/express-access-log-middleware": "^4.0.0",
"@map-colonies/js-logger": "^4.0.0",
"@map-colonies/openapi-express-viewer": "^5.0.0",
"@map-colonies/read-pkg": "^1.0.0",
"@map-colonies/schemas": "^1.9.0",
"@map-colonies/telemetry": "^10.0.1",
"@map-colonies/schemas": "^1.17.0",
"@map-colonies/tracing": "^1.0.0",
"@map-colonies/tracing-utils": "^1.0.0",
"@map-colonies/prometheus": "^1.0.0",
"@opentelemetry/api": "^1.9.0",
"compression": "^1.8.0",
"express": "^4.21.2",
"express-openapi-validator": "^5.4.7",
"express-openapi-validator": "^5.6.2",
"http-status-codes": "^2.3.0",
"prom-client": "^15.1.3",
"reflect-metadata": "^0.2.2",
"tsyringe": "^4.8.0"
},
"devDependencies": {
"@commitlint/cli": "^19.8.0",
"@map-colonies/commitlint-config": "^1.1.1",
"@map-colonies/eslint-config": "^6.0.0",
"@map-colonies/openapi-helpers": "^2.0.0",
"@map-colonies/prettier-config": "0.0.1",
"@map-colonies/tsconfig": "^1.0.1",
"@redocly/cli": "^1.34.0",
"@commitlint/cli": "^20.4.1",
"@map-colonies/commitlint-config": "^2.0.0",
"@map-colonies/eslint-config": "^7.1.0",
"@map-colonies/openapi-helpers": "^5.1.0",
"@map-colonies/prettier-config": "^1.0.0",
"@map-colonies/tsconfig": "^2.0.0",
"@redocly/cli": "^2.16.0",
"@swc/core": "^1.11.11",
"@swc/jest": "^0.2.37",
"@types/compression": "^1.7.5",
Expand All @@ -64,19 +66,19 @@
"@types/supertest": "^6.0.2",
"@types/swagger-ui-express": "^4.1.8",
"copyfiles": "^2.4.1",
"cross-env": "^7.0.3",
"eslint": "^9.23.0",
"cross-env": "^10.1.0",
"eslint": "^9.39.2",
"eslint-plugin-jest": "^28.11.0",
"husky": "^9.1.7",
"jest": "^29.7.0",
"jest-html-reporters": "^3.1.4",
"jest-html-reporters": "^3.1.7",
"jest-openapi": "^0.14.2",
"prettier": "^3.5.3",
"pretty-quick": "^4.1.1",
"rimraf": "^6.0.1",
"supertest": "^7.1.0",
"prettier": "^3.8.1",
"pretty-quick": "^4.2.2",
"rimraf": "^6.1.2",
"supertest": "^7.2.2",
"ts-jest": "^29.2.6",
"tsc-alias": "^1.8.11",
"typescript": "^5.8.2"
"typescript": "^5.9.3"
}
}
12 changes: 4 additions & 8 deletions .redocly.yaml → redocly.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
plugins:
[]
plugins: []
# This section is where you can import local plugins.
# We don't support community plugins.
# You don't need to import our built-in plugins and rules.
Expand All @@ -11,14 +10,12 @@ extends:
# You may override specific settings in the subsequent sections.
- recommended # This is the default (and built in) configuration. If it is too strict, try `minimal`.

resolve:
{}
resolve: {}
# Use this when you have external links in your definition that are not publicly accessible.
# Not required for Redocly API registry links.
# We recommend using environment variables for when possible.

preprocessors:
{}
preprocessors: {}
# Preprocessors are rarely indicated -- avoid if possible.
# This section can be omitted.

Expand All @@ -30,7 +27,6 @@ rules:
severity: error
no-empty-servers: off

decorators:
{}
decorators: {}
# Decorators modify the the definition after validation is complete, only in the bundling process.
# This section can be omitted if you don't use decorators.
2 changes: 1 addition & 1 deletion src/common/tracing.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Tracing } from '@map-colonies/telemetry';
import { Tracing } from '@map-colonies/tracing';
import { IGNORED_INCOMING_TRACE_ROUTES, IGNORED_OUTGOING_TRACE_ROUTES } from './constants';

let tracing: Tracing | undefined;
Expand Down
4 changes: 2 additions & 2 deletions src/containerConfig.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { getOtelMixin } from '@map-colonies/telemetry';
import { getOtelMixin } from '@map-colonies/tracing-utils';
import { trace } from '@opentelemetry/api';
import { Registry } from 'prom-client';
import { DependencyContainer } from 'tsyringe/dist/typings/types';
import jsLogger from '@map-colonies/js-logger';
import { jsLogger } from '@map-colonies/js-logger';
import { InjectionObject, registerDependencies } from '@common/dependencyRegistration';
import { SERVICES, SERVICE_NAME } from '@common/constants';
import { getTracing } from '@common/tracing';
Expand Down
3 changes: 3 additions & 0 deletions src/openapi.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
/* eslint-disable */
// This file was auto-generated. Do not edit manually.
// To update, run the error generation script again.

import type { TypedRequestHandlers as ImportedTypedRequestHandlers } from '@map-colonies/openapi-helpers/typedRequestHandler';
export type paths = {
'/anotherResource': {
Expand Down
6 changes: 2 additions & 4 deletions src/serverBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ import { getErrorHandlerMiddleware } from '@map-colonies/error-express-handler';
import { middleware as OpenApiMiddleware } from 'express-openapi-validator';
import { inject, injectable } from 'tsyringe';
import type { Logger } from '@map-colonies/js-logger';
import httpLogger from '@map-colonies/express-access-log-middleware';
import { getTraceContexHeaderMiddleware } from '@map-colonies/telemetry';
import { collectMetricsExpressMiddleware } from '@map-colonies/telemetry/prom-metrics';
import { httpLogger } from '@map-colonies/express-access-log-middleware';
import { collectMetricsExpressMiddleware } from '@map-colonies/prometheus';
import { Registry } from 'prom-client';
import type { ConfigType } from '@common/config';
import { SERVICES } from '@common/constants';
Expand Down Expand Up @@ -61,7 +60,6 @@ export class ServerBuilder {
}

this.serverInstance.use(bodyParser.json(this.config.get('server.request.payload')));
this.serverInstance.use(getTraceContexHeaderMiddleware());

const ignorePathRegex = new RegExp(`^${this.config.get('openapiConfig.basePath')}/.*`, 'i');
const apiSpecPath = this.config.get('openapiConfig.filePath');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import jsLogger from '@map-colonies/js-logger';
import { jsLogger } from '@map-colonies/js-logger';
import { trace } from '@opentelemetry/api';
import httpStatusCodes from 'http-status-codes';
import { createRequestSender, RequestSender } from '@map-colonies/openapi-helpers/requestSender';
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/docs/docs.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import jsLogger from '@map-colonies/js-logger';
import { jsLogger } from '@map-colonies/js-logger';
import { trace } from '@opentelemetry/api';
import httpStatusCodes from 'http-status-codes';
import { getApp } from '@src/app';
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/resourceName/resourceName.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import jsLogger from '@map-colonies/js-logger';
import { jsLogger } from '@map-colonies/js-logger';
import { trace } from '@opentelemetry/api';
import httpStatusCodes from 'http-status-codes';
import { createRequestSender, RequestSender } from '@map-colonies/openapi-helpers/requestSender';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import jsLogger from '@map-colonies/js-logger';
import { jsLogger } from '@map-colonies/js-logger';
import { AnotherResourceManager } from '@src/anotherResource/models/anotherResourceManager';

let anotherResourceManager: AnotherResourceManager;
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/resourceName/models/resourceNameModel.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import jsLogger from '@map-colonies/js-logger';
import { jsLogger } from '@map-colonies/js-logger';
import { ResourceNameManager } from '@src/resourceName/models/resourceNameManager';

let resourceNameManager: ResourceNameManager;
Expand Down
Loading