Comparing version 0.0.4 to 0.0.5
"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 __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
@@ -19,8 +8,6 @@ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
}; | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Bot = void 0; | ||
const files_1 = require("@gramio/files"); | ||
const format_1 = require("@gramio/format"); | ||
const form_data_encoder_1 = require("form-data-encoder"); | ||
@@ -44,4 +31,8 @@ const inspectable_1 = require("inspectable"); | ||
}; | ||
if ((0, files_1.isMediaUpload)(method, params)) { | ||
const formData = await (0, files_1.convertJsonToFormData)(method, params); | ||
const formattable = format_1.FormattableMap[method]; | ||
// biome-ignore lint/style/noParameterAssign: mutate formattable | ||
if (formattable && params) | ||
params = formattable(params); | ||
if ((0, files_1.isMediaUpload)(method, params || {})) { | ||
const formData = await (0, files_1.convertJsonToFormData)(method, params || {}); | ||
const encoder = new form_data_encoder_1.FormDataEncoder(formData); | ||
@@ -73,2 +64,1 @@ reqOptions.body = encoder.encode(); | ||
], Bot); | ||
__exportStar(require("@gramio/types"), exports); |
@@ -24,1 +24,2 @@ "use strict"; | ||
__exportStar(require("@gramio/types"), exports); | ||
__exportStar(require("@gramio/format"), exports); |
@@ -32,2 +32,3 @@ "use strict"; | ||
const context = new contexts_1.contextsMappings[updateType]({ | ||
// @ts-expect-error | ||
bot: this.bot, | ||
@@ -34,0 +35,0 @@ update: data, |
{ | ||
"name": "gramio", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "WIP", | ||
@@ -21,2 +21,3 @@ "main": "./dist/index.js", | ||
"@gramio/files": "^0.0.2", | ||
"@gramio/format": "^0.0.2", | ||
"@gramio/keyboards": "^0.1.6", | ||
@@ -23,0 +24,0 @@ "form-data-encoder": "^4.0.2", |
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
9427
9
239
+ Added@gramio/format@^0.0.2
+ Added@gramio/format@0.0.2(transitive)