open-index/open-npm huggingface dataset:
npm package: @projectreshare/directory
Description: Interact with the library services directory
Latest version: 1.13.8

# ui-directory

Copyright (C) 2018-2024 The Open Library Foundation

This software is distributed under the terms of the Apache License, Version 2.0. See the file "[LICENSE](LICENSE)" for more information.

## Introduction

Congratulations on creating a new Stripes UI app module!  Follow the instructions below to run ui-directory and start your development.

## Prerequisites

In order to view and log into the platform being served up, a suitable Okapi backend will need to be running. The [Folio testing-backend](https://app.vagrantup.com/folio/boxes/testing-backend) Vagrant box should work if your app does not yet have its own backend module.

## Run your new app

Run the following from the ui-directory directory to serve your new app using a development server:
```
stripes serve
```

Note: When serving up a newly created app that does not have its own backend permissions established, pass the `--hasAllPerms` option to display the app in the UI navigation. For example:
```
stripes serve --hasAllPerms
```

To specify your own tenant ID or to use an Okapi instance other than http://localhost:9130, pass the `--okapi` and `--tenant` options.
```
stripes serve --okapi http://my-okapi.example.com:9130 --tenant my-tenant-id
```

## Run the tests

Run the included UI test `demo` with the following command:
```
stripes test --run demo --show
```

## What to do next?

Now that your new app is running, search the code for "`stripes-new-app`" to find comments and subbed placeholders that may need your attention.

Read the [Stripes Module Developer's Guide](https://github.com/folio-org/stripes/blob/master/doc/dev-guide.md).

Update this README with information about your app.

## Release Procedures
* To prepare for a release, create a branch called release-N.N.x where N.N is the major and minor versions, and x is the letter x.
* Push a tag to the release branch when changes are finalized.
* From the Github repository page, create a release from the tag created in the previous step.
* CI will publish appropriate artifacts when the release is published.
npm package: @projectreshare/plugin-rs-siquery-metaproxy
Description: Plugin to find an instance from an SI via Metaproxy
Latest version: 0.1.3

# ui-plugin-rs-siquery-vufind

Copyright (C) 2022-2024 The Open Library Foundation

This software is distributed under the terms of the Apache License,
Version 2.0. See the file "[LICENSE](LICENSE)" for more information.

## Introduction

A Stripes plugin to provide shared index querying for the manual request creation form via metaproxy.

## Release Procedures
* To prepare for a release, create a branch called release-N.N.x where N.N is the major and minor versions, and x is the letter x.
* Push a tag to the release branch when changes are finalized.
* From the Github repository page, create a release from the tag created in the previous step.
* CI will publish appropriate artifacts when the release is published.
npm package: @projectreshare/plugin-rs-siquery-vufind
Description: Plugin to find an instance from an SI via the Vufind API
Latest version: 2.0.0

# ui-plugin-rs-siquery-vufind

Copyright (C) 2022-2024 The Open Library Foundation

This software is distributed under the terms of the Apache License,
Version 2.0. See the file "[LICENSE](LICENSE)" for more information.

## Introduction

A Stripes plugin to provide shared index querying for the manual request creation form via VuFind's API.

## Release Procedures
* To prepare for a release, create a branch called release-N.N.x where N.N is the major and minor versions, and x is the letter x.
* Push a tag to the release branch when changes are finalized.
* From the Github repository page, create a release from the tag created in the previous step.
* CI will publish appropriate artifacts when the release is published.
npm package: @projectreshare/request
Description: Request resources for ILL
Latest version: 1.6.6

# ui-request

Copyright (C) 2018-2024 The Open Library Foundation

This software is distributed under the terms of the Apache License, Version 2.0.

This is an "alias" app, which merely invokes `ui-rs`. That app inspects the route by which it has been invoked to determine how it should function. That means it consists only of a single [three-line source-file](index.js) together with a [minimal package file](package.json), an [app icon](icons/app.svg) and [translation files](translations) containing [nothing but the name of the app](translations/ui-request/en_US.json).

## Release Procedures
* To prepare for a release, create a branch called release-N.N.x where N.N is the major and minor versions, and x is the letter x.
* Push a tag to the release branch when changes are finalized.
* From the Github repository page, create a release from the tag created in the previous step.
* CI will publish appropriate artifacts when the release is published.
npm package: @projectreshare/stripes-reshare
Description: Common elements used by ReShare's Stripes modules
Latest version: 2.1.0

# stripes-reshare

This is a library of common elements used by Stripes apps for the ReShare ILL system.

## Release Procedures
* To prepare for a release, create a branch called release-N.N.x where N.N is the major and minor versions, and x is the letter x.
* Push a tag to the release branch when changes are finalized.
* From the Github repository page, create a release from the tag created in the previous step.
* CI will publish appropriate artifacts when the release is published.
npm package: @projectreshare/supply
Description: Supply resources for ILL
Latest version: 1.6.6

# ui-supply

Copyright (C) 2018-2024 The Open Library Foundation

This software is distributed under the terms of the Apache License, Version 2.0.

This is an "alias" app, which merely invokes `ui-rs`. That app inspects the route by which it has been invoked to determine how it should function. That means it consists only of a single [three-line source-file](index.js) together with a [minimal package file](package.json), an [app icon](icons/app.svg) and [translation files](translations) containing [nothing but the name of the app](translations/ui-supply/en_US.json).

## Release Procedures
* To prepare for a release, create a branch called release-N.N.x where N.N is the major and minor versions, and x is the letter x.
* Push a tag to the release branch when changes are finalized.
* From the Github repository page, create a release from the tag created in the previous step.
* CI will publish appropriate artifacts when the release is published.
npm package: @projectreshare/update
Description: Quickly change the status of items. Part of the ReShare project.
Latest version: 1.10.1

# ui-supply

Copyright (C) 2019-2024 The Open Library Foundation

This software is distributed under the terms of the Apache License, Version 2.0. See the file "[LICENSE](LICENSE)" for more information.

## Release Procedures
* To prepare for a release, create a branch called release-N.N.x where N.N is the major and minor versions, and x is the letter x.
* Push a tag to the release branch when changes are finalized.
* From the Github repository page, create a release from the tag created in the previous step.
* CI will publish appropriate artifacts when the release is published.
npm package: @projectriff/function-proto
Description: gRPC service definitions used by the project riff function-sidecar
Author: Scott Andrews
Latest version: 0.0.6

gRPC Node.js
============

Create node module wrapping function.proto

`npm install --save @projectriff/function-proto`

```js
const { FunctionInvokerService, FunctionInvokerClient } = require('@projectriff/function-proto');
const grpc = require('grpc');
const address = '127.0.0.1:50051';

// server
const server = new grpc.Server();
server.addService(FunctionInvokerService, {
    call(call) {
        // TODO implement service
    }
});
server.bind(address, grpc.ServerCredentials.createInsecure());
server.start();

// client
const client = new FunctionInvokerClient(address, grpc.credentials.createInsecure());
```

See the official [gRPC for Node.js](https://grpc.io/docs/quickstart/node.html) reference guide.
npm package: @projectriff/message
Description: Generic message interface
Author: Scott Andrews
Latest version: 1.0.0

# Message

Message and Headers types used by riff's node-function-invoker.

## Install

The node-function-invoker has a copy of this package built-in, however, in order to tests functions that accept and/or produce message, it's recomended that it is installed as a dependency that can be required directly whether running as a unit test or inside riff.

```bash
npm install --save @projectriff/message
```

## Usage

There are two primary types provided by this module `Message` and `Headers`. A message is a `payload` with `headers`. Headers is a case insensitive map with one to many values. While it's possible to construct message and headers objects directly, it's more common to use the builder.

```js
const { Message, Headers } = require('@projectriff/message');

// create a message, don't forget to call `.build()` at the end
const message = Message.builder()
    // add header with a single value
    .addHeader('Content-Type', 'text/plain')
    .addHeader('Accept', 'application/json')
    // add additional values for a header
    .addHeader('accept', 'text/plain;0.8', 'application/octet-stream;q=0.5')
    // replace a header, overwriting existing values
    .replaceHeader('Accept', 'application/octet-stream', 'text/plain')
    // set the payload
    .payload('Hello World!')
    // return the message
    .build();

// message headers are Headers
message.headers instanceof Headers; // true

// get the frist or all values for a header
message.headers.getValue('Content-Type');  // 'text/plain'
message.headers.getValues('Content-Type'); // [ 'text/plain' ]
message.headers.getValue('Accept');        // 'application/octet-stream'
message.headers.getValues('Accept');       // [ 'application/octet-stream', 'text/plain' ]

// header name are case insensitive
message.headers.getValue('Content-Type');  // 'text/plain'
message.headers.getValue('content-type');  // 'text/plain'
message.headers.getValue('CONTENT-TYPE');  // 'text/plain'

// content of the message
message.payload; // 'Hello World!'
```

The `message` and `message.headers` objects are immutable once constructed.


### riff Usage

To recieve a Message with headers instead of a payload.

```
module.exports = message => {
    const { headers, payload } = message;
    return `Message received with Content-Type '${headers.getValue('Content-Type')}' and payload '${payload}'.`;
};

// set argument type to message, default is payload
module.exports.$argumentType = 'message';
```

Functions that set custom headers need to return a Message.

```js
const { Message } = require('@projectriff/message');

module.exports = name => {
    return Message.builder()
        .addHeader('Content-Type', 'text/plain')
        .payload(`Hello ${name}!`)
        .build();
};
```

See the [node-function-invoker documentation](https://github.com/projectriff/node-function-invoker) for details.