angular-auth-oidc-client
Advanced tools
Comparing version 12.0.3 to 13.0.0
@@ -1,2 +0,2 @@ | ||
import { ActivatedRouteSnapshot, CanActivate, CanActivateChild, CanLoad, Route, RouterStateSnapshot, UrlSegment } from '@angular/router'; | ||
import { ActivatedRouteSnapshot, CanActivate, CanActivateChild, CanLoad, Route, RouterStateSnapshot, UrlSegment, UrlTree } from '@angular/router'; | ||
import { Observable } from 'rxjs'; | ||
@@ -14,5 +14,5 @@ import { CheckAuthService } from '../check-auth.service'; | ||
constructor(autoLoginService: AutoLoginService, checkAuthService: CheckAuthService, loginService: LoginService, configurationProvider: ConfigurationProvider); | ||
canLoad(route: Route, segments: UrlSegment[]): Observable<boolean>; | ||
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean>; | ||
canActivateChild(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean>; | ||
canLoad(route: Route, segments: UrlSegment[]): Observable<boolean | UrlTree>; | ||
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean | UrlTree>; | ||
canActivateChild(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean | UrlTree>; | ||
private checkAuth; | ||
@@ -19,0 +19,0 @@ private getId; |
@@ -5,13 +5,10 @@ { | ||
"peerDependencies": { | ||
"rxjs": ">= 6.0.0", | ||
"@angular/core": "^12.0.0", | ||
"@angular/common": "^12.0.0", | ||
"@angular/router": "^12.0.0" | ||
"rxjs": "^6.5.3 || ^7.4.0", | ||
"@angular/core": "^13.0.0", | ||
"@angular/common": "^13.0.0", | ||
"@angular/router": "^13.0.0" | ||
}, | ||
"dependencies": { | ||
"tslib": "^2.1.0", | ||
"jsrsasign-reduced": "^8.0.15", | ||
"@angular-devkit/schematics": "12.0.0", | ||
"@schematics/angular": "^12.0.0", | ||
"@angular-devkit/core": "^12.0.0" | ||
"tslib": "^2.3.0", | ||
"jsrsasign-reduced": "^8.0.15" | ||
}, | ||
@@ -43,3 +40,3 @@ "repository": { | ||
"license": "MIT", | ||
"version": "12.0.3", | ||
"version": "13.0.0", | ||
"description": "Angular Lib for OpenID Connect & OAuth2", | ||
@@ -50,9 +47,22 @@ "schematics": "./schematics/collection.json", | ||
}, | ||
"main": "bundles/angular-auth-oidc-client.umd.js", | ||
"module": "fesm2015/angular-auth-oidc-client.js", | ||
"es2015": "fesm2015/angular-auth-oidc-client.js", | ||
"esm2015": "esm2015/angular-auth-oidc-client.js", | ||
"fesm2015": "fesm2015/angular-auth-oidc-client.js", | ||
"module": "fesm2015/angular-auth-oidc-client.mjs", | ||
"es2020": "fesm2020/angular-auth-oidc-client.mjs", | ||
"esm2020": "esm2020/angular-auth-oidc-client.mjs", | ||
"fesm2020": "fesm2020/angular-auth-oidc-client.mjs", | ||
"fesm2015": "fesm2015/angular-auth-oidc-client.mjs", | ||
"typings": "angular-auth-oidc-client.d.ts", | ||
"exports": { | ||
"./package.json": { | ||
"default": "./package.json" | ||
}, | ||
".": { | ||
"types": "./angular-auth-oidc-client.d.ts", | ||
"esm2020": "./esm2020/angular-auth-oidc-client.mjs", | ||
"es2020": "./fesm2020/angular-auth-oidc-client.mjs", | ||
"es2015": "./fesm2015/angular-auth-oidc-client.mjs", | ||
"node": "./fesm2015/angular-auth-oidc-client.mjs", | ||
"default": "./fesm2020/angular-auth-oidc-client.mjs" | ||
} | ||
}, | ||
"sideEffects": false | ||
} |
@@ -164,4 +164,5 @@ # Angular Lib for OpenID Connect & OAuth2 | ||
Current Version is Version 12.x | ||
Current Version is Version 13.x | ||
- [Info about Version 12](https://github.com/damienbod/angular-auth-oidc-client/tree/version-12) | ||
- [Info about Version 11](https://github.com/damienbod/angular-auth-oidc-client/tree/version-11) | ||
@@ -168,0 +169,0 @@ - [Info about Version 10](https://github.com/damienbod/angular-auth-oidc-client/tree/version-10) |
import { Rule } from '@angular-devkit/schematics'; | ||
export declare function addPackageJsonDependencies(): Rule; | ||
import { NgAddOptions } from '../models/ng-add-options'; | ||
export declare function addPackageJsonDependencies(options: NgAddOptions): Rule; |
@@ -8,10 +8,11 @@ "use strict"; | ||
name: 'angular-auth-oidc-client', | ||
version: '12.0.3', | ||
version: '13.0.0', | ||
}, | ||
]; | ||
function addPackageJsonDependencies() { | ||
function addPackageJsonDependencies(options) { | ||
return (host, context) => { | ||
for (const pack of dependenciesToAdd) { | ||
const dependencies = getDependencies(options); | ||
for (const pack of dependencies) { | ||
const nodeDependency = createNodeDependency(pack); | ||
dependencies_1.addPackageJsonDependency(host, nodeDependency); | ||
(0, dependencies_1.addPackageJsonDependency)(host, nodeDependency); | ||
context.logger.info(`✅️ Added "${pack.name}" ${pack.version}`); | ||
@@ -32,2 +33,9 @@ } | ||
} | ||
function getDependencies(options) { | ||
const { useLocalPackage } = options; | ||
if (!useLocalPackage) { | ||
return dependenciesToAdd; | ||
} | ||
return []; | ||
} | ||
//# sourceMappingURL=add-dependencies.js.map |
@@ -8,3 +8,3 @@ "use strict"; | ||
return (host, context) => { | ||
const project = angular_utils_1.getProject(host); | ||
const project = (0, angular_utils_1.getProject)(host); | ||
const { moduleFileName, moduleName } = options.moduleInfo; | ||
@@ -21,3 +21,3 @@ const modulesToImport = [ | ||
}); | ||
context.logger.info(`All imports done, please add the 'RouterModule' as well if you don't have it imported yet.`); | ||
context.logger.info(`✅️ All imports done, please add the 'RouterModule' as well if you don't have it imported yet.`); | ||
return host; | ||
@@ -28,4 +28,4 @@ }; | ||
function addImport(host, context, moduleName, source, target) { | ||
const sourcefile = angular_utils_1.readIntoSourceFile(host, target); | ||
const importChanges = ast_utils_1.addImportToModule(sourcefile, source, moduleName, source); | ||
const sourcefile = (0, angular_utils_1.readIntoSourceFile)(host, target); | ||
const importChanges = (0, ast_utils_1.addImportToModule)(sourcefile, source, moduleName, source); | ||
importChanges.forEach((insertChange) => { | ||
@@ -32,0 +32,0 @@ const exportRecorder = host.beginUpdate(target); |
@@ -9,10 +9,10 @@ "use strict"; | ||
if (!ngAddOptions.needsSilentRenewHtml) { | ||
context.logger.info(`No silent-renew entry in assets array needed`); | ||
context.logger.info(`✅️ No silent-renew entry in assets array needed`); | ||
return host; | ||
} | ||
const project = angular_utils_1.getProject(host); | ||
const project = (0, angular_utils_1.getProject)(host); | ||
const options = (_b = (_a = project.architect) === null || _a === void 0 ? void 0 : _a.build) === null || _b === void 0 ? void 0 : _b.options; | ||
const srcRoot = project.sourceRoot; | ||
(_c = options === null || options === void 0 ? void 0 : options.assets) === null || _c === void 0 ? void 0 : _c.push(`${srcRoot}/silent-renew.html`); | ||
angular_utils_1.updateProjectInAngularJson(host, project); | ||
(0, angular_utils_1.updateProjectInAngularJson)(host, project); | ||
return host; | ||
@@ -19,0 +19,0 @@ }; |
@@ -11,16 +11,16 @@ "use strict"; | ||
return (host, context) => { | ||
const project = angular_utils_1.getProject(host); | ||
const project = (0, angular_utils_1.getProject)(host); | ||
const { moduleFileName, moduleFolder } = options.moduleInfo; | ||
const filePath = `${project.sourceRoot}/app/auth/${moduleFileName}.ts`; | ||
if (host.exists(filePath)) { | ||
context.logger.info(`✅️ "${filePath}" already existing - skipping file create`); | ||
context.logger.info(`✅️ '${filePath}'' already existing - skipping file create`); | ||
return host; | ||
} | ||
const templateConfig = getTemplateConfig(options); | ||
context.logger.info(`✅️ "${filePath}" will be created`); | ||
const templateSource = schematics_1.apply(schematics_1.url(`./files/${moduleFolder}`), [ | ||
schematics_1.template(templateConfig), | ||
schematics_1.move(core_1.normalize(`${project.sourceRoot}/app/auth`)), | ||
context.logger.info(`✅️ '${filePath}''will be created`); | ||
const templateSource = (0, schematics_1.apply)((0, schematics_1.url)(`./files/${moduleFolder}`), [ | ||
(0, schematics_1.template)(templateConfig), | ||
(0, schematics_1.move)((0, core_1.normalize)(`${project.sourceRoot}/app/auth`)), | ||
]); | ||
return schematics_1.chain([schematics_1.mergeWith(templateSource)]); | ||
return (0, schematics_1.chain)([(0, schematics_1.mergeWith)(templateSource)]); | ||
}; | ||
@@ -27,0 +27,0 @@ } |
@@ -10,8 +10,8 @@ "use strict"; | ||
if (!options.needsSilentRenewHtml) { | ||
context.logger.info(`No silent-renew.html needed`); | ||
context.logger.info(`✅️ No 'silent-renew.html' needed`); | ||
return host; | ||
} | ||
const project = angular_utils_1.getProject(host); | ||
const templateSource = schematics_1.apply(schematics_1.url(`./files/silent-renew`), [schematics_1.move(core_1.normalize(`${project.sourceRoot}`))]); | ||
return schematics_1.chain([schematics_1.mergeWith(templateSource)]); | ||
const project = (0, angular_utils_1.getProject)(host); | ||
const templateSource = (0, schematics_1.apply)((0, schematics_1.url)(`./files/silent-renew`), [(0, schematics_1.move)((0, core_1.normalize)(`${project.sourceRoot}`))]); | ||
return (0, schematics_1.chain)([(0, schematics_1.mergeWith)(templateSource)]); | ||
}; | ||
@@ -18,0 +18,0 @@ } |
@@ -12,10 +12,10 @@ "use strict"; | ||
function getAllActions(options) { | ||
const ngAddOptions = schema_parser_1.parseSchema(options); | ||
const ngAddOptions = (0, schema_parser_1.parseSchema)(options); | ||
return [ | ||
add_dependencies_1.addPackageJsonDependencies(), | ||
install_dependencies_1.installPackageJsonDependencies(), | ||
copy_module_file_1.copyModuleFile(ngAddOptions), | ||
add_module_import_1.addModuleToImports(ngAddOptions), | ||
adding_entry_to_assets_1.addSilentRenewHtmlToAssetsArrayInAngularJson(ngAddOptions), | ||
copy_silent_renew_html_1.copySilentRenewHtmlToRoot(ngAddOptions), | ||
(0, add_dependencies_1.addPackageJsonDependencies)(ngAddOptions), | ||
(0, install_dependencies_1.installPackageJsonDependencies)(), | ||
(0, copy_module_file_1.copyModuleFile)(ngAddOptions), | ||
(0, add_module_import_1.addModuleToImports)(ngAddOptions), | ||
(0, adding_entry_to_assets_1.addSilentRenewHtmlToAssetsArrayInAngularJson)(ngAddOptions), | ||
(0, copy_silent_renew_html_1.copySilentRenewHtmlToRoot)(ngAddOptions), | ||
]; | ||
@@ -22,0 +22,0 @@ } |
@@ -7,6 +7,6 @@ "use strict"; | ||
function ngAdd(options) { | ||
const allActions = actions_1.getAllActions(options); | ||
return schematics_1.chain(allActions); | ||
const allActions = (0, actions_1.getAllActions)(options); | ||
return (0, schematics_1.chain)(allActions); | ||
} | ||
exports.ngAdd = ngAdd; | ||
//# sourceMappingURL=index.js.map |
@@ -13,2 +13,3 @@ import { FlowType } from '../schema'; | ||
moduleInfo: ModuleInfo; | ||
useLocalPackage: boolean; | ||
} |
export interface Schema { | ||
authorityUrlOrTenantId: string; | ||
flowType: FlowType; | ||
useLocalPackage: boolean; | ||
} | ||
@@ -5,0 +6,0 @@ export declare enum FlowType { |
@@ -26,2 +26,6 @@ { | ||
"x-prompt": "Please enter your authority URL or Azure tenant id or Http config URL" | ||
}, | ||
"useLocalPackage": { | ||
"description": "Used for local testing. When 'true' the local package path is not overwritten with the npm one when installing.", | ||
"type": "boolean" | ||
} | ||
@@ -28,0 +32,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
6
178
2459334
18057
1
+ Added@angular/common@13.4.0(transitive)
+ Added@angular/core@13.4.0(transitive)
+ Added@angular/platform-browser@13.4.0(transitive)
+ Added@angular/router@13.4.0(transitive)
- Removed@angular-devkit/core@^12.0.0
- Removed@angular-devkit/schematics@12.0.0
- Removed@schematics/angular@^12.0.0
- Removed@angular-devkit/core@12.0.012.2.18(transitive)
- Removed@angular-devkit/schematics@12.0.012.2.18(transitive)
- Removed@angular/common@12.2.17(transitive)
- Removed@angular/core@12.2.17(transitive)
- Removed@angular/platform-browser@12.2.17(transitive)
- Removed@angular/router@12.2.17(transitive)
- Removed@schematics/angular@12.2.18(transitive)
- Removedajv@8.2.08.6.2(transitive)
- Removedajv-formats@2.0.22.1.0(transitive)
- Removedansi-regex@5.0.1(transitive)
- Removedansi-styles@4.3.0(transitive)
- Removedbase64-js@1.5.1(transitive)
- Removedbl@4.1.0(transitive)
- Removedbuffer@5.7.1(transitive)
- Removedchalk@4.1.2(transitive)
- Removedcli-cursor@3.1.0(transitive)
- Removedcli-spinners@2.9.2(transitive)
- Removedclone@1.0.4(transitive)
- Removedcolor-convert@2.0.1(transitive)
- Removedcolor-name@1.1.4(transitive)
- Removeddefaults@1.0.4(transitive)
- Removedfast-deep-equal@3.1.3(transitive)
- Removedfast-json-stable-stringify@2.1.0(transitive)
- Removedhas-flag@4.0.0(transitive)
- Removedieee754@1.2.1(transitive)
- Removedinherits@2.0.4(transitive)
- Removedis-interactive@1.0.0(transitive)
- Removedis-unicode-supported@0.1.0(transitive)
- Removedjson-schema-traverse@1.0.0(transitive)
- Removedjsonc-parser@3.0.0(transitive)
- Removedlog-symbols@4.1.0(transitive)
- Removedmagic-string@0.25.7(transitive)
- Removedmimic-fn@2.1.0(transitive)
- Removedonetime@5.1.2(transitive)
- Removedora@5.4.05.4.1(transitive)
- Removedpunycode@2.3.1(transitive)
- Removedreadable-stream@3.6.2(transitive)
- Removedrequire-from-string@2.0.2(transitive)
- Removedrestore-cursor@3.1.0(transitive)
- Removedrxjs@6.6.7(transitive)
- Removedsafe-buffer@5.2.1(transitive)
- Removedsignal-exit@3.0.7(transitive)
- Removedsource-map@0.7.3(transitive)
- Removedsourcemap-codec@1.4.8(transitive)
- Removedstring_decoder@1.3.0(transitive)
- Removedstrip-ansi@6.0.1(transitive)
- Removedsupports-color@7.2.0(transitive)
- Removedtslib@1.14.1(transitive)
- Removeduri-js@4.4.1(transitive)
- Removedutil-deprecate@1.0.2(transitive)
- Removedwcwidth@1.0.1(transitive)
Updatedtslib@^2.3.0