feat(smartgulp): modernize file glob handling and refresh package metadata

This commit is contained in:
2026-05-01 22:17:09 +00:00
parent fa76cec8b4
commit 63c5e20391
22 changed files with 7806 additions and 5150 deletions
+4 -4
View File
@@ -3,7 +3,7 @@
import * as plugins from './smartgulp.plugins.js';
import { SmartFile } from '@push.rocks/smartfile';
import { Transform } from 'stream';
import { Transform } from 'node:stream';
export class GulpStream {
stream = new Transform({ objectMode: true });
@@ -11,13 +11,13 @@ export class GulpStream {
/**
* allows you to pipe a SmartfileArray into the stream
*/
async pipeSmartfileArray(smartfileArray: SmartFile[]) {
async pipeSmartfileArray(smartfileArray: SmartFile[]): Promise<void> {
// ensure what we get is an array
if (!Array.isArray(smartfileArray)) {
throw new Error('fileArg has unknown format');
}
for (let smartfile of smartfileArray) {
let hasWritten = this.stream.push(smartfile);
for (const smartfile of smartfileArray) {
const hasWritten = this.stream.push(smartfile);
if (!hasWritten) {
await plugins.smartevent.once(this.stream, 'drain');
}