dorky 2.4.0 → 3.0.0
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/.github/workflows/publish-extension.yml +46 -0
- package/README.md +27 -7
- package/extension/dorky-extension/.vscode/extensions.json +8 -0
- package/extension/dorky-extension/.vscode/launch.json +17 -0
- package/extension/dorky-extension/.vscode-test.mjs +5 -0
- package/extension/dorky-extension/.vscodeignore +10 -0
- package/extension/dorky-extension/CHANGELOG.md +9 -0
- package/extension/dorky-extension/README.md +106 -0
- package/extension/dorky-extension/eslint.config.mjs +25 -0
- package/extension/dorky-extension/extension.js +587 -0
- package/extension/dorky-extension/jsconfig.json +13 -0
- package/extension/dorky-extension/media/logo.svg +6 -0
- package/extension/dorky-extension/package-lock.json +8404 -0
- package/extension/dorky-extension/package.json +151 -0
- package/logo.svg +6 -0
- package/package.json +1 -1
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
name: "🧩 Publish VSCode Extension To Marketplace"
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
paths:
|
|
8
|
+
- "extension/dorky-extension/**"
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
publish:
|
|
12
|
+
name: 🧩 publish extension
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
steps:
|
|
15
|
+
- name: Checkout
|
|
16
|
+
uses: actions/checkout@v4
|
|
17
|
+
|
|
18
|
+
- name: Setup Node
|
|
19
|
+
uses: actions/setup-node@v4
|
|
20
|
+
with:
|
|
21
|
+
node-version: "24.x"
|
|
22
|
+
|
|
23
|
+
- name: Install dependencies
|
|
24
|
+
run: npm install
|
|
25
|
+
working-directory: extension/dorky-extension
|
|
26
|
+
|
|
27
|
+
- name: Lint
|
|
28
|
+
run: npm run lint
|
|
29
|
+
working-directory: extension/dorky-extension
|
|
30
|
+
|
|
31
|
+
- name: Get extension version
|
|
32
|
+
id: pkg
|
|
33
|
+
run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
|
|
34
|
+
working-directory: extension/dorky-extension
|
|
35
|
+
|
|
36
|
+
- name: Package extension
|
|
37
|
+
run: npx @vscode/vsce package
|
|
38
|
+
working-directory: extension/dorky-extension
|
|
39
|
+
|
|
40
|
+
- name: Publish to VS Code Marketplace
|
|
41
|
+
uses: HaaLeo/publish-vscode-extension@v1
|
|
42
|
+
with:
|
|
43
|
+
pat: ${{ secrets.VSCE_PAT }}
|
|
44
|
+
registryUrl: https://marketplace.visualstudio.com
|
|
45
|
+
extensionFile: extension/dorky-extension/dorky-extension-${{ steps.pkg.outputs.version }}.vsix
|
|
46
|
+
|
package/README.md
CHANGED
|
@@ -10,7 +10,11 @@
|
|
|
10
10
|
|
|
11
11
|
[`DevOps Records Keeper`](https://dorky.trishantpahwa.me/)
|
|
12
12
|
|
|
13
|
+

|
|
14
|
+
|
|
13
15
|
[](https://npmjs.com/package/dorky)
|
|
16
|
+
[](https://npmjs.com/package/dorky)
|
|
17
|
+
[](https://npmjs.com/package/dorky)
|
|
14
18
|
|
|
15
19
|
 `&& ` 
|
|
16
20
|
|
|
@@ -125,7 +129,7 @@ dorky --push
|
|
|
125
129
|
|
|
126
130
|
## Usage
|
|
127
131
|
|
|
128
|
-
### Initialize a Project
|
|
132
|
+
### Initialize a Project (`-i`)
|
|
129
133
|
|
|
130
134
|
```bash
|
|
131
135
|
# For AWS S3
|
|
@@ -141,7 +145,7 @@ This creates:
|
|
|
141
145
|
- `.dorkyignore` file for exclusion patterns
|
|
142
146
|
- Updates `.gitignore` to protect credentials
|
|
143
147
|
|
|
144
|
-
### List Files
|
|
148
|
+
### List Files (`-l`)
|
|
145
149
|
|
|
146
150
|
```bash
|
|
147
151
|
# List local files (shows what can be added)
|
|
@@ -151,7 +155,7 @@ dorky --list
|
|
|
151
155
|
dorky --list remote
|
|
152
156
|
```
|
|
153
157
|
|
|
154
|
-
### Add Files to Stage
|
|
158
|
+
### Add Files to Stage (`-a`)
|
|
155
159
|
|
|
156
160
|
```bash
|
|
157
161
|
# Add single file
|
|
@@ -164,7 +168,7 @@ dorky --add .env config.yml secrets.json
|
|
|
164
168
|
dorky --add .env.production .env.staging
|
|
165
169
|
```
|
|
166
170
|
|
|
167
|
-
### Remove Files from Stage
|
|
171
|
+
### Remove Files from Stage (`-r`)
|
|
168
172
|
|
|
169
173
|
```bash
|
|
170
174
|
# Remove single file
|
|
@@ -174,7 +178,7 @@ dorky --rm .env
|
|
|
174
178
|
dorky --rm .env config.yml
|
|
175
179
|
```
|
|
176
180
|
|
|
177
|
-
### Push Files to Storage
|
|
181
|
+
### Push Files to Storage (`-ph`)
|
|
178
182
|
|
|
179
183
|
```bash
|
|
180
184
|
# Push all staged files
|
|
@@ -185,9 +189,10 @@ This command:
|
|
|
185
189
|
|
|
186
190
|
- Uploads new files
|
|
187
191
|
- Updates modified files (based on hash comparison)
|
|
192
|
+
- Removes files from remote storage that were unstaged using `dorky --rm`
|
|
188
193
|
- Skips unchanged files
|
|
189
194
|
|
|
190
|
-
### Pull Files from Storage
|
|
195
|
+
### Pull Files from Storage (`-pl`)
|
|
191
196
|
|
|
192
197
|
```bash
|
|
193
198
|
# Pull all tracked files
|
|
@@ -200,6 +205,19 @@ This command:
|
|
|
200
205
|
- Creates necessary directories
|
|
201
206
|
- Overwrites local files
|
|
202
207
|
|
|
208
|
+
### Destroy Project (`-d`)
|
|
209
|
+
|
|
210
|
+
```bash
|
|
211
|
+
# Destroy project locally and remotely
|
|
212
|
+
dorky --destroy
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
This command:
|
|
216
|
+
|
|
217
|
+
- Deletes all tracked files from remote storage
|
|
218
|
+
- Removes local `.dorky/` directory and `.dorkyignore` file
|
|
219
|
+
- **Warning**: This action is irreversible for remote files.
|
|
220
|
+
|
|
203
221
|
## Configuration
|
|
204
222
|
|
|
205
223
|
### .dorkyignore
|
|
@@ -318,6 +336,8 @@ dorky --pull
|
|
|
318
336
|
- ✅ File hash validation to skip unchanged files
|
|
319
337
|
- ✅ Mime-type detection for file uploads
|
|
320
338
|
- ✅ Recursive folder creation on pull
|
|
339
|
+
- ✅ Destroy project and clean up remote files
|
|
340
|
+
- ✅ Auto-recovery of AWS credentials from environment variables
|
|
321
341
|
|
|
322
342
|
## How It Works
|
|
323
343
|
|
|
@@ -385,7 +405,7 @@ ISC License - see [LICENSE](LICENSE) file for details.
|
|
|
385
405
|
- [x] rm + push should delete file from remote storage (minor release)
|
|
386
406
|
- [x] Uninitialize dorky setup (Bug fix release)
|
|
387
407
|
- [ ] dorky --list remote --update should sync metadata according to remote (Minor release)
|
|
388
|
-
- [
|
|
408
|
+
- [x] Extension for VS Code to list and highlight them like git (Major release)
|
|
389
409
|
- [ ] MCP server (Minor release)
|
|
390
410
|
- [ ] Encryption of files (Minor release)
|
|
391
411
|
- [ ] Add stages for variables (Major release)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// A launch configuration that launches the extension inside a new window
|
|
2
|
+
// Use IntelliSense to learn about possible attributes.
|
|
3
|
+
// Hover to view descriptions of existing attributes.
|
|
4
|
+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
|
5
|
+
{
|
|
6
|
+
"version": "0.2.0",
|
|
7
|
+
"configurations": [
|
|
8
|
+
{
|
|
9
|
+
"name": "Run Extension",
|
|
10
|
+
"type": "extensionHost",
|
|
11
|
+
"request": "launch",
|
|
12
|
+
"args": [
|
|
13
|
+
"--extensionDevelopmentPath=${workspaceFolder}"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# dorky-extension
|
|
2
|
+
|
|
3
|
+
A VS Code extension for [dorky](https://dorky.trishantpahwa.me/) — DevOps Records Keeper. Manage sensitive project files (`.env`, API keys, config files) stored on AWS S3 or Google Drive directly from the VS Code sidebar.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **Sidebar panel** showing staged and uploaded files at a glance
|
|
8
|
+
- **Initialize** a dorky project with AWS S3 or Google Drive
|
|
9
|
+
- **Stage files** using a file picker dialog
|
|
10
|
+
- **Unstage files** with a single inline click in the tree
|
|
11
|
+
- **Push** staged files to remote storage
|
|
12
|
+
- **Pull** tracked files from remote storage
|
|
13
|
+
- **List remote** files in the output channel
|
|
14
|
+
- **Destroy** the project (removes remote files and local config)
|
|
15
|
+
- Context-aware toolbar — actions only appear when relevant
|
|
16
|
+
|
|
17
|
+
## Requirements
|
|
18
|
+
|
|
19
|
+
- A dorky-compatible storage backend: **AWS S3** or **Google Drive**
|
|
20
|
+
|
|
21
|
+
### AWS S3
|
|
22
|
+
|
|
23
|
+
Set up the following environment variables before initializing:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
export AWS_ACCESS_KEY="your-access-key"
|
|
27
|
+
export AWS_SECRET_KEY="your-secret-key"
|
|
28
|
+
export AWS_REGION="us-east-1"
|
|
29
|
+
export BUCKET_NAME="your-bucket-name"
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
The extension will prompt you to enter these values during initialization.
|
|
33
|
+
|
|
34
|
+
### Google Drive
|
|
35
|
+
|
|
36
|
+
Place your OAuth 2.0 credentials file at the workspace root before initializing:
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
your-project/
|
|
40
|
+
└── google-drive-credentials.json
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
A browser window will open for OAuth authentication when you initialize.
|
|
44
|
+
|
|
45
|
+
## Getting Started
|
|
46
|
+
|
|
47
|
+
1. Open your project folder in VS Code
|
|
48
|
+
2. Click the **Dorky** icon in the activity bar
|
|
49
|
+
3. Click **Initialize Project** in the welcome view
|
|
50
|
+
4. Select a storage backend (`aws` or `google-drive`) and follow the prompts
|
|
51
|
+
|
|
52
|
+
## Sidebar
|
|
53
|
+
|
|
54
|
+
The Dorky panel appears in the activity bar. Once initialized it shows:
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
DORKY FILES [+] [↑] [↓] [≡] [↺] [🗑]
|
|
58
|
+
aws storage
|
|
59
|
+
▼ Staged 2 file(s)
|
|
60
|
+
.env [−]
|
|
61
|
+
config.json [−]
|
|
62
|
+
▼ Uploaded 1 file(s)
|
|
63
|
+
.env
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Toolbar Actions
|
|
67
|
+
|
|
68
|
+
| Icon | Command | Description |
|
|
69
|
+
|------|---------|-------------|
|
|
70
|
+
| `+` | Add Files | Open file picker to stage files |
|
|
71
|
+
| `↑` | Push | Upload staged files to remote storage |
|
|
72
|
+
| `↓` | Pull | Download tracked files from remote storage |
|
|
73
|
+
| `≡` | List Remote | Show remote files in the Dorky output channel |
|
|
74
|
+
| `↺` | Refresh | Refresh the sidebar tree |
|
|
75
|
+
| `🗑` | Destroy Project | Delete remote files and local dorky config |
|
|
76
|
+
|
|
77
|
+
### Inline Actions
|
|
78
|
+
|
|
79
|
+
- Click `−` next to any staged file to instantly unstage it
|
|
80
|
+
|
|
81
|
+
## Workflow
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
Initialize → Add Files → Push → (share project) → Pull
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
1. **Initialize** — creates `.dorky/` with credentials and metadata, updates `.gitignore`
|
|
88
|
+
2. **Add** — stage files you want to track (file picker, multi-select)
|
|
89
|
+
3. **Push** — uploads new/changed files; removes files that were unstaged
|
|
90
|
+
4. **Pull** — downloads all tracked files on another machine
|
|
91
|
+
|
|
92
|
+
## Output
|
|
93
|
+
|
|
94
|
+
All operation logs appear in the **Dorky** output channel (`View → Output → Dorky`).
|
|
95
|
+
|
|
96
|
+
## Security
|
|
97
|
+
|
|
98
|
+
- `.dorky/credentials.json` is automatically added to `.gitignore`
|
|
99
|
+
- Credentials are stored locally in the `.dorky/` folder and never committed
|
|
100
|
+
- Google Drive tokens are refreshed automatically; re-authentication is triggered if the token is invalid
|
|
101
|
+
|
|
102
|
+
## Release Notes
|
|
103
|
+
|
|
104
|
+
### 0.0.1
|
|
105
|
+
|
|
106
|
+
Initial release — full sidebar UI with AWS S3 and Google Drive support.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import globals from "globals";
|
|
2
|
+
|
|
3
|
+
export default [{
|
|
4
|
+
files: ["**/*.js"],
|
|
5
|
+
languageOptions: {
|
|
6
|
+
globals: {
|
|
7
|
+
...globals.commonjs,
|
|
8
|
+
...globals.node,
|
|
9
|
+
...globals.mocha,
|
|
10
|
+
},
|
|
11
|
+
|
|
12
|
+
ecmaVersion: 2022,
|
|
13
|
+
sourceType: "module",
|
|
14
|
+
},
|
|
15
|
+
|
|
16
|
+
rules: {
|
|
17
|
+
"no-const-assign": "warn",
|
|
18
|
+
"no-this-before-super": "warn",
|
|
19
|
+
"no-undef": "warn",
|
|
20
|
+
"no-unreachable": "warn",
|
|
21
|
+
"no-unused-vars": "warn",
|
|
22
|
+
"constructor-super": "warn",
|
|
23
|
+
"valid-typeof": "warn",
|
|
24
|
+
},
|
|
25
|
+
}];
|