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CAAEI,EAAKN,EAAU,MAASE,CAAK,CAAC,CAAG,OAASK,EAAG,CAAEH,EAAOG,CAAC,CAAG,CAAE,CAC7F,SAASD,EAAKG,EAAQ,CAAEA,EAAO,KAAON,EAAQM,EAAO,KAAK,EAAIR,EAAMQ,EAAO,KAAK,EAAE,KAAKJ,EAAWG,CAAQ,CAAG,CAC7GF,GAAMN,EAAYA,EAAU,MAAMH,EAASC,GAAc,CAAC,CAAC,GAAG,KAAK,CAAC,CACxE,CAAC,CACL,EAQO,SAASY,GAAQC,EAAIC,EAAS,CAAC,EAAG,CACrC,OAAOhB,GAAU,KAAM,OAAQ,OAAQ,WAAa,CAChD,IAAIiB,EACAC,EAAQ,KAENC,EAAoB,WAAQ,IAAI,oBACtC,GAAIA,EAAmB,CACnB,IAAMC,EAAe,WAAQ,IAAI,qBACjC,GAAI,CAACA,EACD,MAAM,IAAI,MAAM,iEAAiE,EAErFH,EAAS,IAAII,EAAO,CAChB,KAAM,aAAaF,CAAiB,GACpC,aAAcC,CAClB,CAAC,CACL,KACK,CAGD,IAAME,EAAS,WAAQ,IAAI,6BACrBC,EAAa,IAAIC,EAAIF,EAAQG,EAAW,EAC9CR,EAAS,MAAMM,EAAW,QAAQP,CAAM,EACxCE,EAAQ,IAAMK,EAAW,MAAM,CACnC,CACA,MAAMR,EAAGE,CAAM,EAAE,QAAQ,IAAMjB,GAAU,KAAM,OAAQ,OAAQ,WAAa,CACpEkB,GACAA,EAAM,CAEd,CAAC,CAAC,CACN,CAAC,CACL","names":["GraphQLClient","ClientError","gql","logger","log","stack","DaggerSDKError","message","options","log","ERROR_CODES","ERROR_NAMES","obj","item","UnknownDaggerError","DaggerSDKError","message","options","ERROR_NAMES","ERROR_CODES","DockerImageRefValidationError","DaggerSDKError","message","options","ERROR_NAMES","ERROR_CODES","EngineSessionConnectParamsParseError","DaggerSDKError","message","options","ERROR_NAMES","ERROR_CODES","ExecError","DaggerSDKError","message","options","ERROR_NAMES","ERROR_CODES","GraphQLRequestError","DaggerSDKError","message","options","ERROR_NAMES","ERROR_CODES","InitEngineSessionBinaryError","DaggerSDKError","message","options","ERROR_NAMES","ERROR_CODES","TooManyNestedObjectsError","DaggerSDKError","message","options","ERROR_NAMES","ERROR_CODES","EngineSessionError","DaggerSDKError","message","options","ERROR_NAMES","ERROR_CODES","EngineSessionConnectionTimeoutError","DaggerSDKError","message","options","ERROR_NAMES","ERROR_CODES","NotAwaitedRequestError","DaggerSDKError","message","options","ERROR_NAMES","ERROR_CODES","__awaiter","thisArg","_arguments","P","generator","adopt","value","resolve","reject","fulfilled","step","e","rejected","result","buildArgs","args","formatValue","str","formattedArgs","acc","key","computeNestedQuery","query","client","isQueryTree","isArrayQueryTree","v","computeQueryTree","op","buildQuery","queryToExec","q","getQueryTree","compute","tmp","i","operation","qLen","computeQuery","queryFlatten","response","keys","TooManyNestedObjectsError","nestedKey","_a","_b","_c","_d","_e","_f","_g","_h","_j","gql","ClientError","msg","ext","ExecError","GraphQLRequestError","NotAwaitedRequestError","UnknownDaggerError","__awaiter","thisArg","_arguments","P","generator","adopt","value","resolve","reject","fulfilled","step","e","rejected","result","BaseClient","queryTree","host","sessionToken","GraphQLClient","CacheSharingMode","ImageLayerCompression","NetworkProtocol","CacheVolume","computeQuery","arg","Container","_Container","context","opts","path","Directory","name","File","address","source","directory","args","port","id","cache","username","secret","alias","service","_Directory","other","contents","timestamp","EnvVariable","_File","Secret","GitRef","GitRepository","Host","HostVariable","Socket","Label","Port","Project","_Project","configPath","ProjectCommand","ProjectCommandFlag","Client","_Client","key","url","plaintext","gql","GraphQLClient","CLI_VERSION","AdmZip","crypto","envPaths","execaCommand","fs","s","n","i","c","p","b","a","f","l","e","n","x","os","path","process","readline","tar","fileURLToPath","__awaiter","thisArg","_arguments","P","generator","adopt","value","resolve","reject","fulfilled","step","e","rejected","result","__asyncValues","o","m","i","verb","n","v","settle","CLI_HOST","OVERRIDE_CLI_URL","OVERRIDE_CHECKSUMS_URL","Bin","binPath","cliVersion","_a","envPaths","opts","tmpBinDownloadDir","tmpBinPath","actualChecksum","expectedChecksum","InitEngineSessionBinaryError","file","filePath","currentFileUrl","currentFilePath","fileURLToPath","currentPath","packageJsonPath","packageJsonContent","_b","args","sdkVersion","pair","execaCommand","stdoutReader","readline","timeOutDuration","connectParams","_","EngineSessionConnectionTimeoutError","Client","stdoutReader_1","stdoutReader_1_1","e_1","_c","_d","_e","line","EngineSessionConnectParamsParseError","e_1_1","EngineSessionError","destinationDir","filename","ext","checksums","x","checksumsText","checksumMap","checksum","destDir","os","archiveResp","archivePath","archiveFile","AdmZip","__awaiter","thisArg","_arguments","P","generator","adopt","value","resolve","reject","fulfilled","step","e","rejected","result","connect","cb","config","client","close","daggerSessionPort","sessionToken","Client","cliBin","engineConn","Bin","CLI_VERSION"],"sources":["../esm/npm/@dagger.io/dagger@0.6.0/node_modules/@dagger.io/dagger/dist/api/client.gen.js","../esm/npm/@dagger.io/dagger@0.6.0/node_modules/@dagger.io/dagger/dist/api/utils.js","../esm/npm/@dagger.io/dagger@0.6.0/node_modules/@dagger.io/dagger/dist/common/utils.js","../esm/npm/@dagger.io/dagger@0.6.0/node_modules/@dagger.io/dagger/dist/common/errors/DaggerSDKError.js","../esm/npm/@dagger.io/dagger@0.6.0/node_modules/@dagger.io/dagger/dist/common/errors/errors-codes.js","../esm/npm/@dagger.io/dagger@0.6.0/node_modules/@dagger.io/dagger/dist/common/errors/UnknownDaggerError.js","../esm/npm/@dagger.io/dagger@0.6.0/node_modules/@dagger.io/dagger/dist/common/errors/DockerImageRefValidationError.js","../esm/npm/@dagger.io/dagger@0.6.0/node_modules/@dagger.io/dagger/dist/common/errors/EngineSessionConnectParamsParseError.js","../esm/npm/@dagger.io/dagger@0.6.0/node_modules/@dagger.io/dagger/dist/common/errors/ExecError.js","../esm/npm/@dagger.io/dagger@0.6.0/node_modules/@dagger.io/dagger/dist/common/errors/GraphQLRequestError.js","../esm/npm/@dagger.io/dagger@0.6.0/node_modules/@dagger.io/dagger/dist/common/errors/InitEngineSessionBinaryError.js","../esm/npm/@dagger.io/dagger@0.6.0/node_modules/@dagger.io/dagger/dist/common/errors/TooManyNestedObjectsError.js","../esm/npm/@dagger.io/dagger@0.6.0/node_modules/@dagger.io/dagger/dist/common/errors/EngineSessionErrorOptions.js","../esm/npm/@dagger.io/dagger@0.6.0/node_modules/@dagger.io/dagger/dist/common/errors/EngineSessionConnectionTimeoutError.js","../esm/npm/@dagger.io/dagger@0.6.0/node_modules/@dagger.io/dagger/dist/common/errors/NotAwaitedRequestError.js","../esm/npm/@dagger.io/dagger@0.6.0/node_modules/@dagger.io/dagger/dist/index.js","../esm/npm/@dagger.io/dagger@0.6.0/node_modules/@dagger.io/dagger/dist/provisioning/default.js","../esm/npm/@dagger.io/dagger@0.6.0/node_modules/@dagger.io/dagger/dist/provisioning/bin.js","npm-replacement:node-fetch","../esm/npm/@dagger.io/dagger@0.6.0/node_modules/@dagger.io/dagger/dist/connect.js"],"sourcesContent":["var __awaiter = (this \u0026\u0026 this.__awaiter) || function (thisArg, _arguments, P, generator) {\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n    return new (P || (P = Promise))(function (resolve, reject) {\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\n    });\n};\n/**\n * This file was auto-generated by `client-gen`.\n * Do not make direct changes to the file.\n */\nimport { GraphQLClient } from \"graphql-request\";\nimport { computeQuery } from \"./utils.js\";\nclass BaseClient {\n    /**\n     * @hidden\n     */\n    constructor({ queryTree, host, sessionToken } = {}) {\n        this._queryTree = queryTree || [];\n        this.clientHost = host || \"127.0.0.1:8080\";\n        this.sessionToken = sessionToken || \"\";\n        this.client = new GraphQLClient(`http://${host}/query`, {\n            headers: {\n                Authorization: \"Basic \" + Buffer.from(sessionToken + \":\").toString(\"base64\"),\n            },\n        });\n    }\n    /**\n     * @hidden\n     */\n    get queryTree() {\n        return this._queryTree;\n    }\n}\n/**\n * Sharing mode of the cache volume.\n */\nexport var CacheSharingMode;\n(function (CacheSharingMode) {\n    /**\n     * Shares the cache volume amongst many build pipelines,\n     * but will serialize the writes\n     */\n    CacheSharingMode[CacheSharingMode[\"Locked\"] = 0] = \"Locked\";\n    /**\n     * Keeps a cache volume for a single build pipeline\n     */\n    CacheSharingMode[CacheSharingMode[\"Private\"] = 1] = \"Private\";\n    /**\n     * Shares the cache volume amongst many build pipelines\n     */\n    CacheSharingMode[CacheSharingMode[\"Shared\"] = 2] = \"Shared\";\n})(CacheSharingMode || (CacheSharingMode = {}));\n/**\n * Compression algorithm to use for image layers\n */\nexport var ImageLayerCompression;\n(function (ImageLayerCompression) {\n    ImageLayerCompression[ImageLayerCompression[\"Estargz\"] = 0] = \"Estargz\";\n    ImageLayerCompression[ImageLayerCompression[\"Gzip\"] = 1] = \"Gzip\";\n    ImageLayerCompression[ImageLayerCompression[\"Uncompressed\"] = 2] = \"Uncompressed\";\n    ImageLayerCompression[ImageLayerCompression[\"Zstd\"] = 3] = \"Zstd\";\n})(ImageLayerCompression || (ImageLayerCompression = {}));\n/**\n * Transport layer network protocol associated to a port.\n */\nexport var NetworkProtocol;\n(function (NetworkProtocol) {\n    /**\n     * TCP (Transmission Control Protocol)\n     */\n    NetworkProtocol[NetworkProtocol[\"Tcp\"] = 0] = \"Tcp\";\n    /**\n     * UDP (User Datagram Protocol)\n     */\n    NetworkProtocol[NetworkProtocol[\"Udp\"] = 1] = \"Udp\";\n})(NetworkProtocol || (NetworkProtocol = {}));\n/**\n * A directory whose contents persist across runs.\n */\nexport class CacheVolume extends BaseClient {\n    id() {\n        return __awaiter(this, void 0, void 0, function* () {\n            const response = yield computeQuery([\n                ...this._queryTree,\n                {\n                    operation: \"id\",\n                },\n            ], this.client);\n            return response;\n        });\n    }\n    /**\n     * Chain objects together\n     * @example\n     * ```ts\n     *\tfunction AddAFewMounts(c) {\n     *\t\t\treturn c\n     *\t\t\t.withMountedDirectory(\"/foo\", new Client().host().directory(\"/Users/slumbering/forks/dagger\"))\n     *\t\t\t.withMountedDirectory(\"/bar\", new Client().host().directory(\"/Users/slumbering/forks/dagger/sdk/nodejs\"))\n     *\t}\n     *\n     * connect(async (client) =\u003e {\n     *\t\tconst tree = await client\n     *\t\t\t.container()\n     *\t\t\t.from(\"alpine\")\n     *\t\t\t.withWorkdir(\"/foo\")\n     *\t\t\t.with(AddAFewMounts)\n     *\t\t\t.withExec([\"ls\", \"-lh\"])\n     *\t\t\t.stdout()\n     * })\n     *```\n     */\n    with(arg) {\n        return arg(this);\n    }\n}\n/**\n * An OCI-compatible container, also known as a docker container.\n */\nexport class Container extends BaseClient {\n    /**\n     * Initializes this container from a Dockerfile build.\n     * @param context Directory context used by the Dockerfile.\n     * @param opts.dockerfile Path to the Dockerfile to use.\n     *\n     * Default: './Dockerfile'.\n     * @param opts.buildArgs Additional build arguments.\n     * @param opts.target Target build stage to build.\n     * @param opts.secrets Secrets to pass to the build.\n     *\n     * They will be mounted at /run/secrets/[secret-name].\n     */\n    build(context, opts) {\n        return new Container({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"build\",\n                    args: Object.assign({ context }, opts),\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Retrieves default arguments for future commands.\n     */\n    defaultArgs() {\n        return __awaiter(this, void 0, void 0, function* () {\n            const response = yield computeQuery([\n                ...this._queryTree,\n                {\n                    operation: \"defaultArgs\",\n                },\n            ], this.client);\n            return response;\n        });\n    }\n    /**\n     * Retrieves a directory at the given path.\n     *\n     * Mounts are included.\n     * @param path The path of the directory to retrieve (e.g., \"./src\").\n     */\n    directory(path) {\n        return new Directory({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"directory\",\n                    args: { path },\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Retrieves an endpoint that clients can use to reach this container.\n     *\n     * If no port is specified, the first exposed port is used. If none exist an error is returned.\n     *\n     * If a scheme is specified, a URL is returned. Otherwise, a host:port pair is returned.\n     *\n     * Currently experimental; set _EXPERIMENTAL_DAGGER_SERVICES_DNS=0 to disable.\n     * @param opts.port The exposed port number for the endpoint\n     * @param opts.scheme Return a URL with the given scheme, eg. http for http://\n     */\n    endpoint(opts) {\n        return __awaiter(this, void 0, void 0, function* () {\n            const response = yield computeQuery([\n                ...this._queryTree,\n                {\n                    operation: \"endpoint\",\n                    args: Object.assign({}, opts),\n                },\n            ], this.client);\n            return response;\n        });\n    }\n    /**\n     * Retrieves entrypoint to be prepended to the arguments of all commands.\n     */\n    entrypoint() {\n        return __awaiter(this, void 0, void 0, function* () {\n            const response = yield computeQuery([\n                ...this._queryTree,\n                {\n                    operation: \"entrypoint\",\n                },\n            ], this.client);\n            return response;\n        });\n    }\n    /**\n     * Retrieves the value of the specified environment variable.\n     * @param name The name of the environment variable to retrieve (e.g., \"PATH\").\n     */\n    envVariable(name) {\n        return __awaiter(this, void 0, void 0, function* () {\n            const response = yield computeQuery([\n                ...this._queryTree,\n                {\n                    operation: \"envVariable\",\n                    args: { name },\n                },\n            ], this.client);\n            return response;\n        });\n    }\n    /**\n     * Retrieves the list of environment variables passed to commands.\n     */\n    envVariables() {\n        return __awaiter(this, void 0, void 0, function* () {\n            const response = yield computeQuery([\n                ...this._queryTree,\n                {\n                    operation: \"envVariables\",\n                },\n            ], this.client);\n            return response;\n        });\n    }\n    /**\n     * Retrieves this container after executing the specified command inside it.\n     * @param opts.args Command to run instead of the container's default command (e.g., [\"run\", \"main.go\"]).\n     * @param opts.stdin Content to write to the command's standard input before closing (e.g., \"Hello world\").\n     * @param opts.redirectStdout Redirect the command's standard output to a file in the container (e.g., \"/tmp/stdout\").\n     * @param opts.redirectStderr Redirect the command's standard error to a file in the container (e.g., \"/tmp/stderr\").\n     * @param opts.experimentalPrivilegedNesting Provide dagger access to the executed command.\n     * Do not use this option unless you trust the command being executed.\n     * The command being executed WILL BE GRANTED FULL ACCESS TO YOUR HOST FILESYSTEM.\n     * @deprecated Replaced by withExec.\n     */\n    exec(opts) {\n        return new Container({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"exec\",\n                    args: Object.assign({}, opts),\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Exit code of the last executed command. Zero means success.\n     *\n     * Will execute default command if none is set, or error if there's no default.\n     */\n    exitCode() {\n        return __awaiter(this, void 0, void 0, function* () {\n            const response = yield computeQuery([\n                ...this._queryTree,\n                {\n                    operation: \"exitCode\",\n                },\n            ], this.client);\n            return response;\n        });\n    }\n    /**\n     * Writes the container as an OCI tarball to the destination file path on the host for the specified platform variants.\n     *\n     * Return true on success.\n     * It can also publishes platform variants.\n     * @param path Host's destination path (e.g., \"./tarball\").\n     * Path can be relative to the engine's workdir or absolute.\n     * @param opts.platformVariants Identifiers for other platform specific containers.\n     * Used for multi-platform image.\n     * @param opts.forcedCompression Force each layer of the exported image to use the specified compression algorithm.\n     * If this is unset, then if a layer already has a compressed blob in the engine's\n     * cache, that will be used (this can result in a mix of compression algorithms for\n     * different layers). If this is unset and a layer has no compressed blob in the\n     * engine's cache, then it will be compressed using Gzip.\n     */\n    export(path, opts) {\n        return __awaiter(this, void 0, void 0, function* () {\n            const response = yield computeQuery([\n                ...this._queryTree,\n                {\n                    operation: \"export\",\n                    args: Object.assign({ path }, opts),\n                },\n            ], this.client);\n            return response;\n        });\n    }\n    /**\n     * Retrieves the list of exposed ports.\n     *\n     * Currently experimental; set _EXPERIMENTAL_DAGGER_SERVICES_DNS=0 to disable.\n     */\n    exposedPorts() {\n        return __awaiter(this, void 0, void 0, function* () {\n            const response = yield computeQuery([\n                ...this._queryTree,\n                {\n                    operation: \"exposedPorts\",\n                },\n            ], this.client);\n            return response;\n        });\n    }\n    /**\n     * Retrieves a file at the given path.\n     *\n     * Mounts are included.\n     * @param path The path of the file to retrieve (e.g., \"./README.md\").\n     */\n    file(path) {\n        return new File({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"file\",\n                    args: { path },\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Initializes this container from a pulled base image.\n     * @param address Image's address from its registry.\n     *\n     * Formatted as [host]/[user]/[repo]:[tag] (e.g., \"docker.io/dagger/dagger:main\").\n     */\n    from(address) {\n        return new Container({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"from\",\n                    args: { address },\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Retrieves this container's root filesystem. Mounts are not included.\n     * @deprecated Replaced by rootfs.\n     */\n    fs() {\n        return new Directory({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"fs\",\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Retrieves a hostname which can be used by clients to reach this container.\n     *\n     * Currently experimental; set _EXPERIMENTAL_DAGGER_SERVICES_DNS=0 to disable.\n     */\n    hostname() {\n        return __awaiter(this, void 0, void 0, function* () {\n            const response = yield computeQuery([\n                ...this._queryTree,\n                {\n                    operation: \"hostname\",\n                },\n            ], this.client);\n            return response;\n        });\n    }\n    /**\n     * A unique identifier for this container.\n     */\n    id() {\n        return __awaiter(this, void 0, void 0, function* () {\n            const response = yield computeQuery([\n                ...this._queryTree,\n                {\n                    operation: \"id\",\n                },\n            ], this.client);\n            return response;\n        });\n    }\n    /**\n     * The unique image reference which can only be retrieved immediately after the 'Container.From' call.\n     */\n    imageRef() {\n        return __awaiter(this, void 0, void 0, function* () {\n            const response = yield computeQuery([\n                ...this._queryTree,\n                {\n                    operation: \"imageRef\",\n                },\n            ], this.client);\n            return response;\n        });\n    }\n    /**\n     * Reads the container from an OCI tarball.\n     *\n     * NOTE: this involves unpacking the tarball to an OCI store on the host at\n     * $XDG_CACHE_DIR/dagger/oci. This directory can be removed whenever you like.\n     * @param source File to read the container from.\n     * @param opts.tag Identifies the tag to import from the archive, if the archive bundles\n     * multiple tags.\n     */\n    import(source, opts) {\n        return new Container({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"import\",\n                    args: Object.assign({ source }, opts),\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Retrieves the value of the specified label.\n     */\n    label(name) {\n        return __awaiter(this, void 0, void 0, function* () {\n            const response = yield computeQuery([\n                ...this._queryTree,\n                {\n                    operation: \"label\",\n                    args: { name },\n                },\n            ], this.client);\n            return response;\n        });\n    }\n    /**\n     * Retrieves the list of labels passed to container.\n     */\n    labels() {\n        return __awaiter(this, void 0, void 0, function* () {\n            const response = yield computeQuery([\n                ...this._queryTree,\n                {\n                    operation: \"labels\",\n                },\n            ], this.client);\n            return response;\n        });\n    }\n    /**\n     * Retrieves the list of paths where a directory is mounted.\n     */\n    mounts() {\n        return __awaiter(this, void 0, void 0, function* () {\n            const response = yield computeQuery([\n                ...this._queryTree,\n                {\n                    operation: \"mounts\",\n                },\n            ], this.client);\n            return response;\n        });\n    }\n    /**\n     * Creates a named sub-pipeline\n     * @param name Pipeline name.\n     * @param opts.description Pipeline description.\n     * @param opts.labels Pipeline labels.\n     */\n    pipeline(name, opts) {\n        return new Container({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"pipeline\",\n                    args: Object.assign({ name }, opts),\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * The platform this container executes and publishes as.\n     */\n    platform() {\n        return __awaiter(this, void 0, void 0, function* () {\n            const response = yield computeQuery([\n                ...this._queryTree,\n                {\n                    operation: \"platform\",\n                },\n            ], this.client);\n            return response;\n        });\n    }\n    /**\n     * Publishes this container as a new image to the specified address.\n     *\n     * Publish returns a fully qualified ref.\n     * It can also publish platform variants.\n     * @param address Registry's address to publish the image to.\n     *\n     * Formatted as [host]/[user]/[repo]:[tag] (e.g. \"docker.io/dagger/dagger:main\").\n     * @param opts.platformVariants Identifiers for other platform specific containers.\n     * Used for multi-platform image.\n     * @param opts.forcedCompression Force each layer of the published image to use the specified compression algorithm.\n     * If this is unset, then if a layer already has a compressed blob in the engine's\n     * cache, that will be used (this can result in a mix of compression algorithms for\n     * different layers). If this is unset and a layer has no compressed blob in the\n     * engine's cache, then it will be compressed using Gzip.\n     */\n    publish(address, opts) {\n        return __awaiter(this, void 0, void 0, function* () {\n            const response = yield computeQuery([\n                ...this._queryTree,\n                {\n                    operation: \"publish\",\n                    args: Object.assign({ address }, opts),\n                },\n            ], this.client);\n            return response;\n        });\n    }\n    /**\n     * Retrieves this container's root filesystem. Mounts are not included.\n     */\n    rootfs() {\n        return new Directory({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"rootfs\",\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * The error stream of the last executed command.\n     *\n     * Will execute default command if none is set, or error if there's no default.\n     */\n    stderr() {\n        return __awaiter(this, void 0, void 0, function* () {\n            const response = yield computeQuery([\n                ...this._queryTree,\n                {\n                    operation: \"stderr\",\n                },\n            ], this.client);\n            return response;\n        });\n    }\n    /**\n     * The output stream of the last executed command.\n     *\n     * Will execute default command if none is set, or error if there's no default.\n     */\n    stdout() {\n        return __awaiter(this, void 0, void 0, function* () {\n            const response = yield computeQuery([\n                ...this._queryTree,\n                {\n                    operation: \"stdout\",\n                },\n            ], this.client);\n            return response;\n        });\n    }\n    /**\n     * Forces evaluation of the pipeline in the engine.\n     *\n     * It doesn't run the default command if no exec has been set.\n     */\n    sync() {\n        return __awaiter(this, void 0, void 0, function* () {\n            yield computeQuery([\n                ...this._queryTree,\n                {\n                    operation: \"sync\",\n                },\n            ], this.client);\n            return this;\n        });\n    }\n    /**\n     * Retrieves the user to be set for all commands.\n     */\n    user() {\n        return __awaiter(this, void 0, void 0, function* () {\n            const response = yield computeQuery([\n                ...this._queryTree,\n                {\n                    operation: \"user\",\n                },\n            ], this.client);\n            return response;\n        });\n    }\n    /**\n     * Configures default arguments for future commands.\n     * @param opts.args Arguments to prepend to future executions (e.g., [\"-v\", \"--no-cache\"]).\n     */\n    withDefaultArgs(opts) {\n        return new Container({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"withDefaultArgs\",\n                    args: Object.assign({}, opts),\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Retrieves this container plus a directory written at the given path.\n     * @param path Location of the written directory (e.g., \"/tmp/directory\").\n     * @param directory Identifier of the directory to write\n     * @param opts.exclude Patterns to exclude in the written directory (e.g., [\"node_modules/**\", \".gitignore\", \".git/\"]).\n     * @param opts.include Patterns to include in the written directory (e.g., [\"*.go\", \"go.mod\", \"go.sum\"]).\n     * @param opts.owner A user:group to set for the directory and its contents.\n     *\n     * The user and group can either be an ID (1000:1000) or a name (foo:bar).\n     *\n     * If the group is omitted, it defaults to the same as the user.\n     */\n    withDirectory(path, directory, opts) {\n        return new Container({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"withDirectory\",\n                    args: Object.assign({ path, directory }, opts),\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Retrieves this container but with a different command entrypoint.\n     * @param args Entrypoint to use for future executions (e.g., [\"go\", \"run\"]).\n     */\n    withEntrypoint(args) {\n        return new Container({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"withEntrypoint\",\n                    args: { args },\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Retrieves this container plus the given environment variable.\n     * @param name The name of the environment variable (e.g., \"HOST\").\n     * @param value The value of the environment variable. (e.g., \"localhost\").\n     * @param opts.expand Replace ${VAR} or $VAR in the value according to the current environment\n     * variables defined in the container (e.g., \"/opt/bin:$PATH\").\n     */\n    withEnvVariable(name, value, opts) {\n        return new Container({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"withEnvVariable\",\n                    args: Object.assign({ name, value }, opts),\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Retrieves this container after executing the specified command inside it.\n     * @param args Command to run instead of the container's default command (e.g., [\"run\", \"main.go\"]).\n     *\n     * If empty, the container's default command is used.\n     * @param opts.skipEntrypoint If the container has an entrypoint, ignore it for args rather than using it to wrap them.\n     * @param opts.stdin Content to write to the command's standard input before closing (e.g., \"Hello world\").\n     * @param opts.redirectStdout Redirect the command's standard output to a file in the container (e.g., \"/tmp/stdout\").\n     * @param opts.redirectStderr Redirect the command's standard error to a file in the container (e.g., \"/tmp/stderr\").\n     * @param opts.experimentalPrivilegedNesting Provides dagger access to the executed command.\n     *\n     * Do not use this option unless you trust the command being executed.\n     * The command being executed WILL BE GRANTED FULL ACCESS TO YOUR HOST FILESYSTEM.\n     * @param opts.insecureRootCapabilities Execute the command with all root capabilities. This is similar to running a command\n     * with \"sudo\" or executing `docker run` with the `--privileged` flag. Containerization\n     * does not provide any security guarantees when using this option. It should only be used\n     * when absolutely necessary and only with trusted commands.\n     */\n    withExec(args, opts) {\n        return new Container({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"withExec\",\n                    args: Object.assign({ args }, opts),\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Expose a network port.\n     *\n     * Exposed ports serve two purposes:\n     *   - For health checks and introspection, when running services\n     *   - For setting the EXPOSE OCI field when publishing the container\n     *\n     * Currently experimental; set _EXPERIMENTAL_DAGGER_SERVICES_DNS=0 to disable.\n     * @param port Port number to expose\n     * @param opts.protocol Transport layer network protocol\n     * @param opts.description Optional port description\n     */\n    withExposedPort(port, opts) {\n        return new Container({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"withExposedPort\",\n                    args: Object.assign({ port }, opts),\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Initializes this container from this DirectoryID.\n     * @deprecated Replaced by withRootfs.\n     */\n    withFS(id) {\n        return new Container({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"withFS\",\n                    args: { id },\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Retrieves this container plus the contents of the given file copied to the given path.\n     * @param path Location of the copied file (e.g., \"/tmp/file.txt\").\n     * @param source Identifier of the file to copy.\n     * @param opts.permissions Permission given to the copied file (e.g., 0600).\n     *\n     * Default: 0644.\n     * @param opts.owner A user:group to set for the file.\n     *\n     * The user and group can either be an ID (1000:1000) or a name (foo:bar).\n     *\n     * If the group is omitted, it defaults to the same as the user.\n     */\n    withFile(path, source, opts) {\n        return new Container({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"withFile\",\n                    args: Object.assign({ path, source }, opts),\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Retrieves this container plus the given label.\n     * @param name The name of the label (e.g., \"org.opencontainers.artifact.created\").\n     * @param value The value of the label (e.g., \"2023-01-01T00:00:00Z\").\n     */\n    withLabel(name, value) {\n        return new Container({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"withLabel\",\n                    args: { name, value },\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Retrieves this container plus a cache volume mounted at the given path.\n     * @param path Location of the cache directory (e.g., \"/cache/node_modules\").\n     * @param cache Identifier of the cache volume to mount.\n     * @param opts.source Identifier of the directory to use as the cache volume's root.\n     * @param opts.sharing Sharing mode of the cache volume.\n     * @param opts.owner A user:group to set for the mounted cache directory.\n     *\n     * Note that this changes the ownership of the specified mount along with the\n     * initial filesystem provided by source (if any). It does not have any effect\n     * if/when the cache has already been created.\n     *\n     * The user and group can either be an ID (1000:1000) or a name (foo:bar).\n     *\n     * If the group is omitted, it defaults to the same as the user.\n     */\n    withMountedCache(path, cache, opts) {\n        return new Container({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"withMountedCache\",\n                    args: Object.assign({ path, cache }, opts),\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Retrieves this container plus a directory mounted at the given path.\n     * @param path Location of the mounted directory (e.g., \"/mnt/directory\").\n     * @param source Identifier of the mounted directory.\n     * @param opts.owner A user:group to set for the mounted directory and its contents.\n     *\n     * The user and group can either be an ID (1000:1000) or a name (foo:bar).\n     *\n     * If the group is omitted, it defaults to the same as the user.\n     */\n    withMountedDirectory(path, source, opts) {\n        return new Container({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"withMountedDirectory\",\n                    args: Object.assign({ path, source }, opts),\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Retrieves this container plus a file mounted at the given path.\n     * @param path Location of the mounted file (e.g., \"/tmp/file.txt\").\n     * @param source Identifier of the mounted file.\n     * @param opts.owner A user or user:group to set for the mounted file.\n     *\n     * The user and group can either be an ID (1000:1000) or a name (foo:bar).\n     *\n     * If the group is omitted, it defaults to the same as the user.\n     */\n    withMountedFile(path, source, opts) {\n        return new Container({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"withMountedFile\",\n                    args: Object.assign({ path, source }, opts),\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Retrieves this container plus a secret mounted into a file at the given path.\n     * @param path Location of the secret file (e.g., \"/tmp/secret.txt\").\n     * @param source Identifier of the secret to mount.\n     * @param opts.owner A user:group to set for the mounted secret.\n     *\n     * The user and group can either be an ID (1000:1000) or a name (foo:bar).\n     *\n     * If the group is omitted, it defaults to the same as the user.\n     */\n    withMountedSecret(path, source, opts) {\n        return new Container({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"withMountedSecret\",\n                    args: Object.assign({ path, source }, opts),\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Retrieves this container plus a temporary directory mounted at the given path.\n     * @param path Location of the temporary directory (e.g., \"/tmp/temp_dir\").\n     */\n    withMountedTemp(path) {\n        return new Container({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"withMountedTemp\",\n                    args: { path },\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Retrieves this container plus a new file written at the given path.\n     * @param path Location of the written file (e.g., \"/tmp/file.txt\").\n     * @param opts.contents Content of the file to write (e.g., \"Hello world!\").\n     * @param opts.permissions Permission given to the written file (e.g., 0600).\n     *\n     * Default: 0644.\n     * @param opts.owner A user:group to set for the file.\n     *\n     * The user and group can either be an ID (1000:1000) or a name (foo:bar).\n     *\n     * If the group is omitted, it defaults to the same as the user.\n     */\n    withNewFile(path, opts) {\n        return new Container({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"withNewFile\",\n                    args: Object.assign({ path }, opts),\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Retrieves this container with a registry authentication for a given address.\n     * @param address Registry's address to bind the authentication to.\n     * Formatted as [host]/[user]/[repo]:[tag] (e.g. docker.io/dagger/dagger:main).\n     * @param username The username of the registry's account (e.g., \"Dagger\").\n     * @param secret The API key, password or token to authenticate to this registry.\n     */\n    withRegistryAuth(address, username, secret) {\n        return new Container({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"withRegistryAuth\",\n                    args: { address, username, secret },\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Initializes this container from this DirectoryID.\n     */\n    withRootfs(id) {\n        return new Container({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"withRootfs\",\n                    args: { id },\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Retrieves this container plus an env variable containing the given secret.\n     * @param name The name of the secret variable (e.g., \"API_SECRET\").\n     * @param secret The identifier of the secret value.\n     */\n    withSecretVariable(name, secret) {\n        return new Container({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"withSecretVariable\",\n                    args: { name, secret },\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Establish a runtime dependency on a service.\n     *\n     * The service will be started automatically when needed and detached when it is\n     * no longer needed, executing the default command if none is set.\n     *\n     * The service will be reachable from the container via the provided hostname alias.\n     *\n     * The service dependency will also convey to any files or directories produced by the container.\n     *\n     * Currently experimental; set _EXPERIMENTAL_DAGGER_SERVICES_DNS=0 to disable.\n     * @param alias A name that can be used to reach the service from the container\n     * @param service Identifier of the service container\n     */\n    withServiceBinding(alias, service) {\n        return new Container({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"withServiceBinding\",\n                    args: { alias, service },\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Retrieves this container plus a socket forwarded to the given Unix socket path.\n     * @param path Location of the forwarded Unix socket (e.g., \"/tmp/socket\").\n     * @param source Identifier of the socket to forward.\n     * @param opts.owner A user:group to set for the mounted socket.\n     *\n     * The user and group can either be an ID (1000:1000) or a name (foo:bar).\n     *\n     * If the group is omitted, it defaults to the same as the user.\n     */\n    withUnixSocket(path, source, opts) {\n        return new Container({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"withUnixSocket\",\n                    args: Object.assign({ path, source }, opts),\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Retrieves this container with a different command user.\n     * @param name The user to set (e.g., \"root\").\n     */\n    withUser(name) {\n        return new Container({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"withUser\",\n                    args: { name },\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Retrieves this container with a different working directory.\n     * @param path The path to set as the working directory (e.g., \"/app\").\n     */\n    withWorkdir(path) {\n        return new Container({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"withWorkdir\",\n                    args: { path },\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Retrieves this container minus the given environment variable.\n     * @param name The name of the environment variable (e.g., \"HOST\").\n     */\n    withoutEnvVariable(name) {\n        return new Container({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"withoutEnvVariable\",\n                    args: { name },\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Unexpose a previously exposed port.\n     *\n     * Currently experimental; set _EXPERIMENTAL_DAGGER_SERVICES_DNS=0 to disable.\n     * @param port Port number to unexpose\n     * @param opts.protocol Port protocol to unexpose\n     */\n    withoutExposedPort(port, opts) {\n        return new Container({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"withoutExposedPort\",\n                    args: Object.assign({ port }, opts),\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Retrieves this container minus the given environment label.\n     * @param name The name of the label to remove (e.g., \"org.opencontainers.artifact.created\").\n     */\n    withoutLabel(name) {\n        return new Container({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"withoutLabel\",\n                    args: { name },\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Retrieves this container after unmounting everything at the given path.\n     * @param path Location of the cache directory (e.g., \"/cache/node_modules\").\n     */\n    withoutMount(path) {\n        return new Container({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"withoutMount\",\n                    args: { path },\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Retrieves this container without the registry authentication of a given address.\n     * @param address Registry's address to remove the authentication from.\n     * Formatted as [host]/[user]/[repo]:[tag] (e.g. docker.io/dagger/dagger:main).\n     */\n    withoutRegistryAuth(address) {\n        return new Container({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"withoutRegistryAuth\",\n                    args: { address },\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Retrieves this container with a previously added Unix socket removed.\n     * @param path Location of the socket to remove (e.g., \"/tmp/socket\").\n     */\n    withoutUnixSocket(path) {\n        return new Container({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"withoutUnixSocket\",\n                    args: { path },\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Retrieves the working directory for all commands.\n     */\n    workdir() {\n        return __awaiter(this, void 0, void 0, function* () {\n            const response = yield computeQuery([\n                ...this._queryTree,\n                {\n                    operation: \"workdir\",\n                },\n            ], this.client);\n            return response;\n        });\n    }\n    /**\n     * Chain objects together\n     * @example\n     * ```ts\n     *\tfunction AddAFewMounts(c) {\n     *\t\t\treturn c\n     *\t\t\t.withMountedDirectory(\"/foo\", new Client().host().directory(\"/Users/slumbering/forks/dagger\"))\n     *\t\t\t.withMountedDirectory(\"/bar\", new Client().host().directory(\"/Users/slumbering/forks/dagger/sdk/nodejs\"))\n     *\t}\n     *\n     * connect(async (client) =\u003e {\n     *\t\tconst tree = await client\n     *\t\t\t.container()\n     *\t\t\t.from(\"alpine\")\n     *\t\t\t.withWorkdir(\"/foo\")\n     *\t\t\t.with(AddAFewMounts)\n     *\t\t\t.withExec([\"ls\", \"-lh\"])\n     *\t\t\t.stdout()\n     * })\n     *```\n     */\n    with(arg) {\n        return arg(this);\n    }\n}\n/**\n * A directory.\n */\nexport class Directory extends BaseClient {\n    /**\n     * Gets the difference between this directory and an another directory.\n     * @param other Identifier of the directory to compare.\n     */\n    diff(other) {\n        return new Directory({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"diff\",\n                    args: { other },\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Retrieves a directory at the given path.\n     * @param path Location of the directory to retrieve (e.g., \"/src\").\n     */\n    directory(path) {\n        return new Directory({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"directory\",\n                    args: { path },\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Builds a new Docker container from this directory.\n     * @param opts.dockerfile Path to the Dockerfile to use (e.g., \"frontend.Dockerfile\").\n     *\n     * Defaults: './Dockerfile'.\n     * @param opts.platform The platform to build.\n     * @param opts.buildArgs Build arguments to use in the build.\n     * @param opts.target Target build stage to build.\n     * @param opts.secrets Secrets to pass to the build.\n     *\n     * They will be mounted at /run/secrets/[secret-name].\n     */\n    dockerBuild(opts) {\n        return new Container({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"dockerBuild\",\n                    args: Object.assign({}, opts),\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Returns a list of files and directories at the given path.\n     * @param opts.path Location of the directory to look at (e.g., \"/src\").\n     */\n    entries(opts) {\n        return __awaiter(this, void 0, void 0, function* () {\n            const response = yield computeQuery([\n                ...this._queryTree,\n                {\n                    operation: \"entries\",\n                    args: Object.assign({}, opts),\n                },\n            ], this.client);\n            return response;\n        });\n    }\n    /**\n     * Writes the contents of the directory to a path on the host.\n     * @param path Location of the copied directory (e.g., \"logs/\").\n     */\n    export(path) {\n        return __awaiter(this, void 0, void 0, function* () {\n            const response = yield computeQuery([\n                ...this._queryTree,\n                {\n                    operation: \"export\",\n                    args: { path },\n                },\n            ], this.client);\n            return response;\n        });\n    }\n    /**\n     * Retrieves a file at the given path.\n     * @param path Location of the file to retrieve (e.g., \"README.md\").\n     */\n    file(path) {\n        return new File({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"file\",\n                    args: { path },\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * The content-addressed identifier of the directory.\n     */\n    id() {\n        return __awaiter(this, void 0, void 0, function* () {\n            const response = yield computeQuery([\n                ...this._queryTree,\n                {\n                    operation: \"id\",\n                },\n            ], this.client);\n            return response;\n        });\n    }\n    /**\n     * Creates a named sub-pipeline\n     * @param name Pipeline name.\n     * @param opts.description Pipeline description.\n     * @param opts.labels Pipeline labels.\n     */\n    pipeline(name, opts) {\n        return new Directory({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"pipeline\",\n                    args: Object.assign({ name }, opts),\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Retrieves this directory plus a directory written at the given path.\n     * @param path Location of the written directory (e.g., \"/src/\").\n     * @param directory Identifier of the directory to copy.\n     * @param opts.exclude Exclude artifacts that match the given pattern (e.g., [\"node_modules/\", \".git*\"]).\n     * @param opts.include Include only artifacts that match the given pattern (e.g., [\"app/\", \"package.*\"]).\n     */\n    withDirectory(path, directory, opts) {\n        return new Directory({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"withDirectory\",\n                    args: Object.assign({ path, directory }, opts),\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Retrieves this directory plus the contents of the given file copied to the given path.\n     * @param path Location of the copied file (e.g., \"/file.txt\").\n     * @param source Identifier of the file to copy.\n     * @param opts.permissions Permission given to the copied file (e.g., 0600).\n     *\n     * Default: 0644.\n     */\n    withFile(path, source, opts) {\n        return new Directory({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"withFile\",\n                    args: Object.assign({ path, source }, opts),\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Retrieves this directory plus a new directory created at the given path.\n     * @param path Location of the directory created (e.g., \"/logs\").\n     * @param opts.permissions Permission granted to the created directory (e.g., 0777).\n     *\n     * Default: 0755.\n     */\n    withNewDirectory(path, opts) {\n        return new Directory({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"withNewDirectory\",\n                    args: Object.assign({ path }, opts),\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Retrieves this directory plus a new file written at the given path.\n     * @param path Location of the written file (e.g., \"/file.txt\").\n     * @param contents Content of the written file (e.g., \"Hello world!\").\n     * @param opts.permissions Permission given to the copied file (e.g., 0600).\n     *\n     * Default: 0644.\n     */\n    withNewFile(path, contents, opts) {\n        return new Directory({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"withNewFile\",\n                    args: Object.assign({ path, contents }, opts),\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Retrieves this directory with all file/dir timestamps set to the given time.\n     * @param timestamp Timestamp to set dir/files in.\n     *\n     * Formatted in seconds following Unix epoch (e.g., 1672531199).\n     */\n    withTimestamps(timestamp) {\n        return new Directory({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"withTimestamps\",\n                    args: { timestamp },\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Retrieves this directory with the directory at the given path removed.\n     * @param path Location of the directory to remove (e.g., \".github/\").\n     */\n    withoutDirectory(path) {\n        return new Directory({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"withoutDirectory\",\n                    args: { path },\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Retrieves this directory with the file at the given path removed.\n     * @param path Location of the file to remove (e.g., \"/file.txt\").\n     */\n    withoutFile(path) {\n        return new Directory({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"withoutFile\",\n                    args: { path },\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Chain objects together\n     * @example\n     * ```ts\n     *\tfunction AddAFewMounts(c) {\n     *\t\t\treturn c\n     *\t\t\t.withMountedDirectory(\"/foo\", new Client().host().directory(\"/Users/slumbering/forks/dagger\"))\n     *\t\t\t.withMountedDirectory(\"/bar\", new Client().host().directory(\"/Users/slumbering/forks/dagger/sdk/nodejs\"))\n     *\t}\n     *\n     * connect(async (client) =\u003e {\n     *\t\tconst tree = await client\n     *\t\t\t.container()\n     *\t\t\t.from(\"alpine\")\n     *\t\t\t.withWorkdir(\"/foo\")\n     *\t\t\t.with(AddAFewMounts)\n     *\t\t\t.withExec([\"ls\", \"-lh\"])\n     *\t\t\t.stdout()\n     * })\n     *```\n     */\n    with(arg) {\n        return arg(this);\n    }\n}\n/**\n * A simple key value object that represents an environment variable.\n */\nexport class EnvVariable extends BaseClient {\n    /**\n     * The environment variable name.\n     */\n    name() {\n        return __awaiter(this, void 0, void 0, function* () {\n            const response = yield computeQuery([\n                ...this._queryTree,\n                {\n                    operation: \"name\",\n                },\n            ], this.client);\n            return response;\n        });\n    }\n    /**\n     * The environment variable value.\n     */\n    value() {\n        return __awaiter(this, void 0, void 0, function* () {\n            const response = yield computeQuery([\n                ...this._queryTree,\n                {\n                    operation: \"value\",\n                },\n            ], this.client);\n            return response;\n        });\n    }\n    /**\n     * Chain objects together\n     * @example\n     * ```ts\n     *\tfunction AddAFewMounts(c) {\n     *\t\t\treturn c\n     *\t\t\t.withMountedDirectory(\"/foo\", new Client().host().directory(\"/Users/slumbering/forks/dagger\"))\n     *\t\t\t.withMountedDirectory(\"/bar\", new Client().host().directory(\"/Users/slumbering/forks/dagger/sdk/nodejs\"))\n     *\t}\n     *\n     * connect(async (client) =\u003e {\n     *\t\tconst tree = await client\n     *\t\t\t.container()\n     *\t\t\t.from(\"alpine\")\n     *\t\t\t.withWorkdir(\"/foo\")\n     *\t\t\t.with(AddAFewMounts)\n     *\t\t\t.withExec([\"ls\", \"-lh\"])\n     *\t\t\t.stdout()\n     * })\n     *```\n     */\n    with(arg) {\n        return arg(this);\n    }\n}\n/**\n * A file.\n */\nexport class File extends BaseClient {\n    /**\n     * Retrieves the contents of the file.\n     */\n    contents() {\n        return __awaiter(this, void 0, void 0, function* () {\n            const response = yield computeQuery([\n                ...this._queryTree,\n                {\n                    operation: \"contents\",\n                },\n            ], this.client);\n            return response;\n        });\n    }\n    /**\n     * Writes the file to a file path on the host.\n     * @param path Location of the written directory (e.g., \"output.txt\").\n     */\n    export(path) {\n        return __awaiter(this, void 0, void 0, function* () {\n            const response = yield computeQuery([\n                ...this._queryTree,\n                {\n                    operation: \"export\",\n                    args: { path },\n                },\n            ], this.client);\n            return response;\n        });\n    }\n    /**\n     * Retrieves the content-addressed identifier of the file.\n     */\n    id() {\n        return __awaiter(this, void 0, void 0, function* () {\n            const response = yield computeQuery([\n                ...this._queryTree,\n                {\n                    operation: \"id\",\n                },\n            ], this.client);\n            return response;\n        });\n    }\n    /**\n     * Retrieves a secret referencing the contents of this file.\n     * @deprecated insecure, leaves secret in cache. Superseded by setSecret\n     */\n    secret() {\n        return new Secret({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"secret\",\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Gets the size of the file, in bytes.\n     */\n    size() {\n        return __awaiter(this, void 0, void 0, function* () {\n            const response = yield computeQuery([\n                ...this._queryTree,\n                {\n                    operation: \"size\",\n                },\n            ], this.client);\n            return response;\n        });\n    }\n    /**\n     * Retrieves this file with its created/modified timestamps set to the given time.\n     * @param timestamp Timestamp to set dir/files in.\n     *\n     * Formatted in seconds following Unix epoch (e.g., 1672531199).\n     */\n    withTimestamps(timestamp) {\n        return new File({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"withTimestamps\",\n                    args: { timestamp },\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Chain objects together\n     * @example\n     * ```ts\n     *\tfunction AddAFewMounts(c) {\n     *\t\t\treturn c\n     *\t\t\t.withMountedDirectory(\"/foo\", new Client().host().directory(\"/Users/slumbering/forks/dagger\"))\n     *\t\t\t.withMountedDirectory(\"/bar\", new Client().host().directory(\"/Users/slumbering/forks/dagger/sdk/nodejs\"))\n     *\t}\n     *\n     * connect(async (client) =\u003e {\n     *\t\tconst tree = await client\n     *\t\t\t.container()\n     *\t\t\t.from(\"alpine\")\n     *\t\t\t.withWorkdir(\"/foo\")\n     *\t\t\t.with(AddAFewMounts)\n     *\t\t\t.withExec([\"ls\", \"-lh\"])\n     *\t\t\t.stdout()\n     * })\n     *```\n     */\n    with(arg) {\n        return arg(this);\n    }\n}\n/**\n * A git ref (tag, branch or commit).\n */\nexport class GitRef extends BaseClient {\n    /**\n     * The digest of the current value of this ref.\n     */\n    digest() {\n        return __awaiter(this, void 0, void 0, function* () {\n            const response = yield computeQuery([\n                ...this._queryTree,\n                {\n                    operation: \"digest\",\n                },\n            ], this.client);\n            return response;\n        });\n    }\n    /**\n     * The filesystem tree at this ref.\n     */\n    tree(opts) {\n        return new Directory({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"tree\",\n                    args: Object.assign({}, opts),\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Chain objects together\n     * @example\n     * ```ts\n     *\tfunction AddAFewMounts(c) {\n     *\t\t\treturn c\n     *\t\t\t.withMountedDirectory(\"/foo\", new Client().host().directory(\"/Users/slumbering/forks/dagger\"))\n     *\t\t\t.withMountedDirectory(\"/bar\", new Client().host().directory(\"/Users/slumbering/forks/dagger/sdk/nodejs\"))\n     *\t}\n     *\n     * connect(async (client) =\u003e {\n     *\t\tconst tree = await client\n     *\t\t\t.container()\n     *\t\t\t.from(\"alpine\")\n     *\t\t\t.withWorkdir(\"/foo\")\n     *\t\t\t.with(AddAFewMounts)\n     *\t\t\t.withExec([\"ls\", \"-lh\"])\n     *\t\t\t.stdout()\n     * })\n     *```\n     */\n    with(arg) {\n        return arg(this);\n    }\n}\n/**\n * A git repository.\n */\nexport class GitRepository extends BaseClient {\n    /**\n     * Returns details on one branch.\n     * @param name Branch's name (e.g., \"main\").\n     */\n    branch(name) {\n        return new GitRef({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"branch\",\n                    args: { name },\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Lists of branches on the repository.\n     */\n    branches() {\n        return __awaiter(this, void 0, void 0, function* () {\n            const response = yield computeQuery([\n                ...this._queryTree,\n                {\n                    operation: \"branches\",\n                },\n            ], this.client);\n            return response;\n        });\n    }\n    /**\n     * Returns details on one commit.\n     * @param id Identifier of the commit (e.g., \"b6315d8f2810962c601af73f86831f6866ea798b\").\n     */\n    commit(id) {\n        return new GitRef({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"commit\",\n                    args: { id },\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Returns details on one tag.\n     * @param name Tag's name (e.g., \"v0.3.9\").\n     */\n    tag(name) {\n        return new GitRef({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"tag\",\n                    args: { name },\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Lists of tags on the repository.\n     */\n    tags() {\n        return __awaiter(this, void 0, void 0, function* () {\n            const response = yield computeQuery([\n                ...this._queryTree,\n                {\n                    operation: \"tags\",\n                },\n            ], this.client);\n            return response;\n        });\n    }\n    /**\n     * Chain objects together\n     * @example\n     * ```ts\n     *\tfunction AddAFewMounts(c) {\n     *\t\t\treturn c\n     *\t\t\t.withMountedDirectory(\"/foo\", new Client().host().directory(\"/Users/slumbering/forks/dagger\"))\n     *\t\t\t.withMountedDirectory(\"/bar\", new Client().host().directory(\"/Users/slumbering/forks/dagger/sdk/nodejs\"))\n     *\t}\n     *\n     * connect(async (client) =\u003e {\n     *\t\tconst tree = await client\n     *\t\t\t.container()\n     *\t\t\t.from(\"alpine\")\n     *\t\t\t.withWorkdir(\"/foo\")\n     *\t\t\t.with(AddAFewMounts)\n     *\t\t\t.withExec([\"ls\", \"-lh\"])\n     *\t\t\t.stdout()\n     * })\n     *```\n     */\n    with(arg) {\n        return arg(this);\n    }\n}\n/**\n * Information about the host execution environment.\n */\nexport class Host extends BaseClient {\n    /**\n     * Accesses a directory on the host.\n     * @param path Location of the directory to access (e.g., \".\").\n     * @param opts.exclude Exclude artifacts that match the given pattern (e.g., [\"node_modules/\", \".git*\"]).\n     * @param opts.include Include only artifacts that match the given pattern (e.g., [\"app/\", \"package.*\"]).\n     */\n    directory(path, opts) {\n        return new Directory({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"directory\",\n                    args: Object.assign({ path }, opts),\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Accesses an environment variable on the host.\n     * @param name Name of the environment variable (e.g., \"PATH\").\n     */\n    envVariable(name) {\n        return new HostVariable({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"envVariable\",\n                    args: { name },\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Accesses a Unix socket on the host.\n     * @param path Location of the Unix socket (e.g., \"/var/run/docker.sock\").\n     */\n    unixSocket(path) {\n        return new Socket({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"unixSocket\",\n                    args: { path },\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Retrieves the current working directory on the host.\n     * @param opts.exclude Exclude artifacts that match the given pattern (e.g., [\"node_modules/\", \".git*\"]).\n     * @param opts.include Include only artifacts that match the given pattern (e.g., [\"app/\", \"package.*\"]).\n     * @deprecated Use directory with path set to '.' instead.\n     */\n    workdir(opts) {\n        return new Directory({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"workdir\",\n                    args: Object.assign({}, opts),\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Chain objects together\n     * @example\n     * ```ts\n     *\tfunction AddAFewMounts(c) {\n     *\t\t\treturn c\n     *\t\t\t.withMountedDirectory(\"/foo\", new Client().host().directory(\"/Users/slumbering/forks/dagger\"))\n     *\t\t\t.withMountedDirectory(\"/bar\", new Client().host().directory(\"/Users/slumbering/forks/dagger/sdk/nodejs\"))\n     *\t}\n     *\n     * connect(async (client) =\u003e {\n     *\t\tconst tree = await client\n     *\t\t\t.container()\n     *\t\t\t.from(\"alpine\")\n     *\t\t\t.withWorkdir(\"/foo\")\n     *\t\t\t.with(AddAFewMounts)\n     *\t\t\t.withExec([\"ls\", \"-lh\"])\n     *\t\t\t.stdout()\n     * })\n     *```\n     */\n    with(arg) {\n        return arg(this);\n    }\n}\n/**\n * An environment variable on the host environment.\n */\nexport class HostVariable extends BaseClient {\n    /**\n     * A secret referencing the value of this variable.\n     * @deprecated been superseded by setSecret\n     */\n    secret() {\n        return new Secret({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"secret\",\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * The value of this variable.\n     */\n    value() {\n        return __awaiter(this, void 0, void 0, function* () {\n            const response = yield computeQuery([\n                ...this._queryTree,\n                {\n                    operation: \"value\",\n                },\n            ], this.client);\n            return response;\n        });\n    }\n    /**\n     * Chain objects together\n     * @example\n     * ```ts\n     *\tfunction AddAFewMounts(c) {\n     *\t\t\treturn c\n     *\t\t\t.withMountedDirectory(\"/foo\", new Client().host().directory(\"/Users/slumbering/forks/dagger\"))\n     *\t\t\t.withMountedDirectory(\"/bar\", new Client().host().directory(\"/Users/slumbering/forks/dagger/sdk/nodejs\"))\n     *\t}\n     *\n     * connect(async (client) =\u003e {\n     *\t\tconst tree = await client\n     *\t\t\t.container()\n     *\t\t\t.from(\"alpine\")\n     *\t\t\t.withWorkdir(\"/foo\")\n     *\t\t\t.with(AddAFewMounts)\n     *\t\t\t.withExec([\"ls\", \"-lh\"])\n     *\t\t\t.stdout()\n     * })\n     *```\n     */\n    with(arg) {\n        return arg(this);\n    }\n}\n/**\n * A simple key value object that represents a label.\n */\nexport class Label extends BaseClient {\n    /**\n     * The label name.\n     */\n    name() {\n        return __awaiter(this, void 0, void 0, function* () {\n            const response = yield computeQuery([\n                ...this._queryTree,\n                {\n                    operation: \"name\",\n                },\n            ], this.client);\n            return response;\n        });\n    }\n    /**\n     * The label value.\n     */\n    value() {\n        return __awaiter(this, void 0, void 0, function* () {\n            const response = yield computeQuery([\n                ...this._queryTree,\n                {\n                    operation: \"value\",\n                },\n            ], this.client);\n            return response;\n        });\n    }\n    /**\n     * Chain objects together\n     * @example\n     * ```ts\n     *\tfunction AddAFewMounts(c) {\n     *\t\t\treturn c\n     *\t\t\t.withMountedDirectory(\"/foo\", new Client().host().directory(\"/Users/slumbering/forks/dagger\"))\n     *\t\t\t.withMountedDirectory(\"/bar\", new Client().host().directory(\"/Users/slumbering/forks/dagger/sdk/nodejs\"))\n     *\t}\n     *\n     * connect(async (client) =\u003e {\n     *\t\tconst tree = await client\n     *\t\t\t.container()\n     *\t\t\t.from(\"alpine\")\n     *\t\t\t.withWorkdir(\"/foo\")\n     *\t\t\t.with(AddAFewMounts)\n     *\t\t\t.withExec([\"ls\", \"-lh\"])\n     *\t\t\t.stdout()\n     * })\n     *```\n     */\n    with(arg) {\n        return arg(this);\n    }\n}\n/**\n * A port exposed by a container.\n */\nexport class Port extends BaseClient {\n    /**\n     * The port description.\n     */\n    description() {\n        return __awaiter(this, void 0, void 0, function* () {\n            const response = yield computeQuery([\n                ...this._queryTree,\n                {\n                    operation: \"description\",\n                },\n            ], this.client);\n            return response;\n        });\n    }\n    /**\n     * The port number.\n     */\n    port() {\n        return __awaiter(this, void 0, void 0, function* () {\n            const response = yield computeQuery([\n                ...this._queryTree,\n                {\n                    operation: \"port\",\n                },\n            ], this.client);\n            return response;\n        });\n    }\n    /**\n     * The transport layer network protocol.\n     */\n    protocol() {\n        return __awaiter(this, void 0, void 0, function* () {\n            const response = yield computeQuery([\n                ...this._queryTree,\n                {\n                    operation: \"protocol\",\n                },\n            ], this.client);\n            return response;\n        });\n    }\n    /**\n     * Chain objects together\n     * @example\n     * ```ts\n     *\tfunction AddAFewMounts(c) {\n     *\t\t\treturn c\n     *\t\t\t.withMountedDirectory(\"/foo\", new Client().host().directory(\"/Users/slumbering/forks/dagger\"))\n     *\t\t\t.withMountedDirectory(\"/bar\", new Client().host().directory(\"/Users/slumbering/forks/dagger/sdk/nodejs\"))\n     *\t}\n     *\n     * connect(async (client) =\u003e {\n     *\t\tconst tree = await client\n     *\t\t\t.container()\n     *\t\t\t.from(\"alpine\")\n     *\t\t\t.withWorkdir(\"/foo\")\n     *\t\t\t.with(AddAFewMounts)\n     *\t\t\t.withExec([\"ls\", \"-lh\"])\n     *\t\t\t.stdout()\n     * })\n     *```\n     */\n    with(arg) {\n        return arg(this);\n    }\n}\n/**\n * A collection of Dagger resources that can be queried and invoked.\n */\nexport class Project extends BaseClient {\n    /**\n     * Commands provided by this project\n     */\n    commands() {\n        return __awaiter(this, void 0, void 0, function* () {\n            const response = yield computeQuery([\n                ...this._queryTree,\n                {\n                    operation: \"commands\",\n                },\n            ], this.client);\n            return response;\n        });\n    }\n    /**\n     * A unique identifier for this project.\n     */\n    id() {\n        return __awaiter(this, void 0, void 0, function* () {\n            const response = yield computeQuery([\n                ...this._queryTree,\n                {\n                    operation: \"id\",\n                },\n            ], this.client);\n            return response;\n        });\n    }\n    /**\n     * Initialize this project from the given directory and config path\n     */\n    load(source, configPath) {\n        return new Project({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"load\",\n                    args: { source, configPath },\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Name of the project\n     */\n    name() {\n        return __awaiter(this, void 0, void 0, function* () {\n            const response = yield computeQuery([\n                ...this._queryTree,\n                {\n                    operation: \"name\",\n                },\n            ], this.client);\n            return response;\n        });\n    }\n    /**\n     * Chain objects together\n     * @example\n     * ```ts\n     *\tfunction AddAFewMounts(c) {\n     *\t\t\treturn c\n     *\t\t\t.withMountedDirectory(\"/foo\", new Client().host().directory(\"/Users/slumbering/forks/dagger\"))\n     *\t\t\t.withMountedDirectory(\"/bar\", new Client().host().directory(\"/Users/slumbering/forks/dagger/sdk/nodejs\"))\n     *\t}\n     *\n     * connect(async (client) =\u003e {\n     *\t\tconst tree = await client\n     *\t\t\t.container()\n     *\t\t\t.from(\"alpine\")\n     *\t\t\t.withWorkdir(\"/foo\")\n     *\t\t\t.with(AddAFewMounts)\n     *\t\t\t.withExec([\"ls\", \"-lh\"])\n     *\t\t\t.stdout()\n     * })\n     *```\n     */\n    with(arg) {\n        return arg(this);\n    }\n}\n/**\n * A command defined in a project that can be invoked from the CLI.\n */\nexport class ProjectCommand extends BaseClient {\n    /**\n     * Documentation for what this command does.\n     */\n    description() {\n        return __awaiter(this, void 0, void 0, function* () {\n            const response = yield computeQuery([\n                ...this._queryTree,\n                {\n                    operation: \"description\",\n                },\n            ], this.client);\n            return response;\n        });\n    }\n    /**\n     * Flags accepted by this command.\n     */\n    flags() {\n        return __awaiter(this, void 0, void 0, function* () {\n            const response = yield computeQuery([\n                ...this._queryTree,\n                {\n                    operation: \"flags\",\n                },\n            ], this.client);\n            return response;\n        });\n    }\n    /**\n     * A unique identifier for this command.\n     */\n    id() {\n        return __awaiter(this, void 0, void 0, function* () {\n            const response = yield computeQuery([\n                ...this._queryTree,\n                {\n                    operation: \"id\",\n                },\n            ], this.client);\n            return response;\n        });\n    }\n    /**\n     * The name of the command.\n     */\n    name() {\n        return __awaiter(this, void 0, void 0, function* () {\n            const response = yield computeQuery([\n                ...this._queryTree,\n                {\n                    operation: \"name\",\n                },\n            ], this.client);\n            return response;\n        });\n    }\n    /**\n     * Subcommands, if any, that this command provides.\n     */\n    subcommands() {\n        return __awaiter(this, void 0, void 0, function* () {\n            const response = yield computeQuery([\n                ...this._queryTree,\n                {\n                    operation: \"subcommands\",\n                },\n            ], this.client);\n            return response;\n        });\n    }\n    /**\n     * Chain objects together\n     * @example\n     * ```ts\n     *\tfunction AddAFewMounts(c) {\n     *\t\t\treturn c\n     *\t\t\t.withMountedDirectory(\"/foo\", new Client().host().directory(\"/Users/slumbering/forks/dagger\"))\n     *\t\t\t.withMountedDirectory(\"/bar\", new Client().host().directory(\"/Users/slumbering/forks/dagger/sdk/nodejs\"))\n     *\t}\n     *\n     * connect(async (client) =\u003e {\n     *\t\tconst tree = await client\n     *\t\t\t.container()\n     *\t\t\t.from(\"alpine\")\n     *\t\t\t.withWorkdir(\"/foo\")\n     *\t\t\t.with(AddAFewMounts)\n     *\t\t\t.withExec([\"ls\", \"-lh\"])\n     *\t\t\t.stdout()\n     * })\n     *```\n     */\n    with(arg) {\n        return arg(this);\n    }\n}\n/**\n * A flag accepted by a project command.\n */\nexport class ProjectCommandFlag extends BaseClient {\n    /**\n     * Documentation for what this flag sets.\n     */\n    description() {\n        return __awaiter(this, void 0, void 0, function* () {\n            const response = yield computeQuery([\n                ...this._queryTree,\n                {\n                    operation: \"description\",\n                },\n            ], this.client);\n            return response;\n        });\n    }\n    /**\n     * The name of the flag.\n     */\n    name() {\n        return __awaiter(this, void 0, void 0, function* () {\n            const response = yield computeQuery([\n                ...this._queryTree,\n                {\n                    operation: \"name\",\n                },\n            ], this.client);\n            return response;\n        });\n    }\n    /**\n     * Chain objects together\n     * @example\n     * ```ts\n     *\tfunction AddAFewMounts(c) {\n     *\t\t\treturn c\n     *\t\t\t.withMountedDirectory(\"/foo\", new Client().host().directory(\"/Users/slumbering/forks/dagger\"))\n     *\t\t\t.withMountedDirectory(\"/bar\", new Client().host().directory(\"/Users/slumbering/forks/dagger/sdk/nodejs\"))\n     *\t}\n     *\n     * connect(async (client) =\u003e {\n     *\t\tconst tree = await client\n     *\t\t\t.container()\n     *\t\t\t.from(\"alpine\")\n     *\t\t\t.withWorkdir(\"/foo\")\n     *\t\t\t.with(AddAFewMounts)\n     *\t\t\t.withExec([\"ls\", \"-lh\"])\n     *\t\t\t.stdout()\n     * })\n     *```\n     */\n    with(arg) {\n        return arg(this);\n    }\n}\nexport default class Client extends BaseClient {\n    /**\n     * Constructs a cache volume for a given cache key.\n     * @param key A string identifier to target this cache volume (e.g., \"modules-cache\").\n     */\n    cacheVolume(key) {\n        return new CacheVolume({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"cacheVolume\",\n                    args: { key },\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Loads a container from ID.\n     *\n     * Null ID returns an empty container (scratch).\n     * Optional platform argument initializes new containers to execute and publish as that platform.\n     * Platform defaults to that of the builder's host.\n     */\n    container(opts) {\n        return new Container({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"container\",\n                    args: Object.assign({}, opts),\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * The default platform of the builder.\n     */\n    defaultPlatform() {\n        return __awaiter(this, void 0, void 0, function* () {\n            const response = yield computeQuery([\n                ...this._queryTree,\n                {\n                    operation: \"defaultPlatform\",\n                },\n            ], this.client);\n            return response;\n        });\n    }\n    /**\n     * Load a directory by ID. No argument produces an empty directory.\n     */\n    directory(opts) {\n        return new Directory({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"directory\",\n                    args: Object.assign({}, opts),\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Loads a file by ID.\n     */\n    file(id) {\n        return new File({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"file\",\n                    args: { id },\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Queries a git repository.\n     * @param url Url of the git repository.\n     * Can be formatted as https://{host}/{owner}/{repo}, git@{host}/{owner}/{repo}\n     * Suffix \".git\" is optional.\n     * @param opts.keepGitDir Set to true to keep .git directory.\n     * @param opts.experimentalServiceHost A service which must be started before the repo is fetched.\n     */\n    git(url, opts) {\n        return new GitRepository({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"git\",\n                    args: Object.assign({ url }, opts),\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Queries the host environment.\n     */\n    host() {\n        return new Host({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"host\",\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Returns a file containing an http remote url content.\n     * @param url HTTP url to get the content from (e.g., \"https://docs.dagger.io\").\n     * @param opts.experimentalServiceHost A service which must be started before the URL is fetched.\n     */\n    http(url, opts) {\n        return new File({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"http\",\n                    args: Object.assign({ url }, opts),\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Creates a named sub-pipeline.\n     * @param name Pipeline name.\n     * @param opts.description Pipeline description.\n     * @param opts.labels Pipeline labels.\n     */\n    pipeline(name, opts) {\n        return new Client({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"pipeline\",\n                    args: Object.assign({ name }, opts),\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Load a project from ID.\n     */\n    project(opts) {\n        return new Project({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"project\",\n                    args: Object.assign({}, opts),\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Load a project command from ID.\n     */\n    projectCommand(opts) {\n        return new ProjectCommand({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"projectCommand\",\n                    args: Object.assign({}, opts),\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Loads a secret from its ID.\n     */\n    secret(id) {\n        return new Secret({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"secret\",\n                    args: { id },\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Sets a secret given a user defined name to its plaintext and returns the secret.\n     * @param name The user defined name for this secret\n     * @param plaintext The plaintext of the secret\n     */\n    setSecret(name, plaintext) {\n        return new Secret({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"setSecret\",\n                    args: { name, plaintext },\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n    /**\n     * Loads a socket by its ID.\n     */\n    socket(opts) {\n        return new Socket({\n            queryTree: [\n                ...this._queryTree,\n                {\n                    operation: \"socket\",\n                    args: Object.assign({}, opts),\n                },\n            ],\n            host: this.clientHost,\n            sessionToken: this.sessionToken,\n        });\n    }\n}\n/**\n * A reference to a secret value, which can be handled more safely than the value itself.\n */\nexport class Secret extends BaseClient {\n    /**\n     * The identifier for this secret.\n     */\n    id() {\n        return __awaiter(this, void 0, void 0, function* () {\n            const response = yield computeQuery([\n                ...this._queryTree,\n                {\n                    operation: \"id\",\n                },\n            ], this.client);\n            return response;\n        });\n    }\n    /**\n     * The value of this secret.\n     */\n    plaintext() {\n        return __awaiter(this, void 0, void 0, function* () {\n            const response = yield computeQuery([\n                ...this._queryTree,\n                {\n                    operation: \"plaintext\",\n                },\n            ], this.client);\n            return response;\n        });\n    }\n    /**\n     * Chain objects together\n     * @example\n     * ```ts\n     *\tfunction AddAFewMounts(c) {\n     *\t\t\treturn c\n     *\t\t\t.withMountedDirectory(\"/foo\", new Client().host().directory(\"/Users/slumbering/forks/dagger\"))\n     *\t\t\t.withMountedDirectory(\"/bar\", new Client().host().directory(\"/Users/slumbering/forks/dagger/sdk/nodejs\"))\n     *\t}\n     *\n     * connect(async (client) =\u003e {\n     *\t\tconst tree = await client\n     *\t\t\t.container()\n     *\t\t\t.from(\"alpine\")\n     *\t\t\t.withWorkdir(\"/foo\")\n     *\t\t\t.with(AddAFewMounts)\n     *\t\t\t.withExec([\"ls\", \"-lh\"])\n     *\t\t\t.stdout()\n     * })\n     *```\n     */\n    with(arg) {\n        return arg(this);\n    }\n}\nexport class Socket extends BaseClient {\n    /**\n     * The content-addressed identifier of the socket.\n     */\n    id() {\n        return __awaiter(this, void 0, void 0, function* () {\n            const response = yield computeQuery([\n                ...this._queryTree,\n                {\n                    operation: \"id\",\n                },\n            ], this.client);\n            return response;\n        });\n    }\n    /**\n     * Chain objects together\n     * @example\n     * ```ts\n     *\tfunction AddAFewMounts(c) {\n     *\t\t\treturn c\n     *\t\t\t.withMountedDirectory(\"/foo\", new Client().host().directory(\"/Users/slumbering/forks/dagger\"))\n     *\t\t\t.withMountedDirectory(\"/bar\", new Client().host().directory(\"/Users/slumbering/forks/dagger/sdk/nodejs\"))\n     *\t}\n     *\n     * connect(async (client) =\u003e {\n     *\t\tconst tree = await client\n     *\t\t\t.container()\n     *\t\t\t.from(\"alpine\")\n     *\t\t\t.withWorkdir(\"/foo\")\n     *\t\t\t.with(AddAFewMounts)\n     *\t\t\t.withExec([\"ls\", \"-lh\"])\n     *\t\t\t.stdout()\n     * })\n     *```\n     */\n    with(arg) {\n        return arg(this);\n    }\n}\n","var __awaiter = (this \u0026\u0026 this.__awaiter) || function (thisArg, _arguments, P, generator) {\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n    return new (P || (P = Promise))(function (resolve, reject) {\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\n    });\n};\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { ClientError, gql } from \"graphql-request\";\nimport { GraphQLRequestError, TooManyNestedObjectsError, UnknownDaggerError, NotAwaitedRequestError, ExecError, } from \"../common/errors/index.js\";\n/**\n * Format argument into GraphQL query format.\n */\nfunction buildArgs(args) {\n    // Remove unwanted quotes\n    const formatValue = (value) =\u003e JSON.stringify(value).replace(/\\{\"[a-zA-Z]+\":|,\"[a-zA-Z]+\":/gi, (str) =\u003e str.replace(/\"/g, \"\"));\n    if (args === undefined || args === null) {\n        return \"\";\n    }\n    const formattedArgs = Object.entries(args).reduce((acc, [key, value]) =\u003e {\n        if (value !== undefined \u0026\u0026 value !== null) {\n            acc.push(`${key}: ${formatValue(value)}`);\n        }\n        return acc;\n    }, []);\n    if (formattedArgs.length === 0) {\n        return \"\";\n    }\n    return `(${formattedArgs})`;\n}\n/**\n * Find QueryTree, convert them into GraphQl query\n * then compute and return the result to the appropriate field\n */\nfunction computeNestedQuery(query, client) {\n    return __awaiter(this, void 0, void 0, function* () {\n        // Check if there is a nested queryTree to be executed\n        const isQueryTree = (value) =\u003e value[\"_queryTree\"] !== undefined;\n        // Check if there is a nested array of queryTree to be executed\n        const isArrayQueryTree = (value) =\u003e value.every((v) =\u003e v instanceof Object \u0026\u0026 isQueryTree(v));\n        // Prepare query tree for final query by computing nested queries\n        // and building it with their results.\n        const computeQueryTree = (value) =\u003e __awaiter(this, void 0, void 0, function* () {\n            // Resolve sub queries if operation's args is a subquery\n            for (const op of value[\"_queryTree\"]) {\n                yield computeNestedQuery([op], client);\n            }\n            // push an id that will be used by the container\n            return buildQuery([\n                ...value[\"_queryTree\"],\n                {\n                    operation: \"id\",\n                },\n            ]);\n        });\n        // Remove all undefined args and assert args type\n        const queryToExec = query.filter((q) =\u003e !!q.args);\n        for (const q of queryToExec) {\n            yield Promise.all(\n            // Compute nested query for single object\n            Object.entries(q.args).map(([key, value]) =\u003e __awaiter(this, void 0, void 0, function* () {\n                if (value instanceof Object \u0026\u0026 isQueryTree(value)) {\n                    // push an id that will be used by the container\n                    const getQueryTree = yield computeQueryTree(value);\n                    q.args[key] = yield compute(getQueryTree, client);\n                }\n                // Compute nested query for array of object\n                if (Array.isArray(value) \u0026\u0026 isArrayQueryTree(value)) {\n                    const tmp = q.args[key];\n                    for (let i = 0; i \u003c value.length; i++) {\n                        // push an id that will be used by the container\n                        const getQueryTree = yield computeQueryTree(value[i]);\n                        tmp[i] = yield compute(getQueryTree, client);\n                    }\n                    q.args[key] = tmp;\n                }\n            })));\n        }\n    });\n}\n/**\n * Convert the queryTree into a GraphQL query\n * @param q\n * @returns\n */\nexport function buildQuery(q) {\n    const query = q.reduce((acc, { operation, args }, i) =\u003e {\n        const qLen = q.length;\n        acc += ` ${operation} ${args ? `${buildArgs(args)}` : \"\"} ${qLen - 1 !== i ? \"{\" : \"}\".repeat(qLen - 1)}`;\n        return acc;\n    }, \"\");\n    return `{${query} }`;\n}\n/**\n * Convert querytree into a Graphql query then compute it\n * @param q | QueryTree[]\n * @param client | GraphQLClient\n * @returns\n */\nexport function computeQuery(q, client) {\n    return __awaiter(this, void 0, void 0, function* () {\n        yield computeNestedQuery(q, client);\n        const query = buildQuery(q);\n        return yield compute(query, client);\n    });\n}\n/**\n * Return a Graphql query result flattened\n * @param response any\n * @returns\n */\nexport function queryFlatten(response) {\n    // Recursion break condition\n    // If our response is not an object or an array we assume we reached the value\n    if (!(response instanceof Object) || Array.isArray(response)) {\n        return response;\n    }\n    const keys = Object.keys(response);\n    if (keys.length != 1) {\n        // Dagger is currently expecting to only return one value\n        // If the response is nested in a way were more than one object is nested inside throw an error\n        throw new TooManyNestedObjectsError(\"Too many nested objects inside graphql response\", { response: response });\n    }\n    const nestedKey = keys[0];\n    return queryFlatten(response[nestedKey]);\n}\n/**\n * Send a GraphQL document to the server\n * return a flatten result\n * @hidden\n */\nexport function compute(query, client) {\n    var _a, _b, _c, _d, _e, _f, _g, _h, _j;\n    return __awaiter(this, void 0, void 0, function* () {\n        let computeQuery;\n        try {\n            computeQuery = yield client.request(gql `\n        ${query}\n      `);\n        }\n        catch (e) {\n            if (e instanceof ClientError) {\n                const msg = (_c = (_b = (_a = e.response.errors) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.message) !== null \u0026\u0026 _c !== void 0 ? _c : `API Error`;\n                const ext = (_e = (_d = e.response.errors) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.extensions;\n                if ((ext === null || ext === void 0 ? void 0 : ext._type) === \"EXEC_ERROR\") {\n                    throw new ExecError(msg, {\n                        cmd: (_f = ext.cmd) !== null \u0026\u0026 _f !== void 0 ? _f : [],\n                        exitCode: (_g = ext.exitCode) !== null \u0026\u0026 _g !== void 0 ? _g : -1,\n                        stdout: (_h = ext.stdout) !== null \u0026\u0026 _h !== void 0 ? _h : \"\",\n                        stderr: (_j = ext.stderr) !== null \u0026\u0026 _j !== void 0 ? _j : \"\",\n                    });\n                }\n                throw new GraphQLRequestError(msg, {\n                    request: e.request,\n                    response: e.response,\n                    cause: e,\n                });\n            }\n            // Looking for connection error in case the function has not been awaited.\n            if (e.errno === \"ECONNREFUSED\") {\n                throw new NotAwaitedRequestError(\"Encountered an error while requesting data via graphql through a synchronous call. Make sure the function called is awaited.\", { cause: e });\n            }\n            // Just throw the unknown error\n            throw new UnknownDaggerError(\"Encountered an unknown error while requesting data via graphql\", { cause: e });\n        }\n        return queryFlatten(computeQuery);\n    });\n}\n","import logger from \"node-color-log\";\nexport const log = (stack) =\u003e logger.bgColor(\"red\").color(\"black\").log(stack);\n","import { log } from \"../utils.js\";\n/**\n * The base error. Every other error inherits this error.\n */\nexport class DaggerSDKError extends Error {\n    constructor(message, options) {\n        super(message);\n        this.cause = options === null || options === void 0 ? void 0 : options.cause;\n    }\n    /**\n     * @hidden\n     */\n    get [Symbol.toStringTag]() {\n        return this.name;\n    }\n    /**\n     * Pretty prints the error\n     */\n    printStackTrace() {\n        log(this.stack);\n    }\n}\n","export const ERROR_CODES = {\n    /**\n     * {@link GraphQLRequestError}\n     */\n    GraphQLRequestError: \"D100\",\n    /**\n     * {@link UnknownDaggerError}\n     */\n    UnknownDaggerError: \"D101\",\n    /**\n     * {@link TooManyNestedObjectsError}\n     */\n    TooManyNestedObjectsError: \"D102\",\n    /**\n     * {@link EngineSessionConnectParamsParseError}\n     */\n    EngineSessionConnectParamsParseError: \"D103\",\n    /**\n     * {@link EngineSessionConnectionTimeoutError}\n     */\n    EngineSessionConnectionTimeoutError: \"D104\",\n    /**\n     * {@link EngineSessionError}\n     */\n    EngineSessionError: \"D105\",\n    /**\n     * {@link InitEngineSessionBinaryError}\n     */\n    InitEngineSessionBinaryError: \"D106\",\n    /**\n     * {@link DockerImageRefValidationError}\n     */\n    DockerImageRefValidationError: \"D107\",\n    /**\n     * {@link NotAwaitedRequestError}\n     */\n    NotAwaitedRequestError: \"D108\",\n    /**\n     * (@link ExecError}\n     */\n    ExecError: \"D109\",\n};\nexport const ERROR_NAMES = Object.keys(ERROR_CODES).reduce((obj, item) =\u003e (Object.assign(Object.assign({}, obj), { [item]: item })), {});\n","import { DaggerSDKError } from \"./DaggerSDKError.js\";\nimport { ERROR_CODES, ERROR_NAMES } from \"./errors-codes.js\";\n/**\n *  This error is thrown if the dagger SDK does not identify the error and just wraps the cause.\n */\nexport class UnknownDaggerError extends DaggerSDKError {\n    /**\n     * @hidden\n     */\n    constructor(message, options) {\n        super(message, options);\n        this.name = ERROR_NAMES.UnknownDaggerError;\n        this.code = ERROR_CODES.UnknownDaggerError;\n    }\n}\n","import { DaggerSDKError } from \"./DaggerSDKError.js\";\nimport { ERROR_CODES, ERROR_NAMES } from \"./errors-codes.js\";\n/**\n *  This error is thrown if the passed image reference does not pass validation and is not compliant with the\n *  DockerImage constructor.\n */\nexport class DockerImageRefValidationError extends DaggerSDKError {\n    /**\n     *  @hidden\n     */\n    constructor(message, options) {\n        super(message, options);\n        this.name = ERROR_NAMES.DockerImageRefValidationError;\n        this.code = ERROR_CODES.DockerImageRefValidationError;\n        this.ref = options === null || options === void 0 ? void 0 : options.ref;\n    }\n}\n","import { DaggerSDKError } from \"./DaggerSDKError.js\";\nimport { ERROR_CODES, ERROR_NAMES } from \"./errors-codes.js\";\n/**\n * This error is thrown if the EngineSession does not manage to parse the required connection parameters from the session binary\n */\nexport class EngineSessionConnectParamsParseError extends DaggerSDKError {\n    /**\n     * @hidden\n     */\n    constructor(message, options) {\n        super(message, options);\n        this.name = ERROR_NAMES.EngineSessionConnectParamsParseError;\n        this.code = ERROR_CODES.EngineSessionConnectParamsParseError;\n        this.parsedLine = options.parsedLine;\n    }\n}\n","import { DaggerSDKError } from \"./DaggerSDKError.js\";\nimport { ERROR_CODES, ERROR_NAMES } from \"./errors-codes.js\";\n/**\n *  API error from an exec operation in a pipeline.\n */\nexport class ExecError extends DaggerSDKError {\n    /**\n     *  @hidden\n     */\n    constructor(message, options) {\n        super(message, options);\n        this.name = ERROR_NAMES.ExecError;\n        this.code = ERROR_CODES.ExecError;\n        this.cmd = options.cmd;\n        this.exitCode = options.exitCode;\n        this.stdout = options.stdout;\n        this.stderr = options.stderr;\n    }\n    toString() {\n        return `${super.toString()}\\nStdout:\\n${this.stdout}\\nStderr:\\n${this.stderr}`;\n    }\n}\n","import { DaggerSDKError } from \"./DaggerSDKError.js\";\nimport { ERROR_CODES, ERROR_NAMES } from \"./errors-codes.js\";\n/**\n *  This error originates from the dagger engine. It means that some error was thrown and sent back via GraphQL.\n */\nexport class GraphQLRequestError extends DaggerSDKError {\n    /**\n     *  @hidden\n     */\n    constructor(message, options) {\n        super(message, options);\n        this.name = ERROR_NAMES.GraphQLRequestError;\n        this.code = ERROR_CODES.GraphQLRequestError;\n        this.requestContext = options.request;\n        this.response = options.response;\n    }\n}\n","import { DaggerSDKError } from \"./DaggerSDKError.js\";\nimport { ERROR_CODES, ERROR_NAMES } from \"./errors-codes.js\";\n/**\n *  This error is thrown if the dagger binary cannot be copied from the dagger docker image and copied to the local host.\n */\nexport class InitEngineSessionBinaryError extends DaggerSDKError {\n    /**\n     *  @hidden\n     */\n    constructor(message, options) {\n        super(message, options);\n        this.name = ERROR_NAMES.InitEngineSessionBinaryError;\n        this.code = ERROR_CODES.InitEngineSessionBinaryError;\n    }\n}\n","import { DaggerSDKError } from \"./DaggerSDKError.js\";\nimport { ERROR_CODES, ERROR_NAMES } from \"./errors-codes.js\";\n/**\n *  Dagger only expects one response value from the engine. If the engine returns more than one value this error is thrown.\n */\nexport class TooManyNestedObjectsError extends DaggerSDKError {\n    /**\n     * @hidden\n     */\n    constructor(message, options) {\n        super(message, options);\n        this.name = ERROR_NAMES.TooManyNestedObjectsError;\n        this.code = ERROR_CODES.TooManyNestedObjectsError;\n        this.response = options.response;\n    }\n}\n","import { DaggerSDKError } from \"./DaggerSDKError.js\";\nimport { ERROR_CODES, ERROR_NAMES } from \"./errors-codes.js\";\n/**\n * This error is thrown if the EngineSession does not manage to parse the required port successfully because a EOF is read before any valid port.\n * This usually happens if no connection can be established.\n */\nexport class EngineSessionError extends DaggerSDKError {\n    /**\n     * @hidden\n     */\n    constructor(message, options) {\n        super(message, options);\n        this.name = ERROR_NAMES.EngineSessionError;\n        this.code = ERROR_CODES.EngineSessionError;\n    }\n}\n","import { DaggerSDKError } from \"./DaggerSDKError.js\";\nimport { ERROR_CODES, ERROR_NAMES } from \"./errors-codes.js\";\n/**\n * This error is thrown if the EngineSession does not manage to parse the required port successfully because the sessions connection timed out.\n */\nexport class EngineSessionConnectionTimeoutError extends DaggerSDKError {\n    /**\n     * @hidden\n     */\n    constructor(message, options) {\n        super(message, options);\n        this.name = ERROR_NAMES.EngineSessionConnectionTimeoutError;\n        this.code = ERROR_CODES.EngineSessionConnectionTimeoutError;\n        this.timeOutDuration = options.timeOutDuration;\n    }\n}\n","import { DaggerSDKError } from \"./DaggerSDKError.js\";\nimport { ERROR_CODES, ERROR_NAMES } from \"./errors-codes.js\";\n/**\n * This error is thrown when the compute function isn't awaited.\n */\nexport class NotAwaitedRequestError extends DaggerSDKError {\n    /**\n     * @hidden\n     */\n    constructor(message, options) {\n        super(message, options);\n        this.name = ERROR_NAMES.NotAwaitedRequestError;\n        this.code = ERROR_CODES.NotAwaitedRequestError;\n    }\n}\n","export * from \"./api/client.gen.js\";\nexport * from \"./common/errors/index.js\";\nexport { default } from \"./api/client.gen.js\";\nexport { gql } from \"graphql-tag\";\nexport { GraphQLClient } from \"graphql-request\";\nexport { connect } from \"./connect.js\";\n","// Code generated by dagger. DO NOT EDIT.\nexport const CLI_VERSION = \"0.6.0\";\n","var __awaiter = (this \u0026\u0026 this.__awaiter) || function (thisArg, _arguments, P, generator) {\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n    return new (P || (P = Promise))(function (resolve, reject) {\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\n    });\n};\nvar __asyncValues = (this \u0026\u0026 this.__asyncValues) || function (o) {\n    if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n    var m = o[Symbol.asyncIterator], i;\n    return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n    function verb(n) { i[n] = o[n] \u0026\u0026 function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n    function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n};\nimport AdmZip from \"adm-zip\";\nimport * as crypto from \"crypto\";\nimport envPaths from \"env-paths\";\nimport { execaCommand } from \"execa\";\nimport * as fs from \"fs\";\nimport fetch from \"node-fetch\";\nimport * as os from \"os\";\nimport * as path from \"path\";\nimport * as process from \"process\";\nimport readline from \"readline\";\nimport * as tar from \"tar\";\nimport { fileURLToPath } from \"url\";\nimport Client from \"../api/client.gen.js\";\nimport { EngineSessionConnectionTimeoutError, EngineSessionConnectParamsParseError, EngineSessionError, InitEngineSessionBinaryError, } from \"../common/errors/index.js\";\nconst CLI_HOST = \"dl.dagger.io\";\nlet OVERRIDE_CLI_URL;\nlet OVERRIDE_CHECKSUMS_URL;\n/**\n * Bin runs an engine session from a specified binary\n */\nexport class Bin {\n    constructor(binPath, cliVersion) {\n        var _a;\n        this.cacheDir = path.join(`${((_a = process.env.XDG_CACHE_HOME) === null || _a === void 0 ? void 0 : _a.trim()) || envPaths(\"\", { suffix: \"\" }).cache}`, \"dagger\");\n        this.DAGGER_CLI_BIN_PREFIX = \"dagger\";\n        this.binPath = binPath;\n        this.cliVersion = cliVersion;\n    }\n    Addr() {\n        return \"http://dagger\";\n    }\n    Connect(opts) {\n        return __awaiter(this, void 0, void 0, function* () {\n            if (!this.binPath) {\n                this.binPath = yield this.downloadCLI();\n            }\n            return this.runEngineSession(this.binPath, opts);\n        });\n    }\n    downloadCLI() {\n        return __awaiter(this, void 0, void 0, function* () {\n            if (!this.cliVersion) {\n                throw new Error(\"cliVersion is not set\");\n            }\n            const binPath = this.buildBinPath();\n            // Create a temporary bin file path\n            this.createCacheDir();\n            const tmpBinDownloadDir = fs.mkdtempSync(path.join(this.cacheDir, `temp-${this.getRandomId()}`));\n            const tmpBinPath = this.buildOsExePath(tmpBinDownloadDir, this.DAGGER_CLI_BIN_PREFIX);\n            try {\n                // download an archive and use appropriate extraction depending on platforms (zip on windows, tar.gz on other platforms)\n                const actualChecksum = yield this.extractArchive(tmpBinDownloadDir, this.normalizedOS());\n                const expectedChecksum = yield this.expectedChecksum();\n                if (actualChecksum !== expectedChecksum) {\n                    throw new Error(`checksum mismatch: expected ${expectedChecksum}, got ${actualChecksum}`);\n                }\n                fs.chmodSync(tmpBinPath, 0o700);\n                fs.renameSync(tmpBinPath, binPath);\n                fs.rmSync(tmpBinDownloadDir, { recursive: true });\n            }\n            catch (e) {\n                fs.rmSync(tmpBinDownloadDir, { recursive: true });\n                throw new InitEngineSessionBinaryError(`failed to download dagger cli binary: ${e}`, { cause: e });\n            }\n            // Remove all temporary binary files\n            // Ignore current dagger cli or other files that have not be\n            // created by this SDK.\n            try {\n                const files = fs.readdirSync(this.cacheDir);\n                files.forEach((file) =\u003e {\n                    const filePath = path.join(this.cacheDir, file);\n                    if (filePath === binPath ||\n                        !file.startsWith(this.DAGGER_CLI_BIN_PREFIX)) {\n                        return;\n                    }\n                    fs.unlinkSync(filePath);\n                });\n            }\n            catch (e) {\n                // Log the error but do not interrupt program.\n                console.error(\"could not clean up temporary binary files\");\n            }\n            return binPath;\n        });\n    }\n    /**\n     * Traverse up the directory tree to find the package.json file and return the\n     * SDK version.\n     * @returns the SDK version or \"n/a\" if the version cannot be found.\n     */\n    getSDKVersion() {\n        const currentFileUrl = import.meta.url;\n        const currentFilePath = fileURLToPath(currentFileUrl);\n        let currentPath = path.dirname(currentFilePath);\n        while (currentPath !== path.parse(currentPath).root) {\n            const packageJsonPath = path.join(currentPath, \"package.json\");\n            if (fs.existsSync(packageJsonPath)) {\n                try {\n                    const packageJsonContent = fs.readFileSync(packageJsonPath, \"utf8\");\n                    const packageJson = JSON.parse(packageJsonContent);\n                    return packageJson.version;\n                }\n                catch (error) {\n                    return \"n/a\";\n                }\n            }\n            else {\n                currentPath = path.join(currentPath, \"..\");\n            }\n        }\n    }\n    /**\n     * runEngineSession execute the engine binary and set up a GraphQL client that\n     * target this engine.\n     */\n    runEngineSession(binPath, opts) {\n        var _a, _b;\n        return __awaiter(this, void 0, void 0, function* () {\n            const args = [binPath, \"session\"];\n            const sdkVersion = this.getSDKVersion();\n            const flagsAndValues = [\n                { flag: \"--workdir\", value: opts.Workdir },\n                { flag: \"--project\", value: opts.Project },\n                { flag: \"--label\", value: \"dagger.io/sdk.name:nodejs\" },\n                { flag: \"--label\", value: `dagger.io/sdk.version:${sdkVersion}` },\n            ];\n            flagsAndValues.forEach((pair) =\u003e {\n                if (pair.value) {\n                    args.push(pair.flag, pair.value);\n                }\n            });\n            this.subProcess = execaCommand(args.join(\" \"), {\n                stdio: \"pipe\",\n                reject: true,\n                // Kill the process if parent exit.\n                cleanup: true,\n            });\n            // Log the output if the user wants to.\n            if (opts.LogOutput) {\n                (_a = this.subProcess.stderr) === null || _a === void 0 ? void 0 : _a.pipe(opts.LogOutput);\n            }\n            const stdoutReader = readline.createInterface({\n                input: (_b = this.subProcess) === null || _b === void 0 ? void 0 : _b.stdout,\n            });\n            const timeOutDuration = 300000;\n            const connectParams = (yield Promise.race([\n                this.readConnectParams(stdoutReader),\n                new Promise((_, reject) =\u003e {\n                    setTimeout(() =\u003e {\n                        reject(new EngineSessionConnectionTimeoutError(\"timeout reading connect params from engine session\", { timeOutDuration }));\n                    }, timeOutDuration).unref(); // long timeout to account for extensions, though that should be optimized in future\n                }),\n            ]));\n            return new Client({\n                host: `127.0.0.1:${connectParams.port}`,\n                sessionToken: connectParams.session_token,\n            });\n        });\n    }\n    readConnectParams(stdoutReader) {\n        var _a, stdoutReader_1, stdoutReader_1_1;\n        var _b, e_1, _c, _d;\n        var _e;\n        return __awaiter(this, void 0, void 0, function* () {\n            try {\n                for (_a = true, stdoutReader_1 = __asyncValues(stdoutReader); stdoutReader_1_1 = yield stdoutReader_1.next(), _b = stdoutReader_1_1.done, !_b;) {\n                    _d = stdoutReader_1_1.value;\n                    _a = false;\n                    try {\n                        const line = _d;\n                        // parse the the line as json-encoded connect params\n                        const connectParams = JSON.parse(line);\n                        if (connectParams.port \u0026\u0026 connectParams.session_token) {\n                            return connectParams;\n                        }\n                        throw new EngineSessionConnectParamsParseError(`invalid connect params: ${line}`, { parsedLine: line });\n                    }\n                    finally {\n                        _a = true;\n                    }\n                }\n            }\n            catch (e_1_1) { e_1 = { error: e_1_1 }; }\n            finally {\n                try {\n                    if (!_a \u0026\u0026 !_b \u0026\u0026 (_c = stdoutReader_1.return)) yield _c.call(stdoutReader_1);\n                }\n                finally { if (e_1) throw e_1.error; }\n            }\n            // Need to find a better way to handle this part\n            // At this stage something wrong happened, `for await` didn't return anything\n            // await the subprocess to catch the error\n            try {\n                yield this.subProcess;\n            }\n            catch (_f) {\n                (_e = this.subProcess) === null || _e === void 0 ? void 0 : _e.catch((e) =\u003e {\n                    throw new EngineSessionError(e.stderr);\n                });\n            }\n        });\n    }\n    Close() {\n        var _a;\n        return __awaiter(this, void 0, void 0, function* () {\n            if ((_a = this.subProcess) === null || _a === void 0 ? void 0 : _a.pid) {\n                this.subProcess.kill(\"SIGTERM\", {\n                    // Set a long timeout to give time for any cache exports to pack layers up\n                    // which currently has to happen synchronously with the session.\n                    forceKillAfterTimeout: 300000, // 5 mins\n                });\n            }\n        });\n    }\n    /**\n     * createCacheDir will create a cache directory on user\n     * host to store dagger binary.\n     *\n     * If set, it will use envPaths to determine system's cache directory,\n     * if not, it will use `$HOME/.cache` as base path.\n     * Nothing happens if the directory already exists.\n     */\n    createCacheDir() {\n        fs.mkdirSync(this.cacheDir, { mode: 0o700, recursive: true });\n    }\n    /**\n     * buildBinPath create a path to output dagger cli binary.\n     *\n     * It will store it in the cache directory with a name composed\n     * of the base engine session as constant and the engine identifier.\n     */\n    buildBinPath() {\n        return this.buildOsExePath(this.cacheDir, `${this.DAGGER_CLI_BIN_PREFIX}-${this.cliVersion}`);\n    }\n    /**\n     * buildExePath create a path to output dagger cli binary.\n     */\n    buildOsExePath(destinationDir, filename) {\n        const binPath = path.join(destinationDir, filename);\n        switch (this.normalizedOS()) {\n            case \"windows\":\n                return `${binPath}.exe`;\n            default:\n                return binPath;\n        }\n    }\n    /**\n     * normalizedArch returns the architecture name used by the rest of our SDKs.\n     */\n    normalizedArch() {\n        switch (os.arch()) {\n            case \"x64\":\n                return \"amd64\";\n            default:\n                return os.arch();\n        }\n    }\n    /**\n     * normalizedOS returns the os name used by the rest of our SDKs.\n     */\n    normalizedOS() {\n        switch (os.platform()) {\n            case \"win32\":\n                return \"windows\";\n            default:\n                return os.platform();\n        }\n    }\n    cliArchiveName() {\n        if (OVERRIDE_CLI_URL) {\n            return path.basename(new URL(OVERRIDE_CLI_URL).pathname);\n        }\n        let ext = \"tar.gz\";\n        if (this.normalizedOS() === \"windows\") {\n            ext = \"zip\";\n        }\n        return `dagger_v${this.cliVersion}_${this.normalizedOS()}_${this.normalizedArch()}.${ext}`;\n    }\n    cliArchiveURL() {\n        if (OVERRIDE_CLI_URL) {\n            return OVERRIDE_CLI_URL;\n        }\n        return `https://${CLI_HOST}/dagger/releases/${this.cliVersion}/${this.cliArchiveName()}`;\n    }\n    cliChecksumURL() {\n        if (OVERRIDE_CHECKSUMS_URL) {\n            return OVERRIDE_CHECKSUMS_URL;\n        }\n        return `https://${CLI_HOST}/dagger/releases/${this.cliVersion}/checksums.txt`;\n    }\n    checksumMap() {\n        return __awaiter(this, void 0, void 0, function* () {\n            // download checksums.txt\n            const checksums = yield fetch(this.cliChecksumURL());\n            if (!checksums.ok) {\n                throw new Error(`failed to download checksums.txt from ${this.cliChecksumURL()}`);\n            }\n            const checksumsText = yield checksums.text();\n            // iterate over lines filling in map of filename -\u003e checksum\n            const checksumMap = new Map();\n            for (const line of checksumsText.split(\"\\n\")) {\n                const [checksum, filename] = line.split(/\\s+/);\n                checksumMap.set(filename, checksum);\n            }\n            return checksumMap;\n        });\n    }\n    expectedChecksum() {\n        return __awaiter(this, void 0, void 0, function* () {\n            const checksumMap = yield this.checksumMap();\n            const expectedChecksum = checksumMap.get(this.cliArchiveName());\n            if (!expectedChecksum) {\n                throw new Error(`failed to find checksum for ${this.cliArchiveName()} in checksums.txt`);\n            }\n            return expectedChecksum;\n        });\n    }\n    extractArchive(destDir, os) {\n        return __awaiter(this, void 0, void 0, function* () {\n            // extract the dagger binary in the cli archive and return the archive of the .zip for windows and .tar.gz for other plateforms\n            const archiveResp = yield fetch(this.cliArchiveURL());\n            if (!archiveResp.ok) {\n                throw new Error(`failed to download dagger cli archive from ${this.cliArchiveURL()}`);\n            }\n            if (!archiveResp.body) {\n                throw new Error(\"archive response body is null\");\n            }\n            // create a temporary file to store the archive\n            const archivePath = path.join(destDir, os === \"windows\" ? \"dagger.zip\" : \"dagger.tar.gz\");\n            const archiveFile = fs.createWriteStream(archivePath);\n            yield new Promise((resolve, reject) =\u003e {\n                var _a, _b;\n                (_a = archiveResp.body) === null || _a === void 0 ? void 0 : _a.pipe(archiveFile);\n                (_b = archiveResp.body) === null || _b === void 0 ? void 0 : _b.on(\"error\", reject);\n                archiveFile.on(\"finish\", resolve);\n            });\n            const actualChecksum = crypto\n                .createHash(\"sha256\")\n                .update(fs.readFileSync(archivePath))\n                .digest(\"hex\");\n            if (os === \"windows\") {\n                const zip = new AdmZip(archivePath);\n                // extract just dagger.exe to the destdir\n                zip.extractEntryTo(\"dagger.exe\", destDir, false, true);\n            }\n            else {\n                tar.extract({\n                    cwd: destDir,\n                    file: archivePath,\n                    sync: true,\n                });\n            }\n            return actualChecksum;\n        });\n    }\n    /**\n     * Generate a unix timestamp in nanosecond\n     */\n    getRandomId() {\n        return process.hrtime.bigint().toString();\n    }\n}\n// Only meant for tests\nexport function _overrideCLIURL(url) {\n    OVERRIDE_CLI_URL = url;\n}\n// Only meant for tests\nexport function _overrideCLIChecksumsURL(url) {\n    OVERRIDE_CHECKSUMS_URL = url;\n}\n","const{Blob:s,fetch:n,File:i,FormData:c,Headers:p,Request:b,Response:a,AbortController:f}=globalThis,u=Error,w=Error,l=e=\u003ee\u003e300\u0026\u0026e\u003c304||e\u003e306\u0026\u0026e\u003c309;n.isRedirect=l,n.Promise=globalThis.Promise;var x=n;async function F(e,o){const r=await Deno.open(e),t=new a(r.readable);return new s([await t.blob()],{type:o})}function d(e,o){const r=Deno.readFileSync(e);return new s([r],{type:o})}async function m(e,o){const r=await Deno.open(e),t=new a(r.readable);return new i([await t.blob()],e.split(/[\\/\\\\]/).pop(),{type:o})}function y(e,o){const r=Deno.readFileSync(e);return new i([r],e.split(/[\\/\\\\]/).pop(),{type:o})}export{f as AbortController,u as AbortError,s as Blob,w as FetchError,i as File,c as FormData,p as Headers,b as Request,a as Response,F as blobFrom,d as blobFromSync,x as default,n as fetch,m as fileFrom,y as fileFromSync,l as isRedirect};\n","var __awaiter = (this \u0026\u0026 this.__awaiter) || function (thisArg, _arguments, P, generator) {\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n    return new (P || (P = Promise))(function (resolve, reject) {\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\n    });\n};\nimport Client from \"./api/client.gen.js\";\nimport { Bin, CLI_VERSION } from \"./provisioning/index.js\";\n/**\n * connect runs GraphQL server and initializes a\n * GraphQL client to execute query on it through its callback.\n * This implementation is based on the existing Go SDK.\n */\nexport function connect(cb, config = {}) {\n    return __awaiter(this, void 0, void 0, function* () {\n        let client;\n        let close = null;\n        // Prefer DAGGER_SESSION_PORT if set\n        const daggerSessionPort = process.env[\"DAGGER_SESSION_PORT\"];\n        if (daggerSessionPort) {\n            const sessionToken = process.env[\"DAGGER_SESSION_TOKEN\"];\n            if (!sessionToken) {\n                throw new Error(\"DAGGER_SESSION_TOKEN must be set when using DAGGER_SESSION_PORT\");\n            }\n            client = new Client({\n                host: `127.0.0.1:${daggerSessionPort}`,\n                sessionToken: sessionToken,\n            });\n        }\n        else {\n            // Otherwise, prefer _EXPERIMENTAL_DAGGER_CLI_BIN, with fallback behavior of\n            // downloading the CLI and using that as the bin.\n            const cliBin = process.env[\"_EXPERIMENTAL_DAGGER_CLI_BIN\"];\n            const engineConn = new Bin(cliBin, CLI_VERSION);\n            client = yield engineConn.Connect(config);\n            close = () =\u003e engineConn.Close();\n        }\n        yield cb(client).finally(() =\u003e __awaiter(this, void 0, void 0, function* () {\n            if (close) {\n                close();\n            }\n        }));\n    });\n}\n"],"version":3}
