Compare commits
34 Commits
Author | SHA1 | Date | |
---|---|---|---|
fe30629ff9 | |||
05bf7aa9d6 | |||
847798e9c9 | |||
b797fca1fc | |||
ae46afdee6 | |||
ceddc23423 | |||
4f8ca3fe5e | |||
947fe781d8 | |||
1c7fbb073d | |||
9b05252045 | |||
f34718bfb3 | |||
0db0b17e0d | |||
7c4dffd142 | |||
d716364cb0 | |||
53cb139277 | |||
5c0834aa48 | |||
a2df347ee3 | |||
632bdd7847 | |||
5135be478f | |||
5fc9bb0245 | |||
a3b7a33bc2 | |||
51fd699965 | |||
45020805cb | |||
c9e384567e | |||
152b436096 | |||
99f88236cb | |||
af0cb494fd | |||
dc43deece9 | |||
2361bfcad4 | |||
bb1e0a5679 | |||
5463f6e459 | |||
49729595b6 | |||
3f5a2f92d4 | |||
53eb47672c |
58
changelog.md
Normal file
58
changelog.md
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
# Changelog
|
||||||
|
|
||||||
|
## 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.
|
||||||
|
```
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@git.zone/cli",
|
"name": "@git.zone/cli",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.9.99",
|
"version": "1.9.116",
|
||||||
"description": "A CLI toolbelt to streamline local development cycles by using various gitzone utilities.",
|
"description": "A CLI toolbelt to streamline local development cycles by using various gitzone utilities.",
|
||||||
"main": "dist_ts/index.ts",
|
"main": "dist_ts/index.ts",
|
||||||
"typings": "dist_ts/index.d.ts",
|
"typings": "dist_ts/index.d.ts",
|
||||||
@ -58,7 +58,7 @@
|
|||||||
"@types/node": "^20.14.8"
|
"@types/node": "^20.14.8"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@git.zone/tsdoc": "^1.1.40",
|
"@git.zone/tsdoc": "^1.3.5",
|
||||||
"@push.rocks/commitinfo": "^1.0.12",
|
"@push.rocks/commitinfo": "^1.0.12",
|
||||||
"@push.rocks/early": "^4.0.4",
|
"@push.rocks/early": "^4.0.4",
|
||||||
"@push.rocks/gulp-function": "^3.0.7",
|
"@push.rocks/gulp-function": "^3.0.7",
|
||||||
|
28
pnpm-lock.yaml
generated
28
pnpm-lock.yaml
generated
@ -9,8 +9,8 @@ importers:
|
|||||||
.:
|
.:
|
||||||
dependencies:
|
dependencies:
|
||||||
'@git.zone/tsdoc':
|
'@git.zone/tsdoc':
|
||||||
specifier: ^1.1.40
|
specifier: ^1.3.5
|
||||||
version: 1.1.40
|
version: 1.3.5
|
||||||
'@push.rocks/commitinfo':
|
'@push.rocks/commitinfo':
|
||||||
specifier: ^1.0.12
|
specifier: ^1.0.12
|
||||||
version: 1.0.12
|
version: 1.0.12
|
||||||
@ -320,8 +320,8 @@ packages:
|
|||||||
resolution: {integrity: sha512-ZrPkScaBQ7hHx6BUchRFfPB9tvb7RlNXwjk9qjkp6AcBcF38JgLcu/UDKDqRsuaFJpkK9oclyhA5bDA7SjXWZg==}
|
resolution: {integrity: sha512-ZrPkScaBQ7hHx6BUchRFfPB9tvb7RlNXwjk9qjkp6AcBcF38JgLcu/UDKDqRsuaFJpkK9oclyhA5bDA7SjXWZg==}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
|
|
||||||
'@git.zone/tsdoc@1.1.40':
|
'@git.zone/tsdoc@1.3.5':
|
||||||
resolution: {integrity: sha512-lYkHYGZNAPLvr5BIAZ6pHPnYNBLmic4cFdWk7KRxuK+e38JQO22TCdMeUiBOBd+iRQ9P/ZiuOPoU68aS5nJLIA==}
|
resolution: {integrity: sha512-EdH2xpQmf7A7Ur6fq643HRnr+MeEEwMR0sWamTJ8qvAxEk7T+LypnPmDig5tCNIbfVBU2v4wrewiZAddA7aQCQ==}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
|
|
||||||
'@git.zone/tsrun@1.2.46':
|
'@git.zone/tsrun@1.2.46':
|
||||||
@ -517,8 +517,8 @@ packages:
|
|||||||
'@push.rocks/smartfm@2.0.4':
|
'@push.rocks/smartfm@2.0.4':
|
||||||
resolution: {integrity: sha512-5cDSW/+85mI+9lVkiivQKfq+HHdbXz+Vv8rKYX6/4yNpyJup+0YDlrtqnCXSp683cJd/gfGLVX/eNN9LIGe4Nw==}
|
resolution: {integrity: sha512-5cDSW/+85mI+9lVkiivQKfq+HHdbXz+Vv8rKYX6/4yNpyJup+0YDlrtqnCXSp683cJd/gfGLVX/eNN9LIGe4Nw==}
|
||||||
|
|
||||||
'@push.rocks/smartgit@3.0.4':
|
'@push.rocks/smartgit@3.1.0':
|
||||||
resolution: {integrity: sha512-6uYifD4rGjTp6KO8kdaVenXeef0uZOfQSTuLuG3+ubpMXwZNSp0iQWx+XgS5pQipzG0+3p4ddnQ7/R8gm7LWOg==}
|
resolution: {integrity: sha512-a3LbECFQSURkJc9t8CGJrzv7ZzfG1c83x424nb6jfj3jVJXCqjMvs1AkmpkUiro77J7yg4CavTu8vslAfrPIOw==}
|
||||||
|
|
||||||
'@push.rocks/smartguard@3.0.2':
|
'@push.rocks/smartguard@3.0.2':
|
||||||
resolution: {integrity: sha512-9TuYPSRxNj0DS84d5ZvSARXRehVCqVq7nC85o/p58kb3aeRtY0A6Hz9dtSdFjEvprEBCqEEzdmiFlNsNYBpwbQ==}
|
resolution: {integrity: sha512-9TuYPSRxNj0DS84d5ZvSARXRehVCqVq7nC85o/p58kb3aeRtY0A6Hz9dtSdFjEvprEBCqEEzdmiFlNsNYBpwbQ==}
|
||||||
@ -2175,8 +2175,8 @@ packages:
|
|||||||
resolution: {integrity: sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==}
|
resolution: {integrity: sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==}
|
||||||
engines: {node: '>=16'}
|
engines: {node: '>=16'}
|
||||||
|
|
||||||
isomorphic-git@1.26.1:
|
isomorphic-git@1.26.2:
|
||||||
resolution: {integrity: sha512-bBZCORcyVf3yLCI10iDwpVnzTaXsMSHZ7m2DnhDLMa40SCiyuRpU7TqdYSdGpaAmxmcOL4zMmZWDxfWZOjK1yg==}
|
resolution: {integrity: sha512-swKxfDm/GyaU5ojGwKtfs3EiHwlUf3iP1iIHPduaJHA5y1cIzMDFo3ogwdW6i00UmAjYQNKyF2BZgj/jz58/2A==}
|
||||||
engines: {node: '>=12'}
|
engines: {node: '>=12'}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
|
|
||||||
@ -3928,7 +3928,7 @@ snapshots:
|
|||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
'@git.zone/tsdoc@1.1.40':
|
'@git.zone/tsdoc@1.3.5':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@push.rocks/early': 4.0.4
|
'@push.rocks/early': 4.0.4
|
||||||
'@push.rocks/npmextra': 5.0.23
|
'@push.rocks/npmextra': 5.0.23
|
||||||
@ -3937,12 +3937,13 @@ snapshots:
|
|||||||
'@push.rocks/smartcli': 4.0.11
|
'@push.rocks/smartcli': 4.0.11
|
||||||
'@push.rocks/smartdelay': 3.0.5
|
'@push.rocks/smartdelay': 3.0.5
|
||||||
'@push.rocks/smartfile': 11.0.20
|
'@push.rocks/smartfile': 11.0.20
|
||||||
'@push.rocks/smartgit': 3.0.4
|
'@push.rocks/smartgit': 3.1.0
|
||||||
'@push.rocks/smartinteract': 2.0.15
|
'@push.rocks/smartinteract': 2.0.15
|
||||||
'@push.rocks/smartlog': 3.0.7
|
'@push.rocks/smartlog': 3.0.7
|
||||||
'@push.rocks/smartlog-destination-local': 9.0.2
|
'@push.rocks/smartlog-destination-local': 9.0.2
|
||||||
'@push.rocks/smartpath': 5.0.18
|
'@push.rocks/smartpath': 5.0.18
|
||||||
'@push.rocks/smartshell': 3.0.5
|
'@push.rocks/smartshell': 3.0.5
|
||||||
|
'@push.rocks/smarttime': 4.0.6
|
||||||
typedoc: 0.26.1(typescript@5.5.2)
|
typedoc: 0.26.1(typescript@5.5.2)
|
||||||
typescript: 5.5.2
|
typescript: 5.5.2
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
@ -4353,7 +4354,7 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
gray-matter: 4.0.3
|
gray-matter: 4.0.3
|
||||||
|
|
||||||
'@push.rocks/smartgit@3.0.4':
|
'@push.rocks/smartgit@3.1.0':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@push.rocks/smartenv': 5.0.12
|
'@push.rocks/smartenv': 5.0.12
|
||||||
'@push.rocks/smartfile': 11.0.20
|
'@push.rocks/smartfile': 11.0.20
|
||||||
@ -4361,10 +4362,11 @@ snapshots:
|
|||||||
'@push.rocks/smartpromise': 4.0.3
|
'@push.rocks/smartpromise': 4.0.3
|
||||||
'@push.rocks/smartshell': 3.0.5
|
'@push.rocks/smartshell': 3.0.5
|
||||||
'@push.rocks/smartstring': 4.0.15
|
'@push.rocks/smartstring': 4.0.15
|
||||||
|
'@push.rocks/smarttime': 4.0.6
|
||||||
'@types/diff': 5.2.1
|
'@types/diff': 5.2.1
|
||||||
'@types/minimatch': 5.1.2
|
'@types/minimatch': 5.1.2
|
||||||
diff: 5.2.0
|
diff: 5.2.0
|
||||||
isomorphic-git: 1.26.1
|
isomorphic-git: 1.26.2
|
||||||
|
|
||||||
'@push.rocks/smartguard@3.0.2':
|
'@push.rocks/smartguard@3.0.2':
|
||||||
dependencies:
|
dependencies:
|
||||||
@ -6506,7 +6508,7 @@ snapshots:
|
|||||||
|
|
||||||
isexe@3.1.1: {}
|
isexe@3.1.1: {}
|
||||||
|
|
||||||
isomorphic-git@1.26.1:
|
isomorphic-git@1.26.2:
|
||||||
dependencies:
|
dependencies:
|
||||||
async-lock: 1.4.1
|
async-lock: 1.4.1
|
||||||
clean-git-ref: 2.0.1
|
clean-git-ref: 2.0.1
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* autocreated commitinfo by @pushrocks/commitinfo
|
* autocreated commitinfo by @push.rocks/commitinfo
|
||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@git.zone/cli',
|
name: '@git.zone/cli',
|
||||||
version: '1.9.99',
|
version: '1.9.116',
|
||||||
description: 'A CLI toolbelt to streamline local development cycles by using various gitzone utilities.'
|
description: 'A CLI toolbelt to streamline local development cycles by using various gitzone utilities.'
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@ export interface IGitzoneConfigData {
|
|||||||
license: string;
|
license: string;
|
||||||
projectDomain: string;
|
projectDomain: string;
|
||||||
};
|
};
|
||||||
copy: {[key: string]: string}
|
copy: { [key: string]: string };
|
||||||
npmciOptions: {
|
npmciOptions: {
|
||||||
npmAccessLevel: 'public' | 'private';
|
npmAccessLevel: 'public' | 'private';
|
||||||
};
|
};
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import * as plugins from './plugins.js'
|
import * as plugins from './plugins.js';
|
||||||
import * as paths from './paths.js';
|
import * as paths from './paths.js';
|
||||||
|
|
||||||
import { GitzoneConfig } from './classes.gitzoneconfig.js';
|
import { GitzoneConfig } from './classes.gitzoneconfig.js';
|
||||||
|
@ -15,7 +15,7 @@ export let run = async () => {
|
|||||||
await smartupdateInstance.check(
|
await smartupdateInstance.check(
|
||||||
'gitzone',
|
'gitzone',
|
||||||
projectInfo.npm.version,
|
projectInfo.npm.version,
|
||||||
'http://gitzone.gitlab.io/gitzone/changelog.html'
|
'http://gitzone.gitlab.io/gitzone/changelog.html',
|
||||||
);
|
);
|
||||||
console.log('---------------------------------------------');
|
console.log('---------------------------------------------');
|
||||||
gitzoneSmartcli.addVersion(projectInfo.npm.version);
|
gitzoneSmartcli.addVersion(projectInfo.npm.version);
|
||||||
|
@ -1,15 +1,6 @@
|
|||||||
|
import { commitinfo } from '@push.rocks/commitinfo';
|
||||||
import * as plugins from './plugins.js';
|
import * as plugins from './plugins.js';
|
||||||
|
|
||||||
export const logger = new plugins.smartlog.Smartlog({
|
export const logger = plugins.smartlog.Smartlog.createForCommitinfo(commitinfo);
|
||||||
minimumLogLevel: 'silly',
|
|
||||||
logContext: {
|
|
||||||
company: 'Task Venture Capital GmbH',
|
|
||||||
companyunit: 'Lossless Cloud',
|
|
||||||
containerName: 'local',
|
|
||||||
environment: 'local',
|
|
||||||
runtime: 'node',
|
|
||||||
zone: 'gitzone',
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
logger.addLogDestination(new plugins.smartlogDestinationLocal.DestinationLocal());
|
logger.addLogDestination(new plugins.smartlogDestinationLocal.DestinationLocal());
|
||||||
|
@ -70,9 +70,11 @@ export const run = async (argvArg: any) => {
|
|||||||
await commitInfo.writeIntoPotentialDirs();
|
await commitInfo.writeIntoPotentialDirs();
|
||||||
|
|
||||||
logger.log('info', `Writing changelog.md ...`);
|
logger.log('info', `Writing changelog.md ...`);
|
||||||
const changelog = nextCommitObject.changelog;
|
let changelog = nextCommitObject.changelog;
|
||||||
changelog.replaceAll('{{nextVersion}}', (await commitInfo.getNextPlannedVersion()).versionString);
|
changelog = changelog.replaceAll('{{nextVersion}}', (await commitInfo.getNextPlannedVersion()).versionString);
|
||||||
changelog.replaceAll('{{nextVersionMessage}}', commitString);
|
changelog = changelog.replaceAll('{{nextVersionScope}}', `${await answerBucket.getAnswerFor('commitType')}(${await answerBucket.getAnswerFor('commitScope')})`);
|
||||||
|
changelog = changelog.replaceAll('{{nextVersionMessage}}', nextCommitObject.recommendedNextVersionMessage);
|
||||||
|
changelog = changelog.replaceAll('{{nextVersionDetails}}', '- ' + nextCommitObject.recommendedNextVersionDetails.join('\n- '));
|
||||||
|
|
||||||
await plugins.smartfile.memory.toFs(changelog, plugins.path.join(paths.cwd, `changelog.md`));
|
await plugins.smartfile.memory.toFs(changelog, plugins.path.join(paths.cwd, `changelog.md`));
|
||||||
|
|
||||||
|
@ -3,4 +3,4 @@ import * as plugins from '../plugins.js';
|
|||||||
|
|
||||||
export const run = async (projectArg: Project) => {
|
export const run = async (projectArg: Project) => {
|
||||||
const gitzoneConfig = await projectArg.gitzoneConfig;
|
const gitzoneConfig = await projectArg.gitzoneConfig;
|
||||||
}
|
};
|
||||||
|
@ -4,20 +4,21 @@ import { Project } from '../classes.project.js';
|
|||||||
|
|
||||||
import { logger } from '../gitzone.logging.js';
|
import { logger } from '../gitzone.logging.js';
|
||||||
|
|
||||||
const incompatibleLicenses: string[] = [
|
const incompatibleLicenses: string[] = ['AGPL', 'GPL', 'SSPL'];
|
||||||
"AGPL",
|
|
||||||
"GPL",
|
|
||||||
"SSPL",
|
|
||||||
];
|
|
||||||
|
|
||||||
export const run = async (projectArg: Project) => {
|
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) {
|
if (!nodeModulesInstalled) {
|
||||||
logger.log('warn', 'No node_modules found. Skipping license check');
|
logger.log('warn', 'No node_modules found. Skipping license check');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const licenseChecker = await plugins.smartlegal.createLicenseChecker();
|
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) {
|
if (licenseCheckResult.failingModules.length === 0) {
|
||||||
logger.log('info', 'Success -> licenses passed!');
|
logger.log('info', 'Success -> licenses passed!');
|
||||||
} else {
|
} else {
|
||||||
|
@ -48,7 +48,7 @@ export const run = async (projectArg: Project) => {
|
|||||||
plugins.smartobject.smartAdd(
|
plugins.smartobject.smartAdd(
|
||||||
npmextraJson.gitzone,
|
npmextraJson.gitzone,
|
||||||
expectedRepoInformationItem,
|
expectedRepoInformationItem,
|
||||||
cliProvidedValue
|
cliProvidedValue,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@ const ensureDependency = async (
|
|||||||
packageJsonObjectArg: any,
|
packageJsonObjectArg: any,
|
||||||
position: 'dep' | 'devDep' | 'everywhere',
|
position: 'dep' | 'devDep' | 'everywhere',
|
||||||
constraint: 'exclude' | 'include' | 'latest',
|
constraint: 'exclude' | 'include' | 'latest',
|
||||||
dependencyArg: string
|
dependencyArg: string,
|
||||||
) => {};
|
) => {};
|
||||||
|
|
||||||
export const run = async (projectArg: Project) => {
|
export const run = async (projectArg: Project) => {
|
||||||
@ -26,14 +26,13 @@ export const run = async (projectArg: Project) => {
|
|||||||
|
|
||||||
// metadata
|
// metadata
|
||||||
packageJson.repository = {
|
packageJson.repository = {
|
||||||
"type": "git",
|
type: 'git',
|
||||||
"url": `git+https://${gitzoneData.module.githost}/${gitzoneData.module.gitscope}/${gitzoneData.module.gitrepo}.git`
|
url: `git+https://${gitzoneData.module.githost}/${gitzoneData.module.gitscope}/${gitzoneData.module.gitrepo}.git`,
|
||||||
};
|
};
|
||||||
packageJson.bugs = {
|
(packageJson.bugs = {
|
||||||
"url": `https://${gitzoneData.module.githost}/${gitzoneData.module.gitscope}/${gitzoneData.module.gitrepo}/issues`
|
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.homepage = `https://${gitzoneData.module.githost}/${gitzoneData.module.gitscope}/${gitzoneData.module.gitrepo}#readme`);
|
||||||
|
|
||||||
|
|
||||||
// Check for module type
|
// Check for module type
|
||||||
if (!packageJson.type) {
|
if (!packageJson.type) {
|
||||||
|
@ -43,7 +43,7 @@ const prettierTypeScriptPipestop = plugins.through2.obj(
|
|||||||
fileArg.setContentsFromString(formatedFileString);
|
fileArg.setContentsFromString(formatedFileString);
|
||||||
cb(null, fileArg);
|
cb(null, fileArg);
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
export const run = async (projectArg: Project) => {
|
export const run = async (projectArg: Project) => {
|
||||||
|
@ -8,7 +8,10 @@ export const run = async () => {
|
|||||||
// Check and initialize readme.md if it doesn't exist
|
// Check and initialize readme.md if it doesn't exist
|
||||||
const readmeExists = await plugins.smartfile.fs.fileExists(readmePath);
|
const readmeExists = await plugins.smartfile.fs.fileExists(readmePath);
|
||||||
if (!readmeExists) {
|
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');
|
console.log('Initialized readme.md');
|
||||||
} else {
|
} else {
|
||||||
console.log('readme.md already exists');
|
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
|
// Check and initialize readme.hints.md if it doesn't exist
|
||||||
const readmeHintsExists = await plugins.smartfile.fs.fileExists(readmeHintsPath);
|
const readmeHintsExists = await plugins.smartfile.fs.fileExists(readmeHintsPath);
|
||||||
if (!readmeHintsExists) {
|
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');
|
console.log('Initialized readme.hints.md');
|
||||||
} else {
|
} else {
|
||||||
console.log('readme.hints.md already exists');
|
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 smartstream from '@push.rocks/smartstream';
|
||||||
import * as through2 from 'through2';
|
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,
|
||||||
|
};
|
||||||
|
@ -73,7 +73,7 @@ export class Meta {
|
|||||||
// write .meta.json to disk
|
// write .meta.json to disk
|
||||||
plugins.smartfile.memory.toFsSync(
|
plugins.smartfile.memory.toFsSync(
|
||||||
JSON.stringify(this.metaRepoData, null, 2),
|
JSON.stringify(this.metaRepoData, null, 2),
|
||||||
this.filePaths.metaJson
|
this.filePaths.metaJson,
|
||||||
);
|
);
|
||||||
// write .gitignore to disk
|
// write .gitignore to disk
|
||||||
plugins.smartfile.memory.toFsSync(await this.generateGitignore(), this.filePaths.gitIgnore);
|
plugins.smartfile.memory.toFsSync(await this.generateGitignore(), this.filePaths.gitIgnore);
|
||||||
@ -104,12 +104,12 @@ export class Meta {
|
|||||||
if (
|
if (
|
||||||
preExistingFolderArg !== '.git' &&
|
preExistingFolderArg !== '.git' &&
|
||||||
!Object.keys(projects).find((projectFolder) =>
|
!Object.keys(projects).find((projectFolder) =>
|
||||||
projectFolder.startsWith(preExistingFolderArg)
|
projectFolder.startsWith(preExistingFolderArg),
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
const response = await plugins.smartinteraction.SmartInteract.getCliConfirmation(
|
const response = await plugins.smartinteraction.SmartInteract.getCliConfirmation(
|
||||||
`Do you want to delete superfluous directory >>${preExistingFolderArg}<< ?`,
|
`Do you want to delete superfluous directory >>${preExistingFolderArg}<< ?`,
|
||||||
true
|
true,
|
||||||
);
|
);
|
||||||
if (response) {
|
if (response) {
|
||||||
logger.log('warn', `Deleting >>${preExistingFolderArg}<<!`);
|
logger.log('warn', `Deleting >>${preExistingFolderArg}<<!`);
|
||||||
@ -131,7 +131,7 @@ export class Meta {
|
|||||||
logger.log('info', `found ${missingRepos.length} missing repos`);
|
logger.log('info', `found ${missingRepos.length} missing repos`);
|
||||||
for (const missingRepo of missingRepos) {
|
for (const missingRepo of missingRepos) {
|
||||||
await this.smartshellInstance.exec(
|
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`);
|
logger.log('info', `persist changes with a git commit`);
|
||||||
await this.smartshellInstance.exec(
|
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();
|
await this.syncToRemote();
|
||||||
|
|
||||||
@ -166,7 +166,7 @@ export class Meta {
|
|||||||
JSON.stringify({
|
JSON.stringify({
|
||||||
projects: {},
|
projects: {},
|
||||||
}),
|
}),
|
||||||
this.filePaths.metaJson
|
this.filePaths.metaJson,
|
||||||
);
|
);
|
||||||
logger.log(`success`, `created a new .meta.json in directory ${this.cwd}`);
|
logger.log(`success`, `created a new .meta.json in directory ${this.cwd}`);
|
||||||
await plugins.smartfile.memory.toFs(
|
await plugins.smartfile.memory.toFs(
|
||||||
@ -174,14 +174,14 @@ export class Meta {
|
|||||||
name: this.dirName,
|
name: this.dirName,
|
||||||
version: '1.0.0',
|
version: '1.0.0',
|
||||||
}),
|
}),
|
||||||
this.filePaths.packageJson
|
this.filePaths.packageJson,
|
||||||
);
|
);
|
||||||
logger.log(`success`, `created a new package.json in directory ${this.cwd}`);
|
logger.log(`success`, `created a new package.json in directory ${this.cwd}`);
|
||||||
} else {
|
} else {
|
||||||
logger.log(`error`, `directory ${this.cwd} already has a .metaJson file. Doing nothing.`);
|
logger.log(`error`, `directory ${this.cwd} already has a .metaJson file. Doing nothing.`);
|
||||||
}
|
}
|
||||||
await this.smartshellInstance.exec(
|
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();
|
await this.updateLocalRepos();
|
||||||
}
|
}
|
||||||
@ -203,7 +203,7 @@ export class Meta {
|
|||||||
await this.sortMetaRepoData();
|
await this.sortMetaRepoData();
|
||||||
await this.writeToDisk();
|
await this.writeToDisk();
|
||||||
await this.smartshellInstance.exec(
|
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();
|
await this.updateLocalRepos();
|
||||||
}
|
}
|
||||||
|
@ -5,11 +5,11 @@ export let run = (argvArg) => {
|
|||||||
let projectInfo = new plugins.projectinfo.ProjectInfo(paths.cwd);
|
let projectInfo = new plugins.projectinfo.ProjectInfo(paths.cwd);
|
||||||
if (argvArg._[1] === 'ci') {
|
if (argvArg._[1] === 'ci') {
|
||||||
plugins.smartopen.openUrl(
|
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') {
|
} else if (argvArg._[1] === 'pipelines') {
|
||||||
plugins.smartopen.openUrl(
|
plugins.smartopen.openUrl(
|
||||||
`https://gitlab.com/${projectInfo.git.gituser}/${projectInfo.git.gitrepo}/pipelines`
|
`https://gitlab.com/${projectInfo.git.gituser}/${projectInfo.git.gitrepo}/pipelines`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -22,7 +22,7 @@ export let run = () => {
|
|||||||
return projects;
|
return projects;
|
||||||
})()}
|
})()}
|
||||||
* format a project with 'gitzone format'
|
* format a project with 'gitzone format'
|
||||||
`
|
`,
|
||||||
);
|
);
|
||||||
done.resolve();
|
done.resolve();
|
||||||
return done.promise;
|
return done.promise;
|
||||||
|
@ -2,7 +2,7 @@ import * as plugins from './plugins.js';
|
|||||||
|
|
||||||
export let packageDir = plugins.path.join(
|
export let packageDir = plugins.path.join(
|
||||||
plugins.smartpath.get.dirnameFromImportMetaUrl(import.meta.url),
|
plugins.smartpath.get.dirnameFromImportMetaUrl(import.meta.url),
|
||||||
'../'
|
'../',
|
||||||
);
|
);
|
||||||
export let assetsDir = plugins.path.join(packageDir, './assets');
|
export let assetsDir = plugins.path.join(packageDir, './assets');
|
||||||
export let templatesDir = plugins.path.join(assetsDir, 'templates');
|
export let templatesDir = plugins.path.join(assetsDir, 'templates');
|
||||||
|
Reference in New Issue
Block a user