open-index/open-npm huggingface dataset:
npm package: @kode-frontend/pathfinder-web-core
Description: Core libs for tool to change environments on the fly
Author: KODE
Latest version: 2.0.1

<div align="center">

### :construction: :construction: :construction: THIS PROJECT HAS AN EXPERIMENTAL STATUS, DON'T USE IT :construction: :construction: :construction:

&nbsp;

# @kode-frontend/pathfinder-web-core

  <a href="https://www.npmjs.com/package/@kode-frontend/pathfinder-web-core">
    <img alt="npm version" src="https://img.shields.io/npm/v/@kode-frontend/pathfinder-web-core.svg">
  </a>
  <a href="https://www.npmjs.com/package/@kode-frontend/pathfinder-web-core">
    <img alt="npm downloads" src="https://img.shields.io/npm/dt/@kode-frontend/pathfinder-web-core.svg">
  </a>
  <a href="https://github.com/appKODE/pathfinder-web-core/blob/main/LICENCE">
    <img alt="npm license" src="https://img.shields.io/npm/l/@kode-frontend/pathfinder-web-core.svg">
  </a>
  <a href="https://standardjs.com">
    <img alt="standard js" src="https://img.shields.io/badge/code_style-standard-brightgreen.svg">
  </a>
  <a href="https://www.npmjs.com/package/@kode-frontend/pathfinder-web-core">
    <img alt="npm type definitions" src="https://img.shields.io/npm/types/@kode-frontend/pathfinder-web-core.svg">
  </a>
  <br>
  <a href="#">
    <img alt="status" src="https://img.shields.io/badge/status-experimental-red?style=flat&logo">
  </a>

  <p>
    <a href="#installation">Installation</a> | 
    <a href="#development">Development</a> |
    <a href="#release">Release flow</a>
  </p>
  
</div>
&nbsp;

This is the core library for [pathfinder-web-react](https://www.npmjs.com/package/@kode-frontend/pathfinder-web-react). There is no need to install it as a separate package, Pathfinder pulls it up through dependencies.

> _Pathfinder is a tool for changing base URL for API requests on the client side. [Read more.](https://www.npmjs.com/package/@kode-frontend/pathfinder-web-react)_

Pathfinder-web-core is isolated into an individual package for the possibility of its reuse by other platforms, for example, React Native. It is easy to integrate and it does not require any further development.

## Installation

```bash
npm i @kode-frontend/pathfinder-web-core

# or using yarn
yarn add @kode-frontend/pathfinder-web-core
```

## Development

### Release

Releases are made using Release-it CLI tool.

Local release:

1. Generate your [personal access token](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html#create-a-personal-access-token) with 'api' scope.
2. Run:

```bash
GITLAB_TOKEN=your-personal-access-token npm run release

# or using yarn
GITLAB_TOKEN=your-personal-access-token yarn release
```

Publish to npm:

```bash
npm publish --access public

# or using yarn
yarn publish --access public
```

### TODO

- [x] add tests
- [ ] add gitlab CI quality pipeline
- [ ] add gitlab CI release pipeline
- [x] add project docs and description

## License

[MIT ©](https://github.com/appKODE/pathfinder-web-core/blob/main/LICENCE)
npm package: @kode-frontend/pathfinder-web-local-storage
Description: Local storage adapter for pathfinder web
Author: KODE
Latest version: 1.0.1

# :construction: :construction: :construction: THIS PROJECT HAS EXPERIMENTAL STATUS, DON'T USE IT :construction: :construction: :construction:


# pathfinder-web-local-storage

## Summary

This is local storage adapter for pathfinder web.

Pathfinder is a tool for change base path of API requests on the fly.

This is a library for integrating a pathfinder into your application.  
The library is easy to integrate into an existing project and does not require any further development.

## Quick start

```sh
yarn add @kode-frontend/pathfinder-web-local-storage
```


## Release flow

Releases makes with release-it. 

1. Local release
   - Generate your personal access-token with `api` scope.
   - run `$ GITLAB_TOKEN=your-personal-access-token yarn release-it`
2. Build
   - `$ npm run build`
3. Publish to npm
   - `$ npm publish --access public`



## TODO

- [ ] add tests
- [ ] refactor all code
- [ ] add gitlab CI quality pipeline
- [ ] add gitlab CI release pipline
- [ ] add docs and description about project and other packages
npm package: @kode-frontend/pathfinder-web-open-api
Description: Open api resolver for pathfinder web
Author: KODE
Latest version: 0.1.1

# :construction: :construction: :construction: THIS PROJECT HAS EXPERIMENTAL STATUS, DON'T USE IT :construction: :construction: :construction:


# pathfinder-web-open-api

## Summary

This is open api resolver for pathfinder web.

Pathfinder is a tool for change base path of API requests on the fly.

This is a library for integrating a pathfinder into your application.  
The library is easy to integrate into an existing project and does not require any further development.

## Quick start

```sh
yarn add @kode-frontend/pathfinder-web-open-api
```


## Release flow

Releases makes with release-it. 

Local release
- Generate your personal access-token with `api` scope.
- run `$ GITLAB_TOKEN=your-personal-access-token yarn release-it`


## TODO

- [ ] add tests
- [ ] add gitlab CI quality pipeline
- [ ] add gitlab CI release pipline
- [ ] add docs and description about project and other packages
npm package: @kode-frontend/prettier-config
Description: Shareable Prettier config enforcing Prettier style and formatting
Author: KODE
Latest version: 0.0.2

Описание [на русском](https://github.com/appKODE/frontend-depend/blob/main/packages/prettier-config/docs/README-ru.md)

# @kode-frontend/prettier-config

[![Version][version-badge]][package]

## 📥 Install

Add `@kode-frontend/prettier-config` dependency to your project.

```shell
# Using npm
npm i --save-dev prettier @kode-frontend/prettier-config

# Using yarn
yarn add -D prettier @kode-frontend/prettier-config

# Using pnpm
pnpm add -D prettier @kode-frontend/prettier-config
```

## 🎮 Usage

There are three approaches to extend this shared config.

### 1. Reference it in your package.json

```json
{
  // ...
  "prettier": "@kode-frontend/prettier-config"
}
```

### 2. Use any of the supported extensions to export a string

```json
// .prettierrc.json

"@kode-frontend/prettier-config"
```

### 3. Overwrite some properties from the shared configuration

```javascript
//.prettierrc.js

module.exports = {
  ...require('@kode-frontend/prettier-config'),
  semi: true,
}
```

## 🙈 Ignoring Code

`Prettier` does not provide a full solution to share the `.prettierignore` file. But we can still share the file between projects using one of two approaches below.

### 1. Using `--ignore-path` CLI option

The simplest way to do this is using `--ignore-path` CLI option.

```bash
prettier ** --write --ignore-path node_modules/@kode-frontend/prettier-config/.prettierignore
```

By this way, there's no need to create a new file in your project folder. But you also can't extend the `.prettierignore` file.

### 2. Copy the ignore file to your project folder

If you want to extend the ignore file, run the following command in the root of your project folder:

```bash
# Unix
cp "node_modules/@kode-frontend/prettier-config\.prettierignore" ".prettierignore"

# Windows
copy "node_modules\@kode-frontend\prettier-config\.prettierignore" ".prettierignore"
```

It will copy the `.prettierignore` from `@kode-frontend/prettier-config` to your project root folder.

### Scripts

Some commonly used scripts in `package.json`.

```json
// package.json

{
  "scripts": {
    "prettier:fix": "prettier ** --write",
    "prettier:check": "prettier ** --list-different"
  }
}
```

[version-badge]: https://img.shields.io/npm/v/@kode-frontend/prettier-config.svg?style=flat-square
[package]: https://www.npmjs.com/package/@kode-frontend/prettier-config
npm package: @kode-frontend/react-native-last-active-state
Description: getter last active state time
Author: frontend-team@kode.ru
Latest version: 0.1.10

# react-native-last-active-state

The library determines the time of the last active state of the application.

## Motivation

When an application is destroyed, it does not receive control, thus there is no way to detect the time spent in an inactive state. This library remembers the time of the last active state, you can get it the next time you start the application.

## Installation

```sh
yarn add @kode-frontend/react-native-last-active-state
```

## Usage

```js
import LastActiveState from "@kode-frontend/react-native-last-active-state";

export default function App() {
    const [result, setResult] = React.useState<number | undefined>(
        LastActiveState.initialLastActiveTime
    );

    React.useEffect(() => {
        const listener = LastActiveState.addListener(({ lastActiveTime }) => {
            setResult(lastActiveTime);
        });
        return () => {
            listener.remove();
        };
    }, []);

  return (
        <View>
            <Text>Last active time: {result}</Text>
            <Button
                onPress={() =>
                Alert.alert(
                    'Last active time',
                    String(LastActiveState.getLastActiveTimeSync())
                )
                }
                title="Get last active time"
            />
        </View>
  );
}

```

## Available methods

| method                   | description                                                      |
| ------------------------ | ---------------------------------------------------------------- |
| addListener              | Subscribing to data changes                                      |
| getLastActiveTime        | Recommended method for getting the time of the last active state |
| getLastActiveTimeSync    | Synchronous method for getting the time of the last active state |

## Types

```ts

type LastActiveStateEvent = { lastActiveTime: number };

type LastActiveStateEventHandle = (e: LastActiveStateEvent) => void;

type LastActiveStateType = {
  getLastActiveTime: () => Promise<number>;
  getLastActiveTimeSync: () => number;
  initialLastActiveTime: number;
  addListener: (handle: LastActiveStateEventHandle) => EmitterSubscription;
};

```

## Tags

`release` - create release tag and increase version
npm package: @kode-frontend/svg-transformer
Description: CLI to optimize and convert SVGs to React/React Native components
Author: KODE
Latest version: 0.0.1

# @kode-frontend/svg-transformer 🚀

Easily convert SVGs into optimized React or React Native components with this CLI.

## 🌟 Why Use This?

With `@kode-frontend/svg-transformer`, you can:

- **Automatically optimize** icons for enhanced performance.
- **Create components effortlessly** for React or React Native.

## 🛠 Usage

Whether you want a quick one-off run or plan to integrate it into your project, `@kode-frontend/svg-transformer` has you covered.

### 📋 Without Installation

Run the CLI directly without installing it globally:

```bash
# Using npx
npx @kode-frontend/svg-transformer -i ./icons -o ./output -p react

# Using pnpm exec
pnpm exec @kode-frontend/svg-transformer -i ./icons -o ./output -p react

# Using yarn dlx
yarn dlx @kode-frontend/svg-transformer -i ./icons -o ./output -p react
```

### 🌍 Global Installation

Install globally to use the CLI anywhere:

```bash
# npm
npm install -g @kode-frontend/svg-transformer

# pnpm
pnpm add -g @kode-frontend/svg-transformer

# yarn
yarn global add @kode-frontend/svg-transformer
```

Run it globally:

```bash
@kode-frontend/svg-transformer -i ./icons -o ./output -p react
```

### 📦 Local Installation

Install as a development dependency in your project:

```bash
# npm
npm install --save-dev @kode-frontend/svg-transformer

# yarn
yarn add --dev @kode-frontend/svg-transformer

# pnpm
pnpm add -D @kode-frontend/svg-transformer
```

Run the CLI via npm scripts or a direct command:

```bash
# npm script
npm run @kode-frontend/svg-transformer -- -i ./icons -o ./output -p react

# yarn
yarn @kode-frontend/svg-transformer -i ./icons -o ./output -p react

# pnpm
pnpm @kode-frontend/svg-transformer -i ./icons -o ./output -p react
```

### ⚙️ Options

| Option        | Description                                           | Default  |
| ------------- | ----------------------------------------------------- | -------- |
| --input       | Input folder containing SVG files                     | ./icons  |
| --output      | **Output folder** to save React components            | ./output |
| --platform    | Target platform: **react** or **react-native**        | react    |
| --interactive | Run in interactive mode to configure options manually | false    |

### 🖐 Interactive Mode

Use interactive mode for guided configuration:

```bash
npx @kode-frontend/svg-transformer --interactive
```
npm package: @kode-frontend/timeout-interceptor
Description: timeout interceptor for handling jwt token update flow
Author: KODE
Latest version: 0.0.1

# Timeout-interceptor

[![Version][version-badge]][package]

## ℹ️ Why?

Axios always return `ERR_NETWORK` code of instead `ETIMEDOUT` even if you set `transitional: { clarifyTimeoutError: true }` for android,
because RN hasn't consistent behavior for XMLHttpRequest.ontimeout callback.
Check it here - https://github.com/facebook/react-native/issues?q=xmlhttprequest+timeout+android

To accurately detect a timeout error, you can using `timeout-interceptor`

## 📥 Install

Add `@kode-frontend/timeout-interceptor` dependency to your project.

```shell
# Using npm
npm i @kode-frontend/timeout-interceptor

# Using yarn
yarn add @kode-frontend/timeout-interceptor

# Using pnpm
pnpm add @kode-frontend/timeout-interceptor
```

## 🎮 Usage

```typescript
import {
  startTimeoutInterceptor,
  isTimeoutError,
} from '@kode-frontend/timeout-interceptor'

// Init interceptor
useEffect(() => {
  const clearInterceptor = startTimeoutInterceptor(axiosInstance)

  return () => {
    clearInterceptor()
  }
}, [])

// Usage with request
async function getUser() {
  try {
    return await axios.get('/user?ID=12345')
  } catch (error) {
    if (isTimeoutError(error)) {
      // to do something for timeout
    }
  }
}
```

# TODO

- [ ] Tests

[version-badge]: https://img.shields.io/npm/v/@kode-frontend/timeout-interceptor.svg?style=flat-square
[package]: https://www.npmjs.com/package/@kode-frontend/timeout-interceptor