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:
8
ts/00_commitinfo_data.ts
Normal file
8
ts/00_commitinfo_data.ts
Normal 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'
|
||||
}
|
||||
@@ -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 = {};
|
||||
|
||||
@@ -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> => {
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user