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.34.7 to 1.35.0

2

dist/cmd/clean.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const chalk_1 = tslib_1.__importDefault(require("chalk"));
const utils_1 = require("../utils");
const chalk_1 = tslib_1.__importDefault(require("chalk"));
class CleanCommand {

@@ -7,0 +7,0 @@ constructor() {

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

}
exports.default = ConfigGenerator;
ConfigGenerator.defaultConfig = {

@@ -94,2 +93,3 @@ // only need to parse config.default.ts or config.ts

};
exports.default = ConfigGenerator;
// check config return type.

@@ -96,0 +96,0 @@ function checkConfigReturnType(f) {

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

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

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

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

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

@@ -38,4 +38,3 @@ "use strict";

(0, assert_1.default)(options.directory, `options.directory must set in ${generatorName}`);
const baseDir = options.directory.replace(/\/|\\/, path_1.default.sep);
this.dir = path_1.default.resolve(this.config.cwd, baseDir);
this.dir = path_1.default.resolve(this.config.cwd, options.directory);
this.dtsDir = path_1.default.resolve(this.config.typings, path_1.default.relative(this.config.cwd, this.dir));

@@ -42,0 +41,0 @@ // watch file change

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

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

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

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

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

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

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

@@ -65,0 +65,0 @@ "egg-sequelize": "^4.3.1",

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

## Install

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

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

@@ -39,17 +32,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
```

@@ -186,3 +179,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>

@@ -542,5 +535,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>

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

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

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

@@ -37,17 +31,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
```

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

```
```bash
$ ets -h

@@ -167,3 +161,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>

@@ -197,3 +191,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> 这个项目 )

@@ -523,5 +517,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>

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

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

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

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

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

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

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

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

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

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

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

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

Sorry, the diff of this file is not supported yet

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