@intuizi/cli 0.1.3 → 0.1.4

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.
@@ -512,4 +512,310 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
512
512
  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
513
513
  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
514
514
 
515
+ github.com/zalando/go-keyring (https://github.com/zalando/go-keyring), MIT
516
+ ----------------------------------------------------------------------
517
+ The MIT License (MIT)
518
+
519
+ Copyright (c) 2016 Zalando SE
520
+
521
+ Permission is hereby granted, free of charge, to any person obtaining a copy
522
+ of this software and associated documentation files (the "Software"), to deal
523
+ in the Software without restriction, including without limitation the rights
524
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
525
+ copies of the Software, and to permit persons to whom the Software is
526
+ furnished to do so, subject to the following conditions:
527
+
528
+ The above copyright notice and this permission notice shall be included in all
529
+ copies or substantial portions of the Software.
530
+
531
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
532
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
533
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
534
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
535
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
536
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
537
+ SOFTWARE.
538
+
539
+ github.com/zalando/go-keyring/keyring_darwin.go, Apache-2.0
540
+ (linked into the macOS binaries only)
541
+ ----------------------------------------------------------------------
542
+ Copyright 2013 Google Inc. All Rights Reserved.
543
+
544
+ Apache License
545
+ Version 2.0, January 2004
546
+ http://www.apache.org/licenses/
547
+
548
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
549
+
550
+ 1. Definitions.
551
+
552
+ "License" shall mean the terms and conditions for use, reproduction,
553
+ and distribution as defined by Sections 1 through 9 of this document.
554
+
555
+ "Licensor" shall mean the copyright owner or entity authorized by
556
+ the copyright owner that is granting the License.
557
+
558
+ "Legal Entity" shall mean the union of the acting entity and all
559
+ other entities that control, are controlled by, or are under common
560
+ control with that entity. For the purposes of this definition,
561
+ "control" means (i) the power, direct or indirect, to cause the
562
+ direction or management of such entity, whether by contract or
563
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
564
+ outstanding shares, or (iii) beneficial ownership of such entity.
565
+
566
+ "You" (or "Your") shall mean an individual or Legal Entity
567
+ exercising permissions granted by this License.
568
+
569
+ "Source" form shall mean the preferred form for making modifications,
570
+ including but not limited to software source code, documentation
571
+ source, and configuration files.
572
+
573
+ "Object" form shall mean any form resulting from mechanical
574
+ transformation or translation of a Source form, including but
575
+ not limited to compiled object code, generated documentation,
576
+ and conversions to other media types.
577
+
578
+ "Work" shall mean the work of authorship, whether in Source or
579
+ Object form, made available under the License, as indicated by a
580
+ copyright notice that is included in or attached to the work
581
+ (an example is provided in the Appendix below).
582
+
583
+ "Derivative Works" shall mean any work, whether in Source or Object
584
+ form, that is based on (or derived from) the Work and for which the
585
+ editorial revisions, annotations, elaborations, or other modifications
586
+ represent, as a whole, an original work of authorship. For the purposes
587
+ of this License, Derivative Works shall not include works that remain
588
+ separable from, or merely link (or bind by name) to the interfaces of,
589
+ the Work and Derivative Works thereof.
515
590
 
591
+ "Contribution" shall mean any work of authorship, including
592
+ the original version of the Work and any modifications or additions
593
+ to that Work or Derivative Works thereof, that is intentionally
594
+ submitted to Licensor for inclusion in the Work by the copyright owner
595
+ or by an individual or Legal Entity authorized to submit on behalf of
596
+ the copyright owner. For the purposes of this definition, "submitted"
597
+ means any form of electronic, verbal, or written communication sent
598
+ to the Licensor or its representatives, including but not limited to
599
+ communication on electronic mailing lists, source code control systems,
600
+ and issue tracking systems that are managed by, or on behalf of, the
601
+ Licensor for the purpose of discussing and improving the Work, but
602
+ excluding communication that is conspicuously marked or otherwise
603
+ designated in writing by the copyright owner as "Not a Contribution."
604
+
605
+ "Contributor" shall mean Licensor and any individual or Legal Entity
606
+ on behalf of whom a Contribution has been received by Licensor and
607
+ subsequently incorporated within the Work.
608
+
609
+ 2. Grant of Copyright License. Subject to the terms and conditions of
610
+ this License, each Contributor hereby grants to You a perpetual,
611
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
612
+ copyright license to reproduce, prepare Derivative Works of,
613
+ publicly display, publicly perform, sublicense, and distribute the
614
+ Work and such Derivative Works in Source or Object form.
615
+
616
+ 3. Grant of Patent License. Subject to the terms and conditions of
617
+ this License, each Contributor hereby grants to You a perpetual,
618
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
619
+ (except as stated in this section) patent license to make, have made,
620
+ use, offer to sell, sell, import, and otherwise transfer the Work,
621
+ where such license applies only to those patent claims licensable
622
+ by such Contributor that are necessarily infringed by their
623
+ Contribution(s) alone or by combination of their Contribution(s)
624
+ with the Work to which such Contribution(s) was submitted. If You
625
+ institute patent litigation against any entity (including a
626
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
627
+ or a Contribution incorporated within the Work constitutes direct
628
+ or contributory patent infringement, then any patent licenses
629
+ granted to You under this License for that Work shall terminate
630
+ as of the date such litigation is filed.
631
+
632
+ 4. Redistribution. You may reproduce and distribute copies of the
633
+ Work or Derivative Works thereof in any medium, with or without
634
+ modifications, and in Source or Object form, provided that You
635
+ meet the following conditions:
636
+
637
+ (a) You must give any other recipients of the Work or
638
+ Derivative Works a copy of this License; and
639
+
640
+ (b) You must cause any modified files to carry prominent notices
641
+ stating that You changed the files; and
642
+
643
+ (c) You must retain, in the Source form of any Derivative Works
644
+ that You distribute, all copyright, patent, trademark, and
645
+ attribution notices from the Source form of the Work,
646
+ excluding those notices that do not pertain to any part of
647
+ the Derivative Works; and
648
+
649
+ (d) If the Work includes a "NOTICE" text file as part of its
650
+ distribution, then any Derivative Works that You distribute must
651
+ include a readable copy of the attribution notices contained
652
+ within such NOTICE file, excluding those notices that do not
653
+ pertain to any part of the Derivative Works, in at least one
654
+ of the following places: within a NOTICE text file distributed
655
+ as part of the Derivative Works; within the Source form or
656
+ documentation, if provided along with the Derivative Works; or,
657
+ within a display generated by the Derivative Works, if and
658
+ wherever such third-party notices normally appear. The contents
659
+ of the NOTICE file are for informational purposes only and
660
+ do not modify the License. You may add Your own attribution
661
+ notices within Derivative Works that You distribute, alongside
662
+ or as an addendum to the NOTICE text from the Work, provided
663
+ that such additional attribution notices cannot be construed
664
+ as modifying the License.
665
+
666
+ You may add Your own copyright statement to Your modifications and
667
+ may provide additional or different license terms and conditions
668
+ for use, reproduction, or distribution of Your modifications, or
669
+ for any such Derivative Works as a whole, provided Your use,
670
+ reproduction, and distribution of the Work otherwise complies with
671
+ the conditions stated in this License.
672
+
673
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
674
+ any Contribution intentionally submitted for inclusion in the Work
675
+ by You to the Licensor shall be under the terms and conditions of
676
+ this License, without any additional terms or conditions.
677
+ Notwithstanding the above, nothing herein shall supersede or modify
678
+ the terms of any separate license agreement you may have executed
679
+ with Licensor regarding such Contributions.
680
+
681
+ 6. Trademarks. This License does not grant permission to use the trade
682
+ names, trademarks, service marks, or product names of the Licensor,
683
+ except as required for reasonable and customary use in describing the
684
+ origin of the Work and reproducing the content of the NOTICE file.
685
+
686
+ 7. Disclaimer of Warranty. Unless required by applicable law or
687
+ agreed to in writing, Licensor provides the Work (and each
688
+ Contributor provides its Contributions) on an "AS IS" BASIS,
689
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
690
+ implied, including, without limitation, any warranties or conditions
691
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
692
+ PARTICULAR PURPOSE. You are solely responsible for determining the
693
+ appropriateness of using or redistributing the Work and assume any
694
+ risks associated with Your exercise of permissions under this License.
695
+
696
+ 8. Limitation of Liability. In no event and under no legal theory,
697
+ whether in tort (including negligence), contract, or otherwise,
698
+ unless required by applicable law (such as deliberate and grossly
699
+ negligent acts) or agreed to in writing, shall any Contributor be
700
+ liable to You for damages, including any direct, indirect, special,
701
+ incidental, or consequential damages of any character arising as a
702
+ result of this License or out of the use or inability to use the
703
+ Work (including but not limited to damages for loss of goodwill,
704
+ work stoppage, computer failure or malfunction, or any and all
705
+ other commercial damages or losses), even if such Contributor
706
+ has been advised of the possibility of such damages.
707
+
708
+ 9. Accepting Warranty or Additional Liability. While redistributing
709
+ the Work or Derivative Works thereof, You may choose to offer,
710
+ and charge a fee for, acceptance of support, warranty, indemnity,
711
+ or other liability obligations and/or rights consistent with this
712
+ License. However, in accepting such obligations, You may act only
713
+ on Your own behalf and on Your sole responsibility, not on behalf
714
+ of any other Contributor, and only if You agree to indemnify,
715
+ defend, and hold each Contributor harmless for any liability
716
+ incurred by, or claims asserted against, such Contributor by reason
717
+ of your accepting any such warranty or additional liability.
718
+
719
+ END OF TERMS AND CONDITIONS
720
+
721
+ APPENDIX: How to apply the Apache License to your work.
722
+
723
+ To apply the Apache License to your work, attach the following
724
+ boilerplate notice, with the fields enclosed by brackets "[]"
725
+ replaced with your own identifying information. (Don't include
726
+ the brackets!) The text should be enclosed in the appropriate
727
+ comment syntax for the file format. We also recommend that a
728
+ file or class name and description of purpose be included on the
729
+ same "printed page" as the copyright notice for easier
730
+ identification within third-party archives.
731
+
732
+ Copyright 2022 Alan Shreve (@inconshreveable)
733
+
734
+ Licensed under the Apache License, Version 2.0 (the "License");
735
+ you may not use this file except in compliance with the License.
736
+ You may obtain a copy of the License at
737
+
738
+ http://www.apache.org/licenses/LICENSE-2.0
739
+
740
+ Unless required by applicable law or agreed to in writing, software
741
+ distributed under the License is distributed on an "AS IS" BASIS,
742
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
743
+ See the License for the specific language governing permissions and
744
+ limitations under the License.
745
+
746
+ github.com/zalando/go-keyring/internal/shellescape, MIT
747
+ (linked into the macOS binaries only)
748
+ ----------------------------------------------------------------------
749
+ The MIT License (MIT)
750
+
751
+ Copyright (c) 2016 Alessio Treglia
752
+
753
+ Permission is hereby granted, free of charge, to any person obtaining a copy
754
+ of this software and associated documentation files (the "Software"), to deal
755
+ in the Software without restriction, including without limitation the rights
756
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
757
+ copies of the Software, and to permit persons to whom the Software is
758
+ furnished to do so, subject to the following conditions:
759
+
760
+ The above copyright notice and this permission notice shall be included in all
761
+ copies or substantial portions of the Software.
762
+
763
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
764
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
765
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
766
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
767
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
768
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
769
+ SOFTWARE.
770
+
771
+ github.com/godbus/dbus (https://github.com/godbus/dbus), BSD-2-Clause
772
+ ----------------------------------------------------------------------
773
+ Copyright (c) 2013, Georg Reinke (<guelfey at gmail dot com>), Google
774
+ All rights reserved.
775
+
776
+ Redistribution and use in source and binary forms, with or without
777
+ modification, are permitted provided that the following conditions
778
+ are met:
779
+
780
+ 1. Redistributions of source code must retain the above copyright notice,
781
+ this list of conditions and the following disclaimer.
782
+
783
+ 2. Redistributions in binary form must reproduce the above copyright
784
+ notice, this list of conditions and the following disclaimer in the
785
+ documentation and/or other materials provided with the distribution.
786
+
787
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
788
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
789
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
790
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
791
+ HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
792
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
793
+ TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
794
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
795
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
796
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
797
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
798
+
799
+ github.com/danieljoos/wincred (https://github.com/danieljoos/wincred), MIT
800
+ ----------------------------------------------------------------------
801
+ The MIT License (MIT)
802
+
803
+ Copyright (c) 2014 Daniel Joos
804
+
805
+ Permission is hereby granted, free of charge, to any person obtaining a copy
806
+ of this software and associated documentation files (the "Software"), to deal
807
+ in the Software without restriction, including without limitation the rights
808
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
809
+ copies of the Software, and to permit persons to whom the Software is
810
+ furnished to do so, subject to the following conditions:
811
+
812
+ The above copyright notice and this permission notice shall be included in all
813
+ copies or substantial portions of the Software.
814
+
815
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
816
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
817
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
818
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
819
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
820
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
821
+ SOFTWARE.
package/bin/intuizi.js CHANGED
@@ -6,7 +6,7 @@
6
6
  // through arguments, stdio, exit code and signals unchanged, so scripts see
7
7
  // the same contract they would from the bare binary.
8
8
 
9
- const { spawnSync } = require("node:child_process");
9
+ const { spawn } = require("node:child_process");
10
10
  const os = require("node:os");
11
11
  const path = require("node:path");
12
12
 
@@ -30,21 +30,37 @@ try {
30
30
  process.exit(1);
31
31
  }
32
32
 
33
+ // Asynchronous, so the handlers below can run while the binary does.
34
+ const child = spawn(bin, process.argv.slice(2), { stdio: "inherit", windowsHide: true });
35
+
33
36
  // Ctrl-C reaches the child through the shared terminal. Ignore it here so the
34
37
  // binary, which maps it to exit 130, decides the exit code rather than Node
35
38
  // dying first with its own.
36
39
  process.on("SIGINT", () => {});
37
- process.on("SIGTERM", () => {});
38
40
 
39
- const result = spawnSync(bin, process.argv.slice(2), { stdio: "inherit", windowsHide: true });
41
+ // A supervisor - Docker, systemd, a CI runner, kill <pid> - sends SIGTERM or
42
+ // SIGHUP to the process it started, which is this one, so pass it on and let
43
+ // the binary decide the exit code. When the whole process group was signalled
44
+ // the binary has it already, and a second SIGTERM still ends in 143.
45
+ const forwarded = process.platform === "win32" ? ["SIGTERM"] : ["SIGTERM", "SIGHUP"];
46
+ for (const sig of forwarded) {
47
+ process.on(sig, () => {
48
+ if (child.exitCode === null && child.signalCode === null) {
49
+ child.kill(sig);
50
+ }
51
+ });
52
+ }
40
53
 
41
- if (result.error) {
42
- process.stderr.write(`intuizi: could not run ${bin}: ${result.error.message}\n`);
54
+ child.on("error", (err) => {
55
+ process.stderr.write(`intuizi: could not run ${bin}: ${err.message}\n`);
43
56
  process.exit(1);
44
- }
45
- if (result.signal) {
46
- // The binary died from a signal it did not catch. Report 128+N the way a
47
- // shell would, so callers cannot tell the shim was there.
48
- process.exit(128 + (os.constants.signals[result.signal] || 0));
49
- }
50
- process.exit(result.status === null ? 1 : result.status);
57
+ });
58
+
59
+ child.on("exit", (code, signal) => {
60
+ if (signal) {
61
+ // The binary died from a signal it did not catch. Report 128+N the way a
62
+ // shell would, so callers cannot tell the shim was there.
63
+ process.exit(128 + (os.constants.signals[signal] || 0));
64
+ }
65
+ process.exit(code === null ? 1 : code);
66
+ });
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "activations",
9
9
  "geo-signals"
10
10
  ],
11
- "version": "0.1.3",
11
+ "version": "0.1.4",
12
12
  "homepage": "https://github.com/intuizi/intuizi-cli#readme",
13
13
  "repository": {
14
14
  "type": "git",
@@ -32,11 +32,11 @@
32
32
  "node": ">=18"
33
33
  },
34
34
  "optionalDependencies": {
35
- "@intuizi/cli-darwin-arm64": "0.1.3",
36
- "@intuizi/cli-darwin-x64": "0.1.3",
37
- "@intuizi/cli-linux-arm64": "0.1.3",
38
- "@intuizi/cli-linux-x64": "0.1.3",
39
- "@intuizi/cli-win32-arm64": "0.1.3",
40
- "@intuizi/cli-win32-x64": "0.1.3"
35
+ "@intuizi/cli-darwin-arm64": "0.1.4",
36
+ "@intuizi/cli-darwin-x64": "0.1.4",
37
+ "@intuizi/cli-linux-arm64": "0.1.4",
38
+ "@intuizi/cli-linux-x64": "0.1.4",
39
+ "@intuizi/cli-win32-arm64": "0.1.4",
40
+ "@intuizi/cli-win32-x64": "0.1.4"
41
41
  }
42
42
  }