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

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,11 @@
1
1
  # @atlaskit/outbound-auth-flow-client
2
2
 
3
+ ## 3.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`65cad419e85`](https://bitbucket.org/atlassian/atlassian-frontend/commits/65cad419e85) - Add 'AuthClientOAuth2.AuthError' error type
8
+
3
9
  ## 3.2.1
4
10
 
5
11
  ### 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
@@ -19,7 +19,7 @@ var _wrapNativeSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/w
19
19
 
20
20
  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
21
 
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; } }
22
+ 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
23
 
24
24
  var AuthError = /*#__PURE__*/function (_Error) {
25
25
  (0, _inherits2.default)(AuthError, _Error);
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.0"
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.0"
4
4
  }
package/dist/esm/error.js CHANGED
@@ -6,7 +6,7 @@ import _wrapNativeSuper from "@babel/runtime/helpers/wrapNativeSuper";
6
6
 
7
7
  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
8
 
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; } }
9
+ 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
10
 
11
11
  export var AuthError = /*#__PURE__*/function (_Error) {
12
12
  _inherits(AuthError, _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.0"
4
4
  }
@@ -1,5 +1,5 @@
1
1
  export declare class AuthError extends Error {
2
2
  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);
3
+ readonly type?: "auth_window_closed" | "invalid_request" | "unauthorized_client" | "access_denied" | "unsupported_response_type" | "invalid_scope" | "server_error" | "temporarily_unavailable" | "authclientoauth2.autherror" | undefined;
4
+ constructor(message: string, type?: "auth_window_closed" | "invalid_request" | "unauthorized_client" | "access_denied" | "unsupported_response_type" | "invalid_scope" | "server_error" | "temporarily_unavailable" | "authclientoauth2.autherror" | undefined);
5
5
  }
@@ -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.0",
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
+ "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
29
30
  "typescript": "3.9.6"
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
  }