Bump version to 0.0.18

This commit is contained in:
LukeHagar
2023-04-18 20:05:38 +00:00
committed by github-actions[bot]
parent ddbf96d1d1
commit a7139cc510
6 changed files with 66 additions and 77 deletions

View File

@@ -5,7 +5,7 @@ files:
destinationFilename: package.json
npmName: plexjs
npmRepository: lukehagar
npmVersion: 0.0.17
npmVersion: 0.0.18
useSingleRequestParameter: true
sortParamsByRequiredFlag: true
gitUserID: lukehagar

View File

@@ -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:
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
_published:_
```
npm install plexjs@0.0.17 --save
npm install plexjs@0.0.18 --save
```
_unPublished (not recommended):_

View File

@@ -15,12 +15,10 @@
import { IAxiosRetryConfig } from "axios-retry";
export interface ConfigurationParameters {
apiKey?:
| string
| Promise<string>
| ((name: string) => string)
| ((name: string) => Promise<string>);
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
basePath?: string;
}
export class Configuration {
@@ -29,11 +27,7 @@ export class Configuration {
* @param name security name
* @memberof Configuration
*/
apiKey?:
| string
| Promise<string>
| ((name: string) => string)
| ((name: string) => Promise<string>);
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
/**
* override base path
@@ -66,11 +60,13 @@ export class Configuration {
* @type {IAxiosRetryConfig}
* @memberof Configuration
*/
retriesConfig?: IAxiosRetryConfig;
retriesConfig?: IAxiosRetryConfig
constructor(param: ConfigurationParameters = {}) {
this.apiKey = param.apiKey;
this.basePath = param.basePath;
}
/**
@@ -84,14 +80,7 @@ export class Configuration {
* @return True if the given MIME is JSON, false otherwise.
*/
public isJsonMime(mime: string): boolean {
const jsonMime: RegExp = new RegExp(
"^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$",
"i"
);
return (
mime !== null &&
(jsonMime.test(mime) ||
mime.toLowerCase() === "application/json-patch+json")
);
const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
}
}

View File

@@ -14,5 +14,5 @@
export * from "./api";
export * from "./configuration";
export {Configuration, ConfigurationParameters} from "./configuration";

View File

@@ -1,12 +1,12 @@
{
"name": "@lukehagar/plexjs",
"version": "0.0.17",
"version": "0.0.18",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@lukehagar/plexjs",
"version": "0.0.17",
"version": "0.0.18",
"license": "MIT",
"dependencies": {
"axios": "^0.26.1",

View File

@@ -1,6 +1,6 @@
{
"name": "@lukehagar/plexjs",
"version": "0.0.17",
"version": "0.0.18",
"description": "Community Made Plex JS/TS Module",
"author": "Luke Hagar",
"type": "module",