Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: does not create build for ll #8706

Merged
merged 1 commit into from
Nov 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions packages/amplify-cli-core/src/cliConstants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export enum CLISubCommandType {
CONSOLE = 'console',
IMPORT = 'import',
OVERRIDE = 'override',
MIGRATE = 'migrate'
MIGRATE = 'migrate',
}
export const AmplifyCategories = {
STORAGE: 'storage',
Expand All @@ -29,17 +29,18 @@ export const AmplifyCategories = {
NOTIFICATIONS: 'notifications',
PREDICTIONS: 'predictions',
ANALYTICS: 'analytics',
CUSTOM: 'custom',
};

export const AmplifySupportedService = {
S3: 'S3',
DYNAMODB: 'DynamoDB',
COGNITO: 'Cognito',
COGNITOUSERPOOLGROUPS: 'Cognito-UserPool-Groups',
LAMBDA : 'Lambda'
LAMBDA: 'Lambda',
};

export const overriddenCategories = [AmplifyCategories.AUTH, AmplifyCategories.STORAGE];
export const overriddenCategories = [AmplifyCategories.AUTH, AmplifyCategories.STORAGE, AmplifyCategories.CUSTOM];

export type IAmplifyResource = {
category: string;
Expand Down
3 changes: 2 additions & 1 deletion packages/amplify-cli-core/src/state-manager/pathManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import * as path from 'path';
import * as fs from 'fs-extra';
import { homedir } from 'os';
import { NotInitializedError } from '../errors';
import { overriddenCategories } from '..';

export const PathConstants = {
// in home directory
Expand Down Expand Up @@ -146,7 +147,7 @@ export class PathManager {
getResourceParametersFilePath = (projectPath: string | undefined, category: string, resourceName: string): string => {
let isBuildParametersjson: boolean = false;
const resourceDirPath = this.getResourceDirectoryPath(projectPath, category, resourceName);
if (!fs.existsSync(path.join(resourceDirPath, PathConstants.ParametersJsonFileName))) {
if (!fs.existsSync(path.join(resourceDirPath, PathConstants.ParametersJsonFileName)) && overriddenCategories.includes(category)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

API categories also have parameters.json in build

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It directly read and writes to resource

isBuildParametersjson = true;
}
const basePath = isBuildParametersjson ? path.join(resourceDirPath, PathConstants.BuildDirName) : resourceDirPath;
Expand Down