@halospv3/hce.shared-config 3.0.0-develop.2 → 3.0.0-develop.21

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 (188) hide show
  1. package/CHANGELOG.md +164 -0
  2. package/dotnet/.github/workflows/_unit_test.yml +0 -3
  3. package/dotnet/.github/workflows/dotnet-release.yml +0 -3
  4. package/dotnet/.github/workflows/sample-dotnet-build.yml +0 -3
  5. package/dotnet/PublishAll.targets +3 -2
  6. package/dotnet/ZipPublishDir.targets +24 -29
  7. package/mjs/CaseInsensitiveMap.d.ts +12 -0
  8. package/mjs/CaseInsensitiveMap.d.ts.map +1 -0
  9. package/mjs/CaseInsensitiveMap.mjs +33 -0
  10. package/mjs/CaseInsensitiveMap.mjs.map +1 -0
  11. package/mjs/commitlintConfig.d.ts +12 -0
  12. package/mjs/commitlintConfig.d.ts.map +1 -0
  13. package/mjs/commitlintConfig.mjs +13 -0
  14. package/mjs/commitlintConfig.mjs.map +1 -0
  15. package/mjs/debug.d.ts +6 -0
  16. package/mjs/debug.d.ts.map +1 -0
  17. package/mjs/debug.mjs +9 -0
  18. package/mjs/debug.mjs.map +1 -0
  19. package/mjs/dotnet/GithubNugetRegistryInfo.d.ts +38 -0
  20. package/mjs/dotnet/GithubNugetRegistryInfo.d.ts.map +1 -0
  21. package/mjs/dotnet/GithubNugetRegistryInfo.mjs +43 -0
  22. package/mjs/dotnet/GithubNugetRegistryInfo.mjs.map +1 -0
  23. package/mjs/dotnet/GitlabNugetRegistryInfo.d.ts +62 -0
  24. package/mjs/dotnet/GitlabNugetRegistryInfo.d.ts.map +1 -0
  25. package/mjs/dotnet/GitlabNugetRegistryInfo.mjs +99 -0
  26. package/mjs/dotnet/GitlabNugetRegistryInfo.mjs.map +1 -0
  27. package/mjs/dotnet/IsNextVersionAlreadyPublished.cli.d.ts +2 -0
  28. package/mjs/dotnet/IsNextVersionAlreadyPublished.cli.d.ts.map +1 -0
  29. package/mjs/dotnet/IsNextVersionAlreadyPublished.cli.mjs +41 -0
  30. package/mjs/dotnet/IsNextVersionAlreadyPublished.cli.mjs.map +1 -0
  31. package/mjs/dotnet/MSBuildProject.d.ts +256 -0
  32. package/mjs/dotnet/MSBuildProject.d.ts.map +1 -0
  33. package/mjs/dotnet/MSBuildProject.mjs +447 -0
  34. package/mjs/dotnet/MSBuildProject.mjs.map +1 -0
  35. package/mjs/dotnet/MSBuildProjectProperties.d.ts +170 -0
  36. package/mjs/dotnet/MSBuildProjectProperties.d.ts.map +1 -0
  37. package/mjs/dotnet/MSBuildProjectProperties.mjs +260 -0
  38. package/mjs/dotnet/MSBuildProjectProperties.mjs.map +1 -0
  39. package/mjs/dotnet/NugetProjectProperties.d.ts +379 -0
  40. package/mjs/dotnet/NugetProjectProperties.d.ts.map +1 -0
  41. package/mjs/dotnet/NugetProjectProperties.mjs +577 -0
  42. package/mjs/dotnet/NugetProjectProperties.mjs.map +1 -0
  43. package/mjs/dotnet/NugetRegistryInfo.d.ts +384 -0
  44. package/mjs/dotnet/NugetRegistryInfo.d.ts.map +1 -0
  45. package/mjs/dotnet/NugetRegistryInfo.mjs +752 -0
  46. package/mjs/dotnet/NugetRegistryInfo.mjs.map +1 -0
  47. package/mjs/dotnet/helpers.d.ts +63 -0
  48. package/mjs/dotnet/helpers.d.ts.map +1 -0
  49. package/mjs/dotnet/helpers.mjs +354 -0
  50. package/mjs/dotnet/helpers.mjs.map +1 -0
  51. package/mjs/dotnet/index.d.ts +9 -0
  52. package/mjs/dotnet/index.d.ts.map +1 -0
  53. package/mjs/dotnet/index.mjs +9 -0
  54. package/mjs/dotnet/index.mjs.map +1 -0
  55. package/mjs/dotnet.d.ts +2 -0
  56. package/mjs/dotnet.d.ts.map +1 -0
  57. package/mjs/dotnet.mjs +9 -0
  58. package/mjs/dotnet.mjs.map +1 -0
  59. package/mjs/eslintConfig.d.ts +4 -0
  60. package/mjs/eslintConfig.d.ts.map +1 -0
  61. package/mjs/eslintConfig.mjs +98 -0
  62. package/mjs/eslintConfig.mjs.map +1 -0
  63. package/mjs/index.d.ts +3 -0
  64. package/mjs/index.d.ts.map +1 -0
  65. package/mjs/index.mjs +4 -0
  66. package/mjs/index.mjs.map +1 -0
  67. package/mjs/insertPlugins.d.ts +18 -0
  68. package/mjs/insertPlugins.d.ts.map +1 -0
  69. package/mjs/insertPlugins.mjs +73 -0
  70. package/mjs/insertPlugins.mjs.map +1 -0
  71. package/mjs/semantic-release__commit-analyzer.d.mjs +2 -0
  72. package/mjs/semantic-release__commit-analyzer.d.mjs.map +1 -0
  73. package/mjs/semantic-release__exec.d.mjs +2 -0
  74. package/mjs/semantic-release__exec.d.mjs.map +1 -0
  75. package/mjs/semantic-release__git.d.mjs +2 -0
  76. package/mjs/semantic-release__git.d.mjs.map +1 -0
  77. package/mjs/semantic-release__github.d.mjs +2 -0
  78. package/mjs/semantic-release__github.d.mjs.map +1 -0
  79. package/mjs/semanticReleaseConfig.d.ts +97 -0
  80. package/mjs/semanticReleaseConfig.d.ts.map +1 -0
  81. package/mjs/semanticReleaseConfig.mjs +63 -0
  82. package/mjs/semanticReleaseConfig.mjs.map +1 -0
  83. package/mjs/semanticReleaseConfigDotnet.d.ts +109 -0
  84. package/mjs/semanticReleaseConfigDotnet.d.ts.map +1 -0
  85. package/mjs/semanticReleaseConfigDotnet.mjs +268 -0
  86. package/mjs/semanticReleaseConfigDotnet.mjs.map +1 -0
  87. package/mjs/setupGitPluginSpec.d.ts +22 -0
  88. package/mjs/setupGitPluginSpec.d.ts.map +1 -0
  89. package/mjs/setupGitPluginSpec.mjs +144 -0
  90. package/mjs/setupGitPluginSpec.mjs.map +1 -0
  91. package/mjs/utils/Exact.d.ts +20 -0
  92. package/mjs/utils/Exact.d.ts.map +1 -0
  93. package/mjs/utils/Exact.mjs +75 -0
  94. package/mjs/utils/Exact.mjs.map +1 -0
  95. package/mjs/utils/GracefulRecursion.d.mjs +2 -0
  96. package/mjs/utils/GracefulRecursion.d.mjs.map +1 -0
  97. package/mjs/utils/env.d.ts +24 -0
  98. package/mjs/utils/env.d.ts.map +1 -0
  99. package/mjs/utils/env.mjs +39 -0
  100. package/mjs/utils/env.mjs.map +1 -0
  101. package/mjs/utils/execAsync.d.ts +37 -0
  102. package/mjs/utils/execAsync.d.ts.map +1 -0
  103. package/mjs/utils/execAsync.mjs +59 -0
  104. package/mjs/utils/execAsync.mjs.map +1 -0
  105. package/mjs/utils/miscTypes.d.ts +13 -0
  106. package/mjs/utils/miscTypes.d.ts.map +1 -0
  107. package/mjs/utils/miscTypes.mjs +10 -0
  108. package/mjs/utils/miscTypes.mjs.map +1 -0
  109. package/mjs/utils/reflection/FunctionLike.d.mjs +2 -0
  110. package/mjs/utils/reflection/FunctionLike.d.mjs.map +1 -0
  111. package/mjs/utils/reflection/GetterDescriptor.d.mjs +2 -0
  112. package/mjs/utils/reflection/GetterDescriptor.d.mjs.map +1 -0
  113. package/mjs/utils/reflection/InstancePropertyDescriptorMap.d.mjs +2 -0
  114. package/mjs/utils/reflection/InstancePropertyDescriptorMap.d.mjs.map +1 -0
  115. package/mjs/utils/reflection/InstanceTypeOrSelfPropertyDescriptorMap.d.mjs +2 -0
  116. package/mjs/utils/reflection/InstanceTypeOrSelfPropertyDescriptorMap.d.mjs.map +1 -0
  117. package/mjs/utils/reflection/OwnGetterDescriptorMap.d.mjs +2 -0
  118. package/mjs/utils/reflection/OwnGetterDescriptorMap.d.mjs.map +1 -0
  119. package/mjs/utils/reflection/OwnKeyOf.d.mjs +2 -0
  120. package/mjs/utils/reflection/OwnKeyOf.d.mjs.map +1 -0
  121. package/mjs/utils/reflection/OwnPropertyDescriptorMap.d.mjs +2 -0
  122. package/mjs/utils/reflection/OwnPropertyDescriptorMap.d.mjs.map +1 -0
  123. package/mjs/utils/reflection/PropertyDescriptorMap.d.mjs +2 -0
  124. package/mjs/utils/reflection/PropertyDescriptorMap.d.mjs.map +1 -0
  125. package/mjs/utils/reflection/filterForGetters.d.ts +7 -0
  126. package/mjs/utils/reflection/filterForGetters.d.ts.map +1 -0
  127. package/mjs/utils/reflection/filterForGetters.mjs +27 -0
  128. package/mjs/utils/reflection/filterForGetters.mjs.map +1 -0
  129. package/mjs/utils/reflection/getOwnPropertyDescriptors.d.ts +22 -0
  130. package/mjs/utils/reflection/getOwnPropertyDescriptors.d.ts.map +1 -0
  131. package/mjs/utils/reflection/getOwnPropertyDescriptors.mjs +34 -0
  132. package/mjs/utils/reflection/getOwnPropertyDescriptors.mjs.map +1 -0
  133. package/mjs/utils/reflection/getOwnPropertyDescriptorsRecursively.d.ts +56 -0
  134. package/mjs/utils/reflection/getOwnPropertyDescriptorsRecursively.d.ts.map +1 -0
  135. package/mjs/utils/reflection/getOwnPropertyDescriptorsRecursively.mjs +72 -0
  136. package/mjs/utils/reflection/getOwnPropertyDescriptorsRecursively.mjs.map +1 -0
  137. package/mjs/utils/reflection/getPrototypeChainOf.d.ts +16 -0
  138. package/mjs/utils/reflection/getPrototypeChainOf.d.ts.map +1 -0
  139. package/mjs/utils/reflection/getPrototypeChainOf.mjs +55 -0
  140. package/mjs/utils/reflection/getPrototypeChainOf.mjs.map +1 -0
  141. package/mjs/utils/reflection/getPrototypeOf.d.ts +8 -0
  142. package/mjs/utils/reflection/getPrototypeOf.d.ts.map +1 -0
  143. package/mjs/utils/reflection/getPrototypeOf.mjs +10 -0
  144. package/mjs/utils/reflection/getPrototypeOf.mjs.map +1 -0
  145. package/mjs/utils/reflection/inheritance.d.ts +180 -0
  146. package/mjs/utils/reflection/inheritance.d.ts.map +1 -0
  147. package/mjs/utils/reflection/inheritance.mjs +148 -0
  148. package/mjs/utils/reflection/inheritance.mjs.map +1 -0
  149. package/mjs/utils/reflection/isConstructor.d.ts +17 -0
  150. package/mjs/utils/reflection/isConstructor.d.ts.map +1 -0
  151. package/mjs/utils/reflection/isConstructor.mjs +63 -0
  152. package/mjs/utils/reflection/isConstructor.mjs.map +1 -0
  153. package/mjs/utils/reflection/isGetterDescriptor.d.ts +9 -0
  154. package/mjs/utils/reflection/isGetterDescriptor.d.ts.map +1 -0
  155. package/mjs/utils/reflection/isGetterDescriptor.mjs +12 -0
  156. package/mjs/utils/reflection/isGetterDescriptor.mjs.map +1 -0
  157. package/mjs/utils/reflection/listOwnGetters.d.ts +26 -0
  158. package/mjs/utils/reflection/listOwnGetters.d.ts.map +1 -0
  159. package/mjs/utils/reflection/listOwnGetters.mjs +39 -0
  160. package/mjs/utils/reflection/listOwnGetters.mjs.map +1 -0
  161. package/mjs/utils/reflection.d.ts +18 -0
  162. package/mjs/utils/reflection.d.ts.map +1 -0
  163. package/mjs/utils/reflection.mjs +10 -0
  164. package/mjs/utils/reflection.mjs.map +1 -0
  165. package/package.json +17 -17
  166. package/src/debug.ts +5 -4
  167. package/src/dotnet/GithubNugetRegistryInfo.ts +17 -9
  168. package/src/dotnet/GitlabNugetRegistryInfo.ts +19 -5
  169. package/src/dotnet/IsNextVersionAlreadyPublished.cli.ts +53 -36
  170. package/src/dotnet/MSBuildProject.ts +150 -5
  171. package/src/dotnet/MSBuildProjectProperties.ts +2 -1
  172. package/src/dotnet/NugetProjectProperties.ts +3 -2
  173. package/src/dotnet/NugetRegistryInfo.ts +94 -8
  174. package/src/dotnet/helpers.ts +87 -53
  175. package/src/dotnet/index.ts +8 -0
  176. package/src/dotnet.ts +1 -0
  177. package/src/insertPlugins.ts +116 -0
  178. package/src/semantic-release__exec.d.ts +1 -1
  179. package/src/semanticReleaseConfig.ts +8 -3
  180. package/src/semanticReleaseConfigDotnet.ts +90 -88
  181. package/src/setupGitPluginSpec.ts +4 -1
  182. package/src/tsconfig.json +1 -1
  183. package/src/utils/execAsync.ts +13 -1
  184. package/src/utils/miscTypes.ts +4 -3
  185. package/src/utils/reflection/inheritance.ts +1 -1
  186. package/tsconfig.base.json +54 -0
  187. package/tsconfig.json +22 -0
  188. package/tsconfig.mjs.json +8 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"env.mjs","sources":["../../src/utils/env.ts"],"sourcesContent":null,"names":["loadDotenv"],"mappings":";;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,MAAM,CAAC,aAAa,EAAE,SAAS,EAAE;AACjD,EAAEA,MAAU,CAAC,aAAa,CAAC;AAC3B,EAAE,IAAI,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,SAAS,CAAC;AAC9C,EAAE,OAAO,GAAG;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,cAAc,CAAC,MAAM,EAAE,OAAO,EAAE;AAChD,EAAE,OAAO,KAAK;AACd,IAAI,MAAM,EAAE,CAAC,aAAa,EAAE,kBAAkB;AAC9C,GAAG;AACH,EAAE,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE;AAClE;AACA,EAAE,OAAO,KAAK,KAAK,EAAE,IAAI,KAAK,KAAK,WAAW,GAAG,SAAS,GAAG,KAAK;AAClE;;;;"}
@@ -0,0 +1,37 @@
1
+ import type { ObjectType } from 'arktype/internal/methods/object.ts';
2
+ /**
3
+ * A `promisify(exec)` wrapper to optionally assign the child process's STDERR as the {@link Error.prototype.cause}.
4
+ * @see {@link promisify}, {@link exec}
5
+ * @param command The command to run, with space-separated arguments.
6
+ * @param [setStderrAsCause=false] If true and the child process's stderr is available, the thrown Error's {@link Error.prototype.cause} is assigned the stderr string.
7
+ * @returns A promise of the child process's STDOUT and STDERR streams as strings
8
+ * @throws {Error | ChildProcessSpawnException}
9
+ */
10
+ export declare function execAsync(command: string, setStderrAsCause?: boolean): Promise<{
11
+ stdout: string;
12
+ stderr: string;
13
+ }>;
14
+ declare const T_ExecException: ObjectType<{
15
+ name: string;
16
+ message: string;
17
+ stack?: string | undefined;
18
+ cause?: unknown;
19
+ cmd?: string | null | undefined;
20
+ killed?: boolean | null | undefined;
21
+ code?: number | null | undefined;
22
+ signal?: 'SIGABRT' | 'SIGALRM' | 'SIGBUS' | 'SIGCHLD' | 'SIGCONT' | 'SIGFPE' | 'SIGHUP' | 'SIGILL' | 'SIGINT' | 'SIGIO' | 'SIGIOT' | 'SIGKILL' | 'SIGPIPE' | 'SIGPOLL' | 'SIGPROF' | 'SIGPWR' | 'SIGQUIT' | 'SIGSEGV' | 'SIGSTKFLT' | 'SIGSTOP' | 'SIGSYS' | 'SIGTERM' | 'SIGTRAP' | 'SIGTSTP' | 'SIGTTIN' | 'SIGTTOU' | 'SIGUNUSED' | 'SIGURG' | 'SIGUSR1' | 'SIGUSR2' | 'SIGVTALRM' | 'SIGWINCH' | 'SIGXCPU' | 'SIGXFSZ' | 'SIGBREAK' | 'SIGLOST' | 'SIGINFO' | null | undefined;
23
+ stdout?: string | undefined;
24
+ stderr?: string | undefined;
25
+ }>;
26
+ type _ExecException = typeof T_ExecException.inferOut;
27
+ export declare class ChildProcessSpawnException extends Error implements _ExecException {
28
+ constructor(message: Parameters<typeof Error>[0], options: typeof T_ExecException.inferIn);
29
+ cmd: typeof T_ExecException.inferOut.cmd;
30
+ code: typeof T_ExecException.inferOut.code;
31
+ killed: typeof T_ExecException.inferOut.killed;
32
+ signal: typeof T_ExecException.inferOut.signal;
33
+ stderr: typeof T_ExecException.inferOut.stderr;
34
+ stdout: typeof T_ExecException.inferOut.stdout;
35
+ }
36
+ export {};
37
+ //# sourceMappingURL=execAsync.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"execAsync.d.ts","sourceRoot":"","sources":["../../src/utils/execAsync.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAMrE;;;;;;;GAOG;AACH,wBAAsB,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,gBAAgB,UAAQ,GAAG,OAAO,CAAC;IAClF,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC,CAqBD;AAED,QAAA,MAAM,eAAe,EAAE,UAAU,CAAC;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAChC,MAAM,CAAC,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC;IACpC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACjC,MAAM,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,UAAU,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,GAAG,SAAS,GAAG,IAAI,GAAG,SAAS,CAAC;IACnd,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7B,CAUC,CAAC;AAEH,KAAK,cAAc,GAAG,OAAO,eAAe,CAAC,QAAQ,CAAC;AAEtD,qBAAa,0BAA2B,SAAQ,KAAM,YAAW,cAAc;gBAE3E,OAAO,EAAE,UAAU,CAAC,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,EACpC,OAAO,EAAE,OAAO,eAAe,CAAC,OAAO;IAYzC,GAAG,EAAE,OAAO,eAAe,CAAC,QAAQ,CAAC,GAAG,CAAC;IACzC,IAAI,EAAE,OAAO,eAAe,CAAC,QAAQ,CAAC,IAAI,CAAC;IAC3C,MAAM,EAAE,OAAO,eAAe,CAAC,QAAQ,CAAC,MAAM,CAAC;IAC/C,MAAM,EAAE,OAAO,eAAe,CAAC,QAAQ,CAAC,MAAM,CAAC;IAC/C,MAAM,EAAE,OAAO,eAAe,CAAC,QAAQ,CAAC,MAAM,CAAC;IAC/C,MAAM,EAAE,OAAO,eAAe,CAAC,QAAQ,CAAC,MAAM,CAAC;CAChD"}
@@ -0,0 +1,59 @@
1
+ import { type } from 'arktype';
2
+ import { exec } from 'node:child_process';
3
+ import { constants } from 'node:os';
4
+ import { promisify } from 'node:util';
5
+ import { isNativeError } from 'node:util/types';
6
+
7
+ /* eslint-disable jsdoc/no-defaults */
8
+
9
+ /**
10
+ * A `promisify(exec)` wrapper to optionally assign the child process's STDERR as the {@link Error.prototype.cause}.
11
+ * @see {@link promisify}, {@link exec}
12
+ * @param command The command to run, with space-separated arguments.
13
+ * @param [setStderrAsCause=false] If true and the child process's stderr is available, the thrown Error's {@link Error.prototype.cause} is assigned the stderr string.
14
+ * @returns A promise of the child process's STDOUT and STDERR streams as strings
15
+ * @throws {Error | ChildProcessSpawnException}
16
+ */
17
+ async function execAsync(command, setStderrAsCause = false) {
18
+ return await promisify(exec)(command).catch(error => {
19
+ if (!isNativeError(error)) throw new Error(JSON.stringify(error));
20
+ if (setStderrAsCause && 'stderr' in error && typeof error.stderr === 'string' && error.stderr !== '') error.cause ??= error.stderr;
21
+ if ('stdout' in error && typeof error.stdout === 'string') {
22
+ error.message += '\nSTDOUT:\n' + ` ${error.stdout.replaceAll('\n', '\n ')}`;
23
+ }
24
+ if ('stderr' in error && typeof error.stderr === 'string') {
25
+ error.message += '\nSTDERR:\n' + ` ${error.stderr.replaceAll('\n', '\n ')}`;
26
+ }
27
+ throw new ChildProcessSpawnException(error.message, error);
28
+ });
29
+ }
30
+ const T_ExecException = type('Error').and({
31
+ 'cmd?': 'string | null',
32
+ 'killed?': 'boolean | null',
33
+ 'code?': 'number | null',
34
+ 'signal?': type.null.or(Object.keys(constants.signals).map(v => type(`'${v}'`))
35
+ // eslint-disable-next-line unicorn/no-array-reduce
36
+ .reduce((previous, current) => previous.or(current))),
37
+ 'stdout?': 'string',
38
+ 'stderr?': 'string'
39
+ });
40
+ class ChildProcessSpawnException extends Error {
41
+ constructor(message, options) {
42
+ options = T_ExecException.from(options);
43
+ super(message, options);
44
+ this.cmd = options.cmd;
45
+ this.code = options.code;
46
+ this.killed = options.killed;
47
+ this.signal = options.signal;
48
+ this.stderr = options.stderr;
49
+ this.stdout = options.stdout;
50
+ }
51
+ cmd;
52
+ code;
53
+ killed;
54
+ signal;
55
+ stderr;
56
+ stdout;
57
+ }
58
+ export { ChildProcessSpawnException, execAsync };
59
+ //# sourceMappingURL=execAsync.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"execAsync.mjs","sources":["../../src/utils/execAsync.ts"],"sourcesContent":null,"names":[],"mappings":";;;;;;AAAA;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,eAAe,SAAS,CAAC,OAAO,EAAE,gBAAgB,GAAG,KAAK,EAAE;AACnE,EAAE,OAAO,MAAM,SAAS,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,KAAK,IAAI;AACvD,IAAI,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,EAAE,MAAM,IAAI,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;AACrE,IAAI,IAAI,gBAAgB,IAAI,QAAQ,IAAI,KAAK,IAAI,OAAO,KAAK,CAAC,MAAM,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,KAAK,EAAE,EAAE,KAAK,CAAC,KAAK,KAAK,KAAK,CAAC,MAAM;AACtI,IAAI,IAAI,QAAQ,IAAI,KAAK,IAAI,OAAO,KAAK,CAAC,MAAM,KAAK,QAAQ,EAAE;AAC/D,MAAM,KAAK,CAAC,OAAO,IAAI,aAAa,GAAG,CAAC,EAAE,EAAE,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC;AACnF;AACA,IAAI,IAAI,QAAQ,IAAI,KAAK,IAAI,OAAO,KAAK,CAAC,MAAM,KAAK,QAAQ,EAAE;AAC/D,MAAM,KAAK,CAAC,OAAO,IAAI,aAAa,GAAG,CAAC,EAAE,EAAE,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC;AACnF;AACA,IAAI,MAAM,IAAI,0BAA0B,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC;AAC9D,GAAG,CAAC;AACJ;AACA,MAAM,eAAe,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC;AAC1C,EAAE,MAAM,EAAE,eAAe;AACzB,EAAE,SAAS,EAAE,gBAAgB;AAC7B,EAAE,OAAO,EAAE,eAAe;AAC1B,EAAE,SAAS,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AAChF;AACA,GAAG,MAAM,CAAC,CAAC,QAAQ,EAAE,OAAO,KAAK,QAAQ,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;AACvD,EAAE,SAAS,EAAE,QAAQ;AACrB,EAAE,SAAS,EAAE;AACb,CAAC,CAAC;AACK,MAAM,0BAA0B,SAAS,KAAK,CAAC;AACtD,EAAE,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE;AAChC,IAAI,OAAO,GAAG,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC;AAC3C,IAAI,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC;AAC3B,IAAI,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG;AAC1B,IAAI,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI;AAC5B,IAAI,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM;AAChC,IAAI,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM;AAChC,IAAI,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM;AAChC,IAAI,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM;AAChC;AACA,EAAE,GAAG;AACL,EAAE,IAAI;AACN,EAAE,MAAM;AACR,EAAE,MAAM;AACR,EAAE,MAAM;AACR,EAAE,MAAM;AACR;;;;"}
@@ -0,0 +1,13 @@
1
+ import { type Type } from 'arktype';
2
+ import type { StringType } from 'arktype/internal/methods/string.ts';
3
+ export declare const tBooleanString: StringType<'false' | 'true'>;
4
+ export type BooleanString = typeof tBooleanString.infer;
5
+ export declare const tEmptyOrBooleanString: Type<'' | 'false' | 'true'>;
6
+ export type EmptyOrBooleanString = typeof tEmptyOrBooleanString.infer;
7
+ export type Integer<N extends number> = `${N}` extends `${number}.${number}` ? never : N;
8
+ /**
9
+ * @see https://stackoverflow.com/a/73920140/14894786
10
+ */
11
+ export type TupleIndices<T extends readonly unknown[]> = Extract<keyof T, `${number}`> extends `${infer N extends number}` ? N : never;
12
+ export type InstanceOrStatic = 'Instance' | 'Static';
13
+ //# sourceMappingURL=miscTypes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"miscTypes.d.ts","sourceRoot":"","sources":["../../src/utils/miscTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,IAAI,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAErE,eAAO,MAAM,cAAc,EAAE,UAAU,CAAC,OAAO,GAAG,MAAM,CAA4B,CAAC;AACrF,MAAM,MAAM,aAAa,GAAG,OAAO,cAAc,CAAC,KAAK,CAAC;AAExD,eAAO,MAAM,qBAAqB,EAAE,IAAI,CAAC,EAAE,GAAG,OAAO,GAAG,MAAM,CAAiC,CAAC;AAChG,MAAM,MAAM,oBAAoB,GAAG,OAAO,qBAAqB,CAAC,KAAK,CAAC;AAEtE,MAAM,MAAM,OAAO,CAAC,CAAC,SAAS,MAAM,IAAI,GAAG,CAAC,EAAE,SAAS,GAAG,MAAM,IAAI,MAAM,EAAE,GAAG,KAAK,GAAG,CAAC,CAAC;AAEzF;;GAEG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,IACjD,OAAO,CAAC,MAAM,CAAC,EAAE,GAAG,MAAM,EAAE,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,MAAM,EAAE,GAAG,CAAC,GAAG,KAAK,CAAC;AAElF,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,QAAQ,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { type } from 'arktype';
2
+ const tBooleanString = type('"true" | "false"');
3
+ const tEmptyOrBooleanString = type(tBooleanString.or('""'));
4
+
5
+ /**
6
+ * @see https://stackoverflow.com/a/73920140/14894786
7
+ */
8
+
9
+ export { tBooleanString, tEmptyOrBooleanString };
10
+ //# sourceMappingURL=miscTypes.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"miscTypes.mjs","sources":["../../src/utils/miscTypes.ts"],"sourcesContent":null,"names":[],"mappings":";;AACY,MAAC,cAAc,GAAG,IAAI,CAAC,kBAAkB;AACzC,MAAC,qBAAqB,GAAG,IAAI,CAAC,cAAc,CAAC,EAAE,CAAC,IAAI,CAAC;;AAEjE;AACA;AACA;;;;"}
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=FunctionLike.d.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FunctionLike.d.mjs","sources":[],"sourcesContent":null,"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=GetterDescriptor.d.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GetterDescriptor.d.mjs","sources":[],"sourcesContent":null,"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=InstancePropertyDescriptorMap.d.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InstancePropertyDescriptorMap.d.mjs","sources":[],"sourcesContent":null,"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=InstanceTypeOrSelfPropertyDescriptorMap.d.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InstanceTypeOrSelfPropertyDescriptorMap.d.mjs","sources":[],"sourcesContent":null,"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=OwnGetterDescriptorMap.d.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OwnGetterDescriptorMap.d.mjs","sources":[],"sourcesContent":null,"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=OwnKeyOf.d.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OwnKeyOf.d.mjs","sources":[],"sourcesContent":null,"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=OwnPropertyDescriptorMap.d.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OwnPropertyDescriptorMap.d.mjs","sources":[],"sourcesContent":null,"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=PropertyDescriptorMap.d.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PropertyDescriptorMap.d.mjs","sources":[],"sourcesContent":null,"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ import type { BaseClassProto, baseClassProto, ClassLike, ConstructorConstraint, InstanceTypeOrSelf, SuperClassLike, WithProto } from './inheritance.js';
2
+ import type { InstancePropertyDescriptorMap } from './InstancePropertyDescriptorMap.js';
3
+ import type { OwnGetterDescriptorMap } from './OwnGetterDescriptorMap.js';
4
+ import type { OwnPropertyDescriptorMap } from './OwnPropertyDescriptorMap.js';
5
+ export declare function filterForGetters<Class extends ClassLike<ConstructorConstraint<Class> & WithProto<SuperClassLike | typeof baseClassProto>>>(descriptorMap: InstancePropertyDescriptorMap<Class>): Partial<OwnGetterDescriptorMap<InstanceType<Class>, Class['__proto__'] extends BaseClassProto ? null : InstanceTypeOrSelf<Class['__proto__']>>>;
6
+ export declare function filterForGetters<Class extends ClassLike<ConstructorConstraint<Class> & WithProto<SuperClassLike | BaseClassProto>>>(descriptorMap: OwnPropertyDescriptorMap<Class>): Partial<OwnGetterDescriptorMap<Class, Class['__proto__']>>;
7
+ //# sourceMappingURL=filterForGetters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filterForGetters.d.ts","sourceRoot":"","sources":["../../../src/utils/reflection/filterForGetters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,cAAc,EACd,SAAS,EACT,qBAAqB,EACrB,kBAAkB,EAClB,cAAc,EACd,SAAS,EACV,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AACxF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAC1E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAG9E,wBAAgB,gBAAgB,CAC9B,KAAK,SAAS,SAAS,CAAC,qBAAqB,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC,cAAc,GAAG,OAAO,cAAc,CAAC,CAAC,EAEzG,aAAa,EAAE,6BAA6B,CAAC,KAAK,CAAC,GAClD,OAAO,CAAC,sBAAsB,CAC/B,YAAY,CAAC,KAAK,CAAC,EACnB,KAAK,CAAC,WAAW,CAAC,SAAS,cAAc,GAAG,IAAI,GAAG,kBAAkB,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAC1F,CAAC,CAAC;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,SAAS,SAAS,CAAC,qBAAqB,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC,cAAc,GAAG,cAAc,CAAC,CAAC,EAElG,aAAa,EAAE,wBAAwB,CAAC,KAAK,CAAC,GAC7C,OAAO,CAAC,sBAAsB,CAAC,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Iterates through the descriptors object, checking for property descriptors whose `get` is a function.
3
+ * Returns an {@link OwnGetterDescriptorMap} of the getters.
4
+ * If you want only own, non-inherited getters, you must filter sanitize the
5
+ * type the `descriptors` parameter yourself e.g. `Omit<Class, keyof
6
+ * SuperClass>`.
7
+ * @param descriptorMap An object like the return value of Object.getOwnPropertyDescriptors
8
+ * @template Class Any ClassLike type
9
+ * @template T Any `object`-like type.
10
+ * @template [__proto__=null] If {@link Class} is not {@link ClassLike}, the `__proto__` of {@link T}.
11
+ * @returns An {@link OwnGetterDescriptorMap}.
12
+ * @since 3.0.0
13
+ */
14
+ function filterForGetters(descriptorMap) {
15
+ let getterDescriptorMap = {};
16
+ for (const key in descriptorMap) {
17
+ const element = descriptorMap[key];
18
+ if (typeof element.get === 'function') {
19
+ getterDescriptorMap = Object.assign(getterDescriptorMap, {
20
+ [key]: element
21
+ });
22
+ }
23
+ }
24
+ return getterDescriptorMap;
25
+ }
26
+ export { filterForGetters };
27
+ //# sourceMappingURL=filterForGetters.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filterForGetters.mjs","sources":["../../../src/utils/reflection/filterForGetters.ts"],"sourcesContent":null,"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,gBAAgB,CAAC,aAAa,EAAE;AAChD,EAAE,IAAI,mBAAmB,GAAG,EAAE;AAC9B,EAAE,KAAK,MAAM,GAAG,IAAI,aAAa,EAAE;AACnC,IAAI,MAAM,OAAO,GAAG,aAAa,CAAC,GAAG,CAAC;AACtC,IAAI,IAAI,OAAO,OAAO,CAAC,GAAG,KAAK,UAAU,EAAE;AAC3C,MAAM,mBAAmB,GAAG,MAAM,CAAC,MAAM,CAAC,mBAAmB,EAAE;AAC/D,QAAQ,CAAC,GAAG,GAAG;AACf,OAAO,CAAC;AACR;AACA;AACA,EAAE,OAAO,mBAAmB;AAC5B;;;;"}
@@ -0,0 +1,22 @@
1
+ import type { InstanceOrStatic } from '../miscTypes.js';
2
+ import type { BaseClassProto, ClassLike, ConstructorConstraint, SuperClassLike, WithProto } from './inheritance.js';
3
+ import type { InstancePropertyDescriptorMap } from './InstancePropertyDescriptorMap.js';
4
+ import type { OwnPropertyDescriptorMap } from './OwnPropertyDescriptorMap.js';
5
+ /**
6
+ * Get the property descriptors of the class or constructor similar to {@link Object.getOwnPropertyDescriptors}, but with more options--including recursion.
7
+ * @template {InstanceOrStatic} _InstanceOrStatic 'Instance' or 'Static'. Determines the return type.
8
+ * @param classDefinition A class or constructor, cast to {@link ClassLike}.
9
+ * @param instanceOrStatic 'Instance' or 'Static'. Determines the return type.
10
+ * @template {ClassLike<ConstructorConstraint<Class> & WithProto<SuperClassLike | BaseClassProto>>} Class
11
+ * The typeof {@link classDefinition}.
12
+ * {@link WithProto}<{@link SuperClassLike}> is necessary for walking the
13
+ * prototype chain for both Instance and Static properties.
14
+ * If unspecified, the return type may be incorrect.
15
+ * @returns ({@link instanceOrStatic} === 'Instance') ? {@link InstancePropertyDescriptorMap<Class>}\
16
+ * : ({@link instanceOrStatic} === 'Static') ? {@link OwnPropertyDescriptorMap<Class>}\
17
+ * : never
18
+ * @throws {TypeError}
19
+ * @since 3.0.0
20
+ */
21
+ export declare function getOwnPropertyDescriptors<Class extends ClassLike<ConstructorConstraint<Class> & WithProto<SuperClassLike | BaseClassProto>>, _InstanceOrStatic extends InstanceOrStatic>(classDefinition: Class, instanceOrStatic: _InstanceOrStatic): [_InstanceOrStatic] extends ['Instance'] ? InstancePropertyDescriptorMap<Class> : [_InstanceOrStatic] extends ['Static'] ? OwnPropertyDescriptorMap<Class> : never;
22
+ //# sourceMappingURL=getOwnPropertyDescriptors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getOwnPropertyDescriptors.d.ts","sourceRoot":"","sources":["../../../src/utils/reflection/getOwnPropertyDescriptors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,qBAAqB,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACpH,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AACxF,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAE9E;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,yBAAyB,CACvC,KAAK,SAAS,SAAS,CAAC,qBAAqB,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC,cAAc,GAAG,cAAc,CAAC,CAAC,EAClG,iBAAiB,SAAS,gBAAgB,EAE1C,eAAe,EAAE,KAAK,EACtB,gBAAgB,EAAE,iBAAiB,GAClC,CAAC,iBAAiB,CAAC,SAAS,CAAC,UAAU,CAAC,GACvC,6BAA6B,CAAC,KAAK,CAAC,GACpC,CAAC,iBAAiB,CAAC,SAAS,CAAC,QAAQ,CAAC,GAClC,wBAAwB,CAAC,KAAK,CAAC,GAC/B,KAAK,CAoBZ"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Get the property descriptors of the class or constructor similar to {@link Object.getOwnPropertyDescriptors}, but with more options--including recursion.
3
+ * @template {InstanceOrStatic} _InstanceOrStatic 'Instance' or 'Static'. Determines the return type.
4
+ * @param classDefinition A class or constructor, cast to {@link ClassLike}.
5
+ * @param instanceOrStatic 'Instance' or 'Static'. Determines the return type.
6
+ * @template {ClassLike<ConstructorConstraint<Class> & WithProto<SuperClassLike | BaseClassProto>>} Class
7
+ * The typeof {@link classDefinition}.
8
+ * {@link WithProto}<{@link SuperClassLike}> is necessary for walking the
9
+ * prototype chain for both Instance and Static properties.
10
+ * If unspecified, the return type may be incorrect.
11
+ * @returns ({@link instanceOrStatic} === 'Instance') ? {@link InstancePropertyDescriptorMap<Class>}\
12
+ * : ({@link instanceOrStatic} === 'Static') ? {@link OwnPropertyDescriptorMap<Class>}\
13
+ * : never
14
+ * @throws {TypeError}
15
+ * @since 3.0.0
16
+ */
17
+ function getOwnPropertyDescriptors(classDefinition, instanceOrStatic) {
18
+ switch (instanceOrStatic) {
19
+ case 'Instance':
20
+ {
21
+ return Object.getOwnPropertyDescriptors(classDefinition.prototype);
22
+ }
23
+ case 'Static':
24
+ {
25
+ return Object.getOwnPropertyDescriptors(classDefinition);
26
+ }
27
+ default:
28
+ {
29
+ throw new TypeError('Argument `instanceOrStatic` must be "Instance" or "Static".');
30
+ }
31
+ }
32
+ }
33
+ export { getOwnPropertyDescriptors };
34
+ //# sourceMappingURL=getOwnPropertyDescriptors.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getOwnPropertyDescriptors.mjs","sources":["../../../src/utils/reflection/getOwnPropertyDescriptors.ts"],"sourcesContent":null,"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,yBAAyB,CAAC,eAAe,EAAE,gBAAgB,EAAE;AAC7E,EAAE,QAAQ,gBAAgB;AAC1B,IAAI,KAAK,UAAU;AACnB,MAAM;AACN,QAAQ,OAAO,MAAM,CAAC,yBAAyB,CAAC,eAAe,CAAC,SAAS,CAAC;AAC1E;AACA,IAAI,KAAK,QAAQ;AACjB,MAAM;AACN,QAAQ,OAAO,MAAM,CAAC,yBAAyB,CAAC,eAAe,CAAC;AAChE;AACA,IAAI;AACJ,MAAM;AACN,QAAQ,MAAM,IAAI,SAAS,CAAC,6DAA6D,CAAC;AAC1F;AACA;AACA;;;;"}
@@ -0,0 +1,56 @@
1
+ import type { Increment } from '../GracefulRecursion.js';
2
+ import type { InstanceOrStatic, Integer } from '../miscTypes.js';
3
+ import type { BaseClass, BaseClassProto, ClassLike, ConstructorConstraint, ConstructorLike, SuperClassLike, WithProto } from './inheritance.js';
4
+ import type { InstanceTypeOrSelfPropertyDescriptorMap } from './InstanceTypeOrSelfPropertyDescriptorMap.js';
5
+ import type { OwnPropertyDescriptorMap } from './OwnPropertyDescriptorMap.js';
6
+ /**
7
+ * JSDoc type imports
8
+ * @typedef {import('./getPrototypeOf.js').getPrototypeOf} getPrototypeOf
9
+ * @typedef {import('./listOwnGetters.js').listOwnGetters} listOwnGetters
10
+ * @typedef {import('./InstancePropertyDescriptorMap.js').InstancePropertyDescriptorMap} InstancePropertyDescriptorMap
11
+ */
12
+ /**
13
+ * A conditional wrapper for {@link InstanceTypeOrSelfPropertyDescriptorMap} and
14
+ * {@link OwnPropertyDescriptorMap}.
15
+ *
16
+ * If {@link _InstanceOrStatic} is 'Instance', {@link InstanceTypeOrSelfPropertyDescriptorMap}.\
17
+ * Else if {@link _InstanceOrStatic} is 'Static',
18
+ * {@link OwnPropertyDescriptorMap }.\
19
+ * Else, `never`.
20
+ * @template {ConstructorConstraint<Class> & WithProto<SuperClassLike | BaseClassProto>} Class
21
+ * A class definition cast to {@link ClassLike}.
22
+ * @template {InstanceOrStatic} _InstanceOrStatic
23
+ * 'Instance' or 'Static'. Determines the return type.
24
+ * @since 3.0.0
25
+ */
26
+ export type RecursedPropertyDescriptorMap<Class extends ConstructorConstraint<Class> & WithProto<SuperClassLike | BaseClassProto>, _InstanceOrStatic extends InstanceOrStatic> = [_InstanceOrStatic] extends ['Instance'] ? InstanceTypeOrSelfPropertyDescriptorMap<Class, Class['__proto__']> : [_InstanceOrStatic] extends ['Static'] ? OwnPropertyDescriptorMap<Class> : never;
27
+ /**
28
+ * An
29
+ * ordered array of {@link OwnPropertyDescriptorMap} or
30
+ * {@link InstancePropertyDescriptorMap} starting with {@link classDefinition}
31
+ * and ending with a {@link BaseClass}.
32
+ * @template {ConstructorConstraint<Class> & WithProto<SuperClassLike | BaseClassProto>} Class
33
+ * @template {'Instance' | 'Static'} InstanceOrStatic
34
+ * @template {Integer<number>} [Limit=16]
35
+ * @template {Integer<number>} [CurrentLevel=0]
36
+ */
37
+ export type RecursedPropertyDescriptorMapArray<Class extends ConstructorConstraint<Class> & WithProto<SuperClassLike | BaseClassProto>, InstanceOrStatic extends 'Instance' | 'Static', Limit extends Integer<number> = 16, CurrentLevel extends Integer<number> = 0> = Class['__proto__'] extends BaseClassProto['__proto__'] | BaseClassProto['__proto__']['__proto__'] ? never : Class['__proto__'] extends BaseClassProto ? [RecursedPropertyDescriptorMap<BaseClass<Class>, InstanceOrStatic>] : Class['__proto__'] extends ConstructorLike<Class['__proto__']> ? [
38
+ RecursedPropertyDescriptorMap<Class, InstanceOrStatic>,
39
+ ...RecursedPropertyDescriptorMapArray<ClassLike<Exclude<Class['__proto__'], BaseClassProto> & WithProto<SuperClassLike | BaseClassProto>>, InstanceOrStatic, Limit, Increment<CurrentLevel>>
40
+ ] : never;
41
+ /**
42
+ * Walks the class inheritance chain to get a PropertyDescriptorMap of each class.
43
+ *
44
+ * While you _can_ use this to get an array of getter names/keys, you should use {@link getPrototypeOf} and {@link listOwnGetters}, instead!
45
+ * @template Class Any class definition type-cast to {@link ClassLike}
46
+ * @template _InstanceOrStatic
47
+ * @param classDefinition Any class definition type-cast to {@link ClassLike}
48
+ * @param instanceOrStatic 'Instance' or 'Static'. Determines the return type.
49
+ * @returns An
50
+ * ordered array of {@link OwnPropertyDescriptorMap} or
51
+ * {@link InstancePropertyDescriptorMap} starting with {@link classDefinition}
52
+ * and ending with a {@link BaseClass}.
53
+ * @since 3.0.0
54
+ */
55
+ export declare function getOwnPropertyDescriptorsRecursively<Class extends ClassLike<ConstructorConstraint<Class> & WithProto<SuperClassLike | BaseClassProto>>, _InstanceOrStatic extends InstanceOrStatic, Limit extends Integer<number> = 16>(classDefinition: Class, instanceOrStatic: _InstanceOrStatic): RecursedPropertyDescriptorMapArray<Class, _InstanceOrStatic>;
56
+ //# sourceMappingURL=getOwnPropertyDescriptorsRecursively.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getOwnPropertyDescriptorsRecursively.d.ts","sourceRoot":"","sources":["../../../src/utils/reflection/getOwnPropertyDescriptorsRecursively.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAGjE,OAAO,KAAK,EACV,SAAS,EACT,cAAc,EACd,SAAS,EACT,qBAAqB,EACrB,eAAe,EAEf,cAAc,EACd,SAAS,EACV,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,uCAAuC,EAAE,MAAM,8CAA8C,CAAC;AAC5G,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAE9E;;;;;GAKG;AAGH;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,6BAA6B,CACvC,KAAK,SAAS,qBAAqB,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC,cAAc,GAAG,cAAc,CAAC,EACvF,iBAAiB,SAAS,gBAAgB,IACxC,CAAC,iBAAiB,CAAC,SAAS,CAAC,UAAU,CAAC,GAAG,uCAAuC,CAAC,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC,GAC7G,CAAC,iBAAiB,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,wBAAwB,CAAC,KAAK,CAAC,GACpE,KAAK,CAAC;AAEd;;;;;;;;;GASG;AACH,MAAM,MAAM,kCAAkC,CAC5C,KAAK,SAAS,qBAAqB,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC,cAAc,GAAG,cAAc,CAAC,EACvF,gBAAgB,SAAS,UAAU,GAAG,QAAQ,EAC9C,KAAK,SAAS,OAAO,CAAC,MAAM,CAAC,GAAG,EAAE,EAClC,YAAY,SAAS,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,IACtC,KAAK,CAAC,WAAW,CAAC,SAAS,cAAc,CAAC,WAAW,CAAC,GAAG,cAAc,CAAC,WAAW,CAAC,CAAC,WAAW,CAAC,GAAG,KAAK,GACzG,KAAK,CAAC,WAAW,CAAC,SAAS,cAAc,GAAG,CAAC,6BAA6B,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,gBAAgB,CAAC,CAAC,GAC7G,KAAK,CAAC,WAAW,CAAC,SAAS,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,GAC5D;IACE,6BAA6B,CAAC,KAAK,EAAE,gBAAgB,CAAC;IACtD,GAAG,kCAAkC,CACnC,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,EAAE,cAAc,CAAC,GAAG,SAAS,CAAC,cAAc,GAAG,cAAc,CAAC,CAAC,EACnG,gBAAgB,EAChB,KAAK,EACL,SAAS,CAAC,YAAY,CAAC,CACxB;CACF,GACD,KAAK,CAAC;AACd;;;;;;;;;;;;;GAaG;AACH,wBAAgB,oCAAoC,CAElD,KAAK,SAAS,SAAS,CAAC,qBAAqB,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC,cAAc,GAAG,cAAc,CAAC,CAAC,EAClG,iBAAiB,SAAS,gBAAgB,EAE1C,KAAK,SAAS,OAAO,CAAC,MAAM,CAAC,GAAG,EAAE,EAElC,eAAe,EAAE,KAAK,EACtB,gBAAgB,EAAE,iBAAiB,GAClC,kCAAkC,CAAC,KAAK,EAAE,iBAAiB,CAAC,CAmB9D"}
@@ -0,0 +1,72 @@
1
+ import { getOwnPropertyDescriptors } from './getOwnPropertyDescriptors.mjs';
2
+ import { getPrototypesChainOf } from './getPrototypeChainOf.mjs';
3
+
4
+ /* eslint-disable jsdoc/check-tag-names */
5
+ /**
6
+ * JSDoc type imports
7
+ * @typedef {import('./getPrototypeOf.js').getPrototypeOf} getPrototypeOf
8
+ * @typedef {import('./listOwnGetters.js').listOwnGetters} listOwnGetters
9
+ * @typedef {import('./InstancePropertyDescriptorMap.js').InstancePropertyDescriptorMap} InstancePropertyDescriptorMap
10
+ */
11
+ /* eslint-enable jsdoc/check-tag-names */
12
+
13
+ /**
14
+ * A conditional wrapper for {@link InstanceTypeOrSelfPropertyDescriptorMap} and
15
+ * {@link OwnPropertyDescriptorMap}.
16
+ *
17
+ * If {@link _InstanceOrStatic} is 'Instance', {@link InstanceTypeOrSelfPropertyDescriptorMap}.\
18
+ * Else if {@link _InstanceOrStatic} is 'Static',
19
+ * {@link OwnPropertyDescriptorMap }.\
20
+ * Else, `never`.
21
+ * @template {ConstructorConstraint<Class> & WithProto<SuperClassLike | BaseClassProto>} Class
22
+ * A class definition cast to {@link ClassLike}.
23
+ * @template {InstanceOrStatic} _InstanceOrStatic
24
+ * 'Instance' or 'Static'. Determines the return type.
25
+ * @since 3.0.0
26
+ */
27
+
28
+ /**
29
+ * An
30
+ * ordered array of {@link OwnPropertyDescriptorMap} or
31
+ * {@link InstancePropertyDescriptorMap} starting with {@link classDefinition}
32
+ * and ending with a {@link BaseClass}.
33
+ * @template {ConstructorConstraint<Class> & WithProto<SuperClassLike | BaseClassProto>} Class
34
+ * @template {'Instance' | 'Static'} InstanceOrStatic
35
+ * @template {Integer<number>} [Limit=16]
36
+ * @template {Integer<number>} [CurrentLevel=0]
37
+ */
38
+
39
+ /**
40
+ * Walks the class inheritance chain to get a PropertyDescriptorMap of each class.
41
+ *
42
+ * While you _can_ use this to get an array of getter names/keys, you should use {@link getPrototypeOf} and {@link listOwnGetters}, instead!
43
+ * @template Class Any class definition type-cast to {@link ClassLike}
44
+ * @template _InstanceOrStatic
45
+ * @param classDefinition Any class definition type-cast to {@link ClassLike}
46
+ * @param instanceOrStatic 'Instance' or 'Static'. Determines the return type.
47
+ * @returns An
48
+ * ordered array of {@link OwnPropertyDescriptorMap} or
49
+ * {@link InstancePropertyDescriptorMap} starting with {@link classDefinition}
50
+ * and ending with a {@link BaseClass}.
51
+ * @since 3.0.0
52
+ */
53
+ function getOwnPropertyDescriptorsRecursively(classDefinition, instanceOrStatic) {
54
+ const staticProtoChain = getPrototypesChainOf(classDefinition, 'classes');
55
+ if (isSingleTuple(staticProtoChain)) {
56
+ return [getOwnPropertyDescriptors(staticProtoChain[0], instanceOrStatic)];
57
+ }
58
+ const recursedPropertyDescriptorMapArray = staticProtoChain.map(classDefinition => getOwnPropertyDescriptors(classDefinition, instanceOrStatic));
59
+ return recursedPropertyDescriptorMapArray;
60
+ }
61
+
62
+ /**
63
+ * Simple utility for single-tuple type assertion
64
+ * @template {T} T T in T[]
65
+ * @param array an array
66
+ * @returns array is [T]
67
+ */
68
+ function isSingleTuple(array) {
69
+ return Array.isArray(array) && array.length === 1;
70
+ }
71
+ export { getOwnPropertyDescriptorsRecursively };
72
+ //# sourceMappingURL=getOwnPropertyDescriptorsRecursively.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getOwnPropertyDescriptorsRecursively.mjs","sources":["../../../src/utils/reflection/getOwnPropertyDescriptorsRecursively.ts"],"sourcesContent":null,"names":[],"mappings":";;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,oCAAoC,CAAC,eAAe,EAAE,gBAAgB,EAAE;AACxF,EAAE,MAAM,gBAAgB,GAAG,oBAAoB,CAAC,eAAe,EAAE,SAAS,CAAC;AAC3E,EAAE,IAAI,aAAa,CAAC,gBAAgB,CAAC,EAAE;AACvC,IAAI,OAAO,CAAC,yBAAyB,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,gBAAgB,CAAC,CAAC;AAC7E;AACA,EAAE,MAAM,kCAAkC,GAAG,gBAAgB,CAAC,GAAG,CAAC,eAAe,IAAI,yBAAyB,CAAC,eAAe,EAAE,gBAAgB,CAAC,CAAC;AAClJ,EAAE,OAAO,kCAAkC;AAC3C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,aAAa,CAAC,KAAK,EAAE;AAC9B,EAAE,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;AACnD;;;;"}
@@ -0,0 +1,16 @@
1
+ import { type BaseClassProto, type ClassLike, type ConstructorConstraint, type ProtoChainOfClass, type ProtoChainOfClassInstance, type SuperClassLike, type WithProto } from './inheritance.js';
2
+ type ProtoChain<Class extends ClassLike<ConstructorConstraint<Class> & WithProto<SuperClassLike | BaseClassProto>>, ClassesOrInstances extends 'classes' | 'classInstances'> = [ClassesOrInstances] extends ['classInstances'] ? ProtoChainOfClassInstance<Class> : [ClassesOrInstances] extends ['classes'] ? ProtoChainOfClass<Class> : never;
3
+ /**
4
+ * Iterate through the class and its base/super classes until an anonymous function is reached. This is the default superclass all classes extend.
5
+ * @template Class Any {@link ClassLike} type.
6
+ * @template ClassesOrInstances 'classes' or 'classInstances'
7
+ * @param classDefinition Any class type satisfying {@link Class}. This class (or its instance type) is included in the return value.
8
+ * @param [returnType='classes'] Determines return type. If 'classInstances', the return type is an array of the classes' `.prototype`. Else, the classes themselves are returned.
9
+ * @since 3.0.0
10
+ * @returns
11
+ * `returnType extends 'classInstances' ? ClassLike<T>[] : ClassLike<T>[].map(c => c.prototype)`
12
+ * Excludes default superclasses e.g. anonymous functions, native code.
13
+ */
14
+ export declare function getPrototypesChainOf<Class extends ClassLike<ConstructorConstraint<Class> & WithProto<SuperClassLike | BaseClassProto>>, ClassesOrInstances extends 'classes' | 'classInstances'>(classDefinition: Class, returnType: ClassesOrInstances): ProtoChain<Class, ClassesOrInstances>;
15
+ export {};
16
+ //# sourceMappingURL=getPrototypeChainOf.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getPrototypeChainOf.d.ts","sourceRoot":"","sources":["../../../src/utils/reflection/getPrototypeChainOf.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,EAC9B,KAAK,cAAc,EACnB,KAAK,SAAS,EACf,MAAM,kBAAkB,CAAC;AAG1B,KAAK,UAAU,CACb,KAAK,SAAS,SAAS,CAAC,qBAAqB,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC,cAAc,GAAG,cAAc,CAAC,CAAC,EAClG,kBAAkB,SAAS,SAAS,GAAG,gBAAgB,IACrD,CAAC,kBAAkB,CAAC,SAAS,CAAC,gBAAgB,CAAC,GAAG,yBAAyB,CAAC,KAAK,CAAC,GAClF,CAAC,kBAAkB,CAAC,SAAS,CAAC,SAAS,CAAC,GAAG,iBAAiB,CAAC,KAAK,CAAC,GAC/D,KAAK,CAAC;AAEd;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,SAAS,SAAS,CAAC,qBAAqB,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC,cAAc,GAAG,cAAc,CAAC,CAAC,EAClG,kBAAkB,SAAS,SAAS,GAAG,gBAAgB,EAEvD,eAAe,EAAE,KAAK,EACtB,UAAU,EAAE,kBAAkB,GAC7B,UAAU,CAAC,KAAK,EAAE,kBAAkB,CAAC,CA6CvC"}
@@ -0,0 +1,55 @@
1
+ import { getPrototypeOf } from './getPrototypeOf.mjs';
2
+ import { baseClassProto } from './inheritance.mjs';
3
+ import { isConstructor } from './isConstructor.mjs';
4
+
5
+ /* eslint-disable jsdoc/no-defaults */
6
+
7
+ /**
8
+ * Iterate through the class and its base/super classes until an anonymous function is reached. This is the default superclass all classes extend.
9
+ * @template Class Any {@link ClassLike} type.
10
+ * @template ClassesOrInstances 'classes' or 'classInstances'
11
+ * @param classDefinition Any class type satisfying {@link Class}. This class (or its instance type) is included in the return value.
12
+ * @param [returnType='classes'] Determines return type. If 'classInstances', the return type is an array of the classes' `.prototype`. Else, the classes themselves are returned.
13
+ * @since 3.0.0
14
+ * @returns
15
+ * `returnType extends 'classInstances' ? ClassLike<T>[] : ClassLike<T>[].map(c => c.prototype)`
16
+ * Excludes default superclasses e.g. anonymous functions, native code.
17
+ */
18
+ function getPrototypesChainOf(classDefinition, returnType) {
19
+ // class definitions or their respective .prototype; exclude default superclasses.
20
+ let current = classDefinition;
21
+ let parent;
22
+ const returnValue = [];
23
+ let index = 0;
24
+ while (baseClassProto !== current) {
25
+ parent = getPrototypeOf(current);
26
+ // current is a Class symbol/constructor. Object.getOwnPropertyDescriptors on current will include static properties.
27
+ if (!isConstructor(current)) break;
28
+ if (returnType === 'classInstances') {
29
+ const instanceOfCurrent = current.prototype;
30
+ returnValue[index] = instanceOfCurrent;
31
+ } else {
32
+ returnValue[index] = current;
33
+ }
34
+
35
+ /**
36
+ * Assign the super class to current.
37
+ * If the argument is a class, Reflect.getPrototypeOf method returns the
38
+ * superclass.
39
+ */
40
+ if (isConstructor(parent) && 'name' in parent && typeof parent.name === 'string' && '' !== parent.name // it's possible for a Function/Constructor to be anonymous...
41
+ ) {
42
+ current = parent;
43
+ } else {
44
+ break;
45
+ }
46
+ index++;
47
+ }
48
+ return returnValue;
49
+ /*
50
+ assuming current is NugetProjectProperties...
51
+ Reflect.getPrototypeOf(current).name is 'MSBuildProjectProperties'
52
+ */
53
+ }
54
+ export { getPrototypesChainOf };
55
+ //# sourceMappingURL=getPrototypeChainOf.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getPrototypeChainOf.mjs","sources":["../../../src/utils/reflection/getPrototypeChainOf.ts"],"sourcesContent":null,"names":[],"mappings":";;;;AAAA;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,oBAAoB,CAAC,eAAe,EAAE,UAAU,EAAE;AAClE;AACA,EAAE,IAAI,OAAO,GAAG,eAAe;AAC/B,EAAE,IAAI,MAAM;AACZ,EAAE,MAAM,WAAW,GAAG,EAAE;AACxB,EAAE,IAAI,KAAK,GAAG,CAAC;AACf,EAAE,OAAO,cAAc,KAAK,OAAO,EAAE;AACrC,IAAI,MAAM,GAAG,cAAc,CAAC,OAAO,CAAC;AACpC;AACA,IAAI,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE;AACjC,IAAI,IAAI,UAAU,KAAK,gBAAgB,EAAE;AACzC,MAAM,MAAM,iBAAiB,GAAG,OAAO,CAAC,SAAS;AACjD,MAAM,WAAW,CAAC,KAAK,CAAC,GAAG,iBAAiB;AAC5C,KAAK,MAAM;AACX,MAAM,WAAW,CAAC,KAAK,CAAC,GAAG,OAAO;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI,IAAI,aAAa,CAAC,MAAM,CAAC,IAAI,MAAM,IAAI,MAAM,IAAI,OAAO,MAAM,CAAC,IAAI,KAAK,QAAQ,IAAI,EAAE,KAAK,MAAM,CAAC,IAAI;AAC1G,MAAM;AACN,MAAM,OAAO,GAAG,MAAM;AACtB,KAAK,MAAM;AACX,MAAM;AACN;AACA,IAAI,KAAK,EAAE;AACX;AACA,EAAE,OAAO,WAAW;AACpB;AACA;AACA;AACA;AACA;;;;"}
@@ -0,0 +1,8 @@
1
+ import type { ProtoOrSuperClass, WithProto } from './inheritance.js';
2
+ /**
3
+ * A nearly useless wrapper for {@link Reflect.getPrototypeOf}
4
+ * @param object An object with the internal `__proto__` property present in its type.
5
+ * @returns The `__proto__` of the `object` param.
6
+ */
7
+ export declare function getPrototypeOf<T extends WithProto<ProtoOrSuperClass>>(object: T): T['__proto__'];
8
+ //# sourceMappingURL=getPrototypeOf.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getPrototypeOf.d.ts","sourceRoot":"","sources":["../../../src/utils/reflection/getPrototypeOf.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAErE;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,CAAC,SAAS,SAAS,CAAC,iBAAiB,CAAC,EACtC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,WAAW,CAAC,CAE3B"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * A nearly useless wrapper for {@link Reflect.getPrototypeOf}
3
+ * @param object An object with the internal `__proto__` property present in its type.
4
+ * @returns The `__proto__` of the `object` param.
5
+ */
6
+ function getPrototypeOf(object) {
7
+ return Reflect.getPrototypeOf(object);
8
+ }
9
+ export { getPrototypeOf };
10
+ //# sourceMappingURL=getPrototypeOf.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getPrototypeOf.mjs","sources":["../../../src/utils/reflection/getPrototypeOf.ts"],"sourcesContent":null,"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACO,SAAS,cAAc,CAAC,MAAM,EAAE;AACvC,EAAE,OAAO,OAAO,CAAC,cAAc,CAAC,MAAM,CAAC;AACvC;;;;"}