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

New Architecture #146

Merged
merged 45 commits into from
Oct 19, 2024
Merged

New Architecture #146

merged 45 commits into from
Oct 19, 2024

Conversation

apteryxxyz
Copy link
Member

@apteryxxyz apteryxxyz commented Sep 23, 2024

Code

  • Plugin class that Client and LinkedRoles extends
  • createHandle method
  • Node.js adapter
  • Cloudflare adapter (added, untested)
    • Fix needed reference issue
  • Bun adapter
  • Next.js adapter
  • create-carbon new templates
    • Customise Next.js default page.tsx
  • Add ability to protect routes
  • Add ability to disable routes
  • Move linked roles setting metadata to route too
  • Rewrite template readme to link to docs instead

Testing

  • Node.js interactions
  • Node.js linked roles
  • Bun interactions
  • Bun linked roles
  • Next.js interactions (in Node.js)
  • Next.js linked roles (in Node.js)
  • Next.js interactions (on Vercel)
  • Next.js linked roles (on Vercel)
  • Cloudflare interactions
  • Cloudflare linked roles
  • Update example apps in apps/

Documentation

  • Update documention

Closes #99

Copy link

changeset-bot bot commented Sep 23, 2024

🦋 Changeset detected

Latest commit: 0d754ea

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
create-carbon Minor
@buape/carbon Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added p:carbon The carbon package p:nodejs The node.js package dependencies Dependency updates!! p:create-carbon The create-carbon package labels Sep 23, 2024

This comment was marked as resolved.

This comment was marked as outdated.

@thewilloftheshadow
Copy link
Member

You can rebase on main to fix the formatting CI error

Copy link
Member

@thewilloftheshadow thewilloftheshadow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love the direction this is going, its exciting!

Couple of changes and questions I have here so far, and I marked the TODOs as well.
Make sure everything that's marked as public has tsdoc on it even if they aren't generally made for the end user to use, because they'll show up in the generated docs site anyway. Might be good to use @internal on those too.

Also, there are a few lines that just end with // like there was a comment there that is now gone, is that intentional?

Good luck on your testing! 🎉

apps/cloudo/src/index.ts Outdated Show resolved Hide resolved
apps/rocko/src/index.ts Outdated Show resolved Hide resolved
packages/carbon/src/classes/Client.ts Outdated Show resolved Hide resolved
packages/carbon/src/classes/Client.ts Outdated Show resolved Hide resolved
packages/carbon/src/classes/Client.ts Outdated Show resolved Hide resolved
packages/carbon/src/createHandle.ts Outdated Show resolved Hide resolved
packages/carbon/src/plugins/linked-roles/LinkedRoles.ts Outdated Show resolved Hide resolved
packages/create-carbon/package.json Outdated Show resolved Hide resolved
@apteryxxyz
Copy link
Member Author

Regarding the // at the end of some lines, this is just me forcing some preferred formatting.

For example, Biome would format a piece of code like this:

await this.rest.put(Routes.applicationCommands(this.options.clientId), {
    body: commands
})

I myself don't like this, so I'll put // to force the formatting to this:

await this.rest.put(
    Routes.applicationCommands(this.options.clientId), //
    { body: commands }
)

@thewilloftheshadow
Copy link
Member

Ah, that's a neat trick

@thewilloftheshadow thewilloftheshadow linked an issue Oct 9, 2024 that may be closed by this pull request
@thewilloftheshadow
Copy link
Member

Any idea on the docs api script failing? Haven't tried to fix it yet but I haven't dug into how this version works

@apteryxxyz
Copy link
Member Author

Any idea on the docs api script failing? Haven't tried to fix it yet but I haven't dug into how this version works

Seems to be related to the copy-api.sh script, the action doesnt like escaped_name="${name//@/\\@}". As to why my best guess is the shell in the action isn't bash, referencing this Stack Overflow answer. I'm not really sure though

@apteryxxyz
Copy link
Member Author

Any idea on the docs api script failing? Haven't tried to fix it yet but I haven't dug into how this version works

#185 fixes this issue

@apteryxxyz apteryxxyz added the blocked Action required to proceed label Oct 15, 2024
@apteryxxyz apteryxxyz marked this pull request as ready for review October 18, 2024 20:29
@apteryxxyz apteryxxyz requested a review from a team as a code owner October 18, 2024 20:29
@apteryxxyz
Copy link
Member Author

Finally done 😂😴

@apteryxxyz apteryxxyz removed the blocked Action required to proceed label Oct 18, 2024
@thewilloftheshadow thewilloftheshadow added this pull request to the merge queue Oct 19, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch Oct 19, 2024
@thewilloftheshadow thewilloftheshadow added this pull request to the merge queue Oct 19, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch Oct 19, 2024
@thewilloftheshadow thewilloftheshadow merged commit 8b489db into buape:main Oct 19, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Dependency updates!! p:carbon The carbon package p:create-carbon The create-carbon package p:nodejs The node.js package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Plugins Architecture + Better Adapters Fix hangs from loadCommands
2 participants