@rr0/cms 0.1.8 → 0.1.10
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/dist/DefaultContentVisitor.d.ts +3 -3
- package/dist/book/Book.d.ts +1 -1
- package/dist/build.js +1 -1
- package/dist/people/People.d.ts +2 -2
- package/dist/place/Place.d.ts +2 -2
- package/dist/science/crypto/ufo/enquete/dossier/CaseFactory.d.ts +2 -2
- package/dist/science/crypto/ufo/enquete/dossier/CaseFactory.js +1 -1
- package/dist/source/PersistentSourceRegistry.d.ts +1 -1
- package/dist/source/Source.d.ts +1 -1
- package/dist/source/SourceFactory.d.ts +1 -1
- package/dist/tech/info/soft/API.d.ts +1 -1
- package/dist/time/datasource/DatasourceTestCase.d.ts +1 -0
- package/dist/time/datasource/DatasourceTestCase.js +11 -3
- package/dist/time/datasource/urecat/UrecatHttpDatasource.d.ts +1 -0
- package/dist/time/datasource/urecat/UrecatHttpDatasource.js +11 -3
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { AllDataService } from "data/AllDataService.js";
|
|
1
|
+
import { AllDataService } from "./data/AllDataService.js";
|
|
2
2
|
import { TimeElementFactory } from "./time/TimeElementFactory.js";
|
|
3
3
|
import { ContentVisitor } from "./RR0ContentStep.js";
|
|
4
4
|
import { HtmlRR0SsgContext } from "./RR0SsgContext.js";
|
|
5
|
-
import { RR0Data } from "data/RR0Data.js";
|
|
5
|
+
import { RR0Data } from "./data/RR0Data.js";
|
|
6
6
|
import { EventRenderer } from "./time/EventRenderer.js";
|
|
7
|
-
import { RR0Event } from "event/RR0Event.js";
|
|
7
|
+
import { RR0Event } from "./event/RR0Event.js";
|
|
8
8
|
export declare class DefaultContentVisitor implements ContentVisitor {
|
|
9
9
|
protected service: AllDataService;
|
|
10
10
|
protected eventRenderer: EventRenderer<RR0Event>;
|
package/dist/book/Book.d.ts
CHANGED
package/dist/build.js
CHANGED
|
@@ -19,7 +19,7 @@ import { OpenGraphCommand } from "./OpenGraphCommand.js";
|
|
|
19
19
|
import { DescriptionReplaceCommand } from "./DescriptionReplaceCommand.js";
|
|
20
20
|
import { BookContentVisitor, BookDirectoryStep } from "./book/index.js";
|
|
21
21
|
import path from "path";
|
|
22
|
-
import { IndexedReplacerFactory } from "index/IndexedReplacerFactory.js";
|
|
22
|
+
import { IndexedReplacerFactory } from "./index/IndexedReplacerFactory.js";
|
|
23
23
|
import { APIFactory, CodeReplacerFactory } from "./tech/index.js";
|
|
24
24
|
import { RR0ContentStep } from "./RR0ContentStep.js";
|
|
25
25
|
import { AllDataService, TypedDataFactory } from "./data/index.js";
|
package/dist/people/People.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Occupation } from "./Occupation.js";
|
|
2
2
|
import { Gender } from "@rr0/common";
|
|
3
3
|
import { CountryCode } from "../org/country/CountryCode.js";
|
|
4
|
-
import { RR0Data } from "data/RR0Data.js";
|
|
5
|
-
import { RR0Event } from "event/RR0Event.js";
|
|
4
|
+
import { RR0Data } from "../data/RR0Data.js";
|
|
5
|
+
import { RR0Event } from "../event/RR0Event.js";
|
|
6
6
|
export declare class People implements RR0Data {
|
|
7
7
|
firstNames: string[];
|
|
8
8
|
lastName: string;
|
package/dist/place/Place.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { RR0Data } from "data/RR0Data.js";
|
|
1
|
+
import { RR0Data } from "../data/RR0Data.js";
|
|
2
2
|
import { PlaceLocation } from "./PlaceLocation.js";
|
|
3
|
-
import { RR0Event } from "event/RR0Event.js";
|
|
3
|
+
import { RR0Event } from "../event/RR0Event.js";
|
|
4
4
|
export type Elevation = {
|
|
5
5
|
elevation: number;
|
|
6
6
|
data?: any;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { TypedDataFactory } from "data/TypedDataFactory.js";
|
|
1
|
+
import { TypedDataFactory } from "../../../../../data/TypedDataFactory.js";
|
|
2
2
|
import { RR0Case } from "./RR0Case.js";
|
|
3
|
-
import { RR0EventFactory } from "event/RR0EventFactory.js";
|
|
3
|
+
import { RR0EventFactory } from "../../../../../event/RR0EventFactory.js";
|
|
4
4
|
export declare class CaseFactory extends TypedDataFactory<RR0Case> {
|
|
5
5
|
constructor(eventFactory: RR0EventFactory);
|
|
6
6
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Source } from "./Source.js";
|
|
2
|
-
import { AllDataService } from "data/AllDataService.js";
|
|
2
|
+
import { AllDataService } from "../data/AllDataService.js";
|
|
3
3
|
import { HttpSource } from "../time/datasource/HttpSource.js";
|
|
4
4
|
import { SourceRegistry } from "./SourceRegistry.js";
|
|
5
5
|
/**
|
package/dist/source/Source.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HtmlRR0SsgContext } from "../RR0SsgContext.js";
|
|
2
2
|
import { Source } from "./Source.js";
|
|
3
|
-
import { AllDataService } from "data/AllDataService.js";
|
|
3
|
+
import { AllDataService } from "../data/AllDataService.js";
|
|
4
4
|
import { HttpSource } from "../time/datasource/HttpSource.js";
|
|
5
5
|
/**
|
|
6
6
|
* Create Source objects.
|
|
@@ -6,6 +6,7 @@ import { RR0CaseMapping } from "./rr0/index.js";
|
|
|
6
6
|
export declare abstract class DatasourceTestCase<S> {
|
|
7
7
|
readonly mapping: RR0CaseMapping<S>;
|
|
8
8
|
readonly sourceCases: S[];
|
|
9
|
+
protected readonly intlOptions: Intl.DateTimeFormatOptions;
|
|
9
10
|
timeTextBuilder: TimeTextBuilder;
|
|
10
11
|
protected constructor(mapping: RR0CaseMapping<S>, sourceCases: S[]);
|
|
11
12
|
checkCaseHTML(context: HtmlRR0SsgContext, nativeCase: S, item: HTMLLIElement, dataDate: Date): void;
|
|
@@ -5,14 +5,22 @@ import { SourceFactory, SourceRenderer } from "../../source/index.js";
|
|
|
5
5
|
import { NoteFileCounter, NoteRenderer } from "../../note/index.js";
|
|
6
6
|
import { AllDataService } from "../../data/index.js";
|
|
7
7
|
import { HttpSource } from "./HttpSource.js";
|
|
8
|
-
import { rr0TestUtil } from "../../test/index.js";
|
|
9
8
|
import { TimeElementFactory } from "../TimeElementFactory.js";
|
|
10
9
|
import { TimeRenderer } from "../TimeRenderer.js";
|
|
11
10
|
export class DatasourceTestCase {
|
|
12
11
|
constructor(mapping, sourceCases) {
|
|
13
12
|
this.mapping = mapping;
|
|
14
13
|
this.sourceCases = sourceCases;
|
|
15
|
-
this.
|
|
14
|
+
this.intlOptions = {
|
|
15
|
+
year: "numeric",
|
|
16
|
+
month: "long",
|
|
17
|
+
day: "numeric",
|
|
18
|
+
weekday: "long",
|
|
19
|
+
hour: "2-digit",
|
|
20
|
+
minute: "2-digit",
|
|
21
|
+
timeZoneName: "short"
|
|
22
|
+
};
|
|
23
|
+
this.timeTextBuilder = new TimeTextBuilder(this.intlOptions);
|
|
16
24
|
}
|
|
17
25
|
checkCaseHTML(context, nativeCase, item, dataDate) {
|
|
18
26
|
const expected = this.mapping.mapper.map(context, nativeCase, dataDate);
|
|
@@ -32,7 +40,7 @@ export class DatasourceTestCase {
|
|
|
32
40
|
const dataService = new AllDataService([]);
|
|
33
41
|
const baseUrl = "https://rr0.org";
|
|
34
42
|
const http = new HttpSource();
|
|
35
|
-
const sourceFactory = new SourceFactory(dataService, http, baseUrl,
|
|
43
|
+
const sourceFactory = new SourceFactory(dataService, http, baseUrl, this.intlOptions);
|
|
36
44
|
const timeElementFactory = new TimeElementFactory(new TimeRenderer([], this.timeTextBuilder));
|
|
37
45
|
const eventRenderer = new CaseSummaryRenderer(new NoteRenderer(new NoteFileCounter()), sourceFactory, new SourceRenderer(this.timeTextBuilder), timeElementFactory);
|
|
38
46
|
const items = [];
|
|
@@ -10,6 +10,7 @@ export declare class UrecatHttpDatasource extends UrecatDatasource {
|
|
|
10
10
|
[key: string]: number;
|
|
11
11
|
};
|
|
12
12
|
protected readonly http: HttpSource;
|
|
13
|
+
protected readonly intlOptions: Intl.DateTimeFormatOptions;
|
|
13
14
|
constructor(baseUrl: URL, searchPath?: string);
|
|
14
15
|
queryUrl(context: RR0SsgContext): URL;
|
|
15
16
|
getWitnesses(witnessesStr: string): UrecatWitness[];
|
|
@@ -1,16 +1,24 @@
|
|
|
1
|
+
import { JSDOM } from "jsdom";
|
|
1
2
|
import { HttpSource } from "../HttpSource.js";
|
|
2
3
|
import { ObjectUtil, UrlUtil } from "../../../util/index.js";
|
|
3
|
-
import { JSDOM } from "jsdom";
|
|
4
4
|
import { TimeTextBuilder } from "../../TimeTextBuilder.js";
|
|
5
5
|
import { MessageUtils } from "../../../lang/index.js";
|
|
6
6
|
import { UrecatDatasource } from "./UrecatDatasource.js";
|
|
7
|
-
import { rr0TestUtil } from "../../../test/index.js";
|
|
8
7
|
export class UrecatHttpDatasource extends UrecatDatasource {
|
|
9
8
|
constructor(baseUrl, searchPath = "ce3") {
|
|
10
9
|
super(["Gross, Patrick"], "URECAT");
|
|
11
10
|
this.baseUrl = baseUrl;
|
|
12
11
|
this.searchPath = searchPath;
|
|
13
12
|
this.http = new HttpSource();
|
|
13
|
+
this.intlOptions = {
|
|
14
|
+
year: "numeric",
|
|
15
|
+
month: "long",
|
|
16
|
+
day: "numeric",
|
|
17
|
+
weekday: "long",
|
|
18
|
+
hour: "2-digit",
|
|
19
|
+
minute: "2-digit",
|
|
20
|
+
timeZoneName: "short"
|
|
21
|
+
};
|
|
14
22
|
}
|
|
15
23
|
queryUrl(context) {
|
|
16
24
|
var _a;
|
|
@@ -103,7 +111,7 @@ export class UrecatHttpDatasource extends UrecatDatasource {
|
|
|
103
111
|
const caseContext = this.getDate(context, url, row);
|
|
104
112
|
const { placeName, departmentOrState, country } = this.getLocation(columns[1]);
|
|
105
113
|
const witnesses = this.getWitnesses(columns[2].textContent);
|
|
106
|
-
const timeStr = new TimeTextBuilder(
|
|
114
|
+
const timeStr = new TimeTextBuilder(this.intlOptions).build(caseContext, true, {
|
|
107
115
|
year: "numeric",
|
|
108
116
|
month: "long",
|
|
109
117
|
day: "numeric",
|