@jbouduin/holidays-http
Advanced tools
Comparing version 0.0.1-alpha.4 to 0.0.1
import { IHierarchy, IHoliday } from '@jbouduin/holidays-lib'; | ||
import { IHolidays } from '@jbouduin/holidays-lib'; | ||
import { AxiosRequestConfig } from "axios"; | ||
export declare class HolidaysHttp implements IHolidays { | ||
constructor(language?: string); | ||
private hierarchyCalculator; | ||
/** | ||
* | ||
* @param host The host name | ||
* @param assetsDirectory the assets root directory | ||
* @param options any Axios Request configuration you want to pass | ||
* @param language Optional. If not specified, the system falls back to 'en' | ||
*/ | ||
constructor(host: string, assetsDirectory: string, options?: AxiosRequestConfig, language?: string); | ||
getHierarchyTree(): Promise<Array<IHierarchy>>; | ||
getHolidays(path: string, year: number, deep?: boolean | undefined): Promise<Array<IHoliday>>; | ||
getHolidays(path: string, year: number, deep: boolean): Promise<Array<IHoliday>>; | ||
getSupportedLanguages(): Promise<Array<string>>; | ||
} | ||
//# sourceMappingURL=holidays-http.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.HolidaysHttp = void 0; | ||
var holidays_lib_1 = require("@jbouduin/holidays-lib"); | ||
var file_provider_1 = require("./file-provider"); | ||
var HolidaysHttp = /** @class */ (function () { | ||
// <editor-fold desc='private properties'> | ||
// private hierarchyCalculator: IHierarchyCalculator; | ||
// </editor-fold> | ||
// <editor-fold desc='Constructor & C°'> | ||
function HolidaysHttp(language) { | ||
// this.hierarchyCalculator = new HierarchyCalculator(language || 'en_GB'); | ||
//#endregion | ||
//#region Constructor & C° -------------------------------------------------- | ||
/** | ||
* | ||
* @param host The host name | ||
* @param assetsDirectory the assets root directory | ||
* @param options any Axios Request configuration you want to pass | ||
* @param language Optional. If not specified, the system falls back to 'en' | ||
*/ | ||
function HolidaysHttp(host, assetsDirectory, options, language) { | ||
if (options === void 0) { options = {}; } | ||
this.hierarchyCalculator = new holidays_lib_1.HierarchyCalculator(language || 'en', new file_provider_1.FileProvider(host, assetsDirectory, options)); | ||
} | ||
// </editor-fold> | ||
// <editor-fold desc='IHolidays interface methods'> | ||
//#endregion | ||
//#region IHolidays interface methods --------------------------------------- | ||
HolidaysHttp.prototype.getHierarchyTree = function () { | ||
return Promise.resolve(new Array()); | ||
return this.hierarchyCalculator.getHierarchyTree(); | ||
}; | ||
HolidaysHttp.prototype.getHolidays = function (path, year, deep) { | ||
return Promise.resolve(new Array()); | ||
return this.hierarchyCalculator.getHolidays(path, year, deep); | ||
}; | ||
HolidaysHttp.prototype.getSupportedLanguages = function () { | ||
return Promise.resolve(new Array()); | ||
return this.hierarchyCalculator.getSupportedLanguages(); | ||
}; | ||
@@ -23,0 +31,0 @@ return HolidaysHttp; |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
@@ -10,5 +14,5 @@ if (k2 === undefined) k2 = k; | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p); | ||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__exportStar(require("./holidays-http"), exports); |
{ | ||
"name": "@jbouduin/holidays-http", | ||
"version": "0.0.1-alpha.4", | ||
"version": "0.0.1", | ||
"description": "", | ||
@@ -12,3 +12,3 @@ "main": "lib/index.js", | ||
"build:package": "tsc", | ||
"lint": "tslint -p tsconfig.json", | ||
"lint": "eslint ./src --ext .js,.jsx,.ts,.tsx", | ||
"test": "echo \"Error: run tests from root\" && exit 1" | ||
@@ -23,3 +23,4 @@ }, | ||
"dependencies": { | ||
"@jbouduin/holidays-lib": "^0.0.1-alpha.4" | ||
"@jbouduin/holidays-lib": "^0.0.1", | ||
"axios": "^0.26.1" | ||
}, | ||
@@ -29,3 +30,3 @@ "publishConfig": { | ||
}, | ||
"gitHead": "bffd3910002609e8cb08ff1b929208d11524d2fc" | ||
"gitHead": "fccb7e293192e80e53ffacad72dabdc5545b63d9" | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
11512
12
133
1
54
2
+ Addedaxios@^0.26.1
+ Addedaxios@0.26.1(transitive)
+ Addedfollow-redirects@1.15.9(transitive)