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

@2bad/ryanair

Package Overview
Dependencies
Maintainers
3
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 7.0.0 to 7.1.1

6

build/airports/getActive.d.ts

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

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

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

export declare const getActive: () => Promise<Airport[]>;
/**
* Retrieves a list of all active airports using api v3 (old)
*/
export declare const getActiveV3: () => Promise<AirportV3[]>;
import { z } from "zod";
import { Airport } from "./types.js";
import { Airport, AirportV3 } from "./types.js";
import { get } from "../client/index.js";

@@ -13,1 +13,9 @@ import { VIEWS_API } from "../endpoints.js";

};
/**
* Retrieves a list of all active airports using api v3 (old)
*/ export const getActiveV3 = async ()=>{
const url = `${VIEWS_API}/3/airports/en/active`;
const data = await get(url);
const airports = z.array(AirportV3).parse(data);
return airports;
};

2

build/airports/index.d.ts
export { calculateDistance } from '../airports/calculateDistance.js';
export { findRoutes } from '../airports/findRoutes.js';
export { getActive } from '../airports/getActive.js';
export { getActive, getActiveV3 } from '../airports/getActive.js';
export { getClosest } from '../airports/getClosest.js';

@@ -5,0 +5,0 @@ export { getDestinations } from '../airports/getDestinations.js';

export { calculateDistance } from "./calculateDistance.js";
export { findRoutes } from "./findRoutes.js";
export { getActive } from "./getActive.js";
export { getActive, getActiveV3 } from "./getActive.js";
export { getClosest } from "./getClosest.js";

@@ -5,0 +5,0 @@ export { getDestinations } from "./getDestinations.js";

@@ -298,4 +298,3 @@ import { z } from 'zod';

export type AirportConnection = z.infer<typeof AirportConnection>;
export declare const Airport: z.ZodObject<{
code: z.ZodString;
export declare const AirportBase: z.ZodObject<{
name: z.ZodString;

@@ -305,2 +304,119 @@ seoName: z.ZodString;

base: z.ZodBoolean;
coordinates: z.ZodObject<{
latitude: z.ZodNumber;
longitude: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
latitude: number;
longitude: number;
}, {
latitude: number;
longitude: number;
}>;
timeZone: z.ZodString;
}, "strip", z.ZodTypeAny, {
name: string;
aliases: string[];
coordinates: {
latitude: number;
longitude: number;
};
seoName: string;
base: boolean;
timeZone: string;
}, {
name: string;
aliases: string[];
coordinates: {
latitude: number;
longitude: number;
};
seoName: string;
base: boolean;
timeZone: string;
}>;
export type AirportBase = z.infer<typeof AirportBase>;
export declare const AirportV3: z.ZodObject<z.objectUtil.extendShape<{
name: z.ZodString;
seoName: z.ZodString;
aliases: z.ZodArray<z.ZodString, "many">;
base: z.ZodBoolean;
coordinates: z.ZodObject<{
latitude: z.ZodNumber;
longitude: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
latitude: number;
longitude: number;
}, {
latitude: number;
longitude: number;
}>;
timeZone: z.ZodString;
}, {
iataCode: z.ZodString;
countryCode: z.ZodString;
regionCode: z.ZodString;
cityCode: z.ZodString;
currencyCode: z.ZodString;
routes: z.ZodArray<z.ZodString, "many">;
seasonalRoutes: z.ZodArray<z.ZodString, "many">;
categories: z.ZodArray<z.ZodString, "many">;
priority: z.ZodNumber;
}>, "strip", z.ZodTypeAny, {
name: string;
aliases: string[];
coordinates: {
latitude: number;
longitude: number;
};
seoName: string;
base: boolean;
timeZone: string;
iataCode: string;
countryCode: string;
regionCode: string;
cityCode: string;
currencyCode: string;
routes: string[];
seasonalRoutes: string[];
categories: string[];
priority: number;
}, {
name: string;
aliases: string[];
coordinates: {
latitude: number;
longitude: number;
};
seoName: string;
base: boolean;
timeZone: string;
iataCode: string;
countryCode: string;
regionCode: string;
cityCode: string;
currencyCode: string;
routes: string[];
seasonalRoutes: string[];
categories: string[];
priority: number;
}>;
export type AirportV3 = z.infer<typeof AirportV3>;
export declare const Airport: z.ZodObject<z.objectUtil.extendShape<{
name: z.ZodString;
seoName: z.ZodString;
aliases: z.ZodArray<z.ZodString, "many">;
base: z.ZodBoolean;
coordinates: z.ZodObject<{
latitude: z.ZodNumber;
longitude: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
latitude: number;
longitude: number;
}, {
latitude: number;
longitude: number;
}>;
timeZone: z.ZodString;
}, {
code: z.ZodString;
city: z.ZodObject<{

@@ -359,14 +475,3 @@ name: z.ZodString;

}>;
coordinates: z.ZodObject<{
latitude: z.ZodNumber;
longitude: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
latitude: number;
longitude: number;
}, {
latitude: number;
longitude: number;
}>;
timeZone: z.ZodString;
}, "strip", z.ZodTypeAny, {
}>, "strip", z.ZodTypeAny, {
code: string;

@@ -392,2 +497,3 @@ name: string;

base: boolean;
timeZone: string;
region: {

@@ -397,3 +503,2 @@ code: string;

};
timeZone: string;
macCity?: {

@@ -425,2 +530,3 @@ code: string;

base: boolean;
timeZone: string;
region: {

@@ -430,3 +536,2 @@ code: string;

};
timeZone: string;
macCity?: {

@@ -440,4 +545,3 @@ code: string;

export declare const Destination: z.ZodObject<{
arrivalAirport: z.ZodObject<{
code: z.ZodString;
arrivalAirport: z.ZodObject<z.objectUtil.extendShape<{
name: z.ZodString;

@@ -447,2 +551,15 @@ seoName: z.ZodString;

base: z.ZodBoolean;
coordinates: z.ZodObject<{
latitude: z.ZodNumber;
longitude: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
latitude: number;
longitude: number;
}, {
latitude: number;
longitude: number;
}>;
timeZone: z.ZodString;
}, {
code: z.ZodString;
city: z.ZodObject<{

@@ -501,14 +618,3 @@ name: z.ZodString;

}>;
coordinates: z.ZodObject<{
latitude: z.ZodNumber;
longitude: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
latitude: number;
longitude: number;
}, {
latitude: number;
longitude: number;
}>;
timeZone: z.ZodString;
}, "strip", z.ZodTypeAny, {
}>, "strip", z.ZodTypeAny, {
code: string;

@@ -534,2 +640,3 @@ name: string;

base: boolean;
timeZone: string;
region: {

@@ -539,3 +646,2 @@ code: string;

};
timeZone: string;
macCity?: {

@@ -567,2 +673,3 @@ code: string;

base: boolean;
timeZone: string;
region: {

@@ -572,3 +679,2 @@ code: string;

};
timeZone: string;
macCity?: {

@@ -606,2 +712,3 @@ code: string;

base: boolean;
timeZone: string;
region: {

@@ -611,3 +718,2 @@ code: string;

};
timeZone: string;
macCity?: {

@@ -645,2 +751,3 @@ code: string;

base: boolean;
timeZone: string;
region: {

@@ -650,3 +757,2 @@ code: string;

};
timeZone: string;
macCity?: {

@@ -653,0 +759,0 @@ code: string;

@@ -36,4 +36,3 @@ import { z } from "zod";

});
export const Airport = z.object({
code: IataCode,
export const AirportBase = z.object({
name: z.string(),

@@ -43,2 +42,18 @@ seoName: z.string(),

base: z.boolean(),
coordinates: Coordinates,
timeZone: z.string()
});
export const AirportV3 = AirportBase.extend({
iataCode: IataCode,
countryCode: z.string(),
regionCode: z.string(),
cityCode: z.string(),
currencyCode: z.string(),
routes: z.array(z.string()),
seasonalRoutes: z.array(z.string()),
categories: z.array(z.string()),
priority: z.number()
});
export const Airport = AirportBase.extend({
code: IataCode,
city: Location,

@@ -49,5 +64,3 @@ macCity: Location.optional(),

}),
country: Country,
coordinates: Coordinates,
timeZone: z.string()
country: Country
});

@@ -54,0 +67,0 @@ export const Destination = z.object({

@@ -8,2 +8,2 @@ export declare const DELAY_MS: number | [number, number];

*/
export declare const get: import("got").Got;
export declare const get: import("got").Got<never>;
import { z } from "zod";
// TODO: replace with `z.string().date()` when implemented https://github.com/colinhacks/zod/pull/1766
export const StrDate = z.string().regex(/\d{4}-\d{2}-\d{2}$/);
export const StrDateTime = z.string().regex(/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}$/);
export const StrDateTimeMs = z.string().regex(/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}$/);
export const StrDate = z.string().date();
export const StrDateTime = z.string().datetime({
local: true
});
export const StrDateTimeMs = z.string().datetime({
local: true,
precision: 3
});

@@ -10,11 +10,11 @@ import { z } from 'zod';

value: number;
currencyCode: string;
valueMainUnit: string;
valueFractionalUnit: string;
currencyCode: string;
currencySymbol: string;
}, {
value: number;
currencyCode: string;
valueMainUnit: string;
valueFractionalUnit: string;
currencyCode: string;
currencySymbol: string;

@@ -35,11 +35,11 @@ }>;

value: number;
currencyCode: string;
valueMainUnit: string;
valueFractionalUnit: string;
currencyCode: string;
currencySymbol: string;
}, {
value: number;
currencyCode: string;
valueMainUnit: string;
valueFractionalUnit: string;
currencyCode: string;
currencySymbol: string;

@@ -55,5 +55,5 @@ }>>;

value: number;
currencyCode: string;
valueMainUnit: string;
valueFractionalUnit: string;
currencyCode: string;
currencySymbol: string;

@@ -69,5 +69,5 @@ } | null;

value: number;
currencyCode: string;
valueMainUnit: string;
valueFractionalUnit: string;
currencyCode: string;
currencySymbol: string;

@@ -93,11 +93,11 @@ } | null;

value: number;
currencyCode: string;
valueMainUnit: string;
valueFractionalUnit: string;
currencyCode: string;
currencySymbol: string;
}, {
value: number;
currencyCode: string;
valueMainUnit: string;
valueFractionalUnit: string;
currencyCode: string;
currencySymbol: string;

@@ -113,5 +113,5 @@ }>>;

value: number;
currencyCode: string;
valueMainUnit: string;
valueFractionalUnit: string;
currencyCode: string;
currencySymbol: string;

@@ -127,5 +127,5 @@ } | null;

value: number;
currencyCode: string;
valueMainUnit: string;
valueFractionalUnit: string;
currencyCode: string;
currencySymbol: string;

@@ -148,11 +148,11 @@ } | null;

value: number;
currencyCode: string;
valueMainUnit: string;
valueFractionalUnit: string;
currencyCode: string;
currencySymbol: string;
}, {
value: number;
currencyCode: string;
valueMainUnit: string;
valueFractionalUnit: string;
currencyCode: string;
currencySymbol: string;

@@ -168,5 +168,5 @@ }>>;

value: number;
currencyCode: string;
valueMainUnit: string;
valueFractionalUnit: string;
currencyCode: string;
currencySymbol: string;

@@ -182,5 +182,5 @@ } | null;

value: number;
currencyCode: string;
valueMainUnit: string;
valueFractionalUnit: string;
currencyCode: string;
currencySymbol: string;

@@ -203,11 +203,11 @@ } | null;

value: number;
currencyCode: string;
valueMainUnit: string;
valueFractionalUnit: string;
currencyCode: string;
currencySymbol: string;
}, {
value: number;
currencyCode: string;
valueMainUnit: string;
valueFractionalUnit: string;
currencyCode: string;
currencySymbol: string;

@@ -223,5 +223,5 @@ }>>;

value: number;
currencyCode: string;
valueMainUnit: string;
valueFractionalUnit: string;
currencyCode: string;
currencySymbol: string;

@@ -237,5 +237,5 @@ } | null;

value: number;
currencyCode: string;
valueMainUnit: string;
valueFractionalUnit: string;
currencyCode: string;
currencySymbol: string;

@@ -253,5 +253,5 @@ } | null;

value: number;
currencyCode: string;
valueMainUnit: string;
valueFractionalUnit: string;
currencyCode: string;
currencySymbol: string;

@@ -268,5 +268,5 @@ } | null;

value: number;
currencyCode: string;
valueMainUnit: string;
valueFractionalUnit: string;
currencyCode: string;
currencySymbol: string;

@@ -283,5 +283,5 @@ } | null;

value: number;
currencyCode: string;
valueMainUnit: string;
valueFractionalUnit: string;
currencyCode: string;
currencySymbol: string;

@@ -299,5 +299,5 @@ } | null;

value: number;
currencyCode: string;
valueMainUnit: string;
valueFractionalUnit: string;
currencyCode: string;
currencySymbol: string;

@@ -314,5 +314,5 @@ } | null;

value: number;
currencyCode: string;
valueMainUnit: string;
valueFractionalUnit: string;
currencyCode: string;
currencySymbol: string;

@@ -329,5 +329,5 @@ } | null;

value: number;
currencyCode: string;
valueMainUnit: string;
valueFractionalUnit: string;
currencyCode: string;
currencySymbol: string;

@@ -347,5 +347,5 @@ } | null;

value: number;
currencyCode: string;
valueMainUnit: string;
valueFractionalUnit: string;
currencyCode: string;
currencySymbol: string;

@@ -362,5 +362,5 @@ } | null;

value: number;
currencyCode: string;
valueMainUnit: string;
valueFractionalUnit: string;
currencyCode: string;
currencySymbol: string;

@@ -377,5 +377,5 @@ } | null;

value: number;
currencyCode: string;
valueMainUnit: string;
valueFractionalUnit: string;
currencyCode: string;
currencySymbol: string;

@@ -395,5 +395,5 @@ } | null;

value: number;
currencyCode: string;
valueMainUnit: string;
valueFractionalUnit: string;
currencyCode: string;
currencySymbol: string;

@@ -410,5 +410,5 @@ } | null;

value: number;
currencyCode: string;
valueMainUnit: string;
valueFractionalUnit: string;
currencyCode: string;
currencySymbol: string;

@@ -425,5 +425,5 @@ } | null;

value: number;
currencyCode: string;
valueMainUnit: string;
valueFractionalUnit: string;
currencyCode: string;
currencySymbol: string;

@@ -450,11 +450,11 @@ } | null;

value: number;
currencyCode: string;
valueMainUnit: string;
valueFractionalUnit: string;
currencyCode: string;
currencySymbol: string;
}, {
value: number;
currencyCode: string;
valueMainUnit: string;
valueFractionalUnit: string;
currencyCode: string;
currencySymbol: string;

@@ -470,5 +470,5 @@ }>>;

value: number;
currencyCode: string;
valueMainUnit: string;
valueFractionalUnit: string;
currencyCode: string;
currencySymbol: string;

@@ -484,5 +484,5 @@ } | null;

value: number;
currencyCode: string;
valueMainUnit: string;
valueFractionalUnit: string;
currencyCode: string;
currencySymbol: string;

@@ -505,11 +505,11 @@ } | null;

value: number;
currencyCode: string;
valueMainUnit: string;
valueFractionalUnit: string;
currencyCode: string;
currencySymbol: string;
}, {
value: number;
currencyCode: string;
valueMainUnit: string;
valueFractionalUnit: string;
currencyCode: string;
currencySymbol: string;

@@ -525,5 +525,5 @@ }>>;

value: number;
currencyCode: string;
valueMainUnit: string;
valueFractionalUnit: string;
currencyCode: string;
currencySymbol: string;

@@ -539,5 +539,5 @@ } | null;

value: number;
currencyCode: string;
valueMainUnit: string;
valueFractionalUnit: string;
currencyCode: string;
currencySymbol: string;

@@ -557,5 +557,5 @@ } | null;

value: number;
currencyCode: string;
valueMainUnit: string;
valueFractionalUnit: string;
currencyCode: string;
currencySymbol: string;

@@ -572,5 +572,5 @@ } | null;

value: number;
currencyCode: string;
valueMainUnit: string;
valueFractionalUnit: string;
currencyCode: string;
currencySymbol: string;

@@ -589,5 +589,5 @@ } | null;

value: number;
currencyCode: string;
valueMainUnit: string;
valueFractionalUnit: string;
currencyCode: string;
currencySymbol: string;

@@ -604,5 +604,5 @@ } | null;

value: number;
currencyCode: string;
valueMainUnit: string;
valueFractionalUnit: string;
currencyCode: string;
currencySymbol: string;

@@ -609,0 +609,0 @@ } | null;

@@ -83,3 +83,3 @@ import { z } from 'zod';

}>;
export declare const Fare: z.ZodObject<{
export declare const FlightFare: z.ZodObject<{
type: z.ZodString;

@@ -86,0 +86,0 @@ amount: z.ZodNumber;

@@ -43,3 +43,3 @@ import { z } from "zod";

});
export const Fare = z.object({
export const FlightFare = z.object({
type: z.string(),

@@ -58,3 +58,3 @@ amount: z.number(),

fareClass: z.string(),
fares: z.array(Fare)
fares: z.array(FlightFare)
});

@@ -61,0 +61,0 @@ export const Flight = z.object({

export * as airports from './airports/index.js';
export * from './airports/types.js';
export * as fares from './fares/index.js';
export * from './fares/types.js';
export * as flights from './flights/index.js';
export * from './flights/types.js';
export * as airports from "./airports/index.js";
export * from "./airports/types.js";
export * as fares from "./fares/index.js";
export * from "./fares/types.js";
export * as flights from "./flights/index.js";
export * from "./flights/types.js";
{
"name": "@2bad/ryanair",
"version": "7.0.0",
"version": "7.1.1",
"description": "Unofficial typescript client for the Ryanair API that allows you to easily retrieve information about airports, flights and prices.",

@@ -20,3 +20,3 @@ "keywords": [

"type": "git",
"url": "https://github.com/2BAD/ryanair.git"
"url": "git+https://github.com/2BAD/ryanair.git"
},

@@ -39,4 +39,6 @@ "license": "MIT",

"scripts": {
"prebuild": "rimraf build",
"build": "run-p build:*",
"build:swc": "swc ./source -d ./build",
"postbuild": "run-s fix:alias fix:ext",
"build:swc": "swc ./source -d ./build --strip-leading-paths",
"build:types": "tsc --project tsconfig.build.json",

@@ -48,61 +50,18 @@ "check": "run-p check:*",

"fix:alias": "tsc-alias -p tsconfig.build.json",
"fix:code": "run-s 'lint -- --fix'",
"fix:code": "run-s 'check:code -- --fix'",
"fix:ext": "./fix-ext.sh",
"fix:format": "prettier --write 'source/**/*.ts'",
"postbuild": "run-s fix:alias fix:ext",
"prebuild": "rimraf build",
"prepublishOnly": "run-s build",
"preversion": "run-s check test build",
"test": "vitest run",
"test:integration": "vitest run integration --coverage",
"test:unit": "vitest run unit --coverage"
"test:unit": "vitest run unit --coverage",
"preversion": "run-s check test build"
},
"prettier": {
"printWidth": 120,
"semi": false,
"singleQuote": true,
"trailingComma": "none"
},
"dependencies": {
"date-fns": "3.3.0",
"date-fns": "3.6.0",
"fast-cartesian": "9.0.0",
"got": "14.0.0",
"tough-cookie": "4.1.3",
"zod": "3.22.4"
},
"devDependencies": {
"@2bad/tsconfig": "2.0.1",
"@swc/cli": "0.1.64",
"@swc/core": "1.3.105",
"@types/node": "20.11.5",
"@types/tough-cookie": "4.0.5",
"@typescript-eslint/eslint-plugin": "6.19.0",
"@typescript-eslint/parser": "6.19.0",
"@vitest/coverage-v8": "1.2.1",
"eslint": "8.56.0",
"eslint-config-prettier": "9.1.0",
"eslint-config-standard-with-typescript": "43.0.1",
"eslint-import-resolver-typescript": "3.6.1",
"eslint-plugin-import": "2.29.1",
"eslint-plugin-jsdoc": "48.0.2",
"eslint-plugin-n": "16.6.2",
"eslint-plugin-prettier": "5.1.3",
"eslint-plugin-promise": "6.1.1",
"eslint-plugin-vitest": "0.3.20",
"npm-run-all": "4.1.5",
"prettier": "3.2.4",
"rimraf": "5.0.5",
"tsc-alias": "1.8.8",
"typescript": "5.3.3",
"vite-tsconfig-paths": "4.3.1",
"vitest": "1.2.1"
},
"engines": {
"node": ">=20"
},
"volta": {
"node": "20.11.0",
"npm": "10.3.0"
},
"packageManager": "npm@10.3.0"
"got": "14.4.1",
"tough-cookie": "4.1.4",
"zod": "3.23.8"
}
}
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