blockly-fluid 1.2.2 → 1.2.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.
Files changed (2) hide show
  1. package/index.js +4 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -3,7 +3,7 @@ module.exports = (Blockly, { generator: languageGeneratorFallback, generators: l
3
3
  set(_, name, configuration = {}) {
4
4
  if (typeof configuration === "function") (configuration = configuration());
5
5
 
6
- const {
6
+ let {
7
7
  hat,
8
8
  layout = [],
9
9
  inputs = {},
@@ -22,6 +22,8 @@ module.exports = (Blockly, { generator: languageGeneratorFallback, generators: l
22
22
  } = configuration;
23
23
 
24
24
  Blockly.Blocks[name] = {
25
+ ...Blockly.Blocks[name],
26
+
25
27
  init: function () {
26
28
  if ((typeof hat === "function") ? hat() : hat) this.setStyle("hat_blocks");
27
29
 
@@ -189,7 +191,7 @@ module.exports = (Blockly, { generator: languageGeneratorFallback, generators: l
189
191
  if (!output) return code;
190
192
 
191
193
  return (Array.isArray(code)) ? [
192
- (code[1]?.toLowerCase() !== "nugget") ? code[0] : `(() => {\n${code[0].split("\n").map((line) => " " + line).join("\n")}\n})()`,
194
+ (code[1]?.toLowerCase() !== "nugget") ? code[0] : `await (async () => {\n${code[0].split("\n").map((line) => " " + line).join("\n")}\n})()`,
193
195
  languageGenerator[`ORDER_${(code[1]?.toLowerCase().replaceAll("nugget", "") || "NONE").toUpperCase()}`]
194
196
  ] : [
195
197
  code,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blockly-fluid",
3
- "version": "1.2.2",
3
+ "version": "1.2.4",
4
4
  "description": "A flexible proxy wrapper for Blockly blocks.",
5
5
  "main": "index.js",
6
6
  "scripts": {