aws-amplify 6.10.3-unstable.d1dfa38.0 → 6.10.4-unstable.31c001d.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.
@@ -17,7 +17,7 @@ const ONE_YEAR_IN_MS = 365 * 24 * 60 * 60 * 1000;
17
17
  * @param cookieStorageAdapter An implementation of the `Adapter` in {@link CookieStorage}.
18
18
  * @returns An object that implements {@link KeyValueStorageInterface}.
19
19
  */
20
- const createKeyValueStorageFromCookieStorageAdapter = (cookieStorageAdapter, validatorMap) => {
20
+ const createKeyValueStorageFromCookieStorageAdapter = (cookieStorageAdapter, validator) => {
21
21
  return {
22
22
  setItem(key, value) {
23
23
  // Delete the cookie item first then set it. This results:
@@ -34,8 +34,8 @@ const createKeyValueStorageFromCookieStorageAdapter = (cookieStorageAdapter, val
34
34
  async getItem(key) {
35
35
  const cookie = cookieStorageAdapter.get(key);
36
36
  const value = cookie?.value ?? null;
37
- if (value && validatorMap?.getItem) {
38
- const isValid = await validatorMap.getItem(key, value);
37
+ if (value && validator?.getItem) {
38
+ const isValid = await validator.getItem(key, value);
39
39
  if (!isValid)
40
40
  return null;
41
41
  }
@@ -1 +1 @@
1
- {"version":3,"file":"createKeyValueStorageFromCookieStorageAdapter.js","sources":["../../../../src/adapter-core/storageFactories/createKeyValueStorageFromCookieStorageAdapter.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.createKeyValueStorageFromCookieStorageAdapter = exports.defaultSetCookieOptions = void 0;\nexports.defaultSetCookieOptions = {\n // TODO: allow configure with a public interface\n sameSite: 'lax',\n secure: true,\n path: '/',\n};\nconst ONE_YEAR_IN_MS = 365 * 24 * 60 * 60 * 1000;\n/**\n * Creates a Key Value storage interface using the `cookieStorageAdapter` as the\n * underlying storage.\n * @param cookieStorageAdapter An implementation of the `Adapter` in {@link CookieStorage}.\n * @returns An object that implements {@link KeyValueStorageInterface}.\n */\nconst createKeyValueStorageFromCookieStorageAdapter = (cookieStorageAdapter, validatorMap) => {\n return {\n setItem(key, value) {\n // Delete the cookie item first then set it. This results:\n // SetCookie: key=;expires=1970-01-01;(path='current-path') <- remove path'ed cookies\n // SetCookie: key=value;expires=Date.now() + 365 days;path=/;secure=true\n cookieStorageAdapter.delete(key);\n // TODO(HuiSF): follow up the default CookieSerializeOptions values\n cookieStorageAdapter.set(key, value, {\n ...exports.defaultSetCookieOptions,\n expires: new Date(Date.now() + ONE_YEAR_IN_MS),\n });\n return Promise.resolve();\n },\n async getItem(key) {\n const cookie = cookieStorageAdapter.get(key);\n const value = cookie?.value ?? null;\n if (value && validatorMap?.getItem) {\n const isValid = await validatorMap.getItem(key, value);\n if (!isValid)\n return null;\n }\n return value;\n },\n removeItem(key) {\n cookieStorageAdapter.delete(key);\n return Promise.resolve();\n },\n clear() {\n // TODO(HuiSF): follow up the implementation.\n throw new Error('This method has not implemented.');\n },\n };\n};\nexports.createKeyValueStorageFromCookieStorageAdapter = createKeyValueStorageFromCookieStorageAdapter;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,6CAA6C,GAAG,OAAO,CAAC,uBAAuB,GAAG,KAAK,CAAC,CAAC;AACjG,OAAO,CAAC,uBAAuB,GAAG;AAClC;AACA,IAAI,QAAQ,EAAE,KAAK;AACnB,IAAI,MAAM,EAAE,IAAI;AAChB,IAAI,IAAI,EAAE,GAAG;AACb,CAAC,CAAC;AACF,MAAM,cAAc,GAAG,GAAG,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AACjD;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,6CAA6C,GAAG,CAAC,oBAAoB,EAAE,YAAY,KAAK;AAC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ageAdapter.js","sources":["../../../../src/adapter-core/storageFactories/createKeyValueStorageFromCookieStorageAdapter.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.createKeyValueStorageFromCookieStorageAdapter = exports.defaultSetCookieOptions = void 0;\nexports.defaultSetCookieOptions = {\n // TODO: allow configure with a public interface\n sameSite: 'lax',\n secure: true,\n path: '/',\n};\nconst ONE_YEAR_IN_MS = 365 * 24 * 60 * 60 * 1000;\n/**\n * Creates a Key Value storage interface using the `cookieStorageAdapter` as the\n * underlying storage.\n * @param cookieStorageAdapter An implementation of the `Adapter` in {@link CookieStorage}.\n * @returns An object that implements {@link KeyValueStorageInterface}.\n */\nconst createKeyValueStorageFromCookieStorageAdapter = (cookieStorageAdapter, validator) => {\n return {\n setItem(key, value) {\n // Delete the cookie item first then set it. This results:\n // SetCookie: key=;expires=1970-01-01;(path='current-path') <- remove path'ed cookies\n // SetCookie: key=value;expires=Date.now() + 365 days;path=/;secure=true\n cookieStorageAdapter.delete(key);\n // TODO(HuiSF): follow up the default CookieSerializeOptions values\n cookieStorageAdapter.set(key, value, {\n ...exports.defaultSetCookieOptions,\n expires: new Date(Date.now() + ONE_YEAR_IN_MS),\n });\n return Promise.resolve();\n },\n async getItem(key) {\n const cookie = cookieStorageAdapter.get(key);\n const value = cookie?.value ?? null;\n if (value && validator?.getItem) {\n const isValid = await validator.getItem(key, value);\n if (!isValid)\n return null;\n }\n return value;\n },\n removeItem(key) {\n cookieStorageAdapter.delete(key);\n return Promise.resolve();\n },\n clear() {\n // TODO(HuiSF): follow up the implementation.\n throw new Error('This method has not implemented.');\n },\n };\n};\nexports.createKeyValueStorageFromCookieStorageAdapter = createKeyValueStorageFromCookieStorageAdapter;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE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OAAO,IAAI,CAAC;AAChC,aAAa;AACb,YAAY,OAAO,KAAK,CAAC;AACzB,SAAS;AACT,QAAQ,UAAU,CAAC,GAAG,EAAE;AACxB,YAAY,oBAAoB,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AAC7C,YAAY,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;AACrC,SAAS;AACT,QAAQ,KAAK,GAAG;AAChB;AACA,YAAY,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;AAChE,SAAS;AACT,KAAK,CAAC;AACN,CAAC,CAAC;AACF,OAAO,CAAC,6CAA6C,GAAG,6CAA6C;;"}
@@ -7,4 +7,4 @@ export declare const defaultSetCookieOptions: CookieStorage.SetCookieOptions;
7
7
  * @param cookieStorageAdapter An implementation of the `Adapter` in {@link CookieStorage}.
8
8
  * @returns An object that implements {@link KeyValueStorageInterface}.
9
9
  */
10
- export declare const createKeyValueStorageFromCookieStorageAdapter: (cookieStorageAdapter: CookieStorage.Adapter, validatorMap?: KeyValueStorageMethodValidator) => KeyValueStorageInterface;
10
+ export declare const createKeyValueStorageFromCookieStorageAdapter: (cookieStorageAdapter: CookieStorage.Adapter, validator?: KeyValueStorageMethodValidator) => KeyValueStorageInterface;
@@ -13,7 +13,7 @@ const ONE_YEAR_IN_MS = 365 * 24 * 60 * 60 * 1000;
13
13
  * @param cookieStorageAdapter An implementation of the `Adapter` in {@link CookieStorage}.
14
14
  * @returns An object that implements {@link KeyValueStorageInterface}.
15
15
  */
16
- const createKeyValueStorageFromCookieStorageAdapter = (cookieStorageAdapter, validatorMap) => {
16
+ const createKeyValueStorageFromCookieStorageAdapter = (cookieStorageAdapter, validator) => {
17
17
  return {
18
18
  setItem(key, value) {
19
19
  // Delete the cookie item first then set it. This results:
@@ -30,8 +30,8 @@ const createKeyValueStorageFromCookieStorageAdapter = (cookieStorageAdapter, val
30
30
  async getItem(key) {
31
31
  const cookie = cookieStorageAdapter.get(key);
32
32
  const value = cookie?.value ?? null;
33
- if (value && validatorMap?.getItem) {
34
- const isValid = await validatorMap.getItem(key, value);
33
+ if (value && validator?.getItem) {
34
+ const isValid = await validator.getItem(key, value);
35
35
  if (!isValid)
36
36
  return null;
37
37
  }
@@ -1 +1 @@
1
- {"version":3,"file":"createKeyValueStorageFromCookieStorageAdapter.mjs","sources":["../../../../src/adapter-core/storageFactories/createKeyValueStorageFromCookieStorageAdapter.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport const defaultSetCookieOptions = {\n // TODO: allow configure with a public interface\n sameSite: 'lax',\n secure: true,\n path: '/',\n};\nconst ONE_YEAR_IN_MS = 365 * 24 * 60 * 60 * 1000;\n/**\n * Creates a Key Value storage interface using the `cookieStorageAdapter` as the\n * underlying storage.\n * @param cookieStorageAdapter An implementation of the `Adapter` in {@link CookieStorage}.\n * @returns An object that implements {@link KeyValueStorageInterface}.\n */\nexport const createKeyValueStorageFromCookieStorageAdapter = (cookieStorageAdapter, validatorMap) => {\n return {\n setItem(key, value) {\n // Delete the cookie item first then set it. This results:\n // SetCookie: key=;expires=1970-01-01;(path='current-path') <- remove path'ed cookies\n // SetCookie: key=value;expires=Date.now() + 365 days;path=/;secure=true\n cookieStorageAdapter.delete(key);\n // TODO(HuiSF): follow up the default CookieSerializeOptions values\n cookieStorageAdapter.set(key, value, {\n ...defaultSetCookieOptions,\n expires: new Date(Date.now() + ONE_YEAR_IN_MS),\n });\n return Promise.resolve();\n },\n async getItem(key) {\n const cookie = cookieStorageAdapter.get(key);\n const value = cookie?.value ?? null;\n if (value && validatorMap?.getItem) {\n const isValid = await validatorMap.getItem(key, value);\n if (!isValid)\n return null;\n }\n return value;\n },\n removeItem(key) {\n cookieStorageAdapter.delete(key);\n return Promise.resolve();\n },\n clear() {\n // TODO(HuiSF): follow up the implementation.\n throw new Error('This method has not implemented.');\n },\n };\n};\n"],"names":[],"mappings":"AAAA;AACA;AACY,MAAC,uBAAuB,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C;AAC7C,YAAY,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;AACrC,SAAS;AACT,QAAQ,KAAK,GAAG;AAChB;AACA,YAAY,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;AAChE,SAAS;AACT,KAAK,CAAC;AACN;;;;"}
1
+ {"version":3,"file":"createKeyValueStorageFromCookieStorageAdapter.mjs","sources":["../../../../src/adapter-core/storageFactories/createKeyValueStorageFromCookieStorageAdapter.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport const defaultSetCookieOptions = {\n // TODO: allow configure with a public interface\n sameSite: 'lax',\n secure: true,\n path: '/',\n};\nconst ONE_YEAR_IN_MS = 365 * 24 * 60 * 60 * 1000;\n/**\n * Creates a Key Value storage interface using the `cookieStorageAdapter` as the\n * underlying storage.\n * @param cookieStorageAdapter An implementation of the `Adapter` in {@link CookieStorage}.\n * @returns An object that implements {@link KeyValueStorageInterface}.\n */\nexport const createKeyValueStorageFromCookieStorageAdapter = (cookieStorageAdapter, validator) => {\n return {\n setItem(key, value) {\n // Delete the cookie item first then set it. This results:\n // SetCookie: key=;expires=1970-01-01;(path='current-path') <- remove path'ed cookies\n // SetCookie: key=value;expires=Date.now() + 365 days;path=/;secure=true\n cookieStorageAdapter.delete(key);\n // TODO(HuiSF): follow up the default CookieSerializeOptions values\n cookieStorageAdapter.set(key, value, {\n ...defaultSetCookieOptions,\n expires: new Date(Date.now() + ONE_YEAR_IN_MS),\n });\n return Promise.resolve();\n },\n async getItem(key) {\n const cookie = cookieStorageAdapter.get(key);\n const value = cookie?.value ?? null;\n if (value && validator?.getItem) {\n const isValid = await validator.getItem(key, value);\n if (!isValid)\n return null;\n }\n return value;\n },\n removeItem(key) {\n cookieStorageAdapter.delete(key);\n return Promise.resolve();\n },\n clear() {\n // TODO(HuiSF): follow up the implementation.\n throw new Error('This method has not implemented.');\n },\n };\n};\n"],"names":[],"mappings":"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AC,MAAM,CAAC,GAAG,CAAC,CAAC;AAC7C,YAAY,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;AACrC,SAAS;AACT,QAAQ,KAAK,GAAG;AAChB;AACA,YAAY,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;AAChE,SAAS;AACT,KAAK,CAAC;AACN;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aws-amplify",
3
- "version": "6.10.3-unstable.d1dfa38.0+d1dfa38",
3
+ "version": "6.10.4-unstable.31c001d.0+31c001d",
4
4
  "description": "AWS Amplify is a JavaScript library for Frontend and mobile developers building cloud-enabled applications.",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.mjs",
@@ -276,13 +276,13 @@
276
276
  "utils"
277
277
  ],
278
278
  "dependencies": {
279
- "@aws-amplify/analytics": "7.0.63-unstable.d1dfa38.0+d1dfa38",
280
- "@aws-amplify/api": "6.1.8-unstable.d1dfa38.0+d1dfa38",
281
- "@aws-amplify/auth": "6.8.3-unstable.d1dfa38.0+d1dfa38",
282
- "@aws-amplify/core": "6.7.3-unstable.d1dfa38.0+d1dfa38",
283
- "@aws-amplify/datastore": "5.0.65-unstable.d1dfa38.0+d1dfa38",
284
- "@aws-amplify/notifications": "2.0.63-unstable.d1dfa38.0+d1dfa38",
285
- "@aws-amplify/storage": "6.7.4-unstable.d1dfa38.0+d1dfa38",
279
+ "@aws-amplify/analytics": "7.0.64-unstable.31c001d.0+31c001d",
280
+ "@aws-amplify/api": "6.1.9-unstable.31c001d.0+31c001d",
281
+ "@aws-amplify/auth": "6.8.4-unstable.31c001d.0+31c001d",
282
+ "@aws-amplify/core": "6.7.4-unstable.31c001d.0+31c001d",
283
+ "@aws-amplify/datastore": "5.0.66-unstable.31c001d.0+31c001d",
284
+ "@aws-amplify/notifications": "2.0.64-unstable.31c001d.0+31c001d",
285
+ "@aws-amplify/storage": "6.7.5-unstable.31c001d.0+31c001d",
286
286
  "tslib": "^2.5.0"
287
287
  },
288
288
  "devDependencies": {
@@ -518,5 +518,5 @@
518
518
  "limit": "22.81 kB"
519
519
  }
520
520
  ],
521
- "gitHead": "d1dfa384e9667f7d6c8b2674b0cf1d6973345880"
521
+ "gitHead": "31c001d03d02668446e83ca7331fb0c6261459d9"
522
522
  }
@@ -23,7 +23,7 @@ const ONE_YEAR_IN_MS = 365 * 24 * 60 * 60 * 1000;
23
23
  */
24
24
  export const createKeyValueStorageFromCookieStorageAdapter = (
25
25
  cookieStorageAdapter: CookieStorage.Adapter,
26
- validatorMap?: KeyValueStorageMethodValidator,
26
+ validator?: KeyValueStorageMethodValidator,
27
27
  ): KeyValueStorageInterface => {
28
28
  return {
29
29
  setItem(key, value) {
@@ -44,8 +44,8 @@ export const createKeyValueStorageFromCookieStorageAdapter = (
44
44
  const cookie = cookieStorageAdapter.get(key);
45
45
  const value = cookie?.value ?? null;
46
46
 
47
- if (value && validatorMap?.getItem) {
48
- const isValid = await validatorMap.getItem(key, value);
47
+ if (value && validator?.getItem) {
48
+ const isValid = await validator.getItem(key, value);
49
49
  if (!isValid) return null;
50
50
  }
51
51