Files
zeekayandHanzo Dev 0988173773 build: typecheck on the native compiler, keep 6 for the tools
typescript 7.0.2 is the native compiler and exports no JavaScript API, so next,
ts-jest and typescript-eslint cannot read it. It comes in aliased as tsgo and
does the typechecking; typescript stays on the 6 line for those tools.

Four settings the native compiler removed move with it. baseUrl is gone, so every
tsconfig that used it spells its own root as a "*" path; the shared base config's
@safe-global/* paths were only correct because baseUrl re-rooted them, and now
name the real directories from where they are written. moduleResolution node10
becomes bundler, downlevelIteration goes (it was a no-op at target esnext), and
apps/web declares '*.css' and '*.md'. Two sources follow: the faker import drops
its trailing '/.', and the IntersectionObserver mock gains scrollMargin.

All eight packages report 0 diagnostics before and after, identical on 6.0.3 and
7.0.2.

Co-authored-by: Hanzo Dev <[email protected]>
2026-09-17 00:44:22 -07:00
..
2025-09-26 11:28:13 +02:00

@safe-global/store

This is a utility package that deals with the state management of the application. It uses the Redux Toolkit to manage the state of the application.

Usage

The use the generated API you first need to initialiize the baseURL of the API.

import { setBaseUrl } from '@safe-global/store'

setBaseUrl('YOUR_API_BASE_URL')

Automatic code generation from the Client Gateway's OpenAPI

This package includes a script to generate the necessary boilerplate API code from the Client Gateway (CGW)'s OpenAPI specification using @rtk-query/codegen-openapi.

Prerequisites

  1. You've initialized the monorepo and installed all dependencies.
  2. The openapi-config.ts file is correctly configured in this package with your OpenAPI specification details.
  3. If you're running your own CGW service, set the PRODUCTION_CGW_API_URL env variable.

Running the Code Generation Script

From the mono-repo root directory, run the following command:

yarn workspace @safe-global/store build

or, for staging API:

yarn workspace @safe-global/store build:dev

This will:

  • Fetch the OpenAPI schema.
  • Use the configuration provided in the openapi-config.ts file.
  • Generate the API code using @rtk-query/codegen-openapi.