open-index/open-npm huggingface dataset:
npm package: @karabur/react-scripts
Description: Configuration and scripts for Create React App.
Latest version: 4.0.4-alpha.9

# react-scripts

This package includes scripts and configuration used by [Create React App](https://github.com/facebook/create-react-app).<br>
Please refer to its documentation:

- [Getting Started](https://facebook.github.io/create-react-app/docs/getting-started) – How to create a new app.
- [User Guide](https://facebook.github.io/create-react-app/) – How to develop apps bootstrapped with Create React App.
npm package: @karacas/kaysh
Description: In-memory caching with support for RxJs observables, native promises, functions & methods. Optional localStorage.
Author: karacas
Latest version: 0.2.2

# Kaysh

## In-memory caching with support for RxJs observables, native promises, functions & methods. Optional localStorage.

<br />
<br />

### <b>Config</b>

```typescript
const optional_config = {
  localStorage: true  /* Uses localStorage / Promises and RxJs automatically save a resolved value | dafault:false */,
  maxItems: 10        /* Maximum values cached per function/args | dafault:10 */,
  maxTime: 5 * 1000   /* Maximum time of the cached value in milliseconds | dafault:0(infinite) */,
};
```

<br />
<br />

### <b>RxJs cache operator</b>

```typescript
import { kayshOperator, kayshFlushOperator } from '@karacas/kaysh';

const getObservable = (payLoad?) => {
  return of(Math.random() + JSON.stringify(payLoad))
          .pipe(kayshOperator('getObservable', payLoad, optional_config));
};

const flushObservableValue = (payLoad?) => kayshFlushOperator('getObservable', payLoad);
const flushObservable = () => kayshFlushOperator('getObservable');
```

> Expects

```typescript
test('TestObserbable Operator', async function() {
  let value1 = await getObservable([1, 2]).toPromise();
  let value2 = await getObservable([1, 2]).toPromise();

  expect(value1).toBe(value2);

  flushObservableValue([1, 2]); // or flushObservable() for all values

  let value3 = await getObservable([1, 2]).toPromise();
  expect(value3).not.toBe(value1);
});
```

<br />
<br />

### <b>Memoize a function</b>

```typescript
function testFunction(val) {
  return String(Math.random()) + JSON.stringify(val);
}

const testFunctionMem = kayshMemFunction(testFunction, optional_config);
const flush = kayshFlushMemFunction(testFunction);
```

> Expects

```typescript
test('Test Simple function', function() {
  let value1 = testFunctionMem({ test: [1] });
  let value2 = testFunctionMem({ test: [1] });

  expect(value1).toBe(value2);

  flush({ test: [1] }); // or flush() for all values

  let value3 = testFunctionMem({ test: [1] });
  expect(value3).not.toBe(value1);
});
```

<br />
<br />

### <b>Memoize a Class method</b>

```typescript
import { kayshMemFunction, kayshFlushMemFunction, kayshDecorator } from '@karacas/kaysh';

class CacheTestClass {
  //Normal

  funcTest(v = 100) {
    return 1 + v;
  }

  funcTestMemo = kayshMemFunction(this.funcTest);
  flushFuncTestMemo = kayshFlushMemFunction(this.funcTest);
}
```

> Or

```typescript
class CacheClassExampleWithDecorator {
  //Decorator

  @kayshDecorator(kayshOptions)
  testDecorated(v = 100) {
    return 1 + v;
  }

  flushTestDecorated = kayshFlushMemFunction(this.testDecorated);
}
```
npm package: @karafra/nestjs-amqp
Description: Minimal AMQP client for NestJS
Author: Karafra
Latest version: 1.1.0

# @karafra/nestjs-amqp

## Install

```bash
npm i @karafra/nestjs-amqp
```

## Configuration in the root module
### with forRoot

```ts
import { Module } from '@nestjs/common';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { AmqpModule } from '@karafra/nestjs-amqp';
import { amqpConfig } from './configurations/redis.config';

@Module({
  imports: [
    AmqpModule.forRoot({
      url: 'amqp://localhost:6379',
    }),
  ],
  controllers: [AppController],
  providers: [AppService],
})
export class AppModule {}
```

### with forRootAsync

```ts
import { Module } from '@nestjs/common';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { AmqpModule } from '@karafra/nestjs-amqp';
import { ConfigModule, ConfigService } from '@nestjs/config';
import { amqpConfig } from './configurations/redis.config';

@Module({
  imports: [
    ConfigModule.forRoot({
      load: [redisConfig],
    }),
    AmqpModule.forRootAsync({
      useFactory: async (configService) => configService.get('amqp'), 
      inject: [ConfigService]
    }),
  ],
  controllers: [AppController],
  providers: [AppService],
})
export class AppModule {}
```

## Usage

This package is globally providing `AMQP_CLIENT`

```ts
import { Injectable } from '@nestjs/common';
import { InjectAmqpClient, AmqpClient } from '@karafra/nestjs-amqp';

@Injectable()
export class SomeService {
  constructor(
    @InjectRedisClient() redisClient: AmqpClient
  ) {}
}
```
npm package: @karage-pos/api-client
Description: TypeScript API client for Garage POS
Author: Garage POS
Latest version: 1.0.0

# @garage-pos/api-client

TypeScript API client for Garage POS, automatically generated from OpenAPI specifications.

## Installation

### From GitHub Packages

```bash
npm install @garage-pos/api-client
```

### Configuration

For GitHub Packages, add `.npmrc` to your project:

```
@garage-pos:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}
```

## Usage

```typescript
import { client } from '@garage-pos/api-client';

// Configure the client
client.setConfig({
  baseUrl: 'https://api.garage-pos.com',
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
  },
});

// Use the generated services
import { SomeService } from '@garage-pos/api-client';

const result = await SomeService.someMethod();
```

## Development

### Prerequisites

- Node.js 20+
- npm or yarn

### Setup

```bash
# Install dependencies
npm install

# Download OpenAPI spec (update URL as needed)
curl -L -o openapi.json https://your-backend-url/openapi.json

# Generate TypeScript client
npm run openapi-ts

# Build the package
npm run build
```

### Scripts

- `npm run openapi-ts` - Generate TypeScript client from OpenAPI spec
- `npm run build` - Build the package
- `npm run clean` - Clean generated files and build output

## Automatic Updates

This package is automatically updated when the OpenAPI specification changes in the backend repository. The GitHub Actions workflow:

1. Monitors for OpenAPI spec updates via repository dispatch events
2. Downloads the latest OpenAPI specification
3. Generates the TypeScript client
4. Automatically versions the package using semantic-release
5. Publishes to GitHub Packages

## Publishing

Publishing is handled automatically by GitHub Actions. To trigger a new release:

1. **Automatic**: Backend repository dispatches an event when OpenAPI spec changes
2. **Manual**: Run the workflow manually from GitHub Actions tab

## License

MIT

## Support

For issues and questions, please open an issue in the [GitHub repository](https://github.com/garage-pos/api-client/issues).