andywer / andywer/puppet-run

Breaking API change: Export promise

オープン
#33 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
enhancement
主要言語
TypeScript
スター
56
フォーク
2
PR マージ指標
30日以内にマージされた PR はありません

説明

Instead of having to manually call `puppet.exit()`, make it a convention-based API:

Each JS/TS entrypoint must `export default` a promise or a function returning a promise. When this promise resolves, the script is considered to be finished.

Allow manual dynamic tasks by calling `puppet.run(functionOrPromise)`.

If you export / run a function, we can pass the original shell `argv` and runtime data created by plugins.

For your convenience:
Consider that the script might be a CommonJS module, not an ES module. Also gracefully deal with entrypoint functions that don't return a promise.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。