@keq-request/cli 5.0.0-alpha.10

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 (142) hide show
  1. package/CHANGELOG.md +764 -0
  2. package/LICENSE +21 -0
  3. package/README.md +23 -0
  4. package/dist/cli.cjs +1949 -0
  5. package/dist/cli.cjs.map +1 -0
  6. package/dist/cli.d.ts +3 -0
  7. package/dist/cli.d.ts.map +1 -0
  8. package/dist/cli.js +1926 -0
  9. package/dist/cli.js.map +1 -0
  10. package/dist/constants/file-naming-style.d.ts +14 -0
  11. package/dist/constants/file-naming-style.d.ts.map +1 -0
  12. package/dist/constants/qs-array-format.d.ts +9 -0
  13. package/dist/constants/qs-array-format.d.ts.map +1 -0
  14. package/dist/constants/supported-methods.d.ts +2 -0
  15. package/dist/constants/supported-methods.d.ts.map +1 -0
  16. package/dist/define-keq-config.d.ts +3 -0
  17. package/dist/define-keq-config.d.ts.map +1 -0
  18. package/dist/exception.d.ts +6 -0
  19. package/dist/exception.d.ts.map +1 -0
  20. package/dist/index.cjs +1855 -0
  21. package/dist/index.cjs.map +1 -0
  22. package/dist/index.d.ts +4 -0
  23. package/dist/index.d.ts.map +1 -0
  24. package/dist/index.js +1816 -0
  25. package/dist/index.js.map +1 -0
  26. package/dist/renderer/json-schema/index.d.ts +3 -0
  27. package/dist/renderer/json-schema/index.d.ts.map +1 -0
  28. package/dist/renderer/operation-request/index.d.ts +8 -0
  29. package/dist/renderer/operation-request/index.d.ts.map +1 -0
  30. package/dist/renderer/operation-type/index.d.ts +5 -0
  31. package/dist/renderer/operation-type/index.d.ts.map +1 -0
  32. package/dist/renderer/request/index.d.ts +2 -0
  33. package/dist/renderer/request/index.d.ts.map +1 -0
  34. package/dist/renderer/types/any-other-attribute.d.ts +5 -0
  35. package/dist/renderer/types/any-other-attribute.d.ts.map +1 -0
  36. package/dist/renderer/types/mixed-schema-object.d.ts +7 -0
  37. package/dist/renderer/types/mixed-schema-object.d.ts.map +1 -0
  38. package/dist/renderer/utils/generate-schema.d.ts +6 -0
  39. package/dist/renderer/utils/generate-schema.d.ts.map +1 -0
  40. package/dist/tasks/append-ignore-rule/index.d.ts +10 -0
  41. package/dist/tasks/append-ignore-rule/index.d.ts.map +1 -0
  42. package/dist/tasks/compile/index.d.ts +8 -0
  43. package/dist/tasks/compile/index.d.ts.map +1 -0
  44. package/dist/tasks/compile/utils/compile-operation-definition.d.ts +12 -0
  45. package/dist/tasks/compile/utils/compile-operation-definition.d.ts.map +1 -0
  46. package/dist/tasks/compile/utils/compile-schema-definition.d.ts +10 -0
  47. package/dist/tasks/compile/utils/compile-schema-definition.d.ts.map +1 -0
  48. package/dist/tasks/download/index.d.ts +10 -0
  49. package/dist/tasks/download/index.d.ts.map +1 -0
  50. package/dist/tasks/index.d.ts +12 -0
  51. package/dist/tasks/index.d.ts.map +1 -0
  52. package/dist/tasks/interactive/index.d.ts +12 -0
  53. package/dist/tasks/interactive/index.d.ts.map +1 -0
  54. package/dist/tasks/interactive/utils/select-operation-definitions.d.ts +5 -0
  55. package/dist/tasks/interactive/utils/select-operation-definitions.d.ts.map +1 -0
  56. package/dist/tasks/persist/index.d.ts +11 -0
  57. package/dist/tasks/persist/index.d.ts.map +1 -0
  58. package/dist/tasks/setup/index.d.ts +10 -0
  59. package/dist/tasks/setup/index.d.ts.map +1 -0
  60. package/dist/tasks/setup/utils/find-nearest-package-json.d.ts +6 -0
  61. package/dist/tasks/setup/utils/find-nearest-package-json.d.ts.map +1 -0
  62. package/dist/tasks/setup/utils/get-project-module-system.d.ts +5 -0
  63. package/dist/tasks/setup/utils/get-project-module-system.d.ts.map +1 -0
  64. package/dist/tasks/setup/utils/index.d.ts +4 -0
  65. package/dist/tasks/setup/utils/index.d.ts.map +1 -0
  66. package/dist/tasks/setup/utils/validate-modules.d.ts +2 -0
  67. package/dist/tasks/setup/utils/validate-modules.d.ts.map +1 -0
  68. package/dist/tasks/shaking/index.d.ts +11 -0
  69. package/dist/tasks/shaking/index.d.ts.map +1 -0
  70. package/dist/tasks/types/ignore-mode.d.ts +2 -0
  71. package/dist/tasks/types/ignore-mode.d.ts.map +1 -0
  72. package/dist/tasks/types/task-context.d.ts +24 -0
  73. package/dist/tasks/types/task-context.d.ts.map +1 -0
  74. package/dist/tasks/utils/api-document.d.ts +18 -0
  75. package/dist/tasks/utils/api-document.d.ts.map +1 -0
  76. package/dist/tasks/utils/api-document_v3_1.d.ts +16 -0
  77. package/dist/tasks/utils/api-document_v3_1.d.ts.map +1 -0
  78. package/dist/tasks/utils/artifact.d.ts +25 -0
  79. package/dist/tasks/utils/artifact.d.ts.map +1 -0
  80. package/dist/tasks/utils/dependency.d.ts +22 -0
  81. package/dist/tasks/utils/dependency.d.ts.map +1 -0
  82. package/dist/tasks/utils/json-schema.d.ts +8 -0
  83. package/dist/tasks/utils/json-schema.d.ts.map +1 -0
  84. package/dist/tasks/utils/module-definition.d.ts +6 -0
  85. package/dist/tasks/utils/module-definition.d.ts.map +1 -0
  86. package/dist/tasks/utils/operation-definition.d.ts +22 -0
  87. package/dist/tasks/utils/operation-definition.d.ts.map +1 -0
  88. package/dist/tasks/utils/schema-definition.d.ts +19 -0
  89. package/dist/tasks/utils/schema-definition.d.ts.map +1 -0
  90. package/dist/tasks/utils/to-comment.d.ts +2 -0
  91. package/dist/tasks/utils/to-comment.d.ts.map +1 -0
  92. package/dist/tasks/validate/index.d.ts +9 -0
  93. package/dist/tasks/validate/index.d.ts.map +1 -0
  94. package/dist/types/build-cli-options.d.ts +19 -0
  95. package/dist/types/build-cli-options.d.ts.map +1 -0
  96. package/dist/types/operation-id-factory.d.ts +10 -0
  97. package/dist/types/operation-id-factory.d.ts.map +1 -0
  98. package/dist/types/qs.d.ts +9 -0
  99. package/dist/types/qs.d.ts.map +1 -0
  100. package/dist/types/runtime-config.d.ts +44 -0
  101. package/dist/types/runtime-config.d.ts.map +1 -0
  102. package/dist/types/to-code-options.d.ts +4 -0
  103. package/dist/types/to-code-options.d.ts.map +1 -0
  104. package/dist/utils/debugger.d.ts +7 -0
  105. package/dist/utils/debugger.d.ts.map +1 -0
  106. package/dist/utils/ignore-matcher.d.ts +19 -0
  107. package/dist/utils/ignore-matcher.d.ts.map +1 -0
  108. package/dist/utils/is-keywords.d.ts +2 -0
  109. package/dist/utils/is-keywords.d.ts.map +1 -0
  110. package/dist/utils/is-reserved-word.d.ts +2 -0
  111. package/dist/utils/is-reserved-word.d.ts.map +1 -0
  112. package/dist/utils/json-schema-utils/index.d.ts +11 -0
  113. package/dist/utils/json-schema-utils/index.d.ts.map +1 -0
  114. package/dist/utils/json-schema-utils/is-array.d.ts +3 -0
  115. package/dist/utils/json-schema-utils/is-array.d.ts.map +1 -0
  116. package/dist/utils/json-schema-utils/is-mixed.d.ts +4 -0
  117. package/dist/utils/json-schema-utils/is-mixed.d.ts.map +1 -0
  118. package/dist/utils/json-schema-utils/is-non-array.d.ts +3 -0
  119. package/dist/utils/json-schema-utils/is-non-array.d.ts.map +1 -0
  120. package/dist/utils/json-schema-utils/is-ref.d.ts +3 -0
  121. package/dist/utils/json-schema-utils/is-ref.d.ts.map +1 -0
  122. package/dist/utils/json-schema-utils/types/any-other-attribute.d.ts +5 -0
  123. package/dist/utils/json-schema-utils/types/any-other-attribute.d.ts.map +1 -0
  124. package/dist/utils/json-schema-utils/types/mixed-schema-object.d.ts +7 -0
  125. package/dist/utils/json-schema-utils/types/mixed-schema-object.d.ts.map +1 -0
  126. package/dist/utils/logger.d.ts +6 -0
  127. package/dist/utils/logger.d.ts.map +1 -0
  128. package/dist/utils/swagger-utils/dereference-deep.d.ts +3 -0
  129. package/dist/utils/swagger-utils/dereference-deep.d.ts.map +1 -0
  130. package/dist/utils/swagger-utils/dereference-operation.d.ts +4 -0
  131. package/dist/utils/swagger-utils/dereference-operation.d.ts.map +1 -0
  132. package/dist/utils/swagger-utils/dereference.d.ts +3 -0
  133. package/dist/utils/swagger-utils/dereference.d.ts.map +1 -0
  134. package/dist/utils/swagger-utils/index.d.ts +15 -0
  135. package/dist/utils/swagger-utils/index.d.ts.map +1 -0
  136. package/dist/utils/swagger-utils/is-ref-defined.d.ts +3 -0
  137. package/dist/utils/swagger-utils/is-ref-defined.d.ts.map +1 -0
  138. package/dist/utils/swagger-utils/remove-undefined-ref.d.ts +3 -0
  139. package/dist/utils/swagger-utils/remove-undefined-ref.d.ts.map +1 -0
  140. package/dist/utils/swagger-utils/update-operation-id.d.ts +5 -0
  141. package/dist/utils/swagger-utils/update-operation-id.d.ts.map +1 -0
  142. package/package.json +80 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate-modules.d.ts","sourceRoot":"","sources":["../../../../src/tasks/setup/utils/validate-modules.ts"],"names":[],"mappings":"AAIA,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CA+BrE"}
@@ -0,0 +1,11 @@
1
+ import { ListrTask } from 'listr2';
2
+ import { TaskContext } from '../../tasks/types/task-context.js';
3
+ interface ShakingTaskOptions {
4
+ enabled?: boolean | ((ctx: TaskContext) => boolean | Promise<boolean>);
5
+ skip?: boolean | string | ((ctx: TaskContext) => boolean | string | Promise<boolean | string>);
6
+ skipIgnoredModules?: boolean;
7
+ skipEmptyDocuments?: boolean;
8
+ }
9
+ export declare function createShakingTask(options?: ShakingTaskOptions): ListrTask<TaskContext>;
10
+ export {};
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tasks/shaking/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAA;AAG3D,UAAU,kBAAkB;IAC1B,OAAO,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,GAAG,EAAE,WAAW,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,CAAA;IACtE,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,CAAC,CAAC,GAAG,EAAE,WAAW,KAAK,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,MAAM,CAAC,CAAC,CAAA;IAE9F,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAC7B;AAGD,wBAAgB,iBAAiB,CAAC,OAAO,CAAC,EAAE,kBAAkB,GAAG,SAAS,CAAC,WAAW,CAAC,CA+CtF"}
@@ -0,0 +1,2 @@
1
+ export type IgnoreMode = 'add' | 'except';
2
+ //# sourceMappingURL=ignore-mode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ignore-mode.d.ts","sourceRoot":"","sources":["../../../src/tasks/types/ignore-mode.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,QAAQ,CAAA"}
@@ -0,0 +1,24 @@
1
+ import { ApiDocument } from '../../tasks/utils/api-document.js';
2
+ import { ApiDocumentV3_1 } from '../../tasks/utils/api-document_v3_1.js';
3
+ import { Artifact } from '../../tasks/utils/artifact.js';
4
+ import { RuntimeConfig } from '../../types/runtime-config.js';
5
+ import { IgnoreMatcher } from '../../utils/ignore-matcher.js';
6
+ export interface TaskContext {
7
+ setup?: {
8
+ rc: RuntimeConfig;
9
+ matcher: IgnoreMatcher;
10
+ };
11
+ downloaded?: {
12
+ documents: ApiDocument[];
13
+ };
14
+ validated?: {
15
+ documents: ApiDocumentV3_1[];
16
+ };
17
+ shaken?: {
18
+ documents: ApiDocumentV3_1[];
19
+ };
20
+ compiled?: {
21
+ artifacts: Artifact[];
22
+ };
23
+ }
24
+ //# sourceMappingURL=task-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task-context.d.ts","sourceRoot":"","sources":["../../../src/tasks/types/task-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAA;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAA;AACpE,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAEzD,MAAM,WAAW,WAAW;IAC1B,KAAK,CAAC,EAAE;QACN,EAAE,EAAE,aAAa,CAAA;QACjB,OAAO,EAAE,aAAa,CAAA;KACvB,CAAA;IAED,UAAU,CAAC,EAAE;QACX,SAAS,EAAE,WAAW,EAAE,CAAA;KACzB,CAAA;IAED,SAAS,CAAC,EAAE;QACV,SAAS,EAAE,eAAe,EAAE,CAAA;KAC7B,CAAA;IAED,MAAM,CAAC,EAAE;QACP,SAAS,EAAE,eAAe,EAAE,CAAA;KAC7B,CAAA;IAED,QAAQ,CAAC,EAAE;QACT,SAAS,EAAE,QAAQ,EAAE,CAAA;KACtB,CAAA;CACF"}
@@ -0,0 +1,18 @@
1
+ import type { OpenAPI } from '@scalar/openapi-types';
2
+ import { ModuleDefinition } from './module-definition.js';
3
+ import { validate } from '@scalar/openapi-parser';
4
+ import { ApiDocumentV3_1 } from './api-document_v3_1.js';
5
+ import { RuntimeConfig } from '../../types/runtime-config.js';
6
+ export declare class ApiDocument<T extends OpenAPI.Document = OpenAPI.Document> {
7
+ readonly module: ModuleDefinition;
8
+ readonly swagger: T;
9
+ constructor(swagger: T, module: ModuleDefinition);
10
+ static cache: Map<string, ApiDocument>;
11
+ private static download;
12
+ private static read;
13
+ static create(moduleDefinition: ModuleDefinition): Promise<ApiDocument>;
14
+ validate(): ReturnType<typeof validate>;
15
+ fix(): ApiDocument;
16
+ toV3_1(rc?: RuntimeConfig): Promise<ApiDocumentV3_1>;
17
+ }
18
+ //# sourceMappingURL=api-document.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-document.d.ts","sourceRoot":"","sources":["../../../src/tasks/utils/api-document.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AACzD,OAAO,EAAW,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAExD,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAKzD,qBAAa,WAAW,CAAC,CAAC,SAAS,OAAO,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ;IACpE,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAA;IACjC,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAA;gBAEP,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,gBAAgB;IAKhD,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAY;mBAE7B,QAAQ;mBA0BR,IAAI;WAaZ,MAAM,CAAC,gBAAgB,EAAE,gBAAgB,GAAG,OAAO,CAAC,WAAW,CAAC;IAcvE,QAAQ,IAAI,UAAU,CAAC,OAAO,QAAQ,CAAC;IAK7C,GAAG,IAAI,WAAW;IAaZ,MAAM,CAAC,EAAE,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,eAAe,CAAC;CA4B3D"}
@@ -0,0 +1,16 @@
1
+ import type { OpenAPIV3_1 } from '@scalar/openapi-types';
2
+ import { ModuleDefinition } from './module-definition.js';
3
+ import { OperationDefinition } from './operation-definition.js';
4
+ import { SchemaDefinition } from './schema-definition.js';
5
+ export declare class ApiDocumentV3_1 {
6
+ readonly module: ModuleDefinition;
7
+ readonly swagger: OpenAPIV3_1.Document;
8
+ constructor(swagger: OpenAPIV3_1.Document, module: ModuleDefinition);
9
+ get schemas(): SchemaDefinition[];
10
+ get operations(): OperationDefinition[];
11
+ isEmpty(): boolean;
12
+ dereference($ref: string): SchemaDefinition | undefined;
13
+ isRefDefined($ref: string): boolean;
14
+ sharking(filter: (operationDefinition: OperationDefinition) => boolean): ApiDocumentV3_1;
15
+ }
16
+ //# sourceMappingURL=api-document_v3_1.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-document_v3_1.d.ts","sourceRoot":"","sources":["../../../src/tasks/utils/api-document_v3_1.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAEzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAKzD,qBAAa,eAAe;IAC1B,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAA;IACjC,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC,QAAQ,CAAA;gBAE1B,OAAO,EAAE,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,gBAAgB;IAKnE,IAAI,OAAO,IAAI,gBAAgB,EAAE,CAWhC;IAED,IAAI,UAAU,IAAI,mBAAmB,EAAE,CAatC;IAED,OAAO,IAAI,OAAO;IAIlB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,gBAAgB,GAAG,SAAS;IAQvD,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IASnC,QAAQ,CAAC,MAAM,EAAE,CAAC,mBAAmB,EAAE,mBAAmB,KAAK,OAAO,GAAG,eAAe;CA8BzF"}
@@ -0,0 +1,25 @@
1
+ import { Dependency, DependencyIdentifier, DependencyOptions, DependencySource } from './dependency.js';
2
+ import { FileNamingStyle } from '../../constants/file-naming-style.js';
3
+ import { ToCodeOptions } from '../../types/to-code-options.js';
4
+ export declare class Artifact {
5
+ id: string;
6
+ filepath: string;
7
+ dependencies: Dependency[];
8
+ warns: string[];
9
+ content: string;
10
+ extensionName: any;
11
+ constructor(options: {
12
+ id: string;
13
+ filepath: string;
14
+ dependencies?: Dependency[];
15
+ content: string;
16
+ extensionName?: string;
17
+ });
18
+ get dirname(): string;
19
+ changeFileNameCase(style: FileNamingStyle): this;
20
+ relativeTo(filepath: string): string;
21
+ addDependence(source: DependencySource, identifiers: (string | DependencyIdentifier)[], options?: DependencyOptions): Dependency;
22
+ addWarn(message: string): void;
23
+ toCode(options: ToCodeOptions): string;
24
+ }
25
+ //# sourceMappingURL=artifact.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"artifact.d.ts","sourceRoot":"","sources":["../../../src/tasks/utils/artifact.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AACvG,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AAElE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAW1D,qBAAa,QAAQ;IACnB,EAAE,EAAE,MAAM,CAAA;IACV,QAAQ,EAAE,MAAM,CAAA;IAChB,YAAY,EAAE,UAAU,EAAE,CAAK;IAC/B,KAAK,EAAE,MAAM,EAAE,CAAK;IACpB,OAAO,EAAE,MAAM,CAAA;IACf,aAAa,MAAA;gBAGD,OAAO,EAAE;QACnB,EAAE,EAAE,MAAM,CAAA;QACV,QAAQ,EAAE,MAAM,CAAA;QAChB,YAAY,CAAC,EAAE,UAAU,EAAE,CAAA;QAC3B,OAAO,EAAE,MAAM,CAAA;QACf,aAAa,CAAC,EAAE,MAAM,CAAA;KACvB;IASD,IAAI,OAAO,IAAI,MAAM,CAEpB;IAED,kBAAkB,CAAC,KAAK,EAAE,eAAe,GAAG,IAAI;IAkBhD,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM;IAKpC,aAAa,CAAC,MAAM,EAAE,gBAAgB,EAAE,WAAW,EAAE,CAAC,MAAM,GAAG,oBAAoB,CAAC,EAAE,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,UAAU;IAYhI,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAI9B,MAAM,CAAC,OAAO,EAAE,aAAa,GAAG,MAAM;CAuBvC"}
@@ -0,0 +1,22 @@
1
+ import { Artifact } from './artifact.js';
2
+ import { ToCodeOptions } from '../../types/to-code-options.js';
3
+ export type DependencySource = string | Artifact;
4
+ export interface DependencyOptions {
5
+ export?: boolean;
6
+ }
7
+ export declare class DependencyIdentifier {
8
+ name: string;
9
+ alias?: string | undefined;
10
+ constructor(name: string, alias?: string | undefined);
11
+ toCode(): string;
12
+ }
13
+ export declare class Dependency {
14
+ readonly source: DependencySource;
15
+ readonly identifiers: DependencyIdentifier[];
16
+ readonly export: boolean;
17
+ readonly belongTo: Artifact;
18
+ constructor(source: DependencySource, identifiers: (string | DependencyIdentifier)[], belongTo: Artifact, options?: DependencyOptions);
19
+ private get realSource();
20
+ toCode(options: ToCodeOptions): string;
21
+ }
22
+ //# sourceMappingURL=dependency.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dependency.d.ts","sourceRoot":"","sources":["../../../src/tasks/utils/dependency.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAExC,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAE1D,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,QAAQ,CAAA;AAEhD,MAAM,WAAW,iBAAiB;IAChC,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB;AAED,qBAAa,oBAAoB;IAEtB,IAAI,EAAE,MAAM;IACZ,KAAK,CAAC,EAAE,MAAM;gBADd,IAAI,EAAE,MAAM,EACZ,KAAK,CAAC,EAAE,MAAM,YAAA;IAGvB,MAAM,IAAI,MAAM;CAMjB;AAED,qBAAa,UAAU;IACrB,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAA;IACjC,QAAQ,CAAC,WAAW,EAAE,oBAAoB,EAAE,CAAA;IAC5C,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAA;IACxB,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAA;gBAGf,MAAM,EAAE,gBAAgB,EAAE,WAAW,EAAE,CAAC,MAAM,GAAG,oBAAoB,CAAC,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,CAAC,EAAE,iBAAiB;IAOrI,OAAO,KAAK,UAAU,GAMrB;IAED,MAAM,CAAC,OAAO,EAAE,aAAa,GAAG,MAAM;CA4BvC"}
@@ -0,0 +1,8 @@
1
+ import type { OpenAPIV3_1 } from '@scalar/openapi-types';
2
+ export declare class JsonSchema {
3
+ private value;
4
+ constructor(value: OpenAPIV3_1.SchemaObject | OpenAPIV3_1.ReferenceObject);
5
+ toJson(): OpenAPIV3_1.SchemaObject | OpenAPIV3_1.ReferenceObject;
6
+ pickRefs(): string[];
7
+ }
8
+ //# sourceMappingURL=json-schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json-schema.d.ts","sourceRoot":"","sources":["../../../src/tasks/utils/json-schema.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAIxD,qBAAa,UAAU;IAEnB,OAAO,CAAC,KAAK;gBAAL,KAAK,EAAE,WAAW,CAAC,YAAY,GAAG,WAAW,CAAC,eAAe;IAGvE,MAAM,IAAI,WAAW,CAAC,YAAY,GAAG,WAAW,CAAC,eAAe;IAIhE,QAAQ,IAAI,MAAM,EAAE;CASrB"}
@@ -0,0 +1,6 @@
1
+ export declare class ModuleDefinition {
2
+ name: string;
3
+ address: string;
4
+ constructor(name: string, address: string);
5
+ }
6
+ //# sourceMappingURL=module-definition.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module-definition.d.ts","sourceRoot":"","sources":["../../../src/tasks/utils/module-definition.ts"],"names":[],"mappings":"AAAA,qBAAa,gBAAgB;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;gBAEH,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;CAI1C"}
@@ -0,0 +1,22 @@
1
+ import type { OpenAPIV3_1 } from '@scalar/openapi-types';
2
+ import { ModuleDefinition } from './module-definition.js';
3
+ import { ApiDocumentV3_1 } from './api-document_v3_1.js';
4
+ import { SchemaDefinition } from './schema-definition.js';
5
+ export declare class OperationDefinition {
6
+ readonly module: ModuleDefinition;
7
+ readonly operationId: string;
8
+ readonly method: string;
9
+ readonly pathname: string;
10
+ readonly operation: OpenAPIV3_1.OperationObject;
11
+ readonly document: ApiDocumentV3_1;
12
+ constructor(args: {
13
+ method: string;
14
+ pathname: string;
15
+ operation: OpenAPIV3_1.OperationObject;
16
+ module: ModuleDefinition;
17
+ document: ApiDocumentV3_1;
18
+ });
19
+ private formatOperationId;
20
+ getDependencies(): SchemaDefinition[];
21
+ }
22
+ //# sourceMappingURL=operation-definition.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operation-definition.d.ts","sourceRoot":"","sources":["../../../src/tasks/utils/operation-definition.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAGzD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAExD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAGzD,qBAAa,mBAAmB;IAC9B,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAA;IAEjC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,SAAS,EAAE,WAAW,CAAC,eAAe,CAAA;IAC/C,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAA;gBAEtB,IAAI,EAAE;QAChB,MAAM,EAAE,MAAM,CAAA;QACd,QAAQ,EAAE,MAAM,CAAA;QAChB,SAAS,EAAE,WAAW,CAAC,eAAe,CAAA;QACtC,MAAM,EAAE,gBAAgB,CAAA;QACxB,QAAQ,EAAE,eAAe,CAAA;KAC1B;IAaD,OAAO,CAAC,iBAAiB;IAmBzB,eAAe,IAAI,gBAAgB,EAAE;CAiCtC"}
@@ -0,0 +1,19 @@
1
+ import type { OpenAPIV3_1 } from '@scalar/openapi-types';
2
+ import { ModuleDefinition } from './module-definition.js';
3
+ import { ApiDocumentV3_1 } from './api-document_v3_1.js';
4
+ export declare class SchemaDefinition {
5
+ readonly id: string;
6
+ readonly name: string;
7
+ readonly schema: OpenAPIV3_1.SchemaObject | OpenAPIV3_1.ReferenceObject;
8
+ readonly module: ModuleDefinition;
9
+ readonly document: ApiDocumentV3_1;
10
+ constructor(args: {
11
+ id: string;
12
+ name: string;
13
+ schema: OpenAPIV3_1.SchemaObject | OpenAPIV3_1.ReferenceObject;
14
+ module: ModuleDefinition;
15
+ document: ApiDocumentV3_1;
16
+ });
17
+ getDependencies(): SchemaDefinition[];
18
+ }
19
+ //# sourceMappingURL=schema-definition.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema-definition.d.ts","sourceRoot":"","sources":["../../../src/tasks/utils/schema-definition.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAEzD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAGxD,qBAAa,gBAAgB;IAC3B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,GAAG,WAAW,CAAC,eAAe,CAAA;IACvE,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAA;IACjC,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAA;gBAEtB,IAAI,EAAE;QAChB,EAAE,EAAE,MAAM,CAAA;QACV,IAAI,EAAE,MAAM,CAAA;QACZ,MAAM,EAAE,WAAW,CAAC,YAAY,GAAG,WAAW,CAAC,eAAe,CAAA;QAC9D,MAAM,EAAE,gBAAgB,CAAA;QACxB,QAAQ,EAAE,eAAe,CAAA;KAC1B;IAQD,eAAe,IAAI,gBAAgB,EAAE;CAqBtC"}
@@ -0,0 +1,2 @@
1
+ export declare function toComment(msg?: string): string;
2
+ //# sourceMappingURL=to-comment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"to-comment.d.ts","sourceRoot":"","sources":["../../../src/tasks/utils/to-comment.ts"],"names":[],"mappings":"AAAA,wBAAgB,SAAS,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAM9C"}
@@ -0,0 +1,9 @@
1
+ import { ListrTask } from 'listr2';
2
+ import { TaskContext } from '../../tasks/types/task-context.js';
3
+ interface ValidateTaskOptions {
4
+ enabled?: boolean | ((ctx: TaskContext) => boolean | Promise<boolean>);
5
+ skip?: boolean | string | ((ctx: TaskContext) => boolean | string | Promise<boolean | string>);
6
+ }
7
+ export declare function createValidateTask(options?: ValidateTaskOptions): ListrTask<TaskContext>;
8
+ export {};
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tasks/validate/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAA;AAG3D,UAAU,mBAAmB;IAC3B,OAAO,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,GAAG,EAAE,WAAW,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,CAAA;IACtE,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,CAAC,CAAC,GAAG,EAAE,WAAW,KAAK,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,MAAM,CAAC,CAAC,CAAA;CAC/F;AAED,wBAAgB,kBAAkB,CAAC,OAAO,CAAC,EAAE,mBAAmB,GAAG,SAAS,CAAC,WAAW,CAAC,CA6CxF"}
@@ -0,0 +1,19 @@
1
+ export interface BuildCliOptions {
2
+ /**
3
+ * The build config file
4
+ */
5
+ config?: string;
6
+ /**
7
+ * Filter module(s) to generate
8
+ */
9
+ module?: string[];
10
+ /**
11
+ * Print debug information
12
+ */
13
+ debug?: boolean;
14
+ /**
15
+ * Tolerate wrong swagger structure
16
+ */
17
+ tolerant?: boolean;
18
+ }
19
+ //# sourceMappingURL=build-cli-options.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-cli-options.d.ts","sourceRoot":"","sources":["../../src/types/build-cli-options.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IAEf;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;IAEjB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;IAEf;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB"}
@@ -0,0 +1,10 @@
1
+ import type { OpenAPIV3_1 } from '@scalar/openapi-types';
2
+ import { ModuleDefinition } from '../tasks/utils/module-definition.js';
3
+ export interface OperationIdFactoryOptions {
4
+ module: ModuleDefinition;
5
+ method: string;
6
+ pathname: string;
7
+ operation: OpenAPIV3_1.OperationObject;
8
+ }
9
+ export type OperationIdFactory = (context: OperationIdFactoryOptions) => string;
10
+ //# sourceMappingURL=operation-id-factory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operation-id-factory.d.ts","sourceRoot":"","sources":["../../src/types/operation-id-factory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAA;AAGrE,MAAM,WAAW,yBAAyB;IACxC,MAAM,EAAE,gBAAgB,CAAA;IAExB,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,WAAW,CAAC,eAAe,CAAA;CACvC;AAED,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,EAAE,yBAAyB,KAAK,MAAM,CAAA"}
@@ -0,0 +1,9 @@
1
+ import { Static } from '@sinclair/typebox';
2
+ import { QsArrayFormat } from '../constants/qs-array-format.js';
3
+ export declare const Qs: import("@sinclair/typebox").TObject<{
4
+ indices: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
5
+ arrayFormat: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TEnum<typeof QsArrayFormat>>;
6
+ allowDots: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
7
+ }>;
8
+ export type Qs = Static<typeof Qs>;
9
+ //# sourceMappingURL=qs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"qs.d.ts","sourceRoot":"","sources":["../../src/types/qs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAQ,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAA;AAG9D,eAAO,MAAM,EAAE;;;;EAIb,CAAA;AAEF,MAAM,MAAM,EAAE,GAAG,MAAM,CAAC,OAAO,EAAE,CAAC,CAAA"}
@@ -0,0 +1,44 @@
1
+ import { KeqQueryOptions } from 'keq';
2
+ import { Static } from '@sinclair/typebox';
3
+ import { OpenAPIV3_1 } from '@scalar/openapi-types';
4
+ import { OperationIdFactory } from './operation-id-factory.js';
5
+ import { FileNamingStyle } from '../constants/file-naming-style.js';
6
+ export declare const RuntimeConfig: import("@sinclair/typebox").TObject<{
7
+ /**
8
+ * Whether to generate ES Module code
9
+ *
10
+ * If not specified, the module system will be inferred from the nearest package.json "type" field
11
+ * or defaults to "cjs" if no package.json is found.
12
+ */
13
+ esm: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
14
+ /**
15
+ * Output directory for generated files
16
+ */
17
+ outdir: import("@sinclair/typebox").TString;
18
+ /**
19
+ * File naming style for generated files
20
+ */
21
+ fileNamingStyle: import("@sinclair/typebox").TEnum<typeof FileNamingStyle>;
22
+ modules: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TString>;
23
+ operationIdFactory: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TFunction<[import("@sinclair/typebox").TAny], import("@sinclair/typebox").TString>>;
24
+ qs: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
25
+ indices: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
26
+ arrayFormat: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TEnum<typeof import("../constants/qs-array-format.js").QsArrayFormat>>;
27
+ allowDots: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
28
+ }>, import("@sinclair/typebox").TFunction<[import("@sinclair/typebox").TAny], import("@sinclair/typebox").TObject<{
29
+ indices: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
30
+ arrayFormat: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TEnum<typeof import("../constants/qs-array-format.js").QsArrayFormat>>;
31
+ allowDots: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
32
+ }>>]>>;
33
+ debug: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
34
+ /**
35
+ * Whether to tolerate wrong swagger structure
36
+ */
37
+ tolerant: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
38
+ }>;
39
+ export type KeqQueryOptionsFactory = (parameter: OpenAPIV3_1.ParameterObject) => KeqQueryOptions | undefined;
40
+ export interface RuntimeConfig extends Omit<Static<typeof RuntimeConfig>, 'operationId' | 'qs'> {
41
+ operationIdFactory?: OperationIdFactory;
42
+ qs?: KeqQueryOptions | KeqQueryOptionsFactory;
43
+ }
44
+ //# sourceMappingURL=runtime-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime-config.d.ts","sourceRoot":"","sources":["../../src/types/runtime-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,KAAK,CAAA;AACrC,OAAO,EAAE,MAAM,EAAQ,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAA;AAInE,eAAO,MAAM,aAAa;IACxB;;;;;OAKG;;IAGH;;OAEG;;IAGH;;OAEG;;;;;;;;;;;;;;IAcH;;OAEG;;EAEH,CAAA;AAGF,MAAM,MAAM,sBAAsB,GAAG,CAAC,SAAS,EAAE,WAAW,CAAC,eAAe,KAAK,eAAe,GAAG,SAAS,CAAA;AAE5G,MAAM,WAAW,aAAc,SAAQ,IAAI,CAAC,MAAM,CAAC,OAAO,aAAa,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;IAC7F,kBAAkB,CAAC,EAAE,kBAAkB,CAAA;IACvC,EAAE,CAAC,EAAE,eAAe,GAAG,sBAAsB,CAAA;CAC9C"}
@@ -0,0 +1,4 @@
1
+ export interface ToCodeOptions {
2
+ esm: boolean;
3
+ }
4
+ //# sourceMappingURL=to-code-options.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"to-code-options.d.ts","sourceRoot":"","sources":["../../src/types/to-code-options.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,OAAO,CAAA;CACb"}
@@ -0,0 +1,7 @@
1
+ import { RuntimeConfig } from '../types/runtime-config.js';
2
+ export declare class Debugger {
3
+ private rc?;
4
+ constructor(rc?: RuntimeConfig | undefined);
5
+ writeSwagger(fullpath: string, swagger: any): void;
6
+ }
7
+ //# sourceMappingURL=debugger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"debugger.d.ts","sourceRoot":"","sources":["../../src/utils/debugger.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAGzD,qBAAa,QAAQ;IACP,OAAO,CAAC,EAAE,CAAC;gBAAH,EAAE,CAAC,EAAE,aAAa,YAAA;IAGtC,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,GAAG,IAAI;CAKnD"}
@@ -0,0 +1,19 @@
1
+ import { OperationDefinition } from '../tasks/utils/operation-definition.js';
2
+ import { ModuleDefinition } from '../tasks/utils/module-definition.js';
3
+ export interface IgnoreMatcherRule {
4
+ persist: boolean;
5
+ ignore: boolean;
6
+ moduleName: string;
7
+ operationMethod: string;
8
+ operationPathname: string;
9
+ }
10
+ export declare class IgnoreMatcher {
11
+ private rules;
12
+ constructor(rules: IgnoreMatcherRule[]);
13
+ static read(filepath: string): Promise<IgnoreMatcher>;
14
+ write(filepath: string): Promise<void>;
15
+ append(rule: IgnoreMatcherRule): void;
16
+ isOperationIgnored(operationDefinition: OperationDefinition): boolean;
17
+ isModuleIgnored(moduleDefinition: ModuleDefinition): boolean;
18
+ }
19
+ //# sourceMappingURL=ignore-matcher.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ignore-matcher.d.ts","sourceRoot":"","sources":["../../src/utils/ignore-matcher.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAA;AAC3E,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAA;AAGrE,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,OAAO,CAAA;IAChB,MAAM,EAAE,OAAO,CAAA;IACf,UAAU,EAAE,MAAM,CAAA;IAClB,eAAe,EAAE,MAAM,CAAA;IACvB,iBAAiB,EAAE,MAAM,CAAA;CAC1B;AAGD,qBAAa,aAAa;IACxB,OAAO,CAAC,KAAK,CAAqB;gBAEtB,KAAK,EAAE,iBAAiB,EAAE;WAIzB,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAyCrD,KAAK,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAyC5C,MAAM,CAAC,IAAI,EAAE,iBAAiB,GAAG,IAAI;IAKrC,kBAAkB,CAAC,mBAAmB,EAAE,mBAAmB,GAAG,OAAO;IAgBrE,eAAe,CAAC,gBAAgB,EAAE,gBAAgB,GAAG,OAAO;CAiB7D"}
@@ -0,0 +1,2 @@
1
+ export declare function isKeywords(str: string): boolean;
2
+ //# sourceMappingURL=is-keywords.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-keywords.d.ts","sourceRoot":"","sources":["../../src/utils/is-keywords.ts"],"names":[],"mappings":"AA4BA,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAE/C"}
@@ -0,0 +1,2 @@
1
+ export declare function isReservedWord(str: string): boolean;
2
+ //# sourceMappingURL=is-reserved-word.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-reserved-word.d.ts","sourceRoot":"","sources":["../../src/utils/is-reserved-word.ts"],"names":[],"mappings":"AAmCA,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAEnD"}
@@ -0,0 +1,11 @@
1
+ import { isArray } from './is-array.js';
2
+ import { isMixed } from './is-mixed.js';
3
+ import { isNonArray } from './is-non-array.js';
4
+ import { isRef } from './is-ref.js';
5
+ export declare class JsonSchemaUtils {
6
+ static isRef: typeof isRef;
7
+ static isArray: typeof isArray;
8
+ static isNonArray: typeof isNonArray;
9
+ static isMixed: typeof isMixed;
10
+ }
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/json-schema-utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAGnC,qBAAa,eAAe;IAC1B,MAAM,CAAC,KAAK,eAAQ;IACpB,MAAM,CAAC,OAAO,iBAAU;IACxB,MAAM,CAAC,UAAU,oBAAa;IAC9B,MAAM,CAAC,OAAO,iBAAU;CACzB"}
@@ -0,0 +1,3 @@
1
+ import type { OpenAPIV3_1 } from '@scalar/openapi-types';
2
+ export declare function isArray(schema: OpenAPIV3_1.SchemaObject | OpenAPIV3_1.ReferenceObject): schema is OpenAPIV3_1.ArraySchemaObject;
3
+ //# sourceMappingURL=is-array.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-array.d.ts","sourceRoot":"","sources":["../../../src/utils/json-schema-utils/is-array.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAExD,wBAAgB,OAAO,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,GAAG,WAAW,CAAC,eAAe,GAAG,MAAM,IAAI,WAAW,CAAC,iBAAiB,CAE/H"}
@@ -0,0 +1,4 @@
1
+ import type { OpenAPIV3_1 } from '@scalar/openapi-types';
2
+ import { MixedSchemaObject } from './types/mixed-schema-object.js';
3
+ export declare function isMixed(schema: OpenAPIV3_1.SchemaObject | OpenAPIV3_1.ReferenceObject): schema is MixedSchemaObject;
4
+ //# sourceMappingURL=is-mixed.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-mixed.d.ts","sourceRoot":"","sources":["../../../src/utils/json-schema-utils/is-mixed.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAElE,wBAAgB,OAAO,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,GAAG,WAAW,CAAC,eAAe,GAAG,MAAM,IAAI,iBAAiB,CAEnH"}
@@ -0,0 +1,3 @@
1
+ import type { OpenAPIV3_1 } from '@scalar/openapi-types';
2
+ export declare function isNonArray(schema: OpenAPIV3_1.SchemaObject | OpenAPIV3_1.ReferenceObject): schema is OpenAPIV3_1.NonArraySchemaObject;
3
+ //# sourceMappingURL=is-non-array.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-non-array.d.ts","sourceRoot":"","sources":["../../../src/utils/json-schema-utils/is-non-array.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAExD,wBAAgB,UAAU,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,GAAG,WAAW,CAAC,eAAe,GAAG,MAAM,IAAI,WAAW,CAAC,oBAAoB,CAErI"}
@@ -0,0 +1,3 @@
1
+ import type { OpenAPIV3_1 } from '@scalar/openapi-types';
2
+ export declare function isRef(schema: OpenAPIV3_1.SchemaObject | OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.ResponseObject | OpenAPIV3_1.ParameterObject): schema is OpenAPIV3_1.ReferenceObject;
3
+ //# sourceMappingURL=is-ref.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-ref.d.ts","sourceRoot":"","sources":["../../../src/utils/json-schema-utils/is-ref.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAGxD,wBAAgB,KAAK,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,GAAG,WAAW,CAAC,eAAe,GAAG,WAAW,CAAC,cAAc,GAAG,WAAW,CAAC,eAAe,GAAG,MAAM,IAAI,WAAW,CAAC,eAAe,CAEtL"}
@@ -0,0 +1,5 @@
1
+ import type { OpenAPIV3 } from '@scalar/openapi-types';
2
+ type ExtractAnyOtherAttribute<T> = T extends (OpenAPIV3.ArraySchemaObject | OpenAPIV3.NonArraySchemaObject) & infer M ? M : never;
3
+ export type AnyOtherAttribute = ExtractAnyOtherAttribute<OpenAPIV3.SchemaObject>;
4
+ export {};
5
+ //# sourceMappingURL=any-other-attribute.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"any-other-attribute.d.ts","sourceRoot":"","sources":["../../../../src/utils/json-schema-utils/types/any-other-attribute.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAEtD,KAAK,wBAAwB,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,iBAAiB,GAAG,SAAS,CAAC,oBAAoB,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;AACjI,MAAM,MAAM,iBAAiB,GAAG,wBAAwB,CAAC,SAAS,CAAC,YAAY,CAAC,CAAA"}
@@ -0,0 +1,7 @@
1
+ import type { OpenAPIV3_1 } from '@scalar/openapi-types';
2
+ import { AnyOtherAttribute } from './any-other-attribute.js';
3
+ type ExtractSchemaObject<T> = T extends (infer M & AnyOtherAttribute) ? M : never;
4
+ type SchemaObject = ExtractSchemaObject<OpenAPIV3_1.SchemaObject>;
5
+ export type MixedSchemaObject = Exclude<SchemaObject, boolean | OpenAPIV3_1.NonArraySchemaObject | OpenAPIV3_1.ArraySchemaObject>;
6
+ export {};
7
+ //# sourceMappingURL=mixed-schema-object.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mixed-schema-object.d.ts","sourceRoot":"","sources":["../../../../src/utils/json-schema-utils/types/mixed-schema-object.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAE5D,KAAK,mBAAmB,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,iBAAiB,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;AACjF,KAAK,YAAY,GAAG,mBAAmB,CAAC,WAAW,CAAC,YAAY,CAAC,CAAA;AAEjE,MAAM,MAAM,iBAAiB,GAAG,OAAO,CAAC,YAAY,EAAE,OAAO,GAAG,WAAW,CAAC,oBAAoB,GAAG,WAAW,CAAC,iBAAiB,CAAC,CAAA"}
@@ -0,0 +1,6 @@
1
+ export declare const logger: {
2
+ log: (str: string) => void;
3
+ warn: (str: string) => void;
4
+ error: (str: string) => void;
5
+ };
6
+ //# sourceMappingURL=logger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,MAAM;eACN,MAAM;gBACL,MAAM;iBACL,MAAM;CACpB,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { OpenAPIV3_1 } from '@scalar/openapi-types';
2
+ export declare function dereferenceDeep<T extends OpenAPIV3_1.SchemaObject | OpenAPIV3_1.ResponseObject | OpenAPIV3_1.ParameterObject | OpenAPIV3_1.RequestBodyObject>($ref: string, swagger: OpenAPIV3_1.Document): T;
3
+ //# sourceMappingURL=dereference-deep.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dereference-deep.d.ts","sourceRoot":"","sources":["../../../src/utils/swagger-utils/dereference-deep.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAKxD,wBAAgB,eAAe,CAAC,CAAC,SAAS,WAAW,CAAC,YAAY,GAAG,WAAW,CAAC,cAAc,GAAG,WAAW,CAAC,eAAe,GAAG,WAAW,CAAC,iBAAiB,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,CAAC,QAAQ,GAAG,CAAC,CAsB7M"}
@@ -0,0 +1,4 @@
1
+ import type { OpenAPIV3_1 } from '@scalar/openapi-types';
2
+ export declare function dereferenceResponses(swagger: OpenAPIV3_1.Document): void;
3
+ export declare function dereferenceOperation(swagger: OpenAPIV3_1.Document): OpenAPIV3_1.Document;
4
+ //# sourceMappingURL=dereference-operation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dereference-operation.d.ts","sourceRoot":"","sources":["../../../src/utils/swagger-utils/dereference-operation.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAgCxD,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,WAAW,CAAC,QAAQ,GAAG,IAAI,CAkBxE;AAeD,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,WAAW,CAAC,QAAQ,GAAG,WAAW,CAAC,QAAQ,CASxF"}
@@ -0,0 +1,3 @@
1
+ import type { OpenAPIV3_1 } from '@scalar/openapi-types';
2
+ export declare function dereference<T extends OpenAPIV3_1.SchemaObject | OpenAPIV3_1.ResponseObject | OpenAPIV3_1.ParameterObject | OpenAPIV3_1.RequestBodyObject | OpenAPIV3_1.ReferenceObject>($ref: string, swagger: OpenAPIV3_1.Document): T;
3
+ //# sourceMappingURL=dereference.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dereference.d.ts","sourceRoot":"","sources":["../../../src/utils/swagger-utils/dereference.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAGxD,wBAAgB,WAAW,CAAC,CAAC,SAAS,WAAW,CAAC,YAAY,GAAG,WAAW,CAAC,cAAc,GAAG,WAAW,CAAC,eAAe,GAAG,WAAW,CAAC,iBAAiB,GAAG,WAAW,CAAC,eAAe,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,CAAC,QAAQ,GAAG,CAAC,CAcvO"}
@@ -0,0 +1,15 @@
1
+ import { dereference } from './dereference.js';
2
+ import { dereferenceOperation } from './dereference-operation.js';
3
+ import { isRefDefined } from './is-ref-defined.js';
4
+ import { removeUndefinedRef } from './remove-undefined-ref.js';
5
+ import { updateOperationId } from './update-operation-id.js';
6
+ import { dereferenceDeep } from './dereference-deep.js';
7
+ export declare class SwaggerUtils {
8
+ static isRefDefined: typeof isRefDefined;
9
+ static dereference: typeof dereference;
10
+ static dereferenceDeep: typeof dereferenceDeep;
11
+ static removeUndefinedRef: typeof removeUndefinedRef;
12
+ static dereferenceOperation: typeof dereferenceOperation;
13
+ static updateOperationId: typeof updateOperationId;
14
+ }
15
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/swagger-utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAGvD,qBAAa,YAAY;IACvB,MAAM,CAAC,YAAY,sBAAe;IAClC,MAAM,CAAC,WAAW,qBAAc;IAChC,MAAM,CAAC,eAAe,yBAAkB;IACxC,MAAM,CAAC,kBAAkB,4BAAqB;IAC9C,MAAM,CAAC,oBAAoB,8BAAuB;IAClD,MAAM,CAAC,iBAAiB,2BAAoB;CAC7C"}
@@ -0,0 +1,3 @@
1
+ import type { OpenAPIV3_1 } from '@scalar/openapi-types';
2
+ export declare function isRefDefined($ref: string, swagger: OpenAPIV3_1.Document): boolean;
3
+ //# sourceMappingURL=is-ref-defined.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-ref-defined.d.ts","sourceRoot":"","sources":["../../../src/utils/swagger-utils/is-ref-defined.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAGxD,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,CAAC,QAAQ,GAAG,OAAO,CAOjF"}
@@ -0,0 +1,3 @@
1
+ import type { OpenAPIV3_1 } from '@scalar/openapi-types';
2
+ export declare function removeUndefinedRef(swagger: OpenAPIV3_1.Document): OpenAPIV3_1.Document;
3
+ //# sourceMappingURL=remove-undefined-ref.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remove-undefined-ref.d.ts","sourceRoot":"","sources":["../../../src/utils/swagger-utils/remove-undefined-ref.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAMxD,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,WAAW,CAAC,QAAQ,GAAG,WAAW,CAAC,QAAQ,CAgBtF"}