Skip to content

chore(Coder plugin): import preview version of Coder SDK into plugin #130

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

Merged
merged 4 commits into from
May 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions plugins/backstage-plugin-coder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
"@material-ui/lab": "4.0.0-alpha.61",
"@tanstack/react-query": "4.36.1",
"axios": "^1.6.8",
"dayjs": "^1.11.11",
"ua-parser-js": "^1.0.37",
"use-sync-external-store": "^1.2.1",
"valibot": "^0.28.1"
},
Expand All @@ -57,6 +59,7 @@
"@testing-library/jest-dom": "^5.10.1",
"@testing-library/react": "^14.2.1",
"@testing-library/user-event": "^14.0.0",
"@types/ua-parser-js": "^0.7.39",
"msw": "^1.0.0"
},
"files": [
Expand Down
20 changes: 20 additions & 0 deletions plugins/backstage-plugin-coder/src/api/vendoredSdk/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Coder SDK - Experimental Vendored Version

This is a vendored version of the main API files from the
[core Coder OSS repo](https://github.com/coder/coder/tree/main/site/src/api). All files (aside from test files) have been copied over directly, with only a
few changes made to satisfy default Backstage ESLint rules.

While there is a risk of this getting out of sync with the versions of the
files in Coder OSS, the Coder API itself should be treated as stable. Breaking
changes are only made when absolutely necessary.

## General approach

- Copy over relevant files from Coder OSS and place them in relevant folders
- As much as possible, the file structure of the vendored files should match the file structure of Coder OSS to make it easier to copy updated files over.
- Have a single file at the top level of this directory that exports out the files for consumption elsewhere in the plugin. No plugin code should interact with the vendored files directly.

## Eventual plans

Coder has eventual plans to create a true SDK published through NPM. Once
that is published, all of this vendored code should be removed in favor of it.
Loading