liftie 3.56.4 → 4.0.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.
Files changed (311) hide show
  1. package/Makefile +2 -2
  2. package/app.js +33 -25
  3. package/lib/checker.js +1 -1
  4. package/lib/cli/curl.js +8 -8
  5. package/lib/cli/dirs.js +8 -6
  6. package/lib/cli/fetch.js +9 -9
  7. package/lib/cli/for-each-resort.js +3 -4
  8. package/lib/cli/generate.js +10 -10
  9. package/lib/cli/noaa.js +7 -12
  10. package/lib/client/about/index.js +2 -6
  11. package/lib/client/boot/height.js +2 -6
  12. package/lib/client/boot/index.js +8 -11
  13. package/lib/client/boot/service-worker.js +1 -5
  14. package/lib/client/minimax/index.js +1 -3
  15. package/lib/client/resort/dom.js +2 -7
  16. package/lib/client/resort/index.js +7 -10
  17. package/lib/client/resort/lifts.js +4 -5
  18. package/lib/client/resort/snow.js +3 -4
  19. package/lib/client/resort/weather.js +3 -4
  20. package/lib/client/resort/webcams.js +5 -8
  21. package/lib/client/state/index.js +4 -7
  22. package/lib/client/stats/index.js +1 -5
  23. package/lib/client/tag/index.js +1 -3
  24. package/lib/embed/index.js +0 -2
  25. package/lib/lifts/index.js +12 -12
  26. package/lib/lifts/parse.js +5 -5
  27. package/lib/lifts/parser.js +6 -10
  28. package/lib/lifts/pipe.js +3 -3
  29. package/lib/lifts/request.js +1 -3
  30. package/lib/lifts/rest.js +2 -4
  31. package/lib/lifts/stats.js +2 -5
  32. package/lib/loader.js +9 -12
  33. package/lib/loaders.js +7 -8
  34. package/lib/opening.js +6 -5
  35. package/lib/plugins.js +3 -8
  36. package/lib/resorts/3cime/index.js +1 -1
  37. package/lib/resorts/3cime/resort.json +1 -1
  38. package/lib/resorts/49-degrees-north/index.js +1 -1
  39. package/lib/resorts/abasin/index.js +13 -6
  40. package/lib/resorts/abasin/resort.json +1 -1
  41. package/lib/resorts/alpe-lusia-san-pellegrino/index.js +1 -1
  42. package/lib/resorts/alpe-lusia-san-pellegrino/resort.json +1 -1
  43. package/lib/resorts/alpine/index.js +1 -1
  44. package/lib/resorts/alta/index.js +6 -7
  45. package/lib/resorts/alta-badia/index.js +1 -1
  46. package/lib/resorts/alta-badia/resort.json +1 -1
  47. package/lib/resorts/alyeska/index.js +1 -1
  48. package/lib/resorts/angel-fire/index.js +1 -1
  49. package/lib/resorts/arabba/index.js +1 -1
  50. package/lib/resorts/arabba/resort.json +1 -1
  51. package/lib/resorts/aspen-highlands/index.js +1 -1
  52. package/lib/resorts/aspen-mountain/index.js +1 -1
  53. package/lib/resorts/attitash/index.js +1 -1
  54. package/lib/resorts/beavercreek/index.js +1 -1
  55. package/lib/resorts/berkshire-east/index.js +1 -1
  56. package/lib/resorts/big-sky/index.js +1 -1
  57. package/lib/resorts/big-white/index.js +1 -1
  58. package/lib/resorts/big-white/resort.json +1 -1
  59. package/lib/resorts/blue-mountain-pa/index.js +1 -1
  60. package/lib/resorts/bluemountain/index.js +1 -1
  61. package/lib/resorts/bogusbasin/index.js +5 -4
  62. package/lib/resorts/bolton-valley/index.js +2 -3
  63. package/lib/resorts/boreal/index.js +1 -1
  64. package/lib/resorts/breck/index.js +1 -1
  65. package/lib/resorts/brettonwoods/index.js +7 -5
  66. package/lib/resorts/brianhead/index.js +1 -1
  67. package/lib/resorts/bridger-bowl/index.js +4 -3
  68. package/lib/resorts/brighton/index.js +1 -1
  69. package/lib/resorts/bromley-mountain/index.js +1 -1
  70. package/lib/resorts/burke-mountain/index.js +1 -1
  71. package/lib/resorts/buttermilk/index.js +1 -1
  72. package/lib/resorts/caberfae-peaks/index.js +1 -1
  73. package/lib/resorts/camelback/index.js +1 -1
  74. package/lib/resorts/campo-felice/index.js +1 -1
  75. package/lib/resorts/campo-felice/resort.json +1 -1
  76. package/lib/resorts/canada-olympic-park/index.js +1 -1
  77. package/lib/resorts/cannon/index.js +1 -1
  78. package/lib/resorts/cataloochee/index.js +1 -1
  79. package/lib/resorts/catedral/index.js +1 -1
  80. package/lib/resorts/cervino/index.js +2 -2
  81. package/lib/resorts/chamonix/index.js +2 -2
  82. package/lib/resorts/chamonix/resort.json +1 -1
  83. package/lib/resorts/chinapeak/index.js +1 -1
  84. package/lib/resorts/civetta/index.js +1 -1
  85. package/lib/resorts/civetta/resort.json +1 -1
  86. package/lib/resorts/claviere/index.js +1 -1
  87. package/lib/resorts/copper/index.js +1 -1
  88. package/lib/resorts/coronetpeak/index.js +1 -1
  89. package/lib/resorts/coronetpeak/resort.json +1 -1
  90. package/lib/resorts/cortina-d-ampezzo/index.js +1 -1
  91. package/lib/resorts/cortina-d-ampezzo/resort.json +1 -1
  92. package/lib/resorts/courchevel/index.js +1 -1
  93. package/lib/resorts/courchevel/resort.json +2 -1
  94. package/lib/resorts/cranmore-mountain/index.js +1 -1
  95. package/lib/resorts/cransmontana/index.js +2 -2
  96. package/lib/resorts/crested-butte/index.js +1 -1
  97. package/lib/resorts/crystal-mountain/index.js +1 -1
  98. package/lib/resorts/cypress-mountain/index.js +1 -1
  99. package/lib/resorts/deer-valley/index.js +1 -1
  100. package/lib/resorts/devils-head/index.js +1 -1
  101. package/lib/resorts/diamondpeak/index.js +1 -1
  102. package/lib/resorts/falls-creek/index.js +5 -3
  103. package/lib/resorts/falls-creek/resort.json +1 -1
  104. package/lib/resorts/flims-laax-falera/index.js +1 -1
  105. package/lib/resorts/flims-laax-falera/resort.json +1 -1
  106. package/lib/resorts/folgaria/index.js +1 -1
  107. package/lib/resorts/folgaria/resort.json +1 -1
  108. package/lib/resorts/folgarida-marilleva/index.js +2 -1
  109. package/lib/resorts/forni/index.js +1 -1
  110. package/lib/resorts/forni/resort.json +1 -1
  111. package/lib/resorts/gore-mountain/index.js +1 -1
  112. package/lib/resorts/grand-targhee/index.js +1 -1
  113. package/lib/resorts/grouse/index.js +1 -1
  114. package/lib/resorts/gunstock/index.js +1 -1
  115. package/lib/resorts/heavenly/index.js +1 -1
  116. package/lib/resorts/hochfuegen/index.js +2 -2
  117. package/lib/resorts/homewood/index.js +1 -1
  118. package/lib/resorts/hoodoo/index.js +1 -1
  119. package/lib/resorts/hunter/index.js +1 -1
  120. package/lib/resorts/ischgl-silvretta-arena/index.js +1 -1
  121. package/lib/resorts/jackson-hole/index.js +5 -3
  122. package/lib/resorts/jay-peak/index.js +1 -1
  123. package/lib/resorts/jiminypeak/index.js +1 -1
  124. package/lib/resorts/june-mountain/index.js +1 -1
  125. package/lib/resorts/keystone/index.js +1 -1
  126. package/lib/resorts/killington/index.js +1 -1
  127. package/lib/resorts/king-pine/index.js +5 -3
  128. package/lib/resorts/kirkwood/index.js +1 -1
  129. package/lib/resorts/kitzbuehel/index.js +1 -1
  130. package/lib/resorts/lamolina/index.js +1 -1
  131. package/lib/resorts/lamolina/resort.json +1 -1
  132. package/lib/resorts/laplagne/index.js +1 -1
  133. package/lib/resorts/laplagne/resort.json +2 -1
  134. package/lib/resorts/larosiere/index.js +1 -1
  135. package/lib/resorts/lavarone/index.js +1 -1
  136. package/lib/resorts/lavarone/resort.json +1 -1
  137. package/lib/resorts/lesarcs/index.js +1 -1
  138. package/lib/resorts/lesmenuires/index.js +1 -1
  139. package/lib/resorts/lesmenuires/resort.json +2 -1
  140. package/lib/resorts/loon/index.js +1 -1
  141. package/lib/resorts/loveland/index.js +5 -5
  142. package/lib/resorts/mad-river-glen/index.js +2 -2
  143. package/lib/resorts/madonna-di-campiglio/index.js +2 -1
  144. package/lib/resorts/mammoth-lakes/index.js +1 -1
  145. package/lib/resorts/manning-park/index.js +1 -1
  146. package/lib/resorts/manning-park/resort.json +1 -1
  147. package/lib/resorts/megeve/index.js +1 -1
  148. package/lib/resorts/megeve/resort.json +2 -1
  149. package/lib/resorts/meribel/index.js +1 -1
  150. package/lib/resorts/meribel/resort.json +2 -1
  151. package/lib/resorts/monarch/index.js +17 -4
  152. package/lib/resorts/monarch/resort.json +1 -5
  153. package/lib/resorts/monte-amiata/index.js +1 -1
  154. package/lib/resorts/monte-amiata/resort.json +1 -1
  155. package/lib/resorts/monte-bondone/index.js +1 -1
  156. package/lib/resorts/montegenevre/index.js +1 -1
  157. package/lib/resorts/monterosa/index.js +1 -1
  158. package/lib/resorts/morzine/index.js +1 -1
  159. package/lib/resorts/morzine/resort.json +6 -2
  160. package/lib/resorts/mount-sunapee/index.js +1 -1
  161. package/lib/resorts/mountsnow/index.js +1 -1
  162. package/lib/resorts/mt-buller/index.js +1 -1
  163. package/lib/resorts/mt-hotham/index.js +5 -3
  164. package/lib/resorts/mt-seymour/index.js +1 -1
  165. package/lib/resorts/mt-spokane/index.js +1 -1
  166. package/lib/resorts/mtbachelor/index.js +1 -1
  167. package/lib/resorts/mtbrighton/index.js +1 -1
  168. package/lib/resorts/mthigh/index.js +1 -1
  169. package/lib/resorts/mthood/index.js +1 -1
  170. package/lib/resorts/mtpeter/index.js +1 -1
  171. package/lib/resorts/mtpeter/resort.json +1 -1
  172. package/lib/resorts/mtrose/index.js +1 -1
  173. package/lib/resorts/niseko/index.js +1 -1
  174. package/lib/resorts/niseko/resort.json +1 -1
  175. package/lib/resorts/northstar/index.js +1 -1
  176. package/lib/resorts/okemo/index.js +1 -1
  177. package/lib/resorts/ovindoli/index.js +1 -1
  178. package/lib/resorts/ovindoli/resort.json +1 -1
  179. package/lib/resorts/owlshead/index.js +1 -1
  180. package/lib/resorts/paganella/index.js +1 -1
  181. package/lib/resorts/paganella/resort.json +1 -1
  182. package/lib/resorts/palisades/index.js +1 -1
  183. package/lib/resorts/parkcity/index.js +1 -1
  184. package/lib/resorts/pats-peak/index.js +4 -2
  185. package/lib/resorts/peio/index.js +2 -2
  186. package/lib/resorts/perisher/index.js +1 -1
  187. package/lib/resorts/perisher/resort.json +1 -1
  188. package/lib/resorts/piancavallo/index.js +1 -1
  189. package/lib/resorts/piancavallo/resort.json +1 -1
  190. package/lib/resorts/pico/index.js +1 -1
  191. package/lib/resorts/pinzolo/index.js +2 -1
  192. package/lib/resorts/plan-de-corones/index.js +1 -1
  193. package/lib/resorts/plan-de-corones/resort.json +1 -1
  194. package/lib/resorts/pleasant-mountain/index.js +1 -1
  195. package/lib/resorts/pontedilegno-tonale/index.js +1 -1
  196. package/lib/resorts/ragged-mountain/index.js +1 -1
  197. package/lib/resorts/ravascletto-zoncolan/index.js +1 -1
  198. package/lib/resorts/ravascletto-zoncolan/resort.json +1 -1
  199. package/lib/resorts/red-lodge-mountain/index.js +1 -1
  200. package/lib/resorts/red-mountain/index.js +2 -3
  201. package/lib/resorts/rio-pusteria-bressanone/index.js +1 -1
  202. package/lib/resorts/rio-pusteria-bressanone/resort.json +1 -1
  203. package/lib/resorts/roccaraso/index.js +1 -1
  204. package/lib/resorts/roccaraso/resort.json +1 -1
  205. package/lib/resorts/saddleback/index.js +1 -1
  206. package/lib/resorts/san-martino-di-castrozza-passo-rolle/index.js +1 -1
  207. package/lib/resorts/san-martino-di-castrozza-passo-rolle/resort.json +1 -1
  208. package/lib/resorts/sansicario/index.js +1 -1
  209. package/lib/resorts/sappada/index.js +1 -1
  210. package/lib/resorts/sappada/resort.json +1 -1
  211. package/lib/resorts/sasquatch-mountain/index.js +1 -1
  212. package/lib/resorts/sauris/index.js +1 -1
  213. package/lib/resorts/sauris/resort.json +1 -1
  214. package/lib/resorts/sauze/index.js +1 -1
  215. package/lib/resorts/schweitzer/index.js +1 -1
  216. package/lib/resorts/sella/index.js +1 -1
  217. package/lib/resorts/sella/resort.json +1 -1
  218. package/lib/resorts/serfaus-fiss-ladis/index.js +1 -1
  219. package/lib/resorts/sestriere/index.js +1 -1
  220. package/lib/resorts/sestriere/resort.json +1 -1
  221. package/lib/resorts/shawnee-mountain/index.js +4 -2
  222. package/lib/resorts/sierra/index.js +1 -1
  223. package/lib/resorts/silver-star/index.js +2 -2
  224. package/lib/resorts/skiwelt/index.js +1 -1
  225. package/lib/resorts/smuggs/index.js +1 -1
  226. package/lib/resorts/snow-valley/index.js +2 -2
  227. package/lib/resorts/snowbasin/index.js +1 -1
  228. package/lib/resorts/snowbird/index.js +2 -3
  229. package/lib/resorts/snowmass/index.js +1 -1
  230. package/lib/resorts/snowshoe/index.js +1 -1
  231. package/lib/resorts/soelden/index.js +1 -1
  232. package/lib/resorts/solitude/index.js +1 -1
  233. package/lib/resorts/st-anton-am-arlberg/index.js +1 -1
  234. package/lib/resorts/steamboat/index.js +1 -1
  235. package/lib/resorts/stevens/index.js +1 -1
  236. package/lib/resorts/stowe/index.js +1 -1
  237. package/lib/resorts/stratton/index.js +1 -1
  238. package/lib/resorts/sugarbowl/index.js +1 -1
  239. package/lib/resorts/sugarbush/index.js +1 -1
  240. package/lib/resorts/sugarloaf/index.js +1 -1
  241. package/lib/resorts/sun-peaks/index.js +1 -1
  242. package/lib/resorts/sun-peaks/resort.json +1 -1
  243. package/lib/resorts/sunday-river/index.js +1 -1
  244. package/lib/resorts/sunshine-village/index.js +6 -3
  245. package/lib/resorts/sunvalley/index.js +1 -1
  246. package/lib/resorts/tahoe-donner/index.js +1 -1
  247. package/lib/resorts/taos/index.js +1 -1
  248. package/lib/resorts/tarvisio/index.js +1 -1
  249. package/lib/resorts/tarvisio/resort.json +1 -1
  250. package/lib/resorts/telluride/index.js +1 -1
  251. package/lib/resorts/thredbo/index.js +1 -1
  252. package/lib/resorts/tignes/index.js +1 -1
  253. package/lib/resorts/tignes/resort.json +1 -1
  254. package/lib/resorts/timberline-lodge/index.js +1 -1
  255. package/lib/resorts/tremblant/index.js +1 -1
  256. package/lib/resorts/vail/index.js +1 -1
  257. package/lib/resorts/val-di-fassa/index.js +1 -1
  258. package/lib/resorts/val-di-fassa/resort.json +1 -1
  259. package/lib/resorts/val-di-fiemme/index.js +1 -1
  260. package/lib/resorts/val-di-fiemme/resort.json +1 -1
  261. package/lib/resorts/val-gardena/index.js +1 -1
  262. package/lib/resorts/val-gardena/resort.json +1 -1
  263. package/lib/resorts/valdisere/index.js +1 -1
  264. package/lib/resorts/valdisere/resort.json +1 -1
  265. package/lib/resorts/verbier/index.js +1 -1
  266. package/lib/resorts/waterville/index.js +1 -1
  267. package/lib/resorts/whistler-blackcomb/index.js +2 -2
  268. package/lib/resorts/whistler-blackcomb/resort.json +1 -1
  269. package/lib/resorts/whiteface/index.js +1 -1
  270. package/lib/resorts/whitefish/index.js +1 -1
  271. package/lib/resorts/wildcat/index.js +1 -1
  272. package/lib/resorts/windham/index.js +1 -1
  273. package/lib/resorts/winter-park/index.js +1 -1
  274. package/lib/resorts/winterplace/index.js +1 -1
  275. package/lib/routes/cache.js +4 -4
  276. package/lib/routes/canonical.js +1 -3
  277. package/lib/routes/data.js +10 -12
  278. package/lib/routes/database.js +6 -7
  279. package/lib/routes/headers.js +2 -2
  280. package/lib/routes/index.js +9 -11
  281. package/lib/routes/plan.js +2 -4
  282. package/lib/routes/service-worker.js +6 -7
  283. package/lib/routes/sorter.js +2 -4
  284. package/lib/routes/tags.js +2 -4
  285. package/lib/select.js +3 -5
  286. package/lib/tools/aspen.js +4 -4
  287. package/lib/tools/boyne.js +4 -4
  288. package/lib/tools/campiglio-dolomiti.js +1 -1
  289. package/lib/tools/coerce.js +4 -4
  290. package/lib/tools/dolomitisuperski.js +1 -1
  291. package/lib/tools/domutil.js +11 -18
  292. package/lib/tools/infosnow.js +6 -6
  293. package/lib/tools/intrawest.js +3 -3
  294. package/lib/tools/limiter.js +2 -4
  295. package/lib/tools/lumiplan.js +2 -2
  296. package/lib/tools/millis.js +4 -11
  297. package/lib/tools/powdr.js +4 -4
  298. package/lib/tools/prism.js +5 -5
  299. package/lib/tools/skiplan.js +1 -1
  300. package/lib/tools/turismofvg.js +2 -2
  301. package/lib/tools/vail.js +8 -10
  302. package/lib/tools/vialattea.js +1 -1
  303. package/lib/weather/icons.js +3 -8
  304. package/lib/weather/index.js +5 -6
  305. package/lib/weather/noaa.js +5 -3
  306. package/lib/weather/openweather.js +6 -7
  307. package/lib/webcams.js +6 -6
  308. package/package.json +3 -2
  309. package/public/scripts/liftie-embed.js.map +2 -2
  310. package/public/scripts/liftie.js +615 -695
  311. package/public/scripts/liftie.js.map +4 -4
@@ -1,4 +1,4 @@
1
- module.exports = {
1
+ export default {
2
2
  selector: '[id^=conditions_lifts_] div.breakInsideAvoid',
3
3
  parse: {
4
4
  name: {
@@ -1 +1 @@
1
- module.exports = require('../../tools/intrawest');
1
+ export { default } from '../../tools/intrawest.js';
@@ -1,4 +1,4 @@
1
- module.exports = {
1
+ export default {
2
2
  selector: 'h2:contains(Lift Status) < div + div .table-1 td:nth-child(odd)',
3
3
  parse: {
4
4
  name: 1,
@@ -1,3 +1,3 @@
1
- module.exports = {
1
+ export default {
2
2
  selector: '.lift-trail-wrapper .row:nth-last-child(n+3) .lift-header'
3
3
  };
@@ -1,7 +1,9 @@
1
- const coerce = require('../../tools/coerce');
2
- const debug = require('debug')('liftie:resort:falls-creek');
1
+ import Debug from 'debug';
2
+ import coerce from '../../tools/coerce.js';
3
3
 
4
- module.exports = parse;
4
+ const debug = Debug('liftie:resort:falls-creek');
5
+
6
+ export default parse;
5
7
 
6
8
  function parse({ Lifts: { Lift } }) {
7
9
  const liftStatus = {};
@@ -18,4 +18,4 @@
18
18
  ],
19
19
  "twitter": "fallsaustralia",
20
20
  "opening": "0000-00-00"
21
- }
21
+ }
@@ -1,4 +1,4 @@
1
- module.exports = {
1
+ export default {
2
2
  selector: '.lifts > .widget',
3
3
  parse: {
4
4
  name: '2',
@@ -12,4 +12,4 @@
12
12
  9.283333,
13
13
  46.833333
14
14
  ]
15
- }
15
+ }
@@ -1,4 +1,4 @@
1
- module.exports = {
1
+ export default {
2
2
  selector: '.namemobile',
3
3
  parse: {
4
4
  name: '.',
@@ -14,4 +14,4 @@
14
14
  45.881187
15
15
  ],
16
16
  "twitter": "AlpeCimbra"
17
- }
17
+ }
@@ -1 +1,2 @@
1
- module.exports = require('../../tools/campiglio-dolomiti')(5);
1
+ import dolomiti from '../../tools/campiglio-dolomiti.js';
2
+ export default dolomiti(5);
@@ -1 +1 @@
1
- module.exports = require('../../tools/turismofvg');
1
+ export { default } from '../../tools/turismofvg.js';
@@ -13,4 +13,4 @@
13
13
  12.58232,
14
14
  46.42171
15
15
  ]
16
- }
16
+ }
@@ -1 +1 @@
1
- module.exports = require('../whiteface');
1
+ export { default } from '../whiteface/index.js';
@@ -1,4 +1,4 @@
1
- module.exports = {
1
+ export default {
2
2
  selector: '.table:first-of-type th',
3
3
  filter: node => node.children.length >= 2,
4
4
  parse: {
@@ -1,4 +1,4 @@
1
- module.exports = {
1
+ export default {
2
2
  selector: '#lifts li',
3
3
  parse: {
4
4
  name: 0,
@@ -1,4 +1,4 @@
1
- module.exports = {
1
+ export default {
2
2
  selector: '.SnowReport-Lift.SnowReport-feature',
3
3
  parse: {
4
4
  name: 0,
@@ -1 +1 @@
1
- module.exports = require('../../tools/vail');
1
+ export { default } from '../../tools/vail.js';
@@ -1,6 +1,6 @@
1
- const domutil = require('../../tools/domutil');
1
+ import * as domutil from '../../tools/domutil.js';
2
2
 
3
- module.exports = {
3
+ export default {
4
4
  selector: 'h3:contains(Lifte) ~ table .liftrows',
5
5
  parse(node) {
6
6
  return {
@@ -1,4 +1,4 @@
1
- module.exports = {
1
+ export default {
2
2
  selector: '.chair-header',
3
3
  parse: {
4
4
  name: '1/0',
@@ -1,4 +1,4 @@
1
- module.exports = {
1
+ export default {
2
2
  selector: '#tablepress-10 tr',
3
3
  parse: {
4
4
  name: 0,
@@ -1 +1 @@
1
- module.exports = require('../../tools/vail');
1
+ export { default } from '../../tools/vail.js';
@@ -1,4 +1,4 @@
1
- module.exports = {
1
+ export default {
2
2
  selector: '#facility-lifts > .table-responsive > .table-fixed > tbody > tr',
3
3
  parse: {
4
4
  name: 2,
@@ -1,7 +1,9 @@
1
- const coerce = require('../../tools/coerce');
2
- const debug = require('debug')('liftie:resort:jackson-hole');
1
+ import Debug from 'debug';
2
+ import coerce from '../../tools/coerce.js';
3
3
 
4
- module.exports = parse;
4
+ const debug = Debug('liftie:resort:jackson-hole');
5
+
6
+ export default parse;
5
7
 
6
8
  function parse(data) {
7
9
  const liftStatus = {};
@@ -1,4 +1,4 @@
1
- module.exports = {
1
+ export default {
2
2
  selector: '.SnowReport-Lift',
3
3
  parse: {
4
4
  name: 0,
@@ -1,4 +1,4 @@
1
- module.exports = {
1
+ export default {
2
2
  selector: '#lift-data .list-group-item',
3
3
  parse: {
4
4
  name: '.',
@@ -1 +1 @@
1
- module.exports = require('../../tools/intrawest');
1
+ export { default } from '../../tools/intrawest.js';
@@ -1 +1 @@
1
- module.exports = require('../../tools/vail');
1
+ export { default } from '../../tools/vail.js';
@@ -1 +1 @@
1
- module.exports = require('../../tools/powdr');
1
+ export { default } from '../../tools/powdr.js';
@@ -1,7 +1,9 @@
1
- const coerce = require('../../tools/coerce');
2
- const debug = require('debug')('liftie:resort:king-pine');
1
+ import Debug from 'debug';
2
+ import coerce from '../../tools/coerce.js';
3
3
 
4
- module.exports = parse;
4
+ const debug = Debug('liftie:resort:king-pine');
5
+
6
+ export default parse;
5
7
 
6
8
  function parse({ lifts }) {
7
9
  const liftStatus = {};
@@ -1 +1 @@
1
- module.exports = require('../../tools/vail');
1
+ export { default } from '../../tools/vail.js';
@@ -1,6 +1,6 @@
1
1
  const states = ['?', 'open', 'closed'];
2
2
 
3
- module.exports = {
3
+ export default {
4
4
  selector: '.lifts li[data-locationid] > a',
5
5
  parse: {
6
6
  name: 1,
@@ -1,4 +1,4 @@
1
- module.exports = {
1
+ export default {
2
2
  selector: '[name=remontadores] + .tabla tbody tr',
3
3
  parse: {
4
4
  name: '0/-1',
@@ -11,4 +11,4 @@
11
11
  1.94163,
12
12
  42.3358
13
13
  ]
14
- }
14
+ }
@@ -1 +1 @@
1
- module.exports = require('../../tools/lumiplan');
1
+ export { default } from '../../tools/lumiplan.js';
@@ -19,7 +19,8 @@
19
19
  "Alps"
20
20
  ],
21
21
  "ll": [
22
- 6.6772, 45.5064
22
+ 6.6772,
23
+ 45.5064
23
24
  ],
24
25
  "twitter": "laplagne"
25
26
  }
@@ -1,4 +1,4 @@
1
- module.exports = {
1
+ export default {
2
2
  selector: '.skilifts .skilift',
3
3
  parse: {
4
4
  name: 1,
@@ -1 +1 @@
1
- module.exports = require('../folgaria');
1
+ export { default } from '../folgaria/index.js';
@@ -14,4 +14,4 @@
14
14
  45.933333
15
15
  ],
16
16
  "twitter": "AlpeCimbra"
17
- }
17
+ }
@@ -1 +1 @@
1
- module.exports = require('../../tools/lumiplan');
1
+ export { default } from '../../tools/lumiplan.js';
@@ -1 +1 @@
1
- module.exports = require('../../tools/lumiplan');
1
+ export { default } from '../../tools/lumiplan.js';
@@ -19,7 +19,8 @@
19
19
  "Alps"
20
20
  ],
21
21
  "ll": [
22
- 6.5375, 45.3236
22
+ 6.5375,
23
+ 45.3236
23
24
  ],
24
25
  "twitter": "lesmenuires"
25
26
  }
@@ -1 +1 @@
1
- module.exports = require('../../tools/boyne');
1
+ export { default } from '../../tools/boyne.js';
@@ -1,12 +1,12 @@
1
- const { findText } = require('../../tools/domutil');
1
+ import { findText } from '../../tools/domutil.js';
2
2
 
3
- module.exports = {
3
+ export default {
4
4
  selector: '.tablepress-table-name',
5
5
  parse(node) {
6
- const [name, status] = findText(node).split('');
6
+ const [name, status] = findText(node).split('-');
7
7
  return {
8
- name,
9
- status
8
+ name: name,
9
+ status: status
10
10
  };
11
11
  }
12
12
  };
@@ -1,6 +1,6 @@
1
- const { text } = require('../../tools/domutil');
1
+ import { text } from '../../tools/domutil.js';
2
2
 
3
- module.exports = {
3
+ export default {
4
4
  selector: '.snowreport_sponsorarea:nth-child(2) table tbody tr',
5
5
  parse: {
6
6
  name: 0,
@@ -1 +1,2 @@
1
- module.exports = require('../../tools/campiglio-dolomiti')(3);
1
+ import dolomiti from '../../tools/campiglio-dolomiti.js';
2
+ export default dolomiti(3);
@@ -1 +1 @@
1
- module.exports = require('../../tools/intrawest');
1
+ export { default } from '../../tools/intrawest.js';
@@ -1,4 +1,4 @@
1
- module.exports = {
1
+ export default {
2
2
  selector: '#lift-status-table tr',
3
3
  parse: {
4
4
  name: '0',
@@ -13,4 +13,4 @@
13
13
  ],
14
14
  "twitter": "Manningpark",
15
15
  "opening": "2021-12-22"
16
- }
16
+ }
@@ -1 +1 @@
1
- module.exports = require('../../tools/lumiplan');
1
+ export { default } from '../../tools/lumiplan.js';
@@ -19,7 +19,8 @@
19
19
  "Alps"
20
20
  ],
21
21
  "ll": [
22
- 6.6181, 45.8578
22
+ 6.6181,
23
+ 45.8578
23
24
  ],
24
25
  "twitter": "megeve"
25
26
  }
@@ -1 +1 @@
1
- module.exports = require('../../tools/lumiplan');
1
+ export { default } from '../../tools/lumiplan.js';
@@ -19,7 +19,8 @@
19
19
  "Alps"
20
20
  ],
21
21
  "ll": [
22
- 6.5655, 45.3967
22
+ 6.5655,
23
+ 45.3967
23
24
  ],
24
25
  "twitter": "meribel3vallees"
25
26
  }
@@ -1,7 +1,20 @@
1
- module.exports = {
2
- selector: '.SnowReport-Lift',
1
+ import { allText } from '../../tools/domutil.js';
2
+
3
+ export default {
4
+ selector: '.lifts-table tbody tr',
3
5
  parse: {
4
- name: 0,
5
- status: '1/1/1'
6
+ name: {
7
+ child: 0, // First td contains the lift name
8
+ // Strip out "(Tubing Park)" or similar suffixes
9
+ fn: v => v.replace(/\s+\(.+\)\s*$/, '')
10
+ },
11
+ status: {
12
+ child: 1, // Second td
13
+ fn: node => {
14
+ // Get the span text which contains "Closed", "Open", etc.
15
+ const span = node.children?.find(c => c.name === 'span');
16
+ return span ? allText(span) : 'closed';
17
+ }
18
+ }
6
19
  }
7
20
  };
@@ -1,13 +1,9 @@
1
1
  {
2
2
  "name": "Monarch Mountain",
3
3
  "url": {
4
- "host": "https://www.skimonarch.com",
4
+ "host": "https://skimonarch.com",
5
5
  "pathname": "/conditions/"
6
6
  },
7
- "dataUrl": {
8
- "host": "https://pmw.skimonarch.com",
9
- "pathname": "/conditions/snow-report/snow-report-conditions/"
10
- },
11
7
  "tags": [
12
8
  "Colorado"
13
9
  ],
@@ -1,4 +1,4 @@
1
- module.exports = {
1
+ export default {
2
2
  selector: 'h3:contains("Stato apertura impianti") ~ table tr',
3
3
  parse: {
4
4
  name: '0',
@@ -13,4 +13,4 @@
13
13
  11.62626,
14
14
  42.89159
15
15
  ]
16
- }
16
+ }
@@ -1,4 +1,4 @@
1
- module.exports = {
1
+ export default {
2
2
  selector: 'table[cellspacing="0"] tr:nth-child(n+1)',
3
3
  parse: {
4
4
  name: '1',
@@ -1 +1 @@
1
- module.exports = require('../../tools/vialattea');
1
+ export { default } from '../../tools/vialattea.js';
@@ -1,4 +1,4 @@
1
- module.exports = {
1
+ export default {
2
2
  selector: ".modulo-impianti__img.skirama div.skirama-icon[data-type='lift']",
3
3
  parse: {
4
4
  name: {
@@ -1,3 +1,3 @@
1
- module.exports = {
1
+ export default {
2
2
  selector: '.remontees_secteur .row .col2'
3
3
  };
@@ -4,9 +4,13 @@
4
4
  "host": "https://en.morzine-avoriaz.com",
5
5
  "pathname": "/ski-lift-opening.html"
6
6
  },
7
- "tags": ["France", "Alps"],
7
+ "tags": [
8
+ "France",
9
+ "Alps"
10
+ ],
8
11
  "ll": [
9
- 6.7089, 46.1789
12
+ 6.7089,
13
+ 46.1789
10
14
  ],
11
15
  "twitter": "morzine"
12
16
  }
@@ -1 +1 @@
1
- module.exports = require('../../tools/vail');
1
+ export { default } from '../../tools/vail.js';
@@ -1 +1 @@
1
- module.exports = require('../../tools/vail');
1
+ export { default } from '../../tools/vail.js';
@@ -1,4 +1,4 @@
1
- module.exports = {
1
+ export default {
2
2
  selector: 'tr[id^="lift"]',
3
3
  parse: {
4
4
  name: '0/2',
@@ -1,7 +1,9 @@
1
- const coerce = require('../../tools/coerce');
2
- const debug = require('debug')('liftie:resort:mt-hotham');
1
+ import Debug from 'debug';
2
+ import coerce from '../../tools/coerce.js';
3
3
 
4
- module.exports = parse;
4
+ const debug = Debug('liftie:resort:mt-hotham');
5
+
6
+ export default parse;
5
7
 
6
8
  // see: wmPopulateLiftStatus in https://www.mthotham.com.au/Portals/_default/skins/hotham/dist/js/wm-ajax2.js -
7
9
  const KEY_TO_NAME = {
@@ -1,4 +1,4 @@
1
- module.exports = {
1
+ export default {
2
2
  selector: 'tr:contains(LIFTS) ~ tr',
3
3
  parse: {
4
4
  name: '0',
@@ -1,4 +1,4 @@
1
- module.exports = {
1
+ export default {
2
2
  selector: 'h2:contains(Lifts) + .trails--inner strong',
3
3
  parse: {
4
4
  name: {
@@ -1 +1 @@
1
- module.exports = require('../../tools/powdr');
1
+ export { default } from '../../tools/powdr.js';
@@ -1,4 +1,4 @@
1
- module.exports = {
1
+ export default {
2
2
  selector: 'table:nth-of-type(5) tr:not(:first-child)',
3
3
  parse: {
4
4
  name: '0/0',
@@ -1,4 +1,4 @@
1
- module.exports = {
1
+ export default {
2
2
  selector: '.StatusReport--lifts tbody tr',
3
3
  parse: {
4
4
  name: '1/0',
@@ -1,4 +1,4 @@
1
- module.exports = {
1
+ export default {
2
2
  selector: '#liftGrid tbody tr',
3
3
  parse: {
4
4
  name: 1,
@@ -1,4 +1,4 @@
1
- module.exports = {
1
+ export default {
2
2
  selector: '#content > div > div:nth-child(4) > div > table > tbody > tr', // selector for all <tr> elements under <tbody>
3
3
  parse: {
4
4
  filter: node => node.children.length > 0, // only process <tr> elements with children
@@ -14,4 +14,4 @@
14
14
  "opening": "1936-01-01",
15
15
  "twitter": "MountPeter",
16
16
  "noaa": "OKX/20,58"
17
- }
17
+ }
@@ -1,4 +1,4 @@
1
- module.exports = {
1
+ export default {
2
2
  selector: '#lift-status .rose-name',
3
3
  parse: {
4
4
  name: '.',
@@ -1,4 +1,4 @@
1
- module.exports = {
1
+ export default {
2
2
  selector: 'li[id^="liftList_tag"] ul[id]',
3
3
  parse: {
4
4
  name: '0/0',
@@ -11,4 +11,4 @@
11
11
  140.683333,
12
12
  42.8
13
13
  ]
14
- }
14
+ }
@@ -1 +1 @@
1
- module.exports = require('../../tools/vail');
1
+ export { default } from '../../tools/vail.js';
@@ -1 +1 @@
1
- module.exports = require('../../tools/vail');
1
+ export { default } from '../../tools/vail.js';
@@ -1,4 +1,4 @@
1
- module.exports = {
1
+ export default {
2
2
  selector: 'table:contains("Nome"):contains("Tipo"):contains("Stato") tbody tr',
3
3
  parse: {
4
4
  name: '0/0',
@@ -13,4 +13,4 @@
13
13
  13.496445170136338,
14
14
  42.14547624333149
15
15
  ]
16
- }
16
+ }