Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update example #22

Merged
merged 2 commits into from
Dec 7, 2023
Merged

feat: update example #22

merged 2 commits into from
Dec 7, 2023

Conversation

alanshaw
Copy link
Member

@alanshaw alanshaw commented Nov 14, 2023

Depends on changes @Gozala is making to the client.

  1. feat: w3up client login w3up#1120 (review)
  2. TBC for space.save()

@alanshaw alanshaw requested a review from Gozala November 14, 2023 12:56
Copy link
Contributor

github-actions bot commented Nov 14, 2023

@olizilla
Copy link
Contributor

pending release of storacha/w3up#1121

olizilla added a commit to storacha/w3up that referenced this pull request Nov 14, 2023
trying to find a nice minimal example that folks can run and re-run to try thing out.

pulled from storacha/www#22

License: MIT
Signed-off-by: Oli Evans <oli@protocol.ai>
@olizilla
Copy link
Contributor

testing this out against w3up HEAD, i get a 500 error

❯ node upload.js oli@protocol.ai example .
{ email: 'oli@protocol.ai', spaceName: 'example', path: '.' }
💌 Sending a verification link. Plz check your inbox oli@protocol.ai
file:///Users/oli/Code/web3-storage/w3up/node_modules/.pnpm/@ucanto+transport@9.0.0/node_modules/@ucanto/transport/src/http.js:94
    throw new this(message, options)
          ^

HTTPError: HTTP Request failed
    at HTTPError.throw (file:///Users/oli/Code/web3-storage/w3up/node_modules/.pnpm/@ucanto+transport@9.0.0/node_modules/@ucanto/transport/src/http.js:94:11)
    at Channel.request (file:///Users/oli/Code/web3-storage/w3up/node_modules/.pnpm/@ucanto+transport@9.0.0/node_modules/@ucanto/transport/src/http.js:68:24)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async execute (file:///Users/oli/Code/web3-storage/w3up/node_modules/.pnpm/@ucanto+client@9.0.0/node_modules/@ucanto/client/src/connection.js:50:20)
    at async IssuedInvocation.execute (file:///Users/oli/Code/web3-storage/w3up/node_modules/.pnpm/@ucanto+core@9.0.0/node_modules/@ucanto/core/src/invocation.js:115:22)
    at async claim (file:///Users/oli/Code/web3-storage/w3up/packages/access-client/dist/src/access.js:87:29)
    at async PendingAccessRequest.poll (file:///Users/oli/Code/web3-storage/w3up/packages/access-client/dist/src/access.js:150:28)
    at async PendingAccessRequest.claim (file:///Users/oli/Code/web3-storage/w3up/packages/access-client/dist/src/access.js:170:28)
    at async Module.login (file:///Users/oli/Code/web3-storage/w3up/packages/w3up-client/src/account.js:96:27)
    at async Client.login (file:///Users/oli/Code/web3-storage/w3up/packages/w3up-client/src/client.js:77:35) {
  url: 'https://up.web3.storage/',
  status: 500,
  statusText: 'Internal Server Error'
}

Node.js v20.8.0

code is here https://github.com/web3-storage/w3up/pull/1126/files#diff-71ef318b5794a5264707f8f15fd8f6fb35bd6f0f5d989297745aed5a9f33b613

@travis
Copy link
Member

travis commented Dec 1, 2023

whoop, I was about to submit a change that just changed authorize to login in this example, but realized this encompasses that and more.

@alanshaw I'm not sure what you mean by TBC space.save() - it looks like that is implemented in the access client so it seems like this should be good to go? I'm going to approve but will wait to merge until you confirm!

src/components/code.tsx Outdated Show resolved Hide resolved
@alanshaw
Copy link
Member Author

alanshaw commented Dec 7, 2023

Lets get this in - it is at least a little better than what's there.

@alanshaw alanshaw merged commit 0a28416 into main Dec 7, 2023
3 checks passed
@alanshaw alanshaw deleted the feat/update-example-code branch December 7, 2023 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants