open-index/open-npm huggingface dataset:
npm package: @simplus/base-ts-utils
Description: Utils for typescript/javascript develompment
Author: Yehudi Hollevoet
Latest version: 1.0.7

# base-ts-utils

## Install

```bash
npm install --save @simplus/base-ts-utils
```

## Usage

### Env

Enviromnet contains utils for code environment. To start you can import the Utility class by adding the following line to your code

```typescript
import {Env} from '@simplus/base-ts-utils'

...
```

#### Env.isProduction(): boolean
Checks if the environment is in production mode (NODE_ENV=production), returns true if is set to __production__

#### Env.isDevelopment(): boolean
Checks if the environment is in development mode (NODE_ENV=development), returns true if is set to __development__

#### Env.isTest(): boolean
Checks if the environment is in test mode (NODE_ENV=test), returns true if is set to __test__

### Env.getEnvironment(): string
Get the current environment string (already trimed)

### Env.prefix(str: string): string
Add environment as prefix to the input

```typescript
process.env.NODE_ENV = 'development'
Env.prefix("test") // development_test
Env.prefix("test1") // development_test1
```
### Env.postfix(str: string): string
Add environment as postfix to the input

```typescript
process.env.NODE_ENV = 'development'
Env.prefix("test") // test_development
Env.prefix("test1") // test1_development
```

### Env.config
The configuration can accept a few parameters

key | type | default | Description
-------|-------|---------|-------------
env_key |  string | "NODE_ENV" | the environment variable name (that contains the environment value)
default_env |  string | "development" | the environment value

### Example

```bash
# .env

MY_ENV=production
```

```typescript
Env.isDeveloment() // true because default variable is "NODE_ENV" and default value is "development"
Env.config.default_env = 'test'
Env.isDeveloment() // false because default variable is "NODE_ENV" and default value is now "test"
Env.isTest() // true because default variable is "NODE_ENV" and default value is still "test"
Env.config.env_key = 'MY_ENV'
Env.isTest() // false because default variable is now "MY_ENV" and value was set to "production"
Env.isProduction() // true because default variable is now "MY_ENV" and value was set to "production"
```

## Types

The package also contains a list of satndard types usefull 

```typescript
export type Callback<T = any> = (err?: Error|null|undefined, data?: T) => void
```
npm package: @simplus/express-firewall
Description: This package gives a set of firewall functionalities for express
Author: Yoda
Latest version: 1.0.4

#Firewall

This package gives a set of firewall functionalities for express

A firewall is a basic middleware that can be user in express


## Install

```
npm install --save @simplus/express-firewall
```


## Usage

```typescript
const fw = require("@simplus/firewall");

app.use(fw.isRoot());

app.get("/test", fw.hasPermission("test/list"), (req, res, next)=>{
	...
});
```
npm package: @simplus/hornbill
Description: A configurable firewall for node applications
Author: Yehudi Hollevoet
Latest version: 1.0.6

# Hornbill

A configurable firewall for node applications

## Install

```
npm install --save @simplus/hornbill
```

## Usage

```typescript
import * as express from "express"
import {Hornbill} from "@simplus/hornbill"

const app = expess()

const hb = new Hornbill({
	getPermissions : (s, cb)=>{
		cb(["/some/permission"]);
	}
})

hb.useRule("/collection/users/","/collection/users/own/get")
hb.useRule("/collection/users/:id","/collection/users/all/get")
hb.useRule("/collection/users/","/collection/users/yehudi/profile/get")
hb.useRule("/default/test","/default/show")
hb.useFirewall("/connected", Firewalls.requireAuthentication())
hb.useFirewall("/passes", Firewalls.$bool(true))
hb.useFirewall("/blocked", Firewalls.$bool(false))

hb.install(app)

```
npm package: @simplus/proxy-server
Description: ``` npm install -g proxy-server ```
Author: Yehudi Hollevoet
Latest version: 1.0.6

# Proxy server


## Installation

```
npm install -g proxy-server
```

## Usage

Start the server with the following command

```
proxy-server start
```

Stop the server by running

```
proxy-server stop
```

## Options

* **-a, --api** : The api url (default : http://127.0.0.1:8081)
* **-c, --client**: the client url (default : http://127.0.0.1:8080)
* **-n, --name**: the name of pm2 process (default : proxy-server)
* **-p, --port**: the port used by proxy server (default : 80)

#### Exemple:

If i have a server running on http://myserverdomain.com, and a client running localy on port 8080

```
proxy-server start -a http://myserverdomain.com -c http://localhost:8080
```
npm package: @simplus/robin-react
Description: This is a react docorator for Robin
Author: Yehudi Hollevoet
Latest version: 1.0.8

# README #

This is a react docorator for Robin

## Install ##

To use the package install it with npm
```
npm install --save @simplus/robin-react
```

## Usage ##

### In jour main file ###

You need to have created your RobinProvider and give it to the RobinReact main class in order to make the binding between react and the robin library

```typescript

//robins.jsx

import RobinReact from '@simplus/robin-react'
import {RobinProvider, CollectionRobin} from '@simplus/robin'

const robins = {
	aCollection : new CollectionRobin({ baseUrl : "/api/myCollection", })
}

const provider = new RobinProvider(robins)

RobinReact.setProvider(provider)

export {provider, robins}
```

Then you can use the decorator to bind robins to a component

```typescript

//component.jsx

import * as React from 'react'

import {connectRobin} from '@simplus/robin-react'
import {provider, robins} from './robins.jsx'

@connectRobin([robins.aCollection])
class MyComponent extends React.Component{
	componentWillMount(){
		robins.aCollection.find({})
	}
	
	render(){
		return <div>
			{this.props.aCollection.collection.map(item => {
				return <div>{JSON.stringify(item)}</div>
			})}
		</div>
	}
}

export { MyComponent }

export default MyComponent
```

See robin for more info
npm package: @simplux/angular
Description: The Angular extension package of simplux. Provides a simple way to use simplux in Angular applications.
Author: Jonathan Ziller
Latest version: 0.18.0

# @simplux/angular

This is the Angular extension package of **simplux**. Usually you would expect some kind of API documentation here. However, **simplux** has a different approach to documentation: [recipes](../../../..#recipes). They will show you how simplux can make life simple for you. In addition, due to our use of TypeScript, all API documentation you would want is contained in the code itself.
npm package: @simplux/browser-router
Description: The browser router package for simplux. Can be used to provide routing capabilities to a web app.
Author: Jonathan Ziller
Latest version: 0.18.0

# @simplux/browser-router

This is the browser router package for **simplux**. Usually you would expect some kind of API documentation here. However, **simplux** has a different approach to documentation: [recipes](../../../..#recipes). They will show you how simplux can make life simple for you. In addition, due to our use of TypeScript, all API documentation you would want is contained in the code itself.
npm package: @simplux/core
Description: The core package of simplux. Contains everything to manage your application state in a simple way.
Author: Jonathan Ziller
Latest version: 0.18.0

# @simplux/core

This is the core package of **simplux**. Usually you would expect some kind of API documentation here. However, **simplux** has a different approach to documentation: [recipes](../../../..#recipes). They will show you how simplux can make life simple for you. In addition, due to our use of TypeScript, all API documentation you would want is contained in the code itself.
npm package: @simplux/react
Description: The react extension package of simplux. Provides a simple way to use simplux in react applications.
Author: Jonathan Ziller
Latest version: 0.18.0

# @simplux/react

This is the react extension package of **simplux**. Usually you would expect some kind of API documentation here. However, **simplux** has a different approach to documentation: [recipes](../../../..#recipes). They will show you how simplux can make life simple for you. In addition, due to our use of TypeScript, all API documentation you would want is contained in the code itself.
npm package: @simplux/router
Description: The router package for simplux. Can be used to provide routing capabilities to an app. If you are building a web app you should use @simplux/browser-router instead.
Author: Jonathan Ziller
Latest version: 0.18.0

# @simplux/router

This is the router package for **simplux**. Usually you would expect some kind of API documentation here. However, **simplux** has a different approach to documentation: [recipes](../../../..#recipes). They will show you how simplux can make life simple for you. In addition, due to our use of TypeScript, all API documentation you would want is contained in the code itself.
npm package: @simplux/testing
Description: The testing package for simplux. Contains various testing utilities (e.g. for mocking module states and mutations).
Author: Jonathan Ziller
Latest version: 0.18.0

# @simplux/testing

This is the testing package for **simplux**. Usually you would expect some kind of API documentation here. However, **simplux** has a different approach to documentation: [recipes](../../../..#recipes). They will show you how simplux can make life simple for you. In addition, due to our use of TypeScript, all API documentation you would want is contained in the code itself.
npm package: @simply-openapi/controllers
Description: OpenAPI-first express controllers
Author: SunsetFi
Latest version: 2.1.0

# Simply OpenAPI Controllers

Read our documentation more easily on [GitBook](https://simply-openapi.gitbook.io/simply-openapi-controllers/)!

Simply OpenAPI Controllers is an ExpressJS compatible OpenAPI-First controller library. It produces fully robust method handlers on controllers by consuming an OpenAPI 3.1 specification and calling your handlers with all data pre-validated and coerced according to your specification.

It exposes its handlers as a single express middleware / router, allowing integration with express itself or with any library or framework that wraps it.

Don't have OpenAPI specs? No problem! SOC also provides decorators for your classes and methods that will create the openapi spec for you according to your handler usage and declaration.

SOC is designed to be a single-purpose library. It solves the use case of producing robust controllers and methods for web request handling, and does not dictate any design patterns beyond what it needs to do its job.\
It is highly extensible, supporting both the typical express middleware, plus its own middleware for method handlers, allowing you to integrate with the method creation for customizing both the inputs and outputs of your controller methods.

At its heart, this library provides two complementary systems:

* The ability to take decorated classes and methods, and produce robust complete OpenAPI specifications from them
* The ability to take OpenAPI specifications and wire them up to handlers, with all the boilerplate validation taken care of automatically.

## Usage

There are 2 ways to use SOC:

* [Produce both routers and OpenAPI schema from controllers and handler methods using decorators](docs/tutorial-controllers-with-automatic-openapi-generation.md) - Use this method if you do not wish to write your own OpenAPI specification and want to focus on writing handlers.
* [Produce routers from predefined OpenAPI schema and annotated controllers](../../readme/controllers/tutorial-binding-to-existing-openapi-spec.md) - Use this method if you want to have strongly declared API contracts that are auditable from outside the code.
npm package: @simply-openapi/jest-describe-openapi
Description: Jest testing utilities for OpenAPI contracts.
Author: SunsetFi
Latest version: 1.0.0

# @simply-openapi/jest-describe-openapi

Automatic snapshot test generation from OpenAPI specification.

This library provides a series of functions that generate a multitude of individual jest tests for specific facets of OpenAPI specifications. By creating individual tests for each facet, errors are localized into descriptive tests that offer hints as to where the spec has changed. This is in contrast to snapshotting the spec as a whole, which can be difficult to spot snapshot changes in.

This library also takes care to avoid possible snapshot changes that can occur when things in the spec are reordered but otherwise identical. For example, the operation parameters array is not order sensitive, and so the snapshots will not fail if the array is reordered but the parameters remain unchanged.
npm package: @simply-vc/uikit
Description: Simply VC UI Kit. A set of UI components based on Ionic, StencilJS and Storybook.js.
Latest version: 1.6.1

# Simply VC UI Kit
Simply VC UI Kit is a library of reusables web components meant to build web experiences. It's developed on top of [Ionic Framework](http://ionicframework.com/docs) (Javascript version of the library) using [Stencil](https://www.stencil.com) as a web component compiler and [Storybook](https://www.storybook.js.org) for testing the component's different states in isolation.

## Summary
- [Installing](#installing)
- [Using](#using)
- [Bug Report](#bug-report)
- [Who We Are](#who-we-are)

## Installing

Installing the latest version of the package:
```bash
npm i @simply-vc/uikit
```

## Using

Regardless of how you are going to consume the library (either importing or loading it via `script` tag), you must load both JS and CSS to get the library ready to use.

### Import
```ts
// index.ts
import '@simply-vc/uikit';
```

```css
/* style.css aka main CSS file */
@import '~@simply-vc/uikit/dist/uikit/uikit.css';
```

### Script tag

```html
<!-- index.html -->
<link href="https://unpkg.com/@simply-vc/uikit/dist/uikit/uikit.css" rel="stylesheet">

<!-- Kindly note that only one script will be downloaded (the browser is smart enough to decide which is best) -->
<script type="module" src="https://unpkg.com/@simply-vc/uikit/dist/uikit/uikit.esm.js"></script>
<script nomodule src="https://unpkg.com/@simply-vc/uikit/dist/uikit/uikit.js"></script>
```

_Voilà! All components are available, although only the used ones on a given page will be actually downloaded. Thanks [StencilJS](https://stenciljs.com/) ❤️._

## Bug Report

Feel free to reach us out here: panic-team@simply-vc.com.mt

## Who We Are

Simply VC runs highly reliable and secure infrastructure in our own datacentre in Malta, built with the aim of supporting the growth of the blockchain ecosystem. Read more about us on our website and Twitter:

- Website: https://simply-vc.com.mt/
- Twitter: https://twitter.com/Simply_VC
npm package: @simplyalec/ngx-i18nsupport-lib
Description: A Typescript library to work with Angular generated i18n files (xliff, xmb)
Author: Martin Roob
Latest version: 1.13.2

ngx-i18nsupport-lib
=========

A Typescript library to work with Angular generated i18n files (XLIFF Version 1.2 and 2.0, XMB)

## Table of Contents

* [Introduction](#introduction)
* [Installation](#installation)
* [Usage](#usage)
* [Tests](#tests)
* [Contributing](#contributing)
* [References](#references)

## Introduction

## Installation

  `npm install @simplyalec/ngx-i18nsupport-lib --save-dev`
  
## Usage

### TranslationMessagesFileFactory
This class is the entry point of the library.
You can use `TranslationMessagesFileFactory` to load Angular generated message files.
The format of the files can be XLIFF 1.2, XLIFF 2.0 or XMB.

It returns a format independent abstraction of the file content, which is described in the interfade `ITranslationMessagesFile`

Example
```
// Usage of fromFileContent to read a file with a known format
let filename = ...;
let encoding = 'UTF-8';
let content = fs.readFileSync(filename, encoding);
let file: ITranslationMessagesFile
  = TranslationMessagesFileFactory.fromFileContent('xlf', content, filename, encoding);
console.log(Utils.format('Translation from %s to %s', 
    file.sourceLanguage(),
    file.targetLanguage()));
file.forEachTransUnit((tu: ITransUnit) => {
  console.log(tu.sourceContent());
});
```

You can also use `fromUnknownFormatFileContent` to read a file of any supported format.
The library will detect the correct file format:

```
...
let file: ITranslationMessagesFile
  = TranslationMessagesFileFactory.fromUnknownFormatFileContent(content, filename, encoding);

```
### ITranslationMessagesFile
A messages file.

For API details have a look at the interface.

### ITransUnit
A single translation contained in the messages file.

For API details have a look at the interface.

## Tests

  `npm test`
  
This will run a testsuite that checks all relevant aspects of the library.

## This is a fork

This repo is a fork of the [ngx-i18nsupport](https://github.com/martinroob/ngx-i18nsupport) from Martin Roob. This fork is purely in maintenance mode and has updated dependencies.

## References

* Angular Cookbook [Internationalization (i18n)](https://angular.io/docs/ts/latest/cookbook/i18n.html)
* [XLIFF Spec](http://docs.oasis-open.org/xliff/xliff-core/xliff-core.html)

[travis-badge]: https://travis-ci.org/martinroob/ngx-i18nsupport.svg?branch=master
[travis-badge-url]: https://travis-ci.org/martinroob/ngx-i18nsupport
[david-badge]: https://david-dm.org/martinroob/ngx-i18nsupport.svg
[david-badge-url]: https://david-dm.org/martinroob/ngx-i18nsupport
[david-dev-badge]: https://david-dm.org/martinroob/ngx-i18nsupport/dev-status.svg
[david-dev-badge-url]: https://david-dm.org/martinroob/ngx-i18nsupport?type=dev
[npm-badge]: https://badge.fury.io/js/%40ngx-i18nsupport%2Fngx-i18nsupport-lib.svg
[npm-badge-url]: https://badge.fury.io/js/%40ngx-i18nsupport%2Fngx-i18nsupport-lib
npm package: @simplybail/eslint-config
Description: SimplyBail's shared ESLint configuration
Author: SimplyBail
Latest version: 1.2.9

# @simplybail/eslint-config

SimplyBail's shared ESLint configuration with sensible defaults.

## Installation

```bash
npm install --save-dev @simplybail/eslint-config
```

## Usage

This package supports both ES modules and CommonJS imports, making it compatible with all environments including VS Code extensions.

### In eslint.config.js (ESLint 9+ - ES Modules)

```javascript
import simplybailConfig from '@simplybail/eslint-config';

export default [
  ...simplybailConfig,
  // Add your custom rules here if needed
];
```

### In eslint.config.js (ESLint 9+ - CommonJS)

```javascript
const simplybailConfig = require('@simplybail/eslint-config');

module.exports = [
  ...simplybailConfig,
  // Add your custom rules here if needed
];
```

### In .eslintrc.js (ESLint 8)

```javascript
module.exports = {
  extends: ['@simplybail/eslint-config'],
};
```

## VS Code Compatibility

This package is fully compatible with VS Code's ESLint extension. The extension can import the configuration using either `require()` or ES module imports, ensuring seamless integration.

## Configuration

This configuration provides:

- ESLint's recommended rules as base
- Consistent code style (single quotes, semicolons, 2-space indentation)
- Common mistake prevention (unused variables, console warnings)
- Code quality improvements (prefer const, no var, object shorthand)
- TypeScript support when available

The configuration is minimal and leverages ESLint's sensible defaults with only essential overrides for consistency.
npm package: @simplybail/prettier-config
Description: SimplyBail's shared Prettier configuration
Author: SimplyBail
Latest version: 1.2.9

# @simplybail/prettier-config

SimplyBail's shared Prettier configuration with sensible defaults.

## Installation

```bash
npm install --save-dev @simplybail/prettier-config
```

## Usage

This package supports both ES modules and CommonJS imports, making it compatible with all environments including VS Code extensions.

### In package.json

```json
{
  "prettier": "@simplybail/prettier-config"
}
```

### In .prettierrc

```json
"@simplybail/prettier-config"
```

### In .prettierrc.js (CommonJS)

```javascript
module.exports = require('@simplybail/prettier-config');
```

### In .prettierrc.mjs (ES Modules)

```javascript
import config from '@simplybail/prettier-config';
export default config;
```

### In prettier.config.js (CommonJS)

```javascript
module.exports = require('@simplybail/prettier-config');
```

### In prettier.config.mjs (ES Modules)

```javascript
import config from '@simplybail/prettier-config';
export default config;
```

## VS Code Compatibility

This package is fully compatible with VS Code's Prettier extension. The extension can import the configuration using either `require()` or ES module imports, ensuring seamless integration.

## Configuration

This configuration provides:

- Single quotes for strings
- Trailing commas where valid in ES5
- 2-space indentation
- Semicolons
- 80 character print width
- LF line endings

These are minimal overrides that work well across different project types while maintaining consistency.
npm package: @simplybail/typescript-config
Description: SimplyBail's shared TypeScript configuration
Author: SimplyBail
Latest version: 1.2.9

# @simplybail/typescript-config

SimplyBail's shared TypeScript configurations with sensible defaults.

## Installation

```bash
npm install --save-dev @simplybail/typescript-config typescript
```

## Usage

### Base Configuration

For general TypeScript projects:

```json
// tsconfig.json
{
  "extends": "@simplybail/typescript-config/base",
  "compilerOptions": {
    "outDir": "./dist",
    "rootDir": "./src"
  },
  "include": ["src/**/*"],
  "exclude": ["node_modules", "dist"]
}
```

### Node.js Configuration

For Node.js projects:

```json
// tsconfig.json
{
  "extends": "@simplybail/typescript-config/node",
  "compilerOptions": {
    "outDir": "./dist",
    "rootDir": "./src"
  },
  "include": ["src/**/*"],
  "exclude": ["node_modules", "dist"]
}
```

### React Configuration

For React projects:

```json
// tsconfig.json
{
  "extends": "@simplybail/typescript-config/react",
  "compilerOptions": {
    "outDir": "./dist",
    "rootDir": "./src"
  },
  "include": ["src/**/*", "src/**/*.tsx"],
  "exclude": ["node_modules", "dist"]
}
```

## Configuration Details

### Base Configuration

- Modern ES2022 target
- Strict type checking enabled
- Source maps and declarations
- JSON module resolution
- Synthetic default imports

### Node.js Configuration

- Extends base configuration
- Node.js module resolution
- Node.js types included
- CommonJS compatibility

### React Configuration

- Extends base configuration
- React JSX transform
- React types included
- Optimized for React development

All configurations prioritize type safety while maintaining good developer experience.
npm package: @simplycook/react-component-library
Description: SimplyCook's component library and design system
Latest version: 3.1.0
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# React Component Library
SimplyCook's front end tooling and component react library.

## Setup
- Clone the repository and install the JS dependencies with `yarn install`.
- Generate jest test results using `yarn test:generate-output`
- Start the Storybook server using `yarn storybook`. (It's recommended to use node version 18 or a higher one)
- Open [http://localhost:6006](http://localhost:6006) in your browser.

## Testing
This package is configured to use Jest for component testing. Each component should have a test file located within the associated component directory, the name convention for test files is `[MyComponent].unit.test.tsx`.

### Running tests
- Use `yarn test` to run Jest.
- Use `yarn test-storybook` to turn all of your stories into executable tests.

### Test output
Running `yarn test:generate-output` will generate a `jest-test-results.json` file containing the results of all component tests.

**It is important to generate this file before starting storybook for the first time, otherwise Storybook will be unable to find the results file and will fail to load.**

### Showing test results in Storybook
[Storybook's Jest addon](https://storybook.js.org/addons/@storybook/addon-jest) is installed, this will show test results from the JSON file generated above, in order to refresh the results shown in Storybook you will need to restart the Storybook server.

#### Linking tests to components
In order for Storybook to discover and fetch the results for an individual component, the meta object for each story file should contain a `jest` parameter, the value for this parameter should be the filename for the component tests.