dsh-remote 0.8.48 → 0.8.50

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 (132) hide show
  1. package/README.md +1 -0
  2. package/lib/client.js +100 -19
  3. package/lib/index.js +134 -26
  4. package/lib/remote-shell-child.cjs +305 -0
  5. package/lib/remote-shell.js +518 -0
  6. package/lib/sshconfig.js +256 -15
  7. package/package.json +1 -2
  8. package/node_modules/buildcheck/.eslintrc.js +0 -5
  9. package/node_modules/buildcheck/.github/workflows/ci.yml +0 -88
  10. package/node_modules/buildcheck/.github/workflows/lint.yml +0 -27
  11. package/node_modules/buildcheck/.npmignore +0 -3
  12. package/node_modules/buildcheck/LICENSE +0 -19
  13. package/node_modules/buildcheck/README.md +0 -106
  14. package/node_modules/buildcheck/deps/Find-VisualStudio.cs +0 -250
  15. package/node_modules/buildcheck/lib/findvs.js +0 -361
  16. package/node_modules/buildcheck/lib/index.js +0 -738
  17. package/node_modules/buildcheck/package.json +0 -36
  18. package/node_modules/buildcheck/test/test.js +0 -8
  19. package/node_modules/cpu-features/.eslintrc.js +0 -5
  20. package/node_modules/cpu-features/.github/workflows/ci.yml +0 -74
  21. package/node_modules/cpu-features/.github/workflows/lint.yml +0 -27
  22. package/node_modules/cpu-features/LICENSE +0 -19
  23. package/node_modules/cpu-features/README.md +0 -59
  24. package/node_modules/cpu-features/binding.gyp +0 -16
  25. package/node_modules/cpu-features/buildcheck.js +0 -32
  26. package/node_modules/cpu-features/deps/cpu_features/.clang-format +0 -4
  27. package/node_modules/cpu-features/deps/cpu_features/.dockerignore +0 -31
  28. package/node_modules/cpu-features/deps/cpu_features/.github/workflows/Dockerfile +0 -5
  29. package/node_modules/cpu-features/deps/cpu_features/.github/workflows/aarch64_linux_cmake.yml +0 -30
  30. package/node_modules/cpu-features/deps/cpu_features/.github/workflows/amd64_freebsd_cmake.yml +0 -22
  31. package/node_modules/cpu-features/deps/cpu_features/.github/workflows/amd64_linux_bazel.yml +0 -26
  32. package/node_modules/cpu-features/deps/cpu_features/.github/workflows/amd64_linux_cmake.yml +0 -31
  33. package/node_modules/cpu-features/deps/cpu_features/.github/workflows/amd64_macos_cmake.yml +0 -43
  34. package/node_modules/cpu-features/deps/cpu_features/.github/workflows/amd64_windows_cmake.yml +0 -25
  35. package/node_modules/cpu-features/deps/cpu_features/.github/workflows/arm_linux_cmake.yml +0 -31
  36. package/node_modules/cpu-features/deps/cpu_features/.github/workflows/clang_format.yml +0 -24
  37. package/node_modules/cpu-features/deps/cpu_features/.github/workflows/mips_linux_cmake.yml +0 -30
  38. package/node_modules/cpu-features/deps/cpu_features/.github/workflows/power_linux_cmake.yml +0 -29
  39. package/node_modules/cpu-features/deps/cpu_features/.github/workflows/riscv_linux_cmake.yml +0 -28
  40. package/node_modules/cpu-features/deps/cpu_features/.github/workflows/s390x_linux_cmake.yml +0 -27
  41. package/node_modules/cpu-features/deps/cpu_features/.grenrc.yml +0 -21
  42. package/node_modules/cpu-features/deps/cpu_features/BUILD.bazel +0 -329
  43. package/node_modules/cpu-features/deps/cpu_features/CMakeLists.txt +0 -261
  44. package/node_modules/cpu-features/deps/cpu_features/CONTRIBUTING.md +0 -23
  45. package/node_modules/cpu-features/deps/cpu_features/LICENSE +0 -230
  46. package/node_modules/cpu-features/deps/cpu_features/README.md +0 -272
  47. package/node_modules/cpu-features/deps/cpu_features/WORKSPACE +0 -19
  48. package/node_modules/cpu-features/deps/cpu_features/bazel/ci/README.md +0 -5
  49. package/node_modules/cpu-features/deps/cpu_features/bazel/platforms.bzl +0 -11
  50. package/node_modules/cpu-features/deps/cpu_features/cmake/CpuFeaturesConfig.cmake.in +0 -3
  51. package/node_modules/cpu-features/deps/cpu_features/cmake/CpuFeaturesNdkCompatConfig.cmake.in +0 -3
  52. package/node_modules/cpu-features/deps/cpu_features/cmake/README.md +0 -30
  53. package/node_modules/cpu-features/deps/cpu_features/cmake/ci/Makefile +0 -252
  54. package/node_modules/cpu-features/deps/cpu_features/cmake/ci/README.md +0 -40
  55. package/node_modules/cpu-features/deps/cpu_features/cmake/ci/doc/docker.dot +0 -64
  56. package/node_modules/cpu-features/deps/cpu_features/cmake/ci/doc/docker.svg +0 -312
  57. package/node_modules/cpu-features/deps/cpu_features/cmake/ci/doc/generate_image.sh +0 -7
  58. package/node_modules/cpu-features/deps/cpu_features/cmake/ci/docker/amd64/Dockerfile +0 -48
  59. package/node_modules/cpu-features/deps/cpu_features/cmake/ci/docker/toolchain/Dockerfile +0 -34
  60. package/node_modules/cpu-features/deps/cpu_features/cmake/ci/sample/CMakeLists.txt +0 -22
  61. package/node_modules/cpu-features/deps/cpu_features/cmake/ci/sample/main.cpp +0 -11
  62. package/node_modules/cpu-features/deps/cpu_features/cmake/ci/vagrant/freebsd/Vagrantfile +0 -107
  63. package/node_modules/cpu-features/deps/cpu_features/cmake/googletest.CMakeLists.txt.in +0 -15
  64. package/node_modules/cpu-features/deps/cpu_features/cpu_features.gyp +0 -105
  65. package/node_modules/cpu-features/deps/cpu_features/include/cpu_features_cache_info.h +0 -54
  66. package/node_modules/cpu-features/deps/cpu_features/include/cpu_features_macros.h +0 -384
  67. package/node_modules/cpu-features/deps/cpu_features/include/cpuinfo_aarch64.h +0 -259
  68. package/node_modules/cpu-features/deps/cpu_features/include/cpuinfo_arm.h +0 -121
  69. package/node_modules/cpu-features/deps/cpu_features/include/cpuinfo_mips.h +0 -74
  70. package/node_modules/cpu-features/deps/cpu_features/include/cpuinfo_ppc.h +0 -149
  71. package/node_modules/cpu-features/deps/cpu_features/include/cpuinfo_riscv.h +0 -72
  72. package/node_modules/cpu-features/deps/cpu_features/include/cpuinfo_s390x.h +0 -108
  73. package/node_modules/cpu-features/deps/cpu_features/include/cpuinfo_x86.h +0 -288
  74. package/node_modules/cpu-features/deps/cpu_features/include/internal/bit_utils.h +0 -40
  75. package/node_modules/cpu-features/deps/cpu_features/include/internal/cpuid_x86.h +0 -37
  76. package/node_modules/cpu-features/deps/cpu_features/include/internal/filesystem.h +0 -39
  77. package/node_modules/cpu-features/deps/cpu_features/include/internal/hwcaps.h +0 -240
  78. package/node_modules/cpu-features/deps/cpu_features/include/internal/stack_line_reader.h +0 -49
  79. package/node_modules/cpu-features/deps/cpu_features/include/internal/string_view.h +0 -110
  80. package/node_modules/cpu-features/deps/cpu_features/include/internal/windows_utils.h +0 -70
  81. package/node_modules/cpu-features/deps/cpu_features/ndk_compat/CMakeLists.txt +0 -60
  82. package/node_modules/cpu-features/deps/cpu_features/ndk_compat/README.md +0 -4
  83. package/node_modules/cpu-features/deps/cpu_features/ndk_compat/cpu-features.c +0 -205
  84. package/node_modules/cpu-features/deps/cpu_features/ndk_compat/cpu-features.h +0 -320
  85. package/node_modules/cpu-features/deps/cpu_features/ndk_compat/ndk-compat-test.c +0 -12
  86. package/node_modules/cpu-features/deps/cpu_features/patches/0001-Add-Apple-Silicon-Support.patch +0 -456
  87. package/node_modules/cpu-features/deps/cpu_features/scripts/generate_badges.d +0 -165
  88. package/node_modules/cpu-features/deps/cpu_features/scripts/make_release.sh +0 -75
  89. package/node_modules/cpu-features/deps/cpu_features/scripts/run_integration.sh +0 -490
  90. package/node_modules/cpu-features/deps/cpu_features/scripts/test_integration.sh +0 -79
  91. package/node_modules/cpu-features/deps/cpu_features/src/copy.inl +0 -19
  92. package/node_modules/cpu-features/deps/cpu_features/src/define_introspection.inl +0 -86
  93. package/node_modules/cpu-features/deps/cpu_features/src/define_introspection_and_hwcaps.inl +0 -26
  94. package/node_modules/cpu-features/deps/cpu_features/src/equals.inl +0 -22
  95. package/node_modules/cpu-features/deps/cpu_features/src/filesystem.c +0 -62
  96. package/node_modules/cpu-features/deps/cpu_features/src/hwcaps.c +0 -169
  97. package/node_modules/cpu-features/deps/cpu_features/src/impl_aarch64__base_implementation.inl +0 -88
  98. package/node_modules/cpu-features/deps/cpu_features/src/impl_aarch64_linux_or_android.c +0 -79
  99. package/node_modules/cpu-features/deps/cpu_features/src/impl_aarch64_macos_or_iphone.c +0 -82
  100. package/node_modules/cpu-features/deps/cpu_features/src/impl_aarch64_windows.c +0 -138
  101. package/node_modules/cpu-features/deps/cpu_features/src/impl_arm_linux_or_android.c +0 -212
  102. package/node_modules/cpu-features/deps/cpu_features/src/impl_mips_linux_or_android.c +0 -93
  103. package/node_modules/cpu-features/deps/cpu_features/src/impl_ppc_linux.c +0 -163
  104. package/node_modules/cpu-features/deps/cpu_features/src/impl_riscv_linux.c +0 -111
  105. package/node_modules/cpu-features/deps/cpu_features/src/impl_s390x_linux.c +0 -120
  106. package/node_modules/cpu-features/deps/cpu_features/src/impl_x86__base_implementation.inl +0 -2055
  107. package/node_modules/cpu-features/deps/cpu_features/src/impl_x86_freebsd.c +0 -68
  108. package/node_modules/cpu-features/deps/cpu_features/src/impl_x86_linux_or_android.c +0 -58
  109. package/node_modules/cpu-features/deps/cpu_features/src/impl_x86_macos.c +0 -57
  110. package/node_modules/cpu-features/deps/cpu_features/src/impl_x86_windows.c +0 -58
  111. package/node_modules/cpu-features/deps/cpu_features/src/stack_line_reader.c +0 -132
  112. package/node_modules/cpu-features/deps/cpu_features/src/string_view.c +0 -192
  113. package/node_modules/cpu-features/deps/cpu_features/src/utils/list_cpu_features.c +0 -461
  114. package/node_modules/cpu-features/deps/cpu_features/test/CMakeLists.txt +0 -114
  115. package/node_modules/cpu-features/deps/cpu_features/test/bit_utils_test.cc +0 -53
  116. package/node_modules/cpu-features/deps/cpu_features/test/cpuinfo_aarch64_test.cc +0 -396
  117. package/node_modules/cpu-features/deps/cpu_features/test/cpuinfo_arm_test.cc +0 -384
  118. package/node_modules/cpu-features/deps/cpu_features/test/cpuinfo_mips_test.cc +0 -176
  119. package/node_modules/cpu-features/deps/cpu_features/test/cpuinfo_ppc_test.cc +0 -131
  120. package/node_modules/cpu-features/deps/cpu_features/test/cpuinfo_riscv_test.cc +0 -180
  121. package/node_modules/cpu-features/deps/cpu_features/test/cpuinfo_s390x_test.cc +0 -82
  122. package/node_modules/cpu-features/deps/cpu_features/test/cpuinfo_x86_test.cc +0 -1729
  123. package/node_modules/cpu-features/deps/cpu_features/test/filesystem_for_testing.cc +0 -103
  124. package/node_modules/cpu-features/deps/cpu_features/test/filesystem_for_testing.h +0 -61
  125. package/node_modules/cpu-features/deps/cpu_features/test/hwcaps_for_testing.cc +0 -52
  126. package/node_modules/cpu-features/deps/cpu_features/test/hwcaps_for_testing.h +0 -31
  127. package/node_modules/cpu-features/deps/cpu_features/test/stack_line_reader_test.cc +0 -132
  128. package/node_modules/cpu-features/deps/cpu_features/test/string_view_test.cc +0 -202
  129. package/node_modules/cpu-features/lib/index.js +0 -5
  130. package/node_modules/cpu-features/package.json +0 -40
  131. package/node_modules/cpu-features/src/binding.cc +0 -151
  132. package/node_modules/cpu-features/test/test.js +0 -12
@@ -1,151 +0,0 @@
1
- #include <node.h>
2
- #include <node_buffer.h>
3
- #include <nan.h>
4
- #include <ctype.h> // isspace
5
-
6
- #include "cpu_features_macros.h"
7
-
8
- #if defined(CPU_FEATURES_ARCH_X86)
9
- # include "cpuinfo_x86.h"
10
- # define GetFeatureName GetX86FeaturesEnumName
11
- # define GetFeatureValue GetX86FeaturesEnumValue
12
- # define FeatureType X86Features
13
- # define FeatureEnumType X86FeaturesEnum
14
- # define LastFeature X86_LAST_
15
- #elif defined(CPU_FEATURES_ARCH_ARM)
16
- # include "cpuinfo_arm.h"
17
- # define GetFeatureName GetArmFeaturesEnumName
18
- # define GetFeatureValue GetArmFeaturesEnumValue
19
- # define FeatureType ArmFeatures
20
- # define FeatureEnumType ArmFeaturesEnum
21
- # define LastFeature ARM_LAST_
22
- #elif defined(CPU_FEATURES_ARCH_AARCH64)
23
- # include "cpuinfo_aarch64.h"
24
- # define GetFeatureName GetAarch64FeaturesEnumName
25
- # define GetFeatureValue GetAarch64FeaturesEnumValue
26
- # define FeatureType Aarch64Features
27
- # define FeatureEnumType Aarch64FeaturesEnum
28
- # define LastFeature AARCH64_LAST_
29
- #elif defined(CPU_FEATURES_ARCH_MIPS)
30
- # include "cpuinfo_mips.h"
31
- # define GetFeatureName GetMipsFeaturesEnumName
32
- # define GetFeatureValue GetMipsFeaturesEnumValue
33
- # define FeatureType MipsFeatures
34
- # define FeatureEnumType MipsFeaturesEnum
35
- # define LastFeature MIPS_LAST_
36
- #elif defined(CPU_FEATURES_ARCH_PPC)
37
- # include "cpuinfo_ppc.h"
38
- # define GetFeatureName GetPPCFeaturesEnumName
39
- # define GetFeatureValue GetPPCFeaturesEnumValue
40
- # define FeatureType PPCFeatures
41
- # define FeatureEnumType PPCFeaturesEnum
42
- # define LastFeature PPC_LAST_
43
- #endif
44
-
45
- #define SET_FLAG(key) \
46
- Nan::Set(ret, Nan::New<String>(key).ToLocalChecked(), Nan::New<Boolean>(true))
47
-
48
- #define SET_STR(key, val) \
49
- Nan::Set(ret, \
50
- Nan::New<String>(key).ToLocalChecked(), \
51
- Nan::New<String>(trim(val)).ToLocalChecked())
52
-
53
- #define SET_NUM(key, val) \
54
- Nan::Set(ret, Nan::New<String>(key).ToLocalChecked(), Nan::New<Number>(val))
55
-
56
- #define SET_VAL(key, val) \
57
- Nan::Set(ret, Nan::New<String>(key).ToLocalChecked(), val)
58
-
59
- using namespace node;
60
- using namespace v8;
61
- using namespace cpu_features;
62
- using namespace std;
63
-
64
- static inline void ltrim(string& s) {
65
- s.erase(s.begin(), find_if(s.begin(), s.end(), [](int ch) {
66
- return !isspace(ch);
67
- }));
68
- }
69
-
70
- static inline void rtrim(string& s) {
71
- s.erase(find_if(s.rbegin(), s.rend(), [](int ch) {
72
- return !isspace(ch);
73
- }).base(), s.end());
74
- }
75
-
76
- static inline string trim(const char* str) {
77
- string ret = str;
78
- ltrim(ret);
79
- rtrim(ret);
80
- return ret;
81
- }
82
-
83
- #if defined(LastFeature)
84
- Local<Object> GenerateFlags(const FeatureType* features) {
85
- const auto ret = Nan::New<Object>();
86
- for (size_t i = 0; i < LastFeature; ++i) {
87
- const auto enum_val = static_cast<FeatureEnumType>(i);
88
- if (GetFeatureValue(features, enum_val))
89
- SET_FLAG(GetFeatureName(enum_val));
90
- }
91
- return ret;
92
- }
93
- #endif
94
-
95
- NAN_METHOD(GetCPUInfo) {
96
- const auto ret = Nan::New<Object>();
97
- #if defined(CPU_FEATURES_ARCH_X86)
98
- const X86Info details = GetX86Info();
99
- SET_STR("arch", "x86");
100
- SET_STR("brand", details.brand_string);
101
- SET_NUM("family", details.family);
102
- SET_NUM("model", details.model);
103
- SET_NUM("stepping", details.stepping);
104
- SET_STR("uarch",
105
- GetX86MicroarchitectureName(GetX86Microarchitecture(&details)));
106
- SET_VAL("flags", GenerateFlags(&details.features));
107
- #elif defined(CPU_FEATURES_ARCH_ARM)
108
- const ArmInfo details = GetArmInfo();
109
- SET_STR("arch", "arm");
110
- SET_NUM("implementer", details.implementer);
111
- SET_NUM("architecture", details.architecture);
112
- SET_NUM("variant", details.variant);
113
- SET_NUM("part", details.part);
114
- SET_NUM("revision", details.revision);
115
- SET_VAL("flags", GenerateFlags(&details.features));
116
- #elif defined(CPU_FEATURES_ARCH_AARCH64)
117
- const Aarch64Info details = GetAarch64Info();
118
- SET_STR("arch", "aarch64");
119
- SET_NUM("implementer", details.implementer);
120
- SET_NUM("variant", details.variant);
121
- SET_NUM("part", details.part);
122
- SET_NUM("revision", details.revision);
123
- SET_VAL("flags", GenerateFlags(&details.features));
124
- #elif defined(CPU_FEATURES_ARCH_MIPS)
125
- const MipsInfo details = GetMipsInfo();
126
- SET_STR("arch", "mips");
127
- SET_VAL("flags", GenerateFlags(&details.features));
128
- #elif defined(CPU_FEATURES_ARCH_PPC)
129
- const PPCInfo details = GetPPCInfo();
130
- const PPCPlatformStrings strings = GetPPCPlatformStrings();
131
- SET_STR("arch", "ppc");
132
- SET_STR("platform", strings.platform);
133
- SET_STR("model", strings.model);
134
- SET_STR("machine", strings.machine);
135
- SET_STR("cpu", strings.cpu);
136
- SET_STR("instruction set", strings.type.platform);
137
- SET_STR("microarchitecture", strings.type.base_platform);
138
- SET_VAL("flags", GenerateFlags(&details.features));
139
- #else
140
- SET_STR("arch", "unknown");
141
- SET_VAL("flags", Nan::New<Object>());
142
- #endif
143
- info.GetReturnValue().Set(ret);
144
- }
145
-
146
- NAN_MODULE_INIT(init) {
147
- Nan::Set(target, Nan::New<String>("getCPUInfo").ToLocalChecked(),
148
- Nan::GetFunction(Nan::New<FunctionTemplate>(GetCPUInfo)).ToLocalChecked());
149
- }
150
-
151
- NODE_MODULE(cpufeatures, init)
@@ -1,12 +0,0 @@
1
- 'use strict';
2
-
3
- const assert = require('assert');
4
-
5
- const info = require('../lib/index.js')();
6
-
7
- console.log(info);
8
- assert(typeof info === 'object' && info !== null);
9
- assert(typeof info.arch === 'string' && info.arch);
10
- assert(typeof info.flags === 'object' && info.flags !== null);
11
- if (process.platform !== 'darwin' && process.arch !== 'arm64')
12
- assert(Object.keys(info).length > 2); // Assume we are on a known platform