@cardcore/client
Advanced tools
Comparing version 0.0.1-4bffd04f to 0.0.1-6bc8c162
@@ -46,3 +46,3 @@ "use strict"; | ||
_context.next = 2; | ||
return fetch("/" + gameId + ".sha256"); | ||
return (0, _util.serverFetch)("/" + gameId + ".sha256"); | ||
@@ -90,3 +90,3 @@ case 2: | ||
_context.next = 20; | ||
return fetch("/" + hash + "/next", { | ||
return (0, _util.serverFetch)("/" + hash + "/next", { | ||
method: "HEAD" | ||
@@ -107,3 +107,3 @@ }); | ||
_context.next = 25; | ||
return fetch("/" + hash + "/next"); | ||
return (0, _util.serverFetch)("/" + hash + "/next"); | ||
@@ -198,3 +198,3 @@ case 25: | ||
_context2.next = 5; | ||
return fetch("/" + hash + "/next"); | ||
return (0, _util.serverFetch)("/" + hash + "/next"); | ||
@@ -201,0 +201,0 @@ case 5: |
{ | ||
"name": "@cardcore/client", | ||
"version": "0.0.1-4bffd04f", | ||
"version": "0.0.1-6bc8c162", | ||
"description": "streamcards client", | ||
@@ -14,5 +14,9 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@streamplace/ssb-keys": "^7.0.16" | ||
"@cardcore/game": "0.0.1-6bc8c162", | ||
"@cardcore/util": "0.0.1-6bc8c162", | ||
"@streamplace/ssb-keys": "7.0.20", | ||
"babel-runtime": "^6.26.0", | ||
"cardcore": "0.0.1-6bc8c162" | ||
}, | ||
"gitHead": "4bffd04fa73be20816bbb166afb41334993ed83e" | ||
"gitHead": "6bc8c16251389fba21cae27a880a47427697b61f" | ||
} |
@@ -1,2 +0,2 @@ | ||
import { hashState } from "@cardcore/util"; | ||
import { hashState, serverFetch } from "@cardcore/util"; | ||
import { REMOTE_ACTION } from "cardcore"; | ||
@@ -16,3 +16,3 @@ | ||
export const clientLoadState = gameId => async (dispatch, getState) => { | ||
const res = await fetch(`/${gameId}.sha256`); | ||
const res = await serverFetch(`/${gameId}.sha256`); | ||
if (res.status !== 200) { | ||
@@ -32,3 +32,3 @@ const err = await res.text(); | ||
const hash = await dispatch(clientGetGameHash()); | ||
const headRes = await fetch(`/${hash}/next`, { | ||
const headRes = await serverFetch(`/${hash}/next`, { | ||
method: "HEAD" | ||
@@ -39,3 +39,3 @@ }); | ||
} | ||
const actionRes = await fetch(`/${hash}/next`); | ||
const actionRes = await serverFetch(`/${hash}/next`); | ||
const action = await actionRes.json(); | ||
@@ -72,3 +72,3 @@ await dispatch({ ...action, [REMOTE_ACTION]: true }); | ||
const hash = await dispatch(clientGetGameHash()); | ||
const res = await fetch(`/${hash}/next`); | ||
const res = await serverFetch(`/${hash}/next`); | ||
if (!res.ok || res.status === 204) { | ||
@@ -75,0 +75,0 @@ return backoff(); |
Sorry, the diff of this file is not supported yet
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
51926
0
5
+ Addedbabel-runtime@^6.26.0
+ Addedcardcore@0.0.1-6bc8c162
+ Added@babel/runtime@7.26.9(transitive)
+ Added@cardcore/game@0.0.1-6bc8c162(transitive)
+ Added@cardcore/util@0.0.1-6bc8c162(transitive)
+ Added@streamplace/ssb-keys@7.0.20(transitive)
+ Addedajv@6.12.6(transitive)
+ Addedbabel-runtime@6.26.0(transitive)
+ Addedcall-bound@1.0.4(transitive)
+ Addedcardcore@0.0.1-6bc8c162(transitive)
+ Addedcommander@2.20.3(transitive)
+ Addedcore-js@2.6.12(transitive)
+ Addedencoding@0.1.13(transitive)
+ Addedfast-deep-equal@3.1.3(transitive)
+ Addedfast-json-stable-stringify@2.1.0(transitive)
+ Addediconv-lite@0.6.3(transitive)
+ Addedinvariant@2.2.4(transitive)
+ Addedis-stream@1.1.0(transitive)
+ Addedisomorphic-fetch@2.2.1(transitive)
+ Addedjs-tokens@4.0.0(transitive)
+ Addedjson-schema-traverse@0.4.1(transitive)
+ Addedjson-stringify-safe@5.0.1(transitive)
+ Addedlodash.get@4.4.2(transitive)
+ Addedlodash.isequal@4.5.0(transitive)
+ Addedloose-envify@1.4.0(transitive)
+ Addednode-fetch@1.7.3(transitive)
+ Addedpunycode@2.3.1(transitive)
+ Addedredux@4.2.1(transitive)
+ Addedredux-immutable-state-invariant@2.1.0(transitive)
+ Addedredux-thunk@2.4.2(transitive)
+ Addedregenerator-runtime@0.11.10.14.1(transitive)
+ Addedsafer-buffer@2.1.2(transitive)
+ Addeduri-js@4.4.1(transitive)
+ Addedvalidator@10.11.0(transitive)
+ Addedwhatwg-fetch@3.6.20(transitive)
+ Addedz-schema@3.25.1(transitive)
- Removed@streamplace/ssb-keys@7.0.21(transitive)
- Removedcall-bound@1.0.3(transitive)
Updated@streamplace/ssb-keys@7.0.20