fix(deps): Update dependencies

This commit is contained in:
2025-12-13 23:44:25 +00:00
parent ea0c026c7e
commit 2a91662e63
10 changed files with 1300 additions and 2386 deletions

View File

@@ -39,10 +39,10 @@ export class GitzoneConfig {
public async readConfigFromCwd() {
const npmextraInstance = new plugins.npmextra.Npmextra(paths.cwd);
this.data = npmextraInstance.dataFor<IGitzoneConfigData>('gitzone', {});
this.data = npmextraInstance.dataFor<IGitzoneConfigData>('@git.zone/cli', {});
this.data.npmciOptions = npmextraInstance.dataFor<
IGitzoneConfigData['npmciOptions']
>('npmci', {
>('@ship.zone/szci', {
npmAccessLevel: 'public',
});
}

View File

@@ -3,6 +3,29 @@ import * as paths from '../paths.js';
import * as gulpFunction from '@push.rocks/gulp-function';
import { Project } from '../classes.project.js';
/**
* Migrates npmextra.json from old namespace keys to new package-scoped keys
*/
const migrateNamespaceKeys = (npmextraJson: any): boolean => {
let migrated = false;
const migrations = [
{ oldKey: 'gitzone', newKey: '@git.zone/cli' },
{ oldKey: 'tsdoc', newKey: '@git.zone/tsdoc' },
{ oldKey: 'npmdocker', newKey: '@git.zone/tsdocker' },
{ oldKey: 'npmci', newKey: '@ship.zone/szci' },
{ oldKey: 'szci', newKey: '@ship.zone/szci' },
];
for (const { oldKey, newKey } of migrations) {
if (npmextraJson[oldKey] && !npmextraJson[newKey]) {
npmextraJson[newKey] = npmextraJson[oldKey];
delete npmextraJson[oldKey];
migrated = true;
console.log(`Migrated npmextra.json: ${oldKey} -> ${newKey}`);
}
}
return migrated;
};
/**
* runs the npmextra file checking
*/
@@ -13,8 +36,11 @@ export const run = async (projectArg: Project) => {
const fileString = fileArg.contents.toString();
const npmextraJson = JSON.parse(fileString);
if (!npmextraJson.gitzone) {
npmextraJson.gitzone = {};
// Migrate old namespace keys to new package-scoped keys
migrateNamespaceKeys(npmextraJson);
if (!npmextraJson['@git.zone/cli']) {
npmextraJson['@git.zone/cli'] = {};
}
const expectedRepoInformation: string[] = [
@@ -31,7 +57,7 @@ export const run = async (projectArg: Project) => {
for (const expectedRepoInformationItem of expectedRepoInformation) {
if (
!plugins.smartobject.smartGet(
npmextraJson.gitzone,
npmextraJson['@git.zone/cli'],
expectedRepoInformationItem,
)
) {
@@ -53,7 +79,7 @@ export const run = async (projectArg: Project) => {
);
if (cliProvidedValue) {
plugins.smartobject.smartAdd(
npmextraJson.gitzone,
npmextraJson['@git.zone/cli'],
expectedRepoInformationItem,
cliProvidedValue,
);
@@ -63,8 +89,8 @@ export const run = async (projectArg: Project) => {
// delete obsolete
// tbd
if (!npmextraJson.npmci) {
npmextraJson.npmci = {};
if (!npmextraJson['@ship.zone/szci']) {
npmextraJson['@ship.zone/szci'] = {};
}
fileArg.setContentsFromString(JSON.stringify(npmextraJson, null, 2));

View File

@@ -74,7 +74,7 @@ export const run = async (projectArg: Project) => {
plugins.smartgulp.src([`package.json`]),
gulpFunction.forEach(async (fileArg: plugins.smartfile.SmartFile) => {
const npmextraConfig = new plugins.npmextra.Npmextra(paths.cwd);
const gitzoneData: any = npmextraConfig.dataFor('gitzone', {});
const gitzoneData: any = npmextraConfig.dataFor('@git.zone/cli', {});
const fileString = fileArg.contents.toString();
const packageJson = JSON.parse(fileString);

View File

@@ -41,7 +41,7 @@ export let run = async (
// Get configuration from npmextra
const npmextraConfig = new plugins.npmextra.Npmextra();
const formatConfig = npmextraConfig.dataFor<any>('gitzone.format', {
const formatConfig = npmextraConfig.dataFor<any>('@git.zone/cli.format', {
interactive: true,
showDiffs: false,
autoApprove: false,

View File

@@ -43,7 +43,7 @@ export class ServiceManager {
*/
private async loadServiceConfiguration(): Promise<void> {
const npmextraConfig = new plugins.npmextra.Npmextra(process.cwd());
const gitzoneConfig = npmextraConfig.dataFor<any>('gitzone', {});
const gitzoneConfig = npmextraConfig.dataFor<any>('@git.zone/cli', {});
// Check if services array exists
if (!gitzoneConfig.services || !Array.isArray(gitzoneConfig.services) || gitzoneConfig.services.length === 0) {
@@ -84,11 +84,11 @@ export class ServiceManager {
npmextraData = JSON.parse(content as string);
}
// Update gitzone.services
if (!npmextraData.gitzone) {
npmextraData.gitzone = {};
// Update @git.zone/cli.services
if (!npmextraData['@git.zone/cli']) {
npmextraData['@git.zone/cli'] = {};
}
npmextraData.gitzone.services = services;
npmextraData['@git.zone/cli'].services = services;
// Write back to npmextra.json
await plugins.smartfs