grammy 1.36.1 → 1.36.3
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.
- package/README.md +2 -1
- package/out/composer.d.ts +4 -4
- package/out/composer.js +4 -4
- package/out/web.mjs +3 -14
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -297,7 +297,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
|
|
|
297
297
|
</tr>
|
|
298
298
|
<tr>
|
|
299
299
|
<td align="center" valign="top" width="11.11%"><a href="https://github.com/carafelix"><img src="https://avatars.githubusercontent.com/u/48109042?v=4?s=100" width="100px;" alt="Hero Protagonist"/><br /><sub><b>Hero Protagonist</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/commits?author=carafelix" title="Code">💻</a> <a href="https://github.com/grammyjs/grammY/issues?q=author%3Acarafelix" title="Bug reports">🐛</a> <a href="#ideas-carafelix" title="Ideas, Planning, & Feedback">🤔</a> <a href="#plugin-carafelix" title="Plugin/utility libraries">🔌</a></td>
|
|
300
|
-
<td align="center" valign="top" width="11.11%"><a href="https://github.com/MobinAskari"><img src="https://avatars.githubusercontent.com/u/132358316?v=4?s=100" width="100px;" alt="Mobin Askari"/><br /><sub><b>Mobin Askari</b></sub></a><br /><a href="#plugin-MobinAskari" title="Plugin/utility libraries">🔌</a></td>
|
|
300
|
+
<td align="center" valign="top" width="11.11%"><a href="https://github.com/MobinAskari"><img src="https://avatars.githubusercontent.com/u/132358316?v=4?s=100" width="100px;" alt="Mobin Askari"/><br /><sub><b>Mobin Askari</b></sub></a><br /><a href="#plugin-MobinAskari" title="Plugin/utility libraries">🔌</a> <a href="https://github.com/grammyjs/grammY/pulls?q=is%3Apr+reviewed-by%3AMobinAskari" title="Reviewed Pull Requests">👀</a></td>
|
|
301
301
|
<td align="center" valign="top" width="11.11%"><a href="https://github.com/ubertao"><img src="https://avatars.githubusercontent.com/u/4099333?v=4?s=100" width="100px;" alt="Ubertao"/><br /><sub><b>Ubertao</b></sub></a><br /><a href="#ideas-ubertao" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/grammyjs/grammY/commits?author=ubertao" title="Code">💻</a></td>
|
|
302
302
|
<td align="center" valign="top" width="11.11%"><a href="https://github.com/SunsetTechuila"><img src="https://avatars.githubusercontent.com/u/115353812?v=4?s=100" width="100px;" alt="Grigory"/><br /><sub><b>Grigory</b></sub></a><br /><a href="#ideas-SunsetTechuila" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/grammyjs/grammY/commits?author=SunsetTechuila" title="Code">💻</a> <a href="https://github.com/grammyjs/grammY/commits?author=SunsetTechuila" title="Documentation">📖</a></td>
|
|
303
303
|
<td align="center" valign="top" width="11.11%"><a href="https://github.com/aleveha"><img src="https://avatars.githubusercontent.com/u/63300936?v=4?s=100" width="100px;" alt="aleveha"/><br /><sub><b>aleveha</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/commits?author=aleveha" title="Code">💻</a></td>
|
|
@@ -330,6 +330,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
|
|
|
330
330
|
</tr>
|
|
331
331
|
<tr>
|
|
332
332
|
<td align="center" valign="top" width="11.11%"><a href="https://github.com/Arctomachine"><img src="https://avatars.githubusercontent.com/u/29041820?v=4?s=100" width="100px;" alt="Alexander"/><br /><sub><b>Alexander</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/commits?author=Arctomachine" title="Documentation">📖</a></td>
|
|
333
|
+
<td align="center" valign="top" width="11.11%"><a href="https://github.com/OfficialCodinary"><img src="https://avatars.githubusercontent.com/u/133005277?v=4?s=100" width="100px;" alt="Codinary"/><br /><sub><b>Codinary</b></sub></a><br /><a href="https://github.com/grammyjs/grammY/pulls?q=is%3Apr+reviewed-by%3AOfficialCodinary" title="Reviewed Pull Requests">👀</a></td>
|
|
333
334
|
</tr>
|
|
334
335
|
</tbody>
|
|
335
336
|
</table>
|
package/out/composer.d.ts
CHANGED
|
@@ -539,11 +539,11 @@ export declare class Composer<C extends Context> implements MiddlewareObj<C> {
|
|
|
539
539
|
* have completed.
|
|
540
540
|
*
|
|
541
541
|
* Both the fork and the downstream middleware are awaited with
|
|
542
|
-
* `Promise.all`, so you will only be to catch
|
|
543
|
-
* is thrown first).
|
|
542
|
+
* `Promise.all`, so you will only be able to catch at most one error (the
|
|
543
|
+
* one that is thrown first).
|
|
544
544
|
*
|
|
545
|
-
* In
|
|
546
|
-
*
|
|
545
|
+
* In contrast to the other middleware methods on composer, `fork` does not
|
|
546
|
+
* simply return the composer connected to the main middleware stack.
|
|
547
547
|
* Instead, it returns the created composer _of the fork_ connected to the
|
|
548
548
|
* middleware stack. This allows for the following pattern.
|
|
549
549
|
* ```ts
|
package/out/composer.js
CHANGED
|
@@ -531,11 +531,11 @@ class Composer {
|
|
|
531
531
|
* have completed.
|
|
532
532
|
*
|
|
533
533
|
* Both the fork and the downstream middleware are awaited with
|
|
534
|
-
* `Promise.all`, so you will only be to catch
|
|
535
|
-
* is thrown first).
|
|
534
|
+
* `Promise.all`, so you will only be able to catch at most one error (the
|
|
535
|
+
* one that is thrown first).
|
|
536
536
|
*
|
|
537
|
-
* In
|
|
538
|
-
*
|
|
537
|
+
* In contrast to the other middleware methods on composer, `fork` does not
|
|
538
|
+
* simply return the composer connected to the main middleware stack.
|
|
539
539
|
* Instead, it returns the created composer _of the fork_ connected to the
|
|
540
540
|
* middleware stack. This allows for the following pattern.
|
|
541
541
|
* ```ts
|
package/out/web.mjs
CHANGED
|
@@ -2120,21 +2120,10 @@ function toHttpError(method, sensitiveLogs) {
|
|
|
2120
2120
|
throw new HttpError(msg, err);
|
|
2121
2121
|
};
|
|
2122
2122
|
}
|
|
2123
|
-
const
|
|
2124
|
-
const { Deno } = globalThis;
|
|
2125
|
-
if (typeof Deno?.build?.os === "string") {
|
|
2126
|
-
return Deno.build.os;
|
|
2127
|
-
}
|
|
2128
|
-
const { navigator: navigator1 } = globalThis;
|
|
2129
|
-
if (navigator1?.appVersion?.includes?.("Win")) {
|
|
2130
|
-
return "windows";
|
|
2131
|
-
}
|
|
2132
|
-
return "linux";
|
|
2133
|
-
})();
|
|
2134
|
-
const isWindows = osType === "windows";
|
|
2123
|
+
const isWindows = globalThis.Deno?.build.os === "windows" || globalThis.navigator?.platform?.startsWith("Win") || globalThis.process?.platform?.startsWith("win") || false;
|
|
2135
2124
|
function assertPath(path) {
|
|
2136
2125
|
if (typeof path !== "string") {
|
|
2137
|
-
throw new TypeError(`Path must be a string
|
|
2126
|
+
throw new TypeError(`Path must be a string, received "${JSON.stringify(path)}"`);
|
|
2138
2127
|
}
|
|
2139
2128
|
}
|
|
2140
2129
|
function stripSuffix(name, suffix) {
|
|
@@ -2169,7 +2158,7 @@ function assertArgs(path, suffix) {
|
|
|
2169
2158
|
assertPath(path);
|
|
2170
2159
|
if (path.length === 0) return path;
|
|
2171
2160
|
if (typeof suffix !== "string") {
|
|
2172
|
-
throw new TypeError(`Suffix must be a string
|
|
2161
|
+
throw new TypeError(`Suffix must be a string, received "${JSON.stringify(suffix)}"`);
|
|
2173
2162
|
}
|
|
2174
2163
|
}
|
|
2175
2164
|
function stripTrailingSeparators(segment, isSep) {
|