mirror of
https://github.com/LukeHagar/plexjs.git
synced 2025-12-09 12:37:46 +00:00
Bump version to 0.0.18
This commit is contained in:
committed by
github-actions[bot]
parent
ddbf96d1d1
commit
a7139cc510
@@ -5,7 +5,7 @@ files:
|
|||||||
destinationFilename: package.json
|
destinationFilename: package.json
|
||||||
npmName: plexjs
|
npmName: plexjs
|
||||||
npmRepository: lukehagar
|
npmRepository: lukehagar
|
||||||
npmVersion: 0.0.17
|
npmVersion: 0.0.18
|
||||||
useSingleRequestParameter: true
|
useSingleRequestParameter: true
|
||||||
sortParamsByRequiredFlag: true
|
sortParamsByRequiredFlag: true
|
||||||
gitUserID: lukehagar
|
gitUserID: lukehagar
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
## plexjs@0.0.17
|
## plexjs@0.0.18
|
||||||
|
|
||||||
This generator creates TypeScript/JavaScript client that utilizes [axios](https://github.com/axios/axios). The generated Node module can be used in the following environments:
|
This generator creates TypeScript/JavaScript client that utilizes [axios](https://github.com/axios/axios). The generated Node module can be used in the following environments:
|
||||||
|
|
||||||
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
|
|||||||
_published:_
|
_published:_
|
||||||
|
|
||||||
```
|
```
|
||||||
npm install plexjs@0.0.17 --save
|
npm install plexjs@0.0.18 --save
|
||||||
```
|
```
|
||||||
|
|
||||||
_unPublished (not recommended):_
|
_unPublished (not recommended):_
|
||||||
|
|||||||
@@ -15,83 +15,72 @@
|
|||||||
import { IAxiosRetryConfig } from "axios-retry";
|
import { IAxiosRetryConfig } from "axios-retry";
|
||||||
|
|
||||||
export interface ConfigurationParameters {
|
export interface ConfigurationParameters {
|
||||||
apiKey?:
|
|
||||||
| string
|
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
||||||
| Promise<string>
|
basePath?: string;
|
||||||
| ((name: string) => string)
|
|
||||||
| ((name: string) => Promise<string>);
|
|
||||||
basePath?: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export class Configuration {
|
export class Configuration {
|
||||||
/**
|
/**
|
||||||
* parameter for apiKey security
|
* parameter for apiKey security
|
||||||
* @param name security name
|
* @param name security name
|
||||||
* @memberof Configuration
|
* @memberof Configuration
|
||||||
*/
|
*/
|
||||||
apiKey?:
|
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
||||||
| string
|
|
||||||
| Promise<string>
|
|
||||||
| ((name: string) => string)
|
|
||||||
| ((name: string) => Promise<string>);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* override base path
|
* override base path
|
||||||
*
|
*
|
||||||
* @type {string}
|
* @type {string}
|
||||||
* @memberof Configuration
|
* @memberof Configuration
|
||||||
*/
|
*/
|
||||||
basePath?: string;
|
basePath?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* base options for axios calls
|
* base options for axios calls
|
||||||
*
|
*
|
||||||
* @type {any}
|
* @type {any}
|
||||||
* @memberof Configuration
|
* @memberof Configuration
|
||||||
*/
|
*/
|
||||||
baseOptions?: any;
|
baseOptions?: any;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The FormData constructor that will be used to create multipart form data
|
* The FormData constructor that will be used to create multipart form data
|
||||||
* requests. You can inject this here so that execution environments that
|
* requests. You can inject this here so that execution environments that
|
||||||
* do not support the FormData class can still run the generated client.
|
* do not support the FormData class can still run the generated client.
|
||||||
*
|
*
|
||||||
* @type {new () => FormData}
|
* @type {new () => FormData}
|
||||||
*/
|
*/
|
||||||
formDataCtor?: new () => any;
|
formDataCtor?: new () => any;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* axios retry configuration
|
* axios retry configuration
|
||||||
*
|
*
|
||||||
* @type {IAxiosRetryConfig}
|
* @type {IAxiosRetryConfig}
|
||||||
* @memberof Configuration
|
* @memberof Configuration
|
||||||
*/
|
*/
|
||||||
retriesConfig?: IAxiosRetryConfig;
|
retriesConfig?: IAxiosRetryConfig
|
||||||
|
|
||||||
constructor(param: ConfigurationParameters = {}) {
|
constructor(param: ConfigurationParameters = {}) {
|
||||||
this.apiKey = param.apiKey;
|
|
||||||
this.basePath = param.basePath;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
this.apiKey = param.apiKey;
|
||||||
* Check if the given MIME is a JSON MIME.
|
this.basePath = param.basePath;
|
||||||
* JSON MIME examples:
|
|
||||||
* application/json
|
}
|
||||||
* application/json; charset=UTF8
|
|
||||||
* APPLICATION/JSON
|
/**
|
||||||
* application/vnd.company+json
|
* Check if the given MIME is a JSON MIME.
|
||||||
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
* JSON MIME examples:
|
||||||
* @return True if the given MIME is JSON, false otherwise.
|
* application/json
|
||||||
*/
|
* application/json; charset=UTF8
|
||||||
public isJsonMime(mime: string): boolean {
|
* APPLICATION/JSON
|
||||||
const jsonMime: RegExp = new RegExp(
|
* application/vnd.company+json
|
||||||
"^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$",
|
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
||||||
"i"
|
* @return True if the given MIME is JSON, false otherwise.
|
||||||
);
|
*/
|
||||||
return (
|
public isJsonMime(mime: string): boolean {
|
||||||
mime !== null &&
|
const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
|
||||||
(jsonMime.test(mime) ||
|
return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
|
||||||
mime.toLowerCase() === "application/json-patch+json")
|
}
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,5 +14,5 @@
|
|||||||
|
|
||||||
|
|
||||||
export * from "./api";
|
export * from "./api";
|
||||||
export * from "./configuration";
|
export {Configuration, ConfigurationParameters} from "./configuration";
|
||||||
|
|
||||||
|
|||||||
4
plexjs/package-lock.json
generated
4
plexjs/package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "@lukehagar/plexjs",
|
"name": "@lukehagar/plexjs",
|
||||||
"version": "0.0.17",
|
"version": "0.0.18",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@lukehagar/plexjs",
|
"name": "@lukehagar/plexjs",
|
||||||
"version": "0.0.17",
|
"version": "0.0.18",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "^0.26.1",
|
"axios": "^0.26.1",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@lukehagar/plexjs",
|
"name": "@lukehagar/plexjs",
|
||||||
"version": "0.0.17",
|
"version": "0.0.18",
|
||||||
"description": "Community Made Plex JS/TS Module",
|
"description": "Community Made Plex JS/TS Module",
|
||||||
"author": "Luke Hagar",
|
"author": "Luke Hagar",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
|||||||
Reference in New Issue
Block a user