Skip to content
Permalink
Browse files

chore: consistent use of Forge/Electron Forge in messages

  • Loading branch information
malept committed Jul 13, 2019
1 parent 6158329 commit 1d19b32093ea396bbe1ba3d1ab0a858f4f34735a
@@ -12,7 +12,7 @@ import workingDir from './util/working-dir';
program
.version((await fs.readJson(path.resolve(__dirname, '../package.json'))).version)
.arguments('[name]')
.option('-t, --template [name]', 'Name of the forge template to use')
.option('-t, --template [name]', 'Name of the Forge template to use')
.option('-c, --copy-ci-files', 'Whether to copy the templated CI files (defaults to false)', false)
.action((name) => { dir = workingDir(dir, name, false); })
.parse(process.argv);
@@ -147,7 +147,7 @@ export default class WebpackPlugin extends PluginBase<WebpackPluginConfig> {
forgeConfig.packagerConfig = {};
}
if (forgeConfig.packagerConfig.ignore) {
console.error(`You have set packagerConfig.ignore, the electron forge webpack plugin normally sets this automatically.
console.error(`You have set packagerConfig.ignore, the Electron Forge webpack plugin normally sets this automatically.
Your packaged app may be larger than expected if you dont ignore everything other than the '.webpack' folder`.red);
return forgeConfig;
@@ -22,11 +22,11 @@ export default class PublisherBitbucket extends PublisherBase<PublisherBitbucket
const encodedUserAndPass = Buffer.from(`${auth.username}:${auth.appPassword}`).toString('base64');

if (!(hasRepositoryConfig && config.repository.owner && config.repository.name)) {
throw new Error('In order to publish to Bitbucket you must set the "repository.owner" and "repository.name" properties in your forge config. See the docs for more info');
throw new Error('In order to publish to Bitbucket you must set the "repository.owner" and "repository.name" properties in your Forge config. See the docs for more info');
}

if (!auth.appPassword || !auth.username) {
throw new Error('In order to publish to Bitbucket provide credentials, either through "auth.appPassword" and "auth.username" properties in your forge config or using BITBUCKET_APP_PASSWORD and BITBUCKET_USERNAME environment variables');
throw new Error('In order to publish to Bitbucket provide credentials, either through "auth.appPassword" and "auth.username" properties in your Forge config or using BITBUCKET_APP_PASSWORD and BITBUCKET_USERNAME environment variables');
}

for (const [index, makeResult] of makeResults.entries()) {
@@ -54,7 +54,7 @@ export default class PublisherBitbucket extends PublisherBase<PublisherBitbucket
});

if (response.status === 302) {
throw new Error(`Unable to publish "${fileName}" as it has been published previously. Use the "replaceExistingFiles" property in your forge config to override this.`);
throw new Error(`Unable to publish "${fileName}" as it has been published previously. Use the "replaceExistingFiles" property in your Forge config to override this.`);
}
}
});
@@ -37,7 +37,7 @@ export default class PublisherERS extends PublisherBase<PublisherERSConfig> {
const { config } = this;

if (!(config.baseUrl && config.username && config.password)) {
throw new Error('In order to publish to ERS you must set the "electronReleaseServer.baseUrl", "electronReleaseServer.username" and "electronReleaseServer.password" properties in your forge config. See the docs for more info');
throw new Error('In order to publish to ERS you must set the "electronReleaseServer.baseUrl", "electronReleaseServer.username" and "electronReleaseServer.password" properties in your Forge config. See the docs for more info');
}

d('attempting to authenticate to ERS');
@@ -40,7 +40,7 @@ export default class PublisherGithub extends PublisherBase<PublisherGitHubConfig

if (!(config.repository && typeof config.repository === 'object'
&& config.repository.owner && config.repository.name)) {
throw new Error('In order to publish to github you must set the "github_repository.owner" and "github_repository.name" properties in your forge config. See the docs for more info');
throw new Error('In order to publish to github you must set the "github_repository.owner" and "github_repository.name" properties in your Forge config. See the docs for more info');
}

const github = new GitHub(config.authToken, true, config.octokitOptions);
@@ -47,7 +47,7 @@ export default class PublisherS3 extends PublisherBase<PublisherS3Config> {
});

if (!s3Client.config.credentials || !config.bucket) {
throw new Error('In order to publish to s3 you must set the "s3.accessKeyId", "process.env.ELECTRON_FORGE_S3_SECRET_ACCESS_KEY" and "s3.bucket" properties in your forge config. See the docs for more info');
throw new Error('In order to publish to s3 you must set the "s3.accessKeyId", "process.env.ELECTRON_FORGE_S3_SECRET_ACCESS_KEY" and "s3.bucket" properties in your Forge config. See the docs for more info');
}

d('creating s3 client with options:', config);
@@ -17,7 +17,7 @@ class WebpackTemplate implements ForgeTemplate {
];

public initializeTemplate = async (directory: string) => {
await asyncOra('Setting up forge configuration', async () => {
await asyncOra('Setting up Forge configuration', async () => {
const pjPath = path.resolve(directory, 'package.json');
const currentPJ = await fs.readJson(pjPath);
currentPJ.main = '.webpack/main';
@@ -43,7 +43,7 @@ const asyncOra: AsyncOraMethod = (initialOraValue, asyncFn, processExitFn = proc
console.error(colors.red(err.message));
console.error(colors.red(err.stack));
} else {
console.error('\nElectron forge was terminated:'.red);
console.error('\nElectron Forge was terminated:'.red);
console.error(colors.red(typeof err === 'string' ? err : JSON.stringify(err)));
}
processExitFn(1);
@@ -1,7 +1,7 @@
{
"name": "@electron-forge/shared-types",
"version": "6.0.0-beta.41",
"description": "Shared types across forge",
"description": "Shared types across Electron Forge",
"repository": "https://github.com/electron-userland/electron-forge",
"author": "Samuel Attard",
"license": "MIT",

0 comments on commit 1d19b32

Please sign in to comment.
You can’t perform that action at this time.