Comments (3)
I also don't understand how do you "console debug" anything using alfy without effectively breaking the workflow execution.
ATM it's either you get the debug logs or you get proper workflow execution, never both.
Any of the alfy/console logs will break the execution of the workflow:
import alfy from 'alfy'
alfy.log("my alfy.log()")
alfy.error("my alfy.error()")
console.info("my console.info()")
console.debug("my console.debug()")
console.error("my console.error()")
alfy.output(
[
{
title: "My title"
}
]
)
You will see the various log messages and My title
being displayed in debug console, but the workflow execution will be broken, it crashes as alfred cannot parse the output.
Using any of the above logs crashes the exectuion of the workflow.
The big question here is how do you add debug log but at the same time don't crash the workflow execution?
from alfy.
alfy.log
simply passes it to console.error
. Alfred documents that you can output to stderr for debugging.
https://www.alfredforum.com/topic/9170-alfred-3-tip-use-stderr-to-output-to-the-debug-console/
from alfy.
I'm also confused as to how this is supposed to work. I understand that alfy.log()
is simply a wrapper around console.error()
; however, when I try to use it, I end up seeing two items
arrays getting printed to the console, which doesn't seem right.
FYI... If I comment out the following line in Alfy, everything works as expected:
// hookStderr(alfy.error);
Alfy seems to be trying to do two conflicting things with regards to stderr:
from alfy.
Related Issues (20)
- ERR_INPUT_TYPE_NOT_ALLOWED with example script HOT 3
- Remove broken links in Users section
- Running basic script takes 5s and throws error
- Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only file and data URLs are supported by the default ESM loader HOT 3
- Type for "mods" requires all properties to be defined
- alfy.matches doesn't work with umlauts
- fetch method does not work correctly HOT 1
- fetch with `json: false` is ignored? HOT 2
- Script filter with images? HOT 1
- Usage with bun? HOT 1
- Dependabot alerts on dependencies HOT 2
- Package location different than workflow location
- Cannot use import statement outside a module HOT 1
- Package workflows so that end users donβt require `node` at runtime? HOT 1
- How should Alfy change to accommodate the new Alfred Gallery? HOT 2
- How to show a loading indicator? HOT 1
- Alfred 5 HOT 1
- Unable to install and use Alfred workflow locally HOT 1
- Alfy.fetch not working with https HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alfy.