Skip to content

Commit

Permalink
feat: split package botops-feishu
Browse files Browse the repository at this point in the history
  • Loading branch information
Leizhenpeng committed Jan 15, 2024
1 parent 1cf8226 commit 6279a82
Show file tree
Hide file tree
Showing 9 changed files with 110 additions and 48 deletions.
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@ Using `npx` you can run the script without installing it first:

This will install `botops` globally so that it may be run from the command line anywhere.

#### Globally via Homebrew

brew install botops

## 🤯 Usage

```
Expand Down
9 changes: 8 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,16 @@
"botops"
],
"sideEffects": false,
"main": "dist/index.mjs",
"bin": {
"botops": "./botops-cli.mjs"
},
"pkg": {
"targets": [
"node16-macos-arm64"
],
"outputPath": "package"
},
"files": [
"dist",
"*.mjs"
Expand All @@ -44,7 +51,7 @@
"@inquirer/confirm": "^2.0.15",
"@inquirer/select": "^1.3.1",
"ajv": "^8.12.0",
"botops-feishu": "workspace:^",
"botops-feishu": "^0.0.1",
"clipboardy": "^4.0.0",
"conf": "^12.0.0",
"fast-glob": "^3.3.1",
Expand Down
38 changes: 1 addition & 37 deletions packages/feishuapi/README.md
Original file line number Diff line number Diff line change
@@ -1,37 +1 @@
# pkg-placeholder

[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]
[![bundle][bundle-src]][bundle-href]
[![JSDocs][jsdocs-src]][jsdocs-href]
[![License][license-src]][license-href]

_description_

> **Note**:
> Replace `pkg-placeholder`, `_description_` and `antfu` globally to use this template.
## Sponsors

<p align="center">
<a href="https://cdn.jsdelivr.net/gh/antfu/static/sponsors.svg">
<img src='https://cdn.jsdelivr.net/gh/antfu/static/sponsors.svg'/>
</a>
</p>

## License

[MIT](./LICENSE) License © 2023-PRESENT [Anthony Fu](https://github.com/antfu)

<!-- Badges -->

[npm-version-src]: https://img.shields.io/npm/v/pkg-placeholder?style=flat&colorA=080f12&colorB=1fa669
[npm-version-href]: https://npmjs.com/package/pkg-placeholder
[npm-downloads-src]: https://img.shields.io/npm/dm/pkg-placeholder?style=flat&colorA=080f12&colorB=1fa669
[npm-downloads-href]: https://npmjs.com/package/pkg-placeholder
[bundle-src]: https://img.shields.io/bundlephobia/minzip/pkg-placeholder?style=flat&colorA=080f12&colorB=1fa669&label=minzip
[bundle-href]: https://bundlephobia.com/result?p=pkg-placeholder
[license-src]: https://img.shields.io/github/license/antfu/pkg-placeholder.svg?style=flat&colorA=080f12&colorB=1fa669
[license-href]: https://github.com/antfu/pkg-placeholder/blob/main/LICENSE
[jsdocs-src]: https://img.shields.io/badge/jsdocs-reference-080f12?style=flat&colorA=080f12&colorB=1fa669
[jsdocs-href]: https://www.jsdocs.io/package/pkg-placeholder
## BotOps - Feishu
5 changes: 3 additions & 2 deletions packages/feishuapi/build.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ export default defineBuildConfig({
entries: [
'src/index',
],
declaration: true,
declaration: false,
clean: true,
rollup: {
emitCJS: true,
emitCJS: false,
},
failOnWarn: false,
})
11 changes: 7 additions & 4 deletions packages/feishuapi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"type": "module",
"version": "0.0.1",
"packageManager": "pnpm@8.14.0",
"description": "onebot feishu auto deploy module",
"description": "botops feishu auto deploy module",
"author": "River <laolei@forkway.c>",
"license": "MIT",
"homepage": "https://github.com/ConnectAI-E/botops",
Expand All @@ -12,12 +12,14 @@
"url": "git+https://github.com/ConnectAI-E/botops.git"
},
"bugs": "https://github.com/ConnectAI-E/botops/issues",
"keywords": [],
"keywords": [
"feishu",
"cli",
"botops"
],
"sideEffects": false,
"exports": {
".": {
"types": "./dist/index.d.ts",
"require": "./dist/index.cjs",
"import": "./dist/index.mjs"
}
},
Expand Down Expand Up @@ -47,6 +49,7 @@
"prepare": "simple-git-hooks"
},
"dependencies": {
"FormData": "^0.10.1",
"puppeteer-core": "^21.7.0"
},
"devDependencies": {
Expand Down
43 changes: 43 additions & 0 deletions packages/feishuapi/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 44 additions & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
import type { Argv } from 'yargs'
import ora from 'ora'
import select, { Separator } from '@inquirer/select'

// @ts-expect-error This is an expected error because no type definition for this package
import { getFeishuCookies } from 'botops-feishu'
import confirm from '@inquirer/confirm'
import { FeishuConfigManager } from './config'
Expand Down
2 changes: 2 additions & 0 deletions src/config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-expect-error
import Conf from 'conf'

// @ts-expect-error This is an expected error because no type definition for this package
import { Configuration, OpenApp } from 'botops-feishu'
import { name } from '../package.json'

Expand Down

0 comments on commit 6279a82

Please sign in to comment.