contentrain 0.11.2 → 0.12.0
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 +12 -0
- package/dist/{activity-3JA0eECa.mjs → activity-DjSTygMo.mjs} +2 -2
- package/dist/{branches-g2vq3Ka-.mjs → branches-CzBo3c5P.mjs} +2 -2
- package/dist/{cdn-build-BT87QXnP.mjs → cdn-build-BvwW0OjV.mjs} +2 -2
- package/dist/{cdn-init-DU_kUt56.mjs → cdn-init-EDtGs6D6.mjs} +2 -2
- package/dist/{connect-BgrS9le_.mjs → connect-BK2e05he.mjs} +2 -2
- package/dist/import-RezpSn3Q.mjs +106 -0
- package/dist/index.mjs +13 -12
- package/dist/{init-BYzWdWAH.mjs → init-DzpPFgf2.mjs} +2 -2
- package/dist/{login-BBrpSIn2.mjs → login-B8P_JDLG.mjs} +2 -2
- package/dist/{logout-6UriBhYh.mjs → logout-BWEtxcqT.mjs} +1 -1
- package/dist/{resolve-context-CczlaT6o.mjs → resolve-context-D1fzCGw-.mjs} +1 -1
- package/dist/{serve-KyrZZLh4.mjs → serve-Bca9c80T.mjs} +2 -2
- package/dist/{setup-B0fn4CI0.mjs → setup-CsgpgrlJ.mjs} +1 -1
- package/dist/{skills-DKI702Oz.mjs → skills-Bst5FQ7K.mjs} +1 -1
- package/dist/{status-BRo3eFxi.mjs → status-ghQXrAtt.mjs} +2 -2
- package/dist/studio-39PJXdw9.mjs +24 -0
- package/dist/{submissions-BDEURUE9.mjs → submissions-XXqgcE-W.mjs} +2 -2
- package/dist/{usage-0MVnFzfq.mjs → usage-_kEqbIxO.mjs} +2 -2
- package/dist/{webhooks-CjQ03K_4.mjs → webhooks-SojN2I50.mjs} +2 -2
- package/dist/{whoami-JXOEA4vl.mjs → whoami-2lHHQboY.mjs} +1 -1
- package/package.json +5 -4
- package/dist/studio-CbILv2hl.mjs +0 -24
- package/dist/{client-CaL6uO8q.mjs → client-BeyZQEwe.mjs} +0 -0
- package/dist/{demo-C8bRXPnQ.mjs → demo-937OTZSI.mjs} +1 -1
- /package/dist/{ide-DR9i0gbE.mjs → ide-Dtw1wesv.mjs} +0 -0
- /package/dist/{merge-CfnE33IP.mjs → merge-Bkx2GGET.mjs} +0 -0
- /package/dist/{oauth-server--RbeH3Ex.mjs → oauth-server-CsI51m-2.mjs} +0 -0
- /package/dist/{prune-DCcyYVcD.mjs → prune-RgPwvk5_.mjs} +0 -0
- /package/dist/{reconcile-B69abfnm.mjs → reconcile-CC5xnijO.mjs} +0 -0
- /package/dist/{scaffold-DfAeDGjo.mjs → scaffold-C6s96dYz.mjs} +0 -0
- /package/dist/{server-BD2qBZB1.mjs → server-ftj2te6Y.mjs} +0 -0
- /package/dist/{status-RzPLgczw.mjs → status-D_rC1Qln.mjs} +0 -0
- /package/dist/{validate-D3IhiwXy.mjs → validate-C0kK-1BC.mjs} +0 -0
package/README.md
CHANGED
|
@@ -322,3 +322,15 @@ pnpm --filter contentrain build
|
|
|
322
322
|
## License
|
|
323
323
|
|
|
324
324
|
MIT
|
|
325
|
+
|
|
326
|
+
## `contentrain import`
|
|
327
|
+
|
|
328
|
+
Import a WordPress site into a `.contentrain` content store:
|
|
329
|
+
|
|
330
|
+
```bash
|
|
331
|
+
contentrain import export.xml # WXR export file (highest offline fidelity)
|
|
332
|
+
contentrain import https://site.example # public REST
|
|
333
|
+
contentrain import https://site.example --auth user:app-password # authenticated REST
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
Writes the canonical store plus `import-report.json`, `entry-source-map.json` (WP id → entry address), and — when the source has comments — `comments-export.json` (`contentrain-comments@1`, ready for a comments-service intake). An existing `.contentrain` is only overwritten with `--force`. Powered by `@contentrain/wp-import`.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as pc } from "./ui-B8l_LC36.mjs";
|
|
2
|
-
import { n as resolveStudioClient } from "./client-
|
|
3
|
-
import { t as resolveStudioContext } from "./resolve-context-
|
|
2
|
+
import { n as resolveStudioClient } from "./client-BeyZQEwe.mjs";
|
|
3
|
+
import { t as resolveStudioContext } from "./resolve-context-D1fzCGw-.mjs";
|
|
4
4
|
import { defineCommand } from "citty";
|
|
5
5
|
import { intro, log, outro, spinner } from "@clack/prompts";
|
|
6
6
|
//#region src/studio/commands/activity.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as pc, r as formatTable, t as formatCount } from "./ui-B8l_LC36.mjs";
|
|
2
|
-
import { n as resolveStudioClient } from "./client-
|
|
3
|
-
import { t as resolveStudioContext } from "./resolve-context-
|
|
2
|
+
import { n as resolveStudioClient } from "./client-BeyZQEwe.mjs";
|
|
3
|
+
import { t as resolveStudioContext } from "./resolve-context-D1fzCGw-.mjs";
|
|
4
4
|
import { defineCommand } from "citty";
|
|
5
5
|
import { confirm, intro, isCancel, log, outro, select, spinner } from "@clack/prompts";
|
|
6
6
|
//#region src/studio/commands/branches.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as pc, t as formatCount } from "./ui-B8l_LC36.mjs";
|
|
2
|
-
import { n as resolveStudioClient } from "./client-
|
|
3
|
-
import { t as resolveStudioContext } from "./resolve-context-
|
|
2
|
+
import { n as resolveStudioClient } from "./client-BeyZQEwe.mjs";
|
|
3
|
+
import { t as resolveStudioContext } from "./resolve-context-D1fzCGw-.mjs";
|
|
4
4
|
import { defineCommand } from "citty";
|
|
5
5
|
import { intro, log, outro, spinner } from "@clack/prompts";
|
|
6
6
|
//#region src/studio/commands/cdn-build.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as pc } from "./ui-B8l_LC36.mjs";
|
|
2
|
-
import { n as resolveStudioClient } from "./client-
|
|
3
|
-
import { t as resolveStudioContext } from "./resolve-context-
|
|
2
|
+
import { n as resolveStudioClient } from "./client-BeyZQEwe.mjs";
|
|
3
|
+
import { t as resolveStudioContext } from "./resolve-context-D1fzCGw-.mjs";
|
|
4
4
|
import { defineCommand } from "citty";
|
|
5
5
|
import { confirm, intro, isCancel, log, outro, spinner } from "@clack/prompts";
|
|
6
6
|
//#region src/studio/commands/cdn-init.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as pc } from "./ui-B8l_LC36.mjs";
|
|
2
|
-
import { c as saveDefaults, n as resolveStudioClient } from "./client-
|
|
3
|
-
import { n as openBrowser, t as startOAuthServer } from "./oauth-server
|
|
2
|
+
import { c as saveDefaults, n as resolveStudioClient } from "./client-BeyZQEwe.mjs";
|
|
3
|
+
import { n as openBrowser, t as startOAuthServer } from "./oauth-server-CsI51m-2.mjs";
|
|
4
4
|
import { defineCommand } from "citty";
|
|
5
5
|
import { confirm, intro, isCancel, log, outro, select, spinner, text } from "@clack/prompts";
|
|
6
6
|
import { createGit } from "@contentrain/mcp/git/identity";
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { i as pc } from "./ui-B8l_LC36.mjs";
|
|
2
|
+
import { defineCommand } from "citty";
|
|
3
|
+
import { intro, log, outro, spinner } from "@clack/prompts";
|
|
4
|
+
import { dirname, join, resolve } from "node:path";
|
|
5
|
+
import { createReadStream, existsSync } from "node:fs";
|
|
6
|
+
import { access, mkdir, writeFile } from "node:fs/promises";
|
|
7
|
+
//#region src/commands/import.ts
|
|
8
|
+
var import_default = defineCommand({
|
|
9
|
+
meta: {
|
|
10
|
+
name: "import",
|
|
11
|
+
description: "Import a WordPress site (WXR export file or REST URL) into a .contentrain content store"
|
|
12
|
+
},
|
|
13
|
+
args: {
|
|
14
|
+
source: {
|
|
15
|
+
type: "positional",
|
|
16
|
+
description: "Path to a WXR .xml export, or a site URL (https://…)",
|
|
17
|
+
required: true
|
|
18
|
+
},
|
|
19
|
+
out: {
|
|
20
|
+
type: "string",
|
|
21
|
+
description: "Target directory (default: current directory)",
|
|
22
|
+
required: false
|
|
23
|
+
},
|
|
24
|
+
auth: {
|
|
25
|
+
type: "string",
|
|
26
|
+
description: "REST Application Password as user:password (lifts access to rest_auth)",
|
|
27
|
+
required: false
|
|
28
|
+
},
|
|
29
|
+
force: {
|
|
30
|
+
type: "boolean",
|
|
31
|
+
description: "Overwrite an existing .contentrain directory",
|
|
32
|
+
required: false
|
|
33
|
+
},
|
|
34
|
+
json: {
|
|
35
|
+
type: "boolean",
|
|
36
|
+
description: "JSON output for scripting",
|
|
37
|
+
required: false
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
async run({ args }) {
|
|
41
|
+
const out = resolve(args.out ?? ".");
|
|
42
|
+
const isUrl = /^https?:\/\//i.test(args.source);
|
|
43
|
+
if (!isUrl && !existsSync(args.source)) {
|
|
44
|
+
log.error(`Source not found: ${args.source}`);
|
|
45
|
+
process.exitCode = 1;
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
const targetStore = join(out, ".contentrain");
|
|
49
|
+
if (await access(targetStore).then(() => true, () => false) && !args.force) {
|
|
50
|
+
log.error(`${targetStore} already exists — re-importing would overwrite models and content. Pass --force to proceed.`);
|
|
51
|
+
process.exitCode = 1;
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
if (!args.json) intro(pc.bold("contentrain import"));
|
|
55
|
+
const s = !args.json ? spinner() : null;
|
|
56
|
+
const { parseWxr, fetchRestRawIR, rawToContentrain, buildCommentsExport, summarizeComments } = await import("@contentrain/wp-import");
|
|
57
|
+
s?.start(isUrl ? `Fetching ${args.source} over REST` : `Parsing ${args.source}`);
|
|
58
|
+
let raw;
|
|
59
|
+
const warnings = [];
|
|
60
|
+
if (isUrl) {
|
|
61
|
+
const [user, ...pw] = (args.auth ?? "").split(":");
|
|
62
|
+
const auth = args.auth && user && pw.length ? {
|
|
63
|
+
user,
|
|
64
|
+
appPassword: pw.join(":")
|
|
65
|
+
} : void 0;
|
|
66
|
+
const result = await fetchRestRawIR({
|
|
67
|
+
origin: args.source,
|
|
68
|
+
auth,
|
|
69
|
+
tool: "contentrain-cli"
|
|
70
|
+
});
|
|
71
|
+
raw = result.raw;
|
|
72
|
+
warnings.push(...result.warnings);
|
|
73
|
+
} else raw = (await parseWxr(createReadStream(args.source), { tool: "contentrain-cli" })).raw;
|
|
74
|
+
s?.stop(`Source read: ${raw.posts.length} posts, ${raw.attachments.length} media, ${raw.comments?.length ?? 0} comments (${raw.provenance.kind})`);
|
|
75
|
+
s?.start("Converting to .contentrain");
|
|
76
|
+
const { files, entry_source_map, report } = rawToContentrain(raw);
|
|
77
|
+
if (raw.comments?.length) {
|
|
78
|
+
const exp = buildCommentsExport(raw, entry_source_map);
|
|
79
|
+
files["comments-export.json"] = `${JSON.stringify(exp, null, 2)}\n`;
|
|
80
|
+
const summary = summarizeComments(exp);
|
|
81
|
+
if (summary.unresolved?.length) warnings.push(`${summary.unresolved.length} comments reference posts outside the import`);
|
|
82
|
+
}
|
|
83
|
+
files["entry-source-map.json"] = `${JSON.stringify(entry_source_map, null, 2)}\n`;
|
|
84
|
+
const dirs = new Set(Object.keys(files).map((p) => dirname(join(out, p))));
|
|
85
|
+
await Promise.all([...dirs].map((d) => mkdir(d, { recursive: true })));
|
|
86
|
+
await Promise.all(Object.entries(files).map(([path, content]) => writeFile(join(out, path), content, "utf8")));
|
|
87
|
+
s?.stop(`Wrote ${Object.keys(files).length} files to ${out}`);
|
|
88
|
+
if (args.json) {
|
|
89
|
+
console.log(JSON.stringify({
|
|
90
|
+
ok: true,
|
|
91
|
+
out,
|
|
92
|
+
report,
|
|
93
|
+
warnings,
|
|
94
|
+
comments: raw.comments?.length ?? 0
|
|
95
|
+
}, null, 2));
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
for (const [id, m] of Object.entries(report.models)) log.message(`${pc.cyan(id.padEnd(16))} ${m.kind.padEnd(10)} ${String(m.fields).padStart(3)} fields ${String(m.entries).padStart(5)} entries`);
|
|
99
|
+
if (report.dropped_relations) log.warning(`${report.dropped_relations} relations pointed outside the import and were dropped (details in import-report.json)`);
|
|
100
|
+
for (const w of warnings) log.warning(w);
|
|
101
|
+
if (raw.comments?.length) log.info(`comments-export.json written (contentrain-comments@1) — ready for a comments-service intake`);
|
|
102
|
+
outro(`Done. Next: ${pc.bold("contentrain validate")} to check the imported store.`);
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
//#endregion
|
|
106
|
+
export { import_default as default };
|
package/dist/index.mjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { i as pc } from "./ui-B8l_LC36.mjs";
|
|
3
3
|
import { defineCommand, runMain } from "citty";
|
|
4
4
|
//#region package.json
|
|
5
|
-
var version = "0.
|
|
5
|
+
var version = "0.12.0";
|
|
6
6
|
//#endregion
|
|
7
7
|
//#region src/utils/debug.ts
|
|
8
8
|
/**
|
|
@@ -43,22 +43,23 @@ runMain(defineCommand({
|
|
|
43
43
|
description: "Contentrain CLI — AI content governance infrastructure"
|
|
44
44
|
},
|
|
45
45
|
subCommands: {
|
|
46
|
-
init: () => import("./init-
|
|
47
|
-
|
|
46
|
+
init: () => import("./init-DzpPFgf2.mjs").then((m) => m.default),
|
|
47
|
+
import: () => import("./import-RezpSn3Q.mjs").then((m) => m.default),
|
|
48
|
+
status: () => import("./status-D_rC1Qln.mjs").then((m) => m.default),
|
|
48
49
|
doctor: () => import("./doctor-MOf_LQEL.mjs").then((m) => m.default),
|
|
49
|
-
validate: () => import("./validate-
|
|
50
|
-
serve: () => import("./serve-
|
|
50
|
+
validate: () => import("./validate-C0kK-1BC.mjs").then((m) => m.default),
|
|
51
|
+
serve: () => import("./serve-Bca9c80T.mjs").then((m) => m.default),
|
|
51
52
|
generate: () => import("./generate-VI3xEA3Q.mjs").then((m) => m.default),
|
|
52
53
|
diff: () => import("./diff-BUGOF3SZ.mjs").then((m) => m.default),
|
|
53
|
-
merge: () => import("./merge-
|
|
54
|
-
reconcile: () => import("./reconcile-
|
|
55
|
-
prune: () => import("./prune-
|
|
54
|
+
merge: () => import("./merge-Bkx2GGET.mjs").then((m) => m.default),
|
|
55
|
+
reconcile: () => import("./reconcile-CC5xnijO.mjs").then((m) => m.default),
|
|
56
|
+
prune: () => import("./prune-RgPwvk5_.mjs").then((m) => m.default),
|
|
56
57
|
describe: () => import("./describe-CpQROC9y.mjs").then((m) => m.default),
|
|
57
58
|
"describe-format": () => import("./describe-format-CUAqB0C4.mjs").then((m) => m.default),
|
|
58
|
-
scaffold: () => import("./scaffold-
|
|
59
|
-
setup: () => import("./setup-
|
|
60
|
-
skills: () => import("./skills-
|
|
61
|
-
studio: () => import("./studio-
|
|
59
|
+
scaffold: () => import("./scaffold-C6s96dYz.mjs").then((m) => m.default),
|
|
60
|
+
setup: () => import("./setup-CsgpgrlJ.mjs").then((m) => m.default),
|
|
61
|
+
skills: () => import("./skills-Bst5FQ7K.mjs").then((m) => m.default),
|
|
62
|
+
studio: () => import("./studio-39PJXdw9.mjs").then((m) => m.default)
|
|
62
63
|
}
|
|
63
64
|
}));
|
|
64
65
|
//#endregion
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as pc } from "./ui-B8l_LC36.mjs";
|
|
2
2
|
import { r as resolveProjectRoot, t as loadProjectContext } from "./context-OskMGy8y.mjs";
|
|
3
|
-
import { a as createPackageResolver, c as writeMcpConfig, i as addClaudeMdReference, n as IDE_CONFIGS, o as detectIdes, s as installIdeRulesAndSkills } from "./ide-
|
|
3
|
+
import { a as createPackageResolver, c as writeMcpConfig, i as addClaudeMdReference, n as IDE_CONFIGS, o as detectIdes, s as installIdeRulesAndSkills } from "./ide-Dtw1wesv.mjs";
|
|
4
4
|
import { defineCommand } from "citty";
|
|
5
5
|
import { confirm, intro, isCancel, log, multiselect, outro, select, spinner } from "@clack/prompts";
|
|
6
6
|
import { join } from "node:path";
|
|
@@ -8,10 +8,10 @@ import { writeModel } from "@contentrain/mcp/core/model-manager";
|
|
|
8
8
|
import { ensureDir, pathExists, writeJson } from "@contentrain/mcp/util/fs";
|
|
9
9
|
import { createGit } from "@contentrain/mcp/git/identity";
|
|
10
10
|
import { buildBranchName, createTransaction } from "@contentrain/mcp/git/transaction";
|
|
11
|
+
import { appendFile, readFile, writeFile } from "node:fs/promises";
|
|
11
12
|
import { detectStackInfo } from "@contentrain/mcp/util/detect";
|
|
12
13
|
import { getTemplate, listTemplates } from "@contentrain/mcp/templates";
|
|
13
14
|
import { scanSummary } from "@contentrain/mcp/core/scanner";
|
|
14
|
-
import { appendFile, readFile, writeFile } from "node:fs/promises";
|
|
15
15
|
//#region src/commands/init.ts
|
|
16
16
|
const COMMON_LOCALES = [
|
|
17
17
|
{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as pc } from "./ui-B8l_LC36.mjs";
|
|
2
|
-
import { i as checkPermissions, o as loadCredentials, s as saveCredentials, t as StudioApiClient } from "./client-
|
|
3
|
-
import { n as openBrowser, t as startOAuthServer } from "./oauth-server
|
|
2
|
+
import { i as checkPermissions, o as loadCredentials, s as saveCredentials, t as StudioApiClient } from "./client-BeyZQEwe.mjs";
|
|
3
|
+
import { n as openBrowser, t as startOAuthServer } from "./oauth-server-CsI51m-2.mjs";
|
|
4
4
|
import { defineCommand } from "citty";
|
|
5
5
|
import { confirm, intro, isCancel, log, outro, select, spinner } from "@clack/prompts";
|
|
6
6
|
//#region src/studio/commands/login.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as pc } from "./ui-B8l_LC36.mjs";
|
|
2
|
-
import { a as clearCredentials, o as loadCredentials, t as StudioApiClient } from "./client-
|
|
2
|
+
import { a as clearCredentials, o as loadCredentials, t as StudioApiClient } from "./client-BeyZQEwe.mjs";
|
|
3
3
|
import { defineCommand } from "citty";
|
|
4
4
|
import { intro, log, outro } from "@clack/prompts";
|
|
5
5
|
//#region src/studio/commands/logout.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as saveDefaults, o as loadCredentials } from "./client-
|
|
1
|
+
import { c as saveDefaults, o as loadCredentials } from "./client-BeyZQEwe.mjs";
|
|
2
2
|
import { confirm, isCancel, select } from "@clack/prompts";
|
|
3
3
|
//#region src/studio/resolve-context.ts
|
|
4
4
|
/**
|
|
@@ -55,7 +55,7 @@ var serve_default = defineCommand({
|
|
|
55
55
|
let projectRoot = await resolveProjectRoot(args.root);
|
|
56
56
|
let demoDir;
|
|
57
57
|
if (args.demo) {
|
|
58
|
-
const { createDemoProject, cleanupDemoProject } = await import("./demo-
|
|
58
|
+
const { createDemoProject, cleanupDemoProject } = await import("./demo-937OTZSI.mjs");
|
|
59
59
|
demoDir = await createDemoProject();
|
|
60
60
|
projectRoot = demoDir;
|
|
61
61
|
consola.info(`Demo project created at ${demoDir}`);
|
|
@@ -139,7 +139,7 @@ var serve_default = defineCommand({
|
|
|
139
139
|
consola.warn("Serve UI not found. Running in API-only mode.");
|
|
140
140
|
consola.info("UI will be available after building: cd packages/cli/src/serve-ui && pnpm build");
|
|
141
141
|
}
|
|
142
|
-
const { createServeApp } = await import("./server-
|
|
142
|
+
const { createServeApp } = await import("./server-ftj2te6Y.mjs");
|
|
143
143
|
const { app, handleUpgrade } = await createServeApp({
|
|
144
144
|
projectRoot,
|
|
145
145
|
port,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as pc } from "./ui-B8l_LC36.mjs";
|
|
2
2
|
import { r as resolveProjectRoot, t as loadProjectContext } from "./context-OskMGy8y.mjs";
|
|
3
|
-
import { a as createPackageResolver, c as writeMcpConfig, n as IDE_CONFIGS, o as detectIdes, r as MCP_CONFIGS, s as installIdeRulesAndSkills } from "./ide-
|
|
3
|
+
import { a as createPackageResolver, c as writeMcpConfig, n as IDE_CONFIGS, o as detectIdes, r as MCP_CONFIGS, s as installIdeRulesAndSkills } from "./ide-Dtw1wesv.mjs";
|
|
4
4
|
import { defineCommand } from "citty";
|
|
5
5
|
import { intro, log, outro, spinner } from "@clack/prompts";
|
|
6
6
|
//#region src/commands/setup.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as pc } from "./ui-B8l_LC36.mjs";
|
|
2
2
|
import { r as resolveProjectRoot } from "./context-OskMGy8y.mjs";
|
|
3
|
-
import { a as createPackageResolver, n as IDE_CONFIGS, o as detectIdes, s as installIdeRulesAndSkills, t as AGENT_SKILL_NAMES } from "./ide-
|
|
3
|
+
import { a as createPackageResolver, n as IDE_CONFIGS, o as detectIdes, s as installIdeRulesAndSkills, t as AGENT_SKILL_NAMES } from "./ide-Dtw1wesv.mjs";
|
|
4
4
|
import { defineCommand } from "citty";
|
|
5
5
|
import { intro, log, outro, spinner } from "@clack/prompts";
|
|
6
6
|
import { join } from "node:path";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as pc, r as formatTable, t as formatCount } from "./ui-B8l_LC36.mjs";
|
|
2
|
-
import { n as resolveStudioClient } from "./client-
|
|
3
|
-
import { t as resolveStudioContext } from "./resolve-context-
|
|
2
|
+
import { n as resolveStudioClient } from "./client-BeyZQEwe.mjs";
|
|
3
|
+
import { t as resolveStudioContext } from "./resolve-context-D1fzCGw-.mjs";
|
|
4
4
|
import { defineCommand } from "citty";
|
|
5
5
|
import { intro, log, outro, spinner } from "@clack/prompts";
|
|
6
6
|
//#region src/studio/commands/status.ts
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { defineCommand } from "citty";
|
|
2
|
+
//#region src/studio/index.ts
|
|
3
|
+
var studio_default = defineCommand({
|
|
4
|
+
meta: {
|
|
5
|
+
name: "studio",
|
|
6
|
+
description: "Interact with Contentrain Studio"
|
|
7
|
+
},
|
|
8
|
+
subCommands: {
|
|
9
|
+
login: () => import("./login-B8P_JDLG.mjs").then((m) => m.default),
|
|
10
|
+
logout: () => import("./logout-BWEtxcqT.mjs").then((m) => m.default),
|
|
11
|
+
whoami: () => import("./whoami-2lHHQboY.mjs").then((m) => m.default),
|
|
12
|
+
connect: () => import("./connect-BK2e05he.mjs").then((m) => m.default),
|
|
13
|
+
status: () => import("./status-ghQXrAtt.mjs").then((m) => m.default),
|
|
14
|
+
activity: () => import("./activity-DjSTygMo.mjs").then((m) => m.default),
|
|
15
|
+
usage: () => import("./usage-_kEqbIxO.mjs").then((m) => m.default),
|
|
16
|
+
branches: () => import("./branches-CzBo3c5P.mjs").then((m) => m.default),
|
|
17
|
+
"cdn-init": () => import("./cdn-init-EDtGs6D6.mjs").then((m) => m.default),
|
|
18
|
+
"cdn-build": () => import("./cdn-build-BvwW0OjV.mjs").then((m) => m.default),
|
|
19
|
+
webhooks: () => import("./webhooks-SojN2I50.mjs").then((m) => m.default),
|
|
20
|
+
submissions: () => import("./submissions-XXqgcE-W.mjs").then((m) => m.default)
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
//#endregion
|
|
24
|
+
export { studio_default as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as pc, r as formatTable, t as formatCount } from "./ui-B8l_LC36.mjs";
|
|
2
|
-
import { n as resolveStudioClient } from "./client-
|
|
3
|
-
import { t as resolveStudioContext } from "./resolve-context-
|
|
2
|
+
import { n as resolveStudioClient } from "./client-BeyZQEwe.mjs";
|
|
3
|
+
import { t as resolveStudioContext } from "./resolve-context-D1fzCGw-.mjs";
|
|
4
4
|
import { defineCommand } from "citty";
|
|
5
5
|
import { confirm, intro, isCancel, log, outro, select, spinner } from "@clack/prompts";
|
|
6
6
|
//#region src/studio/commands/submissions.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as pc, n as formatPercent, r as formatTable } from "./ui-B8l_LC36.mjs";
|
|
2
|
-
import { n as resolveStudioClient } from "./client-
|
|
3
|
-
import { t as resolveStudioContext } from "./resolve-context-
|
|
2
|
+
import { n as resolveStudioClient } from "./client-BeyZQEwe.mjs";
|
|
3
|
+
import { t as resolveStudioContext } from "./resolve-context-D1fzCGw-.mjs";
|
|
4
4
|
import { defineCommand } from "citty";
|
|
5
5
|
import { intro, log, outro, spinner } from "@clack/prompts";
|
|
6
6
|
//#region src/studio/commands/usage.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as pc, o as statusIcon, r as formatTable } from "./ui-B8l_LC36.mjs";
|
|
2
|
-
import { n as resolveStudioClient } from "./client-
|
|
3
|
-
import { t as resolveStudioContext } from "./resolve-context-
|
|
2
|
+
import { n as resolveStudioClient } from "./client-BeyZQEwe.mjs";
|
|
3
|
+
import { t as resolveStudioContext } from "./resolve-context-D1fzCGw-.mjs";
|
|
4
4
|
import { defineCommand } from "citty";
|
|
5
5
|
import { confirm, intro, isCancel, log, multiselect, outro, select, spinner, text } from "@clack/prompts";
|
|
6
6
|
//#region src/studio/commands/webhooks.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as pc } from "./ui-B8l_LC36.mjs";
|
|
2
|
-
import { i as checkPermissions, n as resolveStudioClient, r as AuthExpiredError } from "./client-
|
|
2
|
+
import { i as checkPermissions, n as resolveStudioClient, r as AuthExpiredError } from "./client-BeyZQEwe.mjs";
|
|
3
3
|
import { defineCommand } from "citty";
|
|
4
4
|
import { intro, log, outro } from "@clack/prompts";
|
|
5
5
|
//#region src/studio/commands/whoami.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "contentrain",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "CLI for Contentrain — AI content governance infrastructure",
|
|
6
6
|
"type": "module",
|
|
@@ -47,11 +47,12 @@
|
|
|
47
47
|
"simple-git": "^3.27.0",
|
|
48
48
|
"ws": "^8.18.0",
|
|
49
49
|
"zod": "^3.24.0",
|
|
50
|
-
"@contentrain/rules": "0.7.0",
|
|
51
|
-
"@contentrain/skills": "0.8.0",
|
|
52
50
|
"@contentrain/mcp": "3.1.2",
|
|
53
51
|
"@contentrain/query": "7.0.8",
|
|
54
|
-
"@contentrain/
|
|
52
|
+
"@contentrain/rules": "0.7.0",
|
|
53
|
+
"@contentrain/skills": "0.8.0",
|
|
54
|
+
"@contentrain/types": "1.4.0",
|
|
55
|
+
"@contentrain/wp-import": "0.1.0"
|
|
55
56
|
},
|
|
56
57
|
"devDependencies": {
|
|
57
58
|
"@types/ws": "^8.5.0",
|
package/dist/studio-CbILv2hl.mjs
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { defineCommand } from "citty";
|
|
2
|
-
//#region src/studio/index.ts
|
|
3
|
-
var studio_default = defineCommand({
|
|
4
|
-
meta: {
|
|
5
|
-
name: "studio",
|
|
6
|
-
description: "Interact with Contentrain Studio"
|
|
7
|
-
},
|
|
8
|
-
subCommands: {
|
|
9
|
-
login: () => import("./login-BBrpSIn2.mjs").then((m) => m.default),
|
|
10
|
-
logout: () => import("./logout-6UriBhYh.mjs").then((m) => m.default),
|
|
11
|
-
whoami: () => import("./whoami-JXOEA4vl.mjs").then((m) => m.default),
|
|
12
|
-
connect: () => import("./connect-BgrS9le_.mjs").then((m) => m.default),
|
|
13
|
-
status: () => import("./status-BRo3eFxi.mjs").then((m) => m.default),
|
|
14
|
-
activity: () => import("./activity-3JA0eECa.mjs").then((m) => m.default),
|
|
15
|
-
usage: () => import("./usage-0MVnFzfq.mjs").then((m) => m.default),
|
|
16
|
-
branches: () => import("./branches-g2vq3Ka-.mjs").then((m) => m.default),
|
|
17
|
-
"cdn-init": () => import("./cdn-init-DU_kUt56.mjs").then((m) => m.default),
|
|
18
|
-
"cdn-build": () => import("./cdn-build-BT87QXnP.mjs").then((m) => m.default),
|
|
19
|
-
webhooks: () => import("./webhooks-CjQ03K_4.mjs").then((m) => m.default),
|
|
20
|
-
submissions: () => import("./submissions-BDEURUE9.mjs").then((m) => m.default)
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
//#endregion
|
|
24
|
-
export { studio_default as default };
|
|
File without changes
|
|
@@ -2,8 +2,8 @@ import { join } from "node:path";
|
|
|
2
2
|
import { writeModel } from "@contentrain/mcp/core/model-manager";
|
|
3
3
|
import { ensureDir, writeJson } from "@contentrain/mcp/util/fs";
|
|
4
4
|
import { createGit } from "@contentrain/mcp/git/identity";
|
|
5
|
-
import { getTemplate } from "@contentrain/mcp/templates";
|
|
6
5
|
import { mkdtemp, rm, writeFile } from "node:fs/promises";
|
|
6
|
+
import { getTemplate } from "@contentrain/mcp/templates";
|
|
7
7
|
import { tmpdir } from "node:os";
|
|
8
8
|
//#region src/utils/demo.ts
|
|
9
9
|
/**
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|