From a245729418df4362acf2bd7cd718f62e4a2ffd95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Wi=C4=99cek?= Date: Sat, 7 Sep 2024 13:01:33 +0200 Subject: [PATCH] Refactored code for better maintainability and consistency --- lib/index.d.ts | 21 - lib/index.js | 23 - lib/lib/hashing.d.ts | 6 - lib/lib/hashing.js | 21 - lib/models/amount.type.d.ts | 5 - lib/models/amount.type.js | 9 - lib/models/directbilling/db.provider.d.ts | 12 - lib/models/directbilling/db.provider.js | 17 - .../directbilling/service/db.calculation.d.ts | 12 - .../directbilling/service/db.calculation.js | 3 - .../directbilling/service/db.provider.d.ts | 6 - .../directbilling/service/db.provider.js | 10 - .../directbilling/service/db.service.d.ts | 42 - .../directbilling/service/db.service.js | 3 - .../service/db.service.status.d.ts | 6 - .../service/db.service.status.js | 10 - .../service/partial.db.service.d.ts | 8 - .../service/partial.db.service.js | 2 - .../transaction/db.generation.response.d.ts | 12 - .../transaction/db.generation.response.js | 2 - .../transaction/db.notifications.request.d.ts | 18 - .../transaction/db.notifications.request.js | 2 - .../transaction/db.transaction.d.ts | 20 - .../transaction/db.transaction.js | 2 - .../transaction/db.transaction.request.d.ts | 12 - .../transaction/db.transaction.request.js | 2 - .../transaction/db.transaction.status.d.ts | 8 - .../transaction/db.transaction.status.js | 12 - .../transaction/partial.db.transaction.d.ts | 11 - .../transaction/partial.db.transaction.js | 2 - lib/models/response/paginated.response.d.ts | 18 - lib/models/response/paginated.response.js | 2 - lib/models/service.status.d.ts | 10 - lib/models/service.status.js | 14 - lib/models/sms/service/sms.number.d.ts | 6 - lib/models/sms/service/sms.number.js | 2 - lib/models/sms/service/sms.service.d.ts | 13 - lib/models/sms/service/sms.service.js | 2 - .../sms/service/sms.service.status.d.ts | 10 - lib/models/sms/service/sms.service.status.js | 14 - lib/models/sms/service/sms.service.type.d.ts | 5 - lib/models/sms/service/sms.service.type.js | 9 - .../sms/transaction/sms.transaction.d.ts | 9 - lib/models/sms/transaction/sms.transaction.js | 2 - lib/models/sms/verification.response.d.ts | 9 - lib/models/sms/verification.response.js | 2 - lib/payments/directbilling.d.ts | 26 - lib/payments/directbilling.js | 188 -- lib/payments/sms.d.ts | 24 - lib/payments/sms.js | 197 -- lib/payments/sms.xml.d.ts | 13 - lib/payments/sms.xml.js | 79 - lib/test.d.ts | 1 - lib/test.js | 22 - lib/tests/directbilling.d.ts | 1 - lib/tests/directbilling.js | 38 - lib/tests/sms.d.ts | 1 - lib/tests/sms.js | 40 - package-lock.json | 2426 +++++++++++++++++ src/index.ts | 42 +- src/lib/hashing.ts | 34 +- src/models/amount.type.ts | 6 +- src/models/directbilling/db.provider.ts | 6 +- .../directbilling/service/db.calculation.ts | 4 +- .../service/db.service.status.ts | 4 +- .../directbilling/service/db.service.ts | 12 +- .../service/partial.db.service.ts | 4 +- .../transaction/db.generation.response.ts | 4 +- .../transaction/db.notifications.request.ts | 22 +- .../transaction/db.transaction.request.ts | 6 +- .../transaction/db.transaction.status.ts | 4 +- .../transaction/db.transaction.ts | 8 +- .../transaction/partial.db.transaction.ts | 6 +- src/models/response/paginated.response.ts | 2 +- src/models/sms/service/sms.number.ts | 2 +- src/models/sms/service/sms.service.status.ts | 4 +- src/models/sms/service/sms.service.ts | 6 +- src/models/sms/service/sms.service.type.ts | 4 +- src/models/sms/transaction/sms.transaction.ts | 2 +- src/models/sms/verification.response.ts | 2 +- src/payments/directbilling.ts | 90 +- src/payments/sms.ts | 82 +- src/payments/sms.xml.ts | 9 +- src/tests/directbilling.ts | 38 - src/tests/sms.ts | 40 - tests/directbilling.ts | 47 + tests/index.ts | 9 + tests/sms.ts | 39 + 88 files changed, 2731 insertions(+), 1309 deletions(-) delete mode 100644 lib/index.d.ts delete mode 100644 lib/index.js delete mode 100644 lib/lib/hashing.d.ts delete mode 100644 lib/lib/hashing.js delete mode 100644 lib/models/amount.type.d.ts delete mode 100644 lib/models/amount.type.js delete mode 100644 lib/models/directbilling/db.provider.d.ts delete mode 100644 lib/models/directbilling/db.provider.js delete mode 100644 lib/models/directbilling/service/db.calculation.d.ts delete mode 100644 lib/models/directbilling/service/db.calculation.js delete mode 100644 lib/models/directbilling/service/db.provider.d.ts delete mode 100644 lib/models/directbilling/service/db.provider.js delete mode 100644 lib/models/directbilling/service/db.service.d.ts delete mode 100644 lib/models/directbilling/service/db.service.js delete mode 100644 lib/models/directbilling/service/db.service.status.d.ts delete mode 100644 lib/models/directbilling/service/db.service.status.js delete mode 100644 lib/models/directbilling/service/partial.db.service.d.ts delete mode 100644 lib/models/directbilling/service/partial.db.service.js delete mode 100644 lib/models/directbilling/transaction/db.generation.response.d.ts delete mode 100644 lib/models/directbilling/transaction/db.generation.response.js delete mode 100644 lib/models/directbilling/transaction/db.notifications.request.d.ts delete mode 100644 lib/models/directbilling/transaction/db.notifications.request.js delete mode 100644 lib/models/directbilling/transaction/db.transaction.d.ts delete mode 100644 lib/models/directbilling/transaction/db.transaction.js delete mode 100644 lib/models/directbilling/transaction/db.transaction.request.d.ts delete mode 100644 lib/models/directbilling/transaction/db.transaction.request.js delete mode 100644 lib/models/directbilling/transaction/db.transaction.status.d.ts delete mode 100644 lib/models/directbilling/transaction/db.transaction.status.js delete mode 100644 lib/models/directbilling/transaction/partial.db.transaction.d.ts delete mode 100644 lib/models/directbilling/transaction/partial.db.transaction.js delete mode 100644 lib/models/response/paginated.response.d.ts delete mode 100644 lib/models/response/paginated.response.js delete mode 100644 lib/models/service.status.d.ts delete mode 100644 lib/models/service.status.js delete mode 100644 lib/models/sms/service/sms.number.d.ts delete mode 100644 lib/models/sms/service/sms.number.js delete mode 100644 lib/models/sms/service/sms.service.d.ts delete mode 100644 lib/models/sms/service/sms.service.js delete mode 100644 lib/models/sms/service/sms.service.status.d.ts delete mode 100644 lib/models/sms/service/sms.service.status.js delete mode 100644 lib/models/sms/service/sms.service.type.d.ts delete mode 100644 lib/models/sms/service/sms.service.type.js delete mode 100644 lib/models/sms/transaction/sms.transaction.d.ts delete mode 100644 lib/models/sms/transaction/sms.transaction.js delete mode 100644 lib/models/sms/verification.response.d.ts delete mode 100644 lib/models/sms/verification.response.js delete mode 100644 lib/payments/directbilling.d.ts delete mode 100644 lib/payments/directbilling.js delete mode 100644 lib/payments/sms.d.ts delete mode 100644 lib/payments/sms.js delete mode 100644 lib/payments/sms.xml.d.ts delete mode 100644 lib/payments/sms.xml.js delete mode 100644 lib/test.d.ts delete mode 100644 lib/test.js delete mode 100644 lib/tests/directbilling.d.ts delete mode 100644 lib/tests/directbilling.js delete mode 100644 lib/tests/sms.d.ts delete mode 100644 lib/tests/sms.js create mode 100644 package-lock.json delete mode 100644 src/tests/directbilling.ts delete mode 100644 src/tests/sms.ts create mode 100644 tests/directbilling.ts create mode 100644 tests/index.ts create mode 100644 tests/sms.ts diff --git a/lib/index.d.ts b/lib/index.d.ts deleted file mode 100644 index 2ce63c8..0000000 --- a/lib/index.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -export { DbCalculation } from './models/directbilling/service/db.calculation'; -export { DbProvider, DbProviderID } from './models/directbilling/db.provider'; -export { DbService, DbServiceNotify } from './models/directbilling/service/db.service'; -export { PartialDbService } from './models/directbilling/service/partial.db.service'; -export { DbGenerationResponse } from './models/directbilling/transaction/db.generation.response'; -export { DbTransactionRequest } from './models/directbilling/transaction/db.transaction.request'; -export { DbTransactionStatus } from './models/directbilling/transaction/db.transaction.status'; -export { DbTransaction } from './models/directbilling/transaction/db.transaction'; -export { PartialDbTransaction } from './models/directbilling/transaction/partial.db.transaction'; -export { DBServiceStatus } from './models/directbilling/service/db.service.status'; -export { PaginatedResponse } from './models/response/paginated.response'; -export { AmountType } from './models/amount.type'; -export { SmsNumber } from './models/sms/service/sms.number'; -export { SmsService } from './models/sms/service/sms.service'; -export { SmsServiceType } from './models/sms/service/sms.service.type'; -export { SmsTransaction } from './models/sms/transaction/sms.transaction'; -export { VerificationResponse } from './models/sms/verification.response'; -export { SMSServiceStatus } from './models/sms/service/sms.service.status'; -export { DirectBilling } from './payments/directbilling'; -export { Sms } from './payments/sms'; -export { SmsXml } from './payments/sms.xml'; diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index a2daa46..0000000 --- a/lib/index.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SmsXml = exports.Sms = exports.DirectBilling = exports.SMSServiceStatus = exports.SmsServiceType = exports.AmountType = exports.DBServiceStatus = exports.DbTransactionStatus = exports.DbProviderID = exports.DbProvider = void 0; -var db_provider_1 = require("./models/directbilling/db.provider"); -Object.defineProperty(exports, "DbProvider", { enumerable: true, get: function () { return db_provider_1.DbProvider; } }); -Object.defineProperty(exports, "DbProviderID", { enumerable: true, get: function () { return db_provider_1.DbProviderID; } }); -var db_transaction_status_1 = require("./models/directbilling/transaction/db.transaction.status"); -Object.defineProperty(exports, "DbTransactionStatus", { enumerable: true, get: function () { return db_transaction_status_1.DbTransactionStatus; } }); -var db_service_status_1 = require("./models/directbilling/service/db.service.status"); -Object.defineProperty(exports, "DBServiceStatus", { enumerable: true, get: function () { return db_service_status_1.DBServiceStatus; } }); -var amount_type_1 = require("./models/amount.type"); -Object.defineProperty(exports, "AmountType", { enumerable: true, get: function () { return amount_type_1.AmountType; } }); -var sms_service_type_1 = require("./models/sms/service/sms.service.type"); -Object.defineProperty(exports, "SmsServiceType", { enumerable: true, get: function () { return sms_service_type_1.SmsServiceType; } }); -var sms_service_status_1 = require("./models/sms/service/sms.service.status"); -Object.defineProperty(exports, "SMSServiceStatus", { enumerable: true, get: function () { return sms_service_status_1.SMSServiceStatus; } }); -// Payments -var directbilling_1 = require("./payments/directbilling"); -Object.defineProperty(exports, "DirectBilling", { enumerable: true, get: function () { return directbilling_1.DirectBilling; } }); -var sms_1 = require("./payments/sms"); -Object.defineProperty(exports, "Sms", { enumerable: true, get: function () { return sms_1.Sms; } }); -var sms_xml_1 = require("./payments/sms.xml"); -Object.defineProperty(exports, "SmsXml", { enumerable: true, get: function () { return sms_xml_1.SmsXml; } }); diff --git a/lib/lib/hashing.d.ts b/lib/lib/hashing.d.ts deleted file mode 100644 index 9adf535..0000000 --- a/lib/lib/hashing.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export declare class Hashing { - static sha256(text: string): string; - static sha1(text: string): string; - static md5(text: string): string; - private static hash; -} diff --git a/lib/lib/hashing.js b/lib/lib/hashing.js deleted file mode 100644 index daa33c1..0000000 --- a/lib/lib/hashing.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Hashing = void 0; -const crypto_1 = require("crypto"); -class Hashing { - static sha256(text) { - return Hashing.hash('sha256', text); - } - static sha1(text) { - return Hashing.hash('sha1', text); - } - static md5(text) { - return Hashing.hash('md5', text); - } - static hash(algorithm, text) { - const hash = (0, crypto_1.createHash)(algorithm); - hash.update(text); - return hash.digest('hex'); - } -} -exports.Hashing = Hashing; diff --git a/lib/models/amount.type.d.ts b/lib/models/amount.type.d.ts deleted file mode 100644 index 89a4f61..0000000 --- a/lib/models/amount.type.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export declare enum AmountType { - REQUIRED = "required", - NET = "net", - GROSS = "gross" -} diff --git a/lib/models/amount.type.js b/lib/models/amount.type.js deleted file mode 100644 index e481077..0000000 --- a/lib/models/amount.type.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AmountType = void 0; -var AmountType; -(function (AmountType) { - AmountType["REQUIRED"] = "required"; - AmountType["NET"] = "net"; - AmountType["GROSS"] = "gross"; -})(AmountType = exports.AmountType || (exports.AmountType = {})); diff --git a/lib/models/directbilling/db.provider.d.ts b/lib/models/directbilling/db.provider.d.ts deleted file mode 100644 index bfa2f49..0000000 --- a/lib/models/directbilling/db.provider.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -export declare enum DbProvider { - PLAY = "play", - PLUS = "plus", - ORANGE = "orange", - T_MOBILE = "t-mobile" -} -export declare enum DbProviderID { - ORANGE = 1, - PLUS = 2, - PLAY = 3, - T_MOBILE = 4 -} diff --git a/lib/models/directbilling/db.provider.js b/lib/models/directbilling/db.provider.js deleted file mode 100644 index f43ec03..0000000 --- a/lib/models/directbilling/db.provider.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DbProviderID = exports.DbProvider = void 0; -var DbProvider; -(function (DbProvider) { - DbProvider["PLAY"] = "play"; - DbProvider["PLUS"] = "plus"; - DbProvider["ORANGE"] = "orange"; - DbProvider["T_MOBILE"] = "t-mobile"; -})(DbProvider = exports.DbProvider || (exports.DbProvider = {})); -var DbProviderID; -(function (DbProviderID) { - DbProviderID[DbProviderID["ORANGE"] = 1] = "ORANGE"; - DbProviderID[DbProviderID["PLUS"] = 2] = "PLUS"; - DbProviderID[DbProviderID["PLAY"] = 3] = "PLAY"; - DbProviderID[DbProviderID["T_MOBILE"] = 4] = "T_MOBILE"; -})(DbProviderID = exports.DbProviderID || (exports.DbProviderID = {})); diff --git a/lib/models/directbilling/service/db.calculation.d.ts b/lib/models/directbilling/service/db.calculation.d.ts deleted file mode 100644 index d2655fd..0000000 --- a/lib/models/directbilling/service/db.calculation.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { DbProvider } from '../db.provider'; -export interface DbCalculation { - [DbProvider.PLAY]: DbCalculationAmount; - [DbProvider.PLUS]: DbCalculationAmount; - [DbProvider.ORANGE]: DbCalculationAmount; - [DbProvider.T_MOBILE]: DbCalculationAmount; -} -interface DbCalculationAmount { - net: number; - gross: number; -} -export {}; diff --git a/lib/models/directbilling/service/db.calculation.js b/lib/models/directbilling/service/db.calculation.js deleted file mode 100644 index 60fdfb1..0000000 --- a/lib/models/directbilling/service/db.calculation.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const db_provider_1 = require("../db.provider"); diff --git a/lib/models/directbilling/service/db.provider.d.ts b/lib/models/directbilling/service/db.provider.d.ts deleted file mode 100644 index 71d4cab..0000000 --- a/lib/models/directbilling/service/db.provider.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export declare enum DbProvider { - PLAY = "play", - PLUS = "plus", - ORANGE = "orange", - T_MOBILE = "t-mobile" -} diff --git a/lib/models/directbilling/service/db.provider.js b/lib/models/directbilling/service/db.provider.js deleted file mode 100644 index f42c6f1..0000000 --- a/lib/models/directbilling/service/db.provider.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DbProvider = void 0; -var DbProvider; -(function (DbProvider) { - DbProvider["PLAY"] = "play"; - DbProvider["PLUS"] = "plus"; - DbProvider["ORANGE"] = "orange"; - DbProvider["T_MOBILE"] = "t-mobile"; -})(DbProvider = exports.DbProvider || (exports.DbProvider = {})); diff --git a/lib/models/directbilling/service/db.service.d.ts b/lib/models/directbilling/service/db.service.d.ts deleted file mode 100644 index 928f0bd..0000000 --- a/lib/models/directbilling/service/db.service.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { DBServiceStatus } from '../service/db.service.status'; -import { DbProvider } from '../db.provider'; -export interface DbService { - id: string; - name: string; - suffix: string; - status: DBServiceStatus; - api?: DbServiceNotify; - providers: DbServiceProviders; - commissions: DbServiceProvidersCommission; - maxValues: DbServiceProvidersLimit; - created_at: Date; -} -export interface DbServiceNotify { - success: string; - complete: string; - failure: string; -} -interface DbServiceProviders { - [DbProvider.PLAY]: boolean; - [DbProvider.PLUS]: boolean; - [DbProvider.ORANGE]: boolean; - [DbProvider.T_MOBILE]: boolean; -} -interface DbServiceProvidersCommission { - [DbProvider.PLAY]: DbProviderCommission; - [DbProvider.PLUS]: DbProviderCommission; - [DbProvider.ORANGE]: DbProviderCommission; - [DbProvider.T_MOBILE]: DbProviderCommission; -} -interface DbServiceProvidersLimit { - [DbProvider.PLAY]: string; - [DbProvider.PLUS]: string; - [DbProvider.ORANGE]: string; - [DbProvider.T_MOBILE]: string; -} -interface DbProviderCommission { - commission_0: string; - commission_9: string; - commission_25: string; -} -export {}; diff --git a/lib/models/directbilling/service/db.service.js b/lib/models/directbilling/service/db.service.js deleted file mode 100644 index 60fdfb1..0000000 --- a/lib/models/directbilling/service/db.service.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const db_provider_1 = require("../db.provider"); diff --git a/lib/models/directbilling/service/db.service.status.d.ts b/lib/models/directbilling/service/db.service.status.d.ts deleted file mode 100644 index e67ede7..0000000 --- a/lib/models/directbilling/service/db.service.status.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export declare enum DBServiceStatus { - SERVICE_NEW = "service_db_new", - SERVICE_ACTIVE = "service_db_active", - SERVICE_REJECTED = "service_db_rejected", - SERVICE_ONGOING_REGISTRATION = "service_db_ongoing_registration" -} diff --git a/lib/models/directbilling/service/db.service.status.js b/lib/models/directbilling/service/db.service.status.js deleted file mode 100644 index adcc84b..0000000 --- a/lib/models/directbilling/service/db.service.status.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DBServiceStatus = void 0; -var DBServiceStatus; -(function (DBServiceStatus) { - DBServiceStatus["SERVICE_NEW"] = "service_db_new"; - DBServiceStatus["SERVICE_ACTIVE"] = "service_db_active"; - DBServiceStatus["SERVICE_REJECTED"] = "service_db_rejected"; - DBServiceStatus["SERVICE_ONGOING_REGISTRATION"] = "service_db_ongoing_registration"; -})(DBServiceStatus = exports.DBServiceStatus || (exports.DBServiceStatus = {})); diff --git a/lib/models/directbilling/service/partial.db.service.d.ts b/lib/models/directbilling/service/partial.db.service.d.ts deleted file mode 100644 index 1459980..0000000 --- a/lib/models/directbilling/service/partial.db.service.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { DBServiceStatus } from './db.service.status'; -export interface PartialDbService { - id: string; - name: string; - suffix: string; - status: DBServiceStatus; - created_at: Date; -} diff --git a/lib/models/directbilling/service/partial.db.service.js b/lib/models/directbilling/service/partial.db.service.js deleted file mode 100644 index c8ad2e5..0000000 --- a/lib/models/directbilling/service/partial.db.service.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/lib/models/directbilling/transaction/db.generation.response.d.ts b/lib/models/directbilling/transaction/db.generation.response.d.ts deleted file mode 100644 index aba2970..0000000 --- a/lib/models/directbilling/transaction/db.generation.response.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -export interface DbGenerationResponse { - success: boolean; - data: DbGenerationResponseBody; - errors?: { - [key: string]: string[]; - }; -} -interface DbGenerationResponseBody { - transactionId: string; - redirectUrl: string; -} -export {}; diff --git a/lib/models/directbilling/transaction/db.generation.response.js b/lib/models/directbilling/transaction/db.generation.response.js deleted file mode 100644 index c8ad2e5..0000000 --- a/lib/models/directbilling/transaction/db.generation.response.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/lib/models/directbilling/transaction/db.notifications.request.d.ts b/lib/models/directbilling/transaction/db.notifications.request.d.ts deleted file mode 100644 index 9e87508..0000000 --- a/lib/models/directbilling/transaction/db.notifications.request.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { DbServiceNotify } from '../service/db.service'; -import { DbTransactionStatus } from '../transaction/db.transaction.status'; -import { DbProviderID } from '../db.provider'; -export interface DbNotificationRequest { - id: string; - service_id: string; - status: DbTransactionStatus; - values?: { - net?: number; - gross?: number; - partner?: number; - }; - returns?: DbServiceNotify; - control?: string; - number_from?: string; - provider: DbProviderID; - signature?: string; -} diff --git a/lib/models/directbilling/transaction/db.notifications.request.js b/lib/models/directbilling/transaction/db.notifications.request.js deleted file mode 100644 index c8ad2e5..0000000 --- a/lib/models/directbilling/transaction/db.notifications.request.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/lib/models/directbilling/transaction/db.transaction.d.ts b/lib/models/directbilling/transaction/db.transaction.d.ts deleted file mode 100644 index f2e3a1a..0000000 --- a/lib/models/directbilling/transaction/db.transaction.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { DbTransactionStatus } from './db.transaction.status'; -import { DbProvider } from '../db.provider'; -export interface DbTransaction { - id: string; - status: DbTransactionStatus; - phoneNumber?: string; - control: string; - value: number; - value_netto: number; - operator: DbProvider; - notify: DbTransactionNotify; - created_at: Date; - updated_at: Date; -} -interface DbTransactionNotify { - is_send: boolean; - last_send_at: string; - count: number; -} -export {}; diff --git a/lib/models/directbilling/transaction/db.transaction.js b/lib/models/directbilling/transaction/db.transaction.js deleted file mode 100644 index c8ad2e5..0000000 --- a/lib/models/directbilling/transaction/db.transaction.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/lib/models/directbilling/transaction/db.transaction.request.d.ts b/lib/models/directbilling/transaction/db.transaction.request.d.ts deleted file mode 100644 index ac8db87..0000000 --- a/lib/models/directbilling/transaction/db.transaction.request.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { AmountType } from '../../amount.type'; -import { DbServiceNotify } from '../service/db.service'; -export interface DbTransactionRequest { - amount: number; - amountType?: AmountType; - description?: string; - control?: string; - returns?: DbServiceNotify; - phoneNumber?: string; - signature?: string; - steamid?: string; -} diff --git a/lib/models/directbilling/transaction/db.transaction.request.js b/lib/models/directbilling/transaction/db.transaction.request.js deleted file mode 100644 index c8ad2e5..0000000 --- a/lib/models/directbilling/transaction/db.transaction.request.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/lib/models/directbilling/transaction/db.transaction.status.d.ts b/lib/models/directbilling/transaction/db.transaction.status.d.ts deleted file mode 100644 index 692ea2d..0000000 --- a/lib/models/directbilling/transaction/db.transaction.status.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export declare enum DbTransactionStatus { - TRANSACTION_DB_NEW = "transaction_db_new", - TRANSACTION_DB_CONFIRMED = "transaction_db_confirmed", - TRANSACTION_DB_REJECTED = "transaction_db_rejected", - TRANSACTION_DB_CANCELED = "transaction_db_canceled", - TRANSACTION_DB_PAYED = "transaction_db_payed", - TRANSACTION_DB_GENERATE_ERROR = "transaction_db_generate_error" -} diff --git a/lib/models/directbilling/transaction/db.transaction.status.js b/lib/models/directbilling/transaction/db.transaction.status.js deleted file mode 100644 index 3c496fd..0000000 --- a/lib/models/directbilling/transaction/db.transaction.status.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DbTransactionStatus = void 0; -var DbTransactionStatus; -(function (DbTransactionStatus) { - DbTransactionStatus["TRANSACTION_DB_NEW"] = "transaction_db_new"; - DbTransactionStatus["TRANSACTION_DB_CONFIRMED"] = "transaction_db_confirmed"; - DbTransactionStatus["TRANSACTION_DB_REJECTED"] = "transaction_db_rejected"; - DbTransactionStatus["TRANSACTION_DB_CANCELED"] = "transaction_db_canceled"; - DbTransactionStatus["TRANSACTION_DB_PAYED"] = "transaction_db_payed"; - DbTransactionStatus["TRANSACTION_DB_GENERATE_ERROR"] = "transaction_db_generate_error"; -})(DbTransactionStatus = exports.DbTransactionStatus || (exports.DbTransactionStatus = {})); diff --git a/lib/models/directbilling/transaction/partial.db.transaction.d.ts b/lib/models/directbilling/transaction/partial.db.transaction.d.ts deleted file mode 100644 index 294d487..0000000 --- a/lib/models/directbilling/transaction/partial.db.transaction.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { DbProvider } from '../db.provider'; -import { DbTransactionStatus } from './db.transaction.status'; -export interface PartialDbTransaction { - id: string; - status: DbTransactionStatus; - value: number; - value_netto: number; - operator: DbProvider; - created_at: Date; - updated_at: Date; -} diff --git a/lib/models/directbilling/transaction/partial.db.transaction.js b/lib/models/directbilling/transaction/partial.db.transaction.js deleted file mode 100644 index c8ad2e5..0000000 --- a/lib/models/directbilling/transaction/partial.db.transaction.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/lib/models/response/paginated.response.d.ts b/lib/models/response/paginated.response.d.ts deleted file mode 100644 index 42f2bb4..0000000 --- a/lib/models/response/paginated.response.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -export interface PaginatedResponse { - success: boolean; - data: T[]; - pagination: Pagination; -} -interface Pagination { - total: number; - count: number; - per_page: number; - current_page: number; - total_pages: number; - links: PaginationLinks; -} -interface PaginationLinks { - next_page: string | null; - prev_page: string | null; -} -export {}; diff --git a/lib/models/response/paginated.response.js b/lib/models/response/paginated.response.js deleted file mode 100644 index c8ad2e5..0000000 --- a/lib/models/response/paginated.response.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/lib/models/service.status.d.ts b/lib/models/service.status.d.ts deleted file mode 100644 index 830b6bd..0000000 --- a/lib/models/service.status.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export declare enum ServiceStatus { - SERVICE_NEW = "service_new", - SERVICE_ACTIVE = "service_active", - SERVICE_BLOCKED = "service_blocked", - SERVICE_DELETED = "service_deleted", - SERVICE_SECOND_VERIFY = "service_second_verify", - SERVICE_REJECTED = "service_rejected", - SERVICE_VERIFY = "service_verify", - SERVICE_ONGOING_REGISTRATION = "service_ongoing_registration" -} diff --git a/lib/models/service.status.js b/lib/models/service.status.js deleted file mode 100644 index b0c2028..0000000 --- a/lib/models/service.status.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ServiceStatus = void 0; -var ServiceStatus; -(function (ServiceStatus) { - ServiceStatus["SERVICE_NEW"] = "service_new"; - ServiceStatus["SERVICE_ACTIVE"] = "service_active"; - ServiceStatus["SERVICE_BLOCKED"] = "service_blocked"; - ServiceStatus["SERVICE_DELETED"] = "service_deleted"; - ServiceStatus["SERVICE_SECOND_VERIFY"] = "service_second_verify"; - ServiceStatus["SERVICE_REJECTED"] = "service_rejected"; - ServiceStatus["SERVICE_VERIFY"] = "service_verify"; - ServiceStatus["SERVICE_ONGOING_REGISTRATION"] = "service_ongoing_registration"; -})(ServiceStatus = exports.ServiceStatus || (exports.ServiceStatus = {})); diff --git a/lib/models/sms/service/sms.number.d.ts b/lib/models/sms/service/sms.number.d.ts deleted file mode 100644 index 27f8329..0000000 --- a/lib/models/sms/service/sms.number.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface SmsNumber { - number: number; - value: number; - value_gross: number; - adult: boolean; -} diff --git a/lib/models/sms/service/sms.number.js b/lib/models/sms/service/sms.number.js deleted file mode 100644 index c8ad2e5..0000000 --- a/lib/models/sms/service/sms.number.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/lib/models/sms/service/sms.service.d.ts b/lib/models/sms/service/sms.service.d.ts deleted file mode 100644 index 79cf0f2..0000000 --- a/lib/models/sms/service/sms.service.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { SmsServiceType } from './sms.service.type'; -import { SMSServiceStatus } from './sms.service.status'; -export interface SmsService { - id: string; - type: SmsServiceType; - status: SMSServiceStatus; - name: string; - prefix: string; - suffix: string; - adult: boolean; - numbers?: string[]; - created_at: Date; -} diff --git a/lib/models/sms/service/sms.service.js b/lib/models/sms/service/sms.service.js deleted file mode 100644 index c8ad2e5..0000000 --- a/lib/models/sms/service/sms.service.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/lib/models/sms/service/sms.service.status.d.ts b/lib/models/sms/service/sms.service.status.d.ts deleted file mode 100644 index 9843431..0000000 --- a/lib/models/sms/service/sms.service.status.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export declare enum SMSServiceStatus { - SERVICE_NEW = "service_new", - SERVICE_ACTIVE = "service_active", - SERVICE_BLOCKED = "service_blocked", - SERVICE_DELETED = "service_deleted", - SERVICE_SECOND_VERIFY = "service_second_verify", - SERVICE_REJECTED = "service_rejected", - SERVICE_VERIFY = "service_verify", - SERVICE_ONGOING_REGISTRATION = "service_ongoing_registration" -} diff --git a/lib/models/sms/service/sms.service.status.js b/lib/models/sms/service/sms.service.status.js deleted file mode 100644 index baf212c..0000000 --- a/lib/models/sms/service/sms.service.status.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SMSServiceStatus = void 0; -var SMSServiceStatus; -(function (SMSServiceStatus) { - SMSServiceStatus["SERVICE_NEW"] = "service_new"; - SMSServiceStatus["SERVICE_ACTIVE"] = "service_active"; - SMSServiceStatus["SERVICE_BLOCKED"] = "service_blocked"; - SMSServiceStatus["SERVICE_DELETED"] = "service_deleted"; - SMSServiceStatus["SERVICE_SECOND_VERIFY"] = "service_second_verify"; - SMSServiceStatus["SERVICE_REJECTED"] = "service_rejected"; - SMSServiceStatus["SERVICE_VERIFY"] = "service_verify"; - SMSServiceStatus["SERVICE_ONGOING_REGISTRATION"] = "service_ongoing_registration"; -})(SMSServiceStatus = exports.SMSServiceStatus || (exports.SMSServiceStatus = {})); diff --git a/lib/models/sms/service/sms.service.type.d.ts b/lib/models/sms/service/sms.service.type.d.ts deleted file mode 100644 index 296ded9..0000000 --- a/lib/models/sms/service/sms.service.type.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export declare enum SmsServiceType { - ONE_TIME_CODE = "ONE_TIME_CODE", - CODE_PACK = "CODE_PACK", - API_URL = "API_URL" -} diff --git a/lib/models/sms/service/sms.service.type.js b/lib/models/sms/service/sms.service.type.js deleted file mode 100644 index 53b039c..0000000 --- a/lib/models/sms/service/sms.service.type.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SmsServiceType = void 0; -var SmsServiceType; -(function (SmsServiceType) { - SmsServiceType["ONE_TIME_CODE"] = "ONE_TIME_CODE"; - SmsServiceType["CODE_PACK"] = "CODE_PACK"; - SmsServiceType["API_URL"] = "API_URL"; -})(SmsServiceType = exports.SmsServiceType || (exports.SmsServiceType = {})); diff --git a/lib/models/sms/transaction/sms.transaction.d.ts b/lib/models/sms/transaction/sms.transaction.d.ts deleted file mode 100644 index 10ecbf9..0000000 --- a/lib/models/sms/transaction/sms.transaction.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export interface SmsTransaction { - id: number; - from: number; - code: string; - used: boolean; - send_number?: number; - value?: number; - send_at: Date; -} diff --git a/lib/models/sms/transaction/sms.transaction.js b/lib/models/sms/transaction/sms.transaction.js deleted file mode 100644 index c8ad2e5..0000000 --- a/lib/models/sms/transaction/sms.transaction.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/lib/models/sms/verification.response.d.ts b/lib/models/sms/verification.response.d.ts deleted file mode 100644 index 826490d..0000000 --- a/lib/models/sms/verification.response.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export interface VerificationResponse { - used: boolean; - code: string; - test: boolean; - from: number; - number: number; - value: number; - used_at: Date; -} diff --git a/lib/models/sms/verification.response.js b/lib/models/sms/verification.response.js deleted file mode 100644 index c8ad2e5..0000000 --- a/lib/models/sms/verification.response.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/lib/payments/directbilling.d.ts b/lib/payments/directbilling.d.ts deleted file mode 100644 index 8f768fe..0000000 --- a/lib/payments/directbilling.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { PaginatedResponse } from '../models/response/paginated.response'; -import { DbService } from '../models/directbilling/service/db.service'; -import { PartialDbService } from '../models/directbilling/service/partial.db.service'; -import { DbCalculation } from '../models/directbilling/service/db.calculation'; -import { PartialDbTransaction } from '../models/directbilling/transaction/partial.db.transaction'; -import { DbTransaction } from '../models/directbilling/transaction/db.transaction'; -import { DbGenerationResponse } from '../models/directbilling/transaction/db.generation.response'; -import { DbTransactionRequest } from '../models/directbilling/transaction/db.transaction.request'; -import { DbNotificationRequest } from '../models/directbilling/transaction/db.notifications.request'; -export declare class DirectBilling { - private readonly key; - private readonly password; - private readonly client; - constructor(key: string, password: string); - getServices(): Promise; - getServicesPaginated(page?: number, pageSize?: number): Promise>; - getService(id: string): Promise; - calculateCommission(serviceId: string, amount: number): Promise; - getTransactions(serviceId: string): Promise; - getTransactionsPaginated(serviceId: string, page?: number, pageSize?: number): Promise>; - getTransaction(serviceId: string, transactionId: string): Promise; - createTransaction(serviceId: string, key: string, request: DbTransactionRequest): Promise; - checkNotification(key: string, body: any): DbNotificationRequest | undefined; - generateSignature(key: string, request: DbTransactionRequest): string; - generateSignatureNotification(key: string, request: DbNotificationRequest): string; -} diff --git a/lib/payments/directbilling.js b/lib/payments/directbilling.js deleted file mode 100644 index 3e000ee..0000000 --- a/lib/payments/directbilling.js +++ /dev/null @@ -1,188 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DirectBilling = void 0; -const axios_1 = require("axios"); -const hashing_1 = require("../lib/hashing"); -class DirectBilling { - constructor(key, password) { - this.key = key; - this.password = password; - this.client = axios_1.default.create({ - baseURL: 'https://api.simpay.pl/directbilling', - headers: { - 'X-SIM-KEY': this.key, - 'X-SIM-PASSWORD': this.password, - 'X-SIM-VERSION': '2.2.2', - 'X-SIM-PLATFORM': 'TYPESCRIPT', - } - }); - } - /* - https://docs.simpay.pl/pl/typescript/?typescript#directbilling-pobieranie-listy-uslug - */ - getServices() { - return __awaiter(this, void 0, void 0, function* () { - const result = []; - let response = yield this.client.get('/'); - result.push(...response.data.data); - while (response.data.pagination.links.next_page !== null) { - response = yield this.client.get(`/?page=${+response.data.pagination.current_page + 1}`); - result.push(...response.data.data); - } - return result.map(e => { - e.created_at = new Date(e.created_at.replace(' ', 'T')); - return e; - }); - }); - } - getServicesPaginated(page, pageSize) { - return __awaiter(this, void 0, void 0, function* () { - const query = {}; - if (page) - query.page = `${page}`; - if (pageSize) - query.limit = `${pageSize}`; - const url = `/?${new URLSearchParams(query).toString()}`; - const response = (yield this.client.get(url)).data; - response.data = response.data.map((e) => { - e.created_at = new Date(e.created_at.replace(' ', 'T')); - return e; - }); - return response; - }); - } - /* - https://docs.simpay.pl/pl/typescript/?typescript#directbilling-pobieranie-informacji-o-usludze - */ - getService(id) { - return __awaiter(this, void 0, void 0, function* () { - try { - const service = (yield this.client.get(`/${id}`)).data.data; - service.created_at = new Date(service.created_at.replace(' ', 'T')); - return service; - } - catch (e) { - return undefined; - } - }); - } - /* - https://docs.simpay.pl/pl/typescript/?typescript#directbilling-kalkulacja-prowizji - */ - calculateCommission(serviceId, amount) { - return __awaiter(this, void 0, void 0, function* () { - return (yield this.client.get(`/${serviceId}/calculate?amount=${amount}`)).data.data; - }); - } - /* - https://docs.simpay.pl/pl/typescript/?typescript#directbilling-pobieranie-listy-transakcji - */ - getTransactions(serviceId) { - return __awaiter(this, void 0, void 0, function* () { - const result = []; - let response = yield this.client.get(`/${serviceId}/transactions`); - result.push(...response.data.data); - while (response.data.pagination.links.next_page !== null) { - response = yield this.client.get(`/${serviceId}/transactions?page=${response.data.pagination.current_page + 1}`); - result.push(...response.data.data); - } - return result.map(e => { - e.created_at = new Date(e.created_at.replace(' ', 'T')); - e.updated_at = new Date(e.updated_at.replace(' ', 'T')); - return e; - }); - }); - } - getTransactionsPaginated(serviceId, page, pageSize) { - return __awaiter(this, void 0, void 0, function* () { - const query = {}; - if (page) - query.page = `${page}`; - if (pageSize) - query.limit = `${pageSize}`; - const url = `/${serviceId}/transactions?${new URLSearchParams(query).toString()}`; - const response = (yield this.client.get(url)).data; - response.data = response.data.map((e) => { - e.created_at = new Date(e.created_at.replace(' ', 'T')); - e.updated_at = new Date(e.updated_at.replace(' ', 'T')); - return e; - }); - return response; - }); - } - /* - https://docs.simpay.pl/pl/typescript/?typescript#directbilling-pobieranie-informacji-o-transakcji - */ - getTransaction(serviceId, transactionId) { - return __awaiter(this, void 0, void 0, function* () { - const transaction = (yield this.client.get(`/${serviceId}/transactions/${transactionId}`)).data.data; - transaction.created_at = new Date(transaction.created_at.replace(' ', 'T')); - transaction.updated_at = new Date(transaction.updated_at.replace(' ', 'T')); - return transaction; - }); - } - /* - https://docs.simpay.pl/pl/typescript/?typescript#directbilling-generowanie-transakcji - */ - createTransaction(serviceId, key, request) { - return __awaiter(this, void 0, void 0, function* () { - request.signature = this.generateSignature(key, request); - return (yield this.client.post(`/${serviceId}/transactions`, request)).data; - }); - } - /* - https://docs.simpay.pl/shell/?shell#directbilling-generowanie-transakcji - */ - checkNotification(key, body) { - const signature = this.generateSignatureNotification(key, body); - if (body.signature !== signature) - return undefined; - return body; - } - /* - https://docs.simpay.pl/shell/?shell#directbilling-generowanie-transakcji - */ - generateSignature(key, request) { - var _a, _b; - const elements = [ - request.amount, - request.amountType, - request.description, - request.control, - (_a = request.returns) === null || _a === void 0 ? void 0 : _a.success, - (_b = request.returns) === null || _b === void 0 ? void 0 : _b.failure, - request.phoneNumber, - request.steamid, - key - ].filter(e => e !== undefined && e !== null); - return hashing_1.Hashing.sha256(elements.join('|')); - } - generateSignatureNotification(key, request) { - var _a, _b, _c, _d, _e; - const elements = [ - request.id, - request.service_id, - request.status, - (_a = request.values) === null || _a === void 0 ? void 0 : _a.net, - (_b = request.values) === null || _b === void 0 ? void 0 : _b.gross, - (_c = request.values) === null || _c === void 0 ? void 0 : _c.partner, - (_d = request.returns) === null || _d === void 0 ? void 0 : _d.complete, - (_e = request.returns) === null || _e === void 0 ? void 0 : _e.failure, - request.control, - request.number_from, - request.provider, - key - ].filter(e => e !== undefined && e !== null); - return hashing_1.Hashing.sha256(elements.join('|')); - } -} -exports.DirectBilling = DirectBilling; diff --git a/lib/payments/sms.d.ts b/lib/payments/sms.d.ts deleted file mode 100644 index 6a401b1..0000000 --- a/lib/payments/sms.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { SmsService } from '../models/sms/service/sms.service'; -import { SmsTransaction } from '../models/sms/transaction/sms.transaction'; -import { SmsNumber } from '../models/sms/service/sms.number'; -import { PaginatedResponse } from '../models/response/paginated.response'; -import { VerificationResponse } from '../models/sms/verification.response'; -export declare class Sms { - private readonly key; - private readonly password; - private readonly client; - constructor(key: string, password: string); - getServices(): Promise; - getServicesPaginated(page?: number, pageSize?: number): Promise>; - getService(id: string): Promise; - getTransactions(serviceId: string): Promise; - getTransactionsPaginated(serviceId: string, page?: number, pageSize?: number): Promise>; - getTransaction(serviceId: string, transactionId: number): Promise; - getServiceNumbers(serviceId: string): Promise; - getServiceNumbersPaginated(serviceId: string, page?: number, pageSize?: number): Promise>; - getServiceNumber(serviceId: string, number: number): Promise; - getNumbers(): Promise; - getNumbersPaginated(page?: number, pageSize?: number): Promise>; - getNumber(number: number): Promise; - verifySmsCode(serviceId: string, code: string, number?: number): Promise; -} diff --git a/lib/payments/sms.js b/lib/payments/sms.js deleted file mode 100644 index 60e696d..0000000 --- a/lib/payments/sms.js +++ /dev/null @@ -1,197 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Sms = void 0; -const axios_1 = require("axios"); -class Sms { - constructor(key, password) { - this.key = key; - this.password = password; - this.client = axios_1.default.create({ - baseURL: 'https://api.simpay.pl/sms', - headers: { - 'X-SIM-KEY': this.key, - 'X-SIM-PASSWORD': this.password, - 'X-SIM-VERSION': '2.2.2', - 'X-SIM-PLATFORM': 'TYPESCRIPT', - } - }); - } - /* - https://docs.simpay.pl/pl/typescript/?typescript#sms-pobieranie-listy-uslug - */ - getServices() { - return __awaiter(this, void 0, void 0, function* () { - const result = []; - let response = yield this.client.get('/'); - result.push(...response.data.data); - while (response.data.pagination.links.next_page !== null) { - response = yield this.client.get(`/?page=${response.data.pagination.current_page + 1}`); - result.push(...response.data.data); - } - return result.map(e => { - e.created_at = new Date(e.created_at.replace(' ', 'T')); - return e; - }); - }); - } - getServicesPaginated(page, pageSize) { - return __awaiter(this, void 0, void 0, function* () { - const query = {}; - if (page) - query.page = `${page}`; - if (pageSize) - query.limit = `${pageSize}`; - const url = `/?${new URLSearchParams(query).toString()}`; - const response = (yield this.client.get(url)).data; - response.data = response.data.map((e) => { - e.created_at = new Date(e.created_at.replace(' ', 'T')); - return e; - }); - return response; - }); - } - /* - https://docs.simpay.pl/pl/typescript/?typescript#sms-pobieranie-informacji-o-usludze - */ - getService(id) { - return __awaiter(this, void 0, void 0, function* () { - const service = (yield this.client.get(`/${id}`)).data.data; - service.created_at = new Date(service.created_at.replace(' ', 'T')); - return service; - }); - } - /* - https://docs.simpay.pl/pl/typescript/?typescript#sms-pobieranie-listy-transakcji - */ - getTransactions(serviceId) { - return __awaiter(this, void 0, void 0, function* () { - const result = []; - let response = yield this.client.get(`/${serviceId}/transactions`); - result.push(...response.data.data); - while (response.data.pagination.links.next_page !== null) { - response = yield this.client.get(`/${serviceId}/transactions?page=${response.data.pagination.current_page + 1}`); - result.push(...response.data.data); - } - return result.map(e => { - e.send_at = new Date(e.send_at.replace(' ', 'T')); - return e; - }); - }); - } - getTransactionsPaginated(serviceId, page, pageSize) { - return __awaiter(this, void 0, void 0, function* () { - const query = {}; - if (page) - query.page = `${page}`; - if (pageSize) - query.limit = `${pageSize}`; - const url = `/${serviceId}/transactions?${new URLSearchParams(query).toString()}`; - const response = (yield this.client.get(url)).data; - response.data = response.data.map((e) => { - e.send_at = new Date(e.send_at.replace(' ', 'T')); - return e; - }); - return response; - }); - } - /* - https://docs.simpay.pl/pl/typescript/?typescript#sms-pobieranie-informacji-o-transakcji - */ - getTransaction(serviceId, transactionId) { - return __awaiter(this, void 0, void 0, function* () { - const transaction = (yield this.client.get(`/${serviceId}/transactions/${transactionId}`)).data.data; - transaction.send_at = new Date(transaction.send_at.replace(' ', 'T')); - return transaction; - }); - } - /* - https://docs.simpay.pl/pl/typescript/?typescript#sms-pobieranie-dostepnych-numerow-dla-uslugi - */ - getServiceNumbers(serviceId) { - return __awaiter(this, void 0, void 0, function* () { - const result = []; - let response = yield this.client.get(`/${serviceId}/numbers`); - result.push(...response.data.data); - while (response.data.pagination.links.next_page !== null) { - response = yield this.client.get(`/${serviceId}/numbers?page=${response.data.pagination.current_page + 1}`); - result.push(...response.data.data); - } - return result; - }); - } - getServiceNumbersPaginated(serviceId, page, pageSize) { - return __awaiter(this, void 0, void 0, function* () { - const query = {}; - if (page) - query.page = `${page}`; - if (pageSize) - query.limit = `${pageSize}`; - const url = `/${serviceId}/numbers?${new URLSearchParams(query).toString()}`; - return (yield this.client.get(url)).data; - }); - } - /* - https://docs.simpay.pl/pl/typescript/?typescript#sms-informacji-o-pojedynczym-numerze-uslugi - */ - getServiceNumber(serviceId, number) { - return __awaiter(this, void 0, void 0, function* () { - return (yield this.client.get(`/${serviceId}/numbers/${number}`)).data.data; - }); - } - /* - https://docs.simpay.pl/pl/typescript/?typescript#sms-pobieranie-wszystkich-dostepnych-numerow - */ - getNumbers() { - return __awaiter(this, void 0, void 0, function* () { - const result = []; - let response = yield this.client.get('/numbers'); - result.push(...response.data.data); - while (response.data.pagination.links.next_page !== null) { - response = yield this.client.get(`/numbers?page=${response.data.pagination.current_page + 1}`); - result.push(...response.data.data); - } - return result; - }); - } - getNumbersPaginated(page, pageSize) { - return __awaiter(this, void 0, void 0, function* () { - const query = {}; - if (page) - query.page = `${page}`; - if (pageSize) - query.limit = `${pageSize}`; - const url = `/numbers?${new URLSearchParams(query).toString()}`; - return (yield this.client.get(url)).data; - }); - } - /* - https://docs.simpay.pl/pl/typescript/?typescript#sms-pobieranie-pojedynczego-numeru-sms - */ - getNumber(number) { - return __awaiter(this, void 0, void 0, function* () { - return (yield this.client.get(`/numbers/${number}`)).data.data; - }); - } - /* - https://docs.simpay.pl/pl/typescript/?typescript#sms-weryfikacja-poprawnosci-kodu - */ - verifySmsCode(serviceId, code, number) { - return __awaiter(this, void 0, void 0, function* () { - const response = (yield this.client.post(`/${serviceId}`, { code, number })).data.data; - if (response.used_at) { - response.used_at = new Date(response.used_at.replace(' ', 'T')); - } - return response; - }); - } -} -exports.Sms = Sms; diff --git a/lib/payments/sms.xml.d.ts b/lib/payments/sms.xml.d.ts deleted file mode 100644 index 696eac4..0000000 --- a/lib/payments/sms.xml.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -export declare class SmsXml { - private apiKey; - private static charset; - private static params; - private static codes; - constructor(apiKey: string); - checkParameters(map: any): boolean; - generateCode(): string; - getSmsValue(phone: string): number; - generateXml(text: string): string; - private sign; - private random; -} diff --git a/lib/payments/sms.xml.js b/lib/payments/sms.xml.js deleted file mode 100644 index 7ddd3e1..0000000 --- a/lib/payments/sms.xml.js +++ /dev/null @@ -1,79 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SmsXml = void 0; -const hashing_1 = require("../lib/hashing"); -class SmsXml { - constructor(apiKey) { - this.apiKey = apiKey; - } - /* - https://docs.simpay.pl/pl/typescript/?typescript#smsxml-odbieranie-informacji-o-sms - */ - checkParameters(map) { - for (const param of SmsXml.params) { - if (!map[param]) - return false; - } - return map.sign === this.sign(map); - } - /* - https://docs.simpay.pl/pl/typescript/?typescript#smsxml-odbieranie-informacji-o-sms - */ - generateCode() { - let result = ''; - for (let i = 0; i < 6; i++) { - result += SmsXml.charset.charAt(this.random(0, SmsXml.charset.length)); - } - return result; - } - /* - https://docs.simpay.pl/pl/typescript/?typescript#smsxml-odbieranie-informacji-o-sms - */ - getSmsValue(phone) { - return SmsXml.codes[phone]; - } - /* - https://docs.simpay.pl/pl/typescript/?typescript#smsxml-odbieranie-informacji-o-sms - */ - generateXml(text) { - return `${text.normalize('NFKD')}`; - } - sign(map) { - // eslint-disable-next-line @typescript-eslint/restrict-template-expressions - return hashing_1.Hashing.sha256(`${map.sms_id}${map.sms_text}${map.sms_from}${map.send_number}${map.send_time}${this.apiKey}`); - } - random(min, max) { - return Math.random() * (max - min) + min; - } -} -SmsXml.charset = 'ABCDEFGHIJKLMNPQRSTUVWXYZ123456789'; -SmsXml.params = ['send_number', 'sms_text', 'sms_from', 'sms_id', 'sign']; -SmsXml.codes = { - '7055': 0.25, - '7136': 0.5, - '7255': 1.0, - '7355': 1.5, - '7455': 2.0, - '7555': 2.5, - '7636': 3.0, - '77464': 3.5, - '78464': 4.0, - '7936': 4.5, - '91055': 5.0, - '91155': 5.5, - '91455': 7.0, - '91664': 8.0, - '91955': 9.5, - '92055': 10.0, - '92555': 12.5, - '70908': 0.25, - '71908': 0.5, - '72998': 1, - '73908': 1.5, - '75908': 2.5, - '76908': 3, - '79908': 4.5, - '91998': 9.5, - '92598': 12.5, -}; -exports.SmsXml = SmsXml; diff --git a/lib/test.d.ts b/lib/test.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/lib/test.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/lib/test.js b/lib/test.js deleted file mode 100644 index 59af5eb..0000000 --- a/lib/test.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const directbilling_1 = require("./payments/directbilling"); -const run = () => __awaiter(void 0, void 0, void 0, function* () { - const db = new directbilling_1.DirectBilling('0b4dca15', '3eea38f407073ff0abff956b57d71783'); - /* - const transaction = await db.createTransaction(3549, 'iVjvIqZuw967Ntda', { - amount: 100 - }); */ - console.log(yield db.getService(158)); -}); -// eslint-disable-next-line @typescript-eslint/no-empty-function -void run(); diff --git a/lib/tests/directbilling.d.ts b/lib/tests/directbilling.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/lib/tests/directbilling.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/lib/tests/directbilling.js b/lib/tests/directbilling.js deleted file mode 100644 index 39ab240..0000000 --- a/lib/tests/directbilling.js +++ /dev/null @@ -1,38 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const directbilling_1 = require("../payments/directbilling"); -const amount_type_1 = require("../models/amount.type"); -const run = () => __awaiter(void 0, void 0, void 0, function* () { - const db = new directbilling_1.DirectBilling('0b4dca15', '3eea38f407073ff0abff956b57d71783'); - // https://docs.simpay.pl/pl/typescript/?typescript#directbilling-pobieranie-listy-uslug - console.log(yield db.getServices()); - console.log(yield db.getServicesPaginated(1, 100)); - // https://docs.simpay.pl/pl/typescript/?typescript#directbilling-pobieranie-informacji-o-usludze - console.log(yield db.getService('19f3b33c')); - // https://docs.simpay.pl/pl/typescript/?typescript#directbilling-kalkulacja-prowizji - console.log(yield db.calculateCommission('19f3b33c', 10.00)); - // https://docs.simpay.pl/pl/typescript/?typescript#directbilling-pobieranie-listy-transakcji - const transactionsList = yield db.getTransactions('19f3b33c'); - console.log(transactionsList); - console.log(yield db.getTransactionsPaginated('19f3b33c', 1, 100)); - // https://docs.simpay.pl/pl/typescript/?typescript#directbilling-pobieranie-informacji-o-transakcji - console.log(yield db.getTransaction('19f3b33c', transactionsList === null || transactionsList === void 0 ? void 0 : transactionsList[0].id)); - // https://docs.simpay.pl/pl/typescript/?typescript#directbilling-generowanie-transakcji - console.log(yield db.createTransaction('19f3b33c', 'key', { - amount: 10.00, - amountType: amount_type_1.AmountType.GROSS, - control: 'test' - })); - console.log(db.checkNotification('key', {})); -}); -// eslint-disable-next-line @typescript-eslint/no-empty-function -void run(); diff --git a/lib/tests/sms.d.ts b/lib/tests/sms.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/lib/tests/sms.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/lib/tests/sms.js b/lib/tests/sms.js deleted file mode 100644 index 88d3ca6..0000000 --- a/lib/tests/sms.js +++ /dev/null @@ -1,40 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const sms_1 = require("../payments/sms"); -const run = () => __awaiter(void 0, void 0, void 0, function* () { - const sms = new sms_1.Sms('0b4dca15', '3eea38f407073ff0abff956b57d71783'); - // https://docs.simpay.pl/pl/typescript/?typescript#sms-pobieranie-listy-uslug - console.log(yield sms.getServices()); - console.log(yield sms.getServicesPaginated(1, 100)); - // https://docs.simpay.pl/pl/typescript/?typescript#sms-pobieranie-informacji-o-usludze - console.log(yield sms.getService('d151e4f9')); - // https://docs.simpay.pl/pl/typescript/?typescript#sms-pobieranie-listy-transakcji - console.log(yield sms.getTransactions('d151e4f9')); - console.log(yield sms.getTransactionsPaginated('d151e4f9', 1, 100)); - // https://docs.simpay.pl/pl/typescript/?typescript#sms-pobieranie-informacji-o-transakcji - console.log(yield sms.getTransaction('d151e4f9', 2216609)); - // https://docs.simpay.pl/pl/typescript/?typescript#sms-pobieranie-dostepnych-numerow-dla-uslugi - console.log(yield sms.getServiceNumbers('d151e4f9')); - console.log(yield sms.getServiceNumbersPaginated('d151e4f9', 1, 100)); - // https://docs.simpay.pl/pl/typescript/?typescript#sms-informacji-o-pojedynczym-numerze-uslugi - console.log(yield sms.getServiceNumber('d151e4f9', 7055)); - // https://docs.simpay.pl/pl/typescript/?typescript#sms-pobieranie-wszystkich-dostepnych-numerow - console.log(yield sms.getNumbers()); - console.log(yield sms.getNumbersPaginated(1, 100)); - // https://docs.simpay.pl/pl/typescript/?typescript#sms-pobieranie-pojedynczego-numeru-sms - console.log(yield sms.getNumber(7055)); - // https://docs.simpay.pl/pl/typescript/?typescript#sms-weryfikacja-poprawnosci-kodu - console.log(yield sms.verifySmsCode('d151e4f9', '81FFC5', 7055)); - console.log(yield sms.verifySmsCode('d151e4f9', '81FFC5')); -}); -// eslint-disable-next-line @typescript-eslint/no-empty-function -void run(); diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..5004a44 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,2426 @@ +{ + "name": "simpay-typescript-api", + "version": "3.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "simpay-typescript-api", + "version": "3.0.0", + "license": "MIT", + "dependencies": { + "axios": "^1.7.7" + }, + "devDependencies": { + "@arethetypeswrong/cli": "^0.16.1", + "@biomejs/biome": "1.8.3", + "@changesets/cli": "^2.27.8", + "@types/node": "^22.5.4", + "ts-node": "^10.9.2", + "typescript": "^5.5.4" + }, + "engines": { + "node": ">=20.17.0" + } + }, + "node_modules/@andrewbranch/untar.js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@andrewbranch/untar.js/-/untar.js-1.0.3.tgz", + "integrity": "sha512-Jh15/qVmrLGhkKJBdXlK1+9tY4lZruYjsgkDFj08ZmDiWVBLJcqkok7Z0/R0In+i1rScBpJlSvrTS2Lm41Pbnw==", + "dev": true + }, + "node_modules/@arethetypeswrong/cli": { + "version": "0.16.1", + "resolved": "https://registry.npmjs.org/@arethetypeswrong/cli/-/cli-0.16.1.tgz", + "integrity": "sha512-GqwCVNwgSyXhn9qzuPU565zYvs+P0P4NbDEieVaYvtS+mtKh0S+98vkWzJMs4gsLHPrHgfJ5ZQfexrow7ENxvQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@arethetypeswrong/core": "0.16.0", + "chalk": "^4.1.2", + "cli-table3": "^0.6.3", + "commander": "^10.0.1", + "marked": "^9.1.2", + "marked-terminal": "^7.1.0", + "semver": "^7.5.4" + }, + "bin": { + "attw": "dist/index.js" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@arethetypeswrong/core": { + "version": "0.16.0", + "resolved": "https://registry.npmjs.org/@arethetypeswrong/core/-/core-0.16.0.tgz", + "integrity": "sha512-4OC0kwoBr5tVltLRrx8ENX7Dr4xNXDfJZ8uFdA2/+jZXC7+sXBpicQBzq5EMAUF5UmLrl82ArYBE7FymbkCkXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@andrewbranch/untar.js": "^1.0.3", + "cjs-module-lexer": "^1.2.3", + "fflate": "^0.8.2", + "lru-cache": "^11.0.1", + "semver": "^7.5.4", + "typescript": "5.6.1-rc", + "validate-npm-package-name": "^5.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@arethetypeswrong/core/node_modules/typescript": { + "version": "5.6.1-rc", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.1-rc.tgz", + "integrity": "sha512-E3b2+1zEFu84jB0YQi9BORDjz9+jGbwwy1Zi3G0LUNw7a7cePUrHMRNy8aPh53nXpkFGVHSxIZo5vKTfYaFiBQ==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/@babel/runtime": { + "version": "7.25.6", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.25.6.tgz", + "integrity": "sha512-VBj9MYyDb9tuLq7yzqjgzt6Q+IBQLrGZfdjOekyEirZPHxXWoTSGUTMrpsfi58Up73d13NfYLv8HT9vmznjzhQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "regenerator-runtime": "^0.14.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@biomejs/biome": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-1.8.3.tgz", + "integrity": "sha512-/uUV3MV+vyAczO+vKrPdOW0Iaet7UnJMU4bNMinggGJTAnBPjCoLEYcyYtYHNnUNYlv4xZMH6hVIQCAozq8d5w==", + "dev": true, + "hasInstallScript": true, + "license": "MIT OR Apache-2.0", + "bin": { + "biome": "bin/biome" + }, + "engines": { + "node": ">=14.21.3" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/biome" + }, + "optionalDependencies": { + "@biomejs/cli-darwin-arm64": "1.8.3", + "@biomejs/cli-darwin-x64": "1.8.3", + "@biomejs/cli-linux-arm64": "1.8.3", + "@biomejs/cli-linux-arm64-musl": "1.8.3", + "@biomejs/cli-linux-x64": "1.8.3", + "@biomejs/cli-linux-x64-musl": "1.8.3", + "@biomejs/cli-win32-arm64": "1.8.3", + "@biomejs/cli-win32-x64": "1.8.3" + } + }, + "node_modules/@biomejs/cli-darwin-arm64": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-1.8.3.tgz", + "integrity": "sha512-9DYOjclFpKrH/m1Oz75SSExR8VKvNSSsLnVIqdnKexj6NwmiMlKk94Wa1kZEdv6MCOHGHgyyoV57Cw8WzL5n3A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-darwin-x64": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-1.8.3.tgz", + "integrity": "sha512-UeW44L/AtbmOF7KXLCoM+9PSgPo0IDcyEUfIoOXYeANaNXXf9mLUwV1GeF2OWjyic5zj6CnAJ9uzk2LT3v/wAw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-linux-arm64": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-1.8.3.tgz", + "integrity": "sha512-fed2ji8s+I/m8upWpTJGanqiJ0rnlHOK3DdxsyVLZQ8ClY6qLuPc9uehCREBifRJLl/iJyQpHIRufLDeotsPtw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-linux-arm64-musl": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-1.8.3.tgz", + "integrity": "sha512-9yjUfOFN7wrYsXt/T/gEWfvVxKlnh3yBpnScw98IF+oOeCYb5/b/+K7YNqKROV2i1DlMjg9g/EcN9wvj+NkMuQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-linux-x64": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-1.8.3.tgz", + "integrity": "sha512-I8G2QmuE1teISyT8ie1HXsjFRz9L1m5n83U1O6m30Kw+kPMPSKjag6QGUn+sXT8V+XWIZxFFBoTDEDZW2KPDDw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-linux-x64-musl": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-1.8.3.tgz", + "integrity": "sha512-UHrGJX7PrKMKzPGoEsooKC9jXJMa28TUSMjcIlbDnIO4EAavCoVmNQaIuUSH0Ls2mpGMwUIf+aZJv657zfWWjA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-win32-arm64": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-1.8.3.tgz", + "integrity": "sha512-J+Hu9WvrBevfy06eU1Na0lpc7uR9tibm9maHynLIoAjLZpQU3IW+OKHUtyL8p6/3pT2Ju5t5emReeIS2SAxhkQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-win32-x64": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-1.8.3.tgz", + "integrity": "sha512-/PJ59vA1pnQeKahemaQf4Nyj7IKUvGQSc3Ze1uIGi+Wvr1xF7rGobSrAAG01T/gUDG21vkDsZYM03NAmPiVkqg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@changesets/apply-release-plan": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/@changesets/apply-release-plan/-/apply-release-plan-7.0.5.tgz", + "integrity": "sha512-1cWCk+ZshEkSVEZrm2fSj1Gz8sYvxgUL4Q78+1ZZqeqfuevPTPk033/yUZ3df8BKMohkqqHfzj0HOOrG0KtXTw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/config": "^3.0.3", + "@changesets/get-version-range-type": "^0.4.0", + "@changesets/git": "^3.0.1", + "@changesets/should-skip-package": "^0.1.1", + "@changesets/types": "^6.0.0", + "@manypkg/get-packages": "^1.1.3", + "detect-indent": "^6.0.0", + "fs-extra": "^7.0.1", + "lodash.startcase": "^4.4.0", + "outdent": "^0.5.0", + "prettier": "^2.7.1", + "resolve-from": "^5.0.0", + "semver": "^7.5.3" + } + }, + "node_modules/@changesets/apply-release-plan/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/@changesets/assemble-release-plan": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/@changesets/assemble-release-plan/-/assemble-release-plan-6.0.4.tgz", + "integrity": "sha512-nqICnvmrwWj4w2x0fOhVj2QEGdlUuwVAwESrUo5HLzWMI1rE5SWfsr9ln+rDqWB6RQ2ZyaMZHUcU7/IRaUJS+Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/errors": "^0.2.0", + "@changesets/get-dependents-graph": "^2.1.2", + "@changesets/should-skip-package": "^0.1.1", + "@changesets/types": "^6.0.0", + "@manypkg/get-packages": "^1.1.3", + "semver": "^7.5.3" + } + }, + "node_modules/@changesets/changelog-git": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@changesets/changelog-git/-/changelog-git-0.2.0.tgz", + "integrity": "sha512-bHOx97iFI4OClIT35Lok3sJAwM31VbUM++gnMBV16fdbtBhgYu4dxsphBF/0AZZsyAHMrnM0yFcj5gZM1py6uQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/types": "^6.0.0" + } + }, + "node_modules/@changesets/cli": { + "version": "2.27.8", + "resolved": "https://registry.npmjs.org/@changesets/cli/-/cli-2.27.8.tgz", + "integrity": "sha512-gZNyh+LdSsI82wBSHLQ3QN5J30P4uHKJ4fXgoGwQxfXwYFTJzDdvIJasZn8rYQtmKhyQuiBj4SSnLuKlxKWq4w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/apply-release-plan": "^7.0.5", + "@changesets/assemble-release-plan": "^6.0.4", + "@changesets/changelog-git": "^0.2.0", + "@changesets/config": "^3.0.3", + "@changesets/errors": "^0.2.0", + "@changesets/get-dependents-graph": "^2.1.2", + "@changesets/get-release-plan": "^4.0.4", + "@changesets/git": "^3.0.1", + "@changesets/logger": "^0.1.1", + "@changesets/pre": "^2.0.1", + "@changesets/read": "^0.6.1", + "@changesets/should-skip-package": "^0.1.1", + "@changesets/types": "^6.0.0", + "@changesets/write": "^0.3.2", + "@manypkg/get-packages": "^1.1.3", + "@types/semver": "^7.5.0", + "ansi-colors": "^4.1.3", + "ci-info": "^3.7.0", + "enquirer": "^2.3.0", + "external-editor": "^3.1.0", + "fs-extra": "^7.0.1", + "mri": "^1.2.0", + "outdent": "^0.5.0", + "p-limit": "^2.2.0", + "package-manager-detector": "^0.2.0", + "picocolors": "^1.1.0", + "resolve-from": "^5.0.0", + "semver": "^7.5.3", + "spawndamnit": "^2.0.0", + "term-size": "^2.1.0" + }, + "bin": { + "changeset": "bin.js" + } + }, + "node_modules/@changesets/cli/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@changesets/cli/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/@changesets/config": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@changesets/config/-/config-3.0.3.tgz", + "integrity": "sha512-vqgQZMyIcuIpw9nqFIpTSNyc/wgm/Lu1zKN5vECy74u95Qx/Wa9g27HdgO4NkVAaq+BGA8wUc/qvbvVNs93n6A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/errors": "^0.2.0", + "@changesets/get-dependents-graph": "^2.1.2", + "@changesets/logger": "^0.1.1", + "@changesets/types": "^6.0.0", + "@manypkg/get-packages": "^1.1.3", + "fs-extra": "^7.0.1", + "micromatch": "^4.0.2" + } + }, + "node_modules/@changesets/errors": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@changesets/errors/-/errors-0.2.0.tgz", + "integrity": "sha512-6BLOQUscTpZeGljvyQXlWOItQyU71kCdGz7Pi8H8zdw6BI0g3m43iL4xKUVPWtG+qrrL9DTjpdn8eYuCQSRpow==", + "dev": true, + "license": "MIT", + "dependencies": { + "extendable-error": "^0.1.5" + } + }, + "node_modules/@changesets/get-dependents-graph": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@changesets/get-dependents-graph/-/get-dependents-graph-2.1.2.tgz", + "integrity": "sha512-sgcHRkiBY9i4zWYBwlVyAjEM9sAzs4wYVwJUdnbDLnVG3QwAaia1Mk5P8M7kraTOZN+vBET7n8KyB0YXCbFRLQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/types": "^6.0.0", + "@manypkg/get-packages": "^1.1.3", + "picocolors": "^1.1.0", + "semver": "^7.5.3" + } + }, + "node_modules/@changesets/get-release-plan": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@changesets/get-release-plan/-/get-release-plan-4.0.4.tgz", + "integrity": "sha512-SicG/S67JmPTrdcc9Vpu0wSQt7IiuN0dc8iR5VScnnTVPfIaLvKmEGRvIaF0kcn8u5ZqLbormZNTO77bCEvyWw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/assemble-release-plan": "^6.0.4", + "@changesets/config": "^3.0.3", + "@changesets/pre": "^2.0.1", + "@changesets/read": "^0.6.1", + "@changesets/types": "^6.0.0", + "@manypkg/get-packages": "^1.1.3" + } + }, + "node_modules/@changesets/get-version-range-type": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@changesets/get-version-range-type/-/get-version-range-type-0.4.0.tgz", + "integrity": "sha512-hwawtob9DryoGTpixy1D3ZXbGgJu1Rhr+ySH2PvTLHvkZuQ7sRT4oQwMh0hbqZH1weAooedEjRsbrWcGLCeyVQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@changesets/git": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@changesets/git/-/git-3.0.1.tgz", + "integrity": "sha512-pdgHcYBLCPcLd82aRcuO0kxCDbw/yISlOtkmwmE8Odo1L6hSiZrBOsRl84eYG7DRCab/iHnOkWqExqc4wxk2LQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/errors": "^0.2.0", + "@manypkg/get-packages": "^1.1.3", + "is-subdir": "^1.1.1", + "micromatch": "^4.0.2", + "spawndamnit": "^2.0.0" + } + }, + "node_modules/@changesets/logger": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@changesets/logger/-/logger-0.1.1.tgz", + "integrity": "sha512-OQtR36ZlnuTxKqoW4Sv6x5YIhOmClRd5pWsjZsddYxpWs517R0HkyiefQPIytCVh4ZcC5x9XaG8KTdd5iRQUfg==", + "dev": true, + "license": "MIT", + "dependencies": { + "picocolors": "^1.1.0" + } + }, + "node_modules/@changesets/parse": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@changesets/parse/-/parse-0.4.0.tgz", + "integrity": "sha512-TS/9KG2CdGXS27S+QxbZXgr8uPsP4yNJYb4BC2/NeFUj80Rni3TeD2qwWmabymxmrLo7JEsytXH1FbpKTbvivw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/types": "^6.0.0", + "js-yaml": "^3.13.1" + } + }, + "node_modules/@changesets/parse/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "license": "MIT", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/@changesets/parse/node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/@changesets/pre": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@changesets/pre/-/pre-2.0.1.tgz", + "integrity": "sha512-vvBJ/If4jKM4tPz9JdY2kGOgWmCowUYOi5Ycv8dyLnEE8FgpYYUo1mgJZxcdtGGP3aG8rAQulGLyyXGSLkIMTQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/errors": "^0.2.0", + "@changesets/types": "^6.0.0", + "@manypkg/get-packages": "^1.1.3", + "fs-extra": "^7.0.1" + } + }, + "node_modules/@changesets/read": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/@changesets/read/-/read-0.6.1.tgz", + "integrity": "sha512-jYMbyXQk3nwP25nRzQQGa1nKLY0KfoOV7VLgwucI0bUO8t8ZLCr6LZmgjXsiKuRDc+5A6doKPr9w2d+FEJ55zQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/git": "^3.0.1", + "@changesets/logger": "^0.1.1", + "@changesets/parse": "^0.4.0", + "@changesets/types": "^6.0.0", + "fs-extra": "^7.0.1", + "p-filter": "^2.1.0", + "picocolors": "^1.1.0" + } + }, + "node_modules/@changesets/should-skip-package": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@changesets/should-skip-package/-/should-skip-package-0.1.1.tgz", + "integrity": "sha512-H9LjLbF6mMHLtJIc/eHR9Na+MifJ3VxtgP/Y+XLn4BF7tDTEN1HNYtH6QMcjP1uxp9sjaFYmW8xqloaCi/ckTg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/types": "^6.0.0", + "@manypkg/get-packages": "^1.1.3" + } + }, + "node_modules/@changesets/types": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@changesets/types/-/types-6.0.0.tgz", + "integrity": "sha512-b1UkfNulgKoWfqyHtzKS5fOZYSJO+77adgL7DLRDr+/7jhChN+QcHnbjiQVOz/U+Ts3PGNySq7diAItzDgugfQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@changesets/write": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@changesets/write/-/write-0.3.2.tgz", + "integrity": "sha512-kDxDrPNpUgsjDbWBvUo27PzKX4gqeKOlhibaOXDJA6kuBisGqNHv/HwGJrAu8U/dSf8ZEFIeHIPtvSlZI1kULw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/types": "^6.0.0", + "fs-extra": "^7.0.1", + "human-id": "^1.0.2", + "prettier": "^2.7.1" + } + }, + "node_modules/@colors/colors": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", + "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "node_modules/@manypkg/find-root": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@manypkg/find-root/-/find-root-1.1.0.tgz", + "integrity": "sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.5.5", + "@types/node": "^12.7.1", + "find-up": "^4.1.0", + "fs-extra": "^8.1.0" + } + }, + "node_modules/@manypkg/find-root/node_modules/@types/node": { + "version": "12.20.55", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", + "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@manypkg/find-root/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@manypkg/find-root/node_modules/fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/@manypkg/find-root/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@manypkg/find-root/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@manypkg/find-root/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@manypkg/get-packages": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@manypkg/get-packages/-/get-packages-1.1.3.tgz", + "integrity": "sha512-fo+QhuU3qE/2TQMQmbVMqaQ6EWbMhi4ABWP+O4AM1NqPBuy0OrApV5LO6BrrgnhtAHS2NH6RrVk9OL181tTi8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.5.5", + "@changesets/types": "^4.0.1", + "@manypkg/find-root": "^1.1.0", + "fs-extra": "^8.1.0", + "globby": "^11.0.0", + "read-yaml-file": "^1.1.0" + } + }, + "node_modules/@manypkg/get-packages/node_modules/@changesets/types": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@changesets/types/-/types-4.1.0.tgz", + "integrity": "sha512-LDQvVDv5Kb50ny2s25Fhm3d9QSZimsoUGBsUioj6MC3qbMUCuC8GPIvk/M6IvXx3lYhAs0lwWUQLb+VIEUCECw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@manypkg/get-packages/node_modules/fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@sindresorhus/is": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz", + "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/is?sponsor=1" + } + }, + "node_modules/@tsconfig/node10": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz", + "integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "22.5.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.5.4.tgz", + "integrity": "sha512-FDuKUJQm/ju9fT/SeX/6+gBzoPzlVCzfzmGkwKvRHQVxi4BntVbyIwf6a4Xn62mrvndLiml6z/UBXIdEVjQLXg==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.19.2" + } + }, + "node_modules/@types/semver": { + "version": "7.5.8", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", + "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/acorn": { + "version": "8.12.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", + "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-walk": { + "version": "8.3.3", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.3.tgz", + "integrity": "sha512-MxXdReSRhGO7VlFe1bRG/oI7/mdLV9B9JJT0N8vZOhF7gFRR5l3M8W9G8JxmKV+JC5mGqJ0QvqfSOLsCPa4nUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "acorn": "^8.11.0" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/ansi-colors": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-escapes": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-7.0.0.tgz", + "integrity": "sha512-GdYO7a61mR0fOlAsvC9/rIHf7L96sBc6dEWzeOu+KAea5bZyQRPIpojrVoI4AXGJS/ycu/fBTdLrUkA4ODrvjw==", + "dev": true, + "license": "MIT", + "dependencies": { + "environment": "^1.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", + "dev": true, + "license": "MIT" + }, + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true, + "license": "MIT" + }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "license": "MIT" + }, + "node_modules/axios": { + "version": "1.7.7", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz", + "integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==", + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.15.6", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, + "node_modules/better-path-resolve": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/better-path-resolve/-/better-path-resolve-1.0.0.tgz", + "integrity": "sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-windows": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/char-regex": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", + "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true, + "license": "MIT" + }, + "node_modules/ci-info": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", + "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/cjs-module-lexer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.4.0.tgz", + "integrity": "sha512-N1NGmowPlGBLsOZLPvm48StN04V4YvQRL0i6b7ctrVY3epjP/ct7hFLOItz6pDIvRjwpfPxi52a2UWV2ziir8g==", + "dev": true, + "license": "MIT" + }, + "node_modules/cli-highlight": { + "version": "2.1.11", + "resolved": "https://registry.npmjs.org/cli-highlight/-/cli-highlight-2.1.11.tgz", + "integrity": "sha512-9KDcoEVwyUXrjcJNvHD0NFc/hiwe/WPVYIleQh2O1N2Zro5gWJZ/K+3DGn8w8P/F6FxOgzyC5bxDyHIgCSPhGg==", + "dev": true, + "license": "ISC", + "dependencies": { + "chalk": "^4.0.0", + "highlight.js": "^10.7.1", + "mz": "^2.4.0", + "parse5": "^5.1.1", + "parse5-htmlparser2-tree-adapter": "^6.0.0", + "yargs": "^16.0.0" + }, + "bin": { + "highlight": "bin/highlight" + }, + "engines": { + "node": ">=8.0.0", + "npm": ">=5.0.0" + } + }, + "node_modules/cli-table3": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.5.tgz", + "integrity": "sha512-+W/5efTR7y5HRD7gACw9yQjqMVvEMLBHmboM/kPWam+H+Hmyrgjh6YncVKK122YZkXrLudzTuAukUw9FnMf7IQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "string-width": "^4.2.0" + }, + "engines": { + "node": "10.* || >= 12.*" + }, + "optionalDependencies": { + "@colors/colors": "1.5.0" + } + }, + "node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "license": "MIT", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/commander": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", + "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14" + } + }, + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/detect-indent": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-6.1.0.tgz", + "integrity": "sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/emojilib": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/emojilib/-/emojilib-2.4.0.tgz", + "integrity": "sha512-5U0rVMU5Y2n2+ykNLQqMoqklN9ICBT/KsvC1Gz6vqHbz2AXXGkG+Pm5rMWk/8Vjrr/mY9985Hi8DYzn1F09Nyw==", + "dev": true, + "license": "MIT" + }, + "node_modules/enquirer": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.4.1.tgz", + "integrity": "sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-colors": "^4.1.1", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/environment": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/environment/-/environment-1.1.0.tgz", + "integrity": "sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "license": "BSD-2-Clause", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/extendable-error": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/extendable-error/-/extendable-error-0.1.7.tgz", + "integrity": "sha512-UOiS2in6/Q0FK0R0q6UY9vYpQ21mr/Qn1KOnte7vsACuNJf514WvCCUHSRCPcgjPT2bAhNIJdlE6bVap1GKmeg==", + "dev": true, + "license": "MIT" + }, + "node_modules/external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "dev": true, + "license": "MIT", + "dependencies": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/fast-glob": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fastq": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", + "dev": true, + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fflate": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.8.2.tgz", + "integrity": "sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==", + "dev": true, + "license": "MIT" + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/follow-redirects": { + "version": "1.15.9", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", + "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "license": "MIT", + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/highlight.js": { + "version": "10.7.3", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.3.tgz", + "integrity": "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": "*" + } + }, + "node_modules/human-id": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/human-id/-/human-id-1.0.2.tgz", + "integrity": "sha512-UNopramDEhHJD+VR+ehk8rOslwSfByxPIZyJRfV739NDhN5LF1fa1MqnzKm2lGTQRjNrjK19Q5fhkgIfjlVUKw==", + "dev": true, + "license": "MIT" + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-subdir": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-subdir/-/is-subdir-1.2.0.tgz", + "integrity": "sha512-2AT6j+gXe/1ueqbW6fLZJiIw3F8iXGJtt0yDrZaBhAZEG1raiTxKWU+IPqMCzQAXOUCKdA4UDMgacKH25XG2Cw==", + "dev": true, + "license": "MIT", + "dependencies": { + "better-path-resolve": "1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "dev": true, + "license": "MIT", + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/lodash.startcase": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.startcase/-/lodash.startcase-4.4.0.tgz", + "integrity": "sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==", + "dev": true, + "license": "MIT" + }, + "node_modules/lru-cache": { + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.0.1.tgz", + "integrity": "sha512-CgeuL5uom6j/ZVrg7G/+1IXqRY8JXX4Hghfy5YE0EhoYQWvndP1kufu58cmZLNIDKnRhZrXfdS9urVWx98AipQ==", + "dev": true, + "license": "ISC", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true, + "license": "ISC" + }, + "node_modules/marked": { + "version": "9.1.6", + "resolved": "https://registry.npmjs.org/marked/-/marked-9.1.6.tgz", + "integrity": "sha512-jcByLnIFkd5gSXZmjNvS1TlmRhCXZjIzHYlaGkPlLIekG55JDR2Z4va9tZwCiP+/RDERiNhMOFu01xd6O5ct1Q==", + "dev": true, + "license": "MIT", + "bin": { + "marked": "bin/marked.js" + }, + "engines": { + "node": ">= 16" + } + }, + "node_modules/marked-terminal": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/marked-terminal/-/marked-terminal-7.1.0.tgz", + "integrity": "sha512-+pvwa14KZL74MVXjYdPR3nSInhGhNvPce/3mqLVZT2oUvt654sL1XImFuLZ1pkA866IYZ3ikDTOFUIC7XzpZZg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-escapes": "^7.0.0", + "chalk": "^5.3.0", + "cli-highlight": "^2.1.11", + "cli-table3": "^0.6.5", + "node-emoji": "^2.1.3", + "supports-hyperlinks": "^3.0.0" + }, + "engines": { + "node": ">=16.0.0" + }, + "peerDependencies": { + "marked": ">=1 <14" + } + }, + "node_modules/marked-terminal/node_modules/chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mri": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz", + "integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/mz": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } + }, + "node_modules/node-emoji": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/node-emoji/-/node-emoji-2.1.3.tgz", + "integrity": "sha512-E2WEOVsgs7O16zsURJ/eH8BqhF029wGpEOnv7Urwdo2wmQanOACwJQh0devF9D9RhoZru0+9JXIS0dBXIAz+lA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@sindresorhus/is": "^4.6.0", + "char-regex": "^1.0.2", + "emojilib": "^2.4.0", + "skin-tone": "^2.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/outdent": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/outdent/-/outdent-0.5.0.tgz", + "integrity": "sha512-/jHxFIzoMXdqPzTaCpFzAAWhpkSjZPF4Vsn6jAfNpmbH/ymsmd7Qc6VE9BGn0L6YMj6uwpQLxCECpus4ukKS9Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/p-filter": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-filter/-/p-filter-2.1.0.tgz", + "integrity": "sha512-ZBxxZ5sL2HghephhpGAQdoskxplTwr7ICaehZwLIlfL6acuVgZPm8yBNuRAFBGEqtD/hmUeq9eqLg2ys9Xr/yw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-map": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-map": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz", + "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/package-manager-detector": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/package-manager-detector/-/package-manager-detector-0.2.0.tgz", + "integrity": "sha512-E385OSk9qDcXhcM9LNSe4sdhx8a9mAPrZ4sMLW+tmxl5ZuGtPUcdFu+MPP2jbgiWAZ6Pfe5soGFMd+0Db5Vrog==", + "dev": true, + "license": "MIT" + }, + "node_modules/parse5": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.1.tgz", + "integrity": "sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug==", + "dev": true, + "license": "MIT" + }, + "node_modules/parse5-htmlparser2-tree-adapter": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz", + "integrity": "sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA==", + "dev": true, + "license": "MIT", + "dependencies": { + "parse5": "^6.0.1" + } + }, + "node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", + "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", + "dev": true, + "license": "MIT" + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/picocolors": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz", + "integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/prettier": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "dev": true, + "license": "MIT", + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "license": "MIT" + }, + "node_modules/pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/read-yaml-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-yaml-file/-/read-yaml-file-1.1.0.tgz", + "integrity": "sha512-VIMnQi/Z4HT2Fxuwg5KrY174U1VdUIASQVWXXyqtNRtxSr9IYkn1rsI6Tb6HsrHCmB7gVpNwX6JxPTHcH6IoTA==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.1.5", + "js-yaml": "^3.6.1", + "pify": "^4.0.1", + "strip-bom": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/read-yaml-file/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "license": "MIT", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/read-yaml-file/node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/regenerator-runtime": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", + "dev": true, + "license": "MIT" + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true, + "license": "MIT" + }, + "node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/skin-tone": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/skin-tone/-/skin-tone-2.0.0.tgz", + "integrity": "sha512-kUMbT1oBJCpgrnKoSr0o6wPtvRWT9W9UKvGLwfJYO2WuahZRHOpEyL1ckyMGgMWh0UdpmaoFqKKD29WTomNEGA==", + "dev": true, + "license": "MIT", + "dependencies": { + "unicode-emoji-modifier-base": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/spawndamnit": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/spawndamnit/-/spawndamnit-2.0.0.tgz", + "integrity": "sha512-j4JKEcncSjFlqIwU5L/rp2N5SIPsdxaRsIv678+TZxZ0SRDJTm8JrxJMjE/XuiEZNEir3S8l0Fa3Ke339WI4qA==", + "dev": true, + "license": "MIT", + "dependencies": { + "cross-spawn": "^5.1.0", + "signal-exit": "^3.0.2" + } + }, + "node_modules/spawndamnit/node_modules/cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "node_modules/spawndamnit/node_modules/lru-cache": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "dev": true, + "license": "ISC", + "dependencies": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "node_modules/spawndamnit/node_modules/shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/spawndamnit/node_modules/shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/spawndamnit/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-hyperlinks": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-3.1.0.tgz", + "integrity": "sha512-2rn0BZ+/f7puLOHZm1HOJfwBggfaHXUpPUSSG/SWM4TWp5KCfmNYwnC3hruy2rZlMnmWZ+QAGpZfchu3f3695A==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0", + "supports-color": "^7.0.0" + }, + "engines": { + "node": ">=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/term-size": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/term-size/-/term-size-2.2.1.tgz", + "integrity": "sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/thenify": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", + "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", + "dev": true, + "license": "MIT", + "dependencies": { + "any-promise": "^1.0.0" + } + }, + "node_modules/thenify-all": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", + "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", + "dev": true, + "license": "MIT", + "dependencies": { + "thenify": ">= 3.1.0 < 4" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "license": "MIT", + "dependencies": { + "os-tmpdir": "~1.0.2" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/ts-node": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", + "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } + } + }, + "node_modules/typescript": { + "version": "5.5.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", + "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/undici-types": { + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", + "dev": true, + "license": "MIT" + }, + "node_modules/unicode-emoji-modifier-base": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unicode-emoji-modifier-base/-/unicode-emoji-modifier-base-1.0.0.tgz", + "integrity": "sha512-yLSH4py7oFH3oG/9K+XWrz1pSi3dfUrWEnInbxMfArOfc1+33BlGPQtLsOYwvdMy11AwUBetYuaRxSPqgkq+8g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true, + "license": "MIT" + }, + "node_modules/validate-npm-package-name": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-5.0.1.tgz", + "integrity": "sha512-OljLrQ9SQdOUqTaQxqL5dEfZWrXExyyWsozYlAWFawPVNuD83igl7uJD2RTkNMbniIYgt8l81eCJGIdQF7avLQ==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==", + "dev": true, + "license": "ISC" + }, + "node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + } + } +} diff --git a/src/index.ts b/src/index.ts index fbc2f61..c5e6d86 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,28 +1,28 @@ // DirectBilling - Models -export { DbCalculation } from './models/directbilling/service/db.calculation'; -export { DbProvider, DbProviderID } from './models/directbilling/db.provider'; -export { DbService, DbServiceNotify } from './models/directbilling/service/db.service'; -export { PartialDbService } from './models/directbilling/service/partial.db.service'; -export { DbGenerationResponse } from './models/directbilling/transaction/db.generation.response'; -export { DbTransactionRequest } from './models/directbilling/transaction/db.transaction.request'; -export { DbTransactionStatus } from './models/directbilling/transaction/db.transaction.status'; -export { DbTransaction } from './models/directbilling/transaction/db.transaction'; -export { PartialDbTransaction } from './models/directbilling/transaction/partial.db.transaction'; -export { DBServiceStatus } from './models/directbilling/service/db.service.status'; +export { type DbCalculation } from './models/directbilling/service/db.calculation.js'; +export { DbProvider, DbProviderID } from './models/directbilling/db.provider.js'; +export { type DbService, type DbServiceNotify } from './models/directbilling/service/db.service.js'; +export { type PartialDbService } from './models/directbilling/service/partial.db.service.js'; +export { type DbGenerationResponse } from './models/directbilling/transaction/db.generation.response.js'; +export { type DbTransactionRequest } from './models/directbilling/transaction/db.transaction.request.js'; +export { DbTransactionStatus } from './models/directbilling/transaction/db.transaction.status.js'; +export { type DbTransaction } from './models/directbilling/transaction/db.transaction.js'; +export { type PartialDbTransaction } from './models/directbilling/transaction/partial.db.transaction.js'; +export { DBServiceStatus } from './models/directbilling/service/db.service.status.js'; // Response -export { PaginatedResponse } from './models/response/paginated.response'; -export { AmountType } from './models/amount.type'; +export { type PaginatedResponse } from './models/response/paginated.response.js'; +export { AmountType } from './models/amount.type.js'; // SMS - Models -export { SmsNumber } from './models/sms/service/sms.number'; -export { SmsService } from './models/sms/service/sms.service'; -export { SmsServiceType } from './models/sms/service/sms.service.type'; -export { SmsTransaction } from './models/sms/transaction/sms.transaction'; -export { VerificationResponse } from './models/sms/verification.response'; -export { SMSServiceStatus } from './models/sms/service/sms.service.status'; +export { type SmsNumber } from './models/sms/service/sms.number.js'; +export { type SmsService } from './models/sms/service/sms.service.js'; +export { SmsServiceType } from './models/sms/service/sms.service.type.js'; +export { type SmsTransaction } from './models/sms/transaction/sms.transaction.js'; +export { type VerificationResponse } from './models/sms/verification.response.js'; +export { SMSServiceStatus } from './models/sms/service/sms.service.status.js'; // Payments -export { DirectBilling } from './payments/directbilling'; -export { Sms } from './payments/sms'; -export { SmsXml } from './payments/sms.xml'; \ No newline at end of file +export { DirectBilling } from './payments/directbilling.js'; +export { Sms } from './payments/sms.js'; +export { SmsXml } from './payments/sms.xml.js'; diff --git a/src/lib/hashing.ts b/src/lib/hashing.ts index e7dc625..081d019 100644 --- a/src/lib/hashing.ts +++ b/src/lib/hashing.ts @@ -1,23 +1,23 @@ -import { createHash } from 'crypto'; +import { createHash } from 'node:crypto'; -export class Hashing { - public static sha256(text: string) { - return Hashing.hash('sha256', text); - } +function sha256(text: string) { + return hash('sha256', text); +} - public static sha1(text: string) { - return Hashing.hash('sha1', text); - } +function sha1(text: string) { + return hash('sha1', text); +} - public static md5(text: string) { - return Hashing.hash('md5', text); - } +function md5(text: string) { + return hash('md5', text); +} - private static hash(algorithm: string, text: string) { - const hash = createHash(algorithm); +function hash(algorithm: string, text: string) { + const hash = createHash(algorithm); - hash.update(text); + hash.update(text); - return hash.digest('hex'); - } -} \ No newline at end of file + return hash.digest('hex'); +} + +export { sha256, sha1, md5 }; diff --git a/src/models/amount.type.ts b/src/models/amount.type.ts index b15d276..dcc03d4 100644 --- a/src/models/amount.type.ts +++ b/src/models/amount.type.ts @@ -1,3 +1,5 @@ export enum AmountType { - REQUIRED = 'required', NET = 'net', GROSS = 'gross' -} \ No newline at end of file + REQUIRED = 'required', + NET = 'net', + GROSS = 'gross', +} diff --git a/src/models/directbilling/db.provider.ts b/src/models/directbilling/db.provider.ts index 5b53f90..f50e625 100644 --- a/src/models/directbilling/db.provider.ts +++ b/src/models/directbilling/db.provider.ts @@ -2,12 +2,12 @@ export enum DbProvider { PLAY = 'play', PLUS = 'plus', ORANGE = 'orange', - T_MOBILE = 't-mobile' + T_MOBILE = 't-mobile', } export enum DbProviderID { ORANGE = 1, PLUS = 2, PLAY = 3, - T_MOBILE = 4 -} \ No newline at end of file + T_MOBILE = 4, +} diff --git a/src/models/directbilling/service/db.calculation.ts b/src/models/directbilling/service/db.calculation.ts index 8a616a9..dc5b3b7 100644 --- a/src/models/directbilling/service/db.calculation.ts +++ b/src/models/directbilling/service/db.calculation.ts @@ -1,4 +1,4 @@ -import {DbProvider} from '../db.provider'; +import { DbProvider } from '../db.provider.js'; export interface DbCalculation { [DbProvider.PLAY]: DbCalculationAmount; @@ -10,4 +10,4 @@ export interface DbCalculation { interface DbCalculationAmount { net: number; gross: number; -} \ No newline at end of file +} diff --git a/src/models/directbilling/service/db.service.status.ts b/src/models/directbilling/service/db.service.status.ts index 79b428e..e8a900f 100644 --- a/src/models/directbilling/service/db.service.status.ts +++ b/src/models/directbilling/service/db.service.status.ts @@ -2,5 +2,5 @@ export enum DBServiceStatus { SERVICE_NEW = 'service_db_new', SERVICE_ACTIVE = 'service_db_active', SERVICE_REJECTED = 'service_db_rejected', - SERVICE_ONGOING_REGISTRATION = 'service_db_ongoing_registration' -} \ No newline at end of file + SERVICE_ONGOING_REGISTRATION = 'service_db_ongoing_registration', +} diff --git a/src/models/directbilling/service/db.service.ts b/src/models/directbilling/service/db.service.ts index a71436a..8859c7c 100644 --- a/src/models/directbilling/service/db.service.ts +++ b/src/models/directbilling/service/db.service.ts @@ -1,5 +1,5 @@ -import {DBServiceStatus} from '../service/db.service.status'; -import {DbProvider} from '../db.provider'; +import { DbProvider } from '../db.provider.js'; +import type { DBServiceStatus } from '../service/db.service.status.js'; export interface DbService { id: string; @@ -8,10 +8,10 @@ export interface DbService { status: DBServiceStatus; api?: DbServiceNotify; - + providers: DbServiceProviders; - commissions: DbServiceProvidersCommission, - maxValues: DbServiceProvidersLimit, + commissions: DbServiceProvidersCommission; + maxValues: DbServiceProvidersLimit; created_at: Date; } @@ -47,4 +47,4 @@ interface DbProviderCommission { commission_0: string; commission_9: string; commission_25: string; -} \ No newline at end of file +} diff --git a/src/models/directbilling/service/partial.db.service.ts b/src/models/directbilling/service/partial.db.service.ts index 5750ece..da40964 100644 --- a/src/models/directbilling/service/partial.db.service.ts +++ b/src/models/directbilling/service/partial.db.service.ts @@ -1,4 +1,4 @@ -import {DBServiceStatus} from './db.service.status'; +import type { DBServiceStatus } from './db.service.status.js'; export interface PartialDbService { id: string; @@ -6,4 +6,4 @@ export interface PartialDbService { suffix: string; status: DBServiceStatus; created_at: Date; -} \ No newline at end of file +} diff --git a/src/models/directbilling/transaction/db.generation.response.ts b/src/models/directbilling/transaction/db.generation.response.ts index 3cd97db..55424a3 100644 --- a/src/models/directbilling/transaction/db.generation.response.ts +++ b/src/models/directbilling/transaction/db.generation.response.ts @@ -1,10 +1,10 @@ export interface DbGenerationResponse { success: boolean; data: DbGenerationResponseBody; - errors?: { [key: string]: string[] } + errors?: { [key: string]: string[] }; } interface DbGenerationResponseBody { transactionId: string; redirectUrl: string; -} \ No newline at end of file +} diff --git a/src/models/directbilling/transaction/db.notifications.request.ts b/src/models/directbilling/transaction/db.notifications.request.ts index f97d5eb..038c7e5 100644 --- a/src/models/directbilling/transaction/db.notifications.request.ts +++ b/src/models/directbilling/transaction/db.notifications.request.ts @@ -1,19 +1,19 @@ -import {DbServiceNotify} from '../service/db.service'; -import {DbTransactionStatus} from '../transaction/db.transaction.status'; -import {DbProviderID} from '../db.provider'; +import type { DbProviderID } from '../db.provider.js'; +import type { DbServiceNotify } from '../service/db.service.js'; +import type { DbTransactionStatus } from '../transaction/db.transaction.status.js'; export interface DbNotificationRequest { - id: string, - service_id: string, - status: DbTransactionStatus, + id: string; + service_id: string; + status: DbTransactionStatus; values?: { - net?: number, - gross?: number, - partner?: number, - } + net?: number; + gross?: number; + partner?: number; + }; returns?: DbServiceNotify; control?: string; number_from?: string; provider: DbProviderID; signature?: string; -} \ No newline at end of file +} diff --git a/src/models/directbilling/transaction/db.transaction.request.ts b/src/models/directbilling/transaction/db.transaction.request.ts index f8b4134..4ae06f7 100644 --- a/src/models/directbilling/transaction/db.transaction.request.ts +++ b/src/models/directbilling/transaction/db.transaction.request.ts @@ -1,5 +1,5 @@ -import {AmountType} from '../../amount.type'; -import {DbServiceNotify} from '../service/db.service'; +import type { AmountType } from '../../amount.type.js'; +import type { DbServiceNotify } from '../service/db.service.js'; export interface DbTransactionRequest { amount: number; @@ -10,4 +10,4 @@ export interface DbTransactionRequest { phoneNumber?: string; signature?: string; steamid?: string; -} \ No newline at end of file +} diff --git a/src/models/directbilling/transaction/db.transaction.status.ts b/src/models/directbilling/transaction/db.transaction.status.ts index 409bd4d..4841b8d 100644 --- a/src/models/directbilling/transaction/db.transaction.status.ts +++ b/src/models/directbilling/transaction/db.transaction.status.ts @@ -4,5 +4,5 @@ export enum DbTransactionStatus { TRANSACTION_DB_REJECTED = 'transaction_db_rejected', TRANSACTION_DB_CANCELED = 'transaction_db_canceled', TRANSACTION_DB_PAYED = 'transaction_db_payed', - TRANSACTION_DB_GENERATE_ERROR = 'transaction_db_generate_error' -} \ No newline at end of file + TRANSACTION_DB_GENERATE_ERROR = 'transaction_db_generate_error', +} diff --git a/src/models/directbilling/transaction/db.transaction.ts b/src/models/directbilling/transaction/db.transaction.ts index 743bbf1..feab10d 100644 --- a/src/models/directbilling/transaction/db.transaction.ts +++ b/src/models/directbilling/transaction/db.transaction.ts @@ -1,5 +1,5 @@ -import {DbTransactionStatus} from './db.transaction.status'; -import {DbProvider} from '../db.provider'; +import type { DbProvider } from '../db.provider.js'; +import type { DbTransactionStatus } from './db.transaction.status.js'; export interface DbTransaction { id: string; @@ -13,7 +13,7 @@ export interface DbTransaction { operator: DbProvider; - notify: DbTransactionNotify, + notify: DbTransactionNotify; created_at: Date; updated_at: Date; @@ -23,4 +23,4 @@ interface DbTransactionNotify { is_send: boolean; last_send_at: string; count: number; -} \ No newline at end of file +} diff --git a/src/models/directbilling/transaction/partial.db.transaction.ts b/src/models/directbilling/transaction/partial.db.transaction.ts index 7653feb..690c54f 100644 --- a/src/models/directbilling/transaction/partial.db.transaction.ts +++ b/src/models/directbilling/transaction/partial.db.transaction.ts @@ -1,5 +1,5 @@ -import {DbProvider} from '../db.provider'; -import {DbTransactionStatus} from './db.transaction.status'; +import type { DbProvider } from '../db.provider.js'; +import type { DbTransactionStatus } from './db.transaction.status.js'; export interface PartialDbTransaction { id: string; @@ -12,4 +12,4 @@ export interface PartialDbTransaction { created_at: Date; updated_at: Date; -} \ No newline at end of file +} diff --git a/src/models/response/paginated.response.ts b/src/models/response/paginated.response.ts index 8b0e695..8c26220 100644 --- a/src/models/response/paginated.response.ts +++ b/src/models/response/paginated.response.ts @@ -18,4 +18,4 @@ interface Pagination { interface PaginationLinks { next_page: string | null; prev_page: string | null; -} \ No newline at end of file +} diff --git a/src/models/sms/service/sms.number.ts b/src/models/sms/service/sms.number.ts index 304296d..03387ae 100644 --- a/src/models/sms/service/sms.number.ts +++ b/src/models/sms/service/sms.number.ts @@ -5,4 +5,4 @@ export interface SmsNumber { value_gross: number; adult: boolean; -} \ No newline at end of file +} diff --git a/src/models/sms/service/sms.service.status.ts b/src/models/sms/service/sms.service.status.ts index 7885eec..5072063 100644 --- a/src/models/sms/service/sms.service.status.ts +++ b/src/models/sms/service/sms.service.status.ts @@ -6,5 +6,5 @@ export enum SMSServiceStatus { SERVICE_SECOND_VERIFY = 'service_second_verify', SERVICE_REJECTED = 'service_rejected', SERVICE_VERIFY = 'service_verify', - SERVICE_ONGOING_REGISTRATION = 'service_ongoing_registration' -} \ No newline at end of file + SERVICE_ONGOING_REGISTRATION = 'service_ongoing_registration', +} diff --git a/src/models/sms/service/sms.service.ts b/src/models/sms/service/sms.service.ts index dde9346..701db5d 100644 --- a/src/models/sms/service/sms.service.ts +++ b/src/models/sms/service/sms.service.ts @@ -1,5 +1,5 @@ -import {SmsServiceType} from './sms.service.type'; -import {SMSServiceStatus} from './sms.service.status'; +import type { SMSServiceStatus } from './sms.service.status.js'; +import type { SmsServiceType } from './sms.service.type.js'; export interface SmsService { id: string; @@ -17,4 +17,4 @@ export interface SmsService { numbers?: string[]; created_at: Date; -} \ No newline at end of file +} diff --git a/src/models/sms/service/sms.service.type.ts b/src/models/sms/service/sms.service.type.ts index 007187b..b464cff 100644 --- a/src/models/sms/service/sms.service.type.ts +++ b/src/models/sms/service/sms.service.type.ts @@ -1,5 +1,5 @@ export enum SmsServiceType { ONE_TIME_CODE = 'ONE_TIME_CODE', CODE_PACK = 'CODE_PACK', - API_URL = 'API_URL' -} \ No newline at end of file + API_URL = 'API_URL', +} diff --git a/src/models/sms/transaction/sms.transaction.ts b/src/models/sms/transaction/sms.transaction.ts index a31f10b..3f0b2e0 100644 --- a/src/models/sms/transaction/sms.transaction.ts +++ b/src/models/sms/transaction/sms.transaction.ts @@ -10,4 +10,4 @@ export interface SmsTransaction { value?: number; send_at: Date; -} \ No newline at end of file +} diff --git a/src/models/sms/verification.response.ts b/src/models/sms/verification.response.ts index d7d397a..826490d 100644 --- a/src/models/sms/verification.response.ts +++ b/src/models/sms/verification.response.ts @@ -6,4 +6,4 @@ export interface VerificationResponse { number: number; value: number; used_at: Date; -} \ No newline at end of file +} diff --git a/src/payments/directbilling.ts b/src/payments/directbilling.ts index 0f15faf..67ab461 100644 --- a/src/payments/directbilling.ts +++ b/src/payments/directbilling.ts @@ -1,14 +1,14 @@ -import axios, {AxiosInstance} from 'axios'; -import {PaginatedResponse} from '../models/response/paginated.response'; -import {DbService} from '../models/directbilling/service/db.service'; -import {PartialDbService} from '../models/directbilling/service/partial.db.service'; -import {DbCalculation} from '../models/directbilling/service/db.calculation'; -import {PartialDbTransaction} from '../models/directbilling/transaction/partial.db.transaction'; -import {DbTransaction} from '../models/directbilling/transaction/db.transaction'; -import {DbGenerationResponse} from '../models/directbilling/transaction/db.generation.response'; -import {DbTransactionRequest} from '../models/directbilling/transaction/db.transaction.request'; -import {DbNotificationRequest} from '../models/directbilling/transaction/db.notifications.request'; -import {Hashing} from '../lib/hashing'; +import axios, { type AxiosInstance } from 'axios'; +import { sha256 } from '../lib/hashing.js'; +import type { DbCalculation } from '../models/directbilling/service/db.calculation.js'; +import type { DbService } from '../models/directbilling/service/db.service.js'; +import type { PartialDbService } from '../models/directbilling/service/partial.db.service.js'; +import type { DbGenerationResponse } from '../models/directbilling/transaction/db.generation.response.js'; +import type { DbNotificationRequest } from '../models/directbilling/transaction/db.notifications.request.js'; +import type { DbTransaction } from '../models/directbilling/transaction/db.transaction.js'; +import type { DbTransactionRequest } from '../models/directbilling/transaction/db.transaction.request.js'; +import type { PartialDbTransaction } from '../models/directbilling/transaction/partial.db.transaction.js'; +import type { PaginatedResponse } from '../models/response/paginated.response.js'; export class DirectBilling { private readonly key: string; @@ -26,7 +26,7 @@ export class DirectBilling { 'X-SIM-PASSWORD': this.password, 'X-SIM-VERSION': '2.2.2', 'X-SIM-PLATFORM': 'TYPESCRIPT', - } + }, }); } @@ -40,20 +40,25 @@ export class DirectBilling { result.push(...response.data.data); - while(response.data.pagination.links.next_page !== null) { - response = await this.client.get(`/?page=${+response.data.pagination.current_page + 1}`); + while (response.data.pagination.links.next_page !== null) { + response = await this.client.get( + `/?page=${+response.data.pagination.current_page + 1}`, + ); result.push(...response.data.data); } - return result.map(e => { + return result.map((e) => { e.created_at = new Date(e.created_at.replace(' ', 'T')); return e; }); } - async getServicesPaginated(page?: number, pageSize?: number): Promise> { + async getServicesPaginated( + page?: number, + pageSize?: number, + ): Promise> { const query: any = {}; if (page) query.page = `${page}`; @@ -80,9 +85,9 @@ export class DirectBilling { const service = (await this.client.get(`/${id}`)).data.data; service.created_at = new Date(service.created_at.replace(' ', 'T')); - + return service; - } catch(e) { + } catch (e) { return undefined; } } @@ -90,7 +95,10 @@ export class DirectBilling { /* https://docs.simpay.pl/pl/typescript/?typescript#directbilling-kalkulacja-prowizji */ - async calculateCommission(serviceId: string, amount: number): Promise { + async calculateCommission( + serviceId: string, + amount: number, + ): Promise { return (await this.client.get(`/${serviceId}/calculate?amount=${amount}`)).data.data; } @@ -104,13 +112,15 @@ export class DirectBilling { result.push(...response.data.data); - while(response.data.pagination.links.next_page !== null) { - response = await this.client.get(`/${serviceId}/transactions?page=${( response.data.pagination.current_page) + 1}`); + while (response.data.pagination.links.next_page !== null) { + response = await this.client.get( + `/${serviceId}/transactions?page=${response.data.pagination.current_page + 1}`, + ); result.push(...response.data.data); } - return result.map(e => { + return result.map((e) => { e.created_at = new Date(e.created_at.replace(' ', 'T')); e.updated_at = new Date(e.updated_at.replace(' ', 'T')); @@ -118,7 +128,11 @@ export class DirectBilling { }); } - async getTransactionsPaginated(serviceId: string, page?: number, pageSize?: number): Promise> { + async getTransactionsPaginated( + serviceId: string, + page?: number, + pageSize?: number, + ): Promise> { const query: any = {}; if (page) query.page = `${page}`; @@ -141,8 +155,12 @@ export class DirectBilling { /* https://docs.simpay.pl/pl/typescript/?typescript#directbilling-pobieranie-informacji-o-transakcji */ - async getTransaction(serviceId: string, transactionId: string): Promise { - const transaction = (await this.client.get(`/${serviceId}/transactions/${transactionId}`)).data.data; + async getTransaction( + serviceId: string, + transactionId: string, + ): Promise { + const transaction = (await this.client.get(`/${serviceId}/transactions/${transactionId}`)) + .data.data; transaction.created_at = new Date(transaction.created_at.replace(' ', 'T')); transaction.updated_at = new Date(transaction.updated_at.replace(' ', 'T')); @@ -153,7 +171,11 @@ export class DirectBilling { /* https://docs.simpay.pl/pl/typescript/?typescript#directbilling-generowanie-transakcji */ - async createTransaction(serviceId: string, key: string, request: DbTransactionRequest): Promise { + async createTransaction( + serviceId: string, + key: string, + request: DbTransactionRequest, + ): Promise { request.signature = this.generateSignature(key, request); return (await this.client.post(`/${serviceId}/transactions`, request)).data; @@ -167,7 +189,7 @@ export class DirectBilling { if (body.signature !== signature) return undefined; - return body; + return body; } /* @@ -183,10 +205,10 @@ export class DirectBilling { request.returns?.failure, request.phoneNumber, request.steamid, - key - ].filter(e => e !== undefined && e !== null); + key, + ].filter((e) => e !== undefined && e !== null); - return Hashing.sha256(elements.join('|')); + return sha256(elements.join('|')); } generateSignatureNotification(key: string, request: DbNotificationRequest): string { @@ -202,9 +224,9 @@ export class DirectBilling { request.control, request.number_from, request.provider, - key - ].filter(e => e !== undefined && e !== null); + key, + ].filter((e) => e !== undefined && e !== null); - return Hashing.sha256(elements.join('|')); + return sha256(elements.join('|')); } -} \ No newline at end of file +} diff --git a/src/payments/sms.ts b/src/payments/sms.ts index 3ee7551..df0ace0 100644 --- a/src/payments/sms.ts +++ b/src/payments/sms.ts @@ -1,9 +1,9 @@ -import {SmsService} from '../models/sms/service/sms.service'; -import axios, {AxiosInstance} from 'axios'; -import {SmsTransaction} from '../models/sms/transaction/sms.transaction'; -import {SmsNumber} from '../models/sms/service/sms.number'; -import {PaginatedResponse} from '../models/response/paginated.response'; -import {VerificationResponse} from '../models/sms/verification.response'; +import axios, { type AxiosInstance } from 'axios'; +import type { PaginatedResponse } from '../models/response/paginated.response.js'; +import type { SmsNumber } from '../models/sms/service/sms.number.js'; +import type { SmsService } from '../models/sms/service/sms.service.js'; +import type { SmsTransaction } from '../models/sms/transaction/sms.transaction.js'; +import type { VerificationResponse } from '../models/sms/verification.response.js'; export class Sms { private readonly key: string; @@ -21,7 +21,7 @@ export class Sms { 'X-SIM-PASSWORD': this.password, 'X-SIM-VERSION': '2.2.2', 'X-SIM-PLATFORM': 'TYPESCRIPT', - } + }, }); } @@ -35,20 +35,25 @@ export class Sms { result.push(...response.data.data); - while(response.data.pagination.links.next_page !== null) { - response = await this.client.get(`/?page=${( response.data.pagination.current_page) + 1}`); + while (response.data.pagination.links.next_page !== null) { + response = await this.client.get( + `/?page=${response.data.pagination.current_page + 1}`, + ); result.push(...response.data.data); } - return result.map(e => { + return result.map((e) => { e.created_at = new Date(e.created_at.replace(' ', 'T')); return e; }); } - async getServicesPaginated(page?: number, pageSize?: number): Promise> { + async getServicesPaginated( + page?: number, + pageSize?: number, + ): Promise> { const query: any = {}; if (page) query.page = `${page}`; @@ -88,20 +93,26 @@ export class Sms { result.push(...response.data.data); - while(response.data.pagination.links.next_page !== null) { - response = await this.client.get(`/${serviceId}/transactions?page=${( response.data.pagination.current_page) + 1}`); + while (response.data.pagination.links.next_page !== null) { + response = await this.client.get( + `/${serviceId}/transactions?page=${response.data.pagination.current_page + 1}`, + ); result.push(...response.data.data); } - return result.map(e => { + return result.map((e) => { e.send_at = new Date(e.send_at.replace(' ', 'T')); return e; }); } - async getTransactionsPaginated(serviceId: string, page?: number, pageSize?: number): Promise> { + async getTransactionsPaginated( + serviceId: string, + page?: number, + pageSize?: number, + ): Promise> { const query: any = {}; if (page) query.page = `${page}`; @@ -123,8 +134,12 @@ export class Sms { /* https://docs.simpay.pl/pl/typescript/?typescript#sms-pobieranie-informacji-o-transakcji */ - async getTransaction(serviceId: string, transactionId: number): Promise { - const transaction = (await this.client.get(`/${serviceId}/transactions/${transactionId}`)).data.data; + async getTransaction( + serviceId: string, + transactionId: number, + ): Promise { + const transaction = (await this.client.get(`/${serviceId}/transactions/${transactionId}`)) + .data.data; transaction.send_at = new Date(transaction.send_at.replace(' ', 'T')); @@ -141,8 +156,10 @@ export class Sms { result.push(...response.data.data); - while(response.data.pagination.links.next_page !== null) { - response = await this.client.get(`/${serviceId}/numbers?page=${( response.data.pagination.current_page) + 1}`); + while (response.data.pagination.links.next_page !== null) { + response = await this.client.get( + `/${serviceId}/numbers?page=${response.data.pagination.current_page + 1}`, + ); result.push(...response.data.data); } @@ -150,7 +167,11 @@ export class Sms { return result; } - async getServiceNumbersPaginated(serviceId: string, page?: number, pageSize?: number): Promise> { + async getServiceNumbersPaginated( + serviceId: string, + page?: number, + pageSize?: number, + ): Promise> { const query: any = {}; if (page) query.page = `${page}`; @@ -178,8 +199,10 @@ export class Sms { result.push(...response.data.data); - while(response.data.pagination.links.next_page !== null) { - response = await this.client.get(`/numbers?page=${( response.data.pagination.current_page) + 1}`); + while (response.data.pagination.links.next_page !== null) { + response = await this.client.get( + `/numbers?page=${response.data.pagination.current_page + 1}`, + ); result.push(...response.data.data); } @@ -187,7 +210,10 @@ export class Sms { return result; } - async getNumbersPaginated(page?: number, pageSize?: number): Promise> { + async getNumbersPaginated( + page?: number, + pageSize?: number, + ): Promise> { const query: any = {}; if (page) query.page = `${page}`; @@ -208,13 +234,17 @@ export class Sms { /* https://docs.simpay.pl/pl/typescript/?typescript#sms-weryfikacja-poprawnosci-kodu */ - async verifySmsCode(serviceId: string, code: string, number?: number): Promise { + async verifySmsCode( + serviceId: string, + code: string, + number?: number, + ): Promise { const response = (await this.client.post(`/${serviceId}`, { code, number })).data.data; - if( response.used_at ) { + if (response.used_at) { response.used_at = new Date(response.used_at.replace(' ', 'T')); } return response; } -} \ No newline at end of file +} diff --git a/src/payments/sms.xml.ts b/src/payments/sms.xml.ts index bb4f75a..4c8f95e 100644 --- a/src/payments/sms.xml.ts +++ b/src/payments/sms.xml.ts @@ -1,4 +1,4 @@ -import {Hashing} from '../lib/hashing'; +import { sha256 } from '../lib/hashing.js'; export class SmsXml { private static charset = 'ABCDEFGHIJKLMNPQRSTUVWXYZ123456789'; @@ -73,11 +73,12 @@ export class SmsXml { } private sign(map: any) { - // eslint-disable-next-line @typescript-eslint/restrict-template-expressions - return Hashing.sha256(`${map.sms_id}${map.sms_text}${map.sms_from}${map.send_number}${map.send_time}${this.apiKey}`); + return sha256( + `${map.sms_id}${map.sms_text}${map.sms_from}${map.send_number}${map.send_time}${this.apiKey}`, + ); } private random(min: number, max: number) { return Math.random() * (max - min) + min; } -} \ No newline at end of file +} diff --git a/src/tests/directbilling.ts b/src/tests/directbilling.ts deleted file mode 100644 index c66f264..0000000 --- a/src/tests/directbilling.ts +++ /dev/null @@ -1,38 +0,0 @@ -import {DirectBilling} from '../payments/directbilling'; -import {AmountType} from '../models/amount.type'; - -const run = async () => { - const db = new DirectBilling('0b4dca15', '3eea38f407073ff0abff956b57d71783'); - - // https://docs.simpay.pl/pl/typescript/?typescript#directbilling-pobieranie-listy-uslug - console.log( await db.getServices() ); - console.log( await db.getServicesPaginated(1, 100) ); - - // https://docs.simpay.pl/pl/typescript/?typescript#directbilling-pobieranie-informacji-o-usludze - console.log( await db.getService('19f3b33c') ); - - // https://docs.simpay.pl/pl/typescript/?typescript#directbilling-kalkulacja-prowizji - console.log( await db.calculateCommission('19f3b33c', 10.00) ); - - // https://docs.simpay.pl/pl/typescript/?typescript#directbilling-pobieranie-listy-transakcji - const transactionsList = await db.getTransactions('19f3b33c'); - - console.log( transactionsList ); - - console.log( await db.getTransactionsPaginated('19f3b33c', 1, 100) ); - - // https://docs.simpay.pl/pl/typescript/?typescript#directbilling-pobieranie-informacji-o-transakcji - console.log( await db.getTransaction('19f3b33c', transactionsList?.[ 0 ].id) ); - - // https://docs.simpay.pl/pl/typescript/?typescript#directbilling-generowanie-transakcji - console.log( await db.createTransaction('19f3b33c', 'key', { - amount: 10.00, - amountType: AmountType.GROSS, - control: 'test' - })); - - console.log( db.checkNotification('key', {})); -}; - -// eslint-disable-next-line @typescript-eslint/no-empty-function -void run(); \ No newline at end of file diff --git a/src/tests/sms.ts b/src/tests/sms.ts deleted file mode 100644 index 6bb1075..0000000 --- a/src/tests/sms.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { Sms } from '../payments/sms'; - -const run = async () => { - const sms = new Sms('0b4dca15', '3eea38f407073ff0abff956b57d71783'); - - // https://docs.simpay.pl/pl/typescript/?typescript#sms-pobieranie-listy-uslug - console.log( await sms.getServices() ); - console.log( await sms.getServicesPaginated(1, 100)); - - // https://docs.simpay.pl/pl/typescript/?typescript#sms-pobieranie-informacji-o-usludze - console.log( await sms.getService('d151e4f9')); - - // https://docs.simpay.pl/pl/typescript/?typescript#sms-pobieranie-listy-transakcji - console.log( await sms.getTransactions('d151e4f9')); - console.log( await sms.getTransactionsPaginated('d151e4f9', 1, 100)); - - // https://docs.simpay.pl/pl/typescript/?typescript#sms-pobieranie-informacji-o-transakcji - console.log( await sms.getTransaction('d151e4f9', 2216609)); - - // https://docs.simpay.pl/pl/typescript/?typescript#sms-pobieranie-dostepnych-numerow-dla-uslugi - console.log( await sms.getServiceNumbers('d151e4f9')); - console.log( await sms.getServiceNumbersPaginated('d151e4f9', 1, 100)); - - // https://docs.simpay.pl/pl/typescript/?typescript#sms-informacji-o-pojedynczym-numerze-uslugi - console.log( await sms.getServiceNumber('d151e4f9', 7055)); - - // https://docs.simpay.pl/pl/typescript/?typescript#sms-pobieranie-wszystkich-dostepnych-numerow - console.log( await sms.getNumbers()); - console.log( await sms.getNumbersPaginated(1, 100)); - - // https://docs.simpay.pl/pl/typescript/?typescript#sms-pobieranie-pojedynczego-numeru-sms - console.log( await sms.getNumber(7055)); - - // https://docs.simpay.pl/pl/typescript/?typescript#sms-weryfikacja-poprawnosci-kodu - console.log( await sms.verifySmsCode('d151e4f9', '81FFC5', 7055)); - console.log( await sms.verifySmsCode('d151e4f9', '81FFC5')); -}; - -// eslint-disable-next-line @typescript-eslint/no-empty-function -void run(); \ No newline at end of file diff --git a/tests/directbilling.ts b/tests/directbilling.ts new file mode 100644 index 0000000..90481fa --- /dev/null +++ b/tests/directbilling.ts @@ -0,0 +1,47 @@ +import { DirectBilling } from '../src/payments/directbilling.js'; +import { AmountType } from '../src/models/amount.type.js'; + +async function directBillingTests() { + const db = new DirectBilling('0b4dca15', '3eea38f407073ff0abff956b57d71783'); + + // https://docs.simpay.pl/pl/typescript/?typescript#directbilling-pobieranie-listy-uslug + console.log(await db.getServices()); + console.log(await db.getServicesPaginated(1, 100)); + + // https://docs.simpay.pl/pl/typescript/?typescript#directbilling-pobieranie-informacji-o-usludze + console.log(await db.getService('19f3b33c')); + + // https://docs.simpay.pl/pl/typescript/?typescript#directbilling-kalkulacja-prowizji + console.log(await db.calculateCommission('19f3b33c', 10.0)); + + // https://docs.simpay.pl/pl/typescript/?typescript#directbilling-pobieranie-listy-transakcji + const transactionsList = await db.getTransactions('19f3b33c'); + + console.log(transactionsList); + + console.log(await db.getTransactionsPaginated('19f3b33c', 1, 100)); + + const transactionId = transactionsList?.[0]?.id; + + if(!transactionId) { + throw new Error('No transactions found'); + } + else { + + // https://docs.simpay.pl/pl/typescript/?typescript#directbilling-pobieranie-informacji-o-transakcji + console.log(await db.getTransaction('19f3b33c', transactionId)); + } + + // https://docs.simpay.pl/pl/typescript/?typescript#directbilling-generowanie-transakcji + console.log( + await db.createTransaction('19f3b33c', 'key', { + amount: 10.0, + amountType: AmountType.GROSS, + control: 'test', + }), + ); + + console.log(db.checkNotification('key', {})); +}; + +export { directBillingTests }; diff --git a/tests/index.ts b/tests/index.ts new file mode 100644 index 0000000..52a1cf9 --- /dev/null +++ b/tests/index.ts @@ -0,0 +1,9 @@ +import { directBillingTests } from './directbilling.js'; +import { smsTests } from './sms.js'; + +async function run() { + await directBillingTests(); + await smsTests(); +} + +run(); \ No newline at end of file diff --git a/tests/sms.ts b/tests/sms.ts new file mode 100644 index 0000000..f7d7c99 --- /dev/null +++ b/tests/sms.ts @@ -0,0 +1,39 @@ +import { Sms } from '../src/payments/sms.js'; + +async function smsTests() { + const sms = new Sms('0b4dca15', '3eea38f407073ff0abff956b57d71783'); + + // https://docs.simpay.pl/pl/typescript/?typescript#sms-pobieranie-listy-uslug + console.log(await sms.getServices()); + console.log(await sms.getServicesPaginated(1, 100)); + + // https://docs.simpay.pl/pl/typescript/?typescript#sms-pobieranie-informacji-o-usludze + console.log(await sms.getService('d151e4f9')); + + // https://docs.simpay.pl/pl/typescript/?typescript#sms-pobieranie-listy-transakcji + console.log(await sms.getTransactions('d151e4f9')); + console.log(await sms.getTransactionsPaginated('d151e4f9', 1, 100)); + + // https://docs.simpay.pl/pl/typescript/?typescript#sms-pobieranie-informacji-o-transakcji + console.log(await sms.getTransaction('d151e4f9', 2216609)); + + // https://docs.simpay.pl/pl/typescript/?typescript#sms-pobieranie-dostepnych-numerow-dla-uslugi + console.log(await sms.getServiceNumbers('d151e4f9')); + console.log(await sms.getServiceNumbersPaginated('d151e4f9', 1, 100)); + + // https://docs.simpay.pl/pl/typescript/?typescript#sms-informacji-o-pojedynczym-numerze-uslugi + console.log(await sms.getServiceNumber('d151e4f9', 7055)); + + // https://docs.simpay.pl/pl/typescript/?typescript#sms-pobieranie-wszystkich-dostepnych-numerow + console.log(await sms.getNumbers()); + console.log(await sms.getNumbersPaginated(1, 100)); + + // https://docs.simpay.pl/pl/typescript/?typescript#sms-pobieranie-pojedynczego-numeru-sms + console.log(await sms.getNumber(7055)); + + // https://docs.simpay.pl/pl/typescript/?typescript#sms-weryfikacja-poprawnosci-kodu + console.log(await sms.verifySmsCode('d151e4f9', '81FFC5', 7055)); + console.log(await sms.verifySmsCode('d151e4f9', '81FFC5')); +}; + +export { smsTests }; \ No newline at end of file