@aws-amplify/notifications 2.0.1-mjs-test.6f5dab7.0 → 2.0.1-mjs-test.fc9412c.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.
@@ -5,7 +5,7 @@
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.assertIsInitialized = exports.assert = exports.PushNotificationValidationErrorCode = void 0;
7
7
  const utils_1 = require("@aws-amplify/core/internals/utils");
8
- const utils_2 = require("../utils");
8
+ const initializationManager_1 = require("../utils/initializationManager");
9
9
  const PushNotificationError_1 = require("./PushNotificationError");
10
10
  var PushNotificationValidationErrorCode;
11
11
  (function (PushNotificationValidationErrorCode) {
@@ -31,7 +31,7 @@ const pushNotificationValidationErrorMap = {
31
31
  };
32
32
  exports.assert = (0, utils_1.createAssertionFunction)(pushNotificationValidationErrorMap, PushNotificationError_1.PushNotificationError);
33
33
  const assertIsInitialized = () => {
34
- (0, exports.assert)((0, utils_2.isInitialized)(), PushNotificationValidationErrorCode.NotInitialized);
34
+ (0, exports.assert)((0, initializationManager_1.isInitialized)(), PushNotificationValidationErrorCode.NotInitialized);
35
35
  };
36
36
  exports.assertIsInitialized = assertIsInitialized;
37
37
  //# sourceMappingURL=errorHelpers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"errorHelpers.js","sources":["../../../../src/pushNotifications/errors/errorHelpers.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.assertIsInitialized = exports.assert = exports.PushNotificationValidationErrorCode = void 0;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nconst utils_2 = require(\"../utils\");\nconst PushNotificationError_1 = require(\"./PushNotificationError\");\nvar PushNotificationValidationErrorCode;\n(function (PushNotificationValidationErrorCode) {\n PushNotificationValidationErrorCode[\"NoAppId\"] = \"NoAppId\";\n PushNotificationValidationErrorCode[\"NoCredentials\"] = \"NoCredentials\";\n PushNotificationValidationErrorCode[\"NoRegion\"] = \"NoRegion\";\n PushNotificationValidationErrorCode[\"NotInitialized\"] = \"NotInitialized\";\n})(PushNotificationValidationErrorCode = exports.PushNotificationValidationErrorCode || (exports.PushNotificationValidationErrorCode = {}));\nconst pushNotificationValidationErrorMap = {\n [PushNotificationValidationErrorCode.NoAppId]: {\n message: 'Missing application id.',\n },\n [PushNotificationValidationErrorCode.NoCredentials]: {\n message: 'Credentials should not be empty.',\n },\n [PushNotificationValidationErrorCode.NoRegion]: {\n message: 'Missing region.',\n },\n [PushNotificationValidationErrorCode.NotInitialized]: {\n message: 'Push notification has not been initialized.',\n recoverySuggestion: 'Please make sure to first call `initializePushNotifications`.',\n },\n};\nexports.assert = (0, utils_1.createAssertionFunction)(pushNotificationValidationErrorMap, PushNotificationError_1.PushNotificationError);\nconst assertIsInitialized = () => {\n (0, exports.assert)((0, utils_2.isInitialized)(), PushNotificationValidationErrorCode.NotInitialized);\n};\nexports.assertIsInitialized = assertIsInitialized;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,mBAAmB,GAAG,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,mCAAmC,GAAG,KAAK,CAAC,CAAC;AACpG,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC,CAAC;AAC7D,MAAM,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AACpC,MAAM,uBAAuB,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC;AACnE,IAAI,mCAAmC,CAAC;AACxC,CAAC,UAAU,mCAAmC,EAAE;AAChD,IAAI,mCAAmC,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC;AAC/D,IAAI,mCAAmC,CAAC,eAAe,CAAC,GAAG,eAAe,CAAC;AAC3E,IAAI,mCAAmC,CAAC,UAAU,CAAC,GAAG,UAAU,CAAC;AACjE,IAAI,mCAAmC,CAAC,gBAAgB,CAAC,GAAG,gBAAgB,CAAC;AAC7E,CAAC,EAAE,mCAAmC,GAAG,OAAO,CAAC,mCAAmC,KAAK,OAAO,CAAC,mCAAmC,GAAG,EAAE,CAAC,CAAC,CAAC;AAC5I,MAAM,kCAAkC,GAAG;AAC3C,IAAI,CAAC,mCAAmC,CAAC,OAAO,GAAG;AACnD,QAAQ,OAAO,EAAE,yBAAyB;AAC1C,KAAK;AACL,IAAI,CAAC,mCAAmC,CAAC,aAAa,GAAG;AACzD,QAAQ,OAAO,EAAE,kCAAkC;AACnD,KAAK;AACL,IAAI,CAAC,mCAAmC,CAAC,QAAQ,GAAG;AACpD,QAAQ,OAAO,EAAE,iBAAiB;AAClC,KAAK;AACL,IAAI,CAAC,mCAAmC,CAAC,cAAc,GAAG;AAC1D,QAAQ,OAAO,EAAE,6CAA6C;AAC9D,QAAQ,kBAAkB,EAAE,+DAA+D;AAC3F,KAAK;AACL,CAAC,CAAC;AACF,OAAO,CAAC,MAAM,GAAG,IAAI,OAAO,CAAC,uBAAuB,EAAE,kCAAkC,EAAE,uBAAuB,CAAC,qBAAqB,CAAC,CAAC;AACzI,MAAM,mBAAmB,GAAG,MAAM;AAClC,IAAI,IAAI,OAAO,CAAC,MAAM,EAAE,IAAI,OAAO,CAAC,aAAa,GAAG,EAAE,mCAAmC,CAAC,cAAc,CAAC,CAAC;AAC1G,CAAC,CAAC;AACF,OAAO,CAAC,mBAAmB,GAAG,mBAAmB;;"}
1
+ {"version":3,"file":"errorHelpers.js","sources":["../../../../src/pushNotifications/errors/errorHelpers.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.assertIsInitialized = exports.assert = exports.PushNotificationValidationErrorCode = void 0;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nconst initializationManager_1 = require(\"../utils/initializationManager\");\nconst PushNotificationError_1 = require(\"./PushNotificationError\");\nvar PushNotificationValidationErrorCode;\n(function (PushNotificationValidationErrorCode) {\n PushNotificationValidationErrorCode[\"NoAppId\"] = \"NoAppId\";\n PushNotificationValidationErrorCode[\"NoCredentials\"] = \"NoCredentials\";\n PushNotificationValidationErrorCode[\"NoRegion\"] = \"NoRegion\";\n PushNotificationValidationErrorCode[\"NotInitialized\"] = \"NotInitialized\";\n})(PushNotificationValidationErrorCode = exports.PushNotificationValidationErrorCode || (exports.PushNotificationValidationErrorCode = {}));\nconst pushNotificationValidationErrorMap = {\n [PushNotificationValidationErrorCode.NoAppId]: {\n message: 'Missing application id.',\n },\n [PushNotificationValidationErrorCode.NoCredentials]: {\n message: 'Credentials should not be empty.',\n },\n [PushNotificationValidationErrorCode.NoRegion]: {\n message: 'Missing region.',\n },\n [PushNotificationValidationErrorCode.NotInitialized]: {\n message: 'Push notification has not been initialized.',\n recoverySuggestion: 'Please make sure to first call `initializePushNotifications`.',\n },\n};\nexports.assert = (0, utils_1.createAssertionFunction)(pushNotificationValidationErrorMap, PushNotificationError_1.PushNotificationError);\nconst assertIsInitialized = () => {\n (0, exports.assert)((0, initializationManager_1.isInitialized)(), PushNotificationValidationErrorCode.NotInitialized);\n};\nexports.assertIsInitialized = assertIsInitialized;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,mBAAmB,GAAG,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,mCAAmC,GAAG,KAAK,CAAC,CAAC;AACpG,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC,CAAC;AAC7D,MAAM,uBAAuB,GAAG,OAAO,CAAC,gCAAgC,CAAC,CAAC;AAC1E,MAAM,uBAAuB,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC;AACnE,IAAI,mCAAmC,CAAC;AACxC,CAAC,UAAU,mCAAmC,EAAE;AAChD,IAAI,mCAAmC,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC;AAC/D,IAAI,mCAAmC,CAAC,eAAe,CAAC,GAAG,eAAe,CAAC;AAC3E,IAAI,mCAAmC,CAAC,UAAU,CAAC,GAAG,UAAU,CAAC;AACjE,IAAI,mCAAmC,CAAC,gBAAgB,CAAC,GAAG,gBAAgB,CAAC;AAC7E,CAAC,EAAE,mCAAmC,GAAG,OAAO,CAAC,mCAAmC,KAAK,OAAO,CAAC,mCAAmC,GAAG,EAAE,CAAC,CAAC,CAAC;AAC5I,MAAM,kCAAkC,GAAG;AAC3C,IAAI,CAAC,mCAAmC,CAAC,OAAO,GAAG;AACnD,QAAQ,OAAO,EAAE,yBAAyB;AAC1C,KAAK;AACL,IAAI,CAAC,mCAAmC,CAAC,aAAa,GAAG;AACzD,QAAQ,OAAO,EAAE,kCAAkC;AACnD,KAAK;AACL,IAAI,CAAC,mCAAmC,CAAC,QAAQ,GAAG;AACpD,QAAQ,OAAO,EAAE,iBAAiB;AAClC,KAAK;AACL,IAAI,CAAC,mCAAmC,CAAC,cAAc,GAAG;AAC1D,QAAQ,OAAO,EAAE,6CAA6C;AAC9D,QAAQ,kBAAkB,EAAE,+DAA+D;AAC3F,KAAK;AACL,CAAC,CAAC;AACF,OAAO,CAAC,MAAM,GAAG,IAAI,OAAO,CAAC,uBAAuB,EAAE,kCAAkC,EAAE,uBAAuB,CAAC,qBAAqB,CAAC,CAAC;AACzI,MAAM,mBAAmB,GAAG,MAAM;AAClC,IAAI,IAAI,OAAO,CAAC,MAAM,EAAE,IAAI,uBAAuB,CAAC,aAAa,GAAG,EAAE,mCAAmC,CAAC,cAAc,CAAC,CAAC;AAC1H,CAAC,CAAC;AACF,OAAO,CAAC,mBAAmB,GAAG,mBAAmB;;"}
@@ -5,13 +5,13 @@
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.resolveCredentials = void 0;
7
7
  const core_1 = require("@aws-amplify/core");
8
- const errors_1 = require("../errors");
8
+ const errorHelpers_1 = require("../errors/errorHelpers");
9
9
  /**
10
10
  * @internal
11
11
  */
12
12
  const resolveCredentials = async () => {
13
13
  const { credentials, identityId } = await (0, core_1.fetchAuthSession)();
14
- (0, errors_1.assert)(!!credentials, errors_1.PushNotificationValidationErrorCode.NoCredentials);
14
+ (0, errorHelpers_1.assert)(!!credentials, errorHelpers_1.PushNotificationValidationErrorCode.NoCredentials);
15
15
  return { credentials, identityId };
16
16
  };
17
17
  exports.resolveCredentials = resolveCredentials;
@@ -1 +1 @@
1
- {"version":3,"file":"resolveCredentials.js","sources":["../../../../src/pushNotifications/utils/resolveCredentials.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolveCredentials = void 0;\nconst core_1 = require(\"@aws-amplify/core\");\nconst errors_1 = require(\"../errors\");\n/**\n * @internal\n */\nconst resolveCredentials = async () => {\n const { credentials, identityId } = await (0, core_1.fetchAuthSession)();\n (0, errors_1.assert)(!!credentials, errors_1.PushNotificationValidationErrorCode.NoCredentials);\n return { credentials, identityId };\n};\nexports.resolveCredentials = resolveCredentials;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,kBAAkB,GAAG,KAAK,CAAC,CAAC;AACpC,MAAM,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;AACtC;AACA;AACA;AACA,MAAM,kBAAkB,GAAG,YAAY;AACvC,IAAI,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,GAAG,MAAM,IAAI,MAAM,CAAC,gBAAgB,GAAG,CAAC;AAC7E,IAAI,IAAI,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC,WAAW,EAAE,QAAQ,CAAC,mCAAmC,CAAC,aAAa,CAAC,CAAC;AACpG,IAAI,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,CAAC;AACvC,CAAC,CAAC;AACF,OAAO,CAAC,kBAAkB,GAAG,kBAAkB;;"}
1
+ {"version":3,"file":"resolveCredentials.js","sources":["../../../../src/pushNotifications/utils/resolveCredentials.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolveCredentials = void 0;\nconst core_1 = require(\"@aws-amplify/core\");\nconst errorHelpers_1 = require(\"../errors/errorHelpers\");\n/**\n * @internal\n */\nconst resolveCredentials = async () => {\n const { credentials, identityId } = await (0, core_1.fetchAuthSession)();\n (0, errorHelpers_1.assert)(!!credentials, errorHelpers_1.PushNotificationValidationErrorCode.NoCredentials);\n return { credentials, identityId };\n};\nexports.resolveCredentials = resolveCredentials;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,kBAAkB,GAAG,KAAK,CAAC,CAAC;AACpC,MAAM,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAC5C,MAAM,cAAc,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;AACzD;AACA;AACA;AACA,MAAM,kBAAkB,GAAG,YAAY;AACvC,IAAI,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,GAAG,MAAM,IAAI,MAAM,CAAC,gBAAgB,GAAG,CAAC;AAC7E,IAAI,IAAI,cAAc,CAAC,MAAM,EAAE,CAAC,CAAC,WAAW,EAAE,cAAc,CAAC,mCAAmC,CAAC,aAAa,CAAC,CAAC;AAChH,IAAI,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,CAAC;AACvC,CAAC,CAAC;AACF,OAAO,CAAC,kBAAkB,GAAG,kBAAkB;;"}
@@ -1,6 +1,5 @@
1
1
  import { createAssertionFunction } from '@aws-amplify/core/internals/utils';
2
2
  import { isInitialized } from '../utils/initializationManager.mjs';
3
- import '@aws-amplify/core';
4
3
  import { PushNotificationError } from './PushNotificationError.mjs';
5
4
 
6
5
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
@@ -1 +1 @@
1
- {"version":3,"file":"errorHelpers.mjs","sources":["../../../../src/pushNotifications/errors/errorHelpers.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { createAssertionFunction, } from '@aws-amplify/core/internals/utils';\nimport { isInitialized } from '../utils';\nimport { PushNotificationError } from './PushNotificationError';\nexport var PushNotificationValidationErrorCode;\n(function (PushNotificationValidationErrorCode) {\n PushNotificationValidationErrorCode[\"NoAppId\"] = \"NoAppId\";\n PushNotificationValidationErrorCode[\"NoCredentials\"] = \"NoCredentials\";\n PushNotificationValidationErrorCode[\"NoRegion\"] = \"NoRegion\";\n PushNotificationValidationErrorCode[\"NotInitialized\"] = \"NotInitialized\";\n})(PushNotificationValidationErrorCode || (PushNotificationValidationErrorCode = {}));\nconst pushNotificationValidationErrorMap = {\n [PushNotificationValidationErrorCode.NoAppId]: {\n message: 'Missing application id.',\n },\n [PushNotificationValidationErrorCode.NoCredentials]: {\n message: 'Credentials should not be empty.',\n },\n [PushNotificationValidationErrorCode.NoRegion]: {\n message: 'Missing region.',\n },\n [PushNotificationValidationErrorCode.NotInitialized]: {\n message: 'Push notification has not been initialized.',\n recoverySuggestion: 'Please make sure to first call `initializePushNotifications`.',\n },\n};\nexport const assert = createAssertionFunction(pushNotificationValidationErrorMap, PushNotificationError);\nexport const assertIsInitialized = () => {\n assert(isInitialized(), PushNotificationValidationErrorCode.NotInitialized);\n};\n"],"names":[],"mappings":";;;;;AAAA;AACA;AAIU,IAAC,oCAAoC;AAC/C,CAAC,UAAU,mCAAmC,EAAE;AAChD,IAAI,mCAAmC,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC;AAC/D,IAAI,mCAAmC,CAAC,eAAe,CAAC,GAAG,eAAe,CAAC;AAC3E,IAAI,mCAAmC,CAAC,UAAU,CAAC,GAAG,UAAU,CAAC;AACjE,IAAI,mCAAmC,CAAC,gBAAgB,CAAC,GAAG,gBAAgB,CAAC;AAC7E,CAAC,EAAE,mCAAmC,KAAK,mCAAmC,GAAG,EAAE,CAAC,CAAC,CAAC;AACtF,MAAM,kCAAkC,GAAG;AAC3C,IAAI,CAAC,mCAAmC,CAAC,OAAO,GAAG;AACnD,QAAQ,OAAO,EAAE,yBAAyB;AAC1C,KAAK;AACL,IAAI,CAAC,mCAAmC,CAAC,aAAa,GAAG;AACzD,QAAQ,OAAO,EAAE,kCAAkC;AACnD,KAAK;AACL,IAAI,CAAC,mCAAmC,CAAC,QAAQ,GAAG;AACpD,QAAQ,OAAO,EAAE,iBAAiB;AAClC,KAAK;AACL,IAAI,CAAC,mCAAmC,CAAC,cAAc,GAAG;AAC1D,QAAQ,OAAO,EAAE,6CAA6C;AAC9D,QAAQ,kBAAkB,EAAE,+DAA+D;AAC3F,KAAK;AACL,CAAC,CAAC;AACU,MAAC,MAAM,GAAG,uBAAuB,CAAC,kCAAkC,EAAE,qBAAqB,EAAE;AAC7F,MAAC,mBAAmB,GAAG,MAAM;AACzC,IAAI,MAAM,CAAC,aAAa,EAAE,EAAE,mCAAmC,CAAC,cAAc,CAAC,CAAC;AAChF;;;;"}
1
+ {"version":3,"file":"errorHelpers.mjs","sources":["../../../../src/pushNotifications/errors/errorHelpers.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { createAssertionFunction, } from '@aws-amplify/core/internals/utils';\nimport { isInitialized } from '../utils/initializationManager';\nimport { PushNotificationError } from './PushNotificationError';\nexport var PushNotificationValidationErrorCode;\n(function (PushNotificationValidationErrorCode) {\n PushNotificationValidationErrorCode[\"NoAppId\"] = \"NoAppId\";\n PushNotificationValidationErrorCode[\"NoCredentials\"] = \"NoCredentials\";\n PushNotificationValidationErrorCode[\"NoRegion\"] = \"NoRegion\";\n PushNotificationValidationErrorCode[\"NotInitialized\"] = \"NotInitialized\";\n})(PushNotificationValidationErrorCode || (PushNotificationValidationErrorCode = {}));\nconst pushNotificationValidationErrorMap = {\n [PushNotificationValidationErrorCode.NoAppId]: {\n message: 'Missing application id.',\n },\n [PushNotificationValidationErrorCode.NoCredentials]: {\n message: 'Credentials should not be empty.',\n },\n [PushNotificationValidationErrorCode.NoRegion]: {\n message: 'Missing region.',\n },\n [PushNotificationValidationErrorCode.NotInitialized]: {\n message: 'Push notification has not been initialized.',\n recoverySuggestion: 'Please make sure to first call `initializePushNotifications`.',\n },\n};\nexport const assert = createAssertionFunction(pushNotificationValidationErrorMap, PushNotificationError);\nexport const assertIsInitialized = () => {\n assert(isInitialized(), PushNotificationValidationErrorCode.NotInitialized);\n};\n"],"names":[],"mappings":";;;;AAAA;AACA;AAIU,IAAC,oCAAoC;AAC/C,CAAC,UAAU,mCAAmC,EAAE;AAChD,IAAI,mCAAmC,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC;AAC/D,IAAI,mCAAmC,CAAC,eAAe,CAAC,GAAG,eAAe,CAAC;AAC3E,IAAI,mCAAmC,CAAC,UAAU,CAAC,GAAG,UAAU,CAAC;AACjE,IAAI,mCAAmC,CAAC,gBAAgB,CAAC,GAAG,gBAAgB,CAAC;AAC7E,CAAC,EAAE,mCAAmC,KAAK,mCAAmC,GAAG,EAAE,CAAC,CAAC,CAAC;AACtF,MAAM,kCAAkC,GAAG;AAC3C,IAAI,CAAC,mCAAmC,CAAC,OAAO,GAAG;AACnD,QAAQ,OAAO,EAAE,yBAAyB;AAC1C,KAAK;AACL,IAAI,CAAC,mCAAmC,CAAC,aAAa,GAAG;AACzD,QAAQ,OAAO,EAAE,kCAAkC;AACnD,KAAK;AACL,IAAI,CAAC,mCAAmC,CAAC,QAAQ,GAAG;AACpD,QAAQ,OAAO,EAAE,iBAAiB;AAClC,KAAK;AACL,IAAI,CAAC,mCAAmC,CAAC,cAAc,GAAG;AAC1D,QAAQ,OAAO,EAAE,6CAA6C;AAC9D,QAAQ,kBAAkB,EAAE,+DAA+D;AAC3F,KAAK;AACL,CAAC,CAAC;AACU,MAAC,MAAM,GAAG,uBAAuB,CAAC,kCAAkC,EAAE,qBAAqB,EAAE;AAC7F,MAAC,mBAAmB,GAAG,MAAM;AACzC,IAAI,MAAM,CAAC,aAAa,EAAE,EAAE,mCAAmC,CAAC,cAAc,CAAC,CAAC;AAChF;;;;"}
@@ -1,5 +1,4 @@
1
1
  import { fetchAuthSession } from '@aws-amplify/core';
2
- import '@aws-amplify/core/internals/utils';
3
2
  import { assert, PushNotificationValidationErrorCode } from '../errors/errorHelpers.mjs';
4
3
 
5
4
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
@@ -1 +1 @@
1
- {"version":3,"file":"resolveCredentials.mjs","sources":["../../../../src/pushNotifications/utils/resolveCredentials.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { fetchAuthSession } from '@aws-amplify/core';\nimport { assert, PushNotificationValidationErrorCode } from '../errors';\n/**\n * @internal\n */\nexport const resolveCredentials = async () => {\n const { credentials, identityId } = await fetchAuthSession();\n assert(!!credentials, PushNotificationValidationErrorCode.NoCredentials);\n return { credentials, identityId };\n};\n"],"names":[],"mappings":";;;;AAAA;AACA;AAGA;AACA;AACA;AACY,MAAC,kBAAkB,GAAG,YAAY;AAC9C,IAAI,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,GAAG,MAAM,gBAAgB,EAAE,CAAC;AACjE,IAAI,MAAM,CAAC,CAAC,CAAC,WAAW,EAAE,mCAAmC,CAAC,aAAa,CAAC,CAAC;AAC7E,IAAI,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,CAAC;AACvC;;;;"}
1
+ {"version":3,"file":"resolveCredentials.mjs","sources":["../../../../src/pushNotifications/utils/resolveCredentials.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { fetchAuthSession } from '@aws-amplify/core';\nimport { assert, PushNotificationValidationErrorCode, } from '../errors/errorHelpers';\n/**\n * @internal\n */\nexport const resolveCredentials = async () => {\n const { credentials, identityId } = await fetchAuthSession();\n assert(!!credentials, PushNotificationValidationErrorCode.NoCredentials);\n return { credentials, identityId };\n};\n"],"names":[],"mappings":";;;AAAA;AACA;AAGA;AACA;AACA;AACY,MAAC,kBAAkB,GAAG,YAAY;AAC9C,IAAI,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,GAAG,MAAM,gBAAgB,EAAE,CAAC;AACjE,IAAI,MAAM,CAAC,CAAC,CAAC,WAAW,EAAE,mCAAmC,CAAC,aAAa,CAAC,CAAC;AAC7E,IAAI,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,CAAC;AACvC;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-amplify/notifications",
3
- "version": "2.0.1-mjs-test.6f5dab7.0+6f5dab7",
3
+ "version": "2.0.1-mjs-test.fc9412c.0+fc9412c",
4
4
  "description": "Notifications category of aws-amplify",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.mjs",
@@ -95,11 +95,11 @@
95
95
  "tslib": "^2.5.0"
96
96
  },
97
97
  "peerDependencies": {
98
- "@aws-amplify/core": "6.0.1-mjs-test.6f5dab7.0+6f5dab7"
98
+ "@aws-amplify/core": "6.0.1-mjs-test.fc9412c.0+fc9412c"
99
99
  },
100
100
  "devDependencies": {
101
- "@aws-amplify/core": "6.0.1-mjs-test.6f5dab7.0+6f5dab7",
102
- "@aws-amplify/react-native": "1.0.1-mjs-test.6f5dab7.0+6f5dab7",
101
+ "@aws-amplify/core": "6.0.1-mjs-test.fc9412c.0+fc9412c",
102
+ "@aws-amplify/react-native": "1.0.1-mjs-test.fc9412c.0+fc9412c",
103
103
  "@rollup/plugin-typescript": "11.1.5",
104
104
  "rollup": "3.29.4",
105
105
  "typescript": "5.0.2"
@@ -144,5 +144,5 @@
144
144
  "dist"
145
145
  ]
146
146
  },
147
- "gitHead": "6f5dab7f07d1781d39217d1e5a253c6a5165c8b2"
147
+ "gitHead": "fc9412ce1c1d7557b8b83ee4ba09a57afd1e36a1"
148
148
  }
@@ -6,7 +6,7 @@ import {
6
6
  AssertionFunction,
7
7
  createAssertionFunction,
8
8
  } from '@aws-amplify/core/internals/utils';
9
- import { isInitialized } from '../utils';
9
+ import { isInitialized } from '../utils/initializationManager';
10
10
  import { PushNotificationError } from './PushNotificationError';
11
11
 
12
12
  export enum PushNotificationValidationErrorCode {
@@ -2,7 +2,10 @@
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
4
  import { fetchAuthSession } from '@aws-amplify/core';
5
- import { assert, PushNotificationValidationErrorCode } from '../errors';
5
+ import {
6
+ assert,
7
+ PushNotificationValidationErrorCode,
8
+ } from '../errors/errorHelpers';
6
9
 
7
10
  /**
8
11
  * @internal