Skip to content

Commit

Permalink
Update dev dependencies and CI settings (#369)
Browse files Browse the repository at this point in the history
* Update the dev dependencies

* Drop test support for Node.js v8

* Add timeout of ava test
  • Loading branch information
tngan authored May 13, 2020
1 parent 419c499 commit 5d7da43
Show file tree
Hide file tree
Showing 5 changed files with 1,382 additions and 4,431 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
language: node_js

node_js:
- "8"
- "10"
- "12"
- "14"

env:
- INSTALL_JDK=1
Expand All @@ -17,12 +17,13 @@ install:

script:
- yarn add @authenio/samlify-xsd-schema-validator
- yarn test
- yarn test --timeout=30s

branches:
only:
- master
- /^.*-alpha$/
- /^.*-rc.*$/
- /^feature\/.*$/

after_success: npm run coverage
27 changes: 13 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,14 @@
],
"typings": "types/index.d.ts",
"scripts": {
"build": "make rebuild",
"build": "yarn audit;make rebuild",
"docs": "docsify serve -o docs",
"lint": "tslint -p .",
"lint:fix": "tslint -p . --fix",
"pretest": "make pretest",
"test": "NODE_ENV=test nyc ava",
"coverage": "nyc report --reporter=text-lcov | coveralls",
"hooks:postinstall": "ln -sf $PWD/.pre-commit.sh $PWD/.git/hooks/pre-commit",
"snyk-protect": "snyk protect",
"prepare": "yarn run snyk-protect"
"hooks:postinstall": "ln -sf $PWD/.pre-commit.sh $PWD/.git/hooks/pre-commit"
},
"contributors": [
"Tony Ngan <[email protected]>"
Expand All @@ -39,34 +37,35 @@
"pako": "^1.0.10",
"uuid": "^3.3.2",
"xml": "^1.0.1",
"xml-crypto": "^1.4.0",
"xml-crypto": "^1.5.3",
"xml-encryption": "^1.1.1",
"xmldom": "^0.1.27",
"xpath": "^0.0.27"
},
"devDependencies": {
"@ava/typescript": "^1.1.1",
"@types/node": "^11.11.3",
"@types/node-forge": "^0.7.4",
"@types/pako": "^1.0.1",
"@types/uuid": "3.0.0",
"@types/xmldom": "^0.1.28",
"ava": "^1.2.1",
"coveralls": "^3.0.11",
"nyc": "^11.9.0",
"snyk": "^1.258.2",
"ava": "^3.8.2",
"coveralls": "^3.1.0",
"nyc": "^15.0.1",
"timekeeper": "^2.2.0",
"ts-node": "^8.3.0",
"tslint": "^5.12.1",
"typescript": "^3.4.5"
"tslint": "^6.1.2",
"typescript": "^3.8.3"
},
"ava": {
"compileEnhancements": false,
"extensions": [
"ts"
],
"require": [
"ts-node/register"
],
"files": [
"!**/*.d.ts"
]
},
"snyk": true
}
}
2 changes: 1 addition & 1 deletion src/extractor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ export function extract(context: string, fields) {
}
*/
if (attributes.length === 0) {
let attributeValue: SelectedValue[] | Array<(string | null)> | null = null;
let attributeValue: SelectedValue[] | (string | null)[] | null = null;
const node = select(baseXPath, targetDoc);
if (node.length === 1) {
const fullPath = `string(${baseXPath}${attributeXPath})`;
Expand Down
23 changes: 15 additions & 8 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,20 @@ export { SpMetadata as ServiceProviderMetadata } from './metadata-sp';

export type MetadataFile = string | Buffer;

type SSOService = {
isDefault?: boolean;
Binding: string;
Location: string;
};

export interface MetadataIdpOptions {
entityID?: string;
signingCert?: string | Buffer;
encryptCert?: string | Buffer;
wantAuthnRequestsSigned?: boolean;
nameIDFormat?: string[];
singleSignOnService?: Array<{ isDefault?: boolean, Binding: string, Location: string }>;
singleLogoutService?: Array<{ isDefault?: boolean, Binding: string, Location: string }>;
singleSignOnService?: SSOService[];
singleLogoutService?: SSOService[];
requestSignatureAlgorithm?: string;
}

Expand All @@ -32,8 +38,9 @@ export interface MetadataSpOptions {
wantMessageSigned?: boolean;
signatureConfig?: { [key: string]: any };
nameIDFormat?: string[];
singleLogoutService?: Array<{ isDefault?: boolean, Binding: string, Location: string }>;
assertionConsumerService?: Array<{ isDefault?: boolean, Binding: string, Location: string }>;
singleSignOnService?: SSOService[];
singleLogoutService?: SSOService[];
assertionConsumerService?: SSOService[];
elementsOrder?: string[];
}

Expand Down Expand Up @@ -69,8 +76,8 @@ export type ServiceProviderSettings = {
requestSignatureAlgorithm?: string;
encPrivateKey?: string | Buffer;
encPrivateKeyPass?: string | Buffer;
assertionConsumerService?: Array<{ Binding: string, Location: string }>;
singleLogoutService?: Array<{ isDefault?: boolean, Binding: string, Location: string }>;
assertionConsumerService?: SSOService[];
singleLogoutService?: SSOService[];
signatureConfig?: SignatureConfig;
loginRequestTemplate?: SAMLDocumentTemplate;
logoutRequestTemplate?: SAMLDocumentTemplate;
Expand Down Expand Up @@ -106,8 +113,8 @@ export type IdentityProviderSettings = {
signingCert?: string | Buffer;
encryptCert?: string | Buffer; /** todo */
nameIDFormat?: string[];
singleSignOnService?: Array<{ isDefault?: boolean, Binding: string, Location: string }>;
singleLogoutService?: Array<{ isDefault?: boolean, Binding: string, Location: string }>;
singleSignOnService?: SSOService[];
singleLogoutService?: SSOService[];
isAssertionEncrypted?: boolean;
encPrivateKey?: string | Buffer;
encPrivateKeyPass?: string;
Expand Down
Loading

0 comments on commit 5d7da43

Please sign in to comment.