
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Clean, simple, easy to read, fast ski resort lift status.
Displays multiple resorts on a single page.
Refreshes automatically every 65 seconds.
Index page displays all supported resorts but it's possible to specify (and bookmark) a subset:
https://liftie.info?resorts=alpine,palisades
REST type API returns a status of each resort.
GET https://liftie.info/api/resort/<resort>
Status is cached on a server side. Regardless of the number of browser request, server will retrieve (and parse) the resort pages only once per minute.
Clone this repo (or your fork)
git clone git@github.com:pirxpilot/liftie.git && cd liftie
Build client side scripts: make will install all external components and trigger component build for you.
make
Run and profit (liftie binds to port 3000 by default)
node app
acme.com resortThe easiest way to start working on a new resort is to run generate script.
$./bin/generate
The script expects the short (one word, dashes OK) identifier of the ski resort, the human readable name and the URL of the page with lift status. It also asks for resort geographical coordinates.
The following files are generated for a newly added resort:
lib/resort/acme/resort.json,lib/resort/acme/index.js,test/resort/acme.js.test/resort/example/acme.htmlYou can check this commit to see what you can expect after this page is completed.
Newly added resort is displayed automatically on liftie index page, but it won't have any lifts at this stage.
Now you can flesh out the test by adding expected list of ski lifts. See this commit.
var expected = {
'Super Express Lift': 'closed',
'Magic Carpet': 'open',
'Ultra Gondola': 'hold',
'T-Bar': 'scheduled'
};
At this point you should probably run the tests: since parsing function is not implemented the test will fail.
You can run only the specific resort test by running:
make test TESTS="**/*/acme.js"
lib/resorts/acme/index.js exports the following object
module.exports = {
selector: '.lifts', // selector for lift information
parse: {
filter: node => node.children, // if present skips nodes for which filter is falsy
name: '0/1', // example of a simple path descriptor (second child of the first child)
status: { // example of a compound descriptor
child: '+/1',
attribute: 'alt',
regex: /-([a-z]+)$/,
fn: s => s.slice(0, -3)
}
}
};
You need to adjust it to find the lift names and their statuses:
selector is a CSS selector that should locate the parent of the name and status elementsparse needs to contain 2 descriptors - one for name and the other for statusname and status descriptors have the following properties
child - dash-separated path to the name or status HTML element - index, ,, .., +, - are supportedattribute - optional - if specified the value of the attribute instead of the contents of the element is usedregex - optional - if specified the regex is executed and the value of the first matching group is usedfn - optional - if specified the function is called that can be used to convert the valueIf child is the only part of the descriptor it can be used directly. In other words:
name: {
child: '0/3'
}
is the same as
name: '0/3'
Check out this commit to see the simple parser implemented.
Once parser is ready the tests should succeed.
bin/fetch-noaa --overwrite <resort-name> to find itIn some cases the lift status info is not directly accessible on the web page to which
liftie should be redirecting its users. For example lift status might be contained in an
invisible iframe or retrieved from a 3rd party server. In such cases specify dataUrl in
addition to the url entry in the resort descriptor.
Liftie will always use url to construct the link to the relevant resort page, and - if
present - it will use dataUrl to retrieve the page that is subsequently parsed to obtain
lift information.
In addition to parsing lift status pages Liftie supports resorts that make their lift status
available through REST API. In such cases you need to specify api element in resort descriptor.
"api": {
"host": "http://api.acme.com",
"pathname": "/api/status"
}
If api is specified Liftie will retrieve status info through HTTP GET. The resort parse function
will receive parsed json instead of the dom tree. Please note that you still need to configure url -
it is used on Liftie pages to send users to official resort page. Check out this implementation, if you are looking for an example.
Icon Font generated with IconMoon App
Forecast Font from Icon Vault -- SIL Open Font License
Tags CSS (stylus) is a simplified version of Sliding Tags by Thibaut Courouble -- License MIT
FAQs
Clean, simple, easy to read, fast ski resort lift status
The npm package liftie receives a total of 146 weekly downloads. As such, liftie popularity was classified as not popular.
We found that liftie demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.