open-index/open-npm huggingface dataset:
npm package: @nowant/ng-build-expander
Description: Expands the Angular Workspace targets!
Latest version: 0.0.13

# ng-build-expander: expand your workspace from another one

`ng-build-expander` is an Angular build expander that allows you to conveniently expand your current workspace (`angular.json`) from another one. There are `build`, `serve`, `extract-i18n`, and `test` targets available.

## Getting started

### Install correct dependency versions

Requirements:

* Make sure you have `yarn` available on your system;
* Use Angular >=11.0.7;
* Use Webpack >=5.18.0.

#### How to use

Please, carefully read following instructions below to configure `ng-build-expander`:

1. Create two Angular projects using the CLI: `app1` and `app2`
2. Go to `app1` project, create `/projects` directory and move `app2` project there.
3. Go to `app1` root directory and install ng-build-expander using following command: `yarn add @nowant/ng-build-expander`
4. Open `app1` `angular.json` and include `app2` project in `projects` to expand its options, like so:

```json
{
  ...
  "projects": {
    ...
     "app2": {
      "projectType": "application",
      "schematics": {},
      "root": "packages/app2",
      "sourceRoot": "packages/app2/src",
      "prefix": "app",
      "architect": {
        "build": {
          "builder": "@nowant/ng-build-expander:browser",
          "configurations": {
            "production": {}
          }
        },
        "serve": {
          "builder": "@nowant/ng-build-expander:dev-server",
          "options": {
            "port": 4202
          },
          "configurations": {
            "production": {}
          }
        },
        "extract-i18n": {
          "builder": "@nowant/ng-build-expander:extract-i18n"
        },
        "test": {
          "builder": "@nowant/ng-build-expander:karma"
        },
        ...
      }
    }
  }
}
```

5. Now you're able to run following commands from `app1` root directory:

Build commands:

* `ng run app2:build`
* `ng run app2:build --configuration=production`

Serve commands:

* `ng run app2:serve`
* `ng run app2:serve --configuration=production`

Extract i18n commands:

* `ng run app2:extract-i18n`

Test commands:

* `ng run app2:test`

6. Have fun ;)

## Webpack version-specific issues

If you can't install webpack>=5.0.0:

* Remove `node_modules`, `yarn.lock`, `package-lock.json`
* Add following to your `package.json`:

  ```json
  "resolutions": {
    "webpack": "^5.0.0"
  }

* `yarn install`
npm package: @nowarajs/error
Description: A collection of error classes for NowaraJS
Author: NowaraJS
Latest version: 1.4.3

# 🐞 NowaraJS Error

Handling errors in TypeScript is usually a mess of `Error` objects without context. I built NowaraJS Error to standardize how I track and expose errors in my APIs, ensuring every crash is traceable and safe for production.

## Why this package?

The goal is simple: **Stop exposing server internals to clients.**

This package forces a clear distinction between what the user sees (`HttpError`) and what your logs see (`InternalError`), while automatically tagging everything with UUID v7 for instant log correlation.

## 📌 Table of Contents

- [Features](#-features)
- [Installation](#-installation)
- [Usage](#-usage)
- [API Reference](#-api-reference)
- [License](#-license)
- [Contact](#-contact)

## ✨ Features

- 🔍 **UUID v7 Tracking**: Every error gets a unique, time-sortable ID automatically.
- 🔒 **Security-First**: Native separation between client-safe messages and sensitive internal logs.
- 📅 **Built-in Context**: Timestamps and HTTP status codes are part of the instance.
- 📦 **Zero Dependencies**: Pure TypeScript, tiny footprint.

## 🔧 Installation

```bash
bun add @nowarajs/error
```

## ⚙️ Usage

### HttpError - Client-Facing Errors

Use this when you want to tell the user _why_ they failed (e.g., 400 Bad Request).

```ts
import { HttpError } from '@nowarajs/error';

throw new HttpError('Invalid email address', 'BAD_REQUEST', { field: 'email' });
```

### InternalError - Server-Side Errors

Use this to wrap unexpected failures (DB crashes, API timeouts). Log the full `cause` server-side, but only send the `uuid` to the client.

```ts
import { InternalError } from '@nowarajs/error';

try {
	await db.save(user);
} catch (err) {
	// The original 'err' is hidden from the client but kept in 'cause'
	throw new InternalError('Failed to persist user', err);
}
```

## 📚 API Reference

Full docs: [nowarajs.github.io/error](https://nowarajs.github.io/error/)

## ⚖️ License

MIT - Feel free to use it.

## 📧 Contact

- Mail: [nowarajs@pm.me](mailto:nowarajs@pm.me)
- GitHub: [NowaraJS](https://github.com/NowaraJS)
npm package: @nowarajs/singleton-manager
Description: Singleton Manager is a package that provides a simple way to manage singletons in your application. It allows you to create, retrieve, and manage singletons with ease and type safety.
Author: NowaraJS
Latest version: 1.4.2

# 🎯 NowaraJS - Singleton Manager

Managing singletons in TypeScript shouldn't require boilerplate everywhere. I built this package to have a single, centralized registry for all my singleton instances, no more scattered `getInstance()` patterns or global variables.

## Why this package?

The goal is simple: **One registry to rule them all.**

Instead of implementing the singleton pattern in every class, you register instances once and retrieve them anywhere. Type-safe, predictable, and easy to test.

## 📌 Table of Contents

- [Features](#-features)
- [Installation](#-installation)
- [Usage](#-usage)
- [API Reference](#-api-reference)
- [License](#-license)
- [Contact](#-contact)

## ✨ Features

- 🔒 **Type-Safe**: Full TypeScript support with generics, no `any` casting.
- 🎯 **Centralized**: One place to manage all your singletons.
- ⚡ **Lightweight**: Minimal overhead, zero dependencies.

## 🔧 Installation

```bash
bun add @nowarajs/singleton-manager @nowarajs/error
```

## ⚙️ Usage

### Registering Singletons

Register your instances once at startup. They'll be available everywhere.

```typescript
import { SingletonManager } from '@nowarajs/singleton-manager';

class DatabaseConnection {
	private _isConnected = false;

	public constructor() {
		console.log('Database connection created');
		this._isConnected = true;
	}

	public query(sql: string): string[] {
		return ['result1', 'result2'];
	}
}

class ApiClient {
	public constructor(
		private readonly _baseUrl: string,
		private readonly _apiKey: string
	) {}

	public get baseUrl(): string {
		return this._baseUrl;
	}
}

// Register with any constructor signature
SingletonManager.register('DatabaseConnection', new DatabaseConnection());
SingletonManager.register('ApiClient', new ApiClient('https://api.example.com', 'key'));
```

### Retrieving Instances

Same instance, every time. TypeScript knows the type.

```typescript
const db1 = SingletonManager.get<DatabaseConnection>('DatabaseConnection');
const db2 = SingletonManager.get<DatabaseConnection>('DatabaseConnection');

console.log(db1 === db2); // true — same reference

db1.query('SELECT * FROM users'); // ✅ Type-safe
```

### Checking & Unregistering

```typescript
if (SingletonManager.has('ApiClient')) {
	const client = SingletonManager.get<ApiClient>('ApiClient');
	console.log(client.baseUrl);
}

// Need to swap an instance? Unregister first.
SingletonManager.unregister('DatabaseConnection');
SingletonManager.register('DatabaseConnection', new DatabaseConnection());
```

## 📚 API Reference

Full docs: [nowarajs.github.io/singleton-manager](https://nowarajs.github.io/singleton-manager/)

## ⚖️ License

MIT — Feel free to use it.

## 📧 Contact

- Mail: [nowarajs@pm.me](mailto:nowarajs@pm.me)
- GitHub: [NowaraJS](https://github.com/NowaraJS)
npm package: @nowarajs/typed-event-emitter
Description: Typed Event Emitter is a TypeScript library that provides a strongly typed event emitter, allowing developers to define custom events with specific payloads, ensuring type safety and reducing runtime errors in event-driven applications.
Author: NowaraJS
Latest version: 1.1.28

# 🎯 NowaraJS Typed Event Emitter

Working with `EventEmitter` in TypeScript is painful. You get zero autocomplete, typos in event names fail silently, and your listeners accept `any` because the types don't flow through. I built this to fix that.

## Why this package?

The goal is simple: **Make event-driven code actually type-safe.**

This package wraps `EventEmitter` so that every event name and payload is validated at compile time. No more guessing, no more runtime surprises.

## 📌 Table of Contents

- [Features](#-features)
- [Installation](#-installation)
- [Usage](#-usage)
- [API Reference](#-api-reference)
- [License](#-license)
- [Contact](#-contact)

## ✨ Features

- 🔒 **Full Type Safety**: Event names and payloads are checked at compile time.
- 🧩 **Generic Design**: Define your own event maps for any use case.
- 🔄 **Familiar API**: Same `on`, `emit`, `once` you already know.
- 📦 **Zero Dependencies**: Pure TypeScript, nothing else.

## 🔧 Installation

```bash
bun add @nowarajs/typed-event-emitter
```

## ⚙️ Usage

### Basic Usage

Define an event map interface, then pass it to `TypedEventEmitter`. Everything flows from there.

```ts
import { TypedEventEmitter } from '@nowarajs/typed-event-emitter';

interface MyEvents {
	userLogin: [{ userId: string; timestamp: Date }];
	userLogout: [{ userId: string }];
	error: [Error];
}

const emitter = new TypedEventEmitter<MyEvents>();

// `payload` is inferred as { userId: string; timestamp: Date }
emitter.on('userLogin', (payload) => {
	console.log(`User ${payload.userId} logged in at ${payload.timestamp}`);
});

// TypeScript will yell if you pass the wrong shape
emitter.emit('userLogin', {
	userId: 'user123',
	timestamp: new Date()
});
```

### Multiple Parameters

Events can have multiple arguments, and each one is typed individually.

```ts
import { TypedEventEmitter } from '@nowarajs/typed-event-emitter';

interface Events {
	move: [x: number, y: number];
	click: [button: 'left' | 'right', x: number, y: number];
}

const input = new TypedEventEmitter<Events>();

// x and y are both numbers
input.on('move', (x, y) => {
	console.log(`Mouse moved to ${x}, ${y}`);
});

// button is 'left' | 'right', x and y are numbers
input.on('click', (button, x, y) => {
	console.log(`${button} click at ${x}, ${y}`);
});

input.emit('move', 100, 200);
input.emit('click', 'left', 50, 75);
```

## 📚 API Reference

Full docs: [nowarajs.github.io/typed-event-emitter](https://nowarajs.github.io/typed-event-emitter/)

## ⚖️ License

MIT - Feel free to use it.

## 📧 Contact

- Mail: [nowarajs@pm.me](mailto:nowarajs@pm.me)
- GitHub: [NowaraJS](https://github.com/NowaraJS)