mirror of
https://github.com/damp11113-software/ccIDE.git
synced 2025-04-26 22:18:13 +00:00
update 1.2.1
Add new 3 blocks library NativeIO CCKey and CCDisk
This commit is contained in:
parent
7ab5faf453
commit
9990bc3c03
232
blocks/CCDisk/block_design.json
Normal file
232
blocks/CCDisk/block_design.json
Normal file
@ -0,0 +1,232 @@
|
||||
{
|
||||
"disk_is_present": {
|
||||
"message0": "Is disk %1 present?",
|
||||
"args0": [
|
||||
{
|
||||
"type": "field_dropdown",
|
||||
"name": "SIDE",
|
||||
"options": [
|
||||
["Top", "top"],
|
||||
["Bottom", "bottom"],
|
||||
["Left", "left"],
|
||||
["Right", "right"],
|
||||
["Front", "front"],
|
||||
["Back", "back"]
|
||||
]
|
||||
}
|
||||
],
|
||||
"output": "Boolean",
|
||||
"colour": 160,
|
||||
"tooltip": "Check if any item is present in the disk drive"
|
||||
},
|
||||
"disk_get_label": {
|
||||
"message0": "get label disk %1",
|
||||
"args0": [
|
||||
{
|
||||
"type": "field_dropdown",
|
||||
"name": "SIDE",
|
||||
"options": [
|
||||
["Top", "top"],
|
||||
["Bottom", "bottom"],
|
||||
["Left", "left"],
|
||||
["Right", "right"],
|
||||
["Front", "front"],
|
||||
["Back", "back"]
|
||||
]
|
||||
}
|
||||
],
|
||||
"output": "String",
|
||||
"colour": 160,
|
||||
"tooltip": "Get the label of the disk in the drive"
|
||||
},
|
||||
"disk_set_label": {
|
||||
"message0": "set label disk %1 to %2",
|
||||
"args0": [
|
||||
{
|
||||
"type": "field_dropdown",
|
||||
"name": "SIDE",
|
||||
"options": [
|
||||
["Top", "top"],
|
||||
["Bottom", "bottom"],
|
||||
["Left", "left"],
|
||||
["Right", "right"],
|
||||
["Front", "front"],
|
||||
["Back", "back"]
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "input_value",
|
||||
"name": "LABEL",
|
||||
"check": "String"
|
||||
}
|
||||
],
|
||||
"previousStatement": null,
|
||||
"nextStatement": null,
|
||||
"colour": 160,
|
||||
"tooltip": "Set the label of the disk in the drive"
|
||||
},
|
||||
"disk_has_data": {
|
||||
"message0": "Is disk %1 have data?",
|
||||
"args0": [
|
||||
{
|
||||
"type": "field_dropdown",
|
||||
"name": "SIDE",
|
||||
"options": [
|
||||
["Top", "top"],
|
||||
["Bottom", "bottom"],
|
||||
["Left", "left"],
|
||||
["Right", "right"],
|
||||
["Front", "front"],
|
||||
["Back", "back"]
|
||||
]
|
||||
}
|
||||
],
|
||||
"output": "Boolean",
|
||||
"colour": 160,
|
||||
"tooltip": "Check if the disk has data"
|
||||
},
|
||||
"disk_get_mount_path": {
|
||||
"message0": "get mount path of disk %1",
|
||||
"args0": [
|
||||
{
|
||||
"type": "field_dropdown",
|
||||
"name": "SIDE",
|
||||
"options": [
|
||||
["Top", "top"],
|
||||
["Bottom", "bottom"],
|
||||
["Left", "left"],
|
||||
["Right", "right"],
|
||||
["Front", "front"],
|
||||
["Back", "back"]
|
||||
]
|
||||
}
|
||||
],
|
||||
"output": "String",
|
||||
"colour": 160,
|
||||
"tooltip": "Get the mount path of the disk"
|
||||
},
|
||||
"disk_has_audio": {
|
||||
"message0": "Is disk %1 have audio?",
|
||||
"args0": [
|
||||
{
|
||||
"type": "field_dropdown",
|
||||
"name": "SIDE",
|
||||
"options": [
|
||||
["Top", "top"],
|
||||
["Bottom", "bottom"],
|
||||
["Left", "left"],
|
||||
["Right", "right"],
|
||||
["Front", "front"],
|
||||
["Back", "back"]
|
||||
]
|
||||
}
|
||||
],
|
||||
"output": "Boolean",
|
||||
"colour": 160,
|
||||
"tooltip": "Check if the disk has audio"
|
||||
},
|
||||
"disk_get_audio_title": {
|
||||
"message0": "get audio title of disk %1",
|
||||
"args0": [
|
||||
{
|
||||
"type": "field_dropdown",
|
||||
"name": "SIDE",
|
||||
"options": [
|
||||
["Top", "top"],
|
||||
["Bottom", "bottom"],
|
||||
["Left", "left"],
|
||||
["Right", "right"],
|
||||
["Front", "front"],
|
||||
["Back", "back"]
|
||||
]
|
||||
}
|
||||
],
|
||||
"output": ["String", "Boolean"],
|
||||
"colour": 160,
|
||||
"tooltip": "Get the title of the audio track"
|
||||
},
|
||||
"disk_play_audio": {
|
||||
"message0": "play audio disk %1",
|
||||
"args0": [
|
||||
{
|
||||
"type": "field_dropdown",
|
||||
"name": "SIDE",
|
||||
"options": [
|
||||
["Top", "top"],
|
||||
["Bottom", "bottom"],
|
||||
["Left", "left"],
|
||||
["Right", "right"],
|
||||
["Front", "front"],
|
||||
["Back", "back"]
|
||||
]
|
||||
}
|
||||
],
|
||||
"previousStatement": null,
|
||||
"nextStatement": null,
|
||||
"colour": 160,
|
||||
"tooltip": "Play the audio track on the disk"
|
||||
},
|
||||
"disk_stop_audio": {
|
||||
"message0": "stop audio on %1",
|
||||
"args0": [
|
||||
{
|
||||
"type": "field_dropdown",
|
||||
"name": "SIDE",
|
||||
"options": [
|
||||
["Top", "top"],
|
||||
["Bottom", "bottom"],
|
||||
["Left", "left"],
|
||||
["Right", "right"],
|
||||
["Front", "front"],
|
||||
["Back", "back"]
|
||||
]
|
||||
}
|
||||
],
|
||||
"previousStatement": null,
|
||||
"nextStatement": null,
|
||||
"colour": 160,
|
||||
"tooltip": "Stop the audio track on the disk"
|
||||
},
|
||||
"disk_eject": {
|
||||
"message0": "eject disk %1",
|
||||
"args0": [
|
||||
{
|
||||
"type": "field_dropdown",
|
||||
"name": "SIDE",
|
||||
"options": [
|
||||
["Top", "top"],
|
||||
["Bottom", "bottom"],
|
||||
["Left", "left"],
|
||||
["Right", "right"],
|
||||
["Front", "front"],
|
||||
["Back", "back"]
|
||||
]
|
||||
}
|
||||
],
|
||||
"previousStatement": null,
|
||||
"nextStatement": null,
|
||||
"colour": 160,
|
||||
"tooltip": "Eject the disk from the drive",
|
||||
"helpUrl": ""
|
||||
},
|
||||
"disk_get_id": {
|
||||
"message0": "get ID of disk %1",
|
||||
"args0": [
|
||||
{
|
||||
"type": "field_dropdown",
|
||||
"name": "SIDE",
|
||||
"options": [
|
||||
["Top", "top"],
|
||||
["Bottom", "bottom"],
|
||||
["Left", "left"],
|
||||
["Right", "right"],
|
||||
["Front", "front"],
|
||||
["Back", "back"]
|
||||
]
|
||||
}
|
||||
],
|
||||
"output": "String",
|
||||
"colour": 160,
|
||||
"tooltip": "Get the unique ID of the disk"
|
||||
}
|
||||
}
|
75
blocks/CCDisk/generator.js
Normal file
75
blocks/CCDisk/generator.js
Normal file
@ -0,0 +1,75 @@
|
||||
// this file not for generator only
|
||||
|
||||
const { luaGenerator } = require('blockly/lua');
|
||||
|
||||
// Check if luaGenerator.forBlock is defined and initialize if necessary
|
||||
if (!luaGenerator.forBlock) {
|
||||
luaGenerator.forBlock = {};
|
||||
}
|
||||
|
||||
luaGenerator.forBlock['disk_is_present'] = function(block, generator) {
|
||||
var side = block.getFieldValue('SIDE');
|
||||
|
||||
return [`disk.isPresent("${side}")`, luaGenerator.ORDER_NONE];
|
||||
};
|
||||
|
||||
luaGenerator.forBlock['disk_get_label'] = function(block, generator) {
|
||||
var side = block.getFieldValue('SIDE');
|
||||
|
||||
return [`disk.getLabel("${side}")`, luaGenerator.ORDER_NONE];
|
||||
};
|
||||
|
||||
luaGenerator.forBlock['disk_set_label'] = function(block, generator) {
|
||||
var side = block.getFieldValue('SIDE');
|
||||
var label = generator.valueToCode(block, 'LABEL', generator.ORDER_ATOMIC);
|
||||
|
||||
return `disk.setLabel("${side}", ${label})\n`;
|
||||
};
|
||||
|
||||
luaGenerator.forBlock['disk_has_data'] = function(block, generator) {
|
||||
var side = block.getFieldValue('SIDE');
|
||||
|
||||
return [`disk.hasData("${side}")`, luaGenerator.ORDER_NONE];
|
||||
};
|
||||
|
||||
luaGenerator.forBlock['disk_get_mount_path'] = function(block, generator) {
|
||||
var side = block.getFieldValue('SIDE');
|
||||
|
||||
return [`disk.getMountPath("${side}")`, luaGenerator.ORDER_NONE];
|
||||
};
|
||||
|
||||
luaGenerator.forBlock['disk_has_audio'] = function(block, generator) {
|
||||
var side = block.getFieldValue('SIDE');
|
||||
|
||||
return [`disk.hasAudio("${side}")`, luaGenerator.ORDER_NONE];
|
||||
};
|
||||
|
||||
luaGenerator.forBlock['disk_get_audio_title'] = function(block, generator) {
|
||||
var side = block.getFieldValue('SIDE');
|
||||
|
||||
return [`disk.getAudioTitle("${side}")`, luaGenerator.ORDER_NONE];
|
||||
};
|
||||
|
||||
luaGenerator.forBlock['disk_play_audio'] = function(block, generator) {
|
||||
var side = block.getFieldValue('SIDE');
|
||||
|
||||
return `disk.playAudio("${side}")\n`;
|
||||
};
|
||||
|
||||
luaGenerator.forBlock['disk_stop_audio'] = function(block, generator) {
|
||||
var side = block.getFieldValue('SIDE');
|
||||
|
||||
return `disk.stopAudio("${side}")\n`;
|
||||
};
|
||||
|
||||
luaGenerator.forBlock['disk_eject'] = function(block, generator) {
|
||||
var side = block.getFieldValue('SIDE');
|
||||
|
||||
return `disk.eject("${side}")\n`;
|
||||
};
|
||||
|
||||
luaGenerator.forBlock['disk_get_id'] = function(block, generator) {
|
||||
var side = block.getFieldValue('SIDE');
|
||||
|
||||
return [`disk.getID("${side}")`, luaGenerator.ORDER_NONE];
|
||||
};
|
22
blocks/CCDisk/index.json
Normal file
22
blocks/CCDisk/index.json
Normal file
@ -0,0 +1,22 @@
|
||||
{
|
||||
"name": "CC: Disk",
|
||||
"author": "DPSoftware Foundation",
|
||||
"description": "Blocks for performing operations on disk drives in ccIDE",
|
||||
"version": "1.0.0",
|
||||
"category": "",
|
||||
"keyword": "disk, operations, ccIDE",
|
||||
"license": "GPL-3.0-or-later",
|
||||
"peripherals": true,
|
||||
"library": true,
|
||||
"require_network": false,
|
||||
"dependencies": {},
|
||||
"design_for_computer": {
|
||||
"basic": true,
|
||||
"adv": true,
|
||||
"command": true,
|
||||
"pocket": false,
|
||||
"advpocket": false,
|
||||
"turtle": true,
|
||||
"advturtle": true
|
||||
}
|
||||
}
|
15
blocks/CCDisk/toolbox.xml
Normal file
15
blocks/CCDisk/toolbox.xml
Normal file
@ -0,0 +1,15 @@
|
||||
<xml id="toolbox" style="display: none;">
|
||||
<category name="Disk" colour="160">
|
||||
<block type="disk_is_present"></block>
|
||||
<block type="disk_get_label"></block>
|
||||
<block type="disk_set_label"></block>
|
||||
<block type="disk_has_data"></block>
|
||||
<block type="disk_get_mount_path"></block>
|
||||
<block type="disk_has_audio"></block>
|
||||
<block type="disk_get_audio_title"></block>
|
||||
<block type="disk_play_audio"></block>
|
||||
<block type="disk_stop_audio"></block>
|
||||
<block type="disk_eject"></block>
|
||||
<block type="disk_get_id"></block>
|
||||
</category>
|
||||
</xml>
|
136
blocks/CCKeys/block_design.json
Normal file
136
blocks/CCKeys/block_design.json
Normal file
@ -0,0 +1,136 @@
|
||||
{
|
||||
"keys_get_key_number": {
|
||||
"message0": "Keys %1",
|
||||
"args0": [
|
||||
{
|
||||
"type": "field_dropdown",
|
||||
"name": "KEY",
|
||||
"options": [
|
||||
["A", "30"],
|
||||
["Apostrophe", "40"],
|
||||
["At", "145"],
|
||||
["Ax", "150"],
|
||||
["B", "48"],
|
||||
["Backspace", "14"],
|
||||
["Backslash", "43"],
|
||||
["CapsLock", "58"],
|
||||
["C", "46"],
|
||||
["Cimcumflex", "144"],
|
||||
["Colon", "146"],
|
||||
["Convert", "121"],
|
||||
["Delete", "211"],
|
||||
["D", "32"],
|
||||
["Down", "208"],
|
||||
["E", "18"],
|
||||
["Eight", "9"],
|
||||
["End", "207"],
|
||||
["Equals", "13"],
|
||||
["F", "33"],
|
||||
["F1", "59"],
|
||||
["F2", "60"],
|
||||
["F3", "61"],
|
||||
["F4", "62"],
|
||||
["F5", "63"],
|
||||
["F6", "64"],
|
||||
["F7", "65"],
|
||||
["F8", "66"],
|
||||
["F9", "67"],
|
||||
["F10", "68"],
|
||||
["F11", "87"],
|
||||
["F12", "88"],
|
||||
["F13", "100"],
|
||||
["F14", "101"],
|
||||
["F15", "102"],
|
||||
["Five", "6"],
|
||||
["Four", "5"],
|
||||
["G", "34"],
|
||||
["H", "35"],
|
||||
["Home", "199"],
|
||||
["I", "23"],
|
||||
["Insert", "210"],
|
||||
["J", "36"],
|
||||
["Kana", "112"],
|
||||
["Kanji", "148"],
|
||||
["K", "37"],
|
||||
["L", "38"],
|
||||
["Left", "203"],
|
||||
["LeftAlt", "56"],
|
||||
["LeftCtrl", "29"],
|
||||
["LeftShift", "42"],
|
||||
["M", "50"],
|
||||
["Minus", "12"],
|
||||
["NumPad0", "82"],
|
||||
["NumPad1", "79"],
|
||||
["NumPad2", "80"],
|
||||
["NumPad3", "81"],
|
||||
["NumPad4", "75"],
|
||||
["NumPad5", "76"],
|
||||
["NumPad6", "77"],
|
||||
["NumPad7", "71"],
|
||||
["NumPad8", "72"],
|
||||
["NumPad9", "73"],
|
||||
["NumPadAdd", "78"],
|
||||
["NumPadComma", "179"],
|
||||
["NumPadDecimal", "83"],
|
||||
["NumPadDivide", "181"],
|
||||
["NumPadEnter", "156"],
|
||||
["NumPadEquals", "141"],
|
||||
["NumPadSubtract", "74"],
|
||||
["NumLock", "69"],
|
||||
["O", "24"],
|
||||
["P", "25"],
|
||||
["PageDown", "209"],
|
||||
["PageUp", "201"],
|
||||
["Period", "52"],
|
||||
["Q", "16"],
|
||||
["R", "19"],
|
||||
["Right", "205"],
|
||||
["RightAlt", "184"],
|
||||
["RightCtrl", "157"],
|
||||
["RightShift", "54"],
|
||||
["Return", "28"],
|
||||
["S", "31"],
|
||||
["ScrollLock", "70"],
|
||||
["SemiColon", "39"],
|
||||
["Seven", "8"],
|
||||
["Slash", "53"],
|
||||
["Space", "57"],
|
||||
["Stop", "149"],
|
||||
["Tab", "15"],
|
||||
["T", "20"],
|
||||
["Three", "4"],
|
||||
["Two", "3"],
|
||||
["U", "22"],
|
||||
["Up", "200"],
|
||||
["V", "47"],
|
||||
["W", "17"],
|
||||
["X", "45"],
|
||||
["Y", "21"],
|
||||
["Yen", "125"],
|
||||
["Z", "44"],
|
||||
["Zero", "11"],
|
||||
["N", "49"],
|
||||
["Noconvert", "123"],
|
||||
["ScollLock", "70"]
|
||||
]
|
||||
}
|
||||
],
|
||||
"inputsInline": true,
|
||||
"output": "Number",
|
||||
"colour": 190,
|
||||
"tooltip": "Get key number"
|
||||
},
|
||||
"keys_get_key_name": {
|
||||
"message0": "Get key %1 name",
|
||||
"args0": [
|
||||
{
|
||||
"type": "input_value",
|
||||
"name": "KEY",
|
||||
"check": "Number"
|
||||
}
|
||||
],
|
||||
"output": "String",
|
||||
"colour": 190,
|
||||
"tooltip": "Translates a numerical key code to a human-readable name."
|
||||
}
|
||||
}
|
18
blocks/CCKeys/generator.js
Normal file
18
blocks/CCKeys/generator.js
Normal file
@ -0,0 +1,18 @@
|
||||
// this file not for generator only
|
||||
|
||||
const { luaGenerator } = require('blockly/lua');
|
||||
|
||||
// Check if luaGenerator.forBlock is defined and initialize if necessary
|
||||
if (!luaGenerator.forBlock) {
|
||||
luaGenerator.forBlock = {};
|
||||
}
|
||||
|
||||
luaGenerator.forBlock['keys_get_key_number'] = function(block, generator) {
|
||||
return [block.getFieldValue('KEY'), generator.ORDER_NONE];
|
||||
};
|
||||
|
||||
luaGenerator.forBlock['text_print'] = function(block, generator) {
|
||||
var key = generator.valueToCode(block, 'KEY', generator.ORDER_NONE);
|
||||
return [`keys.getName(${key})`, luaGenerator.ORDER_NONE];
|
||||
};
|
||||
|
22
blocks/CCKeys/index.json
Normal file
22
blocks/CCKeys/index.json
Normal file
@ -0,0 +1,22 @@
|
||||
{
|
||||
"name": "CC: Keys",
|
||||
"author": "DPSoftware Foundation",
|
||||
"description": "Constants for all keyboard 'key codes', as queued by the key event.",
|
||||
"version": "1.0.0",
|
||||
"category": "Input",
|
||||
"keyword": "Keyboard",
|
||||
"license": "GPL-3.0-or-later",
|
||||
"peripherals": false,
|
||||
"library": true,
|
||||
"require_network": false,
|
||||
"dependencies": {},
|
||||
"design_for_computer": {
|
||||
"basic": true,
|
||||
"adv": true,
|
||||
"command": true,
|
||||
"pocket": true,
|
||||
"advpocket": true,
|
||||
"turtle": true,
|
||||
"advturtle": true
|
||||
}
|
||||
}
|
10
blocks/CCKeys/toolbox.xml
Normal file
10
blocks/CCKeys/toolbox.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<xml id="toolbox" style="display: none;">
|
||||
<category name="Keys" colour="190">
|
||||
<block type="keys_get_key_number"></block>
|
||||
<block type="keys_get_key_name">
|
||||
<value name="KEY">
|
||||
<shadow type="keys_get_key_number"></shadow>
|
||||
</value>
|
||||
</block>
|
||||
</category>
|
||||
</xml>
|
@ -16,7 +16,7 @@
|
||||
"command": true,
|
||||
"pocket": false,
|
||||
"advpocket": false,
|
||||
"turtle": false,
|
||||
"advturtle": false
|
||||
"turtle": true,
|
||||
"advturtle": true
|
||||
}
|
||||
}
|
||||
|
@ -172,7 +172,7 @@
|
||||
},
|
||||
"sysos_clock": {
|
||||
"message0": "Get Uptime",
|
||||
"output": "String",
|
||||
"output": "Number",
|
||||
"colour": 0,
|
||||
"tooltip": "Returns the number of seconds that the computer has been running."
|
||||
},
|
||||
|
@ -10,17 +10,17 @@ if (!luaGenerator.forBlock) {
|
||||
luaGenerator.forBlock['sysos_pullevent'] = function(block, generator) {
|
||||
var event = generator.valueToCode(block, 'EVENT', generator.ORDER_ATOMIC);
|
||||
|
||||
if (event == "") {
|
||||
return [`os.pullevent()`, luaGenerator.ORDER_NONE];
|
||||
if (event == "'All'") {
|
||||
return [`os.pullEvent()`, luaGenerator.ORDER_NONE];
|
||||
} else {
|
||||
return [`os.pullevent(${event})`, luaGenerator.ORDER_NONE];
|
||||
return [`os.pullEvent(${event})`, luaGenerator.ORDER_NONE];
|
||||
}
|
||||
};
|
||||
|
||||
luaGenerator.forBlock['sysos_pullrawevent'] = function(block, generator) {
|
||||
var event = generator.valueToCode(block, 'EVENT', generator.ORDER_ATOMIC);
|
||||
|
||||
if (event == "") {
|
||||
if (event == "'All'") {
|
||||
return [`os.pullEventRaw()`, luaGenerator.ORDER_NONE];
|
||||
} else {
|
||||
return [`os.pullEventRaw(${event})`, luaGenerator.ORDER_NONE];
|
||||
|
134
blocks/NativeIO/block_design.json
Normal file
134
blocks/NativeIO/block_design.json
Normal file
@ -0,0 +1,134 @@
|
||||
{
|
||||
"io_open": {
|
||||
"message0": "Open file %1 with mode %2",
|
||||
"args0": [
|
||||
{
|
||||
"type": "input_value",
|
||||
"name": "FILENAME",
|
||||
"check": "String"
|
||||
},
|
||||
{
|
||||
"type": "field_dropdown",
|
||||
"name": "MODE",
|
||||
"options": [
|
||||
["read", "r"],
|
||||
["write", "w"],
|
||||
["append", "a"],
|
||||
["read/write", "r+"],
|
||||
["write/read", "w+"]
|
||||
]
|
||||
}
|
||||
],
|
||||
"output": "File",
|
||||
"colour": 260,
|
||||
"tooltip": "Open a file with the given mode"
|
||||
},
|
||||
"io_close": {
|
||||
"message0": "Close file %1",
|
||||
"args0": [
|
||||
{
|
||||
"type": "input_value",
|
||||
"name": "FILE",
|
||||
"check": "File"
|
||||
}
|
||||
],
|
||||
"previousStatement": null,
|
||||
"nextStatement": null,
|
||||
"colour": 260,
|
||||
"tooltip": "Close the specified file"
|
||||
},
|
||||
"io_flush": {
|
||||
"message0": "Flush file %1",
|
||||
"args0": [
|
||||
{
|
||||
"type": "input_value",
|
||||
"name": "FILE",
|
||||
"check": "File"
|
||||
}
|
||||
],
|
||||
"previousStatement": null,
|
||||
"nextStatement": null,
|
||||
"colour": 260,
|
||||
"tooltip": "Flush any buffered output, forcing it to be written to the file"
|
||||
},
|
||||
"io_read": {
|
||||
"message0": "Read from file %1 with format %2",
|
||||
"args0": [
|
||||
{
|
||||
"type": "input_value",
|
||||
"name": "FILE",
|
||||
"check": "File"
|
||||
},
|
||||
{
|
||||
"type": "field_dropdown",
|
||||
"name": "FORMAT",
|
||||
"options": [
|
||||
["line", "l"],
|
||||
["line ln", "L"],
|
||||
["All", "a"]
|
||||
]
|
||||
}
|
||||
],
|
||||
"output": "String",
|
||||
"colour": 260,
|
||||
"tooltip": "Read data from the file"
|
||||
},
|
||||
"io_write": {
|
||||
"message0": "Write %1 to file %2",
|
||||
"args0": [
|
||||
{
|
||||
"type": "input_value",
|
||||
"name": "DATA"
|
||||
},
|
||||
{
|
||||
"type": "input_value",
|
||||
"name": "FILE",
|
||||
"check": "File"
|
||||
}
|
||||
],
|
||||
"previousStatement": null,
|
||||
"nextStatement": null,
|
||||
"colour": 260,
|
||||
"tooltip": "Write data to the file"
|
||||
},
|
||||
"io_lines": {
|
||||
"message0": "Read line %1",
|
||||
"args0": [
|
||||
{
|
||||
"type": "input_value",
|
||||
"name": "FILE",
|
||||
"check": "File"
|
||||
}
|
||||
],
|
||||
"output": "Array",
|
||||
"colour": 260,
|
||||
"tooltip": "Returns an iterator that, each time it is called, returns a new line from the file."
|
||||
},
|
||||
"io_seek": {
|
||||
"message0": "Seek in file %1 to position %2 with offset %3",
|
||||
"args0": [
|
||||
{
|
||||
"type": "input_value",
|
||||
"name": "FILE",
|
||||
"check": "File"
|
||||
},
|
||||
{
|
||||
"type": "field_dropdown",
|
||||
"name": "POSITION",
|
||||
"options": [
|
||||
["Set", "set"],
|
||||
["Current", "cur"],
|
||||
["End", "end"]
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "input_value",
|
||||
"name": "OFFSET",
|
||||
"check": "Number"
|
||||
}
|
||||
],
|
||||
"output": "Number",
|
||||
"colour": 260,
|
||||
"tooltip": "Seek to a specific position in the file"
|
||||
}
|
||||
}
|
52
blocks/NativeIO/generator.js
Normal file
52
blocks/NativeIO/generator.js
Normal file
@ -0,0 +1,52 @@
|
||||
const { luaGenerator } = require('blockly/lua');
|
||||
|
||||
if (!luaGenerator.forBlock) {
|
||||
luaGenerator.forBlock = {};
|
||||
}
|
||||
|
||||
luaGenerator.forBlock['io_open'] = function(block, generator) {
|
||||
const filename = generator.valueToCode(block, 'FILENAME', generator.ORDER_ATOMIC);
|
||||
const mode = block.getFieldValue('MODE');
|
||||
const code = `io.open(${filename}, "${mode}")`;
|
||||
return [code, generator.ORDER_NONE];
|
||||
};
|
||||
|
||||
luaGenerator.forBlock['io_close'] = function(block, generator) {
|
||||
const file = generator.valueToCode(block, 'FILE', generator.ORDER_ATOMIC);
|
||||
const code = `${file}:close()\n`;
|
||||
return code;
|
||||
};
|
||||
|
||||
luaGenerator.forBlock['io_read'] = function(block, generator) {
|
||||
const file = generator.valueToCode(block, 'FILE', generator.ORDER_ATOMIC);
|
||||
const format = block.getFieldValue('FORMAT');
|
||||
const code = `${file}:read("${format}")`;
|
||||
return [code, generator.ORDER_NONE];
|
||||
};
|
||||
|
||||
luaGenerator.forBlock['io_write'] = function(block, generator) {
|
||||
const data = generator.valueToCode(block, 'DATA', generator.ORDER_NONE) || '""';
|
||||
const file = generator.valueToCode(block, 'FILE', generator.ORDER_ATOMIC);
|
||||
const code = `${file}:write(${data})\n`;
|
||||
return code;
|
||||
};
|
||||
|
||||
luaGenerator.forBlock['io_seek'] = function(block, generator) {
|
||||
const file = generator.valueToCode(block, 'FILE', generator.ORDER_ATOMIC);
|
||||
const position = generator.valueToCode(block, 'POSITION', generator.ORDER_ATOMIC);
|
||||
const offset = generator.valueToCode(block, 'OFFSET', generator.ORDER_ATOMIC);
|
||||
const code = `${file}:seek("${position}", ${offset})`;
|
||||
return [code, generator.ORDER_NONE];
|
||||
};
|
||||
|
||||
luaGenerator.forBlock['io_lines'] = function(block, generator) {
|
||||
const file = generator.valueToCode(block, 'FILE', generator.ORDER_ATOMIC);
|
||||
const code = `${file}:lines()`;
|
||||
return [code, generator.ORDER_NONE];
|
||||
};
|
||||
|
||||
luaGenerator.forBlock['io_flush'] = function(block, generator) {
|
||||
const file = generator.valueToCode(block, 'FILE', generator.ORDER_ATOMIC);
|
||||
const code = `${file}:flush()\n`;
|
||||
return code;
|
||||
};
|
22
blocks/NativeIO/index.json
Normal file
22
blocks/NativeIO/index.json
Normal file
@ -0,0 +1,22 @@
|
||||
{
|
||||
"name": "IO",
|
||||
"author": "DPSoftware Foundation",
|
||||
"description": "Lua Native: Input/Output file",
|
||||
"version": "1.0.0",
|
||||
"category": "Native",
|
||||
"keyword": "Native, Lua, IO",
|
||||
"license": "GPL-3.0-or-later",
|
||||
"peripherals": false,
|
||||
"library": true,
|
||||
"require_network": false,
|
||||
"dependencies": {},
|
||||
"design_for_computer": {
|
||||
"basic": true,
|
||||
"adv": true,
|
||||
"command": true,
|
||||
"pocket": true,
|
||||
"advpocket": true,
|
||||
"turtle": true,
|
||||
"advturtle": true
|
||||
}
|
||||
}
|
36
blocks/NativeIO/toolbox.xml
Normal file
36
blocks/NativeIO/toolbox.xml
Normal file
@ -0,0 +1,36 @@
|
||||
<xml id="toolbox" style="display: none;">
|
||||
<category name="IO" colour="260">
|
||||
<!-- Open file block -->
|
||||
<block type="io_open">
|
||||
<value name="MODE">
|
||||
<shadow type="field_dropdown">
|
||||
<field name="MODE">r</field>
|
||||
</shadow>
|
||||
</value>
|
||||
</block>
|
||||
<block type="io_read">
|
||||
<value name="FORMAT">
|
||||
<shadow type="field_dropdown">
|
||||
<field name="FORMAT">a</field>
|
||||
</shadow>
|
||||
</value>
|
||||
</block>
|
||||
<block type="io_write">
|
||||
<value name="DATA">
|
||||
<shadow type="text">
|
||||
<field name="TEXT">Hello, world!</field>
|
||||
</shadow>
|
||||
</value>
|
||||
</block>
|
||||
<block type="io_seek">
|
||||
<value name="OFFSET">
|
||||
<shadow type="math_number">
|
||||
<field name="NUM">0</field>
|
||||
</shadow>
|
||||
</value>
|
||||
</block>
|
||||
<block type="io_lines"></block>
|
||||
<block type="io_flush"></block>
|
||||
<block type="io_close"></block>
|
||||
</category>
|
||||
</xml>
|
Binary file not shown.
1
ccIDE.wheel
Normal file
1
ccIDE.wheel
Normal file
@ -0,0 +1 @@
|
||||
{"title":"ccIDE","description":"","entries":[{"text":"fs","id":"bpjk25nz5u"},{"text":"gps","id":"4ycx32t6zv"},{"text":"http","id":"sy5e4jg9te"},{"text":"multishell","id":"zmpdq862sr"},{"text":"paintutils","id":"2kcgbw3r5k"},{"text":"peripheral","id":"jzj9g9s4q9"},{"text":"shell","id":"aekamm3pn6"},{"text":"term","id":"phtvswrv6v"},{"text":"vector","id":"6c6uz56m77"},{"text":"window","id":"5dk6dkpz9b"},{"text":"cc.audio.dfpwm","id":"dkbm2ftkcr"},{"text":"cc.completion","id":"95vdrwx3rf"},{"text":"cc.expect","id":"g6agen6yej"},{"text":"cc.image.nft","id":"rwb9d7eru7"},{"text":"cc.pretty","id":"twkxbcsgh8"},{"text":"cc.require","id":"b3n7k2xnny"},{"text":"cc.shell.completion","id":"9x98gv9hba"},{"text":"cc.strings","id":"jcru68rr39"},{"text":"computer (turtle)","id":"cdrvm4equh"},{"text":"monitor (peripheral)","id":"hmtaqyh5rf"},{"text":"printer (peripheral)","id":"kcwfe8suy5"},{"text":"speaker (peripheral)","id":"92p9tv9wbz"},{"text":"energy_storage (peripheral)","id":"3td8u4cua3"},{"text":"fluid_storage (peripheral)","id":"gt2ndb9pj4"},{"text":"inventory (peripheral)","id":"zx9c8aqakq"}],"colorSettings":[{"color":"#3369E8","enabled":true},{"color":"#D50F25","enabled":true},{"color":"#EEB211","enabled":true},{"color":"#009925","enabled":true},{"color":"#000000","enabled":false},{"color":"#000000","enabled":false}],"pageBackgroundColor":"#FFFFFF","type":"color","pictureType":"none","coverImageType":"gallery","coverImageName":"/images/chocolate-chip-cookie.jpg","galleryPicture":"/images/none.png","customPictureName":"","customPictureDataUri":"","customCoverImageDataUri":"","centerText":"","allowDuplicates":true,"duringSpinSound":"ticking-sound","duringSpinSoundVolume":50,"afterSpinSound":"no-sound","afterSpinSoundVolume":50,"maxNames":1000,"spinTime":10,"launchConfetti":true,"animateWinner":false,"autoRemoveWinner":true,"displayWinnerDialog":true,"displayRemoveButton":true,"displayHideButton":true,"winnerMessage":"เรามีผู้ชนะ!","playClickWhenWinnerRemoved":false,"hubSize":"S","drawOutlines":false,"slowSpin":false,"showTitle":true,"isAdvanced":false}
|
36
index.js
36
index.js
@ -1,9 +1,14 @@
|
||||
console.log("Initializing...")
|
||||
const { app, BrowserWindow, ipcMain, Menu, dialog } = require('electron')
|
||||
const fs = require('fs');
|
||||
const prompt = require('electron-prompt');
|
||||
const path = require('path');
|
||||
const pino = require('pino')
|
||||
const pretty = require('pino-pretty')
|
||||
const ipc = ipcMain
|
||||
|
||||
const logger = pino(pretty())
|
||||
|
||||
process.env['ELECTRON_DISABLE_SECURITY_WARNINGS'] = 'true';
|
||||
|
||||
let currentprojectpath = null;
|
||||
@ -14,7 +19,11 @@ let appreloading = false;
|
||||
let currentworkspacechange = false;
|
||||
let isopennewproject = false;
|
||||
|
||||
|
||||
let appstarted = false;
|
||||
|
||||
app.whenReady().then(() => {
|
||||
logger.info("Initializing splash window...")
|
||||
reloadall(false);
|
||||
var splash = new BrowserWindow({
|
||||
width: 600,
|
||||
@ -30,7 +39,8 @@ app.whenReady().then(() => {
|
||||
});
|
||||
|
||||
splash.loadFile('src/splash.html');
|
||||
splash.webContents.send("change-status", "Initializing...")
|
||||
|
||||
logger.info("Initializing main windows...")
|
||||
|
||||
const win = new BrowserWindow({
|
||||
width: 1280,
|
||||
@ -45,7 +55,7 @@ app.whenReady().then(() => {
|
||||
show: false,
|
||||
center: true,
|
||||
})
|
||||
|
||||
|
||||
try {
|
||||
win.loadFile('src/index.html');
|
||||
} catch {
|
||||
@ -58,21 +68,32 @@ app.whenReady().then(() => {
|
||||
win.setTitle(`ccIDE`)
|
||||
|
||||
ipc.once('ready', () => {
|
||||
console.log("ready")
|
||||
logger.info("Ready!")
|
||||
if (splash) {
|
||||
splash.close();
|
||||
}
|
||||
win.show();
|
||||
win.maximize();
|
||||
//win.maximize();
|
||||
appstarted = true;
|
||||
});
|
||||
|
||||
ipc.on('erroronstart', (event, errormessage) => {
|
||||
logger.error(errormessage)
|
||||
dialog.showErrorBox("Error on startup", errormessage);
|
||||
//win.openDevTools();
|
||||
});
|
||||
|
||||
ipc.on('update-startup-status', (event, status) => {
|
||||
splash.webContents.send("change-status", status)
|
||||
ipc.on('error', (event, errormessage) => {
|
||||
logger.error(errormessage)
|
||||
dialog.showErrorBox("Error", errormessage);
|
||||
//win.openDevTools();
|
||||
});
|
||||
|
||||
ipc.on('update-log-status', (event, status) => {
|
||||
logger.info(status)
|
||||
if (!appstarted) {
|
||||
splash.webContents.send("change-status", status)
|
||||
}
|
||||
});
|
||||
|
||||
//app.on('activate', () => {
|
||||
@ -95,6 +116,7 @@ app.whenReady().then(() => {
|
||||
}
|
||||
}
|
||||
|
||||
logger.info("Settings up menu bar...")
|
||||
// Define a custom menu template
|
||||
const menuTemplate = [
|
||||
{
|
||||
@ -274,6 +296,8 @@ app.whenReady().then(() => {
|
||||
// Set the custom menu
|
||||
const menu = Menu.buildFromTemplate(menuTemplate);
|
||||
Menu.setApplicationMenu(menu);
|
||||
|
||||
logger.info("Settings up event...")
|
||||
|
||||
ipc.on('prompt', (event, promptText, defaultValue) => {
|
||||
try {
|
||||
|
554
package-lock.json
generated
554
package-lock.json
generated
@ -14,6 +14,8 @@
|
||||
"blockly": "^11.1.1",
|
||||
"bootstrap": "^5.3.3",
|
||||
"electron-prompt": "^1.7.0",
|
||||
"pino": "^9.3.2",
|
||||
"pino-pretty": "^11.2.2",
|
||||
"xmldom": "^0.6.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
@ -140,6 +142,17 @@
|
||||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/abort-controller": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz",
|
||||
"integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==",
|
||||
"dependencies": {
|
||||
"event-target-shim": "^5.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.5"
|
||||
}
|
||||
},
|
||||
"node_modules/agent-base": {
|
||||
"version": "7.1.1",
|
||||
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz",
|
||||
@ -156,6 +169,33 @@
|
||||
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
|
||||
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
|
||||
},
|
||||
"node_modules/atomic-sleep": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/atomic-sleep/-/atomic-sleep-1.0.0.tgz",
|
||||
"integrity": "sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ==",
|
||||
"engines": {
|
||||
"node": ">=8.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/base64-js": {
|
||||
"version": "1.5.1",
|
||||
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
|
||||
"integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/feross"
|
||||
},
|
||||
{
|
||||
"type": "patreon",
|
||||
"url": "https://www.patreon.com/feross"
|
||||
},
|
||||
{
|
||||
"type": "consulting",
|
||||
"url": "https://feross.org/support"
|
||||
}
|
||||
]
|
||||
},
|
||||
"node_modules/blockly": {
|
||||
"version": "11.1.1",
|
||||
"resolved": "https://registry.npmjs.org/blockly/-/blockly-11.1.1.tgz",
|
||||
@ -191,6 +231,29 @@
|
||||
"@popperjs/core": "^2.11.8"
|
||||
}
|
||||
},
|
||||
"node_modules/buffer": {
|
||||
"version": "6.0.3",
|
||||
"resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz",
|
||||
"integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/feross"
|
||||
},
|
||||
{
|
||||
"type": "patreon",
|
||||
"url": "https://www.patreon.com/feross"
|
||||
},
|
||||
{
|
||||
"type": "consulting",
|
||||
"url": "https://feross.org/support"
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"base64-js": "^1.3.1",
|
||||
"ieee754": "^1.2.1"
|
||||
}
|
||||
},
|
||||
"node_modules/buffer-crc32": {
|
||||
"version": "0.2.13",
|
||||
"resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz",
|
||||
@ -235,6 +298,11 @@
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/colorette": {
|
||||
"version": "2.0.20",
|
||||
"resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz",
|
||||
"integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w=="
|
||||
},
|
||||
"node_modules/combined-stream": {
|
||||
"version": "1.0.8",
|
||||
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
|
||||
@ -269,6 +337,14 @@
|
||||
"node": ">=18"
|
||||
}
|
||||
},
|
||||
"node_modules/dateformat": {
|
||||
"version": "4.6.3",
|
||||
"resolved": "https://registry.npmjs.org/dateformat/-/dateformat-4.6.3.tgz",
|
||||
"integrity": "sha512-2P0p0pFGzHS5EMnhdxQi7aJN+iMheud0UhG4dlE1DLAlvL8JHjJJTX/CSm4JXwV0Ka5nGk3zC5mcb5bUQUxxMA==",
|
||||
"engines": {
|
||||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/debug": {
|
||||
"version": "4.3.5",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz",
|
||||
@ -459,6 +535,22 @@
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/event-target-shim": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz",
|
||||
"integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==",
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/events": {
|
||||
"version": "3.3.0",
|
||||
"resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz",
|
||||
"integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==",
|
||||
"engines": {
|
||||
"node": ">=0.8.x"
|
||||
}
|
||||
},
|
||||
"node_modules/extract-zip": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz",
|
||||
@ -478,6 +570,24 @@
|
||||
"@types/yauzl": "^2.9.1"
|
||||
}
|
||||
},
|
||||
"node_modules/fast-copy": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/fast-copy/-/fast-copy-3.0.2.tgz",
|
||||
"integrity": "sha512-dl0O9Vhju8IrcLndv2eU4ldt1ftXMqqfgN4H1cpmGV7P6jeB9FwpN9a2c8DPGE1Ys88rNUJVYDHq73CGAGOPfQ=="
|
||||
},
|
||||
"node_modules/fast-redact": {
|
||||
"version": "3.5.0",
|
||||
"resolved": "https://registry.npmjs.org/fast-redact/-/fast-redact-3.5.0.tgz",
|
||||
"integrity": "sha512-dwsoQlS7h9hMeYUq1W++23NDcBLV4KqONnITDV9DjfS3q1SgDGVrBdvvTLUotWtPSD7asWDV9/CmsZPy8Hf70A==",
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/fast-safe-stringify": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz",
|
||||
"integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA=="
|
||||
},
|
||||
"node_modules/fd-slicer": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz",
|
||||
@ -688,6 +798,11 @@
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/help-me": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/help-me/-/help-me-5.0.0.tgz",
|
||||
"integrity": "sha512-7xgomUX6ADmcYzFik0HzAxh/73YlKR9bmFzf51CZwR+b6YtzU2m0u49hQCqV6SvlqIqsaxovfwdvbnsw3b/zpg=="
|
||||
},
|
||||
"node_modules/html-encoding-sniffer": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-4.0.0.tgz",
|
||||
@ -751,11 +866,38 @@
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/ieee754": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
|
||||
"integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/feross"
|
||||
},
|
||||
{
|
||||
"type": "patreon",
|
||||
"url": "https://www.patreon.com/feross"
|
||||
},
|
||||
{
|
||||
"type": "consulting",
|
||||
"url": "https://feross.org/support"
|
||||
}
|
||||
]
|
||||
},
|
||||
"node_modules/is-potential-custom-element-name": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz",
|
||||
"integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ=="
|
||||
},
|
||||
"node_modules/joycon": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/joycon/-/joycon-3.1.1.tgz",
|
||||
"integrity": "sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==",
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/jsdom": {
|
||||
"version": "23.0.0",
|
||||
"resolved": "https://registry.npmjs.org/jsdom/-/jsdom-23.0.0.tgz",
|
||||
@ -869,6 +1011,14 @@
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/minimist": {
|
||||
"version": "1.2.8",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
|
||||
"integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/ms": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
||||
@ -899,6 +1049,14 @@
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/on-exit-leak-free": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/on-exit-leak-free/-/on-exit-leak-free-2.1.2.tgz",
|
||||
"integrity": "sha512-0eJJY6hXLGf1udHwfNftBqH+g73EU4B504nZeKpz1sYRKafAghwxEJunB2O7rDZkL4PGfsMVnTXZ2EjibbqcsA==",
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/once": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
||||
@ -931,6 +1089,78 @@
|
||||
"resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz",
|
||||
"integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg=="
|
||||
},
|
||||
"node_modules/pino": {
|
||||
"version": "9.3.2",
|
||||
"resolved": "https://registry.npmjs.org/pino/-/pino-9.3.2.tgz",
|
||||
"integrity": "sha512-WtARBjgZ7LNEkrGWxMBN/jvlFiE17LTbBoH0konmBU684Kd0uIiDwBXlcTCW7iJnA6HfIKwUssS/2AC6cDEanw==",
|
||||
"dependencies": {
|
||||
"atomic-sleep": "^1.0.0",
|
||||
"fast-redact": "^3.1.1",
|
||||
"on-exit-leak-free": "^2.1.0",
|
||||
"pino-abstract-transport": "^1.2.0",
|
||||
"pino-std-serializers": "^7.0.0",
|
||||
"process-warning": "^4.0.0",
|
||||
"quick-format-unescaped": "^4.0.3",
|
||||
"real-require": "^0.2.0",
|
||||
"safe-stable-stringify": "^2.3.1",
|
||||
"sonic-boom": "^4.0.1",
|
||||
"thread-stream": "^3.0.0"
|
||||
},
|
||||
"bin": {
|
||||
"pino": "bin.js"
|
||||
}
|
||||
},
|
||||
"node_modules/pino-abstract-transport": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/pino-abstract-transport/-/pino-abstract-transport-1.2.0.tgz",
|
||||
"integrity": "sha512-Guhh8EZfPCfH+PMXAb6rKOjGQEoy0xlAIn+irODG5kgfYV+BQ0rGYYWTIel3P5mmyXqkYkPmdIkywsn6QKUR1Q==",
|
||||
"dependencies": {
|
||||
"readable-stream": "^4.0.0",
|
||||
"split2": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/pino-pretty": {
|
||||
"version": "11.2.2",
|
||||
"resolved": "https://registry.npmjs.org/pino-pretty/-/pino-pretty-11.2.2.tgz",
|
||||
"integrity": "sha512-2FnyGir8nAJAqD3srROdrF1J5BIcMT4nwj7hHSc60El6Uxlym00UbCCd8pYIterstVBFlMyF1yFV8XdGIPbj4A==",
|
||||
"dependencies": {
|
||||
"colorette": "^2.0.7",
|
||||
"dateformat": "^4.6.3",
|
||||
"fast-copy": "^3.0.2",
|
||||
"fast-safe-stringify": "^2.1.1",
|
||||
"help-me": "^5.0.0",
|
||||
"joycon": "^3.1.1",
|
||||
"minimist": "^1.2.6",
|
||||
"on-exit-leak-free": "^2.1.0",
|
||||
"pino-abstract-transport": "^1.0.0",
|
||||
"pump": "^3.0.0",
|
||||
"readable-stream": "^4.0.0",
|
||||
"secure-json-parse": "^2.4.0",
|
||||
"sonic-boom": "^4.0.1",
|
||||
"strip-json-comments": "^3.1.1"
|
||||
},
|
||||
"bin": {
|
||||
"pino-pretty": "bin.js"
|
||||
}
|
||||
},
|
||||
"node_modules/pino-std-serializers": {
|
||||
"version": "7.0.0",
|
||||
"resolved": "https://registry.npmjs.org/pino-std-serializers/-/pino-std-serializers-7.0.0.tgz",
|
||||
"integrity": "sha512-e906FRY0+tV27iq4juKzSYPbUj2do2X2JX4EzSca1631EB2QJQUqGbDuERal7LCtOpxl6x3+nvo9NPZcmjkiFA=="
|
||||
},
|
||||
"node_modules/process": {
|
||||
"version": "0.11.10",
|
||||
"resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
|
||||
"integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==",
|
||||
"engines": {
|
||||
"node": ">= 0.6.0"
|
||||
}
|
||||
},
|
||||
"node_modules/process-warning": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/process-warning/-/process-warning-4.0.0.tgz",
|
||||
"integrity": "sha512-/MyYDxttz7DfGMMHiysAsFE4qF+pQYAA8ziO/3NcRVrQ5fSk+Mns4QZA/oRPFzvcqNoVJXQNWNAsdwBXLUkQKw=="
|
||||
},
|
||||
"node_modules/progress": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz",
|
||||
@ -966,6 +1196,11 @@
|
||||
"resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz",
|
||||
"integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ=="
|
||||
},
|
||||
"node_modules/quick-format-unescaped": {
|
||||
"version": "4.0.4",
|
||||
"resolved": "https://registry.npmjs.org/quick-format-unescaped/-/quick-format-unescaped-4.0.4.tgz",
|
||||
"integrity": "sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg=="
|
||||
},
|
||||
"node_modules/quick-lru": {
|
||||
"version": "5.1.1",
|
||||
"resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz",
|
||||
@ -977,6 +1212,29 @@
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/readable-stream": {
|
||||
"version": "4.5.2",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.5.2.tgz",
|
||||
"integrity": "sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g==",
|
||||
"dependencies": {
|
||||
"abort-controller": "^3.0.0",
|
||||
"buffer": "^6.0.3",
|
||||
"events": "^3.3.0",
|
||||
"process": "^0.11.10",
|
||||
"string_decoder": "^1.3.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/real-require": {
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/real-require/-/real-require-0.2.0.tgz",
|
||||
"integrity": "sha512-57frrGM/OCTLqLOAh0mhVA9VBMHd+9U7Zb2THMGdBUoZVOtGbJzjxsYGDJ3A9AYYCP4hn6y1TVbaOfzWtm5GFg==",
|
||||
"engines": {
|
||||
"node": ">= 12.13.0"
|
||||
}
|
||||
},
|
||||
"node_modules/requires-port": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz",
|
||||
@ -1020,6 +1278,33 @@
|
||||
"resolved": "https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.6.0.tgz",
|
||||
"integrity": "sha512-APM0Gt1KoXBz0iIkkdB/kfvGOwC4UuJFeG/c+yV7wSc7q96cG/kJ0HiYCnzivD9SB53cLV1MlHFNfOuPaadYSw=="
|
||||
},
|
||||
"node_modules/safe-buffer": {
|
||||
"version": "5.2.1",
|
||||
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
|
||||
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/feross"
|
||||
},
|
||||
{
|
||||
"type": "patreon",
|
||||
"url": "https://www.patreon.com/feross"
|
||||
},
|
||||
{
|
||||
"type": "consulting",
|
||||
"url": "https://feross.org/support"
|
||||
}
|
||||
]
|
||||
},
|
||||
"node_modules/safe-stable-stringify": {
|
||||
"version": "2.4.3",
|
||||
"resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.4.3.tgz",
|
||||
"integrity": "sha512-e2bDA2WJT0wxseVd4lsDP4+3ONX6HpMXQa1ZhFQ7SU+GjvORCmShbCMltrtIDfkYhVHrOcPtj+KhmDBdPdZD1g==",
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/safer-buffer": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
|
||||
@ -1036,6 +1321,11 @@
|
||||
"node": ">=v12.22.7"
|
||||
}
|
||||
},
|
||||
"node_modules/secure-json-parse": {
|
||||
"version": "2.7.0",
|
||||
"resolved": "https://registry.npmjs.org/secure-json-parse/-/secure-json-parse-2.7.0.tgz",
|
||||
"integrity": "sha512-6aU+Rwsezw7VR8/nyvKTx8QpWH9FrcYiXXlqC4z5d5XQBDRqtbfsRjnwGyqbi3gddNtWHuEk9OANUotL26qKUw=="
|
||||
},
|
||||
"node_modules/semver": {
|
||||
"version": "6.3.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
|
||||
@ -1065,12 +1355,47 @@
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/sonic-boom": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-4.0.1.tgz",
|
||||
"integrity": "sha512-hTSD/6JMLyT4r9zeof6UtuBDpjJ9sO08/nmS5djaA9eozT9oOlNdpXSnzcgj4FTqpk3nkLrs61l4gip9r1HCrQ==",
|
||||
"dependencies": {
|
||||
"atomic-sleep": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/split2": {
|
||||
"version": "4.2.0",
|
||||
"resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz",
|
||||
"integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==",
|
||||
"engines": {
|
||||
"node": ">= 10.x"
|
||||
}
|
||||
},
|
||||
"node_modules/sprintf-js": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz",
|
||||
"integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==",
|
||||
"optional": true
|
||||
},
|
||||
"node_modules/string_decoder": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
|
||||
"integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
|
||||
"dependencies": {
|
||||
"safe-buffer": "~5.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/strip-json-comments": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz",
|
||||
"integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==",
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/sumchecker": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/sumchecker/-/sumchecker-3.0.1.tgz",
|
||||
@ -1087,6 +1412,14 @@
|
||||
"resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz",
|
||||
"integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw=="
|
||||
},
|
||||
"node_modules/thread-stream": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/thread-stream/-/thread-stream-3.1.0.tgz",
|
||||
"integrity": "sha512-OqyPZ9u96VohAyMfJykzmivOrY2wfMSf3C5TtFJVgN+Hm6aj+voFhlK+kZEIv2FBh1X6Xp3DlnCOfEQ3B2J86A==",
|
||||
"dependencies": {
|
||||
"real-require": "^0.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/tough-cookie": {
|
||||
"version": "4.1.4",
|
||||
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.4.tgz",
|
||||
@ -1356,6 +1689,14 @@
|
||||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"abort-controller": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz",
|
||||
"integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==",
|
||||
"requires": {
|
||||
"event-target-shim": "^5.0.0"
|
||||
}
|
||||
},
|
||||
"agent-base": {
|
||||
"version": "7.1.1",
|
||||
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz",
|
||||
@ -1369,6 +1710,16 @@
|
||||
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
|
||||
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
|
||||
},
|
||||
"atomic-sleep": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/atomic-sleep/-/atomic-sleep-1.0.0.tgz",
|
||||
"integrity": "sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ=="
|
||||
},
|
||||
"base64-js": {
|
||||
"version": "1.5.1",
|
||||
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
|
||||
"integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA=="
|
||||
},
|
||||
"blockly": {
|
||||
"version": "11.1.1",
|
||||
"resolved": "https://registry.npmjs.org/blockly/-/blockly-11.1.1.tgz",
|
||||
@ -1389,6 +1740,15 @@
|
||||
"integrity": "sha512-8HLCdWgyoMguSO9o+aH+iuZ+aht+mzW0u3HIMzVu7Srrpv7EBBxTnrFlSCskwdY1+EOFQSm7uMJhNQHkdPcmjg==",
|
||||
"requires": {}
|
||||
},
|
||||
"buffer": {
|
||||
"version": "6.0.3",
|
||||
"resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz",
|
||||
"integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==",
|
||||
"requires": {
|
||||
"base64-js": "^1.3.1",
|
||||
"ieee754": "^1.2.1"
|
||||
}
|
||||
},
|
||||
"buffer-crc32": {
|
||||
"version": "0.2.13",
|
||||
"resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz",
|
||||
@ -1421,6 +1781,11 @@
|
||||
"mimic-response": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"colorette": {
|
||||
"version": "2.0.20",
|
||||
"resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz",
|
||||
"integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w=="
|
||||
},
|
||||
"combined-stream": {
|
||||
"version": "1.0.8",
|
||||
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
|
||||
@ -1446,6 +1811,11 @@
|
||||
"whatwg-url": "^14.0.0"
|
||||
}
|
||||
},
|
||||
"dateformat": {
|
||||
"version": "4.6.3",
|
||||
"resolved": "https://registry.npmjs.org/dateformat/-/dateformat-4.6.3.tgz",
|
||||
"integrity": "sha512-2P0p0pFGzHS5EMnhdxQi7aJN+iMheud0UhG4dlE1DLAlvL8JHjJJTX/CSm4JXwV0Ka5nGk3zC5mcb5bUQUxxMA=="
|
||||
},
|
||||
"debug": {
|
||||
"version": "4.3.5",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz",
|
||||
@ -1572,6 +1942,16 @@
|
||||
"integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",
|
||||
"optional": true
|
||||
},
|
||||
"event-target-shim": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz",
|
||||
"integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ=="
|
||||
},
|
||||
"events": {
|
||||
"version": "3.3.0",
|
||||
"resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz",
|
||||
"integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q=="
|
||||
},
|
||||
"extract-zip": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz",
|
||||
@ -1583,6 +1963,21 @@
|
||||
"yauzl": "^2.10.0"
|
||||
}
|
||||
},
|
||||
"fast-copy": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/fast-copy/-/fast-copy-3.0.2.tgz",
|
||||
"integrity": "sha512-dl0O9Vhju8IrcLndv2eU4ldt1ftXMqqfgN4H1cpmGV7P6jeB9FwpN9a2c8DPGE1Ys88rNUJVYDHq73CGAGOPfQ=="
|
||||
},
|
||||
"fast-redact": {
|
||||
"version": "3.5.0",
|
||||
"resolved": "https://registry.npmjs.org/fast-redact/-/fast-redact-3.5.0.tgz",
|
||||
"integrity": "sha512-dwsoQlS7h9hMeYUq1W++23NDcBLV4KqONnITDV9DjfS3q1SgDGVrBdvvTLUotWtPSD7asWDV9/CmsZPy8Hf70A=="
|
||||
},
|
||||
"fast-safe-stringify": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz",
|
||||
"integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA=="
|
||||
},
|
||||
"fd-slicer": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz",
|
||||
@ -1732,6 +2127,11 @@
|
||||
"function-bind": "^1.1.2"
|
||||
}
|
||||
},
|
||||
"help-me": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/help-me/-/help-me-5.0.0.tgz",
|
||||
"integrity": "sha512-7xgomUX6ADmcYzFik0HzAxh/73YlKR9bmFzf51CZwR+b6YtzU2m0u49hQCqV6SvlqIqsaxovfwdvbnsw3b/zpg=="
|
||||
},
|
||||
"html-encoding-sniffer": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-4.0.0.tgz",
|
||||
@ -1780,11 +2180,21 @@
|
||||
"safer-buffer": ">= 2.1.2 < 3.0.0"
|
||||
}
|
||||
},
|
||||
"ieee754": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
|
||||
"integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA=="
|
||||
},
|
||||
"is-potential-custom-element-name": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz",
|
||||
"integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ=="
|
||||
},
|
||||
"joycon": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/joycon/-/joycon-3.1.1.tgz",
|
||||
"integrity": "sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw=="
|
||||
},
|
||||
"jsdom": {
|
||||
"version": "23.0.0",
|
||||
"resolved": "https://registry.npmjs.org/jsdom/-/jsdom-23.0.0.tgz",
|
||||
@ -1872,6 +2282,11 @@
|
||||
"resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz",
|
||||
"integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ=="
|
||||
},
|
||||
"minimist": {
|
||||
"version": "1.2.8",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
|
||||
"integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA=="
|
||||
},
|
||||
"ms": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
||||
@ -1893,6 +2308,11 @@
|
||||
"integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==",
|
||||
"optional": true
|
||||
},
|
||||
"on-exit-leak-free": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/on-exit-leak-free/-/on-exit-leak-free-2.1.2.tgz",
|
||||
"integrity": "sha512-0eJJY6hXLGf1udHwfNftBqH+g73EU4B504nZeKpz1sYRKafAghwxEJunB2O7rDZkL4PGfsMVnTXZ2EjibbqcsA=="
|
||||
},
|
||||
"once": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
||||
@ -1919,6 +2339,69 @@
|
||||
"resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz",
|
||||
"integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg=="
|
||||
},
|
||||
"pino": {
|
||||
"version": "9.3.2",
|
||||
"resolved": "https://registry.npmjs.org/pino/-/pino-9.3.2.tgz",
|
||||
"integrity": "sha512-WtARBjgZ7LNEkrGWxMBN/jvlFiE17LTbBoH0konmBU684Kd0uIiDwBXlcTCW7iJnA6HfIKwUssS/2AC6cDEanw==",
|
||||
"requires": {
|
||||
"atomic-sleep": "^1.0.0",
|
||||
"fast-redact": "^3.1.1",
|
||||
"on-exit-leak-free": "^2.1.0",
|
||||
"pino-abstract-transport": "^1.2.0",
|
||||
"pino-std-serializers": "^7.0.0",
|
||||
"process-warning": "^4.0.0",
|
||||
"quick-format-unescaped": "^4.0.3",
|
||||
"real-require": "^0.2.0",
|
||||
"safe-stable-stringify": "^2.3.1",
|
||||
"sonic-boom": "^4.0.1",
|
||||
"thread-stream": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"pino-abstract-transport": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/pino-abstract-transport/-/pino-abstract-transport-1.2.0.tgz",
|
||||
"integrity": "sha512-Guhh8EZfPCfH+PMXAb6rKOjGQEoy0xlAIn+irODG5kgfYV+BQ0rGYYWTIel3P5mmyXqkYkPmdIkywsn6QKUR1Q==",
|
||||
"requires": {
|
||||
"readable-stream": "^4.0.0",
|
||||
"split2": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"pino-pretty": {
|
||||
"version": "11.2.2",
|
||||
"resolved": "https://registry.npmjs.org/pino-pretty/-/pino-pretty-11.2.2.tgz",
|
||||
"integrity": "sha512-2FnyGir8nAJAqD3srROdrF1J5BIcMT4nwj7hHSc60El6Uxlym00UbCCd8pYIterstVBFlMyF1yFV8XdGIPbj4A==",
|
||||
"requires": {
|
||||
"colorette": "^2.0.7",
|
||||
"dateformat": "^4.6.3",
|
||||
"fast-copy": "^3.0.2",
|
||||
"fast-safe-stringify": "^2.1.1",
|
||||
"help-me": "^5.0.0",
|
||||
"joycon": "^3.1.1",
|
||||
"minimist": "^1.2.6",
|
||||
"on-exit-leak-free": "^2.1.0",
|
||||
"pino-abstract-transport": "^1.0.0",
|
||||
"pump": "^3.0.0",
|
||||
"readable-stream": "^4.0.0",
|
||||
"secure-json-parse": "^2.4.0",
|
||||
"sonic-boom": "^4.0.1",
|
||||
"strip-json-comments": "^3.1.1"
|
||||
}
|
||||
},
|
||||
"pino-std-serializers": {
|
||||
"version": "7.0.0",
|
||||
"resolved": "https://registry.npmjs.org/pino-std-serializers/-/pino-std-serializers-7.0.0.tgz",
|
||||
"integrity": "sha512-e906FRY0+tV27iq4juKzSYPbUj2do2X2JX4EzSca1631EB2QJQUqGbDuERal7LCtOpxl6x3+nvo9NPZcmjkiFA=="
|
||||
},
|
||||
"process": {
|
||||
"version": "0.11.10",
|
||||
"resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
|
||||
"integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A=="
|
||||
},
|
||||
"process-warning": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/process-warning/-/process-warning-4.0.0.tgz",
|
||||
"integrity": "sha512-/MyYDxttz7DfGMMHiysAsFE4qF+pQYAA8ziO/3NcRVrQ5fSk+Mns4QZA/oRPFzvcqNoVJXQNWNAsdwBXLUkQKw=="
|
||||
},
|
||||
"progress": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz",
|
||||
@ -1948,11 +2431,33 @@
|
||||
"resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz",
|
||||
"integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ=="
|
||||
},
|
||||
"quick-format-unescaped": {
|
||||
"version": "4.0.4",
|
||||
"resolved": "https://registry.npmjs.org/quick-format-unescaped/-/quick-format-unescaped-4.0.4.tgz",
|
||||
"integrity": "sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg=="
|
||||
},
|
||||
"quick-lru": {
|
||||
"version": "5.1.1",
|
||||
"resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz",
|
||||
"integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA=="
|
||||
},
|
||||
"readable-stream": {
|
||||
"version": "4.5.2",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.5.2.tgz",
|
||||
"integrity": "sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g==",
|
||||
"requires": {
|
||||
"abort-controller": "^3.0.0",
|
||||
"buffer": "^6.0.3",
|
||||
"events": "^3.3.0",
|
||||
"process": "^0.11.10",
|
||||
"string_decoder": "^1.3.0"
|
||||
}
|
||||
},
|
||||
"real-require": {
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/real-require/-/real-require-0.2.0.tgz",
|
||||
"integrity": "sha512-57frrGM/OCTLqLOAh0mhVA9VBMHd+9U7Zb2THMGdBUoZVOtGbJzjxsYGDJ3A9AYYCP4hn6y1TVbaOfzWtm5GFg=="
|
||||
},
|
||||
"requires-port": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz",
|
||||
@ -1990,6 +2495,16 @@
|
||||
"resolved": "https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.6.0.tgz",
|
||||
"integrity": "sha512-APM0Gt1KoXBz0iIkkdB/kfvGOwC4UuJFeG/c+yV7wSc7q96cG/kJ0HiYCnzivD9SB53cLV1MlHFNfOuPaadYSw=="
|
||||
},
|
||||
"safe-buffer": {
|
||||
"version": "5.2.1",
|
||||
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
|
||||
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="
|
||||
},
|
||||
"safe-stable-stringify": {
|
||||
"version": "2.4.3",
|
||||
"resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.4.3.tgz",
|
||||
"integrity": "sha512-e2bDA2WJT0wxseVd4lsDP4+3ONX6HpMXQa1ZhFQ7SU+GjvORCmShbCMltrtIDfkYhVHrOcPtj+KhmDBdPdZD1g=="
|
||||
},
|
||||
"safer-buffer": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
|
||||
@ -2003,6 +2518,11 @@
|
||||
"xmlchars": "^2.2.0"
|
||||
}
|
||||
},
|
||||
"secure-json-parse": {
|
||||
"version": "2.7.0",
|
||||
"resolved": "https://registry.npmjs.org/secure-json-parse/-/secure-json-parse-2.7.0.tgz",
|
||||
"integrity": "sha512-6aU+Rwsezw7VR8/nyvKTx8QpWH9FrcYiXXlqC4z5d5XQBDRqtbfsRjnwGyqbi3gddNtWHuEk9OANUotL26qKUw=="
|
||||
},
|
||||
"semver": {
|
||||
"version": "6.3.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
|
||||
@ -2023,12 +2543,38 @@
|
||||
"type-fest": "^0.13.1"
|
||||
}
|
||||
},
|
||||
"sonic-boom": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-4.0.1.tgz",
|
||||
"integrity": "sha512-hTSD/6JMLyT4r9zeof6UtuBDpjJ9sO08/nmS5djaA9eozT9oOlNdpXSnzcgj4FTqpk3nkLrs61l4gip9r1HCrQ==",
|
||||
"requires": {
|
||||
"atomic-sleep": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"split2": {
|
||||
"version": "4.2.0",
|
||||
"resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz",
|
||||
"integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg=="
|
||||
},
|
||||
"sprintf-js": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz",
|
||||
"integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==",
|
||||
"optional": true
|
||||
},
|
||||
"string_decoder": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
|
||||
"integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
|
||||
"requires": {
|
||||
"safe-buffer": "~5.2.0"
|
||||
}
|
||||
},
|
||||
"strip-json-comments": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz",
|
||||
"integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig=="
|
||||
},
|
||||
"sumchecker": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/sumchecker/-/sumchecker-3.0.1.tgz",
|
||||
@ -2042,6 +2588,14 @@
|
||||
"resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz",
|
||||
"integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw=="
|
||||
},
|
||||
"thread-stream": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/thread-stream/-/thread-stream-3.1.0.tgz",
|
||||
"integrity": "sha512-OqyPZ9u96VohAyMfJykzmivOrY2wfMSf3C5TtFJVgN+Hm6aj+voFhlK+kZEIv2FBh1X6Xp3DlnCOfEQ3B2J86A==",
|
||||
"requires": {
|
||||
"real-require": "^0.2.0"
|
||||
}
|
||||
},
|
||||
"tough-cookie": {
|
||||
"version": "4.1.4",
|
||||
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.4.tgz",
|
||||
|
@ -18,6 +18,8 @@
|
||||
"blockly": "^11.1.1",
|
||||
"bootstrap": "^5.3.3",
|
||||
"electron-prompt": "^1.7.0",
|
||||
"pino": "^9.3.2",
|
||||
"pino-pretty": "^11.2.2",
|
||||
"xmldom": "^0.6.0"
|
||||
}
|
||||
}
|
||||
|
@ -42,6 +42,8 @@ function mergeXml(xml1, xml2) {
|
||||
}
|
||||
|
||||
function loadperipheral(workspace, currenttoolbar, peripherals) {
|
||||
console.log(`Importing ${peripherals} blocks`)
|
||||
|
||||
const filePath = path.join(peripheralsfolder, peripherals);
|
||||
const jsonfilePath = path.join(filePath, "block_design.json");
|
||||
const xmlfilePath = path.join(filePath, "toolbox.xml");
|
||||
@ -79,11 +81,9 @@ function loadperipheral(workspace, currenttoolbar, peripherals) {
|
||||
|
||||
document.getElementById('statusMessage').textContent = `Loaded ${peripherals}`;
|
||||
|
||||
try {
|
||||
require(generatorfilePath); // This will execute generator.js if it's a Node.js module
|
||||
} catch (error) {
|
||||
console.error('Error loading generator.js:', error);
|
||||
}
|
||||
require(generatorfilePath); // This will execute generator.js if it's a Node.js module
|
||||
|
||||
console.log(`Loaded ${peripherals} blocks`)
|
||||
|
||||
return newxml;
|
||||
}
|
||||
@ -114,7 +114,7 @@ function addimageiconinfo(div, src, tiptool) {
|
||||
img.setAttribute('data-bs-placement', "bottom");
|
||||
img.setAttribute('data-bs-title', tiptool);
|
||||
div.appendChild(img);
|
||||
console.log(`added image ${img}`);
|
||||
console.log(`added image ${src}`);
|
||||
}
|
||||
|
||||
function scanindex() {
|
||||
@ -175,7 +175,6 @@ function scanindex() {
|
||||
description.innerHTML = jsonData.description;
|
||||
libraryDetails.appendChild(description);
|
||||
|
||||
console.log(jsonData)
|
||||
if (jsonData.design_for_computer.basic) {
|
||||
addimageiconinfo(libraryDetails, defineicon.computer.basic, "Basic Computer Supported");
|
||||
}
|
||||
@ -211,7 +210,7 @@ function scanindex() {
|
||||
|
||||
libraryItem.appendChild(libraryDetails);
|
||||
document.getElementById('libcontainer').appendChild(libraryItem);
|
||||
console.log(`registered ${blockfoldername} blocks and added to packages managers`)
|
||||
console.log(`Registered ${blockfoldername} blocks and added to packages managers`)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,7 @@ class CCRemote {
|
||||
host: ip
|
||||
});
|
||||
|
||||
console.log("Server is started");
|
||||
console.log("Remote server is started");
|
||||
|
||||
this.socket.on('connection', (ws) => {
|
||||
document.getElementById("navbar-button-computer-disconnect").disabled = false;
|
||||
|
@ -5,6 +5,7 @@ function delay(time) {
|
||||
const { luaGenerator } = require('blockly/lua'); // Use require syntax for Blockly module
|
||||
const { CCRemote } = require("./ccRemote")
|
||||
|
||||
console.log("Starting remote server...")
|
||||
const ccInstance = new CCRemote('127.0.0.1', 5133);
|
||||
|
||||
const progress = document.getElementById("progress");
|
||||
@ -46,19 +47,20 @@ function gencodeonly() {
|
||||
}
|
||||
|
||||
async function gencode() {
|
||||
console.log("Starting generate code")
|
||||
document.getElementById('upload-popup').style.display = 'block';
|
||||
upcurrentActive = 1;
|
||||
uploadError = false;
|
||||
uploadUpdateProgress();
|
||||
// compile/convert code
|
||||
|
||||
console.log("Generating code...")
|
||||
upcurrentActive++;
|
||||
uploadUpdateProgress();
|
||||
document.getElementById('upload-status').textContent = "Generating code";
|
||||
let code = null;
|
||||
try {
|
||||
code = luaGenerator.workspaceToCode(workspace);
|
||||
console.log(code);
|
||||
} catch (e) {
|
||||
uploadError = true;
|
||||
uploadUpdateProgress();
|
||||
@ -70,16 +72,19 @@ async function gencode() {
|
||||
uploadUpdateProgress();
|
||||
if (ccInstance.isClientConnect()) {
|
||||
// upload to computercraft with remote
|
||||
console.log("Uploading code to machine...")
|
||||
document.getElementById('upload-status').textContent = "Uploading code to machine";
|
||||
ccInstance.sendCode(code);
|
||||
await delay(500)
|
||||
|
||||
// execute with remote
|
||||
console.log("Executing code in machine...")
|
||||
document.getElementById('upload-status').textContent = "Executing code";
|
||||
upcurrentActive++;
|
||||
uploadUpdateProgress();
|
||||
ccInstance.runCode();
|
||||
} else {
|
||||
console.log("Machine is not connected")
|
||||
uploadError = true;
|
||||
uploadUpdateProgress();
|
||||
document.getElementById('upload-status').innerHTML = `Please Connect Computer to IDE.\nInstruction: <a href="https://github.com/DPSoftware-Foundation/ccIDE#install-remote-code-into-computercraft">Install Remote code into computercraft</a> in github. (Please press SHIFT or CTRL and click)`;
|
||||
@ -87,6 +92,7 @@ async function gencode() {
|
||||
}
|
||||
|
||||
// done!
|
||||
console.log("Run code done!")
|
||||
document.getElementById('upload-status').textContent = "Done!";
|
||||
await delay(1000)
|
||||
document.getElementById('upload-popup').style.animation = 'fadeOut 0.3s ease'; // Apply fade-out animation
|
||||
|
27
src/index.js
27
src/index.js
@ -6,7 +6,20 @@ window.prompt = function(promptText, defaultValue) {
|
||||
return ipc.sendSync("prompt", promptText, defaultValue);
|
||||
};
|
||||
|
||||
ipc.send("update-startup-status", "Importing module...")
|
||||
window.onerror = function (message, source, lineno, colno, error) {
|
||||
ipc.send("error", message)
|
||||
return true; // Prevents the default browser error handling
|
||||
};
|
||||
|
||||
console.originalLog = console.log;
|
||||
|
||||
console.log = function (...args) {
|
||||
ipc.send("update-log-status", ...args)
|
||||
console.originalLog(...args)
|
||||
};
|
||||
|
||||
|
||||
console.log("Importing module...")
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const { loadperipheral, scanindex } = require("./blocksmanager");
|
||||
@ -17,7 +30,7 @@ let isprojectsaved = false;
|
||||
let isprojectopened = false;
|
||||
let usedlibinproject = []
|
||||
|
||||
ipc.send("update-startup-status", "Initializing blockly workspace...")
|
||||
console.log("Initializing blockly workspace...")
|
||||
Blockly.utils.colour.setHsvSaturation(0.9)
|
||||
|
||||
let originaltoolbar = fs.readFileSync(path.join(__dirname, "toolbox.xml"), 'utf8');
|
||||
@ -52,7 +65,7 @@ try {
|
||||
}
|
||||
|
||||
try {
|
||||
ipc.send("update-startup-status", "Importing system library...")
|
||||
console.log("Importing system library...")
|
||||
const sysmodulejson = fs.readFileSync(path.join(__dirname, "module_block_design.json"), 'utf8');
|
||||
const blocksJson = JSON.parse(sysmodulejson);
|
||||
for (const blockId in blocksJson) {
|
||||
@ -66,13 +79,13 @@ try {
|
||||
}
|
||||
require("./module_generator")
|
||||
|
||||
ipc.send("update-startup-status", "Scanning library...")
|
||||
console.log("Scanning library...")
|
||||
scanindex();
|
||||
} catch (e) {
|
||||
ipc.send("erroronstart", `Error on loading block: ${e}`)
|
||||
}
|
||||
|
||||
ipc.send("update-startup-status", "Initializing event...")
|
||||
console.log("Initializing event...")
|
||||
|
||||
ipc.on('export-lua-request', (event) => {
|
||||
console.log("exporting lua")
|
||||
@ -81,6 +94,7 @@ ipc.on('export-lua-request', (event) => {
|
||||
|
||||
// Save workspace
|
||||
ipc.on('save-workspace-request', (event) => {
|
||||
console.log("Saving project...")
|
||||
document.getElementById('statusMessage').textContent = `Saving...`;
|
||||
const state = Blockly.serialization.workspaces.save(workspace);
|
||||
const data = {
|
||||
@ -93,6 +107,7 @@ ipc.on('save-workspace-request', (event) => {
|
||||
|
||||
// Load workspace
|
||||
ipc.on('load-workspace', (event, json) => {
|
||||
console.log("Loading project...")
|
||||
try {
|
||||
if (json) {
|
||||
data = JSON.parse(json)
|
||||
@ -182,7 +197,7 @@ document.getElementById("packageman-import-btn").addEventListener('click', () =>
|
||||
});
|
||||
|
||||
// Ensure Blockly container is shown after the workspace is injected
|
||||
ipc.send("update-startup-status", "Finished")
|
||||
console.log("Finished")
|
||||
setTimeout(() => {
|
||||
ipc.send("ready")
|
||||
}, 500);
|
||||
|
@ -16,7 +16,7 @@ luaGenerator.forBlock['sys_sleep'] = function(block, generator) {
|
||||
luaGenerator.forBlock['sys_utils_table_variable_pack'] = function(block, generator) {
|
||||
var args = generator.valueToCode(block, 'RETURN_ARGS', generator.ORDER_NONE);
|
||||
|
||||
return [`table.pack(${arg})`, luaGenerator.ORDER_NONE];
|
||||
return [`table.pack(${args})`, luaGenerator.ORDER_NONE];
|
||||
};
|
||||
|
||||
luaGenerator.forBlock['sys_utils_get_value_from_table_with_index'] = function(block, generator) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user