@aws-amplify/core 5.3.1-unstable.fca5451.1 → 5.3.1

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.
@@ -1 +1 @@
1
- export declare const version = "5.2.2-unstable.fca5451.1+fca545120";
1
+ export declare const version = "5.2.4";
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  // generated by genversion
4
- exports.version = '5.2.2-unstable.fca5451.1+fca545120';
4
+ exports.version = '5.2.4';
5
5
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/Platform/version.ts"],"names":[],"mappings":";;AAAA,0BAA0B;AACb,QAAA,OAAO,GAAG,oCAAoC,CAAC"}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/Platform/version.ts"],"names":[],"mappings":";;AAAA,0BAA0B;AACb,QAAA,OAAO,GAAG,OAAO,CAAC"}
@@ -1,4 +1,4 @@
1
- import 'react-native-url-polyfill/auto';
1
+ import '@aws-amplify/core/polyfills/URL';
2
2
  export { signRequest } from './signRequest';
3
3
  export { presignUrl } from './presignUrl';
4
4
  export { TOKEN_QUERY_PARAM } from './constants';
@@ -2,7 +2,7 @@
2
2
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  // SPDX-License-Identifier: Apache-2.0
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
- require("react-native-url-polyfill/auto");
5
+ require("@aws-amplify/core/polyfills/URL");
6
6
  // TODO: V6 replace Signer
7
7
  var signRequest_1 = require("./signRequest");
8
8
  exports.signRequest = signRequest_1.signRequest;
@@ -1 +1 @@
1
- {"version":3,"file":"index.native.js","sourceRoot":"","sources":["../../../../../../src/clients/middleware/signing/signer/signatureV4/index.native.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;AAEtC,0CAAwC;AAExC,0BAA0B;AAC1B,6CAA4C;AAAnC,oCAAA,WAAW,CAAA;AACpB,2CAA0C;AAAjC,kCAAA,UAAU,CAAA;AACnB,yCAAgD;AAAvC,wCAAA,iBAAiB,CAAA"}
1
+ {"version":3,"file":"index.native.js","sourceRoot":"","sources":["../../../../../../src/clients/middleware/signing/signer/signatureV4/index.native.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;AAEtC,2CAAyC;AAEzC,0BAA0B;AAC1B,6CAA4C;AAAnC,oCAAA,WAAW,CAAA;AACpB,2CAA0C;AAAjC,kCAAA,UAAU,CAAA;AACnB,yCAAgD;AAAvC,wCAAA,iBAAiB,CAAA"}
@@ -1 +1 @@
1
- export declare const version = "5.2.2-unstable.fca5451.1+fca545120";
1
+ export declare const version = "5.2.4";
@@ -1,3 +1,3 @@
1
1
  // generated by genversion
2
- export var version = '5.2.2-unstable.fca5451.1+fca545120';
2
+ export var version = '5.2.4';
3
3
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/Platform/version.ts"],"names":[],"mappings":"AAAA,0BAA0B;AAC1B,MAAM,CAAC,IAAM,OAAO,GAAG,oCAAoC,CAAC"}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/Platform/version.ts"],"names":[],"mappings":"AAAA,0BAA0B;AAC1B,MAAM,CAAC,IAAM,OAAO,GAAG,OAAO,CAAC"}
@@ -1,4 +1,4 @@
1
- import 'react-native-url-polyfill/auto';
1
+ import '@aws-amplify/core/polyfills/URL';
2
2
  export { signRequest } from './signRequest';
3
3
  export { presignUrl } from './presignUrl';
4
4
  export { TOKEN_QUERY_PARAM } from './constants';
@@ -1,6 +1,6 @@
1
1
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
  // SPDX-License-Identifier: Apache-2.0
3
- import 'react-native-url-polyfill/auto';
3
+ import '@aws-amplify/core/polyfills/URL';
4
4
  // TODO: V6 replace Signer
5
5
  export { signRequest } from './signRequest';
6
6
  export { presignUrl } from './presignUrl';
@@ -1 +1 @@
1
- {"version":3,"file":"index.native.js","sourceRoot":"","sources":["../../../../../../src/clients/middleware/signing/signer/signatureV4/index.native.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,gCAAgC,CAAC;AAExC,0BAA0B;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.native.js","sourceRoot":"","sources":["../../../../../../src/clients/middleware/signing/signer/signatureV4/index.native.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,iCAAiC,CAAC;AAEzC,0BAA0B;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-amplify/core",
3
- "version": "5.3.1-unstable.fca5451.1+fca545120",
3
+ "version": "5.3.1",
4
4
  "description": "Core category of aws-amplify",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib-esm/index.js",
@@ -22,7 +22,8 @@
22
22
  "build:esm": "rimraf lib-esm && node ./build es6",
23
23
  "build:cjs:watch": "node ./build es5 --watch",
24
24
  "build:esm:watch": "rimraf lib-esm && node ./build es6 --watch",
25
- "build": "npm run clean && npm run generate-version && npm run build:esm && npm run build:cjs",
25
+ "build": "npm run clean && npm run generate-version && npm run build:polyfills:url && npm run build:esm && npm run build:cjs",
26
+ "build:polyfills:url": "webpack --config ./polyfills/URL/webpack.config.js",
26
27
  "generate-version": "genversion src/Platform/version.ts --es6 --semi --source ../aws-amplify",
27
28
  "clean": "npm run clean:size && rimraf lib-esm lib dist",
28
29
  "clean:size": "rimraf dual-publish-tmp tmp*",
@@ -58,7 +59,8 @@
58
59
  "lib",
59
60
  "lib-esm",
60
61
  "src",
61
- "typings.d.ts"
62
+ "typings.d.ts",
63
+ "polyfills"
62
64
  ],
63
65
  "dependencies": {
64
66
  "@aws-crypto/sha256-js": "1.2.2",
@@ -151,5 +153,5 @@
151
153
  "lib-esm"
152
154
  ]
153
155
  },
154
- "gitHead": "fca5451201365c915d5bb113a303f7f6d62e330d"
156
+ "gitHead": "e7a6f07b544185c89215d15d3f978e81e2917009"
155
157
  }
@@ -0,0 +1 @@
1
+ (()=>{var e={128:e=>{"use strict";e.exports=require("react-native-url-polyfill/auto")}},r={};var o,t={};"test"!==(null===(o=null===process||void 0===process?void 0:process.env)||void 0===o?void 0:o.NODE_ENV)&&function o(t){var s=r[t];if(void 0!==s)return s.exports;var v=r[t]={exports:{}};return e[t](v,v.exports,o),v.exports}(128);var s=exports;for(var v in t)s[v]=t[v];t.__esModule&&Object.defineProperty(s,"__esModule",{value:!0})})();
@@ -0,0 +1,12 @@
1
+ /**
2
+ * TODO: [v6] remove this polyfill.
3
+ *
4
+ * The `react-native-url-polyfill` package needs to be bundled because it's
5
+ * a commonjs package that would break the users' Jest unit tests, where MJS
6
+ * is not supported by default.
7
+ */
8
+ if (process?.env?.NODE_ENV !== 'test') {
9
+ // Loading this polyfill in customers' unit tests will cause undefined
10
+ // variable error in un-mocked react-native package.
11
+ require('react-native-url-polyfill/auto');
12
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "compilerOptions": {
3
+ "allowSyntheticDefaultImports": true,
4
+ "noImplicitAny": true,
5
+ "module": "es6",
6
+ "target": "es5",
7
+ "allowJs": true
8
+ },
9
+ "files": ["index.ts"]
10
+ }
@@ -0,0 +1,43 @@
1
+ const path = require('path');
2
+
3
+ const rnUrlPolyfillPath = require.resolve('react-native-url-polyfill');
4
+ const rnUrlPolyfillMeta = require(path.join(
5
+ path.dirname(rnUrlPolyfillPath),
6
+ 'package.json'
7
+ ));
8
+ const rnUrlPolyfillDeps = Object.keys({
9
+ ...rnUrlPolyfillMeta.dependencies,
10
+ ...rnUrlPolyfillMeta.peerDependencies,
11
+ });
12
+ const rnUrlPolyfillDepsRegex = rnUrlPolyfillDeps.map(
13
+ name => new RegExp(`^${name}\/?`) // match name with optional trailing slash
14
+ );
15
+
16
+ module.exports = {
17
+ name: 'index',
18
+ context: path.resolve(__dirname),
19
+ entry: {
20
+ index: path.join(__dirname, 'index.ts'),
21
+ },
22
+ output: {
23
+ path: path.resolve(__dirname),
24
+ filename: '[name].js',
25
+ library: {
26
+ type: 'commonjs',
27
+ },
28
+ },
29
+ module: {
30
+ rules: [
31
+ {
32
+ test: /\.(ts|tsx)$/i,
33
+ loader: 'ts-loader',
34
+ exclude: ['/node_modules/'],
35
+ },
36
+ ],
37
+ },
38
+ resolve: {
39
+ extensions: ['.tsx', '.ts', '.jsx', '.js'],
40
+ },
41
+ externals: rnUrlPolyfillDepsRegex,
42
+ mode: 'production',
43
+ };
@@ -1,2 +1,2 @@
1
1
  // generated by genversion
2
- export const version = '5.2.2-unstable.fca5451.1+fca545120';
2
+ export const version = '5.2.4';
@@ -1,7 +1,7 @@
1
1
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
- import 'react-native-url-polyfill/auto';
4
+ import '@aws-amplify/core/polyfills/URL';
5
5
 
6
6
  // TODO: V6 replace Signer
7
7
  export { signRequest } from './signRequest';