raycast-rsync-extension 1.0.3 → 1.0.6

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.
@@ -66,17 +66,20 @@ jobs:
66
66
  run: |
67
67
  VERSION=${{ steps.package-info.outputs.version }}
68
68
  PACKAGE_NAME="${{ steps.package-info.outputs.name }}"
69
+ OWNER="${{ github.repository_owner }}"
70
+ SCOPED_NAME="@${OWNER}/${PACKAGE_NAME}"
69
71
 
70
72
  # Set up GitHub Packages registry
71
73
  npm config set registry https://npm.pkg.github.com
72
74
  npm config set //npm.pkg.github.com/:_authToken ${{ secrets.GITHUB_TOKEN }}
73
75
 
74
- if npm view "$PACKAGE_NAME@$VERSION" version >/dev/null 2>&1; then
76
+ # Check if the scoped package version already exists
77
+ if npm view "${SCOPED_NAME}@${VERSION}" version >/dev/null 2>&1; then
75
78
  echo "exists=true" >> $GITHUB_OUTPUT
76
- echo "Version $VERSION already exists, skipping publish"
79
+ echo "Version ${VERSION} already exists for ${SCOPED_NAME}, skipping publish"
77
80
  else
78
81
  echo "exists=false" >> $GITHUB_OUTPUT
79
- echo "Version $VERSION is new, will publish"
82
+ echo "Version ${VERSION} is new for ${SCOPED_NAME}, will publish"
80
83
  fi
81
84
  continue-on-error: true
82
85
 
@@ -135,7 +138,7 @@ jobs:
135
138
  uses: softprops/action-gh-release@v2
136
139
  with:
137
140
  tag_name: v${{ steps.package-info.outputs.version }}
138
- name: Release v${{ steps.package-info.outputs.version }}
141
+ name: v${{ steps.package-info.outputs.version }}
139
142
  body: |
140
143
  ## ${{ steps.package-info.outputs.name }}@v${{ steps.package-info.outputs.version }}
141
144
 
package/metadata/1.png ADDED
Binary file
package/metadata/2.png ADDED
Binary file
package/metadata/3.png ADDED
Binary file
package/metadata/4.png ADDED
Binary file
package/metadata/5.png ADDED
Binary file
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://www.raycast.com/schemas/extension.json",
3
3
  "name": "raycast-rsync-extension",
4
- "version": "1.0.3",
4
+ "version": "1.0.6",
5
5
  "title": "Rsync File Transfer",
6
6
  "description": "Transfer files between local and remote servers using rsync with SSH config integration",
7
7
  "icon": "icon.png",
@@ -62,14 +62,16 @@
62
62
  ],
63
63
  "dependencies": {
64
64
  "@raycast/api": "^1.65.0",
65
- "@raycast/utils": "^1.19.1"
65
+ "@raycast/utils": "^2.2.2"
66
66
  },
67
67
  "devDependencies": {
68
68
  "@raycast/eslint-config": "^2.1.1",
69
- "@types/node": "^20.19.30",
69
+ "@typescript-eslint/eslint-plugin": "^8.55.0",
70
+ "@typescript-eslint/parser": "^8.55.0",
71
+ "@types/node": "^25.0.10",
70
72
  "@types/react": "19.0.10",
71
73
  "@vitest/ui": "^4.0.17",
72
- "eslint": "^9.39.2",
74
+ "eslint": "^9.0.0",
73
75
  "prettier": "^3.8.0",
74
76
  "react": "^19.0.0",
75
77
  "typescript": "^5.2.2",
@@ -79,10 +81,10 @@
79
81
  "@types/react": "19.0.10"
80
82
  },
81
83
  "scripts": {
82
- "build": "ray build -e dist",
83
- "dev": "ray develop",
84
- "fix-lint": "ray lint --fix",
85
- "lint": "ray lint",
84
+ "build": "npx ray build -e dist",
85
+ "dev": "npx ray develop",
86
+ "fix-lint": "npx ray lint --fix",
87
+ "lint": "npx ray lint",
86
88
  "test": "vitest --run",
87
89
  "test:watch": "vitest",
88
90
  "format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,css,md}\"",
package/src/browse.tsx CHANGED
@@ -142,14 +142,43 @@ function RemotePathForm({ hostConfig }: { hostConfig: SSHHostConfig }) {
142
142
  actions={
143
143
  <ActionPanel>
144
144
  <Action.SubmitForm title="Browse" onSubmit={handleSubmit} />
145
- <Action.Push
145
+ <Action
146
146
  title="Browse Directory"
147
- target={
148
- <RemoteFileListLoader
149
- hostConfig={hostConfig}
150
- remotePath={remotePath}
151
- />
152
- }
147
+ onAction={async () => {
148
+ const remotePathValue = remotePath.trim() || "~";
149
+
150
+ const remoteValidation = validateRemotePath(remotePathValue);
151
+ if (!remoteValidation.valid) {
152
+ setRemotePathError(remoteValidation.error);
153
+ await showToast({
154
+ style: Toast.Style.Failure,
155
+ title: "Invalid Remote Path",
156
+ message:
157
+ remoteValidation.error ||
158
+ "The remote path format is invalid",
159
+ });
160
+ return;
161
+ }
162
+
163
+ const hostValidation = validateHostConfig(hostConfig);
164
+ if (!hostValidation.valid) {
165
+ await showToast({
166
+ style: Toast.Style.Failure,
167
+ title: "Invalid Host Configuration",
168
+ message:
169
+ hostValidation.error ||
170
+ "The host configuration is incomplete or invalid",
171
+ });
172
+ return;
173
+ }
174
+
175
+ push(
176
+ <RemoteFileListLoader
177
+ hostConfig={hostConfig}
178
+ remotePath={remotePathValue}
179
+ />,
180
+ );
181
+ }}
153
182
  />
154
183
  </ActionPanel>
155
184
  }
package/src/download.tsx CHANGED
@@ -6,6 +6,7 @@ import {
6
6
  showToast,
7
7
  Toast,
8
8
  popToRoot,
9
+ useNavigation,
9
10
  } from "@raycast/api";
10
11
  import React, { useState, useEffect } from "react";
11
12
  import { parseSSHConfig } from "./utils/sshConfig";
@@ -99,17 +100,46 @@ export default function Command() {
99
100
  function RemotePathForm({ hostConfig }: { hostConfig: SSHHostConfig }) {
100
101
  const [remotePath, setRemotePath] = useState<string>("");
101
102
  const [remotePathError, setRemotePathError] = useState<string | undefined>();
103
+ const { push } = useNavigation();
104
+
105
+ async function handleSubmit(values: { remotePath: string }) {
106
+ const remotePathValue = values.remotePath.trim();
107
+
108
+ const remoteValidation = validateRemotePath(remotePathValue);
109
+ if (!remoteValidation.valid) {
110
+ console.error("Remote path validation failed:", remoteValidation.error);
111
+ setRemotePathError(remoteValidation.error);
112
+ await showToast({
113
+ style: Toast.Style.Failure,
114
+ title: "Invalid Remote Path",
115
+ message: remoteValidation.error || "The remote path format is invalid",
116
+ });
117
+ return;
118
+ }
119
+
120
+ const hostValidation = validateHostConfig(hostConfig);
121
+ if (!hostValidation.valid) {
122
+ console.error("Host config validation failed:", hostValidation.error);
123
+ await showToast({
124
+ style: Toast.Style.Failure,
125
+ title: "Invalid Host Configuration",
126
+ message:
127
+ hostValidation.error ||
128
+ "The host configuration is incomplete or invalid",
129
+ });
130
+ return;
131
+ }
132
+
133
+ push(
134
+ <LocalPathForm hostConfig={hostConfig} remotePath={remotePathValue} />,
135
+ );
136
+ }
102
137
 
103
138
  return (
104
139
  <Form
105
140
  actions={
106
141
  <ActionPanel>
107
- <Action.Push
108
- title="Continue"
109
- target={
110
- <LocalPathForm hostConfig={hostConfig} remotePath={remotePath} />
111
- }
112
- />
142
+ <Action.SubmitForm title="Continue" onSubmit={handleSubmit} />
113
143
  </ActionPanel>
114
144
  }
115
145
  >
@@ -1,17 +1,15 @@
1
1
  import { getPreferenceValues } from "@raycast/api";
2
2
  import { RsyncOptions } from "../types/server";
3
3
 
4
- /**
5
- * Preferences interface matching package.json preferences
6
- */
7
- export interface RsyncPreferences {
4
+ /** Rsync-related preference keys (matches package.json preferences) */
5
+ interface RsyncPreferences {
8
6
  rsyncHumanReadable: boolean;
9
7
  rsyncProgress: boolean;
10
8
  rsyncDelete: boolean;
11
9
  }
12
10
 
13
11
  /**
14
- * Get rsync preferences from Raycast preferences
12
+ * Get rsync preferences from Raycast preferences.
15
13
  * @returns RsyncOptions object derived from preferences
16
14
  */
17
15
  export function getRsyncPreferences(): RsyncOptions {
package/tsconfig.json CHANGED
@@ -22,6 +22,6 @@
22
22
  "@/*": ["src/*"]
23
23
  }
24
24
  },
25
- "include": ["src/**/*"],
25
+ "include": ["src/**/*", "raycast-env.d.ts"],
26
26
  "exclude": ["node_modules", "dist"]
27
27
  }
package/.eslintrc.js DELETED
@@ -1,18 +0,0 @@
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
- };
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file