fix(format): Fixed formatting issues across multiple TypeScript files.
This commit is contained in:
@ -3,4 +3,4 @@ import * as plugins from '../plugins.js';
|
||||
|
||||
export const run = async (projectArg: Project) => {
|
||||
const gitzoneConfig = await projectArg.gitzoneConfig;
|
||||
}
|
||||
};
|
||||
|
@ -4,20 +4,21 @@ import { Project } from '../classes.project.js';
|
||||
|
||||
import { logger } from '../gitzone.logging.js';
|
||||
|
||||
const incompatibleLicenses: string[] = [
|
||||
"AGPL",
|
||||
"GPL",
|
||||
"SSPL",
|
||||
];
|
||||
const incompatibleLicenses: string[] = ['AGPL', 'GPL', 'SSPL'];
|
||||
|
||||
export const run = async (projectArg: Project) => {
|
||||
const nodeModulesInstalled = await plugins.smartfile.fs.isDirectory(plugins.path.join(paths.cwd, 'node_modules'));
|
||||
const nodeModulesInstalled = await plugins.smartfile.fs.isDirectory(
|
||||
plugins.path.join(paths.cwd, 'node_modules'),
|
||||
);
|
||||
if (!nodeModulesInstalled) {
|
||||
logger.log('warn', 'No node_modules found. Skipping license check');
|
||||
return;
|
||||
}
|
||||
const licenseChecker = await plugins.smartlegal.createLicenseChecker();
|
||||
const licenseCheckResult = await licenseChecker.excludeLicenseWithinPath(paths.cwd, incompatibleLicenses);
|
||||
const licenseCheckResult = await licenseChecker.excludeLicenseWithinPath(
|
||||
paths.cwd,
|
||||
incompatibleLicenses,
|
||||
);
|
||||
if (licenseCheckResult.failingModules.length === 0) {
|
||||
logger.log('info', 'Success -> licenses passed!');
|
||||
} else {
|
||||
|
@ -48,7 +48,7 @@ export const run = async (projectArg: Project) => {
|
||||
plugins.smartobject.smartAdd(
|
||||
npmextraJson.gitzone,
|
||||
expectedRepoInformationItem,
|
||||
cliProvidedValue
|
||||
cliProvidedValue,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ const ensureDependency = async (
|
||||
packageJsonObjectArg: any,
|
||||
position: 'dep' | 'devDep' | 'everywhere',
|
||||
constraint: 'exclude' | 'include' | 'latest',
|
||||
dependencyArg: string
|
||||
dependencyArg: string,
|
||||
) => {};
|
||||
|
||||
export const run = async (projectArg: Project) => {
|
||||
@ -26,14 +26,13 @@ export const run = async (projectArg: Project) => {
|
||||
|
||||
// metadata
|
||||
packageJson.repository = {
|
||||
"type": "git",
|
||||
"url": `git+https://${gitzoneData.module.githost}/${gitzoneData.module.gitscope}/${gitzoneData.module.gitrepo}.git`
|
||||
type: 'git',
|
||||
url: `git+https://${gitzoneData.module.githost}/${gitzoneData.module.gitscope}/${gitzoneData.module.gitrepo}.git`,
|
||||
};
|
||||
packageJson.bugs = {
|
||||
"url": `https://${gitzoneData.module.githost}/${gitzoneData.module.gitscope}/${gitzoneData.module.gitrepo}/issues`
|
||||
},
|
||||
packageJson.homepage = `https://${gitzoneData.module.githost}/${gitzoneData.module.gitscope}/${gitzoneData.module.gitrepo}#readme`;
|
||||
|
||||
(packageJson.bugs = {
|
||||
url: `https://${gitzoneData.module.githost}/${gitzoneData.module.gitscope}/${gitzoneData.module.gitrepo}/issues`,
|
||||
}),
|
||||
(packageJson.homepage = `https://${gitzoneData.module.githost}/${gitzoneData.module.gitscope}/${gitzoneData.module.gitrepo}#readme`);
|
||||
|
||||
// Check for module type
|
||||
if (!packageJson.type) {
|
||||
|
@ -43,7 +43,7 @@ const prettierTypeScriptPipestop = plugins.through2.obj(
|
||||
fileArg.setContentsFromString(formatedFileString);
|
||||
cb(null, fileArg);
|
||||
}
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
export const run = async (projectArg: Project) => {
|
||||
|
@ -8,7 +8,10 @@ export const run = async () => {
|
||||
// Check and initialize readme.md if it doesn't exist
|
||||
const readmeExists = await plugins.smartfile.fs.fileExists(readmePath);
|
||||
if (!readmeExists) {
|
||||
await plugins.smartfile.fs.toFs('# Project Readme\n\nThis is the initial readme file.', readmePath);
|
||||
await plugins.smartfile.fs.toFs(
|
||||
'# Project Readme\n\nThis is the initial readme file.',
|
||||
readmePath,
|
||||
);
|
||||
console.log('Initialized readme.md');
|
||||
} else {
|
||||
console.log('readme.md already exists');
|
||||
@ -17,9 +20,12 @@ export const run = async () => {
|
||||
// Check and initialize readme.hints.md if it doesn't exist
|
||||
const readmeHintsExists = await plugins.smartfile.fs.fileExists(readmeHintsPath);
|
||||
if (!readmeHintsExists) {
|
||||
await plugins.smartfile.fs.toFs('# Project Readme Hints\n\nThis is the initial readme hints file.', readmeHintsPath);
|
||||
await plugins.smartfile.fs.toFs(
|
||||
'# Project Readme Hints\n\nThis is the initial readme hints file.',
|
||||
readmeHintsPath,
|
||||
);
|
||||
console.log('Initialized readme.hints.md');
|
||||
} else {
|
||||
console.log('readme.hints.md already exists');
|
||||
}
|
||||
};
|
||||
};
|
||||
|
@ -10,4 +10,14 @@ import * as smartnpm from '@push.rocks/smartnpm';
|
||||
import * as smartstream from '@push.rocks/smartstream';
|
||||
import * as through2 from 'through2';
|
||||
|
||||
export { lik, smartfile, smartgulp, smartinteract, smartlegal, smartobject, smartnpm, smartstream, through2 };
|
||||
export {
|
||||
lik,
|
||||
smartfile,
|
||||
smartgulp,
|
||||
smartinteract,
|
||||
smartlegal,
|
||||
smartobject,
|
||||
smartnpm,
|
||||
smartstream,
|
||||
through2,
|
||||
};
|
||||
|
Reference in New Issue
Block a user