@opentermsarchive/engine 1.2.2 → 1.3.0
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/package.json
CHANGED
|
@@ -31,27 +31,28 @@ export default async function generate({ archivePath, releaseDate }) {
|
|
|
31
31
|
|
|
32
32
|
for await (const version of versionsRepository.iterate()) {
|
|
33
33
|
const { content, fetchDate } = version;
|
|
34
|
-
const { serviceId, termsType } = renamer.applyRules(version.serviceId, version.termsType);
|
|
35
34
|
|
|
36
|
-
|
|
37
|
-
firstVersionDate
|
|
38
|
-
|
|
35
|
+
for (const { serviceId, termsType } of renamer.applyRules(version.serviceId, version.termsType)) {
|
|
36
|
+
if (firstVersionDate > fetchDate) {
|
|
37
|
+
firstVersionDate = fetchDate;
|
|
38
|
+
}
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
if (fetchDate > lastVersionDate) {
|
|
41
|
+
lastVersionDate = fetchDate;
|
|
42
|
+
}
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
services.add(serviceId);
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
const versionPath = generateVersionPath({ serviceId, termsType, fetchDate });
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
logger.info({ message: versionPath, counter: index, hash: version.id });
|
|
49
49
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
50
|
+
archive.stream.append(
|
|
51
|
+
content,
|
|
52
|
+
{ name: `${archive.basename}/${versionPath}` },
|
|
53
|
+
);
|
|
54
|
+
index++;
|
|
55
|
+
}
|
|
55
56
|
}
|
|
56
57
|
|
|
57
58
|
archive.stream.append(
|
|
@@ -18,28 +18,30 @@ export async function loadRules() {
|
|
|
18
18
|
export function applyRules(serviceId, termsType) {
|
|
19
19
|
const renamedServiceId = renamingRules.serviceNames[serviceId];
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
21
|
+
return [].concat(renamedServiceId).map(renamedServiceId => {
|
|
22
|
+
if (renamedServiceId) {
|
|
23
|
+
console.log(`⌙ Rename service "${serviceId}" to "${renamedServiceId}"`);
|
|
24
|
+
serviceId = renamedServiceId;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const renamedTermsType = renamingRules.termsTypes[termsType];
|
|
28
|
+
|
|
29
|
+
if (renamedTermsType) {
|
|
30
|
+
console.log(`⌙ Rename terms type "${termsType}" to "${renamedTermsType}" of "${serviceId}" service`);
|
|
31
|
+
termsType = renamedTermsType;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const renamedServiceTermsType = renamingRules.termsTypesByService[serviceId]
|
|
35
|
+
&& renamingRules.termsTypesByService[serviceId][termsType];
|
|
36
|
+
|
|
37
|
+
if (renamedServiceTermsType) {
|
|
38
|
+
console.log(`⌙ Specific rename terms type "${termsType}" to "${renamedServiceTermsType}" of "${serviceId}" service`);
|
|
39
|
+
termsType = renamedServiceTermsType;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
return {
|
|
43
|
+
serviceId,
|
|
44
|
+
termsType,
|
|
45
|
+
};
|
|
46
|
+
});
|
|
45
47
|
}
|
|
@@ -88,5 +88,10 @@
|
|
|
88
88
|
"XfinityResidentialSubscription": "Xfinity Residential Services",
|
|
89
89
|
"XfinityWebServices": "Xfinity Web Services",
|
|
90
90
|
"Youtube": "YouTube",
|
|
91
|
-
"Verbaudet": "Vertbaudet"
|
|
91
|
+
"Verbaudet": "Vertbaudet",
|
|
92
|
+
"OpenAI": [
|
|
93
|
+
"ChatGPT",
|
|
94
|
+
"DALL·E"
|
|
95
|
+
],
|
|
96
|
+
"Grok": "xAI"
|
|
92
97
|
}
|