open-index/open-npm huggingface dataset:
npm package: @gerardpastor/lexer
Description: A simple lexer for TypeScript
Author: Gerard Pastor
Latest version: 0.2.3

# `lexer`

A simple typescript lexer.

## Installation

`pnpm add @gerardpastor/lexer`

`yarn add @gerardpastor/lexer`

`npm i @gerardpastor/lexer`

## Usage

```typescript
import { definition, lexer } from "../src/index";

const definitions = [
  definition({
    type: "word",
    regex: /([a-zA-Z0-9]+)/,
  }),
  definition({
    type: "number",
    regex: /([0-9]+)/,
  }),
  definition({
    type: "operator",
    literal: ["+", "-", "*", "/"],
    wordBoundary: false,
  }),
  definition({
    type: "parenthesis",
    literal: ["(", ")"],
    wordBoundary: false,
  }),
  definition({
    type: "whitespace",
    regex: /[ ]+/,
    skip: true,
    wordBoundary: false,
  }),
];

const tokenizer = lexer(definitions);
const tokens = tokenizer("1 + 2 * 3");

console.log(tokens);
// [
//   { type: 'number', value: '1', data: {} },
//   { type: 'operator', value: '+', data: {} },
//   { type: 'number', value: '2', data: {} },
//   { type: 'operator', value: '*', data: {} },
//   { type: 'number', value: '3', data: {} }
// ]
```
npm package: @gerark/just-svelte-lib
Description: Everything you need to build a Svelte library, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte).
Latest version: 0.0.35

# create-svelte

Everything you need to build a Svelte library, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte).

Read more about creating a library [in the docs](https://kit.svelte.dev/docs/packaging).

## Creating a project

If you're seeing this, you've probably already done this step. Congrats!

```bash
# create a new project in the current directory
npm create svelte@latest

# create a new project in my-app
npm create svelte@latest my-app
```

## Developing

Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:

```bash
npm run dev

# or start the server and open the app in a new browser tab
npm run dev -- --open
```

Everything inside `src/lib` is part of your library, everything inside `src/routes` can be used as a showcase or preview app.

## Building

To build your library:

```bash
npm run package
```

To create a production version of your showcase app:

```bash
npm run build
```

You can preview the production build with `npm run preview`.

> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment.

## Publishing

Go into the `package.json` and give your package the desired name through the `"name"` option. Also consider adding a `"license"` field and point it to a `LICENSE` file which you can create from a template (one popular option is the [MIT license](https://opensource.org/license/mit/)).

To publish your library to [npm](https://www.npmjs.com):

```bash
npm publish
```
npm package: @geraudwilling/react-images-upload
Description: This is a fork of [react-images-upload](https://github.com/JakeHartnell/react-images-upload). We added the *maxFiles* prop to limit the amount of uploaded images.
Latest version: 1.3.0

# Images uploader UI component
This is a fork of [react-images-upload](https://github.com/JakeHartnell/react-images-upload).
We added the *maxFiles* prop to limit the amount of uploaded images.

Simple component for upload and validate (client side) images with preview built with React.js.
This package use [react-flip-move](https://github.com/joshwcomeau/react-flip-move) for animate the file preview images.

## Installation

```bash
npm install --save react-images-upload
```

## Usage

```javascript
import React from 'react';
import ImageUploader from '@geraudwilling/react-images-upload';

class App extends React.Component {

	constructor(props) {
		super(props);
		 this.state = { pictures: [] };
		 this.onDrop = this.onDrop.bind(this);
	}

	onDrop(picture) {
		this.setState({
            pictures: this.state.pictures.concat(picture),
        });
	}

    render() {
        return (
            <ImageUploader
				withIcon={true}
				buttonText='Choose images'
				onChange={this.onDrop}
				imgExtension={['.jpg', '.gif', '.png', '.gif']}
				maxFileSize={5242880}
			/>
        );
    }
}
```

### Available Options

| parameter | type | default | description |
| :--------: | :--: | :-----: | :---------- |
| className | String | - | Class name for the input. |
| fileContainerStyle | Object | - | Inline styles for the file container. |
| onChange | Function | - | On change handler for the input. |
| buttonClassName | String | - | Class name for upload button. |
| buttonStyles | Object | - | Inline styles for upload button. |
| withPreview | Boolean | true | Show preview of selected images. |
| accept | String | "accept=image/*" | Accept attribute for file input. |
| name | String | - | Input name. |
| withIcon | Boolean | true | If true, show upload icon on top |
| buttonText | String | 'Choose images' | The text that display in the button. |
| withLabel | Boolean | true | Show instruction label |
| label | String | 'Max file size: 5mb, accepted: jpg|gif|png|gif' | Label text |
| labelStyles | Object | - | Inline styles for the label. |
| labelClass | string | - | Class name for the label |
| imgExtension | Array | ['.jpg', '.gif', '.png', '.gif'] | Supported image extension (will use in the image validation). |
| maxFileSize | Number | 5242880 | Max image size. |
| fileSizeError | String | " file size is too big" | Label for file size error message. |
| fileTypeError | String | " is not supported file extension" | Label for file extension error message. |
| errorClass | String | - | Class for error messages |
| errorStyle | Object | - | Inline styles for errors |
| singleImage | Boolean | false | If true, only a single image can be selected |
|   maxFiles      |  Number  |                 99                 | Max number of files to upload.                                |

### License
MIT
npm package: @gerbergpt/medusa-fulfillment-sfexpress
Description: SF-Express fulfillment service for Medusa V2
Author: TONYLABS
Latest version: 1.0.0

<p align="center">
  <a href="https://www.medusajs.com">
  <picture>
    <source media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/59018053/229103275-b5e482bb-4601-46e6-8142-244f531cebdb.svg">
    <source media="(prefers-color-scheme: light)" srcset="https://user-images.githubusercontent.com/59018053/229103726-e5b529a3-9b3f-4970-8a1f-c6af37f087bf.svg">
    <img alt="Medusa logo" src="https://user-images.githubusercontent.com/59018053/229103726-e5b529a3-9b3f-4970-8a1f-c6af37f087bf.svg">
    </picture>
  </a>
</p>
<h1 align="center">
  Medusa SF-Express Fulfillment
</h1>

<h4 align="center">
  <a href="https://docs.medusajs.com">Documentation</a> |
  <a href="https://www.medusajs.com">Website</a>
</h4>

<p align="center">
  Building blocks for digital commerce
</p>
<p align="center">
  <a href="https://github.com/medusajs/medusa/blob/master/CONTRIBUTING.md">
    <img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat" alt="PRs welcome!" />
  </a>
    <a href="https://www.producthunt.com/posts/medusa"><img src="https://img.shields.io/badge/Product%20Hunt-%231%20Product%20of%20the%20Day-%23DA552E" alt="Product Hunt"></a>
  <a href="https://discord.gg/xpCwq3Kfn8">
    <img src="https://img.shields.io/badge/chat-on%20discord-7289DA.svg" alt="Discord Chat" />
  </a>
  <a href="https://twitter.com/intent/follow?screen_name=medusajs">
    <img src="https://img.shields.io/twitter/follow/medusajs.svg?label=Follow%20@medusajs" alt="Follow @medusajs" />
  </a>
</p>

## Compatibility

This plugin is compatible with versions >= 2.11.x of `@medusajs/medusa`.

## Table of Contents
- [Prerequisites](#prerequisites)
- [Installation](#installation)
- [Configuration](#configuration)
    - [Configuration Options](#configuration-options)
    - [Environment Variables](#environment-variables)

## Prerequisites
- Node.js v20 or higher
- Medusa server v2.11.3 or higher
- [SF-Express](https://open.sf-express.com/) account and API credential

## Installation

```bash
yarn add @gerbergpt/medusa-fulfillment-sfexpress
```

## Configuration
Add the provider module in your `medusa-config.ts` file:

```typescript
module.exports = defineConfig({
  projectConfig: {
    // ...
  },
  modules: [
    // ... other modules
    {
      resolve: "@medusajs/medusa/notification",
      options: {
        providers: [
          {
            id: "sf-express",
            resolve: "@gerbergpt/medusa-fulfillment-sfexpress/providers/fulfillment-sfexpress",
            options: {
              mode: process.env.SFEXPRESS_MODE,
              client_id: process.env.SFEXPRESS_CLIENT_ID,
              secret_sandbox: process.env.SFEXPRESS_SECRET_SANDBOX,
              secret_production: process.env.SFEXPRESS_SECRET_PRODUCTION,
            },
          },
        ],
      },
    },
  ]
})
```

## Environment Variables
Create or update your `.env` file with the following variables:

```bash
SFEXPRESS_CLIENT_ID=
SFEXPRESS_MODE=sandbox
SFEXPRESS_SECRET_SANDBOX=
SFEXPRESS_SECRET_PRODUCTION=
```
npm package: @gerblins/pg-migrate
Description: PostgreSQL migration framework
Latest version: 0.0.18

# pg-migrate

pg-migrate is a simple yet powerful migration framework for PostrgeSQL.

## Configuration

There are 3 ways to configure pg-migrate:

1.  .gpgm.ts
2.  environment variables
3.  command line

The order of configuration priority is `command line > environment variables > .gpgm.ts`, so command line flags always take priority.

### .gpgm.ts

This file is compiled and executed at runtime. An example file:

```typescript
export const db = {
  host: "localhost",
  port: 5432,
  user: "postgres",
  database: "postgres",
  migrationSchema: "public",
  migrationTable: "__migrations",
};

export const app = {
  migrationsFolder: "migrations/",
};
```

### Environment Variables

```
DB_HOST
DB_DATABASE
DB_PORT
DB_USER
DB_PASSWORD
DB_MIGRATION_SCHEMA
DB_MIGRATION_TABLE

DB_MIGRATIONS_FOLDER
DB_MIGRATION_TEMPLATE
```

### Command Line

```
usage: pg-migrate [-h] [-v] [-db DATABASE] [--host HOST] [-p PORT] [-u USER]
                  [-pw PASSWORD] [-s SCHEMA] [-t TABLE]
                  [-cs CONNECTION_STRING] [-m MIGRATIONS] [-tpl TEMPLATE]
                  {migrate,create} ...

Standalone migration runner for @gerblins/pg-migration

Optional arguments:
  -h, --help            Show this help message and exit.
  -v, --version         Show program's version number and exit.
  -db DATABASE, --database DATABASE
                        Name of the database to use
  --host HOST           Host to connect to
  -p PORT, --port PORT  Port to connect to
  -u USER, --user USER  Username to use when connecting
  -pw PASSWORD, --password PASSWORD
                        Password to use when connecting
  -s SCHEMA, --schema SCHEMA
                        Schema for migrations table
  -t TABLE, --table TABLE
                        Table to keep track of migrations
  -cs CONNECTION_STRING, --connection-string CONNECTION_STRING
                        Postgres connection string
  -m MIGRATIONS, --migrations MIGRATIONS
                        Folder that contains the migrations
  -tpl TEMPLATE, --template TEMPLATE
                        Template to use for creating migrations

command:
  {migrate,create}
```

Flags for `migrate` command:

```
usage: pg-migrate migrate [-h] [--damp]

Optional arguments:
  -h, --help  Show this help message and exit.
  --damp      Runs the queries but rolls them back
```

## Migration Files

Migration files are pretty simple and can be created by running `pg-migrate create`. An example migration:

```typescript
import { Migration, MigrationClient } from "../../../lib";

export default new Migration(1, [
  "CREATE TABLE test (id uuid not null primary key, value text)",
  async (client: MigrationClient) => {
    await client.query("SELECT 1 FROM test");
    return true;
  },
]);
```

## Damp Runs

A damp run is the next step above a dry run. It actually runs the migration but rolls back the transaction. This allows you to be confident that the migrations will work in the case of a 2 part deploy (deploy code, migrate).
npm package: @gerblins/pg-migrate-serverless
Description: Serverless plugin for @gerblins/pg-migrate
Latest version: 0.0.20

# pg-migrate Serverless Plugiin

A basic serverless plugin for [@gerblins/pg-migrate](https://www.npmjs.com/package/@gerblins/pg-migrate-serverless). The only command line flag this plugin supports is `--damp`.