diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 26042ad1..fc601496 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -1,4 +1,4 @@ -name: Lint and Test +name: tests on: pull_request: types: [opened, reopened, synchronize, ready_for_review] @@ -19,7 +19,7 @@ jobs: - name: Setup pnpm uses: pnpm/action-setup@v2 with: - version: 9.1.3 + version: 9.1.4 - name: Install Node.js uses: actions/setup-node@v3 with: @@ -34,7 +34,7 @@ jobs: - run: pnpm nx affected -t pub -- get # install dart dependencies for affected projects - run: pnpm run build - run: pnpm nx affected -t lint - test: + unit-tests: if: github.event.pull_request.draft == false runs-on: ubuntu-latest permissions: @@ -50,7 +50,7 @@ jobs: - name: Setup pnpm uses: pnpm/action-setup@v2 with: - version: 9.1.3 + version: 9.1.4 - name: Install Node.js uses: actions/setup-node@v3 with: @@ -65,7 +65,7 @@ jobs: - run: pnpm nx affected -t pub -- get # install dart dependencies for affected projects - run: pnpm run build - run: pnpm nx affected -t test - integration-test: + integration-tests: if: github.event.pull_request.draft == false runs-on: ubuntu-latest permissions: @@ -81,7 +81,7 @@ jobs: - name: Setup pnpm uses: pnpm/action-setup@v2 with: - version: 9.1.3 + version: 9.1.4 - name: Install Node.js uses: actions/setup-node@v3 with: @@ -89,11 +89,8 @@ jobs: cache: pnpm - name: Install Node Dependencies run: pnpm i -r --frozen-lockfile - - name: Set NX Shas - uses: nrwl/nx-set-shas@v3 - with: - main-branch-name: master - name: Install dart dependencies run: pnpm nx run-many -t pub -- get # install dart dependencies in all dart projects - run: pnpm run build + - run: pnpm i -r - run: pnpm run integration-tests diff --git a/README.md b/README.md index 654364e8..17fcd48d 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ export default defineConfig({ ### Typescript App Definition (Recommended) -Arri comes with some useful helpers that reduces the boilerplate of manually creating a JSON definition file. Additionally the validators created with Arri Validate can be used throughout your app. +Arri comes with some useful helpers that reduces the boilerplate of manually creating a JSON definition file. Additionally the validators created with Arri Schema can be used throughout your app. ```ts // AppDefinition.ts diff --git a/languages/dart/dart-client/lib/request.dart b/languages/dart/dart-client/lib/request.dart index 00553203..1e2bdf1a 100644 --- a/languages/dart/dart-client/lib/request.dart +++ b/languages/dart/dart-client/lib/request.dart @@ -1,3 +1,4 @@ +import 'dart:async'; import 'dart:convert'; import 'package:arri_client/errors.dart'; @@ -25,7 +26,7 @@ Future arriRequest( http.Client? httpClient, HttpMethod method = HttpMethod.get, Map? params, - Map Function()? headers, + FutureOr> Function()? headers, /// manually specify specific url query parameters Map? query, @@ -40,7 +41,8 @@ Future arriRequest( """{"statusCode": 400,"statusMessage":"$defaultErrorMsg"}""", 400, ); - final finalHeaders = {...headers?.call() ?? {}}; + + final finalHeaders = await headers?.call() ?? {}; if (clientVersion != null && clientVersion.isNotEmpty) { finalHeaders["client-version"] = clientVersion; } @@ -123,7 +125,7 @@ Future parsedArriRequest( http.Client? httpClient, HttpMethod method = HttpMethod.post, Map? params, - Map Function()? headers, + FutureOr> Function()? headers, String? clientVersion, required T Function(String) parser, }) async { @@ -148,7 +150,7 @@ Future> parsedArriRequestSafe( http.Client? httpClient, HttpMethod httpMethod = HttpMethod.get, Map? params, - Map Function()? headers, + FutureOr> Function()? headers, required T Function(String) parser, String? clientVersion, }) async { diff --git a/languages/dart/dart-client/lib/sse.dart b/languages/dart/dart-client/lib/sse.dart index 2adf2c1a..109ecc2d 100644 --- a/languages/dart/dart-client/lib/sse.dart +++ b/languages/dart/dart-client/lib/sse.dart @@ -20,7 +20,7 @@ EventSource parsedArriSseRequest( required HttpMethod method, required T Function(String data) parser, Map? params, - Map Function()? headers, + FutureOr> Function()? headers, Duration? retryDelay, int? maxRetryCount, SseHookOnData? onData, @@ -37,8 +37,8 @@ EventSource parsedArriSseRequest( method: method, parser: parser, params: params, - headers: () { - final result = headers?.call() ?? {}; + headers: () async { + final result = await headers?.call() ?? {}; if (clientVersion != null && clientVersion.isNotEmpty) { result["client-version"] = clientVersion; } @@ -60,7 +60,7 @@ class EventSource { final String url; final HttpMethod method; final Map? _params; - final Map Function()? _headers; + final FutureOr> Function()? _headers; String? lastEventId; StreamController? _streamController; final Duration _retryDelay; @@ -83,7 +83,7 @@ class EventSource { http.Client? httpClient, this.method = HttpMethod.get, Map? params, - Map Function()? headers, + FutureOr> Function()? headers, Duration retryDelay = Duration.zero, int? maxRetryCount, // hooks @@ -151,7 +151,7 @@ class EventSource { if (body.isNotEmpty) { request.body = body; } - _headers?.call().forEach((key, value) { + (await _headers?.call())?.forEach((key, value) { request.headers[key] = value; }); if (lastEventId != null) { diff --git a/languages/dart/dart-client/lib/ws.dart b/languages/dart/dart-client/lib/ws.dart index 2dc25183..97b23f81 100644 --- a/languages/dart/dart-client/lib/ws.dart +++ b/languages/dart/dart-client/lib/ws.dart @@ -7,7 +7,7 @@ import 'package:web_socket_channel/status.dart' as status; Future> arriWebsocketRequest( String url, { - Map Function()? headers, + FutureOr> Function()? headers, required TServerMessage Function(String msg) parser, required String Function(TClientMessage msg) serializer, String? clientVersion, @@ -18,7 +18,7 @@ Future> if (headers != null || clientVersion?.isNotEmpty == true) { final queryParts = []; for (final entry - in headers?.call().entries ?? >[]) { + in (await headers?.call())?.entries ?? >[]) { queryParts.add("${entry.key}=${entry.value}"); } if (clientVersion != null) { diff --git a/languages/dart/dart-client/project.json b/languages/dart/dart-client/project.json index 68ab50c0..e68c8215 100644 --- a/languages/dart/dart-client/project.json +++ b/languages/dart/dart-client/project.json @@ -42,6 +42,13 @@ "command": "dart pub get", "cwd": "languages/dart/dart-client" } + }, + "lint": { + "executor": "nx:run-commands", + "options": { + "command": "dart analyze", + "cwd": "languages/dart/dart-client" + } } } } diff --git a/languages/dart/dart-client/pubspec.yaml b/languages/dart/dart-client/pubspec.yaml index 3923f818..95810d91 100644 --- a/languages/dart/dart-client/pubspec.yaml +++ b/languages/dart/dart-client/pubspec.yaml @@ -1,6 +1,6 @@ name: arri_client description: Client library needed for the code generated by the arri server library. -version: "0.46.0" +version: "0.49.1" repository: https://github.com/modiimedia/arri issue_tracker: https://github.com/modiimedia/arri/issues environment: @@ -9,5 +9,5 @@ dependencies: http: ">=0.13.0 <2.0.0" web_socket_channel: ">=2.4.4 <3.0.0" dev_dependencies: - lints: ^3.0.0 - test: ^1.25.1 + lints: ^4.0.0 + test: ^1.25.6 diff --git a/languages/dart/dart-codegen-reference/project.json b/languages/dart/dart-codegen-reference/project.json index ee4df5c5..d670dc7d 100644 --- a/languages/dart/dart-codegen-reference/project.json +++ b/languages/dart/dart-codegen-reference/project.json @@ -10,6 +10,13 @@ "command": "dart pub", "cwd": "languages/dart/dart-codegen-reference" } + }, + "lint": { + "executor": "nx:run-commands", + "options": { + "command": "dart analyze", + "cwd": "languages/dart/dart-codegen-reference" + } } } } diff --git a/languages/dart/dart-codegen-reference/pubspec.lock b/languages/dart/dart-codegen-reference/pubspec.lock index beb2412c..843713cd 100644 --- a/languages/dart/dart-codegen-reference/pubspec.lock +++ b/languages/dart/dart-codegen-reference/pubspec.lock @@ -31,7 +31,7 @@ packages: path: "../dart-client" relative: true source: path - version: "0.46.0" + version: "0.49.1" async: dependency: transitive description: @@ -148,10 +148,10 @@ packages: dependency: "direct dev" description: name: lints - sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290 + sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235" url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "4.0.0" logging: dependency: transitive description: diff --git a/languages/dart/dart-codegen-reference/pubspec.yaml b/languages/dart/dart-codegen-reference/pubspec.yaml index 5186093a..3170d0e0 100644 --- a/languages/dart/dart-codegen-reference/pubspec.yaml +++ b/languages/dart/dart-codegen-reference/pubspec.yaml @@ -9,5 +9,5 @@ dependencies: arri_client: path: "../dart-client" dev_dependencies: - lints: ^3.0.0 - test: ^1.21.0 + lints: ^4.0.0 + test: ^1.21.6 diff --git a/languages/dart/dart-codegen-reference/reference_client.dart b/languages/dart/dart-codegen-reference/reference_client.dart index 12362b6f..796a299f 100644 --- a/languages/dart/dart-codegen-reference/reference_client.dart +++ b/languages/dart/dart-codegen-reference/reference_client.dart @@ -1,5 +1,6 @@ // this file was autogenerated by arri // ignore_for_file: type=lint, unused_field +import "dart:async"; import "dart:convert"; import "package:arri_client/arri_client.dart"; import "package:http/http.dart" as http; @@ -8,11 +9,11 @@ class TestClient { final http.Client? _httpClient; final String _baseUrl; final String _clientVersion = "11"; - late final Map Function()? _headers; + late final FutureOr> Function()? _headers; TestClient({ http.Client? httpClient, String baseUrl = "", - Map Function()? headers, + FutureOr> Function()? headers, }) : _httpClient = httpClient, _baseUrl = baseUrl, _headers = headers; @@ -44,11 +45,11 @@ class TestClientUsersService { final http.Client? _httpClient; final String _baseUrl; final String _clientVersion = "11"; - late final Map Function()? _headers; + late final FutureOr> Function()? _headers; TestClientUsersService({ http.Client? httpClient, String baseUrl = "", - Map Function()? headers, + FutureOr> Function()? headers, }) : _httpClient = httpClient, _baseUrl = baseUrl, _headers = headers; @@ -135,11 +136,11 @@ class TestClientUsersSettingsService { final http.Client? _httpClient; final String _baseUrl; final String _clientVersion = "11"; - late final Map Function()? _headers; + late final FutureOr> Function()? _headers; TestClientUsersSettingsService({ http.Client? httpClient, String baseUrl = "", - Map Function()? headers, + FutureOr> Function()? headers, }) : _httpClient = httpClient, _baseUrl = baseUrl, _headers = headers; diff --git a/languages/dart/dart-codegen/package.json b/languages/dart/dart-codegen/package.json index 5db9dcaa..85e03251 100644 --- a/languages/dart/dart-codegen/package.json +++ b/languages/dart/dart-codegen/package.json @@ -1,6 +1,6 @@ { "name": "@arrirpc/codegen-dart", - "version": "0.46.0", + "version": "0.49.1", "type": "module", "license": "MIT", "author": { "name": "joshmossas", "url": "https://github.com/joshmossas" }, diff --git a/languages/dart/dart-codegen/src/index.test.ts b/languages/dart/dart-codegen/src/index.test.ts index f9827c11..1dd45599 100644 --- a/languages/dart/dart-codegen/src/index.test.ts +++ b/languages/dart/dart-codegen/src/index.test.ts @@ -49,11 +49,11 @@ describe("Service Generation", () => { final http.Client? _httpClient; final String _baseUrl; final String _clientVersion = ""; - late final Map Function()? _headers; + late final FutureOr> Function()? _headers; UserService({ http.Client? httpClient, String baseUrl = "", - Map Function()? headers, + FutureOr> Function()? headers, }) : _httpClient = httpClient, _baseUrl = baseUrl, _headers = headers; @@ -95,11 +95,11 @@ class UserSettingsService { final http.Client? _httpClient; final String _baseUrl; final String _clientVersion = ""; - late final Map Function()? _headers; + late final FutureOr> Function()? _headers; UserSettingsService({ http.Client? httpClient, String baseUrl = "", - Map Function()? headers, + FutureOr> Function()? headers, }) : _httpClient = httpClient, _baseUrl = baseUrl, _headers = headers; @@ -140,11 +140,11 @@ class UserSettingsService { final http.Client? _httpClient; final String _baseUrl; final String _clientVersion = ""; - late final Map Function()? _headers; + late final FutureOr> Function()? _headers; PostsService({ http.Client? httpClient, String baseUrl = "", - Map Function()? headers, + FutureOr> Function()? headers, }) : _httpClient = httpClient, _baseUrl = baseUrl, _headers = headers; diff --git a/languages/dart/dart-codegen/src/index.ts b/languages/dart/dart-codegen/src/index.ts index f810495e..2fcf49e8 100644 --- a/languages/dart/dart-codegen/src/index.ts +++ b/languages/dart/dart-codegen/src/index.ts @@ -159,6 +159,7 @@ ${modelParts.join("\n")}`; } return `// this file was autogenerated by arri // ignore_for_file: type=lint, unused_field +import "dart:async"; import "dart:convert"; import "package:arri_client/arri_client.dart"; import "package:http/http.dart" as http; @@ -167,11 +168,11 @@ class ${opts.clientName} { final http.Client? _httpClient; final String _baseUrl; final String _clientVersion = "${def.info?.version ?? ""}"; - late final Map Function()? _headers; + late final FutureOr> Function()? _headers; ${opts.clientName}({ http.Client? httpClient, String baseUrl = "", - Map Function()? headers, + FutureOr> Function()? headers, }) : _httpClient = httpClient, _baseUrl = baseUrl, _headers = headers; @@ -228,11 +229,11 @@ export function dartServiceFromDefinition( final http.Client? _httpClient; final String _baseUrl; final String _clientVersion = "${opts.versionNumber}"; - late final Map Function()? _headers; + late final FutureOr> Function()? _headers; ${serviceName}Service({ http.Client? httpClient, String baseUrl = "", - Map Function()? headers, + FutureOr> Function()? headers, }) : _httpClient = httpClient, _baseUrl = baseUrl, _headers = headers; diff --git a/languages/kotlin/kotlin-codegen/package.json b/languages/kotlin/kotlin-codegen/package.json index 6d0d305b..00e0c539 100644 --- a/languages/kotlin/kotlin-codegen/package.json +++ b/languages/kotlin/kotlin-codegen/package.json @@ -1,6 +1,6 @@ { "name": "@arrirpc/codegen-kotlin", - "version": "0.46.0", + "version": "0.49.1", "type": "module", "license": "MIT", "author": { "name": "joshmossas", "url": "https://github.com/joshmossas" }, diff --git a/languages/kotlin/kotlin-codegen/src/_index.test.ts b/languages/kotlin/kotlin-codegen/src/_index.test.ts index 5ecac3a7..b0c6362e 100644 --- a/languages/kotlin/kotlin-codegen/src/_index.test.ts +++ b/languages/kotlin/kotlin-codegen/src/_index.test.ts @@ -1,9 +1,6 @@ import fs from "node:fs"; -import { - type AppDefinition, - normalizeWhitespace, -} from "@arrirpc/codegen-utils"; +import { normalizeWhitespace } from "@arrirpc/codegen-utils"; import path from "pathe"; import { kotlinClientFromAppDefinition } from "./_index"; @@ -36,35 +33,3 @@ test("output matches the reference client", () => { normalizeWhitespace(referenceClient), ); }); - -test("blah", () => { - const appDef: AppDefinition = { - arriSchemaVersion: "0.0.5", - procedures: { - sayHello: { - transport: "http", - method: "get", - path: "/say-hello", - params: "SayHelloParams", - response: "SayHelloResponse", - }, - "animals.getAnimal": { - transport: "http", - method: "get", - path: "/get-animal", - params: "GetAnimalParams", - response: "GetAnimalResponse", - }, - }, - definitions: {}, - }; - const client = kotlinClientFromAppDefinition(appDef, { - clientName: "Client", - modelPrefix: undefined, - outputFile: "", - }); - fs.writeFileSync( - path.resolve(__dirname, "../.temp/HelloClient.kt"), - client, - ); -}); diff --git a/languages/ts/ts-client/package.json b/languages/ts/ts-client/package.json index 3fae61b2..c6706b21 100644 --- a/languages/ts/ts-client/package.json +++ b/languages/ts/ts-client/package.json @@ -1,6 +1,6 @@ { "name": "@arrirpc/client", - "version": "0.46.0", + "version": "0.49.1", "type": "module", "main": "./dist/index.cjs", "module": "./dist/index.mjs", @@ -16,7 +16,7 @@ }, "dependencies": { "@arrirpc/schema": "workspace:*", - "event-source-plus": "^0.0.6", + "event-source-plus": "^0.1.1", "ofetch": "^1.3.4", "ws": "^8.17.0" }, diff --git a/languages/ts/ts-client/src/request.ts b/languages/ts/ts-client/src/request.ts index 8b16185b..baba07bc 100644 --- a/languages/ts/ts-client/src/request.ts +++ b/languages/ts/ts-client/src/request.ts @@ -1,7 +1,8 @@ -import { type HttpMethod } from "event-source-plus"; +import { EventSourcePlusOptions, type HttpMethod } from "event-source-plus"; import { FetchError, ofetch } from "ofetch"; import { ArriErrorInstance, isArriError } from "./errors"; +import { getHeaders } from "./utils"; export interface ArriRequestOpts< TType, @@ -9,7 +10,7 @@ export interface ArriRequestOpts< > { url: string; method: HttpMethod; - headers?: Record | (() => Record); + headers?: EventSourcePlusOptions["headers"]; params?: TParams; parser: (input: unknown) => TType; serializer: ( @@ -45,12 +46,7 @@ export async function arriRequest< break; } try { - let headers: Record = {}; - if (typeof opts.headers === "function") { - headers = opts.headers(); - } else { - headers = opts.headers ?? {}; - } + const headers = (await getHeaders(opts.headers)) ?? {}; if (contentType) headers["Content-Type"] = contentType; if (opts.clientVersion) headers["client-version"] = opts.clientVersion; const result = await ofetch(url, { diff --git a/languages/ts/ts-client/src/sse.ts b/languages/ts/ts-client/src/sse.ts index c8ed3c29..daa0fc29 100644 --- a/languages/ts/ts-client/src/sse.ts +++ b/languages/ts/ts-client/src/sse.ts @@ -9,6 +9,7 @@ import { import { ArriErrorInstance } from "./errors"; import { type ArriRequestOpts } from "./request"; +import { getHeaders } from "./utils"; export interface SseEvent { id?: string; @@ -69,13 +70,9 @@ export function arriSseRequest< const eventSource = new EventSourcePlus(url, { method: opts.method ?? "get", - headers: () => { - let headers: Record; - if (typeof opts.headers === "function") { - headers = opts.headers(); - } else { - headers = opts.headers ?? {}; - } + headers: async () => { + const headers: Record = + (await getHeaders(opts.headers)) ?? {}; if (opts.clientVersion) { headers["client-version"] = opts.clientVersion; } diff --git a/languages/ts/ts-client/src/utils.ts b/languages/ts/ts-client/src/utils.ts new file mode 100644 index 00000000..91c2e65f --- /dev/null +++ b/languages/ts/ts-client/src/utils.ts @@ -0,0 +1,14 @@ +import { EventSourcePlusOptions } from "event-source-plus"; + +export async function getHeaders( + input: EventSourcePlusOptions["headers"], +): Promise | undefined> { + if (typeof input === "function") { + const result = input(); + if ("then" in result && typeof result.then === "function") { + return result.then((data) => data); + } + return result; + } + return input; +} diff --git a/languages/ts/ts-client/src/ws.ts b/languages/ts/ts-client/src/ws.ts index 57010231..5849a730 100644 --- a/languages/ts/ts-client/src/ws.ts +++ b/languages/ts/ts-client/src/ws.ts @@ -1,6 +1,8 @@ +import { EventSourcePlusOptions } from "event-source-plus"; import NodeWebsocket from "ws"; import { ArriErrorInstance } from "./errors"; +import { getHeaders } from "./utils"; function isBrowser() { return typeof window !== "undefined"; @@ -27,7 +29,7 @@ export interface WsOptions { interface ArriWsRequestOptions { url: string; - headers?: Record | (() => Record); + headers?: EventSourcePlusOptions["headers"]; params?: TParams; parser: (input: unknown) => TResponse; serializer: (input: TParams) => string; @@ -48,22 +50,17 @@ function connectWebsocket(url: string, protocol?: string) { }); } -export function arriWsRequest< +export async function arriWsRequest< TParams extends Record | undefined = undefined, TResponse = any, >( opts: ArriWsRequestOptions, retryCount = 0, -): WsController { +): Promise> { let url = opts.url .replace("http://", "ws://") .replace("https://", "wss://"); - let headers: Record | undefined; - if (typeof opts.headers === "function") { - headers = opts.headers(); - } else { - headers = opts.headers; - } + const headers = await getHeaders(opts.headers); if (headers) { if (opts.clientVersion) headers["client-version"] = opts.clientVersion; const queryParts: string[] = []; diff --git a/languages/ts/ts-codegen/package.json b/languages/ts/ts-codegen/package.json index 691cdef5..930bd985 100644 --- a/languages/ts/ts-codegen/package.json +++ b/languages/ts/ts-codegen/package.json @@ -1,6 +1,6 @@ { "name": "@arrirpc/codegen-ts", - "version": "0.46.0", + "version": "0.49.1", "type": "module", "license": "MIT", "author": { "name": "joshmossas", "url": "https://github.com/joshmossas" }, @@ -17,7 +17,7 @@ "dependencies": { "@arrirpc/codegen-utils": "workspace:*", "@arrirpc/schema": "workspace:*", - "prettier": "^3.2.5" + "prettier": "^3.3.0" }, "devDependencies": { "@arrirpc/client": "workspace:*" } } diff --git a/languages/ts/ts-codegen/src/index.test.ts b/languages/ts/ts-codegen/src/index.test.ts index e56cb9ac..8161e387 100644 --- a/languages/ts/ts-codegen/src/index.test.ts +++ b/languages/ts/ts-codegen/src/index.test.ts @@ -77,7 +77,7 @@ describe("Service Creation", () => { await prettier.format( `export class UserService { private readonly baseUrl: string; - private readonly headers: Record | (() => Record); + private readonly headers: Record | (() => Record | Promise>); private readonly clientVersion = '1'; constructor(options: ClientOptions = {}) { this.baseUrl = options.baseUrl ?? ""; diff --git a/languages/ts/ts-codegen/src/index.ts b/languages/ts/ts-codegen/src/index.ts index 277ef5e9..cdf5072b 100644 --- a/languages/ts/ts-codegen/src/index.ts +++ b/languages/ts/ts-codegen/src/index.ts @@ -146,12 +146,12 @@ import { ${importParts.join(", ")} } from '@arrirpc/client'; interface ${clientName}Options { baseUrl?: string; - headers?: Record | (() => Record); + headers?: Record | (() => Record | Promise>); } export class ${clientName} { private readonly baseUrl: string; - private readonly headers: Record | (() => Record) + private readonly headers: Record | (() => Record | Promise>) private readonly clientVersion = '${rpcOptions.versionNumber}'; ${serviceFieldParts.join("\n ")} @@ -317,7 +317,7 @@ export function tsServiceFromDefinition( return `export class ${name}Service { private readonly baseUrl: string; - private readonly headers: Record | (() => Record); + private readonly headers: Record | (() => Record | Promise>); private readonly clientVersion = '${options.versionNumber}'; ${serviceFieldParts.join("\n ")} diff --git a/languages/ts/ts-server/README.md b/languages/ts/ts-server/README.md index a57683a9..69a0cdef 100644 --- a/languages/ts/ts-server/README.md +++ b/languages/ts/ts-server/README.md @@ -13,7 +13,7 @@ Typescript implementation of [Arri RPC](/README.md). It's built on top of [H3](h - [File-Based Routing](#file-based-routing) - [Manual Routing](#manual-routing) - [Creating Event Stream Procedures](#creating-event-stream-procedures) - - [Creating Websocket Procedures](#creating-websocket-procedures) + - [Creating Websocket Procedures](#creating-websocket-procedures-experimental) - [Adding Non-RPC Routes](#adding-non-rpc-routes) - [Adding Middleware](#adding-middleware) - [Key Concepts](#key-concepts) diff --git a/languages/ts/ts-server/package.json b/languages/ts/ts-server/package.json index e09c4c0b..47b51d10 100644 --- a/languages/ts/ts-server/package.json +++ b/languages/ts/ts-server/package.json @@ -1,6 +1,6 @@ { "name": "@arrirpc/server", - "version": "0.46.0", + "version": "0.49.1", "type": "module", "license": "MIT", "author": { "name": "joshmossas", "url": "https://github.com/joshmossas" }, @@ -29,5 +29,5 @@ "source-map-support": "^0.5.21", "uncrypto": "^0.1.3" }, - "devDependencies": { "bun-types": "^1.1.10" } + "devDependencies": { "bun-types": "^1.1.12" } } diff --git a/package.json b/package.json index 68db7d01..0aa66272 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@arrirpc/source", - "version": "0.46.0", + "version": "0.49.1", "author": { "name": "joshmossas", "url": "https://github.com/joshmossas" @@ -18,8 +18,8 @@ "typecheck": "nx run-many -t typecheck", "test": "nx run-many -t test", "test:skip-cache": "nx run-many -t test --skip-nx-cache", - "build": "nx run-many -t build", - "build:skip-cache": "nx run-many -t build --skip-nx-cache", + "build": "nx run-many -t build --exclude=playground", + "build:skip-cache": "nx run-many -t build --skip-nx-cache --exclude=playground", "lint": "nx run-many -t lint", "lint:fix": "nx run-many -t lint --fix", "lint:skip-cache": "nx run-many -t lint --skip-nx-cache", @@ -30,22 +30,22 @@ "scaffold": "jiti internal/scripts/scaffold-package.ts", "postversion": "jiti internal/scripts/version-sync.ts", "gen-test-utils": "jiti internal/scripts/generate-test-utils.ts", - "publish-all": "sh internal/scripts/publish-all.sh" + "publish-all": "pnpm run build && sh internal/scripts/publish-all.sh" }, "private": true, "devDependencies": { - "@eslint/js": "^9.3.0", + "@eslint/js": "^9.4.0", "@faker-js/faker": "^8.4.1", - "@nx/eslint": "19.1.0", - "@nx/vite": "19.1.0", - "@nx/workspace": "19.1.0", + "@nx/eslint": "19.1.2", + "@nx/vite": "19.1.2", + "@nx/workspace": "19.1.2", "@sinclair/typebox": "^0.32.31", "@types/lodash": "^4.17.4", - "@types/node": "20.12.12", + "@types/node": "20.14.1", "@vitest/coverage-v8": "1.6.0", "@vitest/ui": "1.6.0", "benny": "^3.7.1", - "bun-types": "^1.1.10", + "bun-types": "^1.1.12", "citty": "^0.1.6", "depcheck": "^1.4.7", "esbuild": "0.21.4", @@ -56,16 +56,16 @@ "globby": "^14.0.1", "jiti": "^1.21.0", "lodash": "^4.17.21", - "nx": "19.1.0", + "nx": "19.1.2", "pathe": "^1.1.2", - "prettier": "^3.2.5", + "prettier": "^3.3.0", "scule": "^1.3.0", "serve": "^14.2.3", "start-server-and-test": "^2.0.3", "typescript": "^5.4.5", - "typescript-eslint": "^7.10.0", + "typescript-eslint": "^7.12.0", "unbuild": "^2.0.0", - "vite": "5.2.11", + "vite": "5.2.12", "vite-tsconfig-paths": "4.3.2", "vitest": "1.6.0", "zod": "^3.23.8" @@ -73,5 +73,5 @@ "nx": { "includedScripts": [] }, - "packageManager": "pnpm@9.1.3" + "packageManager": "pnpm@9.1.4" } diff --git a/playground/package.json b/playground/package.json index 2d042382..e5c48d4e 100644 --- a/playground/package.json +++ b/playground/package.json @@ -3,10 +3,7 @@ "version": "1.0.0", "type": "module", "description": "An RPC server created with Arri RPC", - "scripts": { - "dev": "./node_modules/.bin/arri dev", - "build": "./node_modules/.bin/arri build" - }, + "scripts": {}, "keywords": [], "dependencies": { "arri": "workspace:*", diff --git a/playground/project.json b/playground/project.json index bb219840..16e23511 100644 --- a/playground/project.json +++ b/playground/project.json @@ -1,3 +1,19 @@ { - "name": "playground" + "name": "playground", + "targets": { + "build": { + "executor": "nx:run-commands", + "options": { + "command": "arri build", + "cwd": "playground" + } + }, + "dev": { + "executor": "nx:run-commands", + "options": { + "command": "arri dev", + "cwd": "playground" + } + } + } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2b7da33e..200f4d29 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,20 +9,20 @@ importers: .: devDependencies: '@eslint/js': - specifier: ^9.3.0 - version: 9.3.0 + specifier: ^9.4.0 + version: 9.4.0 '@faker-js/faker': specifier: ^8.4.1 version: 8.4.1 '@nx/eslint': - specifier: 19.1.0 - version: 19.1.0(@babel/traverse@7.24.6)(@types/node@20.12.12)(@zkochan/js-yaml@0.0.7)(eslint@8.57.0)(nx@19.1.0) + specifier: 19.1.2 + version: 19.1.2(@babel/traverse@7.24.6)(@types/node@20.14.1)(@zkochan/js-yaml@0.0.7)(eslint@8.57.0)(nx@19.1.2) '@nx/vite': - specifier: 19.1.0 - version: 19.1.0(@babel/traverse@7.24.6)(@types/node@20.12.12)(nx@19.1.0)(typescript@5.4.5)(vite@5.2.11(@types/node@20.12.12))(vitest@1.6.0(@types/node@20.12.12)(@vitest/ui@1.6.0)) + specifier: 19.1.2 + version: 19.1.2(@babel/traverse@7.24.6)(@types/node@20.14.1)(nx@19.1.2)(typescript@5.4.5)(vite@5.2.12(@types/node@20.14.1))(vitest@1.6.0(@types/node@20.14.1)(@vitest/ui@1.6.0)) '@nx/workspace': - specifier: 19.1.0 - version: 19.1.0 + specifier: 19.1.2 + version: 19.1.2 '@sinclair/typebox': specifier: ^0.32.31 version: 0.32.31 @@ -30,11 +30,11 @@ importers: specifier: ^4.17.4 version: 4.17.4 '@types/node': - specifier: 20.12.12 - version: 20.12.12 + specifier: 20.14.1 + version: 20.14.1 '@vitest/coverage-v8': specifier: 1.6.0 - version: 1.6.0(vitest@1.6.0(@types/node@20.12.12)(@vitest/ui@1.6.0)) + version: 1.6.0(vitest@1.6.0(@types/node@20.14.1)(@vitest/ui@1.6.0)) '@vitest/ui': specifier: 1.6.0 version: 1.6.0(vitest@1.6.0) @@ -42,8 +42,8 @@ importers: specifier: ^3.7.1 version: 3.7.1 bun-types: - specifier: ^1.1.10 - version: 1.1.10 + specifier: ^1.1.12 + version: 1.1.12 citty: specifier: ^0.1.6 version: 0.1.6 @@ -75,14 +75,14 @@ importers: specifier: ^4.17.21 version: 4.17.21 nx: - specifier: 19.1.0 - version: 19.1.0 + specifier: 19.1.2 + version: 19.1.2 pathe: specifier: ^1.1.2 version: 1.1.2 prettier: - specifier: ^3.2.5 - version: 3.2.5 + specifier: ^3.3.0 + version: 3.3.0 scule: specifier: ^1.3.0 version: 1.3.0 @@ -96,20 +96,20 @@ importers: specifier: ^5.4.5 version: 5.4.5 typescript-eslint: - specifier: ^7.10.0 - version: 7.10.0(eslint@8.57.0)(typescript@5.4.5) + specifier: ^7.12.0 + version: 7.12.0(eslint@8.57.0)(typescript@5.4.5) unbuild: specifier: ^2.0.0 version: 2.0.0(typescript@5.4.5) vite: - specifier: 5.2.11 - version: 5.2.11(@types/node@20.12.12) + specifier: 5.2.12 + version: 5.2.12(@types/node@20.14.1) vite-tsconfig-paths: specifier: 4.3.2 - version: 4.3.2(typescript@5.4.5)(vite@5.2.11(@types/node@20.12.12)) + version: 4.3.2(typescript@5.4.5)(vite@5.2.12(@types/node@20.14.1)) vitest: specifier: 1.6.0 - version: 1.6.0(@types/node@20.12.12)(@vitest/ui@1.6.0) + version: 1.6.0(@types/node@20.14.1)(@vitest/ui@1.6.0) zod: specifier: ^3.23.8 version: 3.23.8 @@ -160,8 +160,8 @@ importers: specifier: workspace:* version: link:../../../tooling/schema event-source-plus: - specifier: ^0.0.6 - version: 0.0.6 + specifier: ^0.1.1 + version: 0.1.1 ofetch: specifier: ^1.3.4 version: 1.3.4 @@ -182,8 +182,8 @@ importers: specifier: workspace:* version: link:../../../tooling/schema prettier: - specifier: ^3.2.5 - version: 3.2.5 + specifier: ^3.3.0 + version: 3.3.0 devDependencies: '@arrirpc/client': specifier: workspace:* @@ -232,8 +232,8 @@ importers: version: 0.1.3 devDependencies: bun-types: - specifier: ^1.1.10 - version: 1.1.10 + specifier: ^1.1.12 + version: 1.1.12 playground: dependencies: @@ -308,6 +308,9 @@ importers: '@arrirpc/codegen-utils': specifier: workspace:* version: link:../codegen-utils + '@arrirpc/schema': + specifier: workspace:* + version: link:../schema '@joshmossas/listhen': specifier: ^1.10.1 version: 1.10.1 @@ -348,11 +351,8 @@ importers: specifier: ^1.1.2 version: 1.1.2 prettier: - specifier: ^3.2.5 - version: 3.2.5 - scule: - specifier: ^1.3.0 - version: 1.3.0 + specifier: ^3.3.0 + version: 3.3.0 devDependencies: '@types/degit': specifier: ^2.8.6 @@ -404,8 +404,8 @@ importers: specifier: ^8.4.1 version: 8.4.1 ajv: - specifier: ^8.14.0 - version: 8.14.0 + specifier: ^8.15.0 + version: 8.15.0 benny: specifier: ^3.7.1 version: 3.7.1 @@ -1516,6 +1516,10 @@ packages: resolution: {integrity: sha512-niBqk8iwv96+yuTwjM6bWg8ovzAPF9qkICsGtcoa5/dmqcEMfdwNAX7+/OHcJHc7wj7XqPxH98oAHytFYlw6Sw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/js@9.4.0': + resolution: {integrity: sha512-fdI7VJjP3Rvc70lC4xkFXHB0fiPeojiL1PxVG6t1ZvXQrarj893PweuBTujxDUFk0Fxj4R7PIIAZ/aiiyZPZcg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@faker-js/faker@8.4.1': resolution: {integrity: sha512-XQ3cU+Q8Uqmrbf2e0cIC/QN43sTBSC8KF12u29Mb47tWrt2hAgBXSgpZMj4Ao8Uk0iJcU99QsOCaIL8934obCg==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0, npm: '>=6.14.13'} @@ -1590,29 +1594,29 @@ packages: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} engines: {node: '>= 8'} - '@nrwl/devkit@19.1.0': - resolution: {integrity: sha512-n4YxtAMSdlXAmwcSKcLEX48kpcPGI/sX7lCfDeoSnTKud8Y1tlNeD8rf0YZV3ae+srE6j4lxfoJrRCpWweMcEQ==} + '@nrwl/devkit@19.1.2': + resolution: {integrity: sha512-vWI+OrTICE9Yw6C/jIwxybnvavI9dnQJ7tpzFbLcSVfFAGdFtYJGCLVe40IkWcvUfELoVmzpXtKP/sPy0D7J9w==} - '@nrwl/js@19.1.0': - resolution: {integrity: sha512-bzjHWDwOpQ/Xju6Kei4MFOJvsO6zhoHE94IRKJobj2yLewy0P2gStyp05XOE/bMpY4GJ6ggthINkaxgl6ae0DA==} + '@nrwl/js@19.1.2': + resolution: {integrity: sha512-ZLEqbAqpr6n2qZADp7FsDPewJDUp3i5uJ8TaZRYFN0PVe6spzeE4PlTg/sR/ZH83N1zjrBD0hTVsquhiGPr0fg==} - '@nrwl/tao@19.1.0': - resolution: {integrity: sha512-Mayqkuh2EXkac5prri5fQFd19RBRxBQRjVwTcezk7yTKWI7V+bJzbgZANybtcKGsPCH34cpqrlV4inVwtyaVzw==} + '@nrwl/tao@19.1.2': + resolution: {integrity: sha512-OseWzHXNwOmZinUjHCD+edinvNJq5ngGrn/yKO81Zm/FDxkcYjud20dMsXi8zYfgDjvQv22eDtk5v1BTlSx57A==} hasBin: true - '@nrwl/vite@19.1.0': - resolution: {integrity: sha512-BsLO2yzstH7637iIDbcguh60/2oTDU/cbUs6sHvJ5Cgetes2zkbPTdLhWa+ID6/saudUzT7Vugke4G5n5VCaFQ==} + '@nrwl/vite@19.1.2': + resolution: {integrity: sha512-6gLrWuHiFlr1MWbRne5Bv0WfduAu6DCmX7Wy8b5CP2GBZObJN2xNd+qaXcGoo/HK1eceE/lQ9tklng1dYiSOkw==} - '@nrwl/workspace@19.1.0': - resolution: {integrity: sha512-NSscB84tRn0VRmqZ3W8Zn+tnowCrF0TNCNq8cTFLRqzmg8/kyKrJMEMJmUwPPR9F1u66ciYkbGPbGwGVlEGQSw==} + '@nrwl/workspace@19.1.2': + resolution: {integrity: sha512-vViwPcrDRsW6n9huBeQ06HLRd7m03sIJbpK3LvMwo79RZ4XHWqC1bIIbFeujPFQrCU8dtQAA9lL3CeOfAVAxAw==} - '@nx/devkit@19.1.0': - resolution: {integrity: sha512-jn8uNgavpRhYZ1u63YFNWc2lEoAr3YA7bvPK9yaBmV++tFj+Ig+eFKkQxRou4tvOUnIyVPrs/fmi/TBLVQcpQg==} + '@nx/devkit@19.1.2': + resolution: {integrity: sha512-oHYZzfmvogPh7z8pf1RjW7eJaS05VZ1Ts/axlWerzQauWT7aoeyCaxa0D9q3ThnUuDt1PqKjwJi5jmCihBT2Sw==} peerDependencies: nx: '>= 17 <= 20' - '@nx/eslint@19.1.0': - resolution: {integrity: sha512-UIeNUyUw9Dq21dXP+0vXplOtowgcWET7WnOLP9p4FD9LVMAS0mlR8noVwHjo6V9YgGhGisfzr/DFlJB7xqEDEw==} + '@nx/eslint@19.1.2': + resolution: {integrity: sha512-L0qj7BU5EcaRgntzfL08P7pQfMbZQ2tmRcfgkIMbrDsVfU9Fz64edf7vv3crziB7d86iU7HxnzXhD9Q+P8gKcw==} peerDependencies: '@zkochan/js-yaml': 0.0.7 eslint: ^8.0.0 || ^9.0.0 @@ -1620,85 +1624,85 @@ packages: '@zkochan/js-yaml': optional: true - '@nx/js@19.1.0': - resolution: {integrity: sha512-szEmGGMYMsl57LVe80V9ZAp8BIo41cQf11DGe72J2tHXVi2H7+hGN6VA0dqGWxfffbpHJyIDy/NXpB4Y0z1vPw==} + '@nx/js@19.1.2': + resolution: {integrity: sha512-NRi3MsrhQxvg8OLFG+cKeXVYG0ghMYeOFgr1si6tmaQG0rNyjzcl6r9X4R9yS9JXeWxXZ86MLvRfoALlXNcORg==} peerDependencies: verdaccio: ^5.0.4 peerDependenciesMeta: verdaccio: optional: true - '@nx/linter@19.1.0': - resolution: {integrity: sha512-se8akeKL7AHimBdE3ucVtWFi6fWwe8u0wkN6TOzS0IUDVS6JoCRwbbIhPy9yQYFtUokBxg/h/aVthwGwMMNWgw==} + '@nx/linter@19.1.2': + resolution: {integrity: sha512-clZEtXeaQzM7xmC/yuWGyp6CY4IuJpZLcrnHfj5hEhFx6zsezRDGzPQbJzXJkvG6bzuCS1oypEzfz2r3Yl5abw==} - '@nx/nx-darwin-arm64@19.1.0': - resolution: {integrity: sha512-qUPZmVusnYrgqwhIYKBbabB1RpVQZiTcKfBdW1XiBTk+dXOuIVyWVCsg2ohoBJpHJiENYjtCprxR3RWPaxFs5Q==} + '@nx/nx-darwin-arm64@19.1.2': + resolution: {integrity: sha512-YeT/u+r0iZSokbVFsuiFpF/eFAZmR1p6gkpHo6cVIb0KTkH6Sd1n3s1cjfOKEZg+M0emf9Q8QQ6tw41wGrUm4Q==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] - '@nx/nx-darwin-x64@19.1.0': - resolution: {integrity: sha512-0Gf45EQTq8Q9/inGDzX5SqNY4jXDtqqVsz6wAJ07M9CeyjwDIXOzPe36uoMUhcvXQMbMp3QUH2E/X9poxOOubg==} + '@nx/nx-darwin-x64@19.1.2': + resolution: {integrity: sha512-nmbz/4tgvXwYmxIQptny7Cij0OTAxIdB2l+qmI4tkBnN2mT5UVqdG9t8ziSyZHJbWQjIHTkbgAbg5ar6vK/srA==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] - '@nx/nx-freebsd-x64@19.1.0': - resolution: {integrity: sha512-bw3sKpXy1R17OTStOkeRUE4EkPsvXjAEp26qmKX3G7a7bCVjH7cn+UXdgF8jsEyyiqb8WY1LG63abIlbyfecIA==} + '@nx/nx-freebsd-x64@19.1.2': + resolution: {integrity: sha512-0wcBAr+IYOWBXNDdWHahjW1nCyFTP0O+dSsQa5ab5OBEo0UTvt1k/s27cUyaz2Ll070RTpzl54KD3O1i/1/X0Q==} engines: {node: '>= 10'} cpu: [x64] os: [freebsd] - '@nx/nx-linux-arm-gnueabihf@19.1.0': - resolution: {integrity: sha512-jJzkPWptqFnl7Q7clTMGvI6OT1x8Jw7JHLCi6JgKBqb2ieF4vUCUsLHkrfS/95l9hCUeIHeBrfHJxEXLZIhOgQ==} + '@nx/nx-linux-arm-gnueabihf@19.1.2': + resolution: {integrity: sha512-A1L7T/Y8nOq7tc84WuaWMEeZ2uTjhqHJDNEfgZhnwYfQ3S94B0O2EkyEp29n9E4eN9XZmvYJzDt1tBz2ziZ6iA==} engines: {node: '>= 10'} cpu: [arm] os: [linux] - '@nx/nx-linux-arm64-gnu@19.1.0': - resolution: {integrity: sha512-zycD7+PbVStbjlPsxE3G+bdwFDzXE7LKWtQOrGLvBxG99pXbTr+Oq1GtqL68p2Jp4MEYjIO5qdxWdNt9bBsSwA==} + '@nx/nx-linux-arm64-gnu@19.1.2': + resolution: {integrity: sha512-ze7FtI0hGMs6ap9Z8vo80nXMvuJGJP7CDcL8q2op/l9c23Qex+oG4khyZowJzq+fJPigqldAL3Fm+rHBzT4jhA==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] - '@nx/nx-linux-arm64-musl@19.1.0': - resolution: {integrity: sha512-NBUUbj/3NXHrqgkoLdMTnd8e9qduRVcSoGqpYDha0HBFc+Fspacw5+U26LjnmIuk/BT4yMtMrgFKU29Rq1a56w==} + '@nx/nx-linux-arm64-musl@19.1.2': + resolution: {integrity: sha512-JMiSRLe3K83GQw26jGgJYCLDww7K4z5rVDlWHpQEMyiQSukJBZ5OMYxotkDcPDAMmmrUERXjabOsCi0xnyqUlA==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] - '@nx/nx-linux-x64-gnu@19.1.0': - resolution: {integrity: sha512-jaPrd1VIdz/dqcjEKUJ5BnU+ONSZmG1G/g1HrNb+SIl3Ztputrwz8yJ7CwpUryRo+xSwWhZXIiNJ5r7z09kaKw==} + '@nx/nx-linux-x64-gnu@19.1.2': + resolution: {integrity: sha512-0XZSz37nrbABUxw2wOMsUP2djsYRxXn1+jbh/kcOH6PnlwiTPOJ6LwDENUh9lZ4PKflED5Tj0w6wx23/AH4z3g==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - '@nx/nx-linux-x64-musl@19.1.0': - resolution: {integrity: sha512-gj3Bq81s1NWzjtWteyTgczbbd2yq6xmic4H3PGFZkA5THjFAD/MiYiS9b5oQVzPWONyFgtk+gsTWVbiM7dOhew==} + '@nx/nx-linux-x64-musl@19.1.2': + resolution: {integrity: sha512-tID0nKIUQZ5b1woFh3dtl7XK1Mv71kkwxxppMsOb0FVTigC8Yy7Zpu/ykKidnJ+VbHGSYhZ03BZXgAk/on9LXw==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - '@nx/nx-win32-arm64-msvc@19.1.0': - resolution: {integrity: sha512-PIGy+uu8dzhWodIHXC0jbPtYcpi95NdtkghD1yZ32jcoVzAcHOohM07tTMHXbl7WyLqXw+De0XkmZadMJoVNAg==} + '@nx/nx-win32-arm64-msvc@19.1.2': + resolution: {integrity: sha512-AXEwOk0lhbWdy4OZmde0iC1sP/AAUMrw5a8Ah7S0QOXBj8X9wK1zyThviQnY1NpUzYGBbMkv3UgPDTArTdAeKA==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] - '@nx/nx-win32-x64-msvc@19.1.0': - resolution: {integrity: sha512-aTbwZLIpViWgMZqyDl+2fyO5LJjtz0J4a0+0qPpEW46BAZ/kcEuE7Xv33Yoob+KorLr27n6BpzTs+7Wg4dXXFw==} + '@nx/nx-win32-x64-msvc@19.1.2': + resolution: {integrity: sha512-H8ldXwXnVff2A9tDU8AD7QE/uZV06D0gHBdbnrzbg74NOrkKvvUPXky0D6BMlooljkU9QXu7M46CWRNIoPSzQw==} engines: {node: '>= 10'} cpu: [x64] os: [win32] - '@nx/vite@19.1.0': - resolution: {integrity: sha512-5m7anx2gmSX9QFG4qmz+sckHsBroV0zdyGW1k1q9P2mYyobVHF93Plw7HieixnAgDqMV2Qnf8MBSdXj31bkSEA==} + '@nx/vite@19.1.2': + resolution: {integrity: sha512-uVwp8SaxZUl4wh1epk/bLDLD1Z/OnC6z1siT0NqAkl9Sj5FrjwRvD3D93/rgASGfuawnWvstq1xn+kF4ipO/Xg==} peerDependencies: vite: ^5.0.0 vitest: ^1.3.1 - '@nx/workspace@19.1.0': - resolution: {integrity: sha512-1W+zwRP4Uma0Ui0Za8qcd0rAt4InaLZ3yfAN66MaqQlyIPMsJDSqLBAVKEJfn4wS7zgoeeIwmQoXi6ACLKqZZA==} + '@nx/workspace@19.1.2': + resolution: {integrity: sha512-PtJGRRrc+rCQFw2XHnmLlA7G5fbORhXa6uCjL3H8k6d3sSGBqJgJ8MkH7SLJ/0a49wVmn3hKlLpk3Sln+7IUlQ==} '@parcel/watcher-android-arm64@2.4.1': resolution: {integrity: sha512-LOi/WTbbh3aTn2RYddrO8pnapixAziFl6SMxHM69r3tvdSm94JtCenaKgk1GRg5FJ5wpMCpHeW+7yqPlvZv7kg==} @@ -1980,8 +1984,14 @@ packages: '@types/minimatch@3.0.5': resolution: {integrity: sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==} - '@types/node@20.12.12': - resolution: {integrity: sha512-eWLDGF/FOSPtAvEqeRAQ4C8LSA7M1I7i0ky1I8U7kD1J5ITyW3AsRhQrKVoWf5pFKZ2kILsEGJhsI9r93PYnOw==} + '@types/node@20.12.14': + resolution: {integrity: sha512-scnD59RpYD91xngrQQLGkE+6UrHUPzeKZWhhjBSa3HSkwjbQc38+q3RoIVEwxQGRw3M+j5hpNAM+lgV3cVormg==} + + '@types/node@20.14.0': + resolution: {integrity: sha512-5cHBxFGJx6L4s56Bubp4fglrEpmyJypsqI6RgzMfBHWUJQGWAAi8cWcgetEbZXHYXo9C2Fa4EEds/uSyS4cxmA==} + + '@types/node@20.14.1': + resolution: {integrity: sha512-T2MzSGEu+ysB/FkWfqmhV3PLyQlowdptmmgD20C6QxsS8Fmv5SjpZ1ayXaEC0S21/h5UJ9iA6W/5vSNU5l00OA==} '@types/parse-json@4.0.2': resolution: {integrity: sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==} @@ -1995,8 +2005,8 @@ packages: '@types/ws@8.5.10': resolution: {integrity: sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A==} - '@typescript-eslint/eslint-plugin@7.10.0': - resolution: {integrity: sha512-PzCr+a/KAef5ZawX7nbyNwBDtM1HdLIT53aSA2DDlxmxMngZ43O8SIePOeX8H5S+FHXeI6t97mTt/dDdzY4Fyw==} + '@typescript-eslint/eslint-plugin@7.12.0': + resolution: {integrity: sha512-7F91fcbuDf/d3S8o21+r3ZncGIke/+eWk0EpO21LXhDfLahriZF9CGj4fbAetEjlaBdjdSm9a6VeXbpbT6Z40Q==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: '@typescript-eslint/parser': ^7.0.0 @@ -2006,8 +2016,8 @@ packages: typescript: optional: true - '@typescript-eslint/parser@7.10.0': - resolution: {integrity: sha512-2EjZMA0LUW5V5tGQiaa2Gys+nKdfrn2xiTIBLR4fxmPmVSvgPcKNW+AE/ln9k0A4zDUti0J/GZXMDupQoI+e1w==} + '@typescript-eslint/parser@7.12.0': + resolution: {integrity: sha512-dm/J2UDY3oV3TKius2OUZIFHsomQmpHtsV0FTh1WO8EKgHLQ1QCADUqscPgTpU+ih1e21FQSRjXckHn3txn6kQ==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 @@ -2016,12 +2026,12 @@ packages: typescript: optional: true - '@typescript-eslint/scope-manager@7.10.0': - resolution: {integrity: sha512-7L01/K8W/VGl7noe2mgH0K7BE29Sq6KAbVmxurj8GGaPDZXPr8EEQ2seOeAS+mEV9DnzxBQB6ax6qQQ5C6P4xg==} + '@typescript-eslint/scope-manager@7.12.0': + resolution: {integrity: sha512-itF1pTnN6F3unPak+kutH9raIkL3lhH1YRPGgt7QQOh43DQKVJXmWkpb+vpc/TiDHs6RSd9CTbDsc/Y+Ygq7kg==} engines: {node: ^18.18.0 || >=20.0.0} - '@typescript-eslint/type-utils@7.10.0': - resolution: {integrity: sha512-D7tS4WDkJWrVkuzgm90qYw9RdgBcrWmbbRkrLA4d7Pg3w0ttVGDsvYGV19SH8gPR5L7OtcN5J1hTtyenO9xE9g==} + '@typescript-eslint/type-utils@7.12.0': + resolution: {integrity: sha512-lib96tyRtMhLxwauDWUp/uW3FMhLA6D0rJ8T7HmH7x23Gk1Gwwu8UZ94NMXBvOELn6flSPiBrCKlehkiXyaqwA==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 @@ -2030,12 +2040,12 @@ packages: typescript: optional: true - '@typescript-eslint/types@7.10.0': - resolution: {integrity: sha512-7fNj+Ya35aNyhuqrA1E/VayQX9Elwr8NKZ4WueClR3KwJ7Xx9jcCdOrLW04h51de/+gNbyFMs+IDxh5xIwfbNg==} + '@typescript-eslint/types@7.12.0': + resolution: {integrity: sha512-o+0Te6eWp2ppKY3mLCU+YA9pVJxhUJE15FV7kxuD9jgwIAa+w/ycGJBMrYDTpVGUM/tgpa9SeMOugSabWFq7bg==} engines: {node: ^18.18.0 || >=20.0.0} - '@typescript-eslint/typescript-estree@7.10.0': - resolution: {integrity: sha512-LXFnQJjL9XIcxeVfqmNj60YhatpRLt6UhdlFwAkjNc6jSUlK8zQOl1oktAP8PlWFzPQC1jny/8Bai3/HPuvN5g==} + '@typescript-eslint/typescript-estree@7.12.0': + resolution: {integrity: sha512-5bwqLsWBULv1h6pn7cMW5dXX/Y2amRqLaKqsASVwbBHMZSnHqE/HN4vT4fE0aFsiwxYvr98kqOWh1a8ZKXalCQ==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: typescript: '*' @@ -2043,14 +2053,14 @@ packages: typescript: optional: true - '@typescript-eslint/utils@7.10.0': - resolution: {integrity: sha512-olzif1Fuo8R8m/qKkzJqT7qwy16CzPRWBvERS0uvyc+DHd8AKbO4Jb7kpAvVzMmZm8TrHnI7hvjN4I05zow+tg==} + '@typescript-eslint/utils@7.12.0': + resolution: {integrity: sha512-Y6hhwxwDx41HNpjuYswYp6gDbkiZ8Hin9Bf5aJQn1bpTs3afYY4GX+MPYxma8jtoIV2GRwTM/UJm/2uGCVv+DQ==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 - '@typescript-eslint/visitor-keys@7.10.0': - resolution: {integrity: sha512-9ntIVgsi6gg6FIq9xjEO4VQJvwOqA3jaBFQJ/6TK5AvEup2+cECI6Fh7QiBxmfMHXU0V0J4RyPeOU1VDNzl9cg==} + '@typescript-eslint/visitor-keys@7.12.0': + resolution: {integrity: sha512-uZk7DevrQLL3vSnfFl5bj4sL75qC9D6EdjemIdbtkuUmIheWpuiiylSY01JxJE7+zGrOWDZrp1WxOuDntvKrHQ==} engines: {node: ^18.18.0 || >=20.0.0} '@ungap/structured-clone@1.2.0': @@ -2138,8 +2148,8 @@ packages: ajv@8.12.0: resolution: {integrity: sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==} - ajv@8.14.0: - resolution: {integrity: sha512-oYs1UUtO97ZO2lJ4bwnWeQW8/zvOIQLGKcvPTsWmvc2SYgBb+upuNS5NxoLaMU4h8Ju3Nbj6Cq8mD2LQoqVKFA==} + ajv@8.15.0: + resolution: {integrity: sha512-15BTtQUOsSrmHCy+B4VnAiJAJxJ8IFgu6fcjFQF3jQYZ78nLSQthlFg4ehp+NLIyfvFgOlxNsjKIEhydtFPVHQ==} ansi-align@3.0.1: resolution: {integrity: sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==} @@ -2317,8 +2327,8 @@ packages: resolution: {integrity: sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==} engines: {node: '>=6'} - bun-types@1.1.10: - resolution: {integrity: sha512-oBsZ0Bf9HEKr1Ta5bUYgVO6sHkZtTlfHlEj9DGpghZphNdhKI/38eZ5dk+/et/HrStT1sfykHBUW4ughmoNKog==} + bun-types@1.1.12: + resolution: {integrity: sha512-DIM2C9qCECwhck9nLsCDeTv943VmGMCkwX3KljjprSRDXaK2CSiUDVGbUit80Er38ukgxuESJgYPAys4FsNCdg==} bytes@3.0.0: resolution: {integrity: sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==} @@ -2845,8 +2855,8 @@ packages: resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} engines: {node: '>=0.10.0'} - event-source-plus@0.0.6: - resolution: {integrity: sha512-cIgaG+LGOamBVDETY+hoXh0hT35F4wwhZThDp1MXPWgUpmsXjOXoUX0ReFfmK84zIlA08daRZibltjnfeNcsFA==} + event-source-plus@0.1.1: + resolution: {integrity: sha512-nPIVrVO8oiSbjlFkWktlZUcamlhtKIBunVzKK7fEU3cB6Uv1j4pKpaU3qtoskx55klNuRqVr3xgsJneUrqT99Q==} event-stream@3.3.4: resolution: {integrity: sha512-QHpkERcGsR0T7Qm3HNJSyXKEEj8AHNxkY3PK8TS2KJvQ7NiSHe3DDpwVKKtoYprL/AreyzFBeIkBIWChAqn60g==} @@ -2880,6 +2890,9 @@ packages: fast-levenshtein@2.0.6: resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} + fast-uri@2.3.0: + resolution: {integrity: sha512-eel5UKGn369gGEWOqBShmFJWfq/xSJvsgDzgLYC845GneayWvXBf0lJCBn5qTABfewy1ZDPoaR5OZCP+kssfuw==} + fast-url-parser@1.1.3: resolution: {integrity: sha512-5jOCVXADYNuRkKFzNJ0dCCewsZiYo0dz8QNYljkOpFC6r2U4OBmKtvm/Tsuh4w1YYdDqDb31a8TVhBJ2OJKdqQ==} @@ -3595,8 +3608,8 @@ packages: nth-check@2.1.1: resolution: {integrity: sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==} - nx@19.1.0: - resolution: {integrity: sha512-ia9XIL4QWli02WNZ3tLSpWvIYJVOWcikeELJwouZOwHKT7RA9i6vCQjKsIKWSFlUs47WDwiYiLSsMxR5KTqk8Q==} + nx@19.1.2: + resolution: {integrity: sha512-hqD0HglmZCqgPLGcEfLq79El9iBUlinoncmsk6wsPHJM1IrASxHkemJZiehYilQx55QACd1MGBjC2nySZmgyLA==} hasBin: true peerDependencies: '@swc-node/register': ^1.8.0 @@ -3926,6 +3939,11 @@ packages: engines: {node: '>=14'} hasBin: true + prettier@3.3.0: + resolution: {integrity: sha512-J9odKxERhCQ10OC2yb93583f6UnYutOeiV5i0zEDS7UGTdUt0u+y8erxl3lBKvwo/JHyyoEdXjwp4dke9oyZ/g==} + engines: {node: '>=14'} + hasBin: true + pretty-bytes@6.1.1: resolution: {integrity: sha512-mQUvGU6aUFQ+rNvTIAcZuWGRT9a6f6Yrg9bHs4ImKF+HZCEK+plBvnAZYSIQztknZF2qnzNtr6F8s0+IuptdlQ==} engines: {node: ^14.13.1 || >=16.0.0} @@ -4360,8 +4378,8 @@ packages: resolution: {integrity: sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==} engines: {node: '>=12.20'} - typescript-eslint@7.10.0: - resolution: {integrity: sha512-thO8nyqptXdfWHQrMJJiJyftpW8aLmwRNs11xA8pSrXneoclFPstQZqXvDWuH1WNL4CHffqHvYUeCHTit6yfhQ==} + typescript-eslint@7.12.0: + resolution: {integrity: sha512-D6HKNbQcnNu3BaN4HkQCR16tgG8Q2AMUWPgvhrJksOXu+d6ys07yC06ONiV2kcsEfWC22voB6C3PvK2MqlBZ7w==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 @@ -4470,8 +4488,8 @@ packages: vite: optional: true - vite@5.2.11: - resolution: {integrity: sha512-HndV31LWW05i1BLPMUCE1B9E9GFbOu1MbenhS58FuK6owSO5qHm7GiCotrNY1YE5rMeQSFBGmT5ZaLEjFizgiQ==} + vite@5.2.12: + resolution: {integrity: sha512-/gC8GxzxMK5ntBwb48pR32GGhENnjtY30G4A0jemunsBkiEZFw60s8InGpN8gkhHEkjnRK1aSAxeQgwvFhUHAA==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: @@ -5667,6 +5685,8 @@ snapshots: '@eslint/js@9.3.0': {} + '@eslint/js@9.4.0': {} + '@faker-js/faker@8.4.1': {} '@hapi/hoek@9.3.0': {} @@ -5760,15 +5780,15 @@ snapshots: '@nodelib/fs.scandir': 2.1.5 fastq: 1.17.1 - '@nrwl/devkit@19.1.0(nx@19.1.0)': + '@nrwl/devkit@19.1.2(nx@19.1.2)': dependencies: - '@nx/devkit': 19.1.0(nx@19.1.0) + '@nx/devkit': 19.1.2(nx@19.1.2) transitivePeerDependencies: - nx - '@nrwl/js@19.1.0(@babel/traverse@7.24.6)(@types/node@20.12.12)(nx@19.1.0)(typescript@5.4.5)': + '@nrwl/js@19.1.2(@babel/traverse@7.24.6)(@types/node@20.14.1)(nx@19.1.2)(typescript@5.4.5)': dependencies: - '@nx/js': 19.1.0(@babel/traverse@7.24.6)(@types/node@20.12.12)(nx@19.1.0)(typescript@5.4.5) + '@nx/js': 19.1.2(@babel/traverse@7.24.6)(@types/node@20.14.1)(nx@19.1.2)(typescript@5.4.5) transitivePeerDependencies: - '@babel/traverse' - '@swc-node/register' @@ -5781,18 +5801,18 @@ snapshots: - typescript - verdaccio - '@nrwl/tao@19.1.0': + '@nrwl/tao@19.1.2': dependencies: - nx: 19.1.0 + nx: 19.1.2 tslib: 2.6.2 transitivePeerDependencies: - '@swc-node/register' - '@swc/core' - debug - '@nrwl/vite@19.1.0(@babel/traverse@7.24.6)(@types/node@20.12.12)(nx@19.1.0)(typescript@5.4.5)(vite@5.2.11(@types/node@20.12.12))(vitest@1.6.0(@types/node@20.12.12)(@vitest/ui@1.6.0))': + '@nrwl/vite@19.1.2(@babel/traverse@7.24.6)(@types/node@20.14.1)(nx@19.1.2)(typescript@5.4.5)(vite@5.2.12(@types/node@20.14.1))(vitest@1.6.0(@types/node@20.14.1)(@vitest/ui@1.6.0))': dependencies: - '@nx/vite': 19.1.0(@babel/traverse@7.24.6)(@types/node@20.12.12)(nx@19.1.0)(typescript@5.4.5)(vite@5.2.11(@types/node@20.12.12))(vitest@1.6.0(@types/node@20.12.12)(@vitest/ui@1.6.0)) + '@nx/vite': 19.1.2(@babel/traverse@7.24.6)(@types/node@20.14.1)(nx@19.1.2)(typescript@5.4.5)(vite@5.2.12(@types/node@20.14.1))(vitest@1.6.0(@types/node@20.14.1)(@vitest/ui@1.6.0)) transitivePeerDependencies: - '@babel/traverse' - '@swc-node/register' @@ -5807,32 +5827,32 @@ snapshots: - vite - vitest - '@nrwl/workspace@19.1.0': + '@nrwl/workspace@19.1.2': dependencies: - '@nx/workspace': 19.1.0 + '@nx/workspace': 19.1.2 transitivePeerDependencies: - '@swc-node/register' - '@swc/core' - debug - '@nx/devkit@19.1.0(nx@19.1.0)': + '@nx/devkit@19.1.2(nx@19.1.2)': dependencies: - '@nrwl/devkit': 19.1.0(nx@19.1.0) + '@nrwl/devkit': 19.1.2(nx@19.1.2) ejs: 3.1.10 enquirer: 2.3.6 ignore: 5.3.1 minimatch: 9.0.3 - nx: 19.1.0 + nx: 19.1.2 semver: 7.6.2 tmp: 0.2.3 tslib: 2.6.2 yargs-parser: 21.1.1 - '@nx/eslint@19.1.0(@babel/traverse@7.24.6)(@types/node@20.12.12)(@zkochan/js-yaml@0.0.7)(eslint@8.57.0)(nx@19.1.0)': + '@nx/eslint@19.1.2(@babel/traverse@7.24.6)(@types/node@20.14.1)(@zkochan/js-yaml@0.0.7)(eslint@8.57.0)(nx@19.1.2)': dependencies: - '@nx/devkit': 19.1.0(nx@19.1.0) - '@nx/js': 19.1.0(@babel/traverse@7.24.6)(@types/node@20.12.12)(nx@19.1.0)(typescript@5.4.5) - '@nx/linter': 19.1.0(@babel/traverse@7.24.6)(@types/node@20.12.12)(@zkochan/js-yaml@0.0.7)(eslint@8.57.0)(nx@19.1.0) + '@nx/devkit': 19.1.2(nx@19.1.2) + '@nx/js': 19.1.2(@babel/traverse@7.24.6)(@types/node@20.14.1)(nx@19.1.2)(typescript@5.4.5) + '@nx/linter': 19.1.2(@babel/traverse@7.24.6)(@types/node@20.14.1)(@zkochan/js-yaml@0.0.7)(eslint@8.57.0)(nx@19.1.2) eslint: 8.57.0 semver: 7.6.2 tslib: 2.6.2 @@ -5850,7 +5870,7 @@ snapshots: - supports-color - verdaccio - '@nx/js@19.1.0(@babel/traverse@7.24.6)(@types/node@20.12.12)(nx@19.1.0)(typescript@5.4.5)': + '@nx/js@19.1.2(@babel/traverse@7.24.6)(@types/node@20.14.1)(nx@19.1.2)(typescript@5.4.5)': dependencies: '@babel/core': 7.24.6 '@babel/plugin-proposal-decorators': 7.24.6(@babel/core@7.24.6) @@ -5859,9 +5879,9 @@ snapshots: '@babel/preset-env': 7.24.6(@babel/core@7.24.6) '@babel/preset-typescript': 7.24.6(@babel/core@7.24.6) '@babel/runtime': 7.24.6 - '@nrwl/js': 19.1.0(@babel/traverse@7.24.6)(@types/node@20.12.12)(nx@19.1.0)(typescript@5.4.5) - '@nx/devkit': 19.1.0(nx@19.1.0) - '@nx/workspace': 19.1.0 + '@nrwl/js': 19.1.2(@babel/traverse@7.24.6)(@types/node@20.14.1)(nx@19.1.2)(typescript@5.4.5) + '@nx/devkit': 19.1.2(nx@19.1.2) + '@nx/workspace': 19.1.2 babel-plugin-const-enum: 1.2.0(@babel/core@7.24.6) babel-plugin-macros: 2.8.0 babel-plugin-transform-typescript-metadata: 0.3.2(@babel/core@7.24.6)(@babel/traverse@7.24.6) @@ -5878,7 +5898,7 @@ snapshots: ora: 5.3.0 semver: 7.6.2 source-map-support: 0.5.19 - ts-node: 10.9.1(@types/node@20.12.12)(typescript@5.4.5) + ts-node: 10.9.1(@types/node@20.14.1)(typescript@5.4.5) tsconfig-paths: 4.2.0 tslib: 2.6.2 transitivePeerDependencies: @@ -5892,9 +5912,9 @@ snapshots: - supports-color - typescript - '@nx/linter@19.1.0(@babel/traverse@7.24.6)(@types/node@20.12.12)(@zkochan/js-yaml@0.0.7)(eslint@8.57.0)(nx@19.1.0)': + '@nx/linter@19.1.2(@babel/traverse@7.24.6)(@types/node@20.14.1)(@zkochan/js-yaml@0.0.7)(eslint@8.57.0)(nx@19.1.2)': dependencies: - '@nx/eslint': 19.1.0(@babel/traverse@7.24.6)(@types/node@20.12.12)(@zkochan/js-yaml@0.0.7)(eslint@8.57.0)(nx@19.1.0) + '@nx/eslint': 19.1.2(@babel/traverse@7.24.6)(@types/node@20.14.1)(@zkochan/js-yaml@0.0.7)(eslint@8.57.0)(nx@19.1.2) transitivePeerDependencies: - '@babel/traverse' - '@swc-node/register' @@ -5908,47 +5928,47 @@ snapshots: - supports-color - verdaccio - '@nx/nx-darwin-arm64@19.1.0': + '@nx/nx-darwin-arm64@19.1.2': optional: true - '@nx/nx-darwin-x64@19.1.0': + '@nx/nx-darwin-x64@19.1.2': optional: true - '@nx/nx-freebsd-x64@19.1.0': + '@nx/nx-freebsd-x64@19.1.2': optional: true - '@nx/nx-linux-arm-gnueabihf@19.1.0': + '@nx/nx-linux-arm-gnueabihf@19.1.2': optional: true - '@nx/nx-linux-arm64-gnu@19.1.0': + '@nx/nx-linux-arm64-gnu@19.1.2': optional: true - '@nx/nx-linux-arm64-musl@19.1.0': + '@nx/nx-linux-arm64-musl@19.1.2': optional: true - '@nx/nx-linux-x64-gnu@19.1.0': + '@nx/nx-linux-x64-gnu@19.1.2': optional: true - '@nx/nx-linux-x64-musl@19.1.0': + '@nx/nx-linux-x64-musl@19.1.2': optional: true - '@nx/nx-win32-arm64-msvc@19.1.0': + '@nx/nx-win32-arm64-msvc@19.1.2': optional: true - '@nx/nx-win32-x64-msvc@19.1.0': + '@nx/nx-win32-x64-msvc@19.1.2': optional: true - '@nx/vite@19.1.0(@babel/traverse@7.24.6)(@types/node@20.12.12)(nx@19.1.0)(typescript@5.4.5)(vite@5.2.11(@types/node@20.12.12))(vitest@1.6.0(@types/node@20.12.12)(@vitest/ui@1.6.0))': + '@nx/vite@19.1.2(@babel/traverse@7.24.6)(@types/node@20.14.1)(nx@19.1.2)(typescript@5.4.5)(vite@5.2.12(@types/node@20.14.1))(vitest@1.6.0(@types/node@20.14.1)(@vitest/ui@1.6.0))': dependencies: - '@nrwl/vite': 19.1.0(@babel/traverse@7.24.6)(@types/node@20.12.12)(nx@19.1.0)(typescript@5.4.5)(vite@5.2.11(@types/node@20.12.12))(vitest@1.6.0(@types/node@20.12.12)(@vitest/ui@1.6.0)) - '@nx/devkit': 19.1.0(nx@19.1.0) - '@nx/js': 19.1.0(@babel/traverse@7.24.6)(@types/node@20.12.12)(nx@19.1.0)(typescript@5.4.5) + '@nrwl/vite': 19.1.2(@babel/traverse@7.24.6)(@types/node@20.14.1)(nx@19.1.2)(typescript@5.4.5)(vite@5.2.12(@types/node@20.14.1))(vitest@1.6.0(@types/node@20.14.1)(@vitest/ui@1.6.0)) + '@nx/devkit': 19.1.2(nx@19.1.2) + '@nx/js': 19.1.2(@babel/traverse@7.24.6)(@types/node@20.14.1)(nx@19.1.2)(typescript@5.4.5) '@phenomnomnominal/tsquery': 5.0.1(typescript@5.4.5) '@swc/helpers': 0.5.11 enquirer: 2.3.6 tsconfig-paths: 4.2.0 - vite: 5.2.11(@types/node@20.12.12) - vitest: 1.6.0(@types/node@20.12.12)(@vitest/ui@1.6.0) + vite: 5.2.12(@types/node@20.14.1) + vitest: 1.6.0(@types/node@20.14.1)(@vitest/ui@1.6.0) transitivePeerDependencies: - '@babel/traverse' - '@swc-node/register' @@ -5961,13 +5981,13 @@ snapshots: - typescript - verdaccio - '@nx/workspace@19.1.0': + '@nx/workspace@19.1.2': dependencies: - '@nrwl/workspace': 19.1.0 - '@nx/devkit': 19.1.0(nx@19.1.0) + '@nrwl/workspace': 19.1.2 + '@nx/devkit': 19.1.2(nx@19.1.2) chalk: 4.1.2 enquirer: 2.3.6 - nx: 19.1.0 + nx: 19.1.2 tslib: 2.6.2 yargs-parser: 21.1.1 transitivePeerDependencies: @@ -6183,7 +6203,15 @@ snapshots: '@types/minimatch@3.0.5': {} - '@types/node@20.12.12': + '@types/node@20.12.14': + dependencies: + undici-types: 5.26.5 + + '@types/node@20.14.0': + dependencies: + undici-types: 5.26.5 + + '@types/node@20.14.1': dependencies: undici-types: 5.26.5 @@ -6197,16 +6225,16 @@ snapshots: '@types/ws@8.5.10': dependencies: - '@types/node': 20.12.12 + '@types/node': 20.14.0 - '@typescript-eslint/eslint-plugin@7.10.0(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5)': + '@typescript-eslint/eslint-plugin@7.12.0(@typescript-eslint/parser@7.12.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5)': dependencies: '@eslint-community/regexpp': 4.10.0 - '@typescript-eslint/parser': 7.10.0(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/scope-manager': 7.10.0 - '@typescript-eslint/type-utils': 7.10.0(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/utils': 7.10.0(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/visitor-keys': 7.10.0 + '@typescript-eslint/parser': 7.12.0(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/scope-manager': 7.12.0 + '@typescript-eslint/type-utils': 7.12.0(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/utils': 7.12.0(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/visitor-keys': 7.12.0 eslint: 8.57.0 graphemer: 1.4.0 ignore: 5.3.1 @@ -6217,12 +6245,12 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.4.5)': + '@typescript-eslint/parser@7.12.0(eslint@8.57.0)(typescript@5.4.5)': dependencies: - '@typescript-eslint/scope-manager': 7.10.0 - '@typescript-eslint/types': 7.10.0 - '@typescript-eslint/typescript-estree': 7.10.0(typescript@5.4.5) - '@typescript-eslint/visitor-keys': 7.10.0 + '@typescript-eslint/scope-manager': 7.12.0 + '@typescript-eslint/types': 7.12.0 + '@typescript-eslint/typescript-estree': 7.12.0(typescript@5.4.5) + '@typescript-eslint/visitor-keys': 7.12.0 debug: 4.3.4 eslint: 8.57.0 optionalDependencies: @@ -6230,15 +6258,15 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/scope-manager@7.10.0': + '@typescript-eslint/scope-manager@7.12.0': dependencies: - '@typescript-eslint/types': 7.10.0 - '@typescript-eslint/visitor-keys': 7.10.0 + '@typescript-eslint/types': 7.12.0 + '@typescript-eslint/visitor-keys': 7.12.0 - '@typescript-eslint/type-utils@7.10.0(eslint@8.57.0)(typescript@5.4.5)': + '@typescript-eslint/type-utils@7.12.0(eslint@8.57.0)(typescript@5.4.5)': dependencies: - '@typescript-eslint/typescript-estree': 7.10.0(typescript@5.4.5) - '@typescript-eslint/utils': 7.10.0(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/typescript-estree': 7.12.0(typescript@5.4.5) + '@typescript-eslint/utils': 7.12.0(eslint@8.57.0)(typescript@5.4.5) debug: 4.3.4 eslint: 8.57.0 ts-api-utils: 1.3.0(typescript@5.4.5) @@ -6247,12 +6275,12 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/types@7.10.0': {} + '@typescript-eslint/types@7.12.0': {} - '@typescript-eslint/typescript-estree@7.10.0(typescript@5.4.5)': + '@typescript-eslint/typescript-estree@7.12.0(typescript@5.4.5)': dependencies: - '@typescript-eslint/types': 7.10.0 - '@typescript-eslint/visitor-keys': 7.10.0 + '@typescript-eslint/types': 7.12.0 + '@typescript-eslint/visitor-keys': 7.12.0 debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 @@ -6264,25 +6292,25 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@7.10.0(eslint@8.57.0)(typescript@5.4.5)': + '@typescript-eslint/utils@7.12.0(eslint@8.57.0)(typescript@5.4.5)': dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) - '@typescript-eslint/scope-manager': 7.10.0 - '@typescript-eslint/types': 7.10.0 - '@typescript-eslint/typescript-estree': 7.10.0(typescript@5.4.5) + '@typescript-eslint/scope-manager': 7.12.0 + '@typescript-eslint/types': 7.12.0 + '@typescript-eslint/typescript-estree': 7.12.0(typescript@5.4.5) eslint: 8.57.0 transitivePeerDependencies: - supports-color - typescript - '@typescript-eslint/visitor-keys@7.10.0': + '@typescript-eslint/visitor-keys@7.12.0': dependencies: - '@typescript-eslint/types': 7.10.0 + '@typescript-eslint/types': 7.12.0 eslint-visitor-keys: 3.4.3 '@ungap/structured-clone@1.2.0': {} - '@vitest/coverage-v8@1.6.0(vitest@1.6.0(@types/node@20.12.12)(@vitest/ui@1.6.0))': + '@vitest/coverage-v8@1.6.0(vitest@1.6.0(@types/node@20.14.1)(@vitest/ui@1.6.0))': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 0.2.3 @@ -6297,7 +6325,7 @@ snapshots: std-env: 3.7.0 strip-literal: 2.1.0 test-exclude: 6.0.0 - vitest: 1.6.0(@types/node@20.12.12)(@vitest/ui@1.6.0) + vitest: 1.6.0(@types/node@20.14.1)(@vitest/ui@1.6.0) transitivePeerDependencies: - supports-color @@ -6332,7 +6360,7 @@ snapshots: pathe: 1.1.2 picocolors: 1.0.1 sirv: 2.0.4 - vitest: 1.6.0(@types/node@20.12.12)(@vitest/ui@1.6.0) + vitest: 1.6.0(@types/node@20.14.1)(@vitest/ui@1.6.0) '@vitest/utils@1.6.0': dependencies: @@ -6415,12 +6443,12 @@ snapshots: require-from-string: 2.0.2 uri-js: 4.4.1 - ajv@8.14.0: + ajv@8.15.0: dependencies: fast-deep-equal: 3.1.3 + fast-uri: 2.3.0 json-schema-traverse: 1.0.0 require-from-string: 2.0.2 - uri-js: 4.4.1 ansi-align@3.0.1: dependencies: @@ -6616,9 +6644,9 @@ snapshots: builtin-modules@3.3.0: {} - bun-types@1.1.10: + bun-types@1.1.12: dependencies: - '@types/node': 20.12.12 + '@types/node': 20.12.14 '@types/ws': 8.5.10 bytes@3.0.0: {} @@ -7302,7 +7330,7 @@ snapshots: esutils@2.0.3: {} - event-source-plus@0.0.6: + event-source-plus@0.1.1: dependencies: ofetch: 1.3.4 @@ -7366,6 +7394,8 @@ snapshots: fast-levenshtein@2.0.6: {} + fast-uri@2.3.0: {} + fast-url-parser@1.1.3: dependencies: punycode: 1.4.1 @@ -8029,9 +8059,9 @@ snapshots: dependencies: boolbase: 1.0.0 - nx@19.1.0: + nx@19.1.2: dependencies: - '@nrwl/tao': 19.1.0 + '@nrwl/tao': 19.1.2 '@yarnpkg/lockfile': 1.1.0 '@yarnpkg/parsers': 3.0.0-rc.46 '@zkochan/js-yaml': 0.0.7 @@ -8065,16 +8095,16 @@ snapshots: yargs: 17.7.2 yargs-parser: 21.1.1 optionalDependencies: - '@nx/nx-darwin-arm64': 19.1.0 - '@nx/nx-darwin-x64': 19.1.0 - '@nx/nx-freebsd-x64': 19.1.0 - '@nx/nx-linux-arm-gnueabihf': 19.1.0 - '@nx/nx-linux-arm64-gnu': 19.1.0 - '@nx/nx-linux-arm64-musl': 19.1.0 - '@nx/nx-linux-x64-gnu': 19.1.0 - '@nx/nx-linux-x64-musl': 19.1.0 - '@nx/nx-win32-arm64-msvc': 19.1.0 - '@nx/nx-win32-x64-msvc': 19.1.0 + '@nx/nx-darwin-arm64': 19.1.2 + '@nx/nx-darwin-x64': 19.1.2 + '@nx/nx-freebsd-x64': 19.1.2 + '@nx/nx-linux-arm-gnueabihf': 19.1.2 + '@nx/nx-linux-arm64-gnu': 19.1.2 + '@nx/nx-linux-arm64-musl': 19.1.2 + '@nx/nx-linux-x64-gnu': 19.1.2 + '@nx/nx-linux-x64-musl': 19.1.2 + '@nx/nx-win32-arm64-msvc': 19.1.2 + '@nx/nx-win32-x64-msvc': 19.1.2 transitivePeerDependencies: - debug @@ -8379,6 +8409,8 @@ snapshots: prettier@3.2.5: {} + prettier@3.3.0: {} + pretty-bytes@6.1.1: {} pretty-format@29.7.0: @@ -8772,14 +8804,14 @@ snapshots: dependencies: typescript: 5.4.5 - ts-node@10.9.1(@types/node@20.12.12)(typescript@5.4.5): + ts-node@10.9.1(@types/node@20.14.1)(typescript@5.4.5): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 20.12.12 + '@types/node': 20.14.1 acorn: 8.11.3 acorn-walk: 8.3.2 arg: 4.1.3 @@ -8814,11 +8846,11 @@ snapshots: type-fest@2.19.0: {} - typescript-eslint@7.10.0(eslint@8.57.0)(typescript@5.4.5): + typescript-eslint@7.12.0(eslint@8.57.0)(typescript@5.4.5): dependencies: - '@typescript-eslint/eslint-plugin': 7.10.0(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/parser': 7.10.0(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/utils': 7.10.0(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/eslint-plugin': 7.12.0(@typescript-eslint/parser@7.12.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/parser': 7.12.0(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/utils': 7.12.0(eslint@8.57.0)(typescript@5.4.5) eslint: 8.57.0 optionalDependencies: typescript: 5.4.5 @@ -8932,13 +8964,13 @@ snapshots: vary@1.1.2: {} - vite-node@1.6.0(@types/node@20.12.12): + vite-node@1.6.0(@types/node@20.14.1): dependencies: cac: 6.7.14 debug: 4.3.4 pathe: 1.1.2 picocolors: 1.0.1 - vite: 5.2.11(@types/node@20.12.12) + vite: 5.2.12(@types/node@20.14.1) transitivePeerDependencies: - '@types/node' - less @@ -8949,27 +8981,27 @@ snapshots: - supports-color - terser - vite-tsconfig-paths@4.3.2(typescript@5.4.5)(vite@5.2.11(@types/node@20.12.12)): + vite-tsconfig-paths@4.3.2(typescript@5.4.5)(vite@5.2.12(@types/node@20.14.1)): dependencies: debug: 4.3.4 globrex: 0.1.2 tsconfck: 3.0.3(typescript@5.4.5) optionalDependencies: - vite: 5.2.11(@types/node@20.12.12) + vite: 5.2.12(@types/node@20.14.1) transitivePeerDependencies: - supports-color - typescript - vite@5.2.11(@types/node@20.12.12): + vite@5.2.12(@types/node@20.14.1): dependencies: esbuild: 0.20.2 postcss: 8.4.38 rollup: 4.18.0 optionalDependencies: - '@types/node': 20.12.12 + '@types/node': 20.14.1 fsevents: 2.3.3 - vitest@1.6.0(@types/node@20.12.12)(@vitest/ui@1.6.0): + vitest@1.6.0(@types/node@20.14.1)(@vitest/ui@1.6.0): dependencies: '@vitest/expect': 1.6.0 '@vitest/runner': 1.6.0 @@ -8988,11 +9020,11 @@ snapshots: strip-literal: 2.1.0 tinybench: 2.8.0 tinypool: 0.8.4 - vite: 5.2.11(@types/node@20.12.12) - vite-node: 1.6.0(@types/node@20.12.12) + vite: 5.2.12(@types/node@20.14.1) + vite-node: 1.6.0(@types/node@20.14.1) why-is-node-running: 2.2.2 optionalDependencies: - '@types/node': 20.12.12 + '@types/node': 20.14.1 '@vitest/ui': 1.6.0(vitest@1.6.0) transitivePeerDependencies: - less diff --git a/tests/clients/dart/lib/test_client.rpc.dart b/tests/clients/dart/lib/test_client.rpc.dart index c888e914..dcbddbf0 100644 --- a/tests/clients/dart/lib/test_client.rpc.dart +++ b/tests/clients/dart/lib/test_client.rpc.dart @@ -1,5 +1,6 @@ // this file was autogenerated by arri // ignore_for_file: type=lint, unused_field +import "dart:async"; import "dart:convert"; import "package:arri_client/arri_client.dart"; import "package:http/http.dart" as http; @@ -8,11 +9,11 @@ class TestClient { final http.Client? _httpClient; final String _baseUrl; final String _clientVersion = "10"; - late final Map Function()? _headers; + late final FutureOr> Function()? _headers; TestClient({ http.Client? httpClient, String baseUrl = "", - Map Function()? headers, + FutureOr> Function()? headers, }) : _httpClient = httpClient, _baseUrl = baseUrl, _headers = headers; @@ -46,11 +47,11 @@ class TestClientTestsService { final http.Client? _httpClient; final String _baseUrl; final String _clientVersion = "10"; - late final Map Function()? _headers; + late final FutureOr> Function()? _headers; TestClientTestsService({ http.Client? httpClient, String baseUrl = "", - Map Function()? headers, + FutureOr> Function()? headers, }) : _httpClient = httpClient, _baseUrl = baseUrl, _headers = headers; @@ -418,11 +419,11 @@ class TestClientAdaptersService { final http.Client? _httpClient; final String _baseUrl; final String _clientVersion = "10"; - late final Map Function()? _headers; + late final FutureOr> Function()? _headers; TestClientAdaptersService({ http.Client? httpClient, String baseUrl = "", - Map Function()? headers, + FutureOr> Function()? headers, }) : _httpClient = httpClient, _baseUrl = baseUrl, _headers = headers; @@ -446,11 +447,11 @@ class TestClientUsersService { final http.Client? _httpClient; final String _baseUrl; final String _clientVersion = "10"; - late final Map Function()? _headers; + late final FutureOr> Function()? _headers; TestClientUsersService({ http.Client? httpClient, String baseUrl = "", - Map Function()? headers, + FutureOr> Function()? headers, }) : _httpClient = httpClient, _baseUrl = baseUrl, _headers = headers; diff --git a/tests/clients/dart/project.json b/tests/clients/dart/project.json index d8bed539..a9aa1e23 100644 --- a/tests/clients/dart/project.json +++ b/tests/clients/dart/project.json @@ -22,6 +22,13 @@ "command": "dart test --reporter=expanded", "cwd": "tests/clients/dart" } + }, + "lint": { + "executor": "nx:run-commands", + "options": { + "command": "dart analyze", + "cwd": "tests/clients/dart" + } } } } diff --git a/tests/clients/dart/pubspec.lock b/tests/clients/dart/pubspec.lock index b0f796ee..102eac8a 100644 --- a/tests/clients/dart/pubspec.lock +++ b/tests/clients/dart/pubspec.lock @@ -31,7 +31,7 @@ packages: path: "../../../languages/dart/dart-client" relative: true source: path - version: "0.46.0" + version: "0.49.1" async: dependency: transitive description: @@ -148,10 +148,10 @@ packages: dependency: "direct dev" description: name: lints - sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452" + sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235" url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "4.0.0" logging: dependency: transitive description: @@ -172,10 +172,10 @@ packages: dependency: transitive description: name: meta - sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 url: "https://pub.dev" source: hosted - version: "1.12.0" + version: "1.15.0" mime: dependency: transitive description: @@ -316,26 +316,26 @@ packages: dependency: "direct dev" description: name: test - sha256: "7ee446762c2c50b3bd4ea96fe13ffac69919352bd3b4b17bac3f3465edc58073" + sha256: "47e9b601e20f24c27d08002eb635e92ddc2195010a8b3a621f4ed44ef70f6864" url: "https://pub.dev" source: hosted - version: "1.25.2" + version: "1.25.6" test_api: dependency: transitive description: name: test_api - sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" + sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" url: "https://pub.dev" source: hosted - version: "0.7.0" + version: "0.7.2" test_core: dependency: transitive description: name: test_core - sha256: "2bc4b4ecddd75309300d8096f781c0e3280ca1ef85beda558d33fcbedc2eead4" + sha256: "0c583123c86e58ab5036c92db5c7116ffddd655f1f5be762967d09f0fc66bf2d" url: "https://pub.dev" source: hosted - version: "0.6.0" + version: "0.6.3" typed_data: dependency: transitive description: diff --git a/tests/clients/dart/pubspec.yaml b/tests/clients/dart/pubspec.yaml index 7950c8c5..e7c28b61 100644 --- a/tests/clients/dart/pubspec.yaml +++ b/tests/clients/dart/pubspec.yaml @@ -8,5 +8,5 @@ dependencies: arri_client: path: ../../../languages/dart/dart-client dev_dependencies: - lints: ^2.0.0 - test: ^1.24.6 + lints: ^4.0.0 + test: ^1.25.6 diff --git a/tests/clients/dart/test/test_client_test.dart b/tests/clients/dart/test/test_client_test.dart index 9273bf01..a5b8ab2e 100644 --- a/tests/clients/dart/test/test_client_test.dart +++ b/tests/clients/dart/test/test_client_test.dart @@ -114,6 +114,19 @@ Future main() async { expect(result.int64, equals(input.int64)); expect(result.uint64, equals(input.uint64)); }); + test("supports async header functions", () async { + final asyncHeaderClient = TestClient( + baseUrl: baseUrl, + headers: () async { + await Future.delayed(Duration(milliseconds: 100)); + return {"x-test-header": "async-test"}; + }, + ); + final result = await asyncHeaderClient.tests.sendObject(input); + expect(result.array.length, equals(input.array.length)); + expect(result.int64, equals(input.int64)); + expect(result.uint64, equals(input.uint64)); + }); test("unauthenticated RPC requests return a 401 error", () async { try { await unauthenticatedClient.tests.sendObject(input); diff --git a/tests/clients/ts/project.json b/tests/clients/ts/project.json index eccbe209..d5800528 100644 --- a/tests/clients/ts/project.json +++ b/tests/clients/ts/project.json @@ -10,6 +10,12 @@ "passWithNoTests": true, "reportsDirectory": "../../../coverage/tests/clients/ts" } + }, + "lint": { + "executor": "@nx/eslint:lint", + "options": { + "lintFilePatterns": ["tests/clients/ts/**/*.ts"] + } } } } diff --git a/tests/clients/ts/testClient.rpc.ts b/tests/clients/ts/testClient.rpc.ts index f27ea609..28d30b3c 100644 --- a/tests/clients/ts/testClient.rpc.ts +++ b/tests/clients/ts/testClient.rpc.ts @@ -12,14 +12,16 @@ import { interface TestClientOptions { baseUrl?: string; - headers?: Record | (() => Record); + headers?: + | Record + | (() => Record | Promise>); } export class TestClient { private readonly baseUrl: string; private readonly headers: | Record - | (() => Record); + | (() => Record | Promise>); private readonly clientVersion = "10"; tests: TestClientTestsService; adapters: TestClientAdaptersService; @@ -38,7 +40,7 @@ export class TestClientTestsService { private readonly baseUrl: string; private readonly headers: | Record - | (() => Record); + | (() => Record | Promise>); private readonly clientVersion = "10"; constructor(options: TestClientOptions = {}) { @@ -331,7 +333,7 @@ export class TestClientAdaptersService { private readonly baseUrl: string; private readonly headers: | Record - | (() => Record); + | (() => Record | Promise>); private readonly clientVersion = "10"; constructor(options: TestClientOptions = {}) { @@ -355,7 +357,7 @@ export class TestClientUsersService { private readonly baseUrl: string; private readonly headers: | Record - | (() => Record); + | (() => Record | Promise>); private readonly clientVersion = "10"; constructor(options: TestClientOptions = {}) { diff --git a/tests/clients/ts/testClient.test.ts b/tests/clients/ts/testClient.test.ts index b48fc923..1002d44b 100644 --- a/tests/clients/ts/testClient.test.ts +++ b/tests/clients/ts/testClient.test.ts @@ -1,16 +1,17 @@ -import { randomUUID } from "crypto"; import { ArriErrorInstance } from "@arrirpc/client"; +import { randomUUID } from "crypto"; import { ofetch } from "ofetch"; -import { test, expect, describe } from "vitest"; +import { describe, expect, test } from "vitest"; + import { - TestClient, - type ObjectWithEveryType, - type ObjectWithEveryOptionalType, type ObjectWithEveryNullableType, - type WsMessageResponse, + type ObjectWithEveryOptionalType, + type ObjectWithEveryType, type RecursiveObject, type RecursiveUnion, + TestClient, type TypeBoxObject, + type WsMessageResponse, } from "./testClient.rpc"; function wait(ms: number) { @@ -139,6 +140,21 @@ test("unauthenticated RPC request returns a 401 error", async () => { } } }); +test("can use async functions for headers", async () => { + const _client = new TestClient({ + baseUrl: baseUrl, + async headers() { + await new Promise((res) => { + setTimeout(() => { + res(true); + }, 1000); + }); + return headers; + }, + }); + const result = await _client.tests.emptyParamsGetRequest(); + expect(typeof result.message).toBe("string"); +}); test("can send/receive partial objects", async () => { const fullObjectResult = await client.tests.sendPartialObject(input); expect(fullObjectResult).toStrictEqual(input); @@ -386,13 +402,13 @@ test("[SSE] reconnect with new credentials", async () => { onMessage(_) { msgCount++; }, - onRequestError(context) { + onRequestError(_) { errorCount++; }, - onResponse(context) { + onResponse(_) { openCount++; }, - onResponseError(context) { + onResponseError(_) { errorCount++; }, }); @@ -408,7 +424,7 @@ test("[ws] support websockets", async () => { let messageCount = 0; const errorCount = 0; const msgMap: Record = {}; - const controller = client.tests.websocketRpc({ + const controller = await client.tests.websocketRpc({ onMessage(msg) { messageCount++; msgMap[msg.entityId] = msg; @@ -459,8 +475,8 @@ test("[ws] support websockets", async () => { test("[ws] receive large messages", async () => { let messageCount = 0; - const controller = client.tests.websocketRpcSendTenLargeMessages({ - onMessage(msg) { + const controller = await client.tests.websocketRpcSendTenLargeMessages({ + onMessage(_) { messageCount++; }, }); @@ -474,7 +490,7 @@ test("[ws] connection errors", async () => { let connectionCount = 0; let messageCount = 0; let errorCount = 0; - const controller = new TestClient({ + const controller = await new TestClient({ baseUrl: "http://127.0.0.1:2021", }).tests.websocketRpc({ onOpen() { diff --git a/tooling/cli/package.json b/tooling/cli/package.json index ed9e85e5..bfe80456 100644 --- a/tooling/cli/package.json +++ b/tooling/cli/package.json @@ -1,6 +1,6 @@ { "name": "arri", - "version": "0.46.0", + "version": "0.49.1", "type": "module", "license": "MIT", "author": { @@ -30,6 +30,7 @@ "@arrirpc/codegen-rust": "workspace:*", "@arrirpc/codegen-ts": "workspace:*", "@arrirpc/codegen-utils": "workspace:*", + "@arrirpc/schema": "workspace:*", "@joshmossas/listhen": "^1.10.1", "c12": "^1.10.0", "chokidar": "^3.6.0", @@ -43,8 +44,7 @@ "h3": "^1.11.1", "ofetch": "^1.3.4", "pathe": "^1.1.2", - "prettier": "^3.2.5", - "scule": "^1.3.0" + "prettier": "^3.3.0" }, "devDependencies": { "@types/degit": "^2.8.6" diff --git a/tooling/cli/src/_main.ts b/tooling/cli/src/_main.ts index e7573c2f..8ea93ee6 100644 --- a/tooling/cli/src/_main.ts +++ b/tooling/cli/src/_main.ts @@ -5,13 +5,19 @@ import build from "./commands/build"; import codegen from "./commands/codegen"; import dev from "./commands/dev"; import init from "./commands/init"; +import list from "./commands/list"; +import use from "./commands/use"; +import version from "./commands/version"; const main = defineCommand({ subCommands: { build, - dev, codegen, + dev, init, + list, + use, + version, }, }); diff --git a/tooling/cli/src/commands/build.ts b/tooling/cli/src/commands/build.ts index bbb3a6d5..61f6205d 100644 --- a/tooling/cli/src/commands/build.ts +++ b/tooling/cli/src/commands/build.ts @@ -175,7 +175,7 @@ const require = topLevelCreateRequire(import.meta.url);`, : "undefined" }},`; } - const virtualEntry = `import { toNodeListener } from 'arri'; + const virtualEntry = `import { toNodeListener } from '@arrirpc/server'; import { listen } from '@joshmossas/listhen'; import app from './${OUT_APP_FILE}'; diff --git a/tooling/cli/src/commands/codegen.ts b/tooling/cli/src/commands/codegen.ts index c1497819..43d081d8 100644 --- a/tooling/cli/src/commands/codegen.ts +++ b/tooling/cli/src/commands/codegen.ts @@ -1,6 +1,6 @@ import fs from "node:fs"; -import { type AppDefinition,isAppDefinition } from "@arrirpc/codegen-utils"; +import { type AppDefinition, isAppDefinition } from "@arrirpc/codegen-utils"; import { loadConfig } from "c12"; import { defineCommand } from "citty"; import { ofetch } from "ofetch"; diff --git a/tooling/cli/src/commands/dev.ts b/tooling/cli/src/commands/dev.ts index 21c0f843..869e037f 100644 --- a/tooling/cli/src/commands/dev.ts +++ b/tooling/cli/src/commands/dev.ts @@ -249,7 +249,7 @@ async function createEntryModule(config: ResolvedArriConfig) { .relative(path.resolve(config.rootDir, config.srcDir), appModule) .split("."); appImportParts.pop(); - const virtualEntry = `import { toNodeListener } from 'h3'; + const virtualEntry = `import { toNodeListener } from '@arrirpc/server'; import app from './${GEN_APP_FILE}'; export default app.h3App;`; diff --git a/tooling/cli/src/commands/init.ts b/tooling/cli/src/commands/init.ts index 418c37ce..c6b0d232 100644 --- a/tooling/cli/src/commands/init.ts +++ b/tooling/cli/src/commands/init.ts @@ -1,11 +1,11 @@ import fs, { readFileSync, rmSync, writeFileSync } from "node:fs"; +import { kebabCase } from "@arrirpc/codegen-utils"; import { defineCommand } from "citty"; import Degit from "degit"; import enquirer from "enquirer"; import path from "pathe"; import prettier from "prettier"; -import { kebabCase } from "scule"; import { logger } from "../common"; @@ -104,6 +104,11 @@ async function initApp(dir: string, force: boolean) { initial: true, }, ]); + if (eslint) { + logger.warn( + `The Arri eslint starter uses the Eslint flat config syntax. If you are using VSCode you will need to enable "eslint.experimental.useFlatConfig" in your workspace settings. Please follow https://github.com/microsoft/vscode-eslint/issues/1644 for details.`, + ); + } const repo = eslint ? "modiimedia/arri-starters/app-starter-ts-with-eslint" : "modiimedia/arri-starters/app-starter-ts"; diff --git a/tooling/cli/src/commands/list.ts b/tooling/cli/src/commands/list.ts new file mode 100644 index 00000000..ee781398 --- /dev/null +++ b/tooling/cli/src/commands/list.ts @@ -0,0 +1,40 @@ +import { defineCommand } from "citty"; + +import { getArriPackageMetadata, logger } from "../common"; + +export default defineCommand({ + meta: { + name: "List", + description: "List the available arri versions", + }, + args: { + tags: { + type: "boolean", + default: false, + description: "List available tags", + }, + }, + async run({ args }) { + const arriInfo = await getArriPackageMetadata(); + if (args.tags) { + const output = Object.keys(arriInfo["dist-tags"]).map( + (tag) => `- ${tag} (${arriInfo["dist-tags"][tag]})`, + ); + logger.log(output.join("\n")); + return; + } + const tagMap: Record = {}; + for (const key of Object.keys(arriInfo["dist-tags"])) { + const version = arriInfo["dist-tags"][key]!; + tagMap[version] = key; + } + const output = Object.keys(arriInfo.versions).map((version) => { + const tag = tagMap[version]; + if (tag) { + return `- ${version} (${tag})`; + } + return `- ${version}`; + }); + logger.log(output.join("\n")); + }, +}); diff --git a/tooling/cli/src/commands/use.test.ts b/tooling/cli/src/commands/use.test.ts new file mode 100644 index 00000000..672774fb --- /dev/null +++ b/tooling/cli/src/commands/use.test.ts @@ -0,0 +1,70 @@ +import { updatePackageJson, updatePubspecYaml } from "./use"; + +describe("updatePackageJson()", () => { + it("updates relevant lines and preserves formatting", () => { + const input = `{ + "dependencies": { + "arri": "^0.1.1", + "@arrirpc/client": "^0.1.1", + "express": "^1.0.0" + }, + "devDependencies": { + "@arrirpc/eslint-plugin": "^0.1.1" + } +}`; + const expectedOutput = `{ + "dependencies": { + "arri": "^2.0.0", + "@arrirpc/client": "^2.0.0", + "express": "^1.0.0" + }, + "devDependencies": { + "@arrirpc/eslint-plugin": "^2.0.0" + } +}`; + const output = updatePackageJson(input, "2.0.0"); + expect(output.content).toBe(expectedOutput); + expect(output.updated).toBe(true); + }); + it("updates relevant lines and preserves jsonc comments", () => { + const input = `{ + "dependencies": { + "arri": "^0.1.1", // this is a comment + "express": "^1.0.0", + "@arrirpc/server": "^0.1.1", + }, + "devDependencies": { + "@arrirpc/eslint-plugin": "^0.1.1", // this is "another comment" + }, +}`; + const expectedOutput = `{ + "dependencies": { + "arri": "^2.0.0", // this is a comment + "express": "^1.0.0", + "@arrirpc/server": "^2.0.0", + }, + "devDependencies": { + "@arrirpc/eslint-plugin": "^2.0.0", // this is "another comment" + }, +}`; + const output = updatePackageJson(input, "2.0.0"); + expect(output.content).toBe(expectedOutput); + expect(output.updated).toBe(true); + }); +}); + +describe("updatePubspecYaml()", () => { + it("updates relevant lines while preserving formatting and comments", () => { + const input = `dependencies: + arri_client: 0.1.0 # this is a comment + http: 1.0.1 + # this is another comment`; + const expectedOutput = `dependencies: + arri_client: ^2.0.0 # this is a comment + http: 1.0.1 + # this is another comment`; + const output = updatePubspecYaml(input, "2.0.0"); + expect(output.content).toBe(expectedOutput); + expect(output.updated).toBe(true); + }); +}); diff --git a/tooling/cli/src/commands/use.ts b/tooling/cli/src/commands/use.ts new file mode 100644 index 00000000..302e53bd --- /dev/null +++ b/tooling/cli/src/commands/use.ts @@ -0,0 +1,203 @@ +import { a } from "@arrirpc/schema"; +import { defineCommand } from "citty"; +import consola from "consola"; +import { readFile, writeFile } from "fs/promises"; +import { ofetch } from "ofetch"; +import path from "pathe"; + +import { getArriPackageMetadata } from "../common"; + +export default defineCommand({ + meta: { + name: "use", + description: "Use a specific arri version", + }, + args: { + version: { + type: "positional", + required: true, + description: + 'The version you want to use. You can also specify a tag such as "latest".', + }, + }, + async run({ args }) { + const arriInfo = await getArriPackageMetadata(); + const version = arriInfo["dist-tags"][args.version] ?? args.version; + if (!arriInfo.versions[version]) { + throw new Error( + `Version ${args.version} doesn't exist. Run "arri list" to see available versions.`, + ); + } + const globby = (await import("globby")).globby; + // UPDATE TS DEPENDENCIES + consola.info(`Checking for TS/JS dependencies`); + const fileMap: Record = {}; + + const pkgJsonFiles = await globby( + [ + "package.json", + "**/package.json", + "package.jsonc", + "**/package.jsonc", + ], + { + ignore: ["node_modules", "**/node_modules", "**/dist", "dist"], + }, + ); + const jkgJsonFileTasks: Promise[] = []; + for (const file of pkgJsonFiles) { + jkgJsonFileTasks.push( + readFile(path.resolve(file), "utf8").then((content) => { + const result = updatePackageJson(content, version); + if (result.updated) { + fileMap[file] = result.content; + } + }), + ); + } + + await Promise.all(jkgJsonFileTasks); + + // UPDATE DART DEPENDENCIES + consola.info(`Checking for dart dependencies`); + const pubspecFiles = await globby(["pubspec.yaml", "**/pubspec.yaml"]); + const pubspecFileTasks: Promise[] = []; + if (pubspecFiles.length) { + const dartPackage = await getDartPackageMeta(); + let hasVersion = false; + for (const item of dartPackage.versions) { + if (item.version == version) { + hasVersion = true; + break; + } + } + if (!hasVersion) { + throw new Error( + `Version ${version} does not have Dart support`, + ); + } + } + for (const file of pubspecFiles) { + pubspecFileTasks.push( + readFile(path.resolve(file), "utf8").then((content) => { + const result = updatePubspecYaml(content, version); + if (result.updated) { + fileMap[file] = result.content; + } + }), + ); + } + await Promise.all(pubspecFileTasks); + + const updateTasks: Promise[] = []; + for (const key of Object.keys(fileMap)) { + updateTasks.push( + writeFile(path.resolve(key), fileMap[key]!, "utf8").then(() => + consola.success(`Updated ${key}`), + ), + ); + } + await Promise.all(updateTasks); + consola.success( + `Updated to ${version}. Rerun your install commands to update your dependencies.`, + ); + }, +}); + +export function updatePackageJson( + fileContent: string, + targetVersion: string, +): { updated: boolean; content: string } { + const lines = fileContent.split("\n"); + const output: string[] = []; + let updated = false; + for (const line of lines) { + if (line.includes(`"arri"`)) { + output.push(updateLine(line)); + updated = true; + continue; + } + if (line.includes(`"@arrirpc/`)) { + output.push(updateLine(line)); + updated = true; + continue; + } + output.push(line); + } + function updateLine(line: string) { + const parts = line.split('":'); + if (parts.length < 2) { + return line; + } + const targetParts = parts[1]!.split('"'); + targetParts[1] = `^${targetVersion}`; + parts[1] = targetParts.join('"'); + return parts.join('":'); + } + return { + updated, + content: output.join("\n"), + }; +} + +const PubPackageResponse = a.object({ + name: a.string(), + versions: a.array( + a.object({ + version: a.string(), + pubspec: a.object({ + name: a.string(), + description: a.string(), + version: a.string(), + repository: a.string(), + environment: a.object({ + sdk: a.string(), + }), + dependencies: a.record(a.string()), + dev_dependencies: a.record(a.string()), + }), + archive_url: a.string(), + archive_sha256: a.string(), + published: a.string(), + }), + ), +}); + +export async function getDartPackageMeta() { + const response = await ofetch("https://pub.dev/api/packages/arri_client"); + const data = a.parse(PubPackageResponse, response); + return data; +} + +export function updatePubspecYaml( + fileContent: string, + version: string, +): { + updated: boolean; + content: string; +} { + const lines = fileContent.split("\n"); + const output: string[] = []; + let updated = false; + for (const line of lines) { + if (line.includes("arri_client: ")) { + const parts = line.split(": "); + if (parts.length < 2) { + output.push(line); + continue; + } + const targetPart = parts[1]; + const subParts = targetPart!.split(" "); + subParts[0] = `^${version}`; + parts[1] = subParts.join(" "); + output.push(parts.join(": ")); + updated = true; + continue; + } + output.push(line); + } + return { + updated, + content: output.join("\n"), + }; +} diff --git a/tooling/cli/src/commands/version.ts b/tooling/cli/src/commands/version.ts new file mode 100644 index 00000000..795beee5 --- /dev/null +++ b/tooling/cli/src/commands/version.ts @@ -0,0 +1,25 @@ +import { readFileSync } from "node:fs"; +import { fileURLToPath } from "node:url"; + +import { defineCommand } from "citty"; +import path from "pathe"; + +const __filename = fileURLToPath(import.meta.url); // get the resolved path to the file +const __dirname = path.dirname(__filename); // get the name of the directory + +const version = defineCommand({ + meta: { + name: "Version", + description: "Get the current Arri CLI version", + }, + run() { + const packageJson = JSON.parse( + readFileSync(path.resolve(__dirname, "../package.json"), { + encoding: "utf8", + }), + ); + console.info(`${packageJson.version}`); + }, +}); + +export default version; diff --git a/tooling/cli/src/common.ts b/tooling/cli/src/common.ts index 694c9e84..8006f558 100644 --- a/tooling/cli/src/common.ts +++ b/tooling/cli/src/common.ts @@ -1,12 +1,17 @@ import { existsSync } from "node:fs"; import fs from "node:fs/promises"; -import { removeDisallowedChars } from "@arrirpc/codegen-utils"; +import { + camelCase, + kebabCase, + removeDisallowedChars, +} from "@arrirpc/codegen-utils"; +import { a, ValidationError } from "@arrirpc/schema"; import { createConsola } from "consola"; import { type globby } from "globby"; +import { ofetch } from "ofetch"; import path from "pathe"; import prettier from "prettier"; -import { camelCase, kebabCase } from "scule"; import { type ResolvedArriConfig } from "./config"; @@ -187,3 +192,87 @@ export function isInsideDir(dir: string, parentDir: string) { } return false; } + +export async function getArriPackageMetadata() { + const npmPackageResponse = await ofetch("https://registry.npmjs.com/arri"); + const arriInfo = a.safeParse(NpmRegistryPackage, npmPackageResponse); + if (!arriInfo.success) { + const errors = a.errors(NpmRegistryPackage, npmPackageResponse); + console.warn(errors); + throw new ValidationError({ + message: "Arri parsing response from registry", + errors, + }); + } + return arriInfo.value; +} +const NpmPackageVersion = a.partial( + a.object({ + name: a.string(), + version: a.string(), + _id: a.string(), + maintainers: a.array( + a.object({ + name: a.string(), + email: a.string(), + }), + ), + bin: a.record(a.string()), + dist: a.any(), + main: a.string(), + type: a.string(), + types: a.string(), + module: a.string(), + gitHead: a.string(), + _npmUser: a.object({ + name: a.string(), + email: a.string(), + }), + description: a.string(), + directories: a.record(a.any()), + _nodeVersion: a.string(), + dependencies: a.record(a.string()), + _hasShrinkWrap: a.boolean(), + _npmOperationalInternal: a.any(), + }), +); + +const NpmRegistryPackage = a.object({ + _id: a.string(), + _rev: a.string(), + name: a.string(), + description: a.string(), + "dist-tags": a.record(a.string()), + versions: a.record(NpmPackageVersion), + time: a.record(a.string()), + maintainers: a.array( + a.object({ + name: a.string(), + email: a.string(), + }), + ), + author: a.object({ + name: a.string(), + url: a.string(), + }), + repository: a.optional( + a.partial( + a.object({ + type: a.string(), + url: a.string(), + directory: a.string(), + }), + ), + ), + license: a.optional(a.string()), + homepage: a.optional(a.string()), + bugs: a.optional( + a.partial( + a.object({ + url: a.string(), + }), + ), + ), + readme: a.optional(a.string()), + readmeFilename: a.optional(a.string()), +}); diff --git a/tooling/codegen-utils/package.json b/tooling/codegen-utils/package.json index 499148f7..ae702e2b 100644 --- a/tooling/codegen-utils/package.json +++ b/tooling/codegen-utils/package.json @@ -1,6 +1,6 @@ { "name": "@arrirpc/codegen-utils", - "version": "0.46.0", + "version": "0.49.1", "license": "MIT", "author": { "name": "joshmossas", "url": "https://github.com/joshmossas" }, "bugs": { "url": "https://github.com/modiimedia/arri/issues" }, diff --git a/tooling/codegen-utils/project.json b/tooling/codegen-utils/project.json index d7b2885f..fac32676 100644 --- a/tooling/codegen-utils/project.json +++ b/tooling/codegen-utils/project.json @@ -6,7 +6,7 @@ "targets": { "build": { "executor": "nx:run-commands", - "outputs": ["{workspaceRoot}/tooling/codegen-utils/dist"], + "outputs": ["{projectRoot}/dist"], "options": { "command": "unbuild", "cwd": "tooling/codegen-utils" diff --git a/tooling/eslint-plugin/package.json b/tooling/eslint-plugin/package.json index 9734686b..7eff5ef9 100644 --- a/tooling/eslint-plugin/package.json +++ b/tooling/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@arrirpc/eslint-plugin", - "version": "0.46.0", + "version": "0.49.1", "license": "MIT", "author": { "name": "joshmossas", "url": "https://github.com/joshmossas" }, "bugs": { "url": "https://github.com/modiimedia/arri/issues" }, diff --git a/tooling/json-schema-to-jtd/package.json b/tooling/json-schema-to-jtd/package.json index 815e9098..b4bbdab9 100644 --- a/tooling/json-schema-to-jtd/package.json +++ b/tooling/json-schema-to-jtd/package.json @@ -1,6 +1,6 @@ { "name": "json-schema-to-jtd", - "version": "0.46.0", + "version": "0.49.1", "license": "MIT", "author": { "name": "joshmossas", diff --git a/tooling/json-schema-to-jtd/project.json b/tooling/json-schema-to-jtd/project.json index b68341c5..5fb4dec3 100644 --- a/tooling/json-schema-to-jtd/project.json +++ b/tooling/json-schema-to-jtd/project.json @@ -6,7 +6,7 @@ "targets": { "build": { "executor": "nx:run-commands", - "outputs": ["{workspaceRoot}/dist/tooling/json-schema-to-jtd"], + "outputs": ["{projectRoot}/dist"], "options": { "command": "unbuild", "cwd": "tooling/json-schema-to-jtd" diff --git a/tooling/jtd-utils/package.json b/tooling/jtd-utils/package.json index 133d1754..ad4eb282 100644 --- a/tooling/jtd-utils/package.json +++ b/tooling/jtd-utils/package.json @@ -13,6 +13,6 @@ "module": "./dist/index.mjs", "types": "./dist/index.d.ts", "files": ["dist"], - "version": "0.46.0", + "version": "0.49.1", "dependencies": {} } diff --git a/tooling/schema-typebox-adapter/package.json b/tooling/schema-typebox-adapter/package.json index 5edf43f6..b982c10c 100644 --- a/tooling/schema-typebox-adapter/package.json +++ b/tooling/schema-typebox-adapter/package.json @@ -1,6 +1,6 @@ { "name": "@arrirpc/typebox-adapter", - "version": "0.46.0", + "version": "0.49.1", "type": "module", "main": "./dist/index.cjs", "module": "./dist/index.mjs", diff --git a/tooling/schema/README.md b/tooling/schema/README.md index 439ba6a9..2033d144 100644 --- a/tooling/schema/README.md +++ b/tooling/schema/README.md @@ -22,7 +22,7 @@ To represent the data-models in a language agnostic way this library heavily rel - [Installation](#installation) - [Basic Example](#basic-example) -- [Usage With @arrirpc/server](#usage-with-@arrirpc/server) +- [Usage With @arrirpc/server](#usage-with-arrirpcserver) - [Supported Types](#supported-types) - [Primitives](#primitives) - [Enums](#enums) diff --git a/tooling/schema/package.json b/tooling/schema/package.json index f35c9c1d..759b602a 100644 --- a/tooling/schema/package.json +++ b/tooling/schema/package.json @@ -1,6 +1,6 @@ { "name": "@arrirpc/schema", - "version": "0.46.0", + "version": "0.49.1", "type": "module", "license": "MIT", "author": { "name": "joshmossas", "url": "https://github.com/joshmossas" }, @@ -21,7 +21,7 @@ }, "devDependencies": { "@faker-js/faker": "^8.4.1", - "ajv": "^8.14.0", + "ajv": "^8.15.0", "benny": "^3.7.1" } } diff --git a/vitest.workspace.js b/vitest.workspace.js index b6ad5a88..b62bb907 100644 --- a/vitest.workspace.js +++ b/vitest.workspace.js @@ -8,9 +8,10 @@ export default defineWorkspace([ "./languages/ts/ts-server/vite.config.ts", "./tooling/cli/vite.config.ts", "./tooling/codegen-utils/vite.config.ts", + "./tooling/eslint-plugin/vite.config.ts", "./tooling/json-schema-to-jtd/vite.config.ts", - "./tooling/schema-typebox-adapter/vite.config.ts", - "./tooling/schema/vite.config.ts", "./tooling/jtd-utils/vite.config.ts", + "./tooling/schema/vite.config.ts", + "./tooling/schema-typebox-adapter/vite.config.ts", "./tests/clients/client-typescript/vite.config.ts", ]);