@webstudio-is/trpc-interface 0.75.0 → 0.76.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,7 @@
1
1
  "use strict";
2
- var __create = Object.create;
3
2
  var __defProp = Object.defineProperty;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
6
  var __export = (target, all) => {
9
7
  for (var name in all)
@@ -17,21 +15,12 @@ var __copyProps = (to, from, except, desc) => {
17
15
  }
18
16
  return to;
19
17
  };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
19
  var client_exports = {};
30
20
  __export(client_exports, {
31
21
  createTrpcProxyServiceClient: () => createTrpcProxyServiceClient
32
22
  });
33
23
  module.exports = __toCommonJS(client_exports);
34
- var import_node_fetch = __toESM(require("node-fetch"), 1);
35
24
  var import_client = require("@trpc/client");
36
25
  var import_shared_router = require("./shared-router");
37
26
  var import_trpc_caller_link = require("../trpc-caller-link");
@@ -40,9 +29,6 @@ const createTrpcProxyServiceClient = (options) => {
40
29
  const remoteClient = (0, import_client.createTRPCProxyClient)({
41
30
  links: [
42
31
  (0, import_client.httpBatchLink)({
43
- // httpBatchLink uses lib.dom.d.ts's fetch type
44
- // which is incompatible with node fetch type.
45
- fetch: import_node_fetch.default,
46
32
  url: options.url,
47
33
  headers: () => ({
48
34
  Authorization: options.token,
@@ -1,4 +1,3 @@
1
- import fetch from "node-fetch";
2
1
  import { createTRPCProxyClient, httpBatchLink } from "@trpc/client";
3
2
  import {
4
3
  sharedRouter
@@ -9,9 +8,6 @@ const createTrpcProxyServiceClient = (options) => {
9
8
  const remoteClient = createTRPCProxyClient({
10
9
  links: [
11
10
  httpBatchLink({
12
- // httpBatchLink uses lib.dom.d.ts's fetch type
13
- // which is incompatible with node fetch type.
14
- fetch,
15
11
  url: options.url,
16
12
  headers: () => ({
17
13
  Authorization: options.token,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webstudio-is/trpc-interface",
3
- "version": "0.75.0",
3
+ "version": "0.76.0",
4
4
  "description": "Webstudio TRPC Interface",
5
5
  "author": "Webstudio <github@webstudio.is>",
6
6
  "homepage": "https://webstudio.is",
@@ -8,11 +8,10 @@
8
8
  "dependencies": {
9
9
  "@trpc/client": "^10.9.0",
10
10
  "@trpc/server": "^10.9.0",
11
- "node-fetch": "2",
12
11
  "ts-custom-error": "^3.3.1",
13
12
  "uuid": "^9.0.0",
14
13
  "zod": "^3.21.4",
15
- "@webstudio-is/prisma-client": "^0.75.0"
14
+ "@webstudio-is/prisma-client": "^0.76.0"
16
15
  },
17
16
  "devDependencies": {
18
17
  "@types/node": "^18.11.18",
@@ -38,10 +37,9 @@
38
37
  "scripts": {
39
38
  "typecheck": "tsc --noEmit --emitDeclarationOnly false",
40
39
  "test": "NODE_OPTIONS=--experimental-vm-modules jest",
41
- "checks": "pnpm typecheck && pnpm lint",
40
+ "checks": "pnpm typecheck",
42
41
  "dev": "build-package --watch",
43
42
  "build": "build-package",
44
- "dts": "tsc --project tsconfig.dts.json",
45
- "lint": "eslint ./src --ext .ts,.tsx --max-warnings 0"
43
+ "dts": "tsc --project tsconfig.dts.json"
46
44
  }
47
45
  }
@@ -1,4 +1,3 @@
1
- import fetch from "node-fetch";
2
1
  import { createTRPCProxyClient, httpBatchLink } from "@trpc/client";
3
2
  import {
4
3
  sharedRouter,
@@ -20,9 +19,6 @@ export const createTrpcProxyServiceClient = (
20
19
  const remoteClient = createTRPCProxyClient<SharedRouter>({
21
20
  links: [
22
21
  httpBatchLink({
23
- // httpBatchLink uses lib.dom.d.ts's fetch type
24
- // which is incompatible with node fetch type.
25
- fetch: fetch as never,
26
22
  url: options.url,
27
23
  headers: () => ({
28
24
  Authorization: options.token,