@rr0/cms 0.3.15 → 0.3.17
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/{BuildContext.d.ts → CMSContext.d.ts} +1 -1
- package/dist/{RR0Build.d.ts → CMSGenerator.d.ts} +30 -10
- package/dist/{RR0Build.js → CMSGenerator.js} +92 -91
- package/dist/CMSGenerator.test.d.ts +1 -0
- package/dist/{RR0Build.test.js → CMSGenerator.test.js} +39 -27
- package/dist/{DefaultContentVisitor.d.ts → DataContentVisitor.d.ts} +4 -1
- package/dist/{DefaultContentVisitor.js → DataContentVisitor.js} +4 -1
- package/dist/OpenGraphCommand.js +1 -1
- package/dist/RR0Context.d.ts +4 -1
- package/dist/RR0Context.js +3 -2
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -2
- package/dist/org/eu/fr/cnes/geipan/geipan/GeipanFileDatasource.d.ts +1 -1
- package/dist/org/eu/fr/cnes/geipan/geipan/GeipanRR0Mapping.d.ts +2 -2
- package/dist/search/SearchVisitor.js +1 -2
- package/dist/test/RR0TestUtil.d.ts +2 -2
- package/dist/test/RR0TestUtil.js +1 -1
- package/dist/time/SsiTitleReplaceCommand.d.ts +4 -0
- package/dist/time/SsiTitleReplaceCommand.js +16 -11
- package/dist/time/TimeDirectoryStep.d.ts +46 -0
- package/dist/time/TimeDirectoryStep.js +88 -0
- package/dist/time/TimeDirectoryStep.test.js +36 -0
- package/dist/time/TimeService.d.ts +1 -3
- package/dist/time/TimeService.js +4 -11
- package/dist/time/datasource/CsvFileSource.d.ts +1 -1
- package/dist/time/datasource/CsvMapper.d.ts +5 -3
- package/dist/time/datasource/CsvMapper.js +17 -12
- package/dist/time/datasource/CsvMapper.test.js +29 -0
- package/dist/time/datasource/FileSource.d.ts +1 -1
- package/dist/time/datasource/FileSource.js +1 -0
- package/dist/time/datasource/baseovnifrance/BaseOvniFranceRR0Mapping.d.ts +2 -2
- package/dist/time/datasource/fufora/FuforaRR0Mapping.d.ts +2 -2
- package/dist/time/datasource/nuforc/NuforcRR0Mapping.d.ts +2 -2
- package/dist/time/datasource/rr0/RR0CaseMapping.d.ts +2 -2
- package/dist/time/datasource/rr0/RR0Datasource.d.ts +0 -3
- package/dist/time/datasource/rr0/RR0Datasource.js +3 -6
- package/dist/time/datasource/rr0/RR0Datasource.test.d.ts +2 -2
- package/dist/time/datasource/rr0/RR0Datasource.test.js +4 -2
- package/dist/time/datasource/rr0/RR0FileDatasource.d.ts +1 -1
- package/dist/time/datasource/rr0/RR0FileDatasource.test.d.ts +1 -0
- package/dist/time/datasource/rr0/RR0FileDatasource.test.js +14 -0
- package/dist/time/datasource/rr0/RR0Mapping.d.ts +2 -2
- package/dist/time/datasource/sceau/SceauDatasource.test.d.ts +2 -2
- package/dist/time/datasource/sceau/SceauRR0Mapping.d.ts +2 -2
- package/dist/time/datasource/ufo-search/UfoSearchMapping.d.ts +2 -2
- package/dist/time/datasource/urecat/UrecatRR0Mapping.d.ts +2 -2
- package/dist/time/html/TimeRenderer.js +3 -2
- package/dist/time/html/TimeReplacer.test.js +0 -1
- package/package.json +4 -4
- /package/dist/{BuildContext.js → CMSContext.js} +0 -0
- /package/dist/{RR0Build.test.d.ts → time/TimeDirectoryStep.test.d.ts} +0 -0
|
@@ -5,7 +5,7 @@ import { TimeTextBuilder } from "../../text/TimeTextBuilder.js";
|
|
|
5
5
|
import { HtmlRR0Context } from "../../../RR0Context.js";
|
|
6
6
|
import { SceauCaseSummaryRR0Mapper } from "./SceauCaseSummaryRR0Mapper";
|
|
7
7
|
import { ChronologyReplacerActions } from "../ChronologyReplacerActions";
|
|
8
|
-
import {
|
|
8
|
+
import { CMSContext } from "../../../CMSContext";
|
|
9
9
|
export declare class SceauTestDatasource extends SceauDatasource {
|
|
10
10
|
timeTextBuilder: TimeTextBuilder;
|
|
11
11
|
constructor();
|
|
@@ -16,5 +16,5 @@ export declare class SceauTestMapping implements SceauCaseMapping {
|
|
|
16
16
|
datasource: import("./SceauHttpDatasource.js").SceauHttpDatasource;
|
|
17
17
|
mapper: SceauCaseSummaryRR0Mapper;
|
|
18
18
|
constructor(actions?: ChronologyReplacerActions);
|
|
19
|
-
init(build:
|
|
19
|
+
init(build: CMSContext): this;
|
|
20
20
|
}
|
|
@@ -3,12 +3,12 @@ import { RR0CaseMapping } from "../rr0/index.js";
|
|
|
3
3
|
import { SceauCaseSummary } from "./SceauCaseSummary.js";
|
|
4
4
|
import { ChronologyReplacerActions } from "../ChronologyReplacerActions.js";
|
|
5
5
|
import { SceauCaseSummaryRR0Mapper } from "./SceauCaseSummaryRR0Mapper.js";
|
|
6
|
-
import {
|
|
6
|
+
import { CMSContext } from "../../../CMSContext";
|
|
7
7
|
export declare const sceauDatasource: SceauHttpDatasource;
|
|
8
8
|
export declare class SceauRR0Mapping implements RR0CaseMapping<SceauCaseSummary> {
|
|
9
9
|
readonly actions: ChronologyReplacerActions;
|
|
10
10
|
datasource: SceauHttpDatasource;
|
|
11
11
|
mapper: SceauCaseSummaryRR0Mapper;
|
|
12
12
|
constructor(actions: ChronologyReplacerActions);
|
|
13
|
-
init(build:
|
|
13
|
+
init(build: CMSContext): this;
|
|
14
14
|
}
|
|
@@ -4,7 +4,7 @@ import { UfoSearchCaseRR0Mapper } from "./UfoSearchCaseRR0Mapper.js";
|
|
|
4
4
|
import { ChronologyReplacerActions } from "../ChronologyReplacerActions.js";
|
|
5
5
|
import { RR0CaseMapping } from "../rr0";
|
|
6
6
|
import { UfoSearchCase } from "./UfoSearchCase";
|
|
7
|
-
import {
|
|
7
|
+
import { CMSContext } from "../../../CMSContext";
|
|
8
8
|
export declare const ufoSearchHttpDatasource: UfoSearchHttpDatasource;
|
|
9
9
|
export declare class UfoSearchRR0Mapping implements RR0CaseMapping<UfoSearchCase> {
|
|
10
10
|
readonly actions: ChronologyReplacerActions;
|
|
@@ -12,5 +12,5 @@ export declare class UfoSearchRR0Mapping implements RR0CaseMapping<UfoSearchCase
|
|
|
12
12
|
backupDatasource: UfoSearchFileDatasource;
|
|
13
13
|
mapper: UfoSearchCaseRR0Mapper;
|
|
14
14
|
constructor(actions: ChronologyReplacerActions);
|
|
15
|
-
init(build:
|
|
15
|
+
init(build: CMSContext): this;
|
|
16
16
|
}
|
|
@@ -3,12 +3,12 @@ import { UrecatHttpDatasource } from "./UrecatHttpDatasource.js";
|
|
|
3
3
|
import { ChronologyReplacerActions } from "../ChronologyReplacerActions.js";
|
|
4
4
|
import { RR0CaseMapping } from "../rr0";
|
|
5
5
|
import { UrecatCase } from "./UrecatCase";
|
|
6
|
-
import {
|
|
6
|
+
import { CMSContext } from "../../../CMSContext";
|
|
7
7
|
export declare const urecatDatasource: UrecatHttpDatasource;
|
|
8
8
|
export declare class UrecatRR0Mapping implements RR0CaseMapping<UrecatCase> {
|
|
9
9
|
readonly actions: ChronologyReplacerActions;
|
|
10
10
|
datasource: UrecatHttpDatasource;
|
|
11
11
|
mapper: UrecatRR0Mapper;
|
|
12
12
|
constructor(actions: ChronologyReplacerActions);
|
|
13
|
-
init(build:
|
|
13
|
+
init(build: CMSContext): this;
|
|
14
14
|
}
|
|
@@ -20,14 +20,15 @@ export class TimeRenderer {
|
|
|
20
20
|
}
|
|
21
21
|
renderContent(context, previousContext, options, renderOptions = this.textBuilder.options) {
|
|
22
22
|
const time = context.time;
|
|
23
|
-
const
|
|
23
|
+
const date = time.date;
|
|
24
|
+
const absoluteTimeUrl = this.urlBuilder.fromEdtf(date);
|
|
24
25
|
const title = this.textBuilder.build(context, renderOptions);
|
|
25
26
|
const text = (previousContext ? this.relativeTextBuilder.build(previousContext, context) : undefined) || title;
|
|
26
27
|
const file = context.file;
|
|
27
28
|
const currentFileName = file.name;
|
|
28
29
|
const doc = file.document;
|
|
29
30
|
let replacement;
|
|
30
|
-
const timeEl = TimeReplacer.resolvedTime(context,
|
|
31
|
+
const timeEl = TimeReplacer.resolvedTime(context, date.toString());
|
|
31
32
|
if (title !== text) {
|
|
32
33
|
timeEl.title = title;
|
|
33
34
|
}
|
|
@@ -22,7 +22,6 @@ describe("TimeReplacer", async () => {
|
|
|
22
22
|
path.join(timeRoot, "2/0/0/7/06/15/index.html")
|
|
23
23
|
]
|
|
24
24
|
};
|
|
25
|
-
const timeService = await rr0TestUtil.time.getService(timeOptions);
|
|
26
25
|
const textBuilder = new TimeTextBuilder(rr0TestUtil.intlOptions);
|
|
27
26
|
const timeRenderer = new TimeRenderer(rr0TestUtil.time.urlBuilder, textBuilder);
|
|
28
27
|
const timeElementFactory = new TimeElementFactory(timeRenderer);
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@rr0/cms",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"author": "Jérôme Beau <rr0@rr0.org> (https://rr0.org)",
|
|
5
|
-
"version": "0.3.
|
|
5
|
+
"version": "0.3.17",
|
|
6
6
|
"description": "RR0 Content Management System (CMS)",
|
|
7
7
|
"exports": "./dist/index.js",
|
|
8
8
|
"types": "./dist/index.d.ts",
|
|
@@ -24,16 +24,16 @@
|
|
|
24
24
|
"build": "rm -Rf dist && tsc --project tsconfig.prod.json",
|
|
25
25
|
"prepublishOnly": "npm run build",
|
|
26
26
|
"test": "testscript",
|
|
27
|
-
"test-one": "rm -Rf out && tsx src/
|
|
27
|
+
"test-one": "rm -Rf out && tsx src/CMSGenerator.test.ts",
|
|
28
28
|
"test-ci": "rm -Rf out && testscript"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@javarome/fileutil": "^0.3.6",
|
|
32
32
|
"@rr0/common": "^1.1.3",
|
|
33
|
-
"@rr0/data": "^0.3.
|
|
33
|
+
"@rr0/data": "^0.3.18",
|
|
34
34
|
"@rr0/lang": "^0.1.12",
|
|
35
35
|
"@rr0/place": "^0.5.2",
|
|
36
|
-
"@rr0/time": "^0.
|
|
36
|
+
"@rr0/time": "^0.11.0",
|
|
37
37
|
"canvas": "^2.11.2",
|
|
38
38
|
"csv-parser": "^3.0.0",
|
|
39
39
|
"glob": "^11.0.0",
|
|
File without changes
|
|
File without changes
|