liftie 4.0.3 → 4.1.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.
@@ -1,10 +1,25 @@
1
1
  export default {
2
- selector: '#lifts tbody tr',
2
+ selector: '.uk-h2:contains(Lift Status) + .fs-table tbody tr',
3
3
  parse: {
4
- name: 0,
5
- status: {
6
- child: '1/0',
7
- attribute: 'class'
4
+ name: {
5
+ child: '0/0',
6
+ regex: /(.*?)(\s+\d|$)/s
7
+ },
8
+ status: row => {
9
+ const children = row.children.filter(c => c.type === 'tag');
10
+ const openCol = children[1];
11
+ const closedCol = children[2]; // Might be undefined in old 2-col layout
12
+
13
+ // Helper for new site structure (uikit classes)
14
+ const hasClass = (node, className) => {
15
+ if (node?.attribs?.class?.includes(className)) return true;
16
+ if (node?.children) return node.children.some(c => hasClass(c, className));
17
+ return false;
18
+ };
19
+
20
+ // New Logic (uk-text-success / danger inside col 1 or 2)
21
+ if (hasClass(openCol, 'uk-text-success')) return 'open';
22
+ if (hasClass(closedCol, 'uk-text-danger')) return 'closed';
8
23
  }
9
24
  }
10
25
  };
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "Burke Mountain",
3
3
  "url": {
4
- "host": "http://www.skiburke.com",
5
- "pathname": "/skiing-and-riding/the-mountain/trails-lifts-and-grooming/"
4
+ "host": "https://skiburke.com",
5
+ "pathname": "/the-mountain/weather-conditions"
6
6
  },
7
7
  "tags": [
8
8
  "Vermont",
@@ -0,0 +1 @@
1
+ export { default } from '../../tools/powdr.js';
@@ -0,0 +1,21 @@
1
+ {
2
+ "name": "Eldora",
3
+ "url": {
4
+ "host": "https://www.eldora.com",
5
+ "pathname": "/the-mountain/trail-lift-info/winter-trail-report"
6
+ },
7
+ "api": {
8
+ "host": "https://api.eldora.com",
9
+ "pathname": "/api/v1/dor/drupal/lifts"
10
+ },
11
+ "tags": [
12
+ "Colorado",
13
+ "Eldora",
14
+ "Powdr"
15
+ ],
16
+ "ll": [
17
+ -105.583611,
18
+ 39.9375
19
+ ],
20
+ "noaa": "BOU/43,72"
21
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "liftie",
3
- "version": "4.0.3",
3
+ "version": "4.1.0",
4
4
  "description": "Clean, simple, easy to read, fast ski resort lift status",
5
5
  "type": "module",
6
6
  "keywords": [