open-index/open-npm huggingface dataset:
npm package: @ovineko/clean-pkg-json
Description: Zero-config tool to clean package.json before publishing and restore it after
Author: Alexander Svinarev
Latest version: 0.0.3

# @ovineko/clean-pkg-json

Zero-config tool to clean `package.json` before publishing and restore it after.

Removes dev-only fields (`devDependencies`, `scripts`, `eslintConfig`, etc.) keeping only what's needed in the published package.

## Install

```bash
pnpm add -D @ovineko/clean-pkg-json
```

## Usage

```bash
clean-pkg-json clean    # backup + clean
clean-pkg-json restore  # restore from backup
```

### With npm lifecycle hooks

```json
{
  "scripts": {
    "prepack": "clean-pkg-json clean",
    "postpack": "clean-pkg-json restore"
  }
}
```

## How it works

**`clean`** creates `package.json.backup`, then removes all fields not in the whitelist.

**`restore`** replaces `package.json` from backup and deletes the backup file.

## Whitelisted fields

| Category     | Fields                                                                                                                          |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------- |
| Identity     | `name`, `version`, `description`, `keywords`, `author`, `license`                                                               |
| Entry points | `main`, `module`, `types`, `exports`, `bin`                                                                                     |
| Publishing   | `files`, `type`, `engines`, `publishConfig`, `repository`, `bugs`, `homepage`, `sideEffects`, `funding`                         |
| Dependencies | `dependencies`, `peerDependencies`, `peerDependenciesMeta`, `optionalDependencies`, `bundledDependencies`, `bundleDependencies` |

### Whitelisted scripts

Only npm lifecycle hooks survive: `preinstall`, `install`, `postinstall`.

## License

MIT
npm package: @ovineko/spa-guard-eslint
Description: ESLint rules for spa-guard (no-direct-lazy, no-direct-error-boundary)
Author: Alexander Svinarev
Latest version: 0.0.3-alpha-0

# @ovineko/spa-guard-eslint

[![npm version](https://img.shields.io/npm/v/@ovineko/spa-guard-eslint)](https://www.npmjs.com/package/@ovineko/spa-guard-eslint)
[![license](https://img.shields.io/npm/l/@ovineko/spa-guard-eslint)](./LICENSE)

ESLint plugin with rules that enforce spa-guard usage patterns: `no-direct-lazy` and `no-direct-error-boundary`.

## Install

```sh
npm install --save-dev @ovineko/spa-guard-eslint eslint
```

## Usage

Add the recommended config to your `eslint.config.js` (flat config):

```js
import spaGuard from "@ovineko/spa-guard-eslint";

export default [
  spaGuard.configs.recommended,
  // ... your other configs
];
```

The recommended config enables both rules at `"error"` level with autofixes.

## Rules

### `no-direct-lazy`

Disallows importing `lazy` from `react`. Use `lazyWithRetry` from `@ovineko/spa-guard-react` instead.

```ts
// Bad - flagged by the rule
import { lazy } from "react";

// Good - autofix replaces it with:
import { lazyWithRetry } from "@ovineko/spa-guard-react";
```

### `no-direct-error-boundary`

Disallows importing from `react-error-boundary`. Use `@ovineko/spa-guard-react/error-boundary` instead.

```ts
// Bad - flagged by the rule
import { ErrorBoundary } from "react-error-boundary";

// Good - autofix replaces it with:
import { ErrorBoundary } from "@ovineko/spa-guard-react/error-boundary";
```

Both rules provide autofixes and are fixable via `eslint --fix`.

## API

- `plugin` (default export) - ESLint plugin object with `rules` and `configs`
- `configs` - Named export; `configs.recommended` is the flat config object
- `rules` - Named export; object with `no-direct-lazy` and `no-direct-error-boundary`

## Related packages

- [@ovineko/spa-guard](../spa-guard/README.md) - Core package
- [@ovineko/spa-guard-react](../react/README.md) - React integration (lazyWithRetry, ErrorBoundary)

## License

MIT
npm package: @ovineko/spa-guard-fastify
Description: Fastify plugin for spa-guard beacon endpoint and HTML cache handler with ETag/304
Author: Alexander Svinarev
Latest version: 0.0.3-alpha-0

# @ovineko/spa-guard-fastify

[![npm version](https://img.shields.io/npm/v/@ovineko/spa-guard-fastify)](https://www.npmjs.com/package/@ovineko/spa-guard-fastify)
[![license](https://img.shields.io/npm/l/@ovineko/spa-guard-fastify)](./LICENSE)

Fastify plugin for spa-guard beacon endpoint and HTML cache handler with ETag/304 support.

## Install

```sh
npm install @ovineko/spa-guard-fastify @ovineko/spa-guard @ovineko/spa-guard-node fastify fastify-plugin
```

## Usage

### Beacon endpoint

Register the plugin to receive beacon data posted by the spa-guard client runtime:

```ts
import Fastify from "fastify";
import { fastifySPAGuard } from "@ovineko/spa-guard-fastify";

const app = Fastify();

app.addContentTypeParser("text/plain", { parseAs: "string" }, (_req, body, done) => {
  done(null, body);
});

app.register(fastifySPAGuard, {
  path: "/api/beacon",
  onBeacon: async (beacon, request, reply) => {
    request.log.info({ beacon }, "SPA Guard beacon received");
    // optionally suppress default log
    return { skipDefaultLog: true };
  },
  onUnknownBeacon: async (body, request) => {
    request.log.warn({ body }, "Unknown beacon format");
  },
});

await app.listen({ port: 3000 });
```

### HTML cache handler

Serve your SPA's `index.html` with ETag/304 and compression negotiation:

```ts
import { createReadStream } from "node:fs";
import { spaGuardFastifyHandler } from "@ovineko/spa-guard-fastify";
import { createHtmlCache } from "@ovineko/spa-guard-node";

const handlerOptions = {};

app.get("/*", async (request, reply) => {
  return spaGuardFastifyHandler(request, reply, {
    ...handlerOptions,
    getHtml: () => ({ html: "<html>...</html>" }),
  });
});
```

## API

### `fastifySPAGuard` (Fastify plugin)

Registers a `POST` route at `options.path` to receive beacon payloads.

Options:

- `path` (required) - Route path for the beacon endpoint, e.g. `"/api/beacon"`
- `onBeacon(beacon, request, reply)` - Called with parsed beacon data. Return `{ skipDefaultLog: true }` to suppress default logging.
- `onUnknownBeacon(body, request, reply)` - Called when beacon fails schema validation. Return `{ skipDefaultLog: true }` to suppress default warning.

### `spaGuardFastifyHandler(request, reply, options)`

Fastify request handler that serves HTML with ETag/304 and content-encoding negotiation.

Options:

- `cache` - Pre-built `HtmlCache` instance
- `getHtml()` - Async factory returning `CreateHtmlCacheOptions`; cache is created lazily on first request

### Exported types

- `FastifySPAGuardOptions`
- `SpaGuardHandlerOptions`
- `BeaconHandlerResult`
- `BeaconError`

## Related packages

- [@ovineko/spa-guard](../spa-guard/README.md) - Core package
- [@ovineko/spa-guard-node](../node/README.md) - Node.js HTML cache
- [@ovineko/spa-guard-vite](../vite/README.md) - Vite build plugin

## License

MIT
npm package: @ovineko/spa-guard-react
Description: React hooks, components, and error boundaries for spa-guard
Author: Alexander Svinarev
Latest version: 0.0.3-alpha-0

# @ovineko/spa-guard-react

[![npm](https://img.shields.io/npm/v/@ovineko/spa-guard-react)](https://www.npmjs.com/package/@ovineko/spa-guard-react)
[![license](https://img.shields.io/npm/l/@ovineko/spa-guard-react)](./LICENSE)

React hooks, components, and error boundaries for [spa-guard](../spa-guard/README.md).

## Install

```sh
npm install @ovineko/spa-guard-react @ovineko/spa-guard react
```

## Usage

### lazyWithRetry

Wrap `React.lazy` to automatically retry chunk load failures with configurable delays.

```tsx
import { Suspense } from "react";
import { lazyWithRetry } from "@ovineko/spa-guard-react";

const LazyHome = lazyWithRetry(() => import("./pages/Home"));

// Override retry delays for a specific route
const LazyCheckout = lazyWithRetry(() => import("./pages/Checkout"), {
  retryDelays: [500, 1000, 2000, 4000],
});

export function App() {
  return (
    <Suspense fallback={<div>Loading...</div>}>
      <LazyHome />
    </Suspense>
  );
}
```

### ErrorBoundary

Catches errors in child components and integrates with spa-guard retry state.

```tsx
import { ErrorBoundary } from "@ovineko/spa-guard-react/error-boundary";

export function App() {
  return (
    <ErrorBoundary>
      <MyApp />
    </ErrorBoundary>
  );
}
```

## API

From `@ovineko/spa-guard-react`:

- `lazyWithRetry(importFn, options?)` — lazy component with automatic retry
- `useSpaGuardState()` — reactive hook for current spa-guard state
- `useSPAGuardChunkError()` — hook to detect chunk load errors
- `useSPAGuardEvents()` — hook to subscribe to spa-guard events
- `DefaultErrorFallback` — default fallback UI component
- `Spinner` — loading spinner component
- `DebugSyncErrorTrigger` — trigger sync errors for testing
- `ForceRetryError` — error class to force a retry
- `LazyRetryOptions` — options type for `lazyWithRetry`
- `SpaGuardState` — spa-guard state type

From `@ovineko/spa-guard-react/error-boundary`:

- `ErrorBoundary` — error boundary with spa-guard integration
- `ErrorBoundaryProps` — props for `ErrorBoundary`
- `FallbackProps` — props passed to fallback component

## Related Packages

- [@ovineko/spa-guard](../spa-guard/README.md) — core package
- [@ovineko/spa-guard-react-router](../react-router/README.md) — React Router integration
- [@ovineko/spa-guard-vite](../vite/README.md) — Vite plugin

## License

MIT
npm package: @ovineko/spa-guard-react-router
Description: React Router v7 error boundary integration for spa-guard
Author: Alexander Svinarev
Latest version: 0.0.3-alpha-0

# @ovineko/spa-guard-react-router

[![npm](https://img.shields.io/npm/v/@ovineko/spa-guard-react-router)](https://www.npmjs.com/package/@ovineko/spa-guard-react-router)
[![license](https://img.shields.io/npm/l/@ovineko/spa-guard-react-router)](./LICENSE)

React Router v7 error boundary integration for [spa-guard](../spa-guard/README.md).

Catches route errors via `useRouteError()` and automatically retries chunk loading failures with spa-guard integration.

## Install

```sh
npm install @ovineko/spa-guard-react-router @ovineko/spa-guard @ovineko/spa-guard-react react react-router
```

## Usage

Register `ErrorBoundaryReactRouter` as the `errorElement` (or `ErrorBoundary`) for your routes:

```tsx
import { createBrowserRouter, RouterProvider } from "react-router";
import { ErrorBoundaryReactRouter } from "@ovineko/spa-guard-react-router";

const router = createBrowserRouter([
  {
    path: "/",
    element: <App />,
    ErrorBoundary: ErrorBoundaryReactRouter,
  },
]);

export function Root() {
  return <RouterProvider router={router} />;
}
```

### Custom fallback

```tsx
import {
  ErrorBoundaryReactRouter,
  type RouterFallbackProps,
} from "@ovineko/spa-guard-react-router";

function MyFallback({ error, isChunkError, isRetrying }: RouterFallbackProps) {
  if (isRetrying) return <div>Reloading...</div>;
  if (isChunkError) return <div>Failed to load module — retrying…</div>;
  return <div>Something went wrong: {String(error)}</div>;
}

// In your route definition:
<ErrorBoundaryReactRouter fallback={MyFallback} />;
```

## API

From `@ovineko/spa-guard-react-router`:

- `ErrorBoundaryReactRouter` — error boundary component for React Router routes
- `ErrorBoundaryReactRouterProps` — props for `ErrorBoundaryReactRouter`
  - `autoRetryChunkErrors?` — retry chunk errors automatically (default: `true`)
  - `fallback?` — custom fallback component or render function
  - `onError?` — callback invoked on any route error
  - `sendBeacon?` — send beacon on error (default: `true`)
- `RouterFallbackProps` — props passed to the fallback component
  - `error` — the route error caught by `useRouteError()`
  - `isChunkError` — whether the error is a chunk load failure
  - `isRetrying` — whether spa-guard is currently retrying
  - `spaGuardState` — current spa-guard state

## Related Packages

- [@ovineko/spa-guard](../spa-guard/README.md) — core package
- [@ovineko/spa-guard-react](../react/README.md) — React hooks and error boundary
- [@ovineko/spa-guard-vite](../vite/README.md) — Vite plugin

## License

MIT
npm package: @ovis-technologies/ovis-blueprint
Description: Ovis Technologies React Component Library
Author: Harvey Delaney
Latest version: 4.0.3

# Ovis Blueprint

A React Component library built by ovis technologies.

## Installation

```
$ yarn add @ovis-technologies/ovis-blueprint
```

</br>

## Contributing

TODO: Contribution documention and release info. Include changelog, publish, and versioning instructions.

</br>

## Development

Once you have cloned the package. Run `yarn install` (not `npm`) to install package dependencies.

```
$ cd ovis-blueprint-library
$ yarn install
```

### Storybook

You can develop within Storybook, which will also run the component documentation:

```
$ yarn storybook
```

### Project development

Alternatively, there are times where we want to see how your changes work within a local project using the package as a dependency.

1. Set a global symlink to the package. At the root of `ovis-blueprint-library` run:

```
$ yarn link
```

2. At the root of your project directory or same level as `package.json`

```
$ yarn link "@ovis-technologies/ovis-blueprint"
```

3. Run bundler to compile to vanilla JS.

```
$ yarn start
```

</br>

Changes should now cause a new build and in turn, your projects hot-reloader should recognize the change as well!

</br>

**Note** - The package will automatically assume you are developing for the Haven project as well as having `/ovis-blueprint-library` at the same level directory:

```
/any-folder
├── /sanc-haven-fe
└── /ovis-blueprint-library
```

This is so we can leverage React hooks by using the same version of React as your project. If you want are developing for a different project, or Haven is in a different directory you will have to run:

```
$ yarn run link:react <path/to/project>
```

You should see a change under `devDependencies` in `package.json` for `react` linking to your desired project's `node_modules`. **Please avoid commiting this change.**

</br>

### Troubleshooting

Duplicate React or Hook errors:

Confirm your `devDependencies` for `react` is pointing to the project's version of React: `react: link:../path/to/project/node_modules/react`

</br>

Package Errors:

If for whatever your link to React broke or you are trying to reinstall you can run:

```
$ yarn run reset
```

This will uninstall your `node_modules` and install fresh; which is a good place to start with weird package erros.

</br>

Unlinking:

Unlike `npm` which a simple deletion of `node_modules` and reinstall can help correct a link issue, with `yarn` you will have to unlink because the link persists. At the root of `ovis-blueprint-library` run:

```
yarn unlink

```

## [Reporting](./Reporting.md)
npm package: @ovis/log
Description: ## api ``` init(ctx, timingType) subscribe('topic', subScribeFunction) publish('topic', dataOrFn) ```
Author: yang4515
Latest version: 1.0.0

# mq

## api
```
init(ctx, timingType)
subscribe('topic', subScribeFunction)
publish('topic', dataOrFn)
```

## params
```
const ctx = {} // Some objects you might use, such as mongodb instances

const topic = '' // patterns

const timing = [
  'second', // default
  'minute',
  'hour',
  'day'
]

const subScribeFunction = (params, ctx) => {}
const dataOrFn = params || (ctx) => {}
```


## use
```
init({ name: 'ctxName' }, 'minute')

subscribe(
  'testTopic',
   (data, ctx) => console.log(`${data.name} : ${ctx.name}) // "passName : ctxName"
)

publish('testTopic', { name: 'passName' }) // publish immediately
publish('testTopic', { name: 'passName' }, 1) // after one minute
publish('testTopic', { name: 'passName' }, 2) // after two minute
```
npm package: @ovis/mock
Description: ## 使用
Latest version: 1.0.2

# mock

## 使用

### 启动  

  mock  
  mock ./mock  
  pm2 start mock  
  pm2 start mock -- ./mock  

### 存响应  

  在服务端真实响应回来的时候，再发一份给4001端口做json存储  
  wx.request({ url: 'http://localhost:4001', data: { url, res.data }, method: 'POST' }) // wx会包一层data，传之前要去掉  
  wx要把域名合法性校验关了  

### 使用响应  

  改请求的host为http://localhost:4000  

### 手动存响应mock  

  手写json文件，url中的/用\_代替，如http://localhost/a/b，可以建文件a\_b.json
npm package: @ovistek/bvx-clut
Description: Colour Lookup Table (LUT) for BitVoxel Engine
Author: OvisTek
Latest version: 0.1.0

<h3 align="center">
  <img src="graphics/icon.png?raw=true" alt="OvisTek Logo" width="150">
</h3>

[![Twitter: @OvisTek](https://img.shields.io/badge/contact-OvisTek-blue.svg?style=flat)](https://twitter.com/OvisTek)
[![install size](https://packagephobia.com/badge?p=@ovistek/bvx-clut)](https://packagephobia.com/result?p=@ovistek/bvx-clut)
[![NPM](https://img.shields.io/npm/v/@ovistek/bvx-clut)](https://www.npmjs.com/package/@ovistek/bvx-clut)
[![License](https://img.shields.io/badge/license-MIT-orange.svg?style=flat)](LICENSE)

#### **Color Lookup Table (LUT) for [BitVoxel Engine](https://github.com/OvisTek/bvx.ts)**

* * *

Color Lookup Table (LUT) generates named colors used in 3D BitVoxel Rendering to achieve certain effects. This LUT is designed to work with the [BitVoxel Engine](https://github.com/OvisTek/bvx.ts).

### _**Installation**_

-   Install using [npm](https://www.npmjs.com/package/@ovistek/bvx-clut)

```console
npm install @ovistek/bvx-clut
```

### _**Acknowledgements**_

This tool relies on the following open source projects.

-   [bvx.ts](https://github.com/OvisTek/bvx.ts)
npm package: @ovistek/bvx-glut
Description: Geometry Lookup Table (LUT) for BitVoxel Engine
Author: OvisTek
Latest version: 1.6.0

<h3 align="center">
  <img src="graphics/icon.png?raw=true" alt="OvisTek Logo" width="150">
</h3>

[![Twitter: @OvisTek](https://img.shields.io/badge/contact-OvisTek-blue.svg?style=flat)](https://twitter.com/OvisTek)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/3c4ac51092194bd196a82668df0e2c72)](https://www.codacy.com/gh/OvisTek/bvx-glut/dashboard?utm_source=github.com&utm_medium=referral&utm_content=OvisTek/bvx-glut&utm_campaign=Badge_Grade)
[![install size](https://packagephobia.com/badge?p=@ovistek/bvx-glut)](https://packagephobia.com/result?p=@ovistek/bvx-glut)
[![NPM](https://img.shields.io/npm/v/@ovistek/bvx-glut)](https://www.npmjs.com/package/@ovistek/bvx-glut)
[![License](https://img.shields.io/badge/license-MIT-orange.svg?style=flat)](LICENSE)

#### **Geometry Lookup Table (LUT) for [BitVoxel Engine](https://github.com/OvisTek/bvx.ts)**

* * *

Geometry Lookup Table (LUT) generates **vertices**, **normals** and **indices** used in 3D BitVoxel Rendering. This LUT is designed to work with _6 bit BitVoxel Geometry Indices_ output from the [BitVoxel Engine](https://github.com/OvisTek/bvx.ts).

### _**Installation**_

-   Install using [npm](https://www.npmjs.com/package/@ovistek/bvx-glut)

```console
npm install @ovistek/bvx-glut
```

### _**About**_

This pre-computed static LUT contains all possible different variations and mutations for Voxel Face Rendering. Invisible or fully occluded surfaces will not be rendered.

<h3 align="center">
  <img src="graphics/lut.png?raw=true" alt="BitVoxel LUT Image" width="500">
</h3>

### _**Acknowledgements**_

This tool relies on the following open source projects.

-   [bvx.ts](https://github.com/OvisTek/bvx.ts)
npm package: @ovistek/bvx-map
Description: BitVoxel Engine Biome & Voxel Map Generator
Author: OvisTek
Latest version: 1.3.0

<h3 align="center">
  <img src="graphics/icon.png?raw=true" alt="OvisTek Logo" width="150">
</h3>

[![Twitter: @OvisTek](https://img.shields.io/badge/contact-OvisTek-blue.svg?style=flat)](https://twitter.com/OvisTek)
[![install size](https://packagephobia.com/badge?p=@ovistek/bvx-map)](https://packagephobia.com/result?p=@ovistek/bvx-map)
[![NPM](https://img.shields.io/npm/v/@ovistek/bvx-map)](https://www.npmjs.com/package/@ovistek/bvx-map)
[![License](https://img.shields.io/badge/license-MIT-orange.svg?style=flat)](LICENSE)

#### **Biome & Voxel Map Generator for [BitVoxel Engine](https://github.com/OvisTek/bvx.ts)**

* * *

### _**Installation**_

-   Install using [npm](https://www.npmjs.com/package/@ovistek/bvx-map)

```console
npm install @ovistek/bvx-map
```

### _**Acknowledgements**_

This tool relies on the following open source projects.

-   [bvx.ts](https://github.com/OvisTek/bvx.ts)
npm package: @ovistek/bvx.ts
Description: Generic & Renderer Agnostic BitVoxel Engine Implementation in TypeScript
Author: OvisTek
Latest version: 1.7.2

<h3 align="center">
  <img src="graphics/icon.png?raw=true" alt="OvisTek Logo" width="150">
</h3>

[![Twitter: @OvisTek](https://img.shields.io/badge/contact-OvisTek-blue.svg?style=flat)](https://twitter.com/OvisTek)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/4b7dbe49f42d465bb3b6f3c669801764)](https://www.codacy.com/gh/OvisTek/bvx.ts/dashboard?utm_source=github.com&utm_medium=referral&utm_content=OvisTek/bvx.ts&utm_campaign=Badge_Grade)
[![Coverage Badge](badges/coverage-global%20coverage.svg)](badges)
[![install size](https://packagephobia.com/badge?p=@ovistek/bvx.ts)](https://packagephobia.com/result?p=@ovistek/bvx.ts)
[![NPM](https://img.shields.io/npm/v/@ovistek/bvx.ts)](https://www.npmjs.com/package/@ovistek/bvx.ts)
[![License](https://img.shields.io/badge/license-MIT-orange.svg?style=flat)](LICENSE)

#### **Generic & Renderer Agnostic BitVoxel Engine Implementation in TypeScript**

* * *

_**BitVoxel Engine**_ detaches Voxel meta-data and Rendering state data into abstracted layers. This allows rendering smaller voxels with inherited meta-data without subdividing the Voxel layer.

<h3 align="center">
  <img src="graphics/info.jpg?raw=true" alt="BitVoxel Layer Composition" width="800">
</h3>

### _**About**_

-   Voxel Meta-Data Layer requires **0**, **8**, **16** or **32** bit per Voxel
-   BitVoxel State Layer requires **1** bit per BitVoxel
-   Written in TypeScript with no external dependencies
-   Designed for Robustness & Performance with 100% unit tested code
-   Documented [Code & API](https://ovistek.github.io/bvx.ts/)
-   Permissive [MIT License](LICENSE)

### _**Installation**_

-   Install using [npm](https://www.npmjs.com/package/@ovistek/bvx.ts)

```console
npm install @ovistek/bvx.ts
```

### _**Quick Setup**_

```TypeScript
import { MortonKey, VoxelChunk, VoxelWorld } from '@ovistek/bvx.ts';

// create a new world instance to manage our Voxels
const world:VoxelWorld = new VoxelWorld();

// create a new VoxelChunk at world position (x=1,y=1,z=1)
const chunk:VoxelChunk = new VoxelChunk(MortonKey.from(1,1,1));

// insert the chunk into the world
world.insert(chunk);

// return a previously inserted VoxelChunk instance from position (x=1,y=1,z=1)
const prevChunk:VoxelChunk | null = world.get(MortonKey.from(1,1,1));

if (prevChunk !== null) {
  // do something with VoxelChunk
}
```
npm package: @ovistek/gfx.ts
Description: Lightweight TypeScript WebGL Renderer using three.js
Author: OvisTek
Latest version: 1.1.4

<h3 align="center">
  <img src="graphics/icon.png?raw=true" alt="OvisTek Logo" width="150">
</h3>

[![Twitter: @OvisTek](https://img.shields.io/badge/contact-OvisTek-blue.svg?style=flat)](https://twitter.com/OvisTek)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/00d1a757809f439ebb1dab2a3fd9b43c)](https://www.codacy.com/gh/OvisTek/gfx.ts/dashboard?utm_source=github.com&utm_medium=referral&utm_content=OvisTek/gfx.ts&utm_campaign=Badge_Grade)
[![install size](https://packagephobia.com/badge?p=@ovistek/gfx.ts)](https://packagephobia.com/result?p=@ovistek/gfx.ts)
[![NPM](https://img.shields.io/npm/v/@ovistek/gfx.ts)](https://www.npmjs.com/package/@ovistek/gfx.ts)
[![License](https://img.shields.io/badge/license-MIT-orange.svg?style=flat)](LICENSE)

#### **Lightweight TypeScript WebGL Renderer using three.js**

* * *

### _**Installation**_

-   Install using [npm](https://www.npmjs.com/package/@ovistek/gfx.ts)

```console
npm install @ovistek/gfx.ts
```

### _**Acknowledgements**_

This tool relies on the following open source projects.

-   [three.js](https://github.com/mrdoob/three.js/)
npm package: @ovistek/rpc-net
Description: Lightweight JS Remote Procedure Call (RPC) Framework using Socket.io
Author: OvisTek
Latest version: 1.0.3

<h3 align="center">
  <img src="graphics/icon.png?raw=true" alt="OvisTek Logo" width="150">
</h3>

[![Twitter: @OvisTek](https://img.shields.io/badge/contact-OvisTek-blue.svg?style=flat)](https://twitter.com/OvisTek)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/070f1a541d9d4dd19e2a07f226bdea03)](https://www.codacy.com/gh/OvisTek/rpc-net/dashboard?utm_source=github.com&utm_medium=referral&utm_content=OvisTek/rpc-net&utm_campaign=Badge_Grade)
[![install size](https://packagephobia.com/badge?p=@ovistek/rpc-net)](https://packagephobia.com/result?p=@ovistek/rpc-net)
[![NPM](https://img.shields.io/npm/v/@ovistek/rpc-net)](https://www.npmjs.com/package/@ovistek/rpc-net)
[![License](https://img.shields.io/badge/license-MIT-orange.svg?style=flat)](LICENSE)

#### **Lightweight JS Remote Procedure Call (RPC) Framework using Socket.io**

* * *

**_rpc-net_** allows defining JavaScript/TypeScript functions on a Server or Client environment and executing them from either context. Built using [Socket.io](https://socket.io/).

### _**Installation**_

-   Install using [npm](https://www.npmjs.com/package/@ovistek/rpc-net)

```console
npm install @ovistek/rpc-net
```

### _**Usage**_

Define server-side code using the following snippet and call it `server.js`

```javascript
const { ServerRPC } = require("@ovistek/rpc-net");

// host a local server on port 3000
const server = new ServerRPC();
server.connect(3000);

// define a local function on the server
// this will be called by the client
server.local.sayHello = (append) => {
    return "Server Says " + append;
};
```

Define client-side code using the following snippet and call it `client.js`

```javascript
const { ClientRPC } = require("@ovistek/rpc-net");

const client = new ClientRPC();
// connect to a hosted local server on port 3000
client.connect("http://localhost", 3000);

// call a pre-defined function on the remote server
client.remote.sayHello("Hello World!").then((value) => {
    console.log(value);
}).catch((err) => {
    console.error(err);
});
```

-   Run the server via `node server.js`
-   Run the client via `node client.js`

Output should be `Server Says Hello World!`

### _**Acknowledgements**_

This tool relies on the following open source projects.

-   [Socket.io](https://socket.io/)
npm package: @ovl-nimbus/core
Description: <img      src="https://raw.githubusercontent.com/overlap-dev/Nimbus/main/media/intro.png"      alt="Nimbus" />
Author: Daniel Gördes
Latest version: 0.0.2-17

<img 
    src="https://raw.githubusercontent.com/overlap-dev/Nimbus/main/media/intro.png" 
    alt="Nimbus"
/>

# Nimbus Core

The core package of the Nimbus framework.

Refer to the [Nimbus main repository](https://github.com/overlap-dev/Nimbus) or the [Nimbus documentation](https://nimbus.overlap.at) for more information about the Nimbus framework.

# License

The MIT License (MIT)
npm package: @ovl-nimbus/fastify
Description: <img      src="https://raw.githubusercontent.com/overlap-dev/Nimbus/main/media/intro.png"      alt="Nimbus" />
Author: Daniel Gördes
Latest version: 0.0.2-17

<img 
    src="https://raw.githubusercontent.com/overlap-dev/Nimbus/main/media/intro.png" 
    alt="Nimbus"
/>

# Nimbus Fastify

The fastify package of the Nimbus framework.

Refer to the [Nimbus main repository](https://github.com/overlap-dev/Nimbus) or the [Nimbus documentation](https://nimbus.overlap.at) for more information about the Nimbus framework.

# License

The MIT License (MIT)
npm package: @ovl-nimbus/mongodb
Description: <img      src="https://raw.githubusercontent.com/overlap-dev/Nimbus/main/media/intro.png"      alt="Nimbus" />
Author: Daniel Gördes
Latest version: 0.0.2-17

<img 
    src="https://raw.githubusercontent.com/overlap-dev/Nimbus/main/media/intro.png" 
    alt="Nimbus"
/>

# Nimbus MongoDB

The MongoDB package of the Nimbus framework.

Refer to the [Nimbus main repository](https://github.com/overlap-dev/Nimbus) or the [Nimbus documentation](https://nimbus.overlap.at) for more information about the Nimbus framework.

# License

The MIT License (MIT)
npm package: @ovl-nimbus/utils
Description: <img      src="https://raw.githubusercontent.com/overlap-dev/Nimbus/main/media/intro.png"      alt="Nimbus" />
Author: Daniel Gördes
Latest version: 0.0.2-17

<img 
    src="https://raw.githubusercontent.com/overlap-dev/Nimbus/main/media/intro.png" 
    alt="Nimbus"
/>

# Nimbus Utils

The utils package of the Nimbus framework.

Refer to the [Nimbus main repository](https://github.com/overlap-dev/Nimbus) or the [Nimbus documentation](https://nimbus.overlap.at) for more information about the Nimbus framework.

# License

The MIT License (MIT)
npm package: @ovl/iso-639-1
Description: ISO-639-1 codes
Author: meikidd
Latest version: 3.0.4

# @ovl/iso-639-1

---

⚠️ This is a fork of the original [iso-639-1 package](https://npmjs.org/package/iso-639-1).

I needed an untranspiled version without static class properties. If you do need transpiling out of the box or want to use the package directly in the browser, use the original package.

---

[![NPM Version][npm-image]][npm-url]
[![Build Status][travis-image]][travis-url]

[travis-image]: https://travis-ci.org/ovlb/iso-639-1.svg?branch=master
[travis-url]: https://travis-ci.org/ovlb/iso-639-1
[npm-image]: https://img.shields.io/npm/v/@ovl/iso-639-1.svg?style=flat
[npm-url]: https://www.npmjs.com/package/@ovl/iso-639-1

Simple interface for [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes

## Installation

```
npm install @ovl/iso-639-1
```

## Usage

### Node.js

```
const ISO6391 = require('@ovl/iso-639-1')

const lang = new ISO6391()

console.log(lang.getName('en')) // 'English'
```

### Browsers

Import

```
import ISO6391 from '@ovl/iso-639-1'

const lang = new ISO6391()

console.log(lang.getName('en')) // 'English'
```

## Methods

### getName(code)

- @param code {string}
- @return {string}

Lookup language english name by code

### getAllNames()

- @return {array}

Get array of all language english names

### getNativeName(code)

- @param code {string}
- @return {string}

Lookup language native name by code

### getAllNativeNames()

- @return {array}

Get array of all language native names

### getCode(name)

- @param name {string}
- @return {string}

Lookup code by english name or native name

### getAllCodes()

- @return {array}

Get array of all codes

### validate(code)

- @param code {string}
- @return {boolean}

Check whether the given code is in the list of [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)

### getLanguages(codes)

- @param codes {array}
- @return {array}

Get the array of the language objects by the given codes

## Usage

```
const ISO6391 = require('@ovl/iso-639-1')

console.log(ISO6391.getName('zh')) // 'Chinese'
console.log(ISO6391.getNativeName('zh')) // '中文'

console.log(ISO6391.getAllNames()) // ['Afar','Abkhaz', ... ,'Zulu']
console.log(ISO6391.getAllNativeNames()) //['Afaraf','аҧсуа бызшәа', ... ,'isiZulu' ]

console.log(ISO6391.getCode('Chinese')) // 'zh'
console.log(ISO6391.getCode('中文')) // 'zh'

console.log(ISO6391.getAllCodes()) //['aa','ab',...,'zu']

console.log(ISO6391.validate('en')) // true
console.log(ISO6391.validate('xx')) // false

console.log(ISO6391.getLanguages(['en', 'zh']))
// [{code:'en',name:'English',nativeName:'English'},{code:'zh',name:'Chinese',nativeName:'中文'}]

```
npm package: @ovl/score-calculator
Description: A Vue component to calculate a score based on answers to questions
Latest version: 1.0.0

# 🧮 Score Calculator

Want to know a score, get it here.

See a version of this component in use with the [SwissPrEPared HIV risk calculator](https://www.swissprepared.ch/en/risk-calculator/).

---

## 👩‍💻 Usage

Install the calculator from NPM.

```
npm install @ovl/score-calculator
```

Next, import it in the component where you want to use it:

```js
import ScoreCalculator from '@ovl/score-calculator'
```

### Props

#### Questions

These questions _must_ be objects which have a unique ID, a title, and an array of answers. Let’s take this question as an example:

```js
{
  id: 123456789,
  title: 'How many nights do you sleep in a normal week?',
  answers: [
    { text: '≥10', score: 7 },
    { text: '6–9', score: 4 },
    { text: '0–5', score: 0 }
  ]
}
```

As you can see, all answers have a `score` property. That’s rather important, as the diligent score calculation robot making this component work needs scores to compute. As it’s diligent but not sophisticated, the scores need to be given to them.

In it’s former life it has been employed as the calculating soul of an abacus. Unfortunartely, abaci went out of fashion and our score calculating robot became a bit bored. Luckily we found them before something bad happened and they now works happily inside the score calculator.

Got a bit carried away there. Back to the component.

More formally:

An answer is an object of text and score.

```js
answer: Object {
  text: String,
  score: Number
}
```

A question has a mandatory, unique ID and a title as well as an array of answers which need to implement the answer interface.

```js
question: Object {
  id: String | Number,
  title: String,
  answers: Array [answer]
}
```

Finally, questions are an array of question types:

```js
questions: Array[question]
```

#### buttonText

To change the text content of the button, use the `buttonText` prop:

```js
buttonText: {
  type: String,
  default: 'Show results'
}
```

#### questionsOptional

By default all questions are required before a score is calculated. If some questions are optional, you can change this behaviour through the `questionsOptional` prop.

```js
questionsOptional: {
  type: Boolean,
  default: false
}
```

### Events

Once a user clicks on the button there two possibilities.

If all questions have been answered – or `questionsOptional` is set to `true` – the component emits `scoreResult` with the accumulated score as its payload.

If not all questions have been answered and `questionsOptional` is set to `false` the emitted event is `missingQuestions` without the missing questions as its payload.

## 🥼 Development setup

You’ll need to install the project’s dependencies first:

```
npm install
```

### Compiles and hot-reloads for development

```
npm run serve
```

### Compiles and minifies for production

```
npm run build
```

### Run your unit tests

```
npm run test:unit
```

### Lints and fixes files

```
npm run lint
```

### Customize configuration

See [Configuration Reference](https://cli.vuejs.org/config/).
npm package: @ovm.js/zod
Description: Zod extension for ovm.js
Author: Adrian Błasiak
Latest version: 1.0.0

Zod extension for OVM.js
========================

> **ObjectMigratorExtension** is not stable interface yet, it can be changed over time

### How to use

```js
import {z} from "zod";
import ObjectVersionMigrator from "ovm.js/src/ObjectVersionMigrator.ts";
import ZodObjectMigrationExtension from "../src/extensions/ZodObjectMigrationExtension.ts";

// Step one: Define zod schema
const zodSchema = z.object({
    oldField: z.string(),
    secondOlfField: z.number().default(15),
    newField: z.boolean().default(true),
    oldOptionalField: z.string().optional().nullable().default(null),
    compoundField: z.object({
        justOldFieldTab: z.array(z.any()).default([]),
        changedNestedField: z.string().optional().default('ChangedValue'),
        newOptionalField: z.string().optional()
    }),
    migratedCompoundFieldIntoSingularOne: z.array(z.any()).default(['cool']),
    migratedSingularFieldIntoCompoundOne: z.object({
        addedSubField: z.array(z.any()).optional(),
        secondAddedSubfield: z.array(z.any()).default([15, 16])
    }),
    undefinedField: z.string(),
    notOptionalField: z.string()
});

// Step two: initialise migrator with zod migrator extension
const migrator = new ObjectVersionMigrator({
    extensions: [
        new ZodObjectMigrationExtension()
    ]
});

// Step three: Automigrate your object
const migratedObj = migrator.autoMigrate(dtoObject, zodSchema);
```
### Summary

Basic Zod types support:
* Array of any/mixed values
* Boolean
* Number
* BigInt
* String
* Object