# meta-sdk-lowcode

> a frontend sdk

Latest version **1.3.1** (published 2022-09-21) · ISC license · 0 weekly downloads

## Install

```sh
npm install meta-sdk-lowcode
pnpm add meta-sdk-lowcode
yarn add meta-sdk-lowcode
bun add meta-sdk-lowcode
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.3.1 |
| Published | 2022-09-21 |
| First published | 2022-09-19 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=10.0.0 |
| Dependencies | 8 |
| Unpacked size | 146.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | maya1024 |
| Maintainers | maya1024 |
| Keywords | sdk, lowcode, meta |

## Links

- npm: https://www.npmjs.com/package/meta-sdk-lowcode
- npm.io page: https://npm.io/package/meta-sdk-lowcode

## Dependencies (8)

- [events](https://npm.io/package/events.md) ^3.3.0
- [deepcopy](https://npm.io/package/deepcopy.md) ^2.1.0
- [deepmerge](https://npm.io/package/deepmerge.md) ^4.2.2
- [query-string](https://npm.io/package/query-string.md) ^7.1.1
- [error-stack-parser](https://npm.io/package/error-stack-parser.md) ^2.1.4
- [object-to-formdata](https://npm.io/package/object-to-formdata.md) ^4.4.2
- [json-stringify-safe](https://npm.io/package/json-stringify-safe.md) ^5.0.1
- [@babel/runtime-corejs3](https://npm.io/package/@babel/runtime-corejs3.md) ^7.19.0

## Recent versions

- 1.3.1 (latest) — 2022-09-21
- 1.3.0 — 2022-09-21
- 1.1.0 — 2022-09-19
- 1.0.1 — 2022-09-19
- 1.0.0 — 2022-09-19

## README

# meta-sdk

# 安装

# 操作说明

```js
import { Monitor } from 'meta-sdk';

Monitor.init({
  report: {
    url: 'http://localhost:3004/api/logger'
  }
});

```

```js
const Monitor = require('meta-sdk');
Monitor.init()
```

```js
<script src=""></script>
```

```js
monitor.on('event', (eventName, emitData) => {
  console.log(eventName, emitData);
});
```

```js
monitor.useVueErrorListener(Vue);
```

# 自定义提交

- 物料操作：拖拽物料到画布
- 页面操作：创建新的页面、导出页面源码
- 工程操作：创建新的工程、导出工程
- 接口操作：导入yapi接口
- --- 以上是b端的

- 模型操作：创建新的模型
- --- 以上是c端的

```js
// 全局导入

// vue2.x
Vue.prototype.$monitor = monitor;
// vue3
app.config.globalProperties.$monitor = monitor;
```

```js
// vue2.x
this.$monitor.customEmits({
  detail: 'some detail',
  path: 'a path',
  level: '' // 默认INFO
})

// vue3
const { proxy } = getCurrentInstance();
proxy.$monitor.customEmits({
  detail: 'some detail',
  path: 'a path',
})
```

# 所有配置

```ts
enum ErrorLevel {
  TRACE = 'TRACE',
  DEBUG = 'DEBUG',
  INFO = 'INFO',
  WARN = 'WARN',
  ERROR = 'ERROR',
  FATAL = 'FATAL',
  MARK = 'MARK',
}

const defaultOptions = {
  env: Env.DEV,
  platform: PlatformType.C,
  report: {
  url: '',
    method: 'POST',
    contentType: 'application/json',
    beforeSend: (data: ErrorCombine) => data,
  },
  data: {},
  http: {
  fetch: true,
    xhr: true,
    watchSuccess: false,
    ignoreRules: [],
  },
  error: {
  watch: true,
    random: 1,
    repeat: 5,
    delay: 1000,
  },
}
```

# Feature

- isSpa
- behavior
- fetch
- performance
- react
- ...

---
_Source: https://npm.io/package/meta-sdk-lowcode · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
