@webstudio-is/http-client 0.75.0 → 0.77.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.
package/lib/cjs/index.js CHANGED
@@ -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 src_exports = {};
30
20
  __export(src_exports, {
31
21
  loadProject: () => loadProject
32
22
  });
33
23
  module.exports = __toCommonJS(src_exports);
34
- var import_isomorphic_fetch = __toESM(require("isomorphic-fetch"), 1);
35
24
  const loadProject = async ({
36
25
  apiUrl,
37
26
  projectId
@@ -41,7 +30,7 @@ const loadProject = async ({
41
30
  }
42
31
  const baseUrl = new URL(apiUrl);
43
32
  const projectUrl = new URL(`/rest/project/${projectId}`, baseUrl);
44
- const projectResponse = await (0, import_isomorphic_fetch.default)(projectUrl);
33
+ const projectResponse = await fetch(projectUrl);
45
34
  if (projectResponse.ok) {
46
35
  return await projectResponse.json();
47
36
  }
package/lib/index.js CHANGED
@@ -1,4 +1,3 @@
1
- import fetch from "isomorphic-fetch";
2
1
  const loadProject = async ({
3
2
  apiUrl,
4
3
  projectId
package/package.json CHANGED
@@ -1,24 +1,20 @@
1
1
  {
2
2
  "name": "@webstudio-is/http-client",
3
- "version": "0.75.0",
3
+ "version": "0.77.0",
4
4
  "description": "Webstudio HTTP Client",
5
5
  "author": "Webstudio <github@webstudio.is>",
6
6
  "homepage": "https://webstudio.is",
7
7
  "type": "module",
8
8
  "devDependencies": {
9
9
  "@jest/globals": "^29.3.1",
10
- "@types/isomorphic-fetch": "^0.0.36",
11
10
  "jest": "^29.3.1",
12
11
  "typescript": "5.1.3",
13
12
  "@webstudio-is/jest-config": "^1.0.6",
14
- "@webstudio-is/prisma-client": "^0.75.0",
15
- "@webstudio-is/react-sdk": "^0.75.0",
13
+ "@webstudio-is/prisma-client": "^0.77.0",
14
+ "@webstudio-is/react-sdk": "^0.77.0",
16
15
  "@webstudio-is/scripts": "^0.0.0",
17
16
  "@webstudio-is/tsconfig": "^1.0.6"
18
17
  },
19
- "dependencies": {
20
- "isomorphic-fetch": "^3.0.0"
21
- },
22
18
  "exports": {
23
19
  "source": "./src/index.ts",
24
20
  "types": "./lib/types/index.d.ts",
@@ -38,7 +34,6 @@
38
34
  "dts": "tsc --project tsconfig.dts.json",
39
35
  "test": "NODE_OPTIONS=--experimental-vm-modules jest",
40
36
  "typecheck": "tsc --noEmit --emitDeclarationOnly false",
41
- "lint": "eslint ./src --ext .ts,.tsx --max-warnings 0",
42
- "checks": "pnpm typecheck && pnpm lint"
37
+ "checks": "pnpm typecheck"
43
38
  }
44
39
  }
package/src/index.ts CHANGED
@@ -1,4 +1,3 @@
1
- import fetch from "isomorphic-fetch";
2
1
  import type { Data } from "@webstudio-is/react-sdk";
3
2
 
4
3
  export const loadProject = async ({