triangulum 0.23.1 → 0.24.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 78a4616c999a395eb7a1fc99924e817708ca3bba0233e6a2bfa01b9a354ebab2
4
- data.tar.gz: a057a59d9a02f23846d80b17d61469a25b1954a5a79285ea9b76a00f3e96fa9b
3
+ metadata.gz: 82788568b3fd3bcf93b64c1faa30c8bcbbb4fa5332d1906d75b5a9302ffcfc7d
4
+ data.tar.gz: 77ab63ef9f5802ed7d8f9c27e6bb9aa7262420af7d9142909769de1c9e86e422
5
5
  SHA512:
6
- metadata.gz: ab03ed256309b986a2e936b9d5dbb863de15f8a8445460ecaa863de3fa6d8085b5fe68ca00d25af95caa4bcc4103c1922f021c6cf8904b01c873906a70790318
7
- data.tar.gz: cbc64b3dd31fe78faf7259e5712919c43da0553db9f4701f7345a671b8e73fe999a9c7f03c5bd40902fde97fd5452de5b8d86da052313e37e1017517884018be
6
+ metadata.gz: c9a2a3ab86c9128de98ed31f74ad017b8630af10906819be6e04872f16bd8cac3f6b717986bd2179d669e94d249baac8270d398b54bd8571ebe546f866c74457
7
+ data.tar.gz: abf484e23f28c8fada5923d68f5501a4a3b5732dbd726a28ab9d0d5b38b4961967ff4847a04328649b33029c193eae3d7d7c1b87844b1e5c61b6a7207e6fec87
@@ -175702,7 +175702,7 @@ function _4(e6) {
175702
175702
  if (typeof e6 == "string" && e6 !== "")
175703
175703
  return e6;
175704
175704
  }
175705
- var ee2 = `
175705
+ var v4 = `
175706
175706
  interface Array<T> {
175707
175707
  [n: number]: T;
175708
175708
  length: number;
@@ -175723,25 +175723,25 @@ var ee2 = `
175723
175723
 
175724
175724
  import ReturnType = Utils.ReturnType;
175725
175725
  `;
175726
- function v4(t3, n3) {
175726
+ function y4(t3, n3) {
175727
175727
  let r3 = /* @__PURE__ */ new Map;
175728
- return r3.set(t3, n3), r3.set("lib.codezero.d.ts", ee2), o3(d4(r3), [t3, "lib.codezero.d.ts"], import_typescript.default, y4);
175728
+ return r3.set(t3, n3), r3.set("lib.codezero.d.ts", v4), o3(d4(r3), [t3, "lib.codezero.d.ts"], import_typescript.default, b3);
175729
175729
  }
175730
- var y4 = {
175730
+ var b3 = {
175731
175731
  target: import_typescript.default.ScriptTarget.Latest,
175732
175732
  lib: ["lib.codezero.d.ts"],
175733
175733
  noEmit: true,
175734
175734
  strictNullChecks: true
175735
175735
  };
175736
- function b3(e6, t3 = "any", n3 = true) {
175736
+ function x3(e6, t3 = "any", n3 = true) {
175737
175737
  let r3 = Array.from(new Set(e6?.flatMap((e7) => e7.genericKeys || []))).map((e7) => `type ${e7} = ${t3};`).join(`
175738
175738
  `), i3 = e6?.map((e7) => `type ${e7.identifier}${(e7.genericKeys?.length ?? 0) > 0 ? `<${e7.genericKeys?.join(",")}>` : ""} = ${e7.type};`).join(`
175739
175739
  `);
175740
175740
  return `${n3 ? r3 : ""}
175741
175741
  ${i3}`;
175742
175742
  }
175743
- var x3 = (e6) => e6?.replace(/[^a-zA-Z0-9]/g, "_");
175744
- function S3(e6, t3, n3, r3 = false) {
175743
+ var S3 = (e6) => e6?.replace(/[^a-zA-Z0-9]/g, "_");
175744
+ function C3(e6, t3, n3, r3 = false) {
175745
175745
  let i3 = e6?.nodes?.nodes || [], a3 = new Map(t3?.map((e7) => [e7.identifier, e7])), o4 = /* @__PURE__ */ new Set, s4 = (t4, n4 = "") => {
175746
175746
  let c5 = i3.find((e7) => e7?.id === t4);
175747
175747
  if (!c5 || !c5.functionDefinition)
@@ -175754,7 +175754,7 @@ function S3(e6, t3, n3, r3 = false) {
175754
175754
  if (!o5)
175755
175755
  return r3 ? `/* @pos ${t4} ${a4} */ {}` : `/* @pos ${t4} ${a4} */ undefined`;
175756
175756
  if (o5.__typename === "ReferenceValue") {
175757
- let n5 = o5, r4 = typeof n5.inputIndex == "number" ? `p_${x3(n5.nodeFunctionId ?? "undefined")}_${n5.parameterIndex}[${n5.inputIndex}]` : n5.nodeFunctionId ? `node_${x3(n5.nodeFunctionId)}` : `flow_${x3(e6?.id ?? "undefined")}`;
175757
+ let n5 = o5, r4 = typeof n5.inputIndex == "number" ? `p_${S3(n5.nodeFunctionId ?? "undefined")}_${n5.parameterIndex}[${n5.inputIndex}]` : n5.nodeFunctionId ? `node_${S3(n5.nodeFunctionId)}` : `flow_${S3(e6?.id ?? "undefined")}`;
175758
175758
  return n5.referencePath?.forEach((e7) => {
175759
175759
  r4 += `?.${e7.path}`;
175760
175760
  }), `/* @pos ${t4} ${a4} */ ${r4}`;
@@ -175763,11 +175763,11 @@ function S3(e6, t3, n3, r3 = false) {
175763
175763
  return `/* @pos ${t4} ${a4} */ ${g4(o5?.value)}`;
175764
175764
  if (o5.__typename === "SubFlowValue") {
175765
175765
  let e7 = o5;
175766
- return `/* @pos ${t4} ${a4} */ (...${`p_${x3(t4)}_${a4}`}) => {
175766
+ return `/* @pos ${t4} ${a4} */ (...${`p_${S3(t4)}_${a4}`}) => {
175767
175767
  ${s4(e7.startingNodeId || e7.functionDefinition?.id, n4 + " ")}${n4}}`;
175768
175768
  }
175769
175769
  return r3 ? `/* @pos ${t4} ${a4} */ {}` : `/* @pos ${t4} ${a4} */ undefined`;
175770
- }), u6 = `node_${x3(c5.id)}`, d6 = `fn_${c5?.functionDefinition?.identifier?.replace(/::/g, "_")}`;
175770
+ }), u6 = `node_${S3(c5.id)}`, d6 = `fn_${c5?.functionDefinition?.identifier?.replace(/::/g, "_")}`;
175771
175771
  l5.includes("undefined");
175772
175772
  let f6 = `${n4}`;
175773
175773
  return c5.functionDefinition.identifier === "std::control::return" ? (f6 += `const ${u6} = /* @pos ${t4} null */ ${d6}(${l5.join(", ")}) ;
@@ -175782,7 +175782,7 @@ ${s4(e7.startingNodeId || e7.functionDefinition?.id, n4 + " ")}${n4}}`;
175782
175782
  ${s4(c5.parameters?.nodes?.[2]?.value?.startingNodeId || c5.parameters?.nodes?.[2]?.value?.functionDefinition?.identifier, n4 + " ")}
175783
175783
  }`) : f6 += `const ${u6} = /* @pos ${t4} null */ ${d6}(${l5.join(", ")}) ;
175784
175784
  `, c5.nextNodeId && (f6 += s4(c5.nextNodeId, n4)), f6;
175785
- }, c4 = b3(n3), l4 = `declare function flow${e6?.signature ?? "(): void"}`, u5 = t3?.map((e7) => `declare function fn_${e7.identifier?.replace(/::/g, "_")}${e7.signature}`).join(`
175785
+ }, c4 = x3(n3), l4 = `declare function flow${e6?.signature ?? "(): void"}`, u5 = t3?.map((e7) => `declare function fn_${e7.identifier?.replace(/::/g, "_")}${e7.signature}`).join(`
175786
175786
  `), d5 = new Set(i3.map((e7) => e7?.nextNodeId).filter((e7) => !!e7)), f5 = /* @__PURE__ */ new Set;
175787
175787
  return i3.forEach((e7) => e7?.parameters?.nodes?.forEach((e8) => {
175788
175788
  e8?.value?.__typename === "SubFlowValue" && (e8.value.startingNodeId || e8.value.functionDefinition?.id) && f5.add(e8.value.startingNodeId || e8.value.functionDefinition?.id);
@@ -175794,13 +175794,13 @@ ${s4(e7.startingNodeId || e7.functionDefinition?.id, n4 + " ")}${n4}}`;
175794
175794
  ${u5}
175795
175795
 
175796
175796
  (() =>
175797
- ${e6 ? `const flow_${x3(e6.id ?? "")} = /* @pos null null */ flow(${e6.settings?.nodes?.map((e7, t4) => `/* @pos null ${t4} */ ${g4(e7?.value)}`).join(", ") ?? ""});` : ""}
175797
+ ${e6 ? `const flow_${S3(e6.id ?? "")} = /* @pos null null */ flow(${e6.settings?.nodes?.map((e7, t4) => `/* @pos null ${t4} */ ${g4(e7?.value)}`).join(", ") ?? ""});` : ""}
175798
175798
  ${i3.filter((e7) => e7?.id && !d5.has(e7.id) && !f5.has(e7.id)).map((e7) => s4(e7.id)).join(`
175799
175799
  `)}
175800
175800
  )();
175801
175801
  `;
175802
175802
  }
175803
- var T3 = (e6, n3, r3) => {
175803
+ var E3 = (e6, n3, r3) => {
175804
175804
  if (!e6?.startingNodeId)
175805
175805
  return {
175806
175806
  isValid: false,
@@ -175825,7 +175825,7 @@ var T3 = (e6, n3, r3) => {
175825
175825
  severity: "error"
175826
175826
  }]
175827
175827
  };
175828
- let i3 = S3(e6, n3, r3), a3 = "index.ts", o4 = v4(a3, i3), s4 = o4.getSourceFile(a3), c4 = o4.languageService.getProgram().getSemanticDiagnostics(s4).map((e7) => {
175828
+ let i3 = C3(e6, n3, r3), a3 = "index.ts", o4 = y4(a3, i3), s4 = o4.getSourceFile(a3), c4 = o4.languageService.getProgram().getSemanticDiagnostics(s4).map((e7) => {
175829
175829
  let n4 = import_typescript.flattenDiagnosticMessageText(e7.messageText, `
175830
175830
  `), r4, i4 = null;
175831
175831
  if (e7.start !== undefined) {
@@ -175854,5 +175854,5 @@ var T3 = (e6, n3, r3) => {
175854
175854
  // ../entrypoint/single-validation.ts
175855
175855
  var data = await readSingleValidation(console);
175856
175856
  var validationInput = mapToFlowValidation(data);
175857
- var result = T3(validationInput.flow, validationInput.functions, validationInput.dataTypes);
175857
+ var result = E3(validationInput.flow, validationInput.functions, validationInput.dataTypes);
175858
175858
  console.info(JSON.stringify(result));
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Triangulum
4
- VERSION = '0.23.1'
4
+ VERSION = '0.24.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: triangulum
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.23.1
4
+ version: 0.24.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Niklas van Schrick