@abitechdev/openchasqui-core 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +58 -7
  2. package/package.json +9 -2
package/README.md CHANGED
@@ -1,12 +1,63 @@
1
+ <p align="center">
2
+ <a href="https://github.com/abitech-dev/abitech-openchasqui-cli#readme"><img alt="OpenChasqui" src="https://raw.githubusercontent.com/abitech-dev/abitech-openchasqui-cli/main/.github/assets/logo-light.svg" width="320"></a>
3
+ </p>
4
+
1
5
  # @abitechdev/openchasqui-core
2
6
 
3
- Pipeline that loads, transforms, validates and emits API collections.
7
+ [![npm](https://img.shields.io/npm/v/@abitechdev/openchasqui-core?color=c2410c&label=npm)](https://www.npmjs.com/package/@abitechdev/openchasqui-core)
8
+ [![CI](https://github.com/abitech-dev/abitech-openchasqui-cli/actions/workflows/ci.yml/badge.svg)](https://github.com/abitech-dev/abitech-openchasqui-cli/actions/workflows/ci.yml)
9
+ [![Apache-2.0](https://img.shields.io/badge/license-Apache--2.0-blue)](https://github.com/abitech-dev/abitech-openchasqui-cli/blob/main/LICENSE)
10
+
11
+ Motor de OpenChasqui. Valida la configuración, ejecuta los plugins en orden (overlays, cargador, generadores, validadores y emisores) y devuelve las colecciones en memoria.
12
+
13
+ > **¿Solo quieres generar colecciones?** Instala el CLI,
14
+ > [`@abitechdev/openchasqui`](https://www.npmjs.com/package/@abitechdev/openchasqui), que ya incluye este paquete.
15
+
16
+ ## Instalación
17
+
18
+ ```bash
19
+ npm i @abitechdev/openchasqui-core
20
+ pnpm add @abitechdev/openchasqui-core
21
+ yarn add @abitechdev/openchasqui-core
22
+ ```
23
+
24
+ Requiere Node.js 22 o superior.
25
+
26
+ ## Uso
27
+
28
+ Arma tu propio pipeline con los plugins que necesites:
29
+
30
+ ```ts
31
+ import { readFile } from "node:fs/promises";
32
+ import { run } from "@abitechdev/openchasqui-core";
33
+ import { brunoEmitter } from "@abitechdev/openchasqui-emitter-bruno";
34
+ import { examplesGenerator } from "@abitechdev/openchasqui-generator-examples";
35
+ import { testsGenerator } from "@abitechdev/openchasqui-generator-tests";
36
+ import { openApiLoader } from "@abitechdev/openchasqui-loader-openapi";
37
+
38
+ const result = await run(
39
+ { version: 1, source: "openapi.yaml", targets: ["bruno"], output: "collections" },
40
+ {
41
+ reader: { readText: (path) => readFile(path, "utf8") },
42
+ plugins: [openApiLoader, examplesGenerator, testsGenerator, brunoEmitter],
43
+ },
44
+ );
45
+
46
+ for (const { target, files } of result.outputs) {
47
+ console.log(
48
+ target,
49
+ files.map((file) => file.path),
50
+ );
51
+ }
52
+ ```
53
+
54
+ `run` devuelve los archivos en memoria y `result.findings` trae los avisos de
55
+ las políticas. El CLI es quien escribe los archivos en disco.
56
+
57
+ ## Documentación
4
58
 
5
- Part of [OpenChasqui](https://github.com/abitech-dev/abitech-openchasqui-cli/blob/main/README.en.md)
6
- ([en español](https://github.com/abitech-dev/abitech-openchasqui-cli#readme)), which generates API collections from
7
- OpenAPI. Most projects only need the command line,
8
- [`@abitechdev/openchasqui`](https://www.npmjs.com/package/@abitechdev/openchasqui).
59
+ [Español](https://github.com/abitech-dev/abitech-openchasqui-cli#readme) · [English](https://github.com/abitech-dev/abitech-openchasqui-cli/blob/main/README.en.md)
9
60
 
10
- ## License
61
+ ## Licencia
11
62
 
12
- Apache-2.0
63
+ [Apache-2.0](https://github.com/abitech-dev/abitech-openchasqui-cli/blob/main/LICENSE). Parte de [OpenChasqui](https://github.com/abitech-dev/abitech-openchasqui-cli).
package/package.json CHANGED
@@ -1,7 +1,14 @@
1
1
  {
2
2
  "name": "@abitechdev/openchasqui-core",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Pipeline that loads, transforms, validates and emits API collections.",
5
+ "keywords": [
6
+ "openapi",
7
+ "api-collections",
8
+ "pipeline",
9
+ "plugins",
10
+ "openchasqui"
11
+ ],
5
12
  "license": "Apache-2.0",
6
13
  "type": "module",
7
14
  "exports": {
@@ -25,6 +32,6 @@
25
32
  },
26
33
  "dependencies": {
27
34
  "yaml": "2.9.1",
28
- "@abitechdev/openchasqui-spec": "^0.1.0"
35
+ "@abitechdev/openchasqui-spec": "^0.1.1"
29
36
  }
30
37
  }