open-index/open-npm huggingface dataset:
npm package: @polyscope/sdk
Description: Official Polyscope SDK for JavaScript and TypeScript
Author: Beyond Code
Latest version: 0.1.0

# Polyscope JS SDK

A TypeScript/JavaScript SDK for the Polyscope API.

## Installation

```bash
npm install @polyscope/sdk
```

## Quick Start

```typescript
import { Polyscope } from "@polyscope/sdk";

const polyscope = new Polyscope({ apiToken: "your-api-token" });

const servers = await polyscope.servers();
const repositories = await polyscope.repositories();
const workspaces = await polyscope.workspaces();

// Create a workspace directly from a repository resource.
const workspace = await repositories[0].createWorkspace({
  prompt: "Fix the login flow",
  serverId: "srv-1", // optional
});

// Or use a prompt string shorthand.
const workspace = await repositories[0].createWorkspace("Fix the login flow");
```

If no token is passed, the SDK automatically falls back to Polyscope's local settings file and reads `authToken`.
By default it checks:

- `~/.polyscope/settings.json`
- `~/Library/Application Support/com.getpolyscope.app/settings.json`
- `~/.config/com.getpolyscope.app/settings.json`
- `%APPDATA%/com.getpolyscope.app/settings.json`

You can override this with:

```bash
POLYSCOPE_SETTINGS_PATH=/custom/path/settings.json
```

If you need a custom base URL:

```typescript
const polyscope = new Polyscope();
polyscope.setBaseUrl("https://your-polyscope-instance.com");
polyscope.setApiToken("your-api-token");
```

## Supported API Areas (v1 only)

- Servers: `servers()`
- Repositories: `repositories()`
- Workspaces: `workspaces()`, `createWorkspace()`, `workspace()`, `deleteWorkspace()`
- Workspace messages: `workspace.messages()`, `workspace.prompt()`
- Workspace actions: `workspace.diff()`, `workspace.commit()`, `workspace.pullRequest()`, `workspace.stop()`

## Error Handling

The SDK maps common HTTP/API failures to typed errors:

- `ValidationError`
- `AuthenticationError`
- `ForbiddenError`
- `NotFoundError`
- `RateLimitError`
- `ServerOfflineError`
- `ServerTimeoutError`
- `ApiError`

Example:

```typescript
import { Polyscope, ValidationError } from "@polyscope/sdk";

try {
  await polyscope.createWorkspace({ repositoryId: "" });
} catch (error) {
  if (error instanceof ValidationError) {
    console.log(error.errors);
  }
}
```

## Development

```bash
npm run build
npm run typecheck
```
npm package: @polysky-libs/sdk
Description: 🛠 An SDK for building applications on top of Polysky.
Author: polysky.finance
Latest version: 0.0.2

# Polysky SDK

Forked from the [Pancakeswap SDK](https://github.com/pancakeswap/pancake-swap-sdk/commit/7d81106174e16d1f1c6c91a93558736282a39ec1).

You can refer to the Uniswap SDK documentation [uniswap.org](https://uniswap.org/docs/v2/SDK/getting-started/).

## Running tests

To run the tests, follow these steps. You must have at least node v10 and [yarn](https://yarnpkg.com/) installed.

First clone the repository:

```sh
git clone https://github.com/pancakeswap/pancakeswap-sdk.git
```

Move into the pancakeswap-sdk working directory

```sh
cd pancakeswap-sdk/
```

Install dependencies

```sh
yarn install
```

Run tests

```sh
yarn test
```

You should see output like the following:

```sh
yarn run v1.22.4
$ tsdx test
 PASS  test/constants.test.ts
 PASS  test/pair.test.ts
 PASS  test/fraction.test.ts
 PASS  test/miscellaneous.test.ts
 PASS  test/entities.test.ts
 PASS  test/trade.test.ts

Test Suites: 1 skipped, 6 passed, 6 of 7 total
Tests:       3 skipped, 82 passed, 85 total
Snapshots:   0 total
Time:        5.091s
Ran all test suites.
✨  Done in 6.61s.
```
npm package: @polysky-libs/uikit
Description: Set of UI components for polysky projects
Latest version: 0.65.8

# Polysky UIkit

[![Version](https://img.shields.io/npm/v/@polysky-libs/uikit)](https://www.npmjs.com/package/@polysky-libs/uikit) [![Size](https://img.shields.io/bundlephobia/min/@polysky-libs/uikit)](https://www.npmjs.com/package/@polysky-libs/uikit)

Polysky UIkit is a set of React components and hooks used to build pages on Polysky's apps. It also contains a theme file for dark and light mode. Forked from Pancakeswap UIKit.

## Install

`yarn add @polysky-libs/uikit`

## Setup

### Theme

Before using Polysky UIkit, you need to provide the theme file to styled-component.

```
import { ThemeProvider } from 'styled-components'
import { light, dark } from '@polysky-libs/uikit'
...
<ThemeProvider theme={isDark}>...</ThemeProvider>
```

### Reset

A reset CSS is available as a global styled component.

```
import { ResetCSS } from '@polysky-libs/uikit'
...
<ResetCSS />
```

### Types

This project is built with Typescript and export all the relevant types.

## How to use the UIkit

If you want to use components from the UIkit, check the [Storybook documentation](https://pancakeswap.github.io/pancake-uikit/)
npm package: @polysodafinance/uikit
Description: Set of UI components for soda projects
Latest version: 0.9.0

# Soda UIkit

[![Version](https://img.shields.io/npm/v/@polysodafinance/uikit)](https://www.npmjs.com/package/@polysodafinance/uikit) [![Size](https://img.shields.io/bundlephobia/min/@polysodafinance/uikit)](https://www.npmjs.com/package/@polysodafinance/uikit)

Soda UIkit is a set of React components and hooks used to build pages on Soda's apps. It also contains a theme file for dark and light mode.

## Install

`yarn add @polysodafinance/uikit`

## Setup

### Theme

Before using Soda UIkit, you need to provide the theme file to styled-component.

```
import { ThemeProvider } from 'styled-components'
import { light, dark } from '@polysodafinance/uikit'
...
<ThemeProvider theme={isDark}>...</ThemeProvider>
```

### Reset

A reset CSS is available as a global styled component.

```
import { ResetCSS } from '@polysodafinance/uikit'
...
<ResetCSS />
```

### Types

This project is built with Typescript and export all the relevant types.

## How to use the UIkit

If you want to use components from the UIkit, check the [Storybook documentation](https://sodaswap.github.io/soda-uikit/)
npm package: @polystate/cli
Description: CLI tool for Polystate code generation
Author: Polystate Contributors
Latest version: 0.2.0

# @polystate/cli

Command-line tool for Polystate code generation.

Generates React Redux or Angular NgRx store code from framework-agnostic store definitions.

## Installation

```bash
npm install --save-dev @polystate/cli
```

Or use directly with npx:

```bash
npx @polystate/cli generate store.definition.ts --react
```

## Usage

### Generate Code

```bash
# Generate React (default)
npx polystate generate store.definition.ts

# Generate both React and Angular
npx polystate generate store.definition.ts --both

# Generate React only
npx polystate generate store.definition.ts --react

# Generate Angular only
npx polystate generate store.definition.ts --angular

# Specify output directory
npx polystate generate store.definition.ts --out-dir src/store

# Overwrite existing files
npx polystate generate store.definition.ts --overwrite

# Check generated files are up-to-date (exit code: 0=ok, 1=stale, 2=missing)
npx polystate check store.definition.ts --react --store-dir src/store
```

### Validate Definition

```bash
npx polystate validate store.definition.ts
```

## Store Definition File

Create a `store.definition.ts` file:

```typescript
import { StoreDefinition } from '@polystate/definition';

export const todoDefinition: StoreDefinition = {
  name: 'todo',
  initialState: {
    todos: [] as Array<{ id: number; title: string; done: boolean }>,
    filter: 'all' as string,
  },
  actions: {
    addTodo: (state, title: string) => ({
      ...state,
      todos: [...state.todos, { id: Date.now(), title, done: false }],
    }),
    toggleTodo: (state, id: number) => ({
      ...state,
      todos: state.todos.map((t) => (t.id === id ? { ...t, done: !t.done } : t)),
    }),
    removeTodo: (state, id: number) => ({
      ...state,
      todos: state.todos.filter((t) => t.id !== id),
    }),
    setFilter: (state, filter: string) => ({
      ...state,
      filter,
    }),
  },
  description: 'Todo store with filtering',
};
```

## Output

### React Output

```
src/store/
├── store.ts          # Redux store, actions, middleware
├── hooks.ts          # React hooks
└── types.ts          # TypeScript types
```

### Angular Output

```
src/store/
├── state.ts          # State interface
├── actions.ts        # NgRx actions
├── reducer.ts        # Reducer function
├── selectors.ts      # Memoized selectors
├── facade.ts         # Service facade
├── effects.ts        # NgRx effects (async actions)
└── store.module.ts   # Angular module
```

## Features

- ✅ Framework-agnostic store definitions
- ✅ Generate production-ready Redux code
- ✅ Generate production-ready NgRx code
- ✅ Definition validation
- ✅ Built-in middleware and features
- ✅ Full TypeScript support

## License

MIT
npm package: @polystate/definition
Description: Framework-agnostic store definitions for Polystate code generation
Author: Polystate Contributors
Latest version: 0.2.0

# @polystate/definition

Framework-agnostic store definitions for Polystate code generation.

This package provides TypeScript types and validators for defining stores that can be used to generate React Redux or Angular NgRx implementations.

## Installation

```bash
npm install @polystate/definition
```

## Usage

### Define a Store

```typescript
import { StoreDefinition } from '@polystate/definition';

export const todoDefinition: StoreDefinition = {
  name: 'todo',
  initialState: {
    todos: [] as Array<{ id: number; title: string; done: boolean }>,
    filter: 'all' as 'all' | 'active' | 'completed',
  },
  actions: {
    addTodo: (state, title: string) => ({
      ...state,
      todos: [...state.todos, { id: Date.now(), title, done: false }],
    }),
    toggleTodo: (state, id: number) => ({
      ...state,
      todos: state.todos.map((t) => (t.id === id ? { ...t, done: !t.done } : t)),
    }),
    removeTodo: (state, id: number) => ({
      ...state,
      todos: state.todos.filter((t) => t.id !== id),
    }),
    setFilter: (state, filter: string) => ({
      ...state,
      filter,
    }),
  },
  description: 'Todo store with filtering',
};
```

### Validate a Definition

```typescript
import { validateStoreDefinition } from '@polystate/definition';

const result = validateStoreDefinition(todoDefinition);
if (result.valid) {
  console.log('Definition is valid');
} else {
  console.error('Errors:', result.errors);
  console.warn('Warnings:', result.warnings);
}
```

## API

### Types

- `StoreDefinition<T>` - Complete store definition
- `ActionHandler<TState, TPayload>` - Action handler function
- `ActionMap<TState>` - Map of action handlers
- `ValidationResult` - Result of validation
- `GenerateOptions` - Code generation options
- `GenerationResult` - Result of code generation

### Functions

- `validateStoreDefinition(definition)` - Validate a store definition
- `normalizeStoreDefinition(definition)` - Normalize a definition
- `extractActions(definition)` - Extract action information

## License

MIT