@kevisual/project-search 0.0.7 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app.js +57 -5
- package/dist/remote.js +57 -5
- package/package.json +1 -1
package/dist/app.js
CHANGED
|
@@ -24947,6 +24947,21 @@ var TEXT_FILE_EXTENSIONS = [
|
|
|
24947
24947
|
".vue",
|
|
24948
24948
|
".svelte",
|
|
24949
24949
|
".astro",
|
|
24950
|
+
".html",
|
|
24951
|
+
".htm",
|
|
24952
|
+
".xhtml",
|
|
24953
|
+
".xml",
|
|
24954
|
+
".svg",
|
|
24955
|
+
".styl",
|
|
24956
|
+
".json",
|
|
24957
|
+
".yaml",
|
|
24958
|
+
".yml",
|
|
24959
|
+
".toml",
|
|
24960
|
+
".ini",
|
|
24961
|
+
".env",
|
|
24962
|
+
".properties",
|
|
24963
|
+
".conf",
|
|
24964
|
+
".config",
|
|
24950
24965
|
".npmrc",
|
|
24951
24966
|
".yarnrc",
|
|
24952
24967
|
".babelrc",
|
|
@@ -25016,7 +25031,18 @@ var TEXT_FILE_EXTENSIONS = [
|
|
|
25016
25031
|
".npmrc",
|
|
25017
25032
|
".yarnrc",
|
|
25018
25033
|
".babelrc",
|
|
25019
|
-
".webpackrc"
|
|
25034
|
+
".webpackrc",
|
|
25035
|
+
".lock",
|
|
25036
|
+
"-lock.json",
|
|
25037
|
+
"-lock.yaml",
|
|
25038
|
+
"-lock.yml",
|
|
25039
|
+
".lockb",
|
|
25040
|
+
".pem",
|
|
25041
|
+
".key",
|
|
25042
|
+
".crt",
|
|
25043
|
+
".cer",
|
|
25044
|
+
".p12",
|
|
25045
|
+
".pfx"
|
|
25020
25046
|
];
|
|
25021
25047
|
var CONFIG_FILE_NAMES = [
|
|
25022
25048
|
".gitignore",
|
|
@@ -25027,6 +25053,10 @@ var CONFIG_FILE_NAMES = [
|
|
|
25027
25053
|
".env.local",
|
|
25028
25054
|
".env.development",
|
|
25029
25055
|
".env.production",
|
|
25056
|
+
".env.test",
|
|
25057
|
+
".env.staging",
|
|
25058
|
+
".env.example",
|
|
25059
|
+
".env.sample",
|
|
25030
25060
|
"Dockerfile",
|
|
25031
25061
|
"Makefile",
|
|
25032
25062
|
"CMakeLists.txt",
|
|
@@ -25037,7 +25067,24 @@ var CONFIG_FILE_NAMES = [
|
|
|
25037
25067
|
".bashrc",
|
|
25038
25068
|
".zshrc",
|
|
25039
25069
|
".vimrc",
|
|
25040
|
-
".inputrc"
|
|
25070
|
+
".inputrc",
|
|
25071
|
+
"bun.lockb",
|
|
25072
|
+
"package-lock.json",
|
|
25073
|
+
"yarn.lock",
|
|
25074
|
+
"pnpm-lock.yaml",
|
|
25075
|
+
"pnpm-workspace.yaml",
|
|
25076
|
+
"Gemfile.lock",
|
|
25077
|
+
"Podfile.lock",
|
|
25078
|
+
"Cartfile.resolved",
|
|
25079
|
+
"composer.lock",
|
|
25080
|
+
"requirements.txt",
|
|
25081
|
+
"Pipfile.lock",
|
|
25082
|
+
"poetry.lock",
|
|
25083
|
+
"Cargo.lock",
|
|
25084
|
+
"go.sum",
|
|
25085
|
+
"go.mod",
|
|
25086
|
+
".vscode",
|
|
25087
|
+
".idea"
|
|
25041
25088
|
];
|
|
25042
25089
|
var isText = (filePath) => {
|
|
25043
25090
|
const fileName = path.basename(filePath);
|
|
@@ -25123,7 +25170,12 @@ function fileId(filePath) {
|
|
|
25123
25170
|
return Buffer.from(filePath).toString("base64url");
|
|
25124
25171
|
}
|
|
25125
25172
|
function fileHash(filePath) {
|
|
25126
|
-
|
|
25173
|
+
try {
|
|
25174
|
+
const content = fs.readFileSync(filePath);
|
|
25175
|
+
return crypto2.createHash("md5").update(content).digest("hex");
|
|
25176
|
+
} catch {
|
|
25177
|
+
return crypto2.createHash("md5").update(filePath).digest("hex");
|
|
25178
|
+
}
|
|
25127
25179
|
}
|
|
25128
25180
|
|
|
25129
25181
|
class ProjectSearch {
|
|
@@ -25142,11 +25194,11 @@ class ProjectSearch {
|
|
|
25142
25194
|
async searchFiles(query = "", options) {
|
|
25143
25195
|
const filter = [];
|
|
25144
25196
|
if (options?.projectPath)
|
|
25145
|
-
filter.push(`projectPath
|
|
25197
|
+
filter.push(`projectPath STARTS WITH "${options.projectPath}"`);
|
|
25146
25198
|
if (options?.repo)
|
|
25147
25199
|
filter.push(`repo = "${options.repo}"`);
|
|
25148
25200
|
if (options?.filepath)
|
|
25149
|
-
filter.push(`filepath
|
|
25201
|
+
filter.push(`filepath STARTS WITH "${options.filepath}"`);
|
|
25150
25202
|
if (options?.link)
|
|
25151
25203
|
filter.push(`link = "${options.link}"`);
|
|
25152
25204
|
const searchTerms = [];
|
package/dist/remote.js
CHANGED
|
@@ -24947,6 +24947,21 @@ var TEXT_FILE_EXTENSIONS = [
|
|
|
24947
24947
|
".vue",
|
|
24948
24948
|
".svelte",
|
|
24949
24949
|
".astro",
|
|
24950
|
+
".html",
|
|
24951
|
+
".htm",
|
|
24952
|
+
".xhtml",
|
|
24953
|
+
".xml",
|
|
24954
|
+
".svg",
|
|
24955
|
+
".styl",
|
|
24956
|
+
".json",
|
|
24957
|
+
".yaml",
|
|
24958
|
+
".yml",
|
|
24959
|
+
".toml",
|
|
24960
|
+
".ini",
|
|
24961
|
+
".env",
|
|
24962
|
+
".properties",
|
|
24963
|
+
".conf",
|
|
24964
|
+
".config",
|
|
24950
24965
|
".npmrc",
|
|
24951
24966
|
".yarnrc",
|
|
24952
24967
|
".babelrc",
|
|
@@ -25016,7 +25031,18 @@ var TEXT_FILE_EXTENSIONS = [
|
|
|
25016
25031
|
".npmrc",
|
|
25017
25032
|
".yarnrc",
|
|
25018
25033
|
".babelrc",
|
|
25019
|
-
".webpackrc"
|
|
25034
|
+
".webpackrc",
|
|
25035
|
+
".lock",
|
|
25036
|
+
"-lock.json",
|
|
25037
|
+
"-lock.yaml",
|
|
25038
|
+
"-lock.yml",
|
|
25039
|
+
".lockb",
|
|
25040
|
+
".pem",
|
|
25041
|
+
".key",
|
|
25042
|
+
".crt",
|
|
25043
|
+
".cer",
|
|
25044
|
+
".p12",
|
|
25045
|
+
".pfx"
|
|
25020
25046
|
];
|
|
25021
25047
|
var CONFIG_FILE_NAMES = [
|
|
25022
25048
|
".gitignore",
|
|
@@ -25027,6 +25053,10 @@ var CONFIG_FILE_NAMES = [
|
|
|
25027
25053
|
".env.local",
|
|
25028
25054
|
".env.development",
|
|
25029
25055
|
".env.production",
|
|
25056
|
+
".env.test",
|
|
25057
|
+
".env.staging",
|
|
25058
|
+
".env.example",
|
|
25059
|
+
".env.sample",
|
|
25030
25060
|
"Dockerfile",
|
|
25031
25061
|
"Makefile",
|
|
25032
25062
|
"CMakeLists.txt",
|
|
@@ -25037,7 +25067,24 @@ var CONFIG_FILE_NAMES = [
|
|
|
25037
25067
|
".bashrc",
|
|
25038
25068
|
".zshrc",
|
|
25039
25069
|
".vimrc",
|
|
25040
|
-
".inputrc"
|
|
25070
|
+
".inputrc",
|
|
25071
|
+
"bun.lockb",
|
|
25072
|
+
"package-lock.json",
|
|
25073
|
+
"yarn.lock",
|
|
25074
|
+
"pnpm-lock.yaml",
|
|
25075
|
+
"pnpm-workspace.yaml",
|
|
25076
|
+
"Gemfile.lock",
|
|
25077
|
+
"Podfile.lock",
|
|
25078
|
+
"Cartfile.resolved",
|
|
25079
|
+
"composer.lock",
|
|
25080
|
+
"requirements.txt",
|
|
25081
|
+
"Pipfile.lock",
|
|
25082
|
+
"poetry.lock",
|
|
25083
|
+
"Cargo.lock",
|
|
25084
|
+
"go.sum",
|
|
25085
|
+
"go.mod",
|
|
25086
|
+
".vscode",
|
|
25087
|
+
".idea"
|
|
25041
25088
|
];
|
|
25042
25089
|
var isText = (filePath) => {
|
|
25043
25090
|
const fileName = path.basename(filePath);
|
|
@@ -25123,7 +25170,12 @@ function fileId(filePath) {
|
|
|
25123
25170
|
return Buffer.from(filePath).toString("base64url");
|
|
25124
25171
|
}
|
|
25125
25172
|
function fileHash(filePath) {
|
|
25126
|
-
|
|
25173
|
+
try {
|
|
25174
|
+
const content = fs.readFileSync(filePath);
|
|
25175
|
+
return crypto2.createHash("md5").update(content).digest("hex");
|
|
25176
|
+
} catch {
|
|
25177
|
+
return crypto2.createHash("md5").update(filePath).digest("hex");
|
|
25178
|
+
}
|
|
25127
25179
|
}
|
|
25128
25180
|
|
|
25129
25181
|
class ProjectSearch {
|
|
@@ -25142,11 +25194,11 @@ class ProjectSearch {
|
|
|
25142
25194
|
async searchFiles(query = "", options) {
|
|
25143
25195
|
const filter = [];
|
|
25144
25196
|
if (options?.projectPath)
|
|
25145
|
-
filter.push(`projectPath
|
|
25197
|
+
filter.push(`projectPath STARTS WITH "${options.projectPath}"`);
|
|
25146
25198
|
if (options?.repo)
|
|
25147
25199
|
filter.push(`repo = "${options.repo}"`);
|
|
25148
25200
|
if (options?.filepath)
|
|
25149
|
-
filter.push(`filepath
|
|
25201
|
+
filter.push(`filepath STARTS WITH "${options.filepath}"`);
|
|
25150
25202
|
if (options?.link)
|
|
25151
25203
|
filter.push(`link = "${options.link}"`);
|
|
25152
25204
|
const searchTerms = [];
|