@scalemule/news-publication 0.0.16 → 0.0.18
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 +13 -0
- package/dist/{chunk-QWK6G2UF.js → chunk-2IYYEFLD.js} +147 -2
- package/dist/{chunk-WZ3NQRQO.js → chunk-3MFKPHO3.js} +1 -1
- package/dist/{chunk-5YQYJ2L2.js → chunk-HTMIFWNA.js} +2 -1
- package/dist/{chunk-7TBML5Q7.js → chunk-QBT66OVE.js} +14 -3
- package/dist/cookie-consent-banner.cjs +132 -0
- package/dist/cookie-consent-banner.js +2 -2
- package/dist/cookie-settings-view.cjs +98 -0
- package/dist/cookie-settings-view.js +2 -2
- package/dist/index.cjs +212 -103
- package/dist/index.d.cts +12 -4
- package/dist/index.d.ts +12 -4
- package/dist/index.js +56 -6
- package/dist/network-bar.cjs +55 -0
- package/dist/network-bar.js +2 -3
- package/dist/network.cjs +15 -0
- package/dist/network.d.cts +3 -1
- package/dist/network.d.ts +3 -1
- package/dist/network.js +1 -2
- package/dist/{snapshot-sHgQHuAF.d.ts → snapshot-OZFP3-Up.d.cts} +13 -0
- package/dist/{snapshot-sHgQHuAF.d.cts → snapshot-OZFP3-Up.d.ts} +13 -0
- package/dist/snapshot-file.d.cts +1 -1
- package/dist/snapshot-file.d.ts +1 -1
- package/package.json +2 -2
- package/dist/chunk-5W4EMBFY.js +0 -106
package/dist/network.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export { communityPublications, findPublicationByHost, findPublicationBySlug, getNetworkPublicationUrl, listedPublications, localPublications } from './chunk-
|
|
2
|
-
import './chunk-QWK6G2UF.js';
|
|
1
|
+
export { communityPublications, findPublicationByHost, findPublicationBySlug, getNetworkPublicationUrl, isNetworkHostname, listedPublications, localPublications } from './chunk-2IYYEFLD.js';
|
|
@@ -145,6 +145,19 @@ type NewsArticle = NewsItem & {
|
|
|
145
145
|
duration_ms?: number | null;
|
|
146
146
|
};
|
|
147
147
|
metadata?: {
|
|
148
|
+
editorial_origin?: 'UNKNOWN' | 'ORIGINAL_REPORTING' | 'DOCUMENT_REPORTING' | 'PRESS_RELEASE_BASED' | 'NEWS_PICKUP' | 'ANALYSIS' | 'COMMENTARY' | 'LICENSED_WIRE' | 'NETWORK_SYNDICATED' | 'COMMUNITY_SUBMISSION';
|
|
149
|
+
reporting?: {
|
|
150
|
+
edition_id: string;
|
|
151
|
+
story_id: string;
|
|
152
|
+
story_revision: number;
|
|
153
|
+
originating_publication_id: string;
|
|
154
|
+
original_byline?: string;
|
|
155
|
+
credit?: string;
|
|
156
|
+
related_links?: string[];
|
|
157
|
+
wire_credit?: string;
|
|
158
|
+
canonical_origin?: string;
|
|
159
|
+
origin?: string;
|
|
160
|
+
};
|
|
148
161
|
cover_image?: CoverImageMetadata;
|
|
149
162
|
citations?: ArticleCitation[];
|
|
150
163
|
resources?: {
|
|
@@ -145,6 +145,19 @@ type NewsArticle = NewsItem & {
|
|
|
145
145
|
duration_ms?: number | null;
|
|
146
146
|
};
|
|
147
147
|
metadata?: {
|
|
148
|
+
editorial_origin?: 'UNKNOWN' | 'ORIGINAL_REPORTING' | 'DOCUMENT_REPORTING' | 'PRESS_RELEASE_BASED' | 'NEWS_PICKUP' | 'ANALYSIS' | 'COMMENTARY' | 'LICENSED_WIRE' | 'NETWORK_SYNDICATED' | 'COMMUNITY_SUBMISSION';
|
|
149
|
+
reporting?: {
|
|
150
|
+
edition_id: string;
|
|
151
|
+
story_id: string;
|
|
152
|
+
story_revision: number;
|
|
153
|
+
originating_publication_id: string;
|
|
154
|
+
original_byline?: string;
|
|
155
|
+
credit?: string;
|
|
156
|
+
related_links?: string[];
|
|
157
|
+
wire_credit?: string;
|
|
158
|
+
canonical_origin?: string;
|
|
159
|
+
origin?: string;
|
|
160
|
+
};
|
|
148
161
|
cover_image?: CoverImageMetadata;
|
|
149
162
|
citations?: ArticleCitation[];
|
|
150
163
|
resources?: {
|
package/dist/snapshot-file.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as PublicationSnapshot, S as SnapshotHooks, a as SyncedPublication } from './snapshot-
|
|
1
|
+
import { P as PublicationSnapshot, S as SnapshotHooks, a as SyncedPublication } from './snapshot-OZFP3-Up.cjs';
|
|
2
2
|
|
|
3
3
|
declare function readSnapshotFile(file: string): Promise<PublicationSnapshot | null>;
|
|
4
4
|
/**
|
package/dist/snapshot-file.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as PublicationSnapshot, S as SnapshotHooks, a as SyncedPublication } from './snapshot-
|
|
1
|
+
import { P as PublicationSnapshot, S as SnapshotHooks, a as SyncedPublication } from './snapshot-OZFP3-Up.js';
|
|
2
2
|
|
|
3
3
|
declare function readSnapshotFile(file: string): Promise<PublicationSnapshot | null>;
|
|
4
4
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scalemule/news-publication",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.18",
|
|
4
4
|
"description": "Shared server framework for ScaleMule local news publications. Walnut Creek Times is the broadsheet default; each paper supplies its own identity and feature flags.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -123,6 +123,6 @@
|
|
|
123
123
|
"registry": "https://registry.npmjs.org/"
|
|
124
124
|
},
|
|
125
125
|
"dependencies": {
|
|
126
|
-
"@scalemule/compliance": "^0.0.
|
|
126
|
+
"@scalemule/compliance": "^0.0.5"
|
|
127
127
|
}
|
|
128
128
|
}
|
package/dist/chunk-5W4EMBFY.js
DELETED
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import { decorateNetworkUrl } from './chunk-QWK6G2UF.js';
|
|
2
|
-
|
|
3
|
-
// src/network.ts
|
|
4
|
-
var localPublications = [
|
|
5
|
-
{
|
|
6
|
-
slug: "bayareachronicle",
|
|
7
|
-
name: "Bay Area Chronicle",
|
|
8
|
-
url: "https://bayareachronicle.com",
|
|
9
|
-
area: "San Francisco Bay Area",
|
|
10
|
-
description: "The parent home for our local community publications."
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
slug: "concordchronicle",
|
|
14
|
-
name: "Concord Chronicle",
|
|
15
|
-
url: "https://concordchronicle.com",
|
|
16
|
-
area: "Concord",
|
|
17
|
-
description: "A new place for Concord\u2019s local stories, independent businesses and community voices."
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
slug: "walnutcreektimes",
|
|
21
|
-
name: "Walnut Creek Times",
|
|
22
|
-
url: "https://walnutcreektimes.com",
|
|
23
|
-
area: "Walnut Creek \xB7 Rossmoor \xB7 Saranap \xB7 Pleasant Hill",
|
|
24
|
-
description: "A new place for Walnut Creek\u2019s local stories, independent businesses and community voices."
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
slug: "lamorindapost",
|
|
28
|
-
name: "Lamorinda Post",
|
|
29
|
-
url: "https://lamorindapost.com",
|
|
30
|
-
area: "Orinda \xB7 Lafayette \xB7 Moraga",
|
|
31
|
-
description: "A new home for the neighbors, businesses and community stories of Lamorinda."
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
slug: "alamoweekly",
|
|
35
|
-
name: "Alamo Weekly",
|
|
36
|
-
url: "https://alamoweekly.com",
|
|
37
|
-
area: "Alamo",
|
|
38
|
-
description: "A new place for Alamo\u2019s local stories, independent businesses and community voices."
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
slug: "danvilletimes",
|
|
42
|
-
name: "Danville Times",
|
|
43
|
-
url: "https://danvilletimes.com",
|
|
44
|
-
area: "Danville",
|
|
45
|
-
description: "A new place for Danville\u2019s local stories, independent businesses and community voices."
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
slug: "sanramontimes",
|
|
49
|
-
name: "San Ramon Times",
|
|
50
|
-
url: "https://sanramontimes.com",
|
|
51
|
-
area: "San Ramon",
|
|
52
|
-
description: "A new place for San Ramon\u2019s local stories, independent businesses and community voices."
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
slug: "diablovalleynews",
|
|
56
|
-
name: "Diablo Valley News",
|
|
57
|
-
url: "https://diablovalleynews.com",
|
|
58
|
-
area: "Concord \xB7 Walnut Creek \xB7 Pleasant Hill \xB7 Alamo \xB7 Danville \xB7 San Ramon",
|
|
59
|
-
description: "Local stories about the people, businesses and community life of the Diablo Valley."
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
slug: "trivalleyweekly",
|
|
63
|
-
name: "Tri-Valley Weekly",
|
|
64
|
-
url: "https://trivalleyweekly.com",
|
|
65
|
-
area: "Alamo \xB7 Danville \xB7 San Ramon \xB7 Dublin \xB7 Pleasanton \xB7 Livermore",
|
|
66
|
-
description: "Local stories about the businesses, people and community life of the Tri-Valley."
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
slug: "eastbaypost",
|
|
70
|
-
name: "East Bay Post",
|
|
71
|
-
url: "https://eastbaypost.com",
|
|
72
|
-
area: "The East Bay",
|
|
73
|
-
description: "A new publication connecting the people and neighborhoods of the East Bay."
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
slug: "napagate",
|
|
77
|
-
name: "Napa Gate",
|
|
78
|
-
url: "https://napagate.com",
|
|
79
|
-
area: "Napa Valley",
|
|
80
|
-
description: "A new local publication for the people, places and everyday life of Napa Valley.",
|
|
81
|
-
listed: false
|
|
82
|
-
}
|
|
83
|
-
];
|
|
84
|
-
var listedPublications = localPublications.filter(
|
|
85
|
-
(publication) => !("listed" in publication) || publication.listed
|
|
86
|
-
);
|
|
87
|
-
var communityPublications = listedPublications.filter(
|
|
88
|
-
(publication) => publication.slug !== "bayareachronicle"
|
|
89
|
-
);
|
|
90
|
-
function findPublicationBySlug(slug) {
|
|
91
|
-
return localPublications.find((p) => p.slug === slug);
|
|
92
|
-
}
|
|
93
|
-
function findPublicationByHost(host) {
|
|
94
|
-
const cleanHost = host.replace(/^https?:\/\//, "").replace(/\/.*$/, "").toLowerCase();
|
|
95
|
-
return localPublications.find((p) => {
|
|
96
|
-
const pubHost = p.url.replace(/^https?:\/\//, "").replace(/\/.*$/, "").toLowerCase();
|
|
97
|
-
return pubHost === cleanHost || cleanHost.startsWith(`${p.slug}.`);
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
function getNetworkPublicationUrl(slug) {
|
|
101
|
-
const pub = findPublicationBySlug(slug);
|
|
102
|
-
if (!pub) return null;
|
|
103
|
-
return decorateNetworkUrl(pub.url + "/");
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
export { communityPublications, findPublicationByHost, findPublicationBySlug, getNetworkPublicationUrl, listedPublications, localPublications };
|