From d36680b866f2fa174ad490acfa328349f8bbca29 Mon Sep 17 00:00:00 2001 From: Hui Zhao Date: Tue, 19 Mar 2024 10:20:36 -0700 Subject: [PATCH] chore(aws-amplify): rename adapterCore to adapter-core --- .../createAWSCredentialsAndIdentityIdProvider.test.ts | 2 +- .../cognito/createUserPoolsTokenProvider.test.ts | 2 +- .../adapterCore/runWithAmplifyServerContext.test.ts | 2 +- .../createKeyValueStorageFromCookieStorageAdapter.test.ts | 4 ++-- packages/aws-amplify/adapter-core/package.json | 6 +++--- packages/aws-amplify/package.json | 8 ++++---- .../cognito/createAWSCredentialsAndIdentityIdProvider.ts | 0 .../cognito/createUserPoolsTokenProvider.ts | 0 .../authProvidersFactories/cognito/index.ts | 0 .../src/{adapterCore => adapter-core}/index.ts | 0 .../runWithAmplifyServerContext.ts | 0 .../createKeyValueStorageFromCookieStorageAdapter.ts | 0 .../storageFactories/index.ts | 0 packages/aws-amplify/typedoc.json | 6 ++++-- 14 files changed, 16 insertions(+), 14 deletions(-) rename packages/aws-amplify/src/{adapterCore => adapter-core}/authProvidersFactories/cognito/createAWSCredentialsAndIdentityIdProvider.ts (100%) rename packages/aws-amplify/src/{adapterCore => adapter-core}/authProvidersFactories/cognito/createUserPoolsTokenProvider.ts (100%) rename packages/aws-amplify/src/{adapterCore => adapter-core}/authProvidersFactories/cognito/index.ts (100%) rename packages/aws-amplify/src/{adapterCore => adapter-core}/index.ts (100%) rename packages/aws-amplify/src/{adapterCore => adapter-core}/runWithAmplifyServerContext.ts (100%) rename packages/aws-amplify/src/{adapterCore => adapter-core}/storageFactories/createKeyValueStorageFromCookieStorageAdapter.ts (100%) rename packages/aws-amplify/src/{adapterCore => adapter-core}/storageFactories/index.ts (100%) diff --git a/packages/aws-amplify/__tests__/adapterCore/authProvidersFactories/cognito/createAWSCredentialsAndIdentityIdProvider.test.ts b/packages/aws-amplify/__tests__/adapterCore/authProvidersFactories/cognito/createAWSCredentialsAndIdentityIdProvider.test.ts index d93ffe35aab..92f291e5bd4 100644 --- a/packages/aws-amplify/__tests__/adapterCore/authProvidersFactories/cognito/createAWSCredentialsAndIdentityIdProvider.test.ts +++ b/packages/aws-amplify/__tests__/adapterCore/authProvidersFactories/cognito/createAWSCredentialsAndIdentityIdProvider.test.ts @@ -10,7 +10,7 @@ import { AuthConfig, KeyValueStorageInterface, } from '@aws-amplify/core'; -import { createAWSCredentialsAndIdentityIdProvider } from '../../../../src/adapterCore'; +import { createAWSCredentialsAndIdentityIdProvider } from '../../../../src/adapter-core'; jest.mock('@aws-amplify/auth/cognito'); diff --git a/packages/aws-amplify/__tests__/adapterCore/authProvidersFactories/cognito/createUserPoolsTokenProvider.test.ts b/packages/aws-amplify/__tests__/adapterCore/authProvidersFactories/cognito/createUserPoolsTokenProvider.test.ts index 084ed6d68bd..2fec2bc5f06 100644 --- a/packages/aws-amplify/__tests__/adapterCore/authProvidersFactories/cognito/createUserPoolsTokenProvider.test.ts +++ b/packages/aws-amplify/__tests__/adapterCore/authProvidersFactories/cognito/createUserPoolsTokenProvider.test.ts @@ -8,7 +8,7 @@ import { } from '@aws-amplify/auth/cognito'; import { AuthConfig, KeyValueStorageInterface } from '@aws-amplify/core'; -import { createUserPoolsTokenProvider } from '../../../../src/adapterCore'; +import { createUserPoolsTokenProvider } from '../../../../src/adapter-core'; jest.mock('@aws-amplify/auth/cognito'); diff --git a/packages/aws-amplify/__tests__/adapterCore/runWithAmplifyServerContext.test.ts b/packages/aws-amplify/__tests__/adapterCore/runWithAmplifyServerContext.test.ts index 6208e52fb4c..8299cce6224 100644 --- a/packages/aws-amplify/__tests__/adapterCore/runWithAmplifyServerContext.test.ts +++ b/packages/aws-amplify/__tests__/adapterCore/runWithAmplifyServerContext.test.ts @@ -1,7 +1,7 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -import { runWithAmplifyServerContext } from '../../src/adapterCore'; +import { runWithAmplifyServerContext } from '../../src/adapter-core'; import { createAmplifyServerContext, destroyAmplifyServerContext, diff --git a/packages/aws-amplify/__tests__/adapterCore/storageFactories/createKeyValueStorageFromCookieStorageAdapter.test.ts b/packages/aws-amplify/__tests__/adapterCore/storageFactories/createKeyValueStorageFromCookieStorageAdapter.test.ts index f1d5a878b00..b3d1e24022e 100644 --- a/packages/aws-amplify/__tests__/adapterCore/storageFactories/createKeyValueStorageFromCookieStorageAdapter.test.ts +++ b/packages/aws-amplify/__tests__/adapterCore/storageFactories/createKeyValueStorageFromCookieStorageAdapter.test.ts @@ -1,8 +1,8 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -import { createKeyValueStorageFromCookieStorageAdapter } from '../../../src/adapterCore'; -import { defaultSetCookieOptions } from '../../../src/adapterCore/storageFactories/createKeyValueStorageFromCookieStorageAdapter'; +import { createKeyValueStorageFromCookieStorageAdapter } from '../../../src/adapter-core'; +import { defaultSetCookieOptions } from '../../../src/adapter-core/storageFactories/createKeyValueStorageFromCookieStorageAdapter'; const mockCookiesStorageAdapter = { getAll: jest.fn(), diff --git a/packages/aws-amplify/adapter-core/package.json b/packages/aws-amplify/adapter-core/package.json index 2454c169688..5d196f9997b 100644 --- a/packages/aws-amplify/adapter-core/package.json +++ b/packages/aws-amplify/adapter-core/package.json @@ -1,7 +1,7 @@ { "name": "aws-amplify/adapter-core", - "types": "../dist/esm/adapterCore/index.d.ts", - "main": "../dist/cjs/adapterCore/index.js", - "module": "../dist/esm/adapterCore/index.mjs", + "types": "../dist/esm/adapter-core/index.d.ts", + "main": "../dist/cjs/adapter-core/index.js", + "module": "../dist/esm/adapter-core/index.mjs", "sideEffects": false } diff --git a/packages/aws-amplify/package.json b/packages/aws-amplify/package.json index b41440c96e4..c7bdd7ae04f 100644 --- a/packages/aws-amplify/package.json +++ b/packages/aws-amplify/package.json @@ -151,9 +151,9 @@ "react-native": "./src/push-notifications/pinpoint/index.ts" }, "./adapter-core": { - "types": "./dist/esm/adapterCore/index.d.ts", - "import": "./dist/esm/adapterCore/index.mjs", - "require": "./dist/cjs/adapterCore/index.js" + "types": "./dist/esm/adapter-core/index.d.ts", + "import": "./dist/esm/adapter-core/index.mjs", + "require": "./dist/cjs/adapter-core/index.js" }, "./package.json": "./package.json" }, @@ -226,7 +226,7 @@ "./dist/esm/push-notifications/pinpoint/index.d.ts" ], "adapter-core": [ - "./dist/esm/adapterCore/index.d.ts" + "./dist/esm/adapter-core/index.d.ts" ] } }, diff --git a/packages/aws-amplify/src/adapterCore/authProvidersFactories/cognito/createAWSCredentialsAndIdentityIdProvider.ts b/packages/aws-amplify/src/adapter-core/authProvidersFactories/cognito/createAWSCredentialsAndIdentityIdProvider.ts similarity index 100% rename from packages/aws-amplify/src/adapterCore/authProvidersFactories/cognito/createAWSCredentialsAndIdentityIdProvider.ts rename to packages/aws-amplify/src/adapter-core/authProvidersFactories/cognito/createAWSCredentialsAndIdentityIdProvider.ts diff --git a/packages/aws-amplify/src/adapterCore/authProvidersFactories/cognito/createUserPoolsTokenProvider.ts b/packages/aws-amplify/src/adapter-core/authProvidersFactories/cognito/createUserPoolsTokenProvider.ts similarity index 100% rename from packages/aws-amplify/src/adapterCore/authProvidersFactories/cognito/createUserPoolsTokenProvider.ts rename to packages/aws-amplify/src/adapter-core/authProvidersFactories/cognito/createUserPoolsTokenProvider.ts diff --git a/packages/aws-amplify/src/adapterCore/authProvidersFactories/cognito/index.ts b/packages/aws-amplify/src/adapter-core/authProvidersFactories/cognito/index.ts similarity index 100% rename from packages/aws-amplify/src/adapterCore/authProvidersFactories/cognito/index.ts rename to packages/aws-amplify/src/adapter-core/authProvidersFactories/cognito/index.ts diff --git a/packages/aws-amplify/src/adapterCore/index.ts b/packages/aws-amplify/src/adapter-core/index.ts similarity index 100% rename from packages/aws-amplify/src/adapterCore/index.ts rename to packages/aws-amplify/src/adapter-core/index.ts diff --git a/packages/aws-amplify/src/adapterCore/runWithAmplifyServerContext.ts b/packages/aws-amplify/src/adapter-core/runWithAmplifyServerContext.ts similarity index 100% rename from packages/aws-amplify/src/adapterCore/runWithAmplifyServerContext.ts rename to packages/aws-amplify/src/adapter-core/runWithAmplifyServerContext.ts diff --git a/packages/aws-amplify/src/adapterCore/storageFactories/createKeyValueStorageFromCookieStorageAdapter.ts b/packages/aws-amplify/src/adapter-core/storageFactories/createKeyValueStorageFromCookieStorageAdapter.ts similarity index 100% rename from packages/aws-amplify/src/adapterCore/storageFactories/createKeyValueStorageFromCookieStorageAdapter.ts rename to packages/aws-amplify/src/adapter-core/storageFactories/createKeyValueStorageFromCookieStorageAdapter.ts diff --git a/packages/aws-amplify/src/adapterCore/storageFactories/index.ts b/packages/aws-amplify/src/adapter-core/storageFactories/index.ts similarity index 100% rename from packages/aws-amplify/src/adapterCore/storageFactories/index.ts rename to packages/aws-amplify/src/adapter-core/storageFactories/index.ts diff --git a/packages/aws-amplify/typedoc.json b/packages/aws-amplify/typedoc.json index a22ac199304..15753404893 100644 --- a/packages/aws-amplify/typedoc.json +++ b/packages/aws-amplify/typedoc.json @@ -1,12 +1,14 @@ { "name": "aws-amplify", - "extends": ["../../typedoc.base.json"], + "extends": [ + "../../typedoc.base.json" + ], "entryPointStrategy": "resolve", "includeVersion": true, "entryPoints": [ "src/index.ts", "src/utils/index.ts", - "src/adapterCore/index.ts", + "src/adapter-core/index.ts", "src/analytics/index.ts", "src/analytics/pinpoint/index.ts", "src/analytics/kinesis/index.ts",