open-index/open-npm huggingface dataset:
npm package: @nimbox/js-logger-api
Description: Generic JS logging interface
Author: Ricardo Marimon
Latest version: 1.0.2

# js-logger-api

A simple interface to logging and event tracking that does nothing and expects a real logging infrastructure to be installed. This api expects two global function that deals with the actual logging: `jsLOGGER` and `jsTRACKER`. When none of these functions are present, no actual logging or tracking occurs.

## Installation 

```sh
npm install @nimbox/js-logger --save
```

## Logger

### Usage

```ts
import { getLogger } from '@nimbox/js-logger-api';
const _logger = getLogger('category');
_logger.info('deleted user %s', user);
```

For this to actually output something there must be a global function 
defined as follows:

```ts
jsLOGGER(category: string | null, level: number, message: string, ...params: any)
```

Where levels are:

* 0 - fatal - (call someboy on a beeper)
* 1 - error
* 2 - warn
* 3 - info
* 4 - debug
* 5 - trace

### Implementation

A basic implementation of the `jsLOGGER` function can be something like this:

```ts
import { padEnd, truncate } from 'lodash';

const names = ['fatal', 'error', 'warn', 'info', 'debug', 'trace'];
const colors = ['red', 'red', 'orange', 'blue', 'green', 'purple'];

const jsLOGGER = (category: string | null, level: number, message: string, ...params: any) => {

    const c = truncate(padEnd(category, 32), { length: 32 });
    const l = padEnd(names[level], 5);
    const m = sprintf(message, ...parameters)

    console.log(`%c${c} %c[${l}]`, `color:${colors[level]}`, `color:${colors[level]}`, m);

};
```

## Tracker

Logger has en special case for events. When logging evetns it is possible to add 
parameters to the message.

### Usage

```ts
import { getLogger } from '@nimbox/js-logger-api';
const _logger = getLogger('category');
_logger.track('query', { value: 'getCustomers', time: 2 });
```

Typical names for the keys in the object should be:

* `value` - the name of the object associated to the event 
* `time` - the time it took from begining to end of event in millis

For this to actually output something there must be a global function 
defined as follows:

```ts
jsTRACKER(category: string | null, event: string, params?: { [key:string]: any })
```

## Implementation

Logs and Events have two intended audiences.  Logs are for developers and events are for product managers. Logs show how an application is behaving, events show how a user is using the application.

In most situations the `jsTRACKER` implementation should also create an info log so that the developer knows the events that are being relevant.

```ts
const jsTRACKER = (category: string | null, event: string, params?: { [key:string]: any }) =>  {
    jsLOGGER(category, 3, `event ${event} - %j`, params);
}
```

## Updating

```bash
npm version patch -m "Version %s - add sweet badges"
git push && git push --tags
npm publish
```

## And...

Remember to check this to redo the whole thing

https://codeburst.io/https-chidume-nnamdi-com-npm-module-in-typescript-12b3b22f0724
npm package: @nimbox/js-lomein
Description: A medly of typescript functions used everywhere
Author: Ricardo Marimon
Latest version: 0.0.8

# js-lomein

Just interface to logging that does nothing and expects a real logging
infrastructure to be installed. This api expects a global function that
deals with the actual logging.  

## Installation 

```sh
npm install @nimbox/js-lomein --save
```

## Usage


## Implementation


## Updating

```
npm version patch -m "Version %s - add sweet badges"
git push && git push --tags
npm publish --access=public
```

## And...

Remember to check this to redo the whole thing

https://codeburst.io/https-chidume-nnamdi-com-npm-module-in-typescript-12b3b22f0724
npm package: @nimbu-cli/plugin-vite
Description: Vite-powered development and build tooling for Nimbu themes. The plugin mirrors the existing webpack integration by generating `snippets/vite.liquid`, keeping asset filenames stable, and routing the Nimbu proxy through the Node-based proxy server.
Author: Zenjoy Engineering
Latest version: 6.0.0-alpha.0

# @nimbu-cli/plugin-vite

Vite-powered development and build tooling for Nimbu themes. The plugin mirrors the
existing webpack integration by generating `snippets/vite.liquid`, keeping asset
filenames stable, and routing the Nimbu proxy through the Node-based proxy server.

## Installation

```
pnpm add -D @nimbu-cli/plugin-vite
```

> Requires Node.js 20.19 or newer. Vite 7 dropped support for earlier Node.js releases, and the plugin enforces the same minimum.

Make sure you only keep one bundler plugin installed at a time (either the
webpack plugin or this Vite plugin) to avoid command conflicts. The core CLI
loads optional plugins listed in `package.json#oclif.optionalPlugins` when the
package is present.

## Development

```
pnpm exec nimbu server --port 5173
```

- The proxy and Vite dev middleware share the same port (default `http://localhost:4567`).
- HMR traffic flows through the same origin, so no extra port management is required.
- The plugin rewrites `snippets/vite.liquid` so templates can keep using the
  aggregate snippet just like the webpack workflow.

## Production build

```
pnpm exec nimbu build
```

- Runs `vite build` with a stable Rollup output pattern.
- Copies generated assets into `javascripts/` and `stylesheets/` inside the
  theme directory without hashes.
- Writes an updated `snippets/vite.liquid` file based on the Vite manifest.

## Configuration

- Place your Vite config at the project root (e.g. `vite.config.ts`).
- If no config file is found, the plugin falls back to `src/index.(t|j)sx?` as
  the entry and writes assets to `.nimbu-vite/` before synchronising them into
  the theme directories.
- Custom Rollup inputs are supported; their keys become the chunk names exposed
  in Liquid.

## Snippet contract

The aggregate snippet exposes:

- `vite_build_timestamp`
- `vite_chunks`
- `vite_js`
- `vite_css`

Entries can be accessed directly off the aggregate maps; for example
`vite_js['app']` and `vite_css['app']` provide the specific asset references.
npm package: @nimbu/api
Description: A thin abstraction layer for the Nimbu API for modern browsers
Author: Zenjoy Engineering
Latest version: 0.1.0

# Thin abstraction layer for the Nimbu API for modern browsers

When we say "modern browsers" we mean a browser with:

- `window.Promise`:
  https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise
- `window.fetch`: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API
- `window.FormData`: https://developer.mozilla.org/en-US/docs/Web/API/FormData

Polyfilling these on older browsers will also work.

The files distributed in the package are compiled to ES6. If you need support for older browsers,
you need to configure your packager to compile files in `node_modules` to ES5.

This library is written in TypeScript and provides bundled type declarations for usage with
TypeScript.


## Usage with node

To use this library with node, insert the following before requiring this library:

```
const fetch = require('node-fetch');
const FormData = require('form-data');
global.fetch = fetch;
global.FormData = FormData;
```
npm package: @nimbu/testing
Description: A set of utilities useful for testing Nimbu Cloud Code and the Nimbu JS SDK
Author: Zenjoy Engineering
Latest version: 0.2.3

# @nimbu/testing

A set of utilities useful for testing [Nimbu](https://www.nimbu.io) Cloud Code and the Nimbu JS SDK

## Install

```sh
$ npm install @nimbu/testing --save-dev
```

or

```
$ yarn add -D @nimbu/testing
```

## Usage

To be completed...