Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
b1fbd38dba | |||
fad5e046d3 | |||
eb1498c242 | |||
6b3d4d1ecf | |||
16ea9bb8bd | |||
7e7aa098f9 | |||
df4350d29d | |||
81eb713dee |
@ -1,8 +1,8 @@
|
||||
---
|
||||
fileName: {{module.name}}.classes.{{module.name}}db.ts
|
||||
fileName: classes.{{module.name}}db.ts
|
||||
---
|
||||
import * as plugins from './{{module.name}}.plugins.js';
|
||||
import { {{module.name}} } from './{{module.name}}.classes.{{module.name}}.js';
|
||||
import { {{module.name}} } from './classes.{{module.name}}.js';
|
||||
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
---
|
||||
fileName: {{module.name}}.classes.{{module.name}}.ts
|
||||
fileName: classes.{{module.name}}.ts
|
||||
---
|
||||
import * as plugins from './{{module.name}}.plugins.js';
|
||||
import * as paths from './{{module.name}}.paths.js';
|
||||
import { {{module.name}}Db } from './{{module.name}}.db.js'
|
||||
import { {{module.name}}Db } from './classes.{{module.name}}db.js'
|
||||
|
||||
export class {{module.name}} {
|
||||
public projectinfo: plugins.projectinfo.ProjectInfo;
|
@ -15,8 +15,7 @@ export {
|
||||
loleServiceserver
|
||||
}
|
||||
|
||||
// pushrocks scope
|
||||
// pushrocks scope
|
||||
// @push.rocks scope
|
||||
import * as projectinfo from '@push.rocks/projectinfo';
|
||||
import * as qenv from '@push.rocks/qenv';
|
||||
import * as smartdata from '@push.rocks/smartdata';
|
||||
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"experimentalDecorators": true,
|
||||
"emitDecoratorMetadata": true,
|
||||
"useDefineForClassFields": false,
|
||||
"target": "ES2022",
|
||||
"module": "NodeNext",
|
||||
|
23
changelog.md
23
changelog.md
@ -1,5 +1,28 @@
|
||||
# Changelog
|
||||
|
||||
## 2025-01-17 - 1.12.0 - feat(build)
|
||||
Update TypeScript configuration to support emit decorator metadata
|
||||
|
||||
- Added emitDecoratorMetadata to the tsconfig.json template in assets/templates/tsconfig_update.
|
||||
|
||||
## 2025-01-08 - 1.11.0 - feat(cli)
|
||||
Add Docker command for cleaning up Docker system and extend deprecation command for multiple registries
|
||||
|
||||
- Added a new command 'docker' to handle Docker system cleanup operations.
|
||||
- Improved the 'deprecate' command to support deprecating packages across multiple npm registry URLs.
|
||||
|
||||
## 2025-01-01 - 1.10.10 - fix(templates)
|
||||
Corrected typo in template file comment
|
||||
|
||||
- Fixed repeated comment in the template file for services under 'assets/templates/service/ts/some.plugins.ts'.
|
||||
|
||||
## 2025-01-01 - 1.10.9 - fix(templates)
|
||||
Correct template file paths and organization for service projects
|
||||
|
||||
- Moved 'some.classes.some.ts' to 'classes.some.ts'
|
||||
- Moved 'some.classes.some.db.ts' to 'classes.some.db.ts'
|
||||
- Resolved incorrect import paths in service templates
|
||||
|
||||
## 2025-01-01 - 1.10.8 - fix(assets/templates)
|
||||
Update CI template configurations to use module.githost
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@git.zone/cli",
|
||||
"private": false,
|
||||
"version": "1.10.8",
|
||||
"version": "1.12.0",
|
||||
"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",
|
||||
|
@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@git.zone/cli',
|
||||
version: '1.10.8',
|
||||
version: '1.12.0',
|
||||
description: 'A CLI toolbelt to streamline local development cycles by using various gitzone utilities.'
|
||||
}
|
||||
|
@ -48,6 +48,14 @@ export let run = async () => {
|
||||
await modDeprecate.run();
|
||||
});
|
||||
|
||||
/**
|
||||
* docker
|
||||
*/
|
||||
gitzoneSmartcli.addCommand('docker').subscribe(async (argvArg) => {
|
||||
const modDocker = await import('./mod_docker/index.js');
|
||||
await modDocker.run(argvArg);
|
||||
});
|
||||
|
||||
/**
|
||||
* Update all files that comply with the gitzone standard
|
||||
*/
|
||||
|
@ -4,6 +4,15 @@ import { logger } from '../gitzone.logging.js';
|
||||
|
||||
export const run = async () => {
|
||||
const smartInteract = new plugins.smartinteract.SmartInteract([
|
||||
{
|
||||
name: `registryUrls`,
|
||||
message: `What are the comma separated registry URLs?`,
|
||||
type: `input`,
|
||||
default: `https://registry.npmjs.org`,
|
||||
validate: (stringInput) => {
|
||||
return stringInput !== '' && !process.env.CI;
|
||||
},
|
||||
},
|
||||
{
|
||||
name: `oldPackageName`,
|
||||
message: `Whats the name of the OLD package?`,
|
||||
@ -24,14 +33,17 @@ export const run = async () => {
|
||||
},
|
||||
]);
|
||||
const answerBucket = await smartInteract.runQueue();
|
||||
const registryUrls = answerBucket.getAnswerFor(`registryUrls`).split(',');
|
||||
const oldPackageName = answerBucket.getAnswerFor(`oldPackageName`);
|
||||
const newPackageName = answerBucket.getAnswerFor(`newPackageName`);
|
||||
logger.log('info', `Deprecating package ${oldPackageName} in favour of ${newPackageName}`);
|
||||
const smartshellInstance = new plugins.smartshell.Smartshell({
|
||||
executor: 'bash',
|
||||
});
|
||||
await smartshellInstance.exec(
|
||||
`npm deprecate ${oldPackageName}@* ` +
|
||||
`"${oldPackageName} has been deprecated in favour of ${newPackageName} - please upgrade asap!!!"`
|
||||
);
|
||||
for (const registryUrl of registryUrls) {
|
||||
await smartshellInstance.exec(
|
||||
`npm deprecate ${oldPackageName}@* ` +
|
||||
`"${oldPackageName} has been deprecated in favour of ${newPackageName} - please upgrade asap!!!" --registry ${registryUrl}`,
|
||||
);
|
||||
}
|
||||
};
|
||||
|
12
ts/mod_docker/index.ts
Normal file
12
ts/mod_docker/index.ts
Normal file
@ -0,0 +1,12 @@
|
||||
import * as plugins from './mod.plugins.js';
|
||||
|
||||
export const run = async (argvArg) => {
|
||||
const smartshellInstance = new plugins.smartshell.Smartshell({
|
||||
executor: 'bash',
|
||||
});
|
||||
switch (argvArg._[1]) {
|
||||
case 'prune':
|
||||
await smartshellInstance.exec(`docker system prune -a -f --volumes`);
|
||||
break;
|
||||
}
|
||||
};
|
4
ts/mod_docker/mod.plugins.ts
Normal file
4
ts/mod_docker/mod.plugins.ts
Normal file
@ -0,0 +1,4 @@
|
||||
export * from '../plugins.js';
|
||||
|
||||
import * as smartshell from '@push.rocks/smartshell';
|
||||
export { smartshell };
|
Reference in New Issue
Block a user