Skip to content

Commit

Permalink
replace ofetch with @joshmossas/ofetch to get react native working pr…
Browse files Browse the repository at this point in the history
…operly
  • Loading branch information
joshmossas committed Aug 7, 2024
1 parent 9477362 commit 0a0f2be
Show file tree
Hide file tree
Showing 10 changed files with 56 additions and 27 deletions.
2 changes: 1 addition & 1 deletion languages/ts/ts-client/build.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ export default defineBuildConfig({
clean: true,
declaration: true,
failOnWarn: true,
externals: ["ofetch", "@arrirpc/schema"],
externals: ["ofetch", "@joshmossas/ofetch", "@arrirpc/schema"],
});
19 changes: 14 additions & 5 deletions languages/ts/ts-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,29 @@
"main": "./dist/index.cjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"files": ["dist"],
"files": [
"dist"
],
"license": "MIT",
"author": { "name": "joshmossas", "url": "https://github.com/joshmossas" },
"bugs": { "url": "https://github.com/modiimedia/arri/issues" },
"author": {
"name": "joshmossas",
"url": "https://github.com/joshmossas"
},
"bugs": {
"url": "https://github.com/modiimedia/arri/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/modiimedia/arri.git",
"directory": "languages/ts/ts-client"
},
"dependencies": {
"@arrirpc/schema": "workspace:*",
"@joshmossas/ofetch": "^1.3.5",
"event-source-plus": "^0.1.3",
"ofetch": "^1.3.4",
"ws": "^8.18.0"
},
"devDependencies": { "@types/ws": "^8.5.12" }
"devDependencies": {
"@types/ws": "^8.5.12"
}
}
2 changes: 1 addition & 1 deletion languages/ts/ts-client/src/request.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { serializeSmallString } from "@arrirpc/schema";
import { FetchError, ofetch } from "@joshmossas/ofetch";
import { EventSourcePlusOptions, type HttpMethod } from "event-source-plus";
import { FetchError, ofetch } from "ofetch";

import { ArriErrorInstance, isArriError } from "./errors";
import { getHeaders } from "./utils";
Expand Down
27 changes: 18 additions & 9 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/clients/ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"dependencies": {
"@arrirpc/client": "workspace:*",
"@arrirpc/schema": "workspace:*",
"ofetch": "^1.3.4"
"@joshmossas/ofetch": "^1.3.5"
}
}
2 changes: 1 addition & 1 deletion tests/clients/ts/testClient.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ArriErrorInstance } from "@arrirpc/client";
import { ofetch } from "@joshmossas/ofetch";
import { randomUUID } from "crypto";
import { ofetch } from "ofetch";
import { expect, test } from "vitest";

import {
Expand Down
23 changes: 17 additions & 6 deletions tooling/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,16 @@
"version": "0.58.0",
"type": "module",
"license": "MIT",
"author": { "name": "joshmossas", "url": "https://github.com/joshmossas" },
"bin": { "arri": "./dist/cli.mjs" },
"bugs": { "url": "https://github.com/modiimedia/arri/issues" },
"author": {
"name": "joshmossas",
"url": "https://github.com/joshmossas"
},
"bin": {
"arri": "./dist/cli.mjs"
},
"bugs": {
"url": "https://github.com/modiimedia/arri/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/modiimedia/arri.git",
Expand All @@ -14,7 +21,9 @@
"main": "./dist/index.cjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"files": ["dist"],
"files": [
"dist"
],
"dependencies": {
"@arrirpc/codegen-dart": "workspace:*",
"@arrirpc/codegen-kotlin": "workspace:*",
Expand All @@ -23,6 +32,7 @@
"@arrirpc/codegen-utils": "workspace:*",
"@arrirpc/schema": "workspace:*",
"@joshmossas/listhen": "^1.10.1",
"@joshmossas/ofetch": "^1.3.5",
"c12": "^1.11.1",
"chokidar": "^3.6.0",
"citty": "^0.1.6",
Expand All @@ -33,9 +43,10 @@
"esbuild-plugin-replace": "^1.4.0",
"globby": "^14.0.2",
"h3": "^1.12.0",
"ofetch": "^1.3.4",
"pathe": "^1.1.2",
"prettier": "^3.3.3"
},
"devDependencies": { "@types/degit": "^2.8.6" }
"devDependencies": {
"@types/degit": "^2.8.6"
}
}
2 changes: 1 addition & 1 deletion tooling/cli/src/commands/codegen.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import fs from "node:fs";

import { type AppDefinition, isAppDefinition } from "@arrirpc/codegen-utils";
import { ofetch } from "@joshmossas/ofetch";
import { loadConfig } from "c12";
import { watch } from "chokidar";
import { defineCommand } from "citty";
import { ofetch } from "ofetch";
import path from "pathe";

import { logger } from "../common";
Expand Down
2 changes: 1 addition & 1 deletion tooling/cli/src/commands/use.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { a } from "@arrirpc/schema";
import { ofetch } from "@joshmossas/ofetch";
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";
Expand Down
2 changes: 1 addition & 1 deletion tooling/cli/src/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import {
removeDisallowedChars,
} from "@arrirpc/codegen-utils";
import { a, ValidationError } from "@arrirpc/schema";
import { ofetch } from "@joshmossas/ofetch";
import { createConsola } from "consola";
import { type globby } from "globby";
import { ofetch } from "ofetch";
import path from "pathe";
import prettier from "prettier";

Expand Down

0 comments on commit 0a0f2be

Please sign in to comment.