staklink 0.2.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +22 -0
- package/README.md +95 -0
- package/bin/staklink.cjs +2 -0
- package/dist/proxy-server.cjs +80631 -0
- package/dist/staklink-cli.cjs +11054 -0
- package/package.json +159 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Copyright (c) 2025 Stakwork, Inc.
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person
|
|
4
|
+
obtaining a copy of this software and associated documentation
|
|
5
|
+
files (the "Software"), to deal in the Software without
|
|
6
|
+
restriction, including without limitation the rights to use,
|
|
7
|
+
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
8
|
+
copies of the Software, and to permit persons to whom the
|
|
9
|
+
Software is furnished to do so, subject to the following
|
|
10
|
+
conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be
|
|
13
|
+
included in all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
16
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
17
|
+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
18
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
19
|
+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
20
|
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
21
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
22
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# staklink
|
|
2
|
+
|
|
3
|
+
VSCode extension for automating development and debugging in Codespaces.
|
|
4
|
+
|
|
5
|
+
`staklink` is set up for Codespaces running one or more repositories in the /workspaces directory.
|
|
6
|
+
|
|
7
|
+
# processes
|
|
8
|
+
|
|
9
|
+
There are 2 ways to configure your dev processes (like your backend, frontend, db, etc)
|
|
10
|
+
|
|
11
|
+
### pm2
|
|
12
|
+
|
|
13
|
+
In your `.devcontainer` folder, add a `pm2.config.js` file. This can be used to manage your dev processes using [pm2](https://pm2.keymetrics.io/).
|
|
14
|
+
|
|
15
|
+
For example:
|
|
16
|
+
|
|
17
|
+
```js
|
|
18
|
+
module.exports = {
|
|
19
|
+
apps: [
|
|
20
|
+
{
|
|
21
|
+
name: "sphinx-tribes-backend",
|
|
22
|
+
script: "./sphinx-tribes",
|
|
23
|
+
cwd: "/workspaces/sphinx-tribes",
|
|
24
|
+
instances: 1,
|
|
25
|
+
autorestart: true,
|
|
26
|
+
watch: false,
|
|
27
|
+
max_memory_restart: "1G",
|
|
28
|
+
env: {
|
|
29
|
+
RESTART: "true",
|
|
30
|
+
REBUILD_COMMAND: "go build -o sphinx-tribes",
|
|
31
|
+
POST_RUN_COMMAND: "./seed-dummy-data.sh",
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: "sphinx-tribes-frontend",
|
|
36
|
+
script: "npm",
|
|
37
|
+
args: "run start:codespace",
|
|
38
|
+
cwd: "/workspaces/sphinx-tribes-frontend",
|
|
39
|
+
instances: 1,
|
|
40
|
+
autorestart: true,
|
|
41
|
+
watch: false,
|
|
42
|
+
max_memory_restart: "1G",
|
|
43
|
+
env: {
|
|
44
|
+
NODE_ENV: "development",
|
|
45
|
+
INSTALL_COMMAND: "yarn install",
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
],
|
|
49
|
+
};
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
The above config runs the backend and the frontend. In the `env` section:
|
|
53
|
+
|
|
54
|
+
- `RESTART`: will make the service rebuild and restart if needed (when code is updated)
|
|
55
|
+
- `REBUILD_COMMAND`: a custom "rebuild" command
|
|
56
|
+
- `INSTALL_COMMAND`: a custom dependency installation step
|
|
57
|
+
- `POST_RUN_COMMAND`: arbitrary command to run after a service starts (such as seeding DB with dummy data)
|
|
58
|
+
- `PORT`: port number, to let external workflows know which port maps to which service
|
|
59
|
+
|
|
60
|
+
### docker-compose.yml
|
|
61
|
+
|
|
62
|
+
In your `.devcontainer` folder, add a `docker-compose.yml` file. This can be used to manage long-running processes that don't need to be controlled, rebuilt, or customized (like a database)
|
|
63
|
+
|
|
64
|
+
For example:
|
|
65
|
+
|
|
66
|
+
```yml
|
|
67
|
+
version: "3.8"
|
|
68
|
+
|
|
69
|
+
volumes:
|
|
70
|
+
postgres-data:
|
|
71
|
+
|
|
72
|
+
services:
|
|
73
|
+
app:
|
|
74
|
+
build:
|
|
75
|
+
context: .
|
|
76
|
+
dockerfile: Dockerfile
|
|
77
|
+
env_file:
|
|
78
|
+
- .env
|
|
79
|
+
|
|
80
|
+
volumes:
|
|
81
|
+
- ../..:/workspaces:cached
|
|
82
|
+
|
|
83
|
+
# Overrides default command so things don't shut down after the process ends.
|
|
84
|
+
command: sleep infinity
|
|
85
|
+
|
|
86
|
+
db:
|
|
87
|
+
image: postgres:latest
|
|
88
|
+
restart: unless-stopped
|
|
89
|
+
volumes:
|
|
90
|
+
- postgres-data:/var/lib/postgresql/data
|
|
91
|
+
env_file:
|
|
92
|
+
- .env
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
This config runs the dev container (app), and the backend database (db).
|
package/bin/staklink.cjs
ADDED