open-index/open-npm huggingface dataset:
npm package: @sailrs/eslint-config
Description: ESLint config for Sailrs to ensure code quality
Author: Sailrs GmbH
Latest version: 0.1.1

# @sailrs/eslint-config

## Installation

```
npm install --save-dev @sailrs/eslintconfig
```

## Configuration

For a TypeScript project create a config file `.eslintrc.json`

```json
{
  "extends": "@sailrs/eslint-config/typescript"
}
```
npm package: @sailrs/pwa
Description: PWA for Sailrs
Author: Sailrs GmbH
Latest version: 0.3.3

@sailrs/pwa
===========

`@sailrs/pwa` leverages google's workbox and exposes its API in a more
convenient way. Pretty much like with workbox itself, you can either use
`recipes` or configure your service worker completely as you desire.

## Using Recipes

The easiest way to configure your service worker the following snippet:

```typescript
import { setupServiceWorker } from '@sailrs/pwa'

setupServiceWorker({
  recipes: {
    pageCache: true,
    imageCache: true,
    staticResourcesCache: true,
    offlineFallback: {
      pageFallback: 'my-offline-page',
      imageFallback: '/assets/fallback.jpg',
    },
    warmCache: {
      urls: [
        '/join',
        '/login',
      ],
    }
  },
})
```

Except the google fonts cache, this snippet sets up all recipes from the
workbox documentation. We take it one step further,  because `@sailrs/pwa`
enabled you to compose your caching needs which are enabled here too, where
appropriate. For instance, you cannot change the strategy for `pageCache` but
all the options, that the NetworkFirst Strategy exposes:

```typescript
recipes: {
  pageCache: {
    matchOptions: {
      ignoreSearch: true,
      ignoreVary: true,
    },
    fetchOptions: {
      credentials: 'include',
    },
    networkTimeoutSeconds: 3,
  },
}
```

On the other hand, for the `imageCache` it may make sense to alter the
`matchCallback` or the plugins.

```typescript
imageCache: {
  match: ({ request }) => request.destination === 'image',
  expiration: {
    maxEntries: 100,
    maxAgeSeconds: 60 * 60 * 24 * 7, // 7 days
  },
  cacheableResponses: {
    statuses: [0, 200],
  }
},
```

On the `warmCache` you can also change the strategy and plugins.

```typescript
warmCache: {
  strategy: 'staleWhileRevalidate',
  urls: [
    '/join',
    '/login',
  ],
  expiration: {
    maxEntries: 100,
    maxAgeSeconds: 60 * 60 * 24 * 7, // 7 days
  },
  cacheableResponses: {
    statuses: [0, 200],
  },
},
```

## Custom Caching Strategies

Use the `caches` section of the configuration to compose the caches as you like.
The key becomes the name of the cache.

```typescript
const config: Config = {
  caches: {
    images: {
      match: /\.(?:png|gif|jpg|jpeg|svg)$/,
      strategy: 'staleWhileRevalidate',
      expiration: {
        maxEntries: 100,
        maxAgeSeconds: 30 * 24 * 60 * 60, // 30 Days
      },
      ...
    }
  },
}
```

## Handling service worker updates

When a new service worker is released

```typescript
export function promptForUpdate(): Promise<boolean> {
  return new Promise((res) => res(confirm("Update available. Reload now?")));
}
```
npm package: @sailsai/sdk
Description: TypeScript client for the Sails Developer API
Latest version: 1.0.1

# Sails TypeScript SDK

Typed client for the Sails Developer API, designed for browser and Node runtimes.

## Install

```bash
npm install @sailsai/sdk
```

## Usage

```ts
import { SailsClient } from "@sailsai/sdk";

const client = new SailsClient({ apiKey: "sails_sk_..." });

const response = await client.predictPrice({
  image_url: "https://example.com/shoe.jpg",
  description: "Black Nike Air Max 90 on a white background",
  limit: 10
});

console.log(response.price_lower, response.price_upper);
```

## Product appraisal

```ts
const appraisal = await client.appraiseProduct({
  image_url: "https://example.com/shoe.jpg",
  description: "Black Nike Air Max 90 on a white background",
  country: "US",
  lens_mode: "high",
  max_items: 20
});

console.log(appraisal.appraisal.price_lower, appraisal.appraisal.price_upper);
```

By default the client targets `https://sails.live/api/v1`. Override it if needed:

```ts
const client = new SailsClient({
  apiKey: "sails_sk_...",
  baseUrl: "https://sails.live/api/v1"
});
```

## Error handling

```ts
import { SailsApiError } from "@sailsai/sdk";

try {
  await client.generateBasicListing({ image_urls: ["https://example.com/camera.jpg"] });
} catch (error) {
  if (error instanceof SailsApiError) {
    console.error(error.status, error.code, error.message);
  }
}
```

## Notes

- Uses `fetch`. For Node versions without `fetch`, pass a `fetch` implementation in the client options.
npm package: @sailscasts/sails-hook-node-fetch
Description: Exposes the node-fetch module as a built-in helper in your Sails app.
Author: Kelvin Omereshone
Latest version: 0.0.3
Deprecated: This package is deprecated. Node.js 18+ has native fetch support. See https://github.com/sailscastshq/sails-hook-wish/issues/10

# sails-hook-node-fetch

[![made in nigeria](https://img.shields.io/badge/made%20in-nigeria-008751.svg?style=for-the-badge)](https://github.com/acekyd/made-in-nigeria)

Exposes the [node-fetch](https://github.com/node-fetch/node-fetch) module as a built-in helper in your Sails app.

# Installation

```sh
npm install @sailscasts/sails-hook-node-fetch --save
```

# Usage

```sh
var wavesNGNPrice = await sails.helpers.fetch('https://waves-africa-api.herokuapp.com/ngn');
sails.log(wavesNGNPrice);
```

> For more info on the usage of this hook see the [node-fetch](https://github.com/node-fetch/node-fetch) documentation as this hook exposes the same API as `node-fetch`
npm package: @sailscastshq/connect-sqlite
Description: SQLite session store for Sails.js using better-sqlite3
Author: Kelvin Omereshone
Latest version: 1.1.0

# @sailscastshq/connect-sqlite

SQLite session store for Sails.js using [better-sqlite3](https://github.com/WiseLibs/better-sqlite3).

## Installation

```bash
npm install @sailscastshq/connect-sqlite
```

## Usage with Sails.js

In your `config/session.js`:

```javascript
module.exports.session = {
  secret: process.env.SESSION_SECRET,
  adapter: '@sailscastshq/connect-sqlite',
  url: 'sqlite:./db/sessions.db',

  cookie: {
    secure: true,
    maxAge: 24 * 60 * 60 * 1000 // 24 hours
  }
};
```

### URL Formats

```javascript
// File-based database
url: 'sqlite:./db/sessions.db'
url: 'sqlite:/absolute/path/to/sessions.db'

// In-memory database (for testing)
url: 'sqlite::memory:'

// Or use the db option directly
db: './db/sessions.db'
```

## Options

| Option | Default | Description |
|--------|---------|-------------|
| `url` | - | SQLite URL (`sqlite:./path/to/db.sqlite` or `sqlite::memory:`) |
| `db` | `:memory:` | Database file path (alternative to url) |
| `client` | - | Existing better-sqlite3 Database instance |
| `table` | `'sessions'` | Table name for sessions |
| `prefix` | `'sess:'` | Key prefix for session IDs |
| `ttl` | `86400` | Default TTL in seconds (1 day) |
| `disableTTL` | `false` | Disable TTL expiration |
| `disableTouch` | `false` | Disable touch updates |
| `serializer` | `JSON` | Custom serializer with `parse`/`stringify` |
| `wal` | `true` | Enable WAL mode for better concurrency |

## API

### Required Methods (Session Store Interface)

- `get(sid, callback)` - Retrieve session by ID
- `set(sid, session, callback)` - Store session data
- `destroy(sid, callback)` - Delete session
- `touch(sid, session, callback)` - Refresh session TTL

### Optional Methods

- `length(callback)` - Get session count
- `clear(callback)` - Delete all sessions
- `ids(callback)` - Get all session IDs
- `all(callback)` - Get all sessions with data
- `close()` - Close database connection

## Features

- **Synchronous SQLite** - Uses better-sqlite3 for fast, synchronous operations
- **WAL Mode** - Enabled by default for better concurrent access
- **Automatic Cleanup** - Expired sessions are pruned hourly
- **Prepared Statements** - Optimized queries for better performance
- **URL Configuration** - Familiar `sqlite:` URL format

## Development

```bash
npm install
npm test
```

## License

MIT
npm package: @sailshq/connect-redis
Description: Redis session store for your Sails app.
Author: TJ Holowaychuk
Latest version: 6.1.3

# @sailshq/connect-redis

A fork of connect-redis with ongoing maintenance from the [Sails core team](http://sailsjs.com/about), designed to make it easier to know what version to install in your Sails app.

This package will only be published when there are immediate, material issues affecting expected usage, annoying NPM deprecation warnings, or when a major version bump is necessary.  Our goal is to diverge as little as possible.

## Bugs &nbsp; [![npm version](https://badge.fury.io/js/%40sailshq%2Fconnect-redis.svg)](https://badge.fury.io/js/%40sailshq%2Fconnect-redis)

To report a bug, [click here](http://sailsjs.com/bugs).

## Contributing

Please observe the guidelines and conventions laid out in the [Sails project contribution guide](http://sailsjs.com/documentation/contributing) when opening issues or submitting pull requests.

[![NPM](https://nodei.co/npm/@sailshq/connect-redis.png)](http://npmjs.com/package/@sailshq/connect-redis)

## License

#### connect-redis license

[connect-redis](https://npmjs.com/package/connect-redis) is free and open source under the MIT License.

#### Supplementary license

Any ad hoc additions in this repo are also MIT-licensed, copyright &copy; 2018-present [The Sails Company](http://sailsjs.com/about).

#### Sails framework license

The [Sails framework](https://sailsjs.com) is free and open-source under the [MIT License](http://sailsjs.com/license).
npm package: @sailshq/eslint
Description: An AST-based pattern checker for JavaScript.
Author: Nicholas C. Zakas
Latest version: 4.19.3

# @sailshq/eslint

A fork of eslint v4.19.1 with ongoing maintenance from the [Sails core team](http://sailsjs.com/about).

This repo will only be updated when there are immediate, material issues affecting expected usage, or annoying NPM deprecation warnings, like [this one](https://github.com/eslint/eslint/commit/6b71fd0bcbf9cc00ed4076587f5692b72f6e9aa5#commitcomment-28261398).  Our goal is to diverge as little as possible.

**In other words, there will _never_ be any new methods or options added to eslint on this fork, and consequently there will be no minor version or major version bumps from this fork-- only patches.**

## Bugs &nbsp; [![npm version](https://badge.fury.io/js/%40sailshq%2Feslint.svg)](https://badge.fury.io/js/%40sailshq%2Feslint)

To report a bug, [click here](http://sailsjs.com/bugs).


## Contributing

Please observe the guidelines and conventions laid out in the [Sails project contribution guide](http://sailsjs.com/documentation/contributing) when opening issues or submitting pull requests.

[![NPM](https://nodei.co/npm/@sailshq/eslint.png)](http://npmjs.com/package/@sailshq/eslint)

## License

#### eslint license

[eslint](http://eslint.com/) is free and open source under the [MIT License](https://github.com/yaniswang/eslint/blob/60447c9472971f08a9c71ce76a9613da384a4484/LICENSE.md).

#### Supplementary license

All ad hoc additions in this repo are also MIT-licensed, copyright &copy; 2018 [The Sails Company](http://sailsjs.com/about).

#### Sails framework license

The [Sails framework](https://sailsjs.com) is free and open-source under the [MIT License](http://sailsjs.com/license).
npm package: @sailshq/grunt-contrib-uglify
Description: Minify JavaScript files with UglifyES
Author: Grunt Team
Latest version: 3.2.1

# This is a fork of [grunt-contrib-uglify](https://www.npmjs.com/search?q=grunt-contrib-uglify).

This fork exists in order to have a published version of the [harmony branch](https://github.com/gruntjs/grunt-contrib-uglify/tree/harmony) of grunt-contrib-uglify, which allows minification of ES6-compatible JavaScript.

For grunt-contrib-uglify docs, see the [main README](https://github.com/gruntjs/grunt-contrib-uglify/tree/harmony).
npm package: @sailshq/htmlhint
Description: A fork of Yanis Wang's HTMLHint, maintained by the Sails core team.
Author: Yanis Wang
Latest version: 0.9.16

# @sailshq/htmlhint

A fork of HTMLHint 0.9.14 with ongoing maintenance from the [Sails core team](http://sailsjs.com/about).

This repo will only be updated when there are immediate, material issues affecting expected usage, or annoying NPM deprecation warnings, like [this one](https://github.com/yaniswang/HTMLHint/pull/191).  Our goal is to diverge as little as possible.

**In other words, there will _never_ be any new methods or options added to HTMLHint on this fork, and consequently there will be no minor version or major version bumps from this fork-- only patches.**

## Bugs &nbsp; [![npm version](https://badge.fury.io/js/%40sailshq%2Fhtmlhint.svg)](https://badge.fury.io/js/%40sailshq%2Fhtmlhint)

To report a bug, [click here](http://sailsjs.com/bugs).


## Contributing

Please observe the guidelines and conventions laid out in the [Sails project contribution guide](http://sailsjs.com/documentation/contributing) when opening issues or submitting pull requests.

[![NPM](https://nodei.co/npm/@sailshq/htmlhint.png)](http://npmjs.com/package/@sailshq/htmlhint)

## License

#### htmlhint license

[HTMLHint](http://htmlhint.com/) is free and open source under the [MIT License](https://github.com/yaniswang/HTMLHint/blob/60447c9472971f08a9c71ce76a9613da384a4484/LICENSE.md).

#### Supplementary license

All ad hoc additions in this repo are also MIT-licensed, copyright &copy; 2018 [The Sails Company](http://sailsjs.com/about).

#### Sails framework license

The [Sails framework](https://sailsjs.com) is free and open-source under the [MIT License](http://sailsjs.com/license).
npm package: @sailshq/lesshint
Description: A tool to aid you in writing clean and consistent Less.
Author: Jonathan Wilsson
Latest version: 4.6.6

# @sailshq/lesshint

A fork of lesshint v4.6.5 with ongoing maintenance from the [Sails core team](http://sailsjs.com/about).

This repo will only be updated when there are immediate, material issues affecting expected usage, or annoying NPM deprecation warnings, like [this one](https://github.com/lesshint/lesshint/commit/6b71fd0bcbf9cc00ed4076587f5692b72f6e9aa5#commitcomment-28261398).  Our goal is to diverge as little as possible.

**In other words, there will _never_ be any new methods or options added to lesshint on this fork, and consequently there will be no minor version or major version bumps from this fork-- only patches.**

## Bugs &nbsp; [![npm version](https://badge.fury.io/js/%40sailshq%2Flesshint.svg)](https://badge.fury.io/js/%40sailshq%2Flesshint)

To report a bug, [click here](http://sailsjs.com/bugs).


## Contributing

Please observe the guidelines and conventions laid out in the [Sails project contribution guide](http://sailsjs.com/documentation/contributing) when opening issues or submitting pull requests.

[![NPM](https://nodei.co/npm/@sailshq/lesshint.png)](http://npmjs.com/package/@sailshq/lesshint)

## License

#### lesshint license

[lesshint](http://lesshint.com/) is free and open source under the [MIT License](https://github.com/lesshint/lesshint/blob/v4.6.5/LICENSE.md).

#### Supplementary license

All ad hoc additions in this repo are also MIT-licensed, copyright &copy; 2018 [The Sails Company](http://sailsjs.com/about).

#### Sails framework license

The [Sails framework](https://sailsjs.com) is free and open-source under the [MIT License](http://sailsjs.com/license).