@dropthis/cli 0.1.5

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 (236) hide show
  1. package/README.md +171 -0
  2. package/dist/cli.cjs +1489 -0
  3. package/dist/cli.cjs.map +1 -0
  4. package/node_modules/@dropthis/node/README.md +90 -0
  5. package/node_modules/@dropthis/node/dist/index.cjs +1010 -0
  6. package/node_modules/@dropthis/node/dist/index.cjs.map +1 -0
  7. package/node_modules/@dropthis/node/dist/index.d.cts +408 -0
  8. package/node_modules/@dropthis/node/dist/index.d.ts +408 -0
  9. package/node_modules/@dropthis/node/dist/index.mjs +969 -0
  10. package/node_modules/@dropthis/node/dist/index.mjs.map +1 -0
  11. package/node_modules/@dropthis/node/package.json +55 -0
  12. package/node_modules/@nodelib/fs.scandir/LICENSE +21 -0
  13. package/node_modules/@nodelib/fs.scandir/README.md +171 -0
  14. package/node_modules/@nodelib/fs.scandir/out/adapters/fs.d.ts +20 -0
  15. package/node_modules/@nodelib/fs.scandir/out/adapters/fs.js +19 -0
  16. package/node_modules/@nodelib/fs.scandir/out/constants.d.ts +4 -0
  17. package/node_modules/@nodelib/fs.scandir/out/constants.js +17 -0
  18. package/node_modules/@nodelib/fs.scandir/out/index.d.ts +12 -0
  19. package/node_modules/@nodelib/fs.scandir/out/index.js +26 -0
  20. package/node_modules/@nodelib/fs.scandir/out/providers/async.d.ts +7 -0
  21. package/node_modules/@nodelib/fs.scandir/out/providers/async.js +104 -0
  22. package/node_modules/@nodelib/fs.scandir/out/providers/common.d.ts +1 -0
  23. package/node_modules/@nodelib/fs.scandir/out/providers/common.js +13 -0
  24. package/node_modules/@nodelib/fs.scandir/out/providers/sync.d.ts +5 -0
  25. package/node_modules/@nodelib/fs.scandir/out/providers/sync.js +54 -0
  26. package/node_modules/@nodelib/fs.scandir/out/settings.d.ts +20 -0
  27. package/node_modules/@nodelib/fs.scandir/out/settings.js +24 -0
  28. package/node_modules/@nodelib/fs.scandir/out/types/index.d.ts +20 -0
  29. package/node_modules/@nodelib/fs.scandir/out/types/index.js +2 -0
  30. package/node_modules/@nodelib/fs.scandir/out/utils/fs.d.ts +2 -0
  31. package/node_modules/@nodelib/fs.scandir/out/utils/fs.js +19 -0
  32. package/node_modules/@nodelib/fs.scandir/out/utils/index.d.ts +2 -0
  33. package/node_modules/@nodelib/fs.scandir/out/utils/index.js +5 -0
  34. package/node_modules/@nodelib/fs.scandir/package.json +44 -0
  35. package/node_modules/@nodelib/fs.stat/LICENSE +21 -0
  36. package/node_modules/@nodelib/fs.stat/README.md +126 -0
  37. package/node_modules/@nodelib/fs.stat/out/adapters/fs.d.ts +13 -0
  38. package/node_modules/@nodelib/fs.stat/out/adapters/fs.js +17 -0
  39. package/node_modules/@nodelib/fs.stat/out/index.d.ts +12 -0
  40. package/node_modules/@nodelib/fs.stat/out/index.js +26 -0
  41. package/node_modules/@nodelib/fs.stat/out/providers/async.d.ts +4 -0
  42. package/node_modules/@nodelib/fs.stat/out/providers/async.js +36 -0
  43. package/node_modules/@nodelib/fs.stat/out/providers/sync.d.ts +3 -0
  44. package/node_modules/@nodelib/fs.stat/out/providers/sync.js +23 -0
  45. package/node_modules/@nodelib/fs.stat/out/settings.d.ts +16 -0
  46. package/node_modules/@nodelib/fs.stat/out/settings.js +16 -0
  47. package/node_modules/@nodelib/fs.stat/out/types/index.d.ts +4 -0
  48. package/node_modules/@nodelib/fs.stat/out/types/index.js +2 -0
  49. package/node_modules/@nodelib/fs.stat/package.json +37 -0
  50. package/node_modules/@nodelib/fs.walk/LICENSE +21 -0
  51. package/node_modules/@nodelib/fs.walk/README.md +215 -0
  52. package/node_modules/@nodelib/fs.walk/out/index.d.ts +14 -0
  53. package/node_modules/@nodelib/fs.walk/out/index.js +34 -0
  54. package/node_modules/@nodelib/fs.walk/out/providers/async.d.ts +12 -0
  55. package/node_modules/@nodelib/fs.walk/out/providers/async.js +30 -0
  56. package/node_modules/@nodelib/fs.walk/out/providers/index.d.ts +4 -0
  57. package/node_modules/@nodelib/fs.walk/out/providers/index.js +9 -0
  58. package/node_modules/@nodelib/fs.walk/out/providers/stream.d.ts +12 -0
  59. package/node_modules/@nodelib/fs.walk/out/providers/stream.js +34 -0
  60. package/node_modules/@nodelib/fs.walk/out/providers/sync.d.ts +10 -0
  61. package/node_modules/@nodelib/fs.walk/out/providers/sync.js +14 -0
  62. package/node_modules/@nodelib/fs.walk/out/readers/async.d.ts +30 -0
  63. package/node_modules/@nodelib/fs.walk/out/readers/async.js +97 -0
  64. package/node_modules/@nodelib/fs.walk/out/readers/common.d.ts +7 -0
  65. package/node_modules/@nodelib/fs.walk/out/readers/common.js +31 -0
  66. package/node_modules/@nodelib/fs.walk/out/readers/reader.d.ts +6 -0
  67. package/node_modules/@nodelib/fs.walk/out/readers/reader.js +11 -0
  68. package/node_modules/@nodelib/fs.walk/out/readers/sync.d.ts +15 -0
  69. package/node_modules/@nodelib/fs.walk/out/readers/sync.js +59 -0
  70. package/node_modules/@nodelib/fs.walk/out/settings.d.ts +30 -0
  71. package/node_modules/@nodelib/fs.walk/out/settings.js +26 -0
  72. package/node_modules/@nodelib/fs.walk/out/types/index.d.ts +8 -0
  73. package/node_modules/@nodelib/fs.walk/out/types/index.js +2 -0
  74. package/node_modules/@nodelib/fs.walk/package.json +44 -0
  75. package/node_modules/braces/LICENSE +21 -0
  76. package/node_modules/braces/README.md +586 -0
  77. package/node_modules/braces/index.js +170 -0
  78. package/node_modules/braces/lib/compile.js +60 -0
  79. package/node_modules/braces/lib/constants.js +57 -0
  80. package/node_modules/braces/lib/expand.js +113 -0
  81. package/node_modules/braces/lib/parse.js +331 -0
  82. package/node_modules/braces/lib/stringify.js +32 -0
  83. package/node_modules/braces/lib/utils.js +122 -0
  84. package/node_modules/braces/package.json +77 -0
  85. package/node_modules/fast-glob/LICENSE +21 -0
  86. package/node_modules/fast-glob/README.md +830 -0
  87. package/node_modules/fast-glob/out/index.d.ts +40 -0
  88. package/node_modules/fast-glob/out/index.js +102 -0
  89. package/node_modules/fast-glob/out/managers/tasks.d.ts +22 -0
  90. package/node_modules/fast-glob/out/managers/tasks.js +110 -0
  91. package/node_modules/fast-glob/out/providers/async.d.ts +9 -0
  92. package/node_modules/fast-glob/out/providers/async.js +23 -0
  93. package/node_modules/fast-glob/out/providers/filters/deep.d.ts +16 -0
  94. package/node_modules/fast-glob/out/providers/filters/deep.js +62 -0
  95. package/node_modules/fast-glob/out/providers/filters/entry.d.ts +17 -0
  96. package/node_modules/fast-glob/out/providers/filters/entry.js +85 -0
  97. package/node_modules/fast-glob/out/providers/filters/error.d.ts +8 -0
  98. package/node_modules/fast-glob/out/providers/filters/error.js +15 -0
  99. package/node_modules/fast-glob/out/providers/matchers/matcher.d.ts +33 -0
  100. package/node_modules/fast-glob/out/providers/matchers/matcher.js +45 -0
  101. package/node_modules/fast-glob/out/providers/matchers/partial.d.ts +4 -0
  102. package/node_modules/fast-glob/out/providers/matchers/partial.js +38 -0
  103. package/node_modules/fast-glob/out/providers/provider.d.ts +19 -0
  104. package/node_modules/fast-glob/out/providers/provider.js +48 -0
  105. package/node_modules/fast-glob/out/providers/stream.d.ts +11 -0
  106. package/node_modules/fast-glob/out/providers/stream.js +31 -0
  107. package/node_modules/fast-glob/out/providers/sync.d.ts +9 -0
  108. package/node_modules/fast-glob/out/providers/sync.js +23 -0
  109. package/node_modules/fast-glob/out/providers/transformers/entry.d.ts +8 -0
  110. package/node_modules/fast-glob/out/providers/transformers/entry.js +26 -0
  111. package/node_modules/fast-glob/out/readers/async.d.ts +10 -0
  112. package/node_modules/fast-glob/out/readers/async.js +35 -0
  113. package/node_modules/fast-glob/out/readers/reader.d.ts +15 -0
  114. package/node_modules/fast-glob/out/readers/reader.js +33 -0
  115. package/node_modules/fast-glob/out/readers/stream.d.ts +14 -0
  116. package/node_modules/fast-glob/out/readers/stream.js +55 -0
  117. package/node_modules/fast-glob/out/readers/sync.d.ts +12 -0
  118. package/node_modules/fast-glob/out/readers/sync.js +43 -0
  119. package/node_modules/fast-glob/out/settings.d.ts +164 -0
  120. package/node_modules/fast-glob/out/settings.js +59 -0
  121. package/node_modules/fast-glob/out/types/index.d.ts +31 -0
  122. package/node_modules/fast-glob/out/types/index.js +2 -0
  123. package/node_modules/fast-glob/out/utils/array.d.ts +2 -0
  124. package/node_modules/fast-glob/out/utils/array.js +22 -0
  125. package/node_modules/fast-glob/out/utils/errno.d.ts +2 -0
  126. package/node_modules/fast-glob/out/utils/errno.js +7 -0
  127. package/node_modules/fast-glob/out/utils/fs.d.ts +4 -0
  128. package/node_modules/fast-glob/out/utils/fs.js +19 -0
  129. package/node_modules/fast-glob/out/utils/index.d.ts +8 -0
  130. package/node_modules/fast-glob/out/utils/index.js +17 -0
  131. package/node_modules/fast-glob/out/utils/path.d.ts +13 -0
  132. package/node_modules/fast-glob/out/utils/path.js +68 -0
  133. package/node_modules/fast-glob/out/utils/pattern.d.ts +49 -0
  134. package/node_modules/fast-glob/out/utils/pattern.js +206 -0
  135. package/node_modules/fast-glob/out/utils/stream.d.ts +4 -0
  136. package/node_modules/fast-glob/out/utils/stream.js +17 -0
  137. package/node_modules/fast-glob/out/utils/string.d.ts +2 -0
  138. package/node_modules/fast-glob/out/utils/string.js +11 -0
  139. package/node_modules/fast-glob/package.json +81 -0
  140. package/node_modules/fastq/LICENSE +13 -0
  141. package/node_modules/fastq/README.md +310 -0
  142. package/node_modules/fastq/SECURITY.md +15 -0
  143. package/node_modules/fastq/bench.js +66 -0
  144. package/node_modules/fastq/eslint.config.js +11 -0
  145. package/node_modules/fastq/example.js +14 -0
  146. package/node_modules/fastq/example.mjs +9 -0
  147. package/node_modules/fastq/index.d.ts +59 -0
  148. package/node_modules/fastq/package.json +49 -0
  149. package/node_modules/fastq/queue.js +346 -0
  150. package/node_modules/fastq/test/example.ts +83 -0
  151. package/node_modules/fastq/test/promise.js +325 -0
  152. package/node_modules/fastq/test/test.js +733 -0
  153. package/node_modules/fastq/test/tsconfig.json +11 -0
  154. package/node_modules/fill-range/LICENSE +21 -0
  155. package/node_modules/fill-range/README.md +237 -0
  156. package/node_modules/fill-range/index.js +248 -0
  157. package/node_modules/fill-range/package.json +74 -0
  158. package/node_modules/glob-parent/LICENSE +15 -0
  159. package/node_modules/glob-parent/README.md +137 -0
  160. package/node_modules/glob-parent/index.js +42 -0
  161. package/node_modules/glob-parent/package.json +48 -0
  162. package/node_modules/ignore/LICENSE-MIT +21 -0
  163. package/node_modules/ignore/README.md +452 -0
  164. package/node_modules/ignore/index.d.ts +81 -0
  165. package/node_modules/ignore/index.js +784 -0
  166. package/node_modules/ignore/legacy.js +681 -0
  167. package/node_modules/ignore/package.json +87 -0
  168. package/node_modules/is-extglob/LICENSE +21 -0
  169. package/node_modules/is-extglob/README.md +107 -0
  170. package/node_modules/is-extglob/index.js +20 -0
  171. package/node_modules/is-extglob/package.json +69 -0
  172. package/node_modules/is-glob/LICENSE +21 -0
  173. package/node_modules/is-glob/README.md +206 -0
  174. package/node_modules/is-glob/index.js +150 -0
  175. package/node_modules/is-glob/package.json +81 -0
  176. package/node_modules/is-number/LICENSE +21 -0
  177. package/node_modules/is-number/README.md +187 -0
  178. package/node_modules/is-number/index.js +18 -0
  179. package/node_modules/is-number/package.json +82 -0
  180. package/node_modules/merge2/LICENSE +21 -0
  181. package/node_modules/merge2/README.md +144 -0
  182. package/node_modules/merge2/index.js +144 -0
  183. package/node_modules/merge2/package.json +43 -0
  184. package/node_modules/micromatch/LICENSE +21 -0
  185. package/node_modules/micromatch/README.md +1024 -0
  186. package/node_modules/micromatch/index.js +474 -0
  187. package/node_modules/micromatch/package.json +119 -0
  188. package/node_modules/mime-db/HISTORY.md +541 -0
  189. package/node_modules/mime-db/LICENSE +23 -0
  190. package/node_modules/mime-db/README.md +109 -0
  191. package/node_modules/mime-db/db.json +9342 -0
  192. package/node_modules/mime-db/index.js +12 -0
  193. package/node_modules/mime-db/package.json +56 -0
  194. package/node_modules/mime-types/HISTORY.md +421 -0
  195. package/node_modules/mime-types/LICENSE +23 -0
  196. package/node_modules/mime-types/README.md +126 -0
  197. package/node_modules/mime-types/index.js +211 -0
  198. package/node_modules/mime-types/mimeScore.js +52 -0
  199. package/node_modules/mime-types/package.json +45 -0
  200. package/node_modules/picomatch/LICENSE +21 -0
  201. package/node_modules/picomatch/README.md +716 -0
  202. package/node_modules/picomatch/index.js +3 -0
  203. package/node_modules/picomatch/lib/constants.js +184 -0
  204. package/node_modules/picomatch/lib/parse.js +1392 -0
  205. package/node_modules/picomatch/lib/picomatch.js +342 -0
  206. package/node_modules/picomatch/lib/scan.js +391 -0
  207. package/node_modules/picomatch/lib/utils.js +64 -0
  208. package/node_modules/picomatch/package.json +81 -0
  209. package/node_modules/queue-microtask/LICENSE +20 -0
  210. package/node_modules/queue-microtask/README.md +90 -0
  211. package/node_modules/queue-microtask/index.d.ts +2 -0
  212. package/node_modules/queue-microtask/index.js +9 -0
  213. package/node_modules/queue-microtask/package.json +55 -0
  214. package/node_modules/reusify/.github/dependabot.yml +7 -0
  215. package/node_modules/reusify/.github/workflows/ci.yml +96 -0
  216. package/node_modules/reusify/LICENSE +22 -0
  217. package/node_modules/reusify/README.md +139 -0
  218. package/node_modules/reusify/SECURITY.md +15 -0
  219. package/node_modules/reusify/benchmarks/createNoCodeFunction.js +30 -0
  220. package/node_modules/reusify/benchmarks/fib.js +13 -0
  221. package/node_modules/reusify/benchmarks/reuseNoCodeFunction.js +38 -0
  222. package/node_modules/reusify/eslint.config.js +14 -0
  223. package/node_modules/reusify/package.json +50 -0
  224. package/node_modules/reusify/reusify.d.ts +14 -0
  225. package/node_modules/reusify/reusify.js +33 -0
  226. package/node_modules/reusify/test.js +66 -0
  227. package/node_modules/reusify/tsconfig.json +11 -0
  228. package/node_modules/run-parallel/LICENSE +20 -0
  229. package/node_modules/run-parallel/README.md +85 -0
  230. package/node_modules/run-parallel/index.js +51 -0
  231. package/node_modules/run-parallel/package.json +58 -0
  232. package/node_modules/to-regex-range/LICENSE +21 -0
  233. package/node_modules/to-regex-range/README.md +305 -0
  234. package/node_modules/to-regex-range/index.js +288 -0
  235. package/node_modules/to-regex-range/package.json +88 -0
  236. package/package.json +53 -0
@@ -0,0 +1,288 @@
1
+ /*!
2
+ * to-regex-range <https://github.com/micromatch/to-regex-range>
3
+ *
4
+ * Copyright (c) 2015-present, Jon Schlinkert.
5
+ * Released under the MIT License.
6
+ */
7
+
8
+ 'use strict';
9
+
10
+ const isNumber = require('is-number');
11
+
12
+ const toRegexRange = (min, max, options) => {
13
+ if (isNumber(min) === false) {
14
+ throw new TypeError('toRegexRange: expected the first argument to be a number');
15
+ }
16
+
17
+ if (max === void 0 || min === max) {
18
+ return String(min);
19
+ }
20
+
21
+ if (isNumber(max) === false) {
22
+ throw new TypeError('toRegexRange: expected the second argument to be a number.');
23
+ }
24
+
25
+ let opts = { relaxZeros: true, ...options };
26
+ if (typeof opts.strictZeros === 'boolean') {
27
+ opts.relaxZeros = opts.strictZeros === false;
28
+ }
29
+
30
+ let relax = String(opts.relaxZeros);
31
+ let shorthand = String(opts.shorthand);
32
+ let capture = String(opts.capture);
33
+ let wrap = String(opts.wrap);
34
+ let cacheKey = min + ':' + max + '=' + relax + shorthand + capture + wrap;
35
+
36
+ if (toRegexRange.cache.hasOwnProperty(cacheKey)) {
37
+ return toRegexRange.cache[cacheKey].result;
38
+ }
39
+
40
+ let a = Math.min(min, max);
41
+ let b = Math.max(min, max);
42
+
43
+ if (Math.abs(a - b) === 1) {
44
+ let result = min + '|' + max;
45
+ if (opts.capture) {
46
+ return `(${result})`;
47
+ }
48
+ if (opts.wrap === false) {
49
+ return result;
50
+ }
51
+ return `(?:${result})`;
52
+ }
53
+
54
+ let isPadded = hasPadding(min) || hasPadding(max);
55
+ let state = { min, max, a, b };
56
+ let positives = [];
57
+ let negatives = [];
58
+
59
+ if (isPadded) {
60
+ state.isPadded = isPadded;
61
+ state.maxLen = String(state.max).length;
62
+ }
63
+
64
+ if (a < 0) {
65
+ let newMin = b < 0 ? Math.abs(b) : 1;
66
+ negatives = splitToPatterns(newMin, Math.abs(a), state, opts);
67
+ a = state.a = 0;
68
+ }
69
+
70
+ if (b >= 0) {
71
+ positives = splitToPatterns(a, b, state, opts);
72
+ }
73
+
74
+ state.negatives = negatives;
75
+ state.positives = positives;
76
+ state.result = collatePatterns(negatives, positives, opts);
77
+
78
+ if (opts.capture === true) {
79
+ state.result = `(${state.result})`;
80
+ } else if (opts.wrap !== false && (positives.length + negatives.length) > 1) {
81
+ state.result = `(?:${state.result})`;
82
+ }
83
+
84
+ toRegexRange.cache[cacheKey] = state;
85
+ return state.result;
86
+ };
87
+
88
+ function collatePatterns(neg, pos, options) {
89
+ let onlyNegative = filterPatterns(neg, pos, '-', false, options) || [];
90
+ let onlyPositive = filterPatterns(pos, neg, '', false, options) || [];
91
+ let intersected = filterPatterns(neg, pos, '-?', true, options) || [];
92
+ let subpatterns = onlyNegative.concat(intersected).concat(onlyPositive);
93
+ return subpatterns.join('|');
94
+ }
95
+
96
+ function splitToRanges(min, max) {
97
+ let nines = 1;
98
+ let zeros = 1;
99
+
100
+ let stop = countNines(min, nines);
101
+ let stops = new Set([max]);
102
+
103
+ while (min <= stop && stop <= max) {
104
+ stops.add(stop);
105
+ nines += 1;
106
+ stop = countNines(min, nines);
107
+ }
108
+
109
+ stop = countZeros(max + 1, zeros) - 1;
110
+
111
+ while (min < stop && stop <= max) {
112
+ stops.add(stop);
113
+ zeros += 1;
114
+ stop = countZeros(max + 1, zeros) - 1;
115
+ }
116
+
117
+ stops = [...stops];
118
+ stops.sort(compare);
119
+ return stops;
120
+ }
121
+
122
+ /**
123
+ * Convert a range to a regex pattern
124
+ * @param {Number} `start`
125
+ * @param {Number} `stop`
126
+ * @return {String}
127
+ */
128
+
129
+ function rangeToPattern(start, stop, options) {
130
+ if (start === stop) {
131
+ return { pattern: start, count: [], digits: 0 };
132
+ }
133
+
134
+ let zipped = zip(start, stop);
135
+ let digits = zipped.length;
136
+ let pattern = '';
137
+ let count = 0;
138
+
139
+ for (let i = 0; i < digits; i++) {
140
+ let [startDigit, stopDigit] = zipped[i];
141
+
142
+ if (startDigit === stopDigit) {
143
+ pattern += startDigit;
144
+
145
+ } else if (startDigit !== '0' || stopDigit !== '9') {
146
+ pattern += toCharacterClass(startDigit, stopDigit, options);
147
+
148
+ } else {
149
+ count++;
150
+ }
151
+ }
152
+
153
+ if (count) {
154
+ pattern += options.shorthand === true ? '\\d' : '[0-9]';
155
+ }
156
+
157
+ return { pattern, count: [count], digits };
158
+ }
159
+
160
+ function splitToPatterns(min, max, tok, options) {
161
+ let ranges = splitToRanges(min, max);
162
+ let tokens = [];
163
+ let start = min;
164
+ let prev;
165
+
166
+ for (let i = 0; i < ranges.length; i++) {
167
+ let max = ranges[i];
168
+ let obj = rangeToPattern(String(start), String(max), options);
169
+ let zeros = '';
170
+
171
+ if (!tok.isPadded && prev && prev.pattern === obj.pattern) {
172
+ if (prev.count.length > 1) {
173
+ prev.count.pop();
174
+ }
175
+
176
+ prev.count.push(obj.count[0]);
177
+ prev.string = prev.pattern + toQuantifier(prev.count);
178
+ start = max + 1;
179
+ continue;
180
+ }
181
+
182
+ if (tok.isPadded) {
183
+ zeros = padZeros(max, tok, options);
184
+ }
185
+
186
+ obj.string = zeros + obj.pattern + toQuantifier(obj.count);
187
+ tokens.push(obj);
188
+ start = max + 1;
189
+ prev = obj;
190
+ }
191
+
192
+ return tokens;
193
+ }
194
+
195
+ function filterPatterns(arr, comparison, prefix, intersection, options) {
196
+ let result = [];
197
+
198
+ for (let ele of arr) {
199
+ let { string } = ele;
200
+
201
+ // only push if _both_ are negative...
202
+ if (!intersection && !contains(comparison, 'string', string)) {
203
+ result.push(prefix + string);
204
+ }
205
+
206
+ // or _both_ are positive
207
+ if (intersection && contains(comparison, 'string', string)) {
208
+ result.push(prefix + string);
209
+ }
210
+ }
211
+ return result;
212
+ }
213
+
214
+ /**
215
+ * Zip strings
216
+ */
217
+
218
+ function zip(a, b) {
219
+ let arr = [];
220
+ for (let i = 0; i < a.length; i++) arr.push([a[i], b[i]]);
221
+ return arr;
222
+ }
223
+
224
+ function compare(a, b) {
225
+ return a > b ? 1 : b > a ? -1 : 0;
226
+ }
227
+
228
+ function contains(arr, key, val) {
229
+ return arr.some(ele => ele[key] === val);
230
+ }
231
+
232
+ function countNines(min, len) {
233
+ return Number(String(min).slice(0, -len) + '9'.repeat(len));
234
+ }
235
+
236
+ function countZeros(integer, zeros) {
237
+ return integer - (integer % Math.pow(10, zeros));
238
+ }
239
+
240
+ function toQuantifier(digits) {
241
+ let [start = 0, stop = ''] = digits;
242
+ if (stop || start > 1) {
243
+ return `{${start + (stop ? ',' + stop : '')}}`;
244
+ }
245
+ return '';
246
+ }
247
+
248
+ function toCharacterClass(a, b, options) {
249
+ return `[${a}${(b - a === 1) ? '' : '-'}${b}]`;
250
+ }
251
+
252
+ function hasPadding(str) {
253
+ return /^-?(0+)\d/.test(str);
254
+ }
255
+
256
+ function padZeros(value, tok, options) {
257
+ if (!tok.isPadded) {
258
+ return value;
259
+ }
260
+
261
+ let diff = Math.abs(tok.maxLen - String(value).length);
262
+ let relax = options.relaxZeros !== false;
263
+
264
+ switch (diff) {
265
+ case 0:
266
+ return '';
267
+ case 1:
268
+ return relax ? '0?' : '0';
269
+ case 2:
270
+ return relax ? '0{0,2}' : '00';
271
+ default: {
272
+ return relax ? `0{0,${diff}}` : `0{${diff}}`;
273
+ }
274
+ }
275
+ }
276
+
277
+ /**
278
+ * Cache
279
+ */
280
+
281
+ toRegexRange.cache = {};
282
+ toRegexRange.clearCache = () => (toRegexRange.cache = {});
283
+
284
+ /**
285
+ * Expose `toRegexRange`
286
+ */
287
+
288
+ module.exports = toRegexRange;
@@ -0,0 +1,88 @@
1
+ {
2
+ "name": "to-regex-range",
3
+ "description": "Pass two numbers, get a regex-compatible source string for matching ranges. Validated against more than 2.78 million test assertions.",
4
+ "version": "5.0.1",
5
+ "homepage": "https://github.com/micromatch/to-regex-range",
6
+ "author": "Jon Schlinkert (https://github.com/jonschlinkert)",
7
+ "contributors": [
8
+ "Jon Schlinkert (http://twitter.com/jonschlinkert)",
9
+ "Rouven Weßling (www.rouvenwessling.de)"
10
+ ],
11
+ "repository": "micromatch/to-regex-range",
12
+ "bugs": {
13
+ "url": "https://github.com/micromatch/to-regex-range/issues"
14
+ },
15
+ "license": "MIT",
16
+ "files": [
17
+ "index.js"
18
+ ],
19
+ "main": "index.js",
20
+ "engines": {
21
+ "node": ">=8.0"
22
+ },
23
+ "scripts": {
24
+ "test": "mocha"
25
+ },
26
+ "dependencies": {
27
+ "is-number": "^7.0.0"
28
+ },
29
+ "devDependencies": {
30
+ "fill-range": "^6.0.0",
31
+ "gulp-format-md": "^2.0.0",
32
+ "mocha": "^6.0.2",
33
+ "text-table": "^0.2.0",
34
+ "time-diff": "^0.3.1"
35
+ },
36
+ "keywords": [
37
+ "bash",
38
+ "date",
39
+ "expand",
40
+ "expansion",
41
+ "expression",
42
+ "glob",
43
+ "match",
44
+ "match date",
45
+ "match number",
46
+ "match numbers",
47
+ "match year",
48
+ "matches",
49
+ "matching",
50
+ "number",
51
+ "numbers",
52
+ "numerical",
53
+ "range",
54
+ "ranges",
55
+ "regex",
56
+ "regexp",
57
+ "regular",
58
+ "regular expression",
59
+ "sequence"
60
+ ],
61
+ "verb": {
62
+ "layout": "default",
63
+ "toc": false,
64
+ "tasks": [
65
+ "readme"
66
+ ],
67
+ "plugins": [
68
+ "gulp-format-md"
69
+ ],
70
+ "lint": {
71
+ "reflinks": true
72
+ },
73
+ "helpers": {
74
+ "examples": {
75
+ "displayName": "examples"
76
+ }
77
+ },
78
+ "related": {
79
+ "list": [
80
+ "expand-range",
81
+ "fill-range",
82
+ "micromatch",
83
+ "repeat-element",
84
+ "repeat-string"
85
+ ]
86
+ }
87
+ }
88
+ }
package/package.json ADDED
@@ -0,0 +1,53 @@
1
+ {
2
+ "name": "@dropthis/cli",
3
+ "version": "0.1.5",
4
+ "description": "Official CLI for Dropthis.",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/dropthis-dev/dropthis-cli"
9
+ },
10
+ "type": "module",
11
+ "bin": {
12
+ "dropthis": "./dist/cli.cjs"
13
+ },
14
+ "files": [
15
+ "dist",
16
+ "README.md"
17
+ ],
18
+ "bundledDependencies": [
19
+ "@dropthis/node"
20
+ ],
21
+ "engines": {
22
+ "node": ">=20"
23
+ },
24
+ "scripts": {
25
+ "build": "tsup",
26
+ "dev": "tsx src/cli.ts",
27
+ "format": "biome check --vcs-enabled=true --vcs-client-kind=git --vcs-use-ignore-file=true --write .",
28
+ "lint": "biome check --vcs-enabled=true --vcs-client-kind=git --vcs-use-ignore-file=true .",
29
+ "typecheck": "tsc --noEmit",
30
+ "test": "vitest run",
31
+ "pack:dry": "npm pack --dry-run"
32
+ },
33
+ "dependencies": {
34
+ "@clack/prompts": "1.4.0",
35
+ "@commander-js/extra-typings": "14.0.0",
36
+ "@dropthis/node": "^0.1.0",
37
+ "@napi-rs/keyring": "1.3.0",
38
+ "commander": "14.0.3",
39
+ "conf": "15.1.0",
40
+ "picocolors": "1.1.1"
41
+ },
42
+ "devDependencies": {
43
+ "@biomejs/biome": "2.4.11",
44
+ "@types/node": "24.0.0",
45
+ "tsup": "8.5.1",
46
+ "tsx": "4.20.0",
47
+ "typescript": "5.9.3",
48
+ "vitest": "4.1.7"
49
+ },
50
+ "bundleDependencies": [
51
+ "@dropthis/node"
52
+ ]
53
+ }