@tsplc/compiler 0.5.3 → 0.5.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/dist/bun-runtime.js.map +7 -7
- package/dist/cli.js.map +8 -8
- package/dist/codesys.js +2 -2
- package/dist/codesys.js.map +23 -23
- package/dist/elaborate-capture.js.map +1 -1
- package/dist/index.js.map +35 -35
- package/dist/ir.js.map +19 -19
- package/dist/project.js.map +1 -1
- package/dist/server-check.js.map +1 -1
- package/dist/telemetry.js.map +1 -1
- package/package.json +9 -9
- package/src/codesys/config.ts +2 -2
- package/src/codesys/debug.ts +2 -2
- package/src/codesys/emit.ts +10 -10
- package/src/codesys/engineering.ts +1 -1
- package/src/codesys/expressions.ts +1 -1
- package/src/codesys/global-lists.ts +6 -6
- package/src/codesys/global-names.ts +3 -3
- package/src/codesys/http.ts +3 -3
- package/src/codesys/index.ts +8 -8
- package/src/codesys/instrumentation.ts +9 -13
- package/src/codesys/io-paths.ts +1 -1
- package/src/codesys/manifest.ts +5 -5
- package/src/codesys/plan.ts +9 -9
- package/src/codesys/programs.ts +3 -3
- package/src/codesys/publication.ts +4 -4
- package/src/codesys/routines.ts +5 -5
- package/src/codesys/st-files.ts +4 -4
- package/src/codesys/symbols.ts +6 -6
- package/src/codesys/telemetry.ts +6 -6
- package/src/codesys/types.ts +2 -2
- package/src/codesys/vendor.ts +2 -2
- package/src/frontend/analyzer.ts +9 -9
- package/src/frontend/async.ts +6 -6
- package/src/frontend/blocks.ts +1 -1
- package/src/frontend/configuration.ts +4 -4
- package/src/frontend/const-functions.ts +2 -2
- package/src/frontend/cooperative.ts +1 -1
- package/src/frontend/coroutines.ts +6 -6
- package/src/frontend/elaborate/calls.ts +9 -12
- package/src/frontend/elaborate/capture.ts +1 -1
- package/src/frontend/elaborate/dialect.ts +7 -7
- package/src/frontend/elaborate/expressions.ts +12 -12
- package/src/frontend/elaborate/frame.ts +4 -4
- package/src/frontend/elaborate/graph.ts +1 -1
- package/src/frontend/elaborate/index.ts +12 -12
- package/src/frontend/elaborate/initializers.ts +4 -4
- package/src/frontend/elaborate/layouts.ts +3 -3
- package/src/frontend/elaborate/model.ts +1 -1
- package/src/frontend/elaborate/retention.ts +5 -5
- package/src/frontend/elaborate/specialize.ts +11 -11
- package/src/frontend/elaborate/statements.ts +8 -11
- package/src/frontend/elaborate/storage.ts +6 -11
- package/src/frontend/elaborate/values.ts +2 -2
- package/src/frontend/exposure.ts +3 -3
- package/src/frontend/expressions.ts +5 -5
- package/src/frontend/intrinsics.ts +2 -2
- package/src/frontend/module-graph.ts +1 -1
- package/src/frontend/promise-chains.ts +2 -2
- package/src/frontend/promises.ts +5 -5
- package/src/frontend/routines.ts +2 -2
- package/src/frontend/services.ts +3 -3
- package/src/frontend/statements.ts +4 -4
- package/src/frontend/tasks.ts +5 -10
- package/src/frontend/telemetry.ts +2 -2
- package/src/frontend/types.ts +1 -1
- package/src/frontend/typescript.ts +11 -15
- package/src/index.ts +1 -1
- package/src/ir/aggregates.ts +6 -6
- package/src/ir/allocation.ts +5 -5
- package/src/ir/core-model.ts +3 -3
- package/src/ir/declarations.ts +6 -6
- package/src/ir/domains.ts +3 -7
- package/src/ir/fold.ts +4 -9
- package/src/ir/index.ts +16 -16
- package/src/ir/layouts.ts +3 -3
- package/src/ir/link.ts +5 -5
- package/src/ir/model.ts +2 -2
- package/src/ir/normalization-error.ts +1 -1
- package/src/ir/normalize.ts +8 -8
- package/src/ir/numeric.ts +2 -2
- package/src/ir/operands.ts +2 -2
- package/src/ir/ranges.ts +4 -9
- package/src/ir/routine.ts +10 -15
- package/src/ir/scalars.ts +5 -5
- package/src/ir/share.ts +4 -4
- package/src/ir/temporaries.ts +4 -4
- package/src/project/cli.ts +3 -3
- package/src/project/debugger.ts +1 -1
- package/src/project/index.ts +1 -1
- package/src/project/plant.ts +2 -2
- package/src/project/project-commands.ts +3 -3
- package/src/project/project.ts +2 -2
- package/src/project/release.ts +2 -2
- package/src/project/server-check.ts +1 -1
- package/src/runtime/main.ts +2 -2
- package/src/runtime/process.ts +1 -1
- package/src/runtime/program.ts +2 -2
- package/src/runtime/retain.ts +1 -1
- package/src/runtime/runtime.ts +11 -16
- package/stdlib/telemetry.ts +2 -2
package/src/runtime/main.ts
CHANGED
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
import { readFileSync } from "node:fs";
|
|
9
9
|
import { rm, writeFile } from "node:fs/promises";
|
|
10
10
|
import { dirname, join } from "node:path";
|
|
11
|
-
import { launchSchema, type RuntimeState, runtimeFiles } from "./launch
|
|
12
|
-
import { runtimeEndpoint, startRuntime } from "./runtime
|
|
11
|
+
import { launchSchema, type RuntimeState, runtimeFiles } from "./launch";
|
|
12
|
+
import { runtimeEndpoint, startRuntime } from "./runtime";
|
|
13
13
|
|
|
14
14
|
const [launchFile, port] = process.argv.slice(2);
|
|
15
15
|
if (!launchFile) {
|
package/src/runtime/process.ts
CHANGED
package/src/runtime/program.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { readFileSync, realpathSync } from "node:fs";
|
|
2
2
|
import { plugin } from "bun";
|
|
3
3
|
import ts from "typescript";
|
|
4
|
-
import { withBindingRegistry } from "../frontend/elaborate/capture-protocol
|
|
5
|
-
import { bindingNames } from "../frontend/elaborate/graph
|
|
4
|
+
import { withBindingRegistry } from "../frontend/elaborate/capture-protocol";
|
|
5
|
+
import { bindingNames } from "../frontend/elaborate/graph";
|
|
6
6
|
|
|
7
7
|
/** The SDK modules a program imports, as the runtime implements them, by export name. */
|
|
8
8
|
export type Sdk = Readonly<Record<string, Readonly<Record<string, unknown>>>>;
|
package/src/runtime/retain.ts
CHANGED
package/src/runtime/runtime.ts
CHANGED
|
@@ -9,22 +9,17 @@ import {
|
|
|
9
9
|
servePublishedGlobals,
|
|
10
10
|
} from "@tsplc/opcua/server";
|
|
11
11
|
import { readDeclarations } from "@tsplc/typegen/declarations";
|
|
12
|
-
import { now } from "../../stdlib/clock
|
|
13
|
-
import { clamp, max, min } from "../../stdlib/math
|
|
14
|
-
import { retain } from "../../stdlib/retain
|
|
15
|
-
import { onTelemetry, telemetry } from "../../stdlib/telemetry
|
|
16
|
-
import {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
} from "./
|
|
22
|
-
import {
|
|
23
|
-
import { loadProgram } from "./program.ts";
|
|
24
|
-
import { createRetention } from "./retain.ts";
|
|
25
|
-
import { createStorage } from "./storage.ts";
|
|
26
|
-
import { plcGlobals, scalarPaths } from "./symbols.ts";
|
|
27
|
-
import { createTelemetry } from "./telemetry.ts";
|
|
12
|
+
import { now } from "../../stdlib/clock";
|
|
13
|
+
import { clamp, max, min } from "../../stdlib/math";
|
|
14
|
+
import { retain } from "../../stdlib/retain";
|
|
15
|
+
import { onTelemetry, telemetry } from "../../stdlib/telemetry";
|
|
16
|
+
import { createAsync, httpCall, oneLaunchAtATime, unsupported } from "./async";
|
|
17
|
+
import { type Launch, runtimeDirectory, runtimeFiles } from "./launch";
|
|
18
|
+
import { loadProgram } from "./program";
|
|
19
|
+
import { createRetention } from "./retain";
|
|
20
|
+
import { createStorage } from "./storage";
|
|
21
|
+
import { plcGlobals, scalarPaths } from "./symbols";
|
|
22
|
+
import { createTelemetry } from "./telemetry";
|
|
28
23
|
|
|
29
24
|
/** Where the runtime publishes OPC UA: the local CODESYS runtime's address and port. */
|
|
30
25
|
export const runtimeEndpoint = { host: "127.0.0.1", port: 4840 } as const;
|
package/stdlib/telemetry.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { relative } from "node:path";
|
|
2
2
|
import { fileURLToPath } from "node:url";
|
|
3
|
-
import { errorName } from "../src/ir/job-errors
|
|
4
|
-
import { now } from "./clock
|
|
3
|
+
import { errorName } from "../src/ir/job-errors";
|
|
4
|
+
import { now } from "./clock";
|
|
5
5
|
|
|
6
6
|
type Reported = Readonly<Record<string, unknown>>;
|
|
7
7
|
class Text {
|