@lango-project/lango-js 0.1.2 → 0.1.4

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.
package/NOTICE CHANGED
@@ -1,2 +1,7 @@
1
1
  Lango
2
2
  Copyright 2026 Savas Alparslan
3
+
4
+ This product includes @xmldom/xmldom 0.9.12.
5
+ Copyright 2019-present Christopher J. Brody and other contributors.
6
+ Copyright 2012-2017 @jindw <jindw@xidea.org> and other contributors.
7
+ Licensed under the MIT License; see src/vendor/xmldom.LICENSE.md.
package/README.md CHANGED
@@ -77,7 +77,9 @@ test:lango -- input.lango` when Lango test blocks need host services.
77
77
 
78
78
  `buildFile()` writes a matched private runtime next to the generated module.
79
79
  Before calling exported Lango entry points, import that runtime and configure
80
- it. `configure()` accepts an object with optional `output`, `catalog`, and
80
+ it. Runtimes generated into separate packages share dynamic Lango contexts
81
+ within one JavaScript process, so an application host can provide a context to
82
+ an exported function in a compiled dependency. `configure()` accepts an object with optional `output`, `catalog`, and
81
83
  `database_adapter` values; it returns `null`, resets dynamic context and
82
84
  transaction-failure state, and rejects an invalid configuration with
83
85
  `RuntimeConfigurationError`. `output` is a function (or `null`), `catalog` is
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lango-project/lango-js",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "license": "Apache-2.0",
5
5
  "publishConfig": {
6
6
  "access": "public"
package/src/cli.mjs CHANGED
@@ -15,8 +15,13 @@ const displayError = (error) => error instanceof LangoError
15
15
  const buildOptions = (arguments_) => {
16
16
  if (arguments_[0] !== "--out" || !arguments_[1]) return null;
17
17
  const profile = {};
18
- for (let index = 2; index < arguments_.length; index += 2) {
18
+ for (let index = 2; index < arguments_.length;) {
19
19
  const option = arguments_[index];
20
+ if (option === "--executable") {
21
+ profile.executable = true;
22
+ index += 1;
23
+ continue;
24
+ }
20
25
  const value = arguments_[index + 1];
21
26
  if (!value) return null;
22
27
  if (option === "--decimal-division-scale")
@@ -24,6 +29,7 @@ const buildOptions = (arguments_) => {
24
29
  else if (option === "--decimal-division-rounding")
25
30
  profile.decimal_division_rounding = Decimal.Rounding[value] ?? value;
26
31
  else return null;
32
+ index += 2;
27
33
  }
28
34
  return { outputPath: arguments_[1], profile };
29
35
  };
@@ -167,6 +173,6 @@ if (command === "init" && inputPath && rest.length === 0) {
167
173
  process.exitCode = error instanceof LangoError ? 1 : 2;
168
174
  }
169
175
  } else {
170
- console.error("Usage: node src/cli.mjs init <directory>\n node src/cli.mjs build <input.lango> --out <output.mjs> [--decimal-division-scale <n>] [--decimal-division-rounding <EnumName>]\n node src/cli.mjs run <input.lango> [--database <sqlite-file>] [--catalog <catalog.json>] [-- args...]\n node src/cli.mjs test <input.lango> [--database <sqlite-file>] [--catalog <catalog.json>]\n node src/cli.mjs format <input.lango>");
176
+ console.error("Usage: node src/cli.mjs init <directory>\n node src/cli.mjs build <input.lango> --out <output.mjs> [--executable] [--decimal-division-scale <n>] [--decimal-division-rounding <EnumName>]\n node src/cli.mjs run <input.lango> [--database <sqlite-file>] [--catalog <catalog.json>] [-- args...]\n node src/cli.mjs test <input.lango> [--database <sqlite-file>] [--catalog <catalog.json>]\n node src/cli.mjs format <input.lango>");
171
177
  process.exitCode = 2;
172
178
  }