@skmtc/core 0.0.223 → 0.0.224

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 (329) 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 +31 -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 +8 -8
  246. package/script/context/types.js +0 -2
  247. package/script/deps/jsr.io/@std/encoding/1.0.1/mod.js +0 -38
  248. package/script/deps/jsr.io/@std/path/1.0.0/_common/constants.js +0 -49
  249. package/script/deps/jsr.io/@std/path/1.0.0/_common/dirname.js +0 -11
  250. package/script/deps/jsr.io/@std/path/1.0.0/_common/normalize.js +0 -11
  251. package/script/deps/jsr.io/@std/path/1.0.0/_common/relative.js +0 -12
  252. package/script/deps/jsr.io/@std/path/1.0.0/_os.js +0 -40
  253. package/script/deps/jsr.io/@std/path/1.0.0/mod.js +0 -70
  254. package/script/deps/jsr.io/@std/path/1.0.0/posix/_util.js +0 -11
  255. package/script/deps/jsr.io/@std/path/1.0.0/posix/resolve.js +0 -85
  256. package/script/deps/jsr.io/@std/path/1.0.0/windows/_util.js +0 -20
  257. package/script/deps/jsr.io/@std/yaml/0.215.0/_type/mod.js +0 -39
  258. package/script/deps/jsr.io/@std/yaml/0.215.0/schema/default.js +0 -18
  259. package/script/deps/jsr.io/@std/yaml/0.215.0/schema/mod.js +0 -18
  260. package/script/dsl/ModelCreator.js +0 -2
  261. package/script/dsl/OperationCreator.js +0 -2
  262. package/script/dsl/Stringable.js +0 -2
  263. package/script/dsl/constants.js +0 -4
  264. package/script/generate/generate.js +0 -75
  265. package/script/generate/generateModels.js +0 -56
  266. package/script/generate/generateOperations.js +0 -62
  267. package/script/helpers/naming.js +0 -33
  268. package/script/helpers/refFns.js +0 -30
  269. package/script/helpers/strings.js +0 -11
  270. package/script/mod.js +0 -77
  271. package/script/oas/array/array-types.js +0 -20
  272. package/script/oas/array/toArray.js +0 -24
  273. package/script/oas/boolean/boolean-types.js +0 -11
  274. package/script/oas/boolean/toBoolean.js +0 -14
  275. package/script/oas/components/toComponentsV3.js +0 -48
  276. package/script/oas/contact/contact-types.js +0 -10
  277. package/script/oas/discriminator/discriminator-types.js +0 -9
  278. package/script/oas/discriminator/toDiscriminatorV3.js +0 -15
  279. package/script/oas/document/toDocumentV3.js +0 -28
  280. package/script/oas/example/example-types.js +0 -12
  281. package/script/oas/example/toExamplesV3.js +0 -51
  282. package/script/oas/header/toHeadersV3.js +0 -46
  283. package/script/oas/integer/integer-types.js +0 -21
  284. package/script/oas/integer/toInteger.js +0 -17
  285. package/script/oas/intersection/intersection-types.js +0 -15
  286. package/script/oas/intersection/toIntersection.js +0 -26
  287. package/script/oas/license/license-types.js +0 -10
  288. package/script/oas/markdown/markdown-types.js +0 -5
  289. package/script/oas/mediaType/mediaType-types.js +0 -15
  290. package/script/oas/mediaType/toMediaTypeItemV3.js +0 -43
  291. package/script/oas/null/null-types.js +0 -11
  292. package/script/oas/number/number-types.js +0 -17
  293. package/script/oas/number/toNumber.js +0 -14
  294. package/script/oas/object/object-types.js +0 -30
  295. package/script/oas/object/toAdditionalPropertiesV3.js +0 -18
  296. package/script/oas/object/toObject.js +0 -27
  297. package/script/oas/parameter/parameter-types.js +0 -41
  298. package/script/oas/pathItem/toPathItemV3.js +0 -19
  299. package/script/oas/ref/ref-types.js +0 -57
  300. package/script/oas/ref/toRefV31.js +0 -15
  301. package/script/oas/requestBody/toRequestBodiesV3.js +0 -51
  302. package/script/oas/response/toResponseV3.js +0 -41
  303. package/script/oas/schema/Schema.js +0 -2
  304. package/script/oas/schema/schema-types.js +0 -26
  305. package/script/oas/schema/toSchemasV3.js +0 -67
  306. package/script/oas/string/string-types.js +0 -32
  307. package/script/oas/string/toString.js +0 -15
  308. package/script/oas/tag/toTagsV3.js +0 -18
  309. package/script/oas/union/toUnion.js +0 -26
  310. package/script/oas/union/union-types.js +0 -15
  311. package/script/oas/unknown/toUnknown.js +0 -13
  312. package/script/oas/unknown/unknown-types.js +0 -11
  313. package/script/package.json +0 -3
  314. package/script/parse/parse.js +0 -20
  315. package/script/types/Brand.js +0 -2
  316. package/script/types/GeneratedValue.js +0 -2
  317. package/script/types/GeneratorKeys.js +0 -19
  318. package/script/types/Method.js +0 -34
  319. package/script/types/Modifiers.js +0 -2
  320. package/script/types/RefName.js +0 -2
  321. package/script/types/Settings.js +0 -45
  322. package/script/types/TypeSystem.js +0 -2
  323. package/script/types/prettierConfig.js +0 -49
  324. package/script/typescript/identifiers.js +0 -12
  325. package/script/typescript/keyValues.js +0 -15
  326. package/script/typescript/toOperationResponse.js +0 -21
  327. package/script/typescript/toParamsObject.js +0 -16
  328. package/script/typescript/toPathTemplate.js +0 -7
  329. package/script/typescript/withDescription.js +0 -7
@@ -1,12 +1,9 @@
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.parse = parse;
6
- const constants_js_1 = require("../_common/constants.js");
7
- const strip_trailing_separators_js_1 = require("../_common/strip_trailing_separators.js");
8
- const assert_path_js_1 = require("../_common/assert_path.js");
9
- const _util_js_1 = require("./_util.js");
3
+ import { CHAR_DOT } from "../_common/constants.js";
4
+ import { stripTrailingSeparators } from "../_common/strip_trailing_separators.js";
5
+ import { assertPath } from "../_common/assert_path.js";
6
+ import { isPosixPathSeparator } from "./_util.js";
10
7
  /**
11
8
  * Return a `ParsedPath` object of the `path`.
12
9
  *
@@ -28,12 +25,12 @@ const _util_js_1 = require("./_util.js");
28
25
  * @param path The path to parse.
29
26
  * @returns The parsed path object.
30
27
  */
31
- function parse(path) {
32
- (0, assert_path_js_1.assertPath)(path);
28
+ export function parse(path) {
29
+ assertPath(path);
33
30
  const ret = { root: "", dir: "", base: "", ext: "", name: "" };
34
31
  if (path.length === 0)
35
32
  return ret;
36
- const isAbsolute = (0, _util_js_1.isPosixPathSeparator)(path.charCodeAt(0));
33
+ const isAbsolute = isPosixPathSeparator(path.charCodeAt(0));
37
34
  let start;
38
35
  if (isAbsolute) {
39
36
  ret.root = "/";
@@ -53,7 +50,7 @@ function parse(path) {
53
50
  // Get non-dir info
54
51
  for (; i >= start; --i) {
55
52
  const code = path.charCodeAt(i);
56
- if ((0, _util_js_1.isPosixPathSeparator)(code)) {
53
+ if (isPosixPathSeparator(code)) {
57
54
  // If we reached a path separator that was not part of a set of path
58
55
  // separators at the end of the string, stop now
59
56
  if (!matchedSlash) {
@@ -68,7 +65,7 @@ function parse(path) {
68
65
  matchedSlash = false;
69
66
  end = i + 1;
70
67
  }
71
- if (code === constants_js_1.CHAR_DOT) {
68
+ if (code === CHAR_DOT) {
72
69
  // If this is our first dot, mark it as the start of our extension
73
70
  if (startDot === -1)
74
71
  startDot = i;
@@ -110,7 +107,7 @@ function parse(path) {
110
107
  ret.ext = path.slice(startDot, end);
111
108
  }
112
109
  if (startPart > 0) {
113
- ret.dir = (0, strip_trailing_separators_js_1.stripTrailingSeparators)(path.slice(0, startPart - 1), _util_js_1.isPosixPathSeparator);
110
+ ret.dir = stripTrailingSeparators(path.slice(0, startPart - 1), isPosixPathSeparator);
114
111
  }
115
112
  else if (isAbsolute)
116
113
  ret.dir = "/";
@@ -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.relative = relative;
6
- const _util_js_1 = require("./_util.js");
7
- const resolve_js_1 = require("./resolve.js");
8
- const relative_js_1 = require("../_common/relative.js");
3
+ import { isPosixPathSeparator } from "./_util.js";
4
+ import { resolve } from "./resolve.js";
5
+ import { assertArgs } from "../_common/relative.js";
9
6
  /**
10
7
  * Return the relative path from `from` to `to` based on current working directory.
11
8
  *
@@ -24,17 +21,17 @@ const relative_js_1 = require("../_common/relative.js");
24
21
  * @param to The path to reach.
25
22
  * @returns The relative path.
26
23
  */
27
- function relative(from, to) {
28
- (0, relative_js_1.assertArgs)(from, to);
29
- from = (0, resolve_js_1.resolve)(from);
30
- to = (0, resolve_js_1.resolve)(to);
24
+ export function relative(from, to) {
25
+ assertArgs(from, to);
26
+ from = resolve(from);
27
+ to = resolve(to);
31
28
  if (from === to)
32
29
  return "";
33
30
  // Trim any leading backslashes
34
31
  let fromStart = 1;
35
32
  const fromEnd = from.length;
36
33
  for (; fromStart < fromEnd; ++fromStart) {
37
- if (!(0, _util_js_1.isPosixPathSeparator)(from.charCodeAt(fromStart)))
34
+ if (!isPosixPathSeparator(from.charCodeAt(fromStart)))
38
35
  break;
39
36
  }
40
37
  const fromLen = fromEnd - fromStart;
@@ -42,7 +39,7 @@ function relative(from, to) {
42
39
  let toStart = 1;
43
40
  const toEnd = to.length;
44
41
  for (; toStart < toEnd; ++toStart) {
45
- if (!(0, _util_js_1.isPosixPathSeparator)(to.charCodeAt(toStart)))
42
+ if (!isPosixPathSeparator(to.charCodeAt(toStart)))
46
43
  break;
47
44
  }
48
45
  const toLen = toEnd - toStart;
@@ -53,7 +50,7 @@ function relative(from, to) {
53
50
  for (; i <= length; ++i) {
54
51
  if (i === length) {
55
52
  if (toLen > length) {
56
- if ((0, _util_js_1.isPosixPathSeparator)(to.charCodeAt(toStart + i))) {
53
+ if (isPosixPathSeparator(to.charCodeAt(toStart + i))) {
57
54
  // We get here if `from` is the exact base path for `to`.
58
55
  // For example: from='/foo/bar'; to='/foo/bar/baz'
59
56
  return to.slice(toStart + i + 1);
@@ -65,7 +62,7 @@ function relative(from, to) {
65
62
  }
66
63
  }
67
64
  else if (fromLen > length) {
68
- if ((0, _util_js_1.isPosixPathSeparator)(from.charCodeAt(fromStart + i))) {
65
+ if (isPosixPathSeparator(from.charCodeAt(fromStart + i))) {
69
66
  // We get here if `to` is the exact base path for `from`.
70
67
  // For example: from='/foo/bar/baz'; to='/foo/bar'
71
68
  lastCommonSep = i;
@@ -82,14 +79,14 @@ function relative(from, to) {
82
79
  const toCode = to.charCodeAt(toStart + i);
83
80
  if (fromCode !== toCode)
84
81
  break;
85
- else if ((0, _util_js_1.isPosixPathSeparator)(fromCode))
82
+ else if (isPosixPathSeparator(fromCode))
86
83
  lastCommonSep = i;
87
84
  }
88
85
  let out = "";
89
86
  // Generate the relative path based on the path difference between `to`
90
87
  // and `from`
91
88
  for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) {
92
- if (i === fromEnd || (0, _util_js_1.isPosixPathSeparator)(from.charCodeAt(i))) {
89
+ if (i === fromEnd || isPosixPathSeparator(from.charCodeAt(i))) {
93
90
  if (out.length === 0)
94
91
  out += "..";
95
92
  else
@@ -102,7 +99,7 @@ function relative(from, to) {
102
99
  return out + to.slice(toStart + lastCommonSep);
103
100
  else {
104
101
  toStart += lastCommonSep;
105
- if ((0, _util_js_1.isPosixPathSeparator)(to.charCodeAt(toStart)))
102
+ if (isPosixPathSeparator(to.charCodeAt(toStart)))
106
103
  ++toStart;
107
104
  return to.slice(toStart);
108
105
  }
@@ -0,0 +1,59 @@
1
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
+ // This module is browser compatible.
3
+ import * as dntShim from "../../../../../../_dnt.shims.js";
4
+ import { normalizeString } from "../_common/normalize_string.js";
5
+ import { assertPath } from "../_common/assert_path.js";
6
+ import { isPosixPathSeparator } from "./_util.js";
7
+ /**
8
+ * Resolves path segments into a `path`.
9
+ *
10
+ * @example Usage
11
+ * ```ts
12
+ * import { resolve } from "@std/path/posix/resolve";
13
+ * import { assertEquals } from "@std/assert";
14
+ *
15
+ * const path = resolve("/foo", "bar", "baz/asdf", "quux", "..");
16
+ * assertEquals(path, "/foo/bar/baz/asdf");
17
+ * ```
18
+ *
19
+ * @param pathSegments The path segments to resolve.
20
+ * @returns The resolved path.
21
+ */
22
+ export function resolve(...pathSegments) {
23
+ let resolvedPath = "";
24
+ let resolvedAbsolute = false;
25
+ for (let i = pathSegments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
26
+ let path;
27
+ if (i >= 0)
28
+ path = pathSegments[i];
29
+ else {
30
+ // deno-lint-ignore no-explicit-any
31
+ const { Deno } = dntShim.dntGlobalThis;
32
+ if (typeof Deno?.cwd !== "function") {
33
+ throw new TypeError("Resolved a relative path without a CWD.");
34
+ }
35
+ path = Deno.cwd();
36
+ }
37
+ assertPath(path);
38
+ // Skip empty entries
39
+ if (path.length === 0) {
40
+ continue;
41
+ }
42
+ resolvedPath = `${path}/${resolvedPath}`;
43
+ resolvedAbsolute = isPosixPathSeparator(path.charCodeAt(0));
44
+ }
45
+ // At this point the path should be resolved to a full absolute path, but
46
+ // handle relative paths to be safe (might happen when Deno.cwd() fails)
47
+ // Normalize the path
48
+ resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute, "/", isPosixPathSeparator);
49
+ if (resolvedAbsolute) {
50
+ if (resolvedPath.length > 0)
51
+ return `/${resolvedPath}`;
52
+ else
53
+ return "/";
54
+ }
55
+ else if (resolvedPath.length > 0)
56
+ return resolvedPath;
57
+ else
58
+ return ".";
59
+ }
@@ -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.toFileUrl = toFileUrl;
6
- const to_file_url_js_1 = require("../_common/to_file_url.js");
7
- const is_absolute_js_1 = require("./is_absolute.js");
3
+ import { encodeWhitespace } from "../_common/to_file_url.js";
4
+ import { isAbsolute } from "./is_absolute.js";
8
5
  /**
9
6
  * Converts a path string to a file URL.
10
7
  *
@@ -20,11 +17,11 @@ const is_absolute_js_1 = require("./is_absolute.js");
20
17
  * @param path The path to convert.
21
18
  * @returns The file URL.
22
19
  */
23
- function toFileUrl(path) {
24
- if (!(0, is_absolute_js_1.isAbsolute)(path)) {
20
+ export function toFileUrl(path) {
21
+ if (!isAbsolute(path)) {
25
22
  throw new TypeError("Must be an absolute path.");
26
23
  }
27
24
  const url = new URL("file:///");
28
- url.pathname = (0, to_file_url_js_1.encodeWhitespace)(path.replace(/%/g, "%25").replace(/\\/g, "%5C"));
25
+ url.pathname = encodeWhitespace(path.replace(/%/g, "%25").replace(/\\/g, "%5C"));
29
26
  return url;
30
27
  }
@@ -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.toNamespacedPath = toNamespacedPath;
6
3
  /**
7
4
  * Converts a path to a namespaced path. This function returns the path as is on posix.
8
5
  *
@@ -17,7 +14,7 @@ exports.toNamespacedPath = toNamespacedPath;
17
14
  * @param path The path.
18
15
  * @returns The namespaced path.
19
16
  */
20
- function toNamespacedPath(path) {
17
+ export function toNamespacedPath(path) {
21
18
  // Non-op on posix systems
22
19
  return path;
23
20
  }
@@ -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.relative = relative;
6
- const _os_js_1 = require("./_os.js");
7
- const relative_js_1 = require("./posix/relative.js");
8
- const relative_js_2 = require("./windows/relative.js");
3
+ import { isWindows } from "./_os.js";
4
+ import { relative as posixRelative } from "./posix/relative.js";
5
+ import { relative as windowsRelative } from "./windows/relative.js";
9
6
  /**
10
7
  * Return the relative path from `from` to `to` based on current working
11
8
  * directory.
@@ -28,6 +25,6 @@ const relative_js_2 = require("./windows/relative.js");
28
25
  * @param to Path in current working directory.
29
26
  * @returns The relative path from `from` to `to`.
30
27
  */
31
- function relative(from, to) {
32
- return _os_js_1.isWindows ? (0, relative_js_2.relative)(from, to) : (0, relative_js_1.relative)(from, to);
28
+ export function relative(from, to) {
29
+ return isWindows ? windowsRelative(from, to) : posixRelative(from, to);
33
30
  }
@@ -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.resolve = resolve;
6
- const _os_js_1 = require("./_os.js");
7
- const resolve_js_1 = require("./posix/resolve.js");
8
- const resolve_js_2 = require("./windows/resolve.js");
3
+ import { isWindows } from "./_os.js";
4
+ import { resolve as posixResolve } from "./posix/resolve.js";
5
+ import { resolve as windowsResolve } from "./windows/resolve.js";
9
6
  /**
10
7
  * Resolves path segments into a path.
11
8
  *
@@ -26,8 +23,8 @@ const resolve_js_2 = require("./windows/resolve.js");
26
23
  * @param pathSegments Path segments to process to path.
27
24
  * @returns The resolved path.
28
25
  */
29
- function resolve(...pathSegments) {
30
- return _os_js_1.isWindows
31
- ? (0, resolve_js_2.resolve)(...pathSegments)
32
- : (0, resolve_js_1.resolve)(...pathSegments);
26
+ export function resolve(...pathSegments) {
27
+ return isWindows
28
+ ? windowsResolve(...pathSegments)
29
+ : posixResolve(...pathSegments);
33
30
  }
@@ -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.toFileUrl = toFileUrl;
6
- const _os_js_1 = require("./_os.js");
7
- const to_file_url_js_1 = require("./posix/to_file_url.js");
8
- const to_file_url_js_2 = require("./windows/to_file_url.js");
3
+ import { isWindows } from "./_os.js";
4
+ import { toFileUrl as posixToFileUrl } from "./posix/to_file_url.js";
5
+ import { toFileUrl as windowsToFileUrl } from "./windows/to_file_url.js";
9
6
  /**
10
7
  * Converts a path string to a file URL.
11
8
  *
@@ -26,6 +23,6 @@ const to_file_url_js_2 = require("./windows/to_file_url.js");
26
23
  * @param path Path to convert to file URL.
27
24
  * @returns The file URL equivalent to the path.
28
25
  */
29
- function toFileUrl(path) {
30
- return _os_js_1.isWindows ? (0, to_file_url_js_2.toFileUrl)(path) : (0, to_file_url_js_1.toFileUrl)(path);
26
+ export function toFileUrl(path) {
27
+ return isWindows ? windowsToFileUrl(path) : posixToFileUrl(path);
31
28
  }
@@ -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.toNamespacedPath = toNamespacedPath;
6
- const _os_js_1 = require("./_os.js");
7
- const to_namespaced_path_js_1 = require("./posix/to_namespaced_path.js");
8
- const to_namespaced_path_js_2 = require("./windows/to_namespaced_path.js");
3
+ import { isWindows } from "./_os.js";
4
+ import { toNamespacedPath as posixToNamespacedPath } from "./posix/to_namespaced_path.js";
5
+ import { toNamespacedPath as windowsToNamespacedPath } from "./windows/to_namespaced_path.js";
9
6
  /**
10
7
  * Resolves path to a namespace path. This is a no-op on
11
8
  * non-windows systems.
@@ -25,8 +22,8 @@ const to_namespaced_path_js_2 = require("./windows/to_namespaced_path.js");
25
22
  * @param path Path to resolve to namespace.
26
23
  * @returns The resolved namespace path.
27
24
  */
28
- function toNamespacedPath(path) {
29
- return _os_js_1.isWindows
30
- ? (0, to_namespaced_path_js_2.toNamespacedPath)(path)
31
- : (0, to_namespaced_path_js_1.toNamespacedPath)(path);
25
+ export function toNamespacedPath(path) {
26
+ return isWindows
27
+ ? windowsToNamespacedPath(path)
28
+ : posixToNamespacedPath(path);
32
29
  }
@@ -1,4 +1,3 @@
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 });
3
+ export {};
@@ -0,0 +1,15 @@
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
+ import { CHAR_BACKWARD_SLASH, CHAR_FORWARD_SLASH, CHAR_LOWERCASE_A, CHAR_LOWERCASE_Z, CHAR_UPPERCASE_A, CHAR_UPPERCASE_Z, } from "../_common/constants.js";
6
+ export function isPosixPathSeparator(code) {
7
+ return code === CHAR_FORWARD_SLASH;
8
+ }
9
+ export function isPathSeparator(code) {
10
+ return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
11
+ }
12
+ export function isWindowsDeviceRoot(code) {
13
+ return ((code >= CHAR_LOWERCASE_A && code <= CHAR_LOWERCASE_Z) ||
14
+ (code >= CHAR_UPPERCASE_A && code <= CHAR_UPPERCASE_Z));
15
+ }
@@ -1,12 +1,9 @@
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 basename_js_1 = require("../_common/basename.js");
7
- const constants_js_1 = require("../_common/constants.js");
8
- const strip_trailing_separators_js_1 = require("../_common/strip_trailing_separators.js");
9
- const _util_js_1 = require("./_util.js");
3
+ import { assertArgs, lastPathSegment, stripSuffix, } from "../_common/basename.js";
4
+ import { CHAR_COLON } from "../_common/constants.js";
5
+ import { stripTrailingSeparators } from "../_common/strip_trailing_separators.js";
6
+ import { isPathSeparator, isWindowsDeviceRoot } from "./_util.js";
10
7
  /**
11
8
  * Return the last portion of a `path`.
12
9
  * Trailing directory separators are ignored, and optional suffix is removed.
@@ -25,20 +22,20 @@ const _util_js_1 = require("./_util.js");
25
22
  * @param suffix The suffix to remove from extracted name.
26
23
  * @returns The extracted name.
27
24
  */
28
- function basename(path, suffix = "") {
29
- (0, basename_js_1.assertArgs)(path, suffix);
25
+ export function basename(path, suffix = "") {
26
+ assertArgs(path, suffix);
30
27
  // Check for a drive letter prefix so as not to mistake the following
31
28
  // path separator as an extra separator at the end of the path that can be
32
29
  // disregarded
33
30
  let start = 0;
34
31
  if (path.length >= 2) {
35
32
  const drive = path.charCodeAt(0);
36
- if ((0, _util_js_1.isWindowsDeviceRoot)(drive)) {
37
- if (path.charCodeAt(1) === constants_js_1.CHAR_COLON)
33
+ if (isWindowsDeviceRoot(drive)) {
34
+ if (path.charCodeAt(1) === CHAR_COLON)
38
35
  start = 2;
39
36
  }
40
37
  }
41
- const lastSegment = (0, basename_js_1.lastPathSegment)(path, _util_js_1.isPathSeparator, start);
42
- const strippedSegment = (0, strip_trailing_separators_js_1.stripTrailingSeparators)(lastSegment, _util_js_1.isPathSeparator);
43
- return suffix ? (0, basename_js_1.stripSuffix)(strippedSegment, suffix) : strippedSegment;
38
+ const lastSegment = lastPathSegment(path, isPathSeparator, start);
39
+ const strippedSegment = stripTrailingSeparators(lastSegment, isPathSeparator);
40
+ return suffix ? stripSuffix(strippedSegment, suffix) : strippedSegment;
44
41
  }
@@ -1,17 +1,14 @@
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.SEPARATOR_PATTERN = exports.SEPARATOR = exports.DELIMITER = void 0;
6
3
  /**
7
4
  * The character used to separate entries in the PATH environment variable.
8
5
  */
9
- exports.DELIMITER = ";";
6
+ export const DELIMITER = ";";
10
7
  /**
11
8
  * The character used to separate components of a file path.
12
9
  */
13
- exports.SEPARATOR = "\\";
10
+ export const SEPARATOR = "\\";
14
11
  /**
15
12
  * A regular expression that matches one or more path separators.
16
13
  */
17
- exports.SEPARATOR_PATTERN = /[\\/]+/;
14
+ export const SEPARATOR_PATTERN = /[\\/]+/;
@@ -1,12 +1,9 @@
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 dirname_js_1 = require("../_common/dirname.js");
7
- const constants_js_1 = require("../_common/constants.js");
8
- const strip_trailing_separators_js_1 = require("../_common/strip_trailing_separators.js");
9
- const _util_js_1 = require("./_util.js");
3
+ import { assertArg } from "../_common/dirname.js";
4
+ import { CHAR_COLON } from "../_common/constants.js";
5
+ import { stripTrailingSeparators } from "../_common/strip_trailing_separators.js";
6
+ import { isPathSeparator, isPosixPathSeparator, isWindowsDeviceRoot, } from "./_util.js";
10
7
  /**
11
8
  * Return the directory path of a `path`.
12
9
  *
@@ -22,8 +19,8 @@ const _util_js_1 = require("./_util.js");
22
19
  * @param path The path to get the directory from.
23
20
  * @returns The directory path.
24
21
  */
25
- function dirname(path) {
26
- (0, dirname_js_1.assertArg)(path);
22
+ export function dirname(path) {
23
+ assertArg(path);
27
24
  const len = path.length;
28
25
  let rootEnd = -1;
29
26
  let end = -1;
@@ -32,16 +29,16 @@ function dirname(path) {
32
29
  const code = path.charCodeAt(0);
33
30
  // Try to match a root
34
31
  if (len > 1) {
35
- if ((0, _util_js_1.isPathSeparator)(code)) {
32
+ if (isPathSeparator(code)) {
36
33
  // Possible UNC root
37
34
  rootEnd = offset = 1;
38
- if ((0, _util_js_1.isPathSeparator)(path.charCodeAt(1))) {
35
+ if (isPathSeparator(path.charCodeAt(1))) {
39
36
  // Matched double path separator at beginning
40
37
  let j = 2;
41
38
  let last = j;
42
39
  // Match 1 or more non-path separators
43
40
  for (; j < len; ++j) {
44
- if ((0, _util_js_1.isPathSeparator)(path.charCodeAt(j)))
41
+ if (isPathSeparator(path.charCodeAt(j)))
45
42
  break;
46
43
  }
47
44
  if (j < len && j !== last) {
@@ -49,7 +46,7 @@ function dirname(path) {
49
46
  last = j;
50
47
  // Match 1 or more path separators
51
48
  for (; j < len; ++j) {
52
- if (!(0, _util_js_1.isPathSeparator)(path.charCodeAt(j)))
49
+ if (!isPathSeparator(path.charCodeAt(j)))
53
50
  break;
54
51
  }
55
52
  if (j < len && j !== last) {
@@ -57,7 +54,7 @@ function dirname(path) {
57
54
  last = j;
58
55
  // Match 1 or more non-path separators
59
56
  for (; j < len; ++j) {
60
- if ((0, _util_js_1.isPathSeparator)(path.charCodeAt(j)))
57
+ if (isPathSeparator(path.charCodeAt(j)))
61
58
  break;
62
59
  }
63
60
  if (j === len) {
@@ -74,24 +71,24 @@ function dirname(path) {
74
71
  }
75
72
  }
76
73
  }
77
- else if ((0, _util_js_1.isWindowsDeviceRoot)(code)) {
74
+ else if (isWindowsDeviceRoot(code)) {
78
75
  // Possible device root
79
- if (path.charCodeAt(1) === constants_js_1.CHAR_COLON) {
76
+ if (path.charCodeAt(1) === CHAR_COLON) {
80
77
  rootEnd = offset = 2;
81
78
  if (len > 2) {
82
- if ((0, _util_js_1.isPathSeparator)(path.charCodeAt(2)))
79
+ if (isPathSeparator(path.charCodeAt(2)))
83
80
  rootEnd = offset = 3;
84
81
  }
85
82
  }
86
83
  }
87
84
  }
88
- else if ((0, _util_js_1.isPathSeparator)(code)) {
85
+ else if (isPathSeparator(code)) {
89
86
  // `path` contains just a path separator, exit early to avoid
90
87
  // unnecessary work
91
88
  return path;
92
89
  }
93
90
  for (let i = len - 1; i >= offset; --i) {
94
- if ((0, _util_js_1.isPathSeparator)(path.charCodeAt(i))) {
91
+ if (isPathSeparator(path.charCodeAt(i))) {
95
92
  if (!matchedSlash) {
96
93
  end = i;
97
94
  break;
@@ -108,5 +105,5 @@ function dirname(path) {
108
105
  else
109
106
  end = rootEnd;
110
107
  }
111
- return (0, strip_trailing_separators_js_1.stripTrailingSeparators)(path.slice(0, end), _util_js_1.isPosixPathSeparator);
108
+ return stripTrailingSeparators(path.slice(0, end), isPosixPathSeparator);
112
109
  }
@@ -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 constants_js_1 = require("../_common/constants.js");
7
- const assert_path_js_1 = require("../_common/assert_path.js");
8
- const _util_js_1 = require("./_util.js");
3
+ import { CHAR_COLON, CHAR_DOT } from "../_common/constants.js";
4
+ import { assertPath } from "../_common/assert_path.js";
5
+ import { isPathSeparator, isWindowsDeviceRoot } from "./_util.js";
9
6
  /**
10
7
  * Return the extension of the `path` with leading period.
11
8
  *
@@ -21,8 +18,8 @@ const _util_js_1 = require("./_util.js");
21
18
  * @param path The path to get the extension from.
22
19
  * @returns The extension of the `path`.
23
20
  */
24
- function extname(path) {
25
- (0, assert_path_js_1.assertPath)(path);
21
+ export function extname(path) {
22
+ assertPath(path);
26
23
  let start = 0;
27
24
  let startDot = -1;
28
25
  let startPart = 0;
@@ -35,13 +32,13 @@ function extname(path) {
35
32
  // path separator as an extra separator at the end of the path that can be
36
33
  // disregarded
37
34
  if (path.length >= 2 &&
38
- path.charCodeAt(1) === constants_js_1.CHAR_COLON &&
39
- (0, _util_js_1.isWindowsDeviceRoot)(path.charCodeAt(0))) {
35
+ path.charCodeAt(1) === CHAR_COLON &&
36
+ isWindowsDeviceRoot(path.charCodeAt(0))) {
40
37
  start = startPart = 2;
41
38
  }
42
39
  for (let i = path.length - 1; i >= start; --i) {
43
40
  const code = path.charCodeAt(i);
44
- if ((0, _util_js_1.isPathSeparator)(code)) {
41
+ if (isPathSeparator(code)) {
45
42
  // If we reached a path separator that was not part of a set of path
46
43
  // separators at the end of the string, stop now
47
44
  if (!matchedSlash) {
@@ -56,7 +53,7 @@ function extname(path) {
56
53
  matchedSlash = false;
57
54
  end = i + 1;
58
55
  }
59
- if (code === constants_js_1.CHAR_DOT) {
56
+ if (code === CHAR_DOT) {
60
57
  // If this is our first dot, mark it as the start of our extension
61
58
  if (startDot === -1)
62
59
  startDot = i;
@@ -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.format = format;
6
- const format_js_1 = require("../_common/format.js");
3
+ import { _format, assertArg } from "../_common/format.js";
7
4
  /**
8
5
  * Generate a path from `ParsedPath` object.
9
6
  *
@@ -25,7 +22,7 @@ const format_js_1 = require("../_common/format.js");
25
22
  * @param pathObject The path object to format.
26
23
  * @returns The formatted path.
27
24
  */
28
- function format(pathObject) {
29
- (0, format_js_1.assertArg)(pathObject);
30
- return (0, format_js_1._format)("\\", pathObject);
25
+ export function format(pathObject) {
26
+ assertArg(pathObject);
27
+ return _format("\\", pathObject);
31
28
  }