/**
 * This module is under Node.js environment.
 * It provides a set of APIs to interact with the file system, streams, and other Node.js built-in modules.
 *
 * Use this under "node" condition,
 *
 * For example:
 * ```shell
 * node -e "const env = require('@llamaindex/env');"
 * ```
 *
 * @module
 */ "use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
function _export(target, all) {
    for(var name in all)Object.defineProperty(target, name, {
        enumerable: true,
        get: all[name]
    });
}
_export(exports, {
    AsyncLocalStorage: function() {
        return _utils.AsyncLocalStorage;
    },
    CustomEvent: function() {
        return _utils.CustomEvent;
    },
    EOL: function() {
        return _nodeos.EOL;
    },
    ReadableStream: function() {
        return _web.ReadableStream;
    },
    TransformStream: function() {
        return _web.TransformStream;
    },
    WritableStream: function() {
        return _web.WritableStream;
    },
    createSHA256: function() {
        return createSHA256;
    },
    fs: function() {
        return _node.fs;
    },
    getEnv: function() {
        return _utils.getEnv;
    },
    ok: function() {
        return _nodeassert.ok;
    },
    path: function() {
        return _nodepath.default;
    },
    randomUUID: function() {
        return _nodecrypto.randomUUID;
    },
    setEnvs: function() {
        return _utils.setEnvs;
    }
});
const _nodeassert = require("node:assert");
const _nodecrypto = require("node:crypto");
const _nodeos = require("node:os");
const _nodepath = /*#__PURE__*/ _interop_require_default(require("node:path"));
const _web = require("node:stream/web");
const _node = require("./fs/node.js");
const _utils = require("./utils.js");
function _interop_require_default(obj) {
    return obj && obj.__esModule ? obj : {
        default: obj
    };
}
function createSHA256() {
    const hash = (0, _nodecrypto.createHash)("sha256");
    return {
        update (data) {
            hash.update(data);
        },
        digest () {
            return hash.digest("base64");
        }
    };
}
