open-index/open-npm huggingface dataset:
npm package: @pubm-test/cross-names-npm
Description: pubm example: a single package with different names on npm and jsr.
Latest version: 0.0.1-e2e.20260408140857

# example-cross-registry-names

pubm example: a single package with different names on npm and jsr.

- npm: `@pubm-test/cross-names-npm`
- jsr: `@syi0808/pubm-test-cross-names-jsr`

pubm handles version synchronization across both registries despite different package names.
npm package: @pubm-test/multi-registry
Description: pubm example: publishing a single package to both npm and jsr simultaneously.
Latest version: 0.0.1-e2e.20260407152538

# example-multi-registry

pubm example: publishing a single package to both npm and jsr simultaneously.

## Configuration

See [pubm.config.ts](./pubm.config.ts) for the configuration. Key setting: `registries: ["npm", "jsr"]`.
npm package: @pubm-test/with-plugins
Description: pubm example: single package using `@pubm/plugin-brew` and `@pubm/plugin-external-version-sync`.
Latest version: 0.0.1-e2e.20260407160205

# example-with-plugins

pubm example: single package using `@pubm/plugin-brew` and `@pubm/plugin-external-version-sync`.

## Configuration

See [pubm.config.ts](./pubm.config.ts) for the configuration.
npm package: @puborg/section-input
Description: Webcomponent section-input following open-wc recommendations
Author: hayden dekker
Latest version: 0.0.5

# \<section-input>

This webcomponent follows the [open-wc](https://github.com/open-wc/open-wc) recommendation.

## Installation
```bash
npm i section-input
```

## Usage
```html
<script type="module">
  import 'section-input/section-input.js';
</script>

<section-input></section-input>
```

## Linting with ESLint, Prettier, and Types
To scan the project for linting errors, run
```bash
npm run lint
```

You can lint with ESLint and Prettier individually as well
```bash
npm run lint:eslint
```
```bash
npm run lint:prettier
```

To automatically fix many linting errors, run
```bash
npm run format
```

You can format using ESLint and Prettier individually as well
```bash
npm run format:eslint
```
```bash
npm run format:prettier
```

## Testing with Web Test Runner
To run the suite of Web Test Runner tests, run
```bash
npm run test
```

To run the tests in watch mode (for <abbr title="test driven development">TDD</abbr>, for example), run

```bash
npm run test:watch
```

## Demoing with Storybook
To run a local instance of Storybook for your component, run
```bash
npm run storybook
```

To build a production version of Storybook, run
```bash
npm run storybook:build
```


## Tooling configs

For most of the tools, the configuration is in the `package.json` to reduce the amount of files in your project.

If you customize the configuration a lot, you can consider moving them to individual files.

## Local Demo with `web-dev-server`
```bash
npm start
```
To run a local development server that serves the basic demo located in `demo/index.html`
npm package: @pubpub/deposit-utils
Description: Deposit works to digital object repositories like Crossref and Datacite using statically-typed primitives that are validated against official XSD schemas.
Author: PubPub Team
Latest version: 0.1.10

# deposit-utils

Deposit works to digital object repositories like Crossref and Datacite using statically-typed primitives that are validated against official XSD schemas.

## Getting Started

Deposits for each supported registry (Crossref or Datacite) can be defined in one of three ways: JSX, Hyperscript, or plain JavaScript objects.

### JSX

Update your tsconfig.json to translate JSX syntax to function calls:

```json
{
  "compilerOptions": {
    "jsx": "react",
    "jsxFactory": "x",
    "jsxFragmentFactory": "null"
  }
}
```

```tsx
import { x, renderXml } from "@pubpub/deposit-utils/datacite";

const depositXml = renderXml(
  <resource>
    <titles>
      <title xml:lang="en-US">deposit-utils XML Example</title>
    </titles>
    {/*...*/}
  </resource>
);
```

### Hyperscript

```ts
import { x, renderXml } from "@pubpub/deposit-utils/datacite";

const depositXml = renderXml(
  x("resource", [
    x("titles", [
      x("title", { "xml:lang": "en-US" }, "deposit-utils XML Example"),
    ]),
  ])
);
```

### Plain objects ([xast](https://github.com/syntax-tree/xast) AST):

```ts
import { renderXml } from "@pubpub/deposit-utils/datacite";

const xml = renderXml({
  type: "element",
  name: "resource",
  children: [
    {
      type: "element",
      name: "titles",
      children: [
        {
          type: "element",
          name: "title",
          attributes: { "xml:lang": "en-US" },
          children: ["deposit-utils XML Example"],
        },
      ],
    },
  ],
});
```

### Development

Fetch XSD and generate TypeScript types:

```sh
npm run gen
```
npm package: @pubscriber/ngx-masonry
Description: Angular Module for displaying a feed of items in a masonry layout using https://github.com/desandro/masonry
Author: pubscriber
Latest version: 1.0.0

# NgxMasonry

This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 16.2.0.

## Code scaffolding

Run `ng generate component component-name --project ngx-masonry` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project ngx-masonry`.
> Note: Don't forget to add `--project ngx-masonry` or else it will be added to the default project in your `angular.json` file. 

## Build

Run `ng build ngx-masonry` to build the project. The build artifacts will be stored in the `dist/` directory.

## Publishing

After building your library with `ng build ngx-masonry`, go to the dist folder `cd dist/ngx-masonry` and run `npm publish`.

## Running unit tests

Run `ng test ngx-masonry` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
npm package: @pubsub-a/interfaces
Description: PubSub/A standard proposal interface definition
Latest version: 0.7.7

# README

PubSub/A is an interface for libraries implementing the [Publish/Subscribe][pubsub-pattern]
pattern (also often referred to as Observer pattern). The aim of PubSub/A is to provide a unified,
asynchronous common API for pubsub (similiar to the Promise/A proposal that defined a unified API
for promises).

PubSub/A uses the so-called _topic-based Publish/Subscribe_ with the additional concept of
_channels_ for grouping together topics.

A [reference implementation written in TypeScript (but usable from plain JavaScript) is available
here][reference-implementation].

## Quick syntax overview

### Topic based

```javascript
const pubsub = new PubSubImplementation();

// channels are initialized asynchronously, provide a way to namespace topics
pubsub.channel('mychannel').then(channel => {

    // subscribe
    channel.subscribe('myTopic', arg => {
        console.log('I received a notification: ' + arg.message);
    })M

    // publish - you can pass any custom object as argument
    channel.publish('myTopic', { message: 'Hello world!' });
});
```

## Specification

The specification is included in the [SPECIFICIATION.md file](SPECIFICATION.md). The interface
definitions in this project are written as TypeScript interfaces to provide a statically typed API
for better understanding. As this project only includes interfaces and not actual implementations,
the resulting output from the TypeScript compiler is an empty JavaScript file.

## Implementations

-   [pubsub-micro] - A reference implementation written in TypeScript but usable from any JavaScript
    project

[pubsub-pattern]: https://en.wikipedia.org/wiki/Publish–subscribe_pattern
[reference-implementation]: https://github.com/pubsub-a/micro
[pubsub-micro]: https://github.com/pubsub-a/micro

## Test suite

An [official test suite](https://github.com/pubsub-a/tests) is available to test your
implementation for validity.

## License

MIT.
npm package: @pubsub-a/micro
Description: Reference in-memory PubSub/A implementation
Latest version: 0.9.6

PubSub/A Reference Implementation
=================================

This is the reference implementation of the [PubSub/A interface proposal][pubsub-interfaces]. The
implementation is written in TypeScript but can be consumed from any JavaScript code.

While PubSub/A is designed to work over the network, this reference implementation only works
locally. Subscriptions are only share among the same instance of the PubSubMicro instance.


```javascript
import { PubSubMicro as PubSub } from "@pubsub-a/micro"

const pubsub = new PubSub();
pubsub.start()
    .then(function() {
        return pubsub.channel('myChannel');
    }).then(function(channel) {
        channel.subscribe('myTopic', function(arg) {
            console.log('received arg: ', arg);
        });
        channel.publish('myTopic', { foo: 'bar' });
    });
});
```

See the [PubSub/A interface definition][pubsub-interfaces] for in-depth syntax overview.

  [pubsub-interfaces]: https://github.com/pubsub-a/interfaces
npm package: @pubsuber/core
Description: The core module of pubsuber
Author: TY
Latest version: 0.2.1

# @pubsuber/core

> The core module of pubsuber

```
$ npm install @pubsuber/core
```

## Usage

**NOTE: until version `1.0.0` the API may change!**

```ts
import {Client} from '@pubsuber/core';
import {MqttAdapter} from '@pubsuber/mqtt';

// two clients connecting to the same broker
const siskel = new Client({url: 'mqtt://my.message-broker.com:3000'}, MqttAdapter);
const ebert = new Client({url: 'mqtt://my.message-broker.com:3000'}, MqttAdapter);

siskel.subscribe('movies');
siskel.on('message', function (topic, msg) {
  console.log(topic, msg.toString()); // => movies birdman
});

ebert.publish('movies', 'birdman');
```

## Client (pubsuber)

The `Client` class provides a unified pubsub client in Node.js and browsers. It supports subscribing to topics or topic
patterns (topics and wildcards). Clients can connect to brokers or bridges that support the `client.adapter`’s protocol.

## Adapter

Client adapters implement the `Client` API in a broker protocol-specific way.

Specify the adapter specific options using the name as the key.

```js
{
  mqtt: {
    clientId: 'foobar';
  }
}
```

### Protocols

`pubsuber` supports these two protocols:

- [MQTT](http://mqtt.org/)
- [STOMP](https://stomp.github.io/)

It is possible to extend **pubsuber** to support other protocols, but that is beyond the scope of this README.

## Modules / Plugins

- @pubsuber/bridge - TBD
- [@pubsuber/redis](https://github.com/betaly/pubsuber/tree/master/packages/redis) - **Redis** `Adapter` for pubsuber
- @pubsuber/mqtt - TBD
- @pubsuber/connection-mqtt - TBD
npm package: @pubsuber/redis
Description: The redis adapter for pubsuber
Author: TY
Latest version: 0.2.1

# strong-pubsub-redis

\*\*[Redis](http://redis.io/) `Adapter` for pubsuber

## Installation

```
$ npm install @pubsuber/redis
```

## Usage

```ts
import {Client} from '@pubsuber/core';
import {RedisAdapter} from '@pubsuber/redis';

const client = new Client({url: 'redis://my.message-broker.com:3000'}, RedisAdapter);

client.publish('my topic', 'my message');
```
npm package: @pubsuber/testlab
Description: This module is a set of utilities for testing other **pubsuber** modules.
Author: TY
Latest version: 0.2.0

# @pubsuber/testlab

> This module is a set of utilities for testing other **pubsuber** modules.

## Testing a Client Adapter API

```ts
import {defineClientTests, usingMosquitto} from '@pubsuber/testlab';
import {Client} from '@pubsuber/core';
import {ChildProcess} from 'child_process';

import {MqttAdapter} from '<SomePath>';

describe('MQTT', function () {
  let port: number;
  let process: ChildProcess;
  beforeEach(async () => {
    [port, process] = await usingMosquitto();
  });

  afterEach(() => {
    process.kill();
  });

  defineClientTests(Client, MqttAdapter, () => port);
});
```

## Testing a Client Adapter Behavior

```ts
import {defineClientBehaviorTests, usingMosquitto} from '@pubsuber/testlab';
import {Client} from '@pubsuber/core';
import {ChildProcess} from 'child_process';

import {MqttAdapter} from '<SomePath>';

describe('MQTT', function () {
  let port: number;
  let process: ChildProcess;
  beforeEach(async () => {
    [port, process] = await usingMosquitto();
  });

  afterEach(() => {
    process.kill();
  });

  defineClientBehaviorTests(Client, MqttAdapter, () => port);
});
```
npm package: @pubsweet/component-aws-ses
Description: aws ses configured for pubsweet
Author: Collaborative Knowledge Foundation
Latest version: 0.1.0

# AWS SES Configuration

In order to use this component, the following configuration needs to be added to a PubSweet application inside a section named `pubsweet-component-aws-ses`:

* `secretAccessKey`: the `AWS_SES_SECRET_KEY` value from the app's `.env` file
* `accessKeyId`: the `AWS_SES_ACCESS_KEY` value from the app's `.env` file
* `region`: the `AWS_SES_REGION` value from the app's `.env` file
* `sender`: the `EMAIL_SENDER` value from the app's `.env` file

For example:

```json
"pubsweet-component-aws-ses": {
    "secretAccessKey": "process.env.AWS_SES_SECRET_KEY",
    "accessKeyId": "process.env.AWS_SES_ACCESS_KEY",
    "region": "process.env.AWS_SES_REGION",
    "sender": "process.env.EMAIL_SENDER",
  },
```

In order to use `component-aws-ses` you first need to have a `.env` file containing AWS data in the root folder of the starting point of your application.

The `.env` file contain the following data:

```bash
AWS_SES_SECRET_KEY = <secretKey>
AWS_SES_ACCESS_KEY = <accessKey>
EMAIL_SENDER = verified_ses_sender@domain.com
AWS_SES_REGION = region-name
```

Then, as soon as possible in your app you should add the `dotenv` package:

```js
require('dotenv').config()
```

# `component-aws-ses` API

A list of endpoints that help you upload, download and delete S3 files.

## Send an email [POST]

#### Request

`POST /api/email`

#### Request body

All parameters are `required`

```json
{
  "email": "to_email@domain.com",
  "subject": "Example subject",
  "textBody": "this is an email",
  "htmlBody": "<p><b>This</b> is an <i>email</i>"
}
```

#### Response

```json
HTTP/1.1 204
```
npm package: @pubsweet/component-send-email
Description: send email configured for pubsweet
Author: Collaborative Knowledge Foundation
Latest version: 0.4.18

# Send Email

## Configuration

In order to configure this component, simply add the path to your `mailer` configuration in your app's `config` file. For example:

```js static
  mailer: {
    path: `${__dirname}/mailer`,
  },
```

In this case, `mailer.js` creates a new `AWS.SES` object which will be used to send emails:

```js static
const AWS = require('aws-sdk')
const config = require('config')

module.exports = {
  transport: {
    SES: new AWS.SES({
      accessKeyId: config.SES.accessKey,
      secretAccessKey: config.SES.secretKey,
      region: config.SES.region,
    }),
  },
}
```

If you plan on using environment variables for your AWS account, you need to create a `config/custom-environment-variables.json` file with the following content:

```json
{
  "SES": {
    "accessKey": "AWS_SES_ACCESS_KEY",
    "secretKey": "AWS_SES_SECRET_KEY",
    "region": "AWS_SES_REGION"
  }
}
```

## Usage

The `send-email` component contains a `send()` function which takes a single `mailData` object which needs to contain at least the following properties: `from`, `to`, `cc`, `bcc`, `subject`, `text`, `html`.  
It returns the resulting information provided by nodemailer. In most cases, you can just ignore it.

```js static
const Email = require('@pubsweet/component-send-email')
const config = require('config')

module.exports = {
  setupEmail: async toEmail => {
    const mailData = {
      from: config.get('mailer.from'),
      to: toEmail,
      cc: ccEmail,
      bcc: bccEmail,
      subject: 'You have been invited!',
      text: 'This is an email',
      html: '<p>This is an email</p>',
    }
    return Email.send(mailData)
  },
}
```
npm package: @pubsweet/db-manager
Description: Provides database management utilities to Pubsweet apps.
Author: Samuel Galson
Latest version: 3.1.26

Provides database management utilities to Pubsweet apps.

### Usage

This package exports the following functions:

- `setupDb`
- `addUser`
- `dbExists`
- `migrate`

#### `setupDb`

This function

- creates the database
- adds an admin user
- generates a secret in `config/local-<NODE_ENV>.json` under `pubsweet-server.secret`.

It can be called without arguments, in which case it will take its configuration from the following config keys:

```js static
{
  'pubsweet-server': {
    db: {
      //  takes the same configuration options as https://node-postgres.com/features/connecting#programmatic
    }
  },
  dbManager: {
    username: 'xxxxxx',
    password: 'pppppp',
    email: 'email@example.com',
    clobber: false // overwrite existing db (optional)
  }
}
```

Alternatively it can be passed the `dbManager` object as an argument, which will override the values on config.

The name of the database will be the full `dbPath`.

#### `addUser`

This function adds a user to an already existing database. It requires a user object as argument:

```js static
addUser({
  username: 'xxxxxx',
  password: 'pppppp',
  email: 'email@example.com',
  admin: true, // (optional)
})
```

#### `dbExists`

This function checks if any database exists at the configured path. Returns `true` or `false`

#### `migrate`

This function performs pending migrations.
npm package: @pubsweet/job-xsweet
Description: PubSweet job component for running XSweet
Author: Adam Hyde
Latest version: 2.2.4

# XSweet job component

WARNING: This is an early version, please test and report any issues.

This is a component that uses PubSweet's internal job queue to provide XSweet conversions to PubSweet applications.

# Usage

Once specified in your app's components config by adding '@pubsweet/job-xsweet' adds:

## A `/convertDocxToHTML` endpoint

That takes a `docx` file formdata input, with e.g. something like a

```static
curl -X POST \
  'http://localhost:3000/convertDocxToHTML?=' \
  -H 'cache-control: no-cache' \
  -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
  -F docx=@/home/pubsweet/components/server/job-xsweet/src/test.docx
```

This publishes a job that the job runner (a Docker container) picks up.

## Docker container

Run it with: `docker run -e POSTGRES_HOST=yourdbhost -e POSTGRES_PORT=yourdbport -e POSTGRES_DB=yourdatabasename -e POSTGRES_USER=yourdbusername -e POSTGRES_PASSWORD=yourdbpassword pubsweet/job-xsweet:latest`

The environment variables are needed so that the Docker container knows how to connect to your database.

After the Docker container starts up, jobs from the endpoint will start to be processed.

# Testing

Testing has to be done semi-automatically for now, as GitLab CI does not allow for service-2-service communication yet (https://gitlab.com/gitlab-org/gitlab-runner/merge_requests/1041), by running:

```static
cd components/server/job-xsweet && yarn test --testRegex test/standaloneXsweetTest.js
```

And in a separate window, building and starting the `job-xsweet` container like so:

```static
docker build -t pubsweet/job-xsweet components/server/job-xsweet
docker run -e DATABASE_URL="postgres://yourUsername@host.docker.internal/test" pubsweet/job-xsweet
```

This will test both the GraphQL subscription and the classic long-running HTTP request path.
npm package: @pubsweet/logger
Description: A module encapsulating standard logging features for pubsweet components and services.
Author: Antony Denyer
Latest version: 0.2.61

A module encapsulating standard logging features for pubsweet components and services.

### Usage

Either:

```js static
const myLogger = require('winston') // or something else
const logger = require('@pubsweet/logger')
logger.configure(myLogger)
```

Or set the logger in config:

```js static
const myLogger = require('winston') // or something else

{
  'pubsweet-server':{
    logger: myLogger
  }
}
```

The configured logger can then be imported from anywhere:

```js static
const logger = require('@pubsweet/logger')
logger.info('log')
```

The logger exposes the following methods:

- `info`
- `debug`
- `error`
- `warn`
- `configure`
- `getRawLogger` (returns the logger passed to `configure`)

As well as:

- `stream` (an object for passing to `morgan`)

Note that the logger used to configure the module must implement `error`, `warn`, `info` and `debug` functions.
npm package: @pubsweet/model-user
Description: A basic User model
Author: Adam Hyde
Latest version: 6.0.18

Consists of two parts, the [User and the Identity model](https://gitlab.coko.foundation/pubsweet/pubsweet/tree/master/components/server/model-user/src). The User model contains a very basic set of user-related features (email, username, password hash, password reset token), and is complemented by the Identity model, which contains information about local (e.g. secondary email) or external identities (e.g. ORCID OAuth information).

To use the User model, you have to [include it in the component list](/#/Components?id=section-how-do-you-use-components), and then require it in your code:

```js static
const { User, Identity } = require('@pubsweet/models')
```

You can then use the model as any other PubSweet model, e.g.

```js static
const user = {
  username: input.username,
  email: input.email,
  password: input.password,
}

const identity = {
  type: 'local',
  aff: input.aff,
  name: input.name,
  isDefault: true,
}
user.defaultIdentity = identity

const savedUser = await new User(user).saveGraph()
```
npm package: @pubsweet/models
Description: A simple package that brings models together
Author: Adam Hyde
Latest version: 0.3.26

# Models

A package that connects all model components together, so that you can use them elsewhere with e.g.

```
const { User } = require('@pubsweet/models')
```

For a model component to be accessible through `@pubsweet/models`, it needs to be listed in your application's config, for example, like so:

```
{
  pubsweet: {
    components: [
      '@pubsweet/model-user',
      '@pubsweet/model-team',
    ]
  }
}
```
npm package: @pubsweet/mover
Description: Move issues from one GitLab project to another
Latest version: 0.0.3

# Usage

Run `gitlab-issue-mover` to get a list of options (all required):

```
Options:
  --help       Show help                                               [boolean]
  --version    Show version number                                     [boolean]
  -u, --url    GitLab URL                                    [string] [required]
  -t, --token  GitLab token                                  [string] [required]
```

Then run, e.g.:

```
gitlab-issue-mover -u https://gitlab.coko.foundation -t yourToken
```

The script will guide you through the rest of the process (choosing the project you want to move issues from and to).