@okta/okta-auth-js 6.4.1 → 6.4.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,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 6.4.2
4
+
5
+ ### Fixes
6
+
7
+ - [#1180](https://github.com/okta/okta-auth-js/pull/1180) Fixes commonjs bundle `dynamic import` transpiling issue
8
+
3
9
  ## 6.4.1
4
10
 
5
11
  ### Fixes
@@ -21,7 +21,7 @@ var _features = require("./features");
21
21
  class OktaUserAgent {
22
22
  constructor() {
23
23
  // add base sdk env
24
- this.environments = [`okta-auth-js/${"6.4.1"}`];
24
+ this.environments = [`okta-auth-js/${"6.4.2"}`];
25
25
  }
26
26
 
27
27
  addEnvironment(env) {
@@ -36,7 +36,7 @@ class OktaUserAgent {
36
36
  }
37
37
 
38
38
  getVersion() {
39
- return "6.4.1";
39
+ return "6.4.2";
40
40
  }
41
41
 
42
42
  maybeAddNodeEnvironment() {
@@ -4,27 +4,22 @@ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequ
4
4
 
5
5
  exports.webcrypto = exports.btoa = exports.atob = void 0;
6
6
 
7
+ var _promise = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/promise"));
8
+
9
+ var _weakMap = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/weak-map"));
10
+
11
+ var _getOwnPropertyDescriptor = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor"));
12
+
7
13
  var _atob = _interopRequireDefault(require("atob"));
8
14
 
9
15
  var _btoa = _interopRequireDefault(require("btoa"));
10
16
 
11
17
  var _webcrypto = require("@peculiar/webcrypto");
12
18
 
13
- /*!
14
- * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.
15
- * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
16
- *
17
- * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
18
- * Unless required by applicable law or agreed to in writing, software
19
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
20
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21
- *
22
- * See the License for the specific language governing permissions and limitations under the License.
23
- */
24
-
25
- /* global atob, btoa */
26
- // Ponyfill for NodeJS
27
- // Webpack config excludes this file
19
+ function _getRequireWildcardCache(nodeInterop) { if (typeof _weakMap.default !== "function") return null; var cacheBabelInterop = new _weakMap.default(); var cacheNodeInterop = new _weakMap.default(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
20
+
21
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && _getOwnPropertyDescriptor.default; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? (0, _getOwnPropertyDescriptor.default)(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
22
+
28
23
  let a;
29
24
  exports.atob = a;
30
25
 
@@ -45,7 +40,7 @@ if (typeof btoa !== 'undefined') {
45
40
 
46
41
  const crypto = (async () => {
47
42
  try {
48
- return await import('crypto');
43
+ return await _promise.default.resolve().then(() => _interopRequireWildcard(require('crypto')));
49
44
  } catch (err) {
50
45
  // this environment has no crypto module!
51
46
  return undefined;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/crypto/node.ts"],"names":["a","atob","atobModule","b","btoa","btoaModule","crypto","err","undefined","webcrypto","Crypto"],"mappings":";;;;;;AAkBA;;AACA;;AACA;;AApBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AAEA;AACA;AAMA,IAAIA,CAAJ;;;AACA,IAAI,OAAOC,IAAP,KAAgB,WAApB,EAAiC;AAC/B,iBAAAD,CAAC,GAAGC,IAAJ;AACD,CAFD,MAEO;AACL,iBAAAD,CAAC,GAAGE,aAAJ;AACD;;AAID,IAAIC,CAAJ;;;AACA,IAAI,OAAOC,IAAP,KAAgB,WAApB,EAAiC;AAC/B,iBAAAD,CAAC,GAAGC,IAAJ;AACD,CAFD,MAEO;AACL,iBAAAD,CAAC,GAAGE,aAAJ;AACD;;AAGD,MAAMC,MAAM,GAAG,CAAC,YAAY;AAC1B,MAAI;AACF,WAAO,MAAM,OAAO,QAAP,CAAb;AACD,GAFD,CAEE,OAAOC,GAAP,EAAY;AACZ;AACA,WAAOC,SAAP;AACD;AACF,CAPc,GAAf;;AASA,IAAIC,SAAJ;;;AACA,IAAI,OAAOH,MAAP,KAAkB,WAAlB,IAAiCA,MAAM,CAAC,WAAD,CAA3C,EAA0D;AACxD,sBAAAG,SAAS,GAAGH,MAAM,CAAC,WAAD,CAAlB;AACD,CAFD,MAEO;AACL,sBAAAG,SAAS,GAAG,IAAIC,iBAAJ,EAAZ;AACD","sourcesContent":["/*!\n * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * \n * See the License for the specific language governing permissions and limitations under the License.\n */\n\n\n/* global atob, btoa */\n\n// Ponyfill for NodeJS\n// Webpack config excludes this file\n\nimport atobModule from 'atob';\nimport btoaModule from 'btoa';\nimport { Crypto } from '@peculiar/webcrypto';\n\nlet a;\nif (typeof atob !== 'undefined') {\n a = atob;\n} else {\n a = atobModule;\n}\nexport { a as atob };\n\n\nlet b;\nif (typeof btoa !== 'undefined') {\n b = btoa;\n} else {\n b = btoaModule;\n}\nexport { b as btoa };\n\nconst crypto = (async () => {\n try {\n return await import('crypto');\n } catch (err) {\n // this environment has no crypto module!\n return undefined;\n }\n})();\n\nlet webcrypto;\nif (typeof crypto !== 'undefined' && crypto['webcrypto']) {\n webcrypto = crypto['webcrypto'];\n} else {\n webcrypto = new Crypto();\n}\n\nexport { webcrypto };\n"],"file":"node.js"}
1
+ {"version":3,"sources":["../../../lib/crypto/node.ts"],"names":["a","atob","atobModule","b","btoa","btoaModule","crypto","err","undefined","webcrypto","Crypto"],"mappings":";;;;;;;;;;;;AAkBA;;AACA;;AACA;;;;;;AAEA,IAAIA,CAAJ;;;AACA,IAAI,OAAOC,IAAP,KAAgB,WAApB,EAAiC;AAC/B,iBAAAD,CAAC,GAAGC,IAAJ;AACD,CAFD,MAEO;AACL,iBAAAD,CAAC,GAAGE,aAAJ;AACD;;AAID,IAAIC,CAAJ;;;AACA,IAAI,OAAOC,IAAP,KAAgB,WAApB,EAAiC;AAC/B,iBAAAD,CAAC,GAAGC,IAAJ;AACD,CAFD,MAEO;AACL,iBAAAD,CAAC,GAAGE,aAAJ;AACD;;AAGD,MAAMC,MAAM,GAAG,CAAC,YAAY;AAC1B,MAAI;AACF,WAAO,4EAAa,QAAb,GAAP;AACD,GAFD,CAEE,OAAOC,GAAP,EAAY;AACZ;AACA,WAAOC,SAAP;AACD;AACF,CAPc,GAAf;;AASA,IAAIC,SAAJ;;;AACA,IAAI,OAAOH,MAAP,KAAkB,WAAlB,IAAiCA,MAAM,CAAC,WAAD,CAA3C,EAA0D;AACxD,sBAAAG,SAAS,GAAGH,MAAM,CAAC,WAAD,CAAlB;AACD,CAFD,MAEO;AACL,sBAAAG,SAAS,GAAG,IAAIC,iBAAJ,EAAZ;AACD","sourcesContent":["/*!\n * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * \n * See the License for the specific language governing permissions and limitations under the License.\n */\n\n\n/* global atob, btoa */\n\n// Ponyfill for NodeJS\n// Webpack config excludes this file\n\nimport atobModule from 'atob';\nimport btoaModule from 'btoa';\nimport { Crypto } from '@peculiar/webcrypto';\n\nlet a;\nif (typeof atob !== 'undefined') {\n a = atob;\n} else {\n a = atobModule;\n}\nexport { a as atob };\n\n\nlet b;\nif (typeof btoa !== 'undefined') {\n b = btoa;\n} else {\n b = btoaModule;\n}\nexport { b as btoa };\n\nconst crypto = (async () => {\n try {\n return await import('crypto');\n } catch (err) {\n // this environment has no crypto module!\n return undefined;\n }\n})();\n\nlet webcrypto;\nif (typeof crypto !== 'undefined' && crypto['webcrypto']) {\n webcrypto = crypto['webcrypto'];\n} else {\n webcrypto = new Crypto();\n}\n\nexport { webcrypto };\n"],"file":"node.js"}