fix(core): Migrate to @git.zone / @push.rocks packages, replace smartfile with smartfs and adapt filesystem usage; update dev deps and remove CI/lint config

This commit is contained in:
2025-11-22 18:07:39 +00:00
parent ac386f01e0
commit 08d32f0370
13 changed files with 9117 additions and 127 deletions

8
ts/00_commitinfo_data.ts Normal file
View File

@@ -0,0 +1,8 @@
/**
* autocreated commitinfo by @push.rocks/commitinfo
*/
export const commitinfo = {
name: '@gitzone/tsdocker',
version: '1.2.41',
description: 'develop npm modules cross platform with docker'
}

View File

@@ -1,5 +1,6 @@
import * as plugins from './tsdocker.plugins';
import * as paths from './tsdocker.paths';
import * as fs from 'fs';
export interface IConfig {
baseImage: string;
@@ -11,7 +12,7 @@ export interface IConfig {
const getQenvKeyValueObject = async () => {
let qenvKeyValueObjectArray: { [key: string]: string | number };
if (plugins.smartfile.fs.fileExistsSync(plugins.path.join(paths.cwd, 'qenv.yml'))) {
if (fs.existsSync(plugins.path.join(paths.cwd, 'qenv.yml'))) {
qenvKeyValueObjectArray = new plugins.qenv.Qenv(paths.cwd, '.nogit/').keyValueObject;
} else {
qenvKeyValueObjectArray = {};

View File

@@ -43,7 +43,7 @@ const checkDocker = () => {
/**
* builds the Dockerfile according to the config in the project
*/
const buildDockerFile = () => {
const buildDockerFile = async () => {
const done = plugins.smartpromise.defer();
ora.text('building Dockerfile...');
const dockerfile: string = snippets.dockerfileSnippet({
@@ -52,7 +52,7 @@ const buildDockerFile = () => {
});
logger.log('info', `Base image is: ${config.baseImage}`);
logger.log('info', `Command is: ${config.command}`);
plugins.smartfile.memory.toFsSync(dockerfile, plugins.path.join(paths.cwd, 'npmdocker'));
await plugins.smartfs.file(plugins.path.join(paths.cwd, 'npmdocker')).write(dockerfile);
logger.log('ok', 'Dockerfile created!');
ora.stop();
done.resolve();
@@ -148,7 +148,7 @@ const postClean = async () => {
.then(async () => {
logger.log('ok', 'cleaned up!');
});
plugins.smartfile.fs.removeSync(paths.npmdockerFile);
await plugins.smartfs.file(paths.npmdockerFile).delete();
};
export let run = async (configArg: IConfig): Promise<IConfig> => {

View File

@@ -1,8 +1,9 @@
import * as plugins from './tsdocker.plugins';
import * as fs from 'fs';
// directories
export let cwd = process.cwd();
export let packageBase = plugins.path.join(__dirname, '../');
export let assets = plugins.path.join(packageBase, 'assets/');
plugins.smartfile.fs.ensureDirSync(assets);
fs.mkdirSync(assets, { recursive: true });
export let npmdockerFile = plugins.path.join(cwd, 'npmdocker');

View File

@@ -1,17 +1,20 @@
// pushrocks scope
import * as npmextra from '@pushrocks/npmextra';
// push.rocks scope
import * as npmextra from '@push.rocks/npmextra';
import * as path from 'path';
import * as projectinfo from '@pushrocks/projectinfo';
import * as smartpromise from '@pushrocks/smartpromise';
import * as qenv from '@pushrocks/qenv';
import * as smartcli from '@pushrocks/smartcli';
import * as smartfile from '@pushrocks/smartfile';
import * as smartlog from '@pushrocks/smartlog';
import * as smartlogDestinationLocal from '@pushrocks/smartlog-destination-local';
import * as smartlogSouceOra from '@pushrocks/smartlog-source-ora';
import * as smartopen from '@pushrocks/smartopen';
import * as smartshell from '@pushrocks/smartshell';
import * as smartstring from '@pushrocks/smartstring';
import * as projectinfo from '@push.rocks/projectinfo';
import * as smartpromise from '@push.rocks/smartpromise';
import * as qenv from '@push.rocks/qenv';
import * as smartcli from '@push.rocks/smartcli';
import { SmartFs, SmartFsProviderNode } from '@push.rocks/smartfs';
import * as smartlog from '@push.rocks/smartlog';
import * as smartlogDestinationLocal from '@push.rocks/smartlog-destination-local';
import * as smartlogSouceOra from '@push.rocks/smartlog-source-ora';
import * as smartopen from '@push.rocks/smartopen';
import * as smartshell from '@push.rocks/smartshell';
import * as smartstring from '@push.rocks/smartstring';
// Create smartfs instance
export const smartfs = new SmartFs(new SmartFsProviderNode());
export {
npmextra,
@@ -20,7 +23,6 @@ export {
smartpromise,
qenv,
smartcli,
smartfile,
smartlog,
smartlogDestinationLocal,
smartlogSouceOra,