Skip to content

feat: add ability to generate static nuvio providers - #69

Draft
An0n-00 wants to merge 1 commit into
cinepro-org:mainfrom
autovalue:nuvio-providers
Draft

feat: add ability to generate static nuvio providers#69
An0n-00 wants to merge 1 commit into
cinepro-org:mainfrom
autovalue:nuvio-providers

Conversation

@An0n-00

@An0n-00 An0n-00 commented Jul 17, 2026

Copy link
Copy Markdown
Member

credits: @autovalue

This pull request introduces a comprehensive build system for packaging provider modules as Nuvio-compatible add-ons, focusing on Node.js/browser compatibility and automation. The changes add scripts, templates, and plugins to bundle providers, generate manifests, and ensure compatibility with QuickJS and browser environments.

Key changes include:

Build System and Automation

  • Added a new script (scripts/build-nuvio-providers.ts) and a build utility (src/nuvio-compat/nuvioBuilder.ts) to automate discovering, instantiating, and bundling all provider modules, generating both minified and non-minified bundles and their manifests. [1] [2]
  • Introduced a template file (src/nuvio-compat/nuvioWrapper.template.ts) used to wrap each provider for Nuvio compatibility, including environment setup, TMDB integration, and export logic for different JS runtimes.

Build Tooling and Plugins

  • Added custom esbuild plugins (src/nuvio-compat/esbuildPlugins.ts) for:
    • Running Browserify after bundling to improve CommonJS and global polyfill compatibility (especially for QuickJS).
    • Removing unnecessary imports for blank dependencies in the bundle.
    • Ensuring module export compatibility for QuickJS environments.
  • Provided an esbuild inject module (src/nuvio-compat/esbuildInjects.ts) to polyfill Buffer and crypto references for the browser/QuickJS.

Dependency Updates

  • Updated package.json to add required dependencies and devDependencies, including @fastify/static, browserify, esbuild, and their type definitions.

These changes together enable automated, cross-environment packaging of providers for Nuvio, with robust compatibility for both browser and embedded JS engines.

@An0n-00 An0n-00 self-assigned this Jul 17, 2026
@An0n-00
An0n-00 requested a review from An0n-01 as a code owner July 17, 2026 09:00
@An0n-00

An0n-00 commented Jul 17, 2026

Copy link
Copy Markdown
Member Author

@autovalue did you try this out already? did it work?

@autovalue

Copy link
Copy Markdown

Yes it worked during my local tests. I was primarily testing with a new provider, and was when I ran into the video-only limitation.

The codes not exactly the cleanest atm, but the proof of concept is in there as to how it'll work.

The eventual idea is to be able to publish those compiled providers to a github-page, so they can be referenced just like https://github.com/yoruix/nuvio-providers/tree/main#using-in-nuvio-app, but I didn't include any of that in there since it wasn't necessary

@An0n-01
An0n-01 marked this pull request as draft July 18, 2026 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants