open-index/open-npm huggingface dataset:
npm package: @o2s/framework
Description: Core O2S framework providing modules, SDK, and ApiConfig for building composable customer portals.
Latest version: 1.22.0

# @o2s/framework

Core O2S framework providing modules, SDK, and ApiConfig for building composable customer portals.

## Installation

```bash
npm install @o2s/framework
```

## Usage

### Modules

Import framework modules for domain services:

```typescript
import { Tickets, CMS, Users, Articles, Orders, Products } from '@o2s/framework/modules';

// Use in your services
class MyService {
    constructor(
        private readonly ticketsService: Tickets.Service,
        private readonly cmsService: CMS.Service,
    ) {}
}
```

### SDK

Use the SDK for type-safe API clients:

```typescript
import { getSdk } from '@o2s/framework/sdk';

const sdk = getSdk({ apiUrl: 'https://your-api-url.com' });

// Fetch data
const tickets = await sdk.tickets.getTickets({}, accessToken);
const invoices = await sdk.invoices.getInvoiceList({}, accessToken);
```

### ApiConfig

Define your API configuration:

```typescript
import { ApiConfig } from '@o2s/framework/modules';
import { Tickets, CMS } from '@o2s/configs.integrations';

export const AppConfig: ApiConfig = {
    integrations: {
        tickets: Tickets.TicketsIntegrationConfig,
        cms: CMS.CmsIntegrationConfig,
    },
};
```

## Available Modules

- `Tickets` - Ticket management
- `CMS` - Content management
- `Users` - User management
- `Articles` - Article management
- `Orders` - Order management
- `Products` - Product management
- `Carts` - Shopping cart
- `Customers` - Customer management
- `Payments` - Payment processing
- `Checkout` - Checkout flow
- `Invoices` - Invoice management
- `Notifications` - Notification management
- `Organizations` - Organization management
- `Resources` - Resource management
- `BillingAccounts` - Billing account management
- `Search` - Search functionality
- `Cache` - Caching
- `Auth` - Authentication

## Peer Dependencies

- `@nestjs/common` ^11
- `@nestjs/core` ^11
- `@nestjs/config` ^4.0.2
- `@nestjs/axios` ^4.0.1
- `rxjs` ^7

## Related Packages

- `@o2s/configs.integrations` - Integration configurations
- `@o2s/utils.logger` - Logging utilities
npm package: @o2s/modules.surveyjs
Description: A module that handles fetching, rendering ans submitting SurveyJS-based forms.
Latest version: 0.5.4

# @o2s/modules.surveyjs

A module that handles fetching, rendering and submitting SurveyJS-based forms.

## Installation

```bash
npm install @o2s/modules.surveyjs
```

## Usage

### Backend (API Harmonization)

Register the module in `app.module.ts`:

```typescript
import * as SurveyJs from '@o2s/modules.surveyjs/api-harmonization';
import { AppConfig } from './app.config';

@Module({
    imports: [
        SurveyJs.Module.register(AppConfig),
    ],
})
export class AppModule {}
```

### Frontend

Use the SurveyJS components:

```typescript
import { SurveyJsRenderer } from '@o2s/modules.surveyjs/frontend';

export const SurveyPage = async ({ surveyId }) => {
    return <SurveyJsRenderer surveyId={surveyId} />;
};
```

### SDK

The SDK exports a pre-configured instance (uses `NEXT_PUBLIC_API_URL` for the API base URL):

```typescript
import { sdk } from '@o2s/modules.surveyjs/sdk';

// Fetch survey (code is the survey identifier from CMS)
const survey = await sdk.modules.getSurvey({ code: surveyCode }, { 'x-locale': 'en' }, accessToken);

// Submit survey
await sdk.modules.submitSurvey(
    { code: surveyCode, surveyPayload: answers },
    { 'x-locale': 'en' },
    accessToken,
);
```

## Configuration

This module requires CMS integration to be configured in `AppConfig`:

```typescript
import { CMS } from '@o2s/configs.integrations';

export const AppConfig: ApiConfig = {
    integrations: {
        cms: CMS.CmsIntegrationConfig,
    },
};
```

## Related Packages

- `@o2s/blocks.surveyjs-form` - SurveyJS form block
- `@o2s/configs.integrations` - Integration configuration
- `survey-core` - SurveyJS core library
- `survey-react-ui` - SurveyJS React UI components
npm package: @o2s/telemetry
Description: Optional telemetry package for O2S CLI tools to collect anonymous usage data.
Latest version: 1.2.2

# @o2s/telemetry

Optional telemetry package for O2S CLI tools to collect anonymous usage data.

## Installation

```bash
npm install @o2s/telemetry
```

## Usage

### In CLI Tools

```typescript
import { sendEvent, flushEvents } from '@o2s/telemetry';

// Track events (appName, moduleName, eventName, optionalData)
await sendEvent('o2s', 'create-o2s-app', 'create-project');

// Flush events before process exit
await flushEvents();
```

### Opting Out

Users can opt out of telemetry by setting:

```bash
export TELEMETRY_DISABLED=true
```

## What Data Is Collected

- Command executed
- Command options/flags
- Error messages (anonymized)
- Execution time
- System information (OS, Node version)

## Privacy

- All data is anonymous
- No personal information is collected
- Data helps improve O2S tools
- Users can opt out at any time

## Related Packages

- `create-o2s-app` - Uses telemetry for usage tracking
npm package: @o2s/utils.api-harmonization
Description: Utility functions for O2S API Harmonization layer, including JWT and date helpers.
Latest version: 0.3.4

# @o2s/utils.api-harmonization

Utility functions for O2S API Harmonization layer, including JWT and date helpers.

## Installation

```bash
npm install @o2s/utils.api-harmonization
```

## Usage

### JWT Utilities

```typescript
import { Utils } from '@o2s/utils.api-harmonization';

// Decode JWT token (authorization header string)
const decoded = Utils.Auth.decodeToken(authorization);

// Extract user roles from decoded JWT
const roles = Utils.Auth.extractUserRolesFromJwt(decoded);
```

### Date Utilities

```typescript
import { Utils } from '@o2s/utils.api-harmonization';

// Format date relative to today (e.g. "2:30 PM Today", "Yesterday")
const formatted = Utils.Date.formatDateRelative(date, locale, todayLabel, yesterdayLabel, timezone);

// Format time
const time = Utils.Date.formatTime(date, locale, timezone);
```

## Peer Dependencies

- `jsonwebtoken` ^9.0.2
- `dayjs` ^1.11.13

## Related Packages

- `@o2s/framework` - Core framework
- `@o2s/utils.frontend` - Frontend utilities
npm package: @o2s/utils.frontend
Description: Utility functions for O2S frontend applications.
Latest version: 0.6.1

# @o2s/utils.frontend

Utility functions for O2S frontend applications, including JWT and date helpers.

## Installation

```bash
npm install @o2s/utils.frontend
```

## Peer Dependencies

- `jsonwebtoken` ^9.0.2
- `dayjs` ^1.11.13

## Related Packages

- `@o2s/framework` - Core framework
- `@o2s/utils.api-harmonization` - API harmonization utilities
npm package: @o2s/utils.logger
Description: Winston-based logging utility for O2S applications with NestJS integration.
Latest version: 1.2.3

# @o2s/utils.logger

Winston-based logging utility for O2S applications with NestJS integration.

## Installation

```bash
npm install @o2s/utils.logger
```

## Usage

### NestJS Integration

Register the logger module in your `app.module.ts`:

```typescript
import { LoggerModule } from '@o2s/utils.logger';

@Module({
    imports: [LoggerModule],
})
export class AppModule {}
```

### Using Logger Service

```typescript
import { LoggerService } from '@o2s/utils.logger';

@Injectable()
export class MyService {
    constructor(private readonly logger: LoggerService) {}

    doSomething() {
        this.logger.log('Info message');
        this.logger.warn('Warning message');
        this.logger.error('Error message', error);
    }
}
```

## Features

- Winston-based logging
- NestJS integration
- Structured logging
- Log levels (error, warn, info, debug)

## Peer Dependencies

- `@nestjs/common` ^11.0.16
- `@nestjs/core` ^11
- `@nestjs/config` ^4.0.2
- `@nestjs/axios` ^4.0.1
- `rxjs` ^7

## Related Packages

- `@o2s/framework` - Core framework
npm package: @o2team/gulp-prettier-eslint
Description: Create vinyl streams to pipe to prettier-eslint
Author: Chuyik
Latest version: 3.0.1

# Gulp Prettier Eslint [![Build Status](https://travis-ci.org/o2team/gulp-prettier-eslint.svg?branch=master)](https://travis-ci.org/o2team/gulp-prettier-eslint)

A [Gulp](http://gulpjs.com/) plugin which allows the users to use [prettier-eslint](https://github.com/prettier/prettier-eslint).

## Install

```
yarn add @o2team/gulp-prettier-eslint --dev
```

## Usage

Simply pipe the input, and pass in arguments that you would to the regular format function.

```js
const gulp = require('gulp');
const format = require('@o2team/gulp-prettier-eslint');

gulp.task('default', () => {
  return gulp.src('*.js')
    .pipe(format({ 
      eslintConfig: {
        parserOptions: {
          ecmaVersion: 7
        },
        rules: {
          semi: ["error", "never"]
        }
      },
      prettierOptions: {
        bracketSpacing: true
      },
      fallbackPrettierOptions: {
        singleQuote: false
      }
     }))
    .pipe(gulp.dest('./dist'));
});
```

## API

### format([formatOptions])

#### formatOptions

Type: `Object`

Consult the `prettier-eslint` [options](https://github.com/prettier/prettier-eslint#options).

# Donation

If you find this project useful, you can buy us a cup of coffee:    

<a href="https://www.paypal.me/chuyik" target="blank">
<img width="200" src="https://storage.360buyimg.com/mtd/home/donate_paypal_min1495016435786.png" alt="">
</a><br>     

<img width="650" src="https://storage.360buyimg.com/mtd/home/donate_cn1495017701926.png" alt="">

## Acknowledgements
We are grateful to the authors of existing related projects for their ideas and collaboration:

- [@bhargavrpatel](https://github.com/bhargavrpatel/gulp-prettier)

## Contributors
[![chuyik](https://avatars2.githubusercontent.com/u/6262943?v=3&s=120)](https://github.com/chuyik) |
:---:|
[chuyik](https://github.com/chuyik) |
npm package: @o2ter/lang-vector
Description: This package includes scripts to download the pre-trained model from huggingface, and convert the model to GGUF format as well.
Author: Susan Cheng
Latest version: 0.0.25

# How to start

This package includes scripts to download the pre-trained model from huggingface, and convert the model to GGUF format as well.

Therefore, you are required to install `huggingface-cli` and log in with a huggingface account.

## Huggingface

You can use homebrew to install the `huggingface-cli`:
```
brew install huggingface-cli
```

More info about `huggingface-cli`, you can visit the page: [https://huggingface.co/docs/huggingface_hub/guides/cli](https://huggingface.co/docs/huggingface_hub/guides/cli)

## Build models

To start building the models, run the following command:

```
yarn make_convertor  # Build the model convertor
yarn download  # Download models from huggingface
yarn convert  # Convert the models to GGUF format
```

## Startup test server

This project contains a simple chat server. You can test the model in local machine.

To begin with test server, you need to startup docker and run the follow script:

```
./scripts/test
```
npm package: @o3/async-utils
Description: A helpful assortment of async utility functions
Author: Flynn Buckingham
Latest version: 0.0.2

# async-utils

[![Build Status](https://travis-ci.org/flynnham/async-utils.svg?branch=master)](https://travis-ci.org/flynnham/async-utils)
[![dependencies Status](https://david-dm.org/flynnham/async-utils/status.svg)](https://david-dm.org/flynnham/async-utils)
[![devDependencies Status](https://david-dm.org/flynnham/async-utils/dev-status.svg)](https://david-dm.org/flynnham/async-utils?type=dev)

A bunch of miniature ES2015+ async helpers for remapping functions.

## Methods overview

| name | description |
|---|---|
| `isPromise(instance: any)` | Takes single value argument to check if the value either has a Promise constructor or has a valid `.then` function. |
| `buildAsyncParserResolver(method: Function, baseValue: Promise or any, args: Array)` | Execution handler for asynchronous data (used by `conditionalAsyncWrapper`) |
| `conditionalAsyncWrapper(method: Function) => (...args)` | Build a execution handler around a specified `method`, which executes based on the first argument provided. If a Promise is provided, the data flow will be paused until the first item in `args` has been resolved. Any `args` are also applied to the `method` when the first `args` value is ready. |
| `asyncFlowAdapter(flowUtility: Function) => (...fcns: [Function])` | Builds a asynchronous handler wrapper for a directional data flow utility (such as `_.flow`). Returns a `Function` that takes arguments of type `Function` <br><br> Note that an asynchronous `Promise` flow will only be built if at least **one** of the functions passed to flow returns a `Promise`, otherwise the flow will mimic the functionality of a synchronous data-flow. This is done by design <br><br> If any method invoked during the data flow throws, an `Error` instance is passed through the flow until it reaches the end resolve. If the flow fails, the first `Error` exception will be the only value returned. |
npm package: @o3/prop-types
Description: Vanilla oriented type checking library based on Facebook's prop-types.
Latest version: 0.0.2

# js-prop-types (experimental)

An environment agnostic reworking of
[Facebook's React prop-types](https://github.com/facebook/prop-types) implementation.

This package is intended to be used with  [@o3/typed](https://www.npmjs.com/package/@o3/typed), as a complementary abstract type
checking tool.

## What it does

This implementation allows type validation via thrown Type exceptions, which is
useful for type checking on primitive values outside of a React/Browser environment.

## Significant deviations from the original source

* Removed environment safe-guards to enable exception bubbling for type errors.

* Converted `type.isRequired` to `type.isOptional` to assume that all type
checks assume a value to be provided by default (and to throw if otherwise).

* Removal of unneeded React component support (since it's being used to validate
primitive values).

* [WIP] Replacement of ES5 compliant code and shims with their ES2015+ equivalents.

* Removal of unneeded files and old build process.