@elvatis_com/openclaw-ispconfig 0.1.2 → 0.1.3
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/README.md +5 -0
- package/dist/templates/github-issue-helper.d.ts +10 -0
- package/dist/templates/github-issue-helper.d.ts.map +1 -0
- package/dist/templates/github-issue-helper.js +43 -0
- package/dist/templates/github-issue-helper.js.map +1 -0
- package/openclaw.plugin.json +5 -3
- package/package.json +9 -8
package/README.md
CHANGED
|
@@ -133,6 +133,11 @@ For live tests, provide environment variables:
|
|
|
133
133
|
- `ISPCONFIG_USER`
|
|
134
134
|
- `ISPCONFIG_PASS`
|
|
135
135
|
|
|
136
|
+
## Shared Template
|
|
137
|
+
|
|
138
|
+
For automation that creates GitHub issues, use `src/templates/github-issue-helper.ts`.
|
|
139
|
+
It provides `isValidIssueRepoSlug()`, `resolveIssueRepo()`, and `buildGhIssueCreateCommand()`.
|
|
140
|
+
|
|
136
141
|
## License
|
|
137
142
|
|
|
138
143
|
MIT
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare function shellQuote(value: string): string;
|
|
2
|
+
export declare function isValidIssueRepoSlug(value: string): boolean;
|
|
3
|
+
export declare function resolveIssueRepo(configValue: unknown, envValue: unknown, defaultRepo: string): string;
|
|
4
|
+
export declare function buildGhIssueCreateCommand(args: {
|
|
5
|
+
repo: string;
|
|
6
|
+
title: string;
|
|
7
|
+
body: string;
|
|
8
|
+
labels?: string[];
|
|
9
|
+
}): string;
|
|
10
|
+
//# sourceMappingURL=github-issue-helper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"github-issue-helper.d.ts","sourceRoot":"","sources":["../../src/templates/github-issue-helper.ts"],"names":[],"mappings":"AAEA,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEhD;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAE3D;AAED,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,CAUrG;AAED,wBAAgB,yBAAyB,CAAC,IAAI,EAAE;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB,GAAG,MAAM,CAmBT"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.shellQuote = shellQuote;
|
|
4
|
+
exports.isValidIssueRepoSlug = isValidIssueRepoSlug;
|
|
5
|
+
exports.resolveIssueRepo = resolveIssueRepo;
|
|
6
|
+
exports.buildGhIssueCreateCommand = buildGhIssueCreateCommand;
|
|
7
|
+
const ISSUE_REPO_SLUG_RE = /^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/;
|
|
8
|
+
function shellQuote(value) {
|
|
9
|
+
return `'${String(value).replace(/'/g, `"'"'`)}'`;
|
|
10
|
+
}
|
|
11
|
+
function isValidIssueRepoSlug(value) {
|
|
12
|
+
return ISSUE_REPO_SLUG_RE.test(value.trim());
|
|
13
|
+
}
|
|
14
|
+
function resolveIssueRepo(configValue, envValue, defaultRepo) {
|
|
15
|
+
const candidates = [configValue, envValue, defaultRepo];
|
|
16
|
+
for (const candidate of candidates) {
|
|
17
|
+
if (typeof candidate !== "string")
|
|
18
|
+
continue;
|
|
19
|
+
const trimmed = candidate.trim();
|
|
20
|
+
if (trimmed && isValidIssueRepoSlug(trimmed)) {
|
|
21
|
+
return trimmed;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return defaultRepo;
|
|
25
|
+
}
|
|
26
|
+
function buildGhIssueCreateCommand(args) {
|
|
27
|
+
const repo = args.repo.trim();
|
|
28
|
+
if (!isValidIssueRepoSlug(repo)) {
|
|
29
|
+
throw new Error(`Invalid issue repository slug: ${args.repo}`);
|
|
30
|
+
}
|
|
31
|
+
const labels = (args.labels ?? []).map((label) => label.trim()).filter(Boolean);
|
|
32
|
+
const parts = [
|
|
33
|
+
"gh issue create",
|
|
34
|
+
`-R ${shellQuote(repo)}`,
|
|
35
|
+
`--title ${shellQuote(args.title)}`,
|
|
36
|
+
`--body ${shellQuote(args.body)}`,
|
|
37
|
+
];
|
|
38
|
+
if (labels.length > 0) {
|
|
39
|
+
parts.push(`--label ${shellQuote(labels.join(","))}`);
|
|
40
|
+
}
|
|
41
|
+
return parts.join(" ");
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=github-issue-helper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"github-issue-helper.js","sourceRoot":"","sources":["../../src/templates/github-issue-helper.ts"],"names":[],"mappings":";;AAEA,gCAEC;AAED,oDAEC;AAED,4CAUC;AAED,8DAwBC;AA9CD,MAAM,kBAAkB,GAAG,oCAAoC,CAAC;AAEhE,SAAgB,UAAU,CAAC,KAAa;IACtC,OAAO,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,GAAG,CAAC;AACpD,CAAC;AAED,SAAgB,oBAAoB,CAAC,KAAa;IAChD,OAAO,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;AAC/C,CAAC;AAED,SAAgB,gBAAgB,CAAC,WAAoB,EAAE,QAAiB,EAAE,WAAmB;IAC3F,MAAM,UAAU,GAAG,CAAC,WAAW,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC;IACxD,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACnC,IAAI,OAAO,SAAS,KAAK,QAAQ;YAAE,SAAS;QAC5C,MAAM,OAAO,GAAG,SAAS,CAAC,IAAI,EAAE,CAAC;QACjC,IAAI,OAAO,IAAI,oBAAoB,CAAC,OAAO,CAAC,EAAE,CAAC;YAC7C,OAAO,OAAO,CAAC;QACjB,CAAC;IACH,CAAC;IACD,OAAO,WAAW,CAAC;AACrB,CAAC;AAED,SAAgB,yBAAyB,CAAC,IAKzC;IACC,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;IAC9B,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,EAAE,CAAC;QAChC,MAAM,IAAI,KAAK,CAAC,kCAAkC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;IACjE,CAAC;IAED,MAAM,MAAM,GAAG,CAAC,IAAI,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAChF,MAAM,KAAK,GAAG;QACZ,iBAAiB;QACjB,MAAM,UAAU,CAAC,IAAI,CAAC,EAAE;QACxB,WAAW,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;QACnC,UAAU,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;KAClC,CAAC;IAEF,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACtB,KAAK,CAAC,IAAI,CAAC,WAAW,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;IACxD,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACzB,CAAC"}
|
package/openclaw.plugin.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ISPConfig",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Manage ISPConfig servers: automated site provisioning, domains, mailboxes, DNS, databases, SSL, backups, and more.",
|
|
5
5
|
"config": {
|
|
6
6
|
"apiUrl": {
|
|
@@ -36,7 +36,9 @@
|
|
|
36
36
|
"allowedOperations": {
|
|
37
37
|
"type": "array",
|
|
38
38
|
"description": "Whitelist of allowed tool names. Empty = all allowed.",
|
|
39
|
-
"items": {
|
|
39
|
+
"items": {
|
|
40
|
+
"type": "string"
|
|
41
|
+
},
|
|
40
42
|
"default": []
|
|
41
43
|
},
|
|
42
44
|
"verifySsl": {
|
|
@@ -78,4 +80,4 @@
|
|
|
78
80
|
"isp_cron_list",
|
|
79
81
|
"isp_cron_add"
|
|
80
82
|
]
|
|
81
|
-
}
|
|
83
|
+
}
|
package/package.json
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elvatis_com/openclaw-ispconfig",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "OpenClaw plugin for ISPConfig server management - domains, mailboxes, databases, DNS, websites",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"build": "tsc",
|
|
9
|
-
"test": "
|
|
10
|
-
"prepublishOnly": "npm run build"
|
|
9
|
+
"test": "vitest run",
|
|
10
|
+
"prepublishOnly": "npm run build",
|
|
11
|
+
"test:watch": "vitest"
|
|
11
12
|
},
|
|
12
13
|
"files": [
|
|
13
14
|
"dist",
|
|
@@ -28,17 +29,17 @@
|
|
|
28
29
|
"type": "git",
|
|
29
30
|
"url": "git+https://github.com/elvatis/openclaw-ispconfig.git"
|
|
30
31
|
},
|
|
31
|
-
"dependencies": {},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"typescript": "^5.7.0",
|
|
34
33
|
"@types/node": "^22.0.0",
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"@types/jest": "^29.5.0"
|
|
34
|
+
"typescript": "^5.7.0",
|
|
35
|
+
"vitest": "^3.0.0"
|
|
38
36
|
},
|
|
39
37
|
"openclaw": {
|
|
40
38
|
"extensions": [
|
|
41
39
|
"./src/index.ts"
|
|
42
40
|
]
|
|
41
|
+
},
|
|
42
|
+
"overrides": {
|
|
43
|
+
"test-exclude": "^7.0.1"
|
|
43
44
|
}
|
|
44
45
|
}
|