open-index/open-npm huggingface dataset:
npm package: @nexso/eslint-config-typescript
Description: Nexso ESLint configuration for Typescript
Author: Caio Eduardo
Latest version: 1.0.2

# @nexso/eslint-config-typescript

A extension of [@nexso/eslint-config](https://github.com/nexsolab/eslint-config#readme) style but for typescript environment. Used in the **Nexso** development (a SaaS ERP).

> This is intended to work in Node.js 14+ environments.
## How to use

### 1. Install the config and the packages bellow as development dependency:
```bash
npm i -D eslint typescript @nexso/eslint-config.
```

### 2. Create a `.eslintrc` file with:

```json
{
  "extends": "@nexso/eslint-config-typescript",
  "rules": {}
}
```

### 3. Initialize your typescript config:

```bash
npx tsc --init
```
npm package: @nexssp/ansi
Description: Ansi, terminal colors library
Author: mapoart@gmail.com
Latest version: 1.2.2

# @nexssp/ansi

**15.01.2022 Upgrade** - Now works also with `import` as module.

```js
const ansi = require("@nexssp/ansi");
// or
import ansi from "@nexssp/ansi";
```

## New cursor functions

- now you can do **up**, **left**, **right**, **down** with the number of lines/columns.. eg. **ansi.up(5)**

## Available colors and functions

![image](https://user-images.githubusercontent.com/53263666/149625041-bd8a2769-858d-4e55-8dc0-7130d6772617.png)

reset, **bold**, _italic_, **underscore**, ~~strikethrough~~, inverse, **gray**, **grayBG** **purple**, **purpleBG**, **red**, **redBG** **redBG2**, **green**, **greenBG**, **greenBG2** **blue**, **blueBG**, **blueBG2**, **yellow**, **yellowBG**, **yellowBG2**, **magenta**, **magentaBG**, **magentaBG2**, **cyan**, **cyanBG**, **orangeBG**, **white**, **whiteBG**, **black**, **blackBG**

## Other functions

- **up**, **down**, **right**, **left**: moves cursor,
- **saveCursor**: save cursor position,
- **restoreCursor**: restore last savd position,
- **clearScreen**: clear screen,

## Examples

```js
const ansi = require("@nexssp/ansi"); // OR import ansi from "@nexssp/ansi";
// colors list
console.log(ansi.colors);
console.log(ansi.red("My red text"));

// or
const { red, blue, yellowBG, bold } = require("@nexssp/ansi");
console.log(red("my test" + yellowBG(bold("red bold and yellow background"))));
```

![image](https://user-images.githubusercontent.com/53263666/149625089-d97a44fd-8236-4a83-8de9-494c03545410.png)
npm package: @nexssp/cache
Description: Cache, cache json with JS functions..
Author: Marcin Polak
Latest version: 2.0.4

# @nexssp/cache

- Just EASY basic caching..

Check how old cache is with: `2 days`, `1d`, `5m`, `2y`, `3.5 hrs`, `1s`. See below for examples.

```js
// Example config.js - setup 2 caches. Nothing is done yet.
const cache = require('@nexssp/cache')
const os = require('os')

const cache1 = cache({
  bucket: 'languages',
  cachePath: os.tmpdir(),
  recreateCache: process.argv.includes('--nocache'),
  auto: true, // It will create directory if does not exist.
})

const cache2 = cache({
  recreateCache: process.argv.includes('--nocache'),
})

module.exports = { cache1, cache2 }
```

```js
const cache = require('@nexssp/cache')
const cache1 = cache({ auto: true })
// program.js - they will only be initialised after cache.start()
// cache.start() returns the path to the cache
const cachePath = cache1.start()

// Write Object as JSON. keep in mind that this cache will save functions if you have them in your object!
cache.writeJSON('mycache.json', { a: 1, b: 2, c3: 3 })

// check if cache is not older then 1day)
// true means that it will return the cache content with the exists method, otherwise true/false
let cacheContent
if ((cacheContent = cache.exists(cacheTestFile, '1d', true))) {
  // ok we use cache content: cacheContent
}

// Or without true will only check
if (cache.exists(cacheTestFile, '1d')) {
  // ok cache exists and is notread yet
  const cacheContent = cache.read(cacheTestFile)

  // or JSON directly to the object
  const test = cache.readJSON(cacheTestFile)
}

cache.write('my new cache standard file', 'Just standard file.. no JSON')

cache.writeJSON('my new cache standard file', { x: 1, y: 2 })
```
npm package: @nexssp/config
Description: Config for not only Nexss Programmer
Author: Marcin Polak
Latest version: 1.0.9

# @nexssp/config

Config for not only the Nexss Programmer.

## Note

This Nexss Programmer's plugin is the effect of the refactoring the Nexss Programmer **@nexssp/cli** which development has been started in 2018. This module can be used also _separately_ without the Nexss Programmer.

```js
const nexssConfig = require('@nexssp/config')

const config1 = nexssConfig({ type: 'yaml' }) //type can be yaml or json
//find the closest file from current folder, search all parent folders until finds it
const configPath = config1.findParent('_nexss.yml')

// if configPath is not specified, the found one fill be used. findParent is used implicitly
// configPath is optional
config1.save({ myfile: 1, nest: [1, 2] }, configPath)

const configObj = config1.load(configPath)
```
npm package: @nexssp/const
Description: Global and Object constants the easy way. NEW: hidden constant.
Author: Marcin Polak mapoart@gmail.com
Latest version: 1.0.13

# @nexssp/const

- **NEW 1.0.13** - function which list the defined constants: **getConstants()**
- **NEW 1.0.11** - now 2 functions **nConst** and **hConst**. hConst will be hidden. So when the for example `Object.keys` will be used will not be displayed however constant is there.
- **NEW 1.0.10** - now with stack display..

Constants in JavaScript (global, objects)

## Installation

```sh
npm i @nexssp/const
```

All below will display error like:

![image](https://user-images.githubusercontent.com/53263666/116795020-1eb58a00-aad2-11eb-9278-515d421becc6.png)

```js
nConst("MYCONST", "some value"); // you cannot change it.

// You can use MYCONST everywere after nConst("MYCONST",...)
MYCONST = 369; // will terminate program with the message as below
```

## Usage

Let say you have some kind of config file.

```js
// config.js
const { nConst, hConst } = require("@nexssp/const");

nConst("MYCONST", "some value", process);
nConst("MYCONST2", "OLD CONSTANT VALUE");

hConst("MYCONST3_HIDDEN", "Hidden Constant", myConfig); // NEW! hConst-> Will to been seen on Object.keys etc.

console.log(getConstants()); // Will display defined constants

const myConfig = {};
nConst("MyObjectCONST", "My old object const", myConfig);

module.exports = { myConfig };
```

```js
// program.js

const { myConfig } = require("./config");

process.MYCONST = 369;
myConfig.MyObjectCONST = 999999;

MYCONST2 = 333366669999;

myObject.MYCONST = "New value1"; // Program terminated
MYCONST2 = "SOMETHING else";
```
npm package: @nexssp/data
Description: Checking and comparing datatypes
Author: mapoart@gmail.com
Latest version: 1.1.1

# @nexssp/data

Just library for datatypes.

## Note

This library/module is the effect of the refactoring the Nexss Programmer **@nexssp/cli** which development has been started in 2018.

## Examples

```js
const { is, type } = require('@nexssp/data')
console.log(type(new Map())) // map
const Stream = require('stream')
console.log(type(new Stream.Readable())) // stream
console.log(type({})) // object
console.log(type(() => {})) // function
console.log(type(Promise.resolve(1))) // promise
console.log(is('object', {})) // true
console.log(is('array', [])) // true
console.log(is('array', '[]')) // false
console.log(is('file', 'example.js')) // true
console.log(is('directory', 'example.js')) // false
console.log(is('directory', '../tests')) // true

// object, string, array, number, boolean, undefined, function, null,
// map, set, generatorfunction, promise, stream, file, directory
```

## Functions

- **type (value)** -> return one of the datatype: **object, string, array, number, boolean, undefined, function, null, map, set, generatorfunction, promise, stream, url, json**
- **is (type, value)** -> check for the types + **is('directory',v)**, **is('dir',v)**, **is('file',v), **is('url',v), , **is('json',v)**
- **compare (v1, v2)** -> compares 2 values. If any of them is function, it will run first and then compare
- **isEmpty (value)** -> check if anything is empty like array, object, string.

## Valid Datatypes

```js
exports.valid = {
  object: () => [{}, { x: 1 }, { x: 1, y: { nested: true } }],
  string: () => ['', 'mystring'],
  array: () => [[0], [1, 2]],
  number: () => [1, 1234, 36936936936936936936936936936936936936936936936936],
  boolean: () => [true, false],
  undefined: () => [undefined],
  function: () => [() => {}, function () {}, () => 'somestring'],
  asyncfunction: () => [async () => {}, async function () {}],
  null: () => [null],
  map: () => [
    new Map(),
    new Map([
      ['key1', 'value1'],
      ['key2', 'value2'],
    ]),
  ],
  set: () => [
    new Set(),
    new Set([
      ['key1', 'value1'],
      ['key2', 'value2'],
    ]),
  ],
  generatorfunction: () => [function* x() {}],
  promise: () => [Promise.resolve() /*, Promise.reject()*/],
  stream: () => [
    new stream.Readable(),
    new stream.Writable(),
    new stream.Transform(),
    new stream.Stream(),
    new stream.Duplex(),
    new stream.PassThrough(),
  ],
  file: () => [path.resolve(`lib/data.js`)],
  directory: () => [path.resolve(`lib`)],
  dir: () => [path.resolve(`lib`)],
  url: () => ['https://abc.ce', 'https://abc.de'],
  json: () => ['{"x":1}', '{"val":{"nested":5}}'],
  regexp: () => [new RegExp(/x/)],
}
```
npm package: @nexssp/dddebug
Description: Easy Debugging with useful information
Author: Marcin Polak mapoart@gmail.com
Latest version: 1.0.7

# @nexssp/dddebug

- EASY Debugging with USEFUL information

Just simply debug function. **no console.log/process.exit** -> just **ddd** with nice debug output and time executed.

- It shows where stopped with: debugged value (object, array, ...), mulitple values,
- **line number**
- **filename**
- **filepath**
- **exec time**
- **current working dir** (cwd)

![image](https://user-images.githubusercontent.com/53263666/119945494-d173ed80-bf95-11eb-811c-2c425d11a0f6.png)

## Installation

```sh
npm i @nexssp/dddebug
```

## Usage

### Global

```js
require('@nexssp/dddebug/global') // and from now you can use it everywere..

ddc('debug A')
ddd('stop here', { myvar: debug })
```

### Standard

```js
const { ddd, ddc } = require('@nexssp/dddebug')

ddc({ x: 1 }, ['another', 'var'], 'something else') // will not stop here. ddd will stop
```

Above will display but program will continue:

![dddebug function - continue example display](https://user-images.githubusercontent.com/53263666/119947005-8955ca80-bf97-11eb-886d-4e7f3f57eb5f.png)

```js
ddd(varToDebug, anothervar, myobject, myArray);

// OR

const d = require("@nexssp/dddebug").ddd;

const myObject = {'test', {"x":["y"]}};

d(myObject);
```

## Note

Time is calculated from `require("@nexssp/dddebug");` so put this at the top of the program. after `ddd` program will stop, and `ddc` will continue.
npm package: @nexssp/expression-parser
Description: Evaluate JavaScript/Node.js in variables, based in input data.
Author: Marcin Polak
Latest version: 1.0.5

# @nexssp/expression-parser

Lightweight JavaScript expression parser with error diagnostics and object interpolation.

## Features
- Safe evaluation of embedded JavaScript expressions
- Intelligent variable name suggestions for undefined variables
- Recursive object parsing
- Clear error reporting with ANSI formatting

## Installation

```bash
npm install @nexssp/expression-parser
```


## Usage

### Basic Expression Parsing
```javascript
const { expressionParser } = require("@nexssp/expression-parser");

const data = { a: 5, b: 10 };
console.log(expressionParser("Sum: ${a + b}", data));
// Output: "Sum: 15"
```

### Object Data Parsing
```javascript
const { parseData } = require("@nexssp/expression-parser");

const template = {
  greeting: "Hello ${name}!",
  calculation: "${x * y}",
  nested: {
    value: "${Math.PI.toFixed(2)}"
  },
  omitted: "Will not parse: ${undefined}"
};

const result = parseData(template, ["omitted"]);
console.log(result);
/* Output:
{
  greeting: "Hello John!",
  calculation: 50,
  nested: { value: "3.14" },
  omitted: "Will not parse: ${undefined}"
}
*/
```

### Error Handling
![Error Example](https://user-images.githubusercontent.com/53263666/117570866-6d63b500-b0cc-11eb-9708-40563a022d1d.png)

## API

### `expressionParser(exp, data)`
Evaluates expressions in strings while handling errors gracefully.

### `parseData(object, omittedKeys)`
Recursively processes object values, skipping specified keys.

## Security
**Important:** Uses JavaScript evaluation - only use with trusted input sources.
npm package: @nexssp/languages
Description: All about programming languages - history, founders, how to install, package managers, logo..
Author: Marcin Polak
Latest version: 1.0.11
Deprecated: this package has been deprecated. Please use @nexssp/language instead.

# @nexssp/languagess

Programming Languages database, templates, info..

## Note

This Nexss Programmer's plugin is the effect of the refactoring the Nexss Programmer **@nexssp/cli** which development has been started in 2018. This module can be used also _separately_ without the Nexss Programmer.

## Commands

```sh
nexssp-languages list
nexssp-languages [ext] install # install language from over 50 of them, see above list
nexssp-languages installed # installed languages

nexssp-languages update # update languages definition to the latest version
nexssp-languages status # status - handy for dev of the languages
```

### Example: nexssp-languages installed

Over 50 programming languages to choose.

![image](https://user-images.githubusercontent.com/53263666/119171081-63df3300-ba64-11eb-941c-4eda7f428b3c.png)

### Example: nexssp-languages list

List of supported languages

![image](https://user-images.githubusercontent.com/53263666/119171287-a7d23800-ba64-11eb-9ce5-6c590fe1d47f.png)

## Repositories

@nexssp/language usege external repositories for all languages. List of them is located in the `src/nexssp-languages-repos.json` file.

```js
const languages = require('@nexssp/languages')

console.log(languages.list()) // Displays all available languages (extensions and repositories associated)
console.log(languages.languageNames()) // From start, @nexssp/languages has no languages installed. They are installed on demand, so here you will have a lit of installed languages.

// Select language
const selectedLanguage = languages.byFilename('myfile.js') // Gets information by Extension
const selectedLanguage = languages.byExtension('js') // Gets information by Extension

// Compilers
selectedLanguage.compiler() // Gets default compiler
selectedLanguage.compiler('python3') // Gets named compiler
selectedLanguage.compiler('python3', true) // Will continue on error (second parameter true)
selectedLanguage.builder() // Gets builder information, also as above
selectedLanguage.getCompilerOrBuilder() // Will find compiler, if not there will find builder

selectedLanguage.config() // Gets while config
```

## Troubleshooting

### Environment variables

- **NEXSS_LANGUAGES_ENABLE_PROJECT_FOLDER** - enable also search in current/project folder

```js
process.env.NEXSS_LANGUAGES_ENABLE_PROJECT_FOLDER = true
```
npm package: @nexssp/markdown
Description: Basic markdown functions.. eg markdown->terminal
Author: Marcin Polak
Latest version: 1.1.0

# @nexssp/markdown

* 24.04.2025 - added Typescript support

This module is experimental.

## Functions

- **toTerminal** (markdownString) - Convert markdown string to the terminal with colouring..

## Usage

```js
const { toTerminal } = require('@nexssp/markdown')

const testMarkdownContent = require('fs').readFileSync(`${__dirname}/test-file.md`).toString()

console.log(toTerminal(testMarkdownContent))
```

OR

```js
import { toTerminal } from '@nexssp/markdown'

import { readFileSync } from 'fs'
const testMarkdownContent = readFileSync(new URL('test-file.md', import.meta.url)).toString()

console.log(toTerminal(testMarkdownContent))
```

Example of markown for testing..

```md
# Header 1

This is a test markdown

## Header 2

<!-- See more at tests/test-file.md -->
```
npm package: @nexssp/min
Description: Just minimize safely, FAST all src files to dist folder individually with the same name..
Author: mapoart@gmail.com
Latest version: 1.0.6

# @nexssp/min

## Installation

```sh
npm i @nexssp/min -D # install for devDependencies
```

Just **FAST** minify/compress src to dist folder by one command.

![image](https://user-images.githubusercontent.com/53263666/116790584-3e8a8500-aab5-11eb-9aee-dee90f7ae5cb.png)

## CLI or package.json

```sh
npx @nexssp/min # it will just compress js files from ./src/ to ./dist/
npx @nexssp/min ./source/ ./destination/ # change source and destination
```

## API Example

```js
const { compress } = require("@nexssp/min");

(async () => {
  const result = await compress(from, to, { glob });

  result.forEach((r) =>
    ok(
      `${bold(yellow(r.file))} ${r.length} => ${r.compressed.length} ${bold(
        "(" + r.compressed.percentage + "%)"
      )}`
    )
  );
})();
```
npm package: @nexssp/package
Description: Package Manager for the Nexss Programmer
Author: Marcin Polak
Latest version: 1.0.23

# @nexssp/package

- Experimental - alpha stage

Manage multiple packages (now only git and only Nexss Programmer packages)

```sh
nexss pkg add Blender --saveNexss # You can modify code from now in your folder and use it for your project.
nexss pkg init
nexss pkg init Id # Run command init on the Id (installs package)
nexss pkg install Id # installs package (Id cannot exists in the NEXSS_PACKAGES_PATH)
nexss pkg install all # installs all packages
```

## Examples

```sh
nexss pkg add Mouse/Move --_x=10 --_y=200
nexss pkg add Local/Folder
nexss pkg add Keyboard --type="#d" --copyPackage --saveNexss  --forceNexss # --copyPackage to the current folder (you can modify)

```

## Multiplatform

Nexss Programmer packages can have subfolders for differnet platform. `nexss pkg init` will ommit them if the platfrom does not match, so it will not run eg. Windows init commands on Linux machine etc.
npm package: @nexssp/packunpack
Description: Just Pack or Unpack files and folders (+.gitignore rules)
Author: mapoart@gmail.com
Latest version: 1.0.6

# @nexssp / packUnpack

Just _**pack**_ or _**unpack**_ mulitple files and/or folders with the **.gitignore** rules. Put node_modules in the .gitignore and pack will ommit the whole directory.

## Example

```js
const { pack, unpack } = require('@nexssp/packunpack');
const package = path.resolve("../mypack.tar.gz");

pack(["myfolderOne","myfolder2","file1","file2","folderX",...], package)

unpack(package, "/tmp/") // extract files to the tmp folder

```

## Quick shell example

```sh
node -e "const {pack}= require('./src');pack('.gitignore','myf.tar.gz',{ force : true })"
node -e "const {pack}= require('./src');unpack('myf.tar.gz','../x')"
```

## Formats

- **tar.gz** - for now only tar/gz

## What pack returns

```js
const packReturnsExample = {
  ommited: [
    // from .gitignore
    'G:\\111222333\\node_modules\\@nexssp',
    '.........',
    'G:\\111222333\\node_modules\\@nexssp\\ansi\\README.md',
    'G:\\111222333\\node_modules\\@nexssp\\ansi\\dist\\ansi.js',
  ],
  packed: [
    'G:\\111222333',
    'G:\\111222333\\.gitignore',
    'G:\\111222333\\BBB.ign',
    '.........',
    'G:\\5\\1234\\stdinTest.js',
    'G:\\5\\1234\\xxxx.hs',
  ],
  file: '../../mypackXX1.tar.gz', // Result packed file
  includes: ['G:\\111222333', 'G:/5/1234'], // What was selected for packing
  size: 99388, // size in bytes
  sizeMB: 0.09478378295898438, // size in MB
};
```
npm package: @nexssp/plugin
Description: Plugin system for not only the Nexss Programmer.
Latest version: 1.1.2

# @nexss/plugin

**24.04.2025 TypeScript Support** - Added TypeScript type definitions for better development experience.

Plugin system for not only the Nexss Programmer.

## Note

This Nexss Programmer's plugin is the effect of the refactoring the Nexss Programmer **@nexssp/cli** which development has been started in 2018. This module can be used also _separately_ without the Nexss Programmer.

```js
const plugin1 = nexssPlugin({
  path: resolve('.'),
  commandsPath: 'tests/commands',
})

plugin1.start()
// plugin1.displayCommandHelp()
plugin1.runCommand('testCommand1')
plugin1.runCommand('xxxx')

````
npm package: @nexssp/project
Description: Projects for Nexss Programmer
Author: Marcin Polak
Latest version: 1.0.19

# @nexssp/project

## NEW: Project types

Start hot reloading environment and start with different project types quickly:

For now supported project types: **vue2**, **vue3**, **react17**, **preact**

```sh
nexssp-project vue3 project-name # as separate command
nexss p vue3 project-name # for nexss programmer
nexss p vue3 project-name --install # use --install to install automatically the packages.

# TODO: add tag ability (for different versions)
# TODO: add change of project name in the package.json file
# TODO: remove .git folder from the created project.
```

## Note

Nexss Programmer projects tool. This tool is a cli tool and can be used separately but also within Nexss Programmer.

It allows you to keep db of your projects (not only Nexss Programmer) so you can find them easyly. It also create new Nexss Programmer's Project, display info about them etc.

You can add to the database any folder really. And then you can search for them in the by easy command `nexssp-project search some keywords` or in the Nexss Programmer ..`nexss p search ...`

This Nexss Programmer's plugin is the effect of the refactoring the Nexss Programmer **@nexssp/cli** which development has been started in 2018. This module can be used also _separately_ without the Nexss Programmer.

## Install

```sh
# Install
npm i -g @nexssp/project

# creates new project folder with default template
nexssp-project new myproject

# attach current folder to the global database. please see below
nexssp-project attach

# search your database
nexssp-project search keywords..

# displays info about project
nexssp-project info
```

Now you can use `nexssp-project`. In the Nexss Programmer it is `nexss project` or `nexss p`

## Usage

### Create db of your projects

Let say you have hundreds different projects of different kinds. This module allows you to keep track of your projects aswell of some information. For now (use `nexssp-project attach` in any folder) it will ask you for information (optional):

![image](https://user-images.githubusercontent.com/53263666/119243113-3a0d3580-bb64-11eb-9d68-712461ebb9cf.png)

- **folder** (in case you have different folders for different projects)
- **description**
- **keywords** (for searching)
- **repository**
- **code editor** (default for VSCodium)
- **extra notes** (if you need to add some extra notes to the projects, like phone numbers etc..)

### Search for the projects

Projects are saved by default in the: `<HOME>/.nexss/projects_db.json`

You can customize it by changing the environment variable of: `NEXSS_PROJECTS_DB`

### TODO

- add more detailed searching
-
npm package: @nexssp/stack
Description: Displays stack the nice way.
Author: Marcin Polak mapoart@gmail.com
Latest version: 1.0.9

# @nexssp/stack

Display stack in nice way with colors and removes the very first line from stack.

## Installation

```sh
npm i @nexssp/stack
```

![image](https://user-images.githubusercontent.com/53263666/116808538-a2569180-ab39-11eb-88d1-5dc9ed16ebb2.png)

## Usage

```js
const { stack } = require("stack");

// OR

const mystack = require("@nexssp/stack").stack;

require("module-alias/register");
const { stack } = require("@nexssp/stack");

stack("My Error test with nice stack");

stack("Display of the stack can be adjusted ('message',1,4)", 1, 3);
//Where 2 is which one number to colorize. Default is 1. 3 is cut line from the top, so it will cut 3 lines.
```
npm package: @nexssp/system
Description: System functions not only for the Nexss Programmer
Author: Marcin Polak
Latest version: 1.1.10

# @nexssp/system

This module is **experimental**.

- **1.1.0** - upgraded @nexssp/extend to 2.0.1, structure changed. more testing done. _still experimental_.
- **1.0.8** - new function `nExec`. Different aproach to run commands. If nSpawn has any issues this can be a solution. Keep in mind this module is experimental.
- **1.0.6** - `stripTerminalColors` - removes from putput the colors, so the output is just a text.

```js
// To output just to the terminal use option: `{stdio: 'inherit'}`
// To strip the terminal colors use `stripTerminalColors`
const result = nSpawn("nexss Id --something='x y z'", { stripTerminalColors: true });

{exitCode: int,
stderr: string,
stdout: string
cmd: string
args: array // parsed arguments (1.0.7+)
command: string // just orginal command (1.0.7+)
}

```
npm package: @nexst/client
Description: ⚡ next + nest ⚡
Author: Yoshihide Shiono
Latest version: 0.0.62

<p align="center">😎 @nexst/client 😎</p>
<p align="center">
  <a href="https://npm.im/@nexst/client" alt="A version of @nexst/client">
    <img src="https://img.shields.io/npm/v/@nexst/client.svg">
  </a>
  <a href="https://npm.im/@nexst/client" alt="Downloads of @nexst/client">
    <img src="https://img.shields.io/npm/dt/@nexst/client.svg">
  </a>
</p>

## HttpClient

It uses [axios](https://github.com/axios/axios) internally, methods are listed here:

- `get(url: string, config?: AxiosRequestConfig): Promise<AxiosResponse>`
- `post(url: string, data?: any, config?: AxiosRequestConfig): Promise<AxiosResponse>`
- `update(url: string, data?: any, config?: AxiosRequestConfig): Promise<AxiosResponse>`
- `delete(url: string, config?: AxiosRequestConfig): Promise<AxiosResponse>`

Basic usage:

```tsx
import React from 'react';

export default class extends React.Component {
  private client: HttpClient;

  componentDidMount() {
    const baseURL: string = `${process.env.HOST}:${process.env.PORT}`;
    this.client = new HttpClient(baseURL);
  }
}
```

If we have token like `JWT` (Json Web Token) and logged in, usage is like below:

```tsx
import React from 'react';

export default class extends React.Component {
  private client: HttpClient;

  static getInitialProps({ req }) {
    return {
      user: req.user,
    };
  }

  componentDidMount() {
    const baseURL: string = `${process.env.HOST}:${process.env.PORT}`;
    const token: string = this.props.user.token;
    this.client = new HttpClient(baseURL, token);
  }
}
```
npm package: @nexst/core
Description: ⚡ next + nest ⚡
Author: Yoshihide Shiono
Latest version: 0.0.62

<p align="center">😎 @nexst/core 😎</p>
<p align="center">
  <a href="https://npm.im/@nexst/core" alt="A version of @nexst/core">
    <img src="https://img.shields.io/npm/v/@nexst/core.svg">
  </a>
  <a href="https://npm.im/@nexst/core" alt="Downloads of @nexst/core">
    <img src="https://img.shields.io/npm/dt/@nexst/core.svg">
  </a>
</p>

## NexstAppModule & NextModule

In the `server/app.module.ts`:

```ts
import {
  Module,
  MiddlewareConsumer,
} from '@nestjs/common';
import {
  NexstAppModule,
  NextModule,
} from '@nexst/core';
import { AppController } from './app.controller';

@Module({
  imports: [
    NextModule,
  ],
  controllers: [
    AppController,
  ],
})
export class AppModule extends NexstAppModule {
  configure(consumer: MiddlewareConsumer) {
    super.configure(consumer);

    // additional configurations here
  }
}
```

Then, use `render()` function where you want to SSR:

```ts
import {
  Controller,
  Get,
  Req,
  Res,
} from '@nestjs/common';
import {
  Request,
  Response,
} from 'express';
import { NextService } from '@nexst/core';

@Controller('auth')
export class AuthController {
  constructor(private readonly nextService: NextService) {}

  @Get('register')
  public async showRegisterPage(@Req() req: Request, @Res() res: Response) {
    return await this.nextService.render(req, res, 'auth/register');
  }
}
```

This will render `pages/auth/register.tsx`!
npm package: @nexst/platform-express
Description: ⚡ next + nest ⚡
Author: Yoshihide Shiono
Latest version: 0.0.62

<p align="center">😎 @nexst/platform-express 😎</p>
<p align="center">
  <a href="https://npm.im/@nexst/platform-express" alt="A version of @nexst/platform-express">
    <img src="https://img.shields.io/npm/v/@nexst/platform-express.svg">
  </a>
  <a href="https://npm.im/@nexst/platform-express" alt="Downloads of @nexst/platform-express">
    <img src="https://img.shields.io/npm/dt/@nexst/platform-express.svg">
  </a>
</p>
npm package: @nexst/tsconfig
Description: A tsconfig.json for a nexst app
Author: Yoshihide Shiono
Latest version: 1.4.0

<p align="center">😎 @nexst/tsconfig 😎</p>
<p align="center">
  <a href="https://npm.im/@nexst/tsconfig" alt="A version of @nexst/tsconfig">
    <img src="https://img.shields.io/npm/v/@nexst/tsconfig.svg">
  </a>
  <a href="https://npm.im/@nexst/tsconfig" alt="Downloads of @nexst/tsconfig">
    <img src="https://img.shields.io/npm/dt/@nexst/tsconfig.svg">
  </a>
</p>

## How to use

Install it:

```bash
# with yarn
$ yarn add --dev @nexst/tsconfig

# or with npm
$ npm install --save-dev @nexst/tsconfig
```

Then use it:

```json
{
  "extends": "@nexst/tsconfig",
  "compilerOptions": {
    "outDir": "build"
  }
}
```

## In the @nexst/tsconfig

```json
{
  "compilerOptions": {
    "target": "esnext",
    "module": "esnext",
    "jsx": "preserve",
    "lib": ["dom", "es2017"],
    "moduleResolution": "node",
    "declaration": true,
    "strict": true,
    "strictPropertyInitialization": false,
    "removeComments": true,
    "skipLibCheck": true,
    "sourceMap": true,
    "allowSyntheticDefaultImports": true
  }
}
```

## Related

- [nexst](https://github.com/classiii/nexst)
- [create-nexst-app](https://github.com/classiii/create-nexst-app)
npm package: @nexst/tsconfig-client
Description: A tsconfig.json for a nexst client app
Author: Yoshihide Shiono
Latest version: 0.0.5
Deprecated: Move to @nexst/tsconfig

<p align="center">😎 @nexst/tsconfig-client 😎</p>
<p align="center">
  <a href="https://npm.im/@nexst/tsconfig-client" alt="A version of @nexst/tsconfig-client">
    <img src="https://img.shields.io/npm/v/@nexst/tsconfig-client.svg">
  </a>
  <a href="https://npm.im/@nexst/tsconfig-client" alt="Downloads of @nexst/tsconfig-client">
    <img src="https://img.shields.io/npm/dt/@nexst/tsconfig-client.svg">
  </a>
</p>

## How to use

Install it:

```bash
# with yarn
$ yarn add @nexst/tsconfig-client

# or with npm
$ npm install --save @nexst/tsconfig-client
```

Then use it:

```json
{
  "extends": "@nexst/tsconfig-client",
  "compilerOptions": {
    "outDir": "build"
  }
}
```

## In the @nexst/tsconfig-client

```json
{
  "compilerOptions": {
    "target": "esnext",
    "module": "esnext",
    "jsx": "preserve",
    "lib": ["dom", "es2017"],
    "moduleResolution": "node",
    "strict": true,
    "strictPropertyInitialization": false,
    "removeComments": true,
    "skipLibCheck": true,
    "sourceMap": true,
    "allowSyntheticDefaultImports": true,
  }
}
```
npm package: @nexst/tsconfig-server
Description: A tsconfig.json for a nexst server app
Author: Yoshihide Shiono
Latest version: 1.4.0

<p align="center">😎 @nexst/tsconfig-server 😎</p>
<p align="center">
  <a href="https://npm.im/@nexst/tsconfig-server" alt="A version of @nexst/tsconfig-server">
    <img src="https://img.shields.io/npm/v/@nexst/tsconfig-server.svg">
  </a>
  <a href="https://npm.im/@nexst/tsconfig-server" alt="Downloads of @nexst/tsconfig-server">
    <img src="https://img.shields.io/npm/dt/@nexst/tsconfig-server.svg">
  </a>
</p>

## How to use

Install it:

```bash
# with yarn
$ yarn add --dev @nexst/tsconfig-server

# or with npm
$ npm install --save-dev @nexst/tsconfig-server
```

Then use it:

```json
{
  "extends": "@nexst/tsconfig-server",
  "compilerOptions": {
    "outDir": "build"
  },
  "include": [
    "server"
  ]
}
```

## In the @nexst/tsconfig-server

```json
{
  "compilerOptions": {
    "target": "esnext",
    "module": "commonjs",
    "moduleResolution": "node",
    "declaration": true,
    "strict": true,
    "strictPropertyInitialization": false,
    "removeComments": true,
    "skipLibCheck": true,
    "sourceMap": true,
    "allowSyntheticDefaultImports": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true
  }
}
```

## Related

- [nexst](https://github.com/classiii/nexst)
- [create-nexst-app](https://github.com/classiii/create-nexst-app)
npm package: @nexst/typeorm
Description: ⚡ next + nest ⚡
Author: Yoshihide Shiono
Latest version: 0.0.62

<p align="center">😎 @nexst/typeorm 😎</p>
<p align="center">
  <a href="https://npm.im/@nexst/typeorm" alt="A version of @nexst/typeorm">
    <img src="https://img.shields.io/npm/v/@nexst/typeorm.svg">
  </a>
  <a href="https://npm.im/@nexst/typeorm" alt="Downloads of @nexst/typeorm">
    <img src="https://img.shields.io/npm/dt/@nexst/typeorm.svg">
  </a>
</p>

## TypeOrmModule

In the `server/app.module.ts`:

```ts
import { Module } from '@nestjs/common';
import { EnvModule } from '@nexst/core';
import {
  TypeOrmModule,
  TypeOrmService,
} from '@nexst/typeorm';

@Module({
  imports: [
    TypeOrmModule.forRootAsync({
      imports: [EnvModule],
      useClass: TypeOrmService,
    }),
    EnvModule,
  ],
})
export class AppModule {}
```
npm package: @next-analyzer/mcp
Description: Next.js project analyzer MCP server for AI assistants
Latest version: 0.1.0

# Next Analyzer MCP

A Model Context Protocol (MCP) server for analyzing Next.js projects with TypeScript. This tool helps AI assistants quickly understand and work with Next.js projects by providing detailed analysis of project structure, TypeScript definitions, and routing patterns.

## Features

- **Project Structure Analysis**: Automatically maps out your Next.js project structure including pages, components, and API routes
- **TypeScript Definition Extraction**: Extracts and categorizes TypeScript interfaces and types used throughout the project
- **Route Analysis**: Comprehensive analysis of static and dynamic routes, including API endpoints
- **Data Fetching Pattern Detection**: Identifies and analyzes data fetching methods (getStaticProps, getServerSideProps, etc.)
- **Component Relationship Mapping**: Visualizes component dependencies and relationships

## Installation

```bash
# Install globally
npm install -g @next-analyzer/mcp

# Or use with npx
npx @next-analyzer/mcp
```

## Integration with Cline

Add the following configuration to your Cline MCP settings:

```json
{
  "mcpServers": {
    "next-analyzer": {
      "command": "npx",
      "args": ["@next-analyzer/mcp"],
      "disabled": false,
      "autoApprove": []
    }
  }
}
```

## Available Tools

### analyze_project_structure
Analyzes the structure of a Next.js project and returns a comprehensive overview.

```typescript
interface ProjectStructure {
  pages: RouteNode[];
  components: ComponentInfo[];
  apiRoutes: APIRouteInfo[];
  dataFetching: DataFetchingInfo[];
  envVariables: string[];
}
```

### extract_typescript_definitions
Extracts and categorizes TypeScript interfaces and types used in the project.

```typescript
interface TypeScriptDefinitions {
  interfaces: TypeInfo[];
  types: TypeInfo[];
  props: PropTypeInfo[];
  apiTypes: APITypeInfo[];
}
```

### analyze_routes
Provides detailed analysis of the project's routing structure.

```typescript
interface RouteAnalysis {
  staticRoutes: RouteInfo[];
  dynamicRoutes: DynamicRouteInfo[];
  apiEndpoints: APIEndpointInfo[];
  middleware: MiddlewareInfo[];
}
```

## Example Usage

```typescript
// Example of using the MCP server with Cline
const result = await use_mcp_tool({
  server_name: "next-analyzer",
  tool_name: "analyze_project_structure",
  arguments: {
    path: "./my-next-project"
  }
});
```

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

1. Fork the repository
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## Requirements

- Node.js >= 16.0.0
- Next.js project with TypeScript
npm package: @next-app/config
Description: Next config for app
Author: zhbhun
Latest version: 1.0.0

# @next-app/config

> 本说明文档是针对 @next-app/config@1.x 编写的，如果您使用的 @next-app/config@0.x 请查看 [0.x 分支](https://github.com/zhbhun/next-app/tree/0.x/packages/next-app-config)。
npm package: @next-armored/cors
Description: CORS middleware for Next.js
Author: Marek Elmayan
Latest version: 0.2.1

<p align="center">
  <a 
  href="https://raw.githubusercontent.com/marek-e/next-armored/master/assets/N-armor.jpg" target="_blank" rel="noopener noreferrer">
    <img width="180" src="https://raw.githubusercontent.com/marek-e/next-armored/master/assets/N-armor.jpg" alt="next-armored logo">
  </a>
</p>
<br/>
<p align="center">
  <a href="https://npmjs.com/package/@next-armored/cors"><img src="https://img.shields.io/npm/v/@next-armored/cors.svg" alt="npm package"></a>
  <a href="https://github.com/mareke/next-armored/actions/workflows/ci.yml"><img src="https://github.com/mareke/next-armored/actions/workflows/ci.yml/badge.svg?branch=master" alt="build status"></a>
  <a href="https://pr.new/mareke/next-armored"><img src="https://developer.stackblitz.com/img/start_pr_dark_small.svg" alt="Start new PR in StackBlitz Codeflow"></a>
</p>
<br/>

# @next-armored/cors 🛡️

CORS middleware for Next.js

```bash
npm i @next-armored/cors
// or
yarn add @next-armored/cors
// or
pnpm i @next-armored/cors
// or
bun add @next-armored/cors
```

## License

[MIT](LICENSE).
npm package: @next-book/interface
Description: Next-book’s browser interface
Author: Jan Martinek
Latest version: 1.0.7

# @next-book/interface

`@next-book/interface` is a library providing functionality that builds on the structure of a [mapped next-book][mapper]. It provides basic e-reading functionalities.

See an [example of an e-book][walden] created with the next-book tools.

## Use

Some web tech knowledge and command line use is needed to produce a next-book at the time. But we‘re preparing an easier way right now! (If you want to know when it’s out, please subscribe to our newsletter 💌).

### 1. Add `publisher` and `interface` dependencies

You can install publisher and interface:

- via Yarn `yarn add @next-book/publisher @next-book/interface`
- via NPM `npm install @next-book/publisher @next-book/interface`

### 2\. Import `interface` styles in your SCSS

```scss
@import './../../node_modules/@next-book/interface/src/scss/style.scss';
```

### 3\. Import `interface` module in your scripts

```javascript
import { initBook } from '@next-book/interface';

document.addEventListener('DOMContentLoaded', () => {
  initBook();
});
```

### Stand-alone use (without SCSS/JS imports)

You may include `dist/interface.js` and `dist/interface.css` in your web book (before any other scripts.

## Getting current book state

You may use `book.getState()` to get current e-book state — it returns a serialized redux state with user data.

## Contributing

Clone repository and install devDependencies. Build a complete project with `npm run build`. Limit PRs only to changed source files.

## License

@next-book/interface &copy; 2016–2020 next-book

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

[walden]: https://books.next-book.info/henry-david-thoreau_walden/docs/
[mapper]: http://next-book.github.io/publisher/
[api]: http://next-book.github.io/publisher/api
[options]: http://next-book.github.io/publisher/api/#options
npm package: @next-boost/hybrid-disk-cache
Description: A hybrid disk cache utilize both the database and the file system.
Author: Rakuraku Jyo
Latest version: 0.2.1

[![Coverage Status](https://coveralls.io/repos/github/next-boost/hybrid-disk-cache/badge.svg?branch=master)](https://coveralls.io/github/next-boost/hybrid-disk-cache?branch=master) [![Maintainability](https://api.codeclimate.com/v1/badges/270469eb02421e5c7547/maintainability)](https://codeclimate.com/github/next-boost/hybrid-disk-cache/maintainability)

# hybrid-disk-cache

A hybrid disk cache library that utilized both the solid SQLite3 database and the file system.

```bash
yarn add @next-boost/hybrid-disk-cache
```

When the value is larger than 10 kilobytes, it will be written to the file system, otherwise saved in SQLite3 database.

The benefits of using this kind of hybrid cache are:

- Always use the small footprint and high performace SQLite3 index.
- Using file system for larger files. No need to run `vacuum` for releasing space

Also, here are some bonus:

- 100% test coverage
- Pure Typescript
- Used in production with 300K keys
- SQLite3's indices will always be used when searching for a key. (which is FAST)

This hybrid idea is inspired by [`python-diskcache`](https://github.com/grantjenks/python-diskcache). We used it in our Python production stack, and it works just as great as what we'd expected.

## APIs

```javascript
// tbd, time before deletion: This is used to control how long a key
// should remain in the cache after expired (ttl)
// And `cache.purge` will delete all records with ttl + tbd < now
const cache = new Cache({ path, ttl, tbd })

// set. if ttl empty, use the cache's ttl
cache.set(key, value)
// set. will expire in 5 seconds
cache.set(key, value, 5)

// get
cache.get(key, defaultValue)

// del
cache.del(key)

// check cache availability and status
// status in 'miss' | 'stale' | 'hit'
const status = cache.has(key)

// if you want to serve even the stale value
if (cache.has(key) !== 'miss') {
    const value = cache.get(key)
}

// if you only want the unexpired one
if (cache.has(key) === 'hit') {
    const value = cache.get(key)
}

// delete all expired keys
cache.purge()
```

Check [`index.test.ts`](https://github.com/next-boost/hybrid-disk-cache/blob/master/test/index.test.ts) for examples.

## Benchmarks

With a series of 10B ~ 500KB data writing and reading, here are the results on a Samsung 860 EVO SATA SSD:

Here is the [benchmark source code](https://github.com/next-boost/hybrid-disk-cache/blob/master/src/bench.ts).

```
> cache located at: /tmp/hdc
> generating bench data from 10B to 500000B
> starting 3000 x 15 writes
  done: 69.34 μs/record.
> starting 3000 x 15 reads
  done: 26.65 μs/record.
```

## License

MIT. Copyright 2020, Rakuraku Jyo.
npm package: @next-boost/redis-cache
Description: Official redis cache for next-boost
Author: Rakuraku Jyo
Latest version: 0.4.0

[![Coverage Status](https://coveralls.io/repos/github/next-boost/redis-cache/badge.svg?branch=main)](https://coveralls.io/github/next-boost/redis-cache?branch=main) [![Maintainability](https://api.codeclimate.com/v1/badges/853b19631069cf943e89/maintainability)](https://codeclimate.com/github/next-boost/redis-cache/maintainability)

# redis-cache

A redis-based cache for next-boost. If you have a cluster of next-boost running, using this plugin to share the cache between instances.

```bash
npm i @next-boost/redis-cache
```

## Usage

```javascript
// in .next-boost.js
const RedisCache = require('@next-boost/redis-cache/dist/adapter').default

module.exports = {
  cacheAdapter: RedisCache.init({
    uri: 'redis://<your-host>/<db>',
    ttl: 15,
    tbd: 3600,
  }),
  rules: [
    ...
  ],
}
```

## Passing your own Redis Client

You can also provide an [ioredis](https://github.com/luin/ioredis) client or or cluster instance if you need advanced configuration

```javascript
cacheAdapter: RedisCache.init({
    redis: new Redis.Cluster({...}),
    ttl: 15,
    tbd: 3600,
})
```

## License

MIT. Copyright 2020, Rakuraku Jyo.
npm package: @next-box/breadcrumb
Description: A library for creating a breadcrumb for use in React applications.
Author: miami-man
Latest version: 0.0.7

# breadcrumb

A library for creating a breadcrumb for use in React applications.

[![npm version](https://badge.fury.io/js/%40dollygrip%2Fbreadcrumb.svg)](https://badge.fury.io/js/%40dollygrip%2Fbreadcrumb)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)

## WORK IN PROGRESS
npm package: @next-box/feature-flags
Description: A library for managing feature flags in React applications.
Author: miami-man
Latest version: 0.0.12

# feature-flags

A library for managing feature flags in React applications.

[![npm version](https://badge.fury.io/js/%40dollygrip%2Fbreadcrumb.svg)](https://badge.fury.io/js/%40dollygrip%2Fbreadcrumb)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)

## WORK IN PROGRESS
npm package: @next-box/link-extra
Description: A collection of link components for use primarily with Next.js.
Author: miami-man
Latest version: 0.0.20

# @next-box/link-extra

A collection of link components for use primarily with Next.js.

[![npm version](https://badge.fury.io/js/%40next-box%2Flink-extra.svg)](https://badge.fury.io/js/%40next-box%2Flink-extra)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)

The use of React server components has flipped the traditional UX pattern of navigating to a page and waiting for the content to load on its head. Now, the potential delay is prior to the redirection, while the server render is happening. This transition can sometimes be handled by the use of the `loading.tsx` file, but not always.