@opentermsarchive/engine 10.1.2 → 10.2.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/config/default.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentermsarchive/engine",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.2.0",
|
|
4
4
|
"description": "Tracks and makes visible changes to the terms of online services",
|
|
5
5
|
"homepage": "https://opentermsarchive.org",
|
|
6
6
|
"bugs": {
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
"supertest": "^7.1.4"
|
|
114
114
|
},
|
|
115
115
|
"peerDependencies": {
|
|
116
|
-
"@opentermsarchive/terms-types": "^2.
|
|
116
|
+
"@opentermsarchive/terms-types": "^2.2.0"
|
|
117
117
|
},
|
|
118
118
|
"engines": {
|
|
119
119
|
"node": ">=20 <=24"
|
|
@@ -41,11 +41,21 @@ function loadConfiguration() {
|
|
|
41
41
|
const organizationIdOrSlug = config.has('@opentermsarchive/engine.dataset.datagouv.organizationIdOrSlug') && config.get('@opentermsarchive/engine.dataset.datagouv.organizationIdOrSlug');
|
|
42
42
|
|
|
43
43
|
if (!datasetId && !organizationIdOrSlug) {
|
|
44
|
-
throw new Error('Either datasetId or organizationIdOrSlug is required in config at @opentermsarchive/engine.dataset.datagouv');
|
|
44
|
+
throw new Error('Either "datasetId" or "organizationIdOrSlug" is required in config at @opentermsarchive/engine.dataset.datagouv');
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
const datasetTitle = config.get('@opentermsarchive/engine.dataset.title');
|
|
48
|
+
|
|
49
|
+
if (!datasetTitle) {
|
|
50
|
+
throw new Error('"title" is required in config at @opentermsarchive/engine.dataset');
|
|
51
|
+
}
|
|
52
|
+
|
|
48
53
|
const frequency = config.has('@opentermsarchive/engine.dataset.datagouv.frequency') && config.get('@opentermsarchive/engine.dataset.datagouv.frequency');
|
|
54
|
+
|
|
55
|
+
if (!frequency) {
|
|
56
|
+
throw new Error('"frequency" is required in config at @opentermsarchive/engine.dataset.datagouv');
|
|
57
|
+
}
|
|
58
|
+
|
|
49
59
|
const useDemo = config.has('@opentermsarchive/engine.dataset.datagouv.useDemo') && config.get('@opentermsarchive/engine.dataset.datagouv.useDemo');
|
|
50
60
|
const apiBaseUrl = useDemo ? DEMO_API_BASE_URL : PRODUCTION_API_BASE_URL;
|
|
51
61
|
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import config from 'config';
|
|
2
|
-
|
|
3
1
|
import logger from '../logger/index.js';
|
|
4
2
|
|
|
5
3
|
import publishDataGouv from './datagouv/index.js';
|
|
@@ -16,7 +14,7 @@ export default async function publishRelease({ archivePath, releaseDate, stats }
|
|
|
16
14
|
platforms.push({ name: 'GitLab', publish: () => publishGitLab({ archivePath, releaseDate, stats }) });
|
|
17
15
|
}
|
|
18
16
|
|
|
19
|
-
if (process.env.OTA_ENGINE_DATAGOUV_API_KEY
|
|
17
|
+
if (process.env.OTA_ENGINE_DATAGOUV_API_KEY) {
|
|
20
18
|
platforms.push({ name: 'data.gouv.fr', publish: () => publishDataGouv({ archivePath, releaseDate, stats }) });
|
|
21
19
|
}
|
|
22
20
|
|