@requence/task 1.0.0-alpha.11 → 1.0.0-alpha.13

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 (45) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/build/chunk-4r30g3ha.js +38 -0
  3. package/build/chunk-4r30g3ha.js.map +10 -0
  4. package/build/cli.js +1 -1
  5. package/build/index.js +378 -154
  6. package/build/index.js.map +11 -7
  7. package/build/types/helpers/src/files/mapOutput.d.ts +4 -1
  8. package/build/types/helpers/src/files/mapOutput.d.ts.map +1 -1
  9. package/build/types/helpers/src/index.d.ts +8 -6
  10. package/build/types/helpers/src/index.d.ts.map +1 -1
  11. package/build/types/helpers/src/protocol/update.d.ts +8 -8
  12. package/build/types/helpers/src/utils/callbackToAsyncIterator.d.ts +3 -0
  13. package/build/types/helpers/src/utils/callbackToAsyncIterator.d.ts.map +1 -0
  14. package/build/types/helpers/src/utils/clone.d.ts +3 -0
  15. package/build/types/helpers/src/utils/clone.d.ts.map +1 -0
  16. package/build/types/helpers/src/utils/createObjectProxy.d.ts +2 -0
  17. package/build/types/helpers/src/utils/createObjectProxy.d.ts.map +1 -0
  18. package/build/types/helpers/src/{createRemotePromise.d.ts → utils/createRemotePromise.d.ts} +1 -1
  19. package/build/types/helpers/src/utils/createRemotePromise.d.ts.map +1 -0
  20. package/build/types/helpers/src/utils/isRecord.d.ts +2 -0
  21. package/build/types/helpers/src/utils/isRecord.d.ts.map +1 -0
  22. package/build/types/helpers/src/{utils.d.ts → utils/mapData.d.ts} +1 -5
  23. package/build/types/helpers/src/utils/mapData.d.ts.map +1 -0
  24. package/build/types/helpers/src/utils/matchSchema.d.ts +4 -0
  25. package/build/types/helpers/src/utils/matchSchema.d.ts.map +1 -0
  26. package/build/types/helpers/src/utils/obfuscate.d.ts.map +1 -0
  27. package/build/types/task/src/createTask.d.ts +3 -97
  28. package/build/types/task/src/createTask.d.ts.map +1 -1
  29. package/build/types/task/src/types.d.ts +24 -17
  30. package/build/types/task/src/types.d.ts.map +1 -1
  31. package/build/types/task/src/watchTasks.d.ts +2 -97
  32. package/build/types/task/src/watchTasks.d.ts.map +1 -1
  33. package/package.json +3 -3
  34. package/build/chunk-ajdmm777.js +0 -125
  35. package/build/chunk-ajdmm777.js.map +0 -12
  36. package/build/types/helpers/src/clone.d.ts +0 -3
  37. package/build/types/helpers/src/clone.d.ts.map +0 -1
  38. package/build/types/helpers/src/createObjectProxy.d.ts +0 -2
  39. package/build/types/helpers/src/createObjectProxy.d.ts.map +0 -1
  40. package/build/types/helpers/src/createRemotePromise.d.ts.map +0 -1
  41. package/build/types/helpers/src/obfuscate.d.ts.map +0 -1
  42. package/build/types/helpers/src/utils.d.ts.map +0 -1
  43. package/build/types/task/src/utils/callbackToAsyncIterator.d.ts +0 -5
  44. package/build/types/task/src/utils/callbackToAsyncIterator.d.ts.map +0 -1
  45. /package/build/types/helpers/src/{obfuscate.d.ts → utils/obfuscate.d.ts} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @requence/task
2
2
 
3
+ ## 1.0.0-alpha.13
4
+
5
+ ### Patch Changes
6
+
7
+ - dc413ab: deps update
8
+
9
+ ## 1.0.0-alpha.12
10
+
11
+ ### Patch Changes
12
+
13
+ - 77bc2ed: improved task creation and event order
14
+
3
15
  ## 1.0.0-alpha.11
4
16
 
5
17
  ### Patch Changes
@@ -0,0 +1,38 @@
1
+ import { createRequire } from "node:module";
2
+ var __require = /* @__PURE__ */ createRequire(import.meta.url);
3
+
4
+ // ../helpers/src/utils/obfuscate.ts
5
+ var separator = "";
6
+ var base65Chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$";
7
+ var base65CharToIndex = {};
8
+ for (let i = 0;i < base65Chars.length; i++) {
9
+ base65CharToIndex[base65Chars[i]] = i;
10
+ }
11
+ function deobfuscate(str) {
12
+ const paddingCount = parseInt(str.slice(-1), 10);
13
+ str = str.slice(0, -1);
14
+ let binaryString = "";
15
+ for (let i = 0;i < str.length; i++) {
16
+ const decimalValue = base65CharToIndex[str[i]];
17
+ const binaryChunk = decimalValue.toString(2).padStart(6, "0");
18
+ binaryString += binaryChunk;
19
+ }
20
+ if (paddingCount > 0) {
21
+ binaryString = binaryString.slice(0, -paddingCount);
22
+ }
23
+ let decodedString = "";
24
+ const charSize = 16;
25
+ for (let i = 0;i < binaryString.length; i += charSize) {
26
+ const byte = binaryString.substring(i, i + charSize);
27
+ if (byte.length === 16) {
28
+ const charCode = parseInt(byte, 2);
29
+ decodedString += String.fromCharCode(charCode);
30
+ }
31
+ }
32
+ return decodedString.split(separator);
33
+ }
34
+
35
+ export { __require, deobfuscate };
36
+
37
+ //# debugId=8688A1F5E25724A064756E2164756E21
38
+ //# sourceMappingURL=chunk-4r30g3ha.js.map
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../helpers/src/utils/obfuscate.ts"],
4
+ "sourcesContent": [
5
+ "const separator = '\\u{f6ee}'\n\nconst base65Chars =\n 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$'\n\nconst base65CharToIndex: Record<string, number> = {}\nfor (let i = 0; i < base65Chars.length; i++) {\n base65CharToIndex[base65Chars[i]] = i\n}\n\nexport function obfuscate(...parts: Array<string>) {\n const str = parts.join(separator)\n let binaryString = ''\n\n for (let i = 0; i < str.length; i++) {\n const charCode = str.charCodeAt(i)\n binaryString += charCode.toString(2).padStart(16, '0')\n }\n\n let encodedString = ''\n const chunkSize = 6\n let paddingCount = 0\n\n for (let i = 0; i < binaryString.length; i += chunkSize) {\n let chunk = binaryString.substring(i, i + chunkSize)\n\n if (chunk.length < chunkSize) {\n paddingCount = chunkSize - chunk.length\n chunk = chunk.padEnd(chunkSize, '0')\n }\n\n const decimalValue = parseInt(chunk, 2)\n encodedString += base65Chars[decimalValue]\n }\n\n return encodedString + paddingCount.toString()\n}\n\nexport function randomString(length: number) {\n const randomValues = new Uint8Array(length)\n crypto.getRandomValues(randomValues)\n\n let randomString = ''\n for (let i = 0; i < length; i++) {\n randomString += base65Chars[randomValues[i] % base65Chars.length]\n }\n\n return randomString\n}\n\nexport function deobfuscate(str: string) {\n const paddingCount = parseInt(str.slice(-1), 10)\n str = str.slice(0, -1)\n\n let binaryString = ''\n\n for (let i = 0; i < str.length; i++) {\n const decimalValue = base65CharToIndex[str[i]]\n const binaryChunk = decimalValue.toString(2).padStart(6, '0')\n binaryString += binaryChunk\n }\n\n if (paddingCount > 0) {\n binaryString = binaryString.slice(0, -paddingCount)\n }\n\n let decodedString = ''\n const charSize = 16\n\n for (let i = 0; i < binaryString.length; i += charSize) {\n const byte = binaryString.substring(i, i + charSize)\n if (byte.length === 16) {\n const charCode = parseInt(byte, 2)\n decodedString += String.fromCharCode(charCode)\n }\n }\n\n return decodedString.split(separator)\n}\n"
6
+ ],
7
+ "mappings": ";;;;AAAA,IAAM,YAAY;AAElB,IAAM,cACJ;AAEF,IAAM,oBAA4C,CAAC;AACnD,SAAS,IAAI,EAAG,IAAI,YAAY,QAAQ,KAAK;AAAA,EAC3C,kBAAkB,YAAY,MAAM;AACtC;AA0CO,SAAS,WAAW,CAAC,KAAa;AAAA,EACvC,MAAM,eAAe,SAAS,IAAI,MAAM,EAAE,GAAG,EAAE;AAAA,EAC/C,MAAM,IAAI,MAAM,GAAG,EAAE;AAAA,EAErB,IAAI,eAAe;AAAA,EAEnB,SAAS,IAAI,EAAG,IAAI,IAAI,QAAQ,KAAK;AAAA,IACnC,MAAM,eAAe,kBAAkB,IAAI;AAAA,IAC3C,MAAM,cAAc,aAAa,SAAS,CAAC,EAAE,SAAS,GAAG,GAAG;AAAA,IAC5D,gBAAgB;AAAA,EAClB;AAAA,EAEA,IAAI,eAAe,GAAG;AAAA,IACpB,eAAe,aAAa,MAAM,IAAI,YAAY;AAAA,EACpD;AAAA,EAEA,IAAI,gBAAgB;AAAA,EACpB,MAAM,WAAW;AAAA,EAEjB,SAAS,IAAI,EAAG,IAAI,aAAa,QAAQ,KAAK,UAAU;AAAA,IACtD,MAAM,OAAO,aAAa,UAAU,GAAG,IAAI,QAAQ;AAAA,IACnD,IAAI,KAAK,WAAW,IAAI;AAAA,MACtB,MAAM,WAAW,SAAS,MAAM,CAAC;AAAA,MACjC,iBAAiB,OAAO,aAAa,QAAQ;AAAA,IAC/C;AAAA,EACF;AAAA,EAEA,OAAO,cAAc,MAAM,SAAS;AAAA;",
8
+ "debugId": "8688A1F5E25724A064756E2164756E21",
9
+ "names": []
10
+ }
package/build/cli.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  __require,
4
4
  deobfuscate
5
- } from "./chunk-ajdmm777.js";
5
+ } from "./chunk-4r30g3ha.js";
6
6
 
7
7
  // src/cli.ts
8
8
  import fs from "node:fs";