Skip to content

Conversation

@bbajwadev
Copy link

upgraded nrwl to nx

fix(api-core-feature-ogma-config): remove invalid service key from OgmaModuleOptions

fix(api-kinetic-service): correct type for webhook headers

  • changed headers from Record<string, string>AxiosRequestHeaders
  • updated sendEventWebhook and sendVerifyWebhook methods

chore(deps): review unused @nestjs/axios and confirm @golevelup/nestjs-modules usage

  • identified Solana lib mismatch between @solana/web3.js, @solana/spl-token, and buffer-layout
  • plan to resolve with package dedupe and resolutions tomorrow

refactor(api-kinetic-service): preserve transaction metrics and error handling

  • ensured counters for event/verify webhooks remain consistent
  • validated transaction update flow with error logging

build(nx): resolve TypeScript compile issues

  • fixed TS2353 (Ogma options)
  • fixed TS2322 (Axios headers)
  • build now passes successfully

note(runtime): Solana buffer-layout mismatch causing crash (fields must be array of Layout instances)

  • identified root cause: dependency duplication
  • to be fixed in next session with yarn-deduplicate and resolutions

fix(api-core-feature-ogma-config): remove invalid `service` key from OgmaModuleOptions

fix(api-kinetic-service): correct type for webhook headers
- changed headers from `Record<string, string>` → `AxiosRequestHeaders`
- updated `sendEventWebhook` and `sendVerifyWebhook` methods

chore(deps): review unused @nestjs/axios and confirm @golevelup/nestjs-modules usage
- identified Solana lib mismatch between @solana/web3.js, @solana/spl-token, and buffer-layout
- plan to resolve with package dedupe and resolutions tomorrow

refactor(api-kinetic-service): preserve transaction metrics and error handling
- ensured counters for event/verify webhooks remain consistent
- validated transaction update flow with error logging

build(nx): resolve TypeScript compile issues
- fixed TS2353 (Ogma options)
- fixed TS2322 (Axios headers)
- build now passes successfully

note(runtime): Solana `buffer-layout` mismatch causing crash (`fields must be array of Layout instances`)
- identified root cause: dependency duplication
- to be fixed in next session with `yarn-deduplicate` and `resolutions`
fix(api-core-feature-ogma-config): remove invalid `service` key from OgmaModuleOptions

fix(api-kinetic-service): correct type for webhook headers
- changed headers from `Record<string, string>` → `AxiosRequestHeaders`
- updated `sendEventWebhook` and `sendVerifyWebhook` methods

chore(deps): review unused @nestjs/axios and confirm @golevelup/nestjs-modules usage
- identified Solana lib mismatch between @solana/web3.js, @solana/spl-token, and buffer-layout
- plan to resolve with package dedupe and resolutions tomorrow

refactor(api-kinetic-service): preserve transaction metrics and error handling
- ensured counters for event/verify webhooks remain consistent
- validated transaction update flow with error logging

build(nx): resolve TypeScript compile issues
- fixed TS2353 (Ogma options)
- fixed TS2322 (Axios headers)
- build now passes successfully

note(runtime): Solana `buffer-layout` mismatch causing crash (`fields must be array of Layout instances`)
- identified root cause: dependency duplication
- to be fixed in next session with `yarn-deduplicate` and `resolutions`
fix(api-core-feature-ogma-config): remove invalid `service` key from OgmaModuleOptions

fix(api-kinetic-service): correct type for webhook headers
- changed headers from `Record<string, string>` → `AxiosRequestHeaders`
- updated `sendEventWebhook` and `sendVerifyWebhook` methods

chore(deps): review unused @nestjs/axios and confirm @golevelup/nestjs-modules usage
- identified Solana lib mismatch between @solana/web3.js, @solana/spl-token, and buffer-layout
- plan to resolve with package dedupe and resolutions tomorrow

refactor(api-kinetic-service): preserve transaction metrics and error handling
- ensured counters for event/verify webhooks remain consistent
- validated transaction update flow with error logging

build(nx): resolve TypeScript compile issues
- fixed TS2353 (Ogma options)
- fixed TS2322 (Axios headers)
- build now passes successfully

note(runtime): Solana `buffer-layout` mismatch causing crash (`fields must be array of Layout instances`)
- identified root cause: dependency duplication
- to be fixed in next session with `yarn-deduplicate` and `resolutions`
fix(api-core-feature-ogma-config): remove invalid `service` key from OgmaModuleOptions

fix(api-kinetic-service): correct type for webhook headers
- changed headers from `Record<string, string>` → `AxiosRequestHeaders`
- updated `sendEventWebhook` and `sendVerifyWebhook` methods

chore(deps): review unused @nestjs/axios and confirm @golevelup/nestjs-modules usage
- identified Solana lib mismatch between @solana/web3.js, @solana/spl-token, and buffer-layout
- plan to resolve with package dedupe and resolutions tomorrow

refactor(api-kinetic-service): preserve transaction metrics and error handling
- ensured counters for event/verify webhooks remain consistent
- validated transaction update flow with error logging

build(nx): resolve TypeScript compile issues
- fixed TS2353 (Ogma options)
- fixed TS2322 (Axios headers)
- build now passes successfully

note(runtime): Solana `buffer-layout` mismatch causing crash (`fields must be array of Layout instances`)
- identified root cause: dependency duplication
- to be fixed in next session with `yarn-deduplicate` and `resolutions`
@mocolicious mocolicious requested a review from Copilot August 23, 2025 19:13
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request upgrades the project from the legacy NX workspace (nrwl) to the modern NX build system (nx), including dependency updates and type fixes. The upgrade aims to improve build performance and resolve TypeScript compilation issues.

  • Migrated all @nrwl/* imports and references to @nx/* across the entire codebase
  • Updated package.json dependencies to use modern NX tooling and upgraded core libraries like NestJS and cache-manager
  • Fixed TypeScript compilation errors related to Ogma configuration and Axios headers type issues

Reviewed Changes

Copilot reviewed 276 out of 281 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
package.json Upgraded NX tooling from @nrwl to @nx, updated dependencies including NestJS core, cache-manager, and Axios
nx.json Migrated NX configuration to new format with updated generator references and caching settings
tools/generators/ Updated all generator imports from @nrwl/devkit to @nx/devkit
libs/api/core/feature/src/lib/api-core-feature-ogma-config.ts Fixed Ogma module configuration to support multiple API versions
libs/api/webhook/data-access/src/lib/api-webhook.service.ts Corrected Axios headers type handling for webhook functionality
Project configuration files Mass update of executor and import references from @nrwl to @nx

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +46 to 47
const ttlMs = (ttl ?? 5) * 1000
await this.set<T>(namespace, key, result, ttl)
Copy link

Copilot AI Aug 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ttlMs variable is calculated but never used. The method still calls this.set<T>(namespace, key, result, ttl) with the original ttl parameter instead of the converted milliseconds value.

Suggested change
const ttlMs = (ttl ?? 5) * 1000
await this.set<T>(namespace, key, result, ttl)
await this.set<T>(namespace, key, result, ttlMs)

Copilot uses AI. Check for mistakes.
Comment on lines +73 to +75
ttlMs = 5000, // default 5 seconds
): Promise<void> {
const cacheKey = getCacheKey(namespace, key)
Copy link

Copilot AI Aug 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default TTL is now hardcoded as 5000ms (5 seconds) instead of using the previous pattern of ttl ?? 5. This creates inconsistency with the usage pattern where TTL was expected to be in seconds.

Suggested change
ttlMs = 5000, // default 5 seconds
): Promise<void> {
const cacheKey = getCacheKey(namespace, key)
ttl: number = 5, // default 5 seconds
): Promise<void> {
const cacheKey = getCacheKey(namespace, key)
const ttlMs = ttl * 1000

Copilot uses AI. Check for mistakes.
Comment on lines +235 to +240
const base = options.headers instanceof AxiosHeaders ? (options.headers.toJSON?.() ?? {}) : (options.headers ?? {})

const kineticOnly = Object.keys(base)
.filter((k) => k.startsWith('kinetic-'))
.reduce((acc, curr) => ({ ...acc, [curr]: options.headers[curr] }), {})

return this.getAppEnvHeaders(appEnv, {
...options,
headers: {
...headers,
'kinetic-tx-id': options.transaction?.id ? options.transaction.id : 'N/A',
},
})
.reduce<Record<string, string>>((acc, k) => {
acc[k] = String((base as any)[k])
Copy link

Copilot AI Aug 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using as any defeats the purpose of TypeScript's type safety. Consider using proper type assertions or creating a more specific type for the base object to avoid this type escape hatch.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant