Skip to content

Commit

Permalink
chore(repo): upgrade wrangler (#1690)
Browse files Browse the repository at this point in the history
* chore(repo): upgrade wrangler to 2.10.0

* wip

* wip

* use list instead of object statement

* fix: note

* oops
  • Loading branch information
maurerbot committed Feb 17, 2023
1 parent e06ce9c commit bc7fa2f
Show file tree
Hide file tree
Showing 74 changed files with 205 additions and 646 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion apps/console/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"npm-run-all": "4.1.5",
"tailwindcss": "3.2.4",
"typescript": "4.8.4",
"wrangler": "2.7.1"
"wrangler": "2.10.0"
},
"engines": {
"node": ">=16.13"
Expand Down
3 changes: 1 addition & 2 deletions apps/passport/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@
"eslint-plugin-react": "7.31.10",
"eslint-plugin-standard": "5.0.0",
"eslint-plugin-storybook": "0.6.7",
"miniflare": "2.6.0",
"npm-run-all": "4.1.5",
"postcss": "8.4.19",
"prettier": "2.7.1",
Expand All @@ -99,7 +98,7 @@
"tailwindcss": "3.1.8",
"typescript": "4.7.4",
"webpack": "5.75.0",
"wrangler": "2.7.1"
"wrangler": "2.10.0"
},
"engines": {
"node": ">=16.13"
Expand Down
3 changes: 1 addition & 2 deletions apps/profile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@
"eslint-plugin-promise": "6.1.1",
"eslint-plugin-react": "7.31.11",
"eslint-plugin-standard": "5.0.0",
"miniflare": "2.11.0",
"npm-run-all": "4.1.5",
"postcss": "8.4.19",
"prettier": "2.8.0",
Expand All @@ -110,7 +109,7 @@
"tailwindcss": "3.2.4",
"typescript": "4.9.3",
"webpack": "5.75.0",
"wrangler": "2.7.1"
"wrangler": "2.10.0"
},
"engines": {
"node": ">=16.13"
Expand Down
2 changes: 1 addition & 1 deletion platform/access/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"npm-run-all": "4.1.5",
"prettier": "2.7.1",
"typescript": "4.8.4",
"wrangler": "2.7.1"
"wrangler": "2.10.0"
},
"dependencies": {
"@ethersproject/bytes": "5.7.0",
Expand Down
2 changes: 1 addition & 1 deletion platform/account/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"npm-run-all": "4.1.5",
"prettier": "2.7.1",
"typescript": "4.8.4",
"wrangler": "2.7.1"
"wrangler": "2.10.0"
},
"dependencies": {
"@ethersproject/address": "5.7.0",
Expand Down
2 changes: 1 addition & 1 deletion platform/address/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"npm-run-all": "4.1.5",
"prettier": "2.7.1",
"typescript": "4.8.4",
"wrangler": "2.7.1"
"wrangler": "2.10.0"
},
"dependencies": {
"@ethersproject/address": "5.7.0",
Expand Down
2 changes: 1 addition & 1 deletion platform/edges/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"prettier": "2.7.1",
"tap": "16.3.2",
"typescript": "4.8.4",
"wrangler": "2.7.1",
"wrangler": "2.10.0",
"yarn-run-all": "3.1.1"
},
"dependencies": {
Expand Down
18 changes: 8 additions & 10 deletions platform/edges/src/db/insert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export async function node(g: Graph, urn: AnyURN): Promise<NodeRecord> {

await g.db
.prepare(
'INSERT INTO node (urn, nid, nss, fragment) VALUES (?1, ?2, ?3, ?4) \
'INSERT INTO node (urn, nid, nss, fragment) VALUES (?, ?, ?, ?) \
ON CONFLICT(urn) DO UPDATE SET fragment = excluded.fragment'
)
.bind(id, nid, nss, fc)
Expand All @@ -48,7 +48,7 @@ export async function node(g: Graph, urn: AnyURN): Promise<NodeRecord> {
// Add an entry to the join table for each q-component row that is
// used in the node URN.
const qcJoinStmt = g.db.prepare(
'INSERT INTO node_qcomp (nodeUrn, key, value) VALUES (?1, ?2, ?3) \
'INSERT INTO node_qcomp (nodeUrn, key, value) VALUES (?, ?, ?) \
ON CONFLICT(nodeUrn, key) DO UPDATE SET value=excluded.value'
)
const stmts = []
Expand All @@ -70,7 +70,7 @@ export async function node(g: Graph, urn: AnyURN): Promise<NodeRecord> {
// Add an entry to the join table for each q-component row that is
// used in the node URN.
const rcJoinStmt = g.db.prepare(
'INSERT INTO node_rcomp (nodeUrn, key, value) VALUES (?1, ?2, ?3) \
'INSERT INTO node_rcomp (nodeUrn, key, value) VALUES (?, ?, ?) \
ON CONFLICT(nodeUrn, key) DO UPDATE SET value=excluded.value'
)
const stmts = []
Expand All @@ -82,7 +82,7 @@ export async function node(g: Graph, urn: AnyURN): Promise<NodeRecord> {

// Get the ID of the inserted node.
const node = g.db
.prepare('SELECT * FROM node WHERE urn = ?1')
.prepare('SELECT * FROM node WHERE urn = ?')
.bind(id)
.first() as unknown

Expand Down Expand Up @@ -118,9 +118,9 @@ export async function edge(
createdTimestamp
)
VALUES (
?1,
?2,
?3,
?,
?,
?,
datetime('now')
)
ON CONFLICT DO NOTHING
Expand All @@ -137,9 +137,7 @@ export async function edge(
}

const edge = await g.db
.prepare(
'SELECT * FROM edge WHERE src = ?1 AND dst = ?2 AND tag = ?3'
)
.prepare('SELECT * FROM edge WHERE src = ? AND dst = ? AND tag = ?')
.bind(srcParam, dstParam, tagParam)
.first()

Expand Down
2 changes: 1 addition & 1 deletion platform/edges/src/db/remove.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export async function edge(
): Promise<any> {
return new Promise((resolve, reject) => {
g.db
.prepare('DELETE FROM edge WHERE src = ?1 AND dst = ?2 AND tag = ?3')
.prepare('DELETE FROM edge WHERE src = ? AND dst = ? AND tag = ?')
.bind(src, dst, tag)
.run()
.then((result) => {
Expand Down
22 changes: 12 additions & 10 deletions platform/edges/src/db/select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export async function qc(g: GraphDB, nodeId: AnyURN): Promise<QComponents> {
FROM
node_qcomp
WHERE
nodeUrn = ?1
nodeUrn = ?
`
const qcomp = await g.db
.prepare(query)
Expand Down Expand Up @@ -77,7 +77,7 @@ export async function rc(g: GraphDB, nodeId: AnyURN): Promise<RComponents> {
FROM
node_rcomp
WHERE
nodeUrn = ?1
nodeUrn = ?
`
const rcomp = await g.db
.prepare(query)
Expand Down Expand Up @@ -110,7 +110,7 @@ export async function node(
FROM
node
WHERE
urn = ?1
urn = ?
`
const node = await g.db.prepare(query).bind(nodeId.toString()).first<Node>()

Expand Down Expand Up @@ -160,18 +160,20 @@ export async function edges(
if (query.id) {
switch (query.dir) {
case Graph.EdgeDirection.Incoming:
sql = `SELECT * FROM edge e WHERE (e.dst = ?1)`
sql = `SELECT * FROM edge e WHERE (e.dst = ?)`
break
case Graph.EdgeDirection.Outgoing:
sql = `SELECT * FROM edge e WHERE (e.src = ?1)`
sql = `SELECT * FROM edge e WHERE (e.src = ?)`
break
default:
sql = `SELECT * FROM edge e WHERE (e.src = ?1 OR e.dst = ?1)`
throw 'no direction currently not supported. see https://github.com/cloudflare/miniflare/issues/504'
// default:
// sql = `SELECT * FROM edge e WHERE (e.src = ?1 OR e.dst = ?1)`
}

// Filter edges by tag, if provided.
if (query.tag) {
sql += ' AND e.tag = ?2 ORDER BY createdTimestamp ASC'
sql += ' AND e.tag = ? ORDER BY createdTimestamp ASC'
statement = g.db.prepare(sql).bind(query.id.toString(), query.tag)
} else {
sql += ' ORDER BY createdTimestamp ASC'
Expand All @@ -181,7 +183,7 @@ export async function edges(
sql = `SELECT * FROM edge e`

if (query.tag) {
sql += ' WHERE e.tag = ?1 ORDER BY createdTimestamp ASC'
sql += ' WHERE e.tag = ? ORDER BY createdTimestamp ASC'
statement = g.db.prepare(sql).bind(query.tag)
} else {
sql += ' ORDER BY createdTimestamp ASC'
Expand Down Expand Up @@ -342,7 +344,7 @@ export async function edges(
export async function incoming(g: GraphDB, nodeId: AnyURN): Promise<Edge[]> {
return new Promise((resolve, reject) => {
g.db
.prepare('SELECT * FROM edge WHERE dst = ?1')
.prepare('SELECT * FROM edge WHERE dst = ?')
.bind(nodeId.toString())
.all()
.then((result) => {
Expand All @@ -363,7 +365,7 @@ export async function incoming(g: GraphDB, nodeId: AnyURN): Promise<Edge[]> {
export async function outgoing(g: GraphDB, nodeId: AnyURN): Promise<Edge[]> {
return new Promise((resolve, reject) => {
g.db
.prepare('SELECT * FROM edge WHERE src = ?1')
.prepare('SELECT * FROM edge WHERE src = ?')
.bind(nodeId.toString())
.all()
.then((result) => {
Expand Down
18 changes: 8 additions & 10 deletions platform/edges/src/db/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export async function node(g: Graph, urn: AnyURN): Promise<NodeRecord> {

await g.db
.prepare(
'INSERT INTO node (urn, nid, nss, fragment) VALUES (?1, ?2, ?3, ?4) \
'INSERT INTO node (urn, nid, nss, fragment) VALUES (?, ?, ?, ?) \
ON CONFLICT(urn) DO UPDATE SET fragment = excluded.fragment'
)
.bind(id, nid, nss, fc)
Expand All @@ -47,7 +47,7 @@ export async function node(g: Graph, urn: AnyURN): Promise<NodeRecord> {
// Add an entry to the join table for each q-component row that is
// used in the node URN.
const qcJoinStmt = g.db.prepare(
'INSERT INTO node_qcomp (nodeUrn, key, value) VALUES (?1, ?2, ?3) \
'INSERT INTO node_qcomp (nodeUrn, key, value) VALUES (?, ?, ?) \
ON CONFLICT(nodeUrn, key) DO UPDATE SET value=excluded.value'
)
const stmts = []
Expand All @@ -69,7 +69,7 @@ export async function node(g: Graph, urn: AnyURN): Promise<NodeRecord> {
// Add an entry to the join table for each q-component row that is
// used in the node URN.
const rcJoinStmt = g.db.prepare(
'INSERT INTO node_rcomp (nodeUrn, key, value) VALUES (?1, ?2, ?3) \
'INSERT INTO node_rcomp (nodeUrn, key, value) VALUES (?, ?, ?) \
ON CONFLICT(nodeUrn, key) DO UPDATE SET value=excluded.value'
)
const stmts = []
Expand All @@ -81,7 +81,7 @@ export async function node(g: Graph, urn: AnyURN): Promise<NodeRecord> {

// Get the ID of the inserted node.
const node = g.db
.prepare('SELECT * FROM node WHERE urn = ?1')
.prepare('SELECT * FROM node WHERE urn = ?')
.bind(id)
.first() as unknown

Expand Down Expand Up @@ -116,9 +116,9 @@ export async function edge(
tag
)
VALUES (
?1,
?2,
?3
?,
?,
?
)
ON CONFLICT DO NOTHING
`
Expand All @@ -134,9 +134,7 @@ export async function edge(
}

const edge = await g.db
.prepare(
'SELECT * FROM edge WHERE src = ?1 AND dst = ?2 AND tag = ?3'
)
.prepare('SELECT * FROM edge WHERE src = ? AND dst = ? AND tag = ?')
.bind(srcParam, dstParam, tagParam)
.first()

Expand Down
2 changes: 1 addition & 1 deletion platform/galaxy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"concurrently": "7.5.0",
"npm-run-all": "4.1.5",
"typescript": "4.8.4",
"wrangler": "2.7.1"
"wrangler": "2.10.0"
},
"private": true,
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion platform/images/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"@cloudflare/workers-types": "4.20221111.1",
"npm-run-all": "4.1.5",
"typescript": "4.8.4",
"wrangler": "2.7.1"
"wrangler": "2.10.0"
},
"private": true,
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion platform/object/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"npm-run-all": "4.1.5",
"prettier": "2.7.1",
"typescript": "4.8.4",
"wrangler": "2.7.1"
"wrangler": "2.10.0"
},
"dependencies": {
"@trpc/server": "10.8.1",
Expand Down
2 changes: 1 addition & 1 deletion platform/ping/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"npm-run-all": "4.1.5",
"prettier": "2.7.1",
"typescript": "4.8.4",
"wrangler": "2.7.1"
"wrangler": "2.10.0"
},
"dependencies": {
"@trpc/server": "10.8.1",
Expand Down
2 changes: 1 addition & 1 deletion platform/starbase/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"npm-run-all": "4.1.5",
"prettier": "2.8.0",
"typescript": "4.8.4",
"wrangler": "2.7.1"
"wrangler": "2.10.0"
},
"dependencies": {
"@ethersproject/bytes": "5.7.0",
Expand Down
Loading

0 comments on commit bc7fa2f

Please sign in to comment.