@aws-amplify/storage 6.6.2-unstable.7c1ed91.0 → 6.6.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.
@@ -27,8 +27,6 @@ exports.CanceledError = CanceledError;
27
27
  /**
28
28
  * Check if an error is caused by user calling `cancel()` on a upload/download task. If an overwriting error is
29
29
  * supplied to `task.cancel(errorOverwrite)`, this function will return `false`.
30
- * @param {unknown} error The unknown exception to be checked.
31
- * @returns - A boolean indicating if the error was from an upload cancellation
32
30
  */
33
31
  const isCancelError = (error) => !!error && error instanceof CanceledError;
34
32
  exports.isCancelError = isCancelError;
@@ -1 +1 @@
1
- {"version":3,"file":"CanceledError.js","sources":["../../../src/errors/CanceledError.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.isCancelError = exports.CanceledError = void 0;\nconst StorageError_1 = require(\"./StorageError\");\n/**\n * Internal-only class for CanceledError thrown by XHR handler or multipart upload when cancellation is invoked\n * without overwriting behavior.\n *\n * @internal\n */\nclass CanceledError extends StorageError_1.StorageError {\n constructor(params = {}) {\n super({\n name: 'CanceledError',\n message: 'Upload is canceled by user',\n ...params,\n });\n // TODO: Delete the following 2 lines after we change the build target to >= es2015\n this.constructor = CanceledError;\n Object.setPrototypeOf(this, CanceledError.prototype);\n }\n}\nexports.CanceledError = CanceledError;\n/**\n * Check if an error is caused by user calling `cancel()` on a upload/download task. If an overwriting error is\n * supplied to `task.cancel(errorOverwrite)`, this function will return `false`.\n * @param {unknown} error The unknown exception to be checked.\n * @returns - A boolean indicating if the error was from an upload cancellation\n */\nconst isCancelError = (error) => !!error && error instanceof CanceledError;\nexports.isCancelError = isCancelError;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,aAAa,GAAG,KAAK,CAAC,CAAC;AACvD,MAAM,cAAc,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;AACjD;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,aAAa,SAAS,cAAc,CAAC,YAAY,CAAC;AACxD,IAAI,WAAW,CAAC,MAAM,GAAG,EAAE,EAAE;AAC7B,QAAQ,KAAK,CAAC;AACd,YAAY,IAAI,EAAE,eAAe;AACjC,YAAY,OAAO,EAAE,4BAA4B;AACjD,YAAY,GAAG,MAAM;AACrB,SAAS,CAAC,CAAC;AACX;AACA,QAAQ,IAAI,CAAC,WAAW,GAAG,aAAa,CAAC;AACzC,QAAQ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;AAC7D,KAAK;AACL,CAAC;AACD,OAAO,CAAC,aAAa,GAAG,aAAa,CAAC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,aAAa,GAAG,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK,IAAI,KAAK,YAAY,aAAa,CAAC;AAC3E,OAAO,CAAC,aAAa,GAAG,aAAa;;"}
1
+ {"version":3,"file":"CanceledError.js","sources":["../../../src/errors/CanceledError.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.isCancelError = exports.CanceledError = void 0;\nconst StorageError_1 = require(\"./StorageError\");\n/**\n * Internal-only class for CanceledError thrown by XHR handler or multipart upload when cancellation is invoked\n * without overwriting behavior.\n *\n * @internal\n */\nclass CanceledError extends StorageError_1.StorageError {\n constructor(params = {}) {\n super({\n name: 'CanceledError',\n message: 'Upload is canceled by user',\n ...params,\n });\n // TODO: Delete the following 2 lines after we change the build target to >= es2015\n this.constructor = CanceledError;\n Object.setPrototypeOf(this, CanceledError.prototype);\n }\n}\nexports.CanceledError = CanceledError;\n/**\n * Check if an error is caused by user calling `cancel()` on a upload/download task. If an overwriting error is\n * supplied to `task.cancel(errorOverwrite)`, this function will return `false`.\n */\nconst isCancelError = (error) => !!error && error instanceof CanceledError;\nexports.isCancelError = isCancelError;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,aAAa,GAAG,KAAK,CAAC,CAAC;AACvD,MAAM,cAAc,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;AACjD;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,aAAa,SAAS,cAAc,CAAC,YAAY,CAAC;AACxD,IAAI,WAAW,CAAC,MAAM,GAAG,EAAE,EAAE;AAC7B,QAAQ,KAAK,CAAC;AACd,YAAY,IAAI,EAAE,eAAe;AACjC,YAAY,OAAO,EAAE,4BAA4B;AACjD,YAAY,GAAG,MAAM;AACrB,SAAS,CAAC,CAAC;AACX;AACA,QAAQ,IAAI,CAAC,WAAW,GAAG,aAAa,CAAC;AACzC,QAAQ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;AAC7D,KAAK;AACL,CAAC;AACD,OAAO,CAAC,aAAa,GAAG,aAAa,CAAC;AACtC;AACA;AACA;AACA;AACA,MAAM,aAAa,GAAG,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK,IAAI,KAAK,YAAY,aAAa,CAAC;AAC3E,OAAO,CAAC,aAAa,GAAG,aAAa;;"}
@@ -12,7 +12,5 @@ export declare class CanceledError extends StorageError {
12
12
  /**
13
13
  * Check if an error is caused by user calling `cancel()` on a upload/download task. If an overwriting error is
14
14
  * supplied to `task.cancel(errorOverwrite)`, this function will return `false`.
15
- * @param {unknown} error The unknown exception to be checked.
16
- * @returns - A boolean indicating if the error was from an upload cancellation
17
15
  */
18
16
  export declare const isCancelError: (error: unknown) => error is CanceledError;
@@ -23,8 +23,6 @@ class CanceledError extends StorageError {
23
23
  /**
24
24
  * Check if an error is caused by user calling `cancel()` on a upload/download task. If an overwriting error is
25
25
  * supplied to `task.cancel(errorOverwrite)`, this function will return `false`.
26
- * @param {unknown} error The unknown exception to be checked.
27
- * @returns - A boolean indicating if the error was from an upload cancellation
28
26
  */
29
27
  const isCancelError = (error) => !!error && error instanceof CanceledError;
30
28
 
@@ -1 +1 @@
1
- {"version":3,"file":"CanceledError.mjs","sources":["../../../src/errors/CanceledError.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { StorageError } from './StorageError';\n/**\n * Internal-only class for CanceledError thrown by XHR handler or multipart upload when cancellation is invoked\n * without overwriting behavior.\n *\n * @internal\n */\nexport class CanceledError extends StorageError {\n constructor(params = {}) {\n super({\n name: 'CanceledError',\n message: 'Upload is canceled by user',\n ...params,\n });\n // TODO: Delete the following 2 lines after we change the build target to >= es2015\n this.constructor = CanceledError;\n Object.setPrototypeOf(this, CanceledError.prototype);\n }\n}\n/**\n * Check if an error is caused by user calling `cancel()` on a upload/download task. If an overwriting error is\n * supplied to `task.cancel(errorOverwrite)`, this function will return `false`.\n * @param {unknown} error The unknown exception to be checked.\n * @returns - A boolean indicating if the error was from an upload cancellation\n */\nexport const isCancelError = (error) => !!error && error instanceof CanceledError;\n"],"names":[],"mappings":";;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,aAAa,SAAS,YAAY,CAAC;AAChD,IAAI,WAAW,CAAC,MAAM,GAAG,EAAE,EAAE;AAC7B,QAAQ,KAAK,CAAC;AACd,YAAY,IAAI,EAAE,eAAe;AACjC,YAAY,OAAO,EAAE,4BAA4B;AACjD,YAAY,GAAG,MAAM;AACrB,SAAS,CAAC,CAAC;AACX;AACA,QAAQ,IAAI,CAAC,WAAW,GAAG,aAAa,CAAC;AACzC,QAAQ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;AAC7D,KAAK;AACL,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,aAAa,GAAG,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK,IAAI,KAAK,YAAY;;;;"}
1
+ {"version":3,"file":"CanceledError.mjs","sources":["../../../src/errors/CanceledError.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { StorageError } from './StorageError';\n/**\n * Internal-only class for CanceledError thrown by XHR handler or multipart upload when cancellation is invoked\n * without overwriting behavior.\n *\n * @internal\n */\nexport class CanceledError extends StorageError {\n constructor(params = {}) {\n super({\n name: 'CanceledError',\n message: 'Upload is canceled by user',\n ...params,\n });\n // TODO: Delete the following 2 lines after we change the build target to >= es2015\n this.constructor = CanceledError;\n Object.setPrototypeOf(this, CanceledError.prototype);\n }\n}\n/**\n * Check if an error is caused by user calling `cancel()` on a upload/download task. If an overwriting error is\n * supplied to `task.cancel(errorOverwrite)`, this function will return `false`.\n */\nexport const isCancelError = (error) => !!error && error instanceof CanceledError;\n"],"names":[],"mappings":";;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,aAAa,SAAS,YAAY,CAAC;AAChD,IAAI,WAAW,CAAC,MAAM,GAAG,EAAE,EAAE;AAC7B,QAAQ,KAAK,CAAC;AACd,YAAY,IAAI,EAAE,eAAe;AACjC,YAAY,OAAO,EAAE,4BAA4B;AACjD,YAAY,GAAG,MAAM;AACrB,SAAS,CAAC,CAAC;AACX;AACA,QAAQ,IAAI,CAAC,WAAW,GAAG,aAAa,CAAC;AACzC,QAAQ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;AAC7D,KAAK;AACL,CAAC;AACD;AACA;AACA;AACA;AACY,MAAC,aAAa,GAAG,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK,IAAI,KAAK,YAAY;;;;"}
package/package.json CHANGED
@@ -1,109 +1,109 @@
1
1
  {
2
- "name": "@aws-amplify/storage",
3
- "version": "6.6.2-unstable.7c1ed91.0+7c1ed91",
4
- "description": "Storage category of aws-amplify",
5
- "main": "./dist/cjs/index.js",
6
- "module": "./dist/esm/index.mjs",
7
- "react-native": {
8
- "./dist/cjs/index": "./src/index.ts",
9
- "fast-xml-parser": "fast-xml-parser",
10
- "buffer": "buffer"
11
- },
12
- "typings": "./dist/esm/index.d.ts",
13
- "browser": {
14
- "./dist/esm/providers/s3/utils/client/runtime/base64/index.native.mjs": "./dist/esm/providers/s3/utils/client/runtime/base64/index.browser.mjs",
15
- "./dist/esm/providers/s3/utils/client/runtime/s3TransferHandler/fetch.mjs": "./dist/esm/providers/s3/utils/client/runtime/s3TransferHandler/xhr.mjs",
16
- "./dist/esm/providers/s3/utils/client/runtime/xmlParser/pureJs.mjs": "./dist/esm/providers/s3/utils/client/runtime/xmlParser/dom.mjs",
17
- "fast-xml-parser": false,
18
- "buffer": false
19
- },
20
- "sideEffects": false,
21
- "publishConfig": {
22
- "access": "public"
23
- },
24
- "scripts": {
25
- "test": "npm run lint && jest -w 1 --coverage --logHeapUsage",
26
- "build-with-test": "npm test && npm run build",
27
- "build:umd": "webpack && webpack --config ./webpack.config.dev.js",
28
- "build:esm-cjs": "rollup --forceExit -c rollup.config.mjs",
29
- "build:watch": "npm run build:esm-cjs -- --watch",
30
- "build": "npm run clean && npm run build:esm-cjs && npm run build:umd",
31
- "clean": "npm run clean:size && rimraf lib-esm lib dist",
32
- "clean:size": "rimraf dual-publish-tmp tmp*",
33
- "format": "echo \"Not implemented\"",
34
- "lint": "eslint '**/*.{ts,tsx}' && npm run ts-coverage",
35
- "lint:fix": "eslint '**/*.{ts,tsx}' --fix",
36
- "ts-coverage": "typescript-coverage-report -p ./tsconfig.build.json -t 90.31"
37
- },
38
- "typesVersions": {
39
- ">=4.2": {
40
- "s3": [
41
- "./dist/esm/providers/s3/index.d.ts"
42
- ],
43
- "server": [
44
- "./dist/esm/server.d.ts"
45
- ],
46
- "s3/server": [
47
- "./dist/esm/providers/s3/server.d.ts"
48
- ]
49
- }
50
- },
51
- "repository": {
52
- "type": "git",
53
- "url": "https://github.com/aws-amplify/amplify-js.git"
54
- },
55
- "author": "Amazon Web Services",
56
- "license": "Apache-2.0",
57
- "bugs": {
58
- "url": "https://github.com/aws/aws-amplify/issues"
59
- },
60
- "homepage": "https://aws-amplify.github.io/",
61
- "files": [
62
- "dist/cjs",
63
- "dist/esm",
64
- "src",
65
- "server",
66
- "s3"
67
- ],
68
- "dependencies": {
69
- "@aws-sdk/types": "3.398.0",
70
- "@smithy/md5-js": "2.0.7",
71
- "buffer": "4.9.2",
72
- "fast-xml-parser": "^4.4.1",
73
- "tslib": "^2.5.0"
74
- },
75
- "exports": {
76
- ".": {
77
- "types": "./dist/esm/index.d.ts",
78
- "import": "./dist/esm/index.mjs",
79
- "require": "./dist/cjs/index.js",
80
- "react-native": "./src/index.ts"
81
- },
82
- "./server": {
83
- "types": "./dist/esm/server.d.ts",
84
- "import": "./dist/esm/server.mjs",
85
- "require": "./dist/cjs/server.js"
86
- },
87
- "./s3": {
88
- "types": "./dist/esm/providers/s3/index.d.ts",
89
- "import": "./dist/esm/providers/s3/index.mjs",
90
- "require": "./dist/cjs/providers/s3/index.js",
91
- "react-native": "./src/providers/s3/index.ts"
92
- },
93
- "./s3/server": {
94
- "types": "./dist/esm/providers/s3/server.d.ts",
95
- "import": "./dist/esm/providers/s3/server.mjs",
96
- "require": "./dist/cjs/providers/s3/server.js"
97
- },
98
- "./package.json": "./package.json"
99
- },
100
- "peerDependencies": {
101
- "@aws-amplify/core": "6.3.11-unstable.7c1ed91.0+7c1ed91"
102
- },
103
- "devDependencies": {
104
- "@aws-amplify/core": "6.3.11-unstable.7c1ed91.0+7c1ed91",
105
- "@aws-amplify/react-native": "1.1.5-unstable.7c1ed91.0+7c1ed91",
106
- "typescript": "5.0.2"
107
- },
108
- "gitHead": "7c1ed915fbaced22e01f57016226ac2602c1319e"
2
+ "name": "@aws-amplify/storage",
3
+ "version": "6.6.2",
4
+ "description": "Storage category of aws-amplify",
5
+ "main": "./dist/cjs/index.js",
6
+ "module": "./dist/esm/index.mjs",
7
+ "react-native": {
8
+ "./dist/cjs/index": "./src/index.ts",
9
+ "fast-xml-parser": "fast-xml-parser",
10
+ "buffer": "buffer"
11
+ },
12
+ "typings": "./dist/esm/index.d.ts",
13
+ "browser": {
14
+ "./dist/esm/providers/s3/utils/client/runtime/base64/index.native.mjs": "./dist/esm/providers/s3/utils/client/runtime/base64/index.browser.mjs",
15
+ "./dist/esm/providers/s3/utils/client/runtime/s3TransferHandler/fetch.mjs": "./dist/esm/providers/s3/utils/client/runtime/s3TransferHandler/xhr.mjs",
16
+ "./dist/esm/providers/s3/utils/client/runtime/xmlParser/pureJs.mjs": "./dist/esm/providers/s3/utils/client/runtime/xmlParser/dom.mjs",
17
+ "fast-xml-parser": false,
18
+ "buffer": false
19
+ },
20
+ "sideEffects": false,
21
+ "publishConfig": {
22
+ "access": "public"
23
+ },
24
+ "scripts": {
25
+ "test": "npm run lint && jest -w 1 --coverage --logHeapUsage",
26
+ "build-with-test": "npm test && npm run build",
27
+ "build:umd": "webpack && webpack --config ./webpack.config.dev.js",
28
+ "build:esm-cjs": "rollup --forceExit -c rollup.config.mjs",
29
+ "build:watch": "npm run build:esm-cjs -- --watch",
30
+ "build": "npm run clean && npm run build:esm-cjs && npm run build:umd",
31
+ "clean": "npm run clean:size && rimraf lib-esm lib dist",
32
+ "clean:size": "rimraf dual-publish-tmp tmp*",
33
+ "format": "echo \"Not implemented\"",
34
+ "lint": "eslint '**/*.{ts,tsx}' && npm run ts-coverage",
35
+ "lint:fix": "eslint '**/*.{ts,tsx}' --fix",
36
+ "ts-coverage": "typescript-coverage-report -p ./tsconfig.build.json -t 90.31"
37
+ },
38
+ "typesVersions": {
39
+ ">=4.2": {
40
+ "s3": [
41
+ "./dist/esm/providers/s3/index.d.ts"
42
+ ],
43
+ "server": [
44
+ "./dist/esm/server.d.ts"
45
+ ],
46
+ "s3/server": [
47
+ "./dist/esm/providers/s3/server.d.ts"
48
+ ]
49
+ }
50
+ },
51
+ "repository": {
52
+ "type": "git",
53
+ "url": "https://github.com/aws-amplify/amplify-js.git"
54
+ },
55
+ "author": "Amazon Web Services",
56
+ "license": "Apache-2.0",
57
+ "bugs": {
58
+ "url": "https://github.com/aws/aws-amplify/issues"
59
+ },
60
+ "homepage": "https://aws-amplify.github.io/",
61
+ "files": [
62
+ "dist/cjs",
63
+ "dist/esm",
64
+ "src",
65
+ "server",
66
+ "s3"
67
+ ],
68
+ "dependencies": {
69
+ "@aws-sdk/types": "3.398.0",
70
+ "@smithy/md5-js": "2.0.7",
71
+ "buffer": "4.9.2",
72
+ "fast-xml-parser": "^4.4.1",
73
+ "tslib": "^2.5.0"
74
+ },
75
+ "exports": {
76
+ ".": {
77
+ "types": "./dist/esm/index.d.ts",
78
+ "import": "./dist/esm/index.mjs",
79
+ "require": "./dist/cjs/index.js",
80
+ "react-native": "./src/index.ts"
81
+ },
82
+ "./server": {
83
+ "types": "./dist/esm/server.d.ts",
84
+ "import": "./dist/esm/server.mjs",
85
+ "require": "./dist/cjs/server.js"
86
+ },
87
+ "./s3": {
88
+ "types": "./dist/esm/providers/s3/index.d.ts",
89
+ "import": "./dist/esm/providers/s3/index.mjs",
90
+ "require": "./dist/cjs/providers/s3/index.js",
91
+ "react-native": "./src/providers/s3/index.ts"
92
+ },
93
+ "./s3/server": {
94
+ "types": "./dist/esm/providers/s3/server.d.ts",
95
+ "import": "./dist/esm/providers/s3/server.mjs",
96
+ "require": "./dist/cjs/providers/s3/server.js"
97
+ },
98
+ "./package.json": "./package.json"
99
+ },
100
+ "peerDependencies": {
101
+ "@aws-amplify/core": "^6.1.0"
102
+ },
103
+ "devDependencies": {
104
+ "@aws-amplify/core": "6.3.11",
105
+ "@aws-amplify/react-native": "1.1.4",
106
+ "typescript": "5.0.2"
107
+ },
108
+ "gitHead": "733c3bd722f06b87f674736cc3f997d6ba5addda"
109
109
  }
@@ -28,8 +28,6 @@ export class CanceledError extends StorageError {
28
28
  /**
29
29
  * Check if an error is caused by user calling `cancel()` on a upload/download task. If an overwriting error is
30
30
  * supplied to `task.cancel(errorOverwrite)`, this function will return `false`.
31
- * @param {unknown} error The unknown exception to be checked.
32
- * @returns - A boolean indicating if the error was from an upload cancellation
33
31
  */
34
32
  export const isCancelError = (error: unknown): error is CanceledError =>
35
33
  !!error && error instanceof CanceledError;