├── .changeset ├── README.md └── config.json ├── .eslintignore ├── .eslintrc.cjs ├── .gitattributes ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.yaml │ └── feature-request.yaml └── workflows │ ├── format-check.yml │ ├── lint-check.yml │ ├── publish.yml │ ├── test-check.yml │ └── type-check.yml ├── .gitignore ├── .vscode └── settings.json ├── CHANGELOG.md ├── LICENSE ├── README.md ├── bun.lockb ├── demo ├── .gitignore ├── iframe.html ├── iframe.ts ├── index.html ├── parent.ts ├── tailwind.css └── utils.ts ├── docs ├── 1-rpc.md ├── 2-built-in-transports.md ├── 3-bridging-transports.md ├── 4-creating-a-custom-transport.md └── README.md ├── logo.png ├── og-image.png ├── package.json ├── prettier.config.cjs ├── src ├── create-request-handler.ts ├── create-rpc.ts ├── index.ts ├── rpc.ts ├── tests │ ├── jsdocs-test.ts │ ├── rpc.test.ts │ ├── transport-bridge.test.ts │ ├── types-test.ts │ └── utils.ts ├── transport-bridge.ts ├── transport-utils.ts ├── transports │ ├── broadcast-channel.ts │ ├── browser-runtime-port.ts │ ├── iframe.ts │ ├── message-port.ts │ └── worker.ts └── types.ts ├── tailwind.config.js └── tsconfig.json /.changeset/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaniGuardiola/rpc-anywhere/HEAD/.changeset/README.md -------------------------------------------------------------------------------- /.changeset/config.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaniGuardiola/rpc-anywhere/HEAD/.changeset/config.json -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaniGuardiola/rpc-anywhere/HEAD/.eslintignore -------------------------------------------------------------------------------- /.eslintrc.cjs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaniGuardiola/rpc-anywhere/HEAD/.eslintrc.cjs -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaniGuardiola/rpc-anywhere/HEAD/.gitattributes -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaniGuardiola/rpc-anywhere/HEAD/.github/ISSUE_TEMPLATE/bug_report.yaml -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature-request.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaniGuardiola/rpc-anywhere/HEAD/.github/ISSUE_TEMPLATE/feature-request.yaml -------------------------------------------------------------------------------- /.github/workflows/format-check.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaniGuardiola/rpc-anywhere/HEAD/.github/workflows/format-check.yml -------------------------------------------------------------------------------- /.github/workflows/lint-check.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaniGuardiola/rpc-anywhere/HEAD/.github/workflows/lint-check.yml -------------------------------------------------------------------------------- /.github/workflows/publish.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaniGuardiola/rpc-anywhere/HEAD/.github/workflows/publish.yml -------------------------------------------------------------------------------- /.github/workflows/test-check.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaniGuardiola/rpc-anywhere/HEAD/.github/workflows/test-check.yml -------------------------------------------------------------------------------- /.github/workflows/type-check.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaniGuardiola/rpc-anywhere/HEAD/.github/workflows/type-check.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaniGuardiola/rpc-anywhere/HEAD/.gitignore -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaniGuardiola/rpc-anywhere/HEAD/.vscode/settings.json -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaniGuardiola/rpc-anywhere/HEAD/CHANGELOG.md -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaniGuardiola/rpc-anywhere/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaniGuardiola/rpc-anywhere/HEAD/README.md -------------------------------------------------------------------------------- /bun.lockb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaniGuardiola/rpc-anywhere/HEAD/bun.lockb -------------------------------------------------------------------------------- /demo/.gitignore: -------------------------------------------------------------------------------- 1 | *.js 2 | style.css 3 | -------------------------------------------------------------------------------- /demo/iframe.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaniGuardiola/rpc-anywhere/HEAD/demo/iframe.html -------------------------------------------------------------------------------- /demo/iframe.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaniGuardiola/rpc-anywhere/HEAD/demo/iframe.ts -------------------------------------------------------------------------------- /demo/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaniGuardiola/rpc-anywhere/HEAD/demo/index.html -------------------------------------------------------------------------------- /demo/parent.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaniGuardiola/rpc-anywhere/HEAD/demo/parent.ts -------------------------------------------------------------------------------- /demo/tailwind.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaniGuardiola/rpc-anywhere/HEAD/demo/tailwind.css -------------------------------------------------------------------------------- /demo/utils.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaniGuardiola/rpc-anywhere/HEAD/demo/utils.ts -------------------------------------------------------------------------------- /docs/1-rpc.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaniGuardiola/rpc-anywhere/HEAD/docs/1-rpc.md -------------------------------------------------------------------------------- /docs/2-built-in-transports.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaniGuardiola/rpc-anywhere/HEAD/docs/2-built-in-transports.md -------------------------------------------------------------------------------- /docs/3-bridging-transports.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaniGuardiola/rpc-anywhere/HEAD/docs/3-bridging-transports.md -------------------------------------------------------------------------------- /docs/4-creating-a-custom-transport.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaniGuardiola/rpc-anywhere/HEAD/docs/4-creating-a-custom-transport.md -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaniGuardiola/rpc-anywhere/HEAD/docs/README.md -------------------------------------------------------------------------------- /logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaniGuardiola/rpc-anywhere/HEAD/logo.png -------------------------------------------------------------------------------- /og-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaniGuardiola/rpc-anywhere/HEAD/og-image.png -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaniGuardiola/rpc-anywhere/HEAD/package.json -------------------------------------------------------------------------------- /prettier.config.cjs: -------------------------------------------------------------------------------- 1 | module.exports = {}; 2 | -------------------------------------------------------------------------------- /src/create-request-handler.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaniGuardiola/rpc-anywhere/HEAD/src/create-request-handler.ts -------------------------------------------------------------------------------- /src/create-rpc.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaniGuardiola/rpc-anywhere/HEAD/src/create-rpc.ts -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaniGuardiola/rpc-anywhere/HEAD/src/index.ts -------------------------------------------------------------------------------- /src/rpc.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaniGuardiola/rpc-anywhere/HEAD/src/rpc.ts -------------------------------------------------------------------------------- /src/tests/jsdocs-test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaniGuardiola/rpc-anywhere/HEAD/src/tests/jsdocs-test.ts -------------------------------------------------------------------------------- /src/tests/rpc.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaniGuardiola/rpc-anywhere/HEAD/src/tests/rpc.test.ts -------------------------------------------------------------------------------- /src/tests/transport-bridge.test.ts: -------------------------------------------------------------------------------- 1 | // TODO: transport bridge tests. 2 | -------------------------------------------------------------------------------- /src/tests/types-test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaniGuardiola/rpc-anywhere/HEAD/src/tests/types-test.ts -------------------------------------------------------------------------------- /src/tests/utils.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaniGuardiola/rpc-anywhere/HEAD/src/tests/utils.ts -------------------------------------------------------------------------------- /src/transport-bridge.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaniGuardiola/rpc-anywhere/HEAD/src/transport-bridge.ts -------------------------------------------------------------------------------- /src/transport-utils.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaniGuardiola/rpc-anywhere/HEAD/src/transport-utils.ts -------------------------------------------------------------------------------- /src/transports/broadcast-channel.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaniGuardiola/rpc-anywhere/HEAD/src/transports/broadcast-channel.ts -------------------------------------------------------------------------------- /src/transports/browser-runtime-port.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaniGuardiola/rpc-anywhere/HEAD/src/transports/browser-runtime-port.ts -------------------------------------------------------------------------------- /src/transports/iframe.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaniGuardiola/rpc-anywhere/HEAD/src/transports/iframe.ts -------------------------------------------------------------------------------- /src/transports/message-port.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaniGuardiola/rpc-anywhere/HEAD/src/transports/message-port.ts -------------------------------------------------------------------------------- /src/transports/worker.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaniGuardiola/rpc-anywhere/HEAD/src/transports/worker.ts -------------------------------------------------------------------------------- /src/types.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaniGuardiola/rpc-anywhere/HEAD/src/types.ts -------------------------------------------------------------------------------- /tailwind.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaniGuardiola/rpc-anywhere/HEAD/tailwind.config.js -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaniGuardiola/rpc-anywhere/HEAD/tsconfig.json --------------------------------------------------------------------------------