Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@2bad/ryanair

Package Overview
Dependencies
Maintainers
2
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@2bad/ryanair - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

2

build/airports/getActive.d.ts

@@ -1,2 +0,2 @@

import { Airport } from './types';
import { Airport } from './types.js';
/**

@@ -3,0 +3,0 @@ * Retrieves a list of all active airports

import { z } from 'zod';
import { get } from '../client';
import { Airport } from './types';
import { get } from '../client.js';
import { Airport } from './types.js';
/**

@@ -5,0 +5,0 @@ * Retrieves a list of all active airports

@@ -1,2 +0,2 @@

import { AirportShort } from './types';
import { AirportShort } from './types.js';
/**

@@ -3,0 +3,0 @@ * Returns information about the closest airport based on the user's IP address.

@@ -1,3 +0,3 @@

import { get } from '../client';
import { AirportShort } from './types';
import { get } from '../client.js';
import { AirportShort } from './types.js';
/**

@@ -4,0 +4,0 @@ * Returns information about the closest airport based on the user's IP address.

@@ -1,2 +0,2 @@

import { Destination, type IataCode } from './types';
import { Destination, type IataCode } from './types.js';
/**

@@ -3,0 +3,0 @@ * Returns a list of available destinations from an airport

import { z } from 'zod';
import { get } from '../client';
import { Destination } from './types';
import { get } from '../client.js';
import { Destination } from './types.js';
/**

@@ -5,0 +5,0 @@ * Returns a list of available destinations from an airport

@@ -1,2 +0,2 @@

import { Airport, type IataCode } from './types';
import { Airport, type IataCode } from './types.js';
/**

@@ -3,0 +3,0 @@ * Returns information about an airport

@@ -1,3 +0,3 @@

import { get } from '../client';
import { Airport } from './types';
import { get } from '../client.js';
import { Airport } from './types.js';
/**

@@ -4,0 +4,0 @@ * Returns information about an airport

@@ -1,6 +0,6 @@

export { getActive } from './getActive';
export { getClosest } from './getClosest';
export { getDestinations } from './getDestinations';
export { getInfo } from './getInfo';
export { searchByPhrase } from './searchByPhrase';
export { searchByRoute } from './searchByRoute';
export { getActive } from './getActive.js';
export { getClosest } from './getClosest.js';
export { getDestinations } from './getDestinations.js';
export { getInfo } from './getInfo.js';
export { searchByPhrase } from './searchByPhrase.js';
export { searchByRoute } from './searchByRoute.js';

@@ -1,6 +0,6 @@

export { getActive } from './getActive';
export { getClosest } from './getClosest';
export { getDestinations } from './getDestinations';
export { getInfo } from './getInfo';
export { searchByPhrase } from './searchByPhrase';
export { searchByRoute } from './searchByRoute';
export { getActive } from './getActive.js';
export { getClosest } from './getClosest.js';
export { getDestinations } from './getDestinations.js';
export { getInfo } from './getInfo.js';
export { searchByPhrase } from './searchByPhrase.js';
export { searchByRoute } from './searchByRoute.js';

@@ -1,3 +0,3 @@

import * as client from '../client';
import * as airports from './index';
import * as client from '../client.js';
import * as airports from './index.js';
describe('Airports', () => {

@@ -11,3 +11,3 @@ afterEach(() => {

const data = await airports.getActive();
expect(data).toMatchSnapshot();
expect(data.length).toBeGreaterThan(0);
});

@@ -14,0 +14,0 @@ });

@@ -1,2 +0,2 @@

import { AirportShort } from './types';
import { AirportShort } from './types.js';
/**

@@ -3,0 +3,0 @@ * Search for airports matching the given phrase

import { z } from 'zod';
import { get } from '../client';
import { AirportShort } from './types';
import { get } from '../client.js';
import { AirportShort } from './types.js';
/**

@@ -5,0 +5,0 @@ * Search for airports matching the given phrase

@@ -1,2 +0,2 @@

import { AirportConnection } from './types';
import { AirportConnection } from './types.js';
/**

@@ -3,0 +3,0 @@ * Search for airports with available routes from the departure phrase to the arrival phrase

import { z } from 'zod';
import { get } from '../client';
import { AirportConnection } from './types';
import { get } from '../client.js';
import { AirportConnection } from './types.js';
/**

@@ -5,0 +5,0 @@ * Search for airports with available routes from the departure phrase to the arrival phrase

/**
* Performs a GET request to the specified URL and returns the response data as a promise
* Extend `got` http client so every time request is made we check if there is a `rid.sig` cookie
* that is needed for certain endpoints to work
*
* @param url The URL to send the GET request to
* @return A promise that resolves with the response data or rejects with an error
*/
export declare const get: import("got").Got;
import { got } from 'got';
import { CookieJar } from 'tough-cookie';
/**
* Performs a GET request to the specified URL and returns the response data as a promise
* Extend `got` http client so every time request is made we check if there is a `rid.sig` cookie
* that is needed for certain endpoints to work
*
* @param url The URL to send the GET request to
* @return A promise that resolves with the response data or rejects with an error
*/
// export const get = async (url: string | URL): Promise<unknown> => {
export const get = got.extend({

@@ -11,0 +10,0 @@ hooks: {

@@ -1,4 +0,4 @@

import { type IataCode } from '../airports/types';
import { type StrDate } from '../date.types';
import { CheapestFares } from './types';
import { type IataCode } from '../airports/types.js';
import { type StrDate } from '../date.types.js';
import { CheapestFares } from './types.js';
/**

@@ -5,0 +5,0 @@ * Returns the cheapest one-way fares between two airports for a given start date

@@ -1,3 +0,3 @@

import { get } from '../client';
import { CheapestFares } from './types';
import { get } from '../client.js';
import { CheapestFares } from './types.js';
/**

@@ -4,0 +4,0 @@ * Returns the cheapest one-way fares between two airports for a given start date

@@ -1,1 +0,1 @@

export { cheapestPerDay } from './cheapestPerDay';
export { cheapestPerDay } from './cheapestPerDay.js';

@@ -1,1 +0,1 @@

export { cheapestPerDay } from './cheapestPerDay';
export { cheapestPerDay } from './cheapestPerDay.js';

@@ -1,4 +0,4 @@

import * as client from '../client';
import { tomorrow } from '../utils/date';
import { cheapestPerDay } from './index';
import * as client from '../client.js';
import { tomorrow } from '../utils/date.js';
import { cheapestPerDay } from './index.js';
describe('Fares', () => {

@@ -5,0 +5,0 @@ describe('cheapestPerDay', () => {

import { z } from 'zod';
import { StrDate, StrDateTime } from '../date.types';
import { StrDate, StrDateTime } from '../date.types.js';
export const Price = z.object({

@@ -4,0 +4,0 @@ value: z.number(),

@@ -1,2 +0,2 @@

import { type AvailabilityOptions, AvailabilityResponse } from './types';
import { type AvailabilityOptions, AvailabilityResponse } from './types.js';
export declare const getAvailable: (params: Partial<AvailabilityOptions>) => Promise<AvailabilityResponse>;

@@ -1,4 +0,4 @@

import { get } from '../client';
import { tomorrow } from '../utils/date';
import { AvailabilityResponse } from './types';
import { get } from '../client.js';
import { tomorrow } from '../utils/date.js';
import { AvailabilityResponse } from './types.js';
export const getAvailable = async (params) => {

@@ -5,0 +5,0 @@ const defaults = {

@@ -1,3 +0,3 @@

import { type IataCode } from '../airports/types';
import { StrDate } from '../date.types';
import { type IataCode } from '../airports/types.js';
import { StrDate } from '../date.types.js';
/**

@@ -4,0 +4,0 @@ * Returns a list of available flight dates between two airports

import { z } from 'zod';
import { get } from '../client';
import { StrDate } from '../date.types';
import { get } from '../client.js';
import { StrDate } from '../date.types.js';
/**

@@ -5,0 +5,0 @@ * Returns a list of available flight dates between two airports

@@ -1,2 +0,2 @@

export { getAvailable } from './getAvailable';
export { getDates } from './getDates';
export { getAvailable } from './getAvailable.js';
export { getDates } from './getDates.js';

@@ -1,2 +0,2 @@

export { getAvailable } from './getAvailable';
export { getDates } from './getDates';
export { getAvailable } from './getAvailable.js';
export { getDates } from './getDates.js';

@@ -1,4 +0,4 @@

import * as client from '../client';
import { tomorrow } from '../utils/date';
import { getDates, getAvailable } from './index';
import * as client from '../client.js';
import { tomorrow } from '../utils/date.js';
import { getDates, getAvailable } from './index.js';
describe('Flights', () => {

@@ -5,0 +5,0 @@ describe('getDates', () => {

import { z } from 'zod';
import { IataCode } from '../airports/types';
import { StrDate, StrDateTimeMs } from '../date.types';
import { IataCode } from '../airports/types.js';
import { StrDate, StrDateTimeMs } from '../date.types.js';
const FROM_0_TO_24_REGEX = /\b([0-9]|1[0-9]|2[0-4])\b/g;

@@ -5,0 +5,0 @@ const FROM_0_TO_24_ERROR_MESSAGE = 'Only numbers between 0 and 24 are accepted.';

@@ -1,3 +0,3 @@

export * as airports from './airports';
export * as fares from './fares';
export * as flights from './flights';
export * as airports from './airports/index.js';
export * as fares from './fares/index.js';
export * as flights from './flights/index.js';

@@ -1,3 +0,3 @@

export * as airports from './airports';
export * as fares from './fares';
export * as flights from './flights';
export * as airports from './airports/index.js';
export * as fares from './fares/index.js';
export * as flights from './flights/index.js';

@@ -1,3 +0,3 @@

import { StrDate } from '../date.types';
import { tomorrow } from './date';
import { StrDate } from '../date.types.js';
import { tomorrow } from './date.js';
describe('tomorrow', () => {

@@ -4,0 +4,0 @@ it('should return a string in YYYY-MM-DD format', () => {

{
"name": "@2bad/ryanair",
"version": "2.0.0",
"version": "2.0.1",
"description": "Unofficial typescript client for the Ryanair API that allows you to easily retrieve information about airports, flights and prices.",

@@ -38,13 +38,15 @@ "keywords": [

"scripts": {
"build": "tsc --project tsconfig.json",
"build": "run-s compile fix-alias",
"clean": "rimraf build",
"compile": "tsc --project tsconfig.json",
"fix-alias": "tsc-alias -p tsconfig.json",
"format:check": "prettier --check source/**/*.ts",
"format:fix": "prettier --write source/**/*.ts",
"lint": "eslint . --ext .ts",
"lint:fix": "run-s \"lint -- --fix\"",
"lint": "eslint . --ext .ts",
"prepublishOnly": "run-s clean build",
"preversion": "run-s clean lint test build",
"test": "vitest run",
"test:integration": "vitest run integration --coverage",
"test:unit": "vitest run unit --coverage",
"test": "vitest run"
"test:unit": "vitest run unit --coverage"
},

@@ -66,4 +68,4 @@ "prettier": {

"@types/tough-cookie": "4.0.2",
"@typescript-eslint/eslint-plugin": "5.59.2",
"@typescript-eslint/parser": "5.59.2",
"@typescript-eslint/eslint-plugin": "5.59.5",
"@typescript-eslint/parser": "5.59.5",
"@vitest/coverage-c8": "0.31.0",

@@ -82,2 +84,3 @@ "eslint": "8.40.0",

"ts-node": "10.9.1",
"tsc-alias": "1.8.6",
"typescript": "5.0.4",

@@ -84,0 +87,0 @@ "vitest": "0.31.0"

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc