open-index/open-npm huggingface dataset:
npm package: @petrel-xf/comment
Description: comment
Latest version: 1.0.0

# petrel-xf/comment

> petrel-xf/comment

[TOC]

### 1.组件描述

petrel-xf/comment组件主要是提供批注功能，其中包括obv批注插件接口调用、批注持久化接口调用，以及相关的一些类和接口以供使用。

### 2.前置条件

本组件依赖 windows 上挂载的 EventBus 对象进行通讯。

### 3.安装组件

```bash
npm install --save @petrel-xf/comment
```

### 4.打包方式

打包

```json
"build": "tsc"
```

发布

```bash
npm publish:npmjs
```
npm package: @petrel-xf/server-sdk
Description: > petrel-xf/server-sdk
Latest version: 1.0.1

# petrel-xf/server-sdk

> petrel-xf/server-sdk

[TOC]

### 1.组件描述

本组件主要为sdk相关资源整合包，Server 的 sdk 的 JavaScript 实现，采用Typescript语言。

### 2.前置条件

本组件依赖 windows 上挂载的 EventBus 对象进行通讯。

### 3.安装组件

```bash
npm install --save @petrel-xf/server-sdk
```

### 4.参数及方法

| 参数 | 类型 | 说明 | 默认 |
| :--- | ---- | ---- | ---- |
|      |      |      |      |

### 5.使用方法

在需要的地方引入，使用即可。

```tsx
import { UploadService,MemberService } from '@petrel-xf/server-sdk';
......
const uploadBoxService = new UploadService(contextBoxBase);
public memberService = new MemberService(new ContextBase(config.BOX_SERVICE_HOST));
```

### 6.打包方式

打包

```json
"build": "tsc"
```

发布

```bash
npm publish
```
npm package: @petrel-xf/types
Description: 项目的 types 整合包
Latest version: 1.0.0

# petrel-xf/types

> petrel-xf/types

[TOC]

### 1.组件描述

本组件为项目的 types 整合包，包括 enum 和 model 等，采用 Typescript 语言。

### 2.前置条件

本组件依赖 windows 上挂载的 EventBus 对象进行通讯。

### 3.安装组件

```bash
npm install --save @petrel-xf/types
```

### 4.参数及方法

| 参数                                                              |
| :---------------------------------------------------------------- |
| **enum**                                                          |
| ExtendedAttribute、ExtendedAttributeShow、ExtendOptionValue...... |
| **model**                                                         |
| AccountSpecModel、AccountInfoModel、AccountStateModel......       |
| **sdk-model**                                                     |
| AccountModel、AccountProfileModel、AccountConfigModel......       |

### 5.使用方法

直接在需要使用的地方 import 引入需要的 enum 或 model 即可。

```tsx
import {
    EnvInfoStateModel,
    EnvStateEnum,
    EnvProductEnum,
    AccountStateModel,
    UploadModelForStore,
} from '@petrel-xf/types';
...
@Getter('activeAccount') public activeAccount: AccountStateModel;
@Getter('uploads') uploads: UploadModelForStore;
...
envInfo.activationState !== EnvStateEnum.ACTIVATED
```

注意：

-   从服务器直接返回的模型应存储在 sdk-model 下，若发现之前的 model 存储位置不正确，可以移动到正确的目录下。
-   sdk-model 下的 model 不应存在可选字段。
-   model 下存储的 model 是各项目使用的模型，有些模型扩展自服务器返回的模型。
-   在修改模型时，要注意修改涉及的范围、是否对其他项目有影响、如果有怎么解决等问题。
-   如果不能确定某个字段修改后的影响，建议先将其标注为可选字段。

### 6.打包方式

打包

```json
"build": "webpack --config webpack.config.js"
```

发布

```bash
npm publish:npmjs
```
npm package: @petretiandrea/n8n-nodes-codex
Description: n8n community node for OpenAI Codex via ChatGPT subscription device-code auth
Author: Andrea Petreti
Latest version: 0.1.1-2

# n8n Codex Community Node

Community node package for using OpenAI Codex in n8n through the ChatGPT subscription device-code flow.

## MVP scope

- Self-hosted n8n only
- Device-code bootstrap helper
- `Codex Chat Model` AI root node
- Text generation with optional streaming
- Runtime access-token refresh using the stored refresh token bundle

## Important caveat

This package talks to the internal Codex backend currently exposed at `https://chatgpt.com/backend-api/codex/responses`. It is not the public OpenAI API and may change without notice.

## Authentication

The current n8n credential UI does not provide a first-class interactive device-code login flow for community nodes, so this package ships a helper CLI:

```bash
npx --package @petretiandrea/n8n-nodes-codex codex-device-login
```

Run it, complete authorization in the browser, then paste the returned values into the `Codex Device Auth API` credential.

## Publishing

This package supports both the official `n8n-node release` flow and GitHub Actions publishing.

### First local release

For the first publish, the simplest path is:

```bash
npm login
npm run release
```

`n8n-node release` uses `release-it` to run lint and build checks, update the changelog, create git tags, create a GitHub release, and publish the package to npm.

Before running it, make sure the repository has a valid GitHub remote configured and that you have publish access to the `@petretiandrea/n8n-nodes-codex` package on npm.

### GitHub Actions publish

1. Push the repository to GitHub.
2. In GitHub repository settings, add the `NPM_TOKEN` secret with an npm automation token that has publish access for `@petretiandrea/n8n-nodes-codex`.
3. Create a GitHub release or push a version tag like `v0.1.0`.
4. The workflow at `.github/workflows/publish.yml` will run tests, build the package, and publish it to npm.

After publishing, users can install the package in self-hosted n8n and run:

```bash
npx --package @petretiandrea/n8n-nodes-codex codex-device-login
```

to bootstrap the credential values.

## Known limitations

- No tool calling yet
- No multimodal support yet
- No n8n Cloud target yet
- Refresh tokens are reused at runtime, but if the backend rotates them you may need to run the bootstrap helper again
npm package: @petrhdk/rpc
Description: ```console npm install @petrhdk/rpc ```
Latest version: 2.0.1

# Installation
```console
npm install @petrhdk/rpc
```

<br><br>

# Usage
```ts
// declare type utils
// ---------------------------------------------------------
interface MyServerContext {
  user: string,
}

// define routes/procedures
// ---------------------------------------------------------
const procedure = rpc.procedure
  .initialContext<MyServerContext>()
  .use(({ user }) => ({ user, abc: 123 }))
  .use((previousContext) => ({ ...previousContext, xyz: 456 }))
  .input(z.string())
  .define((input: string, context) => {
    console.log({ context, input });
    return 123;
  });

const server = rpc.server
  .initialContext<MyServerContext>()
  .routes({
    call: {
      me: {
        maybe: procedure,
      },
    },
  });
export type MyServer = typeof server;

// test route invocation
// ---------------------------------------------------------
server.invokeRoute(
  {
    path: ['call', 'me', 'maybe'],
    input: 'asdf',
  },
  { user: 'ye' },
);

// create HTTP server (which forwards to RPC server)
// ---------------------------------------------------------
http.createServer(async (request, response) => {
  if (request.method === 'POST' && request.url!.startsWith('/rpc/')) {
    const serverToClientPayload = await server.invokeRoute(
      {
        path: request.url!.replace(/^\/rpc\//, '').split('/'),
        input: JSON.parse(await readBodyAsString(request)),
      },
      { user: 'ye' },
    );
    response.writeHead(200);
    response.end(JSON.stringify(serverToClientPayload));
  }
}).listen(3000);

// create RPC client (which talks to server via HTTP)
// ---------------------------------------------------------
const client = rpc.createClient<MyServer>(async (clientToServerPayload) => {
  const httpResponse = await fetch(
    `https://example.com/rpc/${clientToServerPayload.path.join('/')}`,
    {
      method: 'POST',
      body: JSON.stringify(clientToServerPayload.input),
    },
  );
  return await httpResponse.json() as ServerToClientPayload;
});

// test the client
// ---------------------------------------------------------
client.call.me.maybe('asdf');
```
(source: [`src/_example.ts`](src/_example.ts))

<br><br>

# Query builder
![](docs/procedure-builder.drawio.svg)

<br><br>

# Server builder
![](docs/server-builder.drawio.svg)
npm package: @petrican/fullcalendar-react
Description: Fork - An official FullCalendar component for React
Latest version: 5.6.1


# FullCalendar React Component [![Build Status](https://travis-ci.com/fullcalendar/fullcalendar-react.svg?branch=master)](https://travis-ci.com/fullcalendar/fullcalendar-react)

An official FullCalendar component for React.

This is more than a mere "connector". It tells the core FullCalendar package to begin rendering with **React** virtual DOM nodes as opposed to the [Preact](https://preactjs.com/) nodes it normally uses, transforming FullCalendar into a "real" React component. You can learn a bit more [from this blog post](https://fullcalendar.io/blog/2020/05/react-ts-v5-beta) (more info to come).

- [FullCalendar React Component Docs](https://fullcalendar.io/docs/react)
- [Example Project](https://github.com/fullcalendar/fullcalendar-example-projects/tree/master/react)
- [Example Project with TypeScript](https://github.com/fullcalendar/fullcalendar-example-projects/tree/master/react-typescript)
- [Contributor Guide](CONTRIBUTORS.md)
npm package: @petrican/react-interpolate-component
Description: Fork - A component for React that renders elements into a format string containing replacement fields
Author: Martin Andert
Latest version: 0.12.1

# React Interpolate Component

A component for [React][1] that renders elements into a format string containing replacement fields. It comes in handy when working with dynamic text elements like localized strings of a translation library.


## Installation

Install via npm:

```bash
% npm install react-interpolate-component
```


## Usage

The Interpolate component expects as only child a format string containing the placeholders to be interpolated. Like the format syntax of `sprintf` with named arguments, a placeholder is depicted as `'%(' + placeholder_name + ')s'`.

The actual substitution elements are provided via the `with` prop. Values can be strings, numbers, dates, and even React components.

Here is a small exemplification:

```jsx
var React       = require('react');
var Interpolate = require('react-interpolate-component');

class MyApp extends React.Component {
  render() {
    const props = {
      with: {
        firstName: <strong>Paul</strong>,
        age: 13,
        unit: 'years'
      },
      component: 'p',  // default is a <span>
      className: 'foo'
    };

    return (
      <div>
        <Interpolate {...props}>
          %(firstName)s is %(age)s %(unit)s old.
        </Interpolate>
      </div>
    );
  }
}
```

The MyApp component shown above renders the following (simplified) HTML:

```html
<div>
  <p class="foo">
    <strong>Paul</strong> is 13 years old.
  </p>
</div>
```

All props that are not interpolation arguments get transferred to Interpolate's container component (which is a `<span>` by default).

Alternatively to providing the format string as child, you can also set the `format` prop to the desired format:

```html
<Interpolate with={{ name: "Martin" }} format="Hello, %(name)s!" />
```

For security reasons, all HTML markup present in the format string will be escaped. You can undermine this by providing a prop named "unsafe" which is set to `true`. There's one caveat when allowing unsafe format strings: You cannot use other React components as interpolation values.


## Example

The examples code is located at `example` directory. You can clone this repository and run `make install example` and point your web browser to
`http://localhost:3000`.


## Contributing

Here's a quick guide:

1. Fork the repo and `make install`.

2. Run the tests. We only take pull requests with passing tests, and it's great to know that you have a clean slate: `make test`.

3. Add a test for your change. Only refactoring and documentation changes require no new tests. If you are adding functionality or are fixing a bug, we need a test!

4. Make the test pass.

5. Push to your fork and submit a pull request.


## Licence

Released under The MIT License.



[1]: http://facebook.github.io/react/