From 52e85d61cdafd258a5d333ae884f16c1f7c182ad Mon Sep 17 00:00:00 2001 From: Philipp Kunz Date: Wed, 4 Dec 2024 22:44:43 +0100 Subject: [PATCH] remove compilation from git --- dist_ts/index.d.ts | 2 - dist_ts/index.js | 6 - dist_ts/interfaces/index.d.ts | 1 - dist_ts/interfaces/index.js | 2 - dist_ts/interfaces/interfaces.watchmodes.d.ts | 1 - dist_ts/interfaces/interfaces.watchmodes.js | 2 - dist_ts/tswatch.classes.parcel.d.ts | 3 - dist_ts/tswatch.classes.parcel.js | 44 ----- dist_ts/tswatch.classes.tswatch.d.ts | 17 -- dist_ts/tswatch.classes.tswatch.js | 169 ------------------ dist_ts/tswatch.classes.watcher.d.ts | 35 ---- dist_ts/tswatch.classes.watcher.js | 90 ---------- dist_ts/tswatch.cli.d.ts | 1 - dist_ts/tswatch.cli.js | 38 ---- dist_ts/tswatch.logging.d.ts | 2 - dist_ts/tswatch.logging.js | 14 -- dist_ts/tswatch.paths.d.ts | 1 - dist_ts/tswatch.paths.js | 3 - dist_ts/tswatch.plugins.d.ts | 16 -- dist_ts/tswatch.plugins.js | 21 --- ts/tswatch.classes.tswatch.ts | 2 +- 21 files changed, 1 insertion(+), 469 deletions(-) delete mode 100644 dist_ts/index.d.ts delete mode 100644 dist_ts/index.js delete mode 100644 dist_ts/interfaces/index.d.ts delete mode 100644 dist_ts/interfaces/index.js delete mode 100644 dist_ts/interfaces/interfaces.watchmodes.d.ts delete mode 100644 dist_ts/interfaces/interfaces.watchmodes.js delete mode 100644 dist_ts/tswatch.classes.parcel.d.ts delete mode 100644 dist_ts/tswatch.classes.parcel.js delete mode 100644 dist_ts/tswatch.classes.tswatch.d.ts delete mode 100644 dist_ts/tswatch.classes.tswatch.js delete mode 100644 dist_ts/tswatch.classes.watcher.d.ts delete mode 100644 dist_ts/tswatch.classes.watcher.js delete mode 100644 dist_ts/tswatch.cli.d.ts delete mode 100644 dist_ts/tswatch.cli.js delete mode 100644 dist_ts/tswatch.logging.d.ts delete mode 100644 dist_ts/tswatch.logging.js delete mode 100644 dist_ts/tswatch.paths.d.ts delete mode 100644 dist_ts/tswatch.paths.js delete mode 100644 dist_ts/tswatch.plugins.d.ts delete mode 100644 dist_ts/tswatch.plugins.js diff --git a/dist_ts/index.d.ts b/dist_ts/index.d.ts deleted file mode 100644 index 9aca970..0000000 --- a/dist_ts/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './tswatch.classes.tswatch.js'; -export * from './tswatch.cli.js'; diff --git a/dist_ts/index.js b/dist_ts/index.js deleted file mode 100644 index b13fabb..0000000 --- a/dist_ts/index.js +++ /dev/null @@ -1,6 +0,0 @@ -import * as early from '@push.rocks/early'; -early.start('tswatch'); -export * from './tswatch.classes.tswatch.js'; -export * from './tswatch.cli.js'; -early.stop(); -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssS0FBSyxNQUFNLG1CQUFtQixDQUFDO0FBQzNDLEtBQUssQ0FBQyxLQUFLLENBQUMsU0FBUyxDQUFDLENBQUM7QUFDdkIsY0FBYyw4QkFBOEIsQ0FBQztBQUM3QyxjQUFjLGtCQUFrQixDQUFDO0FBQ2pDLEtBQUssQ0FBQyxJQUFJLEVBQUUsQ0FBQyJ9 \ No newline at end of file diff --git a/dist_ts/interfaces/index.d.ts b/dist_ts/interfaces/index.d.ts deleted file mode 100644 index 1a24e02..0000000 --- a/dist_ts/interfaces/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './interfaces.watchmodes.js'; diff --git a/dist_ts/interfaces/index.js b/dist_ts/interfaces/index.js deleted file mode 100644 index 6ef66ec..0000000 --- a/dist_ts/interfaces/index.js +++ /dev/null @@ -1,2 +0,0 @@ -export * from './interfaces.watchmodes.js'; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9pbnRlcmZhY2VzL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsNEJBQTRCLENBQUMifQ== \ No newline at end of file diff --git a/dist_ts/interfaces/interfaces.watchmodes.d.ts b/dist_ts/interfaces/interfaces.watchmodes.d.ts deleted file mode 100644 index 510ed6e..0000000 --- a/dist_ts/interfaces/interfaces.watchmodes.d.ts +++ /dev/null @@ -1 +0,0 @@ -export type TWatchModes = 'test' | 'node' | 'service' | 'element' | 'website' | 'echo'; diff --git a/dist_ts/interfaces/interfaces.watchmodes.js b/dist_ts/interfaces/interfaces.watchmodes.js deleted file mode 100644 index 4c8a88a..0000000 --- a/dist_ts/interfaces/interfaces.watchmodes.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZXJmYWNlcy53YXRjaG1vZGVzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vdHMvaW50ZXJmYWNlcy9pbnRlcmZhY2VzLndhdGNobW9kZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9 \ No newline at end of file diff --git a/dist_ts/tswatch.classes.parcel.d.ts b/dist_ts/tswatch.classes.parcel.d.ts deleted file mode 100644 index cb6be9d..0000000 --- a/dist_ts/tswatch.classes.parcel.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare class Parcel { - start(): Promise; -} diff --git a/dist_ts/tswatch.classes.parcel.js b/dist_ts/tswatch.classes.parcel.js deleted file mode 100644 index c3ec5b4..0000000 --- a/dist_ts/tswatch.classes.parcel.js +++ /dev/null @@ -1,44 +0,0 @@ -"use strict"; -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const plugins = __importStar(require("./tswatch.plugins")); -const paths = __importStar(require("./tswatch.paths")); -class Parcel { - async start() { - const entryFiles = plugins.path.join(paths.cwd, './html/index.html'); - // Bundler options - const options = { - outDir: './dist_watch', - outFile: 'index.html', - publicUrl: '/', - watch: true, - cache: true, - cacheDir: '.nogit/.parcelcache', - contentHash: false, - global: 'moduleName', - minify: false, - scopeHoist: false, - target: 'browser', - bundleNodeModules: true, - https: null, - logLevel: 3, - hmr: true, - hmrPort: 3003, - sourceMaps: true, - hmrHostname: '', - detailedReport: false // Prints a detailed report of the bundles, assets, filesizes and times, defaults to false, reports are only printed if watch is disabled - }; - const bundler = new plugins.parcel(entryFiles, options); - // Run the bundler, this returns the main bundle - // Use the events if you're using watch mode as this promise will only trigger once and not for every rebuild - const bundle = await bundler.serve(3002); - } -} -exports.Parcel = Parcel; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHN3YXRjaC5jbGFzc2VzLnBhcmNlbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3Rzd2F0Y2guY2xhc3Nlcy5wYXJjZWwudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O0FBQUEsMkRBQTZDO0FBQzdDLHVEQUF5QztBQUV6QyxNQUFhLE1BQU07SUFDVixLQUFLLENBQUMsS0FBSztRQUNoQixNQUFNLFVBQVUsR0FBRyxPQUFPLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxLQUFLLENBQUMsR0FBRyxFQUFFLG1CQUFtQixDQUFDLENBQUM7UUFFckUsa0JBQWtCO1FBQ2xCLE1BQU0sT0FBTyxHQUFpQztZQUM1QyxNQUFNLEVBQUUsY0FBYztZQUN0QixPQUFPLEVBQUUsWUFBWTtZQUNyQixTQUFTLEVBQUUsR0FBRztZQUNkLEtBQUssRUFBRSxJQUFJO1lBQ1gsS0FBSyxFQUFFLElBQUk7WUFDWCxRQUFRLEVBQUUscUJBQXFCO1lBQy9CLFdBQVcsRUFBRSxLQUFLO1lBQ2xCLE1BQU0sRUFBRSxZQUFZO1lBQ3BCLE1BQU0sRUFBRSxLQUFLO1lBQ2IsVUFBVSxFQUFFLEtBQUs7WUFDakIsTUFBTSxFQUFFLFNBQVM7WUFDakIsaUJBQWlCLEVBQUUsSUFBSTtZQUN2QixLQUFLLEVBQUUsSUFBSTtZQUNYLFFBQVEsRUFBRSxDQUFDO1lBQ1gsR0FBRyxFQUFFLElBQUk7WUFDVCxPQUFPLEVBQUUsSUFBSTtZQUNiLFVBQVUsRUFBRSxJQUFJO1lBQ2hCLFdBQVcsRUFBRSxFQUFFO1lBQ2YsY0FBYyxFQUFFLEtBQUssQ0FBQyx5SUFBeUk7U0FDaEssQ0FBQztRQUVGLE1BQU0sT0FBTyxHQUFHLElBQUksT0FBTyxDQUFDLE1BQU0sQ0FBQyxVQUFVLEVBQUUsT0FBTyxDQUFDLENBQUM7UUFFeEQsZ0RBQWdEO1FBQ2hELDZHQUE2RztRQUM3RyxNQUFNLE1BQU0sR0FBRyxNQUFNLE9BQU8sQ0FBQyxLQUFLLENBQUMsSUFBSSxDQUFDLENBQUM7SUFDM0MsQ0FBQztDQUNGO0FBakNELHdCQWlDQyJ9 \ No newline at end of file diff --git a/dist_ts/tswatch.classes.tswatch.d.ts b/dist_ts/tswatch.classes.tswatch.d.ts deleted file mode 100644 index a5b243e..0000000 --- a/dist_ts/tswatch.classes.tswatch.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import * as plugins from './tswatch.plugins.js'; -import * as interfaces from './interfaces/index.js'; -import { Watcher } from './tswatch.classes.watcher.js'; -export declare class TsWatch { - watchmode: interfaces.TWatchModes; - watcherMap: plugins.lik.ObjectMap; - typedserver: plugins.typedserver.TypedServer; - constructor(watchmodeArg: interfaces.TWatchModes); - /** - * starts the TsWatch instance - */ - start(): Promise; - /** - * stops the execution of any active Watchers - */ - stop(): Promise; -} diff --git a/dist_ts/tswatch.classes.tswatch.js b/dist_ts/tswatch.classes.tswatch.js deleted file mode 100644 index 4c72a64..0000000 --- a/dist_ts/tswatch.classes.tswatch.js +++ /dev/null @@ -1,169 +0,0 @@ -import * as plugins from './tswatch.plugins.js'; -import * as paths from './tswatch.paths.js'; -import * as interfaces from './interfaces/index.js'; -import { Watcher } from './tswatch.classes.watcher.js'; -export class TsWatch { - constructor(watchmodeArg) { - this.watcherMap = new plugins.lik.ObjectMap(); - this.watchmode = watchmodeArg; - } - /** - * starts the TsWatch instance - */ - async start() { - const tsbundle = new plugins.tsbundle.TsBundle(); - const htmlHandler = new plugins.tsbundle.HtmlHandler(); - switch (this.watchmode) { - case 'test': - /** - * this strategy runs test whenever there is a change in the ts directory - */ - this.watcherMap.add(new Watcher({ - filePathToWatch: paths.cwd, - commandToExecute: 'npm run test2', - timeout: null, - })); - break; - case 'node': - this.watcherMap.add(new Watcher({ - filePathToWatch: paths.cwd, - commandToExecute: 'npm run test', - timeout: null, - })); - break; - case 'element': - (async () => { - /** - * this strategy runs a standard server and bundles the ts files to a dist_watch directory - */ - // lets create a standard server - console.log('bundling TypeScript files to "dist_watch" Note: This is for development only!'); - this.typedserver = new plugins.typedserver.TypedServer({ - cors: true, - injectReload: true, - serveDir: plugins.path.join(paths.cwd, './dist_watch/'), - port: 3002, - enableCompression: true, - preferredCompressionMethod: 'gzip', - }); - const bundleAndReloadElement = async () => { - await tsbundle.build(paths.cwd, './html/index.ts', './dist_watch/bundle.js', { - bundler: 'esbuild', - }); - await this.typedserver.reload(); - }; - this.watcherMap.add(new Watcher({ - filePathToWatch: plugins.path.join(paths.cwd, './ts_web/'), - functionToCall: async () => { - await bundleAndReloadElement(); - }, - timeout: null, - })); - // lets get the other ts folders - let tsfolders = await plugins.smartfile.fs.listFolders(paths.cwd); - tsfolders = tsfolders.filter((itemArg) => itemArg.startsWith('ts') && itemArg !== 'ts_web'); - const smartshellInstance = new plugins.smartshell.Smartshell({ - executor: 'bash', - }); - for (const tsfolder of tsfolders) { - this.watcherMap.add(new Watcher({ - filePathToWatch: plugins.path.join(paths.cwd, `./${tsfolder}/`), - functionToCall: async () => { - await smartshellInstance.exec(`npm run build`); - await this.typedserver.reload(); - }, - timeout: null, - })); - } - this.watcherMap.add(new Watcher({ - filePathToWatch: plugins.path.join(paths.cwd, './html/'), - functionToCall: async () => { - await htmlHandler.processHtml({ - from: plugins.path.join(paths.cwd, './html/index.html'), - to: plugins.path.join(paths.cwd, './dist_watch/index.html'), - minify: false, - }); - await bundleAndReloadElement(); - }, - timeout: null, - })); - })(); - break; - case 'website': - (async () => { - const bundleAndReloadWebsite = async () => { - await tsbundle.build(paths.cwd, './ts_web/index.ts', './dist_serve/bundle.js', { - bundler: 'esbuild', - }); - }; - let tsfolders = await plugins.smartfile.fs.listFolders(paths.cwd); - tsfolders = tsfolders.filter((itemArg) => itemArg.startsWith('ts') && itemArg !== 'ts_web'); - const smartshellInstance = new plugins.smartshell.Smartshell({ - executor: 'bash', - }); - for (const tsfolder of tsfolders) { - this.watcherMap.add(new Watcher({ - filePathToWatch: plugins.path.join(paths.cwd, `./${tsfolder}/`), - commandToExecute: `npm run startTs`, - timeout: null, - })); - } - this.watcherMap.add(new Watcher({ - filePathToWatch: plugins.path.join(paths.cwd, './ts_web/'), - functionToCall: async () => { - await bundleAndReloadWebsite(); - }, - timeout: null, - })); - this.watcherMap.add(new Watcher({ - filePathToWatch: plugins.path.join(paths.cwd, './html/'), - functionToCall: async () => { - await htmlHandler.processHtml({ - from: plugins.path.join(paths.cwd, './html/index.html'), - to: plugins.path.join(paths.cwd, './dist_serve/index.html'), - minify: false, - }); - await bundleAndReloadWebsite(); - }, - timeout: null, - })); - })(); - break; - case 'service': - this.watcherMap.add(new Watcher({ - filePathToWatch: plugins.path.join(paths.cwd, './ts/'), - commandToExecute: 'npm run startTs', - timeout: null, - })); - break; - case 'echo': - const tsWatchInstanceEchoSomething = new Watcher({ - filePathToWatch: plugins.path.join(paths.cwd, './ts'), - commandToExecute: 'npm -v', - timeout: null, - }); - this.watcherMap.add(tsWatchInstanceEchoSomething); - break; - default: - break; - } - this.watcherMap.forEach(async (watcher) => { - await watcher.start(); - }); - if (this.typedserver) { - await this.typedserver.start(); - } - } - /** - * stops the execution of any active Watchers - */ - async stop() { - if (this.typedserver) { - await this.typedserver.stop(); - } - this.watcherMap.forEach(async (watcher) => { - await watcher.stop(); - }); - } -} -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHN3YXRjaC5jbGFzc2VzLnRzd2F0Y2guanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy90c3dhdGNoLmNsYXNzZXMudHN3YXRjaC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssT0FBTyxNQUFNLHNCQUFzQixDQUFDO0FBQ2hELE9BQU8sS0FBSyxLQUFLLE1BQU0sb0JBQW9CLENBQUM7QUFDNUMsT0FBTyxLQUFLLFVBQVUsTUFBTSx1QkFBdUIsQ0FBQztBQUVwRCxPQUFPLEVBQUUsT0FBTyxFQUFFLE1BQU0sOEJBQThCLENBQUM7QUFFdkQsTUFBTSxPQUFPLE9BQU87SUFLbEIsWUFBWSxZQUFvQztRQUh6QyxlQUFVLEdBQUcsSUFBSSxPQUFPLENBQUMsR0FBRyxDQUFDLFNBQVMsRUFBVyxDQUFDO1FBSXZELElBQUksQ0FBQyxTQUFTLEdBQUcsWUFBWSxDQUFDO0lBQ2hDLENBQUM7SUFFRDs7T0FFRztJQUNJLEtBQUssQ0FBQyxLQUFLO1FBQ2hCLE1BQU0sUUFBUSxHQUFHLElBQUksT0FBTyxDQUFDLFFBQVEsQ0FBQyxRQUFRLEVBQUUsQ0FBQztRQUNqRCxNQUFNLFdBQVcsR0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dBQVcsQ0FBQyxLQUFLLEVBQUUsQ0FBQztRQUNqQyxDQUFDO0lBQ0gsQ0FBQztJQUVEOztPQUVHO0lBQ0ksS0FBSyxDQUFDLElBQUk7UUFDZixJQUFJLElBQUksQ0FBQyxXQUFXLEVBQUUsQ0FBQztZQUNyQixNQUFNLElBQUksQ0FBQyxXQUFXLENBQUMsSUFBSSxFQUFFLENBQUM7UUFDaEMsQ0FBQztRQUNELElBQUksQ0FBQyxVQUFVLENBQUMsT0FBTyxDQUFDLEtBQUssRUFBRSxPQUFPLEVBQUUsRUFBRTtZQUN4QyxNQUFNLE9BQU8sQ0FBQyxJQUFJLEVBQUUsQ0FBQztRQUN2QixDQUFDLENBQUMsQ0FBQztJQUNMLENBQUM7Q0FDRiJ9 \ No newline at end of file diff --git a/dist_ts/tswatch.classes.watcher.d.ts b/dist_ts/tswatch.classes.watcher.d.ts deleted file mode 100644 index a603ab1..0000000 --- a/dist_ts/tswatch.classes.watcher.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -export interface IWatcherConstructorOptions { - filePathToWatch: string; - commandToExecute?: string; - functionToCall?: () => Promise; - timeout?: number; -} -/** - * A watcher keeps track of one child execution - */ -export declare class Watcher { - /** - * used to execute shell commands - */ - private smartshellInstance; - private currentExecution; - private smartchokWatcher; - private options; - constructor(optionsArg: IWatcherConstructorOptions); - /** - * start the file - */ - start(): Promise; - /** - * updates the current execution - */ - private updateCurrentExecution; - /** - * this method sets up a clean exit strategy - */ - private setupCleanup; - /** - * stops the watcher - */ - stop(): Promise; -} diff --git a/dist_ts/tswatch.classes.watcher.js b/dist_ts/tswatch.classes.watcher.js deleted file mode 100644 index e3f98df..0000000 --- a/dist_ts/tswatch.classes.watcher.js +++ /dev/null @@ -1,90 +0,0 @@ -import * as plugins from './tswatch.plugins.js'; -import { logger } from './tswatch.logging.js'; -/** - * A watcher keeps track of one child execution - */ -export class Watcher { - constructor(optionsArg) { - /** - * used to execute shell commands - */ - this.smartshellInstance = new plugins.smartshell.Smartshell({ - executor: 'bash', - }); - this.smartchokWatcher = new plugins.smartchok.Smartchok([]); - this.options = optionsArg; - } - /** - * start the file - */ - async start() { - await this.setupCleanup(); - console.log(`Looking at ${this.options.filePathToWatch} for changes`); - this.smartchokWatcher.add([this.options.filePathToWatch]); // __dirname refers to the directory of this very file - await this.smartchokWatcher.start(); - const changeObservable = await this.smartchokWatcher.getObservableFor('change'); - changeObservable.subscribe(() => { - this.updateCurrentExecution(); - }); - await this.updateCurrentExecution(); - } - /** - * updates the current execution - */ - async updateCurrentExecution() { - if (this.options.commandToExecute) { - if (this.currentExecution) { - logger.log('ok', `reexecuting ${this.options.commandToExecute}`); - this.currentExecution.kill(); - } - else { - logger.log('ok', `executing ${this.options.commandToExecute} for the first time`); - } - this.currentExecution = await this.smartshellInstance.execStreaming(this.options.commandToExecute); - } - else { - console.log('no executionCommand set'); - } - if (this.options.functionToCall) { - this.options.functionToCall(); - } - else { - console.log('no functionToCall set.'); - } - } - /** - * this method sets up a clean exit strategy - */ - async setupCleanup() { - process.on('exit', () => { - console.log(''); - console.log('now exiting!'); - this.stop(); - process.exit(0); - }); - process.on('SIGINT', () => { - console.log(''); - console.log('ok! got SIGINT We are exiting! Just cleaning up to exit neatly :)'); - this.stop(); - process.exit(0); - }); - // handle timeout - if (this.options.timeout) { - plugins.smartdelay.delayFor(this.options.timeout).then(() => { - console.log(`timed out afer ${this.options.timeout} milliseconds! exiting!`); - this.stop(); - process.exit(0); - }); - } - } - /** - * stops the watcher - */ - async stop() { - await this.smartchokWatcher.stop(); - if (this.currentExecution && !this.currentExecution.childProcess.killed) { - this.currentExecution.kill(); - } - } -} -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHN3YXRjaC5jbGFzc2VzLndhdGNoZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy90c3dhdGNoLmNsYXNzZXMud2F0Y2hlci50cyJdLCJuYW1lcyI6W10sIm1hcHBp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lBQ2xCLENBQUMsQ0FBQyxDQUFDO1FBQ0wsQ0FBQztJQUNILENBQUM7SUFFRDs7T0FFRztJQUNJLEtBQUssQ0FBQyxJQUFJO1FBQ2YsTUFBTSxJQUFJLENBQUMsZ0JBQWdCLENBQUMsSUFBSSxFQUFFLENBQUM7UUFDbkMsSUFBSSxJQUFJLENBQUMsZ0JBQWdCLElBQUksQ0FBQyxJQUFJLENBQUMsZ0JBQWdCLENBQUMsWUFBWSxDQUFDLE1BQU0sRUFBRSxDQUFDO1lBQ3hFLElBQUksQ0FBQyxnQkFBZ0IsQ0FBQyxJQUFJLEVBQUUsQ0FBQztRQUMvQixDQUFDO0lBQ0gsQ0FBQztDQUNGIn0= \ No newline at end of file diff --git a/dist_ts/tswatch.cli.d.ts b/dist_ts/tswatch.cli.d.ts deleted file mode 100644 index 1db6c7b..0000000 --- a/dist_ts/tswatch.cli.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const runCli: () => Promise; diff --git a/dist_ts/tswatch.cli.js b/dist_ts/tswatch.cli.js deleted file mode 100644 index bb16a8b..0000000 --- a/dist_ts/tswatch.cli.js +++ /dev/null @@ -1,38 +0,0 @@ -import * as plugins from './tswatch.plugins.js'; -import * as paths from './tswatch.paths.js'; -import { logger } from './tswatch.logging.js'; -import { TsWatch } from './tswatch.classes.tswatch.js'; -const tswatchCli = new plugins.smartcli.Smartcli(); -// standard behaviour will assume gitzone setup -tswatchCli.standardCommand().subscribe((argvArg => { - tswatchCli.triggerCommand('npm', {}); -})); -tswatchCli.addCommand('element').subscribe(async (argvArg) => { - logger.log('info', `running watch task for a gitzone element project`); - const tsWatch = new TsWatch('element'); - await tsWatch.start(); -}); -tswatchCli.addCommand('npm').subscribe(async (argvArg) => { - logger.log('info', `running watch task for a gitzone element project`); - const tsWatch = new TsWatch('node'); - await tsWatch.start(); -}); -tswatchCli.addCommand('service').subscribe(async (argvArg) => { - logger.log('info', `running test task`); - const tsWatch = new TsWatch('service'); - await tsWatch.start(); -}); -tswatchCli.addCommand('test').subscribe(async (argvArg) => { - logger.log('info', `running test task`); - const tsWatch = new TsWatch('test'); - await tsWatch.start(); -}); -tswatchCli.addCommand('website').subscribe(async (argvArg) => { - logger.log('info', `running watch task for a gitzone website project`); - const tsWatch = new TsWatch('website'); - await tsWatch.start(); -}); -export const runCli = async () => { - tswatchCli.startParse(); -}; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHN3YXRjaC5jbGkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy90c3dhdGNoLmNsaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssT0FBTyxNQUFNLHNCQUFzQixDQUFDO0FBQ2hELE9BQU8sS0FBSyxLQUFLLE1BQU0sb0JBQW9CLENBQUM7QUFDNUMsT0FBTyxFQUFFLE1BQU0sRUFBRSxNQUFNLHNCQUFzQixDQUFDO0FBRTlDLE9BQU8sRUFBRSxPQUFPLEVBQUUsTUFBTSw4QkFBOEIsQ0FBQztBQUV2RCxNQUFNLFVBQVUsR0FBRyxJQUFJLE9BQU8sQ0FBQyxRQUFRLENBQUMsUUFBUSxFQUFFLENBQUM7QUFFbkQsK0NBQStDO0FBQy9DLFVBQVUsQ0FBQyxlQUFlLEVBQUUsQ0FBQyxTQUFTLENBQUMsQ0FBQyxPQUFPLENBQUMsRUFBRTtJQUNoRCxVQUFVLENBQUMsY0FBYyxDQUFDLEtBQUssRUFBRSxFQUFFLENBQUMsQ0FBQztBQUN2QyxDQUFDLENBQUMsQ0FBQyxDQUFBO0FBRUgsVUFBVSxDQUFDLFVBQVUsQ0FBQyxTQUFTLENBQUMsQ0FBQyxTQUFTLENBQUMsS0FBSyxFQUFFLE9BQU8sRUFBRSxFQUFFO0lBQzNELE1BQU0sQ0FBQyxHQUFHLENBQUMsTUFBTSxFQUFFLGtEQUFrRCxDQUFDLENBQUM7SUFDdkUsTUFBTSxPQUFPL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M7QUFDeEIsQ0FBQyxDQUFDLENBQUM7QUFFSCxVQUFVLENBQUMsVUFBVSxDQUFDLFNBQVMsQ0FBQyxDQUFDLFNBQVMsQ0FBQyxLQUFLLEVBQUUsT0FBTyxFQUFFLEVBQUU7SUFDM0QsTUFBTSxDQUFDLEdBQUcsQ0FBQyxNQUFNLEVBQUUsa0RBQWtELENBQUMsQ0FBQztJQUN2RSxNQUFNLE9BQU8sR0FBRyxJQUFJLE9BQU8sQ0FBQyxTQUFTLENBQUMsQ0FBQztJQUN2QyxNQUFNLE9BQU8sQ0FBQyxLQUFLLEVBQUUsQ0FBQztBQUN4QixDQUFDLENBQUMsQ0FBQztBQUVILE1BQU0sQ0FBQyxNQUFNLE1BQU0sR0FBRyxLQUFLLElBQUksRUFBRTtJQUMvQixVQUFVLENBQUMsVUFBVSxFQUFFLENBQUM7QUFDMUIsQ0FBQyxDQUFDIn0= \ No newline at end of file diff --git a/dist_ts/tswatch.logging.d.ts b/dist_ts/tswatch.logging.d.ts deleted file mode 100644 index 6be86d9..0000000 --- a/dist_ts/tswatch.logging.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import * as plugins from './tswatch.plugins.js'; -export declare const logger: plugins.smartlog.Smartlog; diff --git a/dist_ts/tswatch.logging.js b/dist_ts/tswatch.logging.js deleted file mode 100644 index 35dfdc3..0000000 --- a/dist_ts/tswatch.logging.js +++ /dev/null @@ -1,14 +0,0 @@ -import * as plugins from './tswatch.plugins.js'; -export const logger = new plugins.smartlog.Smartlog({ - logContext: { - company: 'Some Company', - companyunit: 'Some CompanyUnit', - containerName: 'Some Containername', - environment: 'local', - runtime: 'node', - zone: 'gitzone', - }, - minimumLogLevel: 'silly', -}); -logger.addLogDestination(new plugins.smartlogDestinationLocal.DestinationLocal()); -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHN3YXRjaC5sb2dnaW5nLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvdHN3YXRjaC5sb2dnaW5nLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxPQUFPLE1BQU0sc0JBQXNCLENBQUM7QUFFaEQsTUFBTSxDQUFDLE1BQU0sTUFBTSxHQUFHLElBQUksT0FBTyxDQUFDLFFBQVEsQ0FBQyxRQUFRLENBQUM7SUFDbEQsVUFBVSxFQUFFO1FBQ1YsT0FBTyxFQUFFLGNBQWM7UUFDdkIsV0FBVyxFQUFFLGtCQUFrQjtRQUMvQixhQUFhLEVBQUUsb0JBQW9CO1FBQ25DLFdBQVcsRUFBRSxPQUFPO1FBQ3BCLE9BQU8sRUFBRSxNQUFNO1FBQ2YsSUFBSSxFQUFFLFNBQVM7S0FDaEI7SUFDRCxlQUFlLEVBQUUsT0FBTztDQUN6QixDQUFDLENBQUM7QUFFSCxNQUFNLENBQUMsaUJBQWlCLENBQUMsSUFBSSxPQUFPLENBQUMsd0JBQXdCLENBQUMsZ0JBQWdCLEVBQUUsQ0FBQyxDQUFDIn0= \ No newline at end of file diff --git a/dist_ts/tswatch.paths.d.ts b/dist_ts/tswatch.paths.d.ts deleted file mode 100644 index 1a2eb4d..0000000 --- a/dist_ts/tswatch.paths.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const cwd: string; diff --git a/dist_ts/tswatch.paths.js b/dist_ts/tswatch.paths.js deleted file mode 100644 index 2b67d60..0000000 --- a/dist_ts/tswatch.paths.js +++ /dev/null @@ -1,3 +0,0 @@ -import * as plugins from './tswatch.plugins.js'; -export const cwd = process.cwd(); -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHN3YXRjaC5wYXRocy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3Rzd2F0Y2gucGF0aHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLE9BQU8sTUFBTSxzQkFBc0IsQ0FBQztBQUVoRCxNQUFNLENBQUMsTUFBTSxHQUFHLEdBQUcsT0FBTyxDQUFDLEdBQUcsRUFBRSxDQUFDIn0= \ No newline at end of file diff --git a/dist_ts/tswatch.plugins.d.ts b/dist_ts/tswatch.plugins.d.ts deleted file mode 100644 index e9ed7a3..0000000 --- a/dist_ts/tswatch.plugins.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import * as path from 'path'; -export { path }; -import * as tsbundle from '@git.zone/tsbundle'; -export { tsbundle }; -import * as typedserver from '@api.global/typedserver'; -export { typedserver, }; -import * as lik from '@push.rocks/lik'; -import * as smartchok from '@push.rocks/smartchok'; -import * as smartcli from '@push.rocks/smartcli'; -import * as smartdelay from '@push.rocks/smartdelay'; -import * as smartfile from '@push.rocks/smartfile'; -import * as smartlog from '@push.rocks/smartlog'; -import * as smartlogDestinationLocal from '@push.rocks/smartlog-destination-local'; -import * as smartshell from '@push.rocks/smartshell'; -import * as taskbuffer from '@push.rocks/taskbuffer'; -export { lik, smartchok, smartcli, smartdelay, smartfile, smartlog, smartlogDestinationLocal, smartshell, taskbuffer, }; diff --git a/dist_ts/tswatch.plugins.js b/dist_ts/tswatch.plugins.js deleted file mode 100644 index 9c99d08..0000000 --- a/dist_ts/tswatch.plugins.js +++ /dev/null @@ -1,21 +0,0 @@ -// node native scope -import * as path from 'path'; -export { path }; -// @gitzone scope -import * as tsbundle from '@git.zone/tsbundle'; -export { tsbundle }; -// @apiglobal scope -import * as typedserver from '@api.global/typedserver'; -export { typedserver, }; -// @pushrocks scope -import * as lik from '@push.rocks/lik'; -import * as smartchok from '@push.rocks/smartchok'; -import * as smartcli from '@push.rocks/smartcli'; -import * as smartdelay from '@push.rocks/smartdelay'; -import * as smartfile from '@push.rocks/smartfile'; -import * as smartlog from '@push.rocks/smartlog'; -import * as smartlogDestinationLocal from '@push.rocks/smartlog-destination-local'; -import * as smartshell from '@push.rocks/smartshell'; -import * as taskbuffer from '@push.rocks/taskbuffer'; -export { lik, smartchok, smartcli, smartdelay, smartfile, smartlog, smartlogDestinationLocal, smartshell, taskbuffer, }; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHN3YXRjaC5wbHVnaW5zLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvdHN3YXRjaC5wbHVnaW5zLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLG9CQUFvQjtBQUNwQixPQUFPLEtBQUssSUFBSSxNQUFNLE1BQU0sQ0FBQztBQUM3QixPQUFPLEVBQUUsSUFBSSxFQUFFLENBQUM7QUFFaEIsaUJBQWlCO0FBQ2pCLE9BQU8sS0FBSyxRQUFRLE1BQU0sb0JBQW9CLENBQUM7QUFDL0MsT0FBTyxFQUNMLFFBQVEsRUFDVCxDQUFBO0FBRUQsbUJBQW1CO0FBQ25CLE9BQU8sS0FBSyxXQUFXLE1BQU0seUJBQXlCLENBQUM7QUFFdkQsT0FBTyxFQUNMLFdBQVcsR0FDWixDQUFBO0FBRUQsbUJBQW1CO0FBQ25CLE9BQU8sS0FBSyxHQUFHLE1BQU0saUJBQWlCLENBQUM7QUFDdkMsT0FBTyxLQUFLLFNBQVMsTUFBTSx1QkFBdUIsQ0FBQztBQUNuRCxPQUFPLEtBQUssUUFBUSxNQUFNLHNCQUFzQixDQUFDO0FBQ2pELE9BQU8sS0FBSyxVQUFVLE1BQU0sd0JBQXdCLENBQUM7QUFDckQsT0FBTyxLQUFLLFNBQVMsTUFBTSx1QkFBdUIsQ0FBQztBQUNuRCxPQUFPLEtBQUssUUFBUSxNQUFNLHNCQUFzQixDQUFDO0FBQ2pELE9BQU8sS0FBSyx3QkFBd0IsTUFBTSx3Q0FBd0MsQ0FBQztBQUNuRixPQUFPLEtBQUssVUFBVSxNQUFNLHdCQUF3QixDQUFDO0FBQ3JELE9BQU8sS0FBSyxVQUFVLE1BQU0sd0JBQXdCLENBQUM7QUFFckQsT0FBTyxFQUNMLEdBQUcsRUFDSCxTQUFTLEVBQ1QsUUFBUSxFQUNSLFVBQVUsRUFDVixTQUFTLEVBQ1QsUUFBUSxFQUNSLHdCQUF3QixFQUN4QixVQUFVLEVBQ1YsVUFBVSxHQUNYLENBQUMifQ== \ No newline at end of file diff --git a/ts/tswatch.classes.tswatch.ts b/ts/tswatch.classes.tswatch.ts index c3677a4..9311b3c 100644 --- a/ts/tswatch.classes.tswatch.ts +++ b/ts/tswatch.classes.tswatch.ts @@ -91,7 +91,7 @@ export class TsWatch { filePathToWatch: plugins.path.join(paths.cwd, `./${tsfolder}/`), functionToCall: async () => { logger.log('info', `building ${tsfolder}`); - await smartshellInstance.exec(`npm run build`); + await smartshellInstance.exec(`(cd ${paths.cwd} && npm run build)`); await this.typedserver.reload(); }, timeout: null,