← back to Rentv
auto-save: 2026-08-04T20:06:17 (6 files) — data/markets.json data/news.json data/ticker.json scripts/build-news-archive.mjs scripts/pull-cre-news.mjs
2c32774c277fc85e49f06bb8f50417af134796c0 · 2026-08-04 20:06:19 -0700 · Steve Abrams
Files touched
M data/markets.jsonM data/news.jsonM data/ticker.jsonM scripts/build-news-archive.mjsM scripts/pull-cre-news.mjsM server.js
Diff
commit 2c32774c277fc85e49f06bb8f50417af134796c0
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Tue Aug 4 20:06:19 2026 -0700
auto-save: 2026-08-04T20:06:17 (6 files) — data/markets.json data/news.json data/ticker.json scripts/build-news-archive.mjs scripts/pull-cre-news.mjs
---
data/markets.json | 2 +-
data/news.json | 2 +-
data/ticker.json | 2 +-
scripts/build-news-archive.mjs | 2 +-
scripts/pull-cre-news.mjs | 2 +-
server.js | 8 +++++---
6 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/data/markets.json b/data/markets.json
index 92a9ce90..d7d386f7 100644
--- a/data/markets.json
+++ b/data/markets.json
@@ -1,5 +1,5 @@
{
- "fetched_at": "2026-08-05T02:33:27.695Z",
+ "fetched_at": "2026-08-05T02:53:28.857Z",
"source": "Yahoo Finance — live (CBOE Treasury yields, Dow Jones/MSCI REIT indices)",
"curve": [
{
diff --git a/data/news.json b/data/news.json
index 9347a90d..14c2846a 100644
--- a/data/news.json
+++ b/data/news.json
@@ -1,6 +1,6 @@
{
"source": "rentv.com — live",
- "fetched_at": "2026-08-05T02:33:27.463Z",
+ "fetched_at": "2026-08-05T02:53:28.488Z",
"count": 30,
"items": [
{
diff --git a/data/ticker.json b/data/ticker.json
index 982cc232..c20c951c 100644
--- a/data/ticker.json
+++ b/data/ticker.json
@@ -1,5 +1,5 @@
{
- "fetched_at": "2026-08-05T02:33:27.669Z",
+ "fetched_at": "2026-08-05T02:53:28.831Z",
"la_office_vac": {
"label": "LA OFFICE VAC",
"value": "23.1%",
diff --git a/scripts/build-news-archive.mjs b/scripts/build-news-archive.mjs
index 8e463455..870a6d32 100644
--- a/scripts/build-news-archive.mjs
+++ b/scripts/build-news-archive.mjs
@@ -83,6 +83,6 @@ for (let id = newest; id > newest - DEPTH && id > 0; id--) {
await sleep(DELAY);
}
-const out = [...byId.values()].sort((a, b) => String(b.date || b.first_seen || '').localeCompare(String(a.date || a.first_seen || '')));
+const out = [...byId.values()].sort((a, b) => String(b.date || b.first_seen || '').localeCompare(String(a.date || a.first_seen || ''))).slice(0, 2000); // cap: newest 2000, no unbounded growth
writeFileSync(join(DATA, 'news-archive.json'), JSON.stringify(out, null, 1));
console.log(`OK: archive now ${out.length} articles (+${added} this run, scanned ${scanned}, newest id ${newest}).`);
diff --git a/scripts/pull-cre-news.mjs b/scripts/pull-cre-news.mjs
index 1a35e033..89b61597 100644
--- a/scripts/pull-cre-news.mjs
+++ b/scripts/pull-cre-news.mjs
@@ -93,7 +93,7 @@ for (const src of (cfg.sources || [])) {
await sleep(300);
}
-const out = [...byId.values()].sort((a, b) => String(b.date || b.first_seen || '').localeCompare(String(a.date || a.first_seen || '')));
+const out = [...byId.values()].sort((a, b) => String(b.date || b.first_seen || '').localeCompare(String(a.date || a.first_seen || ''))).slice(0, 2000); // cap: newest 2000, no unbounded growth
writeFileSync(join(DATA, 'news-archive.json'), JSON.stringify(out, null, 1));
const bySource = {}; out.forEach((x) => { bySource[x.source || 'RENTV'] = (bySource[x.source || 'RENTV'] || 0) + 1; });
console.log(`OK: archive now ${out.length} articles (+${added} new external, scanned ${seen}). Top sources:`, Object.entries(bySource).sort((a, b) => b[1] - a[1]).slice(0, 8).map(([s, n]) => `${s}:${n}`).join(', '));
diff --git a/server.js b/server.js
index 6b848c24..5873a0e3 100644
--- a/server.js
+++ b/server.js
@@ -248,13 +248,15 @@ app.post('/api/posts', adminOnly, async (req, res) => {
if (image && /^https?:\/\//i.test(image)) image = await localizeImage(image);
// Copyright policy (Option 1): a story sourced from an OUTSIDE wire can never auto-publish live —
// it is forced to draft server-side regardless of the requested status. Only RENTV-origin publishes.
- const src = clean(b.source, 80);
+ // Absent source = hand-authored original RENTV content (publishable). A named OUTSIDE wire
+ // can never auto-publish — forced to draft. Source is STORED so provenance survives edits.
+ const src = clean(b.source, 80) || 'RENTV';
let status = b.status === 'published' ? 'published' : 'draft';
- if (src && src !== 'RENTV') status = 'draft';
+ if (src !== 'RENTV') status = 'draft';
const post = {
id: 'rp' + Date.now().toString(36),
title: clean(b.title, 200), cat: clean(b.cat, 40) || 'RENTV', author: clean(b.author, 80) || 'RENTV Staff',
- dek: clean(b.dek, 300), image,
+ dek: clean(b.dek, 300), image, source: src,
body: clean(b.body, 40000), status,
created_at: now, updated_at: now,
};
← 163f9fff Content Studio: copyright Option 1 — outside-wire stories sa
·
back to Rentv
·
auto-save: 2026-08-04T20:36:27 (3 files) — data/markets.json 658d67eb →