open-index/open-npm huggingface dataset:
npm package: @noresources/ssdp
Description: SSDP protocol implementation
Author: Renaud Guillard
Latest version: 1.0.1

@noresources/ssdp
================================================

SSDP protocol implementation for Node.js

This project aims to provide a "pure" SSDP implementation.
It can be used as a base for UPnP service discovery protocol
implementation but also for vendor specific protocols.

## Installation

```
npm install --save @noresources/ssdp
```

## Examples

### Advertise

```javascript

import { Notification } from "@noresources/ssdp"
import { Protocol } from "@noresources/ssdp/platform/node"

const protocol = new Protocol()

const SERVICE = "urn:schemas-nore-fr:service:Example:1"
const DEVICE_UUID = "2e0f1b12-bd53-4e14-bd32-2cc05479f82d"


const notification = new Notification ({
	subject: SERVICE,
	// The following USN is UPnP compliant
	usn: "uuid:" + DEVICE_UUID + "::" + SERVICE
})

// Add a UPnP-compliant LOCATION header field
// (not mandatory for SSDP)
notification.headers.LOCATION = 'http://10.11.12.13:1234/description.xml';

protocol.notify (notification, true)

protocol.start()

process.on ("exit", () => {
	protocol.stop()
})
```

### Search and watch

```javascript
import { Protocol, SearchRequest } from "@noresources/ssdp"

const protocol = new Protocol()
const SERVICE = "urn:schemas-nore-fr:service:Example:1"

protocol.on ("notification", (e) => {
	const n = e.notification
	if (n.subject == SERVICE)
		console.log ("Found", n.usn)
})

const search = new SearchRequest ({
	subject: SERVICE
})

protocol.search (search)

protocol.start()

```

## Documentation

See the [JSDoc generated documentation](http://ssdp.node.sources.nore.fr/).

## References
* [SSDP draft v1.03](https://datatracker.ietf.org/doc/html/draft-cai-ssdp-v1-03)

## See also
* [node-ssdp](https://github.com/diversario/node-ssdp). Another SSDP module
* [ns-dotnet-ssdp](https://github.com/noresources/ns-dotnet-ssdp). A .Net implementation with similar API and features.
npm package: @norest/cli
Description: A not only REST interface.
Author: Jan Hommes
Latest version: 0.3.6

# Install

Get it from npm:

```
npm i @norest/cli -g
```

# Getting started

Spin up a default server (file system storage):

```
norest
```

## Configuration
Or configure it to your needs:
 - `-p`      = Which port to use (default: `3030`)
 - `--fixed` = Set this to true, to disallow adding new index fragments (default: `false`).
 - `--path`  = The base path to expose the rest api (default: `api`).
 - `--websocket.<<prop>>` = All [configurations for websocket](/blob/master/nestjs/src/websocket/websocket-config.interface.ts).
 - `--rest.<<prop>>`      = All [configurations for the rest interface](/blob/master/nestjs/src/rest/rest-config.interface.ts).
 - `--auth.<<prop>>`      = All [configurations for the authentication](/blob/master/nestjs/src/auth/auth-config.interface.ts).
 - `--connector.<<prop>>` = All [configurations for the file or database connector](/blob/master/nestjs/nestjs/src/connector/connector-config.interface.ts).


Example to start with authentication enabled:
```
norest serve --auth.enabled true
```


Example to start with a Mongo DB:
```
norest serve --connector.name mongodb --connector.url "mongodb://127.0.0.1:27017/test"
```

> Note: NoREST only works with mongodb Sharding, single mongodb nodes are not supported.

## Configuration file
You could also create a .norestrc.json, yaml or .js in the root directory and store/export the configuration there.
```
{
  "connector": {
    "name": "mongodb",
    "url": "mongodb://127.0.0.1:27017/test",
    "collection": "norest",
    "createCollectionNotExisting": true
  },
  "websocket": {
    "enabled": true
  },
  "auth": {
    "cookieName": "auth",
    "userProperty": "sub"   
  },
  "path": "api",
  "fixed": false
}

```

> By default the noREST nestjs implementation supports two connectors: mongoDB and file. File is the default configuration but only suitable for non high load.

## Plugins
Plugins can be added to an Javascript configuration file only. They are based on the module infrastructure of Nestjs. Configuration can be passed to the
calling `register()` function.
``` 
const AuthProxyModule = require('@norest/plugin-auth-proxy').AuthProxyModule;

module.exports = {
  plugins: [AuthProxyModule.register({
    github: {
      client_id: '22e26fceea63a8ace68f',
      redirect_uri: 'http://localhost:3031/github/auth',
      client_secret: 'xyz',
    }
  })]
};
```

There is currently only two official plugin:
 - [@norest/plugin-auth-proxy](/plugins/auth-proxy/README.md): The auth-proxy plugin allows to add an external authentication provider like Github. 
 - [@norest/plugin-faker](/plugins/faker/README.md): A plugin that allows to generate fake data with faker.js


## Env variables
Each of the mentioned configuration can be also be parsed as a ENV var. Use the prefix `NOREST_` and replace dots with underscores then:

```
env.NOREST_AUTH_COOKIENAME = "authorization"
```
npm package: @norest/plugin-auth-proxy
Description: A plugin that allows to add a authentication for Github to secure the noREST server and only allow changes by people that have authorized Github. It adds three new endpoints: 1. GET /github/login -> used to login 2. GET /github/auth -> callback URL if suc
Author: Jan Hommes
Latest version: 0.3.6

# Auth Proxy Plugin
A plugin that allows to add a authentication for Github to secure the noREST server and only allow changes
by people that have authorized Github. It adds three new endpoints:
1. GET /github/login -> used to login
2. GET /github/auth -> callback URL if successful a Cookie is set
3. GET /github/logout -> removes the cookie

## Install
Add it to your `norest.config.js` file:
``` 
const AuthProxyModule = require('@norest/plugin-auth-proxy').AuthProxyModule;

module.exports = {
  plugins: [AuthProxyModule.register({
    github: {
      client_id: '22e26fceea63a8ace68f',
      redirect_uri: 'http://localhost:3031/github/auth',
      client_secret: 'xyz',
    }
  })]
};
```
npm package: @norest/plugin-faker
Description: A plugin to create faked data for the file connector.
Author: Jan Hommes
Latest version: 0.3.6

### Faker plugin
A plugin to generate fake data.

## Install
Add it to your `norest.config.js` file:
``` 
const FakerModule = require('@norest/plugin-faker').FakerModule;

module.exports = {
  plugins: [FakerModule.register()]
};
```

## Usage
`POST` a [FakeDefinition](fake-definition.class.ts) to the `/faker/fake` endpoint:

```
POST http://localhost:3030/faker/fake
{
	"collection": "nr-fake-test",
  "namespace": "hacker",
  "amount": 20
}
``` 

To add more fake data, `PUT` to `/faker/fake` endpoint:

```
PUT http://localhost:3030/faker/fake
{
	"collection": "nr-fake-test",
  "namespace": "animal",
  "amount": 10
}
```

As namespaces can be used any of the [faker.js](https://github.com/marak/Faker.js/) API methods.
npm package: @norest/plugin-health
Description: A plugin add a simple /health endpoint to noREST
Author: Jan Hommes
Latest version: 0.3.6

### Health plugin
A very simple plugin which adds a 200 on the `/health` endpoint for readiness- or liveness-probe.

## Install
Add it to your `norest.config.js` file:
``` 
const HealthModule = require('@norest/plugin-health').HealthModule;

module.exports = {
  plugins: [HealthModule.register()]
};
```

## Usage
`GET /health` -> 200 Status okay if instance is up and running.
npm package: @norfield/center
Description: norfield center module
Author: Norfield Authors
Latest version: 1.2.10
Deprecated: This

# @norfield/center

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->


### Installation

Install this module individually:

```sh
$ npm install @norfield/center
```

Or install the Norfield module that includes it as:

```sh
$ npm install @norfield/norfield
```
npm package: @norfield/graphql
Description: norfield graphql module
Author: Norfield Authors
Latest version: 1.0.21
Deprecated: No

# @norfield/graphql

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

## Apply

Apply Express middleware to use graphQL at the specified path

### Parameters

-   `app` **[Object][1]** An express.js node application
-   `String` **path** The url resource in which graphQL will be exposed (optional, default `"graphql"`)

### Examples

```javascript
const express = require('express');
const app = express();
const UseGraphQL = require('@norfield/graphql');
...

UseGraphQL(app);
```

[1]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object


### Installation

Install this module individually:

```sh
$ npm install @norfield/graphql
```

Or install the Norfield module that includes it as:

```sh
$ npm install @norfield/norfield
```
npm package: @norfield/member
Description: norfield member module
Author: Norfield Authors
Latest version: 1.2.9
Deprecated: This

# @norfield/member

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->


### Installation

Install this module individually:

```sh
$ npm install @norfield/member
```

Or install the Norfield module that includes it as:

```sh
$ npm install @norfield/norfield
```
npm package: @norfield/person
Description: norfield person module
Author: Norfield Authors
Latest version: 1.0.9
Deprecated: Model

# @norfield/person

<a name="Person"></a>

## Person ⇐ <code>[Model](common#Model)</code>
Base class for all people

**Kind**: global class  
**Extends**: <code>[Model](common#Model)</code>  

* [Person](#Person) ⇐ <code>[Model](common#Model)</code>
    * [new Person(props)](#new_Person_new)
    * [.Schema](#Person.Schema)

<a name="new_Person_new"></a>

### new Person(props)
Constructs a new instance of a Person model


| Param | Type | Default | Description |
| --- | --- | --- | --- |
| props | <code>Object</code> |  | Optional properties to assign to the instance |
| [props.firstName] | <code>String</code> | <code>&#x27;&#x27;</code> | Person's first name |
| [props.lastName] | <code>String</code> | <code>&#x27;&#x27;</code> | Person's last name |
| [props.email] | <code>String</code> | <code>&#x27;&#x27;</code> | Person's email |
| [props.phone] | <code>String</code> | <code>&#x27;&#x27;</code> | Person's primary phone number |
| [props.cell] | <code>String</code> | <code>&#x27;&#x27;</code> | Person's cell |
| [props.address] | <code>Address</code> |  | Address of the person |

**Example**  
```js
const Person = require('@norfield/person');

const person = new Person({
 firstName: "Michael",
 lastName: "Heirendt",
 ...
});
```
<a name="Person.Schema"></a>

### Person.Schema
**Kind**: static property of [<code>Person</code>](#Person)  


### Installation

Install this module individually:

```sh
$ npm install @norfield/person
```

Or install the Norfield module that includes it as:

```sh
$ npm install @norfield/norfield
```
npm package: @norfield/polygon
Description: norfield polygon module
Author: Norfield Authors
Latest version: 1.2.9
Deprecated: This

# @norfield/polygon

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->


### Installation

Install this module individually:

```sh
$ npm install @norfield/polygon
```

Or install the Norfield module that includes it as:

```sh
$ npm install @norfield/norfield
```
npm package: @norfield/ticket
Description: norfield ticket module
Author: Norfield Authors
Latest version: 1.2.9
Deprecated: This

# @norfield/ticket

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->


### Installation

Install this module individually:

```sh
$ npm install @norfield/ticket
```

Or install the Norfield module that includes it as:

```sh
$ npm install @norfield/norfield
```
npm package: @norfield/user
Description: norfield user module
Author: Norfield Authors
Latest version: 1.2.9
Deprecated: This

# @norfield/user

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->


### Installation

Install this module individually:

```sh
$ npm install @norfield/user
```

Or install the Norfield module that includes it as:

```sh
$ npm install @norfield/norfield
```
npm package: @norflin321/pixi-spine
Description: [Description of extension]
Author: norflin321
Latest version: 1.0.4

# PixiJS Extension Boilerplate

This is a simple boilerplate project powered by [PixiJS Extension Scripts](https://github.com/pixijs/extension-scripts). It demonstrates how you can create an extension for PixiJS that works with TypeScript, generates all the necessary build files and supports documentation (with webdoc) and unit-testing (with Jest).

## Getting Started

This project assumes you are familiar with `npm`, `node.js` and **package.json** files.

```bash
npm install
npm run build
```

## Structure

| Path | Description |
|---|---|
| `./src` | Folder containing the source code for your extension |
| `./test` | Folder containing the Jest-based unit-tests (i.e., `*.test.ts`) |
| `./examples` | Folder containing any examples to demonstrate usage |
| `./global.d.ts` | TypeScript global mixins for PixiJS |


## Publishing

When you're ready to publish your extension and share with the world, run the following command.
This will ask you which type of version bump you'd like to do and then do all the necessary steps to build
and package your extension.

```bash
npm run release
```
npm package: @norflin321/tweedle.js
Description: Tweedle.js is a fork of tween.js made to fit my needs.
Author: Anton Kurtin
Latest version: 2.1.2

# Tweedle.js
`npm i tweedle.js`  

## What is a tween?
A tween is an easy way to animate something. You tell a property to be at a certain value after so many seconds and look at it go!

## [API documentation](https://miltoncandelero.github.io/tweedle.js/)
## [Source code](https://github.com/miltoncandelero/tweedle.js)

## How do I use this?
If you are on the browser, use the `umd` package and use the global `TWEEDLE` to find what you need (or the `es` modules if you understand that kind of black magic). If you are using npm you can import just what you need (we also have typescript support out of the box).  
The overall syntax is this:
```js
const myObject = { x:0, y:0 };
new Tween(myObject).to({ x:100, y:100 }, 2500).start();
```

You can probably see that tweens are meant to be chain called and all functions return themselves so you can keep 

But that's only half the trouble as Tweedle won't move time forward on itself. See, every tween that you don't assign a group, it belongs to the shared group and you must remember to update that group for your tweens to work.

```js
const tweenLoop = () => {
	Group.shared.update();
	requestAnimationFrame(tweenLoop);
}
tweenLoop();
```

## Easings, Interpolations, Events, Chains, Deep objects, and more!
Tweedle supports all of [Robert Penner easing functions](http://robertpenner.com/easing/), has Interpolation for bezier curves, colors and rotations, fires events onStart, onUpdate, onLoop, onEnd, can chain tweens so they start right after the previous one ends, allows to modify deep properties of objects and many more features that I need to write demos and tests for.  
Feel free to dive the [API documentation](https://miltoncandelero.github.io/tweedle.js/) and read more there since all functions are documented.

## Helping Tweedle
Tweedle uses Jest for testing and I was considering using PixiJS to do some demos.  
I am releasing this right now as is since it is quite functional and stable even when I don't have the tests to prove so.  
Feel free to send me your demos or tests (even if the tests fail and you can't put the effort to make it pass, I still find that valuable!)  

---

Tweedle.js is my fork of [tween.js](https://github.com/tweenjs/tween.js) made with ♥ to fit my needs at Killabunnies.
npm package: @norges-domstoler/app-shell
Description: Wrapper for Lovisa applications.
Author: Elsa team
Latest version: 2.0.3
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# @norges-domstoler/app-shell

![Version](https://img.shields.io/npm/v/@norges-domstoler/app-shell) [![License](https://img.shields.io/npm/l/@norges-domstoler/app-shell)](https://www.npmjs.com/package/@norges-domstoler/app-shell) ![Checks](https://github.com/domstolene/designsystem/actions/workflows/release.yml/badge.svg)

AppShell for bruk i utvikling av applikasjoner til Norges Domstoler. Dette er en standard wrapper for en Lovisa-applikasjon.

## 📦 Installasjon

```sh
pnpm add @norges-domstoler/app-shell
```

## 🔨 Bruk

```tsx
import { Link } from 'react-router-dom';
import {
  AppShell,
  FolderIcon,
  ChecklistIcon,
} from '@norges-domstoler/dds-components';

<AppShell
  version="1.0.0"
  navigation={{
    internal: [
      {
        as: Link,
        to: '/saker',
        icon: FolderIcon,
        label: 'Saker',
        active: true,
      },
      { as: Link, to: '/oppgaver', icon: ChecklistIcon, label: 'Oppgaver' },
    ],
    external: [{ href: '...', external: true, label: 'Registeroppslag' }],
  }}
>
  Applikasjonskoden din her...
</AppShell>;
```
npm package: @norges-domstoler/dds-core
Description: Base components/styles and other helpers used in Elsa - domstolenes designsystem
Author: Elsa team
Latest version: 0.2.2
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# @norges-domstoler/dds-core

![Version](https://img.shields.io/npm/v/@norges-domstoler/dds-core) [![License](https://img.shields.io/npm/l/@norges-domstoler/dds-core)](https://www.npmjs.com/package/@norges-domstoler/dds-core) ![Checks](https://github.com/domstolene/designsystem/actions/workflows/release.yml/badge.svg)

Grunnkomponenter/-styles og hjelpefunksjoner for å bygge opp komponenter av.

Sjekk ut [Elsa - domstolenes designsystem](https://design.domstol.no/) og [Elsa Storybook](https://domstolene.github.io/designsystem) for mer dokumentasjon og demoer.

## 📦 Installasjon

Dette er en intern pakke og skal ikke installeres direkte fra npm.
For interne pakker kan du legge pakken til som en dependency i `package.json`:

```json
"dependencies": {
  "@norges-domstoler/dds-core": "workspace:*"
}
```
npm package: @norges-domstoler/dds-datepicker
Description: Date picker components used in Elsa - domstolenes designsystem
Author: Elsa team
Latest version: 0.4.2

# @norges-domstoler/dds-datepicker

![Version](https://img.shields.io/npm/v/@norges-domstoler/dds-datepicker) [![License](https://img.shields.io/npm/l/@norges-domstoler/dds-datepicker)](https://www.npmjs.com/package/@norges-domstoler/dds-datepicker) ![Checks](https://github.com/domstolene/designsystem/actions/workflows/release.yml/badge.svg)

Komponenter for valg av datoer og tidspunkter for bruk i domstolenes tjenester.

Sjekk ut [Elsa - domstolenes designsystem](https://design.domstol.no/) og [Elsa Storybook](https://domstolene.github.io/designsystem) for mer dokumentasjon og demoer.

## 📦 Installasjon

```sh
pnpm add @norges-domstoler/dds-datepicker
```

## ⌨️ For bidragsytere

Sjekk ut [guiden for bidragsytere](https://design.domstol.no/987b33f71/p/34c962-bidra/b/3611d5).
npm package: @norges-domstoler/dds-form
Description: Base components/styles and other helpers used in Elsa - domstolenes designsystem
Author: Elsa team
Latest version: 0.1.8
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# @norges-domstoler/dds-form

![Version](https://img.shields.io/npm/v/@norges-domstoler/dds-form) [![License](https://img.shields.io/npm/l/@norges-domstoler/dds-form)](https://www.npmjs.com/package/@norges-domstoler/dds-form) ![Checks](https://github.com/domstolene/designsystem/actions/workflows/release.yml/badge.svg)

Formkomponenter for bruk i Elsa - domstolenes designsystem.

Sjekk ut [Elsa - domstolenes designsystem](https://design.domstol.no/) og [Elsa Storybook](https://domstolene.github.io/designsystem) for mer dokumentasjon og demoer.

## 📦 Installasjon

Dette er en intern pakke og skal ikke installeres direkte fra npm.
For interne pakker kan du legge pakken til som en dependency i `package.json`:

```json
"dependencies": {
  "@norges-domstoler/dds-form": "workspace:*"
}
```
npm package: @norges-domstoler/dds-formatting
Description: Text formatting functions used in Elsa - domstolenes designsystem
Author: Elsa team
Latest version: 1.6.0

# @norges-domstoler/dds-formatting

[![Version](https://img.shields.io/npm/v/@norges-domstoler/dds-formatting)](https://www.npmjs.com/package/@norges-domstoler/dds-formatting) ![License](https://img.shields.io/npm/l/@norges-domstoler/dds-formatting)

Tekstformatering til bruk i domstolenes tjenester.

Sjekk ut [Elsa - domstolenes designsystem](https://design.domstol.no/) og [ Elsa Storybook](https://domstolene.github.io/designsystem) for dokumentasjon og demoer.

## 📦 Installasjon

```sh
pnpm add @norges-domstoler/dds-formatting
```

## 🔨 Bruk

```js
import { formatFoedselsnummer } from '@norges-domstoler/dds-formatting';

const mittUformaterteFoedselsnummer = '12345678901';
const riktigFormatertFoedselsnummer = formatFoedselsnummer(
  mittUformaterteFoedselsnummer,
);
```
npm package: @norges-domstoler/dds-icons
Description: Icons used in Elsa - domstolenes designsystem
Author: Elsa team
Latest version: 0.2.6
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# @norges-domstoler/dds-icons

![Version](https://img.shields.io/npm/v/@norges-domstoler/dds-icons) [![License](https://img.shields.io/npm/l/@norges-domstoler/dds-icons)](https://www.npmjs.com/package/@norges-domstoler/dds-icons) ![Checks](https://github.com/domstolene/designsystem/actions/workflows/release.yml/badge.svg)

Sjekk ut [Elsa - domstolenes designsystem](https://design.domstol.no/) og [Elsa Storybook](https://domstolene.github.io/designsystem) for mer dokumentasjon og demoer.

## 📦 Installasjon

Dette er en intern pakke og skal ikke installeres direkte fra npm.
For interne pakker kan du legge pakken til som en dependency i `package.json`:

```json
"dependencies": {
  "@norges-domstoler/dds-icons": "workspace:*"
}
```
npm package: @norges-domstoler/dds-page-generator
Description: Page Generator
Author: Team Spesial
Latest version: 8.1.0

# @norges-domstoler/dds-page-generator

![Version](https://img.shields.io/npm/v/@norges-domstoler/dds-page-generator) [![License](https://img.shields.io/npm/l/@norges-domstoler/dds-page-generator)](https://www.npmjs.com/package/@norges-domstoler/dds-page-generator) ![Checks](https://github.com/domstolene/designsystem/actions/workflows/release.yml/badge.svg)

Side- og skjemagenerering basert på JSON-input for bruk i domstolenes tjenester.

## 📦 Installasjon

```sh
pnpm add @norges-domstoler/dds-page-generator

or

npm install @norges-domstoler/dds-page-generator
```

## 🔨 Bruk

```js
import {
  PageGenerator,
  SectionGenerator,
  PageGeneratorState
} from '@norges-domstoler/dds-page-generator';

const [myState, setMyState] = useState<PageGeneratorState>({
    firstName: '',
    lastName: '',
});

const fields = [{
    fields: [
    {
        component: FormGeneratorSupportedFields.TextInput,
        props: {
            label: 'Fornavn',
            type: 'text',
            name: 'firstName',
            value: myState.firstName as string
        },
    },
    {
        component: FormGeneratorSupportedFields.TextInput,
        props: {
            label: 'Etternavn',
            type: 'text',
            name: 'lastName',
            value: myState.lastName as string
        },
    }],
}];

useEffect(() => {
    console.log('updated state', state);
}, [state]);

<PageGenerator as="form" fields={fields} state={myState} setState={setMyState} />
<SectionGenerator as="form" fields={fields} state={myState} setState={setMyState} />
```

## Migreringsguide fra v4 til v5

Det er gjort endringer i state-håndtering for å unngå duplikater av state. I tidligere versjoner hadde PageGenerator sin egen kopi av state. Dette kunne forårsake feil i state-håndteringen for parent vs child. I ny versjon kan man sende inn state og setState, slik at det kun er én versjon av state. Dette medfører at man må gjøre noen endringer.

- `stateOnChange` er ikke lenger støttet som property.
- `state` og `setState` må settes som property.
- Man bør bruke typen `PageGeneratorState`.
- Man bør bruke property'en `value` for en skjema-komponent og den bør castes til riktig type. Alle aktuelle typer kan finnes i `PageGeneratorStateOptionTypes`
- Om man vil fange opp endringer på state, kan man bruke `useEffect`.

Se i eksempelet over for hvordan dette kan gjøres.
npm package: @norges-domstoler/dds-typography
Description: Typography components and styles used in Elsa - domstolenes designsystem
Author: Elsa team
Latest version: 0.1.6
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# @norges-domstoler/dds-typography

![Version](https://img.shields.io/npm/v/@norges-domstoler/dds-typography) [![License](https://img.shields.io/npm/l/@norges-domstoler/dds-typography)](https://www.npmjs.com/package/@norges-domstoler/dds-typography) ![Checks](https://github.com/domstolene/designsystem/actions/workflows/release.yml/badge.svg)

Typografikomponenter/-stiler for bruk i domstolenes applikasjoner.

Sjekk ut [Elsa - domstolenes designsystem](https://design.domstol.no/) og [Elsa Storybook](https://domstolene.github.io/designsystem) for mer dokumentasjon og demoer.

## 📦 Installasjon

Dette er en intern pakke og skal ikke installeres direkte fra npm.
For interne pakker kan du legge pakken til som en dependency i `package.json`:

```json
"dependencies": {
  "@norges-domstoler/dds-typography": "workspace:*"
}
```
npm package: @norges-domstoler/development-utils
Description: Development utilities for developing applications in Norges Domstoler
Author: Elsa team
Latest version: 2.0.1

# @norges-domstoler/development-utils

[![Version](https://img.shields.io/npm/v/@norges-domstoler/development-utils)](https://www.npmjs.com/package/@norges-domstoler/development-utils) ![License](https://img.shields.io/npm/l/@norges-domstoler/development-utils)

Forskjellige utilities for bruk i utvikling av applikasjoner til Norges Domstoler.

Sjekk ut [Elsa - domstolenes designsystem](https://design.domstol.no/) og [Elsa Storybook](https://domstolene.github.io/designsystem) for dokumentasjon og demoer.

## 📦 Installasjon

```sh
pnpm add @norges-domstoler/development-utils
```

## 📃 Komponenter

- EnvironmentBannerProvider
npm package: @nori-dot-com/ggit
Description: utilities for interacting with the Soil Metrics GGIT API
Author: jaycenhorton
Latest version: 1.6.2

# `@nori-dot-com/ggit`

Helpers to integrate with the Soil Metrics GGIT (greenhouse gas inventory tool) API

## Usage

```typescript
import * as sm from '@nori-dot-com/ggit';
```
npm package: @nori-dot-com/quantification
Description: utilities for quantifying Nori's soil methodology based projects
Author: jaycenhorton
Latest version: 1.6.2

# `quantification`

Quantification utilities

## Usage

```typescript
import { getQuantificationSummary } from '@nori-dot-com/quantification';
```

## CLI Usage

### Setup

```sh
$ yarn install
```

### For a multi-field results file.

```sh

$ yarn quantify multi results.json --maxGrandfatherableYears 4
```

### For an older single-field results file.

i.e. one that may have multiple polygons from the same boundary split out and run as separate fields.

```sh
$ yarn quantify single results.json --maxGrandfatherableYears 4
```
npm package: @nori-zk/ethereum-token-bridge
Description: NoriTokenBridge contract
Latest version: 0.0.10

# Nori Token Bridge - Source Contract

## Exports

```typescript
import { noriTokenBridgeJson } from '@nori-zk/ethereum-token-bridge';
```

## Installation

`npm install`

## Configuration

Env vars (create a .env file):

```
ETH_PRIVATE_KEY=
ETH_RPC_URL=
ETH_NETWORK=
```

- **ETH_PRIVATE_KEY**: Ethereum contract deployer private key
- **ETH_RPC_URL**: Ethereum RPC endpoint
- **ETH_NETWORK**: Ethereum network label e.g. 'holesky'

## Testing

`npm run test`

## Build

`npm run build`

## Deploy

Make sure your .env is set to deploy to the correct network.

`npm run deploy`

You will see output something like:

```sh
Running on network "holesky"
Using RPC URL: https://ethereum-holesky.core.chainstack.com/<api-key>
One private key loaded for deployment.
Deploying with account: 0xC7xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Deployer balance: 100.0 ETH
Network: holesky (chainId: 17000)
NoriTokenBridge deployed to: 0xfCxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Deployed in block: 3840406
Gas used for deployment: 296589
```

A file `.env.nori-token-bridge` will have been created with `NORI_TOKEN_BRIDGE_ADDRESS` set within it.

## Lock (for testing purposes)

Make sure your .env is set to deploy to the correct testing network. Copy NORI_TOKEN_BRIDGE_ADDRESS from the deploy stage. Also you must add `NORI_TOKEN_BRIDGE_TEST_MODE=true` to run this test facility.

`npm run test:lock <attestationHashHex> <optionalAmountToLock (defaults to 0.000001)>`

`npx hardhat --network $ETH_NETWORK lockTokens <attestationHashHex> <optionalAmountToLock (defaults to 0.000001)>`

One can (again for testing purposes) lock periodically in a loop, every 383 seconds (approximately once every consensus period):

`npm run test:lock-loop <attestationHashHex>`

**Caution** this is just a test facility, don't lock real ETH using this process.

## Get total deposited

Ensure NORI_TOKEN_BRIDGE_ADDRESS is within your .env file.

`npm run get-deposited <depositorAddressHex> <attestationHashHex>`

e.g. `npm run get-deposited 0xc7e910807dd2e3f49b34efe7133cfb684520da69 0x13cceb5b591e742c13fd7f3894f97139c964606f2928eefdc234e8a3a55c10b1`

## Withdraw

Ensure NORI_TOKEN_BRIDGE_ADDRESS and ETH_PRIVATE_KEY are within your .env file.

`npm run withdraw`

## Package details

This package exports a single variable, `noriTokenBridgeJson`, which is a Hardhat artifact JSON object representing the compiled contract metadata (ABI, bytecode, etc.).

It is provided as an ES module export, allowing you to import it using ES module syntax.