@clawos-dev/clawd 0.2.495 → 0.2.496
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/dist/cli.cjs +10 -1
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -55469,9 +55469,17 @@ async function ensureRepo(exec, args) {
|
|
|
55469
55469
|
}
|
|
55470
55470
|
throw new RepoError(`\u5EFA\u4ED3\u5E93\u6CA1\u6210\uFF08gh repo create \u9000\u51FA\u7801 ${r.code}\uFF09\uFF1A${err}`);
|
|
55471
55471
|
}
|
|
55472
|
+
await enableActions(exec, slug);
|
|
55472
55473
|
const info = await repoInfo(exec, dir);
|
|
55473
55474
|
return { created: true, url: info?.url ?? `https://github.com/${slug}` };
|
|
55474
55475
|
}
|
|
55476
|
+
async function enableActions(exec, slug) {
|
|
55477
|
+
await exec(
|
|
55478
|
+
"gh",
|
|
55479
|
+
["api", "--method", "PUT", `repos/${slug}/actions/permissions`, "-F", "enabled=true", "-f", "allowed_actions=all"],
|
|
55480
|
+
{ timeoutMs: 3e4 }
|
|
55481
|
+
);
|
|
55482
|
+
}
|
|
55475
55483
|
async function setSecret(exec, args) {
|
|
55476
55484
|
const info = await repoInfo(exec, args.dir);
|
|
55477
55485
|
if (!info) throw new RepoError("\u8FD8\u6CA1\u6709\u4ED3\u5E93\uFF0CSecrets \u6CA1\u5730\u65B9\u5199");
|
|
@@ -55521,6 +55529,7 @@ async function commitAndPush(exec, args) {
|
|
|
55521
55529
|
async function release(exec, args) {
|
|
55522
55530
|
const info = await repoInfo(exec, args.dir);
|
|
55523
55531
|
if (!info) throw new RepoError("\u8FD8\u6CA1\u6709\u4ED3\u5E93\uFF0C\u5148\u70B9\u4E00\u6B21\u300C\u53D1\u5E03\u5230\u4E91\u4E0A\u300D\u5EFA\u4ED3");
|
|
55532
|
+
await enableActions(exec, repoSlug(info.url));
|
|
55524
55533
|
await writeTemplates(args.dir);
|
|
55525
55534
|
const identity = await identityArgs(exec, args.dir);
|
|
55526
55535
|
await mustGit(exec, args.dir, ["add", "-A"], "\u6682\u5B58\u6587\u4EF6");
|
|
@@ -65611,7 +65620,7 @@ function computeMethodAccess(args) {
|
|
|
65611
65620
|
}
|
|
65612
65621
|
|
|
65613
65622
|
// src/version.ts
|
|
65614
|
-
var version = "0.2.
|
|
65623
|
+
var version = "0.2.496".length > 0 ? "0.2.496" : "dev";
|
|
65615
65624
|
|
|
65616
65625
|
// src/cli-probe/probe.ts
|
|
65617
65626
|
var fs72 = __toESM(require("fs"), 1);
|