Comparing version 4.9.0 to 4.9.1
"use strict"; | ||
/** @format */ | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Composer = void 0; | ||
const context_1 = require("./context"); | ||
const context_1 = __importDefault(require("./context")); | ||
function always(x) { | ||
@@ -7,0 +10,0 @@ return () => x; |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/* eslint @typescript-eslint/restrict-template-expressions: [ "error", { "allowNumber": true, "allowBoolean": true } ] */ | ||
const crypto = require("crypto"); | ||
const fs = require("fs"); | ||
const https = require("https"); | ||
const path = require("path"); | ||
const node_fetch_1 = require("node-fetch"); | ||
const crypto = __importStar(require("crypto")); | ||
const fs = __importStar(require("fs")); | ||
const https = __importStar(require("https")); | ||
const path = __importStar(require("path")); | ||
const node_fetch_1 = __importDefault(require("node-fetch")); | ||
const check_1 = require("../helpers/check"); | ||
const compact_1 = require("../helpers/compact"); | ||
const multipart_stream_1 = require("./multipart-stream"); | ||
const error_1 = require("./error"); | ||
const multipart_stream_1 = __importDefault(require("./multipart-stream")); | ||
const error_1 = __importDefault(require("./error")); | ||
const url_1 = require("url"); | ||
@@ -14,0 +40,0 @@ // eslint-disable-next-line @typescript-eslint/no-var-requires |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const stream = require("stream"); | ||
const stream = __importStar(require("stream")); | ||
const check_1 = require("../helpers/check"); | ||
const sandwich_stream_1 = require("sandwich-stream"); | ||
const sandwich_stream_1 = __importDefault(require("sandwich-stream")); | ||
const CRNL = '\r\n'; | ||
@@ -7,0 +33,0 @@ class MultipartStream extends sandwich_stream_1.default { |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Polling = void 0; | ||
const abort_controller_1 = require("abort-controller"); | ||
const debug_1 = require("debug"); | ||
const abort_controller_1 = __importDefault(require("abort-controller")); | ||
const debug_1 = __importDefault(require("debug")); | ||
const util_1 = require("util"); | ||
@@ -7,0 +10,0 @@ const error_1 = require("./error"); |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const debug_1 = require("debug"); | ||
const debug_1 = __importDefault(require("debug")); | ||
const debug = (0, debug_1.default)('telegraf:webhook'); | ||
@@ -5,0 +8,0 @@ function generateWebhook(filter, updateHandler) { |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -16,4 +39,4 @@ exports.Scenes = exports.MemorySessionStore = exports.session = exports.deunionize = exports.Markup = exports.Types = exports.Telegram = exports.TelegramError = exports.Router = exports.Composer = exports.Context = exports.Telegraf = void 0; | ||
Object.defineProperty(exports, "Telegram", { enumerable: true, get: function () { return telegram_1.Telegram; } }); | ||
exports.Types = require("./telegram-types"); | ||
exports.Markup = require("./markup"); | ||
exports.Types = __importStar(require("./telegram-types")); | ||
exports.Markup = __importStar(require("./markup")); | ||
var deunionize_1 = require("./deunionize"); | ||
@@ -24,2 +47,2 @@ Object.defineProperty(exports, "deunionize", { enumerable: true, get: function () { return deunionize_1.deunionize; } }); | ||
Object.defineProperty(exports, "MemorySessionStore", { enumerable: true, get: function () { return session_1.MemorySessionStore; } }); | ||
exports.Scenes = require("./scenes"); | ||
exports.Scenes = __importStar(require("./scenes")); |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -32,3 +55,3 @@ exports.inlineKeyboard = exports.keyboard = exports.forceReply = exports.removeKeyboard = exports.button = exports.Markup = void 0; | ||
exports.Markup = Markup; | ||
exports.button = require("./button"); | ||
exports.button = __importStar(require("./button")); | ||
function removeKeyboard() { | ||
@@ -35,0 +58,0 @@ return new Markup({ remove_keyboard: true }); |
"use strict"; | ||
/** @format */ | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Router = void 0; | ||
const composer_1 = require("./composer"); | ||
const composer_1 = __importDefault(require("./composer")); | ||
class Router { | ||
@@ -7,0 +10,0 @@ constructor(routeFn, handlers = new Map()) { |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.BaseScene = void 0; | ||
const composer_1 = require("../composer"); | ||
const composer_1 = __importDefault(require("../composer")); | ||
const { compose } = composer_1.default; | ||
@@ -6,0 +9,0 @@ class BaseScene extends composer_1.default { |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const composer_1 = require("../composer"); | ||
const debug_1 = require("debug"); | ||
const composer_1 = __importDefault(require("../composer")); | ||
const debug_1 = __importDefault(require("debug")); | ||
const debug = (0, debug_1.default)('telegraf:scenes:context'); | ||
@@ -6,0 +9,0 @@ const noop = () => Promise.resolve(); |
@@ -7,2 +7,5 @@ "use strict"; | ||
*/ | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -13,3 +16,3 @@ exports.WizardContextWizard = exports.WizardScene = exports.BaseScene = exports.SceneContextScene = exports.Stage = void 0; | ||
var context_1 = require("./context"); | ||
Object.defineProperty(exports, "SceneContextScene", { enumerable: true, get: function () { return context_1.default; } }); | ||
Object.defineProperty(exports, "SceneContextScene", { enumerable: true, get: function () { return __importDefault(context_1).default; } }); | ||
var base_1 = require("./base"); | ||
@@ -20,2 +23,2 @@ Object.defineProperty(exports, "BaseScene", { enumerable: true, get: function () { return base_1.BaseScene; } }); | ||
var context_2 = require("./wizard/context"); | ||
Object.defineProperty(exports, "WizardContextWizard", { enumerable: true, get: function () { return context_2.default; } }); | ||
Object.defineProperty(exports, "WizardContextWizard", { enumerable: true, get: function () { return __importDefault(context_2).default; } }); |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Stage = void 0; | ||
const session_1 = require("../session"); | ||
const context_1 = require("./context"); | ||
const context_1 = __importDefault(require("./context")); | ||
const composer_1 = require("../composer"); | ||
@@ -7,0 +10,0 @@ class Stage extends composer_1.Composer { |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.WizardScene = void 0; | ||
const base_1 = require("../base"); | ||
const context_1 = require("./context"); | ||
const composer_1 = require("../../composer"); | ||
const base_1 = __importDefault(require("../base")); | ||
const context_1 = __importDefault(require("./context")); | ||
const composer_1 = __importDefault(require("../../composer")); | ||
class WizardScene extends base_1.default { | ||
@@ -8,0 +11,0 @@ constructor(id, options, ...steps) { |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Telegraf = void 0; | ||
const crypto = require("crypto"); | ||
const http = require("http"); | ||
const https = require("https"); | ||
const crypto = __importStar(require("crypto")); | ||
const http = __importStar(require("http")); | ||
const https = __importStar(require("https")); | ||
const composer_1 = require("./composer"); | ||
const compact_1 = require("./core/helpers/compact"); | ||
const context_1 = require("./context"); | ||
const debug_1 = require("debug"); | ||
const webhook_1 = require("./core/network/webhook"); | ||
const context_1 = __importDefault(require("./context")); | ||
const debug_1 = __importDefault(require("debug")); | ||
const webhook_1 = __importDefault(require("./core/network/webhook")); | ||
const polling_1 = require("./core/network/polling"); | ||
const p_timeout_1 = require("p-timeout"); | ||
const telegram_1 = require("./telegram"); | ||
const p_timeout_1 = __importDefault(require("p-timeout")); | ||
const telegram_1 = __importDefault(require("./telegram")); | ||
const url_1 = require("url"); | ||
@@ -16,0 +42,0 @@ const safeCompare = require("safe-compare"); |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Telegram = void 0; | ||
const client_1 = require("./core/network/client"); | ||
const client_1 = __importDefault(require("./core/network/client")); | ||
const path_1 = require("path"); | ||
@@ -6,0 +9,0 @@ const url_1 = require("url"); |
{ | ||
"name": "telegraf", | ||
"version": "4.9.0", | ||
"version": "4.9.1", | ||
"description": "Modern Telegram Bot Framework", | ||
@@ -43,7 +43,7 @@ "license": "MIT", | ||
"bin": { | ||
"telegraf": "bin/telegraf.mjs" | ||
"telegraf": "lib/cli.mjs" | ||
}, | ||
"scripts": { | ||
"prepare": "npm run --silent build", | ||
"build": "tsc && tsc -p bin/tsconfig.json", | ||
"build": "tsc", | ||
"build:docs": "typedoc src/index.ts", | ||
@@ -65,5 +65,3 @@ "pretest": "npm run build", | ||
"debug": "^4.3.3", | ||
"es-main": "^1.2.0", | ||
"minimist": "^1.2.6", | ||
"module-alias": "^2.2.2", | ||
"mri": "^1.2.0", | ||
"node-fetch": "^2.6.7", | ||
@@ -73,8 +71,6 @@ "p-timeout": "^4.1.0", | ||
"sandwich-stream": "^2.0.2", | ||
"typegram": "github:MKRhere/typegram#e2ba9f01f14b96c6dbb1c617e66692a3cc776cf6" | ||
"typegram": "^3.11.0" | ||
}, | ||
"devDependencies": { | ||
"@types/debug": "^4.1.7", | ||
"@types/minimist": "^1.2.2", | ||
"@types/module-alias": "^2.0.1", | ||
"@types/node": "^17.0.14", | ||
@@ -93,3 +89,2 @@ "@types/node-fetch": "^2.5.12", | ||
"eslint-plugin-promise": "^6.0.0", | ||
"eslint-plugin-standard": "^5.0.0", | ||
"prettier": "^2.5.1", | ||
@@ -96,0 +91,0 @@ "typedoc": "^0.23.10", |
@@ -13,3 +13,3 @@ import { SessionContext } from '../session'; | ||
register(...scenes: ReadonlyArray<BaseScene<C>>): this; | ||
middleware(): import("..").MiddlewareFn<C>; | ||
middleware(): import("../middleware").MiddlewareFn<C>; | ||
static enter<C extends Context & { | ||
@@ -16,0 +16,0 @@ scene: SceneContextScene<C>; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
GitHub dependency
Supply chain riskContains a dependency which resolves to a GitHub URL. Dependencies fetched from GitHub specifiers are not immutable can be used to inject untrusted code or reduce the likelihood of a reproducible install.
Found 1 instance in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
497404
8
17
10871
0
2
120
+ Addedmri@^1.2.0
+ Addedmri@1.2.0(transitive)
+ Addedtypegram@3.12.0(transitive)
- Removedes-main@^1.2.0
- Removedminimist@^1.2.6
- Removedmodule-alias@^2.2.2
- Removedes-main@1.3.0(transitive)
- Removedminimist@1.2.8(transitive)
- Removedmodule-alias@2.2.3(transitive)
Updatedtypegram@^3.11.0