@gradio/client 0.20.0 → 0.20.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @gradio/client
2
2
 
3
+ ## 0.20.1
4
+
5
+ ### Features
6
+
7
+ - [#8415](https://github.com/gradio-app/gradio/pull/8415) [`227de35`](https://github.com/gradio-app/gradio/commit/227de352982b3dcdf9384eaa28b7e9cf09afb6e8) - Fix spaces load error. Thanks @aliabid94!
8
+
3
9
  ## 0.20.0
4
10
 
5
11
  ### Features
@@ -1 +1 @@
1
- {"version":3,"file":"init_helpers.d.ts","sourceRoot":"","sources":["../../src/helpers/init_helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAUvC,OAAO,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC;AAG5B;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAC3B,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,eAAe,EAAE,OAAO,GACtB,MAAM,CAKR;AAED,wBAAsB,OAAO,CAC5B,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,MAAM,EAAE,EACrB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,GACrB,OAAO,CAAC,MAAM,GAAG,KAAK,CAAC,CAezB;AAED,wBAAgB,gBAAgB,CAC/B,GAAG,EAAE,MAAM,CAAC,cAAc,CAAC,GACzB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAOxB;AAED,wBAAsB,cAAc,CACnC,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,GACd,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CA0C7B;AAED,wBAAsB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAqBjE;AAGD,wBAAsB,iBAAiB,CACtC,aAAa,EAA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C,IAAI,CAAC,CAqBjE;AAGD,wBAAsB,iBAAiB,CACtC,aAAa,EAAE,MAAM,EACrB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EACtB,MAAM,EAAE,OAAO,KAAK,EACpB,QAAQ,CAAC,EAAE,MAAM,MAAM,EAAE,GACvB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAyBxB;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG;IACrD,WAAW,EAAE,IAAI,GAAG,KAAK,CAAC;IAC1B,aAAa,EAAE,OAAO,GAAG,QAAQ,CAAC;IAClC,IAAI,EAAE,MAAM,CAAC;CACb,CAgCA;AAED,eAAO,MAAM,qBAAqB,kBAAmB,MAAM,KAAG,MAAM,EAUnE,CAAC"}
package/dist/index.js CHANGED
@@ -57,6 +57,7 @@ function map_names_to_ids(fns) {
57
57
  return apis;
58
58
  }
59
59
  async function resolve_config(endpoint) {
60
+ var _a;
60
61
  const headers = this.options.hf_token ? { Authorization: `Bearer ${this.options.hf_token}` } : {};
61
62
  headers["Content-Type"] = "application/json";
62
63
  if (typeof window !== "undefined" && window.gradio_config && location.origin !== "http://localhost:9876" && !window.gradio_config.dev_mode) {
@@ -80,6 +81,11 @@ async function resolve_config(endpoint) {
80
81
  let config = await response.json();
81
82
  config.path = config.path ?? "";
82
83
  config.root = endpoint;
84
+ (_a = config.dependencies) == null ? void 0 : _a.forEach((dep, i) => {
85
+ if (dep.id === void 0) {
86
+ dep.id = i;
87
+ }
88
+ });
83
89
  return config;
84
90
  } else if ((response == null ? void 0 : response.status) === 401) {
85
91
  throw new Error(UNAUTHORIZED_MSG);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gradio/client",
3
- "version": "0.20.0",
3
+ "version": "0.20.1",
4
4
  "description": "Gradio API client",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -101,6 +101,11 @@ export async function resolve_config(
101
101
  let config = await response.json();
102
102
  config.path = config.path ?? "";
103
103
  config.root = endpoint;
104
+ config.dependencies?.forEach((dep: any, i: number) => {
105
+ if (dep.id === undefined) {
106
+ dep.id = i;
107
+ }
108
+ });
104
109
  return config;
105
110
  } else if (response?.status === 401) {
106
111
  throw new Error(UNAUTHORIZED_MSG);