diff --git a/dist/extension.js b/dist/extension.js index 7a2b1ce..84e9a22 100644 --- a/dist/extension.js +++ b/dist/extension.js @@ -1,170 +1 @@ -/******/ (() => { // webpackBootstrap -/******/ "use strict"; -/******/ var __webpack_modules__ = ([ -/* 0 */, -/* 1 */ -/***/ ((module) => { - -module.exports = require("vscode"); - -/***/ }), -/* 2 */ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -__exportStar(__webpack_require__(3), exports); - - -/***/ }), -/* 3 */ -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.searcher = void 0; -const vscode = __webpack_require__(1); -const getSelectedText_1 = __webpack_require__(4); -function searcher(template) { - var selectedText = getSelectedText_1.getSelectedText(); - if (template === "VSCodeWorkbench") { - vscode.commands.executeCommand('workbench.action.findInFiles', { - query: selectedText, - triggerSearch: true - }); - } - else { - if (!selectedText) { - return; - } - var uriText = encodeURI(selectedText); - var search = vscode.workspace.getConfiguration("search"); - const qt = `queryTemplate.${template}`; - const queryTemplate = search.get(`queryTemplate.${template}`); - var query = queryTemplate.replace("-searchphrase-", uriText); - console.debug(`query is ${queryTemplate}`); - vscode.commands.executeCommand('vscode.open', vscode.Uri.parse(query)); - } -} -exports.searcher = searcher; - - -/***/ }), -/* 4 */ -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getSelectedText = void 0; -const vscode = __webpack_require__(1); -function getSelectedText() { - const activeEditor = vscode.window.activeTextEditor; - const activeSelection = activeEditor.selection; - if (activeSelection.isEmpty) { - let cursorPosition = activeEditor.selection.start; - let wordRange = activeEditor.document.getWordRangeAtPosition(cursorPosition); - let highlight = activeEditor.document.getText(wordRange); - console.debug(`no explicitly selected text. highlighted on ${highlight}`); - return highlight; - } - const documentText = activeEditor.document.getText(); - if (!documentText) { - console.debug("bailed on getText"); - return ''; - } - const selStartOffset = activeEditor.document.offsetAt(activeSelection.start); - const selEndOffset = activeEditor.document.offsetAt(activeSelection.end); - var selectedText = documentText.slice(selStartOffset, selEndOffset).trim(); - selectedText = selectedText.replace(/\s\s+/g, ' '); - console.debug(`selected text is ${selectedText}`); - return selectedText; -} -exports.getSelectedText = getSelectedText; - - -/***/ }) -/******/ ]); -/************************************************************************/ -/******/ // The module cache -/******/ var __webpack_module_cache__ = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ // Check if module is in cache -/******/ var cachedModule = __webpack_module_cache__[moduleId]; -/******/ if (cachedModule !== undefined) { -/******/ return cachedModule.exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = __webpack_module_cache__[moduleId] = { -/******/ // no module.id needed -/******/ // no module.loaded needed -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/************************************************************************/ -var __webpack_exports__ = {}; -// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. -(() => { -var exports = __webpack_exports__; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.deactivate = exports.activate = void 0; -const vscode = __webpack_require__(1); -const utils_1 = __webpack_require__(2); -function activate(context) { - context.subscriptions.push(vscode.commands.registerTextEditorCommand("extension.docsSearch", () => { - utils_1.searcher("Docs"); - })); - context.subscriptions.push(vscode.commands.registerTextEditorCommand("extension.googleSearch", () => { - utils_1.searcher("Google"); - })); - context.subscriptions.push(vscode.commands.registerTextEditorCommand("extension.dbatoolsSearch", () => { - utils_1.searcher("dbatools"); - })); - context.subscriptions.push(vscode.commands.registerTextEditorCommand("extension.stackSearch", () => { - utils_1.searcher("Stackoverflow"); - })); - context.subscriptions.push(vscode.commands.registerTextEditorCommand("extension.duckSearch", () => { - utils_1.searcher("Duckduckgo"); - })); - context.subscriptions.push(vscode.commands.registerTextEditorCommand("extension.thwackSearch", () => { - utils_1.searcher("Thwack"); - })); - context.subscriptions.push(vscode.commands.registerTextEditorCommand("extension.technetSearch", () => { - utils_1.searcher("Technet"); - })); - context.subscriptions.push(vscode.commands.registerTextEditorCommand("extension.vscodeApiSearch", () => { - utils_1.searcher("VSCodeAPI"); - })); - context.subscriptions.push(vscode.commands.registerTextEditorCommand("extension.vscodeWorkspaceSearch", () => { - utils_1.searcher("VSCodeWorkbench"); - })); -} -exports.activate = activate; -function deactivate() { } -exports.deactivate = deactivate; - -})(); - -module.exports = __webpack_exports__; -/******/ })() -; -//# sourceMappingURL=extension.js.map \ No newline at end of file +(()=>{"use strict";var e={160:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getSelectedText=void 0;const r=o(549);t.getSelectedText=function(){const e=r.window.activeTextEditor,t=e.selection;if(t.isEmpty){let t=e.selection.start,o=e.document.getWordRangeAtPosition(t),r=e.document.getText(o);return console.debug(`no explicitly selected text. highlighted on ${r}`),r}const o=e.document.getText();if(!o)return console.debug("bailed on getText"),"";const s=e.document.offsetAt(t.start),n=e.document.offsetAt(t.end);var c=o.slice(s,n).trim();return c=c.replace(/\s\s+/g," "),console.debug(`selected text is ${c}`),c}},928:function(e,t,o){var r=this&&this.__createBinding||(Object.create?function(e,t,o,r){void 0===r&&(r=o),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[o]}})}:function(e,t,o,r){void 0===r&&(r=o),e[r]=t[o]}),s=this&&this.__exportStar||function(e,t){for(var o in e)"default"===o||Object.prototype.hasOwnProperty.call(t,o)||r(t,e,o)};Object.defineProperty(t,"__esModule",{value:!0}),s(o(125),t)},125:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.searcher=void 0;const r=o(549),s=o(160);t.searcher=function(e){var t=s.getSelectedText();if("VSCodeWorkbench"===e)r.commands.executeCommand("workbench.action.findInFiles",{query:t,triggerSearch:!0});else{if(!t)return;var o=encodeURI(t);const s=r.workspace.getConfiguration("search").get(`queryTemplate.${e}`);var n=s.replace("-searchphrase-",o);console.debug(`query is ${s}`),r.commands.executeCommand("vscode.open",r.Uri.parse(n))}}},549:e=>{e.exports=require("vscode")}},t={};function o(r){var s=t[r];if(void 0!==s)return s.exports;var n=t[r]={exports:{}};return e[r].call(n.exports,n,n.exports,o),n.exports}var r={};(()=>{var e=r;Object.defineProperty(e,"__esModule",{value:!0}),e.deactivate=e.activate=void 0;const t=o(549),s=o(928);e.activate=function(e){e.subscriptions.push(t.commands.registerTextEditorCommand("extension.docsSearch",(()=>{s.searcher("Docs")}))),e.subscriptions.push(t.commands.registerTextEditorCommand("extension.googleSearch",(()=>{s.searcher("Google")}))),e.subscriptions.push(t.commands.registerTextEditorCommand("extension.dbatoolsSearch",(()=>{s.searcher("dbatools")}))),e.subscriptions.push(t.commands.registerTextEditorCommand("extension.stackSearch",(()=>{s.searcher("Stackoverflow")}))),e.subscriptions.push(t.commands.registerTextEditorCommand("extension.duckSearch",(()=>{s.searcher("Duckduckgo")}))),e.subscriptions.push(t.commands.registerTextEditorCommand("extension.thwackSearch",(()=>{s.searcher("Thwack")}))),e.subscriptions.push(t.commands.registerTextEditorCommand("extension.technetSearch",(()=>{s.searcher("Technet")}))),e.subscriptions.push(t.commands.registerTextEditorCommand("extension.vscodeApiSearch",(()=>{s.searcher("VSCodeAPI")}))),e.subscriptions.push(t.commands.registerTextEditorCommand("extension.vscodeWorkspaceSearch",(()=>{s.searcher("VSCodeWorkbench")})))},e.deactivate=function(){}})(),module.exports=r})(); \ No newline at end of file diff --git a/dist/extension.js.map b/dist/extension.js.map index bccb659..421ce84 100644 --- a/dist/extension.js.map +++ b/dist/extension.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://search/external \"vscode\"","webpack://search/./src/utils/index.ts","webpack://search/./src/utils/searcher.ts","webpack://search/./src/utils/getSelectedText.ts","webpack://search/webpack/bootstrap","webpack://search/./src/extension.ts"],"names":[],"mappings":";;;;;;;AAAA,mC;;;;;;;;;;;;;;;;;;ACAA,8CAA2B;;;;;;;;;;ACA3B,sCAAiC;AACjC,iDAAoD;AAEpD,SAAgB,QAAQ,CAAC,QAAgB;IACxC,IAAI,YAAY,GAAG,iCAAe,EAAE,CAAC;IAErC,IAAI,QAAQ,KAAK,iBAAiB,EAAE;QACnC,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAC,8BAA8B,EAAE;YAC9D,KAAK,EAAE,YAAY;YACnB,aAAa,EAAE,IAAI;SACnB,CAAC,CAAC;KACH;SAAM;QACN,IAAI,CAAC,YAAY,EAAE;YAClB,OAAO;SACP;QACD,IAAI,OAAO,GAAG,SAAS,CAAC,YAAY,CAAC,CAAC;QACtC,IAAI,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;QACzD,MAAM,EAAE,GAAG,iBAAiB,QAAQ,EAAE,CAAC;QACvC,MAAM,aAAa,GAAQ,MAAM,CAAC,GAAG,CAAC,iBAAiB,QAAQ,EAAE,CAAC,CAAC;QACnE,IAAI,KAAK,GAAG,aAAa,CAAC,OAAO,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;QAC7D,OAAO,CAAC,KAAK,CAAC,YAAY,aAAa,EAAE,CAAC,CAAC;QAC3C,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAC,aAAa,EAAE,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;KACvE;AACF,CAAC;AApBD,4BAoBC;;;;;;;;;;ACtBD,sCAAiC;AAEjC,SAAg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B,EAAE,GAAG,EAAE;QACpG,gBAAQ,CAAC,SAAS,CAAC,CAAC;IACrB,CAAC,CAAC,CAAC,CAAC;IACJ,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,yBAAyB,CAAC,2BAA2B,EAAE,GAAG,EAAE;QACtG,gBAAQ,CAAC,WAAW,CAAC,CAAC;IACvB,CAAC,CAAC,CAAC,CAAC;IACJ,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,yBAAyB,CAAC,iCAAiC,EAAE,GAAG,EAAE;QAC5G,gBAAQ,CAAC,iBAAiB,CAAC,CAAC;IAC7B,CAAC,CAAC,CAAC,CAAC;AACL,CAAC;AA5BD,4BA4BC;AAED,SAAgB,UAAU,KAAK,CAAC;AAAhC,gCAAgC","file":"extension.js","sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://search/./src/utils/getSelectedText.ts","webpack://search/./src/utils/index.ts","webpack://search/./src/utils/searcher.ts","webpack://search/external \"vscode\"","webpack://search/webpack/bootstrap","webpack://search/./src/extension.ts"],"names":["activeEditor","vscode","window","activeTextEditor","activeSelection","selection","isEmpty","cursorPosition","start","wordRange","document","getWordRangeAtPosition","highlight","getText","console","debug","documentText","selStartOffset","offsetAt","selEndOffset","end","selectedText","slice","trim","replace","template","getSelectedText","commands","executeCommand","query","triggerSearch","uriText","encodeURI","queryTemplate","workspace","getConfiguration","get","Uri","parse","module","exports","require","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","call","context","subscriptions","push","registerTextEditorCommand","searcher"],"mappings":"kHACA,eAEA,6BACC,MAAMA,EAAeC,EAAOC,OAAOC,iBAC7BC,EAAkBJ,EAAcK,UAEtC,GAAID,EAAgBE,QAAS,CAC5B,IAAIC,EAAiBP,EAAcK,UAAUG,MACzCC,EAAYT,EAAcU,SAASC,uBAAuBJ,GAC1DK,EAAYZ,EAAcU,SAASG,QAAQJ,GAI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SAAS,cAEVJ,EAAQC,cAAcC,KAAKlD,EAAO0B,SAASyB,0BAA0B,4BAA4B,KAChG,EAAAC,SAAS,gBAEVJ,EAAQC,cAAcC,KAAKlD,EAAO0B,SAASyB,0BAA0B,yBAAyB,KAC7F,EAAAC,SAAS,qBAEVJ,EAAQC,cAAcC,KAAKlD,EAAO0B,SAASyB,0BAA0B,wBAAwB,KAC5F,EAAAC,SAAS,kBAEVJ,EAAQC,cAAcC,KAAKlD,EAAO0B,SAASyB,0BAA0B,0BAA0B,KAC9F,EAAAC,SAAS,cAEVJ,EAAQC,cAAcC,KAAKlD,EAAO0B,SAASyB,0BAA0B,2BAA2B,KAC/F,EAAAC,SAAS,eAEVJ,EAAQC,cAAcC,KAAKlD,EAAO0B,SAASyB,0BAA0B,6BAA6B,KACjG,EAAAC,SAAS,iBAEVJ,EAAQC,cAAcC,KAAKlD,EAAO0B,SAASyB,0BAA0B,mCAAmC,KACvG,EAAAC,SAAS,wBAIX,2B","file":"extension.js","sourcesContent":["\r\nimport * as vscode from 'vscode';\r\n\r\nexport function getSelectedText(): string {\r\n\tconst activeEditor = vscode.window.activeTextEditor;\r\n\tconst activeSelection = activeEditor!.selection;\r\n\r\n\tif (activeSelection.isEmpty) {\r\n\t\tlet cursorPosition = activeEditor!.selection.start;\r\n\t\tlet wordRange = activeEditor!.document.getWordRangeAtPosition(cursorPosition);\r\n\t\tlet highlight = activeEditor!.document.getText(wordRange);\r\n\r\n\t\tconsole.debug(`no explicitly selected text. highlighted on ${highlight}`);\r\n\r\n\t\treturn highlight;\r\n\t}\r\n\r\n\tconst documentText = activeEditor!.document.getText();\r\n\tif (!documentText) {\r\n\t\tconsole.debug(\"bailed on getText\");\r\n\t\treturn '';\r\n\t}\r\n\r\n\tconst selStartOffset = activeEditor!.document.offsetAt(activeSelection.start);\r\n\tconst selEndOffset = activeEditor!.document.offsetAt(activeSelection.end);\r\n\r\n\tvar selectedText = documentText.slice(selStartOffset, selEndOffset).trim();\r\n\tselectedText = selectedText.replace(/\\s\\s+/g, ' ');\r\n\tconsole.debug(`selected text is ${selectedText}`);\r\n\r\n\treturn selectedText;\r\n}","export * from './searcher';\r\n","import * as vscode from 'vscode';\r\nimport { getSelectedText } from './getSelectedText';\r\n\r\nexport function searcher(template: string) {\r\n\tvar selectedText = getSelectedText();\r\n\r\n\tif (template === \"VSCodeWorkbench\") {\r\n\t\tvscode.commands.executeCommand('workbench.action.findInFiles', {\r\n\t\t\tquery: selectedText,\r\n\t\t\ttriggerSearch: true\r\n\t\t});\r\n\t} else {\r\n\t\tif (!selectedText) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tvar uriText = encodeURI(selectedText);\r\n\t\tvar search = vscode.workspace.getConfiguration(\"search\");\r\n\t\tconst qt = `queryTemplate.${template}`;\r\n\t\tconst queryTemplate: any = search.get(`queryTemplate.${template}`);\r\n\t\tvar query = queryTemplate.replace(\"-searchphrase-\", uriText);\r\n\t\tconsole.debug(`query is ${queryTemplate}`);\r\n\t\tvscode.commands.executeCommand('vscode.open', vscode.Uri.parse(query));\r\n\t}\r\n}","module.exports = require(\"vscode\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","import * as vscode from 'vscode';\r\nimport { searcher } from './utils';\r\n\r\nexport function activate(context: vscode.ExtensionContext) {\r\n\tcontext.subscriptions.push(vscode.commands.registerTextEditorCommand(\"extension.docsSearch\", () => {\r\n\t\tsearcher(\"Docs\");\r\n\t}));\r\n\tcontext.subscriptions.push(vscode.commands.registerTextEditorCommand(\"extension.googleSearch\", () => {\r\n\t\tsearcher(\"Google\");\r\n\t}));\r\n\tcontext.subscriptions.push(vscode.commands.registerTextEditorCommand(\"extension.dbatoolsSearch\", () => {\r\n\t\tsearcher(\"dbatools\");\r\n\t}));\r\n\tcontext.subscriptions.push(vscode.commands.registerTextEditorCommand(\"extension.stackSearch\", () => {\r\n\t\tsearcher(\"Stackoverflow\");\r\n\t}));\r\n\tcontext.subscriptions.push(vscode.commands.registerTextEditorCommand(\"extension.duckSearch\", () => {\r\n\t\tsearcher(\"Duckduckgo\");\r\n\t}));\r\n\tcontext.subscriptions.push(vscode.commands.registerTextEditorCommand(\"extension.thwackSearch\", () => {\r\n\t\tsearcher(\"Thwack\");\r\n\t}));\r\n\tcontext.subscriptions.push(vscode.commands.registerTextEditorCommand(\"extension.technetSearch\", () => {\r\n\t\tsearcher(\"Technet\");\r\n\t}));\r\n\tcontext.subscriptions.push(vscode.commands.registerTextEditorCommand(\"extension.vscodeApiSearch\", () => {\r\n\t\tsearcher(\"VSCodeAPI\");\r\n\t}));\r\n\tcontext.subscriptions.push(vscode.commands.registerTextEditorCommand(\"extension.vscodeWorkspaceSearch\", () => {\r\n\t\tsearcher(\"VSCodeWorkbench\");\r\n\t}));\r\n}\r\n\r\nexport function deactivate() { }"],"sourceRoot":""} \ No newline at end of file