open-index/open-npm huggingface dataset:
npm package: @swymbase/cdk-image-builder
Description: A construct for creating pipelines to build custom machine images.
Author: Mindgrub Technologies, LLC
Latest version: 0.0.12

# CDK — Image builder

This package defines a construct for creating pipelines to build custom machine
images.

## Usage

To use this construct, first import the package:

```typescript
import * as core from "@aws-cdk/core";
import { ImageBuilderStack } from "@swymbase/cdk-image-builder";

function main() {
  const app = new core.App();
  // TODO: should initialize properly with stage, etc
  new ImageBuilderStack(app, "image-builder");
}
```

## Roadmap

The cloud team has worked to add automatic OS updates to image pipelines. This
package should be updated to incorporate that work.

Upgrade CDK
npm package: @swymbase/jsonapi
Description: Endpoint handlers providing a basic JSON:API implementation over a knowledge base interface
Author: Gavin Cannizzaro
Latest version: 0.0.6

# Swymbase JSON:API

This package provides support for a JSON:API implementation backed by a
knowledge base interface.

The implementation targets an AWS API Gateway environment insofar as it produces
handlers expecting an `APIGatewayProxyEvent` and resolving to an
`APIGatewayProxyResult`. However, this is a fairly generic request-response data
interface, and no AWS-specific mechanisms are assumed. As such, it should be
substantially adaptable to other environments. In particular, it uses request
preprocessors (with help from
[`@swymbase/api-gateway-interop`](../api-gateway-interop)) to decouple the
handler function from the details of the request format.
npm package: @swymbase/jsonapi-client
Description: A JSON:API client implementing a typed record store interface.
Author: Gavin Cannizzaro
Latest version: 0.0.11

# JSON:API client

This package provides a browser-compatible (fetch-based) JSON:API client that
implements a def.codes record store interface.

## Roadmap

Use dependency injection to provide Fetch implementation. The dependency on
global fetch is the reason [this package's tsconfig](./tsconfig.json) currently
includes the `DOM` lib.

## Known issues

### Multi-valued media properties

Currently, the swymbase API only supports media interop for single-valued
properties. This API client has the same limitation.

If swymbase were to add media support for multi-valued properties, it would
likely mean a change (or at least an extension) to the API and adding support
would require a corresponding extension here. For example, the `meta.media`
object could be extended to allow array values, which would have to specify the
IRI (in practice, ARN) of the property value being targeted.
npm package: @swymbase/media-processing
Description: Support for implementing media extensions to the swymbase API.
Author: Gavin Cannizzaro
Latest version: 0.0.8

# Swymbase media processing

This package defines a Lambda function that helps coordinate media processing
and storage (in the knowledge base).

See additional notes at [media](/doc/media.md).

## Media Processing

The store processor is the default for every object and is executed first.

Additional processors are defined [here](./src/processors). A processor can be
associated with a metatype property in the schema by adding its key to the
`media.processors` array.
npm package: @swymbase/metatype-core
Description: A minimal metadata bridge between RDF resources and JSON records.
Author: Gavin Cannizzaro
Latest version: 0.0.14

# Meta types

This package defines a simple vocabulary for describing record structures and
operations for bridging values between JSON, TypeScript, and RDF.

This is a type-only package, except for the `metatypes` helper constructor,
which is an identity function.

## Motivation

TypeScript applications that use an RDF backing store need a single source of
truth that supports the following use cases:

- documention
- mapping to RDF
- mapping from RDF
- mapping to JSON (output marshaling)
- mapping from JSON (input marshaling)
- mapping to TypeScript interfaces
- mapping to JSON Schema (if you're into that sort of thing)

Non-goals:

- validation (arbitrary predicates)
- support dictionaries, which have no corollary in RDF

## Optionality

It's tempting to try to support “required” properties, but in practice

1. optionality is always contextual (see
   [“Maybe Not”](https://www.youtube.com/watch?v=YR5WdGrpoug)), and

2. graph databases do not make such guarantees in general. At most, a “validate”
   operation could report that expectations were violated (though clients would
   still have to deal with missing values).
npm package: @swymbase/sparql-ast
Description: Types and serializers for a subset of SPARQL
Author: Gavin Cannizzaro
Latest version: 0.0.10

# SPARQL AST

Status: WIP. Everything is subject to change. This is currently a quick & dirty
implementation of the minimal subset of SPARQL needed to implement the filter
language in `sparql-rest`. The intent is to eventually support typed, in-memory
representation of the full _abstract_ SPARQL abstract algebra (not preserving
insignificant syntactical details). See
[§18 “Definition of SPARQL”](https://www.w3.org/TR/sparql11-query/#sparqlDefinition)
and in particular
[§18.2 “Translation to the SPARQL Algebra”](https://www.w3.org/TR/sparql11-query/#sparqlQuery)

This is not a parser but would be suitable for use as a parser output format in
cases where exact syntax does not need to be preserved.

## Motivation

Provide a basis for type safe operations on and serialization of SPARQL
expressions. Intended applications include term rewriting systems.

## Features

The package provides:

- [types](src/api): types for representing abstract SPARQL expressions

- [serialization](src/outgoing) : safe sparql serialization mapping JSON API
  documents and resources to record-type objects

- possible TBD's: equivalency tests, common transforms (e.g. skolemization or
  other ops on open expressions)

## Design

TBD

## Roadmap

Should use a reified grammar (i.e. concrete data that can generate TS types,
_versus_ using TS as source of truth).

## Related work

The [SPIN vocabulary](https://spinrdf.org/spin.html) is a SPARQL-in-RDF
representation, which should be consulted.

- [SPARQLAlgebra.js](https://github.com/joachimvh/SPARQLAlgebra.js): a "SPARQL
  to SPARQL Algebra converter"
npm package: @swymbase/sparql-protocol-client
Description: A TypeScript client for SPARQL Protocol
Author: Gavin Cannizzaro
Latest version: 0.0.17

# TypeScript SPARQL protocol client

This package defines a
[SPARQL Protocol](https://www.w3.org/TR/sparql11-protocol/) client in
TypeScript. This is a low-level interface, which marshals between various RDF
syntaxes and HTTP messages.

## Dependencies

- node-fetch

## Motivation

This fills a niche not currently occupied by any available package:

- provide first-class TypeScript interface
- hew very close to spec
- PROVISIONAL: special support for Amazon Neptune implementation where necessary
  (e.g. detailed error code definitions).

## Usage

`send` is a low-level function that formats and sends a request to a SPARQL
Protocol service. It returns a response object with the result in an indicated
format.

```typescript
import { send } from "../sparql-protocol-client/src/index";

const result = await send({
  request: {
    query: "SELECT ?s WHERE { ?s ?p ?o } LIMIT 10",
  },
  endpoint: "http://example.com/sparql",
});

if (result.success && result.response.format === "results")
  log(result.response.value);
```

`formatted` is a somewhat higer-level function that ensures that the response
matches a given format (and otherwise does the same thing as `send`).

```typescript
import { formatted } from "../sparql-protocol-client/src/index";

const result = await formatted("select_results", {
  request: {
    query: "SELECT ?s WHERE { ?s ?p ?o } LIMIT 10",
  },
  endpoint: "http://example.com/sparql",
});

if (result) {
  // This is known to be formed as SELECT results bindings
  log(result);
}
```

## Prior art

The [sparql-http-client](https://github.com/zazuko/sparql-http-client) by Thomas
Bergwinkl is a partial implementation of a SPARQL Protocol client in plain
JavaScript.

## Roadmap

Consider a Neptune extension for requesting
[execution plans](https://docs.aws.amazon.com/neptune/latest/userguide/sparql-explain.html),
which is done by adding an `explain={mode}`

### Use dependency injection for HTTP client

This package uses a
[Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) client
with the idea that it could be usable from browser environments. However, as
things stand, it currently takes a hard dependency on
[`node-fetch`](https://www.npmjs.com/package/node-fetch).

Related to this, it should also be possible to provide some of the core
functionality as mappings between SPARL Protocol requests and HTTP requests in
an implementation-agnostic form.