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.
- package/README.md +1 -0
- package/lib/client.js +100 -19
- package/lib/index.js +134 -26
- package/lib/remote-shell-child.cjs +305 -0
- package/lib/remote-shell.js +518 -0
- package/lib/sshconfig.js +256 -15
- package/package.json +1 -2
- package/node_modules/buildcheck/.eslintrc.js +0 -5
- package/node_modules/buildcheck/.github/workflows/ci.yml +0 -88
- package/node_modules/buildcheck/.github/workflows/lint.yml +0 -27
- package/node_modules/buildcheck/.npmignore +0 -3
- package/node_modules/buildcheck/LICENSE +0 -19
- package/node_modules/buildcheck/README.md +0 -106
- package/node_modules/buildcheck/deps/Find-VisualStudio.cs +0 -250
- package/node_modules/buildcheck/lib/findvs.js +0 -361
- package/node_modules/buildcheck/lib/index.js +0 -738
- package/node_modules/buildcheck/package.json +0 -36
- package/node_modules/buildcheck/test/test.js +0 -8
- package/node_modules/cpu-features/.eslintrc.js +0 -5
- package/node_modules/cpu-features/.github/workflows/ci.yml +0 -74
- package/node_modules/cpu-features/.github/workflows/lint.yml +0 -27
- package/node_modules/cpu-features/LICENSE +0 -19
- package/node_modules/cpu-features/README.md +0 -59
- package/node_modules/cpu-features/binding.gyp +0 -16
- package/node_modules/cpu-features/buildcheck.js +0 -32
- package/node_modules/cpu-features/deps/cpu_features/.clang-format +0 -4
- package/node_modules/cpu-features/deps/cpu_features/.dockerignore +0 -31
- package/node_modules/cpu-features/deps/cpu_features/.github/workflows/Dockerfile +0 -5
- package/node_modules/cpu-features/deps/cpu_features/.github/workflows/aarch64_linux_cmake.yml +0 -30
- package/node_modules/cpu-features/deps/cpu_features/.github/workflows/amd64_freebsd_cmake.yml +0 -22
- package/node_modules/cpu-features/deps/cpu_features/.github/workflows/amd64_linux_bazel.yml +0 -26
- package/node_modules/cpu-features/deps/cpu_features/.github/workflows/amd64_linux_cmake.yml +0 -31
- package/node_modules/cpu-features/deps/cpu_features/.github/workflows/amd64_macos_cmake.yml +0 -43
- package/node_modules/cpu-features/deps/cpu_features/.github/workflows/amd64_windows_cmake.yml +0 -25
- package/node_modules/cpu-features/deps/cpu_features/.github/workflows/arm_linux_cmake.yml +0 -31
- package/node_modules/cpu-features/deps/cpu_features/.github/workflows/clang_format.yml +0 -24
- package/node_modules/cpu-features/deps/cpu_features/.github/workflows/mips_linux_cmake.yml +0 -30
- package/node_modules/cpu-features/deps/cpu_features/.github/workflows/power_linux_cmake.yml +0 -29
- package/node_modules/cpu-features/deps/cpu_features/.github/workflows/riscv_linux_cmake.yml +0 -28
- package/node_modules/cpu-features/deps/cpu_features/.github/workflows/s390x_linux_cmake.yml +0 -27
- package/node_modules/cpu-features/deps/cpu_features/.grenrc.yml +0 -21
- package/node_modules/cpu-features/deps/cpu_features/BUILD.bazel +0 -329
- package/node_modules/cpu-features/deps/cpu_features/CMakeLists.txt +0 -261
- package/node_modules/cpu-features/deps/cpu_features/CONTRIBUTING.md +0 -23
- package/node_modules/cpu-features/deps/cpu_features/LICENSE +0 -230
- package/node_modules/cpu-features/deps/cpu_features/README.md +0 -272
- package/node_modules/cpu-features/deps/cpu_features/WORKSPACE +0 -19
- package/node_modules/cpu-features/deps/cpu_features/bazel/ci/README.md +0 -5
- package/node_modules/cpu-features/deps/cpu_features/bazel/platforms.bzl +0 -11
- package/node_modules/cpu-features/deps/cpu_features/cmake/CpuFeaturesConfig.cmake.in +0 -3
- package/node_modules/cpu-features/deps/cpu_features/cmake/CpuFeaturesNdkCompatConfig.cmake.in +0 -3
- package/node_modules/cpu-features/deps/cpu_features/cmake/README.md +0 -30
- package/node_modules/cpu-features/deps/cpu_features/cmake/ci/Makefile +0 -252
- package/node_modules/cpu-features/deps/cpu_features/cmake/ci/README.md +0 -40
- package/node_modules/cpu-features/deps/cpu_features/cmake/ci/doc/docker.dot +0 -64
- package/node_modules/cpu-features/deps/cpu_features/cmake/ci/doc/docker.svg +0 -312
- package/node_modules/cpu-features/deps/cpu_features/cmake/ci/doc/generate_image.sh +0 -7
- package/node_modules/cpu-features/deps/cpu_features/cmake/ci/docker/amd64/Dockerfile +0 -48
- package/node_modules/cpu-features/deps/cpu_features/cmake/ci/docker/toolchain/Dockerfile +0 -34
- package/node_modules/cpu-features/deps/cpu_features/cmake/ci/sample/CMakeLists.txt +0 -22
- package/node_modules/cpu-features/deps/cpu_features/cmake/ci/sample/main.cpp +0 -11
- package/node_modules/cpu-features/deps/cpu_features/cmake/ci/vagrant/freebsd/Vagrantfile +0 -107
- package/node_modules/cpu-features/deps/cpu_features/cmake/googletest.CMakeLists.txt.in +0 -15
- package/node_modules/cpu-features/deps/cpu_features/cpu_features.gyp +0 -105
- package/node_modules/cpu-features/deps/cpu_features/include/cpu_features_cache_info.h +0 -54
- package/node_modules/cpu-features/deps/cpu_features/include/cpu_features_macros.h +0 -384
- package/node_modules/cpu-features/deps/cpu_features/include/cpuinfo_aarch64.h +0 -259
- package/node_modules/cpu-features/deps/cpu_features/include/cpuinfo_arm.h +0 -121
- package/node_modules/cpu-features/deps/cpu_features/include/cpuinfo_mips.h +0 -74
- package/node_modules/cpu-features/deps/cpu_features/include/cpuinfo_ppc.h +0 -149
- package/node_modules/cpu-features/deps/cpu_features/include/cpuinfo_riscv.h +0 -72
- package/node_modules/cpu-features/deps/cpu_features/include/cpuinfo_s390x.h +0 -108
- package/node_modules/cpu-features/deps/cpu_features/include/cpuinfo_x86.h +0 -288
- package/node_modules/cpu-features/deps/cpu_features/include/internal/bit_utils.h +0 -40
- package/node_modules/cpu-features/deps/cpu_features/include/internal/cpuid_x86.h +0 -37
- package/node_modules/cpu-features/deps/cpu_features/include/internal/filesystem.h +0 -39
- package/node_modules/cpu-features/deps/cpu_features/include/internal/hwcaps.h +0 -240
- package/node_modules/cpu-features/deps/cpu_features/include/internal/stack_line_reader.h +0 -49
- package/node_modules/cpu-features/deps/cpu_features/include/internal/string_view.h +0 -110
- package/node_modules/cpu-features/deps/cpu_features/include/internal/windows_utils.h +0 -70
- package/node_modules/cpu-features/deps/cpu_features/ndk_compat/CMakeLists.txt +0 -60
- package/node_modules/cpu-features/deps/cpu_features/ndk_compat/README.md +0 -4
- package/node_modules/cpu-features/deps/cpu_features/ndk_compat/cpu-features.c +0 -205
- package/node_modules/cpu-features/deps/cpu_features/ndk_compat/cpu-features.h +0 -320
- package/node_modules/cpu-features/deps/cpu_features/ndk_compat/ndk-compat-test.c +0 -12
- package/node_modules/cpu-features/deps/cpu_features/patches/0001-Add-Apple-Silicon-Support.patch +0 -456
- package/node_modules/cpu-features/deps/cpu_features/scripts/generate_badges.d +0 -165
- package/node_modules/cpu-features/deps/cpu_features/scripts/make_release.sh +0 -75
- package/node_modules/cpu-features/deps/cpu_features/scripts/run_integration.sh +0 -490
- package/node_modules/cpu-features/deps/cpu_features/scripts/test_integration.sh +0 -79
- package/node_modules/cpu-features/deps/cpu_features/src/copy.inl +0 -19
- package/node_modules/cpu-features/deps/cpu_features/src/define_introspection.inl +0 -86
- package/node_modules/cpu-features/deps/cpu_features/src/define_introspection_and_hwcaps.inl +0 -26
- package/node_modules/cpu-features/deps/cpu_features/src/equals.inl +0 -22
- package/node_modules/cpu-features/deps/cpu_features/src/filesystem.c +0 -62
- package/node_modules/cpu-features/deps/cpu_features/src/hwcaps.c +0 -169
- package/node_modules/cpu-features/deps/cpu_features/src/impl_aarch64__base_implementation.inl +0 -88
- package/node_modules/cpu-features/deps/cpu_features/src/impl_aarch64_linux_or_android.c +0 -79
- package/node_modules/cpu-features/deps/cpu_features/src/impl_aarch64_macos_or_iphone.c +0 -82
- package/node_modules/cpu-features/deps/cpu_features/src/impl_aarch64_windows.c +0 -138
- package/node_modules/cpu-features/deps/cpu_features/src/impl_arm_linux_or_android.c +0 -212
- package/node_modules/cpu-features/deps/cpu_features/src/impl_mips_linux_or_android.c +0 -93
- package/node_modules/cpu-features/deps/cpu_features/src/impl_ppc_linux.c +0 -163
- package/node_modules/cpu-features/deps/cpu_features/src/impl_riscv_linux.c +0 -111
- package/node_modules/cpu-features/deps/cpu_features/src/impl_s390x_linux.c +0 -120
- package/node_modules/cpu-features/deps/cpu_features/src/impl_x86__base_implementation.inl +0 -2055
- package/node_modules/cpu-features/deps/cpu_features/src/impl_x86_freebsd.c +0 -68
- package/node_modules/cpu-features/deps/cpu_features/src/impl_x86_linux_or_android.c +0 -58
- package/node_modules/cpu-features/deps/cpu_features/src/impl_x86_macos.c +0 -57
- package/node_modules/cpu-features/deps/cpu_features/src/impl_x86_windows.c +0 -58
- package/node_modules/cpu-features/deps/cpu_features/src/stack_line_reader.c +0 -132
- package/node_modules/cpu-features/deps/cpu_features/src/string_view.c +0 -192
- package/node_modules/cpu-features/deps/cpu_features/src/utils/list_cpu_features.c +0 -461
- package/node_modules/cpu-features/deps/cpu_features/test/CMakeLists.txt +0 -114
- package/node_modules/cpu-features/deps/cpu_features/test/bit_utils_test.cc +0 -53
- package/node_modules/cpu-features/deps/cpu_features/test/cpuinfo_aarch64_test.cc +0 -396
- package/node_modules/cpu-features/deps/cpu_features/test/cpuinfo_arm_test.cc +0 -384
- package/node_modules/cpu-features/deps/cpu_features/test/cpuinfo_mips_test.cc +0 -176
- package/node_modules/cpu-features/deps/cpu_features/test/cpuinfo_ppc_test.cc +0 -131
- package/node_modules/cpu-features/deps/cpu_features/test/cpuinfo_riscv_test.cc +0 -180
- package/node_modules/cpu-features/deps/cpu_features/test/cpuinfo_s390x_test.cc +0 -82
- package/node_modules/cpu-features/deps/cpu_features/test/cpuinfo_x86_test.cc +0 -1729
- package/node_modules/cpu-features/deps/cpu_features/test/filesystem_for_testing.cc +0 -103
- package/node_modules/cpu-features/deps/cpu_features/test/filesystem_for_testing.h +0 -61
- package/node_modules/cpu-features/deps/cpu_features/test/hwcaps_for_testing.cc +0 -52
- package/node_modules/cpu-features/deps/cpu_features/test/hwcaps_for_testing.h +0 -31
- package/node_modules/cpu-features/deps/cpu_features/test/stack_line_reader_test.cc +0 -132
- package/node_modules/cpu-features/deps/cpu_features/test/string_view_test.cc +0 -202
- package/node_modules/cpu-features/lib/index.js +0 -5
- package/node_modules/cpu-features/package.json +0 -40
- package/node_modules/cpu-features/src/binding.cc +0 -151
- 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
|