@usebruno/filestore 0.5.0 → 0.6.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 (157) hide show
  1. package/dist/cjs/index.js +1 -1
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/workers/worker-script.js +1 -1
  4. package/dist/cjs/workers/worker-script.js.map +1 -1
  5. package/dist/esm/index.js +1 -1
  6. package/dist/esm/index.js.map +1 -1
  7. package/dist/esm/workers/worker-script.js +1 -1
  8. package/dist/esm/workers/worker-script.js.map +1 -1
  9. package/dist/formats/bru/index.d.ts +20 -0
  10. package/dist/formats/bru/index.d.ts.map +1 -0
  11. package/dist/formats/bru/tests/fixtures/oauth2-additional-params.d.ts +57 -0
  12. package/dist/formats/bru/tests/fixtures/oauth2-additional-params.d.ts.map +1 -0
  13. package/dist/formats/bru/tests/oauth2-additional-params.spec.d.ts +2 -0
  14. package/dist/formats/bru/tests/oauth2-additional-params.spec.d.ts.map +1 -0
  15. package/dist/formats/bru/tests/request-parse-and-redact-body-data.spec.d.ts +2 -0
  16. package/dist/formats/bru/tests/request-parse-and-redact-body-data.spec.d.ts.map +1 -0
  17. package/dist/{cjs/workers/formats → formats}/bru/utils/oauth2-additional-params.d.ts +1 -0
  18. package/dist/formats/bru/utils/oauth2-additional-params.d.ts.map +1 -0
  19. package/dist/{esm/formats → formats}/bru/utils/request-parse-and-redact-body-data.d.ts +1 -0
  20. package/dist/formats/bru/utils/request-parse-and-redact-body-data.d.ts.map +1 -0
  21. package/dist/formats/yml/common/actions.d.ts +14 -0
  22. package/dist/formats/yml/common/actions.d.ts.map +1 -0
  23. package/dist/formats/yml/common/assertions.d.ts +5 -0
  24. package/dist/formats/yml/common/assertions.d.ts.map +1 -0
  25. package/dist/formats/yml/common/auth-oauth2.d.ts +5 -0
  26. package/dist/formats/yml/common/auth-oauth2.d.ts.map +1 -0
  27. package/dist/formats/yml/common/auth.d.ts +5 -0
  28. package/dist/formats/yml/common/auth.d.ts.map +1 -0
  29. package/dist/formats/yml/common/body.d.ts +5 -0
  30. package/dist/formats/yml/common/body.d.ts.map +1 -0
  31. package/dist/formats/yml/common/headers.d.ts +7 -0
  32. package/dist/formats/yml/common/headers.d.ts.map +1 -0
  33. package/dist/formats/yml/common/params.d.ts +5 -0
  34. package/dist/formats/yml/common/params.d.ts.map +1 -0
  35. package/dist/formats/yml/common/scripts.d.ts +14 -0
  36. package/dist/formats/yml/common/scripts.d.ts.map +1 -0
  37. package/dist/formats/yml/common/variables.d.ts +17 -0
  38. package/dist/formats/yml/common/variables.d.ts.map +1 -0
  39. package/dist/formats/yml/index.d.ts +10 -0
  40. package/dist/formats/yml/index.d.ts.map +1 -0
  41. package/dist/formats/yml/items/parseGraphQLRequest.d.ts +5 -0
  42. package/dist/formats/yml/items/parseGraphQLRequest.d.ts.map +1 -0
  43. package/dist/formats/yml/items/parseGrpcRequest.d.ts +5 -0
  44. package/dist/formats/yml/items/parseGrpcRequest.d.ts.map +1 -0
  45. package/dist/formats/yml/items/parseHttpRequest.d.ts +5 -0
  46. package/dist/formats/yml/items/parseHttpRequest.d.ts.map +1 -0
  47. package/dist/formats/yml/items/parseScript.d.ts +5 -0
  48. package/dist/formats/yml/items/parseScript.d.ts.map +1 -0
  49. package/dist/formats/yml/items/parseWebsocketRequest.d.ts +5 -0
  50. package/dist/formats/yml/items/parseWebsocketRequest.d.ts.map +1 -0
  51. package/dist/formats/yml/items/stringifyGraphQLRequest.d.ts +4 -0
  52. package/dist/formats/yml/items/stringifyGraphQLRequest.d.ts.map +1 -0
  53. package/dist/formats/yml/items/stringifyGrpcRequest.d.ts +4 -0
  54. package/dist/formats/yml/items/stringifyGrpcRequest.d.ts.map +1 -0
  55. package/dist/formats/yml/items/stringifyHttpRequest.d.ts +4 -0
  56. package/dist/formats/yml/items/stringifyHttpRequest.d.ts.map +1 -0
  57. package/dist/formats/yml/items/stringifyScript.d.ts +4 -0
  58. package/dist/formats/yml/items/stringifyScript.d.ts.map +1 -0
  59. package/dist/formats/yml/items/stringifyWebsocketRequest.d.ts +4 -0
  60. package/dist/formats/yml/items/stringifyWebsocketRequest.d.ts.map +1 -0
  61. package/dist/formats/yml/parseCollection.d.ts +8 -0
  62. package/dist/formats/yml/parseCollection.d.ts.map +1 -0
  63. package/dist/formats/yml/parseEnvironment.d.ts +4 -0
  64. package/dist/formats/yml/parseEnvironment.d.ts.map +1 -0
  65. package/dist/formats/yml/parseFolder.d.ts +4 -0
  66. package/dist/formats/yml/parseFolder.d.ts.map +1 -0
  67. package/dist/formats/yml/parseItem.d.ts +4 -0
  68. package/dist/formats/yml/parseItem.d.ts.map +1 -0
  69. package/dist/formats/yml/stringifyCollection.d.ts +3 -0
  70. package/dist/formats/yml/stringifyCollection.d.ts.map +1 -0
  71. package/dist/formats/yml/stringifyEnvironment.d.ts +4 -0
  72. package/dist/formats/yml/stringifyEnvironment.d.ts.map +1 -0
  73. package/dist/formats/yml/stringifyFolder.d.ts +4 -0
  74. package/dist/formats/yml/stringifyFolder.d.ts.map +1 -0
  75. package/dist/formats/yml/stringifyItem.d.ts +4 -0
  76. package/dist/formats/yml/stringifyItem.d.ts.map +1 -0
  77. package/dist/formats/yml/utils.d.ts +3 -0
  78. package/dist/formats/yml/utils.d.ts.map +1 -0
  79. package/dist/{cjs/workers/index.d.ts → index.d.ts} +13 -6
  80. package/dist/index.d.ts.map +1 -0
  81. package/dist/types.d.ts +19 -0
  82. package/dist/types.d.ts.map +1 -0
  83. package/dist/utils/index.d.ts +5 -0
  84. package/dist/utils/index.d.ts.map +1 -0
  85. package/dist/{esm/workers → workers}/WorkerQueue/index.d.ts +1 -0
  86. package/dist/workers/WorkerQueue/index.d.ts.map +1 -0
  87. package/dist/workers/index.d.ts +12 -0
  88. package/dist/workers/index.d.ts.map +1 -0
  89. package/dist/workers/worker-script.d.ts +2 -0
  90. package/dist/workers/worker-script.d.ts.map +1 -0
  91. package/package.json +12 -6
  92. package/src/formats/bru/index.ts +9 -9
  93. package/src/formats/bru/tests/oauth2-additional-params.spec.js +1 -1
  94. package/src/formats/bru/utils/oauth2-additional-params.ts +17 -18
  95. package/src/formats/bru/utils/request-parse-and-redact-body-data.ts +13 -13
  96. package/src/formats/yml/common/actions.ts +78 -0
  97. package/src/formats/yml/common/assertions.ts +146 -0
  98. package/src/formats/yml/common/auth-oauth2.ts +555 -0
  99. package/src/formats/yml/common/auth.ts +245 -0
  100. package/src/formats/yml/common/body.ts +238 -0
  101. package/src/formats/yml/common/headers.ts +58 -0
  102. package/src/formats/yml/common/params.ts +57 -0
  103. package/src/formats/yml/common/scripts.ts +64 -0
  104. package/src/formats/yml/common/variables.ts +68 -0
  105. package/src/formats/yml/index.ts +20 -0
  106. package/src/formats/yml/items/parseGraphQLRequest.ts +137 -0
  107. package/src/formats/yml/items/parseGrpcRequest.ts +116 -0
  108. package/src/formats/yml/items/parseHttpRequest.ts +195 -0
  109. package/src/formats/yml/items/parseScript.ts +25 -0
  110. package/src/formats/yml/items/parseWebsocketRequest.ts +106 -0
  111. package/src/formats/yml/items/stringifyGraphQLRequest.ts +168 -0
  112. package/src/formats/yml/items/stringifyGrpcRequest.ts +137 -0
  113. package/src/formats/yml/items/stringifyHttpRequest.ts +221 -0
  114. package/src/formats/yml/items/stringifyScript.ts +22 -0
  115. package/src/formats/yml/items/stringifyWebsocketRequest.ts +114 -0
  116. package/src/formats/yml/parseCollection.ts +198 -0
  117. package/src/formats/yml/parseEnvironment.ts +56 -0
  118. package/src/formats/yml/parseFolder.ts +88 -0
  119. package/src/formats/yml/parseItem.ts +102 -0
  120. package/src/formats/yml/stringifyCollection.ts +230 -0
  121. package/src/formats/yml/stringifyEnvironment.ts +64 -0
  122. package/src/formats/yml/stringifyFolder.ts +96 -0
  123. package/src/formats/yml/stringifyItem.ts +37 -0
  124. package/src/formats/yml/utils.ts +38 -0
  125. package/src/index.ts +57 -27
  126. package/src/types/bruno-lang.d.ts +1 -1
  127. package/src/types.ts +5 -124
  128. package/src/utils/index.ts +15 -0
  129. package/src/workers/WorkerQueue/index.ts +10 -10
  130. package/src/workers/index.ts +20 -20
  131. package/src/workers/worker-script.ts +20 -6
  132. package/dist/cjs/formats/bru/index.d.ts +0 -19
  133. package/dist/cjs/formats/bru/utils/oauth2-additional-params.d.ts +0 -38
  134. package/dist/cjs/formats/bru/utils/request-parse-and-redact-body-data.d.ts +0 -9
  135. package/dist/cjs/index.d.ts +0 -16
  136. package/dist/cjs/types.d.ts +0 -142
  137. package/dist/cjs/workers/WorkerQueue/index.d.ts +0 -26
  138. package/dist/cjs/workers/formats/bru/index.d.ts +0 -19
  139. package/dist/cjs/workers/formats/bru/utils/request-parse-and-redact-body-data.d.ts +0 -9
  140. package/dist/cjs/workers/types.d.ts +0 -142
  141. package/dist/cjs/workers/worker-script.d.ts +0 -1
  142. package/dist/cjs/workers/workers/WorkerQueue/index.d.ts +0 -26
  143. package/dist/cjs/workers/workers/index.d.ts +0 -10
  144. package/dist/cjs/workers/workers/worker-script.d.ts +0 -1
  145. package/dist/esm/formats/bru/index.d.ts +0 -19
  146. package/dist/esm/formats/bru/utils/oauth2-additional-params.d.ts +0 -38
  147. package/dist/esm/index.d.ts +0 -16
  148. package/dist/esm/types.d.ts +0 -142
  149. package/dist/esm/workers/formats/bru/index.d.ts +0 -19
  150. package/dist/esm/workers/formats/bru/utils/oauth2-additional-params.d.ts +0 -38
  151. package/dist/esm/workers/formats/bru/utils/request-parse-and-redact-body-data.d.ts +0 -9
  152. package/dist/esm/workers/index.d.ts +0 -16
  153. package/dist/esm/workers/types.d.ts +0 -142
  154. package/dist/esm/workers/worker-script.d.ts +0 -1
  155. package/dist/esm/workers/workers/WorkerQueue/index.d.ts +0 -26
  156. package/dist/esm/workers/workers/index.d.ts +0 -10
  157. package/dist/esm/workers/workers/worker-script.d.ts +0 -1
@@ -36,3 +36,4 @@ export interface T_BruJson {
36
36
  */
37
37
  export declare const getOauth2AdditionalParameters: (json: T_BruJson) => T_OAuth2AdditionalParameters;
38
38
  export {};
39
+ //# sourceMappingURL=oauth2-additional-params.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"oauth2-additional-params.d.ts","sourceRoot":"","sources":["../../../../src/formats/bru/utils/oauth2-additional-params.ts"],"names":[],"mappings":"AACA,KAAK,2BAA2B,GAAG,SAAS,GAAG,aAAa,GAAG,MAAM,CAAC;AAEtE,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,2BAA2B,CAAC;CACrC;AAED,MAAM,WAAW,4BAA4B;IAC3C,aAAa,CAAC,EAAE,uBAAuB,EAAE,CAAC;IAC1C,KAAK,CAAC,EAAE,uBAAuB,EAAE,CAAC;IAClC,OAAO,CAAC,EAAE,uBAAuB,EAAE,CAAC;CACrC;AAED,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,oBAAoB,CAAC,EAAE,4BAA4B,CAAC;CACrD;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE;QACJ,MAAM,EAAE,YAAY,CAAC;KACtB,CAAC;IACF,6CAA6C,CAAC,EAAE,GAAG,EAAE,CAAC;IACtD,iDAAiD,CAAC,EAAE,GAAG,EAAE,CAAC;IAC1D,qDAAqD,CAAC,EAAE,GAAG,EAAE,CAAC;IAC9D,yDAAyD,CAAC,EAAE,GAAG,EAAE,CAAC;IAClE,wDAAwD,CAAC,EAAE,GAAG,EAAE,CAAC;IACjE,sDAAsD,CAAC,EAAE,GAAG,EAAE,CAAC;IAC/D,0DAA0D,CAAC,EAAE,GAAG,EAAE,CAAC;IACnE,yDAAyD,CAAC,EAAE,GAAG,EAAE,CAAC;CACnE;AA+ED;;;;;;GAMG;AACH,eAAO,MAAM,6BAA6B,SAAU,SAAS,KAAG,4BAoB/D,CAAC"}
@@ -7,3 +7,4 @@ export declare const bruRequestParseAndRedactBodyData: (bruFileContent: string)
7
7
  bruFileStringWithRedactedBody: string;
8
8
  extractedBodyContent: Record<string, string>;
9
9
  };
10
+ //# sourceMappingURL=request-parse-and-redact-body-data.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request-parse-and-redact-body-data.d.ts","sourceRoot":"","sources":["../../../../src/formats/bru/utils/request-parse-and-redact-body-data.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,gCAAgC,mBAAoB,MAAM;;;CAuEtE,CAAC"}
@@ -0,0 +1,14 @@
1
+ import type { Action } from '@opencollection/types/common/actions';
2
+ import type { Variables as BrunoVariables } from '@usebruno/schema-types/common/variables';
3
+ /**
4
+ * Convert Bruno post-response variables to OpenCollection actions.
5
+ * Post-response variables in Bruno are converted to 'set-variable' actions
6
+ * with phase 'after-response'.
7
+ */
8
+ export declare const toOpenCollectionActions: (resVariables: BrunoVariables | null | undefined) => Action[] | undefined;
9
+ /**
10
+ * Convert OpenCollection actions to Bruno post-response variables.
11
+ * Only 'set-variable' actions with phase 'after-response' are converted.
12
+ */
13
+ export declare const toBrunoPostResponseVariables: (actions: Action[] | null | undefined) => BrunoVariables;
14
+ //# sourceMappingURL=actions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../../src/formats/yml/common/actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAA0C,MAAM,sCAAsC,CAAC;AAC3G,OAAO,KAAK,EAA6B,SAAS,IAAI,cAAc,EAAE,MAAM,yCAAyC,CAAC;AAGtH;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,iBAAkB,cAAc,GAAG,IAAI,GAAG,SAAS,KAAG,MAAM,EAAE,GAAG,SA+BpG,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,4BAA4B,YAAa,MAAM,EAAE,GAAG,IAAI,GAAG,SAAS,KAAG,cA+BnF,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { KeyValue as BrunoKeyValue } from '@usebruno/schema-types/common/key-value';
2
+ import type { Assertion } from '@opencollection/types/common/assertions';
3
+ export declare const toOpenCollectionAssertions: (assertions: BrunoKeyValue[] | null | undefined) => Assertion[] | undefined;
4
+ export declare const toBrunoAssertions: (assertions: Assertion[] | null | undefined) => BrunoKeyValue[] | undefined;
5
+ //# sourceMappingURL=assertions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assertions.d.ts","sourceRoot":"","sources":["../../../../src/formats/yml/common/assertions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,IAAI,aAAa,EAAE,MAAM,yCAAyC,CAAC;AACzF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAqFzE,eAAO,MAAM,0BAA0B,eAAgB,aAAa,EAAE,GAAG,IAAI,GAAG,SAAS,KAAG,SAAS,EAAE,GAAG,SA0BzG,CAAC;AAEF,eAAO,MAAM,iBAAiB,eAAgB,SAAS,EAAE,GAAG,IAAI,GAAG,SAAS,KAAG,aAAa,EAAE,GAAG,SA+BhG,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { AuthOAuth2 } from '@opencollection/types/common/auth';
2
+ import type { OAuth2 as BrunoOAuth2 } from '@usebruno/schema-types/common/auth';
3
+ export declare const toOpenCollectionOAuth2: (oauth?: BrunoOAuth2 | null) => AuthOAuth2 | undefined;
4
+ export declare const toBrunoOAuth2: (oauth: AuthOAuth2 | null | undefined) => BrunoOAuth2 | null;
5
+ //# sourceMappingURL=auth-oauth2.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth-oauth2.d.ts","sourceRoot":"","sources":["../../../../src/formats/yml/common/auth-oauth2.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EAWX,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EACV,MAAM,IAAI,WAAW,EAEtB,MAAM,oCAAoC,CAAC;AA6P5C,eAAO,MAAM,sBAAsB,WAAY,WAAW,GAAG,IAAI,KAAG,UAAU,GAAG,SAkBhF,CAAC;AAsCF,eAAO,MAAM,aAAa,UAAW,UAAU,GAAG,IAAI,GAAG,SAAS,KAAG,WAAW,GAAG,IAqOlF,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { Auth } from '@opencollection/types/common/auth';
2
+ import type { Auth as BrunoAuth } from '@usebruno/schema-types/common/auth';
3
+ export declare const toOpenCollectionAuth: (auth?: BrunoAuth | null) => Auth | undefined;
4
+ export declare const toBrunoAuth: (auth: Auth | null | undefined) => BrunoAuth | null;
5
+ //# sourceMappingURL=auth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../../src/formats/yml/common/auth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,IAAI,EAQL,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EAAE,IAAI,IAAI,SAAS,EAAE,MAAM,oCAAoC,CAAC;AA2G5E,eAAO,MAAM,oBAAoB,UAAW,SAAS,GAAG,IAAI,KAAG,IAAI,GAAG,SA8BrE,CAAC;AAEF,eAAO,MAAM,WAAW,SAAU,IAAI,GAAG,IAAI,GAAG,SAAS,KAAG,SAAS,GAAG,IA+FvE,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { HttpRequestBody as BrunoHttpRequestBody } from '@usebruno/schema-types/requests/http';
2
+ import type { HttpRequestBody } from '@opencollection/types/requests/http';
3
+ export declare const toOpenCollectionBody: (body: BrunoHttpRequestBody | null | undefined) => HttpRequestBody | undefined;
4
+ export declare const toBrunoBody: (body: HttpRequestBody | null | undefined) => BrunoHttpRequestBody | undefined;
5
+ //# sourceMappingURL=body.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"body.d.ts","sourceRoot":"","sources":["../../../../src/formats/yml/common/body.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,IAAI,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AACpG,OAAO,KAAK,EACV,eAAe,EAQhB,MAAM,qCAAqC,CAAC;AAI7C,eAAO,MAAM,oBAAoB,SAAU,oBAAoB,GAAG,IAAI,GAAG,SAAS,KAAG,eAAe,GAAG,SAgHtG,CAAC;AAEF,eAAO,MAAM,WAAW,SAAU,eAAe,GAAG,IAAI,GAAG,SAAS,KAAG,oBAAoB,GAAG,SA6G7F,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { FolderRequest as BrunoFolderRequest } from '@usebruno/schema-types/collection/folder';
2
+ import type { KeyValue as BrunoKeyValue } from '@usebruno/schema-types/common/key-value';
3
+ import type { HttpRequestHeader, HttpResponseHeader } from '@opencollection/types/requests/http';
4
+ export declare const toOpenCollectionHttpHeaders: (headers: BrunoFolderRequest['headers']) => HttpRequestHeader[] | undefined;
5
+ export declare const toOpenCollectionResponseHeaders: (headers: BrunoFolderRequest['headers']) => HttpResponseHeader[] | undefined;
6
+ export declare const toBrunoHttpHeaders: (headers: HttpRequestHeader[] | HttpResponseHeader[] | null | undefined) => BrunoKeyValue[] | undefined;
7
+ //# sourceMappingURL=headers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"headers.d.ts","sourceRoot":"","sources":["../../../../src/formats/yml/common/headers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,IAAI,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AACpG,OAAO,KAAK,EAAE,QAAQ,IAAI,aAAa,EAAE,MAAM,yCAAyC,CAAC;AACzF,OAAO,KAAK,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAGjG,eAAO,MAAM,2BAA2B,YAAa,kBAAkB,CAAC,SAAS,CAAC,KAAG,iBAAiB,EAAE,GAAG,SAoB1G,CAAC;AAEF,eAAO,MAAM,+BAA+B,YAAa,kBAAkB,CAAC,SAAS,CAAC,KAAG,kBAAkB,EAAE,GAAG,SAW/G,CAAC;AAEF,eAAO,MAAM,kBAAkB,YAAa,iBAAiB,EAAE,GAAG,kBAAkB,EAAE,GAAG,IAAI,GAAG,SAAS,KAAG,aAAa,EAAE,GAAG,SAiB7H,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { HttpRequestParam as BrunoHttpRequestParam } from '@usebruno/schema-types/requests/http';
2
+ import type { HttpRequestParam } from '@opencollection/types/requests/http';
3
+ export declare const toOpenCollectionParams: (params: BrunoHttpRequestParam[] | null | undefined) => HttpRequestParam[] | undefined;
4
+ export declare const toBrunoParams: (params: HttpRequestParam[] | null | undefined) => BrunoHttpRequestParam[] | undefined;
5
+ //# sourceMappingURL=params.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"params.d.ts","sourceRoot":"","sources":["../../../../src/formats/yml/common/params.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,IAAI,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AACtG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AAG5E,eAAO,MAAM,sBAAsB,WAAY,qBAAqB,EAAE,GAAG,IAAI,GAAG,SAAS,KAAG,gBAAgB,EAAE,GAAG,SAwBhH,CAAC;AAEF,eAAO,MAAM,aAAa,WAAY,gBAAgB,EAAE,GAAG,IAAI,GAAG,SAAS,KAAG,qBAAqB,EAAE,GAAG,SA0BvG,CAAC"}
@@ -0,0 +1,14 @@
1
+ import type { Scripts } from '@opencollection/types/common/scripts';
2
+ import type { FolderRequest as BrunoFolderRequest } from '@usebruno/schema-types/collection/folder';
3
+ import type { HttpRequest as BrunoHttpRequest } from '@usebruno/schema-types/requests/http';
4
+ import type { WebSocketRequest as BrunoWebSocketRequest } from '@usebruno/schema-types/requests/websocket';
5
+ import type { GrpcRequest as BrunoGrpcRequest } from '@usebruno/schema-types/requests/grpc';
6
+ export declare const toOpenCollectionScripts: (request: BrunoFolderRequest | BrunoHttpRequest | BrunoWebSocketRequest | BrunoGrpcRequest | null | undefined) => Scripts | undefined;
7
+ export declare const toBrunoScripts: (scripts: Scripts | null | undefined) => {
8
+ script?: {
9
+ req?: string;
10
+ res?: string;
11
+ };
12
+ tests?: string;
13
+ } | undefined;
14
+ //# sourceMappingURL=scripts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scripts.d.ts","sourceRoot":"","sources":["../../../../src/formats/yml/common/scripts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAU,MAAM,sCAAsC,CAAC;AAC5E,OAAO,KAAK,EAAE,aAAa,IAAI,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AACpG,OAAO,KAAK,EAAE,WAAW,IAAI,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAC5F,OAAO,KAAK,EAAE,gBAAgB,IAAI,qBAAqB,EAAE,MAAM,2CAA2C,CAAC;AAC3G,OAAO,KAAK,EAAE,WAAW,IAAI,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAE5F,eAAO,MAAM,uBAAuB,YAAa,kBAAkB,GAAG,gBAAgB,GAAG,qBAAqB,GAAG,gBAAgB,GAAG,IAAI,GAAG,SAAS,KAAG,OAAO,GAAG,SAuBhK,CAAC;AAEF,eAAO,MAAM,cAAc,YAAa,OAAO,GAAG,IAAI,GAAG,SAAS,KAAG;IACnE,MAAM,CAAC,EAAE;QAAE,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GAAG,SA6BH,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { Variable } from '@opencollection/types/common/variables';
2
+ import { FolderRequest as BrunoFolderRequest } from '@usebruno/schema-types/collection/folder';
3
+ import { Variables as BrunoVariables } from '@usebruno/schema-types/common/variables';
4
+ /**
5
+ * Convert Bruno pre-request variables to OpenCollection variables format.
6
+ * Note: Post-response variables are now converted to actions (see actions.ts).
7
+ */
8
+ export declare const toOpenCollectionVariables: (variables: BrunoFolderRequest['vars'] | BrunoVariables | null | undefined) => Variable[] | undefined;
9
+ /**
10
+ * Convert OpenCollection variables to Bruno pre-request variables format.
11
+ * Note: Post-response variables come from actions (see actions.ts).
12
+ */
13
+ export declare const toBrunoVariables: (variables: Variable[] | null | undefined) => {
14
+ req: BrunoVariables;
15
+ res: BrunoVariables;
16
+ };
17
+ //# sourceMappingURL=variables.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"variables.d.ts","sourceRoot":"","sources":["../../../../src/formats/yml/common/variables.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,aAAa,IAAI,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAC/F,OAAO,EAA6B,SAAS,IAAI,cAAc,EAAE,MAAM,yCAAyC,CAAC;AAGjH;;;GAGG;AACH,eAAO,MAAM,yBAAyB,cAAe,kBAAkB,CAAC,MAAM,CAAC,GAAG,cAAc,GAAG,IAAI,GAAG,SAAS,KAAG,QAAQ,EAAE,GAAG,SA4BlI,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,cAAe,QAAQ,EAAE,GAAG,IAAI,GAAG,SAAS,KAAG;IAAE,GAAG,EAAE,cAAc,CAAC;IAAC,GAAG,EAAE,cAAc,CAAA;CAwBrH,CAAC"}
@@ -0,0 +1,10 @@
1
+ import parseYmlItem from './parseItem';
2
+ import parseYmlFolder from './parseFolder';
3
+ import parseYmlCollection from './parseCollection';
4
+ import parseYmlEnvironment from './parseEnvironment';
5
+ import stringifyYmlItem from './stringifyItem';
6
+ import stringifyYmlFolder from './stringifyFolder';
7
+ import stringifyYmlCollection from './stringifyCollection';
8
+ import stringifyYmlEnvironment from './stringifyEnvironment';
9
+ export { parseYmlItem, parseYmlFolder, parseYmlCollection, parseYmlEnvironment, stringifyYmlItem, stringifyYmlFolder, stringifyYmlCollection, stringifyYmlEnvironment };
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/formats/yml/index.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,aAAa,CAAC;AACvC,OAAO,cAAc,MAAM,eAAe,CAAC;AAC3C,OAAO,kBAAkB,MAAM,mBAAmB,CAAC;AACnD,OAAO,mBAAmB,MAAM,oBAAoB,CAAC;AAErD,OAAO,gBAAgB,MAAM,iBAAiB,CAAC;AAC/C,OAAO,kBAAkB,MAAM,mBAAmB,CAAC;AACnD,OAAO,sBAAsB,MAAM,uBAAuB,CAAC;AAC3D,OAAO,uBAAuB,MAAM,wBAAwB,CAAC;AAE7D,OAAO,EACL,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,EAClB,sBAAsB,EACtB,uBAAuB,EACxB,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { Item as BrunoItem } from '@usebruno/schema-types/collection/item';
2
+ import type { GraphQLRequest } from '@opencollection/types/requests/graphql';
3
+ declare const parseGraphQLRequest: (ocRequest: GraphQLRequest) => BrunoItem;
4
+ export default parseGraphQLRequest;
5
+ //# sourceMappingURL=parseGraphQLRequest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseGraphQLRequest.d.ts","sourceRoot":"","sources":["../../../../src/formats/yml/items/parseGraphQLRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,IAAI,SAAS,EAA6C,MAAM,wCAAwC,CAAC;AAE3H,OAAO,KAAK,EAAE,cAAc,EAAuC,MAAM,wCAAwC,CAAC;AAUlH,QAAA,MAAM,mBAAmB,cAAe,cAAc,KAAG,SA0HxD,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { Item as BrunoItem } from '@usebruno/schema-types/collection/item';
2
+ import type { GrpcRequest } from '@opencollection/types/requests/grpc';
3
+ declare const parseGrpcRequest: (ocRequest: GrpcRequest) => BrunoItem;
4
+ export default parseGrpcRequest;
5
+ //# sourceMappingURL=parseGrpcRequest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseGrpcRequest.d.ts","sourceRoot":"","sources":["../../../../src/formats/yml/items/parseGrpcRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,IAAI,SAAS,EAAE,MAAM,wCAAwC,CAAC;AAEhF,OAAO,KAAK,EAAE,WAAW,EAAgB,MAAM,qCAAqC,CAAC;AA2BrF,QAAA,MAAM,gBAAgB,cAAe,WAAW,KAAG,SAoFlD,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { Item as BrunoItem } from '@usebruno/schema-types/collection/item';
2
+ import type { HttpRequest } from '@opencollection/types/requests/http';
3
+ declare const parseHttpRequest: (ocRequest: HttpRequest) => BrunoItem;
4
+ export default parseHttpRequest;
5
+ //# sourceMappingURL=parseHttpRequest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseHttpRequest.d.ts","sourceRoot":"","sources":["../../../../src/formats/yml/items/parseHttpRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,IAAI,SAAS,EAA6C,MAAM,wCAAwC,CAAC;AAE3H,OAAO,KAAK,EAAE,WAAW,EAAmB,MAAM,qCAAqC,CAAC;AAWxF,QAAA,MAAM,gBAAgB,cAAe,WAAW,KAAG,SAmLlD,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { Item as BrunoItem } from '@usebruno/schema-types/collection/item';
2
+ import type { ScriptFile } from '@opencollection/types/collection/item';
3
+ declare const parseScript: (ocScript: ScriptFile) => BrunoItem;
4
+ export default parseScript;
5
+ //# sourceMappingURL=parseScript.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseScript.d.ts","sourceRoot":"","sources":["../../../../src/formats/yml/items/parseScript.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,IAAI,SAAS,EAAE,MAAM,wCAAwC,CAAC;AAChF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uCAAuC,CAAC;AAGxE,QAAA,MAAM,WAAW,aAAc,UAAU,KAAG,SAkB3C,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { Item as BrunoItem } from '@usebruno/schema-types/collection/item';
2
+ import type { WebSocketRequest } from '@opencollection/types/requests/websocket';
3
+ declare const parseWebsocketRequest: (ocRequest: WebSocketRequest) => BrunoItem;
4
+ export default parseWebsocketRequest;
5
+ //# sourceMappingURL=parseWebsocketRequest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseWebsocketRequest.d.ts","sourceRoot":"","sources":["../../../../src/formats/yml/items/parseWebsocketRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,IAAI,SAAS,EAAE,MAAM,wCAAwC,CAAC;AAEhF,OAAO,KAAK,EAAE,gBAAgB,EAAoB,MAAM,0CAA0C,CAAC;AAOnG,QAAA,MAAM,qBAAqB,cAAe,gBAAgB,KAAG,SA8F5D,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { Item as BrunoItem } from '@usebruno/schema-types/collection/item';
2
+ declare const stringifyGraphQLRequest: (item: BrunoItem) => string;
3
+ export default stringifyGraphQLRequest;
4
+ //# sourceMappingURL=stringifyGraphQLRequest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stringifyGraphQLRequest.d.ts","sourceRoot":"","sources":["../../../../src/formats/yml/items/stringifyGraphQLRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,IAAI,SAAS,EAA6C,MAAM,wCAAwC,CAAC;AAmB3H,QAAA,MAAM,uBAAuB,SAAU,SAAS,KAAG,MAkJlD,CAAC;AAEF,eAAe,uBAAuB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { Item as BrunoItem } from '@usebruno/schema-types/collection/item';
2
+ declare const stringifyGrpcRequest: (item: BrunoItem) => string;
3
+ export default stringifyGrpcRequest;
4
+ //# sourceMappingURL=stringifyGrpcRequest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stringifyGrpcRequest.d.ts","sourceRoot":"","sources":["../../../../src/formats/yml/items/stringifyGrpcRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,IAAI,SAAS,EAAE,MAAM,wCAAwC,CAAC;AAehF,QAAA,MAAM,oBAAoB,SAAU,SAAS,KAAG,MAuH/C,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { Item as BrunoItem } from '@usebruno/schema-types/collection/item';
2
+ declare const stringifyHttpRequest: (item: BrunoItem) => string;
3
+ export default stringifyHttpRequest;
4
+ //# sourceMappingURL=stringifyHttpRequest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stringifyHttpRequest.d.ts","sourceRoot":"","sources":["../../../../src/formats/yml/items/stringifyHttpRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,IAAI,SAAS,EAA6C,MAAM,wCAAwC,CAAC;AAoB3H,QAAA,MAAM,oBAAoB,SAAU,SAAS,KAAG,MAsM/C,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { Item as BrunoItem } from '@usebruno/schema-types/collection/item';
2
+ declare const stringifyScript: (item: BrunoItem) => string;
3
+ export default stringifyScript;
4
+ //# sourceMappingURL=stringifyScript.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stringifyScript.d.ts","sourceRoot":"","sources":["../../../../src/formats/yml/items/stringifyScript.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,IAAI,SAAS,EAAE,MAAM,wCAAwC,CAAC;AAIhF,QAAA,MAAM,eAAe,SAAU,SAAS,KAAG,MAe1C,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { Item as BrunoItem } from '@usebruno/schema-types/collection/item';
2
+ declare const stringifyWebsocketRequest: (item: BrunoItem) => string;
3
+ export default stringifyWebsocketRequest;
4
+ //# sourceMappingURL=stringifyWebsocketRequest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stringifyWebsocketRequest.d.ts","sourceRoot":"","sources":["../../../../src/formats/yml/items/stringifyWebsocketRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,IAAI,SAAS,EAAE,MAAM,wCAAwC,CAAC;AAchF,QAAA,MAAM,yBAAyB,SAAU,SAAS,KAAG,MAiGpD,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { FolderRoot } from '@usebruno/schema-types/collection/folder';
2
+ interface ParsedCollection {
3
+ collectionRoot: FolderRoot;
4
+ brunoConfig: Record<string, any>;
5
+ }
6
+ declare const parseCollection: (ymlString: string) => ParsedCollection;
7
+ export default parseCollection;
8
+ //# sourceMappingURL=parseCollection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseCollection.d.ts","sourceRoot":"","sources":["../../../src/formats/yml/parseCollection.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AAO3E,UAAU,gBAAgB;IACxB,cAAc,EAAE,UAAU,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAClC;AAED,QAAA,MAAM,eAAe,cAAe,MAAM,KAAG,gBAsL5C,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { Environment as BrunoEnvironment } from '@usebruno/schema-types/collection/environment';
2
+ declare const parseEnvironment: (ymlString: string) => BrunoEnvironment;
3
+ export default parseEnvironment;
4
+ //# sourceMappingURL=parseEnvironment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseEnvironment.d.ts","sourceRoot":"","sources":["../../../src/formats/yml/parseEnvironment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,IAAI,gBAAgB,EAAmD,MAAM,+CAA+C,CAAC;AAsCtJ,QAAA,MAAM,gBAAgB,cAAe,MAAM,KAAG,gBAe7C,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { FolderRoot } from '@usebruno/schema-types/collection/folder';
2
+ declare const parseFolder: (ymlString: string) => FolderRoot;
3
+ export default parseFolder;
4
+ //# sourceMappingURL=parseFolder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseFolder.d.ts","sourceRoot":"","sources":["../../../src/formats/yml/parseFolder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AAS3E,QAAA,MAAM,WAAW,cAAe,MAAM,KAAG,UA4ExC,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { Item as BrunoItem } from '@usebruno/schema-types/collection/item';
2
+ declare const parseItem: (ymlString: string) => BrunoItem;
3
+ export default parseItem;
4
+ //# sourceMappingURL=parseItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseItem.d.ts","sourceRoot":"","sources":["../../../src/formats/yml/parseItem.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,IAAI,SAAS,EAAE,MAAM,wCAAwC,CAAC;AA8DhF,QAAA,MAAM,SAAS,cAAe,MAAM,KAAG,SAqCtC,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const stringifyCollection: (collectionRoot: any, brunoConfig: any) => string;
2
+ export default stringifyCollection;
3
+ //# sourceMappingURL=stringifyCollection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stringifyCollection.d.ts","sourceRoot":"","sources":["../../../src/formats/yml/stringifyCollection.ts"],"names":[],"mappings":"AA4DA,QAAA,MAAM,mBAAmB,mBAAoB,GAAG,eAAe,GAAG,KAAG,MAuKpE,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { Environment as BrunoEnvironment } from '@usebruno/schema-types/collection/environment';
2
+ declare const stringifyEnvironment: (environment: BrunoEnvironment) => string;
3
+ export default stringifyEnvironment;
4
+ //# sourceMappingURL=stringifyEnvironment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stringifyEnvironment.d.ts","sourceRoot":"","sources":["../../../src/formats/yml/stringifyEnvironment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,IAAI,gBAAgB,EAAmD,MAAM,+CAA+C,CAAC;AA2CtJ,QAAA,MAAM,oBAAoB,gBAAiB,gBAAgB,KAAG,MAmB7D,CAAC;AACF,eAAe,oBAAoB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { FolderRoot } from '@usebruno/schema-types/collection/folder';
2
+ declare const stringifyFolder: (folderRoot: FolderRoot) => string;
3
+ export default stringifyFolder;
4
+ //# sourceMappingURL=stringifyFolder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stringifyFolder.d.ts","sourceRoot":"","sources":["../../../src/formats/yml/stringifyFolder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AAgC3E,QAAA,MAAM,eAAe,eAAgB,UAAU,KAAG,MA8DjD,CAAC;AACF,eAAe,eAAe,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { Item as BrunoItem } from '@usebruno/schema-types/collection/item';
2
+ declare const stringifyItem: (item: BrunoItem) => string;
3
+ export default stringifyItem;
4
+ //# sourceMappingURL=stringifyItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stringifyItem.d.ts","sourceRoot":"","sources":["../../../src/formats/yml/stringifyItem.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,IAAI,SAAS,EAAE,MAAM,wCAAwC,CAAC;AAOhF,QAAA,MAAM,aAAa,SAAU,SAAS,KAAG,MA4BxC,CAAC;AACF,eAAe,aAAa,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare const stringifyYml: (obj: any) => string;
2
+ export declare const parseYml: (ymlString: string) => any;
3
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/formats/yml/utils.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,YAAY,QAAS,GAAG,KAAG,MA4BvC,CAAC;AAEF,eAAO,MAAM,QAAQ,cAAe,MAAM,KAAG,GAE5C,CAAC"}
@@ -1,16 +1,23 @@
1
+ import type { BrunoCollection, BrunoItem, BrunoEnvironment } from '@usebruno/schema-types';
1
2
  import BruParserWorker from './workers';
2
- import { ParseOptions, StringifyOptions, ParsedRequest, ParsedCollection, ParsedEnvironment } from './types';
3
+ import { ParseOptions, StringifyOptions, CollectionFormat } from './types';
3
4
  export declare const parseRequest: (content: string, options?: ParseOptions) => any;
4
5
  export declare const parseRequestAndRedactBody: (content: string, options?: ParseOptions) => any;
5
- export declare const stringifyRequest: (requestObj: ParsedRequest, options?: StringifyOptions) => string;
6
- export declare const parseRequestViaWorker: (content: string) => Promise<any>;
7
- export declare const stringifyRequestViaWorker: (requestObj: any) => Promise<string>;
6
+ export declare const stringifyRequest: (requestObj: BrunoItem, options?: StringifyOptions) => string;
7
+ export declare const parseRequestViaWorker: (content: string, options: {
8
+ format: CollectionFormat;
9
+ filename?: string;
10
+ }) => Promise<any>;
11
+ export declare const stringifyRequestViaWorker: (requestObj: any, options: {
12
+ format: CollectionFormat;
13
+ }) => Promise<string>;
8
14
  export declare const parseCollection: (content: string, options?: ParseOptions) => any;
9
- export declare const stringifyCollection: (collectionObj: ParsedCollection, options?: StringifyOptions) => string;
15
+ export declare const stringifyCollection: (collectionObj: BrunoCollection, brunoConfig: any, options?: StringifyOptions) => string;
10
16
  export declare const parseFolder: (content: string, options?: ParseOptions) => any;
11
17
  export declare const stringifyFolder: (folderObj: any, options?: StringifyOptions) => string;
12
18
  export declare const parseEnvironment: (content: string, options?: ParseOptions) => any;
13
- export declare const stringifyEnvironment: (envObj: ParsedEnvironment, options?: StringifyOptions) => string;
19
+ export declare const stringifyEnvironment: (envObj: BrunoEnvironment, options?: StringifyOptions) => string;
14
20
  export declare const parseDotEnv: (content: string) => Record<string, string>;
15
21
  export { BruParserWorker };
16
22
  export * from './types';
23
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAqB3F,OAAO,eAAe,MAAM,WAAW,CAAC;AACxC,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EACjB,MAAM,SAAS,CAAC;AAIjB,eAAO,MAAM,YAAY,YAAa,MAAM,YAAW,YAAY,KAAuB,GAOzF,CAAC;AAEF,eAAO,MAAM,yBAAyB,YAAa,MAAM,YAAW,YAAY,KAAuB,GAKtG,CAAC;AAEF,eAAO,MAAM,gBAAgB,eAAgB,SAAS,YAAW,gBAAgB,KAAuB,MAOvG,CAAC;AAWF,eAAO,MAAM,qBAAqB,YAAmB,MAAM,WAAW;IAAE,MAAM,EAAE,gBAAgB,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,KAAG,QAAQ,GAAG,CAIlI,CAAC;AAEF,eAAO,MAAM,yBAAyB,eAAsB,GAAG,WAAW;IAAE,MAAM,EAAE,gBAAgB,CAAA;CAAE,KAAG,QAAQ,MAAM,CAGtH,CAAC;AAGF,eAAO,MAAM,eAAe,YAAa,MAAM,YAAW,YAAY,KAAuB,GAO5F,CAAC;AAEF,eAAO,MAAM,mBAAmB,kBAAmB,eAAe,eAAe,GAAG,YAAW,gBAAgB,KAAuB,MAOrI,CAAC;AAGF,eAAO,MAAM,WAAW,YAAa,MAAM,YAAW,YAAY,KAAuB,GAOxF,CAAC;AAEF,eAAO,MAAM,eAAe,cAAe,GAAG,YAAW,gBAAgB,KAAuB,MAO/F,CAAC;AAGF,eAAO,MAAM,gBAAgB,YAAa,MAAM,YAAW,YAAY,KAAuB,GAO7F,CAAC;AAEF,eAAO,MAAM,oBAAoB,WAAY,gBAAgB,YAAW,gBAAgB,KAAuB,MAO9G,CAAC;AAEF,eAAO,MAAM,WAAW,YAAa,MAAM,KAAG,OAAO,MAAM,EAAE,MAAM,CAElE,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,CAAC;AAC3B,cAAc,SAAS,CAAC"}
@@ -0,0 +1,19 @@
1
+ export type CollectionFormat = 'bru' | 'yml';
2
+ export interface ParseOptions {
3
+ format?: CollectionFormat;
4
+ }
5
+ export interface StringifyOptions {
6
+ format?: CollectionFormat;
7
+ }
8
+ export interface WorkerTask {
9
+ data: any;
10
+ priority: number;
11
+ scriptPath: string;
12
+ taskType?: 'parse' | 'stringify';
13
+ resolve?: (value: any) => void;
14
+ reject?: (reason?: any) => void;
15
+ }
16
+ export interface Lane {
17
+ maxSize: number;
18
+ }
19
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,KAAK,CAAC;AAE7C,MAAM,WAAW,YAAY;IAC3B,MAAM,CAAC,EAAE,gBAAgB,CAAC;CAC3B;AAED,MAAM,WAAW,gBAAgB;IAC/B,MAAM,CAAC,EAAE,gBAAgB,CAAC;CAC3B;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,GAAG,CAAC;IACV,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,GAAG,WAAW,CAAC;IACjC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;IAC/B,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;CACjC;AAED,MAAM,WAAW,IAAI;IACnB,OAAO,EAAE,MAAM,CAAC;CACjB"}
@@ -0,0 +1,5 @@
1
+ export declare const isString: (value: unknown) => value is string;
2
+ export declare const isNumber: (value: unknown) => value is number;
3
+ export declare const isNonEmptyString: (value: unknown) => value is string;
4
+ export declare const uuid: () => any;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,QAAQ,UAAW,OAAO,oBAA+C,CAAC;AAEvF,eAAO,MAAM,QAAQ,UAAW,OAAO,oBAA+C,CAAC;AAEvF,eAAO,MAAM,gBAAgB,UAAW,OAAO,oBAAgE,CAAC;AAEhH,eAAO,MAAM,IAAI,WAMhB,CAAC"}
@@ -24,3 +24,4 @@ declare class WorkerQueue {
24
24
  cleanup(): Promise<void>;
25
25
  }
26
26
  export default WorkerQueue;
27
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/workers/WorkerQueue/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,UAAU,UAAU;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,GAAG,CAAC;IACV,QAAQ,EAAE,OAAO,GAAG,WAAW,CAAC;IAChC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;IAC/B,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;CACjC;AAED,cAAM,WAAW;IACf,OAAO,CAAC,KAAK,CAAe;IAC5B,OAAO,CAAC,YAAY,CAAU;IAC9B,OAAO,CAAC,OAAO,CAAyB;;IAQlC,sBAAsB,CAAC,UAAU,EAAE,MAAM;IASzC,OAAO,CAAC,IAAI,EAAE,UAAU;IAUxB,YAAY;IAmBZ,SAAS,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,GAAG,CAAC;QAAC,QAAQ,EAAE,OAAO,GAAG,WAAW,CAAA;KAAE;IAwC5G,OAAO;CAWd;AAED,eAAe,WAAW,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { CollectionFormat } from '../types';
2
+ declare class BruParserWorker {
3
+ private workerQueues;
4
+ constructor();
5
+ private getWorkerQueue;
6
+ private enqueueTask;
7
+ parseRequest(data: any, format?: CollectionFormat): Promise<any>;
8
+ stringifyRequest(data: any, format?: CollectionFormat): Promise<any>;
9
+ cleanup(): Promise<void>;
10
+ }
11
+ export default BruParserWorker;
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/workers/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAQ,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAmClD,cAAM,eAAe;IACnB,OAAO,CAAC,YAAY,CAAwB;;IAS5C,OAAO,CAAC,cAAc;YAUR,WAAW;IAanB,YAAY,CAAC,IAAI,EAAE,GAAG,EAAE,MAAM,GAAE,gBAAwB,GAAG,OAAO,CAAC,GAAG,CAAC;IAIvE,gBAAgB,CAAC,IAAI,EAAE,GAAG,EAAE,MAAM,GAAE,gBAAwB,GAAG,OAAO,CAAC,GAAG,CAAC;IAI3E,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CAM/B;AAED,eAAe,eAAe,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=worker-script.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"worker-script.d.ts","sourceRoot":"","sources":["../../src/workers/worker-script.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@usebruno/filestore",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "license": "MIT",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -13,7 +13,7 @@
13
13
  "scripts": {
14
14
  "clean": "rimraf dist",
15
15
  "prebuild": "npm run clean",
16
- "build": "rollup -c",
16
+ "build": "rollup -c && tsc --emitDeclarationOnly",
17
17
  "watch": "rollup -c -w",
18
18
  "test": "jest",
19
19
  "test:watch": "jest --watch",
@@ -23,13 +23,16 @@
23
23
  "@babel/preset-env": "^7.22.0",
24
24
  "@babel/preset-typescript": "^7.22.0",
25
25
  "@rollup/plugin-commonjs": "^23.0.2",
26
+ "@rollup/plugin-json": "^6.1.0",
26
27
  "@rollup/plugin-node-resolve": "^15.0.1",
27
- "@rollup/plugin-typescript": "^9.0.2",
28
+ "@rollup/plugin-typescript": "^12.1.2",
28
29
  "@types/jest": "^29.5.11",
29
30
  "@types/lodash": "^4.14.191",
30
31
  "@types/node": "^24.1.0",
32
+ "@usebruno/schema-types": "0.1.0",
31
33
  "babel-jest": "^29.7.0",
32
34
  "jest": "^29.2.0",
35
+ "nanoid": "3.3.8",
33
36
  "rimraf": "^3.0.2",
34
37
  "rollup": "3.29.5",
35
38
  "rollup-plugin-dts": "^5.0.0",
@@ -41,7 +44,10 @@
41
44
  "rollup": "3.29.5"
42
45
  },
43
46
  "dependencies": {
44
- "@usebruno/lang": "0.31.0",
45
- "lodash": "^4.17.21"
47
+ "@types/nanoid": "^2.1.0",
48
+ "@usebruno/lang": "0.33.0",
49
+ "ajv": "^8.17.1",
50
+ "lodash": "^4.17.21",
51
+ "yaml": "^2.3.4"
46
52
  }
47
- }
53
+ }