liftie 4.2.3 → 4.2.5

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.
@@ -131,7 +131,7 @@ function execute(conf) {
131
131
  }
132
132
 
133
133
  schema[2].before = splitHost;
134
- conf = conf || {};
134
+ conf ??= {};
135
135
  prompt.override = conf;
136
136
  prompt.addProperties(conf, schema, err => {
137
137
  if (err) {
@@ -2,7 +2,7 @@
2
2
  "name": "Angel Fire",
3
3
  "url": {
4
4
  "host": "https://www.angelfireresort.com",
5
- "pathname": "/snow-report/"
5
+ "pathname": "/trail-and-lift-status/"
6
6
  },
7
7
  "tags": [
8
8
  "New Mexico"
@@ -5,12 +5,10 @@
5
5
  "pathname": ""
6
6
  },
7
7
  "dataUrl": {
8
- "host": "https://bulletin.lumiplan.pro",
8
+ "host": "https://bulletinv3.lumiplan.pro",
9
9
  "pathname": "/bulletin.php",
10
10
  "query": {
11
11
  "station": "courchevel",
12
- "region": "alpes",
13
- "pays": "france",
14
12
  "lang": "en"
15
13
  }
16
14
  },
@@ -5,12 +5,10 @@
5
5
  "pathname": "/"
6
6
  },
7
7
  "dataUrl": {
8
- "host": "https://bulletin.lumiplan.pro",
8
+ "host": "https://bulletinv3.lumiplan.pro",
9
9
  "pathname": "/bulletin.php",
10
10
  "query": {
11
11
  "station": "la-plagne",
12
- "region": "alpes",
13
- "pays": "france",
14
12
  "lang": "en"
15
13
  }
16
14
  },
@@ -5,12 +5,10 @@
5
5
  "pathname": "/lifts-slopes-status.html"
6
6
  },
7
7
  "dataUrl": {
8
- "host": "https://bulletin.lumiplan.pro",
8
+ "host": "https://bulletinv3.lumiplan.pro",
9
9
  "pathname": "/bulletin.php",
10
10
  "query": {
11
11
  "station": "les-arcs",
12
- "region": "alpes",
13
- "pays": "france",
14
12
  "lang": "en"
15
13
  }
16
14
  },
@@ -5,12 +5,10 @@
5
5
  "pathname": ""
6
6
  },
7
7
  "dataUrl": {
8
- "host": "https://bulletin.lumiplan.pro",
8
+ "host": "https://bulletinv3.lumiplan.pro",
9
9
  "pathname": "/bulletin.php",
10
10
  "query": {
11
11
  "station": "les-menuires",
12
- "region": "alpes",
13
- "pays": "france",
14
12
  "lang": "en"
15
13
  }
16
14
  },
@@ -5,12 +5,10 @@
5
5
  "pathname": ""
6
6
  },
7
7
  "dataUrl": {
8
- "host": "https://bulletin.lumiplan.pro",
8
+ "host": "https://bulletinv3.lumiplan.pro",
9
9
  "pathname": "/bulletin.php",
10
10
  "query": {
11
11
  "station": "megeve",
12
- "region": "alpes",
13
- "pays": "france",
14
12
  "lang": "en"
15
13
  }
16
14
  },
@@ -5,12 +5,10 @@
5
5
  "pathname": "/"
6
6
  },
7
7
  "dataUrl": {
8
- "host": "https://bulletin.lumiplan.pro",
8
+ "host": "https://bulletinv3.lumiplan.pro",
9
9
  "pathname": "/bulletin.php",
10
10
  "query": {
11
- "station": "alpina-mottaret",
12
- "region": "alpes",
13
- "pays": "france",
11
+ "station": "meribel",
14
12
  "lang": "en"
15
13
  }
16
14
  },
@@ -5,12 +5,10 @@
5
5
  "pathname": "/skiing/ski-area/ski-map/lifts-and-pistes-live-opening"
6
6
  },
7
7
  "dataUrl": {
8
- "host": "https://bulletin.lumiplan.pro",
8
+ "host": "https://bulletinv3.lumiplan.pro",
9
9
  "pathname": "/bulletin.php",
10
10
  "query": {
11
11
  "station": "tignes",
12
- "region": "alpes",
13
- "pays": "france",
14
12
  "lang": "en"
15
13
  }
16
14
  },
@@ -22,11 +22,7 @@ export default function tags(objects) {
22
22
  }
23
23
  const label = tag;
24
24
  tag = canonical(tag);
25
- result[tag] = result[tag] || {
26
- slug: tag,
27
- label,
28
- members: []
29
- };
25
+ result[tag] ??= { slug: tag, label, members: [] };
30
26
  result[tag].members.push(o.id);
31
27
  });
32
28
  });
@@ -1,26 +1,16 @@
1
1
  import toTitleCase from 'to-title-case';
2
2
 
3
3
  export default {
4
- selector: '.text:contains(Lifts) + .prl_affichage .prl_group',
4
+ selector: '.POI_title:contains(Lifts) + .liaisons .POI_info',
5
5
  parse: {
6
6
  name: {
7
- child: '1/0',
7
+ child: '1/0/0',
8
8
  fn: toTitleCase
9
9
  },
10
10
  status: {
11
- child: '4/0',
11
+ child: '2/1',
12
12
  attribute: 'src',
13
- regex: /(.)\.svg$/,
14
- fn: statusLetter => {
15
- switch (statusLetter) {
16
- case 'O':
17
- return 'open';
18
- case 'P':
19
- return 'scheduled';
20
- default:
21
- return 'closed';
22
- }
23
- }
13
+ regex: /lp_runway_trail_(\w+)\.svg$/
24
14
  }
25
15
  }
26
16
  };
@@ -5,7 +5,7 @@ const debug = Debug('liftie:resort');
5
5
 
6
6
  export default function parse(dom) {
7
7
  const liftStatus = domutil.collect(dom, '.lift_list_table tbody tr', tr => {
8
- const last = tr.children[tr.children.length - 1];
8
+ const last = tr.children.at(-1);
9
9
  let status = domutil.findText(last);
10
10
 
11
11
  if (!status) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "liftie",
3
- "version": "4.2.3",
3
+ "version": "4.2.5",
4
4
  "description": "Clean, simple, easy to read, fast ski resort lift status",
5
5
  "type": "module",
6
6
  "keywords": [