Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support cjs and esm both by tshy #101

Merged
merged 11 commits into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
test/fixtures
test/benchmark
coverage
node_modules
lib/plugins/**/app/proxy
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": [
"eslint-config-egg",
"eslint-config-egg/typescript",
"eslint-config-egg/lib/rules/enforce-node-prefix"
]
}
3 changes: 1 addition & 2 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ jobs:
name: Node.js
uses: node-modules/github-actions/.github/workflows/node-test.yml@master
with:
os: 'ubuntu-latest, macos-latest, windows-latest'
version: '14.20.0, 14, 16, 18, 20, 22'
version: '18.19.0, 20, 22'
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
18 changes: 9 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
node_modules
coverage
test/**/logs
_book
.DS_Store
logs/
npm-debug.log
run/
.vscode
node_modules/
coverage/
test/fixtures/**/run
.DS_Store
.tshy*
.eslintcache
dist
package-lock.json
.travis.yml
.idea
.package-lock.json
21 changes: 11 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,29 @@
# egg-security

Security plugin in egg
# @eggjs/security

[![NPM version][npm-image]][npm-url]
[![Node.js CI](https://github.com/eggjs/security/actions/workflows/nodejs.yml/badge.svg)](https://github.com/eggjs/security/actions/workflows/nodejs.yml)
[![Test coverage][codecov-image]][codecov-url]
[![Known Vulnerabilities][snyk-image]][snyk-url]
[![npm download][download-image]][download-url]
[![Node.js Version](https://img.shields.io/node/v/eggjs/security.svg?style=flat)](https://nodejs.org/en/download/)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://makeapullrequest.com)
![CodeRabbit Pull Request Reviews](https://img.shields.io/coderabbit/prs/github/eggjs/security)

[npm-image]: https://img.shields.io/npm/v/egg-security.svg?style=flat-square
[npm-url]: https://npmjs.org/package/egg-security
[npm-image]: https://img.shields.io/npm/v/@eggjs/security.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@eggjs/security
[codecov-image]: https://codecov.io/gh/eggjs/security/branch/master/graph/badge.svg
[codecov-url]: https://codecov.io/gh/eggjs/security
[snyk-image]: https://snyk.io/test/npm/egg-security/badge.svg?style=flat-square
[snyk-url]: https://snyk.io/test/npm/egg-security
[download-image]: https://img.shields.io/npm/dm/egg-security.svg?style=flat-square
[download-url]: https://npmjs.org/package/egg-security
[snyk-image]: https://snyk.io/test/npm/@eggjs/security/badge.svg?style=flat-square
[snyk-url]: https://snyk.io/test/npm/@eggjs/security
[download-image]: https://img.shields.io/npm/dm/@eggjs/security.svg?style=flat-square
[download-url]: https://npmjs.org/package/@eggjs/security

Egg's default security plugin, generally no need to configure.

## Install

```bash
npm i egg-security
npm i @eggjs/security
```

## Usage & configuration
Expand Down
21 changes: 12 additions & 9 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
# egg-security

egg 内置的安全插件
# @eggjs/security

[![NPM version][npm-image]][npm-url]
[![Node.js CI](https://github.com/eggjs/security/actions/workflows/nodejs.yml/badge.svg)](https://github.com/eggjs/security/actions/workflows/nodejs.yml)
[![Test coverage][codecov-image]][codecov-url]
[![Known Vulnerabilities][snyk-image]][snyk-url]
[![npm download][download-image]][download-url]
[![Node.js Version](https://img.shields.io/node/v/eggjs/security.svg?style=flat)](https://nodejs.org/en/download/)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://makeapullrequest.com)
![CodeRabbit Pull Request Reviews](https://img.shields.io/coderabbit/prs/github/eggjs/security)

[npm-image]: https://img.shields.io/npm/v/egg-security.svg?style=flat-square
[npm-url]: https://npmjs.org/package/egg-security
[npm-image]: https://img.shields.io/npm/v/@eggjs/security.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@eggjs/security
[codecov-image]: https://codecov.io/gh/eggjs/security/branch/master/graph/badge.svg
[codecov-url]: https://codecov.io/gh/eggjs/security
[snyk-image]: https://snyk.io/test/npm/egg-security/badge.svg?style=flat-square
[snyk-url]: https://snyk.io/test/npm/egg-security
[download-image]: https://img.shields.io/npm/dm/egg-security.svg?style=flat-square
[download-url]: https://npmjs.org/package/egg-security
[snyk-image]: https://snyk.io/test/npm/@eggjs/security/badge.svg?style=flat-square
[snyk-url]: https://snyk.io/test/npm/@eggjs/security
[download-image]: https://img.shields.io/npm/dm/@eggjs/security.svg?style=flat-square
[download-url]: https://npmjs.org/package/@eggjs/security

egg 内置的安全插件

## 使用方式

Expand Down
7 changes: 0 additions & 7 deletions agent.js

This file was deleted.

23 changes: 0 additions & 23 deletions app.js

This file was deleted.

5 changes: 0 additions & 5 deletions app/extend/agent.js

This file was deleted.

34 changes: 0 additions & 34 deletions app/extend/application.js

This file was deleted.

7 changes: 0 additions & 7 deletions app/extend/helper.js

This file was deleted.

59 changes: 0 additions & 59 deletions app/middleware/securities.js

This file was deleted.

7 changes: 0 additions & 7 deletions config/config.local.js

This file was deleted.

12 changes: 0 additions & 12 deletions index.js

This file was deleted.

33 changes: 0 additions & 33 deletions lib/extend/safe_curl.js

This file was deleted.

3 changes: 0 additions & 3 deletions lib/helper/escape.js

This file was deleted.

9 changes: 0 additions & 9 deletions lib/helper/escapeShellArg.js

This file was deleted.

13 changes: 0 additions & 13 deletions lib/helper/index.js

This file was deleted.

Loading
Loading