open-index/open-npm huggingface dataset:
npm package: @ingress/core
Description: Core ingress objects, application lifecycle and http handlers
Author: Caleb Boyd
Latest version: 1.0.0-beta.16

# @ingress/core

`@ingress/core` is a lifecycle container for ecmascript applications

`@ingress/core` manages:
- middleware composition
- startup and shutdown
- dependency injection
- the main application event (the driver)

## Example

The following example uses two Addons (`@ingress/http` and `@ingress/router`) To create an web server.

This will serve 404's since there are no defined routes.

```javascript
import core from '@ingress/core'
import http from '@ingress/http'
import router from '@ingress/router'

const app = core().use(http()).use(router())

app.run()
```

`app.run()` will activate the driver (http) and listen on the environment's defined PORT variable or a random port
A driver, is a middleware that responds to events and executes the core middleware

```typescript
export interface Usable<T> {
  start?: Middleware<Ingress<T>>
  stop?: Middleware<Ingress<T>>
  middleware?: Middleware<T>
  initializeContext?: Func
}
```

The Ingress app itself is also a Usable Addon, allowing nested applications to be composed.


### Why all the classes?

Sometimes classes are viewed as a code smell. While this can certainly be the case, they offer a mechanism of carrying synctactic metadata which can prove useful. Any paradigm can be abused. It's important to make any implementation a focused one.
The goal with ingress is to make composition of your applications easy. So prefer the composition of parts that is catered to.
npm package: @ingress/di
Description: Server-side dependency injection for ingress
Author: Caleb Boyd
Latest version: 3.0.0-alpha.8

## @ingress/di

Server-side dependency injection middleware for ingress

Based on [angular di](https://github.com/calebboyd/angular.di)

### Example (ES2015)

```javascript
import di from "@ingress/di";
import {
  perRequestProviders,
  providers,
  SomeDependency,
} from "./my-dependencies";
const container = di({ providers, perRequestProviders });
```

### Configuration

There are a few ways to let the root container know about your dependencies and their lifetimes.

1. Provide them at creation time (shown in example)
2. Use `.Singleton` and `.PerRequestLifetime` decorators exposed on a container instance
3. Builder (TODO) - Use a container builder to discover, configure, and load dependencies.

#### Decorator Configuration example

```javascript
//configuration.js
import di from '@ingress/di'

const container = di()
const { Singleton, PerRequestLifetime } = container

export {
  container,
  Singleton,
  PerRequestLifetime
}

//my-dependency.js
import { Singleton } from './configuration'

@Singleton
export class MyDependency {
  ...
}

//index.js
import ingress from '@ingress/core'
import { container } from './configuration'
import { MyDependency } from './my-dependency'

const app = ingress()
app.use(container).use((context, next) => {
  const dep = context.scope.get(MyDependency)
  ...
})
```

It is important to note that in `index.js` loading `./my-dependency` _after_ `./configuration` is required.
npm package: @ingress/http
Description: Core ingress objects, application lifecycle and helpers
Author: Caleb Boyd
Latest version: 1.0.0-beta.16

### @ingress/http

@ingress/http is a middleware driver for ingress.

### Usage

```typescript
import { Ingress } from '@ingress/core'
import { Http } from '@ingress/http'

const app = new Ingress()
app.use(new Http())
await app.run()
```
npm package: @ingress/router
Description: A fast router middleware for ingress
Author: Caleb Boyd
Latest version: 1.0.0-beta.16

## @ingress/router

The ingress router is an ingress addon that operates in an app driven by the `@ingrss/http` (or similar) driver. It's purpose is to enable requests to be handled by Controllers (classes) and Routes (methods).

The `@ingress/router` plugin introduces the `@Controller` and `@Route` decorators.
`@Controller` exists on an instance, and facilitates dependency collection of groups of routes, which are declared by `@Route` decorated class methods.

### Example

```typescript
import { Router, Route } from '@ingress/router'

const router = new Router()
const { Controller } = router

@Controller('/group')
class RouteGroup {
  @Route.Get('/handler')
  handler() {
    return 'Hello World'
  }
}
```

The above example, declares a route at `/group/handler` that returns an `HTTP 200 OK` with a body content of `Hello World` and a Content-Type of `ttext/plain;charset=UTF-8`

Alternatively, instead of through decorators, routes can be defined using the API

### API
npm package: @ingresse/aphrodite
Description: React UI library from ingresse.com
Author: @udimberto
Latest version: 3.2.0

# Aphrodite React
### React UI Library from ingresse.com

A front-end library with Ingresse's styles, using `React` 16, based on [Emotion](https://emotion.sh).

---

## Install
You can install with Yarn or NPM in your App Project:
```
npm i --save @ingresse/aphrodite
```

Re-export the Aphrodite tools through your React application folder structure.

`src/utils/index.js`:
```js
export {
    colors,
} from '@ingresse/aphrodite';
```

`src/components/index.js`:
```js
export {
    Button,
    Container,
    Styled,
} from '@ingresse/aphrodite';
```

`src/App.jsx`:
```jsx
/* Core Packages */
import React from 'react';

/* Your Project Components */
import {
    Button,
    Container,
    Styled,
} from './components';

function App() {
    function handleClick(evt) {
        console.log('button click', evt);
    }

    return (
        <Container sm>
            <Styled
                as="section"
                textAlign="center"
                backgroundColor="mercury,crystal,0.5"
            >
                <Button
                    color="success"
                    onClick={handleClick}
                >
                    Hello World
                </Button>
            </Styled>
        </Container>
    );
}

export default App;
```

---


## [Documentation](http://ingresse.github.io/aphrodite)

We try, but isn't the most complete and readeable documentation:

**[http://ingresse.github.io/aphrodite-react](http://ingresse.github.io/aphrodite-react)**

:-)

---
npm package: @ingresse/injector
Description: Ingresse Script Injector utility
Author: Ingresse
Latest version: 0.0.2

# `@ingresse/injector` ES Module

#### Utility to make it easy to import 3rd party libraries into HTML.


## Usage

#### Install as development dependency:
```
yarn add -D @ingresse/injector`
```

#### Usage examples:
```js
import injector, { css, js } from '@ingresse/injector';

injector({
    tag    : 'script',       // Wrapper element TAG name
    target : 'head',         // Element target - default is 'body'
    id     : 'facebook-sdk', // Wrapper element ID
    content: '//connect.facebook.com/pt_BR/sdk.js', // TAG src
});

injector({
    tag    : 'script', // Wrapper TAG name
    id     : 'gtm',    // Wrapper element ID
    target : 'body',   // Element target - default is 'body'
    content: `
        (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','YOUR-GTM-KEY')
    `,
});

js({
    id     : 'gtag',
    target : 'head',
    async  : 1,
    src    : '//www.googletagmanager.com/gtag/js?id=YOUR-GTAG-KEY',
    content: `
        (function(){
            gtag('js', new Date());
            gtag('config', 'YOUR-GTAG-KEY');
            gtag('set', {
                'country': 'BR',
                'currency': 'BRL'
            });
        })()
    `,
});

css({
    id  : 'font-family',
    href: 'https://fonts.googleapis.com/css?family=Roboto&display=swap',
});
css({
    id     : 'font-family-definition',
    content: `font-family: 'Roboto', sans-serif;`,
});
```
npm package: @ingresse/request
Description: Ingresse Requests utilities based on Fetch API
Author: Ingresse
Latest version: 0.0.5

# `@ingresse/request` ES Module

#### Facility to use [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch).


## Usage

#### Install as development dependency:
```
yarn add -D @ingresse/request
```

#### Example
```js
import { get } from '@ingresse/request';

const term = 'ingresse';
const api  = 'https://npmsearch.com/query';

get(api, {
    fields: 'name',
    q     : term,
})
.catch((error) => {
    console.error(`Error on search to NPM Packages with "${term}"`, error);
})
.then((response) => {
    console.log(`NPM Packages results to "${term}"`, response);
});
```
npm package: @ingrid-doji-test/design-system-core
Description: Shared type and variant utilities for Doji Design System
Latest version: 0.1.3

# @doji/design-system-core

Shared non-React utilities and types for the Doji Design System.

## Install

```bash
npm i @doji/design-system-core
```

## Usage

```ts
import type { Variant, Size } from "@doji/design-system-core";

const variant: Variant = "primary";
const size: Size = "md";
```

## Exports

- `@doji/design-system-core`
npm package: @ingrid-doji-test/design-system-react-web
Description: React web components for Doji Design System
Latest version: 0.1.3

# @doji/design-system-react-web

React web components for the Doji Design System.

## Install

```bash
npm i @doji/design-system-react-web @doji/design-system-core @doji/design-tokens
```

Also install peer dependencies if needed:

```bash
npm i react react-dom
```

## Required CSS Imports

Import these once in your app entry file:

```ts
import "@doji/design-tokens/css/variables.css";
import "@doji/design-system-react-web/styles.css";
```

Examples:

- Vite/React: `src/main.tsx`
- Next.js App Router: `app/layout.tsx`
- Next.js Pages Router: `pages/_app.tsx`

## Usage

```tsx
import { Button } from "@doji/design-system-react-web";

export function Example() {
  return <Button variant="primary">Continue</Button>;
}
```

Subpath import:

```tsx
import { Button } from "@doji/design-system-react-web/button";
```

## Exports

- `@doji/design-system-react-web`
- `@doji/design-system-react-web/button`
- `@doji/design-system-react-web/styles.css`
npm package: @ingrid-doji-test/design-tokens
Description: Design tokens and CSS variable output for Doji Design System
Latest version: 0.1.3

# @doji/design-tokens

Design token package for the Doji Design System.

## Install

```bash
npm i @doji/design-tokens
```

## Use CSS Variables

Import the generated variables once in your app entry:

```ts
import "@doji/design-tokens/css/variables.css";
```

## Use Token Types/Objects in TypeScript

```ts
import { tokens, type DojiTokens } from "@doji/design-tokens";

const appTokens: DojiTokens = tokens;
```

## Exports

- `@doji/design-tokens`
- `@doji/design-tokens/css/variables.css`
npm package: @ingridab/prettier-config
Description: Ingrid AB common prettier config
Author: Ingrid AB Frontend Team
Latest version: 0.2.1

# Ingrid AB prettier config

This is [prettier](https://prettier.io) configuration used in Ingrid AB projects. To use it you need to install it first:

```shell
npm install @ingridab/prettier-config
```

Then create `prettier.config.js` file inside root of your project with
following contents:

```js
module.exports = require('@ingridab/prettier-config');
```

And your are ready to go 🚀.

If you need to override some settings:

````js
module.exports = Object.assign(
  require("@ingridab/prettier-config"),
  {
    //add overrides here
    singleQuote: true,
    bracketSpacing: true,
  }
);```
````
npm package: @ingridab/tsconfig
Description: Ingrid AB common TypeScript config
Author: Ingrid AB Frontend Team
Latest version: 1.0.1

# Ingrid AB tsconfig

This is TypeScript configuration used in Ingrid AB projects. To use it you need to
install it first:

```shell
npm install @ingridab/tsconfig
```

Then create `tsconfig.json` file inside your project with following contents:

```json
{
  "extends": "@ingridab/tsconfig"
}
```

And your are ready to go 🚀.

If you need to override some settings:

```json
{
  "extends": "@ingridab/tsconfig",
  "compilerOptions": {
    "paths": {
      "~src/*": ["src/*"]
    }
  }
}
```
npm package: @ingriddraagen/mk-helpers
Description: Interfaces and helpers for Mammas Kokebok-recipes
Author: Ingrid Gormsdatter Draagen
Latest version: 2.0.4

# mk-helpers

interfaces and helper-functions for Mammas Kokebok

## Installation

```bash
$ npm install mk-helpers
```

## Usage

```js
var mkhelpers = require("mk-helpers");
```

## Publishing

### patch

```bash
$ npm run publish:patch
```

### minor

```bash
$ npm run publish:minor
```

### major

```bash
$ npm run publish:major
```

## License

MIT
npm package: @ingrun/cache
Description: vue2-cache-util
Author: ingrun
Latest version: 1.0.0

# @ingrun/cache

## config
```js
import create from '@ingrun/cache'
import Vue from 'vue'

export default create(Vue)
```

## use
```js
import cache from 'utils/cache'
cache.set('username', 'zhangsan')

console.log(cache.get('username')) 
// zhangsan
```
npm package: @ingrun/dict
Description: vue2-dict-util
Author: ingrun
Latest version: 1.0.0

# @ingrun/request

```js
import dict from "@ingrun/dict";
import request from "@ingrun/request";
import vue from "vue";

const dictConfig = new dict({
  labelKey: "dictLabel",
  valueKey: "dictValue",
  remoteMethod: (dictKey, addDictItme) => {
    request.get("/dict/type/" + dictKey).then((res) => {
      addDictItme(dictKey, res.data);
    });
  },
});

const instance = dictConfig.install(vue);

async function preloadDictList(list) {
  await request.get("/dict/types/" + list).then((res) => {
    for (const key in res.data) {
      instance.addDictItme(key, res.data[key]);
    }
  });
}

const list = "system_sex,system_user_type";

const t1 = async () => {
  instance.getDictListAsync("system_sex").then((res) => {
    console.log("system_sex:", res);
  });
  instance.getDictListAsync("system_sex", 3000).then((res) => {
    console.log("system_sex:", res);
  });
  instance.getDictListAsync("system_sex").then((res) => {
    console.log("system_sex:", res);
  });
};

// preloadDictList(list);
// t1();

// main.js
import "./util/dict";

this.$getDictList("system_sex")
this.$getDictLabel("system_sex", "2")
```
npm package: @ingrun/request
Description: vue2-request-util
Author: ingrun
Latest version: 1.0.1

# @ingrun/request

## config
```js
import request from "@ingrun/request";

export default request(() => {
  return {
    // default 默认地址。
    default: {
      baseURL: 'http://domain',
      headers: {
        Authorization: "user-token",
      },
    },
    xyz: {
      baseURL: "https://xyz.xyz.com",
    },
  };
});
```

## use
```js
// main.js
import request from "./util/request";
Vue.use(request);

// this.$get("/getUserInfo", { status: 1 } ).then((res) => {})
// this.$post("/xyz/updUserInfo", { id: 1, status: 2 } ).then((res) => {})
```