dsh-remote 0.8.90 → 0.8.92

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 (139) hide show
  1. package/README.en.md +1 -0
  2. package/README.md +1 -0
  3. package/lib/client.js +184 -70
  4. package/lib/credential.js +7 -0
  5. package/lib/index.js +125 -31
  6. package/lib/openssh.js +60 -1
  7. package/lib/pool.js +127 -68
  8. package/lib/posix-shell.cjs +34 -0
  9. package/lib/remote-shell-child.cjs +8 -11
  10. package/lib/remote-skills.js +312 -0
  11. package/lib/routes-fs.js +6 -0
  12. package/lib/routes-misc.js +38 -1
  13. package/lib/web-attach.js +17 -7
  14. package/package.json +11 -8
  15. package/node_modules/buildcheck/.eslintrc.js +0 -5
  16. package/node_modules/buildcheck/.github/workflows/ci.yml +0 -88
  17. package/node_modules/buildcheck/.github/workflows/lint.yml +0 -27
  18. package/node_modules/buildcheck/.npmignore +0 -3
  19. package/node_modules/buildcheck/LICENSE +0 -19
  20. package/node_modules/buildcheck/README.md +0 -106
  21. package/node_modules/buildcheck/deps/Find-VisualStudio.cs +0 -250
  22. package/node_modules/buildcheck/lib/findvs.js +0 -361
  23. package/node_modules/buildcheck/lib/index.js +0 -738
  24. package/node_modules/buildcheck/package.json +0 -36
  25. package/node_modules/buildcheck/test/test.js +0 -8
  26. package/node_modules/cpu-features/.eslintrc.js +0 -5
  27. package/node_modules/cpu-features/.github/workflows/ci.yml +0 -74
  28. package/node_modules/cpu-features/.github/workflows/lint.yml +0 -27
  29. package/node_modules/cpu-features/LICENSE +0 -19
  30. package/node_modules/cpu-features/README.md +0 -59
  31. package/node_modules/cpu-features/binding.gyp +0 -16
  32. package/node_modules/cpu-features/buildcheck.js +0 -32
  33. package/node_modules/cpu-features/deps/cpu_features/.clang-format +0 -4
  34. package/node_modules/cpu-features/deps/cpu_features/.dockerignore +0 -31
  35. package/node_modules/cpu-features/deps/cpu_features/.github/workflows/Dockerfile +0 -5
  36. package/node_modules/cpu-features/deps/cpu_features/.github/workflows/aarch64_linux_cmake.yml +0 -30
  37. package/node_modules/cpu-features/deps/cpu_features/.github/workflows/amd64_freebsd_cmake.yml +0 -22
  38. package/node_modules/cpu-features/deps/cpu_features/.github/workflows/amd64_linux_bazel.yml +0 -26
  39. package/node_modules/cpu-features/deps/cpu_features/.github/workflows/amd64_linux_cmake.yml +0 -31
  40. package/node_modules/cpu-features/deps/cpu_features/.github/workflows/amd64_macos_cmake.yml +0 -43
  41. package/node_modules/cpu-features/deps/cpu_features/.github/workflows/amd64_windows_cmake.yml +0 -25
  42. package/node_modules/cpu-features/deps/cpu_features/.github/workflows/arm_linux_cmake.yml +0 -31
  43. package/node_modules/cpu-features/deps/cpu_features/.github/workflows/clang_format.yml +0 -24
  44. package/node_modules/cpu-features/deps/cpu_features/.github/workflows/mips_linux_cmake.yml +0 -30
  45. package/node_modules/cpu-features/deps/cpu_features/.github/workflows/power_linux_cmake.yml +0 -29
  46. package/node_modules/cpu-features/deps/cpu_features/.github/workflows/riscv_linux_cmake.yml +0 -28
  47. package/node_modules/cpu-features/deps/cpu_features/.github/workflows/s390x_linux_cmake.yml +0 -27
  48. package/node_modules/cpu-features/deps/cpu_features/.grenrc.yml +0 -21
  49. package/node_modules/cpu-features/deps/cpu_features/BUILD.bazel +0 -329
  50. package/node_modules/cpu-features/deps/cpu_features/CMakeLists.txt +0 -261
  51. package/node_modules/cpu-features/deps/cpu_features/CONTRIBUTING.md +0 -23
  52. package/node_modules/cpu-features/deps/cpu_features/LICENSE +0 -230
  53. package/node_modules/cpu-features/deps/cpu_features/README.md +0 -272
  54. package/node_modules/cpu-features/deps/cpu_features/WORKSPACE +0 -19
  55. package/node_modules/cpu-features/deps/cpu_features/bazel/ci/README.md +0 -5
  56. package/node_modules/cpu-features/deps/cpu_features/bazel/platforms.bzl +0 -11
  57. package/node_modules/cpu-features/deps/cpu_features/cmake/CpuFeaturesConfig.cmake.in +0 -3
  58. package/node_modules/cpu-features/deps/cpu_features/cmake/CpuFeaturesNdkCompatConfig.cmake.in +0 -3
  59. package/node_modules/cpu-features/deps/cpu_features/cmake/README.md +0 -30
  60. package/node_modules/cpu-features/deps/cpu_features/cmake/ci/Makefile +0 -252
  61. package/node_modules/cpu-features/deps/cpu_features/cmake/ci/README.md +0 -40
  62. package/node_modules/cpu-features/deps/cpu_features/cmake/ci/doc/docker.dot +0 -64
  63. package/node_modules/cpu-features/deps/cpu_features/cmake/ci/doc/docker.svg +0 -312
  64. package/node_modules/cpu-features/deps/cpu_features/cmake/ci/doc/generate_image.sh +0 -7
  65. package/node_modules/cpu-features/deps/cpu_features/cmake/ci/docker/amd64/Dockerfile +0 -48
  66. package/node_modules/cpu-features/deps/cpu_features/cmake/ci/docker/toolchain/Dockerfile +0 -34
  67. package/node_modules/cpu-features/deps/cpu_features/cmake/ci/sample/CMakeLists.txt +0 -22
  68. package/node_modules/cpu-features/deps/cpu_features/cmake/ci/sample/main.cpp +0 -11
  69. package/node_modules/cpu-features/deps/cpu_features/cmake/ci/vagrant/freebsd/Vagrantfile +0 -107
  70. package/node_modules/cpu-features/deps/cpu_features/cmake/googletest.CMakeLists.txt.in +0 -15
  71. package/node_modules/cpu-features/deps/cpu_features/cpu_features.gyp +0 -105
  72. package/node_modules/cpu-features/deps/cpu_features/include/cpu_features_cache_info.h +0 -54
  73. package/node_modules/cpu-features/deps/cpu_features/include/cpu_features_macros.h +0 -384
  74. package/node_modules/cpu-features/deps/cpu_features/include/cpuinfo_aarch64.h +0 -259
  75. package/node_modules/cpu-features/deps/cpu_features/include/cpuinfo_arm.h +0 -121
  76. package/node_modules/cpu-features/deps/cpu_features/include/cpuinfo_mips.h +0 -74
  77. package/node_modules/cpu-features/deps/cpu_features/include/cpuinfo_ppc.h +0 -149
  78. package/node_modules/cpu-features/deps/cpu_features/include/cpuinfo_riscv.h +0 -72
  79. package/node_modules/cpu-features/deps/cpu_features/include/cpuinfo_s390x.h +0 -108
  80. package/node_modules/cpu-features/deps/cpu_features/include/cpuinfo_x86.h +0 -288
  81. package/node_modules/cpu-features/deps/cpu_features/include/internal/bit_utils.h +0 -40
  82. package/node_modules/cpu-features/deps/cpu_features/include/internal/cpuid_x86.h +0 -37
  83. package/node_modules/cpu-features/deps/cpu_features/include/internal/filesystem.h +0 -39
  84. package/node_modules/cpu-features/deps/cpu_features/include/internal/hwcaps.h +0 -240
  85. package/node_modules/cpu-features/deps/cpu_features/include/internal/stack_line_reader.h +0 -49
  86. package/node_modules/cpu-features/deps/cpu_features/include/internal/string_view.h +0 -110
  87. package/node_modules/cpu-features/deps/cpu_features/include/internal/windows_utils.h +0 -70
  88. package/node_modules/cpu-features/deps/cpu_features/ndk_compat/CMakeLists.txt +0 -60
  89. package/node_modules/cpu-features/deps/cpu_features/ndk_compat/README.md +0 -4
  90. package/node_modules/cpu-features/deps/cpu_features/ndk_compat/cpu-features.c +0 -205
  91. package/node_modules/cpu-features/deps/cpu_features/ndk_compat/cpu-features.h +0 -320
  92. package/node_modules/cpu-features/deps/cpu_features/ndk_compat/ndk-compat-test.c +0 -12
  93. package/node_modules/cpu-features/deps/cpu_features/patches/0001-Add-Apple-Silicon-Support.patch +0 -456
  94. package/node_modules/cpu-features/deps/cpu_features/scripts/generate_badges.d +0 -165
  95. package/node_modules/cpu-features/deps/cpu_features/scripts/make_release.sh +0 -75
  96. package/node_modules/cpu-features/deps/cpu_features/scripts/run_integration.sh +0 -490
  97. package/node_modules/cpu-features/deps/cpu_features/scripts/test_integration.sh +0 -79
  98. package/node_modules/cpu-features/deps/cpu_features/src/copy.inl +0 -19
  99. package/node_modules/cpu-features/deps/cpu_features/src/define_introspection.inl +0 -86
  100. package/node_modules/cpu-features/deps/cpu_features/src/define_introspection_and_hwcaps.inl +0 -26
  101. package/node_modules/cpu-features/deps/cpu_features/src/equals.inl +0 -22
  102. package/node_modules/cpu-features/deps/cpu_features/src/filesystem.c +0 -62
  103. package/node_modules/cpu-features/deps/cpu_features/src/hwcaps.c +0 -169
  104. package/node_modules/cpu-features/deps/cpu_features/src/impl_aarch64__base_implementation.inl +0 -88
  105. package/node_modules/cpu-features/deps/cpu_features/src/impl_aarch64_linux_or_android.c +0 -79
  106. package/node_modules/cpu-features/deps/cpu_features/src/impl_aarch64_macos_or_iphone.c +0 -82
  107. package/node_modules/cpu-features/deps/cpu_features/src/impl_aarch64_windows.c +0 -138
  108. package/node_modules/cpu-features/deps/cpu_features/src/impl_arm_linux_or_android.c +0 -212
  109. package/node_modules/cpu-features/deps/cpu_features/src/impl_mips_linux_or_android.c +0 -93
  110. package/node_modules/cpu-features/deps/cpu_features/src/impl_ppc_linux.c +0 -163
  111. package/node_modules/cpu-features/deps/cpu_features/src/impl_riscv_linux.c +0 -111
  112. package/node_modules/cpu-features/deps/cpu_features/src/impl_s390x_linux.c +0 -120
  113. package/node_modules/cpu-features/deps/cpu_features/src/impl_x86__base_implementation.inl +0 -2055
  114. package/node_modules/cpu-features/deps/cpu_features/src/impl_x86_freebsd.c +0 -68
  115. package/node_modules/cpu-features/deps/cpu_features/src/impl_x86_linux_or_android.c +0 -58
  116. package/node_modules/cpu-features/deps/cpu_features/src/impl_x86_macos.c +0 -57
  117. package/node_modules/cpu-features/deps/cpu_features/src/impl_x86_windows.c +0 -58
  118. package/node_modules/cpu-features/deps/cpu_features/src/stack_line_reader.c +0 -132
  119. package/node_modules/cpu-features/deps/cpu_features/src/string_view.c +0 -192
  120. package/node_modules/cpu-features/deps/cpu_features/src/utils/list_cpu_features.c +0 -461
  121. package/node_modules/cpu-features/deps/cpu_features/test/CMakeLists.txt +0 -114
  122. package/node_modules/cpu-features/deps/cpu_features/test/bit_utils_test.cc +0 -53
  123. package/node_modules/cpu-features/deps/cpu_features/test/cpuinfo_aarch64_test.cc +0 -396
  124. package/node_modules/cpu-features/deps/cpu_features/test/cpuinfo_arm_test.cc +0 -384
  125. package/node_modules/cpu-features/deps/cpu_features/test/cpuinfo_mips_test.cc +0 -176
  126. package/node_modules/cpu-features/deps/cpu_features/test/cpuinfo_ppc_test.cc +0 -131
  127. package/node_modules/cpu-features/deps/cpu_features/test/cpuinfo_riscv_test.cc +0 -180
  128. package/node_modules/cpu-features/deps/cpu_features/test/cpuinfo_s390x_test.cc +0 -82
  129. package/node_modules/cpu-features/deps/cpu_features/test/cpuinfo_x86_test.cc +0 -1729
  130. package/node_modules/cpu-features/deps/cpu_features/test/filesystem_for_testing.cc +0 -103
  131. package/node_modules/cpu-features/deps/cpu_features/test/filesystem_for_testing.h +0 -61
  132. package/node_modules/cpu-features/deps/cpu_features/test/hwcaps_for_testing.cc +0 -52
  133. package/node_modules/cpu-features/deps/cpu_features/test/hwcaps_for_testing.h +0 -31
  134. package/node_modules/cpu-features/deps/cpu_features/test/stack_line_reader_test.cc +0 -132
  135. package/node_modules/cpu-features/deps/cpu_features/test/string_view_test.cc +0 -202
  136. package/node_modules/cpu-features/lib/index.js +0 -5
  137. package/node_modules/cpu-features/package.json +0 -40
  138. package/node_modules/cpu-features/src/binding.cc +0 -151
  139. 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