spooder 6.1.92 → 6.1.93
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/bun.lock +1 -1
- package/package.json +1 -1
- package/src/api.ts +6 -8
package/README.md
CHANGED
|
@@ -1734,7 +1734,7 @@ global_subs: {
|
|
|
1734
1734
|
build_time: async () => {
|
|
1735
1735
|
// Example: fetch build timestamp from git
|
|
1736
1736
|
const process = Bun.spawn(['git', 'log', '-1', '--format=%ct']);
|
|
1737
|
-
const output = await
|
|
1737
|
+
const output = await new Response(process.stdout).text();
|
|
1738
1738
|
return new Date(parseInt(output.trim()) * 1000).toISOString();
|
|
1739
1739
|
},
|
|
1740
1740
|
|
package/bun.lock
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"packages": {
|
|
13
13
|
"@types/bun": ["@types/bun@1.3.5", "", { "dependencies": { "bun-types": "1.3.5" } }, "sha512-RnygCqNrd3srIPEWBd5LFeUYG7plCoH2Yw9WaZGyNmdTEei+gWaHqydbaIRkIkcbXwhBT94q78QljxN0Sk838w=="],
|
|
14
14
|
|
|
15
|
-
"@types/node": ["@types/node@25.0.
|
|
15
|
+
"@types/node": ["@types/node@25.0.6", "", { "dependencies": { "undici-types": "~7.16.0" } }, "sha512-NNu0sjyNxpoiW3YuVFfNz7mxSQ+S4X2G28uqg2s+CzoqoQjLPsWSbsFFyztIAqt2vb8kfEAsJNepMGPTxFDx3Q=="],
|
|
16
16
|
|
|
17
17
|
"bun-types": ["bun-types@1.3.5", "", { "dependencies": { "@types/node": "*" } }, "sha512-inmAYe2PFLs0SUbFOWSVD24sg1jFlMPxOjOSSCYqUgn4Hsc3rDc7dFvfVYjFPNHtov6kgUeulV4SxbuIV/stPw=="],
|
|
18
18
|
|
package/package.json
CHANGED
package/src/api.ts
CHANGED
|
@@ -821,7 +821,7 @@ export class ErrorWithMetadata extends Error {
|
|
|
821
821
|
else if (typeof value === 'function')
|
|
822
822
|
resolved_value = await value();
|
|
823
823
|
else if (value instanceof ReadableStream)
|
|
824
|
-
resolved_value = await
|
|
824
|
+
resolved_value = await new Response(value).text();
|
|
825
825
|
|
|
826
826
|
if (typeof resolved_value === 'string' && resolved_value.includes('\n'))
|
|
827
827
|
resolved_value = resolved_value.split(/\r?\n/);
|
|
@@ -970,12 +970,10 @@ export async function parse_template(template: string, replacements: Replacement
|
|
|
970
970
|
}
|
|
971
971
|
}
|
|
972
972
|
|
|
973
|
-
|
|
974
|
-
return match;
|
|
975
|
-
|
|
973
|
+
// missing/undefined items treated as empty array (no output)
|
|
976
974
|
return '';
|
|
977
975
|
});
|
|
978
|
-
|
|
976
|
+
|
|
979
977
|
// Parse t-if tags
|
|
980
978
|
const if_regex = /<t-if\s+test="([^"]+)"\s*>(.*?)<\/t-if>/gs;
|
|
981
979
|
result = await replace_async(result, if_regex, async (match, condition_key, if_content) => {
|
|
@@ -1119,9 +1117,9 @@ export async function git_get_hashes(length = 7): Promise<Record<string, string>
|
|
|
1119
1117
|
await process.exited;
|
|
1120
1118
|
|
|
1121
1119
|
if (process.exitCode as number > 0)
|
|
1122
|
-
|
|
1120
|
+
return {};
|
|
1123
1121
|
|
|
1124
|
-
const stdout = await
|
|
1122
|
+
const stdout = await new Response(process.stdout).text();
|
|
1125
1123
|
const hash_map: Record<string, string> = {};
|
|
1126
1124
|
|
|
1127
1125
|
const regex = /([^\s]+)\s([^\s]+)\s([^\s]+)\t(.+)/g;
|
|
@@ -1141,7 +1139,7 @@ export function git_get_hashes_sync(length = 7): Record<string, string> {
|
|
|
1141
1139
|
});
|
|
1142
1140
|
|
|
1143
1141
|
if (process.exitCode > 0)
|
|
1144
|
-
|
|
1142
|
+
return {};
|
|
1145
1143
|
|
|
1146
1144
|
const stdout = process.stdout.toString();
|
|
1147
1145
|
const hash_map: Record<string, string> = {};
|