@pecot/workflow-mcp 7.0.1-dev.33 → 7.0.1-dev.34

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pecot-w",
3
- "version": "7.0.1-dev.33",
3
+ "version": "7.0.1-dev.34",
4
4
  "description": "pecot-w (pecot-workflow) workflow automation plugin for Claude Code - skills, hooks, agents, and commands for AI-assisted development",
5
5
  "author": {
6
6
  "name": "pecot"
@@ -8,10 +8,9 @@ export interface RemoteLocation {
8
8
  }
9
9
  /**
10
10
  リモート URL を分ける。前後の空白は除く。
11
- 対応する形式は次の 3 つ。
12
- - 形式 1: `https://host/owner/repo[.git]`。
13
- - 形式 2: `git@host:owner/repo[.git]`。
14
- - 形式 3: `ssh://[user@]host[:port]/owner/repo[.git][/]`。
11
+ 対応する形式は次の 2 つ。
12
+ - スキーム付き: `(http|https|ssh|git|ftp|ftps)://[userinfo@]host[:port]/owner/repo[.git][/]`。
13
+ - scp 風: `[user@]host:[/]owner/repo[.git][/]`。
15
14
  */
16
15
  export declare function parseRemoteUrl(url: string): RemoteLocation;
17
16
  //# sourceMappingURL=git-url.d.ts.map
@@ -1,27 +1,26 @@
1
- // Git リモート URL の解析。HTTPS / SSH 形式から (host, owner, repository) を取り出す。
1
+ // Git リモート URL の解析。git-clone の GIT URLS(スキーム付きと scp 風)から (host, owner, repository) を取り出す。
2
2
  import { InvalidValueError } from './errors.js';
3
3
  import { pythonStrip } from './python-format.js';
4
4
  export class RemoteUrlFormatError extends InvalidValueError {
5
5
  }
6
- const HTTPS_URL_PATTERN = /^https?:\/\/([^/]+)\/([^/]+)\/([^/]+?)(?:\.git)?$/u;
7
- const SSH_URL_PATTERN = /^git@([^:]+):([^/]+)\/([^/]+?)(?:\.git)?$/u;
8
- const USERINFO_PATTERN = /^([a-z][a-z0-9+.-]*:\/\/)[^/]*@/iu;
9
6
  // eslint-disable-next-line security/detect-unsafe-regex -- 入力はリモート URL 1 本で、バックトラックの幅は URL の長さに収まる
10
- const SSH_SCHEME_URL_PATTERN = /^ssh:\/\/(?:[^@/]+@)?([^/:@]+)(?::\p{Nd}+)?\/([^/]+)\/([^/]+?)(?:\.git)?\/?$/u;
7
+ const SCHEME_URL_PATTERN = /^(?:https?|ssh|git|ftps?):\/\/(?:[^/@]+@)?([^/:@]+)(?::\d+)?\/([^/~][^/]*)\/([^/]+?)(?:\.git)?\/?$/u;
8
+ // 先頭が `C:` のようなドライブ文字なら、git(Windows)と同じくローカルのパスとみなす。
9
+ // eslint-disable-next-line security/detect-unsafe-regex -- 入力はリモート URL 1 本で、バックトラックの幅は URL の長さに収まる
10
+ const SCP_LIKE_URL_PATTERN = /^(?![A-Za-z]:)(?:[^@/:]+@)?([^/:@]+):\/?([^/~][^/]*)\/([^/]+?)(?:\.git)?\/?$/u;
11
+ const USERINFO_PATTERN = /^([a-z][a-z0-9+.-]*:\/\/)[^/]*@/iu;
11
12
  /**
12
13
  リモート URL を分ける。前後の空白は除く。
13
- 対応する形式は次の 3 つ。
14
- - 形式 1: `https://host/owner/repo[.git]`。
15
- - 形式 2: `git@host:owner/repo[.git]`。
16
- - 形式 3: `ssh://[user@]host[:port]/owner/repo[.git][/]`。
14
+ 対応する形式は次の 2 つ。
15
+ - スキーム付き: `(http|https|ssh|git|ftp|ftps)://[userinfo@]host[:port]/owner/repo[.git][/]`。
16
+ - scp 風: `[user@]host:[/]owner/repo[.git][/]`。
17
17
  */
18
18
  export function parseRemoteUrl(url) {
19
19
  const trimmed = pythonStrip(url);
20
- for (const pattern of [HTTPS_URL_PATTERN, SSH_URL_PATTERN, SSH_SCHEME_URL_PATTERN]) {
20
+ for (const pattern of [SCHEME_URL_PATTERN, SCP_LIKE_URL_PATTERN]) {
21
21
  const [, host, owner, repository] = pattern.exec(trimmed) ?? [];
22
22
  if (host !== undefined && owner !== undefined && repository !== undefined) {
23
- // https://user:token@host/... の userinfo は host に含めない
24
- return { host: host.slice(host.lastIndexOf('@') + 1), owner, repository };
23
+ return { host, owner, repository };
25
24
  }
26
25
  }
27
26
  // エラー文に認証情報(userinfo)を出さない
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@pecot/workflow-mcp",
3
- "version": "7.0.1-dev.33",
3
+ "version": "7.0.1-dev.34",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@pecot/workflow-mcp",
9
- "version": "7.0.1-dev.33",
9
+ "version": "7.0.1-dev.34",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@modelcontextprotocol/server": "^2.4.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pecot/workflow-mcp",
3
- "version": "7.0.1-dev.33",
3
+ "version": "7.0.1-dev.34",
4
4
  "type": "module",
5
5
  "description": "pecot-workflow MCP server (standalone distribution)",
6
6
  "license": "MIT",