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: Github Codespaces Plugin #328

Merged
merged 30 commits into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
7c374e2
feat(devcontainer-github-codespaces): Add plugin for Github Codespaces
pyxelpioneer Jan 10, 2024
0b14e86
feat: allow users to specify custom location for config or use servic…
pyxelpioneer Jan 10, 2024
ae771dd
Update README.md
pyxelpioneer Jan 10, 2024
cacb95f
Update README.md
pyxelpioneer Jan 10, 2024
c6ef750
Update package.json
pyxelpioneer Jan 10, 2024
a349d98
make requested changes
pyxelpioneer Jan 12, 2024
46248f2
fix CI failing
pyxelpioneer Jan 12, 2024
531582d
Merge branch 'master' into master
pyxelpioneer Jan 18, 2024
ddda885
add tests and fix docker context path
pyxelpioneer Jan 18, 2024
a1dd8f9
Update README.md
pyxelpioneer Jan 18, 2024
8fae8d2
Merge branch 'master' into master
pyxelpioneer Jan 19, 2024
4723f42
Merge branch 'master' into master
pyxelpioneer Jan 20, 2024
03258cc
Add file via upload
pyxelpioneer Jan 21, 2024
0ac1e16
Update README.md
pyxelpioneer Jan 21, 2024
4e4735b
Delete slate .keep
pyxelpioneer Jan 24, 2024
5a26b39
Merge branch 'master' into master
pyxelpioneer Feb 3, 2024
8b29210
fix: don't generate admin ui docker compose if user doesnt opt in to …
pyxelpioneer Feb 5, 2024
d8dcb12
fix: compute init.sh's path relative to devcontainer config's path
pyxelpioneer Feb 7, 2024
479d6c0
Merge branch 'amplication:master' into master
pyxelpioneer Feb 11, 2024
fcbe2b6
Use underscores rather than spaces in path
pyxelpioneer Feb 11, 2024
990ec34
Update
pyxelpioneer Feb 11, 2024
586dce5
Merge branch 'master' into master
pyxelpioneer Feb 14, 2024
f59db53
Merge branch 'master' into master
pyxelpioneer Feb 22, 2024
419d863
Merge branch 'amplication:master' into master
pyxelpioneer Mar 2, 2024
298acdd
Merge branch 'master' into master
pyxelpioneer Mar 9, 2024
d0fa5f5
Merge branch 'master' into master
Shurtu-gal Mar 17, 2024
064b460
Merge branch 'master' into master
pyxelpioneer Mar 29, 2024
0ee57f0
Merge branch 'amplication:master' into master
pyxelpioneer Apr 4, 2024
d59789f
feat(devcontainer-github-codespaces): Rework plugin to improve it and…
pyxelpioneer Apr 5, 2024
ba8dcfe
chore: Add tests
pyxelpioneer Apr 8, 2024
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
10 changes: 10 additions & 0 deletions plugins/devcontainer-github-codespaces/.amplicationrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"settings": {
"includeAdminUI": true,
"customLocation": null,
"generateBasedOnServiceName": true
},
"systemSettings": {
"requireAuthenticationEntity": "false"
}
}
4 changes: 4 additions & 0 deletions plugins/devcontainer-github-codespaces/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"extends": ["../../.eslintrc.json"],
"ignorePatterns": ["!**/*"]
}
36 changes: 36 additions & 0 deletions plugins/devcontainer-github-codespaces/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Mac/OSX
.DS_Store

# Private Files
*.csv
*.csv.gz
*.tsv
*.tsv.gz
*.xlsx

# Build Files
dist/

# Private Node Modules
node_modules/
creds.js

# VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace

# Local History for Visual Studio Code
.history/

# Common credential files
**/credentials.json
**/client_secrets.json
**/client_secret.json
*creds*
*.dat
*password*
*.httr-oauth*
2 changes: 2 additions & 0 deletions plugins/devcontainer-github-codespaces/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.prettierignore
.gitignore
1 change: 1 addition & 0 deletions plugins/devcontainer-github-codespaces/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist
53 changes: 53 additions & 0 deletions plugins/devcontainer-github-codespaces/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# @amplication/plugin-devcontainer-github-codespaces

[![NPM Downloads](https://img.shields.io/npm/dt/@amplication/plugin-devcontainer-github-codespaces)](https://www.npmjs.com/package/@amplication/plugin-devcontainer-github-codespaces)

Quickly generates the configuration that you require to setup devcontainer for your Amplication App

## Purpose
This plugin serves the purpose of generating devcontainer based on your configuration for your Amplication app


## Usage

1. To install the plugin:
- Enable the plugin in the Amplication dashboard
- Configure the plugin according to your needs
- Commit changes and build!

2. To use the plugin
- Head over to https://github.com/codespaces/new to create a new codespace

![image](https://github.com/pyxelpioneer/plugins/assets/151645921/64242a31-6be0-4e98-99c7-11e32a2fff64)

- In repository, select the repository that you pushed your Amplication code to.
In branch, select the branch that your pushed your Amplication code to.
In Dev container configuration, choose the configuration with the name of your Amplication app.
In region, select the region that is nearest to you.
In machine type, select the specs for the codespace that you want to use

![image](https://github.com/pyxelpioneer/plugins/assets/151645921/9e737587-6a21-4188-be5a-94a11914b01e)

- Lastly, click on the Create Codespace to create your codespace and start developing!


## Configuration

This plugins allows you to customize the devcontainer config based:

- includeAdminUI (boolean): Start Admin UI alongside the server
- customLocation (string | null): Allows generating config as a specific directory.
- generateBasedOnServiceName (string): Generates the config based on the service name, i.e., at `<root>/.devcontainer/<service-name>/devcontainer.json`

>[!WARNING]
>If `customLocation` is not null and the `generateBasedOnServiceName` is true, then the latter will be ignored and the config will be generated in the custom location provided

## Scripts

### `build`

Running `npm run build` will bundle your plugin with Webpack for production.

### `dev`

Running `npm run dev` will watch your plugin's source code and automatically bundle it with every change.
Loading