@rr0/cms 0.3.30 → 0.3.31
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/CMSGenerator.d.ts
CHANGED
|
@@ -86,7 +86,7 @@ export declare class CMSGenerator implements CMSContext {
|
|
|
86
86
|
timeElementFactory: TimeElementFactory;
|
|
87
87
|
timeReplacer: TimeReplacer;
|
|
88
88
|
};
|
|
89
|
-
protected
|
|
89
|
+
protected setupPeople(context: RR0ContextImpl, peopleRenderer: PeopleHtmlRenderer, copies: string[]): Promise<{
|
|
90
90
|
peopleService: PeopleService;
|
|
91
91
|
peopleSteps: import("./people/PeopleDirectoryStep.js").PeopleDirectoryStep[];
|
|
92
92
|
copies: string[];
|
package/dist/CMSGenerator.js
CHANGED
|
@@ -88,9 +88,19 @@ export class CMSGenerator {
|
|
|
88
88
|
const timeRenderer = this.timeRenderer;
|
|
89
89
|
const timeFormat = this.options.timeFormat;
|
|
90
90
|
const { timeFiles, timeElementFactory, timeReplacer } = this.setupTime(context);
|
|
91
|
+
const orgFactory = dataService.factories.find(f => f.type === "org");
|
|
92
|
+
if (orgFactory) {
|
|
93
|
+
const orgFiles = await orgFactory.getFiles();
|
|
94
|
+
context.setVar("orgFilesCount", orgFiles.length);
|
|
95
|
+
}
|
|
96
|
+
const placeFactory = dataService.factories.find(f => f.type === "place");
|
|
97
|
+
if (placeFactory) {
|
|
98
|
+
const placeFiles = await placeFactory.getFiles();
|
|
99
|
+
context.setVar("placeFilesCount", placeFiles.length);
|
|
100
|
+
}
|
|
91
101
|
const { caseService, ufoCasesStep } = await this.setupCases(timeElementFactory);
|
|
92
102
|
const peopleRenderer = new PeopleHtmlRenderer();
|
|
93
|
-
const { peopleService, peopleSteps } = await this.
|
|
103
|
+
const { peopleService, peopleSteps } = await this.setupPeople(context, peopleRenderer, this.options.copies);
|
|
94
104
|
const timeTextBuilder = this.timeTextBuilder;
|
|
95
105
|
const searchVisitor = new SearchVisitor({ notIndexedUrls: ["404.html", "Referencement.html"], indexWords: false }, timeTextBuilder);
|
|
96
106
|
const { sourceRenderer, sourceFactory, sourceReplacerFactory } = this.setupSources(timeTextBuilder, timeFormat);
|
|
@@ -221,7 +231,7 @@ export class CMSGenerator {
|
|
|
221
231
|
const timeReplacer = new TimeReplacer(timeElementFactory);
|
|
222
232
|
return { timeFiles, timeElementFactory, timeReplacer };
|
|
223
233
|
}
|
|
224
|
-
async
|
|
234
|
+
async setupPeople(context, peopleRenderer, copies) {
|
|
225
235
|
const peopleFiles = await this.peopleFactory.getFiles();
|
|
226
236
|
const peopleService = new PeopleService(this.dataService, this.peopleFactory, { files: peopleFiles, rootDir: "people" });
|
|
227
237
|
const peopleList = await peopleService.getAll();
|
|
@@ -10,7 +10,7 @@ describe("PeopleReplacer", () => {
|
|
|
10
10
|
path.join(rootDir, "b/BeauJerome"),
|
|
11
11
|
path.join(rootDir, "h/HynekJosefAllen"),
|
|
12
12
|
path.join(rootDir, "r/ReaganRonald"),
|
|
13
|
-
path.join(rootDir, "v/VertongenJeanLuc")
|
|
13
|
+
path.join(rootDir, "v/VertongenJeanLuc")
|
|
14
14
|
];
|
|
15
15
|
const peopleFactory = new PeopleFactory(new RR0EventFactory());
|
|
16
16
|
function createPeopleElement(context, content, title) {
|
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.31",
|
|
6
6
|
"description": "RR0 Content Management System (CMS)",
|
|
7
7
|
"exports": "./dist/index.js",
|
|
8
8
|
"types": "./dist/index.d.ts",
|
|
@@ -24,7 +24,7 @@
|
|
|
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": {
|