Skip to content

Commit

Permalink
fix: angualr lazy module (#851)
Browse files Browse the repository at this point in the history
## Related Issues

Fixes descope/etc#8292


## Description
not allowing to load module is redundant limitation
  • Loading branch information
asafshen authored Nov 17, 2024
1 parent d705e67 commit 0b7b7f5
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 5 deletions.
1 change: 1 addition & 0 deletions packages/sdks/angular-sdk/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"plugin:@angular-eslint/template/process-inline-templates"
],
"rules": {
"no-console": 2,
"@angular-eslint/directive-selector": [
"error",
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,8 @@ import { DescopeAuthConfig } from './types/types';
export class DescopeAuthModule {
constructor(@Optional() @SkipSelf() parentModule?: DescopeAuthModule) {
if (parentModule) {
throw new Error(
'DescopeAuthModule is already loaded. Import it only once'
);
// eslint-disable-next-line no-console
console.log('DescopeAuthModule is loaded in a child module');
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-console */
// workaround for TS issue https://github.com/microsoft/TypeScript/issues/42873
// eslint-disable-next-line
import type * as _1 from '@descope/core-js-sdk';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-console */
import { Component, OnInit } from '@angular/core';
import { DescopeAuthService } from '../../../../angular-sdk/src/lib/services/descope-auth.service';
import { Router } from '@angular/router';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-console */
import { Component } from '@angular/core';
import { environment } from '../../environments/environment';
import { Router } from '@angular/router';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-console */
import { Component } from '@angular/core';
import { environment } from '../../environments/environment';
import { Router } from '@angular/router';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-console */
import { Component } from '@angular/core';
import { Router } from '@angular/router';
import { environment } from '../../environments/environment';
Expand Down
1 change: 1 addition & 0 deletions packages/sdks/angular-sdk/projects/demo-app/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-console */
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';

import { AppModule } from './app/app.module';
Expand Down
4 changes: 2 additions & 2 deletions packages/sdks/react-sdk/examples/app/ManageAccessKeys.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@ const ManageAccessKeys = () => {
<h2>Manage Access Keys</h2>
<AccessKeyManagement
widgetId="access-key-management-widget"
tenant={process.env.DESCOPE_TENANT_ID}
tenant={process.env.DESCOPE_TENANT_ID!}
/>
<h2>Manage My Access Keys</h2>
<AccessKeyManagement
widgetId="user-access-key-management-widget"
tenant={process.env.DESCOPE_TENANT_ID}
tenant={process.env.DESCOPE_TENANT_ID!}
/>
</>
);
Expand Down

0 comments on commit 0b7b7f5

Please sign in to comment.