wrekenfile-converter 2.0.6 → 2.1.0

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 (52) hide show
  1. package/README.md +45 -26
  2. package/dist/example-usage.d.ts +1 -1
  3. package/dist/index.d.ts +6 -5
  4. package/dist/index.js +53 -20
  5. package/dist/v1/index.d.ts +3 -0
  6. package/dist/v1/index.js +21 -0
  7. package/dist/{postman-to-wrekenfile.js → v1/postman-to-wrekenfile.js} +7 -19
  8. package/dist/{wrekenfile-validator.js → v1/wrekenfile-validator.js} +30 -8
  9. package/dist/v2/cli/cli-mini-wrekenfile-generator.d.ts +2 -0
  10. package/dist/v2/cli/cli-mini-wrekenfile-generator.js +107 -0
  11. package/dist/v2/cli/cli-openapi-to-wrekenfile.d.ts +2 -0
  12. package/dist/v2/cli/cli-openapi-to-wrekenfile.js +115 -0
  13. package/dist/v2/cli/cli-openapi-v2-to-wrekenfile.d.ts +2 -0
  14. package/dist/v2/cli/cli-openapi-v2-to-wrekenfile.js +115 -0
  15. package/dist/v2/cli/cli-postman-to-wrekenfile.d.ts +2 -0
  16. package/dist/v2/cli/cli-postman-to-wrekenfile.js +54 -0
  17. package/dist/v2/index.d.ts +4 -0
  18. package/dist/v2/index.js +25 -0
  19. package/dist/v2/mini-wrekenfile-generator.d.ts +13 -0
  20. package/dist/v2/mini-wrekenfile-generator.js +289 -0
  21. package/dist/v2/openapi-to-wreken.d.ts +2 -0
  22. package/dist/v2/openapi-to-wreken.js +829 -0
  23. package/dist/v2/openapi-v2-to-wrekenfile.d.ts +2 -0
  24. package/dist/v2/openapi-v2-to-wrekenfile.js +806 -0
  25. package/dist/v2/postman-to-wrekenfile.d.ts +11 -0
  26. package/dist/v2/postman-to-wrekenfile.js +742 -0
  27. package/dist/v2/utils/constants.d.ts +80 -0
  28. package/dist/v2/utils/constants.js +104 -0
  29. package/dist/v2/utils/response-utils.d.ts +11 -0
  30. package/dist/v2/utils/response-utils.js +39 -0
  31. package/dist/v2/utils/yaml-utils.d.ts +4 -0
  32. package/dist/v2/utils/yaml-utils.js +96 -0
  33. package/dist/versions.d.ts +9 -0
  34. package/dist/versions.js +12 -0
  35. package/package.json +12 -14
  36. package/dist/openapi-to-wrekenfile.d.ts +0 -0
  37. package/dist/openapi-to-wrekenfile.js +0 -10
  38. package/wrekenfile.md +0 -726
  39. /package/dist/{cli → v1/cli}/cli-mini-wrekenfile-generator.d.ts +0 -0
  40. /package/dist/{cli → v1/cli}/cli-mini-wrekenfile-generator.js +0 -0
  41. /package/dist/{cli → v1/cli}/cli-openapi-to-wrekenfile.d.ts +0 -0
  42. /package/dist/{cli → v1/cli}/cli-openapi-to-wrekenfile.js +0 -0
  43. /package/dist/{cli → v1/cli}/cli-postman-to-wrekenfile.d.ts +0 -0
  44. /package/dist/{cli → v1/cli}/cli-postman-to-wrekenfile.js +0 -0
  45. /package/dist/{mini-wrekenfile-generator.d.ts → v1/mini-wrekenfile-generator.d.ts} +0 -0
  46. /package/dist/{mini-wrekenfile-generator.js → v1/mini-wrekenfile-generator.js} +0 -0
  47. /package/dist/{openapi-to-wreken.d.ts → v1/openapi-to-wreken.d.ts} +0 -0
  48. /package/dist/{openapi-to-wreken.js → v1/openapi-to-wreken.js} +0 -0
  49. /package/dist/{openapi-v2-to-wrekenfile.d.ts → v1/openapi-v2-to-wrekenfile.d.ts} +0 -0
  50. /package/dist/{openapi-v2-to-wrekenfile.js → v1/openapi-v2-to-wrekenfile.js} +0 -0
  51. /package/dist/{postman-to-wrekenfile.d.ts → v1/postman-to-wrekenfile.d.ts} +0 -0
  52. /package/dist/{wrekenfile-validator.d.ts → v1/wrekenfile-validator.d.ts} +0 -0
@@ -0,0 +1,11 @@
1
+ type Primitive = 'STRING' | 'INT' | 'FLOAT' | 'BOOL' | 'TIMESTAMP' | 'DATE' | 'TIME' | 'NULL' | 'UNDEFINED' | 'VOID' | 'ANY' | 'OBJECT';
2
+ declare function mapType(value: any): Primitive;
3
+ declare function parseJsonExample(jsonStr: string): any;
4
+ declare function extractFieldsFromObject(obj: any, depth?: number, prefix?: string): any[];
5
+ declare function loadEnvironmentFile(envPath: string): Record<string, string>;
6
+ declare function extractCollectionVariables(collection: any): Record<string, string>;
7
+ declare function resolveVariables(value: string, variables: Record<string, string>): string;
8
+ declare function extractStructs(collection: any, variables: Record<string, string>): Record<string, any[]>;
9
+ declare function extractOperations(collection: any, variables: Record<string, string>): any[];
10
+ declare function generateWrekenfile(collection: any, variables: Record<string, string>): string;
11
+ export { generateWrekenfile, extractStructs, extractOperations, mapType, parseJsonExample, extractFieldsFromObject, loadEnvironmentFile, extractCollectionVariables, resolveVariables, };