Skip to content

Commit

Permalink
merge with main
Browse files Browse the repository at this point in the history
  • Loading branch information
nirgur committed Nov 17, 2024
2 parents 6a4942c + 82656d5 commit 7f94c31
Show file tree
Hide file tree
Showing 42 changed files with 251 additions and 104 deletions.
2 changes: 2 additions & 0 deletions packages/libs/escape-markdown/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).

## [0.1.1](https://github.com/descope/descope-js/compare/escape-markdown-0.1.0...escape-markdown-0.1.1) (2024-11-14)

## [0.1.0](https://github.com/descope/descope-js/compare/escape-markdown-0.0.2...escape-markdown-0.1.0) (2024-11-13)


Expand Down
2 changes: 1 addition & 1 deletion packages/libs/escape-markdown/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@descope/escape-markdown",
"version": "0.1.0",
"version": "0.1.1",
"author": "Descope Team <info@descope.com>",
"homepage": "https://github.com/descope/descope-js",
"bugs": {
Expand Down
12 changes: 5 additions & 7 deletions packages/libs/escape-markdown/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,11 @@
}
},
"licenseCheck": {
"executor": "nx:run-commands",
"options": {
"commands": [
"exit 0"
]
}
}
"executor": "nx:run-commands",
"options": {
"commands": ["exit 0"]
}
}
},
"tags": []
}
31 changes: 31 additions & 0 deletions packages/sdks/angular-sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,37 @@

This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).

## [0.7.3](https://github.com/descope/descope-js/compare/angular-sdk-0.7.2...angular-sdk-0.7.3) (2024-11-16)

### Dependency Updates

* `access-key-management-widget` updated to version `0.2.3`
* `audit-management-widget` updated to version `0.2.3`
* `role-management-widget` updated to version `0.2.3`
* `user-management-widget` updated to version `0.5.3`
* `user-profile-widget` updated to version `0.1.3`
* `applications-portal-widget` updated to version `0.2.3`
* `web-component` updated to version `3.29.3`
* `web-js-sdk` updated to version `1.20.2`
* `core-js-sdk` updated to version `2.31.0`
## [0.7.2](https://github.com/descope/descope-js/compare/angular-sdk-0.7.1...angular-sdk-0.7.2) (2024-11-14)

### Dependency Updates

* `access-key-management-widget` updated to version `0.2.2`
* `audit-management-widget` updated to version `0.2.2`
* `role-management-widget` updated to version `0.2.2`
* `user-management-widget` updated to version `0.5.2`
* `user-profile-widget` updated to version `0.1.2`
* `applications-portal-widget` updated to version `0.2.2`
* `web-component` updated to version `3.29.2`
* `web-js-sdk` updated to version `1.20.1`
* `core-js-sdk` updated to version `2.30.1`

### Bug Fixes

* expose restartOnError on all sdks ([#838](https://github.com/descope/descope-js/issues/838)) ([dd20924](https://github.com/descope/descope-js/commit/dd20924dfd02345eae2972d5154b9be8a209a906))

## [0.7.1](https://github.com/descope/descope-js/compare/angular-sdk-0.7.0...angular-sdk-0.7.1) (2024-11-13)

### Dependency Updates
Expand Down
2 changes: 1 addition & 1 deletion packages/sdks/angular-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@descope/angular-sdk",
"version": "0.7.1",
"version": "0.7.3",
"peerDependencies": {
"@angular/common": ">=16.0.0",
"@angular/core": ">=16.0.0"
Expand Down
9 changes: 9 additions & 0 deletions packages/sdks/core-js-sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).

## [2.31.0](https://github.com/descope/descope-js/compare/core-js-sdk-2.30.1...core-js-sdk-2.31.0) (2024-11-16)


### Features

* Add the revokeOtherSessions attribute in LoginOptions RELEASE ([#848](https://github.com/descope/descope-js/issues/848)) ([fca695f](https://github.com/descope/descope-js/commit/fca695fa4ab079791c969590694912a5b2daf74f))

## [2.30.1](https://github.com/descope/descope-js/compare/core-js-sdk-2.30.0...core-js-sdk-2.30.1) (2024-11-14)

## [2.30.0](https://github.com/descope/descope-js/compare/core-js-sdk-2.29.1...core-js-sdk-2.30.0) (2024-11-13)


Expand Down
2 changes: 1 addition & 1 deletion packages/sdks/core-js-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@descope/core-js-sdk",
"version": "2.30.0",
"version": "2.31.0",
"author": "Descope Team <info@descope.com>",
"homepage": "https://github.com/descope/descope-js",
"bugs": {
Expand Down
1 change: 0 additions & 1 deletion packages/sdks/core-js-sdk/src/constants/apiPaths.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ export default {
selectTenant: '/v1/auth/tenant/select',
logout: '/v1/auth/logout',
logoutAll: '/v1/auth/logoutall',
logoutPrevious: '/v1/auth/logoutprevious',
me: '/v1/auth/me',
myTenants: '/v1/auth/me/tenants',
history: '/v1/auth/me/history',
Expand Down
2 changes: 1 addition & 1 deletion packages/sdks/core-js-sdk/src/sdk/flow/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ type JSONSerializable =
| null
| Array<JSONSerializable>;

export type FlowInput = Record<string, JSONSerializable>;
export type FlowInput = Record<string, JSONSerializable>;
9 changes: 0 additions & 9 deletions packages/sdks/core-js-sdk/src/sdk/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,6 @@ export default (httpClient: HttpClient) => ({
httpClient.post(apiPaths.logoutAll, {}, { token }),
),
),
/**
* Logs out all previous sessions for the current user
* @param token A valid refresh token
*/
logoutPrevious: withOptionalTokenValidations((token?: string) =>
transformResponse<never>(
httpClient.post(apiPaths.logoutPrevious, {}, { token }),
),
),
/**
* Returns the current user details
* @param token A valid refresh token
Expand Down
1 change: 1 addition & 0 deletions packages/sdks/core-js-sdk/src/sdk/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ export type TemplateOptions = Record<string, string>; // for providing messaging
export type LoginOptions = {
stepup?: boolean;
mfa?: boolean;
revokeOtherSessions?: boolean;
customClaims?: Record<string, any>;
templateId?: string;
templateOptions?: TemplateOptions;
Expand Down
2 changes: 2 additions & 0 deletions packages/sdks/core-js-sdk/test/sdk/otp.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ describe('otp', () => {
it('should send the correct request with sign up options', () => {
sdk.otp.signUpOrIn.email('loginId', {
templateId: 'foo',
revokeOtherSessions: true,
templateOptions: {
ble: 'blue',
},
Expand All @@ -173,6 +174,7 @@ describe('otp', () => {
loginId: 'loginId',
loginOptions: {
templateId: 'foo',
revokeOtherSessions: true,
templateOptions: {
ble: 'blue',
},
Expand Down
27 changes: 0 additions & 27 deletions packages/sdks/core-js-sdk/test/sdk/sdk.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,33 +222,6 @@ describe('sdk', () => {
});
});

describe('logoutPrevious', () => {
it('should throw an error when token is not a string', () => {
expect(() => sdk.logoutPrevious({ a: 'b' })).toThrow(
'"token" must be string or undefined',
);
});
it('should send the correct request', () => {
const httpRespJson = { key: 'val' };
const httpResponse = {
ok: true,
json: () => httpRespJson,
clone: () => ({
json: () => Promise.resolve(httpRespJson),
}),
status: 200,
};
mockHttpClient.post.mockResolvedValue(httpResponse);

sdk.logoutPrevious('token');
expect(mockHttpClient.post).toHaveBeenCalledWith(
apiPaths.logoutPrevious,
{},
{ token: 'token' },
);
});
});

describe('me', () => {
it('should throw an error when token is not a string', () => {
expect(() => sdk.me({ a: 'b' })).toThrow(
Expand Down
16 changes: 16 additions & 0 deletions packages/sdks/nextjs-sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@

This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).

## [0.3.10](https://github.com/descope/descope-js/compare/nextjs-sdk-0.3.9...nextjs-sdk-0.3.10) (2024-11-16)

### Dependency Updates

* `web-js-sdk` updated to version `1.20.2`
* `react-sdk` updated to version `2.3.2`
* `core-js-sdk` updated to version `2.31.0`
* `web-component` updated to version `3.29.3`
## [0.3.9](https://github.com/descope/descope-js/compare/nextjs-sdk-0.3.8...nextjs-sdk-0.3.9) (2024-11-14)

### Dependency Updates

* `web-js-sdk` updated to version `1.20.1`
* `react-sdk` updated to version `2.3.1`
* `core-js-sdk` updated to version `2.30.1`
* `web-component` updated to version `3.29.2`
## [0.3.8](https://github.com/descope/descope-js/compare/nextjs-sdk-0.3.7...nextjs-sdk-0.3.8) (2024-11-13)

### Dependency Updates
Expand Down
2 changes: 1 addition & 1 deletion packages/sdks/nextjs-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@descope/nextjs-sdk",
"version": "0.3.8",
"version": "0.3.10",
"description": "Descope NextJS SDK",
"author": "Descope Team <info@descope.com>",
"homepage": "https://github.com/descope/descope-js",
Expand Down
31 changes: 31 additions & 0 deletions packages/sdks/react-sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,37 @@

This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).

## [2.3.2](https://github.com/descope/descope-js/compare/react-sdk-2.3.1...react-sdk-2.3.2) (2024-11-16)

### Dependency Updates

* `access-key-management-widget` updated to version `0.2.3`
* `audit-management-widget` updated to version `0.2.3`
* `role-management-widget` updated to version `0.2.3`
* `user-management-widget` updated to version `0.5.3`
* `user-profile-widget` updated to version `0.1.3`
* `applications-portal-widget` updated to version `0.2.3`
* `web-component` updated to version `3.29.3`
* `web-js-sdk` updated to version `1.20.2`
* `core-js-sdk` updated to version `2.31.0`
## [2.3.1](https://github.com/descope/descope-js/compare/react-sdk-2.3.0...react-sdk-2.3.1) (2024-11-14)

### Dependency Updates

* `access-key-management-widget` updated to version `0.2.2`
* `audit-management-widget` updated to version `0.2.2`
* `role-management-widget` updated to version `0.2.2`
* `user-management-widget` updated to version `0.5.2`
* `user-profile-widget` updated to version `0.1.2`
* `applications-portal-widget` updated to version `0.2.2`
* `web-component` updated to version `3.29.2`
* `web-js-sdk` updated to version `1.20.1`
* `core-js-sdk` updated to version `2.30.1`

### Bug Fixes

* expose restartOnError on all sdks ([#838](https://github.com/descope/descope-js/issues/838)) ([dd20924](https://github.com/descope/descope-js/commit/dd20924dfd02345eae2972d5154b9be8a209a906))

## [2.3.0](https://github.com/descope/descope-js/compare/react-sdk-2.2.0...react-sdk-2.3.0) (2024-11-13)

### Dependency Updates
Expand Down
2 changes: 1 addition & 1 deletion packages/sdks/react-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@descope/react-sdk",
"version": "2.3.0",
"version": "2.3.2",
"description": "Descope React SDK",
"author": "Descope Team <info@descope.com>",
"homepage": "https://github.com/descope/descope-js",
Expand Down
3 changes: 1 addition & 2 deletions packages/sdks/react-sdk/test/hooks/useAuth.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ jest.mock('@descope/web-js-sdk', () => {
const sdk = {
logout: jest.fn().mockName('logout'),
logoutAll: jest.fn().mockName('logoutAll'),
logoutPrevious: jest.fn().mockName('logoutPrevious'),
otp: {
signIn: {
email: jest.fn().mockName('otp.signIn.email'),
Expand Down Expand Up @@ -65,7 +64,7 @@ describe('hooks', () => {
);
});

it.each(['logoutAll', 'logoutPrevious', 'logout', 'otp.signIn.email'])(
it.each(['logoutAll', 'logout', 'otp.signIn.email'])(
'should throw error when using sdk function before sdk initialization - %s',
(fnName) => {
const { result } = renderHook(() => useDescope(), {
Expand Down
31 changes: 31 additions & 0 deletions packages/sdks/vue-sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,37 @@

This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).

## [2.2.3](https://github.com/descope/descope-js/compare/vue-sdk-2.2.2...vue-sdk-2.2.3) (2024-11-16)

### Dependency Updates

* `access-key-management-widget` updated to version `0.2.3`
* `audit-management-widget` updated to version `0.2.3`
* `role-management-widget` updated to version `0.2.3`
* `user-management-widget` updated to version `0.5.3`
* `user-profile-widget` updated to version `0.1.3`
* `applications-portal-widget` updated to version `0.2.3`
* `web-component` updated to version `3.29.3`
* `web-js-sdk` updated to version `1.20.2`
* `core-js-sdk` updated to version `2.31.0`
## [2.2.2](https://github.com/descope/descope-js/compare/vue-sdk-2.2.1...vue-sdk-2.2.2) (2024-11-14)

### Dependency Updates

* `access-key-management-widget` updated to version `0.2.2`
* `audit-management-widget` updated to version `0.2.2`
* `role-management-widget` updated to version `0.2.2`
* `user-management-widget` updated to version `0.5.2`
* `user-profile-widget` updated to version `0.1.2`
* `applications-portal-widget` updated to version `0.2.2`
* `web-component` updated to version `3.29.2`
* `web-js-sdk` updated to version `1.20.1`
* `core-js-sdk` updated to version `2.30.1`

### Bug Fixes

* expose restartOnError on all sdks ([#838](https://github.com/descope/descope-js/issues/838)) ([dd20924](https://github.com/descope/descope-js/commit/dd20924dfd02345eae2972d5154b9be8a209a906))

## [2.2.1](https://github.com/descope/descope-js/compare/vue-sdk-2.2.0...vue-sdk-2.2.1) (2024-11-13)

### Dependency Updates
Expand Down
2 changes: 1 addition & 1 deletion packages/sdks/vue-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@descope/vue-sdk",
"version": "2.2.1",
"version": "2.2.3",
"main": "dist/index.cjs",
"module": "dist/index.mjs",
"type": "module",
Expand Down
16 changes: 16 additions & 0 deletions packages/sdks/web-component/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@

This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).

## [3.29.3](https://github.com/descope/descope-js/compare/web-component-3.29.2...web-component-3.29.3) (2024-11-16)

### Dependency Updates

* `web-js-sdk` updated to version `1.20.2`
## [3.29.2](https://github.com/descope/descope-js/compare/web-component-3.29.1...web-component-3.29.2) (2024-11-14)

### Dependency Updates

* `web-js-sdk` updated to version `1.20.1`
* `escape-markdown` updated to version `0.1.1`

### Bug Fixes

* expose restartOnError on all sdks ([#838](https://github.com/descope/descope-js/issues/838)) ([dd20924](https://github.com/descope/descope-js/commit/dd20924dfd02345eae2972d5154b9be8a209a906))

## [3.29.1](https://github.com/descope/descope-js/compare/web-component-3.29.0...web-component-3.29.1) (2024-11-13)

### Dependency Updates
Expand Down
2 changes: 1 addition & 1 deletion packages/sdks/web-component/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@descope/web-component",
"version": "3.29.1",
"version": "3.29.3",
"author": "Descope Team <info@descope.com>",
"homepage": "https://github.com/descope/descope-js",
"bugs": {
Expand Down
10 changes: 10 additions & 0 deletions packages/sdks/web-js-sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).

## [1.20.2](https://github.com/descope/descope-js/compare/web-js-sdk-1.20.1...web-js-sdk-1.20.2) (2024-11-16)

### Dependency Updates

* `core-js-sdk` updated to version `2.31.0`
## [1.20.1](https://github.com/descope/descope-js/compare/web-js-sdk-1.20.0...web-js-sdk-1.20.1) (2024-11-14)

### Dependency Updates

* `core-js-sdk` updated to version `2.30.1`
## [1.20.0](https://github.com/descope/descope-js/compare/web-js-sdk-1.19.2...web-js-sdk-1.20.0) (2024-11-13)

### Dependency Updates
Expand Down
2 changes: 1 addition & 1 deletion packages/sdks/web-js-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@descope/web-js-sdk",
"version": "1.20.0",
"version": "1.20.2",
"author": "Descope Team <info@descope.com>",
"homepage": "https://github.com/descope/descope-js",
"bugs": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,5 +102,5 @@ export const withAutoRefresh =
return resp;
};

return wrapWith(sdk, ['logout', 'logoutAll', 'logoutPrevious'], wrapper);
return wrapWith(sdk, ['logout', 'logoutAll'], wrapper);
};
Loading

0 comments on commit 7f94c31

Please sign in to comment.