@atlaskit/outbound-auth-flow-client 3.2.1 → 3.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @atlaskit/outbound-auth-flow-client
2
2
 
3
+ ## 3.3.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`8d4228767b0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8d4228767b0) - Upgrade Typescript from `4.2.4` to `4.3.5`.
8
+
9
+ ## 3.3.1
10
+
11
+ ### Patch Changes
12
+
13
+ - [`cb2392f6d33`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cb2392f6d33) - Upgrade to TypeScript 4.2.4
14
+
15
+ ## 3.3.0
16
+
17
+ ### Minor Changes
18
+
19
+ - [`65cad419e85`](https://bitbucket.org/atlassian/atlassian-frontend/commits/65cad419e85) - Add 'AuthClientOAuth2.AuthError' error type
20
+
3
21
  ## 3.2.1
4
22
 
5
23
  ### Patch Changes
@@ -9,5 +9,9 @@
9
9
  "../src/**/*.ts",
10
10
  "../src/**/*.tsx"
11
11
  ],
12
- "exclude": ["../src/**/__tests__/*"]
13
- }
12
+ "exclude": [
13
+ "../src/**/__tests__/*",
14
+ "../src/**/*.test.*",
15
+ "../src/**/test.*"
16
+ ]
17
+ }
package/dist/cjs/error.js CHANGED
@@ -7,6 +7,8 @@ Object.defineProperty(exports, "__esModule", {
7
7
  });
8
8
  exports.AuthError = void 0;
9
9
 
10
+ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
11
+
10
12
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
11
13
 
12
14
  var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
@@ -19,7 +21,7 @@ var _wrapNativeSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/w
19
21
 
20
22
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
21
23
 
22
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
24
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
23
25
 
24
26
  var AuthError = /*#__PURE__*/function (_Error) {
25
27
  (0, _inherits2.default)(AuthError, _Error);
@@ -39,7 +41,7 @@ var AuthError = /*#__PURE__*/function (_Error) {
39
41
  return _this;
40
42
  }
41
43
 
42
- return AuthError;
44
+ return (0, _createClass2.default)(AuthError);
43
45
  }( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Error));
44
46
 
45
47
  exports.AuthError = AuthError;
package/dist/cjs/index.js CHANGED
@@ -5,13 +5,13 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.auth = auth;
9
8
  Object.defineProperty(exports, "AuthError", {
10
9
  enumerable: true,
11
10
  get: function get() {
12
11
  return _error.AuthError;
13
12
  }
14
13
  });
14
+ exports.auth = auth;
15
15
 
16
16
  var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
17
17
 
package/dist/cjs/types.js CHANGED
@@ -8,8 +8,10 @@ exports.isOfTypeAuthError = void 0;
8
8
  // See https://tools.ietf.org/html/rfc6749#section-4.1.2.1
9
9
  // 'auth_window_closed' is returned in addition to types from this RFC,
10
10
  // representing when the authentication window is closed by the user
11
+ // 'authclientoauth2.autherror' is added to represent errors from
12
+ // outbound-auth
11
13
  var isOfTypeAuthError = function isOfTypeAuthError(inputString) {
12
- return ['auth_window_closed', 'invalid_request', 'unauthorized_client', 'access_denied', 'unsupported_response_type', 'invalid_scope', 'server_error', 'temporarily_unavailable'].includes(inputString);
14
+ return ['auth_window_closed', 'invalid_request', 'unauthorized_client', 'access_denied', 'unsupported_response_type', 'invalid_scope', 'server_error', 'temporarily_unavailable', 'authclientoauth2.autherror'].includes(inputString);
13
15
  };
14
16
 
15
17
  exports.isOfTypeAuthError = isOfTypeAuthError;
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "@atlaskit/outbound-auth-flow-client",
3
- "version": "3.2.1"
3
+ "version": "3.3.2"
4
4
  }
@@ -1,6 +1,8 @@
1
1
  // See https://tools.ietf.org/html/rfc6749#section-4.1.2.1
2
2
  // 'auth_window_closed' is returned in addition to types from this RFC,
3
3
  // representing when the authentication window is closed by the user
4
+ // 'authclientoauth2.autherror' is added to represent errors from
5
+ // outbound-auth
4
6
  export const isOfTypeAuthError = inputString => {
5
- return ['auth_window_closed', 'invalid_request', 'unauthorized_client', 'access_denied', 'unsupported_response_type', 'invalid_scope', 'server_error', 'temporarily_unavailable'].includes(inputString);
7
+ return ['auth_window_closed', 'invalid_request', 'unauthorized_client', 'access_denied', 'unsupported_response_type', 'invalid_scope', 'server_error', 'temporarily_unavailable', 'authclientoauth2.autherror'].includes(inputString);
6
8
  };
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "@atlaskit/outbound-auth-flow-client",
3
- "version": "3.2.1"
3
+ "version": "3.3.2"
4
4
  }
package/dist/esm/error.js CHANGED
@@ -1,3 +1,4 @@
1
+ import _createClass from "@babel/runtime/helpers/createClass";
1
2
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
3
  import _inherits from "@babel/runtime/helpers/inherits";
3
4
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
@@ -6,7 +7,7 @@ import _wrapNativeSuper from "@babel/runtime/helpers/wrapNativeSuper";
6
7
 
7
8
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
8
9
 
9
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
10
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
10
11
 
11
12
  export var AuthError = /*#__PURE__*/function (_Error) {
12
13
  _inherits(AuthError, _Error);
@@ -27,5 +28,5 @@ export var AuthError = /*#__PURE__*/function (_Error) {
27
28
  return _this;
28
29
  }
29
30
 
30
- return AuthError;
31
+ return _createClass(AuthError);
31
32
  }( /*#__PURE__*/_wrapNativeSuper(Error));
package/dist/esm/types.js CHANGED
@@ -1,6 +1,8 @@
1
1
  // See https://tools.ietf.org/html/rfc6749#section-4.1.2.1
2
2
  // 'auth_window_closed' is returned in addition to types from this RFC,
3
3
  // representing when the authentication window is closed by the user
4
+ // 'authclientoauth2.autherror' is added to represent errors from
5
+ // outbound-auth
4
6
  export var isOfTypeAuthError = function isOfTypeAuthError(inputString) {
5
- return ['auth_window_closed', 'invalid_request', 'unauthorized_client', 'access_denied', 'unsupported_response_type', 'invalid_scope', 'server_error', 'temporarily_unavailable'].includes(inputString);
7
+ return ['auth_window_closed', 'invalid_request', 'unauthorized_client', 'access_denied', 'unsupported_response_type', 'invalid_scope', 'server_error', 'temporarily_unavailable', 'authclientoauth2.autherror'].includes(inputString);
6
8
  };
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "@atlaskit/outbound-auth-flow-client",
3
- "version": "3.2.1"
3
+ "version": "3.3.2"
4
4
  }
@@ -1,5 +1,6 @@
1
+ import { AuthErrorType } from './types';
1
2
  export declare class AuthError extends Error {
2
3
  readonly message: string;
3
- readonly type?: "auth_window_closed" | "invalid_request" | "unauthorized_client" | "access_denied" | "unsupported_response_type" | "invalid_scope" | "server_error" | "temporarily_unavailable" | undefined;
4
- constructor(message: string, type?: "auth_window_closed" | "invalid_request" | "unauthorized_client" | "access_denied" | "unsupported_response_type" | "invalid_scope" | "server_error" | "temporarily_unavailable" | undefined);
4
+ readonly type?: AuthErrorType | undefined;
5
+ constructor(message: string, type?: AuthErrorType | undefined);
5
6
  }
@@ -1,2 +1,2 @@
1
- export declare type AuthErrorType = 'auth_window_closed' | 'invalid_request' | 'unauthorized_client' | 'access_denied' | 'unsupported_response_type' | 'invalid_scope' | 'server_error' | 'temporarily_unavailable';
1
+ export declare type AuthErrorType = 'auth_window_closed' | 'invalid_request' | 'unauthorized_client' | 'access_denied' | 'unsupported_response_type' | 'invalid_scope' | 'server_error' | 'temporarily_unavailable' | 'authclientoauth2.autherror';
2
2
  export declare const isOfTypeAuthError: (inputString: string) => inputString is AuthErrorType;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/outbound-auth-flow-client",
3
- "version": "3.2.1",
3
+ "version": "3.3.2",
4
4
  "description": "Front-end library for starting outbound auth flows",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -26,10 +26,12 @@
26
26
  },
27
27
  "devDependencies": {
28
28
  "@atlaskit/docs": "*",
29
- "typescript": "3.9.6"
29
+ "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
30
+ "typescript": "4.3.5"
30
31
  },
31
32
  "keywords": [
32
33
  "fabric",
33
34
  "ui"
34
- ]
35
+ ],
36
+ "prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
35
37
  }
package/report.api.md ADDED
@@ -0,0 +1,31 @@
1
+ ## API Report File for "@atlaskit/outbound-auth-flow-client".
2
+
3
+ > Do not edit this file. This report is auto-generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
6
+
7
+ ```ts
8
+ export declare function auth(
9
+ startUrl: string,
10
+ windowFeatures?: string,
11
+ ): Promise<void>;
12
+
13
+ export declare class AuthError extends Error {
14
+ readonly message: string;
15
+ readonly type?: AuthErrorType | undefined;
16
+ constructor(message: string, type?: AuthErrorType | undefined);
17
+ }
18
+
19
+ declare type AuthErrorType =
20
+ | 'auth_window_closed'
21
+ | 'invalid_request'
22
+ | 'unauthorized_client'
23
+ | 'access_denied'
24
+ | 'unsupported_response_type'
25
+ | 'invalid_scope'
26
+ | 'server_error'
27
+ | 'temporarily_unavailable'
28
+ | 'authclientoauth2.autherror';
29
+
30
+ export {};
31
+ ```