How to convert GLTF with seperate textures to GLTF with embedded File?

How to convert GLTF with seperate textures to GLTF with embedded texture File?
Is there any npm package that supports it . I donot need a command line solution. I want to convert the format in the website so is there npm package available to node server???

glTF-Pipeline is the usual choice — it’s generally used on the commandline but can also be used as an npm package and run on a node server. See using gltf-pipeline as a library.

Alternatively, glTF-Transform’s NodeIO class can also converted glTF with separate resources to a GLB with embedded resources.

You can also try https://www.npmjs.com/package/gltf-import-export which is what glTF Tools for vscode uses.