-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Alejandro Hernandez
committed
Apr 24, 2024
1 parent
3658ef6
commit c7b2930
Showing
9 changed files
with
64 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# common | ||
|
||
Utilities common to all packages. | ||
|
||
Code in this package should be isomorphic (e.g. should run on both node and the browser). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"name": "contexture-util", | ||
"version": "0.1.0", | ||
"description": "Utilities for contexture packages", | ||
"type": "module", | ||
"packageManager": "[email protected]", | ||
"exports": { | ||
".": { | ||
"import": "./dist/esm/index.js", | ||
"require": "./dist/cjs/index.js" | ||
}, | ||
"./*": { | ||
"import": "./dist/esm/*", | ||
"require": "./dist/cjs/*" | ||
} | ||
}, | ||
"files": [ | ||
"dist" | ||
], | ||
"scripts": { | ||
"prepack": "node ../../scripts/esbuild.js", | ||
"test": "NODE_NO_WARNINGS=1 NODE_OPTIONS=--experimental-vm-modules yarn run -T jest ." | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/smartprocure/contexture.git" | ||
}, | ||
"author": "Alejandro Hernandez", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/smartprocure/contexture/issues" | ||
}, | ||
"homepage": "https://github.com/smartprocure/contexture/tree/main/packages/common" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// These are reserved characters in the context of an elastic `query_string` | ||
// query that are unlikely to be searched for by an user. | ||
// See https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html#_reserved_characters | ||
let queryStringReserved = `|!(){}[\\]^"~*?\\<>` | ||
|
||
// These are characters stripped out by our analyzers so there's no point in | ||
// sending them. | ||
let strippedByAnalyzers = `;,$'` | ||
|
||
// Characters that we should strip out from `query_string` queries before | ||
// sending to elastic. | ||
export let queryStringCharacterBlacklist = `${queryStringReserved}${strippedByAnalyzers}` |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters