@mherod/get-cookie 2.0.0-rc.3 → 2.0.0-rc.30

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.
Files changed (65) hide show
  1. package/.idea/runConfigurations/build.xml +12 -0
  2. package/.parcelrc +12 -0
  3. package/.prettierignore +5 -0
  4. package/.prettierrc +12 -0
  5. package/.terserrc +26 -0
  6. package/README.md +2 -2
  7. package/dist/cli.js +2 -0
  8. package/dist/index.js +2 -687
  9. package/dist/index.js.map +1 -0
  10. package/dist/module.js +1323 -0
  11. package/dist/module.js.map +1 -0
  12. package/dist/prompt.2b8c61c0.js +40 -0
  13. package/dist/prompt.536a2c51.js +40 -0
  14. package/dist/prompt.fb2c7dad.js.map +1 -0
  15. package/dist/types.d.ts +25 -0
  16. package/dist/types.d.ts.map +1 -0
  17. package/jest.config.ts +14 -0
  18. package/package-lock.json +2688 -6684
  19. package/package.json +42 -35
  20. package/src/CookieRow.ts +1 -0
  21. package/src/CookieSpec.ts +3 -1
  22. package/src/CookieStore.ts +27 -0
  23. package/src/ExportedCookie.ts +13 -0
  24. package/src/FetchResponse.ts +1 -2
  25. package/src/FileCookieStore.ts +175 -0
  26. package/src/StringToRegex.ts +16 -0
  27. package/src/argv.ts +29 -0
  28. package/src/browsers/ChromeApplicationSupport.ts +10 -0
  29. package/src/browsers/ChromeCookieQueryStrategy.ts +71 -131
  30. package/src/browsers/CompositeCookieQueryStrategy.ts +35 -11
  31. package/src/browsers/CookieQueryStrategy.ts +2 -0
  32. package/src/browsers/CookieStoreQueryStrategy.ts +99 -0
  33. package/src/browsers/DoSqliteQueryWithTransform.ts +85 -0
  34. package/src/browsers/FirefoxCookieQueryStrategy.ts +12 -7
  35. package/src/browsers/SafariCookieQueryStrategy.ts +3 -0
  36. package/src/browsers/decrypt.ts +118 -0
  37. package/src/browsers/getChromePassword.ts +9 -0
  38. package/src/cli.ts +52 -36
  39. package/src/comboQueryCookieSpec.ts +24 -0
  40. package/src/cookieSpecsFromUrl.ts +26 -0
  41. package/src/execSimple.ts +13 -0
  42. package/src/fetchWithCookies.ts +105 -38
  43. package/src/findAllFiles.ts +26 -54
  44. package/src/getChromeCookie.ts +19 -0
  45. package/src/getCookie.ts +20 -0
  46. package/src/getFirefoxCookie.ts +19 -0
  47. package/src/getGroupedRenderedCookies.ts +11 -24
  48. package/src/getMergedRenderedCookies.ts +12 -0
  49. package/src/global.ts +1 -1
  50. package/src/index.ts +14 -58
  51. package/src/isValidJwt.ts +4 -4
  52. package/src/listChromeProfiles.ts +45 -0
  53. package/src/logger.ts +3 -0
  54. package/src/queryCookies.ts +20 -11
  55. package/src/resultsRendered.ts +6 -3
  56. package/src/util/flatMapAsync.test.ts +55 -0
  57. package/src/util/flatMapAsync.ts +37 -0
  58. package/tsconfig.json +12 -16
  59. package/.github/dependabot.yml +0 -6
  60. package/.prettierrc.json +0 -1
  61. package/src/IsExportedCookie.ts +0 -9
  62. package/src/MemoryCookieStore.ts +0 -5
  63. package/src/browsers/MemoryCookieJarQueryStrategy.ts +0 -53
  64. package/src/doSqliteQuery1.ts +0 -51
  65. package/src/utils.ts +0 -50
@@ -0,0 +1,12 @@
1
+ <component name="ProjectRunConfigurationManager">
2
+ <configuration default="false" name="build" type="js.build_tools.npm" nameIsGenerated="true">
3
+ <package-json value="$PROJECT_DIR$/package.json" />
4
+ <command value="run" />
5
+ <scripts>
6
+ <script value="build" />
7
+ </scripts>
8
+ <node-interpreter value="project" />
9
+ <envs />
10
+ <method v="2" />
11
+ </configuration>
12
+ </component>
package/.parcelrc ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "extends": "@parcel/config-default",
3
+ "transformers": {
4
+ "*.{ts,tsx}": [
5
+ "@parcel/transformer-typescript-tsc",
6
+ "..."
7
+ ],
8
+ "*": [
9
+ "..."
10
+ ]
11
+ }
12
+ }
@@ -0,0 +1,5 @@
1
+ .idea/**/workspace.xml
2
+ *.log
3
+ node_modules/
4
+ .parcel-cache
5
+ dist
package/.prettierrc ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "useTabs": false,
3
+ "overrides": [
4
+ {
5
+ "files": [".prettierrc", ".parcelrc"],
6
+ "options": {
7
+ "parser": "json",
8
+ "tabWidth": 2
9
+ }
10
+ }
11
+ ]
12
+ }
package/.terserrc ADDED
@@ -0,0 +1,26 @@
1
+ {
2
+ "toplevel": true,
3
+ "keep_fnames": true,
4
+ "keep_classnames": true,
5
+ "parse": {
6
+ "bare_returns": true,
7
+ "html5_comments": true,
8
+ "shebang": true,
9
+ },
10
+ "compress": {
11
+ "drop_console": false,
12
+ "toplevel": true,
13
+ "evaluate": true,
14
+ "passes": 3,
15
+ "keep_fnames": true,
16
+ "keep_classnames": true,
17
+ "hoist_funs": true,
18
+ },
19
+ "mangle": {
20
+ "toplevel": true,
21
+ },
22
+ "format": {
23
+ "comments": false,
24
+ "beautify": true,
25
+ }
26
+ }
package/README.md CHANGED
@@ -28,6 +28,6 @@ The output of the command will be the value of the cookie.
28
28
  The library can also be used as a module.
29
29
 
30
30
  ```javascript
31
- const {getCookie} = require('@mherod/get-cookie');
32
- getCookie('auth', 'www.example.com').then(console.log);
31
+ const { getCookie } = require("@mherod/get-cookie");
32
+ getCookie("auth", "www.example.com").then(console.log);
33
33
  ```