raycast-rsync-extension 1.0.1
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/.eslintrc.js +18 -0
- package/.github/PULL_REQUEST_TEMPLATE.md +14 -0
- package/.github/dependabot.yml +35 -0
- package/.github/workflows/ci.yml +105 -0
- package/.github/workflows/publish.yml +269 -0
- package/.github/workflows/update-copyright-year.yml +70 -0
- package/CHANGELOG.md +7 -0
- package/LICENSE +21 -0
- package/README.md +81 -0
- package/assets/icon.png +0 -0
- package/eslint.config.js +23 -0
- package/metadata/browse-remote-path.png +0 -0
- package/metadata/browse-remote.png +0 -0
- package/metadata/download-local-path.png +0 -0
- package/metadata/download-remote-path.png +0 -0
- package/metadata/extension.png +0 -0
- package/metadata/upload-local-path.png +0 -0
- package/metadata/upload-remote-path.png +0 -0
- package/metadata/upload-search-host.png +0 -0
- package/package.json +93 -0
- package/src/__mocks__/raycast-api.ts +84 -0
- package/src/browse.tsx +378 -0
- package/src/components/FileList.test.tsx +73 -0
- package/src/components/FileList.tsx +61 -0
- package/src/download.tsx +353 -0
- package/src/e2e/browse.e2e.test.ts +295 -0
- package/src/e2e/download.e2e.test.ts +193 -0
- package/src/e2e/error-handling.e2e.test.ts +292 -0
- package/src/e2e/rsync-options.e2e.test.ts +348 -0
- package/src/e2e/upload.e2e.test.ts +207 -0
- package/src/index.tsx +21 -0
- package/src/test-setup.ts +1 -0
- package/src/types/server.ts +60 -0
- package/src/upload.tsx +404 -0
- package/src/utils/__tests__/sshConfig.test.ts +352 -0
- package/src/utils/__tests__/validation.test.ts +139 -0
- package/src/utils/preferences.ts +24 -0
- package/src/utils/rsync.test.ts +490 -0
- package/src/utils/rsync.ts +517 -0
- package/src/utils/shellEscape.test.ts +98 -0
- package/src/utils/shellEscape.ts +36 -0
- package/src/utils/ssh.test.ts +209 -0
- package/src/utils/ssh.ts +187 -0
- package/src/utils/sshConfig.test.ts +191 -0
- package/src/utils/sshConfig.ts +212 -0
- package/src/utils/validation.test.ts +224 -0
- package/src/utils/validation.ts +115 -0
- package/tsconfig.json +27 -0
- package/vitest.config.ts +8 -0
package/.eslintrc.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
extends: "@raycast",
|
|
3
|
+
overrides: [
|
|
4
|
+
{
|
|
5
|
+
files: ["**/*.test.ts", "**/__mocks__/**", "**/__tests__/**"],
|
|
6
|
+
rules: {
|
|
7
|
+
"@typescript-eslint/no-explicit-any": "off",
|
|
8
|
+
"@typescript-eslint/no-unused-vars": [
|
|
9
|
+
"error",
|
|
10
|
+
{
|
|
11
|
+
argsIgnorePattern: "^_",
|
|
12
|
+
varsIgnorePattern: "^_",
|
|
13
|
+
},
|
|
14
|
+
],
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
],
|
|
18
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
## Type of changes
|
|
2
|
+
|
|
3
|
+
- Feature/Fix/Docs/Refactor/CI/Test/Chore
|
|
4
|
+
|
|
5
|
+
## Purpose
|
|
6
|
+
|
|
7
|
+
- Add XXX
|
|
8
|
+
- Resolve issue #XXX
|
|
9
|
+
|
|
10
|
+
<!-- Provide a brief description of the changes made in this pull request. -->
|
|
11
|
+
|
|
12
|
+
## Additional Information
|
|
13
|
+
|
|
14
|
+
<!-- Optional: Add any other information that would be helpful for the reviewer. Like detail spec, decisions, trade-offs, links, etc. -->
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
# Enable version updates for npm (works with pnpm)
|
|
4
|
+
- package-ecosystem: "npm"
|
|
5
|
+
directory: "/"
|
|
6
|
+
schedule:
|
|
7
|
+
interval: "weekly"
|
|
8
|
+
day: "friday"
|
|
9
|
+
time: "09:00"
|
|
10
|
+
open-pull-requests-limit: 5
|
|
11
|
+
labels:
|
|
12
|
+
- "dependencies"
|
|
13
|
+
commit-message:
|
|
14
|
+
prefix: "chore(deps):"
|
|
15
|
+
include: "scope"
|
|
16
|
+
# Group updates to reduce PR noise
|
|
17
|
+
groups:
|
|
18
|
+
production-dependencies:
|
|
19
|
+
dependency-type: "production"
|
|
20
|
+
development-dependencies:
|
|
21
|
+
dependency-type: "development"
|
|
22
|
+
|
|
23
|
+
# Enable version updates for GitHub Actions
|
|
24
|
+
- package-ecosystem: "github-actions"
|
|
25
|
+
directory: "/"
|
|
26
|
+
schedule:
|
|
27
|
+
interval: "weekly"
|
|
28
|
+
day: "friday"
|
|
29
|
+
time: "09:00"
|
|
30
|
+
open-pull-requests-limit: 5
|
|
31
|
+
labels:
|
|
32
|
+
- "github-actions"
|
|
33
|
+
commit-message:
|
|
34
|
+
prefix: "ci"
|
|
35
|
+
include: "scope"
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
name: CI Checks
|
|
2
|
+
|
|
3
|
+
permissions:
|
|
4
|
+
contents: read
|
|
5
|
+
pull-requests: read
|
|
6
|
+
|
|
7
|
+
on:
|
|
8
|
+
push:
|
|
9
|
+
pull_request:
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
lint:
|
|
13
|
+
name: Lint
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- name: Checkout
|
|
17
|
+
uses: actions/checkout@v6
|
|
18
|
+
|
|
19
|
+
- name: Setup Node.js
|
|
20
|
+
uses: actions/setup-node@v6
|
|
21
|
+
with:
|
|
22
|
+
node-version: 20
|
|
23
|
+
cache: npm
|
|
24
|
+
|
|
25
|
+
- name: Install dependencies
|
|
26
|
+
run: npm ci
|
|
27
|
+
|
|
28
|
+
- name: Run ESLint
|
|
29
|
+
run: npm run lint
|
|
30
|
+
|
|
31
|
+
typecheck:
|
|
32
|
+
name: Type Check
|
|
33
|
+
runs-on: ubuntu-latest
|
|
34
|
+
steps:
|
|
35
|
+
- name: Checkout
|
|
36
|
+
uses: actions/checkout@v6
|
|
37
|
+
|
|
38
|
+
- name: Setup Node.js
|
|
39
|
+
uses: actions/setup-node@v6
|
|
40
|
+
with:
|
|
41
|
+
node-version: 20
|
|
42
|
+
cache: npm
|
|
43
|
+
|
|
44
|
+
- name: Install dependencies
|
|
45
|
+
run: npm ci
|
|
46
|
+
|
|
47
|
+
- name: Run TypeScript type check
|
|
48
|
+
run: npx tsc --noEmit
|
|
49
|
+
|
|
50
|
+
format:
|
|
51
|
+
name: Format
|
|
52
|
+
runs-on: ubuntu-latest
|
|
53
|
+
steps:
|
|
54
|
+
- name: Checkout
|
|
55
|
+
uses: actions/checkout@v6
|
|
56
|
+
|
|
57
|
+
- name: Setup Node.js
|
|
58
|
+
uses: actions/setup-node@v6
|
|
59
|
+
with:
|
|
60
|
+
node-version: 20
|
|
61
|
+
cache: npm
|
|
62
|
+
|
|
63
|
+
- name: Install dependencies
|
|
64
|
+
run: npm ci
|
|
65
|
+
|
|
66
|
+
- name: Run Prettier
|
|
67
|
+
run: npm run format
|
|
68
|
+
|
|
69
|
+
test:
|
|
70
|
+
name: Test
|
|
71
|
+
runs-on: ubuntu-latest
|
|
72
|
+
steps:
|
|
73
|
+
- name: Checkout
|
|
74
|
+
uses: actions/checkout@v6
|
|
75
|
+
|
|
76
|
+
- name: Setup Node.js
|
|
77
|
+
uses: actions/setup-node@v6
|
|
78
|
+
with:
|
|
79
|
+
node-version: 20
|
|
80
|
+
cache: npm
|
|
81
|
+
|
|
82
|
+
- name: Install dependencies
|
|
83
|
+
run: npm ci
|
|
84
|
+
|
|
85
|
+
- name: Run Tests
|
|
86
|
+
run: npm run test
|
|
87
|
+
|
|
88
|
+
build:
|
|
89
|
+
name: Build
|
|
90
|
+
runs-on: ubuntu-latest
|
|
91
|
+
steps:
|
|
92
|
+
- name: Checkout
|
|
93
|
+
uses: actions/checkout@v6
|
|
94
|
+
|
|
95
|
+
- name: Setup Node.js
|
|
96
|
+
uses: actions/setup-node@v6
|
|
97
|
+
with:
|
|
98
|
+
node-version: 20
|
|
99
|
+
cache: npm
|
|
100
|
+
|
|
101
|
+
- name: Install dependencies
|
|
102
|
+
run: npm ci
|
|
103
|
+
|
|
104
|
+
- name: Build project
|
|
105
|
+
run: npm run build
|
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
name: Publish to npmjs & GitHub Packages
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
paths:
|
|
8
|
+
- "package.json"
|
|
9
|
+
- "pnpm-lock.yaml"
|
|
10
|
+
- "vite.config.js"
|
|
11
|
+
- "index.html"
|
|
12
|
+
- "scripts/**"
|
|
13
|
+
- "src/**"
|
|
14
|
+
- ".npmrc"
|
|
15
|
+
release:
|
|
16
|
+
types: [created]
|
|
17
|
+
workflow_dispatch:
|
|
18
|
+
|
|
19
|
+
jobs:
|
|
20
|
+
publish:
|
|
21
|
+
runs-on: ubuntu-latest
|
|
22
|
+
permissions:
|
|
23
|
+
contents: write
|
|
24
|
+
packages: write
|
|
25
|
+
id-token: write
|
|
26
|
+
steps:
|
|
27
|
+
- name: Checkout code
|
|
28
|
+
uses: actions/checkout@v6
|
|
29
|
+
with:
|
|
30
|
+
fetch-depth: 0
|
|
31
|
+
|
|
32
|
+
- name: Setup Node.js
|
|
33
|
+
uses: actions/setup-node@v6
|
|
34
|
+
with:
|
|
35
|
+
node-version: "20"
|
|
36
|
+
cache: "npm"
|
|
37
|
+
|
|
38
|
+
- name: Install dependencies
|
|
39
|
+
run: npm ci
|
|
40
|
+
|
|
41
|
+
- name: Get package version
|
|
42
|
+
id: package-version
|
|
43
|
+
run: |
|
|
44
|
+
VERSION=$(node -p "require('./package.json').version")
|
|
45
|
+
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
|
46
|
+
echo "Current package version: $VERSION"
|
|
47
|
+
|
|
48
|
+
- name: Get package name
|
|
49
|
+
id: package-name
|
|
50
|
+
run: |
|
|
51
|
+
NAME=$(node -p "require('./package.json').name")
|
|
52
|
+
if [[ "$NAME" == *@*/* ]]; then
|
|
53
|
+
SCOPE="${NAME%%/*}"
|
|
54
|
+
else
|
|
55
|
+
SCOPE=""
|
|
56
|
+
fi
|
|
57
|
+
echo "name=$NAME" >> $GITHUB_OUTPUT
|
|
58
|
+
echo "scope=$SCOPE" >> $GITHUB_OUTPUT
|
|
59
|
+
echo "Current package name: $NAME"
|
|
60
|
+
if [ -z "$SCOPE" ]; then
|
|
61
|
+
echo "Package scope: (none - unscoped package)"
|
|
62
|
+
else
|
|
63
|
+
echo "Package scope: $SCOPE"
|
|
64
|
+
fi
|
|
65
|
+
|
|
66
|
+
- name: Check if version exists on npmjs
|
|
67
|
+
id: check-npmjs
|
|
68
|
+
run: |
|
|
69
|
+
VERSION=${{ steps.package-version.outputs.version }}
|
|
70
|
+
PACKAGE_NAME="${{ steps.package-name.outputs.name }}"
|
|
71
|
+
if npm view "$PACKAGE_NAME@$VERSION" version --registry=https://registry.npmjs.org >/dev/null 2>&1; then
|
|
72
|
+
echo "exists=true" >> $GITHUB_OUTPUT
|
|
73
|
+
echo "Version $VERSION already exists on npmjs, will skip npmjs publish"
|
|
74
|
+
else
|
|
75
|
+
echo "exists=false" >> $GITHUB_OUTPUT
|
|
76
|
+
echo "Version $VERSION is new on npmjs, will publish"
|
|
77
|
+
fi
|
|
78
|
+
continue-on-error: true
|
|
79
|
+
|
|
80
|
+
- name: Check if version exists on GitHub Packages
|
|
81
|
+
id: check-github
|
|
82
|
+
run: |
|
|
83
|
+
VERSION=${{ steps.package-version.outputs.version }}
|
|
84
|
+
PACKAGE_NAME="${{ steps.package-name.outputs.name }}"
|
|
85
|
+
SCOPE="${{ steps.package-name.outputs.scope }}"
|
|
86
|
+
|
|
87
|
+
if [ -z "$SCOPE" ]; then
|
|
88
|
+
echo "Package is unscoped; GitHub Packages publish requires a scope. Skipping GitHub Packages checks."
|
|
89
|
+
echo "exists=true" >> $GITHUB_OUTPUT
|
|
90
|
+
exit 0
|
|
91
|
+
fi
|
|
92
|
+
|
|
93
|
+
npm config set ${SCOPE}:registry https://npm.pkg.github.com
|
|
94
|
+
npm config set //npm.pkg.github.com/:_authToken ${{ secrets.GITHUB_TOKEN }}
|
|
95
|
+
if npm view "$PACKAGE_NAME@$VERSION" version --registry=https://npm.pkg.github.com >/dev/null 2>&1; then
|
|
96
|
+
echo "exists=true" >> $GITHUB_OUTPUT
|
|
97
|
+
echo "Version $VERSION already exists on GitHub Packages, will skip GitHub Packages publish"
|
|
98
|
+
else
|
|
99
|
+
echo "exists=false" >> $GITHUB_OUTPUT
|
|
100
|
+
echo "Version $VERSION is new on GitHub Packages, will publish"
|
|
101
|
+
fi
|
|
102
|
+
continue-on-error: true
|
|
103
|
+
|
|
104
|
+
- name: Verify package
|
|
105
|
+
if: steps.check-npmjs.outputs.exists == 'false' || steps.check-github.outputs.exists == 'false'
|
|
106
|
+
run: npm pack --dry-run
|
|
107
|
+
|
|
108
|
+
# 1) Publish to npmjs
|
|
109
|
+
- name: Publish to npmjs
|
|
110
|
+
if: steps.check-npmjs.outputs.exists == 'false'
|
|
111
|
+
id: publish-npmjs
|
|
112
|
+
run: |
|
|
113
|
+
PACKAGE_NAME="${{ steps.package-name.outputs.name }}"
|
|
114
|
+
npm config set registry https://registry.npmjs.org
|
|
115
|
+
npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
|
|
116
|
+
npm publish --access public || {
|
|
117
|
+
if npm view "$PACKAGE_NAME@${{ steps.package-version.outputs.version }}" version --registry=https://registry.npmjs.org >/dev/null 2>&1; then
|
|
118
|
+
echo "Version already exists, skipping publish"
|
|
119
|
+
exit 0
|
|
120
|
+
else
|
|
121
|
+
echo "Publish failed for unknown reason"
|
|
122
|
+
exit 1
|
|
123
|
+
fi
|
|
124
|
+
}
|
|
125
|
+
env:
|
|
126
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
127
|
+
continue-on-error: true
|
|
128
|
+
|
|
129
|
+
# 2) Publish to GitHub Packages
|
|
130
|
+
- name: Publish to GitHub Packages
|
|
131
|
+
if: steps.check-github.outputs.exists == 'false'
|
|
132
|
+
id: publish-github
|
|
133
|
+
run: |
|
|
134
|
+
PACKAGE_NAME="${{ steps.package-name.outputs.name }}"
|
|
135
|
+
SCOPE="${{ steps.package-name.outputs.scope }}"
|
|
136
|
+
npm config set registry https://npm.pkg.github.com
|
|
137
|
+
npm config set ${SCOPE}:registry https://npm.pkg.github.com
|
|
138
|
+
npm config set //npm.pkg.github.com/:_authToken ${{ secrets.GITHUB_TOKEN }}
|
|
139
|
+
npm publish || {
|
|
140
|
+
if npm view "$PACKAGE_NAME@${{ steps.package-version.outputs.version }}" version --registry=https://npm.pkg.github.com >/dev/null 2>&1; then
|
|
141
|
+
echo "Version already exists, skipping publish"
|
|
142
|
+
exit 0
|
|
143
|
+
else
|
|
144
|
+
echo "Publish failed for unknown reason"
|
|
145
|
+
exit 1
|
|
146
|
+
fi
|
|
147
|
+
}
|
|
148
|
+
env:
|
|
149
|
+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
150
|
+
continue-on-error: true
|
|
151
|
+
|
|
152
|
+
- name: Check if release should be created
|
|
153
|
+
id: should-create-release
|
|
154
|
+
run: |
|
|
155
|
+
NPMJS_PUBLISHED=false
|
|
156
|
+
GITHUB_PUBLISHED=false
|
|
157
|
+
NPMJS_SKIPPED=false
|
|
158
|
+
GITHUB_SKIPPED=false
|
|
159
|
+
|
|
160
|
+
# Check if npmjs was published in this run
|
|
161
|
+
if [ "${{ steps.check-npmjs.outputs.exists }}" == "false" ] && [ "${{ steps.publish-npmjs.outcome }}" == "success" ]; then
|
|
162
|
+
NPMJS_PUBLISHED=true
|
|
163
|
+
elif [ "${{ steps.check-npmjs.outputs.exists }}" == "true" ]; then
|
|
164
|
+
NPMJS_SKIPPED=true
|
|
165
|
+
fi
|
|
166
|
+
|
|
167
|
+
# Check if GitHub Packages was published in this run
|
|
168
|
+
if [ "${{ steps.check-github.outputs.exists }}" == "false" ] && [ "${{ steps.publish-github.outcome }}" == "success" ]; then
|
|
169
|
+
GITHUB_PUBLISHED=true
|
|
170
|
+
elif [ "${{ steps.check-github.outputs.exists }}" == "true" ]; then
|
|
171
|
+
GITHUB_SKIPPED=true
|
|
172
|
+
fi
|
|
173
|
+
|
|
174
|
+
# Create release if:
|
|
175
|
+
# 1. Any registry was published in this run, OR
|
|
176
|
+
# 2. GitHub Packages was published (even if npmjs was skipped because it already exists)
|
|
177
|
+
if [ "$NPMJS_PUBLISHED" == "true" ] || [ "$GITHUB_PUBLISHED" == "true" ]; then
|
|
178
|
+
echo "should_create=true" >> $GITHUB_OUTPUT
|
|
179
|
+
echo "Should create release: npmjs_published=$NPMJS_PUBLISHED, github_published=$GITHUB_PUBLISHED, npmjs_skipped=$NPMJS_SKIPPED, github_skipped=$GITHUB_SKIPPED"
|
|
180
|
+
else
|
|
181
|
+
echo "should_create=false" >> $GITHUB_OUTPUT
|
|
182
|
+
echo "Skipping release creation - no new publishes (both may already exist)"
|
|
183
|
+
fi
|
|
184
|
+
|
|
185
|
+
- name: Create GitHub Release
|
|
186
|
+
if: steps.should-create-release.outputs.should_create == 'true'
|
|
187
|
+
uses: softprops/action-gh-release@v2
|
|
188
|
+
with:
|
|
189
|
+
tag_name: v${{ steps.package-version.outputs.version }}
|
|
190
|
+
name: v${{ steps.package-version.outputs.version }}
|
|
191
|
+
prerelease: ${{ contains(steps.package-version.outputs.version, 'beta') || contains(steps.package-version.outputs.version, 'alpha') || contains(steps.package-version.outputs.version, 'rc') }}
|
|
192
|
+
body: |
|
|
193
|
+
## ${{ steps.package-name.outputs.name }}@${{ steps.package-version.outputs.version }}
|
|
194
|
+
|
|
195
|
+
**Published to multiple registries:**
|
|
196
|
+
|
|
197
|
+
- **npmjs.com**: https://www.npmjs.com/package/${{ steps.package-name.outputs.name }}
|
|
198
|
+
- **GitHub Packages**: https://github.com/${{ github.repository }}/packages
|
|
199
|
+
|
|
200
|
+
*Note: If a registry already had this version, it was skipped. Only missing registries were published.*
|
|
201
|
+
|
|
202
|
+
### Installation
|
|
203
|
+
|
|
204
|
+
**From npmjs (default):**
|
|
205
|
+
|
|
206
|
+
```bash
|
|
207
|
+
npm install -g ${{ steps.package-name.outputs.name }}
|
|
208
|
+
|
|
209
|
+
# or
|
|
210
|
+
|
|
211
|
+
pnpm install -g ${{ steps.package-name.outputs.name }}
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
**From GitHub Packages:**
|
|
215
|
+
|
|
216
|
+
First, create or update your `.npmrc` file:
|
|
217
|
+
|
|
218
|
+
```ini
|
|
219
|
+
${{ steps.package-name.outputs.scope }}:registry=https://npm.pkg.github.com
|
|
220
|
+
//npm.pkg.github.com/:_authToken=YOUR_GITHUB_TOKEN
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
Then install:
|
|
224
|
+
|
|
225
|
+
```bash
|
|
226
|
+
npm install -g ${{ steps.package-name.outputs.name }}
|
|
227
|
+
|
|
228
|
+
# or
|
|
229
|
+
|
|
230
|
+
pnpm install -g ${{ steps.package-name.outputs.name }}
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
### Usage
|
|
234
|
+
|
|
235
|
+
```bash
|
|
236
|
+
intern-corner-scheduler
|
|
237
|
+
```
|
|
238
|
+
generate_release_notes: true
|
|
239
|
+
draft: false
|
|
240
|
+
env:
|
|
241
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
242
|
+
|
|
243
|
+
- name: Publish summary
|
|
244
|
+
if: always()
|
|
245
|
+
run: |
|
|
246
|
+
echo "## Publish Summary"
|
|
247
|
+
echo "### npmjs"
|
|
248
|
+
if [ "${{ steps.check-npmjs.outputs.exists }}" == "true" ]; then
|
|
249
|
+
echo "Skipped - version already exists"
|
|
250
|
+
elif [ "${{ steps.publish-npmjs.outcome }}" == "success" ]; then
|
|
251
|
+
echo "Published successfully"
|
|
252
|
+
elif [ "${{ steps.publish-npmjs.outcome }}" == "failure" ]; then
|
|
253
|
+
echo "Failed to publish"
|
|
254
|
+
else
|
|
255
|
+
echo "Skipped - not attempted"
|
|
256
|
+
fi
|
|
257
|
+
echo ""
|
|
258
|
+
echo "### GitHub Packages"
|
|
259
|
+
if [ -z "${{ steps.package-name.outputs.scope }}" ]; then
|
|
260
|
+
echo "Skipped - package is unscoped (GitHub Packages requires scope)"
|
|
261
|
+
elif [ "${{ steps.check-github.outputs.exists }}" == "true" ]; then
|
|
262
|
+
echo "Skipped - version already exists"
|
|
263
|
+
elif [ "${{ steps.publish-github.outcome }}" == "success" ]; then
|
|
264
|
+
echo "Published successfully"
|
|
265
|
+
elif [ "${{ steps.publish-github.outcome }}" == "failure" ]; then
|
|
266
|
+
echo "Failed to publish"
|
|
267
|
+
else
|
|
268
|
+
echo "Skipped - not attempted"
|
|
269
|
+
fi
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
name: Update Copyright Year
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
schedule:
|
|
5
|
+
# Run on January 1st at 00:00 UTC every year
|
|
6
|
+
- cron: "0 0 1 1 *"
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
update-year:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
permissions:
|
|
13
|
+
contents: write
|
|
14
|
+
steps:
|
|
15
|
+
- name: Checkout code
|
|
16
|
+
uses: actions/checkout@v6
|
|
17
|
+
with:
|
|
18
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
19
|
+
persist-credentials: true
|
|
20
|
+
|
|
21
|
+
- name: Get current year
|
|
22
|
+
id: year
|
|
23
|
+
run: |
|
|
24
|
+
YEAR=$(date +%Y)
|
|
25
|
+
echo "year=$YEAR" >> $GITHUB_OUTPUT
|
|
26
|
+
echo "Current year: $YEAR"
|
|
27
|
+
|
|
28
|
+
- name: Update LICENSE file
|
|
29
|
+
run: |
|
|
30
|
+
YEAR="${{ steps.year.outputs.year }}"
|
|
31
|
+
sed -i "s/Copyright (c) [0-9]\{4\}/Copyright (c) $YEAR/" LICENSE
|
|
32
|
+
echo "Updated LICENSE file (if needed)"
|
|
33
|
+
|
|
34
|
+
- name: Update Footer component (if present)
|
|
35
|
+
run: |
|
|
36
|
+
YEAR="${{ steps.year.outputs.year }}"
|
|
37
|
+
TARGET=""
|
|
38
|
+
if [ -f src/components/Footer.jsx ]; then
|
|
39
|
+
TARGET="src/components/Footer.jsx"
|
|
40
|
+
elif [ -f src/components/Footer.tsx ]; then
|
|
41
|
+
TARGET="src/components/Footer.tsx"
|
|
42
|
+
fi
|
|
43
|
+
|
|
44
|
+
if [ -n "$TARGET" ]; then
|
|
45
|
+
sed -i "s/\\(Round-Table Scheduler © \\)[0-9]\\{4\\}/\\1$YEAR/" "$TARGET"
|
|
46
|
+
echo "Updated $TARGET file"
|
|
47
|
+
else
|
|
48
|
+
echo "Footer component not found; skipping footer update"
|
|
49
|
+
fi
|
|
50
|
+
|
|
51
|
+
- name: Check for changes
|
|
52
|
+
id: changes
|
|
53
|
+
run: |
|
|
54
|
+
if git diff --quiet; then
|
|
55
|
+
echo "changed=false" >> $GITHUB_OUTPUT
|
|
56
|
+
echo "No changes detected"
|
|
57
|
+
else
|
|
58
|
+
echo "changed=true" >> $GITHUB_OUTPUT
|
|
59
|
+
echo "Changes detected:"
|
|
60
|
+
git status --short
|
|
61
|
+
fi
|
|
62
|
+
|
|
63
|
+
- name: Commit and push changes
|
|
64
|
+
if: steps.changes.outputs.changed == 'true'
|
|
65
|
+
run: |
|
|
66
|
+
git config --local user.email "action@github.com"
|
|
67
|
+
git config --local user.name "GitHub Action"
|
|
68
|
+
git add LICENSE src/components/Footer.jsx src/components/Footer.tsx 2>/dev/null || true
|
|
69
|
+
git commit -m "chore: update copyright year to ${{ steps.year.outputs.year }}"
|
|
70
|
+
git push
|
package/CHANGELOG.md
ADDED
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 dytsou
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Raycast Rsync Extension
|
|
2
|
+
|
|
3
|
+
A Raycast extension for transferring files between local and remote servers using rsync with SSH config integration.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- Upload files from local system to remote servers
|
|
8
|
+
- Download files from remote servers to local system
|
|
9
|
+
- Automatic SSH config parsing from ~/.ssh/config
|
|
10
|
+
- Support for recursive directory transfers
|
|
11
|
+
- User-friendly interface with searchable host list
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
1. Clone this repository
|
|
16
|
+
2. Run `npm install` to install dependencies
|
|
17
|
+
3. Run `npm run dev` to start development mode
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
### Upload Files
|
|
22
|
+
|
|
23
|
+
1. Open Raycast and search for "Upload Files via Rsync"
|
|
24
|
+
2. Select a host from your SSH config
|
|
25
|
+
3. Choose local files to upload
|
|
26
|
+
4. Enter the remote destination path
|
|
27
|
+
5. Confirm to start the transfer
|
|
28
|
+
|
|
29
|
+
### Download Files
|
|
30
|
+
|
|
31
|
+
1. Open Raycast and search for "Download Files via Rsync"
|
|
32
|
+
2. Select a host from your SSH config
|
|
33
|
+
3. Enter the remote file path
|
|
34
|
+
4. Choose local destination directory
|
|
35
|
+
5. Confirm to start the transfer
|
|
36
|
+
|
|
37
|
+
## Requirements
|
|
38
|
+
|
|
39
|
+
- SSH config file at ~/.ssh/config with configured hosts
|
|
40
|
+
- SSH access to remote servers
|
|
41
|
+
- rsync installed (usually pre-installed on macOS and Linux)
|
|
42
|
+
- Raycast installed
|
|
43
|
+
|
|
44
|
+
## Development
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
# Install dependencies
|
|
48
|
+
npm install
|
|
49
|
+
|
|
50
|
+
# Start development mode
|
|
51
|
+
npm run dev
|
|
52
|
+
|
|
53
|
+
# Build for production
|
|
54
|
+
npm run build
|
|
55
|
+
|
|
56
|
+
# Lint code
|
|
57
|
+
npm run lint
|
|
58
|
+
|
|
59
|
+
# Fix linting issues
|
|
60
|
+
npm run fix-lint
|
|
61
|
+
|
|
62
|
+
# Run tests
|
|
63
|
+
npm run test
|
|
64
|
+
|
|
65
|
+
# Run tests in watch mode
|
|
66
|
+
npm run test:watch
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Testing
|
|
70
|
+
|
|
71
|
+
The project includes comprehensive test coverage using Vitest:
|
|
72
|
+
|
|
73
|
+
- Unit tests for utilities (SSH config parsing, validation, rsync command building)
|
|
74
|
+
- Component tests for UI components
|
|
75
|
+
- E2E tests for upload and download workflows
|
|
76
|
+
|
|
77
|
+
Run tests with `npm run test` or use `npm run test:watch` for development.
|
|
78
|
+
|
|
79
|
+
## License
|
|
80
|
+
|
|
81
|
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
package/assets/icon.png
ADDED
|
Binary file
|
package/eslint.config.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const raycastConfig = require("@raycast/eslint-config");
|
|
2
|
+
|
|
3
|
+
// Flatten in case any imported configs are arrays (e.g., prettier flat config)
|
|
4
|
+
const baseConfigs = raycastConfig.flatMap((config) =>
|
|
5
|
+
Array.isArray(config) ? config : [config]
|
|
6
|
+
);
|
|
7
|
+
|
|
8
|
+
module.exports = [
|
|
9
|
+
...baseConfigs,
|
|
10
|
+
{
|
|
11
|
+
files: ["**/*.test.ts", "**/__mocks__/**", "**/__tests__/**"],
|
|
12
|
+
rules: {
|
|
13
|
+
"@typescript-eslint/no-explicit-any": "off",
|
|
14
|
+
"@typescript-eslint/no-unused-vars": [
|
|
15
|
+
"error",
|
|
16
|
+
{
|
|
17
|
+
argsIgnorePattern: "^_",
|
|
18
|
+
varsIgnorePattern: "^_",
|
|
19
|
+
},
|
|
20
|
+
],
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
];
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|