@skmtc/core 0.0.223 → 0.0.225

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 (331) hide show
  1. package/{script → esm}/_dnt.polyfills.js +1 -2
  2. package/{script → esm}/_dnt.shims.js +4 -8
  3. package/{script → esm}/context/CoreContext.js +24 -28
  4. package/{script → esm}/context/GenerateContext.js +13 -17
  5. package/{script → esm}/context/LogStore.js +1 -5
  6. package/{script → esm}/context/ParseContext.js +1 -5
  7. package/{script → esm}/context/RenderContext.js +17 -47
  8. package/{script → esm}/context/Trail.js +1 -5
  9. package/esm/context/types.js +1 -0
  10. package/{script → esm}/deps/jsr.io/@std/encoding/1.0.1/_validate_binary_like.js +1 -4
  11. package/{script → esm}/deps/jsr.io/@std/encoding/1.0.1/ascii85.js +4 -8
  12. package/{script → esm}/deps/jsr.io/@std/encoding/1.0.1/base32.js +4 -8
  13. package/{script → esm}/deps/jsr.io/@std/encoding/1.0.1/base58.js +4 -8
  14. package/{script → esm}/deps/jsr.io/@std/encoding/1.0.1/base64.js +4 -8
  15. package/{script → esm}/deps/jsr.io/@std/encoding/1.0.1/base64url.js +3 -30
  16. package/{script → esm}/deps/jsr.io/@std/encoding/1.0.1/hex.js +4 -8
  17. package/esm/deps/jsr.io/@std/encoding/1.0.1/mod.js +22 -0
  18. package/{script → esm}/deps/jsr.io/@std/encoding/1.0.1/varint.js +8 -14
  19. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/_common/assert_path.js +1 -4
  20. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/_common/basename.js +5 -10
  21. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/_common/common.js +1 -4
  22. package/esm/deps/jsr.io/@std/path/1.0.0/_common/constants.js +46 -0
  23. package/esm/deps/jsr.io/@std/path/1.0.0/_common/dirname.js +8 -0
  24. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/_common/format.js +2 -6
  25. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/_common/from_file_url.js +1 -4
  26. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/_common/glob_to_reg_exp.js +1 -4
  27. package/esm/deps/jsr.io/@std/path/1.0.0/_common/normalize.js +8 -0
  28. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/_common/normalize_string.js +6 -9
  29. package/esm/deps/jsr.io/@std/path/1.0.0/_common/relative.js +9 -0
  30. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/_common/strip_trailing_separators.js +1 -4
  31. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/_common/to_file_url.js +1 -4
  32. package/esm/deps/jsr.io/@std/path/1.0.0/_os.js +14 -0
  33. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/basename.js +7 -10
  34. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/common.js +4 -7
  35. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/constants.js +4 -7
  36. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/dirname.js +5 -8
  37. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/extname.js +5 -8
  38. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/format.js +5 -8
  39. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/from_file_url.js +5 -8
  40. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/glob_to_regexp.js +7 -10
  41. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/is_absolute.js +5 -8
  42. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/is_glob.js +1 -4
  43. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/join.js +5 -8
  44. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/join_globs.js +7 -10
  45. package/esm/deps/jsr.io/@std/path/1.0.0/mod.js +54 -0
  46. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/normalize.js +5 -8
  47. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/normalize_glob.js +7 -10
  48. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/parse.js +5 -8
  49. package/esm/deps/jsr.io/@std/path/1.0.0/posix/_util.js +8 -0
  50. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/basename.js +8 -11
  51. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/constants.js +3 -6
  52. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/dirname.js +8 -11
  53. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/extname.js +7 -10
  54. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/format.js +4 -7
  55. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/from_file_url.js +3 -6
  56. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/glob_to_regexp.js +3 -6
  57. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/is_absolute.js +5 -8
  58. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/join.js +5 -8
  59. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/join_globs.js +7 -10
  60. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/normalize.js +8 -11
  61. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/normalize_glob.js +6 -9
  62. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/parse.js +10 -13
  63. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/relative.js +14 -17
  64. package/esm/deps/jsr.io/@std/path/1.0.0/posix/resolve.js +59 -0
  65. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/to_file_url.js +5 -8
  66. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/to_namespaced_path.js +1 -4
  67. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/relative.js +5 -8
  68. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/resolve.js +7 -10
  69. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/to_file_url.js +5 -8
  70. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/to_namespaced_path.js +7 -10
  71. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/types.js +1 -2
  72. package/esm/deps/jsr.io/@std/path/1.0.0/windows/_util.js +15 -0
  73. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/basename.js +11 -14
  74. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/constants.js +3 -6
  75. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/dirname.js +17 -20
  76. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/extname.js +9 -12
  77. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/format.js +4 -7
  78. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/from_file_url.js +3 -6
  79. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/glob_to_regexp.js +3 -6
  80. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/is_absolute.js +9 -12
  81. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/join.js +10 -13
  82. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/join_globs.js +7 -10
  83. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/normalize.js +17 -20
  84. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/normalize_glob.js +6 -9
  85. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/parse.js +16 -19
  86. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/relative.js +16 -19
  87. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/resolve.js +17 -43
  88. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/to_file_url.js +5 -8
  89. package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/to_namespaced_path.js +11 -14
  90. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_dumper/dumper.js +10 -36
  91. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_dumper/dumper_state.js +2 -6
  92. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_error.js +1 -5
  93. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_loader/loader.js +9 -36
  94. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_loader/loader_state.js +2 -6
  95. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_mark.js +3 -7
  96. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_state.js +3 -7
  97. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/binary.js +2 -5
  98. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/bool.js +4 -7
  99. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/float.js +5 -8
  100. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/function.js +2 -5
  101. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/int.js +4 -7
  102. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/map.js +2 -5
  103. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/merge.js +2 -5
  104. package/esm/deps/jsr.io/@std/yaml/0.215.0/_type/mod.js +20 -0
  105. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/nil.js +2 -5
  106. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/omap.js +2 -5
  107. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/pairs.js +2 -5
  108. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/regexp.js +2 -5
  109. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/seq.js +2 -5
  110. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/set.js +2 -5
  111. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/str.js +2 -5
  112. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/timestamp.js +2 -5
  113. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/undefined.js +2 -5
  114. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_utils.js +15 -32
  115. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/mod.js +4 -20
  116. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/parse.js +5 -9
  117. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/schema/core.js +4 -7
  118. package/esm/deps/jsr.io/@std/yaml/0.215.0/schema/default.js +15 -0
  119. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/schema/extended.js +6 -9
  120. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/schema/failsafe.js +4 -7
  121. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/schema/json.js +6 -9
  122. package/esm/deps/jsr.io/@std/yaml/0.215.0/schema/mod.js +10 -0
  123. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/schema.js +3 -7
  124. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/stringify.js +3 -6
  125. package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/type.js +1 -5
  126. package/{script → esm}/dsl/ContentSettings.js +1 -5
  127. package/{script → esm}/dsl/Definition.js +4 -8
  128. package/{script → esm}/dsl/GeneratedValueList.js +3 -7
  129. package/{script → esm}/dsl/Identifier.js +8 -12
  130. package/{script → esm}/dsl/Import.js +2 -7
  131. package/esm/dsl/ModelCreator.js +1 -0
  132. package/{script → esm}/dsl/ModelDriver.js +14 -18
  133. package/esm/dsl/OperationCreator.js +1 -0
  134. package/{script → esm}/dsl/OperationDriver.js +11 -15
  135. package/esm/dsl/Stringable.js +1 -0
  136. package/{script → esm}/dsl/ValueBase.js +1 -5
  137. package/{script → esm}/dsl/base.js +5 -13
  138. package/esm/dsl/constants.js +1 -0
  139. package/{script → esm}/dsl/withConfig.js +9 -15
  140. package/esm/generate/generate.js +47 -0
  141. package/esm/generate/generateModels.js +29 -0
  142. package/esm/generate/generateOperations.js +35 -0
  143. package/{script → esm}/helpers/logStatus.js +2 -7
  144. package/esm/helpers/naming.js +25 -0
  145. package/esm/helpers/refFns.js +24 -0
  146. package/esm/helpers/strings.js +6 -0
  147. package/{script → esm}/helpers/verifyType.js +1 -4
  148. package/esm/mod.js +61 -0
  149. package/{script → esm}/oas/array/Array.js +2 -6
  150. package/esm/oas/array/array-types.js +17 -0
  151. package/esm/oas/array/toArray.js +20 -0
  152. package/{script → esm}/oas/boolean/Boolean.js +2 -6
  153. package/esm/oas/boolean/boolean-types.js +8 -0
  154. package/esm/oas/boolean/toBoolean.js +10 -0
  155. package/{script → esm}/oas/components/Components.js +2 -6
  156. package/esm/oas/components/toComponentsV3.js +44 -0
  157. package/esm/oas/contact/contact-types.js +7 -0
  158. package/{script → esm}/oas/discriminator/Discriminator.js +2 -6
  159. package/esm/oas/discriminator/discriminator-types.js +6 -0
  160. package/esm/oas/discriminator/toDiscriminatorV3.js +11 -0
  161. package/{script → esm}/oas/document/Document.js +2 -6
  162. package/esm/oas/document/toDocumentV3.js +24 -0
  163. package/{script → esm}/oas/example/Example.js +2 -6
  164. package/esm/oas/example/example-types.js +9 -0
  165. package/esm/oas/example/toExamplesV3.js +45 -0
  166. package/{script → esm}/oas/header/Header.js +2 -6
  167. package/esm/oas/header/toHeadersV3.js +42 -0
  168. package/{script → esm}/oas/info/Info.js +2 -6
  169. package/{script → esm}/oas/info/toInfoV3.js +3 -7
  170. package/{script → esm}/oas/integer/Integer.js +2 -6
  171. package/esm/oas/integer/integer-types.js +18 -0
  172. package/esm/oas/integer/toInteger.js +13 -0
  173. package/{script → esm}/oas/intersection/Intersection.js +2 -6
  174. package/esm/oas/intersection/intersection-types.js +12 -0
  175. package/esm/oas/intersection/toIntersection.js +22 -0
  176. package/esm/oas/license/license-types.js +7 -0
  177. package/esm/oas/markdown/markdown-types.js +2 -0
  178. package/{script → esm}/oas/mediaType/MediaType.js +2 -6
  179. package/esm/oas/mediaType/mediaType-types.js +12 -0
  180. package/esm/oas/mediaType/toMediaTypeItemV3.js +37 -0
  181. package/esm/oas/null/null-types.js +8 -0
  182. package/{script → esm}/oas/number/Number.js +2 -6
  183. package/esm/oas/number/number-types.js +14 -0
  184. package/esm/oas/number/toNumber.js +10 -0
  185. package/{script → esm}/oas/object/Object.js +4 -8
  186. package/esm/oas/object/object-types.js +27 -0
  187. package/esm/oas/object/toAdditionalPropertiesV3.js +14 -0
  188. package/esm/oas/object/toObject.js +23 -0
  189. package/{script → esm}/oas/operation/Operation.js +2 -6
  190. package/{script → esm}/oas/operation/toOperationsV3.js +13 -18
  191. package/{script → esm}/oas/parameter/Parameter.js +2 -6
  192. package/esm/oas/parameter/parameter-types.js +38 -0
  193. package/{script → esm}/oas/parameter/toParameterV3.js +22 -28
  194. package/{script → esm}/oas/pathItem/PathItem.js +2 -6
  195. package/esm/oas/pathItem/toPathItemV3.js +15 -0
  196. package/{script → esm}/oas/ref/Ref.js +6 -10
  197. package/esm/oas/ref/ref-types.js +54 -0
  198. package/esm/oas/ref/toRefV31.js +11 -0
  199. package/{script → esm}/oas/requestBody/RequestBody.js +2 -6
  200. package/esm/oas/requestBody/toRequestBodiesV3.js +46 -0
  201. package/{script → esm}/oas/response/Response.js +2 -6
  202. package/esm/oas/response/toResponseV3.js +35 -0
  203. package/esm/oas/schema/Schema.js +1 -0
  204. package/esm/oas/schema/schema-types.js +23 -0
  205. package/esm/oas/schema/toSchemasV3.js +60 -0
  206. package/{script → esm}/oas/string/String.js +2 -6
  207. package/esm/oas/string/string-types.js +29 -0
  208. package/esm/oas/string/toString.js +11 -0
  209. package/{script → esm}/oas/tag/Tag.js +2 -6
  210. package/esm/oas/tag/toTagsV3.js +14 -0
  211. package/{script → esm}/oas/union/Union.js +2 -6
  212. package/esm/oas/union/toUnion.js +22 -0
  213. package/esm/oas/union/union-types.js +12 -0
  214. package/{script → esm}/oas/unknown/Unknown.js +2 -6
  215. package/esm/oas/unknown/toUnknown.js +9 -0
  216. package/esm/oas/unknown/unknown-types.js +8 -0
  217. package/{script → esm}/oas/void/Void.js +4 -8
  218. package/{script → esm}/oas-elements/OasBase.js +1 -5
  219. package/esm/package.json +3 -0
  220. package/esm/parse/parse.js +16 -0
  221. package/{script → esm}/schemas/client.js +2 -4
  222. package/{script → esm}/server/createServer.js +24 -51
  223. package/esm/types/Brand.js +1 -0
  224. package/{script → esm}/types/CustomValue.js +3 -8
  225. package/esm/types/GeneratedValue.js +1 -0
  226. package/{script → esm}/types/GenerationType.js +1 -2
  227. package/esm/types/GeneratorKeys.js +13 -0
  228. package/esm/types/Method.js +32 -0
  229. package/esm/types/Modifiers.js +1 -0
  230. package/esm/types/RefName.js +1 -0
  231. package/esm/types/Settings.js +42 -0
  232. package/esm/types/TypeSystem.js +1 -0
  233. package/esm/types/prettierConfig.js +46 -0
  234. package/{script → esm}/typescript/EntityType.js +3 -7
  235. package/{script → esm}/typescript/FunctionParameter.js +10 -17
  236. package/{script → esm}/typescript/ReactRouterPathParams.js +2 -6
  237. package/esm/typescript/identifiers.js +7 -0
  238. package/esm/typescript/keyValues.js +11 -0
  239. package/{script → esm}/typescript/toDestructuredObject.js +1 -5
  240. package/{script → esm}/typescript/toOperationArg.js +7 -14
  241. package/esm/typescript/toOperationResponse.js +17 -0
  242. package/esm/typescript/toParamsObject.js +12 -0
  243. package/esm/typescript/toPathTemplate.js +3 -0
  244. package/esm/typescript/withDescription.js +3 -0
  245. package/package.json +14 -8
  246. package/types/types/Method.d.ts +1 -0
  247. package/types/types/Method.d.ts.map +1 -1
  248. package/script/context/types.js +0 -2
  249. package/script/deps/jsr.io/@std/encoding/1.0.1/mod.js +0 -38
  250. package/script/deps/jsr.io/@std/path/1.0.0/_common/constants.js +0 -49
  251. package/script/deps/jsr.io/@std/path/1.0.0/_common/dirname.js +0 -11
  252. package/script/deps/jsr.io/@std/path/1.0.0/_common/normalize.js +0 -11
  253. package/script/deps/jsr.io/@std/path/1.0.0/_common/relative.js +0 -12
  254. package/script/deps/jsr.io/@std/path/1.0.0/_os.js +0 -40
  255. package/script/deps/jsr.io/@std/path/1.0.0/mod.js +0 -70
  256. package/script/deps/jsr.io/@std/path/1.0.0/posix/_util.js +0 -11
  257. package/script/deps/jsr.io/@std/path/1.0.0/posix/resolve.js +0 -85
  258. package/script/deps/jsr.io/@std/path/1.0.0/windows/_util.js +0 -20
  259. package/script/deps/jsr.io/@std/yaml/0.215.0/_type/mod.js +0 -39
  260. package/script/deps/jsr.io/@std/yaml/0.215.0/schema/default.js +0 -18
  261. package/script/deps/jsr.io/@std/yaml/0.215.0/schema/mod.js +0 -18
  262. package/script/dsl/ModelCreator.js +0 -2
  263. package/script/dsl/OperationCreator.js +0 -2
  264. package/script/dsl/Stringable.js +0 -2
  265. package/script/dsl/constants.js +0 -4
  266. package/script/generate/generate.js +0 -75
  267. package/script/generate/generateModels.js +0 -56
  268. package/script/generate/generateOperations.js +0 -62
  269. package/script/helpers/naming.js +0 -33
  270. package/script/helpers/refFns.js +0 -30
  271. package/script/helpers/strings.js +0 -11
  272. package/script/mod.js +0 -77
  273. package/script/oas/array/array-types.js +0 -20
  274. package/script/oas/array/toArray.js +0 -24
  275. package/script/oas/boolean/boolean-types.js +0 -11
  276. package/script/oas/boolean/toBoolean.js +0 -14
  277. package/script/oas/components/toComponentsV3.js +0 -48
  278. package/script/oas/contact/contact-types.js +0 -10
  279. package/script/oas/discriminator/discriminator-types.js +0 -9
  280. package/script/oas/discriminator/toDiscriminatorV3.js +0 -15
  281. package/script/oas/document/toDocumentV3.js +0 -28
  282. package/script/oas/example/example-types.js +0 -12
  283. package/script/oas/example/toExamplesV3.js +0 -51
  284. package/script/oas/header/toHeadersV3.js +0 -46
  285. package/script/oas/integer/integer-types.js +0 -21
  286. package/script/oas/integer/toInteger.js +0 -17
  287. package/script/oas/intersection/intersection-types.js +0 -15
  288. package/script/oas/intersection/toIntersection.js +0 -26
  289. package/script/oas/license/license-types.js +0 -10
  290. package/script/oas/markdown/markdown-types.js +0 -5
  291. package/script/oas/mediaType/mediaType-types.js +0 -15
  292. package/script/oas/mediaType/toMediaTypeItemV3.js +0 -43
  293. package/script/oas/null/null-types.js +0 -11
  294. package/script/oas/number/number-types.js +0 -17
  295. package/script/oas/number/toNumber.js +0 -14
  296. package/script/oas/object/object-types.js +0 -30
  297. package/script/oas/object/toAdditionalPropertiesV3.js +0 -18
  298. package/script/oas/object/toObject.js +0 -27
  299. package/script/oas/parameter/parameter-types.js +0 -41
  300. package/script/oas/pathItem/toPathItemV3.js +0 -19
  301. package/script/oas/ref/ref-types.js +0 -57
  302. package/script/oas/ref/toRefV31.js +0 -15
  303. package/script/oas/requestBody/toRequestBodiesV3.js +0 -51
  304. package/script/oas/response/toResponseV3.js +0 -41
  305. package/script/oas/schema/Schema.js +0 -2
  306. package/script/oas/schema/schema-types.js +0 -26
  307. package/script/oas/schema/toSchemasV3.js +0 -67
  308. package/script/oas/string/string-types.js +0 -32
  309. package/script/oas/string/toString.js +0 -15
  310. package/script/oas/tag/toTagsV3.js +0 -18
  311. package/script/oas/union/toUnion.js +0 -26
  312. package/script/oas/union/union-types.js +0 -15
  313. package/script/oas/unknown/toUnknown.js +0 -13
  314. package/script/oas/unknown/unknown-types.js +0 -11
  315. package/script/package.json +0 -3
  316. package/script/parse/parse.js +0 -20
  317. package/script/types/Brand.js +0 -2
  318. package/script/types/GeneratedValue.js +0 -2
  319. package/script/types/GeneratorKeys.js +0 -19
  320. package/script/types/Method.js +0 -34
  321. package/script/types/Modifiers.js +0 -2
  322. package/script/types/RefName.js +0 -2
  323. package/script/types/Settings.js +0 -45
  324. package/script/types/TypeSystem.js +0 -2
  325. package/script/types/prettierConfig.js +0 -49
  326. package/script/typescript/identifiers.js +0 -12
  327. package/script/typescript/keyValues.js +0 -15
  328. package/script/typescript/toOperationResponse.js +0 -21
  329. package/script/typescript/toParamsObject.js +0 -16
  330. package/script/typescript/toPathTemplate.js +0 -7
  331. package/script/typescript/withDescription.js +0 -7
@@ -1,32 +1,5 @@
1
- "use strict";
2
1
  // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
3
2
  // This module is browser compatible.
4
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
5
- if (k2 === undefined) k2 = k;
6
- var desc = Object.getOwnPropertyDescriptor(m, k);
7
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
8
- desc = { enumerable: true, get: function() { return m[k]; } };
9
- }
10
- Object.defineProperty(o, k2, desc);
11
- }) : (function(o, m, k, k2) {
12
- if (k2 === undefined) k2 = k;
13
- o[k2] = m[k];
14
- }));
15
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
16
- Object.defineProperty(o, "default", { enumerable: true, value: v });
17
- }) : function(o, v) {
18
- o["default"] = v;
19
- });
20
- var __importStar = (this && this.__importStar) || function (mod) {
21
- if (mod && mod.__esModule) return mod;
22
- var result = {};
23
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
24
- __setModuleDefault(result, mod);
25
- return result;
26
- };
27
- Object.defineProperty(exports, "__esModule", { value: true });
28
- exports.encodeBase64Url = encodeBase64Url;
29
- exports.decodeBase64Url = decodeBase64Url;
30
3
  /**
31
4
  * Utilities for
32
5
  * {@link https://www.rfc-editor.org/rfc/rfc4648.html#section-5 | base64url}
@@ -34,7 +7,7 @@ exports.decodeBase64Url = decodeBase64Url;
34
7
  *
35
8
  * @module
36
9
  */
37
- const base64 = __importStar(require("./base64.js"));
10
+ import * as base64 from "./base64.js";
38
11
  /**
39
12
  * Some variants allow or require omitting the padding '=' signs:
40
13
  * https://en.wikipedia.org/wiki/Base64#The_URL_applications
@@ -81,7 +54,7 @@ function convertBase64ToBase64url(b64) {
81
54
  * assertEquals(encodeBase64Url("foobar"), "Zm9vYmFy");
82
55
  * ```
83
56
  */
84
- function encodeBase64Url(data) {
57
+ export function encodeBase64Url(data) {
85
58
  return convertBase64ToBase64url(base64.encodeBase64(data));
86
59
  }
87
60
  /**
@@ -103,6 +76,6 @@ function encodeBase64Url(data) {
103
76
  * );
104
77
  * ```
105
78
  */
106
- function decodeBase64Url(b64url) {
79
+ export function decodeBase64Url(b64url) {
107
80
  return base64.decodeBase64(convertBase64urlToBase64(b64url));
108
81
  }
@@ -1,11 +1,7 @@
1
- "use strict";
2
1
  // Copyright 2009 The Go Authors. All rights reserved.
3
2
  // https://github.com/golang/go/blob/master/LICENSE
4
3
  // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
5
4
  // This module is browser compatible.
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.encodeHex = encodeHex;
8
- exports.decodeHex = decodeHex;
9
5
  /**
10
6
  * Port of the Go
11
7
  * {@link https://github.com/golang/go/blob/go1.12.5/src/encoding/hex/hex.go | encoding/hex}
@@ -28,7 +24,7 @@ exports.decodeHex = decodeHex;
28
24
  *
29
25
  * @module
30
26
  */
31
- const _validate_binary_like_js_1 = require("./_validate_binary_like.js");
27
+ import { validateBinaryLike } from "./_validate_binary_like.js";
32
28
  const hexTable = new TextEncoder().encode("0123456789abcdef");
33
29
  const textEncoder = new TextEncoder();
34
30
  const textDecoder = new TextDecoder();
@@ -66,8 +62,8 @@ function fromHexChar(byte) {
66
62
  * assertEquals(encodeHex("abc"), "616263");
67
63
  * ```
68
64
  */
69
- function encodeHex(src) {
70
- const u8 = (0, _validate_binary_like_js_1.validateBinaryLike)(src);
65
+ export function encodeHex(src) {
66
+ const u8 = validateBinaryLike(src);
71
67
  const dst = new Uint8Array(u8.length * 2);
72
68
  for (let i = 0; i < u8.length; i++) {
73
69
  const v = u8[i];
@@ -95,7 +91,7 @@ function encodeHex(src) {
95
91
  * );
96
92
  * ```
97
93
  */
98
- function decodeHex(src) {
94
+ export function decodeHex(src) {
99
95
  const u8 = textEncoder.encode(src);
100
96
  const dst = new Uint8Array(u8.length / 2);
101
97
  for (let i = 0; i < dst.length; i++) {
@@ -0,0 +1,22 @@
1
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
+ /**
3
+ * Utilities for encoding and decoding common formats like hex, base64, and varint.
4
+ *
5
+ * ```ts
6
+ * import { encodeBase64, decodeBase64 } from "@std/encoding";
7
+ * import { assertEquals } from "@std/assert";
8
+ *
9
+ * const foobar = new TextEncoder().encode("foobar");
10
+ * assertEquals(encodeBase64(foobar), "Zm9vYmFy");
11
+ * assertEquals(decodeBase64("Zm9vYmFy"), foobar);
12
+ * ```
13
+ *
14
+ * @module
15
+ */
16
+ export * from "./ascii85.js";
17
+ export * from "./base32.js";
18
+ export * from "./base58.js";
19
+ export * from "./base64.js";
20
+ export * from "./base64url.js";
21
+ export * from "./hex.js";
22
+ export * from "./varint.js";
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
3
2
  // Copyright 2020 Keith Cirkel. All rights reserved. MIT license.
4
3
  // Copyright 2023 Skye "MierenManz". All rights reserved. MIT license.
@@ -25,26 +24,21 @@
25
24
  *
26
25
  * @module
27
26
  */
28
- Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.MaxVarintLen32 = exports.MaxVarintLen64 = exports.MaxUint64 = void 0;
30
- exports.decodeVarint = decodeVarint;
31
- exports.decodeVarint32 = decodeVarint32;
32
- exports.encodeVarint = encodeVarint;
33
27
  // This implementation is a port of https://deno.land/x/varint@v2.0.0 by @keithamus
34
28
  // This module is browser compatible.
35
29
  /**
36
30
  * The maximum value of an unsigned 64-bit integer.
37
31
  * Equivalent to `2n**64n - 1n`
38
32
  */
39
- exports.MaxUint64 = 18446744073709551615n;
33
+ export const MaxUint64 = 18446744073709551615n;
40
34
  /**
41
35
  * The maximum length, in bytes, of a Varint encoded 64-bit integer.
42
36
  */
43
- exports.MaxVarintLen64 = 10;
37
+ export const MaxVarintLen64 = 10;
44
38
  /**
45
39
  * The maximum length, in bytes, of a Varint encoded 32-bit integer.
46
40
  */
47
- exports.MaxVarintLen32 = 5;
41
+ export const MaxVarintLen32 = 5;
48
42
  const MSB = 0x80;
49
43
  const REST = 0x7f;
50
44
  const SHIFT = 7;
@@ -80,7 +74,7 @@ const U64_VIEW = new BigUint64Array(AB);
80
74
  * assertEquals(decodeVarint(buf), [270n, 2]);
81
75
  * ```
82
76
  */
83
- function decodeVarint(buf, offset = 0) {
77
+ export function decodeVarint(buf, offset = 0) {
84
78
  // Clear the last result from the Two's complement view
85
79
  U64_VIEW[0] = 0n;
86
80
  // Setup the initiat state of the function
@@ -157,10 +151,10 @@ function decodeVarint(buf, offset = 0) {
157
151
  * assertEquals(decodeVarint32(buf), [270, 2]);
158
152
  * ```
159
153
  */
160
- function decodeVarint32(buf, offset = 0) {
154
+ export function decodeVarint32(buf, offset = 0) {
161
155
  let shift = 0;
162
156
  let decoded = 0;
163
- for (let i = offset; i <= Math.min(buf.length, offset + exports.MaxVarintLen32); i += 1, shift += SHIFT) {
157
+ for (let i = offset; i <= Math.min(buf.length, offset + MaxVarintLen32); i += 1, shift += SHIFT) {
164
158
  const byte = buf[i];
165
159
  decoded += (byte & REST) * Math.pow(2, shift);
166
160
  if (!(byte & MSB))
@@ -195,11 +189,11 @@ function decodeVarint32(buf, offset = 0) {
195
189
  * assertEquals(encodeVarint(42n, buf), [new Uint8Array([42]), 1]);
196
190
  * ```
197
191
  */
198
- function encodeVarint(num, buf = new Uint8Array(exports.MaxVarintLen64), offset = 0) {
192
+ export function encodeVarint(num, buf = new Uint8Array(MaxVarintLen64), offset = 0) {
199
193
  num = BigInt(num);
200
194
  if (num < 0n)
201
195
  throw new RangeError("signed input given");
202
- for (let i = offset; i <= Math.min(buf.length, exports.MaxVarintLen64); i += 1) {
196
+ for (let i = offset; i <= Math.min(buf.length, MaxVarintLen64); i += 1) {
203
197
  if (num < MSBN) {
204
198
  buf[i] = Number(num);
205
199
  i += 1;
@@ -1,9 +1,6 @@
1
- "use strict";
2
1
  // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
3
2
  // Copyright the Browserify authors. MIT License.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.assertPath = assertPath;
6
- function assertPath(path) {
3
+ export function assertPath(path) {
7
4
  if (typeof path !== "string") {
8
5
  throw new TypeError(`Path must be a string. Received ${JSON.stringify(path)}`);
9
6
  }
@@ -1,12 +1,7 @@
1
- "use strict";
2
1
  // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
3
2
  // This module is browser compatible.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.stripSuffix = stripSuffix;
6
- exports.lastPathSegment = lastPathSegment;
7
- exports.assertArgs = assertArgs;
8
- const assert_path_js_1 = require("./assert_path.js");
9
- function stripSuffix(name, suffix) {
3
+ import { assertPath } from "./assert_path.js";
4
+ export function stripSuffix(name, suffix) {
10
5
  if (suffix.length >= name.length) {
11
6
  return name;
12
7
  }
@@ -18,7 +13,7 @@ function stripSuffix(name, suffix) {
18
13
  }
19
14
  return name.slice(0, -suffix.length);
20
15
  }
21
- function lastPathSegment(path, isSep, start = 0) {
16
+ export function lastPathSegment(path, isSep, start = 0) {
22
17
  let matchedNonSeparator = false;
23
18
  let end = path.length;
24
19
  for (let i = path.length - 1; i >= start; --i) {
@@ -35,8 +30,8 @@ function lastPathSegment(path, isSep, start = 0) {
35
30
  }
36
31
  return path.slice(start, end);
37
32
  }
38
- function assertArgs(path, suffix) {
39
- (0, assert_path_js_1.assertPath)(path);
33
+ export function assertArgs(path, suffix) {
34
+ assertPath(path);
40
35
  if (path.length === 0)
41
36
  return path;
42
37
  if (typeof suffix !== "string") {
@@ -1,9 +1,6 @@
1
- "use strict";
2
1
  // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
3
2
  // This module is browser compatible.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.common = common;
6
- function common(paths, sep) {
3
+ export function common(paths, sep) {
7
4
  const [first = "", ...remaining] = paths;
8
5
  const parts = first.split(sep);
9
6
  let endOfPrefix = parts.length;
@@ -0,0 +1,46 @@
1
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
+ // Copyright the Browserify authors. MIT License.
3
+ // Ported from https://github.com/browserify/path-browserify/
4
+ // This module is browser compatible.
5
+ // Alphabet chars.
6
+ export const CHAR_UPPERCASE_A = 65; /* A */
7
+ export const CHAR_LOWERCASE_A = 97; /* a */
8
+ export const CHAR_UPPERCASE_Z = 90; /* Z */
9
+ export const CHAR_LOWERCASE_Z = 122; /* z */
10
+ // Non-alphabetic chars.
11
+ export const CHAR_DOT = 46; /* . */
12
+ export const CHAR_FORWARD_SLASH = 47; /* / */
13
+ export const CHAR_BACKWARD_SLASH = 92; /* \ */
14
+ export const CHAR_VERTICAL_LINE = 124; /* | */
15
+ export const CHAR_COLON = 58; /* : */
16
+ export const CHAR_QUESTION_MARK = 63; /* ? */
17
+ export const CHAR_UNDERSCORE = 95; /* _ */
18
+ export const CHAR_LINE_FEED = 10; /* \n */
19
+ export const CHAR_CARRIAGE_RETURN = 13; /* \r */
20
+ export const CHAR_TAB = 9; /* \t */
21
+ export const CHAR_FORM_FEED = 12; /* \f */
22
+ export const CHAR_EXCLAMATION_MARK = 33; /* ! */
23
+ export const CHAR_HASH = 35; /* # */
24
+ export const CHAR_SPACE = 32; /* */
25
+ export const CHAR_NO_BREAK_SPACE = 160; /* \u00A0 */
26
+ export const CHAR_ZERO_WIDTH_NOBREAK_SPACE = 65279; /* \uFEFF */
27
+ export const CHAR_LEFT_SQUARE_BRACKET = 91; /* [ */
28
+ export const CHAR_RIGHT_SQUARE_BRACKET = 93; /* ] */
29
+ export const CHAR_LEFT_ANGLE_BRACKET = 60; /* < */
30
+ export const CHAR_RIGHT_ANGLE_BRACKET = 62; /* > */
31
+ export const CHAR_LEFT_CURLY_BRACKET = 123; /* { */
32
+ export const CHAR_RIGHT_CURLY_BRACKET = 125; /* } */
33
+ export const CHAR_HYPHEN_MINUS = 45; /* - */
34
+ export const CHAR_PLUS = 43; /* + */
35
+ export const CHAR_DOUBLE_QUOTE = 34; /* " */
36
+ export const CHAR_SINGLE_QUOTE = 39; /* ' */
37
+ export const CHAR_PERCENT = 37; /* % */
38
+ export const CHAR_SEMICOLON = 59; /* ; */
39
+ export const CHAR_CIRCUMFLEX_ACCENT = 94; /* ^ */
40
+ export const CHAR_GRAVE_ACCENT = 96; /* ` */
41
+ export const CHAR_AT = 64; /* @ */
42
+ export const CHAR_AMPERSAND = 38; /* & */
43
+ export const CHAR_EQUAL = 61; /* = */
44
+ // Digits
45
+ export const CHAR_0 = 48; /* 0 */
46
+ export const CHAR_9 = 57; /* 9 */
@@ -0,0 +1,8 @@
1
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
+ // This module is browser compatible.
3
+ import { assertPath } from "./assert_path.js";
4
+ export function assertArg(path) {
5
+ assertPath(path);
6
+ if (path.length === 0)
7
+ return ".";
8
+ }
@@ -1,10 +1,6 @@
1
- "use strict";
2
1
  // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
3
2
  // This module is browser compatible.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports._format = _format;
6
- exports.assertArg = assertArg;
7
- function _format(sep, pathObject) {
3
+ export function _format(sep, pathObject) {
8
4
  const dir = pathObject.dir || pathObject.root;
9
5
  const base = pathObject.base ||
10
6
  (pathObject.name || "") + (pathObject.ext || "");
@@ -16,7 +12,7 @@ function _format(sep, pathObject) {
16
12
  return dir + base;
17
13
  return dir + sep + base;
18
14
  }
19
- function assertArg(pathObject) {
15
+ export function assertArg(pathObject) {
20
16
  if (pathObject === null || typeof pathObject !== "object") {
21
17
  throw new TypeError(`The "pathObject" argument must be of type Object. Received type ${typeof pathObject}`);
22
18
  }
@@ -1,9 +1,6 @@
1
- "use strict";
2
1
  // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
3
2
  // This module is browser compatible.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.assertArg = assertArg;
6
- function assertArg(url) {
3
+ export function assertArg(url) {
7
4
  url = url instanceof URL ? url : new URL(url);
8
5
  if (url.protocol !== "file:") {
9
6
  throw new TypeError("Must be a file URL.");
@@ -1,8 +1,5 @@
1
- "use strict";
2
1
  // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
3
2
  // This module is browser compatible.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports._globToRegExp = _globToRegExp;
6
3
  const REG_EXP_ESCAPE_CHARS = [
7
4
  "!",
8
5
  "$",
@@ -20,7 +17,7 @@ const REG_EXP_ESCAPE_CHARS = [
20
17
  "|",
21
18
  ];
22
19
  const RANGE_ESCAPE_CHARS = ["-", "\\", "]"];
23
- function _globToRegExp(c, glob, { extended = true, globstar: globstarOption = true,
20
+ export function _globToRegExp(c, glob, { extended = true, globstar: globstarOption = true,
24
21
  // os = osType,
25
22
  caseInsensitive = false, } = {}) {
26
23
  if (glob === "") {
@@ -0,0 +1,8 @@
1
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
+ // This module is browser compatible.
3
+ import { assertPath } from "./assert_path.js";
4
+ export function assertArg(path) {
5
+ assertPath(path);
6
+ if (path.length === 0)
7
+ return ".";
8
+ }
@@ -1,13 +1,10 @@
1
- "use strict";
2
1
  // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
3
2
  // Copyright the Browserify authors. MIT License.
4
3
  // Ported from https://github.com/browserify/path-browserify/
5
4
  // This module is browser compatible.
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.normalizeString = normalizeString;
8
- const constants_js_1 = require("./constants.js");
5
+ import { CHAR_DOT, CHAR_FORWARD_SLASH } from "./constants.js";
9
6
  // Resolves . and .. elements in a path with directory names
10
- function normalizeString(path, allowAboveRoot, separator, isPathSeparator) {
7
+ export function normalizeString(path, allowAboveRoot, separator, isPathSeparator) {
11
8
  let res = "";
12
9
  let lastSegmentLength = 0;
13
10
  let lastSlash = -1;
@@ -19,7 +16,7 @@ function normalizeString(path, allowAboveRoot, separator, isPathSeparator) {
19
16
  else if (isPathSeparator(code))
20
17
  break;
21
18
  else
22
- code = constants_js_1.CHAR_FORWARD_SLASH;
19
+ code = CHAR_FORWARD_SLASH;
23
20
  if (isPathSeparator(code)) {
24
21
  if (lastSlash === i - 1 || dots === 1) {
25
22
  // NOOP
@@ -27,8 +24,8 @@ function normalizeString(path, allowAboveRoot, separator, isPathSeparator) {
27
24
  else if (lastSlash !== i - 1 && dots === 2) {
28
25
  if (res.length < 2 ||
29
26
  lastSegmentLength !== 2 ||
30
- res.charCodeAt(res.length - 1) !== constants_js_1.CHAR_DOT ||
31
- res.charCodeAt(res.length - 2) !== constants_js_1.CHAR_DOT) {
27
+ res.charCodeAt(res.length - 1) !== CHAR_DOT ||
28
+ res.charCodeAt(res.length - 2) !== CHAR_DOT) {
32
29
  if (res.length > 2) {
33
30
  const lastSlashIndex = res.lastIndexOf(separator);
34
31
  if (lastSlashIndex === -1) {
@@ -69,7 +66,7 @@ function normalizeString(path, allowAboveRoot, separator, isPathSeparator) {
69
66
  lastSlash = i;
70
67
  dots = 0;
71
68
  }
72
- else if (code === constants_js_1.CHAR_DOT && dots !== -1) {
69
+ else if (code === CHAR_DOT && dots !== -1) {
73
70
  ++dots;
74
71
  }
75
72
  else {
@@ -0,0 +1,9 @@
1
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
+ // This module is browser compatible.
3
+ import { assertPath } from "./assert_path.js";
4
+ export function assertArgs(from, to) {
5
+ assertPath(from);
6
+ assertPath(to);
7
+ if (from === to)
8
+ return "";
9
+ }
@@ -1,11 +1,8 @@
1
- "use strict";
2
1
  // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
3
2
  // Copyright the Browserify authors. MIT License.
4
3
  // Ported from https://github.com/browserify/path-browserify/
5
4
  // This module is browser compatible.
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.stripTrailingSeparators = stripTrailingSeparators;
8
- function stripTrailingSeparators(segment, isSep) {
5
+ export function stripTrailingSeparators(segment, isSep) {
9
6
  if (segment.length <= 1) {
10
7
  return segment;
11
8
  }
@@ -1,8 +1,5 @@
1
- "use strict";
2
1
  // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
3
2
  // This module is browser compatible.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.encodeWhitespace = encodeWhitespace;
6
3
  const WHITESPACE_ENCODINGS = {
7
4
  "\u0009": "%09",
8
5
  "\u000A": "%0A",
@@ -11,7 +8,7 @@ const WHITESPACE_ENCODINGS = {
11
8
  "\u000D": "%0D",
12
9
  "\u0020": "%20",
13
10
  };
14
- function encodeWhitespace(string) {
11
+ export function encodeWhitespace(string) {
15
12
  return string.replaceAll(/[\s]/g, (c) => {
16
13
  return WHITESPACE_ENCODINGS[c] ?? c;
17
14
  });
@@ -0,0 +1,14 @@
1
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
+ // This module is browser compatible.
3
+ // Keep this up-to-date with Deno.build.os
4
+ /**
5
+ * Operating system type, equivalent to the type of
6
+ * {@linkcode https://deno.land/api?s=Deno.build | Deno.build.os}.
7
+ */
8
+ import * as dntShim from "../../../../../_dnt.shims.js";
9
+ function getOsType() {
10
+ // deno-lint-ignore no-explicit-any
11
+ return dntShim.dntGlobalThis.Deno?.build.os ||
12
+ (navigator.userAgent.includes("Win") ? "windows" : "linux");
13
+ }
14
+ export const isWindows = getOsType() === "windows";
@@ -1,11 +1,8 @@
1
- "use strict";
2
1
  // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
3
2
  // This module is browser compatible.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.basename = basename;
6
- const _os_js_1 = require("./_os.js");
7
- const basename_js_1 = require("./posix/basename.js");
8
- const basename_js_2 = require("./windows/basename.js");
3
+ import { isWindows } from "./_os.js";
4
+ import { basename as posixBasename } from "./posix/basename.js";
5
+ import { basename as windowsBasename } from "./windows/basename.js";
9
6
  /**
10
7
  * Return the last portion of a path.
11
8
  *
@@ -29,8 +26,8 @@ const basename_js_2 = require("./windows/basename.js");
29
26
  *
30
27
  * @returns The basename of the path.
31
28
  */
32
- function basename(path, suffix = "") {
33
- return _os_js_1.isWindows
34
- ? (0, basename_js_2.basename)(path, suffix)
35
- : (0, basename_js_1.basename)(path, suffix);
29
+ export function basename(path, suffix = "") {
30
+ return isWindows
31
+ ? windowsBasename(path, suffix)
32
+ : posixBasename(path, suffix);
36
33
  }
@@ -1,10 +1,7 @@
1
- "use strict";
2
1
  // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
3
2
  // This module is browser compatible.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.common = common;
6
- const common_js_1 = require("./_common/common.js");
7
- const constants_js_1 = require("./constants.js");
3
+ import { common as _common } from "./_common/common.js";
4
+ import { SEPARATOR } from "./constants.js";
8
5
  /**
9
6
  * Determines the common path from a set of paths for the given OS.
10
7
  *
@@ -31,6 +28,6 @@ const constants_js_1 = require("./constants.js");
31
28
  * }
32
29
  * ```
33
30
  */
34
- function common(paths) {
35
- return (0, common_js_1.common)(paths, constants_js_1.SEPARATOR);
31
+ export function common(paths) {
32
+ return _common(paths, SEPARATOR);
36
33
  }
@@ -1,20 +1,17 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SEPARATOR_PATTERN = exports.SEPARATOR = exports.DELIMITER = void 0;
4
1
  // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
5
2
  // This module is browser compatible.
6
- const _os_js_1 = require("./_os.js");
3
+ import { isWindows } from "./_os.js";
7
4
  /**
8
5
  * The character used to separate entries in the PATH environment variable.
9
6
  * On Windows, this is `;`. On all other platforms, this is `:`.
10
7
  */
11
- exports.DELIMITER = _os_js_1.isWindows ? ";" : ":";
8
+ export const DELIMITER = isWindows ? ";" : ":";
12
9
  /**
13
10
  * The character used to separate components of a file path.
14
11
  * On Windows, this is `\`. On all other platforms, this is `/`.
15
12
  */
16
- exports.SEPARATOR = _os_js_1.isWindows ? "\\" : "/";
13
+ export const SEPARATOR = isWindows ? "\\" : "/";
17
14
  /**
18
15
  * A regular expression that matches one or more path separators.
19
16
  */
20
- exports.SEPARATOR_PATTERN = _os_js_1.isWindows ? /[\\/]+/ : /\/+/;
17
+ export const SEPARATOR_PATTERN = isWindows ? /[\\/]+/ : /\/+/;
@@ -1,11 +1,8 @@
1
- "use strict";
2
1
  // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
3
2
  // This module is browser compatible.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.dirname = dirname;
6
- const _os_js_1 = require("./_os.js");
7
- const dirname_js_1 = require("./posix/dirname.js");
8
- const dirname_js_2 = require("./windows/dirname.js");
3
+ import { isWindows } from "./_os.js";
4
+ import { dirname as posixDirname } from "./posix/dirname.js";
5
+ import { dirname as windowsDirname } from "./windows/dirname.js";
9
6
  /**
10
7
  * Return the directory path of a path.
11
8
  *
@@ -24,6 +21,6 @@ const dirname_js_2 = require("./windows/dirname.js");
24
21
  * @param path Path to extract the directory from.
25
22
  * @returns The directory path.
26
23
  */
27
- function dirname(path) {
28
- return _os_js_1.isWindows ? (0, dirname_js_2.dirname)(path) : (0, dirname_js_1.dirname)(path);
24
+ export function dirname(path) {
25
+ return isWindows ? windowsDirname(path) : posixDirname(path);
29
26
  }
@@ -1,11 +1,8 @@
1
- "use strict";
2
1
  // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
3
2
  // This module is browser compatible.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.extname = extname;
6
- const _os_js_1 = require("./_os.js");
7
- const extname_js_1 = require("./posix/extname.js");
8
- const extname_js_2 = require("./windows/extname.js");
3
+ import { isWindows } from "./_os.js";
4
+ import { extname as posixExtname } from "./posix/extname.js";
5
+ import { extname as windowsExtname } from "./windows/extname.js";
9
6
  /**
10
7
  * Return the extension of the path with leading period (".").
11
8
  *
@@ -24,6 +21,6 @@ const extname_js_2 = require("./windows/extname.js");
24
21
  * @param path Path with extension.
25
22
  * @returns The file extension. E.g. returns `.ts` for `file.ts`.
26
23
  */
27
- function extname(path) {
28
- return _os_js_1.isWindows ? (0, extname_js_2.extname)(path) : (0, extname_js_1.extname)(path);
24
+ export function extname(path) {
25
+ return isWindows ? windowsExtname(path) : posixExtname(path);
29
26
  }
@@ -1,11 +1,8 @@
1
- "use strict";
2
1
  // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
3
2
  // This module is browser compatible.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.format = format;
6
- const _os_js_1 = require("./_os.js");
7
- const format_js_1 = require("./posix/format.js");
8
- const format_js_2 = require("./windows/format.js");
3
+ import { isWindows } from "./_os.js";
4
+ import { format as posixFormat } from "./posix/format.js";
5
+ import { format as windowsFormat } from "./windows/format.js";
9
6
  /**
10
7
  * Generate a path from a {@linkcode ParsedPath} object. It does the
11
8
  * opposite of {@linkcode https://jsr.io/@std/path/doc/~/parse | parse()}.
@@ -25,6 +22,6 @@ const format_js_2 = require("./windows/format.js");
25
22
  * @param pathObject Object with path components.
26
23
  * @returns The formatted path.
27
24
  */
28
- function format(pathObject) {
29
- return _os_js_1.isWindows ? (0, format_js_2.format)(pathObject) : (0, format_js_1.format)(pathObject);
25
+ export function format(pathObject) {
26
+ return isWindows ? windowsFormat(pathObject) : posixFormat(pathObject);
30
27
  }
@@ -1,11 +1,8 @@
1
- "use strict";
2
1
  // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
3
2
  // This module is browser compatible.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.fromFileUrl = fromFileUrl;
6
- const _os_js_1 = require("./_os.js");
7
- const from_file_url_js_1 = require("./posix/from_file_url.js");
8
- const from_file_url_js_2 = require("./windows/from_file_url.js");
3
+ import { isWindows } from "./_os.js";
4
+ import { fromFileUrl as posixFromFileUrl } from "./posix/from_file_url.js";
5
+ import { fromFileUrl as windowsFromFileUrl } from "./windows/from_file_url.js";
9
6
  /**
10
7
  * Converts a file URL to a path string.
11
8
  *
@@ -26,6 +23,6 @@ const from_file_url_js_2 = require("./windows/from_file_url.js");
26
23
  * @param url The file URL to convert to a path.
27
24
  * @returns The path string.
28
25
  */
29
- function fromFileUrl(url) {
30
- return _os_js_1.isWindows ? (0, from_file_url_js_2.fromFileUrl)(url) : (0, from_file_url_js_1.fromFileUrl)(url);
26
+ export function fromFileUrl(url) {
27
+ return isWindows ? windowsFromFileUrl(url) : posixFromFileUrl(url);
31
28
  }