one 1.1.288 → 1.1.290

Sign up to get free protection for your applications and to get access to all the features.
@@ -19,6 +19,6 @@ __export(getURL_exports, {
19
19
  module.exports = __toCommonJS(getURL_exports);
20
20
  const CLIENT_BASE_URL = typeof window < "u" && window.location ? `${window.location.protocol}//${window.location.host}` : "";
21
21
  function getURL() {
22
- return process.env.ONE_SERVER_URL ?? CLIENT_BASE_URL;
22
+ return CLIENT_BASE_URL || process.env.ONE_SERVER_URL || "";
23
23
  }
24
24
  //# sourceMappingURL=getURL.js.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/getURL.ts"],
4
- "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAM,kBACJ,OAAO,SAAW,OAAe,OAAO,WACpC,GAAG,OAAO,SAAS,QAAQ,KAAK,OAAO,SAAS,IAAI,KACpD;AAEC,SAAS,SAAS;AACvB,SAAO,QAAQ,IAAI,kBAAkB;AACvC;",
4
+ "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAM,kBACJ,OAAO,SAAW,OAAe,OAAO,WACpC,GAAG,OAAO,SAAS,QAAQ,KAAK,OAAO,SAAS,IAAI,KACpD;AAEC,SAAS,SAAS;AAGvB,SAAO,mBAAmB,QAAQ,IAAI,kBAAkB;AAC1D;",
5
5
  "names": []
6
6
  }
@@ -1,6 +1,6 @@
1
1
  const CLIENT_BASE_URL = typeof window < "u" && window.location ? `${window.location.protocol}//${window.location.host}` : "";
2
2
  function getURL() {
3
- return process.env.ONE_SERVER_URL ?? CLIENT_BASE_URL;
3
+ return CLIENT_BASE_URL || process.env.ONE_SERVER_URL || "";
4
4
  }
5
5
  export {
6
6
  getURL
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/getURL.ts"],
4
- "mappings": "AAAA,MAAM,kBACJ,OAAO,SAAW,OAAe,OAAO,WACpC,GAAG,OAAO,SAAS,QAAQ,KAAK,OAAO,SAAS,IAAI,KACpD;AAEC,SAAS,SAAS;AACvB,SAAO,QAAQ,IAAI,kBAAkB;AACvC;",
4
+ "mappings": "AAAA,MAAM,kBACJ,OAAO,SAAW,OAAe,OAAO,WACpC,GAAG,OAAO,SAAS,QAAQ,KAAK,OAAO,SAAS,IAAI,KACpD;AAEC,SAAS,SAAS;AAGvB,SAAO,mBAAmB,QAAQ,IAAI,kBAAkB;AAC1D;",
5
5
  "names": []
6
6
  }
@@ -1,6 +1,6 @@
1
1
  const CLIENT_BASE_URL = typeof window < "u" && window.location ? `${window.location.protocol}//${window.location.host}` : "";
2
2
  function getURL() {
3
- return process.env.ONE_SERVER_URL ?? CLIENT_BASE_URL;
3
+ return CLIENT_BASE_URL || process.env.ONE_SERVER_URL || "";
4
4
  }
5
5
  export { getURL };
6
6
  //# sourceMappingURL=getURL.mjs.map
@@ -1 +1 @@
1
- {"version":3,"names":["CLIENT_BASE_URL","window","location","protocol","host","getURL","process","env","ONE_SERVER_URL"],"sources":["../../src/getURL.ts"],"sourcesContent":[null],"mappings":"AAAA,MAAMA,eAAA,GACJ,OAAOC,MAAA,GAAW,OAAeA,MAAA,CAAOC,QAAA,GACpC,GAAGD,MAAA,CAAOC,QAAA,CAASC,QAAQ,KAAKF,MAAA,CAAOC,QAAA,CAASE,IAAI,KACpD;AAEC,SAASC,OAAA,EAAS;EACvB,OAAOC,OAAA,CAAQC,GAAA,CAAIC,cAAA,IAAkBR,eAAA;AACvC","ignoreList":[]}
1
+ {"version":3,"names":["CLIENT_BASE_URL","window","location","protocol","host","getURL","process","env","ONE_SERVER_URL"],"sources":["../../src/getURL.ts"],"sourcesContent":[null],"mappings":"AAAA,MAAMA,eAAA,GACJ,OAAOC,MAAA,GAAW,OAAeA,MAAA,CAAOC,QAAA,GACpC,GAAGD,MAAA,CAAOC,QAAA,CAASC,QAAQ,KAAKF,MAAA,CAAOC,QAAA,CAASE,IAAI,KACpD;AAEC,SAASC,OAAA,EAAS;EAGvB,OAAOL,eAAA,IAAmBM,OAAA,CAAQC,GAAA,CAAIC,cAAA,IAAkB;AAC1D","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "one",
3
- "version": "1.1.288",
3
+ "version": "1.1.290",
4
4
  "source": "src/index.ts",
5
5
  "types": "./types/index.d.ts",
6
6
  "sideEffects": false,
@@ -89,12 +89,12 @@
89
89
  "@react-navigation/native-stack": "~6.9.13",
90
90
  "@react-navigation/routers": "~6.1.9",
91
91
  "@ungap/structured-clone": "^1.2.0",
92
- "@vxrn/universal-color-scheme": "1.1.288",
93
- "@vxrn/use-isomorphic-layout-effect": "1.1.288",
92
+ "@vxrn/universal-color-scheme": "1.1.290",
93
+ "@vxrn/use-isomorphic-layout-effect": "1.1.290",
94
94
  "babel-dead-code-elimination": "^1.0.6",
95
95
  "citty": "^0.1.6",
96
96
  "core-js": "^3.38.1",
97
- "create-vxrn": "1.1.288",
97
+ "create-vxrn": "1.1.290",
98
98
  "dotenv": "^16.4.5",
99
99
  "escape-string-regexp": "^5.0.0",
100
100
  "expo-linking": "~6.3.1",
@@ -116,7 +116,7 @@
116
116
  "url-parse": "^1.5.10",
117
117
  "vite": "6.0.0-beta.1",
118
118
  "vite-tsconfig-paths": "^5.0.1",
119
- "vxrn": "1.1.288",
119
+ "vxrn": "1.1.290",
120
120
  "ws": "^8.18.0",
121
121
  "xxhashjs": "^0.2.2"
122
122
  },
package/src/getURL.ts CHANGED
@@ -4,5 +4,7 @@ const CLIENT_BASE_URL =
4
4
  : ``
5
5
 
6
6
  export function getURL() {
7
- return process.env.ONE_SERVER_URL ?? CLIENT_BASE_URL
7
+ // We should use `CLIENT_BASE_URL` on the client as we can't guarantee how the client is connected to the server - it's possible that the server is listening on `127.0.0.1` and the client is connected via `localhost`. Things might break if URLs don't match due to a JS module being double-loaded via two different URLs.
8
+ // `process.env.ONE_SERVER_URL` is for the server, where `CLIENT_BASE_URL` will be blank.
9
+ return CLIENT_BASE_URL || process.env.ONE_SERVER_URL || ''
8
10
  }
@@ -1 +1 @@
1
- {"version":3,"file":"getURL.d.ts","sourceRoot":"","sources":["../src/getURL.ts"],"names":[],"mappings":"AAKA,wBAAgB,MAAM,WAErB"}
1
+ {"version":3,"file":"getURL.d.ts","sourceRoot":"","sources":["../src/getURL.ts"],"names":[],"mappings":"AAKA,wBAAgB,MAAM,WAIrB"}