@maciejwojs/screen-capture 0.1.0 → 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.
- package/README.md +0 -0
- package/binding.gyp +0 -0
- package/dist/index.d.ts +0 -0
- package/dist/index.js +0 -0
- package/package.json +6 -6
- package/prebuilds/linux-x64/@maciejwojs+screen-capture.node +0 -0
- package/prebuilds/win32-x64/@maciejwojs+screen-capture.node +0 -0
- package/src/addon.cpp +0 -0
- package/src/linux/platform_capture_linux.cpp +0 -0
- package/src/platform_capture.hpp +0 -0
- package/src/platform_capture_stub.cpp +24 -24
- package/src/types.d.ts +4 -4
- package/src/win/platform_capture_win.cpp +0 -0
package/README.md
CHANGED
|
File without changes
|
package/binding.gyp
CHANGED
|
File without changes
|
package/dist/index.d.ts
CHANGED
|
File without changes
|
package/dist/index.js
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maciejwojs/screen-capture",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Native screen capture addon for Node.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
|
-
"url": "
|
|
8
|
+
"url": "https://github.com/MaciejWojs/screen-capture.git"
|
|
9
9
|
},
|
|
10
10
|
"keywords": [
|
|
11
11
|
"screen-capture",
|
|
@@ -37,12 +37,12 @@
|
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|
|
39
39
|
"build": "bun x tsc",
|
|
40
|
+
"prepublishOnly": "bun run build",
|
|
40
41
|
"rebuild": "node-gyp rebuild",
|
|
41
|
-
"prebuildify": "bun run build && prebuildify --napi --strip --node-gyp
|
|
42
|
-
"prebuildify:all": "bun run
|
|
42
|
+
"prebuildify": "bun run build && bun x prebuildify --napi --strip --node-gyp node-gyp",
|
|
43
|
+
"prebuildify:all": "bun run prebuildify --platform win32 --platform linux --platform darwin",
|
|
43
44
|
"test:load": "bun run build && node -e \"import('./dist/index.js').then(() => console.log('addon loaded'))\"",
|
|
44
|
-
"install": "node-gyp-build"
|
|
45
|
-
"prepack": "bun run build"
|
|
45
|
+
"install": "node-gyp-build"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/bun": "latest",
|
|
Binary file
|
|
Binary file
|
package/src/addon.cpp
CHANGED
|
File without changes
|
|
File without changes
|
package/src/platform_capture.hpp
CHANGED
|
File without changes
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
#ifndef _WIN32
|
|
2
|
-
|
|
3
|
-
#include "platform_capture.hpp"
|
|
4
|
-
|
|
5
|
-
#include <stdexcept>
|
|
6
|
-
|
|
7
|
-
class StubPlatformCapture final : public IPlatformCapture {
|
|
8
|
-
public:
|
|
9
|
-
void Start(Napi::Env) override {
|
|
10
|
-
throw std::runtime_error("Screen capture backend is not implemented for this platform yet");
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
void Stop() override {}
|
|
14
|
-
|
|
15
|
-
std::optional<SharedHandleInfo> GetSharedHandle() const override {
|
|
16
|
-
return std::nullopt;
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
std::unique_ptr<IPlatformCapture> CreatePlatformCapture() {
|
|
21
|
-
return std::make_unique<StubPlatformCapture>();
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
#endif
|
|
1
|
+
#ifndef _WIN32
|
|
2
|
+
|
|
3
|
+
#include "platform_capture.hpp"
|
|
4
|
+
|
|
5
|
+
#include <stdexcept>
|
|
6
|
+
|
|
7
|
+
class StubPlatformCapture final : public IPlatformCapture {
|
|
8
|
+
public:
|
|
9
|
+
void Start(Napi::Env) override {
|
|
10
|
+
throw std::runtime_error("Screen capture backend is not implemented for this platform yet");
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
void Stop() override {}
|
|
14
|
+
|
|
15
|
+
std::optional<SharedHandleInfo> GetSharedHandle() const override {
|
|
16
|
+
return std::nullopt;
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
std::unique_ptr<IPlatformCapture> CreatePlatformCapture() {
|
|
21
|
+
return std::make_unique<StubPlatformCapture>();
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
#endif
|
package/src/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare module 'node-gyp-build' {
|
|
2
|
-
function nodeGypBuild(path: string): any;
|
|
3
|
-
export default nodeGypBuild;
|
|
4
|
-
}
|
|
1
|
+
declare module 'node-gyp-build' {
|
|
2
|
+
function nodeGypBuild(path: string): any;
|
|
3
|
+
export default nodeGypBuild;
|
|
4
|
+
}
|
|
File without changes
|