@dotflash/openapi-semantic-generator 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.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # OpenAPI-Agent-Sync (oas-agent-sync)
1
+ # OpenAPI Semantic Generator (@dotflash/openapi-semantic-generator)
2
2
 
3
3
  [English](#english) | [한국어](#한국어)
4
4
 
@@ -41,13 +41,13 @@ It provides an index and guide that allows LLMs to understand large-scale API co
41
41
  ### Installation
42
42
 
43
43
  ```bash
44
- npm install -g oas-agent-sync
44
+ npm install -g @dotflash/openapi-semantic-generator
45
45
  ```
46
46
 
47
47
  ### Usage
48
48
 
49
49
  ```bash
50
- npx oas-agent-sync <spec-url-or-path> -o <generated-code-dir> [options]
50
+ npx openapi-semantic-generator <spec-url-or-path> -o <generated-code-dir> [options]
51
51
  ```
52
52
 
53
53
  #### Required Arguments
@@ -91,13 +91,13 @@ OpenAPI Generator로 생성된 코드들을 분석하여 LLM 에이전트가 활
91
91
  ### 설치 방법
92
92
 
93
93
  ```bash
94
- npm install -g oas-agent-sync
94
+ npm install -g @dotflash/openapi-semantic-generator
95
95
  ```
96
96
 
97
97
  ### 사용 방법
98
98
 
99
99
  ```bash
100
- npx oas-agent-sync <spec-url-or-path> -o <generated-code-dir> [options]
100
+ npx openapi-semantic-generator <spec-url-or-path> -o <generated-code-dir> [options]
101
101
  ```
102
102
 
103
103
  #### 필수 인자
@@ -143,10 +143,20 @@ async function renderDocs(metadata, outputDir) {
143
143
  });
144
144
  const groupedOperations = Object.entries(operationsByTag).map(([tag, ops]) => ({
145
145
  tag,
146
- ops: ops.map((op, index) => ({
147
- ...op,
148
- last: index === ops.length - 1
149
- }))
146
+ ops: ops.map((op, index) => {
147
+ let relativePath = op.sourceFile;
148
+ if (path2.isAbsolute(op.sourceFile)) {
149
+ relativePath = path2.relative(outputDir, op.sourceFile);
150
+ }
151
+ if (!relativePath.startsWith("./") && !relativePath.startsWith("../")) {
152
+ relativePath = "./" + relativePath;
153
+ }
154
+ return {
155
+ ...op,
156
+ sourceFile: relativePath,
157
+ last: index === ops.length - 1
158
+ };
159
+ })
150
160
  }));
151
161
  const enrichedMetadata = {
152
162
  ...metadata,
package/dist/cli.cjs CHANGED
@@ -181,10 +181,20 @@ async function renderDocs(metadata, outputDir) {
181
181
  });
182
182
  const groupedOperations = Object.entries(operationsByTag).map(([tag, ops]) => ({
183
183
  tag,
184
- ops: ops.map((op, index) => ({
185
- ...op,
186
- last: index === ops.length - 1
187
- }))
184
+ ops: ops.map((op, index) => {
185
+ let relativePath = op.sourceFile;
186
+ if (import_path2.default.isAbsolute(op.sourceFile)) {
187
+ relativePath = import_path2.default.relative(outputDir, op.sourceFile);
188
+ }
189
+ if (!relativePath.startsWith("./") && !relativePath.startsWith("../")) {
190
+ relativePath = "./" + relativePath;
191
+ }
192
+ return {
193
+ ...op,
194
+ sourceFile: relativePath,
195
+ last: index === ops.length - 1
196
+ };
197
+ })
188
198
  }));
189
199
  const enrichedMetadata = {
190
200
  ...metadata,
package/dist/cli.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  generateDocs
4
- } from "./chunk-JGV5ULAN.js";
4
+ } from "./chunk-IUOJNB6I.js";
5
5
 
6
6
  // src/cli.ts
7
7
  import { Command } from "commander";
package/dist/index.cjs CHANGED
@@ -190,10 +190,20 @@ async function renderDocs(metadata, outputDir) {
190
190
  });
191
191
  const groupedOperations = Object.entries(operationsByTag).map(([tag, ops]) => ({
192
192
  tag,
193
- ops: ops.map((op, index) => ({
194
- ...op,
195
- last: index === ops.length - 1
196
- }))
193
+ ops: ops.map((op, index) => {
194
+ let relativePath = op.sourceFile;
195
+ if (import_path2.default.isAbsolute(op.sourceFile)) {
196
+ relativePath = import_path2.default.relative(outputDir, op.sourceFile);
197
+ }
198
+ if (!relativePath.startsWith("./") && !relativePath.startsWith("../")) {
199
+ relativePath = "./" + relativePath;
200
+ }
201
+ return {
202
+ ...op,
203
+ sourceFile: relativePath,
204
+ last: index === ops.length - 1
205
+ };
206
+ })
197
207
  }));
198
208
  const enrichedMetadata = {
199
209
  ...metadata,
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  generateDocs,
4
4
  renderDocs,
5
5
  scanGeneratedFiles
6
- } from "./chunk-JGV5ULAN.js";
6
+ } from "./chunk-IUOJNB6I.js";
7
7
  export {
8
8
  extractMetadata,
9
9
  generateDocs,
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@dotflash/openapi-semantic-generator",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Semantic mapping automation tool for LLM agents and OpenAPI generated code",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.mjs",
8
8
  "types": "dist/index.d.ts",
9
9
  "bin": {
10
- "oas-agent-sync": "dist/cli.js"
10
+ "openapi-semantic-generator": "dist/cli.js"
11
11
  },
12
12
  "files": [
13
13
  "dist",