@opentermsarchive/engine 10.1.1 → 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.
@@ -56,8 +56,6 @@
56
56
  }
57
57
  },
58
58
  "dataset": {
59
- "title": "Sandbox collection dataset",
60
- "versionsRepositoryURL": "https://github.com/OpenTermsArchive/sandbox-declarations",
61
59
  "publishingSchedule": "30 8 * * MON"
62
60
  }
63
61
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentermsarchive/engine",
3
- "version": "10.1.1",
3
+ "version": "10.1.3",
4
4
  "description": "Tracks and makes visible changes to the terms of online services",
5
5
  "homepage": "https://opentermsarchive.org",
6
6
  "bugs": {
@@ -25,6 +25,8 @@
25
25
  "files": [
26
26
  "bin",
27
27
  "config",
28
+ "!config/development.json",
29
+ "!config/local.json",
28
30
  "scripts",
29
31
  "src",
30
32
  ".eslintrc.yaml"
@@ -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 && (config.has('@opentermsarchive/engine.dataset.datagouv.datasetId') || config.has('@opentermsarchive/engine.dataset.datagouv.organizationIdOrSlug'))) {
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
 
@@ -1,60 +0,0 @@
1
- {
2
- "@opentermsarchive/engine": {
3
- "collectionPath": "../collections/pga-declarations",
4
- "recorder": {
5
- "versions": {
6
- "storage": {
7
- "git": {
8
- "snapshotIdentiferTemplate": "https://github.com/OpenTermsArchive/vlopses-ie-snapshots/commit/%SNAPSHOT_ID",
9
- "repository": "git@github.com:OpenTermsArchive/vlopses-ie-versions.git",
10
- "path": "./data/versions"
11
- }
12
- }
13
- },
14
- "snapshots": {
15
- "storage": {
16
- "git": {
17
- "repository": "git@github.com:OpenTermsArchive/vlopses-ie-snapshots.git",
18
- "path": "./data/snapshots"
19
- }
20
- }
21
- }
22
- },
23
- "fetcher": {
24
- "language": "en"
25
- },
26
- "notifier": {
27
- "sendInBlue": {
28
- "updatesListId": 0,
29
- "updateTemplateId": 0
30
- }
31
- },
32
- "logger": {
33
- "sendMailOnError": {
34
- "to": "admin@opentermsarchive.org",
35
- "from": "noreply@opentermsarchive.org",
36
- "sendWarnings": false
37
- }
38
- },
39
- "reporter": {
40
- "type": "github",
41
- "repositories": {
42
- "declarations": "OpenTermsArchive/vlopses-ie-declarations",
43
- "versions": "OpenTermsArchive/vlopses-ie-versions",
44
- "snapshots": "OpenTermsArchive/vlopses-ie-snapshots"
45
- }
46
- },
47
- "collection-api": {
48
- "host": "127.0.0.1",
49
- "port": 3003,
50
- "basePath": "/collection-api"
51
- },
52
- "dataset": {
53
- "datagouv": {
54
- "organizationIdOrSlug": "otatest",
55
- "frequency": "weekly",
56
- "useDemo": true
57
- }
58
- }
59
- }
60
- }