domma-cms 0.25.10 → 0.25.11

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/bin/cli.js CHANGED
@@ -321,6 +321,13 @@ content/users/
321
321
  content/media/
322
322
  *.log
323
323
  .domma-backups/
324
+
325
+ # Analytics plugin runtime counters — written on every page hit. Never track:
326
+ # committing them resets live analytics on every checkout/pull/update.
327
+ plugins/analytics/stats.json
328
+ plugins/analytics/daily.json
329
+ plugins/analytics/lifetime.json
330
+ plugins/analytics/journeys.json
324
331
  `;
325
332
 
326
333
  step('Writing .gitignore');
package/bin/update.js CHANGED
@@ -467,18 +467,24 @@ export default async function update(_positional, flags) {
467
467
  done();
468
468
 
469
469
  // -------------------------------------------------------------------------
470
- // 11. Ensure .domma-backups/ is in .gitignore
470
+ // 11. Ensure runtime state is in .gitignore (self-heal existing installs)
471
+ // .domma-backups/ + analytics counters — tracking the latter resets
472
+ // live analytics on every checkout/pull/update (recurring bug).
471
473
  // -------------------------------------------------------------------------
472
474
 
473
475
  const gitignorePath = path.join(cwd, '.gitignore');
474
- const backupEntry = '.domma-backups/';
475
- if (existsSync(gitignorePath)) {
476
- const current = readFileSync(gitignorePath, 'utf8');
477
- if (!current.includes(backupEntry)) {
478
- writeFileSync(gitignorePath, current.trimEnd() + '\n' + backupEntry + '\n', 'utf8');
479
- }
480
- } else {
481
- writeFileSync(gitignorePath, backupEntry + '\n', 'utf8');
476
+ const requiredIgnores = [
477
+ '.domma-backups/',
478
+ 'plugins/analytics/stats.json',
479
+ 'plugins/analytics/daily.json',
480
+ 'plugins/analytics/lifetime.json',
481
+ 'plugins/analytics/journeys.json',
482
+ ];
483
+ const current = existsSync(gitignorePath) ? readFileSync(gitignorePath, 'utf8') : '';
484
+ const missing = requiredIgnores.filter(entry => !current.split(/\r?\n/).includes(entry));
485
+ if (missing.length) {
486
+ const prefix = current ? current.trimEnd() + '\n' : '';
487
+ writeFileSync(gitignorePath, prefix + missing.join('\n') + '\n', 'utf8');
482
488
  }
483
489
 
484
490
  // -------------------------------------------------------------------------
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "domma-cms",
3
- "version": "0.25.10",
3
+ "version": "0.25.11",
4
4
  "description": "File-based CMS powered by Domma and Fastify. Run npx domma-cms my-site to create a new project.",
5
5
  "type": "module",
6
6
  "main": "server/server.js",
@@ -20,6 +20,10 @@
20
20
  "config/",
21
21
  "!config/connections.json",
22
22
  "plugins/",
23
+ "!plugins/analytics/stats.json",
24
+ "!plugins/analytics/daily.json",
25
+ "!plugins/analytics/lifetime.json",
26
+ "!plugins/analytics/journeys.json",
23
27
  "scripts/",
24
28
  "docs/",
25
29
  "CHANGELOG.md",
@@ -43,6 +43,14 @@
43
43
  {
44
44
  "path": "daily.json",
45
45
  "content": "{}"
46
+ },
47
+ {
48
+ "path": "journeys.json",
49
+ "content": "{}"
50
+ },
51
+ {
52
+ "path": "stats.json",
53
+ "content": "{}"
46
54
  }
47
55
  ]
48
56
  }
@@ -1,8 +0,0 @@
1
- {
2
- "2026-05-06": {
3
- "/test-from-controller": 1
4
- },
5
- "2026-05-22": {
6
- "/about": 1
7
- }
8
- }
@@ -1,18 +0,0 @@
1
- {
2
- "2026-05-06": [
3
- {
4
- "sid": "test-controller",
5
- "t": 1778084386121,
6
- "url": "/test-from-controller",
7
- "ref": "/"
8
- }
9
- ],
10
- "2026-05-22": [
11
- {
12
- "sid": "test-sid-123",
13
- "t": 1779450391054,
14
- "url": "/about",
15
- "ref": ""
16
- }
17
- ]
18
- }
@@ -1,25 +0,0 @@
1
- {
2
- "/": 162,
3
- "/about": 89,
4
- "/blog": 42,
5
- "/contact": 31,
6
- "/resources/typography": 4,
7
- "/resources": 13,
8
- "/resources/shortcodes": 14,
9
- "/resources/cards": 19,
10
- "/resources/interactive": 13,
11
- "/resources/grid": 6,
12
- "/forms": 14,
13
- "/resources/effects": 6,
14
- "/blog/hello-world": 28,
15
- "/feedback": 42,
16
- "/resources/dependencies": 2,
17
- "/resources/components": 6,
18
- "/gdpr": 3,
19
- "/scratch": 84,
20
- "/getting-started": 3,
21
- "/resources/pro": 1,
22
- "/todo": 23,
23
- "/thank-you": 1,
24
- "/test-from-controller": 1
25
- }
@@ -1,24 +0,0 @@
1
- {
2
- "/": 162,
3
- "/about": 88,
4
- "/blog": 42,
5
- "/contact": 31,
6
- "/resources/typography": 4,
7
- "/resources": 13,
8
- "/resources/shortcodes": 14,
9
- "/resources/cards": 19,
10
- "/resources/interactive": 13,
11
- "/resources/grid": 6,
12
- "/forms": 14,
13
- "/resources/effects": 6,
14
- "/blog/hello-world": 28,
15
- "/feedback": 42,
16
- "/resources/dependencies": 2,
17
- "/resources/components": 6,
18
- "/gdpr": 3,
19
- "/scratch": 84,
20
- "/getting-started": 3,
21
- "/resources/pro": 1,
22
- "/todo": 23,
23
- "/thank-you": 1
24
- }