Socket
Socket
Sign inDemoInstall

egg-ts-helper

Package Overview
Dependencies
Maintainers
2
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

egg-ts-helper - npm Package Compare versions

Comparing version 1.35.0 to 1.35.1

2

dist/utils.d.ts

@@ -76,4 +76,4 @@ import ts from 'typescript';

};
export declare function modifierHas(node: any, kind: any): any;
export declare function modifierHas(node: ts.Node, kind: any): any;
export declare function cleanEmpty(data: any): {};
//# sourceMappingURL=utils.d.ts.map

@@ -25,2 +25,3 @@ "use strict";

allowSyntheticDefaultImports: true,
charset: 'utf8',
allowJs: false,

@@ -27,0 +28,0 @@ pretty: true,

{
"name": "egg-ts-helper",
"version": "1.35.0",
"version": "1.35.1",
"description": "egg typescript helper",

@@ -38,3 +38,3 @@ "bin": {

"dependencies": {
"chalk": "^4.0.0",
"chalk": "^2.4.2",
"chokidar": "^3.0.0",

@@ -45,6 +45,6 @@ "commander": "^2.15.1",

"globby": "^11.0.0",
"json5": "^2.2.3",
"json5": "^2.2.0",
"ts-node": "^10.9.1",
"tslib": "^2.6.1",
"typescript": "^5.1.6",
"tslib": "^2.0.0",
"typescript": "^4.0.0",
"yn": "^3.0.0"

@@ -58,7 +58,7 @@ },

"@types/mocha": "^10.0.0",
"@types/node": "^20.4.5",
"@types/node": "^14.18.36",
"del": "^3.0.0",
"del-cli": "^1.1.0",
"egg": "^3.5.0",
"egg-bin": "^6.4.1",
"egg-bin": "^5.5.0",
"egg-mock": "^5.2.1",

@@ -73,3 +73,7 @@ "egg-sequelize": "^4.3.1",

"node": ">= 14.0.0"
},
"publishConfig": {
"access": "public",
"tag": "latest-1"
}
}

@@ -18,2 +18,3 @@ # egg-ts-helper

## Install

@@ -23,6 +24,12 @@

```bash
```
npm i egg-ts-helper --save-dev
```
or
```
yarn add egg-ts-helper --dev
```
## QuickStart

@@ -32,17 +39,17 @@

```bash
npx ets
```
$ npx ets
```
Watching files by `-w` flag.
```bash
npx ets -w
```
$ npx ets -w
```
`egg-ts-helper` has build-in in `egg-bin`, You can easily to use it by
```bash
egg-bin dev --dts
```
$ egg-bin dev --dts
```

@@ -179,3 +186,3 @@ or add configuration `egg.declarations` in `package.json`

`egg-ts-helper` support customLoader configuration of egg. see <https://github.com/eggjs/egg/issues/3480>
`egg-ts-helper` support customLoader configuration of egg. see https://github.com/eggjs/egg/issues/3480

@@ -535,5 +542,5 @@ Configure in `config.default.ts`

TS demo: <https://github.com/whxaxes/egg-boilerplate-d-ts>
TS demo: https://github.com/whxaxes/egg-boilerplate-d-ts
JS demo: <https://github.com/whxaxes/egg-boilerplate-d-js>
JS demo: https://github.com/whxaxes/egg-boilerplate-d-js

@@ -540,0 +547,0 @@ ## License

@@ -22,6 +22,12 @@ # egg-ts-helper

```bash
```
npm i egg-ts-helper --save-dev
```
或者
```
yarn add egg-ts-helper --dev
```
## 快速开始

@@ -31,17 +37,17 @@

```bash
npx ets
```
$ npx ets
```
可以通过 `-w` 来监听文件改动并且重新生成 `d.ts`
```bash
npx ets -w
```
$ npx ets -w
```
`egg-ts-helper` 已经内置在 `egg-bin` 中,可以通过以下命令方便使用
```bash
egg-bin dev --dts
```
$ egg-bin dev --dts
```

@@ -52,3 +58,3 @@ 再或者在 `package.json` 中配置 `egg.declarations` 为 true 即可。

```bash
```
$ ets -h

@@ -161,3 +167,3 @@

`egg-ts-helper` 支持 egg 的 customLoader 配置,会自动去读取应用/插件/框架中的 customLoader 配置. 详情请看 <https://github.com/eggjs/egg/issues/3480>
`egg-ts-helper` 支持 egg 的 customLoader 配置,会自动去读取应用/插件/框架中的 customLoader 配置. 详情请看 https://github.com/eggjs/egg/issues/3480

@@ -191,3 +197,3 @@ 在 `config.default.ts` 中配置 customLoader

`egg-ts-helper` 将会根据 `app/model` 目录下的文件,自动生成声明 ( 参考 <https://github.com/whxaxes/egg-boilerplate-d-ts> 这个项目 )
`egg-ts-helper` 将会根据 `app/model` 目录下的文件,自动生成声明 ( 参考 https://github.com/whxaxes/egg-boilerplate-d-ts 这个项目 )

@@ -517,5 +523,5 @@ ```typescript

TS 项目: <https://github.com/whxaxes/egg-boilerplate-d-ts>
TS 项目: https://github.com/whxaxes/egg-boilerplate-d-ts
JS 项目: <https://github.com/whxaxes/egg-boilerplate-d-js>
JS 项目: https://github.com/whxaxes/egg-boilerplate-d-js

@@ -522,0 +528,0 @@ ## License

@@ -0,3 +1,3 @@

import { cleanJs } from '../utils';
import chalk from 'chalk';
import { cleanJs } from '../utils';

@@ -4,0 +4,0 @@ class CleanCommand implements SubCommand {

@@ -23,2 +23,3 @@ import fs from 'fs';

allowSyntheticDefaultImports: true,
charset: 'utf8',
allowJs: false,

@@ -549,3 +550,3 @@ pretty: true,

// check kind in node.modifiers.
export function modifierHas(node, kind) {
export function modifierHas(node: ts.Node, kind) {
return node.modifiers && node.modifiers.find(mod => kind === mod.kind);

@@ -552,0 +553,0 @@ }

@@ -76,3 +76,4 @@ import path from 'path';

assert(options.directory, `options.directory must set in ${generatorName}`);
this.dir = path.resolve(this.config.cwd, options.directory);
const baseDir = options.directory.replace(/\/|\\/, path.sep);
this.dir = path.resolve(this.config.cwd, baseDir);
this.dtsDir = path.resolve(

@@ -79,0 +80,0 @@ this.config.typings,

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc