fix(core): update

This commit is contained in:
2024-06-21 19:48:43 +02:00
commit 84a10a89de
109 changed files with 11639 additions and 0 deletions

37
ts/mod_deprecate/index.ts Normal file
View File

@ -0,0 +1,37 @@
import * as plugins from './mod.plugins.js';
import { logger } from '../gitzone.logging.js';
export const run = async () => {
const smartInteract = new plugins.smartinteract.SmartInteract([
{
name: `oldPackageName`,
message: `Whats the name of the OLD package?`,
type: `input`,
default: ``,
validate: (stringInput) => {
return stringInput !== '' && !process.env.CI;
},
},
{
name: `newPackageName`,
message: `Whats the name of the NEW package?`,
type: `input`,
default: ``,
validate: (stringInput) => {
return stringInput !== '' && !process.env.CI;
},
},
]);
const answerBucket = await smartInteract.runQueue();
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!!!"`
);
};

View File

@ -0,0 +1,6 @@
export * from '../plugins.js';
import * as smartinteract from '@push.rocks/smartinteract';
import * as smartshell from '@push.rocks/smartshell';
export { smartinteract, smartshell };