@steambrew/ttc 3.2.4 → 3.2.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 (2) hide show
  1. package/dist/index.js +235 -3
  2. package/package.json +3 -2
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env node
1
+ #!/usr/bin / env node
2
2
  import chalk from 'chalk';
3
3
  import fs, { readFileSync, existsSync, readFile as readFile$1 } from 'fs';
4
4
  import path, { dirname } from 'path';
@@ -28,6 +28,35 @@ import * as glob from 'glob';
28
28
  import MagicString from 'magic-string';
29
29
  import _traverse from '@babel/traverse';
30
30
 
31
+ /**
32
+ * ==================================================
33
+ * _____ _ _ _ _
34
+ * | |_| | |___ ___ ___|_|_ _ _____
35
+ * | | | | | | | -_| | | | | | |
36
+ * |_|_|_|_|_|_|___|_|_|_|_|_|___|_|_|_|
37
+ *
38
+ * ==================================================
39
+ *
40
+ * Copyright (c) 2026 Project Millennium
41
+ *
42
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
43
+ * of this software and associated documentation files (the "Software"), to deal
44
+ * in the Software without restriction, including without limitation the rights
45
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
46
+ * copies of the Software, and to permit persons to whom the Software is
47
+ * furnished to do so, subject to the following conditions:
48
+ *
49
+ * The above copyright notice and this permission notice shall be included in all
50
+ * copies or substantial portions of the Software.
51
+ *
52
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
53
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
54
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
55
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
56
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
57
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
58
+ * SOFTWARE.
59
+ */
31
60
  const version = JSON.parse(readFileSync(path.resolve(dirname(fileURLToPath(import.meta.url)), '../package.json'), 'utf8')).version;
32
61
  const Logger = {
33
62
  warn(message, loc) {
@@ -52,7 +81,7 @@ const Logger = {
52
81
  },
53
82
  done({ elapsedMs, buildType, sysfsCount, envCount }) {
54
83
  const elapsed = `${(elapsedMs / 1000).toFixed(2)}s`;
55
- const meta = [`ttc v${version} (${"fd773865"})`];
84
+ const meta = [`ttc v${version} (${"17fd3c99"})`];
56
85
  if (buildType === 'dev')
57
86
  meta.push('no type checking');
58
87
  if (sysfsCount)
@@ -67,6 +96,35 @@ const Logger = {
67
96
  },
68
97
  };
69
98
 
99
+ /**
100
+ * ==================================================
101
+ * _____ _ _ _ _
102
+ * | |_| | |___ ___ ___|_|_ _ _____
103
+ * | | | | | | | -_| | | | | | |
104
+ * |_|_|_|_|_|_|___|_|_|_|_|_|___|_|_|_|
105
+ *
106
+ * ==================================================
107
+ *
108
+ * Copyright (c) 2026 Project Millennium
109
+ *
110
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
111
+ * of this software and associated documentation files (the "Software"), to deal
112
+ * in the Software without restriction, including without limitation the rights
113
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
114
+ * copies of the Software, and to permit persons to whom the Software is
115
+ * furnished to do so, subject to the following conditions:
116
+ *
117
+ * The above copyright notice and this permission notice shall be included in all
118
+ * copies or substantial portions of the Software.
119
+ *
120
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
121
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
122
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
123
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
124
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
125
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
126
+ * SOFTWARE.
127
+ */
70
128
  const PrintParamHelp = () => {
71
129
  console.log([
72
130
  '',
@@ -135,6 +193,35 @@ const ValidateParameters = (args) => {
135
193
  };
136
194
  };
137
195
 
196
+ /**
197
+ * ==================================================
198
+ * _____ _ _ _ _
199
+ * | |_| | |___ ___ ___|_|_ _ _____
200
+ * | | | | | | | -_| | | | | | |
201
+ * |_|_|_|_|_|_|___|_|_|_|_|_|___|_|_|_|
202
+ *
203
+ * ==================================================
204
+ *
205
+ * Copyright (c) 2026 Project Millennium
206
+ *
207
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
208
+ * of this software and associated documentation files (the "Software"), to deal
209
+ * in the Software without restriction, including without limitation the rights
210
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
211
+ * copies of the Software, and to permit persons to whom the Software is
212
+ * furnished to do so, subject to the following conditions:
213
+ *
214
+ * The above copyright notice and this permission notice shall be included in all
215
+ * copies or substantial portions of the Software.
216
+ *
217
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
218
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
219
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
220
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
221
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
222
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
223
+ * SOFTWARE.
224
+ */
138
225
  async function fileExists(filePath) {
139
226
  return access(filePath).then(() => true).catch(() => false);
140
227
  }
@@ -182,6 +269,35 @@ const CheckForUpdates = async () => {
182
269
  return false;
183
270
  };
184
271
 
272
+ /**
273
+ * ==================================================
274
+ * _____ _ _ _ _
275
+ * | |_| | |___ ___ ___|_|_ _ _____
276
+ * | | | | | | | -_| | | | | | |
277
+ * |_|_|_|_|_|_|___|_|_|_|_|_|___|_|_|_|
278
+ *
279
+ * ==================================================
280
+ *
281
+ * Copyright (c) 2026 Project Millennium
282
+ *
283
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
284
+ * of this software and associated documentation files (the "Software"), to deal
285
+ * in the Software without restriction, including without limitation the rights
286
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
287
+ * copies of the Software, and to permit persons to whom the Software is
288
+ * furnished to do so, subject to the following conditions:
289
+ *
290
+ * The above copyright notice and this permission notice shall be included in all
291
+ * copies or substantial portions of the Software.
292
+ *
293
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
294
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
295
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
296
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
297
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
298
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
299
+ * SOFTWARE.
300
+ */
185
301
  const ValidatePlugin = (bIsMillennium, target) => {
186
302
  return new Promise((resolve, reject) => {
187
303
  if (!existsSync(target)) {
@@ -229,6 +345,35 @@ const ValidatePlugin = (bIsMillennium, target) => {
229
345
  });
230
346
  };
231
347
 
348
+ /**
349
+ * ==================================================
350
+ * _____ _ _ _ _
351
+ * | |_| | |___ ___ ___|_|_ _ _____
352
+ * | | | | | | | -_| | | | | | |
353
+ * |_|_|_|_|_|_|___|_|_|_|_|_|___|_|_|_|
354
+ *
355
+ * ==================================================
356
+ *
357
+ * Copyright (c) 2026 Project Millennium
358
+ *
359
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
360
+ * of this software and associated documentation files (the "Software"), to deal
361
+ * in the Software without restriction, including without limitation the rights
362
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
363
+ * copies of the Software, and to permit persons to whom the Software is
364
+ * furnished to do so, subject to the following conditions:
365
+ *
366
+ * The above copyright notice and this permission notice shall be included in all
367
+ * copies or substantial portions of the Software.
368
+ *
369
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
370
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
371
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
372
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
373
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
374
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
375
+ * SOFTWARE.
376
+ */
232
377
  /**
233
378
  * @description Append the active plugin to the global plugin
234
379
  * list and notify that the frontend Loaded.
@@ -263,6 +408,35 @@ function InitializePlugins() {
263
408
  window.MILLENNIUM_SIDEBAR_NAVIGATION_PANELS || (window.MILLENNIUM_SIDEBAR_NAVIGATION_PANELS = {});
264
409
  }
265
410
 
411
+ /**
412
+ * ==================================================
413
+ * _____ _ _ _ _
414
+ * | |_| | |___ ___ ___|_|_ _ _____
415
+ * | | | | | | | -_| | | | | | |
416
+ * |_|_|_|_|_|_|___|_|_|_|_|_|___|_|_|_|
417
+ *
418
+ * ==================================================
419
+ *
420
+ * Copyright (c) 2026 Project Millennium
421
+ *
422
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
423
+ * of this software and associated documentation files (the "Software"), to deal
424
+ * in the Software without restriction, including without limitation the rights
425
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
426
+ * copies of the Software, and to permit persons to whom the Software is
427
+ * furnished to do so, subject to the following conditions:
428
+ *
429
+ * The above copyright notice and this permission notice shall be included in all
430
+ * copies or substantial portions of the Software.
431
+ *
432
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
433
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
434
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
435
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
436
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
437
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
438
+ * SOFTWARE.
439
+ */
266
440
  const traverse = _traverse.default;
267
441
  function constSysfsExpr(options = {}) {
268
442
  const filter = createFilter(options.include, options.exclude);
@@ -536,6 +710,35 @@ function constSysfsExpr(options = {}) {
536
710
  return { plugin, getCount: () => count };
537
711
  }
538
712
 
713
+ /**
714
+ * ==================================================
715
+ * _____ _ _ _ _
716
+ * | |_| | |___ ___ ___|_|_ _ _____
717
+ * | | | | | | | -_| | | | | | |
718
+ * |_|_|_|_|_|_|___|_|_|_|_|_|___|_|_|_|
719
+ *
720
+ * ==================================================
721
+ *
722
+ * Copyright (c) 2026 Project Millennium
723
+ *
724
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
725
+ * of this software and associated documentation files (the "Software"), to deal
726
+ * in the Software without restriction, including without limitation the rights
727
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
728
+ * copies of the Software, and to permit persons to whom the Software is
729
+ * furnished to do so, subject to the following conditions:
730
+ *
731
+ * The above copyright notice and this permission notice shall be included in all
732
+ * copies or substantial portions of the Software.
733
+ *
734
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
735
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
736
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
737
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
738
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
739
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
740
+ * SOFTWARE.
741
+ */
539
742
  const env = dotenv.config().parsed ?? {};
540
743
  var BuildTarget;
541
744
  (function (BuildTarget) {
@@ -624,7 +827,7 @@ function tsconfigPathsPlugin(tsconfigPath) {
624
827
  const paths = options.paths ?? {};
625
828
  function resolveWithExtensions(base) {
626
829
  for (const ext of ['', '.ts', '.tsx', '.js', '.jsx', '/index.ts', '/index.tsx']) {
627
- if (fs.existsSync(base + ext))
830
+ if (fs.existsSync(base + ext) && fs.statSync(base + ext).isFile())
628
831
  return base + ext;
629
832
  }
630
833
  return null;
@@ -883,6 +1086,35 @@ const TranspilerPluginComponent = async (pluginJson, props) => {
883
1086
  }
884
1087
  };
885
1088
 
1089
+ /**
1090
+ * ==================================================
1091
+ * _____ _ _ _ _
1092
+ * | |_| | |___ ___ ___|_|_ _ _____
1093
+ * | | | | | | | -_| | | | | | |
1094
+ * |_|_|_|_|_|_|___|_|_|_|_|_|___|_|_|_|
1095
+ *
1096
+ * ==================================================
1097
+ *
1098
+ * Copyright (c) 2026 Project Millennium
1099
+ *
1100
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
1101
+ * of this software and associated documentation files (the "Software"), to deal
1102
+ * in the Software without restriction, including without limitation the rights
1103
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1104
+ * copies of the Software, and to permit persons to whom the Software is
1105
+ * furnished to do so, subject to the following conditions:
1106
+ *
1107
+ * The above copyright notice and this permission notice shall be included in all
1108
+ * copies or substantial portions of the Software.
1109
+ *
1110
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1111
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1112
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1113
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1114
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1115
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1116
+ * SOFTWARE.
1117
+ */
886
1118
  /**
887
1119
  * this component serves as:
888
1120
  * - typescript transpiler
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steambrew/ttc",
3
- "version": "3.2.4",
3
+ "version": "3.2.5",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -9,7 +9,8 @@
9
9
  },
10
10
  "scripts": {
11
11
  "build": "rollup -c",
12
- "dev": "rollup -c -w"
12
+ "dev": "rollup -c -w",
13
+ "prepublishOnly": "bun run build"
13
14
  },
14
15
  "publishConfig": {
15
16
  "access": "public"