api-farmer 0.0.1 → 0.0.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/index.cjs +5 -0
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +4 -0
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -79235,6 +79235,7 @@ __export(index_exports, {
|
|
|
79235
79235
|
hasQueryParameter: () => hasQueryParameter,
|
|
79236
79236
|
hasResponseBody: () => hasResponseBody,
|
|
79237
79237
|
partitionApiModules: () => partitionApiModules,
|
|
79238
|
+
pluralize: () => import_pluralize2.default,
|
|
79238
79239
|
readSchema: () => readSchema,
|
|
79239
79240
|
readTemplateFile: () => readTemplateFile,
|
|
79240
79241
|
renderApiModules: () => renderApiModules,
|
|
@@ -102235,6 +102236,9 @@ async function generate(userOptions = {}) {
|
|
|
102235
102236
|
await renderApiModules(apiModules, { output, typesFilename, ts: ts9, override, preset });
|
|
102236
102237
|
import_rslog.logger.success("Done");
|
|
102237
102238
|
}
|
|
102239
|
+
|
|
102240
|
+
// src/index.ts
|
|
102241
|
+
var import_pluralize2 = __toESM(require("pluralize"), 1);
|
|
102238
102242
|
// Annotate the CommonJS export names for ESM import in node:
|
|
102239
102243
|
0 && (module.exports = {
|
|
102240
102244
|
createStatusCodesByStrategy,
|
|
@@ -102247,6 +102251,7 @@ async function generate(userOptions = {}) {
|
|
|
102247
102251
|
hasQueryParameter,
|
|
102248
102252
|
hasResponseBody,
|
|
102249
102253
|
partitionApiModules,
|
|
102254
|
+
pluralize,
|
|
102250
102255
|
readSchema,
|
|
102251
102256
|
readTemplateFile,
|
|
102252
102257
|
renderApiModules,
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { OpenAPI3, OperationObject } from 'openapi-typescript';
|
|
2
|
+
export { default as pluralize } from 'pluralize';
|
|
2
3
|
|
|
3
4
|
declare function transformVerb(method: string): string;
|
|
4
5
|
declare function transformUrl(path: string, base?: string): string;
|
|
@@ -76,7 +77,7 @@ interface ApiModulePayload {
|
|
|
76
77
|
typeRequestBody: string;
|
|
77
78
|
typeRequestBodyValue: string;
|
|
78
79
|
typeResponseBody: string;
|
|
79
|
-
typeResponseBodyValue
|
|
80
|
+
typeResponseBodyValue: string;
|
|
80
81
|
}
|
|
81
82
|
interface ApiModule {
|
|
82
83
|
name: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { OpenAPI3, OperationObject } from 'openapi-typescript';
|
|
2
|
+
export { default as pluralize } from 'pluralize';
|
|
2
3
|
|
|
3
4
|
declare function transformVerb(method: string): string;
|
|
4
5
|
declare function transformUrl(path: string, base?: string): string;
|
|
@@ -76,7 +77,7 @@ interface ApiModulePayload {
|
|
|
76
77
|
typeRequestBody: string;
|
|
77
78
|
typeRequestBodyValue: string;
|
|
78
79
|
typeResponseBody: string;
|
|
79
|
-
typeResponseBodyValue
|
|
80
|
+
typeResponseBodyValue: string;
|
|
80
81
|
}
|
|
81
82
|
interface ApiModule {
|
|
82
83
|
name: string;
|
package/dist/index.js
CHANGED
|
@@ -28,6 +28,9 @@ import {
|
|
|
28
28
|
readTemplateFile
|
|
29
29
|
} from "./chunk-6N4OHGAC.js";
|
|
30
30
|
import "./chunk-6OIOYGN7.js";
|
|
31
|
+
|
|
32
|
+
// src/index.ts
|
|
33
|
+
import { default as default2 } from "pluralize";
|
|
31
34
|
export {
|
|
32
35
|
createStatusCodesByStrategy,
|
|
33
36
|
createTransformer,
|
|
@@ -39,6 +42,7 @@ export {
|
|
|
39
42
|
hasQueryParameter,
|
|
40
43
|
hasResponseBody,
|
|
41
44
|
partitionApiModules,
|
|
45
|
+
default2 as pluralize,
|
|
42
46
|
readSchema,
|
|
43
47
|
readTemplateFile,
|
|
44
48
|
renderApiModules,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "api-farmer",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"description": "A cli to generate apis from a schema",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
]
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
+
"@types/pluralize": "^0.0.33",
|
|
50
51
|
"@varlet/axle": "^0.10.1",
|
|
51
52
|
"commander": "^13.0.0",
|
|
52
53
|
"ejs": "^3.1.10",
|
|
@@ -65,7 +66,6 @@
|
|
|
65
66
|
"@types/ejs": "^3.1.5",
|
|
66
67
|
"@types/fs-extra": "^11.0.4",
|
|
67
68
|
"@types/node": "^22.8.1",
|
|
68
|
-
"@types/pluralize": "^0.0.33",
|
|
69
69
|
"@types/swagger2openapi": "^7.0.4",
|
|
70
70
|
"@varlet/release": "^0.3.1",
|
|
71
71
|
"eslint": "^9.17.0",
|