File tree Expand file tree Collapse file tree 3 files changed +44
-8
lines changed Expand file tree Collapse file tree 3 files changed +44
-8
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish to NPM
2
+
3
+ on :
4
+ release :
5
+ types : [published]
6
+ workflow_dispatch :
7
+
8
+ jobs :
9
+ publish :
10
+ runs-on : ubuntu-latest
11
+
12
+ steps :
13
+ - uses : actions/checkout@v4
14
+
15
+ - name : Use Node.js
16
+ uses : actions/setup-node@v4
17
+ with :
18
+ node-version : " 20.x"
19
+ registry-url : " https://registry.npmjs.org"
20
+
21
+ - name : Determine release tag
22
+ id : release_tag
23
+ run : |
24
+ if [[ "${{ github.ref }}" == *"-rc"* ]] || [[ "${{ github.ref }}" == *"-RC"* ]]; then
25
+ echo "tag=next" >> "$GITHUB_OUTPUT"
26
+ else
27
+ echo "tag=latest" >> "$GITHUB_OUTPUT"
28
+ fi
29
+
30
+ - name : Install dependencies and build
31
+ run : |
32
+ npm install
33
+ npm run build
34
+
35
+ - name : Publish
36
+ run : npm publish --tag ${{ steps.release_tag.outputs.tag }}
37
+ env :
38
+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
Original file line number Diff line number Diff line change @@ -32,15 +32,15 @@ Operating system gateway for remote serverless environments. Synapse provides a
32
32
## Installation
33
33
34
34
``` bash
35
- npm install synapse
35
+ npm install @appwrite.io/ synapse
36
36
```
37
37
38
38
## Usage
39
39
40
40
### Basic Setup
41
41
42
42
``` typescript
43
- import { Synapse , Terminal } from " synapse" ;
43
+ import { Synapse , Terminal } from " @appwrite.io/ synapse" ;
44
44
45
45
// Initialize Synapse for WebSocket communication
46
46
const synapse = new Synapse ();
@@ -56,15 +56,15 @@ const terminal = new Terminal(synapse);
56
56
57
57
``` typescript
58
58
// Send commands to the terminal
59
- terminal .write (" ls -la" );
59
+ terminal .createCommand (" ls -la" );
60
60
61
61
// Handle terminal output
62
62
terminal .onData ((data ) => {
63
63
console .log (" Terminal output:" , data );
64
64
});
65
65
66
66
// Resize terminal
67
- terminal .resize (80 , 24 );
67
+ terminal .updateSize (80 , 24 );
68
68
69
69
// Kill terminal
70
70
terminal .kill ();
Original file line number Diff line number Diff line change 1
1
{
2
- "name" : " synapse" ,
2
+ "name" : " @appwrite.io/ synapse" ,
3
3
"version" : " 0.1.0" ,
4
4
"description" : " Operating system gateway for remote serverless environments" ,
5
5
"main" : " dist/index.js" ,
14
14
"test:coverage" : " jest --coverage" ,
15
15
"lint" : " eslint src/**/*.ts" ,
16
16
"format" : " prettier --write ." ,
17
- "prepare" : " npm run build" ,
18
- "prepublishOnly" : " npm test && npm run lint"
17
+ "prepare" : " npm run build"
19
18
},
20
19
"repository" : {
21
20
"type" : " git" ,
22
21
"url" : " git+https://github.com/appwrite/synapse.git"
23
22
},
24
- "author" : " " ,
25
23
"license" : " MIT" ,
26
24
"dependencies" : {
27
25
"node-pty" : " ^1.0.0" ,
You can’t perform that action at this time.
0 commit comments