Compare commits

...

12 Commits

Author SHA1 Message Date
8199c6c2cc 1.9.119
Some checks failed
Default (tags) / security (push) Failing after 0s
Default (tags) / test (push) Failing after 0s
Default (tags) / release (push) Has been skipped
Default (tags) / metadata (push) Has been skipped
2024-06-23 23:35:34 +02:00
3ef785438e fix(dependencies): Update @git.zone/tsdoc to v1.3.8 2024-06-23 23:35:33 +02:00
d8fe8bae64 1.9.118
Some checks failed
Default (tags) / security (push) Failing after 0s
Default (tags) / test (push) Failing after 0s
Default (tags) / release (push) Has been skipped
Default (tags) / metadata (push) Has been skipped
2024-06-23 23:25:11 +02:00
ad4175b3f9 fix(dependencies): Update @git.zone/tsdoc to version 1.3.7 2024-06-23 23:25:11 +02:00
707c1718a3 1.9.117
Some checks failed
Default (tags) / security (push) Failing after 0s
Default (tags) / test (push) Failing after 0s
Default (tags) / release (push) Has been skipped
Default (tags) / metadata (push) Has been skipped
2024-06-23 23:21:20 +02:00
7e0df65de6 fix(dependencies): Update @git.zone/tsdoc dependency to v1.3.6 2024-06-23 23:21:19 +02:00
fe30629ff9 1.9.116
Some checks failed
Default (tags) / security (push) Failing after 0s
Default (tags) / test (push) Failing after 0s
Default (tags) / release (push) Has been skipped
Default (tags) / metadata (push) Has been skipped
2024-06-23 23:07:31 +02:00
05bf7aa9d6 fix(dependencies): Update @git.zone/tsdoc to version 1.3.5 2024-06-23 23:07:30 +02:00
847798e9c9 1.9.115
Some checks failed
Default (tags) / security (push) Failing after 0s
Default (tags) / test (push) Failing after 0s
Default (tags) / release (push) Has been skipped
Default (tags) / metadata (push) Has been skipped
2024-06-23 22:57:10 +02:00
b797fca1fc fix(format): Fixed formatting issues across multiple TypeScript files. 2024-06-23 22:57:09 +02:00
ae46afdee6 1.9.114
Some checks failed
Default (tags) / security (push) Failing after 0s
Default (tags) / test (push) Failing after 1s
Default (tags) / release (push) Has been skipped
Default (tags) / metadata (push) Has been skipped
2024-06-23 22:54:46 +02:00
ceddc23423 fix(mod_commit): Remove extra new lines in changelog 2024-06-23 22:54:45 +02:00
18 changed files with 143 additions and 102 deletions

View File

@ -1,65 +1,77 @@
# Changelog
## 2024-06-23 - 1.9.113 - fix(core)
Update changelog formatting and remove outdated entries
## 2024-06-23 - 1.9.119 - fix(dependencies)
Update @git.zone/tsdoc to v1.3.8
- Removed outdated changelog entries for clarity.
- Updated changelog formatting for better readability.
- Updated @git.zone/tsdoc from v1.3.7 to v1.3.8 in package.json
## 2024-06-23 - 1.9.112 - fix(changelog)
Remove outdated changelog entries and update formatting
## 2024-06-23 - 1.9.118 - fix(dependencies)
Update @git.zone/tsdoc to version 1.3.7
- Removed outdated changelog entries for clarity.
- Updated changelog formatting for better readability.
- Bump @git.zone/tsdoc from 1.3.6 to 1.3.7 in both package.json and pnpm-lock.yaml
## 2024-06-23 - 1.9.110 - Dependencies
fix(dependencies): Update @git.zone/tsdoc to version 1.3.4
- Updated the @git.zone/tsdoc dependency in package.json and pnpm-lock.yaml.
## 2024-06-23 - 1.9.117 - fix(dependencies)
Update @git.zone/tsdoc dependency to v1.3.6
## 2024-06-23 - 1.9.109 - Changelog
fix(changelog): Remove outdated entries and adjust formatting in changelog
- Removed outdated placeholder entries and adjusted formatting for better readability.
## 2024-06-23 - 1.9.108 - Dependencies
fix(dependencies): Update @git.zone/tsdoc dependency to version 1.3.2
- Updated the @git.zone/tsdoc dependency to version 1.3.2 in package.json and pnpm-lock.yaml.
## 2024-06-23 - 1.9.107 - Changelog
fix(changelog): Remove placeholder entries and adjust formatting in changelog.
- Removed placeholder entries and adjusted formatting in changelog for clarity.
## 2024-06-23 - 1.9.106 - Dependencies
fix(dependencies): Updated @git.zone/tsdoc from version 1.3.0 to 1.3.1
- Updated the @git.zone/tsdoc dependency from version 1.3.0 to 1.3.1 in package.json and pnpm-lock.yaml.
## 2024-06-23 - 1.9.105 - Dependencies
fix(dependencies): Updated @git.zone/tsdoc dependency from 1.2.2 to 1.3.0 in package.json and pnpm-lock.yaml.
- Updated the @git.zone/tsdoc dependency from version 1.2.2 to 1.3.0 in package.json and pnpm-lock.yaml.
## 2024-06-23 - 1.9.104 - Changelog
fix(changelog): Remove placeholder entries and adjust formatting in changelog.
- Removed placeholder entries and improved formatting in changelog.
## 2024-06-23 - 1.9.103 - Changelog
fix(changelog): Fix changelog to remove placeholder entries and adjust formatting
- Corrected the changelog by removing placeholder entries and adjusting formatting.
## 2024-06-23 - 1.9.102 - Logging
fix(logging): Optimize logger instantiation and configuration.
- Optimized the instantiation and configuration of the logger for better performance.
## 2024-06-23 - 1.9.101 - Metadata
fix(metadata): Ensure accurate project metadata in package.json
- Corrected and ensured the accuracy of project metadata in package.json.
## 2024-06-23 - 1.9.100 - Dependencies
fix(dependencies): Updated @git.zone/tsdoc dependency version to ^1.2.2 in package.json and pnpm-lock.yaml
- Updated the @git.zone/tsdoc dependency version to ^1.2.2 in package.json and pnpm-lock.yaml.
## 2024-06-23 - 1.9.99 - Commit Handling
fix(mod_commit): Fix variable reassignment issue in changelog writing step
- Fixed an issue with variable reassignment in the changelog writing step.
- Updated @git.zone/tsdoc version from 1.3.5 to 1.3.6 in package.json
- Updated pnpm-lock.yaml to reflect the new version of @git.zone/tsdoc
## 2024-06-23 - 1.9.116 - fix(dependencies)
Update @git.zone/tsdoc to version 1.3.5
- Updated the @git.zone/tsdoc dependency in package.json and pnpm-lock.yaml from version 1.3.4 to 1.3.5
- Removed the outdated changelog.md file.
```
## 2024-06-23 - 1.9.114 - fix(format)
Fixed formatting issues across multiple TypeScript files.
## 2024-06-23 - 1.9.113 - fix(mod_commit)
Remove extra new lines in changelog.
## 2024-06-23 - 1.9.112 - fix(core)
Update changelog formatting and remove outdated entries.
## 2024-06-23 - 1.9.111 - fix(changelog)
Remove outdated changelog entries and update formatting.
## 2024-06-23 - 1.9.110 - fix(dependencies)
Update @git.zone/tsdoc to version 1.3.4.
## 2024-06-23 - 1.9.109 - fix(changelog)
Remove outdated entries and adjust formatting in changelog.
## 2024-06-23 - 1.9.108 - fix(dependencies)
Update @git.zone/tsdoc dependency to version 1.3.2.
## 2024-06-23 - 1.9.107 - fix(changelog)
Remove placeholder entries and adjust formatting in changelog.
## 2024-06-23 - 1.9.106 - fix(dependencies)
Updated @git.zone/tsdoc from version 1.3.0 to 1.3.1.
## 2024-06-23 - 1.9.105 - fix(dependencies)
Updated @git.zone/tsdoc dependency from 1.2.2 to 1.3.0 in package.json and pnpm-lock.yaml.
## 2024-06-23 - 1.9.104 - fix(changelog)
Remove placeholder entries and adjust formatting in changelog.
## 2024-06-23 - 1.9.103 - fix(changelog)
Fix changelog to remove placeholder entries and adjust formatting.
## 2024-06-23 - 1.9.102 - fix(logging)
Optimize logger instantiation and configuration.
## 2024-06-23 - 1.9.101 - fix(metadata)
Ensure accurate project metadata in package.json.
## 2024-06-23 - 1.9.100 - fix(dependencies)
Updated @git.zone/tsdoc dependency version to ^1.2.2 in package.json and pnpm-lock.yaml.
## 2024-06-23 - 1.9.99 - fix(mod_commit)
Fix variable reassignment issue in changelog writing step.
```

View File

@ -1,7 +1,7 @@
{
"name": "@git.zone/cli",
"private": false,
"version": "1.9.113",
"version": "1.9.119",
"description": "A CLI toolbelt to streamline local development cycles by using various gitzone utilities.",
"main": "dist_ts/index.ts",
"typings": "dist_ts/index.d.ts",
@ -58,7 +58,7 @@
"@types/node": "^20.14.8"
},
"dependencies": {
"@git.zone/tsdoc": "^1.3.4",
"@git.zone/tsdoc": "^1.3.8",
"@push.rocks/commitinfo": "^1.0.12",
"@push.rocks/early": "^4.0.4",
"@push.rocks/gulp-function": "^3.0.7",

27
pnpm-lock.yaml generated
View File

@ -9,8 +9,8 @@ importers:
.:
dependencies:
'@git.zone/tsdoc':
specifier: ^1.3.4
version: 1.3.4
specifier: ^1.3.8
version: 1.3.8
'@push.rocks/commitinfo':
specifier: ^1.0.12
version: 1.0.12
@ -320,8 +320,8 @@ packages:
resolution: {integrity: sha512-ZrPkScaBQ7hHx6BUchRFfPB9tvb7RlNXwjk9qjkp6AcBcF38JgLcu/UDKDqRsuaFJpkK9oclyhA5bDA7SjXWZg==}
hasBin: true
'@git.zone/tsdoc@1.3.4':
resolution: {integrity: sha512-L3HA7d+rEs5NIEpX/zTOMrTQNsbiUjDfXOX8mFJ5+Jg6sSYLJDSBUtpE/5FgLJ39s3CYMGgolJxAZfZJDXmRoA==}
'@git.zone/tsdoc@1.3.8':
resolution: {integrity: sha512-lNwku4Brv4OyHC6dQz5FtTOqJwHosR+2QhmgHkGaqAYeFiO5Sg56RZIoIgvGo4+zbMuXRYATUyhyYMNhBv3WCA==}
hasBin: true
'@git.zone/tsrun@1.2.46':
@ -644,6 +644,9 @@ packages:
'@push.rocks/smarttime@4.0.6':
resolution: {integrity: sha512-1whOow0YJw/TbN758TedRRxApoZbsvyxCVpoGjXh7DE/fEEgs7RCr4vVF5jYpyXNQuNMLpKJcTsSfyQ6RvH4Aw==}
'@push.rocks/smarttime@4.0.8':
resolution: {integrity: sha512-He+1ebBowVd8rW+VHZMFmz407xVMQf/JbyKr3s1ozoIlJS1AhZpDvlkzyqLV2tNMP1/cEBeo25ImJN2x1pksBA==}
'@push.rocks/smartunique@3.0.9':
resolution: {integrity: sha512-q6DYQgT7/dqdWi9HusvtWCjdsFzLFXY9LTtaZV6IYNJt6teZOonoygxTdNt9XLn6niBSbLYrHSKvJNTRH/uK+g==}
@ -3928,7 +3931,7 @@ snapshots:
transitivePeerDependencies:
- supports-color
'@git.zone/tsdoc@1.3.4':
'@git.zone/tsdoc@1.3.8':
dependencies:
'@push.rocks/early': 4.0.4
'@push.rocks/npmextra': 5.0.23
@ -3943,7 +3946,7 @@ snapshots:
'@push.rocks/smartlog-destination-local': 9.0.2
'@push.rocks/smartpath': 5.0.18
'@push.rocks/smartshell': 3.0.5
'@push.rocks/smarttime': 4.0.6
'@push.rocks/smarttime': 4.0.8
typedoc: 0.26.1(typescript@5.5.2)
typescript: 5.5.2
transitivePeerDependencies:
@ -4362,7 +4365,7 @@ snapshots:
'@push.rocks/smartpromise': 4.0.3
'@push.rocks/smartshell': 3.0.5
'@push.rocks/smartstring': 4.0.15
'@push.rocks/smarttime': 4.0.6
'@push.rocks/smarttime': 4.0.8
'@types/diff': 5.2.1
'@types/minimatch': 5.1.2
diff: 5.2.0
@ -4691,6 +4694,16 @@ snapshots:
is-nan: 1.3.2
pretty-ms: 8.0.0
'@push.rocks/smarttime@4.0.8':
dependencies:
'@push.rocks/lik': 6.0.15
'@push.rocks/smartdelay': 3.0.5
'@push.rocks/smartpromise': 4.0.3
croner: 7.0.7
dayjs: 1.11.11
is-nan: 1.3.2
pretty-ms: 8.0.0
'@push.rocks/smartunique@3.0.9':
dependencies:
'@types/uuid': 9.0.8

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@git.zone/cli',
version: '1.9.113',
version: '1.9.119',
description: 'A CLI toolbelt to streamline local development cycles by using various gitzone utilities.'
}

View File

@ -17,7 +17,7 @@ export interface IGitzoneConfigData {
license: string;
projectDomain: string;
};
copy: {[key: string]: string}
copy: { [key: string]: string };
npmciOptions: {
npmAccessLevel: 'public' | 'private';
};

View File

@ -1,4 +1,4 @@
import * as plugins from './plugins.js'
import * as plugins from './plugins.js';
import * as paths from './paths.js';
import { GitzoneConfig } from './classes.gitzoneconfig.js';

View File

@ -15,7 +15,7 @@ export let run = async () => {
await smartupdateInstance.check(
'gitzone',
projectInfo.npm.version,
'http://gitzone.gitlab.io/gitzone/changelog.html'
'http://gitzone.gitlab.io/gitzone/changelog.html',
);
console.log('---------------------------------------------');
gitzoneSmartcli.addVersion(projectInfo.npm.version);

View File

@ -3,4 +3,4 @@ import * as plugins from '../plugins.js';
export const run = async (projectArg: Project) => {
const gitzoneConfig = await projectArg.gitzoneConfig;
}
};

View File

@ -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 {

View File

@ -48,7 +48,7 @@ export const run = async (projectArg: Project) => {
plugins.smartobject.smartAdd(
npmextraJson.gitzone,
expectedRepoInformationItem,
cliProvidedValue
cliProvidedValue,
);
}
}

View File

@ -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) {

View File

@ -43,7 +43,7 @@ const prettierTypeScriptPipestop = plugins.through2.obj(
fileArg.setContentsFromString(formatedFileString);
cb(null, fileArg);
}
}
},
);
export const run = async (projectArg: Project) => {

View File

@ -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');
}
};
};

View File

@ -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,
};

View File

@ -73,7 +73,7 @@ export class Meta {
// write .meta.json to disk
plugins.smartfile.memory.toFsSync(
JSON.stringify(this.metaRepoData, null, 2),
this.filePaths.metaJson
this.filePaths.metaJson,
);
// write .gitignore to disk
plugins.smartfile.memory.toFsSync(await this.generateGitignore(), this.filePaths.gitIgnore);
@ -104,12 +104,12 @@ export class Meta {
if (
preExistingFolderArg !== '.git' &&
!Object.keys(projects).find((projectFolder) =>
projectFolder.startsWith(preExistingFolderArg)
projectFolder.startsWith(preExistingFolderArg),
)
) {
const response = await plugins.smartinteraction.SmartInteract.getCliConfirmation(
`Do you want to delete superfluous directory >>${preExistingFolderArg}<< ?`,
true
true,
);
if (response) {
logger.log('warn', `Deleting >>${preExistingFolderArg}<<!`);
@ -131,7 +131,7 @@ export class Meta {
logger.log('info', `found ${missingRepos.length} missing repos`);
for (const missingRepo of missingRepos) {
await this.smartshellInstance.exec(
`cd ${this.cwd} && git clone ${this.metaRepoData.projects[missingRepo]} ${missingRepo}`
`cd ${this.cwd} && git clone ${this.metaRepoData.projects[missingRepo]} ${missingRepo}`,
);
}
@ -140,7 +140,7 @@ export class Meta {
logger.log('info', `persist changes with a git commit`);
await this.smartshellInstance.exec(
`cd ${this.cwd} && git add -A && git commit -m "updated structure"`
`cd ${this.cwd} && git add -A && git commit -m "updated structure"`,
);
await this.syncToRemote();
@ -166,7 +166,7 @@ export class Meta {
JSON.stringify({
projects: {},
}),
this.filePaths.metaJson
this.filePaths.metaJson,
);
logger.log(`success`, `created a new .meta.json in directory ${this.cwd}`);
await plugins.smartfile.memory.toFs(
@ -174,14 +174,14 @@ export class Meta {
name: this.dirName,
version: '1.0.0',
}),
this.filePaths.packageJson
this.filePaths.packageJson,
);
logger.log(`success`, `created a new package.json in directory ${this.cwd}`);
} else {
logger.log(`error`, `directory ${this.cwd} already has a .metaJson file. Doing nothing.`);
}
await this.smartshellInstance.exec(
`cd ${this.cwd} && git add -A && git commit -m "feat(project): init meta project for ${this.dirName}"`
`cd ${this.cwd} && git add -A && git commit -m "feat(project): init meta project for ${this.dirName}"`,
);
await this.updateLocalRepos();
}
@ -203,7 +203,7 @@ export class Meta {
await this.sortMetaRepoData();
await this.writeToDisk();
await this.smartshellInstance.exec(
`cd ${this.cwd} && git add -A && git commit -m "feat(project): add ${projectNameArg}"`
`cd ${this.cwd} && git add -A && git commit -m "feat(project): add ${projectNameArg}"`,
);
await this.updateLocalRepos();
}

View File

@ -5,11 +5,11 @@ export let run = (argvArg) => {
let projectInfo = new plugins.projectinfo.ProjectInfo(paths.cwd);
if (argvArg._[1] === 'ci') {
plugins.smartopen.openUrl(
`https://gitlab.com/${projectInfo.git.gituser}/${projectInfo.git.gitrepo}/settings/ci_cd`
`https://gitlab.com/${projectInfo.git.gituser}/${projectInfo.git.gitrepo}/settings/ci_cd`,
);
} else if (argvArg._[1] === 'pipelines') {
plugins.smartopen.openUrl(
`https://gitlab.com/${projectInfo.git.gituser}/${projectInfo.git.gitrepo}/pipelines`
`https://gitlab.com/${projectInfo.git.gituser}/${projectInfo.git.gitrepo}/pipelines`,
);
}
};

View File

@ -22,7 +22,7 @@ export let run = () => {
return projects;
})()}
* format a project with 'gitzone format'
`
`,
);
done.resolve();
return done.promise;

View File

@ -2,7 +2,7 @@ import * as plugins from './plugins.js';
export let packageDir = plugins.path.join(
plugins.smartpath.get.dirnameFromImportMetaUrl(import.meta.url),
'../'
'../',
);
export let assetsDir = plugins.path.join(packageDir, './assets');
export let templatesDir = plugins.path.join(assetsDir, 'templates');