This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env node | |
| const EventEmitter = require("events"); | |
| const stdin = new EventEmitter(); | |
| stdin.on("line", console.error); | |
| let buff = ""; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // Add Promise support for PassportJS: req.logIn() and req.logOut() | |
| // | |
| import { promisify } from "node:util"; | |
| import passportHttpRequest from "passport/lib/http/request.js"; | |
| // Workaround: Convert to promises before passport.initialize() | |
| app.use(function (req, res, next) { | |
| req.logIn = promisify(passportHttpRequest.logIn); | |
| req.logOut = promisify(passportHttpRequest.logOut); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| VAR_QUOTED="FOOBAR" | |
| VAR_QUOTED_WITH_HASH="FOO#BAR" | |
| VAR_QUOTED_WITH_HASH_SPACE="FOO #BAR" | |
| VAR_QUOTED_WITH_COMMENT="FOOBAR" # COMMENT | |
| VAR_QUOTED_WITH_COMMENT_NOSPACE="FOOBAR"# COMMENT | |
| VAR_UNQUOTED=FOOBAR | |
| VAR_UNQUOTED_WITH_HASH=FOO#BAR | |
| #VAR_COMMENTED_OUT="FOO" | |
| #VAR_COMMENTED_OUT_WITH_COMMENT="FOO" # BAR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { mkdir } from "node:fs/promises"; | |
| import { dirname, join } from "node:path"; | |
| import unzipper from "unzipper"; | |
| import { createWriteStream } from "node:fs"; | |
| /** | |
| * Main function to unzip and filter files based on user-defined patterns | |
| */ | |
| async function unzipAndFilter(inputZip, destDir, ignorePatterns) { |
OlderNewer