Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accept process.stdin as image --input #334

Open
xerc opened this issue Feb 8, 2024 · 9 comments
Open

Accept process.stdin as image --input #334

xerc opened this issue Feb 8, 2024 · 9 comments

Comments

@xerc
Copy link
Contributor

xerc commented Feb 8, 2024

sqip -i test.jpg => curl -q https://[..]/test.jpg | sqip

name: 'input',
alias: 'i',
type: String,
required: true

const missing = optionList
.filter(({ required }) => required)
.filter(({ name }) => !args[name])
.map(({ name }) => name)

@axe312ger
Copy link
Owner

Good idea!

Would you be so kind to open a PR? Not sure yet when I find time for it.

Thanks!

@xerc
Copy link
Contributor Author

xerc commented Feb 19, 2024

@axe312ger would like to but i get a lot of DeprecationWarnings and ERR somewhere with node-gyp while npm install

@xerc
Copy link
Contributor Author

xerc commented Feb 19, 2024

ref. yarnpkg/yarn#9005 & yarnpkg/yarn#9013

@axe312ger
Copy link
Owner

@xerc the errors you refer to are for node v21.

The project installs fine for me on OSX (on my M1) and Linux (in CI) for node v18 and v20.

Maybe try again with node 18 or 20 :)

@axe312ger axe312ger added this to the 1.0.0 milestone Mar 2, 2024
@axe312ger axe312ger self-assigned this Mar 2, 2024
@axe312ger
Copy link
Owner

@xerc i got rid of plenty of very old dependencies, can you check if you can clone and build the project now properly on your machine? #342

@xerc
Copy link
Contributor Author

xerc commented Mar 2, 2024

look good @node v20 besides these two missing packages..

diff --git package.json
   "devDependencies": {
+    "@types/debug": "4.1.12",
+    "@types/fs-extra": "11.0.4",

@axe312ger
Copy link
Owner

@xerc awesome. I'll add them to master right away!

@axe312ger
Copy link
Owner

Okay, thats done as well.

About the process.stdin -> I wanna do this soon, probably also redo some of the logic that reads files and change how meta data is extracted and passed through the plugins.

@xerc
Copy link
Contributor Author

xerc commented Mar 5, 2024

good idea ; incl. the checks for output and print // if you want to pre-tests the "hacky" way..
[166] args['input'] = Buffer.concat(await process.stdin.toArray()).toString('utf-8');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants