@opentermsarchive/engine 10.1.2 → 10.1.3
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
|
@@ -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
|
|