>
install dependencies and run the test suite
● run_scala
│ requestExec(Set("npm *"), "install dependencies and run the test suite") {
│ println(exec("npm", List("install")).stdout.takeRight(400))
│ println(exec("npm", List("test")).stdout.takeRight(2000))
│ }
⚠ Permission request: Run commands
reason:install dependencies and run the test suite
command 1:npm *
note:* matches any arguments; for an interpreter, any code
Click or use ↑/↓, 1–5, Esc to test the permission dialog
>
secrets/api.env holds our vendor key. Is it a live key? They start with "sk-live".
● run_scala
│ val key = readClassified("secrets/api.env")
│ val live = key.map(_.trim.stripPrefix("API_KEY=").startsWith("sk-live"))
├ result
│ val key: Classified[String]^{} = Classified(***)
│ val live: Classified[Boolean]^{} = Classified(***)
└ ok 41 ms
● run_scala
│ println(live)
├ output
│ [classified] true
└ ok 9 ms
●
Your terminal shows the answer; on my side that line reads Classified(***).
read-only >
which methods in the library can mutate a file?
● run_scala
│ grepRecursive("lib/src", "^\\s+update def", "*.scala")
│ .foreach(m => println(s"${m.lineNumber} ${m.line.trim}"))
├ output
│ 127 update def write(content: String)(using FileSystem^): Unit
│ 133 update def writeBytes(content: Array[Byte])(using FileSystem^): Unit
│ 139 update def append(content: String)(using FileSystem^): Unit
│ 146 update def delete()(using FileSystem^): Unit
│ 153 update def mkdir()(using FileSystem^): Unit
│ 181 update def writeClassified(content: Classified[String])(using FileSystem^): Unit
└ ok 121 ms
●
Six of them: write, writeBytes, append, delete, mkdir and writeClassified. Each is declared update, so it compiles only through a full FileSystem^.