amplify-cli-core
Advanced tools
Comparing version 1.14.0 to 1.14.1-beta.0
@@ -6,2 +6,15 @@ # Change Log | ||
## [1.14.1-beta.0](https://github.com/aws-amplify/amplify-cli/compare/amplify-cli-core@1.14.0...amplify-cli-core@1.14.1-beta.0) (2021-01-08) | ||
### Bug Fixes | ||
* apply tags on create and push nested stack ([#6321](https://github.com/aws-amplify/amplify-cli/issues/6321)) ([4faa3e5](https://github.com/aws-amplify/amplify-cli/commit/4faa3e5ac38d311fe7901fb1b8a1b542cf19e598)) | ||
* better error message when angular.json is missing ([#6253](https://github.com/aws-amplify/amplify-cli/issues/6253)) ([0c8175e](https://github.com/aws-amplify/amplify-cli/commit/0c8175e6312fc6fcd5b9e1334cf2011d1e8d392a)) | ||
* remove process on next and await ([#6239](https://github.com/aws-amplify/amplify-cli/issues/6239)) ([59d4a0e](https://github.com/aws-amplify/amplify-cli/commit/59d4a0eb318d2b3ad97be34bda9dee756cf82d74)) | ||
# [1.14.0](https://github.com/aws-amplify/amplify-cli/compare/amplify-cli-core@1.13.1...amplify-cli-core@1.14.0) (2020-12-31) | ||
@@ -8,0 +21,0 @@ |
@@ -33,2 +33,4 @@ export declare class NotImplementedError extends Error { | ||
} | ||
export declare class AngularConfigNotFoundError extends Error { | ||
} | ||
//# sourceMappingURL=index.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.SchemaDoesNotExistError = exports.AppAlreadyDeployedError = exports.AppNotFoundError = exports.TeamProviderInfoMigrateError = exports.FrontendBuildError = exports.InvalidSubCommandError = exports.InvalidEnvironmentNameError = exports.NonEmptyDirectoryError = exports.MissingParametersError = exports.EnvironmentDoesNotExistError = exports.UnknownArgumentError = exports.UnknownResourceTypeError = exports.ResourceCredentialsNotFoundError = exports.ResourceDoesNotExistError = exports.ResourceAlreadyExistsError = exports.NotImplementedError = void 0; | ||
exports.AngularConfigNotFoundError = exports.SchemaDoesNotExistError = exports.AppAlreadyDeployedError = exports.AppNotFoundError = exports.TeamProviderInfoMigrateError = exports.FrontendBuildError = exports.InvalidSubCommandError = exports.InvalidEnvironmentNameError = exports.NonEmptyDirectoryError = exports.MissingParametersError = exports.EnvironmentDoesNotExistError = exports.UnknownArgumentError = exports.UnknownResourceTypeError = exports.ResourceCredentialsNotFoundError = exports.ResourceDoesNotExistError = exports.ResourceAlreadyExistsError = exports.NotImplementedError = void 0; | ||
class NotImplementedError extends Error { | ||
@@ -52,2 +52,5 @@ } | ||
exports.SchemaDoesNotExistError = SchemaDoesNotExistError; | ||
class AngularConfigNotFoundError extends Error { | ||
} | ||
exports.AngularConfigNotFoundError = AngularConfigNotFoundError; | ||
//# sourceMappingURL=index.js.map |
@@ -6,8 +6,6 @@ "use strict"; | ||
function exitOnNextTick(code) { | ||
process.nextTick(() => { | ||
amplify_cli_logger_1.logger.loggerEnd(); | ||
process.exit(code); | ||
}); | ||
amplify_cli_logger_1.logger.loggerEnd(); | ||
process.exit(code); | ||
} | ||
exports.exitOnNextTick = exitOnNextTick; | ||
//# sourceMappingURL=exitOnNextTick.js.map |
@@ -84,3 +84,3 @@ import { ServiceSelection } from './serviceSelection'; | ||
constants: $TSAny; | ||
constructExeInfo: () => $TSAny; | ||
constructExeInfo: (context: $TSContext) => $TSAny; | ||
copyBatch: () => $TSAny; | ||
@@ -90,3 +90,3 @@ crudFlow: () => $TSAny; | ||
executeProviderUtils: () => $TSAny; | ||
getAllEnvs: () => $TSAny; | ||
getAllEnvs: () => string[]; | ||
getPlugin: () => $TSAny; | ||
@@ -113,6 +113,10 @@ getCategoryPluginInfo: (context: $TSContext, category?: string, service?: string) => $TSAny; | ||
pressEnterToContinue: () => $TSAny; | ||
pushResources: () => $TSAny; | ||
pushResources: (context: $TSContext, category?: string, resourceName?: string, filteredResources?: { | ||
category: string; | ||
resourceName: string; | ||
}[]) => $TSAny; | ||
storeCurrentCloudBackend: () => $TSAny; | ||
readJsonFile: () => $TSAny; | ||
removeEnvFromCloud: () => $TSAny; | ||
removeDeploymentSecrets: (context: $TSContext, category: string, resource: string) => void; | ||
removeResource: () => $TSAny; | ||
@@ -126,9 +130,9 @@ sharedQuestions: () => $TSAny; | ||
updateProjectConfig: () => $TSAny; | ||
updateamplifyMetaAfterResourceUpdate: (category: string, resourceName: string, metaResourceKey?: $TSAny, metaResourceData?: $TSAny) => $TSAny; | ||
updateamplifyMetaAfterResourceAdd: (category: string, resourceName: string, metaResourceData: $TSAny, backendResourceData?: $TSAny, overwriteObjectIfExists?: boolean) => $TSAny; | ||
updateamplifyMetaAfterResourceDelete: () => $TSAny; | ||
updateProvideramplifyMeta: () => $TSAny; | ||
updateamplifyMetaAfterPush: () => $TSAny; | ||
updateamplifyMetaAfterBuild: () => $TSAny; | ||
updateAmplifyMetaAfterPackage: () => $TSAny; | ||
updateamplifyMetaAfterResourceUpdate: (category: string, resourceName: string, metaResourceKey: string, metaResourceData?: $TSAny) => $TSMeta; | ||
updateamplifyMetaAfterResourceAdd: (category: string, resourceName: string, metaResourceData: $TSAny, backendResourceData?: $TSAny, overwriteObjectIfExists?: boolean) => void; | ||
updateamplifyMetaAfterResourceDelete: (category: string, resourceName: string) => void; | ||
updateProvideramplifyMeta: (providerName: string, options: $TSObject) => void; | ||
updateamplifyMetaAfterPush: (resources: $TSObject[]) => void; | ||
updateamplifyMetaAfterBuild: (resource: $TSObject) => void; | ||
updateAmplifyMetaAfterPackage: (resource: $TSObject, zipFilename: string) => void; | ||
updateBackendConfigAfterResourceAdd: (category: string, resourceName: string, resourceData: $TSAny) => $TSAny; | ||
@@ -135,0 +139,0 @@ updateBackendConfigAfterResourceUpdate: () => $TSAny; |
@@ -78,4 +78,12 @@ "use strict"; | ||
this.getBackendConfigFilePath = (projectPath) => this.constructPath(projectPath, [exports.PathConstants.AmplifyDirName, exports.PathConstants.BackendDirName, exports.PathConstants.BackendConfigFileName]); | ||
this.getTagFilePath = (projectPath) => this.constructPath(projectPath, [exports.PathConstants.AmplifyDirName, exports.PathConstants.BackendDirName, exports.PathConstants.TagsFileName]); | ||
this.getCurrentTagFilePath = (projectPath) => this.constructPath(projectPath, [exports.PathConstants.AmplifyDirName, exports.PathConstants.CurrentCloudBackendDirName, exports.PathConstants.TagsFileName]); | ||
this.getTagFilePath = (projectPath) => { | ||
return this.constructPath(projectPath, [exports.PathConstants.AmplifyDirName, exports.PathConstants.BackendDirName, exports.PathConstants.TagsFileName]); | ||
}; | ||
this.getCurrentTagFilePath = (projectPath) => { | ||
return this.constructPath(projectPath, [ | ||
exports.PathConstants.AmplifyDirName, | ||
exports.PathConstants.CurrentCloudBackendDirName, | ||
exports.PathConstants.TagsFileName, | ||
]); | ||
}; | ||
this.getResourceParamatersFilePath = (projectPath, category, resourceName) => this.constructPath(projectPath, [ | ||
@@ -82,0 +90,0 @@ exports.PathConstants.AmplifyDirName, |
@@ -33,2 +33,4 @@ import { $TSMeta, $TSTeamProviderInfo, $TSAny, DeploymentSecrets } from '..'; | ||
setLocalAWSInfo: (projectPath: string | undefined, localAWSInfo: $TSAny) => void; | ||
getHydratedTags: (projectPath?: string | undefined) => Tag[]; | ||
isTagFilePresent: (projectPath?: string | undefined) => boolean; | ||
setProjectFileTags: (projectPath: string | undefined, tags: Tag[]) => void; | ||
@@ -35,0 +37,0 @@ setProjectConfig: (projectPath: string | undefined, projectConfig: $TSAny) => void; |
@@ -26,4 +26,4 @@ "use strict"; | ||
const jsonUtilities_1 = require("../jsonUtilities"); | ||
const cliConstants_1 = require("../cliConstants"); | ||
const tags_1 = require("../tags"); | ||
const cliConstants_1 = require("../cliConstants"); | ||
class StateManager { | ||
@@ -143,2 +143,13 @@ constructor() { | ||
}; | ||
this.getHydratedTags = (projectPath) => { | ||
const tags = this.getProjectTags(projectPath); | ||
const { projectName } = this.getProjectConfig(projectPath); | ||
const { envName } = this.getLocalEnvInfo(projectPath); | ||
return tags_1.HydrateTags(tags, { projectName, envName }); | ||
}; | ||
this.isTagFilePresent = (projectPath) => { | ||
if (pathManager_1.pathManager.findProjectRoot()) | ||
return fs.existsSync(pathManager_1.pathManager.getTagFilePath(projectPath)); | ||
return false; | ||
}; | ||
this.setProjectFileTags = (projectPath, tags) => { | ||
@@ -145,0 +156,0 @@ const tagFilePath = pathManager_1.pathManager.getTagFilePath(projectPath); |
@@ -7,2 +7,8 @@ export interface Tag { | ||
export declare function validate(tags: Tag[]): void; | ||
export declare function HydrateTags(tags: Tag[], tagVariables: TagVariables): Tag[]; | ||
declare type TagVariables = { | ||
envName: string; | ||
projectName: string; | ||
}; | ||
export {}; | ||
//# sourceMappingURL=Tags.d.ts.map |
@@ -6,3 +6,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.validate = exports.ReadValidateTags = void 0; | ||
exports.HydrateTags = exports.validate = exports.ReadValidateTags = void 0; | ||
const jsonUtilities_1 = require("../jsonUtilities"); | ||
@@ -33,2 +33,16 @@ const lodash_1 = __importDefault(require("lodash")); | ||
exports.validate = validate; | ||
function HydrateTags(tags, tagVariables) { | ||
const { envName, projectName } = tagVariables; | ||
const replace = { | ||
'{project-name}': projectName, | ||
'{project-env}': envName, | ||
}; | ||
return tags.map(tag => { | ||
return { | ||
...tag, | ||
Value: tag.Value.replace(/{project-name}|{project-env}/g, (matched) => replace[matched]), | ||
}; | ||
}); | ||
} | ||
exports.HydrateTags = HydrateTags; | ||
//# sourceMappingURL=Tags.js.map |
{ | ||
"name": "amplify-cli-core", | ||
"version": "1.14.0", | ||
"version": "1.14.1-beta.0", | ||
"description": "Amplify CLI Core", | ||
@@ -59,3 +59,3 @@ "repository": { | ||
}, | ||
"gitHead": "48604f6758d6492b2b4675f6e3235e4d35f32a01" | ||
"gitHead": "39c2a3314498375ed325fd8e3b77bad75cffc6d2" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
179526
1924
2