😇

SupabaseからDenoに入門して挫折した

に公開4

Discussion

けいけい

現状、Denoでは実行ファイル全体を対象として権限を設定することしかできません。

Is it true?
--allow-read=filename style is not enable??

gladevisegladevise

I am not familiar with Deno, so I misunderstood. My point here was that there is no way to specify permissions on a per-source-code or per-method basis.

For example, by splitting the file into modules,

deno run ./main.ts --allow-env --allow-read ./env.ts --allow-net ./client.ts

and there is no way to grant permissions on a file-by-file basis, so I believe that the permissions granted would be reflected in all source code. The following Discussion confirms this.

https://github.com/denoland/deno/discussions/14984

And I assume that what you wanted to say in your comment is that you can only grant access to .env files by using --allow-read=.env, is that correct?

けいけい

(snip) to specify permissions on a per-source-code or per-method basis.
there is no way to grant permissions on a file-by-file basis

I understand your wishes. I read it wrong. Sorry.
nihongo narete inai desu.

kyoh86kyoh86

新しいものを使うなら、VSCodeの拡張などの周辺環境には自主的に貢献するくらいの覚悟がいる、とは思います。
お手元のNodeやその他の素晴らしい開発環境も誰かによって諸処の問題が解決されて存在しているわけです。
その多くは「顧客に向けた解決」ではなく、自主的な貢献によってなされています。
繰り返しになりますが、Denoに限らず新しい何かに希望を託したいのであれば、自ら貢献することを考えて飛び込んだほうが、現状ではお互いに幸せかな、と思います。

個人的に、世間が自主的な貢献に頼り過ぎている現状には思うところがありますが、それはまた別のお話……。