contentrain 0.12.14 → 0.13.1

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 CHANGED
@@ -96,7 +96,7 @@ Every read command supports `--json` for CI use; write commands surface `--watch
96
96
  | `status` | `--json` |
97
97
  | `doctor` | `--json`, `--usage` — non-zero exit on failure; includes a remote `cr/*` branch check |
98
98
  | `validate` | `--json`, `--fix`, `--interactive`, `--watch`, `--model <id>` |
99
- | `generate` | `--json`, `--watch` |
99
+ | `generate` | `--json`, `--watch`, `--published`, `--at <ISO timestamp>` |
100
100
  | `diff` | `--json` |
101
101
  | `merge` | `--yes` (skip confirm) |
102
102
  | `reconcile` | `--yes` (execute a clean plan without prompting), `--json` (dry-run plan) |
@@ -334,3 +334,11 @@ contentrain import https://site.example --auth user:app-password # authenticate
334
334
  ```
335
335
 
336
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`.
337
+
338
+ ### Public static builds
339
+
340
+ `contentrain generate --published` excludes drafts and content outside its
341
+ `publish_at`/`expire_at` window. `--at 2026-10-01T12:00:00Z` fixes the public build
342
+ clock for reproducible tests and implies `--published`. Without these flags,
343
+ editorial generation keeps its existing behavior. Watch mode observes metadata
344
+ edits; a scheduled static publication still needs a build/deploy trigger.
@@ -20,6 +20,16 @@ var generate_default = defineCommand({
20
20
  description: "Project root path",
21
21
  required: false
22
22
  },
23
+ published: {
24
+ type: "boolean",
25
+ description: "Include only published content within its publication window",
26
+ required: false
27
+ },
28
+ at: {
29
+ type: "string",
30
+ description: "ISO publication timestamp for a reproducible public build (implies --published)",
31
+ required: false
32
+ },
23
33
  watch: {
24
34
  type: "boolean",
25
35
  description: "Watch for changes and regenerate",
@@ -48,7 +58,9 @@ var generate_default = defineCommand({
48
58
  const cdnBaseUrl = args.cdnBaseUrl || void 0;
49
59
  const result = await generate({
50
60
  projectRoot,
51
- cdnBaseUrl
61
+ cdnBaseUrl,
62
+ publishedOnly: args.published,
63
+ at: args.at
52
64
  });
53
65
  s?.stop("SDK client generated");
54
66
  if (useJson) {
@@ -72,6 +84,7 @@ var generate_default = defineCommand({
72
84
  const dirsToWatch = [
73
85
  join(crDir, "models"),
74
86
  join(crDir, "content"),
87
+ join(crDir, "meta"),
75
88
  join(crDir, "config.json")
76
89
  ];
77
90
  let debounce = null;
@@ -82,7 +95,9 @@ var generate_default = defineCommand({
82
95
  try {
83
96
  const r = await generate({
84
97
  projectRoot,
85
- cdnBaseUrl
98
+ cdnBaseUrl,
99
+ publishedOnly: args.published,
100
+ at: args.at
86
101
  });
87
102
  log.success(`Regenerated: ${r.generatedFiles.length} files`);
88
103
  } catch (err) {
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.12.14";
5
+ var version = "0.13.1";
6
6
  //#endregion
7
7
  //#region src/utils/debug.ts
8
8
  /**
@@ -49,7 +49,7 @@ runMain(defineCommand({
49
49
  doctor: () => import("./doctor-MOf_LQEL.mjs").then((m) => m.default),
50
50
  validate: () => import("./validate-C0kK-1BC.mjs").then((m) => m.default),
51
51
  serve: () => import("./serve-Bca9c80T.mjs").then((m) => m.default),
52
- generate: () => import("./generate-VI3xEA3Q.mjs").then((m) => m.default),
52
+ generate: () => import("./generate-BKskWYyJ.mjs").then((m) => m.default),
53
53
  diff: () => import("./diff-BUGOF3SZ.mjs").then((m) => m.default),
54
54
  merge: () => import("./merge-Bkx2GGET.mjs").then((m) => m.default),
55
55
  reconcile: () => import("./reconcile-CC5xnijO.mjs").then((m) => m.default),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "contentrain",
3
- "version": "0.12.14",
3
+ "version": "0.13.1",
4
4
  "license": "MIT",
5
5
  "description": "CLI for Contentrain — AI content governance infrastructure",
6
6
  "type": "module",
@@ -47,12 +47,12 @@
47
47
  "simple-git": "^3.27.0",
48
48
  "ws": "^8.18.0",
49
49
  "zod": "^3.24.0",
50
- "@contentrain/mcp": "3.3.3",
51
- "@contentrain/query": "7.2.3",
50
+ "@contentrain/mcp": "3.3.4",
52
51
  "@contentrain/rules": "0.7.2",
53
- "@contentrain/skills": "0.9.2",
54
- "@contentrain/types": "1.13.0",
55
- "@contentrain/wp-import": "0.4.0"
52
+ "@contentrain/skills": "0.9.3",
53
+ "@contentrain/query": "7.3.1",
54
+ "@contentrain/types": "1.13.1",
55
+ "@contentrain/wp-import": "0.4.2"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@types/ws": "^8.5.0",