dub 0.0.0 → 0.0.1

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 (221) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +241 -0
  3. package/_shims/MultipartBody.d.ts +9 -0
  4. package/_shims/MultipartBody.d.ts.map +1 -0
  5. package/_shims/MultipartBody.js +16 -0
  6. package/_shims/MultipartBody.js.map +1 -0
  7. package/_shims/MultipartBody.mjs +12 -0
  8. package/_shims/MultipartBody.mjs.map +1 -0
  9. package/_shims/README.md +46 -0
  10. package/_shims/auto/runtime-bun.d.ts +5 -0
  11. package/_shims/auto/runtime-bun.d.ts.map +1 -0
  12. package/_shims/auto/runtime-bun.js +21 -0
  13. package/_shims/auto/runtime-bun.js.map +1 -0
  14. package/_shims/auto/runtime-bun.mjs +2 -0
  15. package/_shims/auto/runtime-bun.mjs.map +1 -0
  16. package/_shims/auto/runtime-node.d.ts +5 -0
  17. package/_shims/auto/runtime-node.d.ts.map +1 -0
  18. package/_shims/auto/runtime-node.js +21 -0
  19. package/_shims/auto/runtime-node.js.map +1 -0
  20. package/_shims/auto/runtime-node.mjs +2 -0
  21. package/_shims/auto/runtime-node.mjs.map +1 -0
  22. package/_shims/auto/runtime.d.ts +5 -0
  23. package/_shims/auto/runtime.d.ts.map +1 -0
  24. package/_shims/auto/runtime.js +21 -0
  25. package/_shims/auto/runtime.js.map +1 -0
  26. package/_shims/auto/runtime.mjs +2 -0
  27. package/_shims/auto/runtime.mjs.map +1 -0
  28. package/_shims/auto/types-node.d.ts +5 -0
  29. package/_shims/auto/types-node.d.ts.map +1 -0
  30. package/_shims/auto/types-node.js +21 -0
  31. package/_shims/auto/types-node.js.map +1 -0
  32. package/_shims/auto/types-node.mjs +2 -0
  33. package/_shims/auto/types-node.mjs.map +1 -0
  34. package/_shims/auto/types.d.ts +101 -0
  35. package/_shims/auto/types.js +3 -0
  36. package/_shims/auto/types.mjs +3 -0
  37. package/_shims/bun-runtime.d.ts +6 -0
  38. package/_shims/bun-runtime.d.ts.map +1 -0
  39. package/_shims/bun-runtime.js +14 -0
  40. package/_shims/bun-runtime.js.map +1 -0
  41. package/_shims/bun-runtime.mjs +10 -0
  42. package/_shims/bun-runtime.mjs.map +1 -0
  43. package/_shims/index.d.ts +81 -0
  44. package/_shims/index.js +13 -0
  45. package/_shims/index.mjs +7 -0
  46. package/_shims/manual-types.d.ts +12 -0
  47. package/_shims/manual-types.js +3 -0
  48. package/_shims/manual-types.mjs +3 -0
  49. package/_shims/node-runtime.d.ts +3 -0
  50. package/_shims/node-runtime.d.ts.map +1 -0
  51. package/_shims/node-runtime.js +90 -0
  52. package/_shims/node-runtime.js.map +1 -0
  53. package/_shims/node-runtime.mjs +56 -0
  54. package/_shims/node-runtime.mjs.map +1 -0
  55. package/_shims/node-types.d.ts +42 -0
  56. package/_shims/node-types.js +3 -0
  57. package/_shims/node-types.mjs +3 -0
  58. package/_shims/registry.d.ts +37 -0
  59. package/_shims/registry.d.ts.map +1 -0
  60. package/_shims/registry.js +41 -0
  61. package/_shims/registry.js.map +1 -0
  62. package/_shims/registry.mjs +37 -0
  63. package/_shims/registry.mjs.map +1 -0
  64. package/_shims/web-runtime.d.ts +5 -0
  65. package/_shims/web-runtime.d.ts.map +1 -0
  66. package/_shims/web-runtime.js +78 -0
  67. package/_shims/web-runtime.js.map +1 -0
  68. package/_shims/web-runtime.mjs +71 -0
  69. package/_shims/web-runtime.mjs.map +1 -0
  70. package/_shims/web-types.d.ts +83 -0
  71. package/_shims/web-types.js +3 -0
  72. package/_shims/web-types.mjs +3 -0
  73. package/core.d.ts +230 -0
  74. package/core.d.ts.map +1 -0
  75. package/core.js +848 -0
  76. package/core.js.map +1 -0
  77. package/core.mjs +818 -0
  78. package/core.mjs.map +1 -0
  79. package/error.d.ts +53 -0
  80. package/error.d.ts.map +1 -0
  81. package/error.js +143 -0
  82. package/error.js.map +1 -0
  83. package/error.mjs +127 -0
  84. package/error.mjs.map +1 -0
  85. package/index.d.mts +118 -0
  86. package/index.d.ts +118 -0
  87. package/index.d.ts.map +1 -0
  88. package/index.js +109 -0
  89. package/index.js.map +1 -0
  90. package/index.mjs +81 -0
  91. package/index.mjs.map +1 -0
  92. package/package.json +100 -7
  93. package/resource.d.ts +6 -0
  94. package/resource.d.ts.map +1 -0
  95. package/resource.js +11 -0
  96. package/resource.js.map +1 -0
  97. package/resource.mjs +7 -0
  98. package/resource.mjs.map +1 -0
  99. package/resources/index.d.ts +4 -0
  100. package/resources/index.d.ts.map +1 -0
  101. package/resources/index.js +24 -0
  102. package/resources/index.js.map +1 -0
  103. package/resources/index.mjs +5 -0
  104. package/resources/index.mjs.map +1 -0
  105. package/resources/links/bulk.d.ts +101 -0
  106. package/resources/links/bulk.d.ts.map +1 -0
  107. package/resources/links/bulk.js +18 -0
  108. package/resources/links/bulk.js.map +1 -0
  109. package/resources/links/bulk.mjs +14 -0
  110. package/resources/links/bulk.mjs.map +1 -0
  111. package/resources/links/index.d.ts +4 -0
  112. package/resources/links/index.d.ts.map +1 -0
  113. package/resources/links/index.js +11 -0
  114. package/resources/links/index.js.map +1 -0
  115. package/resources/links/index.mjs +5 -0
  116. package/resources/links/index.mjs.map +1 -0
  117. package/resources/links/info.d.ts +30 -0
  118. package/resources/links/info.d.ts.map +1 -0
  119. package/resources/links/info.js +17 -0
  120. package/resources/links/info.js.map +1 -0
  121. package/resources/links/info.mjs +13 -0
  122. package/resources/links/info.mjs.map +1 -0
  123. package/resources/links/links.d.ts +253 -0
  124. package/resources/links/links.d.ts.map +1 -0
  125. package/resources/links/links.js +71 -0
  126. package/resources/links/links.js.map +1 -0
  127. package/resources/links/links.mjs +44 -0
  128. package/resources/links/links.mjs.map +1 -0
  129. package/resources/projects/index.d.ts +3 -0
  130. package/resources/projects/index.d.ts.map +1 -0
  131. package/resources/projects/index.js +9 -0
  132. package/resources/projects/index.js.map +1 -0
  133. package/resources/projects/index.mjs +4 -0
  134. package/resources/projects/index.mjs.map +1 -0
  135. package/resources/projects/projects.d.ts +98 -0
  136. package/resources/projects/projects.d.ts.map +1 -0
  137. package/resources/projects/projects.js +52 -0
  138. package/resources/projects/projects.js.map +1 -0
  139. package/resources/projects/projects.mjs +25 -0
  140. package/resources/projects/projects.mjs.map +1 -0
  141. package/resources/projects/tags.d.ts +40 -0
  142. package/resources/projects/tags.d.ts.map +1 -0
  143. package/resources/projects/tags.js +23 -0
  144. package/resources/projects/tags.js.map +1 -0
  145. package/resources/projects/tags.mjs +19 -0
  146. package/resources/projects/tags.mjs.map +1 -0
  147. package/resources/shared.d.ts +125 -0
  148. package/resources/shared.d.ts.map +1 -0
  149. package/resources/shared.js +4 -0
  150. package/resources/shared.js.map +1 -0
  151. package/resources/shared.mjs +3 -0
  152. package/resources/shared.mjs.map +1 -0
  153. package/shims/node.d.ts +29 -0
  154. package/shims/node.d.ts.map +1 -0
  155. package/shims/node.js +31 -0
  156. package/shims/node.js.map +1 -0
  157. package/shims/node.mjs +5 -0
  158. package/shims/node.mjs.map +1 -0
  159. package/shims/web.d.ts +26 -0
  160. package/shims/web.d.ts.map +1 -0
  161. package/shims/web.js +31 -0
  162. package/shims/web.js.map +1 -0
  163. package/shims/web.mjs +5 -0
  164. package/shims/web.mjs.map +1 -0
  165. package/src/_shims/MultipartBody.ts +9 -0
  166. package/src/_shims/README.md +46 -0
  167. package/src/_shims/auto/runtime-bun.ts +4 -0
  168. package/src/_shims/auto/runtime-node.ts +4 -0
  169. package/src/_shims/auto/runtime.ts +4 -0
  170. package/src/_shims/auto/types-node.ts +4 -0
  171. package/src/_shims/auto/types.d.ts +101 -0
  172. package/src/_shims/auto/types.js +3 -0
  173. package/src/_shims/auto/types.mjs +3 -0
  174. package/src/_shims/bun-runtime.ts +14 -0
  175. package/src/_shims/index.d.ts +81 -0
  176. package/src/_shims/index.js +13 -0
  177. package/src/_shims/index.mjs +7 -0
  178. package/src/_shims/manual-types.d.ts +12 -0
  179. package/src/_shims/manual-types.js +3 -0
  180. package/src/_shims/manual-types.mjs +3 -0
  181. package/src/_shims/node-runtime.ts +83 -0
  182. package/src/_shims/node-types.d.ts +42 -0
  183. package/src/_shims/node-types.js +3 -0
  184. package/src/_shims/node-types.mjs +3 -0
  185. package/src/_shims/registry.ts +63 -0
  186. package/src/_shims/web-runtime.ts +103 -0
  187. package/src/_shims/web-types.d.ts +83 -0
  188. package/src/_shims/web-types.js +3 -0
  189. package/src/_shims/web-types.mjs +3 -0
  190. package/src/core.ts +1122 -0
  191. package/src/error.ts +146 -0
  192. package/src/index.ts +195 -0
  193. package/src/lib/.keep +4 -0
  194. package/src/resource.ts +11 -0
  195. package/src/resources/index.ts +12 -0
  196. package/src/resources/links/bulk.ts +126 -0
  197. package/src/resources/links/index.ts +12 -0
  198. package/src/resources/links/info.ts +38 -0
  199. package/src/resources/links/links.ts +325 -0
  200. package/src/resources/projects/index.ts +4 -0
  201. package/src/resources/projects/projects.ts +122 -0
  202. package/src/resources/projects/tags.ts +53 -0
  203. package/src/resources/shared.ts +154 -0
  204. package/src/shims/node.ts +50 -0
  205. package/src/shims/web.ts +50 -0
  206. package/src/tsconfig.json +11 -0
  207. package/src/uploads.ts +245 -0
  208. package/src/version.ts +1 -0
  209. package/uploads.d.ts +75 -0
  210. package/uploads.d.ts.map +1 -0
  211. package/uploads.js +163 -0
  212. package/uploads.js.map +1 -0
  213. package/uploads.mjs +150 -0
  214. package/uploads.mjs.map +1 -0
  215. package/version.d.ts +2 -0
  216. package/version.d.ts.map +1 -0
  217. package/version.js +5 -0
  218. package/version.js.map +1 -0
  219. package/version.mjs +2 -0
  220. package/version.mjs.map +1 -0
  221. package/main.js +0 -8
@@ -0,0 +1,40 @@
1
+ import * as Core from 'dub/core';
2
+ import { APIResource } from 'dub/resource';
3
+ import * as TagsAPI from 'dub/resources/projects/tags';
4
+ export declare class Tags extends APIResource {
5
+ /**
6
+ * Create a new tag for the authenticated project.
7
+ */
8
+ create(projectSlug: string, body: TagCreateParams, options?: Core.RequestOptions): Core.APIPromise<Tag>;
9
+ /**
10
+ * Retrieve a list of tags for the authenticated project.
11
+ */
12
+ list(projectSlug: string, options?: Core.RequestOptions): Core.APIPromise<TagListResponse>;
13
+ }
14
+ export interface Tag {
15
+ /**
16
+ * The unique ID of the tag.
17
+ */
18
+ id?: string;
19
+ /**
20
+ * The color of the tag.
21
+ */
22
+ color?: string;
23
+ /**
24
+ * The name of the tag.
25
+ */
26
+ name?: string;
27
+ }
28
+ export type TagListResponse = Array<Tag>;
29
+ export interface TagCreateParams {
30
+ /**
31
+ * The name of the tag to create.
32
+ */
33
+ tag?: string;
34
+ }
35
+ export declare namespace Tags {
36
+ export import Tag = TagsAPI.Tag;
37
+ export import TagListResponse = TagsAPI.TagListResponse;
38
+ export import TagCreateParams = TagsAPI.TagCreateParams;
39
+ }
40
+ //# sourceMappingURL=tags.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tags.d.ts","sourceRoot":"","sources":["../../src/resources/projects/tags.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,IAAI,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,OAAO,MAAM,6BAA6B,CAAC;AAEvD,qBAAa,IAAK,SAAQ,WAAW;IACnC;;OAEG;IACH,MAAM,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,eAAe,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC;IAIvG;;OAEG;IACH,IAAI,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,eAAe,CAAC;CAG3F;AAED,MAAM,WAAW,GAAG;IAClB;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;AAEzC,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,yBAAiB,IAAI,CAAC;IACpB,MAAM,QAAQ,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;IAChC,MAAM,QAAQ,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC;IACxD,MAAM,QAAQ,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC;CACzD"}
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Tags = void 0;
5
+ const resource_1 = require("dub/resource");
6
+ class Tags extends resource_1.APIResource {
7
+ /**
8
+ * Create a new tag for the authenticated project.
9
+ */
10
+ create(projectSlug, body, options) {
11
+ return this._client.post(`/projects/${projectSlug}/tags`, { body, ...options });
12
+ }
13
+ /**
14
+ * Retrieve a list of tags for the authenticated project.
15
+ */
16
+ list(projectSlug, options) {
17
+ return this._client.get(`/projects/${projectSlug}/tags`, options);
18
+ }
19
+ }
20
+ exports.Tags = Tags;
21
+ (function (Tags) {
22
+ })(Tags = exports.Tags || (exports.Tags = {}));
23
+ //# sourceMappingURL=tags.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tags.js","sourceRoot":"","sources":["../../src/resources/projects/tags.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;AAGrD,2CAA2C;AAG3C,MAAa,IAAK,SAAQ,sBAAW;IACnC;;OAEG;IACH,MAAM,CAAC,WAAmB,EAAE,IAAqB,EAAE,OAA6B;QAC9E,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,WAAW,OAAO,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClF,CAAC;IAED;;OAEG;IACH,IAAI,CAAC,WAAmB,EAAE,OAA6B;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,WAAW,OAAO,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC;CACF;AAdD,oBAcC;AA4BD,WAAiB,IAAI;AAIrB,CAAC,EAJgB,IAAI,GAAJ,YAAI,KAAJ,YAAI,QAIpB"}
@@ -0,0 +1,19 @@
1
+ // File generated from our OpenAPI spec by Stainless.
2
+ import { APIResource } from 'dub/resource';
3
+ export class Tags extends APIResource {
4
+ /**
5
+ * Create a new tag for the authenticated project.
6
+ */
7
+ create(projectSlug, body, options) {
8
+ return this._client.post(`/projects/${projectSlug}/tags`, { body, ...options });
9
+ }
10
+ /**
11
+ * Retrieve a list of tags for the authenticated project.
12
+ */
13
+ list(projectSlug, options) {
14
+ return this._client.get(`/projects/${projectSlug}/tags`, options);
15
+ }
16
+ }
17
+ (function (Tags) {
18
+ })(Tags || (Tags = {}));
19
+ //# sourceMappingURL=tags.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tags.mjs","sourceRoot":"","sources":["../../src/resources/projects/tags.ts"],"names":[],"mappings":"AAAA,qDAAqD;OAG9C,EAAE,WAAW,EAAE,MAAM,cAAc;AAG1C,MAAM,OAAO,IAAK,SAAQ,WAAW;IACnC;;OAEG;IACH,MAAM,CAAC,WAAmB,EAAE,IAAqB,EAAE,OAA6B;QAC9E,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,WAAW,OAAO,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClF,CAAC;IAED;;OAEG;IACH,IAAI,CAAC,WAAmB,EAAE,OAA6B;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,WAAW,OAAO,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC;CACF;AA4BD,WAAiB,IAAI;AAIrB,CAAC,EAJgB,IAAI,KAAJ,IAAI,QAIpB"}
@@ -0,0 +1,125 @@
1
+ export interface Link {
2
+ /**
3
+ * The unique ID of the short link.
4
+ */
5
+ id?: string;
6
+ /**
7
+ * The Android destination URL for the short link for Android device targeting.
8
+ */
9
+ android?: string | null;
10
+ /**
11
+ * Whether the short link is archived.
12
+ */
13
+ archived?: boolean;
14
+ /**
15
+ * The number of clicks on the short link.
16
+ */
17
+ clicks?: number;
18
+ /**
19
+ * The comments for the short link.
20
+ */
21
+ comments?: string | null;
22
+ /**
23
+ * The date and time when the short link was created.
24
+ */
25
+ createdAt?: string;
26
+ /**
27
+ * The description of the short link generated via api.dub.co/metatags. Will be
28
+ * used for Custom Social Media Cards if `proxy` is true.
29
+ */
30
+ description?: string | null;
31
+ /**
32
+ * The domain of the short link.
33
+ */
34
+ domain?: string;
35
+ /**
36
+ * The date and time when the short link will expire in ISO-8601 format. Must be in
37
+ * the future.
38
+ */
39
+ expiresAt?: string | null;
40
+ /**
41
+ * Geo targeting information for the short link in JSON format {[COUNTRY]:
42
+ * "https://example.com" }. Learn more: https://dub.sh/geo
43
+ */
44
+ geo?: Record<string, string> | null;
45
+ /**
46
+ * The image of the short link generated via api.dub.co/metatags. Will be used for
47
+ * Custom Social Media Cards if `proxy` is true.
48
+ */
49
+ image?: string | null;
50
+ /**
51
+ * The iOS destination URL for the short link for iOS device targeting.
52
+ */
53
+ ios?: string | null;
54
+ /**
55
+ * The short link slug. If not provided, a random 7-character slug will be
56
+ * generated.
57
+ */
58
+ key?: string;
59
+ /**
60
+ * The date and time when the short link was last clicked.
61
+ */
62
+ lastClicked?: string | null;
63
+ /**
64
+ * The password required to access the destination URL of the short link.
65
+ */
66
+ password?: string | null;
67
+ /**
68
+ * The project ID of the short link.
69
+ */
70
+ projectId?: string;
71
+ /**
72
+ * Whether the short link uses Custom Social Media Cards feature.
73
+ */
74
+ proxy?: boolean;
75
+ /**
76
+ * Whether the short link's stats are publicly accessible.
77
+ */
78
+ publicStats?: boolean;
79
+ /**
80
+ * Whether the short link uses link cloaking.
81
+ */
82
+ rewrite?: boolean;
83
+ /**
84
+ * The unique id of the tag assigned to the short link.
85
+ */
86
+ tagId?: string | null;
87
+ /**
88
+ * The title of the short link generated via api.dub.co/metatags. Will be used for
89
+ * Custom Social Media Cards if `proxy` is true.
90
+ */
91
+ title?: string | null;
92
+ /**
93
+ * The date and time when the short link was last updated.
94
+ */
95
+ updatedAt?: string;
96
+ /**
97
+ * The destination URL of the short link.
98
+ */
99
+ url?: string;
100
+ /**
101
+ * The user ID of the creator of the short link.
102
+ */
103
+ userId?: string;
104
+ /**
105
+ * The UTM campaign of the short link.
106
+ */
107
+ utm_campaign?: string | null;
108
+ /**
109
+ * The UTM content of the short link.
110
+ */
111
+ utm_content?: string | null;
112
+ /**
113
+ * The UTM medium of the short link.
114
+ */
115
+ utm_medium?: string | null;
116
+ /**
117
+ * The UTM source of the short link.
118
+ */
119
+ utm_source?: string | null;
120
+ /**
121
+ * The UTM term of the short link.
122
+ */
123
+ utm_term?: string | null;
124
+ }
125
+ //# sourceMappingURL=shared.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,IAAI;IACnB;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAExB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEzB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE1B;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;IAEpC;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEpB;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEzB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE7B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3B;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3B;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B"}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ //# sourceMappingURL=shared.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.js","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":";AAAA,qDAAqD"}
@@ -0,0 +1,3 @@
1
+ // File generated from our OpenAPI spec by Stainless.
2
+ export {};
3
+ //# sourceMappingURL=shared.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.mjs","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":"AAAA,qDAAqD"}
@@ -0,0 +1,29 @@
1
+
2
+
3
+
4
+ import * as types from "../_shims/node-types.js";
5
+ declare module '../_shims/manual-types' {
6
+ namespace manual {
7
+ type Agent = types.Agent;
8
+ export import fetch = types.fetch;
9
+ type Request = types.Request;
10
+ type RequestInfo = types.RequestInfo;
11
+ type RequestInit = types.RequestInit;
12
+ type Response = types.Response;
13
+ type ResponseInit = types.ResponseInit;
14
+ type ResponseType = types.ResponseType;
15
+ type BodyInit = types.BodyInit;
16
+ type Headers = types.Headers;
17
+ type HeadersInit = types.HeadersInit;
18
+ type BlobPropertyBag = types.BlobPropertyBag;
19
+ type FilePropertyBag = types.FilePropertyBag;
20
+ type FileFromPathOptions = types.FileFromPathOptions;
21
+ export import FormData = types.FormData;
22
+ export import File = types.File;
23
+ export import Blob = types.Blob;
24
+ type Readable = types.Readable;
25
+ type FsReadStream = types.FsReadStream;
26
+ export import ReadableStream = types.ReadableStream;
27
+ }
28
+ }
29
+ //# sourceMappingURL=node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../src/shims/node.ts"],"names":[],"mappings":";;;AACA,OAAO,KAAK,KAAK,MAAM,sBAAsB,CAAC;AAK9C,OAAO,QAAQ,wBAAwB,CAAC;IACtC,UAAiB,MAAM,CAAC;QAEtB,KAAY,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;QAEhC,MAAM,QAAQ,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;QAElC,KAAY,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;QAEpC,KAAY,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC;QAE5C,KAAY,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC;QAE5C,KAAY,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;QAEtC,KAAY,YAAY,GAAG,KAAK,CAAC,YAAY,CAAC;QAE9C,KAAY,YAAY,GAAG,KAAK,CAAC,YAAY,CAAC;QAE9C,KAAY,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;QAEtC,KAAY,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;QAEpC,KAAY,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC;QAE5C,KAAY,eAAe,GAAG,KAAK,CAAC,eAAe,CAAC;QAEpD,KAAY,eAAe,GAAG,KAAK,CAAC,eAAe,CAAC;QAEpD,KAAY,mBAAmB,GAAG,KAAK,CAAC,mBAAmB,CAAC;QAE5D,MAAM,QAAQ,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;QAExC,MAAM,QAAQ,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;QAEhC,MAAM,QAAQ,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;QAEhC,KAAY,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;QAEtC,KAAY,YAAY,GAAG,KAAK,CAAC,YAAY,CAAC;QAE9C,MAAM,QAAQ,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC;KACrD;CACF"}
package/shims/node.js ADDED
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ // @ts-ignore
27
+ const types = __importStar(require("../_shims/node-types.js"));
28
+ const registry_1 = require("../_shims/registry.js");
29
+ const node_runtime_1 = require("../_shims/node-runtime.js");
30
+ (0, registry_1.setShims)((0, node_runtime_1.getRuntime)());
31
+ //# sourceMappingURL=node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node.js","sourceRoot":"","sources":["../src/shims/node.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,aAAa;AACb,+DAA8C;AAC9C,oDAA8C;AAC9C,4DAAoD;AACpD,IAAA,mBAAQ,EAAC,IAAA,yBAAU,GAAE,CAAC,CAAC"}
package/shims/node.mjs ADDED
@@ -0,0 +1,5 @@
1
+ import * as types from "../_shims/node-types.mjs";
2
+ import { setShims } from "../_shims/registry.mjs";
3
+ import { getRuntime } from "../_shims/node-runtime.mjs";
4
+ setShims(getRuntime());
5
+ //# sourceMappingURL=node.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node.mjs","sourceRoot":"","sources":["../src/shims/node.ts"],"names":[],"mappings":"OACO,KAAK,KAAK;OACV,EAAE,QAAQ,EAAE;OACZ,EAAE,UAAU,EAAE;AACrB,QAAQ,CAAC,UAAU,EAAE,CAAC,CAAC"}
package/shims/web.d.ts ADDED
@@ -0,0 +1,26 @@
1
+ import * as types from "../_shims/web-types.js";
2
+ declare module '../_shims/manual-types' {
3
+ namespace manual {
4
+ type Agent = types.Agent;
5
+ export import fetch = types.fetch;
6
+ type Request = types.Request;
7
+ type RequestInfo = types.RequestInfo;
8
+ type RequestInit = types.RequestInit;
9
+ type Response = types.Response;
10
+ type ResponseInit = types.ResponseInit;
11
+ type ResponseType = types.ResponseType;
12
+ type BodyInit = types.BodyInit;
13
+ type Headers = types.Headers;
14
+ type HeadersInit = types.HeadersInit;
15
+ type BlobPropertyBag = types.BlobPropertyBag;
16
+ type FilePropertyBag = types.FilePropertyBag;
17
+ type FileFromPathOptions = types.FileFromPathOptions;
18
+ export import FormData = types.FormData;
19
+ export import File = types.File;
20
+ export import Blob = types.Blob;
21
+ type Readable = types.Readable;
22
+ type FsReadStream = types.FsReadStream;
23
+ export import ReadableStream = types.ReadableStream;
24
+ }
25
+ }
26
+ //# sourceMappingURL=web.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web.d.ts","sourceRoot":"","sources":["../src/shims/web.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,qBAAqB,CAAC;AAK7C,OAAO,QAAQ,wBAAwB,CAAC;IACtC,UAAiB,MAAM,CAAC;QAEtB,KAAY,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;QAEhC,MAAM,QAAQ,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;QAElC,KAAY,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;QAEpC,KAAY,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC;QAE5C,KAAY,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC;QAE5C,KAAY,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;QAEtC,KAAY,YAAY,GAAG,KAAK,CAAC,YAAY,CAAC;QAE9C,KAAY,YAAY,GAAG,KAAK,CAAC,YAAY,CAAC;QAE9C,KAAY,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;QAEtC,KAAY,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;QAEpC,KAAY,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC;QAE5C,KAAY,eAAe,GAAG,KAAK,CAAC,eAAe,CAAC;QAEpD,KAAY,eAAe,GAAG,KAAK,CAAC,eAAe,CAAC;QAEpD,KAAY,mBAAmB,GAAG,KAAK,CAAC,mBAAmB,CAAC;QAE5D,MAAM,QAAQ,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;QAExC,MAAM,QAAQ,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;QAEhC,MAAM,QAAQ,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;QAEhC,KAAY,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;QAEtC,KAAY,YAAY,GAAG,KAAK,CAAC,YAAY,CAAC;QAE9C,MAAM,QAAQ,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC;KACrD;CACF"}
package/shims/web.js ADDED
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ // @ts-ignore
27
+ const types = __importStar(require("../_shims/web-types.js"));
28
+ const registry_1 = require("../_shims/registry.js");
29
+ const web_runtime_1 = require("../_shims/web-runtime.js");
30
+ (0, registry_1.setShims)((0, web_runtime_1.getRuntime)({ manuallyImported: true }));
31
+ //# sourceMappingURL=web.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web.js","sourceRoot":"","sources":["../src/shims/web.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,aAAa;AACb,8DAA6C;AAC7C,oDAA8C;AAC9C,0DAAmD;AACnD,IAAA,mBAAQ,EAAC,IAAA,wBAAU,EAAC,EAAE,gBAAgB,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC"}
package/shims/web.mjs ADDED
@@ -0,0 +1,5 @@
1
+ import * as types from "../_shims/web-types.mjs";
2
+ import { setShims } from "../_shims/registry.mjs";
3
+ import { getRuntime } from "../_shims/web-runtime.mjs";
4
+ setShims(getRuntime({ manuallyImported: true }));
5
+ //# sourceMappingURL=web.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web.mjs","sourceRoot":"","sources":["../src/shims/web.ts"],"names":[],"mappings":"OACO,KAAK,KAAK;OACV,EAAE,QAAQ,EAAE;OACZ,EAAE,UAAU,EAAE;AACrB,QAAQ,CAAC,UAAU,CAAC,EAAE,gBAAgB,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Disclaimer: modules in _shims aren't intended to be imported by SDK users.
3
+ */
4
+ export class MultipartBody {
5
+ constructor(public body: any) {}
6
+ get [Symbol.toStringTag](): string {
7
+ return 'MultipartBody';
8
+ }
9
+ }
@@ -0,0 +1,46 @@
1
+ # 👋 Wondering what everything in here does?
2
+
3
+ `dub` supports a wide variety of runtime environments like Node.js, Deno, Bun, browsers, and various
4
+ edge runtimes, as well as both CommonJS (CJS) and EcmaScript Modules (ESM).
5
+
6
+ To do this, `dub` provides shims for either using `node-fetch` when in Node (because `fetch` is still experimental there) or the global `fetch` API built into the environment when not in Node.
7
+
8
+ It uses [conditional exports](https://nodejs.org/api/packages.html#conditional-exports) to
9
+ automatically select the correct shims for each environment. However, conditional exports are a fairly new
10
+ feature and not supported everywhere. For instance, the TypeScript `"moduleResolution": "node"`
11
+
12
+ setting doesn't consult the `exports` map, compared to `"moduleResolution": "nodeNext"`, which does.
13
+ Unfortunately that's still the default setting, and it can result in errors like
14
+ getting the wrong raw `Response` type from `.asResponse()`, for example.
15
+
16
+ The user can work around these issues by manually importing one of:
17
+
18
+ - `import 'dub/shims/node'`
19
+ - `import 'dub/shims/web'`
20
+
21
+ All of the code here in `_shims` handles selecting the automatic default shims or manual overrides.
22
+
23
+ ### How it works - Runtime
24
+
25
+ Runtime shims get installed by calling `setShims` exported by `dub/_shims/registry`.
26
+
27
+ Manually importing `dub/shims/node` or `dub/shims/web`, calls `setShims` with the respective runtime shims.
28
+
29
+ All client code imports shims from `dub/_shims/index`, which:
30
+
31
+ - checks if shims have been set manually
32
+ - if not, calls `setShims` with the shims from `dub/_shims/auto/runtime`
33
+ - re-exports the installed shims from `dub/_shims/registry`.
34
+
35
+ `dub/_shims/auto/runtime` exports web runtime shims.
36
+ If the `node` export condition is set, the export map replaces it with `dub/_shims/auto/runtime-node`.
37
+
38
+ ### How it works - Type time
39
+
40
+ All client code imports shim types from `dub/_shims/index`, which selects the manual types from `dub/_shims/manual-types` if they have been declared, otherwise it exports the auto types from `dub/_shims/auto/types`.
41
+
42
+ `dub/_shims/manual-types` exports an empty namespace.
43
+ Manually importing `dub/shims/node` or `dub/shims/web` merges declarations into this empty namespace, so they get picked up by `dub/_shims/index`.
44
+
45
+ `dub/_shims/auto/types` exports web type definitions.
46
+ If the `node` export condition is set, the export map replaces it with `dub/_shims/auto/types-node`, though TS only picks this up if `"moduleResolution": "nodenext"` or `"moduleResolution": "bundler"`.
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Disclaimer: modules in _shims aren't intended to be imported by SDK users.
3
+ */
4
+ export * from '../bun-runtime';
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Disclaimer: modules in _shims aren't intended to be imported by SDK users.
3
+ */
4
+ export * from '../node-runtime';
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Disclaimer: modules in _shims aren't intended to be imported by SDK users.
3
+ */
4
+ export * from '../web-runtime';
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Disclaimer: modules in _shims aren't intended to be imported by SDK users.
3
+ */
4
+ export * from '../node-types';
@@ -0,0 +1,101 @@
1
+ /**
2
+ * Disclaimer: modules in _shims aren't intended to be imported by SDK users.
3
+ */
4
+ export type Agent = any;
5
+
6
+ // @ts-ignore
7
+ declare const _fetch: typeof fetch;
8
+ export { _fetch as fetch };
9
+
10
+ // @ts-ignore
11
+ type _Request = Request;
12
+ export { _Request as Request };
13
+
14
+ // @ts-ignore
15
+ type _RequestInfo = RequestInfo;
16
+ export { type _RequestInfo as RequestInfo };
17
+
18
+ // @ts-ignore
19
+ type _RequestInit = RequestInit;
20
+ export { type _RequestInit as RequestInit };
21
+
22
+ // @ts-ignore
23
+ type _Response = Response;
24
+ export { _Response as Response };
25
+
26
+ // @ts-ignore
27
+ type _ResponseInit = ResponseInit;
28
+ export { type _ResponseInit as ResponseInit };
29
+
30
+ // @ts-ignore
31
+ type _ResponseType = ResponseType;
32
+ export { type _ResponseType as ResponseType };
33
+
34
+ // @ts-ignore
35
+ type _BodyInit = BodyInit;
36
+ export { type _BodyInit as BodyInit };
37
+
38
+ // @ts-ignore
39
+ type _Headers = Headers;
40
+ export { _Headers as Headers };
41
+
42
+ // @ts-ignore
43
+ type _HeadersInit = HeadersInit;
44
+ export { type _HeadersInit as HeadersInit };
45
+
46
+ type EndingType = 'native' | 'transparent';
47
+
48
+ export interface BlobPropertyBag {
49
+ endings?: EndingType;
50
+ type?: string;
51
+ }
52
+
53
+ export interface FilePropertyBag extends BlobPropertyBag {
54
+ lastModified?: number;
55
+ }
56
+
57
+ export type FileFromPathOptions = Omit<FilePropertyBag, 'lastModified'>;
58
+
59
+ // @ts-ignore
60
+ type _FormData = FormData;
61
+ // @ts-ignore
62
+ declare const _FormData: typeof FormData;
63
+ export { _FormData as FormData };
64
+
65
+ // @ts-ignore
66
+ type _File = File;
67
+ // @ts-ignore
68
+ declare const _File: typeof File;
69
+ export { _File as File };
70
+
71
+ // @ts-ignore
72
+ type _Blob = Blob;
73
+ // @ts-ignore
74
+ declare const _Blob: typeof Blob;
75
+ export { _Blob as Blob };
76
+
77
+ export declare class Readable {
78
+ readable: boolean;
79
+ readonly readableEnded: boolean;
80
+ readonly readableFlowing: boolean | null;
81
+ readonly readableHighWaterMark: number;
82
+ readonly readableLength: number;
83
+ readonly readableObjectMode: boolean;
84
+ destroyed: boolean;
85
+ read(size?: number): any;
86
+ pause(): this;
87
+ resume(): this;
88
+ isPaused(): boolean;
89
+ destroy(error?: Error): this;
90
+ [Symbol.asyncIterator](): AsyncIterableIterator<any>;
91
+ }
92
+
93
+ export declare class FsReadStream extends Readable {
94
+ path: {}; // node type is string | Buffer
95
+ }
96
+
97
+ // @ts-ignore
98
+ type _ReadableStream<R = any> = ReadableStream<R>;
99
+ // @ts-ignore
100
+ declare const _ReadableStream: typeof ReadableStream;
101
+ export { _ReadableStream as ReadableStream };
@@ -0,0 +1,3 @@
1
+ /**
2
+ * Disclaimer: modules in _shims aren't intended to be imported by SDK users.
3
+ */
@@ -0,0 +1,3 @@
1
+ /**
2
+ * Disclaimer: modules in _shims aren't intended to be imported by SDK users.
3
+ */
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Disclaimer: modules in _shims aren't intended to be imported by SDK users.
3
+ */
4
+ import { type Shims } from './registry';
5
+ import { getRuntime as getWebRuntime } from './web-runtime';
6
+ import { ReadStream as FsReadStream } from 'node:fs';
7
+
8
+ export function getRuntime(): Shims {
9
+ const runtime = getWebRuntime();
10
+ function isFsReadStream(value: any): value is FsReadStream {
11
+ return value instanceof FsReadStream;
12
+ }
13
+ return { ...runtime, isFsReadStream };
14
+ }