open-index/open-npm huggingface dataset:
npm package: @1amageek/firestore-commerce
Description: Commerce for Cloud Firestore
Author: 1amageek
Latest version: 0.6.1

# firestore-commerce

`firestore-commerce` is a framework that links Firestore and Stripe.
By manipulating the [Ballcap](https://github.com/1amageek/ballcap.ts) data model, you can sell immediately.

## Usage

### Set Stripe API Key

```
firebase functions:config:set stripe.api_key="YOUR_STRIPE_API_KEY"
```

### Quick start

#### setup

```
npm add @1amageek/firestore-commerce
```

Add the following to CloudFunctions index.ts:

```typescript:index.ts
import * as Commerce from '@1amageek/firestore-commerce'
export const commerce = { ...Commerce }
```

To start selling, first create a `Product` and create a`SKU` or `Plan` in its SubCollection.
`SKU` is an object for selling __Good__, and `Plan` is an object for __Subscription__.

When you save `Product`, `SKU`, `Plan`, an object with the same ID is automatically created.
If an error occurs in Stripe, the data in Firestore is updated with `isAvailable = false`.

#### Create Product

When you save `Product`, a Stripe Product with a common ID is automatically created.

```typescript
const user: User = new User("USER_ID")
const product: Product = new Product(user.products.collectionReference.doc())
product.type = "service"
product.name = "test-product"
```

#### Create SKU

```typescript
const sku: SKU = new SKU(product.SKUs.collectionReference.doc())
sku.inventory = { type: StockType.finite, quantity: 1 }
sku.currency = Currency.JPY
sku.amount = 1000
```

#### Create Plan

```typescript
const plan: Plan = new Plan(product.plans.collectionReference.doc())
plan.interval = Interval.month
plan.intervalCount = 1
plan.currency = Currency.JPY
plan.amount = 1000
plan.isAvailable = true
```

## DB scheme

![DB scheme](https://github.com/1amageek/firestore-commerce/blob/master/DB-scheme.png)

## Test

Create `/test/config.ts` and `secret.json` 

__/test/config.ts__
```
export default {
	stripe: {
		api_key: "",
		customer_id: "",
		cord_id: ""
	}
};
```

__/secret.json__
```
{
	"type": "service_account",
	"project_id": "",
	"private_key_id": "",
	"private_key": "",
	"client_email": "",
	"client_id": "",
	"auth_uri": "",
	"token_uri": "",
	"auth_provider_x509_cert_url": "",
	"client_x509_cert_url": ""
}
```

Run tests
```
npm run test
```
npm package: @1amageek/flow
Description: Flow enables coding of structured scripts.
Author: 1amageek
Latest version: 0.2.1

# flow.ts

Flow enables coding of structured scripts.

# Installation

```shell
yarn add @1amageek/flow
```

# Usage

```typescript
class Item implements Flow.Dependency {
    status?: string
}

```

```typescript
var item: Item = new Item()

const step0: Flow.Step<Item> = new Flow.Step((item) => {
    // Do something
    return item
})

const step1: Flow.Step<Item> = new Flow.Step( async (item) => {
    try {
        return await asyncFunction()
    } catch(err) {
        // Error handling
        throw(err)
    }
})

const step2: Flow.Step<Item> = new Flow.Step((item) => {
    // Do something
    return item
})

const flow: Flow.Line<Item> = new Flow.Line([step0, step1, step2])

try {
    await flow.run(item)
} catch(error) {
    // Error handling
}   
```
npm package: @1amageek/geometory
Description: Hooks to get Geometory in React
Author: 1amageek
Latest version: 1.2.0

# geometory.tsx

## Installation

```
npm add @1amageek/geometory
```

## Usage

```tsx

const Component = () => {
  const [ref, size] = useSize<HTMLDivElement>()
  
  return (
    <div ref={ref}>
    
    </div>
  )
}

```
npm package: @1amageek/passkit
Description: passkit.ts is Passkit generator
Author: 1amageek
Latest version: 3.2.0

# passkit.ts

passkit.ts is a library for issuing pass with typescript.

## Installation

```shell
npm add @1amageek/passkit
```

## Usage

```typescript

const options: PassKit.Options = {
    secretURL: "SECRET_URL", // 
    wwdrURL: "WWDR_URL",
    passTypeIdentifier: "pass.**.**.**",
    teamIdentifier: "TEAM_ID",
    password: "PASSWORD",
}

PassKit.initialize(options)

```

```typescript
const assets = new PassKit.Assets()
assets.icon = "URL_icon"
assets.icon2x = "URL_icon2x"
assets.logo = "URL_logo"
assets.logo2x = "URL_logo2x"

const pass: PassKit.Pass = {}
pass.primaryFields = [
    {
        "key": "event",
        "label": "hoge",
        "value": "fuga"
    }
]
pass.secondaryFields = [
    {
        "key": "loc",
        "label": "hoge",
        "value": "fuga"
    }
]

const barcode: PassKit.Barcode = {
    altText: "wow",
    format: PassKit.BarcodeFormat.QR,
    message: "http://google.com",
    messageEncoding: "iso-8859-1"
}

const ticket: PassKit.EventTicket = new PassKit.EventTicket(pass, "Organization", "Description", "UUID_string")
ticket.webServiceURL = "https://google.com"
ticket.barcode = barcode
ticket.relevantDate = new Date()
ticket.logoText = "logo_string"
ticket.foregroundColor = new PassKit.RGB(255, 255, 255)
ticket.backgroundColor = new PassKit.RGB(255, 255, 255)
ticket.authenticationToken = "authenticationToken_string"
try {
    const path = await PassKit.generate(ticket, assets)
    console.log(path)
} catch (error) {
    console.log(error)
}
```


__Donation__

<img src="https://github.com/1amageek/passkit.ts/blob/master/kyash.jpg" width="200">
npm package: @1amageek/react-ui
Description: React UI Framwork.
Author: 1amageek
Latest version: 0.3.12

# ReactUI


```tsx
<HStack style={{ background: "green" }}>
  <Spacer />
  <HStack style={{ background: "red" }}>
    <p>Hello World</p>
    <Spacer />
    <p>Hello World</p>
  </HStack>
  <Spacer />
</HStack>
```
npm package: @1amageek/shared-icons
Description: Internal icons set, commonly used in the components stories
Author: HeroUI
Latest version: 2.1.2

# @heroui/shared-icons

A Quick description of the component

> This is an internal utility, not intended for public usage.

## Installation

```sh
yarn add @heroui/shared-icons
# or
npm i @heroui/shared-icons
```

## Contribution

Yes please! See the
[contributing guidelines](https://github.com/heroui-inc/heroui/blob/master/CONTRIBUTING.md)
for details.

## License

This project is licensed under the terms of the
[MIT license](https://github.com/heroui-inc/heroui/blob/master/LICENSE).
npm package: @1amageek/system-rsc
Description: HeroUI system primitives compatibles with RSC imports
Author: HeroUI
Latest version: 2.3.6

# @heroui/system-rsc

A Quick description of the component

> This is an internal utility, not intended for public usage.

## Installation

```sh
yarn add @heroui/system-rsc
# or
npm i @heroui/system-rsc
```

## Contribution

Yes please! See the
[contributing guidelines](https://github.com/heroui-inc/heroui/blob/master/CONTRIBUTING.md)
for details.

## License

This project is licensed under the terms of the
[MIT license](https://github.com/heroui-inc/heroui/blob/master/LICENSE).
npm package: @1amageek/use-aria-accordion
Description: React-aria useAccordion hooks with custom implementations
Author: HeroUI
Latest version: 2.2.3

# @heroui/use-aria-accordion

A Quick description of the component

> This is an internal utility, not intended for public usage.

## Installation

```sh
yarn add @heroui/use-aria-accordion
# or
npm i @heroui/use-aria-accordion
```

## Contribution

Yes please! See the
[contributing guidelines](https://github.com/heroui-inc/heroui/blob/master/CONTRIBUTING.md)
for details.

## License

This project is licensed under the terms of the
[MIT license](https://github.com/heroui-inc/heroui/blob/master/LICENSE).
npm package: @1amageek/use-draggable
Description: This hook can provide drag and drop interaction
Author: HeroUI
Latest version: 2.1.3

# @heroui/use-draggable

A Quick description of the component

> This is an internal utility, not intended for public usage.

## Installation

```sh
yarn add @heroui/use-draggable
# or
npm i @heroui/use-draggable
```

## Contribution

Yes please! See the
[contributing guidelines](https://github.com/heroui-inc/heroui/blob/master/CONTRIBUTING.md)
for details.

## License

This project is licensed under the terms of the
[MIT license](https://github.com/heroui-inc/heroui/blob/master/LICENSE).
npm package: @1amageek/use-intersection-observer
Description: Tracks the intersection of a DOM element and its containing element or the viewport.
Author: HeroUI
Latest version: 2.2.3

# @heroui/use-intersection-observer

A Quick description of the component

> This is an internal utility, not intended for public usage.

## Installation

```sh
yarn add @heroui/use-intersection-observer
# or
npm i @heroui/use-intersection-observer
```

## Contribution

Yes please! See the
[contributing guidelines](https://github.com/heroui-inc/heroui/blob/master/CONTRIBUTING.md)
for details.

## License

This project is licensed under the terms of the
[MIT license](https://github.com/heroui-inc/heroui/blob/master/LICENSE).
npm package: @1amageek/use-scroll-position
Description: Provides the logic to control the scroll over an element
Author: HeroUI
Latest version: 2.1.2

# @heroui/use-scroll-position

A Quick description of the component

> This is an internal utility, not intended for public usage.

## Installation

```sh
yarn add @heroui/use-scroll-position
# or
npm i @heroui/use-scroll-position
```

## Contribution

Yes please! See the
[contributing guidelines](https://github.com/heroui-inc/heroui/blob/master/CONTRIBUTING.md)
for details.

## License

This project is licensed under the terms of the
[MIT license](https://github.com/heroui-inc/heroui/blob/master/LICENSE).
npm package: @1amageek/use-ssr
Description: A Quick description of the component
Author: HeroUI
Latest version: 2.1.2

# @heroui/use-ssr

A Quick description of the component

> This is an internal utility, not intended for public usage.

## Installation

```sh
yarn add @heroui/use-ssr
# or
npm i @heroui/use-ssr
```

## Contribution

Yes please! See the
[contributing guidelines](https://github.com/heroui-inc/heroui/blob/master/CONTRIBUTING.md)
for details.

## License

This project is licensed under the terms of the
[MIT license](https://github.com/heroui-inc/heroui/blob/master/LICENSE).
npm package: @1blckhrt_/tslogger
Description: A simple TypeScript logger to log messages to the console in specific colors.
Author: 1blckhrt
Latest version: 1.3.0

<h1>📃 Logger - Developed by 1blckhrt</h1>

<p>A simple TypeScript logger utility class that prints colored messages to the console and timestamps, with the option of saving a message to a file.

<h2>Installation</h2>

<p>You can install my logger program using npm:</p>

```sh
npm install @1blckhrt_/tslogger
```

<h2>Basic usage</h2>

<h3>Importing</h3>

```js
const { logger } = require("@1blckhrt_/tslogger");
import { logger } from "@1blckhrt_/tslogger";
```

<h3>Logging to files</h3>

```js
logger.setLogFile("log.txt"); // setting the file to log to
logger.saveToFile("Hello World!"); // saving the message
```

<h3>Printing colored messages to the console</h3>

```js
logger.red("This is a red message");
logger.yellow("This is a yellow message");
logger.green("This is a green message");
logger.cyan("This is a cyan message");
logger.blue("This is a blue message");
logger.magenta("This is a magenta message");
```

<h3>Printing levelled messages to the console</h3>

```js
logger.error("This is an error message");
logger.warning("This is a warning message");
logger.info("This is an info message");
logger.success("This is a success message");
```

# Thank you for checking out my program, I hope it is useful.