Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

amplify-cli-core

Package Overview
Dependencies
Maintainers
1
Versions
486
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

amplify-cli-core - npm Package Compare versions

Comparing version 1.7.0-backend.0 to 1.8.0-beta.0

34

CHANGELOG.md

@@ -6,3 +6,3 @@ # Change Log

# [1.7.0-backend.0](https://github.com/aws-amplify/amplify-cli/compare/amplify-cli-core@1.6.0...amplify-cli-core@1.7.0-backend.0) (2020-11-21)
# [1.8.0-beta.0](https://github.com/aws-amplify/amplify-cli/compare/amplify-cli-core@1.6.0...amplify-cli-core@1.8.0-beta.0) (2020-11-22)

@@ -12,3 +12,2 @@

* file existence checks, enable admin console ([#5922](https://github.com/aws-amplify/amplify-cli/issues/5922)) ([d5d2ce6](https://github.com/aws-amplify/amplify-cli/commit/d5d2ce69bea99d0853e3ba7c0133f9334b4724ef))
* team provider migration ([#5733](https://github.com/aws-amplify/amplify-cli/issues/5733)) ([d18f795](https://github.com/aws-amplify/amplify-cli/commit/d18f795560f0e671f63f1dcbe38931c951794619))

@@ -25,2 +24,33 @@

# 1.7.0 (2020-11-22)
### Bug Fixes
* add compatibility to json parse for non-string values ([#5147](https://github.com/aws-amplify/amplify-cli/issues/5147)) ([3bc9306](https://github.com/aws-amplify/amplify-cli/commit/3bc9306c7b3d078d9b531f5950e8a304fc031d23))
* added exit code on remove ([#5427](https://github.com/aws-amplify/amplify-cli/issues/5427)) ([33132f7](https://github.com/aws-amplify/amplify-cli/commit/33132f764b290cafd345720409a5db8ea6088069))
* data inconsitency ([#5344](https://github.com/aws-amplify/amplify-cli/issues/5344)) ([bfe1903](https://github.com/aws-amplify/amplify-cli/commit/bfe19038b5b676056f45d7ffcc4c2460057936d8))
* move mobile hub flag to context directly ([#5459](https://github.com/aws-amplify/amplify-cli/issues/5459)) ([1828d21](https://github.com/aws-amplify/amplify-cli/commit/1828d214e3491a3633d72f571b7a8f1ab271f7a1))
* move post-install steps to plugin platform rather than post install script ([#5678](https://github.com/aws-amplify/amplify-cli/issues/5678)) ([f83bbab](https://github.com/aws-amplify/amplify-cli/commit/f83bbab378f6857202653cd57c607cead11cbe52))
* publish returns with exitcode 1 ([#5413](https://github.com/aws-amplify/amplify-cli/issues/5413)) ([2064830](https://github.com/aws-amplify/amplify-cli/commit/20648308fca4d4ae6dba84874c3f5508405ff701))
* refactor amplify.json file handling ([#5282](https://github.com/aws-amplify/amplify-cli/issues/5282)) ([a6269f3](https://github.com/aws-amplify/amplify-cli/commit/a6269f3177f3242df81e9d7dce0625295bb7a9fc))
* team provider migration ([#5733](https://github.com/aws-amplify/amplify-cli/issues/5733)) ([d18f795](https://github.com/aws-amplify/amplify-cli/commit/d18f795560f0e671f63f1dcbe38931c951794619))
* update default file permissions for credentials/config ([#5246](https://github.com/aws-amplify/amplify-cli/issues/5246)) ([b64f1bd](https://github.com/aws-amplify/amplify-cli/commit/b64f1bd784b0595f49241fdd89686c5f8a421ae3))
### Features
* changes for native packaging ([#5548](https://github.com/aws-amplify/amplify-cli/issues/5548)) ([7a06f6d](https://github.com/aws-amplify/amplify-cli/commit/7a06f6d96e42a5863e2192560890adbd741b0dc6))
* feature flag implementation ([#4891](https://github.com/aws-amplify/amplify-cli/issues/4891)) ([6d1c632](https://github.com/aws-amplify/amplify-cli/commit/6d1c632952a49cb56670c11c9cb0c3620d0eb332))
* ff to turn off schema reserve word validation ([#5745](https://github.com/aws-amplify/amplify-cli/issues/5745)) ([de79514](https://github.com/aws-amplify/amplify-cli/commit/de79514c18bea7236a05f0658513b95318501d16))
* resource Tagging Support ([#5178](https://github.com/aws-amplify/amplify-cli/issues/5178)) ([e34226d](https://github.com/aws-amplify/amplify-cli/commit/e34226dde30d7d345e3cc2e72e187b242a09c389))
* storage import ([#5893](https://github.com/aws-amplify/amplify-cli/issues/5893)) ([ad7b028](https://github.com/aws-amplify/amplify-cli/commit/ad7b028330bcee64d5124be7f27a8494dc8e9400))
* support importing of auth resources ([#5591](https://github.com/aws-amplify/amplify-cli/issues/5591)) ([7903246](https://github.com/aws-amplify/amplify-cli/commit/790324680544fe18481f91390001f9f07a144203))
* transformer redesign ([#5534](https://github.com/aws-amplify/amplify-cli/issues/5534)) ([a93c685](https://github.com/aws-amplify/amplify-cli/commit/a93c6852f6588898ebc52b0574f4fcc3d2e87948))
* update post-install to copy executable assets to .amplify ([#5595](https://github.com/aws-amplify/amplify-cli/issues/5595)) ([53a23a0](https://github.com/aws-amplify/amplify-cli/commit/53a23a07cbb9e09566c1f0f577ba2b7488bc2eae))
## [1.6.3](https://github.com/aws-amplify/amplify-cli/compare/amplify-cli-core@1.6.0...amplify-cli-core@1.6.3) (2020-11-20)

@@ -27,0 +57,0 @@

2

lib/index.d.ts

@@ -91,3 +91,3 @@ import { ServiceSelection } from './serviceSelection';

getWhen: () => $TSAny;
inputValidation: (input: $TSAny) => $TSAny;
inputValidation: () => $TSAny;
listCategories: () => $TSAny;

@@ -94,0 +94,0 @@ makeId: () => $TSAny;

@@ -7,6 +7,5 @@ export declare class JSONUtilities {

static writeJson: (fileName: string, data: any, options?: {
minify?: boolean | undefined;
keepComments?: boolean | undefined;
mode?: number | undefined;
minify?: boolean | undefined;
secureFile?: boolean | undefined;
} | undefined) => void;

@@ -13,0 +12,0 @@ static parse: <T>(jsonString: string, options?: {

@@ -60,5 +60,4 @@ "use strict";

const mergedOptions = {
minify: false,
keepComments: false,
minify: false,
secureFile: false,
...options,

@@ -72,7 +71,6 @@ };

fs.ensureDirSync(dirPath);
const writeFileOptions = { encoding: 'utf8', mode: options === null || options === void 0 ? void 0 : options.mode };
if (mergedOptions.secureFile) {
writeFileOptions.mode = 0o600;
}
fs.writeFileSync(fileName, jsonString, writeFileOptions);
fs.writeFileSync(fileName, jsonString, {
encoding: 'utf8',
mode: options === null || options === void 0 ? void 0 : options.mode,
});
};

@@ -79,0 +77,0 @@ JSONUtilities.parse = (jsonString, options) => {

@@ -6,3 +6,2 @@ export declare const PathConstants: {

DeploymentSecretsFileName: string;
AmplifyAdminDir: string;
AmplifyDirName: string;

@@ -13,3 +12,2 @@ DotAmplifyDirName: string;

CurrentCloudBackendDirName: string;
AmplifyAdminConfigFileName: string;
AmplifyRcFileName: string;

@@ -35,4 +33,2 @@ GitIgnoreFileName: string;

getHomeDotAmplifyDirPath: () => string;
getAmplifyAdminDirPath: () => string;
getAmplifyAdminConfigFilePath: () => string;
getAmplifyDirPath: (projectPath?: string | undefined) => string;

@@ -39,0 +35,0 @@ getDotConfigDirPath: (projectPath?: string | undefined) => string;

@@ -31,3 +31,2 @@ "use strict";

DeploymentSecretsFileName: 'deployment-secrets.json',
AmplifyAdminDir: 'admin',
AmplifyDirName: 'amplify',

@@ -38,3 +37,2 @@ DotAmplifyDirName: '.amplify',

CurrentCloudBackendDirName: '#current-cloud-backend',
AmplifyAdminConfigFileName: 'config.json',
AmplifyRcFileName: '.amplifyrc',

@@ -65,4 +63,2 @@ GitIgnoreFileName: '.gitignore',

this.getHomeDotAmplifyDirPath = () => this.homeDotAmplifyDirPath;
this.getAmplifyAdminDirPath = () => this.constructPath(this.getHomeDotAmplifyDirPath(), [exports.PathConstants.AmplifyAdminDir]);
this.getAmplifyAdminConfigFilePath = () => this.constructPath(this.getAmplifyAdminDirPath(), [exports.PathConstants.AmplifyAdminConfigFileName]);
this.getAmplifyDirPath = (projectPath) => this.constructPath(projectPath, [exports.PathConstants.AmplifyDirName]);

@@ -69,0 +65,0 @@ this.getDotConfigDirPath = (projectPath) => this.constructPath(projectPath, [exports.PathConstants.AmplifyDirName, exports.PathConstants.DotConfigDirName]);

@@ -27,5 +27,2 @@ import { $TSMeta, $TSTeamProviderInfo, $TSAny, DeploymentSecrets } from '..';

getResourceParametersJson: (projectPath: string | undefined, category: string, resourceName: string, options?: GetOptions<any> | undefined) => $TSAny;
getAmplifyAdminConfigEntry: (appId: string) => any;
removeAmplifyAdminConfigEntry: (appId: string) => void;
setAmplifyAdminConfigEntry: (appId: string, config: $TSAny) => void;
setLocalEnvInfo: (projectPath: string | undefined, localEnvInfo: $TSAny) => void;

@@ -43,3 +40,2 @@ setLocalAWSInfo: (projectPath: string | undefined, localAWSInfo: $TSAny) => void;

setCLIJSON: (projectPath: string, cliJSON: any, env?: string | undefined) => void;
private doesExist;
private getData;

@@ -46,0 +42,0 @@ }

@@ -30,3 +30,3 @@ "use strict";

constructor() {
this.metaFileExists = (projectPath) => this.doesExist(pathManager_1.pathManager.getAmplifyMetaFilePath, projectPath);
this.metaFileExists = (projectPath) => fs.existsSync(pathManager_1.pathManager.getAmplifyMetaFilePath(projectPath));
this.getMeta = (projectPath, options) => {

@@ -41,3 +41,3 @@ const filePath = pathManager_1.pathManager.getAmplifyMetaFilePath(projectPath);

};
this.currentMetaFileExists = (projectPath) => this.doesExist(pathManager_1.pathManager.getCurrentAmplifyMetaFilePath, projectPath);
this.currentMetaFileExists = (projectPath) => fs.existsSync(pathManager_1.pathManager.getCurrentAmplifyMetaFilePath(projectPath));
this.setDeploymentSecrets = (deploymentSecrets) => {

@@ -63,3 +63,3 @@ const path = pathManager_1.pathManager.getDeploymentSecrets();

this.getCurrentProjectTags = (projectPath) => tags_1.ReadValidateTags(pathManager_1.pathManager.getCurrentTagFilePath(projectPath));
this.teamProviderInfoExists = (projectPath) => this.doesExist(pathManager_1.pathManager.getTeamProviderInfoFilePath, projectPath);
this.teamProviderInfoExists = (projectPath) => fs.existsSync(pathManager_1.pathManager.getTeamProviderInfoFilePath(projectPath));
this.getTeamProviderInfo = (projectPath, options) => {

@@ -73,3 +73,3 @@ const filePath = pathManager_1.pathManager.getTeamProviderInfoFilePath(projectPath);

};
this.localEnvInfoExists = (projectPath) => this.doesExist(pathManager_1.pathManager.getLocalEnvFilePath, projectPath);
this.localEnvInfoExists = (projectPath) => fs.existsSync(pathManager_1.pathManager.getLocalEnvFilePath(projectPath));
this.getLocalEnvInfo = (projectPath, options) => {

@@ -91,3 +91,3 @@ const filePath = pathManager_1.pathManager.getLocalEnvFilePath(projectPath);

};
this.projectConfigExists = (projectPath) => this.doesExist(pathManager_1.pathManager.getProjectConfigFilePath, projectPath);
this.projectConfigExists = (projectPath) => fs.existsSync(pathManager_1.pathManager.getProjectConfigFilePath(projectPath));
this.getProjectConfig = (projectPath, options) => {

@@ -101,3 +101,3 @@ const filePath = pathManager_1.pathManager.getProjectConfigFilePath(projectPath);

};
this.backendConfigFileExists = (projectPath) => this.doesExist(pathManager_1.pathManager.getBackendConfigFilePath, projectPath);
this.backendConfigFileExists = (projectPath) => fs.existsSync(pathManager_1.pathManager.getBackendConfigFilePath(projectPath));
this.getBackendConfig = (projectPath, options) => {

@@ -119,16 +119,2 @@ const filePath = pathManager_1.pathManager.getBackendConfigFilePath(projectPath);

};
this.getAmplifyAdminConfigEntry = (appId) => {
const adminConfig = (jsonUtilities_1.JSONUtilities.readJson(pathManager_1.pathManager.getAmplifyAdminConfigFilePath(), { throwIfNotExist: false }) || {});
return adminConfig[appId];
};
this.removeAmplifyAdminConfigEntry = (appId) => {
const adminConfig = jsonUtilities_1.JSONUtilities.readJson(pathManager_1.pathManager.getAmplifyAdminConfigFilePath());
delete adminConfig[appId];
jsonUtilities_1.JSONUtilities.writeJson(pathManager_1.pathManager.getAmplifyAdminConfigFilePath(), adminConfig, { secureFile: true });
};
this.setAmplifyAdminConfigEntry = (appId, config) => {
const adminConfig = jsonUtilities_1.JSONUtilities.readJson(pathManager_1.pathManager.getAmplifyAdminConfigFilePath(), { throwIfNotExist: false }) || {};
adminConfig[appId] = config;
jsonUtilities_1.JSONUtilities.writeJson(pathManager_1.pathManager.getAmplifyAdminConfigFilePath(), adminConfig, { secureFile: true });
};
this.setLocalEnvInfo = (projectPath, localEnvInfo) => {

@@ -170,10 +156,3 @@ const filePath = pathManager_1.pathManager.getLocalEnvFilePath(projectPath);

};
this.cliJSONFileExists = (projectPath, env) => {
try {
return fs.existsSync(pathManager_1.pathManager.getCLIJSONFilePath(projectPath, env));
}
catch (e) {
return false;
}
};
this.cliJSONFileExists = (projectPath, env) => fs.existsSync(pathManager_1.pathManager.getCLIJSONFilePath(projectPath, env));
this.getCLIJSON = (projectPath, env, options) => {

@@ -193,12 +172,2 @@ const filePath = pathManager_1.pathManager.getCLIJSONFilePath(projectPath, env);

};
this.doesExist = (filePathGetter, projectPath) => {
let path;
try {
path = filePathGetter(projectPath);
return fs.existsSync(path);
}
catch (e) {
return false;
}
};
this.getData = (filePath, options) => {

@@ -205,0 +174,0 @@ var _a;

{
"name": "amplify-cli-core",
"version": "1.7.0-backend.0",
"version": "1.8.0-beta.0",
"description": "Amplify CLI Core",

@@ -58,3 +58,3 @@ "repository": {

},
"gitHead": "f323eb267e9c37927f0432bbe7b554ad0f7b4c41"
"gitHead": "e34cac90ab86df17c4bd287fc4db1ed5faa59a5a"
}

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc