open-index/open-npm huggingface dataset:
npm package: 3s1t
Description: 3s1t library of web components
Latest version: 0.0.5

# 3s1t

## Bump Node Package Version

```
npm login
npm publish
```

## Link for local development

```bash
# From this package
bun link
# From consuming package
rm -rf node_module/3s1t
bun link 3s1t
```

## Getting Started

To start building a new web component using Stencil, clone this repo to a new directory:

```bash
git clone https://github.com/ionic-team/stencil-component-starter.git my-component
cd my-component
git remote rm origin
```

and run:

```bash
npm install
npm start
```

To build the component for production, run:

```bash
npm run build
```

To run the unit tests for the components, run:

```bash
npm test
```

Need help? Check out our docs [here](https://stenciljs.com/docs/my-first-component).

## Naming Components

When creating new component tags, we recommend _not_ using `stencil` in the component name (ex: `<stencil-datepicker>`). This is because the generated component has little to nothing to do with Stencil; it's just a web component!

Instead, use a prefix that fits your company or any name for a group of related components. For example, all of the Ionic generated web components use the prefix `ion`.

## Using this component

There are three strategies we recommend for using web components built with Stencil.

The first step for all three of these strategies is to [publish to NPM](https://docs.npmjs.com/getting-started/publishing-npm-packages).

### Script tag

- Put a script tag similar to this `<script type='module' src='https://unpkg.com/my-component@0.0.1/dist/my-component.esm.js'></script>` in the head of your index.html
- Then you can use the element anywhere in your template, JSX, html etc

### Node Modules

- Run `npm install my-component --save`
- Put a script tag similar to this `<script type='module' src='node_modules/my-component/dist/my-component.esm.js'></script>` in the head of your index.html
- Then you can use the element anywhere in your template, JSX, html etc

### In a stencil-starter app

- Run `npm install my-component --save`
- Add an import to the npm packages `import my-component;`
- Then you can use the element anywhere in your template, JSX, html etc
npm package: 3scale-lambda
Description: Generate an AWS Lambda function to authorize API calls using 3scale
Author: Victor Delgado
Latest version: 1.0.3

# 3scale Lambda generator

This module generates a Lambda function to integrate the AWS API Gateway with 3scale.
Authentication will be required as a `user_key` query parameter. 

## Prerequisites

Create the following [Mapping Template](http://docs.aws.amazon.com/apigateway/latest/developerguide/models-mappings.html) in your AWS API Gateway endpoint:

```json
{
  "user_key": "$input.params('user_key')",
  "resourcePath": "$context.resourcePath",
  "httpMethod": "$context.httpMethod",
  "body": "$input.json('$')"
}
```

The `Content-Type` of the mapping template should be `application/json`.

## Method names

For each API endpoint you should create the corresponding method in 3scale. That way you will be able to keep track of the aggregate usage of your API as well as the breakdown per endpoint.

It is important that you create the method names in 3scale following this pattern:

- Endpoint HTTP method: GET
- Endpoint path: /api/words
- **3scale method name**: api_words_GET

## Using it programatically

```js
var generator = require('3scale-lambda');
var params = {
  providerKey: '3SCALE_PROVIDER_KEY',
  serviceId: '3SCALE_SERVICE_ID'
};
generator(params, '/output/path/');
```

This will create a zip file at `/output/path/3scale-lambda-auth.zip`. That zip is the bundle containing the Lambda function and all its dependencies, ready to be uploaded to AWS.
npm package: 3scale-loader
Description: A script that loads sample data in 3scale
Author: Nicolas MASSE
Latest version: 0.1.1

# A script that loads sample data in your 3scale account

## Why ?

Sometime to do a demo of 3scale, you would like to populate your account with sample data.  

## Overview

This scripts does two things :
 - create some sample data (accounts, applications, users) in your 3scale account.
 - cleanup your platform (ie. delete the previously created accounts, applications, users).

## Preparation

### Create an Access Token (MANDATORY)

Go to your 3scale admin console and click on the gear icon on the top right corner
and drill down to `Personal Settings` > `Tokens`.

Create an access token and keep the generated token in a safe place.
Make sure the "Account Management API" scope is checked and permissions is
set to "Read/write".

![Create an Access Token](./doc/img/access_token.png)

### Create an extra field (RECOMMENDED)

If you create an extra field named "x-created-by", the script will use it to mark
the accounts, applications and users so that it can do the cleanup later.

If this extra field is not created, the cleanup will not be done.

To create this field, go to your 3scale admin console and drill down to
`Settings` > `Fields Definition` and create three fields :
 - a user field named `x-created-by`
 - an account field named `x-created-by`
 - an application field named `x-created-by`

Make sure the name is `x-created-by` (the name is currently hardcoded) and :
 - `Hidden` is checked
 - `Read Only` is checked

![Create a field](./doc/img/extra_field.png)

![At the end you should have three new fields](./doc/img/extra_fields.png)

## Installation

The easiest way to install this script is through NPM :
```
npm install -g 3scale-loader
```

## How to use it

To create 2 sample accounts, 3 applications in each account and 1 additional user in each account :
```
3scale-loader create --host <tenant>-admin.3scale.net --token <your-access-token> --accounts 2 --applications 3 --users 1 --verbose
```

To cleanup the created objects :
```
3scale-loader cleanup --host <tenant>-admin.3scale.net --token <your-access-token> --verbose
```

To get some help :
```
3scale-loader --help
```