diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9331b55..870e43f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,14 +1,9 @@ name: Publish -# on: -# push: -# branches: ["main"] -# tags: ["*.*.*"] -# paths-ignore: ["*.md"] - on: - pull_request: - branches: [main] + push: + branches: ["main"] + tags: ["*.*.*"] paths-ignore: ["*.md"] env: diff --git a/README.md b/README.md index ef43f8b..bb4f365 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,27 @@ # wl-openapi-typescript +[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](./LICENSE) +[![CI](https://github.com/gsoft-inc/wl-openapi-typescript/actions/workflows/ci.yml/badge.svg)](https://github.com/gsoft-inc/wl-openapi-typescript/actions/workflows/ci.yml) -- pnpm dlx @workleap/create-schemas -- pnpm create create-schemas??? -- dev dependencies +Tools to generate TypeScript schemas from OpenAPI. + +## Packages + +| Package | Version | +|-------------------------| ---------------------------------------------------------------------------------------------------------------------------------------------| +| [@workleap/create-schemas](https://www.npmjs.org/package/@workleap/create-schemas)| [![NPM Version](http://img.shields.io/npm/v/@workleap/create-schemas.svg?style=flat)](https://www.npmjs.org/package/@workleap/create-schemas) | + + +## Usages + +Add a script in package.json to call `@workleap/create-schemas` + +```json + "scripts": { + "generate-schemas": "pnpm dlx @workleap/create-schemas arg1 arg2", + } +``` + +## 🤝 Contributing + +View the [contributor's documentation](./CONTRIBUTING.md). diff --git a/debug/package-lock.json b/debug/package-lock.json new file mode 100644 index 0000000..f48c8cf --- /dev/null +++ b/debug/package-lock.json @@ -0,0 +1,28 @@ +{ + "name": "debug", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "debug", + "version": "1.0.0", + "license": "ISC", + "devDependencies": { + "@workleap/create-schemas": "0.0.1-preview.0" + } + }, + "node_modules/@workleap/create-schemas": { + "version": "0.0.1-preview.0", + "resolved": "https://registry.npmjs.org/@workleap/create-schemas/-/create-schemas-0.0.1-preview.0.tgz", + "integrity": "sha512-4qw5nPyp/KIl92byOnYNUT650lvpXdZevLU0ywOO2K2Fv9sImZkIPonFdPcOMBkMFyUV2pPakvYPE4m38HD13g==", + "dev": true, + "bin": { + "create-schemas": "dist/bin.js" + }, + "engines": { + "node": ">=18.0.0" + } + } + } +} diff --git a/debug/package.json b/debug/package.json new file mode 100644 index 0000000..fc72fe7 --- /dev/null +++ b/debug/package.json @@ -0,0 +1,17 @@ +{ + "name": "debug", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "run-with-download": "pnpm dlx @workleap/create-schemas arg1 arg2", + "run-from-dev-dep1": "pnpm @workleap/create-schemas arg1 arg2", + "run-from-dev-dep2": "create-schemas arg1 arg2" + }, + "devDependencies": { + "@workleap/create-schemas": "0.0.1-preview.0" + }, + "keywords": [], + "author": "", + "license": "ISC" +} diff --git a/packages/create-schemas/package.json b/packages/create-schemas/package.json index edac473..995d7eb 100644 --- a/packages/create-schemas/package.json +++ b/packages/create-schemas/package.json @@ -1,7 +1,7 @@ { "name": "@workleap/create-schemas", "author": "Workleap", - "version": "0.0.1-preview.0", + "version": "0.0.1-preview.1", "description": "CLI to generate Typescript schemas from an OpenAPI document", "license": "Apache-2.0", "repository": { diff --git a/packages/create-schemas/src/bin.ts b/packages/create-schemas/src/bin.ts index 711dc16..6525f1d 100644 --- a/packages/create-schemas/src/bin.ts +++ b/packages/create-schemas/src/bin.ts @@ -1,4 +1,4 @@ -console.log("Hello World!!!!!"); +console.log("Hello World!"); // Access command-line arguments const args = process.argv.slice(2);