@ahoo-wang/fetcher-generator 2.8.0 → 2.8.2
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/dist/cli.cjs +1 -1
- package/dist/cli.js +1 -1
- package/dist/index.cjs +6 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +529 -494
- package/dist/index.js.map +1 -1
- package/dist/utils/sourceFiles.d.ts +8 -7
- package/dist/utils/sourceFiles.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { JSDocableNode, Project, SourceFile } from 'ts-morph';
|
|
2
2
|
import { ModelInfo } from '../model';
|
|
3
|
+
import { Schema } from '@ahoo-wang/fetcher-openapi';
|
|
3
4
|
/**
|
|
4
5
|
* Generates the file path for a model file.
|
|
5
6
|
* @param modelInfo - The model information
|
|
@@ -38,17 +39,17 @@ export declare function addImportRefModel(sourceFile: SourceFile, outputDir: str
|
|
|
38
39
|
export declare function addImportModelInfo(currentModel: ModelInfo, sourceFile: SourceFile, outputDir: string, refModel: ModelInfo): void;
|
|
39
40
|
/**
|
|
40
41
|
* Generates a JSDoc comment string from a title and description.
|
|
41
|
-
* @param title - The title for the JSDoc comment
|
|
42
|
-
* @param description - The description for the JSDoc comment
|
|
43
42
|
* @returns The formatted JSDoc string or undefined if both title and description are empty
|
|
44
43
|
*/
|
|
45
|
-
export declare function jsDoc(
|
|
46
|
-
export declare function jsDocs(title?: string, description?: string): string[];
|
|
44
|
+
export declare function jsDoc(descriptions: (string | undefined)[]): string | undefined;
|
|
47
45
|
/**
|
|
48
46
|
* Adds a JSDoc comment to a node with the provided title and description.
|
|
47
|
+
*/
|
|
48
|
+
export declare function addJSDoc(node: JSDocableNode, descriptions: (string | undefined)[]): void;
|
|
49
|
+
/**
|
|
50
|
+
* Adds a JSDoc comment to a node based on the schema's title and description.
|
|
49
51
|
* @param node - The node to add the JSDoc comment to
|
|
50
|
-
* @param
|
|
51
|
-
* @param description - The description for the JSDoc comment
|
|
52
|
+
* @param schema - The schema containing title and description
|
|
52
53
|
*/
|
|
53
|
-
export declare function
|
|
54
|
+
export declare function addSchemaJSDoc(node: JSDocableNode, schema: Schema): void;
|
|
54
55
|
//# sourceMappingURL=sourceFiles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sourceFiles.d.ts","sourceRoot":"","sources":["../../src/utils/sourceFiles.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"sourceFiles.d.ts","sourceRoot":"","sources":["../../src/utils/sourceFiles.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAOpD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,SAAS,GAAG,MAAM,CAE7D;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,GACf,UAAU,CASZ;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CACvB,UAAU,EAAE,UAAU,EACtB,eAAe,EAAE,MAAM,EACvB,YAAY,EAAE,MAAM,EAAE,QAsBvB;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,SAAS,QAkBxB;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAChC,YAAY,EAAE,SAAS,EACvB,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,M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