@stryke/hash 0.12.14 → 0.12.22

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 (86) hide show
  1. package/CHANGELOG.md +384 -0
  2. package/README.md +18 -9
  3. package/dist/digest-311IQaur.mjs +2 -0
  4. package/dist/digest-311IQaur.mjs.map +1 -0
  5. package/dist/digest-CG1Sk96A.d.mts +32 -0
  6. package/dist/digest-CG1Sk96A.d.mts.map +1 -0
  7. package/dist/digest-REorjd4v.cjs +1 -0
  8. package/dist/digest-Yy26O9oW.d.cts +32 -0
  9. package/dist/digest-Yy26O9oW.d.cts.map +1 -0
  10. package/dist/digest.cjs +1 -36
  11. package/dist/digest.d.cts +2 -0
  12. package/dist/digest.d.mts +2 -0
  13. package/dist/digest.mjs +1 -1
  14. package/dist/{etag.d.ts → etag-BdoEX_I_.d.cts} +6 -2
  15. package/dist/etag-BdoEX_I_.d.cts.map +1 -0
  16. package/dist/etag-DXmoR6hr.mjs +2 -0
  17. package/dist/etag-DXmoR6hr.mjs.map +1 -0
  18. package/dist/etag-Kuj0WZon.d.mts +22 -0
  19. package/dist/etag-Kuj0WZon.d.mts.map +1 -0
  20. package/dist/etag-SIhKWCBx.cjs +1 -0
  21. package/dist/etag.cjs +1 -23
  22. package/dist/etag.d.cts +2 -0
  23. package/dist/etag.d.mts +2 -0
  24. package/dist/etag.mjs +1 -1
  25. package/dist/hash-files-BMmt9LzB.mjs +2 -0
  26. package/dist/hash-files-BMmt9LzB.mjs.map +1 -0
  27. package/dist/hash-files-C8KCroZK.d.mts +26 -0
  28. package/dist/hash-files-C8KCroZK.d.mts.map +1 -0
  29. package/dist/hash-files-DMXzIbQw.d.cts +26 -0
  30. package/dist/hash-files-DMXzIbQw.d.cts.map +1 -0
  31. package/dist/hash-files-DNDrDY17.cjs +1 -0
  32. package/dist/hash-files.cjs +1 -19
  33. package/dist/hash-files.d.cts +2 -0
  34. package/dist/hash-files.d.mts +2 -0
  35. package/dist/hash-files.mjs +1 -1
  36. package/dist/index.cjs +1 -71
  37. package/dist/index.d.cts +7 -0
  38. package/dist/index.d.mts +7 -0
  39. package/dist/index.mjs +1 -1
  40. package/dist/{md5.d.ts → md5-CCxA7tZv.d.cts} +5 -1
  41. package/dist/md5-CCxA7tZv.d.cts.map +1 -0
  42. package/dist/md5-C_8IsDev.d.mts +12 -0
  43. package/dist/md5-C_8IsDev.d.mts.map +1 -0
  44. package/dist/md5-CnYTBU9u.mjs +2 -0
  45. package/dist/md5-CnYTBU9u.mjs.map +1 -0
  46. package/dist/md5-Cwdph7YU.cjs +1 -0
  47. package/dist/md5.cjs +1 -10
  48. package/dist/md5.d.cts +2 -0
  49. package/dist/md5.d.mts +2 -0
  50. package/dist/md5.mjs +1 -1
  51. package/dist/murmurhash-CVcuhG5F.cjs +1 -0
  52. package/dist/murmurhash-CoNWpOwZ.mjs +2 -0
  53. package/dist/murmurhash-CoNWpOwZ.mjs.map +1 -0
  54. package/dist/murmurhash-D6qhmMhz.d.mts +23 -0
  55. package/dist/murmurhash-D6qhmMhz.d.mts.map +1 -0
  56. package/dist/murmurhash-dzYfmtjT.d.cts +23 -0
  57. package/dist/murmurhash-dzYfmtjT.d.cts.map +1 -0
  58. package/dist/murmurhash.cjs +1 -12
  59. package/dist/murmurhash.d.cts +2 -0
  60. package/dist/murmurhash.d.mts +2 -0
  61. package/dist/murmurhash.mjs +1 -1
  62. package/dist/neutral.cjs +1 -49
  63. package/dist/neutral.d.cts +5 -0
  64. package/dist/neutral.d.mts +5 -0
  65. package/dist/neutral.mjs +1 -1
  66. package/dist/src-GI5wB-mz.mjs +2 -0
  67. package/dist/src-GI5wB-mz.mjs.map +1 -0
  68. package/dist/src-QUlAu3to.cjs +1 -0
  69. package/dist/xx-hash--6giOvM7.cjs +1 -0
  70. package/dist/xx-hash-BnLXga7m.d.cts +7 -0
  71. package/dist/xx-hash-BnLXga7m.d.cts.map +1 -0
  72. package/dist/xx-hash-DyeY-GKZ.d.mts +7 -0
  73. package/dist/xx-hash-DyeY-GKZ.d.mts.map +1 -0
  74. package/dist/xx-hash-SyVhkkcA.mjs +2 -0
  75. package/dist/xx-hash-SyVhkkcA.mjs.map +1 -0
  76. package/dist/xx-hash.cjs +1 -18
  77. package/dist/xx-hash.d.cts +2 -0
  78. package/dist/xx-hash.d.mts +2 -0
  79. package/dist/xx-hash.mjs +1 -1
  80. package/package.json +26 -146
  81. package/dist/digest.d.ts +0 -28
  82. package/dist/hash-files.d.ts +0 -18
  83. package/dist/index.d.ts +0 -14
  84. package/dist/murmurhash.d.ts +0 -19
  85. package/dist/neutral.d.ts +0 -4
  86. package/dist/xx-hash.d.ts +0 -3
@@ -0,0 +1,22 @@
1
+ //#region src/etag.d.ts
2
+ /**
3
+ * FNV-1a Hash implementation
4
+ *
5
+ * Ported from https://github.com/tjwebb/fnv-plus/blob/master/index.js
6
+ *
7
+ * @remarks
8
+ * Simplified, optimized and add modified for 52 bit, which provides a larger hash space
9
+ * and still making use of Javascript's 53-bit integer space.
10
+ */
11
+ declare const fnv1a52: (str: string) => number;
12
+ /**
13
+ * Generates an ETag for the given payload.
14
+ *
15
+ * @param payload - The payload to generate an ETag for.
16
+ * @param weak - Whether to generate a weak ETag.
17
+ * @returns The generated ETag.
18
+ */
19
+ declare const generateETag: (payload: string, weak?: boolean) => string;
20
+ //#endregion
21
+ export { generateETag as n, fnv1a52 as t };
22
+ //# sourceMappingURL=etag-Kuj0WZon.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"etag-Kuj0WZon.d.mts","names":[],"sources":["../src/etag.ts"],"sourcesContent":[],"mappings":";;AA2BA;AA2CA;;;;;;;cA3Ca;;;;;;;;cA2CA"}
@@ -0,0 +1 @@
1
+ const e=e=>{let t=e.length,n=0,r=0,i=8997,a=0,o=33826,s=0,c=40164,l=0,u=52210;for(;n<t;)i^=e.charCodeAt(n++),r=i*435,a=o*435,s=c*435,l=u*435,s+=i<<8,l+=o<<8,a+=r>>>16,i=r&65535,s+=a>>>16,o=a&65535,u=l+(s>>>16)&65535,c=s&65535;return(u&15)*281474976710656+c*4294967296+o*65536+(i^u>>4)},t=(t,n=!1)=>`${(n?`W/"`:`"`)+e(t).toString(36)+t.length.toString(36)}"`;Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return t}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return e}});
package/dist/etag.cjs CHANGED
@@ -1,23 +1 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.generateETag = exports.fnv1a52 = void 0;
7
- const fnv1a52 = t => {
8
- const i = t.length;
9
- let o = 0,
10
- x = 0,
11
- e = 8997,
12
- l = 0,
13
- r = 33826,
14
- n = 0,
15
- c = 40164,
16
- s = 0,
17
- g = 52210;
18
- for (; o < i;) e ^= t.charCodeAt(o++), x = e * 435, l = r * 435, n = c * 435, s = g * 435, n += e << 8, s += r << 8, l += x >>> 16, e = x & 65535, n += l >>> 16, r = l & 65535, g = s + (n >>> 16) & 65535, c = n & 65535;
19
- return (g & 15) * 281474976710656 + c * 4294967296 + r * 65536 + (e ^ g >> 4);
20
- },
21
- generateETag = (t, i = !1) => `${(i ? 'W/"' : '"') + fnv1a52(t).toString(36) + t.length.toString(36)}"`;
22
- exports.generateETag = generateETag;
23
- exports.fnv1a52 = fnv1a52;
1
+ const e=require(`./etag-SIhKWCBx.cjs`);exports.fnv1a52=e.t,exports.generateETag=e.n;
@@ -0,0 +1,2 @@
1
+ import { n as generateETag, t as fnv1a52 } from "./etag-BdoEX_I_.cjs";
2
+ export { fnv1a52, generateETag };
@@ -0,0 +1,2 @@
1
+ import { n as generateETag, t as fnv1a52 } from "./etag-Kuj0WZon.mjs";
2
+ export { fnv1a52, generateETag };
package/dist/etag.mjs CHANGED
@@ -1 +1 @@
1
- export const fnv1a52=t=>{const i=t.length;let o=0,x=0,e=8997,l=0,r=33826,n=0,c=40164,s=0,g=52210;for(;o<i;)e^=t.charCodeAt(o++),x=e*435,l=r*435,n=c*435,s=g*435,n+=e<<8,s+=r<<8,l+=x>>>16,e=x&65535,n+=l>>>16,r=l&65535,g=s+(n>>>16)&65535,c=n&65535;return(g&15)*281474976710656+c*4294967296+r*65536+(e^g>>4)},generateETag=(t,i=!1)=>`${(i?'W/"':'"')+fnv1a52(t).toString(36)+t.length.toString(36)}"`;
1
+ import{n as e,t}from"./etag-DXmoR6hr.mjs";export{t as fnv1a52,e as generateETag};
@@ -0,0 +1,2 @@
1
+ import{t as e}from"./src-GI5wB-mz.mjs";import{t}from"./murmurhash-CoNWpOwZ.mjs";import n from"defu";import{glob as r}from"glob";import{readFile as i}from"node:fs/promises";const a=/^[A-Z]:\//i,o=/^[A-Z]:$/i,s=/^[/\\]{2}/,c=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^~[/\\]|^[A-Z]:[/\\]/i;function l(e){return c.test(d(e))}function u(e){return l(e)}function d(e){return e.startsWith(`\\\\?\\`)?e:e.replace(/\\/g,`/`)}function f(e=``){return e&&e.replace(/\\/g,`/`).replace(a,e=>e.toUpperCase())}function p(e){if(!e||e.length===0)return`.`;e=f(e);let t=e.match(s),n=u(e),r=e[e.length-1]===`/`;return e=h(e,!n),e.length===0?n?`/`:r?`./`:`.`:(r&&(e+=`/`),o.test(e)&&(e+=`/`),t?n?`//${e}`:`//./${e}`:n&&!u(e)?`/${e}`:e)}function m(...e){let t=``;for(let n of e)if(n)if(t.length>0){let e=t[t.length-1]===`/`,r=n[0]===`/`;e&&r?t+=n.slice(1):t+=e||r?n:`/${n}`}else t+=n;return p(t)}function h(e,t){let n=``,r=0,i=-1,a=0,o=null;for(let s=0;s<=e.length;++s){if(s<e.length)o=e[s];else if(o===`/`)break;else o=`/`;if(o===`/`){if(!(i===s-1||a===1))if(a===2){if(n.length<2||r!==2||n[n.length-1]!==`.`||n[n.length-2]!==`.`){if(n.length>2){let e=n.lastIndexOf(`/`);e===-1?(n=``,r=0):(n=n.slice(0,e),r=n.length-1-n.lastIndexOf(`/`)),i=s,a=0;continue}else if(n.length>0){n=``,r=0,i=s,a=0;continue}}t&&(n+=n.length>0?`/..`:`..`,r=2)}else n.length>0?n+=`/${e.slice(i+1,s)}`:n=e.slice(i+1,s),r=s-i-1;i=s,a=0}else o===`.`&&a!==-1?++a:a=-1}return n}const g={dot:!0};async function _(t,i){return r(e(t)?t.includes(`*`)?t:m(t,`**/*`):t.input?m(t.input,t.glob):t.glob,n(e(t)?{}:{dot:t.dot,ignore:t.ignore},i??{},g))}async function v(e,t){let r=(await _(e,n({withFileTypes:!0},t??{}))).filter(e=>e.isFile());return t?.withFileTypes?r:r.map(e=>e.fullpath())}const y=async e=>{if(!e)throw Error(`No file path provided to read data`);return i(e,{encoding:`utf8`})};async function b(e,n){let r={};return await Promise.all(e.map(async e=>{r[e]=await y(e)})),t(r,n)}async function x(e,t={}){return t.ignore=t.ignore??[`**/node_modules/**`,`**/.git/**`,`**/.nx/**`,`**/.cache/**`,`**/.storm/**`,`**/tmp/**`],b(await v(e,t),t)}export{b as n,x as t};
2
+ //# sourceMappingURL=hash-files-BMmt9LzB.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hash-files-BMmt9LzB.mjs","names":["char: string | null","DEFAULT_OPTIONS: ListOptions","readFile","readFileFs","readFile"],"sources":["../../path/src/regex.ts","../../path/src/is-type.ts","../../path/src/slash.ts","../../path/src/join-paths.ts","../../fs/src/list-files.ts","../../fs/src/read-file.ts","../src/hash-files.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nexport const DRIVE_LETTER_START_REGEX = /^[A-Z]:\\//i;\nexport const DRIVE_LETTER_REGEX = /^[A-Z]:$/i;\n\nexport const UNC_REGEX = /^[/\\\\]{2}/;\n\nexport const ABSOLUTE_PATH_REGEX =\n /^[/\\\\](?![/\\\\])|^[/\\\\]{2}(?!\\.)|^~[/\\\\]|^[A-Z]:[/\\\\]/i;\n\nexport const ROOT_FOLDER_REGEX = /^\\/([A-Z]:)?$/i;\n\nexport const FILE_EXTENSION_REGEX = /\\.[0-9a-z]+$/i;\n\nexport const PACKAGE_PATH_REGEX = /^@\\w+\\/.*$/;\nexport const NPM_SCOPED_PACKAGE_REGEX = /^(?:@[\\w-]+\\/)?[\\w-]+$/;\n","/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { ABSOLUTE_PATH_REGEX, NPM_SCOPED_PACKAGE_REGEX } from \"./regex\";\nimport { slash } from \"./slash\";\n\n/**\n * Check if the path is an absolute path.\n *\n * @param path - The path to check\n * @returns An indicator specifying if the path is an absolute path\n */\nexport function isAbsolutePath(path: string): boolean {\n return ABSOLUTE_PATH_REGEX.test(slash(path));\n}\n\n/**\n * Check if the path is an absolute path.\n *\n * @remarks\n * This is an alias for {@link isAbsolutePath}.\n *\n * @param path - The path to check\n * @returns An indicator specifying if the path is an absolute path\n */\nexport function isAbsolute(path: string): boolean {\n return isAbsolutePath(path);\n}\n\n/**\n * Check if the path is a relative path.\n *\n * @param path - The path to check\n * @returns An indicator specifying if the path is a relative path\n */\nexport function isRelativePath(path: string): boolean {\n return !isAbsolutePath(path);\n}\n\n/**\n * Check if the path is a relative path.\n *\n * @remarks\n * This is an alias for {@link isRelativePath}.\n *\n * @param path - The path to check\n * @returns An indicator specifying if the path is a relative path\n */\nexport function isRelative(path: string): boolean {\n return isRelativePath(path);\n}\n\n/**\n * Check if the path is a npm package path.\n *\n * @remarks\n * This only checks if the path matches the npm namespace scoped package naming convention such as `@scope/package-name`. This is an alias for {@link isNpmScopedPackage}.\n *\n * @example\n * ```ts\n * isNpmScopedPackage(\"@stryke/path\"); // returns true\n * isNpmScopedPackage(\"lodash\"); // returns false\n * isNpmNamespacePackage(\"./src/index.ts\"); // returns false\n * ```\n *\n * @param path - The path to check\n * @returns An indicator specifying if the path is a npm package path\n */\nexport function isNpmScopedPackagePath(path: string): boolean {\n return NPM_SCOPED_PACKAGE_REGEX.test(slash(path));\n}\n\n/**\n * Check if the path is a npm package path.\n *\n * @remarks\n * This only checks if the path matches the npm namespace scoped package naming convention such as `@scope/package-name`. This is an alias for {@link isNpmScopedPackagePath}.\n *\n * @example\n * ```ts\n * isNpmScopedPackagePath(\"@stryke/path\"); // returns true\n * isNpmScopedPackagePath(\"lodash\"); // returns false\n * isNpmScopedPackagePath(\"./src/index.ts\"); // returns false\n * ```\n *\n * @param path - The path to check\n * @returns An indicator specifying if the path is a npm package path\n */\nexport function isNpmScopedPackage(path: string): boolean {\n return isNpmScopedPackagePath(path);\n}\n","/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { isAbsolutePath } from \"./is-type\";\n\n/**\n * Replace backslash to slash\n *\n * @param path - The string to replace\n * @returns The string with replaced backslashes\n */\nexport function slash(path: string) {\n if (path.startsWith(\"\\\\\\\\?\\\\\")) {\n return path;\n }\n\n return path.replace(/\\\\/g, \"/\");\n}\n\n/**\n * Replace backslash to slash and remove unneeded leading and trailing slashes\n *\n * @param path - The string to replace\n * @returns The string with replaced backslashes\n */\nexport function formatSlash(path: string) {\n const formatted = slash(path);\n\n return isAbsolutePath(formatted)\n ? formatted.replace(/\\/+$/g, \"\")\n : formatted.replace(/^\\.\\//g, \"\").replace(/\\/+$/g, \"\");\n}\n","/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { isAbsolute } from \"./is-type\";\nimport {\n DRIVE_LETTER_REGEX,\n DRIVE_LETTER_START_REGEX,\n UNC_REGEX\n} from \"./regex\";\n\n// Util to normalize windows paths to posix\nfunction normalizeWindowsPath(input = \"\") {\n if (!input) {\n return input;\n }\n return input\n .replace(/\\\\/g, \"/\")\n .replace(DRIVE_LETTER_START_REGEX, r => r.toUpperCase());\n}\n\nfunction correctPaths(path?: string) {\n if (!path || path.length === 0) {\n return \".\";\n }\n\n // Normalize windows argument\n path = normalizeWindowsPath(path);\n\n const isUNCPath = path.match(UNC_REGEX);\n const isPathAbsolute = isAbsolute(path);\n const trailingSeparator = path[path.length - 1] === \"/\";\n\n // Normalize the path\n path = normalizeString(path, !isPathAbsolute);\n\n if (path.length === 0) {\n if (isPathAbsolute) {\n return \"/\";\n }\n return trailingSeparator ? \"./\" : \".\";\n }\n if (trailingSeparator) {\n path += \"/\";\n }\n if (DRIVE_LETTER_REGEX.test(path)) {\n path += \"/\";\n }\n\n if (isUNCPath) {\n if (!isPathAbsolute) {\n return `//./${path}`;\n }\n return `//${path}`;\n }\n\n return isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;\n}\n\n/**\n * Joins all given path segments together using the platform-specific separator as a delimiter.\n * The resulting path is normalized to remove any redundant or unnecessary segments.\n *\n * @param segments - The path segments to join.\n * @returns The joined and normalized path string.\n */\nexport function joinPaths(...segments: string[]): string {\n let path = \"\";\n\n for (const seg of segments) {\n if (!seg) {\n continue;\n }\n if (path.length > 0) {\n const pathTrailing = path[path.length - 1] === \"/\";\n const segLeading = seg[0] === \"/\";\n const both = pathTrailing && segLeading;\n if (both) {\n path += seg.slice(1);\n } else {\n path += pathTrailing || segLeading ? seg : `/${seg}`;\n }\n } else {\n path += seg;\n }\n }\n\n return correctPaths(path);\n}\n\nexport const join = joinPaths;\n\n/**\n * Resolves a string path, resolving '.' and '.' segments and allowing paths above the root.\n *\n * @param path - The path to normalize.\n * @param allowAboveRoot - Whether to allow the resulting path to be above the root directory.\n * @returns the normalized path string.\n */\nfunction normalizeString(path: string, allowAboveRoot: boolean) {\n let res = \"\";\n let lastSegmentLength = 0;\n let lastSlash = -1;\n let dots = 0;\n let char: string | null = null;\n for (let index = 0; index <= path.length; ++index) {\n if (index < path.length) {\n // casted because we know it exists thanks to the length check\n char = path[index] as string;\n } else if (char === \"/\") {\n break;\n } else {\n char = \"/\";\n }\n if (char === \"/\") {\n if (lastSlash === index - 1 || dots === 1) {\n // NOOP\n } else if (dots === 2) {\n if (\n res.length < 2 ||\n lastSegmentLength !== 2 ||\n res[res.length - 1] !== \".\" ||\n res[res.length - 2] !== \".\"\n ) {\n if (res.length > 2) {\n const lastSlashIndex = res.lastIndexOf(\"/\");\n if (lastSlashIndex === -1) {\n res = \"\";\n lastSegmentLength = 0;\n } else {\n res = res.slice(0, lastSlashIndex);\n lastSegmentLength = res.length - 1 - res.lastIndexOf(\"/\");\n }\n lastSlash = index;\n dots = 0;\n continue;\n } else if (res.length > 0) {\n res = \"\";\n lastSegmentLength = 0;\n lastSlash = index;\n dots = 0;\n continue;\n }\n }\n if (allowAboveRoot) {\n res += res.length > 0 ? \"/..\" : \"..\";\n lastSegmentLength = 2;\n }\n } else {\n if (res.length > 0) {\n res += `/${path.slice(lastSlash + 1, index)}`;\n } else {\n res = path.slice(lastSlash + 1, index);\n }\n lastSegmentLength = index - lastSlash - 1;\n }\n lastSlash = index;\n dots = 0;\n } else if (char === \".\" && dots !== -1) {\n ++dots;\n } else {\n dots = -1;\n }\n }\n return res;\n}\n","/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { joinPaths } from \"@stryke/path\";\nimport { isString } from \"@stryke/type-checks\";\nimport type { AssetGlob } from \"@stryke/types/file\";\nimport defu from \"defu\";\nimport type { GlobOptions, GlobOptionsWithFileTypesTrue, Path } from \"glob\";\nimport { glob } from \"glob\";\n\nexport type ListOptions = GlobOptions;\nexport type InferListReturnType<TOptions extends GlobOptions> =\n TOptions[\"withFileTypes\"] extends true ? Path[] : string[];\n\nconst DEFAULT_OPTIONS: ListOptions = {\n dot: true\n};\n\n/**\n * A files and directories listing helper function\n *\n * @param filesGlob - A glob pattern to match files\n * @returns A list of file paths\n */\nexport async function list<TOptions extends ListOptions>(\n filesGlob: string | Omit<AssetGlob, \"output\">,\n options?: TOptions\n): Promise<InferListReturnType<TOptions>> {\n return glob(\n isString(filesGlob)\n ? filesGlob.includes(\"*\")\n ? filesGlob\n : joinPaths(filesGlob, \"**/*\")\n : filesGlob.input\n ? joinPaths(filesGlob.input, filesGlob.glob)\n : filesGlob.glob,\n defu(\n isString(filesGlob)\n ? {}\n : { dot: filesGlob.dot, ignore: filesGlob.ignore },\n options ?? {},\n DEFAULT_OPTIONS\n )\n ) as Promise<InferListReturnType<TOptions>>;\n}\n\n/**\n * A synchronous files and directories listing helper function\n *\n * @param filesGlob - A glob pattern to match files\n * @returns A list of file paths\n */\nexport function listSync<TOptions extends ListOptions>(\n filesGlob: string | Omit<AssetGlob, \"output\">,\n options?: TOptions\n): InferListReturnType<TOptions> {\n return glob.sync(\n isString(filesGlob)\n ? filesGlob.includes(\"*\")\n ? filesGlob\n : joinPaths(filesGlob, \"**/*\")\n : filesGlob.input\n ? joinPaths(filesGlob.input, filesGlob.glob)\n : filesGlob.glob,\n defu(\n isString(filesGlob)\n ? {}\n : { dot: filesGlob.dot, ignore: filesGlob.ignore },\n options ?? {},\n DEFAULT_OPTIONS\n )\n ) as InferListReturnType<TOptions>;\n}\n\n/**\n * A file listing helper function\n *\n * @param filesGlob - A glob pattern to match files\n * @returns A list of file paths\n */\nexport async function listFiles<TOptions extends ListOptions>(\n filesGlob: string | Omit<AssetGlob, \"output\">,\n options?: TOptions\n) {\n const result = (\n await list(\n filesGlob,\n defu(\n { withFileTypes: true },\n options ?? {}\n ) as GlobOptionsWithFileTypesTrue\n )\n ).filter(ret => ret.isFile());\n if (!options?.withFileTypes) {\n return result.map(file => file.fullpath()) as InferListReturnType<TOptions>;\n }\n\n return result as InferListReturnType<TOptions>;\n}\n\n/**\n * A synchronous file listing helper function\n *\n * @param filesGlob - A glob pattern to match files\n * @returns A list of file paths\n */\nexport function listFilesSync<TOptions extends ListOptions>(\n filesGlob: string | Omit<AssetGlob, \"output\">,\n options?: TOptions\n) {\n const result = listSync(\n filesGlob,\n defu({ withFileTypes: true }, options ?? {}) as GlobOptionsWithFileTypesTrue\n ).filter(ret => ret.isFile());\n if (!options?.withFileTypes) {\n return result.map(file => file.fullpath()) as InferListReturnType<TOptions>;\n }\n\n return result as InferListReturnType<TOptions>;\n}\n\n/**\n * A directories listing helper function\n *\n * @param filesGlob - A glob pattern to match files\n * @returns A list of file paths\n */\nexport async function listDirectories<TOptions extends ListOptions>(\n filesGlob: string | Omit<AssetGlob, \"output\">,\n options?: TOptions\n) {\n const result = (\n await list(\n filesGlob,\n defu(\n { withFileTypes: true },\n options ?? {}\n ) as GlobOptionsWithFileTypesTrue\n )\n ).filter(ret => ret.isDirectory());\n if (!options?.withFileTypes) {\n return result.map(file => file.fullpath()) as InferListReturnType<TOptions>;\n }\n\n return result as InferListReturnType<TOptions>;\n}\n\n/**\n * A synchronous directories listing helper function\n *\n * @param filesGlob - A glob pattern to match files\n * @returns A list of file paths\n */\nexport function listDirectoriesSync<TOptions extends ListOptions>(\n filesGlob: string | Omit<AssetGlob, \"output\">,\n options?: TOptions\n) {\n const result = listSync(\n filesGlob,\n defu({ withFileTypes: true }, options ?? {}) as GlobOptionsWithFileTypesTrue\n ).filter(ret => ret.isDirectory());\n if (!options?.withFileTypes) {\n return result.map(file => file.fullpath()) as InferListReturnType<TOptions>;\n }\n\n return result as InferListReturnType<TOptions>;\n}\n","/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { existsSync, readFileSync as readFileSyncFs } from \"node:fs\";\nimport { readFile as readFileFs } from \"node:fs/promises\";\n\n/**\n * Read the given content to the given file path\n *\n * @param filePath - The file path to write to\n */\nexport const readFileSync = (filePath: string): string => {\n if (!filePath) {\n throw new Error(\"No file path provided to read data\");\n }\n\n return readFileSyncFs(filePath, { encoding: \"utf8\" });\n};\n\n/**\n * Read the given content to the given file path\n *\n * @param filePath - The file path to read to\n */\nexport const readFile = async (filePath: string): Promise<string> => {\n if (!filePath) {\n throw new Error(\"No file path provided to read data\");\n }\n\n return readFileFs(filePath, { encoding: \"utf8\" });\n};\n\n/**\n * Reads a file if it exists, otherwise returns an empty string.\n *\n * @param path - The path to the file to read.\n * @returns The content of the file if it exists, otherwise an empty string.\n */\nexport function readFileIfExistingSync(path: string) {\n return existsSync(path) ? readFileSync(path) : \"\";\n}\n\n/**\n * Reads a file if it exists, otherwise returns an empty string.\n *\n * @param path - The path to the file to read.\n * @returns The content of the file if it exists, otherwise an empty string.\n */\nexport async function readFileIfExisting(path: string) {\n return existsSync(path) ? readFile(path) : \"\";\n}\n","/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { ListOptions } from \"@stryke/fs/list-files\";\nimport { listFiles } from \"@stryke/fs/list-files\";\nimport { readFile } from \"@stryke/fs/read-file\";\nimport type { HashOptions } from \"./murmurhash\";\nimport { murmurhash } from \"./murmurhash\";\n\n/**\n * Hash a list of file paths into a string based on the file content\n *\n * @param files - The list of file paths to hash\n * @param options - Hashing options\n * @returns A hashed string value\n */\nexport async function hashFiles(\n files: string[],\n options?: HashOptions\n): Promise<string> {\n const result = {} as Record<string, string>;\n await Promise.all(\n files.map(async file => {\n result[file] = await readFile(file);\n })\n );\n\n return murmurhash(result, options);\n}\n\n/**\n * Hash a folder path into a string based on the file content\n *\n * @param directoryPath - The folder path to hash\n * @param options - Hashing options. By default, the `node_modules`, `.git`, `.nx`, `.cache`, and `tmp` folders is ignored.\n * @returns A hashed string value\n */\nexport async function hashDirectory(\n directoryPath: string,\n options: HashOptions & ListOptions = {}\n): Promise<string> {\n options.ignore = options.ignore ?? [\n \"**/node_modules/**\",\n \"**/.git/**\",\n \"**/.nx/**\",\n \"**/.cache/**\",\n \"**/.storm/**\",\n \"**/tmp/**\"\n ];\n\n return hashFiles(await listFiles(directoryPath, options), options);\n}\n"],"mappings":"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"}
@@ -0,0 +1,26 @@
1
+ import { t as HashOptions } from "./murmurhash-D6qhmMhz.mjs";
2
+ import { GlobOptions } from "glob";
3
+
4
+ //#region ../fs/src/list-files.d.ts
5
+ type ListOptions = GlobOptions;
6
+ //#endregion
7
+ //#region src/hash-files.d.ts
8
+ /**
9
+ * Hash a list of file paths into a string based on the file content
10
+ *
11
+ * @param files - The list of file paths to hash
12
+ * @param options - Hashing options
13
+ * @returns A hashed string value
14
+ */
15
+ declare function hashFiles(files: string[], options?: HashOptions): Promise<string>;
16
+ /**
17
+ * Hash a folder path into a string based on the file content
18
+ *
19
+ * @param directoryPath - The folder path to hash
20
+ * @param options - Hashing options. By default, the `node_modules`, `.git`, `.nx`, `.cache`, and `tmp` folders is ignored.
21
+ * @returns A hashed string value
22
+ */
23
+ declare function hashDirectory(directoryPath: string, options?: HashOptions & ListOptions): Promise<string>;
24
+ //#endregion
25
+ export { hashFiles as n, hashDirectory as t };
26
+ //# sourceMappingURL=hash-files-C8KCroZK.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hash-files-C8KCroZK.d.mts","names":[],"sources":["../../fs/src/list-files.ts","../src/hash-files.ts"],"sourcesContent":[],"mappings":";;;;KAyBY,WAAA,GAAc;;;;;AAA1B;;;;ACMA;AAqBsB,iBArBA,SAAA,CAqBa,KAAA,EAAA,MAAA,EAAA,EAAA,OAAA,CAAA,EAnBvB,WAmBuB,CAAA,EAlBhC,OAkBgC,CAAA,MAAA,CAAA;;;;;;;;iBAAb,aAAA,kCAEX,cAAc,cACtB"}
@@ -0,0 +1,26 @@
1
+ import { t as HashOptions } from "./murmurhash-dzYfmtjT.cjs";
2
+ import { GlobOptions } from "glob";
3
+
4
+ //#region ../fs/src/list-files.d.ts
5
+ type ListOptions = GlobOptions;
6
+ //#endregion
7
+ //#region src/hash-files.d.ts
8
+ /**
9
+ * Hash a list of file paths into a string based on the file content
10
+ *
11
+ * @param files - The list of file paths to hash
12
+ * @param options - Hashing options
13
+ * @returns A hashed string value
14
+ */
15
+ declare function hashFiles(files: string[], options?: HashOptions): Promise<string>;
16
+ /**
17
+ * Hash a folder path into a string based on the file content
18
+ *
19
+ * @param directoryPath - The folder path to hash
20
+ * @param options - Hashing options. By default, the `node_modules`, `.git`, `.nx`, `.cache`, and `tmp` folders is ignored.
21
+ * @returns A hashed string value
22
+ */
23
+ declare function hashDirectory(directoryPath: string, options?: HashOptions & ListOptions): Promise<string>;
24
+ //#endregion
25
+ export { hashFiles as n, hashDirectory as t };
26
+ //# sourceMappingURL=hash-files-DMXzIbQw.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hash-files-DMXzIbQw.d.cts","names":[],"sources":["../../fs/src/list-files.ts","../src/hash-files.ts"],"sourcesContent":[],"mappings":";;;;KAyBY,WAAA,GAAc;;;;;AAA1B;;;;ACMA;AAqBsB,iBArBA,SAAA,CAqBa,KAAA,EAAA,MAAA,EAAA,EAAA,OAAA,CAAA,EAnBvB,WAmBuB,CAAA,EAlBhC,OAkBgC,CAAA,MAAA,CAAA;;;;;;;;iBAAb,aAAA,kCAEX,cAAc,cACtB"}
@@ -0,0 +1 @@
1
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));const c=require(`./src-QUlAu3to.cjs`),l=require(`./murmurhash-CVcuhG5F.cjs`);let u=require(`defu`);u=s(u);let d=require(`glob`),f=require(`node:fs/promises`);const p=/^[A-Z]:\//i,m=/^[A-Z]:$/i,h=/^[/\\]{2}/,g=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^~[/\\]|^[A-Z]:[/\\]/i;function _(e){return g.test(y(e))}function v(e){return _(e)}function y(e){return e.startsWith(`\\\\?\\`)?e:e.replace(/\\/g,`/`)}function b(e=``){return e&&e.replace(/\\/g,`/`).replace(p,e=>e.toUpperCase())}function x(e){if(!e||e.length===0)return`.`;e=b(e);let t=e.match(h),n=v(e),r=e[e.length-1]===`/`;return e=C(e,!n),e.length===0?n?`/`:r?`./`:`.`:(r&&(e+=`/`),m.test(e)&&(e+=`/`),t?n?`//${e}`:`//./${e}`:n&&!v(e)?`/${e}`:e)}function S(...e){let t=``;for(let n of e)if(n)if(t.length>0){let e=t[t.length-1]===`/`,r=n[0]===`/`;e&&r?t+=n.slice(1):t+=e||r?n:`/${n}`}else t+=n;return x(t)}function C(e,t){let n=``,r=0,i=-1,a=0,o=null;for(let s=0;s<=e.length;++s){if(s<e.length)o=e[s];else if(o===`/`)break;else o=`/`;if(o===`/`){if(!(i===s-1||a===1))if(a===2){if(n.length<2||r!==2||n[n.length-1]!==`.`||n[n.length-2]!==`.`){if(n.length>2){let e=n.lastIndexOf(`/`);e===-1?(n=``,r=0):(n=n.slice(0,e),r=n.length-1-n.lastIndexOf(`/`)),i=s,a=0;continue}else if(n.length>0){n=``,r=0,i=s,a=0;continue}}t&&(n+=n.length>0?`/..`:`..`,r=2)}else n.length>0?n+=`/${e.slice(i+1,s)}`:n=e.slice(i+1,s),r=s-i-1;i=s,a=0}else o===`.`&&a!==-1?++a:a=-1}return n}const w={dot:!0};async function T(e,t){return(0,d.glob)(c.t(e)?e.includes(`*`)?e:S(e,`**/*`):e.input?S(e.input,e.glob):e.glob,(0,u.default)(c.t(e)?{}:{dot:e.dot,ignore:e.ignore},t??{},w))}async function E(e,t){let n=(await T(e,(0,u.default)({withFileTypes:!0},t??{}))).filter(e=>e.isFile());return t?.withFileTypes?n:n.map(e=>e.fullpath())}const D=async e=>{if(!e)throw Error(`No file path provided to read data`);return(0,f.readFile)(e,{encoding:`utf8`})};async function O(e,t){let n={};return await Promise.all(e.map(async e=>{n[e]=await D(e)})),l.t(n,t)}async function k(e,t={}){return t.ignore=t.ignore??[`**/node_modules/**`,`**/.git/**`,`**/.nx/**`,`**/.cache/**`,`**/.storm/**`,`**/tmp/**`],O(await E(e,t),t)}Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return O}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return k}});
@@ -1,19 +1 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.hashDirectory = hashDirectory;
7
- exports.hashFiles = hashFiles;
8
- var _listFiles = require("@stryke/fs/list-files");
9
- var _readFile = require("@stryke/fs/read-file");
10
- var _murmurhash = require("./murmurhash.cjs");
11
- async function hashFiles(s, r) {
12
- const t = {};
13
- return await Promise.all(s.map(async i => {
14
- t[i] = await (0, _readFile.readFile)(i);
15
- })), (0, _murmurhash.murmurhash)(t, r);
16
- }
17
- async function hashDirectory(s, r = {}) {
18
- return r.ignore = r.ignore ?? ["**/node_modules/**", "**/.git/**", "**/.nx/**", "**/.cache/**", "**/.storm/**", "**/tmp/**"], hashFiles(await (0, _listFiles.listFiles)(s, r), r);
19
- }
1
+ const e=require(`./hash-files-DNDrDY17.cjs`);require(`./src-QUlAu3to.cjs`),require(`./murmurhash-CVcuhG5F.cjs`),exports.hashDirectory=e.t,exports.hashFiles=e.n;
@@ -0,0 +1,2 @@
1
+ import { n as hashFiles, t as hashDirectory } from "./hash-files-DMXzIbQw.cjs";
2
+ export { hashDirectory, hashFiles };
@@ -0,0 +1,2 @@
1
+ import { n as hashFiles, t as hashDirectory } from "./hash-files-C8KCroZK.mjs";
2
+ export { hashDirectory, hashFiles };
@@ -1 +1 @@
1
- import{listFiles as o}from"@stryke/fs/list-files";import{readFile as e}from"@stryke/fs/read-file";import{murmurhash as n}from"./murmurhash";export async function hashFiles(s,r){const t={};return await Promise.all(s.map(async i=>{t[i]=await e(i)})),n(t,r)}export async function hashDirectory(s,r={}){return r.ignore=r.ignore??["**/node_modules/**","**/.git/**","**/.nx/**","**/.cache/**","**/.storm/**","**/tmp/**"],hashFiles(await o(s,r),r)}
1
+ import"./src-GI5wB-mz.mjs";import{n as e,t}from"./hash-files-BMmt9LzB.mjs";import"./murmurhash-CoNWpOwZ.mjs";export{t as hashDirectory,e as hashFiles};
package/dist/index.cjs CHANGED
@@ -1,71 +1 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- var _digest = require("./digest.cjs");
7
- Object.keys(_digest).forEach(function (key) {
8
- if (key === "default" || key === "__esModule") return;
9
- if (key in exports && exports[key] === _digest[key]) return;
10
- Object.defineProperty(exports, key, {
11
- enumerable: true,
12
- get: function () {
13
- return _digest[key];
14
- }
15
- });
16
- });
17
- var _etag = require("./etag.cjs");
18
- Object.keys(_etag).forEach(function (key) {
19
- if (key === "default" || key === "__esModule") return;
20
- if (key in exports && exports[key] === _etag[key]) return;
21
- Object.defineProperty(exports, key, {
22
- enumerable: true,
23
- get: function () {
24
- return _etag[key];
25
- }
26
- });
27
- });
28
- var _hashFiles = require("./hash-files.cjs");
29
- Object.keys(_hashFiles).forEach(function (key) {
30
- if (key === "default" || key === "__esModule") return;
31
- if (key in exports && exports[key] === _hashFiles[key]) return;
32
- Object.defineProperty(exports, key, {
33
- enumerable: true,
34
- get: function () {
35
- return _hashFiles[key];
36
- }
37
- });
38
- });
39
- var _md = require("./md5.cjs");
40
- Object.keys(_md).forEach(function (key) {
41
- if (key === "default" || key === "__esModule") return;
42
- if (key in exports && exports[key] === _md[key]) return;
43
- Object.defineProperty(exports, key, {
44
- enumerable: true,
45
- get: function () {
46
- return _md[key];
47
- }
48
- });
49
- });
50
- var _murmurhash = require("./murmurhash.cjs");
51
- Object.keys(_murmurhash).forEach(function (key) {
52
- if (key === "default" || key === "__esModule") return;
53
- if (key in exports && exports[key] === _murmurhash[key]) return;
54
- Object.defineProperty(exports, key, {
55
- enumerable: true,
56
- get: function () {
57
- return _murmurhash[key];
58
- }
59
- });
60
- });
61
- var _xxHash = require("./xx-hash.cjs");
62
- Object.keys(_xxHash).forEach(function (key) {
63
- if (key === "default" || key === "__esModule") return;
64
- if (key in exports && exports[key] === _xxHash[key]) return;
65
- Object.defineProperty(exports, key, {
66
- enumerable: true,
67
- get: function () {
68
- return _xxHash[key];
69
- }
70
- });
71
- });
1
+ const e=require(`./hash-files-DNDrDY17.cjs`),t=require(`./digest-REorjd4v.cjs`);require(`./src-QUlAu3to.cjs`);const n=require(`./etag-SIhKWCBx.cjs`),r=require(`./murmurhash-CVcuhG5F.cjs`),i=require(`./md5-Cwdph7YU.cjs`),a=require(`./xx-hash--6giOvM7.cjs`);exports.Hasher=t.t,exports.createHasher=t.n,exports.digest=t.r,exports.fnv1a52=n.t,exports.generateETag=n.n,exports.hash=t.i,exports.hashDirectory=e.t,exports.hashFiles=e.n,exports.md5=i.t,exports.murmurhash=r.t,exports.xxHash128=a.t,exports.xxHash32=a.n,exports.xxHash64=a.r;
@@ -0,0 +1,7 @@
1
+ import { a as hash, i as digest, n as Hasher, r as createHasher, t as AlgorithmIdentifier } from "./digest-Yy26O9oW.cjs";
2
+ import { n as generateETag, t as fnv1a52 } from "./etag-BdoEX_I_.cjs";
3
+ import { n as hashFiles, t as hashDirectory } from "./hash-files-DMXzIbQw.cjs";
4
+ import { n as murmurhash, t as HashOptions } from "./murmurhash-dzYfmtjT.cjs";
5
+ import { t as md5 } from "./md5-CCxA7tZv.cjs";
6
+ import { n as xxHash32, r as xxHash64, t as xxHash128 } from "./xx-hash-BnLXga7m.cjs";
7
+ export { AlgorithmIdentifier, HashOptions, Hasher, createHasher, digest, fnv1a52, generateETag, hash, hashDirectory, hashFiles, md5, murmurhash, xxHash128, xxHash32, xxHash64 };
@@ -0,0 +1,7 @@
1
+ import { a as hash, i as digest, n as Hasher, r as createHasher, t as AlgorithmIdentifier } from "./digest-CG1Sk96A.mjs";
2
+ import { n as generateETag, t as fnv1a52 } from "./etag-Kuj0WZon.mjs";
3
+ import { n as hashFiles, t as hashDirectory } from "./hash-files-C8KCroZK.mjs";
4
+ import { n as murmurhash, t as HashOptions } from "./murmurhash-D6qhmMhz.mjs";
5
+ import { t as md5 } from "./md5-C_8IsDev.mjs";
6
+ import { n as xxHash32, r as xxHash64, t as xxHash128 } from "./xx-hash-DyeY-GKZ.mjs";
7
+ export { AlgorithmIdentifier, HashOptions, Hasher, createHasher, digest, fnv1a52, generateETag, hash, hashDirectory, hashFiles, md5, murmurhash, xxHash128, xxHash32, xxHash64 };
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- export*from"./digest";export*from"./etag";export*from"./hash-files";export*from"./md5";export*from"./murmurhash";export*from"./xx-hash";
1
+ import{i as e,n as t,r as n,t as r}from"./digest-311IQaur.mjs";import"./src-GI5wB-mz.mjs";import{n as i,t as a}from"./etag-DXmoR6hr.mjs";import{n as o,t as s}from"./hash-files-BMmt9LzB.mjs";import{t as c}from"./murmurhash-CoNWpOwZ.mjs";import{t as l}from"./md5-CnYTBU9u.mjs";import{n as u,r as d,t as f}from"./xx-hash-SyVhkkcA.mjs";export{r as Hasher,t as createHasher,n as digest,a as fnv1a52,i as generateETag,e as hash,s as hashDirectory,o as hashFiles,l as md5,c as murmurhash,f as xxHash128,u as xxHash32,d as xxHash64};
@@ -1,3 +1,4 @@
1
+ //#region src/md5.d.ts
1
2
  /**
2
3
  * Generate an MD5 hash of the provided content.
3
4
  *
@@ -5,4 +6,7 @@
5
6
  * @param length - The length of the hash to return.
6
7
  * @returns The generated MD5 hash.
7
8
  */
8
- export declare function md5(content: string, length?: number): string;
9
+ declare function md5(content: string, length?: number): string;
10
+ //#endregion
11
+ export { md5 as t };
12
+ //# sourceMappingURL=md5-CCxA7tZv.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"md5-CCxA7tZv.d.cts","names":[],"sources":["../src/md5.ts"],"sourcesContent":[],"mappings":";;AA2BA;;;;;;iBAAgB,GAAA"}
@@ -0,0 +1,12 @@
1
+ //#region src/md5.d.ts
2
+ /**
3
+ * Generate an MD5 hash of the provided content.
4
+ *
5
+ * @param content - The content to hash.
6
+ * @param length - The length of the hash to return.
7
+ * @returns The generated MD5 hash.
8
+ */
9
+ declare function md5(content: string, length?: number): string;
10
+ //#endregion
11
+ export { md5 as t };
12
+ //# sourceMappingURL=md5-C_8IsDev.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"md5-C_8IsDev.d.mts","names":[],"sources":["../src/md5.ts"],"sourcesContent":[],"mappings":";;AA2BA;;;;;;iBAAgB,GAAA"}
@@ -0,0 +1,2 @@
1
+ import{createHash as e}from"node:crypto";function t(t,n=32){return e(`md5`).update(t).digest(`hex`).slice(0,n)}export{t};
2
+ //# sourceMappingURL=md5-CnYTBU9u.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"md5-CnYTBU9u.mjs","names":[],"sources":["../src/md5.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { createHash } from \"node:crypto\";\n\n/**\n * Generate an MD5 hash of the provided content.\n *\n * @param content - The content to hash.\n * @param length - The length of the hash to return.\n * @returns The generated MD5 hash.\n */\nexport function md5(content: string, length = 32) {\n return createHash(\"md5\").update(content).digest(\"hex\").slice(0, length);\n}\n"],"mappings":"yCA2BA,SAAgB,EAAI,EAAiB,EAAS,GAAI,CAChD,OAAO,EAAW,MAAM,CAAC,OAAO,EAAQ,CAAC,OAAO,MAAM,CAAC,MAAM,EAAG,EAAO"}
@@ -0,0 +1 @@
1
+ const e=require(`./hash-files-DNDrDY17.cjs`);let t=require(`node:crypto`);function n(e,n=32){return(0,t.createHash)(`md5`).update(e).digest(`hex`).slice(0,n)}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return n}});
package/dist/md5.cjs CHANGED
@@ -1,10 +1 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.md5 = md5;
7
- var _nodeCrypto = require("node:crypto");
8
- function md5(e, t = 32) {
9
- return (0, _nodeCrypto.createHash)("md5").update(e).digest("hex").slice(0, t);
10
- }
1
+ const e=require(`./md5-Cwdph7YU.cjs`);exports.md5=e.t;
package/dist/md5.d.cts ADDED
@@ -0,0 +1,2 @@
1
+ import { t as md5 } from "./md5-CCxA7tZv.cjs";
2
+ export { md5 };
package/dist/md5.d.mts ADDED
@@ -0,0 +1,2 @@
1
+ import { t as md5 } from "./md5-C_8IsDev.mjs";
2
+ export { md5 };
package/dist/md5.mjs CHANGED
@@ -1 +1 @@
1
- import{createHash as r}from"node:crypto";export function md5(e,t=32){return r("md5").update(e).digest("hex").slice(0,t)}
1
+ import{t as e}from"./md5-CnYTBU9u.mjs";export{e as md5};
@@ -0,0 +1 @@
1
+ const e=require(`./hash-files-DNDrDY17.cjs`);let t=require(`ohash`);function n(e,n){let r=(0,t.hash)(e),i=n?.maxLength??32;return r.length>i?r.slice(0,i):r}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return n}});
@@ -0,0 +1,2 @@
1
+ import{hash as e}from"ohash";function t(t,n){let r=e(t),i=n?.maxLength??32;return r.length>i?r.slice(0,i):r}export{t};
2
+ //# sourceMappingURL=murmurhash-CoNWpOwZ.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"murmurhash-CoNWpOwZ.mjs","names":["ohash"],"sources":["../src/murmurhash.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { hash as ohash } from \"ohash\";\n\nexport interface HashOptions {\n /**\n * The maximum length of the hash\n *\n * @defaultValue 32\n */\n maxLength?: number;\n}\n\n/**\n * Use a [MurmurHash3](https://en.wikipedia.org/wiki/MurmurHash) based algorithm to hash any JS value into a string.\n *\n * @see https://github.com/ohash/ohash\n * @see https://en.wikipedia.org/wiki/MurmurHash\n *\n * @param content - The value to hash\n * @param options - Hashing options\n * @returns A hashed string value\n */\nexport function murmurhash(content: any, options?: HashOptions): string {\n const result = ohash(content);\n const maxLength = options?.maxLength ?? 32;\n\n return result.length > maxLength ? result.slice(0, maxLength) : result;\n}\n"],"mappings":"6BAuCA,SAAgB,EAAW,EAAc,EAA+B,CACtE,IAAM,EAASA,EAAM,EAAQ,CACvB,EAAY,GAAS,WAAa,GAExC,OAAO,EAAO,OAAS,EAAY,EAAO,MAAM,EAAG,EAAU,CAAG"}
@@ -0,0 +1,23 @@
1
+ //#region src/murmurhash.d.ts
2
+ interface HashOptions {
3
+ /**
4
+ * The maximum length of the hash
5
+ *
6
+ * @defaultValue 32
7
+ */
8
+ maxLength?: number;
9
+ }
10
+ /**
11
+ * Use a [MurmurHash3](https://en.wikipedia.org/wiki/MurmurHash) based algorithm to hash any JS value into a string.
12
+ *
13
+ * @see https://github.com/ohash/ohash
14
+ * @see https://en.wikipedia.org/wiki/MurmurHash
15
+ *
16
+ * @param content - The value to hash
17
+ * @param options - Hashing options
18
+ * @returns A hashed string value
19
+ */
20
+ declare function murmurhash(content: any, options?: HashOptions): string;
21
+ //#endregion
22
+ export { murmurhash as n, HashOptions as t };
23
+ //# sourceMappingURL=murmurhash-D6qhmMhz.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"murmurhash-D6qhmMhz.d.mts","names":[],"sources":["../src/murmurhash.ts"],"sourcesContent":[],"mappings":";UAoBiB,WAAA;EAAA;AAmBjB;;;;;;;;;;;;;;;;iBAAgB,UAAA,yBAAmC"}
@@ -0,0 +1,23 @@
1
+ //#region src/murmurhash.d.ts
2
+ interface HashOptions {
3
+ /**
4
+ * The maximum length of the hash
5
+ *
6
+ * @defaultValue 32
7
+ */
8
+ maxLength?: number;
9
+ }
10
+ /**
11
+ * Use a [MurmurHash3](https://en.wikipedia.org/wiki/MurmurHash) based algorithm to hash any JS value into a string.
12
+ *
13
+ * @see https://github.com/ohash/ohash
14
+ * @see https://en.wikipedia.org/wiki/MurmurHash
15
+ *
16
+ * @param content - The value to hash
17
+ * @param options - Hashing options
18
+ * @returns A hashed string value
19
+ */
20
+ declare function murmurhash(content: any, options?: HashOptions): string;
21
+ //#endregion
22
+ export { murmurhash as n, HashOptions as t };
23
+ //# sourceMappingURL=murmurhash-dzYfmtjT.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"murmurhash-dzYfmtjT.d.cts","names":[],"sources":["../src/murmurhash.ts"],"sourcesContent":[],"mappings":";UAoBiB,WAAA;EAAA;AAmBjB;;;;;;;;;;;;;;;;iBAAgB,UAAA,yBAAmC"}
@@ -1,12 +1 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.murmurhash = murmurhash;
7
- var _ohash = require("ohash");
8
- function murmurhash(s, e) {
9
- const t = (0, _ohash.hash)(s),
10
- n = e?.maxLength ?? 32;
11
- return t.length > n ? t.slice(0, n) : t;
12
- }
1
+ const e=require(`./murmurhash-CVcuhG5F.cjs`);exports.murmurhash=e.t;
@@ -0,0 +1,2 @@
1
+ import { n as murmurhash, t as HashOptions } from "./murmurhash-dzYfmtjT.cjs";
2
+ export { HashOptions, murmurhash };
@@ -0,0 +1,2 @@
1
+ import { n as murmurhash, t as HashOptions } from "./murmurhash-D6qhmMhz.mjs";
2
+ export { HashOptions, murmurhash };
@@ -1 +1 @@
1
- import{hash as h}from"ohash";export function murmurhash(s,e){const t=h(s),n=e?.maxLength??32;return t.length>n?t.slice(0,n):t}
1
+ import{t as e}from"./murmurhash-CoNWpOwZ.mjs";export{e as murmurhash};
package/dist/neutral.cjs CHANGED
@@ -1,49 +1 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- var _digest = require("./digest.cjs");
7
- Object.keys(_digest).forEach(function (key) {
8
- if (key === "default" || key === "__esModule") return;
9
- if (key in exports && exports[key] === _digest[key]) return;
10
- Object.defineProperty(exports, key, {
11
- enumerable: true,
12
- get: function () {
13
- return _digest[key];
14
- }
15
- });
16
- });
17
- var _hashFiles = require("./hash-files.cjs");
18
- Object.keys(_hashFiles).forEach(function (key) {
19
- if (key === "default" || key === "__esModule") return;
20
- if (key in exports && exports[key] === _hashFiles[key]) return;
21
- Object.defineProperty(exports, key, {
22
- enumerable: true,
23
- get: function () {
24
- return _hashFiles[key];
25
- }
26
- });
27
- });
28
- var _murmurhash = require("./murmurhash.cjs");
29
- Object.keys(_murmurhash).forEach(function (key) {
30
- if (key === "default" || key === "__esModule") return;
31
- if (key in exports && exports[key] === _murmurhash[key]) return;
32
- Object.defineProperty(exports, key, {
33
- enumerable: true,
34
- get: function () {
35
- return _murmurhash[key];
36
- }
37
- });
38
- });
39
- var _xxHash = require("./xx-hash.cjs");
40
- Object.keys(_xxHash).forEach(function (key) {
41
- if (key === "default" || key === "__esModule") return;
42
- if (key in exports && exports[key] === _xxHash[key]) return;
43
- Object.defineProperty(exports, key, {
44
- enumerable: true,
45
- get: function () {
46
- return _xxHash[key];
47
- }
48
- });
49
- });
1
+ const e=require(`./hash-files-DNDrDY17.cjs`),t=require(`./digest-REorjd4v.cjs`);require(`./src-QUlAu3to.cjs`);const n=require(`./murmurhash-CVcuhG5F.cjs`),r=require(`./xx-hash--6giOvM7.cjs`);exports.Hasher=t.t,exports.createHasher=t.n,exports.digest=t.r,exports.hash=t.i,exports.hashDirectory=e.t,exports.hashFiles=e.n,exports.murmurhash=n.t,exports.xxHash128=r.t,exports.xxHash32=r.n,exports.xxHash64=r.r;
@@ -0,0 +1,5 @@
1
+ import { a as hash, i as digest, n as Hasher, r as createHasher, t as AlgorithmIdentifier } from "./digest-Yy26O9oW.cjs";
2
+ import { n as hashFiles, t as hashDirectory } from "./hash-files-DMXzIbQw.cjs";
3
+ import { n as murmurhash, t as HashOptions } from "./murmurhash-dzYfmtjT.cjs";
4
+ import { n as xxHash32, r as xxHash64, t as xxHash128 } from "./xx-hash-BnLXga7m.cjs";
5
+ export { AlgorithmIdentifier, HashOptions, Hasher, createHasher, digest, hash, hashDirectory, hashFiles, murmurhash, xxHash128, xxHash32, xxHash64 };
@@ -0,0 +1,5 @@
1
+ import { a as hash, i as digest, n as Hasher, r as createHasher, t as AlgorithmIdentifier } from "./digest-CG1Sk96A.mjs";
2
+ import { n as hashFiles, t as hashDirectory } from "./hash-files-C8KCroZK.mjs";
3
+ import { n as murmurhash, t as HashOptions } from "./murmurhash-D6qhmMhz.mjs";
4
+ import { n as xxHash32, r as xxHash64, t as xxHash128 } from "./xx-hash-DyeY-GKZ.mjs";
5
+ export { AlgorithmIdentifier, HashOptions, Hasher, createHasher, digest, hash, hashDirectory, hashFiles, murmurhash, xxHash128, xxHash32, xxHash64 };
package/dist/neutral.mjs CHANGED
@@ -1 +1 @@
1
- export*from"./digest";export*from"./hash-files";export*from"./murmurhash";export*from"./xx-hash";
1
+ import{i as e,n as t,r as n,t as r}from"./digest-311IQaur.mjs";import"./src-GI5wB-mz.mjs";import{n as i,t as a}from"./hash-files-BMmt9LzB.mjs";import{t as o}from"./murmurhash-CoNWpOwZ.mjs";import{n as s,r as c,t as l}from"./xx-hash-SyVhkkcA.mjs";export{r as Hasher,t as createHasher,n as digest,e as hash,a as hashDirectory,i as hashFiles,o as murmurhash,l as xxHash128,s as xxHash32,c as xxHash64};
@@ -0,0 +1,2 @@
1
+ typeof Buffer<`u`&&Buffer.isBuffer.bind(Buffer),(e=>(typeof globalThis==`object`||Object.defineProperty(e,`typeDetectGlobalObject`,{get(){return this},configurable:!0}),globalThis))(Object.prototype);const e=e=>{try{return typeof e==`string`}catch{return!1}};export{e as t};
2
+ //# sourceMappingURL=src-GI5wB-mz.mjs.map