open-index/open-npm huggingface dataset:
npm package: @livzon/navigation
Description: 导航器，支持内存缓存上级路由信息
Author: bobo
Latest version: 1.0.0

<!--
 * @Author: lyb
 * @Date: 2021-05-31 22:14:48
 * @LastEditTime: 2021-11-17 22:10:59
 * @LastEditors: lyb
 * @Description:
-->

# Navigation

> 扩展 `history` 路由跳转的功能，整个应用关于导航相关的操作都应该使用 `navigation`

#### 路由跳转案例

```ts
// 直接跳转
navigation.push("/url");

// 跳转携带 state
navigation.push("/url", { name: "jack" });

// 跳转携带 query, query 对象会生成 search 字符串，替换原本的 search 字段
history.push({
  pathname: "/url",
  search: "?name=jack&age=20",
});
// vs
navigation.push({
  pathname: "url",
  query: {
    name: "jack",
    age: 20,
  },
});

// 同上
navigation.replace({
  pathname: "url",
  query: {
    name: "jack",
  },
});

// 前进后退
navigation.go(-1);
navigation.goBack();
navigation.goForward();

// 页面跳转保存数据，详情查看下面章节
navigation.pushKeepCache("/url", query);
```

#### 跳转保存当前路由数据数据

```ts
// 1. 组件加载时获取缓存的数据
const cache = navigation.cache.popItem<Cache>(cacheKey);

// 2. 页面跳转之前存储数据
navigation.cache.setItem(cacheKey, data);
navigation.pushKeepCache("/url", query);

// 3. 组件卸载清除
navigation.cache.removeItem(cacheKey);
```

## 注意

原有上层业务代码已近被移除。如果有需要可以参照一下方式执行实现跳转到登陆页

```
/**
 * 导航到登录页面
 * @description 使用 location.href 跳转到登录页，这样会走 nginx 服务器重定向
 */
export function toLoginPage(clear?: boolean, force = false) {
  if (clear) {
    localStorage.removeItem('token')
    localStorage.removeItem('refreshToken')
  }

  if (force || !navigation.history.location.pathname.startsWith('/login')) {
    navigation.history.replace('/login')
  }
  // window.location.href = '/login'
}

```
npm package: @livzon/pdfmake
Description: Client/server side PDF printing in pure JavaScript
Author: Bartek Pampuch
Latest version: 0.0.2

# pdfmake [![Node.js CI][githubactions_img]][githubactions_url] [![GitHub][github_img]][github_url] [![npm][npm_img]][npm_url] [![Bower][bower_img]][bower_url] [![Packagist][packagist_img]][packagist_url] [![CDNJS][cdnjs_img]][cndjs_url]

[githubactions_img]: https://github.com/bpampuch/pdfmake/workflows/Node.js%20CI/badge.svg?branch=master
[githubactions_url]: https://github.com/bpampuch/pdfmake/actions

[github_img]: https://img.shields.io/github/release/bpampuch/pdfmake.svg
[github_url]: https://github.com/bpampuch/pdfmake/releases/latest

[npm_img]: https://img.shields.io/npm/v/pdfmake.svg?colorB=0E7FBF
[npm_url]: https://www.npmjs.com/package/pdfmake

[bower_img]: https://img.shields.io/bower/v/pdfmake.svg?colorB=0E7FBF
[bower_url]: https://github.com/bpampuch/pdfmake

[packagist_img]: https://img.shields.io/packagist/v/bpampuch/pdfmake.svg?colorB=0E7FBF
[packagist_url]: https://packagist.org/packages/bpampuch/pdfmake

[cdnjs_img]: https://img.shields.io/cdnjs/v/pdfmake.svg?colorB=0E7FBF
[cndjs_url]: https://cdnjs.com/libraries/pdfmake


PDF document generation library for server-side and client-side in pure JavaScript.

Check out [the playground](http://bpampuch.github.io/pdfmake/playground.html) and [examples](https://github.com/bpampuch/pdfmake/tree/master/examples).

#### This is unstable master branch for version 0.2.x, for stable version 0.1.x see [branch 0.1](https://github.com/bpampuch/pdfmake/tree/0.1).

### Features

* line-wrapping,
* text-alignments (left, right, centered, justified),
* numbered and bulleted lists,
* tables and columns
  * auto/fixed/star-sized widths,
  * col-spans and row-spans,
  * headers automatically repeated in case of a page-break,
* images and vector graphics,
* convenient styling and style inheritance,
* page headers and footers:
  * static or dynamic content,
  * access to current page number and page count,
* background-layer,
* page dimensions and orientations,
* margins,
* custom page breaks,
* font embedding,
* support for complex, multi-level (nested) structures,
* table of contents,
* helper methods for opening/printing/downloading the generated PDF,
* setting of PDF metadata (e.g. author, subject).

## Documentation

Documentation URL: https://pdfmake.github.io/docs/

## Building from sources

using npm:
```
git clone https://github.com/bpampuch/pdfmake.git
cd pdfmake
npm install
npm run build
```

using yarn:
```
git clone https://github.com/bpampuch/pdfmake.git
cd pdfmake
yarn
yarn run build
```

## License
MIT

## Authors
* [@bpampuch](https://github.com/bpampuch) (founder)
* [@liborm85](https://github.com/liborm85)

pdfmake is based on a truly amazing library [pdfkit](https://github.com/devongovett/pdfkit) (credits to [@devongovett](https://github.com/devongovett)).

Thanks to all contributors.
npm package: @livzon/routemenu
Description: 路由&菜单工具类
Author: bobo
Latest version: 0.0.1

# 路由菜单辅助计算工具类

把框架中的 RouteMenuUtil 分离为独立的 npm 包，并去掉了其对 path.join 的依赖。

## 主要内容

- joinPathName: url 路径拼接
- RouteMenuUtil
  - menuExtra: 递归计算子菜单的路径
  - getRealRoute： 获取真实的路由地址（主要是解决多层路由重定向后的真实地址）
  - 属性 authorMap：通过路由权限计算出 菜单配置的权限（因为菜单耦合了路径，路径没有权限那么 菜单应该隐藏，除非菜单本身配置了权限，这时候菜单权限视为 UI 的显示权限）
npm package: @liwb/carefree-webpack-plugin
Description: A H5 debugging tool independent of wifi hotspots
Author: liwb@gmail.com
Latest version: 0.4.5

## carefree-webpack-plugin

### 本webpack插件功能：
1. 处理静态资源路径，并以watch mode编译
2. 将编译后的文件自动上传到指定服务器指定目录
3. 在终端打印出页面入口地址并生成二维码，供手机扫描访问
4. 监听模式下，一旦保存修改，将自动增量编译
5. 有变化的文件会被自动增量上传到服务器
6. 手机刷新页面或再次扫码即可

### 安装

```bash
npm install @liwb/carefree-webpack-plugin --save-dev
or
yarn add @liwb/carefree-webpack-plugin --dev
```

### 使用
1. 在`webpack`配置文件中引入

```javascript
const Carefree = require('@liwb/carefree-webpack-plugin');

plugins: [
    new Carefree({
        //配置项
    })
]
```
2. 在`package.json`的`scripts`字段中添加`carefree-dev`和`carefree-build`命令

```javascript
// package.json
scripts: {
    ...
    "carefree-dev": "cross-env NODE_ENV=carefree carefree_env=dev webpack -w --colors --progress",
    "carefree-build": "cross-env carefree_env=build node huild/upload",
    ...
}

// upload.js
const ClientUpload = require('@liwb/carefree-webpack-plugin/lib/upload');
const {host, port, source, username, password, target} = require('../carefree.json');

ClientUpload({
  source: 'dist',
  ignoreRegexp: /node_modules/,
  success: function () {
  },
  sftpOption: {
    host,
    port,
    username,
    password,
    source,
    target
  }
});

// carefree.json
{
  "host": "0.0.0.0",
  "port": "22",
  "source": "dist",
  "username": "root",
  "password": "******",
  "target": "/usr/local/nginx/html/h5-test"
}

```
3. 如果想在启用脚本时暂时不使用`carefree`，可在脚本里修改`carefree_env`为`cross-env carefree_env=stop`
4. 命令行将会打印出二维码，推荐命令行终端的主题为暗黑系
5. 目前支持`ssh`与`ftp`两种上传方式
6. `upload`设置为`false`将只打印二维码，不上传静态资源
7. 默认关闭`devtool`以减小上传文件的体积，需要时可以设置为`webpack`的`devtool`相应值

### 参数说明
| 参数 | 说明 | 默认值 | 是否必填
|----- | ----- | ----- | -----
| upload | 是否上传 | true | 否
| devtool | 参考webpack的devtool配置 | false | 否
| publicPath | 同webpackConfig.output.publicPath | - | 是
| qrcodeUrl | 扫二维码后跳转的地址 | publicPath + 'index.html' | 否
| ftp.host | 服务器ip | -- | 是
| ftp.port | 服务器 | -- | 是
| ftp.source | 待上传的目录 | -- | 是
| ftp.target | 服务器端的项目目录 | -- | 是
| ftp.username | 服务器用户名 | -- | 是
| ftp.password | 服务器密码 | -- | 是
| ssh[option] | 同ftp相关配置项 | -- | 是