open-index/open-npm huggingface dataset:
npm package: @kt-web-tracing/core
Description: 基于 JS 跨平台插件，为前端项目提供【 埋点、行为、性能、异常、请求、资源、路由、曝光、录屏 】监控手段
Author: luoyanbo@gdcattsoft.com
Latest version: 1.0.22

# kt-web-tracing 前端监控插件

本项目是基于[web-tracing](https://m-cheng-web.github.io/web-tracing/)的二次开发版本，针对监控配置管理、用户事件采集进行了功能拓展和优化。

主要新增/改进包括：

- 将监控配置持久化存储，提供图形化界面修改配置
- 添加了用户输入事件采集
- 调整了部分事件的采集指标

## 包总览

```bash
// 核心实现包 - js
pnpm install @kt-web-tracing/core

// vue2版本
pnpm install @kt-web-tracing/vue2

// vue3版本
pnpm install @kt-web-tracing/vue3
```
npm package: @kt-web-tracing/vue2
Description: 基于 JS 跨平台插件，为前端项目提供【 埋点、行为、性能、异常、请求、资源、路由、曝光、录屏 】监控手段 - vue2版本
Author: luoyanbo@gdcattsoft.com
Latest version: 1.0.22

<div align="center">
  <img src="https://github.com/M-cheng-web/image-provider/raw/main/web-tracing/logo.7k1jidnhjr40.svg" width="128" alt="logo" />
  <h1>web-tracing 监控插件 - vue2版本</h1>
  <p>
    基于 JS 跨平台插件，为前端项目提供【 埋点、行为、性能、异常、请求、资源、路由、曝光、录屏 】监控手段
  </p>
</div>

## 官方文档
[官方文档 https://m-cheng-web.github.io/web-tracing/](https://m-cheng-web.github.io/web-tracing/)

## 示例项目(本地)
[js版本 https://github.com/M-cheng-web/web-tracing-examples-js](https://github.com/M-cheng-web/web-tracing-examples-js)

[vue2版本 https://github.com/M-cheng-web/web-tracing-examples-vue2](https://github.com/M-cheng-web/web-tracing-examples-vue2)

[vue3版本 https://github.com/M-cheng-web/web-tracing-examples-vue3](https://github.com/M-cheng-web/web-tracing-examples-vue3)

## 演示
### 事件监听
<img src="https://cdn.staticaly.com/gh/M-cheng-web/image-provider@main/web-tracing/image.78d02ro0pyo0.webp" width="1200" alt="logo" />

### 错误监听
<img src="https://cdn.staticaly.com/gh/M-cheng-web/image-provider@main/web-tracing/Jul-31-2023-20-41-51.4dr4i0vaypw0.gif" width="1200" alt="logo" />

### 资源监听
<img src="https://cdn.staticaly.com/gh/M-cheng-web/image-provider@main/web-tracing/image.6he8u6xbh000.webp" width="1200" alt="logo" />


## 项目初衷
为了帮助开发们在公司平台上搭建一套前端监控平台

> 作者心声: 想降低一下前端在这方面耗费的时间与精力，此项目会尽量针对每个场景都提供解决方案；即使最后没用我这套，但从在这里对某些场景方案有了一些了解，我也很开心

## 亮点
提供了多种定制化api最大限度帮助你应付各个场景的业务，例如:
+ 提供钩子函数让你对数据精确把握
+ 提供本地化选项api，让开发手动控制去发送监控数据 - 节省带宽
+ 提供批量错误api，在遇到无限错误时融合批量错误信息 - 节省带宽
+ 提供抽样发送api - 节省带宽
+ 提供 错误/请求 事件的过滤api
+ 等等....

站在技术角度，因为明确此项目可能更多的是应用在公司平台上，大概率会二开，所以作者对项目结构以及代码都严格要求
+ 架构 - demo、核心sdk代码、文档都在同一个项目中，调试、部署都很方便
+ 封装 - sdk存在大量的重写或者监听，对此有统一流程
+ 响应式 - 项目内部实现了vue响应式，也应用在 options 对象中，相信你接触会后受益良多
+ 多版本 - 针对不同平台提供多个版本(目前只有js、vue2、vue3)，受益于monorepo架构可一键发布
+ 内聚 - 目前核心功能的所有代码都没有分包，虽然monorepo架构支持，但作者认为目前分包不利于代码阅读以及二开方便
+ 文档/注释 - 完善的文档以及非常全的注释，力求帮助你快速了解这一切

## 未来方向
会写一套服务端(nest) + 后台查看监控数据平台(vue)，有以下几点考量
+ 提供服务端能力（目前只是在采集端发力）
+ 可以在线体验此项目
+ 提供更多示例代码给开发们，再次降低这一套代码在公司的推广难度
+ 作者也想站在业务的角度多思考还能从哪些方面此项目还缺失哪些功能

针对首屏加载的监控做出更多精细化的东西，例如考虑sdk的绝对轻量化

## 加入我们
<img align="left" width="180" src="https://cdn.staticaly.com/gh/M-cheng-web/image-provider@main/web-tracing/image.18h5172x1bk0.webp" />

- 如果对此项目有疑虑或者有优化点，欢迎进群讨论
- Bug 反馈请直接去 Github 上面提 Issues，我会实时收到邮件提醒前去查看

<br/>
<br/>
<br/>
<br/>
<br/>

## 🙏🙏🙏 点个Star

**如果您觉得这个项目还不错, 可以在 [Github](https://github.com/M-cheng-web/web-tracing) 上面帮我点个`star`, 支持一下作者ヾ(◍°∇°◍)ﾉﾞ**

<br/>

## 特别感谢
+ [xy-sea](https://github.com/xy-sea)为我提供了很多好主意，这是他的关于[监控平台文章以及blog](https://github.com/xy-sea/blog/blob/main/markdown/%E4%BB%8E0%E5%88%B01%E6%90%AD%E5%BB%BA%E5%89%8D%E7%AB%AF%E7%9B%91%E6%8E%A7%E5%B9%B3%E5%8F%B0%EF%BC%8C%E9%9D%A2%E8%AF%95%E5%BF%85%E5%A4%87%E7%9A%84%E4%BA%AE%E7%82%B9%E9%A1%B9%E7%9B%AE.md)，写的很好受益匪浅
+ [wangshitao929@163.com](wangshitao929@163.com)
npm package: @kt-web-tracing/vue3
Description: 基于 JS 跨平台插件，为前端项目提供【 埋点、行为、性能、异常、请求、资源、路由、曝光、录屏 】监控手段 - vue3版本
Author: luoyanbo@gdcattsoft.com
Latest version: 1.0.22

<div align="center">
  <img src="https://github.com/M-cheng-web/image-provider/raw/main/web-tracing/logo.7k1jidnhjr40.svg" width="128" alt="logo" />
  <h1>web-tracing 监控插件 - vue3版本</h1>
  <p>
    基于 JS 跨平台插件，为前端项目提供【 埋点、行为、性能、异常、请求、资源、路由、曝光、录屏 】监控手段
  </p>
</div>

## 官方文档
[官方文档 https://m-cheng-web.github.io/web-tracing/](https://m-cheng-web.github.io/web-tracing/)

## 示例项目(本地)
[js版本 https://github.com/M-cheng-web/web-tracing-examples-js](https://github.com/M-cheng-web/web-tracing-examples-js)

[vue2版本 https://github.com/M-cheng-web/web-tracing-examples-vue2](https://github.com/M-cheng-web/web-tracing-examples-vue2)

[vue3版本 https://github.com/M-cheng-web/web-tracing-examples-vue3](https://github.com/M-cheng-web/web-tracing-examples-vue3)

## 演示
### 事件监听
<img src="https://cdn.staticaly.com/gh/M-cheng-web/image-provider@main/web-tracing/image.78d02ro0pyo0.webp" width="1200" alt="logo" />

### 错误监听
<img src="https://cdn.staticaly.com/gh/M-cheng-web/image-provider@main/web-tracing/Jul-31-2023-20-41-51.4dr4i0vaypw0.gif" width="1200" alt="logo" />

### 资源监听
<img src="https://cdn.staticaly.com/gh/M-cheng-web/image-provider@main/web-tracing/image.6he8u6xbh000.webp" width="1200" alt="logo" />


## 项目初衷
为了帮助开发们在公司平台上搭建一套前端监控平台

> 作者心声: 想降低一下前端在这方面耗费的时间与精力，此项目会尽量针对每个场景都提供解决方案；即使最后没用我这套，但从在这里对某些场景方案有了一些了解，我也很开心

## 亮点
提供了多种定制化api最大限度帮助你应付各个场景的业务，例如:
+ 提供钩子函数让你对数据精确把握
+ 提供本地化选项api，让开发手动控制去发送监控数据 - 节省带宽
+ 提供批量错误api，在遇到无限错误时融合批量错误信息 - 节省带宽
+ 提供抽样发送api - 节省带宽
+ 提供 错误/请求 事件的过滤api
+ 等等....

站在技术角度，因为明确此项目可能更多的是应用在公司平台上，大概率会二开，所以作者对项目结构以及代码都严格要求
+ 架构 - demo、核心sdk代码、文档都在同一个项目中，调试、部署都很方便
+ 封装 - sdk存在大量的重写或者监听，对此有统一流程
+ 响应式 - 项目内部实现了vue响应式，也应用在 options 对象中，相信你接触会后受益良多
+ 多版本 - 针对不同平台提供多个版本(目前只有js、vue2、vue3)，受益于monorepo架构可一键发布
+ 内聚 - 目前核心功能的所有代码都没有分包，虽然monorepo架构支持，但作者认为目前分包不利于代码阅读以及二开方便
+ 文档/注释 - 完善的文档以及非常全的注释，力求帮助你快速了解这一切

## 未来方向
会写一套服务端(nest) + 后台查看监控数据平台(vue)，有以下几点考量
+ 提供服务端能力（目前只是在采集端发力）
+ 可以在线体验此项目
+ 提供更多示例代码给开发们，再次降低这一套代码在公司的推广难度
+ 作者也想站在业务的角度多思考还能从哪些方面此项目还缺失哪些功能

针对首屏加载的监控做出更多精细化的东西，例如考虑sdk的绝对轻量化

## 加入我们
<img align="left" width="180" src="https://cdn.staticaly.com/gh/M-cheng-web/image-provider@main/web-tracing/image.18h5172x1bk0.webp" />

- 如果对此项目有疑虑或者有优化点，欢迎进群讨论
- Bug 反馈请直接去 Github 上面提 Issues，我会实时收到邮件提醒前去查看

<br/>
<br/>
<br/>
<br/>
<br/>

## 🙏🙏🙏 点个Star

**如果您觉得这个项目还不错, 可以在 [Github](https://github.com/M-cheng-web/web-tracing) 上面帮我点个`star`, 支持一下作者ヾ(◍°∇°◍)ﾉﾞ**

<br/>

## 特别感谢
+ [xy-sea](https://github.com/xy-sea)为我提供了很多好主意，这是他的关于[监控平台文章以及blog](https://github.com/xy-sea/blog/blob/main/markdown/%E4%BB%8E0%E5%88%B01%E6%90%AD%E5%BB%BA%E5%89%8D%E7%AB%AF%E7%9B%91%E6%8E%A7%E5%B9%B3%E5%8F%B0%EF%BC%8C%E9%9D%A2%E8%AF%95%E5%BF%85%E5%A4%87%E7%9A%84%E4%BA%AE%E7%82%B9%E9%A1%B9%E7%9B%AE.md)，写的很好受益匪浅
+ [wangshitao929@163.com](wangshitao929@163.com)
npm package: @kt3k/conditional-exports-example
Description: Example of [conditional exports](https://nodejs.org/api/packages.html#packages_conditional_exports).
Latest version: 0.1.1

# @kt3k/conditional-exports-example

Example of
[conditional exports](https://nodejs.org/api/packages.html#packages_conditional_exports).

```js
import x from "@kt3k/conditional-exports-example";
console.log(x); // => "mjs"
```

```js
const x = require("@kt3k/conditional-exports-example");
console.log(x); // => "cjs"
```

# LICENSE

MIT
npm package: @kt3k/deno-bin-test-1
Description: CLI wrapper for Deno, a secure runtime for JavaScript and TypeScript
Author: Yoshiya Hinosawa
Latest version: 2.3.7

# deno-bin

> Use [Deno][] via npm

You can use [deno][] via npm or npx.

Note: This module installs deno at `node_modules/deno-bin/bin/deno`, and you can use it via npx or npm's run-script.

# Usage via npx

`npx deno-bin` works like `deno` executable. For example, you can run a deno script `https://deno.land/std/examples/welcome.ts` like the below:

```shellsession
$ npx deno-bin run https://deno.land/std/examples/welcome.ts
Welcome to Deno!
```

You can also start repl:

```shellsession
$ npx deno-bin
Deno 1.1.0
exit using ctrl+d or close()
>
```

You can also use deno tools:
```
npx deno-bin fmt             # Formats script
npx deno-bin lint --unstable # Checks lint rules
```

# Usage via run-scripts

Use in `scripts` in package.json.

First install `deno-bin`:

```sh
npm i --save-dev deno-bin
```

(Note: This installs `deno` executable at `node_modules/deno-bin/bin/deno` internally.)

Then use `deno` in your "scripts".

package.json:

```json
{
  ...
  "scripts": {
    "foo": "deno run some-script.ts"
  },
  ...
}
```

Then hit the command `npm run foo`, and it executes `deno run some-script.ts` with locally installed deno.

# Ideas of usages

## Use `deno lint` in your node.js project

You can format your scripts with `deno lint` which is faster than prettier. (`deno lint` uses [dprint][] internally, which is mostly compatible with prettier and is implemented in Rust.)

```json
{
  "scripts": {
    "fmt": "deno fmt src"
  }
}
```

## Run some utility scripts

When you need some utility scripts in your repository, you can use deno for it. Because Deno can run typescript out of the box, you can skip any settings about typescript.

```json
{
  "scripts": {
    "task": "deno run ./tools/some-task.ts"
  }
}
```

# About the version of deno

`deno-bin` downloads the same version of `deno` executable as its own version number. For example, if you install `deno-bin@1.8.1`, you'll get deno `v1.8.1`.

# License

MIT

# History

- 2021-04-26 Windows support [#4](https://github.com/kt3k/deno-bin/pull/4)

[deno]: https://deno.land
[dprint]: https://dprint.dev/
npm package: @kt3k/proto-polyfill
Description: Provide __proto__ with some limitations
Author: Yoshiya Hinosawa
Latest version: 1.0.0

# proto-polyfill &middot; [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/webcarrot/proto-polyfill/blob/master/LICENSE) [![npm version](https://img.shields.io/npm/v/proto-polyfill.svg?style=flat)](https://www.npmjs.com/package/proto-polyfill)

Provide `__proto__` with some limitations

## browsers that need this polyfill

In general old browsers that **not** provide legacy `__proto__` and **support** `Object.defineProperty`, `Object.getPrototypeOf`, `Object.getOwnPropertyNames`, `Object.getOwnPropertyDescriptor` and `Object.create`:

- IE 9
- IE 10

IE 8 is **not** supported.

### why and when

If you do things like:
./tests/class-like.js
or (ES6 version):

```js
class X {
  static get foo() {
    return "xFoo";
  }
  get foo() {
    return this.constructor.foo + " by instance!";
  }
}
X.s = { s: "x" };
X.f = "X";
class Y extends X {
  static get foo() {
    return this.__proto__.foo + " > yFoo";
  }
}
Y.s = {
  s: "y"
};
Y.f = "Y";
class Z extends Y {
  static get foo() {
    return this.__proto__.foo + " > zFoo";
  }
  get foo() {
    return "My special Z foo " + super.foo;
  }
}
Z.f = "Z";
var x = new X();
var y = new Y();
var z = new Z();
console.log(x.foo); // xFoo by instance!
console.log(y.foo); // xFoo > yFoo by instance!
console.log(z.foo); // My special Z foo xFoo > yFoo > zFoo by instance!
console.log(x.constructor.s.s); // x
console.log(x.constructor.f); // X
console.log(y.constructor.s.s); // y
console.log(y.constructor.f); // Y
console.log(z.constructor.s.s); // y
console.log(z.constructor.f); // Z
```

...and code produced by compliler ( babel 6.x ) not work properly in old browsers like ie9-10.

## installation

`npm install --save-dev proto-polyfill`

And use like polyfill...

## limitations

Look at ./tests/limitations.js

```js
var x = {
  a: "xa"
};
function X() {}
X.prototype.a = "Xa";
X.prototype.cv = "XCV";
X.prototype.ab = function() {
  return "ab:" + this.a;
};
Object.defineProperty(X.prototype, "c", {
  get: function() {
    return this.ab() + ":" + this.cv;
  }
});
// no way to replace object prototype "in place" ?
x.__proto__ = X.prototype;
console.log(x instanceof X); // invalid log: false should true
// but some kind emulation works
console.log(x.a); // ok log: "xa";
console.log(x.ab()); // ok log: "ab:xa";
console.log(x.c); // ok log: "ab:xa:XCV";
// normal instance
var iX = new X();
console.log(iX instanceof X); // ok log: true
console.log(iX.a); // ok log: "Xa";
console.log(iX.ab()); // ok log: "ab:Xa";
console.log(iX.c); // ok log: "ab:Xa:XCV";
// override
X.prototype.cv = "XCV2";
console.log(x.c); // ok log: "ab:xa:XCV2";
x.cv = "XCV3";
console.log(x.c); // ok log: "ab:xa:XCV3";
// but
X.prototype.newProp = "newProp";
console.log(x.newProp); // invalid log: undefined should "newProp";
```

### Pseudo Symbol()

Pseudo `Symbol()` props are skipped (core-js Set polyfill use it)

### Object.setPrototypeOf

Only emultation

### Object.getPrototypeOf

Override to make super() work in Babel 7

## tests

`./tests/index.html`

PR welcome.
npm package: @kt3k/puncher
Description: A nice punching of characters and images.
Author: Yoshiya Hinosawa
Latest version: 7.0.1

# puncher v7.0.1

> Punching characters and images.

***Note*** This library depends on jquery, class-component and cc-event.

# Usage

```html
<script src="path/to/jquery.js"></script>
<script src="path/to/class-component.js"></script>
<script src="path/to/cc-event.js"></script>
<script src="path/to/puncher.js"></script>

<div class="puncher" unit-dur="120">Hello, world! <img src="foo.png" /></div>
```

This prints `Hello, world!` letter by letter and the image "foo.png". Each letter displays with 120ms delay from the previous letter. This timing is configurable with the `unit-dur` attributes of the above example. The image tag (or any other tag) counts as a single character.

### Via npm

In command line:

    npm install jquery class-component cc-event @kt3k/puncher

In script:

```js
global.jQuery = require('jquery')
require('class-component')
require('cc-event')
require('@kt3k/puncher')
```

In html:

```html
<div class="puncher" unit-dur="120">Hello, world! <img src="foo.png" /></div>
```

This prints `Hello, world!` letter by letter and the image "foo.png". Each letter displays with 120ms delay from the previous letter. This timing is configurable with the `unit-dur` attributes of the above example. The image tag (or any other tag) counts as a single character.

# API Reference

```html
<dic class="puncher" unit-dur="120"></div>
```

## Attributes

### unit-dur

`unit-dur` means the unit duration of punching of characters.

## Events

### event 'puncher.start'

When this event is triggered on the element, the punching starts.

### event 'puncher.started'

This event is triggered when the punching starts.

### event 'puncher.ended'

This event is triggered when the punching ends.

### event 'puncher.appended'

This event is triggered on the appended element when it's appended.

# LICENSE

MIT
npm package: @kt3k/subcommand
Description: Utility for dispatching subcommand based on filename
Author: Yoshiya Hinosawa
Latest version: 1.0.1

# @kt3k/subcommand v1.0.1

[![ci](https://github.com/kt3k/subcommand/actions/workflows/ci.yml/badge.svg)](https://github.com/kt3k/subcommand/actions/workflows/ci.yml)
[![codecov](https://codecov.io/gh/kt3k/subcommand/branch/main/graph/badge.svg)](https://codecov.io/gh/kt3k/subcommand)

> Utility for dispatching subcommand based on filename

# Install

    npm install @kt3k/subcommand

# Usage

First set up the directory like the following:

```
bin/
├── main.js
└── actions
    ├── foo.js
    ├── bar.js
    └── baz.js
```

Then in main.js:

```js
const argv = require('minimist')(process.argv.slice(2))
const subcommand = require('@kt3k/subcommand')

subcommand(__dirname, {
  foo: argv.foo,
  bar: argv.bar,
  [argv._.[0]]: true
}, actionFunc => {
  actionFunc(argv)
}).on('no-action', action => {
  console.log(`No such action: ${action}`)
})
```

actions/foo.js:

```js
module.exports = () => console.log("foo!");
```

actions/bar.js:

```js
module.exports = ({ name }) => console.log(`Hello, ${name}!`);
```

actions/baz.js:

```js
module.exports = () => console.log("baz");
```

Then, main.js works like the following:

    $ node main.js --foo
    foo!
    $ node main.js --bar --name John
    Hello, John!
    $ node main.js baz
    baz!
    $ node main.js spam
    No such action: spam

# API

```js
const subcommand = require("@kt3k/subcommand");
```

## subcommand(dir, actionDefinition, options, callback)

- @param {string} dir The directory to look up actions
- @param {object} actionDefinition The definition of the action selection
- @param {object} options The options
- @param {Function} callback The callback of the action
- @param {string} [options.actions] The directory under which it look for the
  action files. Default is `{minirocket's callers dir}/actions`.
- @return {Minirocket} Minirocket class instance

This invokes the action function with the given argv.

`actionDefinition` is an object. The each key should have a boolean value. The
first key which has true (or truthy value) is chosen as the action name. If none
of the keys have truthy values then it throws an error.

Then it look for the .js file under the `./actions` directory (this is
configurable by the options.actions). If it finds the `actionName`.js, then
`require`s it and passes it to the given callback function. If it cannot find
it, then it emits 'no-action' event.

## no-action event

`no-action` event is emitted on `Minirocket` object with the value of the given
action name.

# Example

- [bulbo](https://github.com/kt3k/bulbo)
  - https://github.com/kt3k/bulbo/blob/master/src/bin/bulbo.js

# License

MIT
npm package: @kt87m/fizzbuzz
Description: A JavaScript implementation of FizzBuzz.
Author: kt87m
Latest version: 1.0.0

# fizzbuzz

A JavaScript implementation of FizzBuzz.

## Installation

```sh
$ npm install @kt87m/fizzbuzz
```

## Usage

### In JavaScript code

```js
const fizzbuzz = require('@kt87m/fizzbuzz')
fizzbuzz(1) // '1'
fizzbuzz(2) // '2'
fizzbuzz(3) // 'Fizz'
fizzbuzz(5) // 'Buzz'
fizzbuzz(15) // 'FizzBuzz'
```

### From the command line

```sh
$ npx fizzbuzz 1
1
$ npx fizzbuzz 2
2
$ npx fizzbuzz 3
Fizz
$ npx fizzbuzz 5
Buzz
$ npx fizzbuzz 15
FizzBuzz
```
npm package: @kt_tech/chakra-ui-anatomy
Description: The anatomy of all chakra components
Author: hojeong im
Latest version: 2.2.2
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# @chakra-ui/anatomy

This package declares the anatomy for the Chakra UI components.

It was inspired the `::part()` selector from the
[W3C CSS Shadow Parts Draft](https://www.w3.org/TR/css-shadow-parts-1/) with
data-attributes.

> This is an internal utility, not intended for public usage.

## Installation

```sh
yarn add @chakra-ui/anatomy
# or
npm i @chakra-ui/anatomy
```

## Contribution

Yes please! See the
[contributing guidelines](https://github.com/chakra-ui/core/blob/main/CONTRIBUTING.md)
for details.

## Licence

This project is licensed under the terms of the
[MIT license](https://github.com/chakra-ui/core/blob/main/LICENSE).
npm package: @ktaicoder/hcp-client-browser
Description: - HCP 클라이언트 라이브러리 입니다. 브라우저에서 사용합니다.
Latest version: 1.0.1

# Hcp client browser

- HCP 클라이언트 라이브러리 입니다. 브라우저에서 사용합니다.

## 설치

```
$  yarn add @ktaicoder/hcp-client-browser
```

## example

대략 다음과 같이 작성할 수 있습니다.
완전한 코드는 `example/app.js` 파일을 참고하세요.

```js

async function main() {
    const client = new HcpClient(`ws://127.0.0.1:13997`)
    client.observeConnectionStatus().subscribe((status) => {
        // "DISCONNECTED" | "CONNECTING" | "PREPARING" | "CONNECTED"
        console.log(`status changed: ${status}`)
    })

    client.connect()
    await client.waitForConnected()
    const response = await client.requestHwControl("wiseXboard.digitalWrite", 1, 1)
    // response is HcpPacket object
}
```
npm package: @ktaicoder/hcp-webserial
Description: ## 개요
Author: ktaicoder
Latest version: 1.0.21

# AI 코디니 웹시리얼 라이브러리

## 개요

-   AI 코딩블록 사이트와 연동하는 웹시리얼 라이브러리입니다.
-   보통 일반 사용자들은 사용할 필요가 없습니다.

## 설치 방법

-   다음과 같이 설치할 수 있다.

```bash
$  yarn add @ktaicoder/hcp-webserial
```

## NPM 링크

https://www.npmjs.com/package/@ktaicoder/hcp-webserial
npm package: @ktaicoder/hw-control
Description: KT AI Block coding hardware control
Author: ktaicoder
Latest version: 1.0.29

# AI 코디니 하드웨어 제어 by serialport

## 개요

- `AI 코디니` 사이트와 연동하는 하드웨어를 제어 라이브러리 입니다.
- NodeJS 환경에서 동작하며, `serialport` 라이브러리를 이용합니다.
- `코디니팩(NodeJS)`이나 `하드웨어 제어 PC프로그램(electron)`에서 사용합니다.
- 보통 일반 사용자들은 직접 사용할 필요가 없습니다.

## 설치

- 사전에 `peerDependencies`를 설치해야 합니다.
- 아래와 같이 설치해 주세요.

```bash
yarn add @ktaicoder/hw-proto rxjs@^7 serialport@^9
```


- `hw-control` 라이브러리는 다음과 같이 설치할 수 있습니다.

```bash
yarn add @ktaicoder/hw-control
```

## NPM 링크

https://www.npmjs.com/package/@ktaicoder/hw-control
npm package: @ktaicoder/hw-proto
Description: KT AI Block coding hardware control
Author: ktaicoder
Latest version: 1.0.15

# AI 코딩블록 하드웨어 인터페이스

## 개요

- AI 코딩블록 사이트와 연동하는 하드웨어에 대한 통신 인터페이스입니다.
- `코딩팩`과 `AI 코딩블록` 웹사이트에서 사용합니다.
- 보통 일반 사용자들은 사용할 필요가 없습니다.


## 설치 방법

- 다음과 같이 설치할 수 있다.

```bash
$  yarn add @ktaicoder/hw-proto@^1
```

## NPM 링크

https://www.npmjs.com/package/@ktaicoder/hw-proto
npm package: @ktam/lint-node
Description: ESLint and Prettier configs for ESM Node.JS projects
Author: Kingston Tam
Latest version: 0.6.0

# @ktam/lint-node

This package provides a reusable set of **ESLint** and **Prettier** configurations for **ESM Node.js** projects.

## Features

- **ESLint configuration** tailored for ESM-based Node.js projects.
- **Prettier configuration** with enforced code style rules.
- Compatibility with **Vitest** for testing and **Unicorn** for improving code quality.
- **Prettier Plugin** for formatting and automatically sorting `package.json` properties.

## Installation

To install this package, you'll need **pnpm** (version 10 or higher) and **Node.js** (version 24 or higher):

```bash
pnpm add -D @ktam/lint-node
```

Ensure your project is using **TypeScript** and **ESLint** compatible versions:

```bash
pnpm add -D typescript eslint
```

## Usage

### ESLint Configuration

To use the **ESLint** configuration, create an `eslint.config.js` in the root of your project and import the configuration:

```js
export { default } from '@ktam/lint-node/eslint';
```

You can adjust or extend the configuration if needed by modifying the imported rules.

### Prettier Configuration

To apply the **Prettier** configuration, create a `prettier.config.js` file in the root of your project and import the configuration:

```js
export { default } from '@ktam/lint-node/prettier';
```

## File Structure

- `eslint.config.base.js`: Base ESLint configuration, including rules for JavaScript, TypeScript, and Node.js projects.
- `prettier.config.base.js`: Base Prettier configuration enforcing code styles such as 2-space tabs, single quotes, and trailing commas.

## Configuration Highlights

- **ESLint**:
  - Enforces best practices for JavaScript and TypeScript.
  - Integrates TypeScript linting via `@typescript-eslint` for stricter type checks.
  - Includes **Unicorn** and **Perfectionist** plugins for improved code quality and import/export ordering.
  - Custom rules to ensure concise, maintainable code (e.g., disallowing `console.log`, enforcing template literals).
  - Special configurations for **Vitest** testing files.

- **Prettier**:
  - Ensures consistent formatting across JavaScript, TypeScript, and `package.json` files.
  - Uses `prettier-plugin-packagejson` to format `package.json`.

## Peer Dependencies

Ensure you have the following peer dependencies installed:

- `eslint@^9.39`
- `prettier@^3.8`
- `typescript@^5.9.3`
npm package: @ktantod/nabla-nhc
Description: - starts the dev server on port 8081 - proxies /api requests to the NHC TOOLS SERVER on port 3000 - example test URL: http://localhost:8081/?nablaUserId={nablaUserId}&encounterid={encounterid}&userid={userid}&userName={userName}
Latest version: 1.0.26

#make dev

- starts the dev server on port 8081
- proxies /api requests to the NHC TOOLS SERVER on port 3000
- example test URL: http://localhost:8081/?nablaUserId={nablaUserId}&encounterid={encounterid}&userid={userid}&userName={userName}

#make push

- builds the app
- publishes the app
- pushes to bitbucket
npm package: @ktarmyshov/assert
Description: Assert module for Node.js, JavaScript, and TypeScript similar to nide:assert, to be used in server and browser environments.
Author: Konstantin Tarmyshov
Latest version: 0.1.9

[![NPM Version](https://img.shields.io/npm/v/%40ktarmyshov%2Fassert)](https://www.npmjs.com/package/@ktarmyshov/assert)
[![CI](https://github.com/kt-npm-modules/assert/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/kt-npm-modules/assert/actions/workflows/ci.yml)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=kt-npm-modules_assert&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=kt-npm-modules_assert)
[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=kt-npm-modules_assert&metric=bugs)](https://sonarcloud.io/summary/new_code?id=kt-npm-modules_assert)
[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=kt-npm-modules_assert&metric=code_smells)](https://sonarcloud.io/summary/new_code?id=kt-npm-modules_assert)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=kt-npm-modules_assert&metric=coverage)](https://sonarcloud.io/summary/new_code?id=kt-npm-modules_assert)
[![Duplicated Lines (%)](https://sonarcloud.io/api/project_badges/measure?project=kt-npm-modules_assert&metric=duplicated_lines_density)](https://sonarcloud.io/summary/new_code?id=kt-npm-modules_assert)
[![Socket Badge](https://socket.dev/api/badge/npm/package/@ktarmyshov/assert)](https://socket.dev/npm/package/@ktarmyshov/assert/overview)

# assert

Assert library with functions similar to node:assert library
npm package: @ktarmyshov/income-tax
Description: A Node.js library for calculating income tax.
Author: Konstantin Tarmyshov
Latest version: 0.1.9

[![NPM Version](https://img.shields.io/npm/v/%40ktarmyshov%2Fincome-tax)](https://www.npmjs.com/package/@ktarmyshov/income-tax)
[![CI](https://github.com/kt-npm-modules/income-tax/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/kt-npm-modules/income-tax/actions/workflows/ci.yml)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=kt-npm-modules_income-tax&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=kt-npm-modules_income-tax)
[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=kt-npm-modules_income-tax&metric=bugs)](https://sonarcloud.io/summary/new_code?id=kt-npm-modules_income-tax)
[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=kt-npm-modules_income-tax&metric=code_smells)](https://sonarcloud.io/summary/new_code?id=kt-npm-modules_income-tax)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=kt-npm-modules_income-tax&metric=coverage)](https://sonarcloud.io/summary/new_code?id=kt-npm-modules_income-tax)
[![Duplicated Lines (%)](https://sonarcloud.io/api/project_badges/measure?project=kt-npm-modules_income-tax&metric=duplicated_lines_density)](https://sonarcloud.io/summary/new_code?id=kt-npm-modules_income-tax)
[![Socket Badge](https://socket.dev/api/badge/npm/package/@ktarmyshov/income-tax)](https://socket.dev/npm/package/@ktarmyshov/income-tax/overview)

# income-tax

Income tax calculator.
Supported countries:

- Germany
  - Model as of 2021 for income tax and solidarity surcharge
  - Included parameters for years
    - 2021
    - 2025

# Usage

## Germany/DE

```ts
import { DEIncome, deIncomeTaxV2021 } from '@ktarmyshov/income-tax';
// or
import { DEIncome, deIncomeTaxV2021 } from '@ktarmyshov/income-tax/de';

// Single
const tax = deIncomeTaxV2021(2025, { income: 50000 });
// Split
const tax = deIncomeTaxV2021(2025, { income: 50000 }, { split: true });
// Custom parameters for taxation if not included in the package
const tax = deIncomeTaxV2021(
	2023,
	{ income: 50000 },
	{
		split: true,
		incomeTaxParams: {
			0: {
				boundary: 10908
			},
			// Year 2023, zone 1
			// ESt = (979,18 * y + 1.400) * y
			// y = (zvE - 10.908) / 10.000
			1: {
				boundary: 15999,
				params: {
					subtractor: 10908,
					progression: 979.18,
					constant: 1400
				}
			},
			// year 2023, zone 2
			// ESt = (192,59 * z + 2.397) * z + 966,53
			// z = (zvE - 15.999) / 10.000
			2: {
				boundary: 62809,
				params: {
					subtractor: 15999,
					progression: 192.59,
					constant: 2397
				}
			},
			3: {
				boundary: 277825,
				params: {
					percentage: 0.42
				}
			},
			4: {
				params: {
					percentage: 0.45
				}
			}
		},
		solidaritySurchargeParams: {
			zeroBoundary: 17543,
			mitigationZoneBoundary: 32619,
			mitigationZoneRate: 0.119
		}
	}
);
```
npm package: @ktarmyshov/npm-typescript-template
Description: Template repository for npm packages written in TypeScript
Author: Konstantin Tarmyshov
Latest version: 0.0.17

[![NPM Version](https://img.shields.io/npm/v/%40ktarmyshov%2Fnpm-typescript-template)](https://www.npmjs.com/package/@ktarmyshov/npm-typescript-template)
[![CI](https://github.com/kt-npm-modules/npm-typescript-template/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/kt-npm-modules/npm-typescript-template/actions/workflows/ci.yml)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=kt-npm-modules_npm-typescript-template&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=kt-npm-modules_npm-typescript-template)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=kt-npm-modules_npm-typescript-template&metric=coverage)](https://sonarcloud.io/summary/new_code?id=kt-npm-modules_npm-typescript-template)
[![License](https://img.shields.io/npm/l/@ktarmyshov/npm-typescript-template)](./LICENSE)

# npm-typescript-template

Template repo for an NPM module in typescript

- Version tracking with changeset
- Dependabot updates & auto-generation of changesets
- Format on save with eslint in vscode
- Monthly auto-release, if only dependabot changes are included
- Example for checking changes in subpackage folder since last successfull run in the context of `push` or `pull_request` events

# Check if subpackage test will run

Changes if this changes -

FOR PR TEST 3
npm package: @ktbp/schematics
Description: KTBP Schematics for Angular
Author: Jeff Wu
Latest version: 0.3.4

# Getting Started With Schematics

This repository is a basic Schematic implementation that serves as a starting point to create and publish Schematics to NPM.

### Testing

To test locally, install `@angular-devkit/schematics` globally and use the `schematics` command line tool. That tool acts the same as the `generate` command of the Angular CLI, but also has a debug mode.

Check the documentation with
```bash
schematics --help
```

### Unit Testing

`npm run test` will run the unit tests, using Jasmine as a runner and test framework.

### Publishing

To publish, simply do:

```bash
npm run build
npm publish
```

That's it!
npm package: @ktdra-digital/icons
Description: Esta librería ha sido diseñada especialmente para ser utilizada en nuestra empresa interna
Author: ktdra Team
Latest version: 0.9.0

# Ktdra Icons

[![K-TDRA](https://firebasestorage.googleapis.com/v0/b/recursos-ae4c5.appspot.com/o/logo-texto.svg?alt=media&token=a2ce0125-4a27-4121-a55d-22b173d25ec5)](https://www.k-tdra.com)

¡Bienvenido a la librería de iconos @ktdra-digital/icons! Esta librería ha sido diseñada especialmente para ser utilizada en nuestra empresa interna y proporciona una amplia variedad de iconos para mejorar la experiencia visual de nuestras aplicaciones y proyectos para la empresa [Ktdra](https://www.k-tdra.com).

## Instalación

Puedes instalar la librería de iconos @ktdra-digital/icons utilizando npm (Node Package Manager). Abre tu terminal y ejecuta el siguiente comando:

```bash
npm install @ktdra-digital/icons
```

## Uso

Una vez que hayas instalado la librería, puedes comenzar a utilizar los iconos en tu aplicación. Aquí tienes un ejemplo básico de cómo importar un icono y utilizarlo:

```jsx
import { Icon } from '@ktdra-digital/icons';

function MiComponente() {
  return (
    <div>
      <Icon />
    </div>
  );
}
```

Asegúrate de reemplazar `Icon` con el nombre del icono específico que deseas utilizar. Puedes encontrar la lista completa de iconos disponibles en la documentación adjunta.

## Personalización

La librería de iconos @ktdra-digital/icons proporciona una flexibilidad adicional para personalizar los iconos según tus necesidades. Puedes ajustar el tamaño, el color y otros atributos utilizando las propiedades estándar de React.

```jsx
import { Icon } from '@ktdra-digital/icons';
//...
<Icon
  className="my-custom-class"
  style={{ color: 'red', fontSize: '2rem' }}
/>;
```

## **Nota importante:**

Las librerías desarrolladas de [Ktdra](https://www.k-tdra.com) son destinadas únicamente para uso privado y no están disponibles para el público en general.
npm package: @ktdra-digital/icons-native
Description: Esta librería ha sido diseñada especialmente para ser utilizada en nuestra empresa interna
Author: ktdra Team
Latest version: 0.3.0

# Ktdra Icons (React Native)

[![K-TDRA](https://firebasestorage.googleapis.com/v0/b/recursos-ae4c5.appspot.com/o/logo-texto.svg?alt=media&token=a2ce0125-4a27-4121-a55d-22b173d25ec5)](https://www.k-tdra.com)

¡Bienvenido a la librería de iconos @ktdra-digital/icons! Esta librería ha sido diseñada especialmente para ser utilizada en nuestra empresa interna y proporciona una amplia variedad de iconos para mejorar la experiencia visual de nuestras aplicaciones y proyectos para la empresa [Ktdra](https://www.k-tdra.com).

## Instalación

Puedes instalar la librería de iconos @ktdra-digital/icons utilizando npm (Node Package Manager). Abre tu terminal y ejecuta el siguiente comando:

```bash
npm install @ktdra-digital/icons-native
```

## Uso

Una vez que hayas instalado la librería, puedes comenzar a utilizar los iconos en tu aplicación. Aquí tienes un ejemplo básico de cómo importar un icono y utilizarlo:

```jsx
import { IconoNombre } from '@ktdra-digital/icons-native';

function MiComponente() {
  return (
    <div>
      <IconoNombre />
    </div>
  );
}
```

Asegúrate de reemplazar "IconoNombre" con el nombre del icono específico que deseas utilizar. Puedes encontrar la lista completa de iconos disponibles en la documentación adjunta.

## Personalización

La librería de iconos @ktdra-digital/icons proporciona una flexibilidad adicional para personalizar los iconos según tus necesidades. Puedes ajustar el tamaño, el color y otros atributos utilizando las propiedades estándar de React.

```jsx
import { IconoNombre } from '@ktdra-digital/icons';
//...
<IconoNombre
  className="mi-clase-css"
  style={{ color: 'red', fontSize: '2rem' }}
/>;
```

## **Nota importante:**

Las librerías desarrolladas de ktdra son destinadas únicamente para uso privado y no están disponibles para el público en general.

## Licencia

La librería de iconos @ktdra-digital/icons se distribuye bajo la licencia MIT. Puedes consultar el archivo "LICENSE.md" para obtener más información sobre los términos de la licencia.
npm package: @ktdra-digital/reader-ui
Description: UI components for ktdra reader (Frontend)
Author: ktdra Team
Latest version: 0.17.4


[![K-TDRA](https://mvpstorage.nyc3.digitaloceanspaces.com/EBOOK/img/66ad1c1989ae2230876bc8d2.png)](https://www.k-tdra.com)

# Reader UI

¡Bienvenido a la librería de componentes @ktdra-digital/reader-ui! Esta librería ha sido diseñada especialmente para ser utilizada en nuestra empresa interna y proporciona una librería de componentes para el reader.

## Instalación

Puedes instalar la librería de componentes de react @ktdra-digital/reader-ui utilizando npm (Node Package Manager). Abre tu terminal y ejecuta el siguiente comando:

### NPM

```bash
npm install @ktdra-digital/reader-ui
```

### Yarn

```bash
yarn add @ktdra-digital/reader-ui
```

### PNPM

```bash
pnpm add @ktdra-digital/reader-ui
```

## **Nota importante:**

Las librerías desarrolladas de [Ktdra](https://www.k-tdra.com) son destinadas únicamente para uso privado y no están disponibles para el público en general.
npm package: @ktdra-digital/utils
Description: Utils for ktdra-digital (Frontend)
Author: ktdra Team
Latest version: 0.5.0

# Ktdra Utils

[![K-TDRA](https://mvpstorage.nyc3.digitaloceanspaces.com/EBOOK/img/6531b40b7ebc977a7f88d6c4.svg+xml)](https://www.k-tdra.com)

¡Bienvenido a la biblioteca de utilidades Ktdra-Digital/Utils! Esta librería ha sido diseñada especialmente para ser utilizada en nuestra empresa interna y proporciona una amplia variedad de funciones y herramientas útiles para la empresa [Ktdra](https://www.k-tdra.com).

## Instalación

Puedes instalar la librería de iconos @ktdra-digital/icons utilizando npm (Node Package Manager). Abre tu terminal y ejecuta el siguiente comando:

### NPM

```bash
npm install @ktdra-digital/utils
```

### Yarn

```bash
yarn add @ktdra-digital/utils
```

### PNPM

```bash
pnpm add @ktdra-digital/utils
```

## **Nota importante:**

Las librerías desarrolladas de [Ktdra](https://www.k-tdra.com) son destinadas únicamente para uso privado y no están disponibles para el público en general.
npm package: @kth/appinsights
Description: Wrapper module for applicationinsights
Author: KTH
Latest version: 0.6.0

# @kth/appinsights

A wrapper for the [applicationinsights](https://www.npmjs.com/package/applicationinsights) package.

This is intended for a standard use-case only. If your app needs more options, please use the core package instead.

## Usage

Applicationinsights works by injecting code that captures telemetry from the application.
To get full tracking, this package should be initialized as soon as possible in the code.

```typescript
import { KthAppinsights } from '@kth/appinsights'

KthAppinsights.init({ name: 'app-name' })
```

Options

```typescript
type appinsightOptions = {
  name?: string // Optional. Name of the application
  samplingPercentage?: number // Optional. Reduce the amount of telemetry collected
}
```

## Features

### Name and Instance name.

The if `name` is passed in the options, it will be used to set "Cloud role name" and "Cloud role instance".

### User agent on requests

If a request has the `user-agent` header set, it will be saved in the custom property `user_agent`.

### Unpack Bunyan messages

Bynyan messages (used by @kth/log) will be desctructured, and only the "msg" field kept, as all other information is duplicated on native data fields.

Example:  
`{ name: "my-app", level: 30, msg: "the important part" }` will be reduced to just `"the important part"`.

### Telemetry Sampling

Used to reduce the amount of telemetry collected, primary used to reduce cost.
Enable with option `samplingPercentage`. Default is 100% = everything is collected.

### Track operations for Agenda jobs

**This is not intended to be used on all agenda jobs. Only use ut when there is an actuall need.**  
A helper that groups all events in a agenda-jobb in a tracable operation.

Example:

```typescript
const { AppinsightsUtils } = require('@kth/appinsights')

agenda.define('operation_name', AppinsightsUtils.agendaRequestWrapper('operation_name', jobFunction))
```
npm package: @kth/basic-html-templates
Description: Basic html templates for simple gui:s
Author: KTH
Latest version: 1.0.75

# Basic HTML Templates ![alt text](https://api.travis-ci.org/KTH/basic-html-templates.svg?branch=master) ![Continous Integration](https://github.com/KTH/basic-html-templates/actions/workflows/main.yml/badge.svg)

Npm: `@kth/basic-html-templates`

## Simple KTH look
A simple way to get web pages to look somewhat like the kth.se design. The templates are intended to be used in private to semiprivate services.

## Demo application

[Demo code source here](https://github.com/KTH/basic-html-templates/tree/master/demo-app/).

```javascript


const express = require("express");
const { templates } = require("@kth/basic-html-templates");
const httpResponse = require("@kth/http-responses");
const app = express();
const started = new Date();

/**
 * Index page.
 */
app.get("/", function (request, response) {
  httpResponse.ok(request, response, templates.index((title = "Demo App")));
});

/**
 * About page. Versions and such.
 */
app.get("/_about", function (request, response) {
  const about = {
    dockerName: "demo-app",
    dockerVersion: "0.0.1_abc123",
    jenkinsBuildDate: new Date(),
  };
  httpResponse.ok(request, response, templates._about(about, started));
});

/**
 * Health check route.
 */
app.get("/_monitor", function (request, response) {
  httpResponse.ok(
    request,
    response,
    templates._monitor((status = "OK")),
    httpResponse.contentTypes.PLAIN_TEXT
  );
});

/**
 * Crawler access definitions.
 */
app.get("/robots.txt", function (request, response) {
  httpResponse.ok(
    request,
    response,
    templates.robotstxt(),
    httpResponse.contentTypes.PLAIN_TEXT
  );
});

/**
 * Generic error page for 5xx response codes.
 * Includes application information from  /_application.
 */
app.get("/error5xx.html", function (request, response) {
  httpResponse.internalServerError(request, response, badGateway.error5xx());
});

/**
 * Ignore favicons.
 */
app.get("/favicon.ico", function (request, response) {
  httpResponse.noContent(request, response);
});

/**
 * Default route, if no other route is matched (404 Not Found).
 */
app.use(function (request, response) {
  httpResponse.notFound(request, response, templates.error404());
});


app.listen(80, function () {
  console.log("Server started.");
});


```

```json
{
  "name": "demo-app",
  "version": "1.0.0",
  "description": "Demo app for @kth/basic-html-templates",
  "main": "index.js",
  "scripts": {
    "clean": "rm -r ./node_modules && rm package-lock.json"
  },
  "author": "paddy@kth.se",
  "license": "MIT",
  "dependencies": {
    "@kth/basic-html-templates": "^1.0.24",
    "@kth/http-responses": "^1.0.20",
    "express": "^4.17.1"
  }
}

```

Examples:
- https://app.kth.se/
- https://app.kth.se/robots.txt
- https://app.kth.se/_monitor
- https://app.kth.se/pipeline/
- https://app.kth.se/jsonschema/
npm package: @kth/collect_sis_imports_errors
Description: Skript i denna katalog sammanställer loggar från sis imports i Canvas, så att man kan se om våra synkningar fungerar som väntat.
Author: team-e-larande
Latest version: 1.2.0
Deprecated: This package is no longer maintained. It can be used by reading the linked repo

### Läs loggfiler i Canvas
Skript i denna katalog sammanställer loggar från sis imports i Canvas, så att man kan se om våra synkningar fungerar som väntat.

Körs på följande sätt i ett terminalfönster:

```
npm install
npm start
```
Då kommer du bli presenterad med att antal alternativ i terminalfönstret. Följ dem.
npm package: @kth/cortina-block
Description: Node.js module for fetching Cortina blocks and optionally cache using Redis.
Author: KTH
Latest version: 7.2.1

# @kth/cortina-block

This package exposes an express middleware, that fetches som predefined blocks from Cortina CMS.  
The blocks are then stored in `res.locals.blocks`, for use in Handlebars or similar.  
Blocks can optionaly be cached in Redis.

## Installation

```bash
npm install @kth/cortina-block
```

## Usage

```typescript
import { cortinaMiddleware } from '@kth/cortina-block'
```

apply middleware

```typescript
server.use(
  '',
  cortinaMiddleware({
    blockApiUrl,
    blocksConfig,
    redisConfig,
  })
)
```

Default blocks that will be fetched can be found in config.ts. If you want to fetch other blocks or override the id of the default blocks, provide the optional `blocksConfig`.

## Options

- `blockApiUrl` is required. Should point to the Cortina block API endpoint.
- `memoryCache` is optional. Defaults to "true" unless `redisConfig` is provided. Stores blocks in memory for 10 minutes.
- `redisConfig` is optional. An object parsed from `kth-node-configuration`, containing `host` and `port`. If provided, blocks will be cached in redis.
- `redisKey` is optional. Use unique keys of multiple apps share the same redis.
- `supportedLanguages` is optional. If app only uses a subset of the supported languages. Default is `['sv', 'en']`.
- `blocksConfig` is optional. It's a plain object containing Cortina block IDs. It can be used both to replace existing id's, and to add new blocks.
  ```typescript
  const blocksConfig = {
    footer: '1.123456', // Replaces existing block
    studentMegaMenu: '1.1066510', // Adds a new block
  }
  ```

## Changes after style 10

Blocks **title**, **image** and **secondaryMenu** are no longer used by the apps.  
That also means that a bunch of config is no longer needed.

## Upgrade from @kth/cortina-block 6

- Config **headers** is no longer used.
- Config **localeText** is no longer used.
- Config **resourceUrl** is no longer used.
- Config **siteName** is no longer used.
- Config **useStyle10** is no longer used.

## Upgrade from wrapper in @kth/kth-node-web-common

- Config **addBlocks** has been renamed to **blocksConfig**.
- Config **blockUrl** has been renamed to **blockApiUrl**.
- Config **blockVersion** is no longer used.
- Config **globalLink** is no longer used.
- Config **hostUrl** is no longer used.
- Config **proxyPrefixPath** is no longer used.
- Config **useStyle10** is no longer used.

## Returned blocks

All fetched blocks will be avalible on `res.locals.blocks`.

```typescript
{
  megaMenu: "\n\n\n\n  <nav class=\"b…\n     </nav>\n\n  \n\n",
  footer: "\n\n\n  <div class=\"blo…  </div>\n  </div>\n\n\n",
  search: "\n\n\n  <div class=\"blo…aded=!0);</script>\n\n\n",
  etc..
}
```
npm package: @kth/eslint-config-kth
Description: ESLint config
Author: KTH
Latest version: 4.0.0

# @kth/eslint-config-kth

Shared ESLint configuration for KTH Node.js projects.

## Requirements

- Node.js `^20.19.0 || ^22.13.0 || >=24`
- ESLint `^9.0.0`

## Installation

```bash
npm install --save-dev @kth/eslint-config-kth eslint prettier
```

## Usage

Create an `eslint.config.js` file in your project root:

```js
const kthConfig = require('@kth/eslint-config-kth')

module.exports = [
  ...kthConfig,
  {
    ignores: ['dist/**', 'node_modules/**'],
  },
]
```

Add scripts to your `package.json`:

```json
{
  "scripts": {
    "lint": "eslint public/ server/ --quiet",
    "lint-v": "eslint public/ server/"
  }
}
```

## What's included

This config exports a flat config array with three configuration objects:

1. Base config with ESLint recommended rules + Prettier
2. Main config for `**/*.{js,jsx}` files with React, JSX-A11y, React Hooks, Import, and Prettier plugins with KTH-specific rules
3. Test config for `**/*.test.{js,jsx}`, `**/*.spec.{js,jsx}`, `**/test/**/*.{js,jsx}`, `**/__tests__/**/*.{js,jsx}`, and `**/__mocks__/**/*.{js,jsx}` with Jest, Jest-DOM, and Testing Library plugins

## Migrating from v3

See [MIGRATING.md](./MIGRATING.md) for upgrade instructions from v3 to v4.

## Contributing

Our goal is to maintain a consistent ESLint configuration across all KTH Node.js projects.

We are all responsible for keeping this module up to date. Don't be afraid to make changes, but take time to discuss with colleagues about significant modifications.
npm package: @kth/furano-npm
Description: Usability package for furano
Author: KTH
Latest version: 1.0.12

# furano-npm ![Continous Integration](https://github.com/KTH/furano-npm/actions/workflows/main.yml/badge.svg)

An npm package for usage with a json validation service. In KTHs case that's a project called furano.

## How to use

- Add `furano-npm` to your `package.json`

- Call using:

```javascript
const furano-npm = require('furano-npm')

furano-npm.validate('app/schema', {'my': 'data'})
    .then(result => console.log(`Validation was: ${result.valid} with optional error ${result.error}`))
    .catch(err => console.log(`Caught error: ${err}`));
```

```text

  When a bad schema path is passed, an error should be returned.

    ✔ An error message was found in the return object.

  When a json is unvalid, mark as unvalid and add an error message.

    ✔ Marked as invalid.
    ✔ An error message was found in the return object.

  When a json is valid, mark as valid and set error message to 'null'

    ✔ Marked as valid
    ✔ No error message is added.
```