@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,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.fromFileUrl = fromFileUrl;
6
- const from_file_url_js_1 = require("../_common/from_file_url.js");
3
+ import { assertArg } from "../_common/from_file_url.js";
7
4
  /**
8
5
  * Converts a file URL to a path string.
9
6
  *
@@ -20,8 +17,8 @@ const from_file_url_js_1 = require("../_common/from_file_url.js");
20
17
  * @param url The file URL to convert.
21
18
  * @returns The path string.
22
19
  */
23
- function fromFileUrl(url) {
24
- url = (0, from_file_url_js_1.assertArg)(url);
20
+ export function fromFileUrl(url) {
21
+ url = assertArg(url);
25
22
  let path = decodeURIComponent(url.pathname.replace(/\//g, "\\").replace(/%(?![0-9A-Fa-f]{2})/g, "%25")).replace(/^\\*([A-Za-z]:)(\\|$)/, "$1\\");
26
23
  if (url.hostname !== "") {
27
24
  // Note: The `URL` implementation guarantees that the drive letter and
@@ -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.globToRegExp = globToRegExp;
6
- const glob_to_reg_exp_js_1 = require("../_common/glob_to_reg_exp.js");
3
+ import { _globToRegExp, } from "../_common/glob_to_reg_exp.js";
7
4
  const constants = {
8
5
  sep: "(?:\\\\|/)+",
9
6
  sepMaybe: "(?:\\\\|/)*",
@@ -80,6 +77,6 @@ const constants = {
80
77
  * @param options Conversion options.
81
78
  * @returns The regular expression equivalent to the glob.
82
79
  */
83
- function globToRegExp(glob, options = {}) {
84
- return (0, glob_to_reg_exp_js_1._globToRegExp)(constants, glob, options);
80
+ export function globToRegExp(glob, options = {}) {
81
+ return _globToRegExp(constants, glob, options);
85
82
  }
@@ -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.isAbsolute = isAbsolute;
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 } from "../_common/constants.js";
4
+ import { assertPath } from "../_common/assert_path.js";
5
+ import { isPathSeparator, isWindowsDeviceRoot } from "./_util.js";
9
6
  /**
10
7
  * Verifies whether provided path is absolute.
11
8
  *
@@ -21,19 +18,19 @@ const _util_js_1 = require("./_util.js");
21
18
  * @param path The path to verify.
22
19
  * @returns `true` if the path is absolute, `false` otherwise.
23
20
  */
24
- function isAbsolute(path) {
25
- (0, assert_path_js_1.assertPath)(path);
21
+ export function isAbsolute(path) {
22
+ assertPath(path);
26
23
  const len = path.length;
27
24
  if (len === 0)
28
25
  return false;
29
26
  const code = path.charCodeAt(0);
30
- if ((0, _util_js_1.isPathSeparator)(code)) {
27
+ if (isPathSeparator(code)) {
31
28
  return true;
32
29
  }
33
- else if ((0, _util_js_1.isWindowsDeviceRoot)(code)) {
30
+ else if (isWindowsDeviceRoot(code)) {
34
31
  // Possible device root
35
- if (len > 2 && path.charCodeAt(1) === constants_js_1.CHAR_COLON) {
36
- if ((0, _util_js_1.isPathSeparator)(path.charCodeAt(2)))
32
+ if (len > 2 && path.charCodeAt(1) === CHAR_COLON) {
33
+ if (isPathSeparator(path.charCodeAt(2)))
37
34
  return true;
38
35
  }
39
36
  }
@@ -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.join = join;
6
- const assert_path_js_1 = require("../_common/assert_path.js");
7
- const _util_js_1 = require("./_util.js");
8
- const normalize_js_1 = require("./normalize.js");
3
+ import { assertPath } from "../_common/assert_path.js";
4
+ import { isPathSeparator } from "./_util.js";
5
+ import { normalize } from "./normalize.js";
9
6
  /**
10
7
  * Join all given a sequence of `paths`,then normalizes the resulting path.
11
8
  *
@@ -21,8 +18,8 @@ const normalize_js_1 = require("./normalize.js");
21
18
  * @param paths The paths to join.
22
19
  * @returns The joined path.
23
20
  */
24
- function join(...paths) {
25
- paths.forEach((path) => (0, assert_path_js_1.assertPath)(path));
21
+ export function join(...paths) {
22
+ paths.forEach((path) => assertPath(path));
26
23
  paths = paths.filter((path) => path.length > 0);
27
24
  if (paths.length === 0)
28
25
  return ".";
@@ -42,14 +39,14 @@ function join(...paths) {
42
39
  let needsReplace = true;
43
40
  let slashCount = 0;
44
41
  const firstPart = paths[0];
45
- if ((0, _util_js_1.isPathSeparator)(firstPart.charCodeAt(0))) {
42
+ if (isPathSeparator(firstPart.charCodeAt(0))) {
46
43
  ++slashCount;
47
44
  const firstLen = firstPart.length;
48
45
  if (firstLen > 1) {
49
- if ((0, _util_js_1.isPathSeparator)(firstPart.charCodeAt(1))) {
46
+ if (isPathSeparator(firstPart.charCodeAt(1))) {
50
47
  ++slashCount;
51
48
  if (firstLen > 2) {
52
- if ((0, _util_js_1.isPathSeparator)(firstPart.charCodeAt(2)))
49
+ if (isPathSeparator(firstPart.charCodeAt(2)))
53
50
  ++slashCount;
54
51
  else {
55
52
  // We matched a UNC path in the first part
@@ -63,12 +60,12 @@ function join(...paths) {
63
60
  if (needsReplace) {
64
61
  // Find any more consecutive slashes we need to replace
65
62
  for (; slashCount < joined.length; ++slashCount) {
66
- if (!(0, _util_js_1.isPathSeparator)(joined.charCodeAt(slashCount)))
63
+ if (!isPathSeparator(joined.charCodeAt(slashCount)))
67
64
  break;
68
65
  }
69
66
  // Replace the slashes if needed
70
67
  if (slashCount >= 2)
71
68
  joined = `\\${joined.slice(slashCount)}`;
72
69
  }
73
- return (0, normalize_js_1.normalize)(joined);
70
+ return normalize(joined);
74
71
  }
@@ -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.joinGlobs = joinGlobs;
6
- const join_js_1 = require("./join.js");
7
- const constants_js_1 = require("./constants.js");
8
- const normalize_glob_js_1 = require("./normalize_glob.js");
3
+ import { join } from "./join.js";
4
+ import { SEPARATOR } from "./constants.js";
5
+ import { normalizeGlob } from "./normalize_glob.js";
9
6
  /**
10
7
  * Like join(), but doesn't collapse "**\/.." when `globstar` is true.
11
8
  *
@@ -23,9 +20,9 @@ const normalize_glob_js_1 = require("./normalize_glob.js");
23
20
  * @param options The options for glob pattern.
24
21
  * @returns The joined glob pattern.
25
22
  */
26
- function joinGlobs(globs, { extended = true, globstar = false } = {}) {
23
+ export function joinGlobs(globs, { extended = true, globstar = false } = {}) {
27
24
  if (!globstar || globs.length === 0) {
28
- return (0, join_js_1.join)(...globs);
25
+ return join(...globs);
29
26
  }
30
27
  let joined;
31
28
  for (const glob of globs) {
@@ -34,10 +31,10 @@ function joinGlobs(globs, { extended = true, globstar = false } = {}) {
34
31
  if (!joined)
35
32
  joined = path;
36
33
  else
37
- joined += `${constants_js_1.SEPARATOR}${path}`;
34
+ joined += `${SEPARATOR}${path}`;
38
35
  }
39
36
  }
40
37
  if (!joined)
41
38
  return ".";
42
- return (0, normalize_glob_js_1.normalizeGlob)(joined, { extended, globstar });
39
+ return normalizeGlob(joined, { extended, globstar });
43
40
  }
@@ -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.normalize = normalize;
6
- const normalize_js_1 = require("../_common/normalize.js");
7
- const constants_js_1 = require("../_common/constants.js");
8
- const normalize_string_js_1 = require("../_common/normalize_string.js");
9
- const _util_js_1 = require("./_util.js");
3
+ import { assertArg } from "../_common/normalize.js";
4
+ import { CHAR_COLON } from "../_common/constants.js";
5
+ import { normalizeString } from "../_common/normalize_string.js";
6
+ import { isPathSeparator, isWindowsDeviceRoot } from "./_util.js";
10
7
  /**
11
8
  * Normalize the `path`, resolving `'..'` and `'.'` segments.
12
9
  * Note that resolving these segments does not necessarily mean that all will be eliminated.
@@ -24,8 +21,8 @@ const _util_js_1 = require("./_util.js");
24
21
  * @param path The path to normalize
25
22
  * @returns The normalized path
26
23
  */
27
- function normalize(path) {
28
- (0, normalize_js_1.assertArg)(path);
24
+ export function normalize(path) {
25
+ assertArg(path);
29
26
  const len = path.length;
30
27
  let rootEnd = 0;
31
28
  let device;
@@ -33,18 +30,18 @@ function normalize(path) {
33
30
  const code = path.charCodeAt(0);
34
31
  // Try to match a root
35
32
  if (len > 1) {
36
- if ((0, _util_js_1.isPathSeparator)(code)) {
33
+ if (isPathSeparator(code)) {
37
34
  // Possible UNC root
38
35
  // If we started with a separator, we know we at least have an absolute
39
36
  // path of some kind (UNC or otherwise)
40
37
  isAbsolute = true;
41
- if ((0, _util_js_1.isPathSeparator)(path.charCodeAt(1))) {
38
+ if (isPathSeparator(path.charCodeAt(1))) {
42
39
  // Matched double path separator at beginning
43
40
  let j = 2;
44
41
  let last = j;
45
42
  // Match 1 or more non-path separators
46
43
  for (; j < len; ++j) {
47
- if ((0, _util_js_1.isPathSeparator)(path.charCodeAt(j)))
44
+ if (isPathSeparator(path.charCodeAt(j)))
48
45
  break;
49
46
  }
50
47
  if (j < len && j !== last) {
@@ -53,7 +50,7 @@ function normalize(path) {
53
50
  last = j;
54
51
  // Match 1 or more path separators
55
52
  for (; j < len; ++j) {
56
- if (!(0, _util_js_1.isPathSeparator)(path.charCodeAt(j)))
53
+ if (!isPathSeparator(path.charCodeAt(j)))
57
54
  break;
58
55
  }
59
56
  if (j < len && j !== last) {
@@ -61,7 +58,7 @@ function normalize(path) {
61
58
  last = j;
62
59
  // Match 1 or more non-path separators
63
60
  for (; j < len; ++j) {
64
- if ((0, _util_js_1.isPathSeparator)(path.charCodeAt(j)))
61
+ if (isPathSeparator(path.charCodeAt(j)))
65
62
  break;
66
63
  }
67
64
  if (j === len) {
@@ -82,13 +79,13 @@ function normalize(path) {
82
79
  rootEnd = 1;
83
80
  }
84
81
  }
85
- else if ((0, _util_js_1.isWindowsDeviceRoot)(code)) {
82
+ else if (isWindowsDeviceRoot(code)) {
86
83
  // Possible device root
87
- if (path.charCodeAt(1) === constants_js_1.CHAR_COLON) {
84
+ if (path.charCodeAt(1) === CHAR_COLON) {
88
85
  device = path.slice(0, 2);
89
86
  rootEnd = 2;
90
87
  if (len > 2) {
91
- if ((0, _util_js_1.isPathSeparator)(path.charCodeAt(2))) {
88
+ if (isPathSeparator(path.charCodeAt(2))) {
92
89
  // Treat separator following drive name as an absolute path
93
90
  // indicator
94
91
  isAbsolute = true;
@@ -98,21 +95,21 @@ function normalize(path) {
98
95
  }
99
96
  }
100
97
  }
101
- else if ((0, _util_js_1.isPathSeparator)(code)) {
98
+ else if (isPathSeparator(code)) {
102
99
  // `path` contains just a path separator, exit early to avoid unnecessary
103
100
  // work
104
101
  return "\\";
105
102
  }
106
103
  let tail;
107
104
  if (rootEnd < len) {
108
- tail = (0, normalize_string_js_1.normalizeString)(path.slice(rootEnd), !isAbsolute, "\\", _util_js_1.isPathSeparator);
105
+ tail = normalizeString(path.slice(rootEnd), !isAbsolute, "\\", isPathSeparator);
109
106
  }
110
107
  else {
111
108
  tail = "";
112
109
  }
113
110
  if (tail.length === 0 && !isAbsolute)
114
111
  tail = ".";
115
- if (tail.length > 0 && (0, _util_js_1.isPathSeparator)(path.charCodeAt(len - 1))) {
112
+ if (tail.length > 0 && isPathSeparator(path.charCodeAt(len - 1))) {
116
113
  tail += "\\";
117
114
  }
118
115
  if (device === undefined) {
@@ -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.normalizeGlob = normalizeGlob;
6
- const normalize_js_1 = require("./normalize.js");
7
- const constants_js_1 = require("./constants.js");
3
+ import { normalize } from "./normalize.js";
4
+ import { SEPARATOR_PATTERN } from "./constants.js";
8
5
  /**
9
6
  * Like normalize(), but doesn't collapse "**\/.." when `globstar` is true.
10
7
  *
@@ -21,14 +18,14 @@ const constants_js_1 = require("./constants.js");
21
18
  * @param options The options for glob pattern.
22
19
  * @returns The normalized glob pattern.
23
20
  */
24
- function normalizeGlob(glob, { globstar = false } = {}) {
21
+ export function normalizeGlob(glob, { globstar = false } = {}) {
25
22
  if (glob.match(/\0/g)) {
26
23
  throw new Error(`Glob contains invalid characters: "${glob}"`);
27
24
  }
28
25
  if (!globstar) {
29
- return (0, normalize_js_1.normalize)(glob);
26
+ return normalize(glob);
30
27
  }
31
- const s = constants_js_1.SEPARATOR_PATTERN.source;
28
+ const s = SEPARATOR_PATTERN.source;
32
29
  const badParentPattern = new RegExp(`(?<=(${s}|^)\\*\\*${s})\\.\\.(?=${s}|$)`, "g");
33
- return (0, normalize_js_1.normalize)(glob.replace(badParentPattern, "\0")).replace(/\0/g, "..");
30
+ return normalize(glob.replace(badParentPattern, "\0")).replace(/\0/g, "..");
34
31
  }
@@ -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.parse = parse;
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 a `ParsedPath` object of the `path`.
11
8
  *
@@ -27,8 +24,8 @@ const _util_js_1 = require("./_util.js");
27
24
  * @param path The path to parse.
28
25
  * @returns The `ParsedPath` object.
29
26
  */
30
- function parse(path) {
31
- (0, assert_path_js_1.assertPath)(path);
27
+ export function parse(path) {
28
+ assertPath(path);
32
29
  const ret = { root: "", dir: "", base: "", ext: "", name: "" };
33
30
  const len = path.length;
34
31
  if (len === 0)
@@ -37,16 +34,16 @@ function parse(path) {
37
34
  let code = path.charCodeAt(0);
38
35
  // Try to match a root
39
36
  if (len > 1) {
40
- if ((0, _util_js_1.isPathSeparator)(code)) {
37
+ if (isPathSeparator(code)) {
41
38
  // Possible UNC root
42
39
  rootEnd = 1;
43
- if ((0, _util_js_1.isPathSeparator)(path.charCodeAt(1))) {
40
+ if (isPathSeparator(path.charCodeAt(1))) {
44
41
  // Matched double path separator at beginning
45
42
  let j = 2;
46
43
  let last = j;
47
44
  // Match 1 or more non-path separators
48
45
  for (; j < len; ++j) {
49
- if ((0, _util_js_1.isPathSeparator)(path.charCodeAt(j)))
46
+ if (isPathSeparator(path.charCodeAt(j)))
50
47
  break;
51
48
  }
52
49
  if (j < len && j !== last) {
@@ -54,7 +51,7 @@ function parse(path) {
54
51
  last = j;
55
52
  // Match 1 or more path separators
56
53
  for (; j < len; ++j) {
57
- if (!(0, _util_js_1.isPathSeparator)(path.charCodeAt(j)))
54
+ if (!isPathSeparator(path.charCodeAt(j)))
58
55
  break;
59
56
  }
60
57
  if (j < len && j !== last) {
@@ -62,7 +59,7 @@ function parse(path) {
62
59
  last = j;
63
60
  // Match 1 or more non-path separators
64
61
  for (; j < len; ++j) {
65
- if ((0, _util_js_1.isPathSeparator)(path.charCodeAt(j)))
62
+ if (isPathSeparator(path.charCodeAt(j)))
66
63
  break;
67
64
  }
68
65
  if (j === len) {
@@ -77,12 +74,12 @@ function parse(path) {
77
74
  }
78
75
  }
79
76
  }
80
- else if ((0, _util_js_1.isWindowsDeviceRoot)(code)) {
77
+ else if (isWindowsDeviceRoot(code)) {
81
78
  // Possible device root
82
- if (path.charCodeAt(1) === constants_js_1.CHAR_COLON) {
79
+ if (path.charCodeAt(1) === CHAR_COLON) {
83
80
  rootEnd = 2;
84
81
  if (len > 2) {
85
- if ((0, _util_js_1.isPathSeparator)(path.charCodeAt(2))) {
82
+ if (isPathSeparator(path.charCodeAt(2))) {
86
83
  if (len === 3) {
87
84
  // `path` contains just a drive root, exit early to avoid
88
85
  // unnecessary work
@@ -102,7 +99,7 @@ function parse(path) {
102
99
  }
103
100
  }
104
101
  }
105
- else if ((0, _util_js_1.isPathSeparator)(code)) {
102
+ else if (isPathSeparator(code)) {
106
103
  // `path` contains just a path separator, exit early to avoid
107
104
  // unnecessary work
108
105
  ret.root = ret.dir = path;
@@ -122,7 +119,7 @@ function parse(path) {
122
119
  // Get non-dir info
123
120
  for (; i >= rootEnd; --i) {
124
121
  code = path.charCodeAt(i);
125
- if ((0, _util_js_1.isPathSeparator)(code)) {
122
+ if (isPathSeparator(code)) {
126
123
  // If we reached a path separator that was not part of a set of path
127
124
  // separators at the end of the string, stop now
128
125
  if (!matchedSlash) {
@@ -137,7 +134,7 @@ function parse(path) {
137
134
  matchedSlash = false;
138
135
  end = i + 1;
139
136
  }
140
- if (code === constants_js_1.CHAR_DOT) {
137
+ if (code === CHAR_DOT) {
141
138
  // If this is our first dot, mark it as the start of our extension
142
139
  if (startDot === -1)
143
140
  startDot = i;
@@ -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 constants_js_1 = require("../_common/constants.js");
7
- const resolve_js_1 = require("./resolve.js");
8
- const relative_js_1 = require("../_common/relative.js");
3
+ import { CHAR_BACKWARD_SLASH } from "../_common/constants.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
  *
@@ -27,10 +24,10 @@ const relative_js_1 = require("../_common/relative.js");
27
24
  * @param to The path to which to calculate the relative path
28
25
  * @returns The relative path from `from` to `to`
29
26
  */
30
- function relative(from, to) {
31
- (0, relative_js_1.assertArgs)(from, to);
32
- const fromOrig = (0, resolve_js_1.resolve)(from);
33
- const toOrig = (0, resolve_js_1.resolve)(to);
27
+ export function relative(from, to) {
28
+ assertArgs(from, to);
29
+ const fromOrig = resolve(from);
30
+ const toOrig = resolve(to);
34
31
  if (fromOrig === toOrig)
35
32
  return "";
36
33
  from = fromOrig.toLowerCase();
@@ -41,12 +38,12 @@ function relative(from, to) {
41
38
  let fromStart = 0;
42
39
  let fromEnd = from.length;
43
40
  for (; fromStart < fromEnd; ++fromStart) {
44
- if (from.charCodeAt(fromStart) !== constants_js_1.CHAR_BACKWARD_SLASH)
41
+ if (from.charCodeAt(fromStart) !== CHAR_BACKWARD_SLASH)
45
42
  break;
46
43
  }
47
44
  // Trim trailing backslashes (applicable to UNC paths only)
48
45
  for (; fromEnd - 1 > fromStart; --fromEnd) {
49
- if (from.charCodeAt(fromEnd - 1) !== constants_js_1.CHAR_BACKWARD_SLASH)
46
+ if (from.charCodeAt(fromEnd - 1) !== CHAR_BACKWARD_SLASH)
50
47
  break;
51
48
  }
52
49
  const fromLen = fromEnd - fromStart;
@@ -54,12 +51,12 @@ function relative(from, to) {
54
51
  let toStart = 0;
55
52
  let toEnd = to.length;
56
53
  for (; toStart < toEnd; ++toStart) {
57
- if (to.charCodeAt(toStart) !== constants_js_1.CHAR_BACKWARD_SLASH)
54
+ if (to.charCodeAt(toStart) !== CHAR_BACKWARD_SLASH)
58
55
  break;
59
56
  }
60
57
  // Trim trailing backslashes (applicable to UNC paths only)
61
58
  for (; toEnd - 1 > toStart; --toEnd) {
62
- if (to.charCodeAt(toEnd - 1) !== constants_js_1.CHAR_BACKWARD_SLASH)
59
+ if (to.charCodeAt(toEnd - 1) !== CHAR_BACKWARD_SLASH)
63
60
  break;
64
61
  }
65
62
  const toLen = toEnd - toStart;
@@ -70,7 +67,7 @@ function relative(from, to) {
70
67
  for (; i <= length; ++i) {
71
68
  if (i === length) {
72
69
  if (toLen > length) {
73
- if (to.charCodeAt(toStart + i) === constants_js_1.CHAR_BACKWARD_SLASH) {
70
+ if (to.charCodeAt(toStart + i) === CHAR_BACKWARD_SLASH) {
74
71
  // We get here if `from` is the exact base path for `to`.
75
72
  // For example: from='C:\\foo\\bar'; to='C:\\foo\\bar\\baz'
76
73
  return toOrig.slice(toStart + i + 1);
@@ -82,7 +79,7 @@ function relative(from, to) {
82
79
  }
83
80
  }
84
81
  if (fromLen > length) {
85
- if (from.charCodeAt(fromStart + i) === constants_js_1.CHAR_BACKWARD_SLASH) {
82
+ if (from.charCodeAt(fromStart + i) === CHAR_BACKWARD_SLASH) {
86
83
  // We get here if `to` is the exact base path for `from`.
87
84
  // For example: from='C:\\foo\\bar'; to='C:\\foo'
88
85
  lastCommonSep = i;
@@ -99,7 +96,7 @@ function relative(from, to) {
99
96
  const toCode = to.charCodeAt(toStart + i);
100
97
  if (fromCode !== toCode)
101
98
  break;
102
- else if (fromCode === constants_js_1.CHAR_BACKWARD_SLASH)
99
+ else if (fromCode === CHAR_BACKWARD_SLASH)
103
100
  lastCommonSep = i;
104
101
  }
105
102
  // We found a mismatch before the first common path separator was seen, so
@@ -113,7 +110,7 @@ function relative(from, to) {
113
110
  // Generate the relative path based on the path difference between `to` and
114
111
  // `from`
115
112
  for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) {
116
- if (i === fromEnd || from.charCodeAt(i) === constants_js_1.CHAR_BACKWARD_SLASH) {
113
+ if (i === fromEnd || from.charCodeAt(i) === CHAR_BACKWARD_SLASH) {
117
114
  if (out.length === 0)
118
115
  out += "..";
119
116
  else
@@ -127,7 +124,7 @@ function relative(from, to) {
127
124
  }
128
125
  else {
129
126
  toStart += lastCommonSep;
130
- if (toOrig.charCodeAt(toStart) === constants_js_1.CHAR_BACKWARD_SLASH)
127
+ if (toOrig.charCodeAt(toStart) === CHAR_BACKWARD_SLASH)
131
128
  ++toStart;
132
129
  return toOrig.slice(toStart, toEnd);
133
130
  }