shadcn-svelte 0.6.0 → 0.6.1

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.
package/dist/index.js CHANGED
@@ -20,50 +20,11 @@ import chalk2 from "chalk";
20
20
  import { execa as execa2 } from "execa";
21
21
 
22
22
  // node_modules/.pnpm/tsconfck@2.1.2_typescript@5.3.3/node_modules/tsconfck/dist/index.js
23
- import path from "path";
24
- import { promises as fs } from "fs";
25
23
  import path2 from "path";
26
24
  import path3 from "path";
27
25
  import { promises as fs2 } from "fs";
28
26
  import path5 from "path";
29
27
  import path6 from "path";
30
- async function find(filename, options) {
31
- let dir = path.dirname(path.resolve(filename));
32
- const root = (options == null ? void 0 : options.root) ? path.resolve(options.root) : null;
33
- while (dir) {
34
- const tsconfig = await tsconfigInDir(dir, options);
35
- if (tsconfig) {
36
- return tsconfig;
37
- } else {
38
- if (root === dir) {
39
- break;
40
- }
41
- const parent = path.dirname(dir);
42
- if (parent === dir) {
43
- break;
44
- } else {
45
- dir = parent;
46
- }
47
- }
48
- }
49
- throw new Error(`no tsconfig file found for ${filename}`);
50
- }
51
- async function tsconfigInDir(dir, options) {
52
- const tsconfig = path.join(dir, "tsconfig.json");
53
- if (options == null ? void 0 : options.tsConfigPaths) {
54
- return options.tsConfigPaths.has(tsconfig) ? tsconfig : void 0;
55
- }
56
- try {
57
- const stat = await fs.stat(tsconfig);
58
- if (stat.isFile() || stat.isFIFO()) {
59
- return tsconfig;
60
- }
61
- } catch (e) {
62
- if (e.code !== "ENOENT") {
63
- throw e;
64
- }
65
- }
66
- }
67
28
  var sep = path2.sep;
68
29
  var singleComment = Symbol("singleComment");
69
30
  var multiComment = Symbol("multiComment");
@@ -420,6 +381,58 @@ var TSConfckParseNativeError = class _TSConfckParseNativeError extends Error {
420
381
  // src/utils/get-config.ts
421
382
  import * as z from "zod";
422
383
 
384
+ // src/utils/find-tsconfig.ts
385
+ import { promises as fs } from "fs";
386
+ import path from "path";
387
+ async function find(filename, options) {
388
+ let dir = path.dirname(path.resolve(filename));
389
+ const root = options?.root ? path.resolve(options.root) : null;
390
+ while (dir) {
391
+ const tsconfig = await tsconfigInDir(dir, options);
392
+ if (tsconfig) {
393
+ return tsconfig;
394
+ } else {
395
+ if (root === dir) {
396
+ break;
397
+ }
398
+ const parent = path.dirname(dir);
399
+ if (parent === dir) {
400
+ break;
401
+ } else {
402
+ dir = parent;
403
+ }
404
+ }
405
+ }
406
+ throw new Error(`no tsconfig file found for ${filename}`);
407
+ }
408
+ async function tsconfigInDir(dir, options) {
409
+ const tsconfig = path.join(dir, "tsconfig.json");
410
+ const jsconfig = path.join(dir, "jsconfig.json");
411
+ if (options?.tsConfigPaths) {
412
+ return options.tsConfigPaths.has(tsconfig) ? tsconfig : void 0;
413
+ }
414
+ try {
415
+ const stat = await fs.stat(tsconfig);
416
+ if (stat.isFile() || stat.isFIFO()) {
417
+ return tsconfig;
418
+ }
419
+ } catch (e) {
420
+ if (e.code !== "ENOENT") {
421
+ throw e;
422
+ }
423
+ }
424
+ try {
425
+ let stat = await fs.stat(jsconfig);
426
+ if (stat.isFile() || stat.isFIFO()) {
427
+ return jsconfig;
428
+ }
429
+ } catch (e) {
430
+ if (e.code !== "ENOENT") {
431
+ throw e;
432
+ }
433
+ }
434
+ }
435
+
423
436
  // src/utils/get-package-info.ts
424
437
  import path4 from "path";
425
438
  import { fileURLToPath } from "url";