fix(config): use .smartconfig.json consistently and pass asset copy paths explicitly

This commit is contained in:
2026-05-09 12:33:39 +00:00
parent 7a1dbbff21
commit f2e843b72e
10 changed files with 2416 additions and 1511 deletions
+2 -2
View File
@@ -40,9 +40,9 @@
}
},
"@git.zone/tsdoc": {
"legal": "\n## License and Legal Information\n\nThis repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository. \n\n**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.\n\n### Trademarks\n\nThis project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.\n\n### Company Information\n\nTask Venture Capital GmbH \nRegistered at District court Bremen HRB 35230 HB, Germany\n\nFor any legal inquiries or if you require further information, please contact us via email at hello@task.vc.\n\nBy using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.\n"
"legal": "\n## License and Legal Information\n\nThis repository contains open-source code licensed under the MIT License. A copy of the license can be found in the [license](./license) file.\n\n**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.\n\n### Trademarks\n\nThis project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH or third parties, and are not included within the scope of the MIT license granted herein.\n\nUse of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines or the guidelines of the respective third-party owners, and any usage must be approved in writing. Third-party trademarks used herein are the property of their respective owners and used only in a descriptive manner, e.g. for an implementation of an API or similar.\n\n### Company Information\n\nTask Venture Capital GmbH \nRegistered at District Court Bremen HRB 35230 HB, Germany\n\nFor any legal inquiries or further information, please contact us via email at hello@task.vc.\n\nBy using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.\n"
},
"@ship.zone/szci": {
"npmGlobalTools": []
}
}
}
+8
View File
@@ -1,5 +1,13 @@
# Changelog
## 2026-05-09 - 3.3.4 - fix(config)
use .smartconfig.json consistently and pass asset copy paths explicitly
- Updates CLI, init flow, and inline documentation to reference .smartconfig.json instead of smartconfig.json.
- Fixes config initialization to save project settings to .smartconfig.json.
- Passes explicit from/to paths when processing asset directory copies.
- Refreshes package metadata and dependency versions.
## 2026-04-30 - 3.3.3 - fix(build)
remove the deprecated --allowimplicitany flag from the build script
+13 -16
View File
@@ -7,34 +7,34 @@
".": "./dist_ts/index.js"
},
"type": "module",
"author": "Lossless GmbH",
"author": "Task Venture Capital GmbH",
"license": "MIT",
"bin": {
"tswatch": "cli.js"
},
"scripts": {
"test": "(tstest test/ --web)",
"build": "(tsbuild --web)",
"test": "tstest test/",
"build": "tsbuild",
"buildDocs": "tsdoc"
},
"devDependencies": {
"@git.zone/tsbuild": "^4.4.0",
"@git.zone/tstest": "^3.5.1",
"@types/node": "^25.5.0"
"@git.zone/tstest": "^3.6.5",
"@types/node": "^25.6.2"
},
"dependencies": {
"@api.global/typedserver": "^8.4.6",
"@git.zone/tsbundle": "^2.10.0",
"@git.zone/tsrun": "^2.0.1",
"@git.zone/tsbundle": "^2.10.1",
"@git.zone/tsrun": "^2.0.3",
"@push.rocks/early": "^4.0.4",
"@push.rocks/lik": "^6.4.0",
"@push.rocks/smartcli": "^4.0.20",
"@push.rocks/smartconfig": "^6.0.1",
"@push.rocks/smartdelay": "^3.0.5",
"@push.rocks/lik": "^6.4.1",
"@push.rocks/smartcli": "^4.0.21",
"@push.rocks/smartconfig": "^6.1.1",
"@push.rocks/smartdelay": "^3.1.0",
"@push.rocks/smartexit": "^2.0.3",
"@push.rocks/smartfs": "^1.5.0",
"@push.rocks/smartfs": "^1.5.1",
"@push.rocks/smartinteract": "^2.0.16",
"@push.rocks/smartlog": "^3.2.1",
"@push.rocks/smartlog": "^3.2.2",
"@push.rocks/smartlog-destination-local": "^9.0.2",
"@push.rocks/smartshell": "^3.3.8",
"@push.rocks/smartwatch": "^6.4.0"
@@ -83,8 +83,5 @@
"url": "https://code.foss.global/git.zone/tswatch/issues"
},
"homepage": "https://code.foss.global/git.zone/tswatch#readme",
"pnpm": {
"overrides": {}
},
"packageManager": "pnpm@10.11.0+sha512.6540583f41cc5f628eb3d9773ecee802f4f9ef9923cc45b69890fb47991d4b092964694ec3a4f738a420c918a333062c8b925d312f42e4f0c263eb603551f977"
}
+2376 -1479
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -417,7 +417,7 @@ Use of these trademarks must comply with Task Venture Capital GmbH's Trademark G
### Company Information
Task Venture Capital GmbH
Task Venture Capital GmbH
Registered at District Court Bremen HRB 35230 HB, Germany
For any legal inquiries or further information, please contact us via email at hello@task.vc.
+1 -1
View File
@@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@git.zone/tswatch',
version: '3.3.3',
version: '3.3.4',
description: 'A development tool for automatically watching and re-compiling TypeScript projects upon detecting file changes, enhancing developer workflows.'
}
+2 -2
View File
@@ -136,7 +136,7 @@ export class ConfigHandler {
}
/**
* Load configuration from smartconfig.json
* Load configuration from .smartconfig.json
* If a preset is specified, merge preset defaults with user overrides
*/
public loadConfig(): interfaces.ITswatchConfig | null {
@@ -177,7 +177,7 @@ export class ConfigHandler {
}
/**
* Get the config key for smartconfig.json
* Get the config key for .smartconfig.json
*/
public getConfigKey(): string {
return CONFIG_KEY;
+6 -3
View File
@@ -9,7 +9,7 @@ import { logger } from './tswatch.logging.js';
/**
* TsWatch - Config-driven file watcher
*
* Reads configuration from smartconfig.json under the key '@git.zone/tswatch'
* Reads configuration from .smartconfig.json under the key '@git.zone/tswatch'
* and sets up watchers, bundles, and dev server accordingly.
*/
export class TsWatch {
@@ -27,7 +27,7 @@ export class TsWatch {
}
/**
* Create TsWatch from smartconfig.json configuration
* Create TsWatch from .smartconfig.json configuration
*/
public static fromConfig(cwdArg?: string): TsWatch | null {
const configHandler = new ConfigHandler(cwdArg);
@@ -136,7 +136,10 @@ export class TsWatch {
});
} else if (fromPath.endsWith('/') || !fromPath.includes('.')) {
// Assets directory copy
await this.assetsHandler.processAssets();
await this.assetsHandler.processAssets({
from: bundleConfig.from,
to: bundleConfig.to,
});
} else if (bundleConfig.outputMode && bundleConfig.outputMode !== 'bundle') {
// Non-default outputMode (e.g. base64ts) — use CustomBundleHandler
await this.customBundleHandler.processSingleBundle({
+2 -2
View File
@@ -18,7 +18,7 @@ tswatchCli.standardCommand().subscribe(async (argvArg) => {
// Config exists - run with it
const tsWatch = TsWatch.fromConfig();
if (tsWatch) {
logger.log('info', 'Starting tswatch with configuration from smartconfig.json');
logger.log('info', 'Starting tswatch with configuration from .smartconfig.json');
await tsWatch.start();
} else {
logger.log('error', 'Failed to load configuration');
@@ -26,7 +26,7 @@ tswatchCli.standardCommand().subscribe(async (argvArg) => {
}
} else {
// No config - launch wizard
logger.log('info', 'No tswatch configuration found in smartconfig.json');
logger.log('info', 'No tswatch configuration found in .smartconfig.json');
const config = await runInit();
if (config) {
// Run with the newly created config
+5 -5
View File
@@ -56,10 +56,10 @@ export class TswatchInit {
config = { ...preset, preset: template as interfaces.ITswatchConfig['preset'] };
}
// Save to smartconfig.json
// Save to .smartconfig.json
await this.saveConfig(config);
console.log('\nConfiguration saved to smartconfig.json');
console.log('\nConfiguration saved to .smartconfig.json');
console.log('Run "tswatch" to start watching.\n');
return config;
@@ -166,12 +166,12 @@ export class TswatchInit {
}
/**
* Save configuration to smartconfig.json
* Save configuration to .smartconfig.json
*/
private async saveConfig(config: interfaces.ITswatchConfig): Promise<void> {
const smartconfigPath = plugins.path.join(paths.cwd, 'smartconfig.json');
const smartconfigPath = plugins.path.join(paths.cwd, '.smartconfig.json');
// Read existing smartconfig.json if it exists
// Read existing .smartconfig.json if it exists
let existingConfig: Record<string, any> = {};
try {
const smartfsInstance = new plugins.smartfs.SmartFs(new plugins.smartfs.SmartFsProviderNode());