Skip to content

Commit

Permalink
remote: Scrypted remote plugin (#585)
Browse files Browse the repository at this point in the history
* include implementation from standalone repo

* simplify monkeypatching
  • Loading branch information
bjia56 committed Feb 26, 2023
1 parent e7dff4e commit fa8b9df
Show file tree
Hide file tree
Showing 10 changed files with 517 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plugins/remote/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.DS_Store
out/
node_modules/
dist/
10 changes: 10 additions & 0 deletions plugins/remote/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.DS_Store
out/
node_modules/
*.map
fs
src
.vscode
dist/*.js
.venv
tsconfig.json
22 changes: 22 additions & 0 deletions plugins/remote/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Scrypted Debugger",
"address": "${config:scrypted.debugHost}",
"port": 10081,
"request": "attach",
"skipFiles": [
"<node_internals>/**"
],
"preLaunchTask": "scrypted: deploy+debug",
"sourceMaps": true,
"localRoot": "${workspaceFolder}/out",
"remoteRoot": "/plugin/",
"type": "pwa-node"
}
]
}
4 changes: 4 additions & 0 deletions plugins/remote/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

{
"scrypted.debugHost": "127.0.0.1",
}
20 changes: 20 additions & 0 deletions plugins/remote/.vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "scrypted: deploy+debug",
"type": "shell",
"presentation": {
"echo": true,
"reveal": "silent",
"focus": false,
"panel": "shared",
"showReuseMessage": true,
"clear": false
},
"command": "npm run scrypted-vscode-launch ${config:scrypted.debugHost}",
},
]
}
3 changes: 3 additions & 0 deletions plugins/remote/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Scrypted Remote Plugin

The Scrypted Remote Plugin allows connecting this Scrypted instance to a remote Scrypted server, using the Scrypted Client API. Devices from the remote Scrypted server will be imported to this current Scrypted instance.
95 changes: 95 additions & 0 deletions plugins/remote/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 39 additions & 0 deletions plugins/remote/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"name": "@scrypted/scrypted-remote",
"version": "0.0.1",
"description": "Scrypted Remote Plugin",
"scripts": {
"scrypted-setup-project": "scrypted-setup-project",
"prescrypted-setup-project": "scrypted-package-json",
"build": "scrypted-webpack",
"prepublishOnly": "NODE_ENV=production scrypted-webpack",
"prescrypted-vscode-launch": "scrypted-webpack",
"scrypted-vscode-launch": "scrypted-deploy-debug",
"scrypted-deploy-debug": "scrypted-deploy-debug",
"scrypted-debug": "scrypted-debug",
"scrypted-deploy": "scrypted-deploy",
"scrypted-readme": "scrypted-readme",
"scrypted-package-json": "scrypted-package-json"
},
"keywords": [
"scrypted",
"plugin",
"remote"
],
"scrypted": {
"name": "Scrypted Remote Plugin",
"type": "DeviceCreator",
"interfaces": [
"DeviceProvider",
"DeviceCreator"
]
},
"dependencies": {
"@scrypted/client": "file:../../packages/client",
"@scrypted/sdk": "file:../../sdk",
"uuid": "^9.0.0"
},
"devDependencies": {
"@types/node": "^17.0.24"
}
}
Loading

0 comments on commit fa8b9df

Please sign in to comment.