@xyd-js/cli 0.1.0-xyd.7 → 0.1.0-xyd.8

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/.cli/index.js CHANGED
@@ -109,14 +109,14 @@ var require_package = __commonJS({
109
109
  "package.json"(exports2, module2) {
110
110
  module2.exports = {
111
111
  name: "@xyd-js/cli",
112
- version: "0.1.0-xyd.6",
112
+ version: "0.1.0-xyd.7",
113
113
  keywords: [],
114
114
  author: "",
115
115
  description: "",
116
116
  type: "module",
117
117
  files: [
118
118
  ".cli",
119
- ".cli/package.json"
119
+ "postinstall.js"
120
120
  ],
121
121
  scripts: {
122
122
  build: "tsup"
@@ -547,74 +547,8 @@
547
547
  "integrity": "sha512-30FAj7/EoJ5mwVPOWhAyCX+FPfMDrVecJAM+Iw9NRoSl4BBAQeqj4cApHHUXOVvIPgLVDsCFoz/hGD+5QQD1GQ==",
548
548
  "license": "MIT"
549
549
  },
550
- "node_modules/@esbuild/aix-ppc64": {
551
- "version": "0.21.5",
552
- "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz",
553
- "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==",
554
- "cpu": [
555
- "ppc64"
556
- ],
557
- "license": "MIT",
558
- "optional": true,
559
- "os": [
560
- "aix"
561
- ],
562
- "engines": {
563
- "node": ">=12"
564
- }
565
- },
566
- "node_modules/@esbuild/android-arm": {
567
- "version": "0.21.5",
568
- "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz",
569
- "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==",
570
- "cpu": [
571
- "arm"
572
- ],
573
- "license": "MIT",
574
- "optional": true,
575
- "os": [
576
- "android"
577
- ],
578
- "engines": {
579
- "node": ">=12"
580
- }
581
- },
582
- "node_modules/@esbuild/android-arm64": {
583
- "version": "0.21.5",
584
- "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz",
585
- "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==",
586
- "cpu": [
587
- "arm64"
588
- ],
589
- "license": "MIT",
590
- "optional": true,
591
- "os": [
592
- "android"
593
- ],
594
- "engines": {
595
- "node": ">=12"
596
- }
597
- },
598
- "node_modules/@esbuild/android-x64": {
599
- "version": "0.21.5",
600
- "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz",
601
- "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==",
602
- "cpu": [
603
- "x64"
604
- ],
605
- "license": "MIT",
606
- "optional": true,
607
- "os": [
608
- "android"
609
- ],
610
- "engines": {
611
- "node": ">=12"
612
- }
613
- },
614
550
  "node_modules/@esbuild/darwin-arm64": {
615
551
  "version": "0.21.5",
616
- "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz",
617
- "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==",
618
552
  "cpu": [
619
553
  "arm64"
620
554
  ],
@@ -627,294 +561,6 @@
627
561
  "node": ">=12"
628
562
  }
629
563
  },
630
- "node_modules/@esbuild/darwin-x64": {
631
- "version": "0.21.5",
632
- "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz",
633
- "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==",
634
- "cpu": [
635
- "x64"
636
- ],
637
- "license": "MIT",
638
- "optional": true,
639
- "os": [
640
- "darwin"
641
- ],
642
- "engines": {
643
- "node": ">=12"
644
- }
645
- },
646
- "node_modules/@esbuild/freebsd-arm64": {
647
- "version": "0.21.5",
648
- "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz",
649
- "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==",
650
- "cpu": [
651
- "arm64"
652
- ],
653
- "license": "MIT",
654
- "optional": true,
655
- "os": [
656
- "freebsd"
657
- ],
658
- "engines": {
659
- "node": ">=12"
660
- }
661
- },
662
- "node_modules/@esbuild/freebsd-x64": {
663
- "version": "0.21.5",
664
- "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz",
665
- "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==",
666
- "cpu": [
667
- "x64"
668
- ],
669
- "license": "MIT",
670
- "optional": true,
671
- "os": [
672
- "freebsd"
673
- ],
674
- "engines": {
675
- "node": ">=12"
676
- }
677
- },
678
- "node_modules/@esbuild/linux-arm": {
679
- "version": "0.21.5",
680
- "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz",
681
- "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==",
682
- "cpu": [
683
- "arm"
684
- ],
685
- "license": "MIT",
686
- "optional": true,
687
- "os": [
688
- "linux"
689
- ],
690
- "engines": {
691
- "node": ">=12"
692
- }
693
- },
694
- "node_modules/@esbuild/linux-arm64": {
695
- "version": "0.21.5",
696
- "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz",
697
- "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==",
698
- "cpu": [
699
- "arm64"
700
- ],
701
- "license": "MIT",
702
- "optional": true,
703
- "os": [
704
- "linux"
705
- ],
706
- "engines": {
707
- "node": ">=12"
708
- }
709
- },
710
- "node_modules/@esbuild/linux-ia32": {
711
- "version": "0.21.5",
712
- "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz",
713
- "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==",
714
- "cpu": [
715
- "ia32"
716
- ],
717
- "license": "MIT",
718
- "optional": true,
719
- "os": [
720
- "linux"
721
- ],
722
- "engines": {
723
- "node": ">=12"
724
- }
725
- },
726
- "node_modules/@esbuild/linux-loong64": {
727
- "version": "0.21.5",
728
- "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz",
729
- "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==",
730
- "cpu": [
731
- "loong64"
732
- ],
733
- "license": "MIT",
734
- "optional": true,
735
- "os": [
736
- "linux"
737
- ],
738
- "engines": {
739
- "node": ">=12"
740
- }
741
- },
742
- "node_modules/@esbuild/linux-mips64el": {
743
- "version": "0.21.5",
744
- "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz",
745
- "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==",
746
- "cpu": [
747
- "mips64el"
748
- ],
749
- "license": "MIT",
750
- "optional": true,
751
- "os": [
752
- "linux"
753
- ],
754
- "engines": {
755
- "node": ">=12"
756
- }
757
- },
758
- "node_modules/@esbuild/linux-ppc64": {
759
- "version": "0.21.5",
760
- "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz",
761
- "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==",
762
- "cpu": [
763
- "ppc64"
764
- ],
765
- "license": "MIT",
766
- "optional": true,
767
- "os": [
768
- "linux"
769
- ],
770
- "engines": {
771
- "node": ">=12"
772
- }
773
- },
774
- "node_modules/@esbuild/linux-riscv64": {
775
- "version": "0.21.5",
776
- "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz",
777
- "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==",
778
- "cpu": [
779
- "riscv64"
780
- ],
781
- "license": "MIT",
782
- "optional": true,
783
- "os": [
784
- "linux"
785
- ],
786
- "engines": {
787
- "node": ">=12"
788
- }
789
- },
790
- "node_modules/@esbuild/linux-s390x": {
791
- "version": "0.21.5",
792
- "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz",
793
- "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==",
794
- "cpu": [
795
- "s390x"
796
- ],
797
- "license": "MIT",
798
- "optional": true,
799
- "os": [
800
- "linux"
801
- ],
802
- "engines": {
803
- "node": ">=12"
804
- }
805
- },
806
- "node_modules/@esbuild/linux-x64": {
807
- "version": "0.21.5",
808
- "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz",
809
- "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==",
810
- "cpu": [
811
- "x64"
812
- ],
813
- "license": "MIT",
814
- "optional": true,
815
- "os": [
816
- "linux"
817
- ],
818
- "engines": {
819
- "node": ">=12"
820
- }
821
- },
822
- "node_modules/@esbuild/netbsd-x64": {
823
- "version": "0.21.5",
824
- "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz",
825
- "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==",
826
- "cpu": [
827
- "x64"
828
- ],
829
- "license": "MIT",
830
- "optional": true,
831
- "os": [
832
- "netbsd"
833
- ],
834
- "engines": {
835
- "node": ">=12"
836
- }
837
- },
838
- "node_modules/@esbuild/openbsd-x64": {
839
- "version": "0.21.5",
840
- "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz",
841
- "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==",
842
- "cpu": [
843
- "x64"
844
- ],
845
- "license": "MIT",
846
- "optional": true,
847
- "os": [
848
- "openbsd"
849
- ],
850
- "engines": {
851
- "node": ">=12"
852
- }
853
- },
854
- "node_modules/@esbuild/sunos-x64": {
855
- "version": "0.21.5",
856
- "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz",
857
- "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==",
858
- "cpu": [
859
- "x64"
860
- ],
861
- "license": "MIT",
862
- "optional": true,
863
- "os": [
864
- "sunos"
865
- ],
866
- "engines": {
867
- "node": ">=12"
868
- }
869
- },
870
- "node_modules/@esbuild/win32-arm64": {
871
- "version": "0.21.5",
872
- "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz",
873
- "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==",
874
- "cpu": [
875
- "arm64"
876
- ],
877
- "license": "MIT",
878
- "optional": true,
879
- "os": [
880
- "win32"
881
- ],
882
- "engines": {
883
- "node": ">=12"
884
- }
885
- },
886
- "node_modules/@esbuild/win32-ia32": {
887
- "version": "0.21.5",
888
- "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz",
889
- "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==",
890
- "cpu": [
891
- "ia32"
892
- ],
893
- "license": "MIT",
894
- "optional": true,
895
- "os": [
896
- "win32"
897
- ],
898
- "engines": {
899
- "node": ">=12"
900
- }
901
- },
902
- "node_modules/@esbuild/win32-x64": {
903
- "version": "0.21.5",
904
- "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz",
905
- "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==",
906
- "cpu": [
907
- "x64"
908
- ],
909
- "license": "MIT",
910
- "optional": true,
911
- "os": [
912
- "win32"
913
- ],
914
- "engines": {
915
- "node": ">=12"
916
- }
917
- },
918
564
  "node_modules/@isaacs/cliui": {
919
565
  "version": "8.0.2",
920
566
  "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz",
@@ -3119,9 +2765,9 @@
3119
2765
  "license": "MIT"
3120
2766
  },
3121
2767
  "node_modules/es-object-atoms": {
3122
- "version": "1.1.0",
3123
- "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.0.tgz",
3124
- "integrity": "sha512-Ujz8Al/KfOVR7fkaghAB1WvnLsdYxHDWmfoi2vlA2jZWRg31XhIC1a4B+/I24muD8iSbHxJ1JkrfqmWb65P/Mw==",
2768
+ "version": "1.1.1",
2769
+ "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz",
2770
+ "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==",
3125
2771
  "license": "MIT",
3126
2772
  "dependencies": {
3127
2773
  "es-errors": "^1.3.0"
@@ -3216,8 +2862,6 @@
3216
2862
  },
3217
2863
  "node_modules/esbuild": {
3218
2864
  "version": "0.21.5",
3219
- "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz",
3220
- "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==",
3221
2865
  "hasInstallScript": true,
3222
2866
  "license": "MIT",
3223
2867
  "bin": {
@@ -7591,8 +7235,6 @@
7591
7235
  },
7592
7236
  "node_modules/vite": {
7593
7237
  "version": "5.4.11",
7594
- "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.11.tgz",
7595
- "integrity": "sha512-c7jFQRklXua0mTzneGW9QVyxFjUgwcihC4bXEtujIo2ouWCe1Ajt/amn2PCxYnhYfd5k09JX3SB7OYWFKYqj8Q==",
7596
7238
  "license": "MIT",
7597
7239
  "dependencies": {
7598
7240
  "esbuild": "^0.21.3",
package/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@xyd-js/cli",
3
- "version": "0.1.0-xyd.7",
3
+ "version": "0.1.0-xyd.8",
4
4
  "keywords": [],
5
5
  "author": "",
6
6
  "description": "",
7
7
  "type": "module",
8
8
  "files": [
9
9
  ".cli",
10
- ".cli/package.json"
10
+ "postinstall.js"
11
11
  ],
12
12
  "scripts": {
13
13
  "build": "tsup",
14
- "postinstall": "cd .cli && npm install"
14
+ "postinstall": "node postinstall.js"
15
15
  },
16
16
  "dependencies": {
17
17
  "@graphql-markdown/core": "^1.12.0",
package/postinstall.js ADDED
@@ -0,0 +1,16 @@
1
+ import {execSync} from 'child_process';
2
+ import {existsSync} from 'fs';
3
+ import {join} from 'path';
4
+
5
+ const cliDir = join(new URL('.', import.meta.url).pathname, '.cli');
6
+
7
+ if (existsSync(join(cliDir, 'package.json'))) {
8
+ const packageManager = process.env.npm_execpath.includes('pnpm') ? 'pnpm' : 'npm';
9
+ execSync(`${packageManager} install`, {cwd: cliDir, stdio: 'inherit'});
10
+
11
+ if (packageManager === 'pnpm') {
12
+ execSync(`${packageManager} link --global`, {cwd: cliDir, stdio: 'inherit'});
13
+ } else {
14
+ execSync(`${packageManager} link`, {cwd: cliDir, stdio: 'inherit'});
15
+ }
16
+ }