Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

monaco-sql-languages

Package Overview
Dependencies
Maintainers
8
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

monaco-sql-languages - npm Package Compare versions

Comparing version 0.12.0-beta.1 to 0.12.0-beta.2

27

out/amd/flinksql/flinksql.contribution.js

@@ -5,2 +5,25 @@ /*---------------------------------------------------------------------------------------------

*--------------------------------------------------------------------------------------------*/
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
define(["require", "exports", "../_.contribution", "../fillers/monaco-editor-core"], function (require, exports, __contribution_1, monaco_editor_core_1) {

@@ -16,3 +39,3 @@ "use strict";

aliases: ['FlinkSQL'],
loader: function () { return new Promise(function (resolve_1, reject_1) { require(['./flinksql'], resolve_1, reject_1); }); }
loader: function () { return new Promise(function (resolve_1, reject_1) { require(['./flinksql'], resolve_1, reject_1); }).then(__importStar); }
});

@@ -22,3 +45,3 @@ (0, __contribution_1.loadLanguage)(languageId);

monaco_editor_core_1.languages.onLanguage(languageId, function () {
new Promise(function (resolve_2, reject_2) { require(['../setupLanguageMode'], resolve_2, reject_2); }).then(function (mode) { return mode.setupLanguageMode(flinkDefaults); });
new Promise(function (resolve_2, reject_2) { require(['../setupLanguageMode'], resolve_2, reject_2); }).then(__importStar).then(function (mode) { return mode.setupLanguageMode(flinkDefaults); });
});

@@ -25,0 +48,0 @@ }

@@ -0,4 +1,28 @@

var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
define(["require", "exports", "monaco-editor/esm/vs/editor/editor.worker.js", "./flinkSQLWorker"], function (require, exports, EditorWorker, flinkSQLWorker_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
EditorWorker = __importStar(EditorWorker);
self.onmessage = function (e) {

@@ -5,0 +29,0 @@ EditorWorker.initialize(function (ctx, createData) {

@@ -16,2 +16,5 @@ var __extends = (this && this.__extends) || (function () {

})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
define(["require", "exports", "dt-sql-parser/dist/parser/flinksql", "../baseSQLWorker"], function (require, exports, flinksql_1, baseSQLWorker_1) {

@@ -21,2 +24,3 @@ "use strict";

exports.create = exports.FLinkSQLWorker = void 0;
flinksql_1 = __importDefault(flinksql_1);
var FLinkSQLWorker = /** @class */ (function (_super) {

@@ -23,0 +27,0 @@ __extends(FLinkSQLWorker, _super);

@@ -5,2 +5,25 @@ /*---------------------------------------------------------------------------------------------

*--------------------------------------------------------------------------------------------*/
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
define(["require", "exports", "../_.contribution", "../fillers/monaco-editor-core"], function (require, exports, __contribution_1, monaco_editor_core_1) {

@@ -14,3 +37,3 @@ "use strict";

aliases: ['HiveSQL'],
loader: function () { return new Promise(function (resolve_1, reject_1) { require(['./hivesql'], resolve_1, reject_1); }); }
loader: function () { return new Promise(function (resolve_1, reject_1) { require(['./hivesql'], resolve_1, reject_1); }).then(__importStar); }
});

@@ -20,4 +43,4 @@ (0, __contribution_1.loadLanguage)(languageId);

monaco_editor_core_1.languages.onLanguage(languageId, function () {
new Promise(function (resolve_2, reject_2) { require(['../setupLanguageMode'], resolve_2, reject_2); }).then(function (mode) { return mode.setupLanguageMode(defaults); });
new Promise(function (resolve_2, reject_2) { require(['../setupLanguageMode'], resolve_2, reject_2); }).then(__importStar).then(function (mode) { return mode.setupLanguageMode(defaults); });
});
});

2

out/amd/hivesql/hivesql.test.js

@@ -8,3 +8,3 @@ /*---------------------------------------------------------------------------------------------

Object.defineProperty(exports, "__esModule", { value: true });
(0, testRunner_1.testTokenization)('sql', [
(0, testRunner_1.testTokenization)('hivesql', [
// Comments

@@ -11,0 +11,0 @@ [

@@ -0,4 +1,28 @@

var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
define(["require", "exports", "monaco-editor/esm/vs/editor/editor.worker.js", "./hiveSQLWorker"], function (require, exports, EditorWorker, hiveSQLWorker_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
EditorWorker = __importStar(EditorWorker);
self.onmessage = function (e) {

@@ -5,0 +29,0 @@ EditorWorker.initialize(function (ctx, createData) {

@@ -16,2 +16,5 @@ var __extends = (this && this.__extends) || (function () {

})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
define(["require", "exports", "dt-sql-parser/dist/parser/hive", "../baseSQLWorker"], function (require, exports, hive_1, baseSQLWorker_1) {

@@ -21,2 +24,3 @@ "use strict";

exports.create = exports.HiveSQLWorker = void 0;
hive_1 = __importDefault(hive_1);
var HiveSQLWorker = /** @class */ (function (_super) {

@@ -23,0 +27,0 @@ __extends(HiveSQLWorker, _super);

@@ -104,5 +104,5 @@ var __assign = (this && this.__assign) || function () {

startLineNumber: diag.startLine,
startColumn: diag.startCol,
startColumn: diag.startCol + 1,
endLineNumber: diag.endLine,
endColumn: diag.endCol,
endColumn: diag.endCol + 1,
message: diag.message,

@@ -109,0 +109,0 @@ code: code,

@@ -5,2 +5,25 @@ /*---------------------------------------------------------------------------------------------

*--------------------------------------------------------------------------------------------*/
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
define(["require", "exports", "../_.contribution", "../fillers/monaco-editor-core"], function (require, exports, __contribution_1, monaco_editor_core_1) {

@@ -14,3 +37,3 @@ "use strict";

aliases: ['MySQL', 'mysql'],
loader: function () { return new Promise(function (resolve_1, reject_1) { require(['./mysql'], resolve_1, reject_1); }); }
loader: function () { return new Promise(function (resolve_1, reject_1) { require(['./mysql'], resolve_1, reject_1); }).then(__importStar); }
});

@@ -20,4 +43,4 @@ (0, __contribution_1.loadLanguage)(languageId);

monaco_editor_core_1.languages.onLanguage(languageId, function () {
new Promise(function (resolve_2, reject_2) { require(['../setupLanguageMode'], resolve_2, reject_2); }).then(function (mode) { return mode.setupLanguageMode(defaults); });
new Promise(function (resolve_2, reject_2) { require(['../setupLanguageMode'], resolve_2, reject_2); }).then(__importStar).then(function (mode) { return mode.setupLanguageMode(defaults); });
});
});

@@ -0,4 +1,28 @@

var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
define(["require", "exports", "monaco-editor/esm/vs/editor/editor.worker.js", "./mySQLWorker"], function (require, exports, EditorWorker, mySQLWorker_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
EditorWorker = __importStar(EditorWorker);
self.onmessage = function (e) {

@@ -5,0 +29,0 @@ EditorWorker.initialize(function (ctx, createData) {

@@ -16,2 +16,5 @@ var __extends = (this && this.__extends) || (function () {

})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
define(["require", "exports", "dt-sql-parser/dist/parser/generic", "../baseSQLWorker"], function (require, exports, generic_1, baseSQLWorker_1) {

@@ -21,2 +24,3 @@ "use strict";

exports.create = exports.MySQLWorker = void 0;
generic_1 = __importDefault(generic_1);
var MySQLWorker = /** @class */ (function (_super) {

@@ -23,0 +27,0 @@ __extends(MySQLWorker, _super);

@@ -5,2 +5,25 @@ /*---------------------------------------------------------------------------------------------

*--------------------------------------------------------------------------------------------*/
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
define(["require", "exports", "../_.contribution", "../fillers/monaco-editor-core"], function (require, exports, __contribution_1, monaco_editor_core_1) {

@@ -14,3 +37,3 @@ "use strict";

aliases: ['PgSQL', 'pgsql'],
loader: function () { return new Promise(function (resolve_1, reject_1) { require(['./pgsql'], resolve_1, reject_1); }); }
loader: function () { return new Promise(function (resolve_1, reject_1) { require(['./pgsql'], resolve_1, reject_1); }).then(__importStar); }
});

@@ -20,4 +43,4 @@ (0, __contribution_1.loadLanguage)(languageId);

monaco_editor_core_1.languages.onLanguage(languageId, function () {
new Promise(function (resolve_2, reject_2) { require(['../setupLanguageMode'], resolve_2, reject_2); }).then(function (mode) { return mode.setupLanguageMode(defaults); });
new Promise(function (resolve_2, reject_2) { require(['../setupLanguageMode'], resolve_2, reject_2); }).then(__importStar).then(function (mode) { return mode.setupLanguageMode(defaults); });
});
});

@@ -0,4 +1,28 @@

var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
define(["require", "exports", "monaco-editor/esm/vs/editor/editor.worker.js", "./PgSQLWorker"], function (require, exports, EditorWorker, PgSQLWorker_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
EditorWorker = __importStar(EditorWorker);
self.onmessage = function (e) {

@@ -5,0 +29,0 @@ EditorWorker.initialize(function (ctx, createData) {

@@ -16,2 +16,5 @@ var __extends = (this && this.__extends) || (function () {

})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
define(["require", "exports", "dt-sql-parser/dist/parser/pgsql", "../baseSQLWorker"], function (require, exports, pgsql_1, baseSQLWorker_1) {

@@ -21,2 +24,3 @@ "use strict";

exports.create = exports.PgSQLWorker = void 0;
pgsql_1 = __importDefault(pgsql_1);
var PgSQLWorker = /** @class */ (function (_super) {

@@ -23,0 +27,0 @@ __extends(PgSQLWorker, _super);

@@ -5,2 +5,25 @@ /*---------------------------------------------------------------------------------------------

*--------------------------------------------------------------------------------------------*/
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
define(["require", "exports", "../_.contribution", "../fillers/monaco-editor-core"], function (require, exports, __contribution_1, monaco_editor_core_1) {

@@ -14,3 +37,3 @@ "use strict";

aliases: ['PLSQL'],
loader: function () { return new Promise(function (resolve_1, reject_1) { require(['./plsql'], resolve_1, reject_1); }); }
loader: function () { return new Promise(function (resolve_1, reject_1) { require(['./plsql'], resolve_1, reject_1); }).then(__importStar); }
});

@@ -20,4 +43,4 @@ (0, __contribution_1.loadLanguage)(languageId);

monaco_editor_core_1.languages.onLanguage(languageId, function () {
new Promise(function (resolve_2, reject_2) { require(['../setupLanguageMode'], resolve_2, reject_2); }).then(function (mode) { return mode.setupLanguageMode(defaults); });
new Promise(function (resolve_2, reject_2) { require(['../setupLanguageMode'], resolve_2, reject_2); }).then(__importStar).then(function (mode) { return mode.setupLanguageMode(defaults); });
});
});

@@ -8,3 +8,3 @@ /*---------------------------------------------------------------------------------------------

Object.defineProperty(exports, "__esModule", { value: true });
(0, testRunner_1.testTokenization)('sql', [
(0, testRunner_1.testTokenization)('plsql', [
// Comments

@@ -11,0 +11,0 @@ [

@@ -0,4 +1,28 @@

var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
define(["require", "exports", "monaco-editor/esm/vs/editor/editor.worker.js", "./plSQLWorker"], function (require, exports, EditorWorker, plSQLWorker_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
EditorWorker = __importStar(EditorWorker);
self.onmessage = function (e) {

@@ -5,0 +29,0 @@ EditorWorker.initialize(function (ctx, createData) {

@@ -16,2 +16,5 @@ var __extends = (this && this.__extends) || (function () {

})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
define(["require", "exports", "dt-sql-parser/dist/parser/plsql", "../baseSQLWorker"], function (require, exports, plsql_1, baseSQLWorker_1) {

@@ -21,2 +24,3 @@ "use strict";

exports.create = exports.PLSQLWorker = void 0;
plsql_1 = __importDefault(plsql_1);
var PLSQLWorker = /** @class */ (function (_super) {

@@ -23,0 +27,0 @@ __extends(PLSQLWorker, _super);

@@ -0,1 +1,24 @@

var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
define(["require", "exports", "./workerManager", "./languageFeatures", "./fillers/monaco-editor-core"], function (require, exports, workerManager_1, languageFeatures, monaco_editor_core_1) {

@@ -5,2 +28,3 @@ "use strict";

exports.setupLanguageMode = void 0;
languageFeatures = __importStar(languageFeatures);
function setupLanguageMode(defaults) {

@@ -7,0 +31,0 @@ var disposables = [];

@@ -5,2 +5,25 @@ /*---------------------------------------------------------------------------------------------

*--------------------------------------------------------------------------------------------*/
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
define(["require", "exports", "../_.contribution", "../fillers/monaco-editor-core"], function (require, exports, __contribution_1, monaco_editor_core_1) {

@@ -14,3 +37,3 @@ "use strict";

aliases: ['SparkSQL'],
loader: function () { return new Promise(function (resolve_1, reject_1) { require(['./sparksql'], resolve_1, reject_1); }); }
loader: function () { return new Promise(function (resolve_1, reject_1) { require(['./sparksql'], resolve_1, reject_1); }).then(__importStar); }
});

@@ -20,4 +43,4 @@ (0, __contribution_1.loadLanguage)(languageId);

monaco_editor_core_1.languages.onLanguage(languageId, function () {
new Promise(function (resolve_2, reject_2) { require(['../setupLanguageMode'], resolve_2, reject_2); }).then(function (mode) { return mode.setupLanguageMode(defaults); });
new Promise(function (resolve_2, reject_2) { require(['../setupLanguageMode'], resolve_2, reject_2); }).then(__importStar).then(function (mode) { return mode.setupLanguageMode(defaults); });
});
});

@@ -0,4 +1,28 @@

var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
define(["require", "exports", "monaco-editor/esm/vs/editor/editor.worker.js", "./sparkSQLWorker"], function (require, exports, EditorWorker, sparkSQLWorker_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
EditorWorker = __importStar(EditorWorker);
self.onmessage = function (e) {

@@ -5,0 +29,0 @@ EditorWorker.initialize(function (ctx, createData) {

@@ -16,2 +16,5 @@ var __extends = (this && this.__extends) || (function () {

})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
define(["require", "exports", "dt-sql-parser/dist/parser/spark", "../baseSQLWorker"], function (require, exports, spark_1, baseSQLWorker_1) {

@@ -21,2 +24,3 @@ "use strict";

exports.create = exports.SparkSQLWorker = void 0;
spark_1 = __importDefault(spark_1);
var SparkSQLWorker = /** @class */ (function (_super) {

@@ -23,0 +27,0 @@ __extends(SparkSQLWorker, _super);

@@ -0,1 +1,24 @@

var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
define(["require", "exports", "../_.contribution", "../fillers/monaco-editor-core"], function (require, exports, __contribution_1, monaco_editor_core_1) {

@@ -9,3 +32,3 @@ "use strict";

aliases: ['SQL'],
loader: function () { return new Promise(function (resolve_1, reject_1) { require(['./sql'], resolve_1, reject_1); }); }
loader: function () { return new Promise(function (resolve_1, reject_1) { require(['./sql'], resolve_1, reject_1); }).then(__importStar); }
});

@@ -15,4 +38,4 @@ (0, __contribution_1.loadLanguage)(languageId);

monaco_editor_core_1.languages.onLanguage(languageId, function () {
new Promise(function (resolve_2, reject_2) { require(['../setupLanguageMode'], resolve_2, reject_2); }).then(function (mode) { return mode.setupLanguageMode(defaults); });
new Promise(function (resolve_2, reject_2) { require(['../setupLanguageMode'], resolve_2, reject_2); }).then(__importStar).then(function (mode) { return mode.setupLanguageMode(defaults); });
});
});

@@ -0,4 +1,28 @@

var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
define(["require", "exports", "monaco-editor/esm/vs/editor/editor.worker.js", "./sqlWorker"], function (require, exports, EditorWorker, sqlWorker_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
EditorWorker = __importStar(EditorWorker);
self.onmessage = function (e) {

@@ -5,0 +29,0 @@ EditorWorker.initialize(function (ctx, createData) {

@@ -16,2 +16,5 @@ var __extends = (this && this.__extends) || (function () {

})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
define(["require", "exports", "dt-sql-parser/dist/parser/generic", "../baseSQLWorker"], function (require, exports, generic_1, baseSQLWorker_1) {

@@ -21,2 +24,3 @@ "use strict";

exports.create = exports.SQLWorker = void 0;
generic_1 = __importDefault(generic_1);
var SQLWorker = /** @class */ (function (_super) {

@@ -23,0 +27,0 @@ __extends(SQLWorker, _super);

@@ -5,7 +5,73 @@ /*---------------------------------------------------------------------------------------------

*--------------------------------------------------------------------------------------------*/
define(["require", "exports", "../_.contribution", "tape", "../fillers/monaco-editor-core", "../monaco.contribution"], function (require, exports, __contribution_1, test, monaco_editor_core_1) {
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (g && (g = 0, op[0] && (_ = 0)), _) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
define(["require", "exports", "../_.contribution", "assert", "../fillers/monaco-editor-core", "../monaco.contribution"], function (require, exports, __contribution_1, assert, monaco_editor_core_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.testTokenization = void 0;
assert = __importStar(assert);
function timeout(ms) {
return new Promise(function (resolve, reject) {
setTimeout(resolve, ms);
});
}
function testTokenization(_language, tests) {
var _this = this;
var languages;

@@ -19,19 +85,22 @@ if (typeof _language === 'string') {

var mainLanguage = languages[0];
test(mainLanguage + ' tokenization', function (t) {
Promise.all(languages.map(function (l) { return (0, __contribution_1.loadLanguage)(l); }))
.then(function () {
// clean stack
setTimeout(function () {
runTests(t, mainLanguage, tests);
t.end();
});
})
.then(null, function () { return t.end(); });
});
test(mainLanguage + ' tokenization', function () { return __awaiter(_this, void 0, void 0, function () {
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, Promise.all(languages.map(function (l) { return (0, __contribution_1.loadLanguage)(l); }))];
case 1:
_a.sent();
return [4 /*yield*/, timeout(0)];
case 2:
_a.sent();
runTests(mainLanguage, tests);
return [2 /*return*/];
}
});
}); });
}
exports.testTokenization = testTokenization;
function runTests(t, languageId, tests) {
tests.forEach(function (test) { return runTest(t, languageId, test); });
function runTests(languageId, tests) {
tests.forEach(function (test) { return runTest(languageId, test); });
}
function runTest(t, languageId, test) {
function runTest(languageId, test) {
var text = test.map(function (t) { return t.line; }).join('\n');

@@ -50,4 +119,4 @@ var actualTokens = monaco_editor_core_1.editor.tokenize(text, languageId);

});
t.deepEqual(actual, test);
assert.deepStrictEqual(actual, test);
}
});

@@ -0,1 +1,2 @@

"use strict";
/*---------------------------------------------------------------------------------------------

@@ -2,0 +3,0 @@ * Copyright (c) Microsoft Corporation. All rights reserved.

@@ -6,3 +6,3 @@ /*---------------------------------------------------------------------------------------------

import { testTokenization } from '../test/testRunner';
testTokenization('sql', [
testTokenization('hivesql', [
// Comments

@@ -9,0 +9,0 @@ [

@@ -88,5 +88,5 @@ import { editor, MarkerSeverity, Range, languages } from './fillers/monaco-editor-core';

startLineNumber: diag.startLine,
startColumn: diag.startCol,
startColumn: diag.startCol + 1,
endLineNumber: diag.endLine,
endColumn: diag.endCol,
endColumn: diag.endCol + 1,
message: diag.message,

@@ -93,0 +93,0 @@ code: code,

@@ -8,2 +8,3 @@ export { registerFlinkSQLLanguage } from './flinksql/flinksql.contribution';

export * from './common/utils';
export { SyntaxContextType, WordRange, SyntaxSuggestion, Suggestions, TextSlice } from 'dt-sql-parser';
export { SyntaxContextType } from 'dt-sql-parser';
export type { WordRange, SyntaxSuggestion, Suggestions, TextSlice } from 'dt-sql-parser';

@@ -6,3 +6,3 @@ /*---------------------------------------------------------------------------------------------

import { testTokenization } from '../test/testRunner';
testTokenization('sql', [
testTokenization('plsql', [
// Comments

@@ -9,0 +9,0 @@ [

@@ -5,6 +5,20 @@ /*---------------------------------------------------------------------------------------------

*--------------------------------------------------------------------------------------------*/
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
import '../monaco.contribution';
import { loadLanguage } from '../_.contribution';
import * as test from 'tape';
import * as assert from 'assert';
import { editor } from '../fillers/monaco-editor-core';
function timeout(ms) {
return new Promise((resolve, reject) => {
setTimeout(resolve, ms);
});
}
export function testTokenization(_language, tests) {

@@ -19,18 +33,12 @@ let languages;

let mainLanguage = languages[0];
test(mainLanguage + ' tokenization', (t) => {
Promise.all(languages.map((l) => loadLanguage(l)))
.then(() => {
// clean stack
setTimeout(() => {
runTests(t, mainLanguage, tests);
t.end();
});
})
.then(null, () => t.end());
});
test(mainLanguage + ' tokenization', () => __awaiter(this, void 0, void 0, function* () {
yield Promise.all(languages.map((l) => loadLanguage(l)));
yield timeout(0);
runTests(mainLanguage, tests);
}));
}
function runTests(t, languageId, tests) {
tests.forEach((test) => runTest(t, languageId, test));
function runTests(languageId, tests) {
tests.forEach((test) => runTest(languageId, test));
}
function runTest(t, languageId, test) {
function runTest(languageId, test) {
let text = test.map((t) => t.line).join('\n');

@@ -49,3 +57,3 @@ let actualTokens = editor.tokenize(text, languageId);

});
t.deepEqual(actual, test);
assert.deepStrictEqual(actual, test);
}
{
"name": "monaco-sql-languages",
"version": "0.12.0-beta.1",
"version": "0.12.0-beta.2",
"description": "SQL languages for the Monaco Editor, based on monaco-languages.",
"scripts": {
"compile": "mrmdir ./out && tsc -p ./src/tsconfig.json && tsc -p ./src/tsconfig.esm.json",
"watch": "tsc -p ./src --watch",
"watch-esm": "tsc -p ./src/tsconfig.esm.json --watch",
"test": "tape -r ./test/all.js",
"prepublishOnly": "mrmdir ./release && npm run compile && node ./scripts/release.js && node ./scripts/bundle",
"compile": "mrmdir ./out && tsc -p ./tsconfig.amd.json && tsc -p ./tsconfig.esm.json",
"watch-esm": "tsc -p ./tsconfig.esm.json --watch",
"test": "mocha ./test/all.js",
"prepublishOnly": "npm run compile",
"prettier": "prettier --write .",

@@ -15,3 +14,3 @@ "dev": "node --max_old_space_size=4092 & cd website && npm run dev",

"deploy": "npm run prod && gh-pages -d docs",
"release": "standard-version --infile CHANGELOG.md"
"release": "node ./scripts/bumpVersion.js"
},

@@ -21,3 +20,3 @@ "author": "DTStack Corporation",

"main": "out/esm/main.js",
"module": "out/esm/monaco.contribution.js",
"module": "out/esm/main.js",
"types": "out/esm/main.d.ts",

@@ -38,3 +37,4 @@ "files": [

"devDependencies": {
"@types/tape": "^4.13.0",
"@types/mocha": "^9.1.0",
"@types/node": "^20.4.0",
"eslint": "^7.1.0",

@@ -47,3 +47,5 @@ "eslint-config-google": "^0.14.0",

"husky": "^4.3.8",
"inquirer": "^8.2.2",
"jsdom": "^16.4.0",
"mocha": "^9.2.0",
"monaco-editor": "0.31.0",

@@ -55,3 +57,2 @@ "monaco-plugin-helpers": "^1.0.3",

"standard-version": "^9.5.0",
"tape": "^5.1.1",
"terser": "^5.5.1",

@@ -62,7 +63,7 @@ "typescript": "^5.0.4"

"hooks": {
"pre-commit": "pretty-quick --staged"
"pre-commit": "pretty-quick --staged --pattern '**/*.*(js|jsx|ts|tsx|json)' --bail"
}
},
"dependencies": {
"dt-sql-parser": "^4.0.0-beta.4"
"dt-sql-parser": "4.0.0-beta.4.2"
},

@@ -69,0 +70,0 @@ "peerDependencies": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc