amplify-cli-core
Advanced tools
Comparing version 1.6.1-teamprv2.16 to 1.6.3-beta.0
@@ -6,2 +6,35 @@ # Change Log | ||
## [1.6.3-beta.0](https://github.com/aws-amplify/amplify-cli/compare/amplify-cli-core@1.6.0...amplify-cli-core@1.6.3-beta.0) (2020-11-20) | ||
### Bug Fixes | ||
* team provider migration ([#5733](https://github.com/aws-amplify/amplify-cli/issues/5733)) ([d18f795](https://github.com/aws-amplify/amplify-cli/commit/d18f795560f0e671f63f1dcbe38931c951794619)) | ||
## [1.6.2](https://github.com/aws-amplify/amplify-cli/compare/amplify-cli-core@1.6.0...amplify-cli-core@1.6.2) (2020-11-20) | ||
### Bug Fixes | ||
* team provider migration ([#5733](https://github.com/aws-amplify/amplify-cli/issues/5733)) ([d18f795](https://github.com/aws-amplify/amplify-cli/commit/d18f795560f0e671f63f1dcbe38931c951794619)) | ||
## [1.6.1](https://github.com/aws-amplify/amplify-cli/compare/amplify-cli-core@1.6.0...amplify-cli-core@1.6.1) (2020-11-19) | ||
### Bug Fixes | ||
* team provider migration ([#5733](https://github.com/aws-amplify/amplify-cli/issues/5733)) ([d18f795](https://github.com/aws-amplify/amplify-cli/commit/d18f795560f0e671f63f1dcbe38931c951794619)) | ||
# [1.6.0](https://github.com/aws-amplify/amplify-cli/compare/amplify-cli-core@1.5.1...amplify-cli-core@1.6.0) (2020-11-08) | ||
@@ -8,0 +41,0 @@ |
@@ -25,4 +25,4 @@ export declare class NotImplementedError extends Error { | ||
} | ||
export declare class MigrateError extends Error { | ||
export declare class TeamProviderInfoMigrateError extends Error { | ||
} | ||
//# sourceMappingURL=index.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.MigrateError = 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.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 { | ||
@@ -40,5 +40,5 @@ } | ||
exports.FrontendBuildError = FrontendBuildError; | ||
class MigrateError extends Error { | ||
class TeamProviderInfoMigrateError extends Error { | ||
} | ||
exports.MigrateError = MigrateError; | ||
exports.TeamProviderInfoMigrateError = TeamProviderInfoMigrateError; | ||
//# sourceMappingURL=index.js.map |
@@ -15,2 +15,3 @@ import { ServiceSelection } from './serviceSelection'; | ||
export * from './cliConstants'; | ||
export * from './deploymentSecretsHelper'; | ||
export declare type $TSAny = any; | ||
@@ -48,2 +49,16 @@ export declare type $TSContext = { | ||
}; | ||
export declare type DeploymentSecrets = { | ||
appSecrets: Array<{ | ||
rootStackId: string; | ||
environments: { | ||
[env: string]: { | ||
[category: string]: { | ||
[resourceName: string]: { | ||
[key: string]: string; | ||
}; | ||
}; | ||
}; | ||
}; | ||
}>; | ||
}; | ||
export declare type GetPackageAssetPaths = () => Promise<string[]>; | ||
@@ -50,0 +65,0 @@ export declare type $IPluginManifest = $TSAny; |
@@ -26,2 +26,3 @@ "use strict"; | ||
__exportStar(require("./cliConstants"), exports); | ||
__exportStar(require("./deploymentSecretsHelper"), exports); | ||
//# sourceMappingURL=index.js.map |
@@ -5,3 +5,3 @@ export declare const PathConstants: { | ||
AWSConfig: string; | ||
DeploymentSecrets: string; | ||
DeploymentSecretsFileName: string; | ||
AmplifyDirName: string; | ||
@@ -8,0 +8,0 @@ DotAmplifyDirName: string; |
@@ -30,3 +30,3 @@ "use strict"; | ||
AWSConfig: 'config', | ||
DeploymentSecrets: 'deployment-secrets.json', | ||
DeploymentSecretsFileName: 'deployment-secrets.json', | ||
AmplifyDirName: 'amplify', | ||
@@ -101,3 +101,3 @@ DotAmplifyDirName: '.amplify', | ||
this.getDotAWSAmplifyDirPath = () => path.normalize(path.join(os_1.homedir(), exports.PathConstants.DotAWSDir, exports.PathConstants.AmplifyDirName)); | ||
this.getDeploymentSecrets = () => path.normalize(path.join(this.getDotAWSAmplifyDirPath(), exports.PathConstants.DeploymentSecrets)); | ||
this.getDeploymentSecrets = () => path.normalize(path.join(this.getDotAWSAmplifyDirPath(), exports.PathConstants.DeploymentSecretsFileName)); | ||
this.constructPath = (projectPath, segments = []) => { | ||
@@ -104,0 +104,0 @@ if (!projectPath) { |
@@ -1,2 +0,2 @@ | ||
import { $TSMeta, $TSTeamProviderInfo, $TSAny } from '..'; | ||
import { $TSMeta, $TSTeamProviderInfo, $TSAny, DeploymentSecrets } from '..'; | ||
import { Tag } from '../tags'; | ||
@@ -12,10 +12,8 @@ export declare type GetOptions<T> = { | ||
currentMetaFileExists: (projectPath?: string | undefined) => boolean; | ||
setDeploymentSecrets: (deploymentSecrets: $TSAny) => void; | ||
setDeploymentSecrets: (deploymentSecrets: DeploymentSecrets) => void; | ||
getCurrentMeta: (projectPath?: string | undefined, options?: GetOptions<any> | undefined) => $TSMeta; | ||
getDeploymentSecrets: () => $TSAny; | ||
getDeploymentSecrets: () => DeploymentSecrets; | ||
getProjectTags: (projectPath?: string | undefined) => Tag[]; | ||
getCurrentProjectTags: (projectPath?: string | undefined) => Tag[]; | ||
teamProviderInfoExists: (projectPath?: string | undefined) => boolean; | ||
teamProviderInfoHasAuthSecrets: (projectPath?: string | undefined) => any; | ||
moveSecretsFromTeamProviderToDeployment: (projectPath?: string | undefined) => void; | ||
getTeamProviderInfo: (projectPath?: string | undefined, options?: GetOptions<any> | undefined) => $TSTeamProviderInfo; | ||
@@ -22,0 +20,0 @@ localEnvInfoExists: (projectPath?: string | undefined) => boolean; |
@@ -21,5 +21,2 @@ "use strict"; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -31,5 +28,3 @@ exports.stateManager = exports.StateManager = void 0; | ||
const tags_1 = require("../tags"); | ||
const lodash_1 = __importDefault(require("lodash")); | ||
const cliConstants_1 = require("../cliConstants"); | ||
const hostedUIProviderCredsField = 'hostedUIProviderCreds'; | ||
class StateManager { | ||
@@ -64,3 +59,3 @@ constructor() { | ||
throwIfNotExist: false, | ||
}) || {}); | ||
}) || { appSecrets: [] }); | ||
}; | ||
@@ -70,35 +65,2 @@ this.getProjectTags = (projectPath) => tags_1.ReadValidateTags(pathManager_1.pathManager.getTagFilePath(projectPath)); | ||
this.teamProviderInfoExists = (projectPath) => fs.existsSync(pathManager_1.pathManager.getTeamProviderInfoFilePath(projectPath)); | ||
this.teamProviderInfoHasAuthSecrets = (projectPath) => { | ||
if (this.teamProviderInfoExists(projectPath)) { | ||
const teamProviderInfo = this.getTeamProviderInfo(projectPath); | ||
const { envName } = this.getLocalEnvInfo(); | ||
const envTeamProvider = teamProviderInfo[envName]; | ||
if (envTeamProvider && envTeamProvider.categories && envTeamProvider.categories.auth) { | ||
return lodash_1.default.some(Object.keys(envTeamProvider.categories.auth), resource => { | ||
return envTeamProvider.categories.auth[resource][hostedUIProviderCredsField]; | ||
}); | ||
} | ||
} | ||
return false; | ||
}; | ||
this.moveSecretsFromTeamProviderToDeployment = (projectPath) => { | ||
const { envName } = this.getLocalEnvInfo(projectPath); | ||
let teamProviderInfo = this.getTeamProviderInfo(); | ||
const envTeamProvider = teamProviderInfo[envName]; | ||
const amplifyAppId = envTeamProvider.awscloudformation.AmplifyAppId; | ||
let secrets = {}; | ||
Object.keys(envTeamProvider.categories).forEach(category => { | ||
if (category === 'auth') { | ||
Object.keys(envTeamProvider.categories.auth).forEach(resourceName => { | ||
if (envTeamProvider.categories.auth[resourceName][hostedUIProviderCredsField]) { | ||
const teamProviderSecrets = envTeamProvider.categories.auth[resourceName][hostedUIProviderCredsField]; | ||
delete envTeamProvider.categories.auth[resourceName][hostedUIProviderCredsField]; | ||
secrets = lodash_1.default.set(secrets, [amplifyAppId, envName, 'auth', resourceName, hostedUIProviderCredsField], teamProviderSecrets); | ||
} | ||
}); | ||
} | ||
}); | ||
this.setTeamProviderInfo(undefined, teamProviderInfo); | ||
this.setDeploymentSecrets(secrets); | ||
}; | ||
this.getTeamProviderInfo = (projectPath, options) => { | ||
@@ -105,0 +67,0 @@ const filePath = pathManager_1.pathManager.getTeamProviderInfoFilePath(projectPath); |
{ | ||
"name": "amplify-cli-core", | ||
"version": "1.6.1-teamprv2.16+cdeb7ebdd", | ||
"version": "1.6.3-beta.0", | ||
"description": "Amplify CLI Core", | ||
@@ -58,3 +58,3 @@ "repository": { | ||
}, | ||
"gitHead": "cdeb7ebdd0f8e387824f909ed56a4d8e8d82e1aa" | ||
"gitHead": "d090f79c5cb1a521e15466ab5572aedfdbb01073" | ||
} |
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
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
151445
99
1663
0