Skip to content

Commit

Permalink
chore(deps): bump @opentelemetry/instrumentation-ioredis (#1616)
Browse files Browse the repository at this point in the history
Bumps [@opentelemetry/instrumentation-ioredis](https://github.com/open-telemetry/opentelemetry-js-contrib) from 0.30.0 to 0.31.0.
- [Release notes](https://github.com/open-telemetry/opentelemetry-js-contrib/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/CHANGELOG.md)
- [Commits](open-telemetry/opentelemetry-js-contrib@contrib-test-utils-v0.30.0...contrib-test-utils-v0.31.0)

---
updated-dependencies:
- dependency-name: "@opentelemetry/instrumentation-ioredis"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
dependabot[bot] authored and nicolasburtey committed Sep 1, 2022
1 parent c791eb0 commit 8c9557b
Show file tree
Hide file tree
Showing 11 changed files with 698 additions and 29 deletions.
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"@ory/client": "^0.0.1-alpha.123",
"@ory/kratos-client": "^0.10.1",
"ajv": "^8.10.0",
"apollo-server-core": "^3.10.1",
"apollo-server-core": "^3.10.2",
"apollo-server-errors": "^3.3.1",
"apollo-server-express": "^3.10.2",
"axios": "^0.27.2",
Expand All @@ -57,16 +57,17 @@
"csv-writer": "^1.6.0",
"dedent": "^0.7.0",
"dotenv": "^16.0.0",
"express": "^4.17.2",
"express": "^4.18.1",
"express-jwt": "^7.7.5",
"firebase-admin": "^11.0.1",
"google-protobuf": "^3.21.0",
"graphql": "^16.3.0",
"graphql": "^16.6.0",
"graphql-middleware": "^6.1.32",
"graphql-redis-subscriptions": "^2.4.2",
"graphql-relay": "^0.10.0",
"graphql-shield": "^7.5.0",
"graphql-tools": "^8.3.4",
"graphql-ws": "^5.10.1",
"gt3-server-node-express-sdk": "https://github.com/GaloyMoney/gt3-server-node-express-bypass#master",
"helmet": "^5.1.1",
"i18n": "^0.15.0",
Expand Down Expand Up @@ -96,7 +97,8 @@
"redlock": "^5.0.0-beta.2",
"subscriptions-transport-ws": "^0.11.0",
"twilio": "^3.81.0",
"uuid-by-string": "^3.0.4"
"uuid-by-string": "^3.0.4",
"ws": "^8.8.1"
},
"devDependencies": {
"@apollo/client": "^3.6.6",
Expand Down Expand Up @@ -152,11 +154,9 @@
"ts-node-dev": "^2.0.0",
"tsconfig-paths": "^4.1.0",
"tscpaths": "^0.0.9",
"typescript": "^4.7.3",
"ws": "^8.8.1"
"typescript": "^4.7.3"
},
"resolutions": {
"**/**/ws": ">=7.4.6",
"**/**/json-bigint": ">=1.0.0",
"**/**/lodash": ">=4.17.12",
"**/**/lodash.merge": ">=4.6.2"
Expand Down
7 changes: 5 additions & 2 deletions src/domain/users-ips/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
export const parseIps = (ips: undefined | string | string[]): IpAddress | undefined => {
export const parseIps = (
ips: undefined | string | string[] | unknown,
): IpAddress | undefined => {
if (!ips) return undefined

if (Array.isArray(ips) && ips.length) {
return toIpAddress(ips[0])
if (typeof ips[0] === "string") return toIpAddress(ips[0])
return undefined
}

if (typeof ips === "string") {
Expand Down
4 changes: 3 additions & 1 deletion src/servers/graphql-admin-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { GALOY_ADMIN_PORT } from "@config"

import { gqlAdminSchema } from "../graphql"

import { startApolloServer, isAuthenticated, isEditor } from "./graphql-server"
import { isAuthenticated, isEditor, serverPath } from "./helper"

dotenv.config()

Expand Down Expand Up @@ -42,6 +42,8 @@ export async function startApolloServerForAdminSchema() {
)

const schema = applyMiddleware(gqlAdminSchema, permissions)

const { startApolloServer } = await import(serverPath)
return startApolloServer({ schema, port: GALOY_ADMIN_PORT, type: "admin" })
}

Expand Down
5 changes: 4 additions & 1 deletion src/servers/graphql-main-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { GALOY_API_PORT } from "@config"

import { gqlMainSchema } from "../graphql"

import { isAuthenticated, startApolloServer } from "./graphql-server"
import { isAuthenticated, serverPath } from "./helper"
import { walletIdMiddleware } from "./middlewares/wallet-id"

const graphqlLogger = baseLogger.child({ module: "graphql" })
Expand Down Expand Up @@ -60,6 +60,9 @@ export async function startApolloServerForCoreSchema() {
)

const schema = applyMiddleware(gqlMainSchema, permissions, walletIdMiddleware)

const { startApolloServer } = await import(serverPath)

return startApolloServer({
schema,
port: GALOY_API_PORT,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export const startApolloServer = async ({
const app = express()
const httpServer = createServer(app)

const apolloPulgins = [
const apolloPlugins = [
ApolloServerPluginDrainHttpServer({ httpServer }),
apolloConfig.playground
? ApolloServerPluginLandingPageGraphQLPlayground({
Expand All @@ -146,7 +146,7 @@ export const startApolloServer = async ({
]

if (isProd && enableApolloUsageReporting) {
apolloPulgins.push(
apolloPlugins.push(
ApolloServerPluginUsageReporting({
rewriteError(err) {
graphqlLogger.error(err, "Error caught in rewriteError")
Expand All @@ -159,7 +159,7 @@ export const startApolloServer = async ({
const apolloServer = new ApolloServer({
schema,
introspection: apolloConfig.playground,
plugins: apolloPulgins,
plugins: apolloPlugins,
context: async (context) => {
// @ts-expect-error: TODO
const tokenPayload = context.req?.token ?? null
Expand Down
Loading

0 comments on commit 8c9557b

Please sign in to comment.