chore: import upstream snapshot with attribution
RequirementsTest / build (windows-latest, 3.9) (push) Has been cancelled
RequirementsTest / build (macos-latest, 3.9) (push) Has been cancelled
RequirementsTest / build (ubuntu-latest, 3.9) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
Pylint / build (3.9) (push) Has been cancelled

This commit is contained in:
wehub-resource-sync
2026-07-13 13:18:32 +08:00
commit f0dfbfc3d7
1306 changed files with 364980 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
/**
* @license
* Copyright 2019 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @fileoverview Blockly core module for Node. It includes blockly-node.js
* and adds a helper method for setting the locale.
*/
/* eslint-disable */
'use strict';
// Add a helper method to set the Blockly locale.
Blockly.setLocale = function (locale) {
Blockly.Msg = Blockly.Msg || {};
Object.keys(locale).forEach(function (k) {
Blockly.Msg[k] = locale[k];
});
};
// Override textToDomDocument and provide Node.js alternatives to DOMParser and
// XMLSerializer.
if (typeof Blockly.utils.global.document !== 'object') {
Blockly.utils.global.DOMParser = require("jsdom/lib/jsdom/living").DOMParser;
Blockly.utils.global.XMLSerializer = require("jsdom/lib/jsdom/living").XMLSerializer;
var doc = Blockly.utils.xml.textToDomDocument(
'<xml xmlns="https://developers.google.com/blockly/xml"></xml>');
Blockly.utils.xml.document = function() {
return doc;
};
}
+31
View File
@@ -0,0 +1,31 @@
/**
* @license
* Copyright 2019 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @fileoverview Blockly module for Node. It includes Blockly core,
* built-in blocks, all the generators and the English locale.
*/
/* eslint-disable */
'use strict';
// Include the EN Locale by default.
Blockly.setLocale(En);
Blockly.Blocks = Blockly.Blocks || {};
Object.keys(BlocklyBlocks).forEach(function (k) {
Blockly.Blocks[k] = BlocklyBlocks[k];
});
Blockly.JavaScript = BlocklyJS;
Blockly.Python = BlocklyPython;
Blockly.Lua = BlocklyLua;
Blockly.PHP = BlocklyPHP;
Blockly.Dart = BlocklyDart;