Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 54f84ba114 | |||
| e40d6477fd | |||
| a550d6e450 | |||
| 201f8aca38 |
12
changelog.md
12
changelog.md
@@ -1,5 +1,17 @@
|
||||
# Changelog
|
||||
|
||||
## 2026-01-12 - 2.7.4 - fix(deps)
|
||||
bump @push.rocks/smartcli dependency to ^4.0.20
|
||||
|
||||
- @push.rocks/smartcli: ^4.0.19 → ^4.0.20
|
||||
- Patch-level dependency update with no breaking changes
|
||||
|
||||
## 2026-01-12 - 2.7.3 - fix(mod_output)
|
||||
wrap long base64 file contents and format generated TypeScript output to avoid extremely long lines
|
||||
|
||||
- Introduce MAX_LINE_LENGTH (200) and formatBase64 to split long base64 strings into chunks and join them with string concatenation
|
||||
- Emit the files array as nicely indented object entries instead of a single JSON.stringify output to improve readability and avoid extremely long lines
|
||||
|
||||
## 2026-01-12 - 2.7.2 - fix(readme)
|
||||
update README to add interactive setup (tsbundle init), expand quick start and usage examples, include pnpm install, document embedding/base64ts output with Deno example, add project structure recommendations, and clarify license/trademark wording
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@git.zone/tsbundle",
|
||||
"version": "2.7.2",
|
||||
"version": "2.7.4",
|
||||
"private": false,
|
||||
"description": "a multi-bundler tool supporting esbuild, rolldown, and rspack for painless bundling of web projects",
|
||||
"main": "dist_ts/index.js",
|
||||
@@ -25,10 +25,10 @@
|
||||
"dependencies": {
|
||||
"@push.rocks/early": "^4.0.4",
|
||||
"@push.rocks/npmextra": "^5.1.3",
|
||||
"@push.rocks/smartcli": "^4.0.19",
|
||||
"@push.rocks/smartinteract": "^2.0.16",
|
||||
"@push.rocks/smartcli": "^4.0.20",
|
||||
"@push.rocks/smartdelay": "^3.0.5",
|
||||
"@push.rocks/smartfs": "^1.1.3",
|
||||
"@push.rocks/smartinteract": "^2.0.16",
|
||||
"@push.rocks/smartlog": "^3.1.8",
|
||||
"@push.rocks/smartlog-destination-local": "^9.0.2",
|
||||
"@push.rocks/smartpath": "^6.0.0",
|
||||
|
||||
16
pnpm-lock.yaml
generated
16
pnpm-lock.yaml
generated
@@ -15,8 +15,8 @@ importers:
|
||||
specifier: ^5.1.3
|
||||
version: 5.3.3
|
||||
'@push.rocks/smartcli':
|
||||
specifier: ^4.0.19
|
||||
version: 4.0.19
|
||||
specifier: ^4.0.20
|
||||
version: 4.0.20
|
||||
'@push.rocks/smartdelay':
|
||||
specifier: ^3.0.5
|
||||
version: 3.0.5
|
||||
@@ -913,8 +913,8 @@ packages:
|
||||
'@push.rocks/smartchok@1.1.1':
|
||||
resolution: {integrity: sha512-WmNigGmn1muBJMANVuJb4F8x3TzgYrnn6YZm6ixTsG+0WFbYevivEwp+J4S7npobLHsR7ynf+Ky8LxRYmsL50A==}
|
||||
|
||||
'@push.rocks/smartcli@4.0.19':
|
||||
resolution: {integrity: sha512-s1jZSgDZWi/az26AY4TJ2HPuG1qZzGC5R9fKWaECLmwnSpk6y9JXL5dnJAUohcdu50kdXCWEcRmLfYxOt81vEA==}
|
||||
'@push.rocks/smartcli@4.0.20':
|
||||
resolution: {integrity: sha512-gCo4ItvsPj8WoVAJw/6vkuoGA5FtIoACux2ktcCeH0nrFe7/xGR6waJ1aZcYAi7QN4gi52TlsgwuKz7BzXqhmQ==}
|
||||
|
||||
'@push.rocks/smartclickhouse@2.0.17':
|
||||
resolution: {integrity: sha512-IYO8Obor/Ruam2KQ2B/+5uQ+rL0exU5KZoSgOc3jkkrfjn+zZenN2xoV8lVqavAtxZVfG7MfxFrcv6I7I9ZMmA==}
|
||||
@@ -4853,7 +4853,7 @@ snapshots:
|
||||
dependencies:
|
||||
'@git.zone/tspublish': 1.10.3
|
||||
'@push.rocks/early': 4.0.4
|
||||
'@push.rocks/smartcli': 4.0.19
|
||||
'@push.rocks/smartcli': 4.0.20
|
||||
'@push.rocks/smartdelay': 3.0.5
|
||||
'@push.rocks/smartfile': 11.2.7
|
||||
'@push.rocks/smartlog': 3.1.10
|
||||
@@ -4872,7 +4872,7 @@ snapshots:
|
||||
'@git.zone/tsbundle@2.5.2':
|
||||
dependencies:
|
||||
'@push.rocks/early': 4.0.4
|
||||
'@push.rocks/smartcli': 4.0.19
|
||||
'@push.rocks/smartcli': 4.0.20
|
||||
'@push.rocks/smartdelay': 3.0.5
|
||||
'@push.rocks/smartfile': 11.2.7
|
||||
'@push.rocks/smartlog': 3.1.10
|
||||
@@ -4893,7 +4893,7 @@ snapshots:
|
||||
'@git.zone/tspublish@1.10.3':
|
||||
dependencies:
|
||||
'@push.rocks/consolecolor': 2.0.3
|
||||
'@push.rocks/smartcli': 4.0.19
|
||||
'@push.rocks/smartcli': 4.0.20
|
||||
'@push.rocks/smartdelay': 3.0.5
|
||||
'@push.rocks/smartfile': 11.2.7
|
||||
'@push.rocks/smartlog': 3.1.10
|
||||
@@ -5428,7 +5428,7 @@ snapshots:
|
||||
chokidar: 4.0.3
|
||||
picomatch: 4.0.3
|
||||
|
||||
'@push.rocks/smartcli@4.0.19':
|
||||
'@push.rocks/smartcli@4.0.20':
|
||||
dependencies:
|
||||
'@push.rocks/lik': 6.2.2
|
||||
'@push.rocks/smartlog': 3.1.10
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@git.zone/tsbundle',
|
||||
version: '2.7.2',
|
||||
version: '2.7.4',
|
||||
description: 'a multi-bundler tool supporting esbuild, rolldown, and rspack for painless bundling of web projects'
|
||||
}
|
||||
|
||||
@@ -79,9 +79,32 @@ export class Base64TsOutput {
|
||||
* Generate TypeScript file content
|
||||
*/
|
||||
public generateTypeScript(): string {
|
||||
const filesJson = JSON.stringify(this.files, null, 2);
|
||||
const MAX_LINE_LENGTH = 200;
|
||||
|
||||
const formatBase64 = (base64: string): string => {
|
||||
if (base64.length <= MAX_LINE_LENGTH) {
|
||||
return `"${base64}"`;
|
||||
}
|
||||
|
||||
const chunks: string[] = [];
|
||||
for (let i = 0; i < base64.length; i += MAX_LINE_LENGTH) {
|
||||
chunks.push(base64.slice(i, i + MAX_LINE_LENGTH));
|
||||
}
|
||||
|
||||
return `"" +\n "${chunks.join('" +\n "')}"`;
|
||||
};
|
||||
|
||||
const filesFormatted = this.files.map(file => {
|
||||
return ` {
|
||||
"path": "${file.path}",
|
||||
"contentBase64": ${formatBase64(file.contentBase64)}
|
||||
}`;
|
||||
}).join(',\n');
|
||||
|
||||
return `// Auto-generated by tsbundle - do not edit
|
||||
export const files: { path: string; contentBase64: string }[] = ${filesJson};
|
||||
export const files: { path: string; contentBase64: string }[] = [
|
||||
${filesFormatted}
|
||||
];
|
||||
`;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user