plainscript-lang 1.0.36 → 1.0.362

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/README.md +252 -20
  2. package/compiler/bundler.js +4 -4
  3. package/compiler/cli.js +18 -18
  4. package/compiler/dependency-detector.js +34 -22
  5. package/compiler/generator.js +326 -196
  6. package/compiler/lexer.js +49 -39
  7. package/compiler/parser.js +552 -181
  8. package/compiler/sourcemap.js +1 -1
  9. package/compiler/version.js +1 -1
  10. package/docs/CAPABILITY_GAP_AUDIT.md +2 -2
  11. package/docs/FB-PROMPT.md +524 -0
  12. package/docs/GAME-PROMPT.md +56 -55
  13. package/docs/PLAINSCRIPT-SPEC.md +16 -15
  14. package/docs/index.html +13 -6
  15. package/docs/website/script.js +1 -1
  16. package/docs/website/style.css +3 -3
  17. package/examples/ai-providers.pln +1 -1
  18. package/examples/arrays.pln +1 -1
  19. package/examples/async-errors.pln +2 -1
  20. package/examples/auth-api.pln +1 -1
  21. package/examples/auth-sessions.pln +1 -1
  22. package/examples/basics.pln +1 -1
  23. package/examples/bots.pln +1 -1
  24. package/examples/browser-interactive/README.md +3 -3
  25. package/examples/browser-interactive/src/interactive.pln +1 -1
  26. package/examples/cache-and-jobs.pln +1 -1
  27. package/examples/cache-schedule.pln +1 -1
  28. package/examples/canvas-game/README.md +4 -4
  29. package/examples/canvas-game/src/game.pln +1 -1
  30. package/examples/collections.pln +1 -1
  31. package/examples/concurrency.pln +1 -1
  32. package/examples/conditions.pln +1 -1
  33. package/examples/database.pln +1 -1
  34. package/examples/day2.pln +1 -1
  35. package/examples/day3.pln +1 -1
  36. package/examples/deployment.pln +1 -1
  37. package/examples/email-send.pln +1 -1
  38. package/examples/error-handling.pln +3 -2
  39. package/examples/expressions.pln +1 -1
  40. package/examples/file-uploads.pln +1 -1
  41. package/examples/files-and-config.pln +1 -1
  42. package/examples/files.pln +1 -1
  43. package/examples/football-backend/app.pln +1 -1
  44. package/examples/functions.pln +1 -1
  45. package/examples/hello.pln +1 -1
  46. package/examples/http-client.pln +1 -1
  47. package/examples/http.pln +1 -1
  48. package/examples/id-verification/app.pln +1 -1
  49. package/examples/javascript-library/README.md +6 -6
  50. package/examples/javascript-library/public/index.html +1 -1
  51. package/examples/javascript-library/src/interop.pln +1 -1
  52. package/examples/json.pln +1 -1
  53. package/examples/loops.pln +1 -1
  54. package/examples/modules/app.pln +1 -1
  55. package/examples/modules/main.pln +1 -1
  56. package/examples/modules/math.pln +1 -1
  57. package/examples/mongo.pln +1 -1
  58. package/examples/objects.pln +1 -1
  59. package/examples/ocr.pln +1 -1
  60. package/examples/packages.pln +1 -1
  61. package/examples/record-kinds.pln +1 -1
  62. package/examples/records.pln +1 -1
  63. package/examples/rest-api-fetch.pln +1 -1
  64. package/examples/rest-api.pln +1 -1
  65. package/examples/scheduled-tasks.pln +1 -1
  66. package/examples/search-and-filter.pln +1 -1
  67. package/examples/server.pln +1 -1
  68. package/examples/sessions-and-cookies.pln +1 -1
  69. package/examples/sqlite.pln +1 -1
  70. package/examples/start.pln +1 -1
  71. package/examples/stdlib.pln +1 -1
  72. package/examples/string-verbs.pln +1 -1
  73. package/examples/telegram-ai-bot.pln +1 -1
  74. package/examples/telegram-bot.pln +1 -1
  75. package/examples/testing.pln +1 -1
  76. package/examples/three-dimensional/README.md +2 -2
  77. package/examples/three-dimensional/src/scene.pln +1 -1
  78. package/examples/web-api.pln +1 -1
  79. package/examples/web-app.pln +1 -1
  80. package/examples/websocket-server.pln +1 -1
  81. package/examples/websocket.pln +1 -1
  82. package/examples/whatsapp-bot/pairing.pln +2 -2
  83. package/examples/whatsapp-bot/qr.pln +2 -2
  84. package/package.json +11 -12
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.36: variables, values, and output.
1
+ // PlainScript 1.0.362: variables, values, and output.
2
2
 
3
3
  remember name as "Ada"
4
4
  remember visitCount as 3
package/examples/bots.pln CHANGED
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.36: Telegram bot handlers.
1
+ // PlainScript 1.0.362: Telegram bot handlers.
2
2
 
3
3
  bot env("TELEGRAM_BOT_TOKEN")
4
4
 
@@ -1,11 +1,11 @@
1
1
  # DOM-first interactive clicker
2
2
 
3
- A small dashboard built with PlainScript that talks to the DOM directly —
3
+ A small dashboard built with PlainScript that talks to the DOM directly -
4
4
  no canvas, no library, no bundler. Click **+10 points** and the score span
5
5
  updates; click **Log entry** to append a line to the run log; press **R** to
6
6
  reset both.
7
7
 
8
- It demonstrates the v1.0.36 browser API:
8
+ It demonstrates the v1.0.362 browser API:
9
9
 
10
10
  - `document.querySelector` + `.innerHTML becomes` / `.textContent becomes`.
11
11
  - `when clickButton "click" happens` DOM event handlers.
@@ -18,7 +18,7 @@ It demonstrates the v1.0.36 browser API:
18
18
 
19
19
  ## Run
20
20
 
21
- Build the compiled script and serve the folder (any static file server works —
21
+ Build the compiled script and serve the folder (any static file server works -
22
22
  `npx serve public` is one option):
23
23
 
24
24
  ```bash
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.36: a DOM-first clicker with a run log.
1
+ // PlainScript 1.0.362: a DOM-first clicker with a run log.
2
2
 
3
3
  remember scoreEl as document.querySelector("#score")
4
4
  remember historyEl as document.querySelector("#history")
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.36: cache and background work.
1
+ // PlainScript 1.0.362: cache and background work.
2
2
  cache env("REDIS_URL")
3
3
  cacheSet("status", "ready", 60)
4
4
  remember status as cacheGet("status")
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.36: cache values and scheduled work.
1
+ // PlainScript 1.0.362: cache values and scheduled work.
2
2
 
3
3
  cache "redis://localhost:6379"
4
4
 
@@ -5,10 +5,10 @@ arrow keys while red blocks fall from the top. Score a point for every block
5
5
  that drifts past you; lose a life when one collides with you. Run out of lives
6
6
  and the game freezes until you press Restart.
7
7
 
8
- It demonstrates the v1.0.36 browser API:
8
+ It demonstrates the v1.0.362 browser API:
9
9
 
10
10
  - `when document "keydown"/"keyup" happens` handlers that set flags on a
11
- `keys{}` map — the game loop reads the map, the event handlers never move the
11
+ `keys{}` map - the game loop reads the map, the event handlers never move the
12
12
  player directly.
13
13
  - `every frame ... done`, a `requestAnimationFrame` loop with delta time from
14
14
  `performance.now()` so movement speed is frame-rate independent.
@@ -20,7 +20,7 @@ It demonstrates the v1.0.36 browser API:
20
20
 
21
21
  ## Run
22
22
 
23
- Build the compiled script, then open the page (any static file server works —
23
+ Build the compiled script, then open the page (any static file server works -
24
24
  `npx serve public` is one option):
25
25
 
26
26
  ```bash
@@ -30,5 +30,5 @@ npx serve public
30
30
 
31
31
  Then open http://localhost:3000.
32
32
 
33
- The page needs a server only for the HTML script tag, not for the game logic —
33
+ The page needs a server only for the HTML script tag, not for the game logic -
34
34
  opening `public/index.html` directly from disk works in most browsers too.
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.36: a self-contained canvas 2D dodge mini-game.
1
+ // PlainScript 1.0.362: a self-contained canvas 2D dodge mini-game.
2
2
 
3
3
  define a kind called "Enemy" with
4
4
  x is 0
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.36: lists, objects, and collection helpers.
1
+ // PlainScript 1.0.362: lists, objects, and collection helpers.
2
2
 
3
3
  remember numbers as list with 4, 7, 2, 9
4
4
  gather each number in numbers giving number * 2
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.36: parallel operations and timeouts.
1
+ // PlainScript 1.0.362: parallel operations and timeouts.
2
2
 
3
3
  make firstJob()
4
4
  wait for sleep(10)
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.36: conditions and string predicates.
1
+ // PlainScript 1.0.362: conditions and string predicates.
2
2
 
3
3
  remember score as 87
4
4
  remember label as "PlainScript"
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.36: SQLite database.
1
+ // PlainScript 1.0.362: SQLite database.
2
2
  database "app.db" using "wasm"
3
3
  execute
4
4
  CREATE TABLE IF NOT EXISTS notes (body TEXT)
package/examples/day2.pln CHANGED
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.36: conditional blocks.
1
+ // PlainScript 1.0.362: conditional blocks.
2
2
  remember age as 21
3
3
  if age is at least 18
4
4
  show "adult"
package/examples/day3.pln CHANGED
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.36: functions.
1
+ // PlainScript 1.0.362: functions.
2
2
  make greet(name)
3
3
  give `Hello, ${name}!`
4
4
  done
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.36: production-shaped web entry point.
1
+ // PlainScript 1.0.362: production-shaped web entry point.
2
2
  web app
3
3
  route get "/health"
4
4
  reply "ok"
@@ -1,3 +1,3 @@
1
- // PlainScript 1.0.36: email application placeholder.
1
+ // PlainScript 1.0.362: email application placeholder.
2
2
  remember recipient as "team@example.com"
3
3
  show `mail queued for ${recipient}`
@@ -1,7 +1,8 @@
1
- // PlainScript 1.0.36: recovery and cleanup.
1
+ // PlainScript 1.0.362: recovery and cleanup.
2
2
  try
3
3
  show "work"
4
4
  recover as error
5
5
  show message of error
6
6
  finally
7
- show "finished"
7
+ show "finished"
8
+ done
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.36: expression operators.
1
+ // PlainScript 1.0.362: expression operators.
2
2
  remember sumValue as (2 + 3) * 4
3
3
  if sumValue is 20
4
4
  show "exact"
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.36: upload route.
1
+ // PlainScript 1.0.362: upload route.
2
2
  web app
3
3
  accept uploads limit "5 MB" allow list with "image/png" folder "uploads"
4
4
  route post "/upload"
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.36: files and environment configuration.
1
+ // PlainScript 1.0.362: files and environment configuration.
2
2
  remember filename as env("CONFIG_FILE")
3
3
  if filename is null
4
4
  remember filename as "config.json"
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.36: file and path operations.
1
+ // PlainScript 1.0.362: file and path operations.
2
2
 
3
3
  remember report as readFile("README.md")
4
4
  show length(report)
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.36: a complete authenticated SQLite API.
1
+ // PlainScript 1.0.362: a complete authenticated SQLite API.
2
2
 
3
3
  web app
4
4
  database ":memory:" using "wasm"
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.36: functions, defaults, and returns.
1
+ // PlainScript 1.0.362: functions, defaults, and returns.
2
2
 
3
3
  make greet(name)
4
4
  give `Hello, ${name}!`
@@ -1,2 +1,2 @@
1
- // PlainScript 1.0.36: hello world.
1
+ // PlainScript 1.0.362: hello world.
2
2
  show "Hello, PlainScript!"
@@ -1,3 +1,3 @@
1
- // PlainScript 1.0.36: HTTP client request.
1
+ // PlainScript 1.0.362: HTTP client request.
2
2
  remember response as get "https://example.com" timeout 5000
3
3
  show response.status
package/examples/http.pln CHANGED
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.36: HTTP client requests.
1
+ // PlainScript 1.0.362: HTTP client requests.
2
2
 
3
3
  remember response as get "https://example.com/api/items" timeout 5000
4
4
  if response.ok is true
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.36: upload and OCR verification service.
1
+ // PlainScript 1.0.362: upload and OCR verification service.
2
2
 
3
3
  web app
4
4
  accept uploads limit "5 MB" allow list with "image/png", "image/jpeg" folder "uploads"
@@ -3,7 +3,7 @@
3
3
  The full-interop showcase: import an npm package with `bring`, call members and
4
4
  `new` constructors on it, pass PlainScript functions as native callbacks, and
5
5
  optionally shape the scene with a JSON config fetched at runtime. This is the
6
- **import path** — unlike `examples/three-dimensional`, which maps `THREE` to a
6
+ **import path** - unlike `examples/three-dimensional`, which maps `THREE` to a
7
7
  browser global, this file demands the package be bundled for the browser.
8
8
 
9
9
  What the script exercises:
@@ -11,12 +11,12 @@ What the script exercises:
11
11
  - `bring THREE from "three"` emits `require('three')` at the top of the build.
12
12
  - `new THREE.Scene()`, `new THREE.WebGLRenderer()`, `new THREE.SphereGeometry(...)`
13
13
  and `new THREE.Mesh(geo, mat)` fill a starfield of 150 primitives. Colors use
14
- v1.0.36 hex literals (`0x40c463`), so the palette is legible at a glance.
14
+ v1.0.362 hex literals (`0x40c463`), so the palette is legible at a glance.
15
15
  - A resize callback `make fitWindow() ... done` passed straight to
16
16
  `window.addEventListener("resize", fitWindow)`.
17
17
  - `fetchJson("config.json")` (auto-awaiting) reads `{stars, color}` out of a
18
18
  served file and re-sizes/re-colors the field. In `try ... recover as err ... done`
19
- a failing fetch logs the error and falls back to the built-in defaults —
19
+ a failing fetch logs the error and falls back to the built-in defaults -
20
20
  serve the folder over HTTP so the fetch succeeds, and you'll see the fallback
21
21
  path fire if you ever open the page from `file://`.
22
22
  - `every frame ... done` rotates the whole scene and calls `renderer.render(...)`.
@@ -38,7 +38,7 @@ at `interop.bundle.js`.
38
38
  `plainscript add <package>` installs a package into the current project and
39
39
  saves it to `package.json` (`npm install <package> --save` under the hood). The
40
40
  esbuild one-liner above is all the bundling the import path needs; vite or
41
- rollup work equally well. Build twice — once by PlainScript, once by a bundler —
41
+ rollup work equally well. Build twice - once by PlainScript, once by a bundler -
42
42
  is the whole trick: PlainScript emits ordinary CommonJS `require()`s and the
43
43
  bundler turns them into browser-safe modules.
44
44
 
@@ -48,7 +48,7 @@ imports from the source alone.
48
48
  ## What to tweak
49
49
 
50
50
  Point `fetchJson` at a remote URL or drop a different `config.json` next to the
51
- page. Anything you can reach with `fetch` — `fetchJson` returns
52
- `{ok, status, data, text, parseError}` — is fair game, and the
51
+ page. Anything you can reach with `fetch` - `fetchJson` returns
52
+ `{ok, status, data, text, parseError}` - is fair game, and the
53
53
  `try ... recover` block shows the friendly-fallback pattern when the network
54
54
  misbehaves.
@@ -31,7 +31,7 @@
31
31
  </head>
32
32
  <body>
33
33
  <div class="note">
34
- Fetching <code>config.json</code> from the server — serve the folder over HTTP
34
+ Fetching <code>config.json</code> from the server - serve the folder over HTTP
35
35
  and the star count / color come from the file; otherwise the scene falls back
36
36
  to the built-in defaults (check the console for the log lines).
37
37
  </div>
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.36: drop into an npm library via import, callbacks, and fetch.
1
+ // PlainScript 1.0.362: drop into an npm library via import, callbacks, and fetch.
2
2
 
3
3
  bring THREE from "three"
4
4
 
package/examples/json.pln CHANGED
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.36: JSON values and transformations.
1
+ // PlainScript 1.0.362: JSON values and transformations.
2
2
 
3
3
  remember person as record with name "Ada" and role "engineer" done
4
4
 
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.36: collection and numeric loops.
1
+ // PlainScript 1.0.362: collection and numeric loops.
2
2
 
3
3
  remember colors as list with "red", "green", "blue"
4
4
 
@@ -1,3 +1,3 @@
1
- // PlainScript 1.0.36: module entry point.
1
+ // PlainScript 1.0.362: module entry point.
2
2
  import { circleArea } from "./math.pln"
3
3
  show circleArea(2)
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.36: named imports.
1
+ // PlainScript 1.0.362: named imports.
2
2
 
3
3
  import { circleArea } from "./math.pln"
4
4
  show circleArea(2)
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.36: an imported module.
1
+ // PlainScript 1.0.362: an imported module.
2
2
 
3
3
  remember PI as 3.14159
4
4
 
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.36: MongoDB.
1
+ // PlainScript 1.0.362: MongoDB.
2
2
  //
3
3
  // The `mongo` statement binds a connection to a MongoDB instance using the
4
4
  // official `mongodb` driver. Give it a connection string and an optional
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.36: object literals and member access.
1
+ // PlainScript 1.0.362: object literals and member access.
2
2
  remember user as {name: "Ada", active: true}
3
3
  show user.name
4
4
  user.active becomes false
package/examples/ocr.pln CHANGED
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.36: upload handling and OCR.
1
+ // PlainScript 1.0.362: upload handling and OCR.
2
2
 
3
3
  web app
4
4
  accept uploads limit "5 MB" allow list with "image/png", "image/jpeg" folder "uploads"
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.36: importing npm packages.
1
+ // PlainScript 1.0.362: importing npm packages.
2
2
 
3
3
  use express
4
4
 
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.36: record kind construction.
1
+ // PlainScript 1.0.362: record kind construction.
2
2
  define a kind called "Player" with
3
3
  name is ""
4
4
  goals is 0
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.36: record kinds and record values.
1
+ // PlainScript 1.0.362: record kinds and record values.
2
2
 
3
3
  define a kind called "Player" with
4
4
  name is ""
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.36: fetch an upstream API from a route.
1
+ // PlainScript 1.0.362: fetch an upstream API from a route.
2
2
  web app
3
3
  route get "/proxy"
4
4
  remember upstream as get "https://example.com/data" timeout 5000
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.36: JSON REST route.
1
+ // PlainScript 1.0.362: JSON REST route.
2
2
  web app
3
3
  route get "/api/status"
4
4
  reply json
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.36: recurring task.
1
+ // PlainScript 1.0.362: recurring task.
2
2
  schedule "0 * * * *"
3
3
  show "hourly task"
4
4
  done
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.36: collection filtering.
1
+ // PlainScript 1.0.362: collection filtering.
2
2
  remember values as list with 1, 2, 3
3
3
  remember found as first item from values
4
4
  show found
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.36: minimal server.
1
+ // PlainScript 1.0.362: minimal server.
2
2
  web app
3
3
  route get "/"
4
4
  reply "Hello from PlainScript"
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.36: sessions and cookies.
1
+ // PlainScript 1.0.362: sessions and cookies.
2
2
  web app
3
3
  enable sessions "session-secret"
4
4
  route get "/"
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.36: SQLite, SQL blocks, parameters, and transactions.
1
+ // PlainScript 1.0.362: SQLite, SQL blocks, parameters, and transactions.
2
2
 
3
3
  database "plain-script-demo.db" using "wasm"
4
4
  remember personName as "Ada"
@@ -1,2 +1,2 @@
1
- // PlainScript 1.0.36: start command entry point.
1
+ // PlainScript 1.0.362: start command entry point.
2
2
  show "PlainScript started"
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.36: standard library helpers.
1
+ // PlainScript 1.0.362: standard library helpers.
2
2
  remember text as trim(" PlainScript ")
3
3
  remember digest as sha256(text)
4
4
  show digest
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.36: natural string verbs — transform a variable in place.
1
+ // PlainScript 1.0.362: natural string verbs - transform a variable in place.
2
2
 
3
3
  make capitalize(title)
4
4
  lowercase title
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.36: fixed and provider-backed Telegram replies.
1
+ // PlainScript 1.0.362: fixed and provider-backed Telegram replies.
2
2
 
3
3
  bot env("TELEGRAM_BOT_TOKEN")
4
4
 
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.36: Telegram bot.
1
+ // PlainScript 1.0.362: Telegram bot.
2
2
  bot env("TELEGRAM_BOT_TOKEN")
3
3
  when someone sends "/start"
4
4
  reply "Welcome"
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.36: the native test DSL.
1
+ // PlainScript 1.0.362: the native test DSL.
2
2
 
3
3
  make add(a, b)
4
4
  give a + b
@@ -2,7 +2,7 @@
2
2
 
3
3
  The canonical PlainScript path to 3D: the page loads **three.js from a CDN**
4
4
  before the compiled script, so `src/scene.pln` just references the global
5
- `THREE` object directly. The build is 100% dependency-free — the emitted file
5
+ `THREE` object directly. The build is 100% dependency-free - the emitted file
6
6
  contains no `require(...)` and needs no bundler, it only needs `THREE` to exist
7
7
  in the page.
8
8
 
@@ -11,7 +11,7 @@ What the script exercises:
11
11
  - `remember scene as new THREE.Scene()`, `new THREE.PerspectiveCamera(...)`,
12
12
  `new THREE.WebGLRenderer()` and `renderer.setSize(...)`.
13
13
  - `new THREE.BoxGeometry(...)`, `new THREE.MeshStandardMaterial({ color: 0x40c463 })`
14
- and `new THREE.Mesh(geo, mat)` — v1.0.36 hex literals (`0xRRGGBB`) keep the
14
+ and `new THREE.Mesh(geo, mat)` - v1.0.362 hex literals (`0xRRGGBB`) keep the
15
15
  palette legible; the lights use `0xffffff`.
16
16
  - A light rig with `new THREE.AmbientLight(...)` + `new THREE.DirectionalLight(...)`.
17
17
  - `document.body.append(renderer.domElement)` mounts the WebGL canvas.
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.36: a WebGL 3D scene using the global THREE object.
1
+ // PlainScript 1.0.362: a WebGL 3D scene using the global THREE object.
2
2
 
3
3
  remember scene as new THREE.Scene()
4
4
  remember camera as new THREE.PerspectiveCamera(75, 640 / 480, 0.1, 1000)
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.36: web apps, routes, JSON, and status codes.
1
+ // PlainScript 1.0.362: web apps, routes, JSON, and status codes.
2
2
 
3
3
  web app
4
4
  allow cors
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.36: web application.
1
+ // PlainScript 1.0.362: web application.
2
2
  web app
3
3
  route get "/health"
4
4
  reply json
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.36: WebSocket server.
1
+ // PlainScript 1.0.362: WebSocket server.
2
2
  websocket server on 8080
3
3
  when socket connects
4
4
  send socket "connected"
@@ -1,4 +1,4 @@
1
- // PlainScript 1.0.36: WebSocket server handlers.
1
+ // PlainScript 1.0.362: WebSocket server handlers.
2
2
 
3
3
  websocket server on 8080
4
4
  when socket connects
@@ -1,10 +1,10 @@
1
- // PlainScript 1.0.36: WhatsApp pairing login.
1
+ // PlainScript 1.0.362: WhatsApp pairing login.
2
2
  // Showcases `use baileys`, message.type branching, media downloads,
3
3
  // and button/list reply handling.
4
4
 
5
5
  whatsapp bot
6
6
  auth "plain-script-whatsapp"
7
- use baileys "@qwerty-xcv/baileys"
7
+ use baileys "@whiskeysockets/baileys"
8
8
  login pairing "2348012345678"
9
9
  on message
10
10
  log message
@@ -1,10 +1,10 @@
1
- // PlainScript 1.0.36: WhatsApp QR login.
1
+ // PlainScript 1.0.362: WhatsApp QR login.
2
2
  // Showcases `use baileys`, message.type branching, media downloads,
3
3
  // and button handling.
4
4
 
5
5
  whatsapp bot
6
6
  auth "plain-script-whatsapp"
7
- use baileys "@qwerty-xcv/baileys"
7
+ use baileys "@whiskeysockets/baileys"
8
8
  login qr
9
9
  on message
10
10
  log message
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "plainscript-lang",
3
- "version": "1.0.36",
4
- "description": "PlainScript — an Intent-Oriented Programming Language. When even a simple sentence can be code.",
3
+ "version": "1.0.362",
4
+ "description": "PlainScript - an Intent-Oriented Programming Language. When even a simple sentence can be code.",
5
5
  "main": "compiler/cli.js",
6
6
  "bin": {
7
7
  "plainscript": "./compiler/cli.js"
8
8
  },
9
9
  "scripts": {
10
- "test": "node tests/compiler.test.js && node tests/build.test.js && node tests/telegram.test.js && node tests/ocr.test.js && node tests/nesting.test.js && node tests/backend.test.js && node tests/runtime.test.js && node tests/browser.test.js && node tests/acceptance.test.js && node tests/whatsapp.test.js && node tests/audit.test.js && node tests/sourcemap.test.js && node tests/modules.test.js && node tests/datastructures.test.js && node tests/docs.test.js && node tests/compat/browser-interop.test.js && node tests/compat/language.test.js && node tests/compat/node.test.js && node tests/compat/binary.test.js && node tests/compat/errors.test.js && node tests/compat/async.test.js && node tests/compat/modules.test.js && node tests/compat/npm.test.js && node tests/compat/web.test.js && node tests/compat/real-world.test.js"
10
+ "test": "node tests/compiler.test.js && node tests/build.test.js && node tests/telegram.test.js && node tests/ocr.test.js && node tests/nesting.test.js && node tests/backend.test.js && node tests/runtime.test.js && node tests/browser.test.js && node tests/acceptance.test.js && node tests/whatsapp.test.js && node tests/audit.test.js && node tests/sourcemap.test.js && node tests/modules.test.js && node tests/repeat.test.js && node tests/datastructures.test.js && node tests/kernel.test.js && node tests/docs.test.js && node tests/compat/browser-interop.test.js && node tests/compat/language.test.js && node tests/compat/node.test.js && node tests/compat/binary.test.js && node tests/compat/errors.test.js && node tests/compat/async.test.js && node tests/compat/modules.test.js && node tests/compat/npm.test.js && node tests/compat/web.test.js && node tests/compat/real-world.test.js && node tests/packaging.test.js"
11
11
  },
12
12
  "files": [
13
13
  "compiler",
@@ -30,21 +30,20 @@
30
30
  "node": ">=18.0.0"
31
31
  },
32
32
  "devDependencies": {
33
- "@whiskeysockets/baileys": "^7.0.0-rc14",
34
- "better-sqlite3": "^13.0.3",
33
+ "better-sqlite3": "^11.10.0",
35
34
  "croner": "^10.0.1",
36
35
  "express": "^5.2.1",
37
36
  "multer": "^2.0.2",
38
37
  "nodemailer": "^9.0.5",
39
- "qrcode-terminal": "^0.12.0",
40
- "redis": "^6.2.1",
38
+ "redis": "^5.8.3",
41
39
  "sql.js": "^1.13.0",
42
40
  "ws": "^8.21.3"
43
41
  },
44
- "dependencies": {
45
- "@qwerty-xcv/baileys": "^0.0.1",
46
- "mongodb": "^7.6.0",
47
- "tesseract.js": "^7.0.0",
48
- "three": "^0.185.1"
42
+ "dependencies": {},
43
+ "optionalDependencies": {
44
+ "better-sqlite3": "^11.10.0",
45
+ "mongodb": "^6.20.0",
46
+ "sql.js": "^1.13.0",
47
+ "tesseract.js": "^7.0.0"
49
48
  }
50
49
  }