Skip to content

Commit

Permalink
Merge pull request #80 from long-woo/dev
Browse files Browse the repository at this point in the history
release: 2.3.0
  • Loading branch information
long-woo authored Sep 30, 2024
2 parents ed420cc + f9f547f commit 1a238d7
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ Create a `myPlugin.ts` file:

```ts
// 引用模块
// import { start } from 'https://deno.land/x/stc@2.2.0/mod.ts'
import { start } from 'jsr:@loongwoo/stc@^2.2.0'
// import { start } from 'https://deno.land/x/stc@2.3.0/mod.ts'
import { start } from 'jsr:@loongwoo/stc@^2.3.0'

// Defining plugins
const myPlugin: IPlugin = {
Expand Down
4 changes: 2 additions & 2 deletions deno.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "@loongwoo/stc",
"version": "2.2.0",
"version": "2.3.0",
"exports": "./mod.ts",
"tasks": {
"pack": "deno run -A src/pack.ts",
"dev": "deno task pack && deno run -A --watch=src src/main.ts --url='https://petstore3.swagger.io/api/v3/openapi.json' --lang=js",
"serve": "deno run -A --watch=src src/service.ts",
"version": "echo '2.1.0' > release/version",
"version": "echo '2.3.0' > release/version",
"build:npm": "deno run -A src/npm/build.ts",
"build:mac": "deno compile -A --target x86_64-apple-darwin --output release/stc src/main.ts",
"build:mac-m": "deno compile -A --target aarch64-apple-darwin --output release/stc-m src/main.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/npm/pkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@loongwoo/stc",
"version": "2.2.0",
"version": "2.3.0",
"description": "A tool for converting OpenApi/Swagger/Apifox into code.",
"type": "module",
"module": "esm/mod.js",
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/javascript/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ export const JavaScriptPlugin: IPlugin = {
};
const _actionMapData = new Map<string, string>();

if (_tsTransform?.definition) {
_definition.content = await esTransform(_tsTransform.definition.content);
if (_tsTransform?.definition && _tsTransform.definition.content) {
const _typeDeclaration = generateDeclarationFile(
_tsTransform.definition.content,
);

_definition.content = await esTransform(_tsTransform.definition.content);
actionDeclareData.set("_types", _typeDeclaration);
}

Expand Down
2 changes: 1 addition & 1 deletion src/plugins/javascript/oxc.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import oxc from "npm:oxc-transform@^0.29.0";
import oxc from "npm:oxc-transform@^0.30.1";

import Logs from "../../console.ts";

Expand Down

0 comments on commit 1a238d7

Please sign in to comment.