repo stringlengths 5 106 | file_url stringlengths 78 301 | file_path stringlengths 4 211 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 14:56:49 2026-01-05 02:23:25 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
qishibo/AnotherRedisDesktopManager | https://github.com/qishibo/AnotherRedisDesktopManager/blob/4c2b7a5f1074b619eb11ca19796d896c3a8e7098/src/i18n/langs/tr.js | src/i18n/langs/tr.js | const tr = {
message: {
new_connection: 'Yeni Bağlantı',
refresh_connection: 'Yenile',
edit_connection: 'Bağlantıyı Düzenle',
duplicate_connection: 'Bağlantıyı Kopyala',
del_connection: 'Bağlantıyı Sil',
close_connection: 'Bağlantıyı Kapat',
add_new_line: 'Yeni Satır Ekle',
dump_to_cli... | javascript | MIT | 4c2b7a5f1074b619eb11ca19796d896c3a8e7098 | 2026-01-04T15:00:35.175153Z | false |
qishibo/AnotherRedisDesktopManager | https://github.com/qishibo/AnotherRedisDesktopManager/blob/4c2b7a5f1074b619eb11ca19796d896c3a8e7098/src/i18n/langs/fr.js | src/i18n/langs/fr.js | const fr = {
message: {
new_connection: 'Nouvelle connexion',
refresh_connection: 'Actualiser',
edit_connection: 'Éditer connexion',
duplicate_connection: 'Copier la connexion',
del_connection: 'Supprimer connexion',
close_connection: 'Fermer connexion',
add_new_line: 'Ajouter nouvelle lig... | javascript | MIT | 4c2b7a5f1074b619eb11ca19796d896c3a8e7098 | 2026-01-04T15:00:35.175153Z | false |
qishibo/AnotherRedisDesktopManager | https://github.com/qishibo/AnotherRedisDesktopManager/blob/4c2b7a5f1074b619eb11ca19796d896c3a8e7098/src/i18n/langs/ru.js | src/i18n/langs/ru.js | const ru = {
message: {
new_connection: 'Новое подключение',
refresh_connection: 'Обновить',
edit_connection: 'Редактировать подключение',
duplicate_connection: 'Копировать соединение',
del_connection: 'Удалить подключение',
close_connection: 'Закрыть соединение',
add_new_line: 'Добавить н... | javascript | MIT | 4c2b7a5f1074b619eb11ca19796d896c3a8e7098 | 2026-01-04T15:00:35.175153Z | false |
qishibo/AnotherRedisDesktopManager | https://github.com/qishibo/AnotherRedisDesktopManager/blob/4c2b7a5f1074b619eb11ca19796d896c3a8e7098/src/i18n/langs/vi.js | src/i18n/langs/vi.js | const vi = {
message: {
new_connection: 'Kết nối mới',
refresh_connection: 'Làm mới',
edit_connection: 'Sửa kết nối',
duplicate_connection: 'Sao chép kết nối',
del_connection: 'Xóa kết nối',
close_connection: 'Đóng kết nối',
add_new_line: 'Thêm dòng mới',
dump_to_clipboard: 'Sao chép t... | javascript | MIT | 4c2b7a5f1074b619eb11ca19796d896c3a8e7098 | 2026-01-04T15:00:35.175153Z | false |
qishibo/AnotherRedisDesktopManager | https://github.com/qishibo/AnotherRedisDesktopManager/blob/4c2b7a5f1074b619eb11ca19796d896c3a8e7098/src/i18n/langs/it.js | src/i18n/langs/it.js | const it = {
message: {
new_connection: 'Nuova Connessione',
refresh_connection: 'Ricaricare',
edit_connection: 'Modificare Connessione',
duplicate_connection: 'Copia connessione',
del_connection: 'Elimina Connessione',
close_connection: 'Chiudere Connessione',
add_new_line: 'Inserisci Nuo... | javascript | MIT | 4c2b7a5f1074b619eb11ca19796d896c3a8e7098 | 2026-01-04T15:00:35.175153Z | false |
qishibo/AnotherRedisDesktopManager | https://github.com/qishibo/AnotherRedisDesktopManager/blob/4c2b7a5f1074b619eb11ca19796d896c3a8e7098/src/router/index.js | src/router/index.js | import Vue from 'vue';
import Router from 'vue-router';
import Tabs from '@/components/Tabs';
Vue.use(Router);
export default new Router({
routes: [
{
path: '/',
name: 'Tabs',
component: Tabs,
},
],
});
| javascript | MIT | 4c2b7a5f1074b619eb11ca19796d896c3a8e7098 | 2026-01-04T15:00:35.175153Z | false |
qishibo/AnotherRedisDesktopManager | https://github.com/qishibo/AnotherRedisDesktopManager/blob/4c2b7a5f1074b619eb11ca19796d896c3a8e7098/build/webpack.prod.conf.js | build/webpack.prod.conf.js | 'use strict'
const path = require('path')
const utils = require('./utils')
const webpack = require('webpack')
const config = require('../config')
const merge = require('webpack-merge')
const baseWebpackConfig = require('./webpack.base.conf')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const HtmlWebpackPlug... | javascript | MIT | 4c2b7a5f1074b619eb11ca19796d896c3a8e7098 | 2026-01-04T15:00:35.175153Z | false |
qishibo/AnotherRedisDesktopManager | https://github.com/qishibo/AnotherRedisDesktopManager/blob/4c2b7a5f1074b619eb11ca19796d896c3a8e7098/build/build.js | build/build.js | 'use strict'
require('./check-versions')()
process.env.NODE_ENV = 'production'
const ora = require('ora')
const rm = require('rimraf')
const path = require('path')
const chalk = require('chalk')
const webpack = require('webpack')
const config = require('../config')
const webpackConfig = require('./webpack.prod.conf')... | javascript | MIT | 4c2b7a5f1074b619eb11ca19796d896c3a8e7098 | 2026-01-04T15:00:35.175153Z | false |
qishibo/AnotherRedisDesktopManager | https://github.com/qishibo/AnotherRedisDesktopManager/blob/4c2b7a5f1074b619eb11ca19796d896c3a8e7098/build/check-versions.js | build/check-versions.js | 'use strict'
const chalk = require('chalk')
const semver = require('semver')
const packageConfig = require('../package.json')
const shell = require('shelljs')
function exec (cmd) {
return require('child_process').execSync(cmd).toString().trim()
}
const versionRequirements = [
{
name: 'node',
currentVersio... | javascript | MIT | 4c2b7a5f1074b619eb11ca19796d896c3a8e7098 | 2026-01-04T15:00:35.175153Z | false |
qishibo/AnotherRedisDesktopManager | https://github.com/qishibo/AnotherRedisDesktopManager/blob/4c2b7a5f1074b619eb11ca19796d896c3a8e7098/build/vue-loader.conf.js | build/vue-loader.conf.js | 'use strict'
const utils = require('./utils')
const config = require('../config')
const isProduction = process.env.NODE_ENV === 'production'
const sourceMapEnabled = isProduction
? config.build.productionSourceMap
: config.dev.cssSourceMap
module.exports = {
loaders: utils.cssLoaders({
sourceMap: sourceMapEn... | javascript | MIT | 4c2b7a5f1074b619eb11ca19796d896c3a8e7098 | 2026-01-04T15:00:35.175153Z | false |
qishibo/AnotherRedisDesktopManager | https://github.com/qishibo/AnotherRedisDesktopManager/blob/4c2b7a5f1074b619eb11ca19796d896c3a8e7098/build/webpack.dev.conf.js | build/webpack.dev.conf.js | 'use strict'
const utils = require('./utils')
const webpack = require('webpack')
const config = require('../config')
const merge = require('webpack-merge')
const path = require('path')
const baseWebpackConfig = require('./webpack.base.conf')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const HtmlWebpackPlug... | javascript | MIT | 4c2b7a5f1074b619eb11ca19796d896c3a8e7098 | 2026-01-04T15:00:35.175153Z | false |
qishibo/AnotherRedisDesktopManager | https://github.com/qishibo/AnotherRedisDesktopManager/blob/4c2b7a5f1074b619eb11ca19796d896c3a8e7098/build/utils.js | build/utils.js | 'use strict'
const path = require('path')
const config = require('../config')
// const ExtractTextPlugin = require('extract-text-webpack-plugin')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
const packageConfig = require('../package.json')
exports.assetsPath = function (_path) {
const assetsSubDir... | javascript | MIT | 4c2b7a5f1074b619eb11ca19796d896c3a8e7098 | 2026-01-04T15:00:35.175153Z | false |
qishibo/AnotherRedisDesktopManager | https://github.com/qishibo/AnotherRedisDesktopManager/blob/4c2b7a5f1074b619eb11ca19796d896c3a8e7098/build/webpack.base.conf.js | build/webpack.base.conf.js | 'use strict'
const path = require('path')
const utils = require('./utils')
const config = require('../config')
const vueLoaderConfig = require('./vue-loader.conf')
function resolve (dir) {
return path.join(__dirname, '..', dir)
}
module.exports = {
mode: process.env.NODE_ENV === 'production' ? 'production' : 'd... | javascript | MIT | 4c2b7a5f1074b619eb11ca19796d896c3a8e7098 | 2026-01-04T15:00:35.175153Z | false |
qishibo/AnotherRedisDesktopManager | https://github.com/qishibo/AnotherRedisDesktopManager/blob/4c2b7a5f1074b619eb11ca19796d896c3a8e7098/pack/scripts/notarize.js | pack/scripts/notarize.js | const { notarize } = require('@electron/notarize');
exports.default = async function notarizing(context) {
const { electronPlatformName, appOutDir } = context;
if (electronPlatformName !== 'darwin') {
return;
}
const appName = context.packager.appInfo.productFilename;
return await notarize({
appBun... | javascript | MIT | 4c2b7a5f1074b619eb11ca19796d896c3a8e7098 | 2026-01-04T15:00:35.175153Z | false |
qishibo/AnotherRedisDesktopManager | https://github.com/qishibo/AnotherRedisDesktopManager/blob/4c2b7a5f1074b619eb11ca19796d896c3a8e7098/pack/electron/electron-main.js | pack/electron/electron-main.js | // Modules to control application life and create native browser window
const {
app, BrowserWindow, Menu, ipcMain, dialog, nativeTheme,
} = require('electron');
const url = require('url');
const path = require('path');
const fontManager = require('./font-manager');
const winState = require('./win-state');
// disable... | javascript | MIT | 4c2b7a5f1074b619eb11ca19796d896c3a8e7098 | 2026-01-04T15:00:35.175153Z | false |
qishibo/AnotherRedisDesktopManager | https://github.com/qishibo/AnotherRedisDesktopManager/blob/4c2b7a5f1074b619eb11ca19796d896c3a8e7098/pack/electron/update.js | pack/electron/update.js | const { session, ipcMain, net } = require('electron');
const { autoUpdater } = require('electron-updater');
// disable auto download
autoUpdater.autoDownload = false;
let mainEvent;
const update = () => {
bindMainListener();
ipcMain.on('update-check', (event, arg) => {
mainEvent = event;
autoUpdater.che... | javascript | MIT | 4c2b7a5f1074b619eb11ca19796d896c3a8e7098 | 2026-01-04T15:00:35.175153Z | false |
qishibo/AnotherRedisDesktopManager | https://github.com/qishibo/AnotherRedisDesktopManager/blob/4c2b7a5f1074b619eb11ca19796d896c3a8e7098/pack/electron/win-state.js | pack/electron/win-state.js | const { app, screen } = require('electron');
const path = require('path');
const fs = require('fs');
const winState = {
// {x, y, width, height, maximized}
getLastState() {
let data = '{}';
try {
data = fs.readFileSync(this.getStateFile());
} catch (err) {}
const lastWinStage = this.parseJs... | javascript | MIT | 4c2b7a5f1074b619eb11ca19796d896c3a8e7098 | 2026-01-04T15:00:35.175153Z | false |
qishibo/AnotherRedisDesktopManager | https://github.com/qishibo/AnotherRedisDesktopManager/blob/4c2b7a5f1074b619eb11ca19796d896c3a8e7098/pack/electron/font-manager.js | pack/electron/font-manager.js | const { ipcMain } = require('electron');
ipcMain.on('get-all-fonts', (event, arg) => {
try {
require('font-list').getFonts().then((fonts) => {
if (!fonts || !fonts.length) {
fonts = [];
}
fonts = fonts.map(font => font.replace('"', '').replace('"', ''));
event.sender.send('send-... | javascript | MIT | 4c2b7a5f1074b619eb11ca19796d896c3a8e7098 | 2026-01-04T15:00:35.175153Z | false |
qishibo/AnotherRedisDesktopManager | https://github.com/qishibo/AnotherRedisDesktopManager/blob/4c2b7a5f1074b619eb11ca19796d896c3a8e7098/config/prod.env.js | config/prod.env.js | 'use strict'
module.exports = {
NODE_ENV: '"production"'
}
| javascript | MIT | 4c2b7a5f1074b619eb11ca19796d896c3a8e7098 | 2026-01-04T15:00:35.175153Z | false |
qishibo/AnotherRedisDesktopManager | https://github.com/qishibo/AnotherRedisDesktopManager/blob/4c2b7a5f1074b619eb11ca19796d896c3a8e7098/config/index.js | config/index.js | 'use strict'
// Template version: 1.3.1
// see http://vuejs-templates.github.io/webpack for documentation.
const path = require('path')
module.exports = {
dev: {
// Paths
assetsSubDirectory: 'static',
assetsPublicPath: '/',
proxyTable: {},
// Various Dev Server settings
host: 'localhost', ... | javascript | MIT | 4c2b7a5f1074b619eb11ca19796d896c3a8e7098 | 2026-01-04T15:00:35.175153Z | false |
qishibo/AnotherRedisDesktopManager | https://github.com/qishibo/AnotherRedisDesktopManager/blob/4c2b7a5f1074b619eb11ca19796d896c3a8e7098/config/dev.env.js | config/dev.env.js | 'use strict'
const merge = require('webpack-merge')
const prodEnv = require('./prod.env')
module.exports = merge(prodEnv, {
NODE_ENV: '"development"'
})
| javascript | MIT | 4c2b7a5f1074b619eb11ca19796d896c3a8e7098 | 2026-01-04T15:00:35.175153Z | false |
sahat/hackathon-starter | https://github.com/sahat/hackathon-starter/blob/9c293df1922b1ea1924ae0ca0f7846b20d6b9d28/app.js | app.js | /**
* Module dependencies.
*/
const path = require('path');
const express = require('express');
const compression = require('compression');
const session = require('express-session');
const errorHandler = require('errorhandler');
const lusca = require('lusca');
const dotenv = require('dotenv');
const MongoStore = req... | javascript | MIT | 9c293df1922b1ea1924ae0ca0f7846b20d6b9d28 | 2026-01-04T15:00:19.585140Z | false |
sahat/hackathon-starter | https://github.com/sahat/hackathon-starter/blob/9c293df1922b1ea1924ae0ca0f7846b20d6b9d28/controllers/user.js | controllers/user.js | const crypto = require('crypto');
const passport = require('passport');
const validator = require('validator');
const mailChecker = require('mailchecker');
const User = require('../models/User');
const Session = require('../models/Session');
const nodemailerConfig = require('../config/nodemailer');
/**
* GET /login
... | javascript | MIT | 9c293df1922b1ea1924ae0ca0f7846b20d6b9d28 | 2026-01-04T15:00:19.585140Z | false |
sahat/hackathon-starter | https://github.com/sahat/hackathon-starter/blob/9c293df1922b1ea1924ae0ca0f7846b20d6b9d28/controllers/home.js | controllers/home.js | /**
* GET /
* Home page.
*/
exports.index = (req, res) => {
res.render('home', {
title: 'Home',
siteURL: process.env.BASE_URL,
});
};
| javascript | MIT | 9c293df1922b1ea1924ae0ca0f7846b20d6b9d28 | 2026-01-04T15:00:19.585140Z | false |
sahat/hackathon-starter | https://github.com/sahat/hackathon-starter/blob/9c293df1922b1ea1924ae0ca0f7846b20d6b9d28/controllers/api.js | controllers/api.js | const path = require('path');
const crypto = require('crypto');
const cheerio = require('cheerio');
const { LastFmNode } = require('lastfm');
const multer = require('multer');
const { OAuth } = require('oauth');
// Disable eslint rule for @octakit/rest until the following github issue is resolved
// github npm package ... | javascript | MIT | 9c293df1922b1ea1924ae0ca0f7846b20d6b9d28 | 2026-01-04T15:00:19.585140Z | true |
sahat/hackathon-starter | https://github.com/sahat/hackathon-starter/blob/9c293df1922b1ea1924ae0ca0f7846b20d6b9d28/controllers/contact.js | controllers/contact.js | const validator = require('validator');
const nodemailerConfig = require('../config/nodemailer');
async function validateReCAPTCHA(token) {
const projectId = process.env.GOOGLE_PROJECT_ID;
const siteKey = process.env.GOOGLE_RECAPTCHA_SITE_KEY;
const apiKey = process.env.GOOGLE_API_KEY;
const url = `https://rec... | javascript | MIT | 9c293df1922b1ea1924ae0ca0f7846b20d6b9d28 | 2026-01-04T15:00:19.585140Z | false |
sahat/hackathon-starter | https://github.com/sahat/hackathon-starter/blob/9c293df1922b1ea1924ae0ca0f7846b20d6b9d28/controllers/ai.js | controllers/ai.js | const crypto = require('crypto');
const fs = require('fs');
const multer = require('multer');
const path = require('path');
const { PDFLoader } = require('@langchain/community/document_loaders/fs/pdf');
const { RecursiveCharacterTextSplitter } = require('@langchain/textsplitters');
const { HuggingFaceInferenceEmbedding... | javascript | MIT | 9c293df1922b1ea1924ae0ca0f7846b20d6b9d28 | 2026-01-04T15:00:19.585140Z | false |
sahat/hackathon-starter | https://github.com/sahat/hackathon-starter/blob/9c293df1922b1ea1924ae0ca0f7846b20d6b9d28/test/nodemailer.test.js | test/nodemailer.test.js | const { expect } = require('chai');
const sinon = require('sinon');
const nodemailer = require('nodemailer');
describe('Nodemailer Config', () => {
let transporterStub;
let createTransportStub;
let flashStub;
let req;
beforeEach(() => {
sinon.restore();
flashStub = sinon.stub();
req = { flash: f... | javascript | MIT | 9c293df1922b1ea1924ae0ca0f7846b20d6b9d28 | 2026-01-04T15:00:19.585140Z | false |
sahat/hackathon-starter | https://github.com/sahat/hackathon-starter/blob/9c293df1922b1ea1924ae0ca0f7846b20d6b9d28/test/docs-links.test.js | test/docs-links.test.js | const { expect } = require('chai');
const { getMarkdownChecks, checkList } = require('./tools/simple-link-image-check');
describe('docs links', function () {
this.timeout(300000);
it('has no broken links in markdown docs', async () => {
const checks = getMarkdownChecks();
const deduped = checks; // alread... | javascript | MIT | 9c293df1922b1ea1924ae0ca0f7846b20d6b9d28 | 2026-01-04T15:00:19.585140Z | false |
sahat/hackathon-starter | https://github.com/sahat/hackathon-starter/blob/9c293df1922b1ea1924ae0ca0f7846b20d6b9d28/test/app-links.test.js | test/app-links.test.js | const { expect } = require('chai');
const { getViewsChecks, checkList } = require('./tools/simple-link-image-check');
describe('app view links', function () {
this.timeout(300000);
it('has no broken links in pug views', async () => {
const checks = getViewsChecks();
const deduped = checks; // already dedu... | javascript | MIT | 9c293df1922b1ea1924ae0ca0f7846b20d6b9d28 | 2026-01-04T15:00:19.585140Z | false |
sahat/hackathon-starter | https://github.com/sahat/hackathon-starter/blob/9c293df1922b1ea1924ae0ca0f7846b20d6b9d28/test/passport.test.js | test/passport.test.js | const { expect } = require('chai');
const sinon = require('sinon');
const refresh = require('passport-oauth2-refresh');
const moment = require('moment');
const mongoose = require('mongoose');
const path = require('path');
require('dotenv').config({ path: path.join(__dirname, '.env.test') });
const { isAuthorized, _save... | javascript | MIT | 9c293df1922b1ea1924ae0ca0f7846b20d6b9d28 | 2026-01-04T15:00:19.585140Z | false |
sahat/hackathon-starter | https://github.com/sahat/hackathon-starter/blob/9c293df1922b1ea1924ae0ca0f7846b20d6b9d28/test/app.test.js | test/app.test.js | const request = require('supertest');
const { MongoMemoryServer } = require('mongodb-memory-server');
let mongoServer;
let app;
before(async () => {
mongoServer = await MongoMemoryServer.create();
const mockMongoDBUri = await mongoServer.getUri();
process.env.MONGODB_URI = mockMongoDBUri;
// If we require the... | javascript | MIT | 9c293df1922b1ea1924ae0ca0f7846b20d6b9d28 | 2026-01-04T15:00:19.585140Z | false |
sahat/hackathon-starter | https://github.com/sahat/hackathon-starter/blob/9c293df1922b1ea1924ae0ca0f7846b20d6b9d28/test/playwright.config.js | test/playwright.config.js | const { defineConfig, devices } = require('@playwright/test');
const dotenv = require('dotenv');
const path = require('path');
const fs = require('fs');
// Preserve any MONGODB_URI that was set before loading dotenv, since it is set to the memory server starter
const originalMongoUri = process.env.MONGODB_URI;
const re... | javascript | MIT | 9c293df1922b1ea1924ae0ca0f7846b20d6b9d28 | 2026-01-04T15:00:19.585140Z | false |
sahat/hackathon-starter | https://github.com/sahat/hackathon-starter/blob/9c293df1922b1ea1924ae0ca0f7846b20d6b9d28/test/contact.test.js | test/contact.test.js | const { expect } = require('chai');
const sinon = require('sinon');
const request = require('supertest');
const express = require('express');
const session = require('express-session');
const contactController = require('../controllers/contact');
let app;
let sendMailStub;
let fetchStub;
const OLD_ENV = { ...process.e... | javascript | MIT | 9c293df1922b1ea1924ae0ca0f7846b20d6b9d28 | 2026-01-04T15:00:19.585140Z | false |
sahat/hackathon-starter | https://github.com/sahat/hackathon-starter/blob/9c293df1922b1ea1924ae0ca0f7846b20d6b9d28/test/morgan.test.js | test/morgan.test.js | const morgan = require('morgan');
const { expect } = require('chai');
const sinon = require('sinon');
// Import the morgan configuration to ensure tokens are registered
const { _getMorganFormat } = require('../config/morgan');
describe('Morgan Configuration Tests', () => {
let req;
let res;
let clock;
const o... | javascript | MIT | 9c293df1922b1ea1924ae0ca0f7846b20d6b9d28 | 2026-01-04T15:00:19.585140Z | false |
sahat/hackathon-starter | https://github.com/sahat/hackathon-starter/blob/9c293df1922b1ea1924ae0ca0f7846b20d6b9d28/test/auth.opt.test.js | test/auth.opt.test.js | const { expect } = require('chai');
const sinon = require('sinon');
const moment = require('moment');
const mongoose = require('mongoose');
const path = require('path');
require('dotenv').config({ path: path.join(__dirname, '.env.test') });
const { _saveOAuth2UserTokens } = require('../config/passport');
const User = r... | javascript | MIT | 9c293df1922b1ea1924ae0ca0f7846b20d6b9d28 | 2026-01-04T15:00:19.585140Z | false |
sahat/hackathon-starter | https://github.com/sahat/hackathon-starter/blob/9c293df1922b1ea1924ae0ca0f7846b20d6b9d28/test/flash.test.js | test/flash.test.js | const { expect } = require('chai');
const sinon = require('sinon');
const { flash } = require('../config/flash');
describe('flash middleware core tests', () => {
let req, res, next;
beforeEach(() => {
req = { session: {} };
res = {
locals: {},
render: sinon.spy(),
};
next = sinon.spy();... | javascript | MIT | 9c293df1922b1ea1924ae0ca0f7846b20d6b9d28 | 2026-01-04T15:00:19.585140Z | false |
sahat/hackathon-starter | https://github.com/sahat/hackathon-starter/blob/9c293df1922b1ea1924ae0ca0f7846b20d6b9d28/test/models.test.js | test/models.test.js | const { expect } = require('chai');
const sinon = require('sinon');
const bcrypt = require('@node-rs/bcrypt');
const mongoose = require('mongoose');
const { MongoMemoryServer } = require('mongodb-memory-server');
const User = require('../models/User');
describe('User Model', () => {
let mongoServer;
before(async ... | javascript | MIT | 9c293df1922b1ea1924ae0ca0f7846b20d6b9d28 | 2026-01-04T15:00:19.585140Z | false |
sahat/hackathon-starter | https://github.com/sahat/hackathon-starter/blob/9c293df1922b1ea1924ae0ca0f7846b20d6b9d28/test/tools/start-with-memory-db.js | test/tools/start-with-memory-db.js | #!/usr/bin/env node
// test/helpers/start-with-memory-db.js
// Starts mongodb-memory-server and then starts the app (require('../../app')).
const path = require('path');
const { spawnSync } = require('child_process');
const { MongoMemoryServer } = require('mongodb-memory-server');
const { installServerApiFixtures } = ... | javascript | MIT | 9c293df1922b1ea1924ae0ca0f7846b20d6b9d28 | 2026-01-04T15:00:19.585140Z | false |
sahat/hackathon-starter | https://github.com/sahat/hackathon-starter/blob/9c293df1922b1ea1924ae0ca0f7846b20d6b9d28/test/tools/server-fetch-fixtures.js | test/tools/server-fetch-fixtures.js | /**
* Server-side fetch() API Fixture System
*
* This module monkey-patches the global fetch() function to record and replay HTTP responses
* for server-side API calls made by Express controllers. It enables deterministic testing
* without requiring live API credentials or network access.
*
* How it works:
* - ... | javascript | MIT | 9c293df1922b1ea1924ae0ca0f7846b20d6b9d28 | 2026-01-04T15:00:19.585140Z | false |
sahat/hackathon-starter | https://github.com/sahat/hackathon-starter/blob/9c293df1922b1ea1924ae0ca0f7846b20d6b9d28/test/tools/server-axios-fixtures.js | test/tools/server-axios-fixtures.js | /**
* Server-side Axios API Fixture System
*
* This module uses Axios interceptors to record and replay HTTP responses for server-side
* API calls made by Express controllers. It enables deterministic testing without requiring
* live API credentials or network access.
*
* How it works:
* - RECORD MODE (API_MODE... | javascript | MIT | 9c293df1922b1ea1924ae0ca0f7846b20d6b9d28 | 2026-01-04T15:00:19.585140Z | false |
sahat/hackathon-starter | https://github.com/sahat/hackathon-starter/blob/9c293df1922b1ea1924ae0ca0f7846b20d6b9d28/test/tools/playwright-start-and-log.js | test/tools/playwright-start-and-log.js | // tools/start-and-log.js
const path = require('path');
const fs = require('fs');
const { spawn } = require('child_process');
const logPath = path.resolve(__dirname, '../..', 'tmp', 'playwright-webserver.log');
const out = fs.createWriteStream(logPath, { flags: 'w' });
// Spawn the real server using the same node exe... | javascript | MIT | 9c293df1922b1ea1924ae0ca0f7846b20d6b9d28 | 2026-01-04T15:00:19.585140Z | false |
sahat/hackathon-starter | https://github.com/sahat/hackathon-starter/blob/9c293df1922b1ea1924ae0ca0f7846b20d6b9d28/test/tools/simple-link-image-check.js | test/tools/simple-link-image-check.js | #!/usr/bin/env node
/*
Simple link & image checker (no external deps)
- Scans Pug views under views/ai and views/api for href and img src attributes
- Scans README.md and PROD_CHECKLIST.md for http(s) links
- Only checks images used in button areas for ai/index and api/index (heuristic: img tags in those files)
- ... | javascript | MIT | 9c293df1922b1ea1924ae0ca0f7846b20d6b9d28 | 2026-01-04T15:00:19.585140Z | false |
sahat/hackathon-starter | https://github.com/sahat/hackathon-starter/blob/9c293df1922b1ea1924ae0ca0f7846b20d6b9d28/test/tools/fixture-helpers.js | test/tools/fixture-helpers.js | const fs = require('fs');
const path = require('path');
const crypto = require('crypto');
const MANIFEST_PATH = path.resolve(__dirname, '..', 'fixtures', 'fixture_manifest.json');
function hashBody(body) {
try {
const h = crypto.createHash('sha1');
if (Buffer.isBuffer(body)) {
h.update(body);
} el... | javascript | MIT | 9c293df1922b1ea1924ae0ca0f7846b20d6b9d28 | 2026-01-04T15:00:19.585140Z | false |
sahat/hackathon-starter | https://github.com/sahat/hackathon-starter/blob/9c293df1922b1ea1924ae0ca0f7846b20d6b9d28/test/e2e/nyt.e2e.test.js | test/e2e/nyt.e2e.test.js | process.env.API_TEST_FILE = 'e2e/nyt.e2e.test.js';
const { test, expect } = require('@playwright/test');
const { registerTestInManifest, isInManifest } = require('../tools/fixture-helpers');
// Self-register this test in the manifest when recording
registerTestInManifest('e2e/nyt.e2e.test.js');
// Skip this file duri... | javascript | MIT | 9c293df1922b1ea1924ae0ca0f7846b20d6b9d28 | 2026-01-04T15:00:19.585140Z | false |
sahat/hackathon-starter | https://github.com/sahat/hackathon-starter/blob/9c293df1922b1ea1924ae0ca0f7846b20d6b9d28/test/e2e/openai-moderation.e2e.test.js | test/e2e/openai-moderation.e2e.test.js | process.env.API_TEST_FILE = 'e2e/openai-moderation.e2e.test.js';
const { test, expect } = require('@playwright/test');
const { registerTestInManifest, isInManifest } = require('../tools/fixture-helpers');
// Self-register this test in the manifest when recording
registerTestInManifest('e2e/openai-moderation.e2e.test.j... | javascript | MIT | 9c293df1922b1ea1924ae0ca0f7846b20d6b9d28 | 2026-01-04T15:00:19.585140Z | false |
sahat/hackathon-starter | https://github.com/sahat/hackathon-starter/blob/9c293df1922b1ea1924ae0ca0f7846b20d6b9d28/test/e2e/trakt.e2e.test.js | test/e2e/trakt.e2e.test.js | process.env.API_TEST_FILE = 'e2e/trakt.e2e.test.js';
const { test, expect } = require('@playwright/test');
const { registerTestInManifest, isInManifest } = require('../tools/fixture-helpers');
// Self-register this test in the manifest when recording
registerTestInManifest('e2e/trakt.e2e.test.js');
// Skip this file ... | javascript | MIT | 9c293df1922b1ea1924ae0ca0f7846b20d6b9d28 | 2026-01-04T15:00:19.585140Z | false |
sahat/hackathon-starter | https://github.com/sahat/hackathon-starter/blob/9c293df1922b1ea1924ae0ca0f7846b20d6b9d28/test/e2e/twilio.e2e.test.js | test/e2e/twilio.e2e.test.js | process.env.API_TEST_FILE = 'e2e/twilio.e2e.test.js';
const { test, expect } = require('@playwright/test');
// Skip this test in record/replay modes
if (process.env.API_MODE === 'replay' || process.env.API_MODE === 'record') {
console.log('[fixtures] skipping twillio.e2e.test.js in record/replay mode (mix of jwt aut... | javascript | MIT | 9c293df1922b1ea1924ae0ca0f7846b20d6b9d28 | 2026-01-04T15:00:19.585140Z | false |
sahat/hackathon-starter | https://github.com/sahat/hackathon-starter/blob/9c293df1922b1ea1924ae0ca0f7846b20d6b9d28/test/e2e/tenor.e2e.test.js | test/e2e/tenor.e2e.test.js | process.env.API_TEST_FILE = 'e2e/tenor.e2e.test.js';
const { test, expect } = require('@playwright/test');
const { registerTestInManifest, isInManifest } = require('../tools/fixture-helpers');
// Self-register this test in the manifest when recording
registerTestInManifest('e2e/tenor.e2e.test.js');
// Skip this file ... | javascript | MIT | 9c293df1922b1ea1924ae0ca0f7846b20d6b9d28 | 2026-01-04T15:00:19.585140Z | false |
sahat/hackathon-starter | https://github.com/sahat/hackathon-starter/blob/9c293df1922b1ea1924ae0ca0f7846b20d6b9d28/test/e2e/chart.e2e.test.js | test/e2e/chart.e2e.test.js | const testFileName = 'e2e/chart.e2e.test.js';
process.env.API_TEST_FILE = testFileName;
const { test, expect } = require('@playwright/test');
const { registerTestInManifest, isInManifest } = require('../tools/fixture-helpers');
// Self-register this test in the manifest when recording
registerTestInManifest(testFileNa... | javascript | MIT | 9c293df1922b1ea1924ae0ca0f7846b20d6b9d28 | 2026-01-04T15:00:19.585140Z | false |
sahat/hackathon-starter | https://github.com/sahat/hackathon-starter/blob/9c293df1922b1ea1924ae0ca0f7846b20d6b9d28/test/e2e/lob.e2e.test.js | test/e2e/lob.e2e.test.js | process.env.API_TEST_FILE = 'e2e/lob.e2e.test.js';
const { test, expect } = require('@playwright/test');
const { registerTestInManifest, isInManifest } = require('../tools/fixture-helpers');
// Self-register this test in the manifest when recording
registerTestInManifest('e2e/lob.e2e.test.js');
// Skip this file duri... | javascript | MIT | 9c293df1922b1ea1924ae0ca0f7846b20d6b9d28 | 2026-01-04T15:00:19.585140Z | false |
sahat/hackathon-starter | https://github.com/sahat/hackathon-starter/blob/9c293df1922b1ea1924ae0ca0f7846b20d6b9d28/test/e2e/togetherai-classifier.e2e.test.js | test/e2e/togetherai-classifier.e2e.test.js | process.env.API_TEST_FILE = 'e2e/togetherai-classifier.e2e.test.js';
const { test, expect } = require('@playwright/test');
const fs = require('fs');
const path = require('path');
const { registerTestInManifest, isInManifest } = require('../tools/fixture-helpers');
// Self-register this test in the manifest when record... | javascript | MIT | 9c293df1922b1ea1924ae0ca0f7846b20d6b9d28 | 2026-01-04T15:00:19.585140Z | false |
sahat/hackathon-starter | https://github.com/sahat/hackathon-starter/blob/9c293df1922b1ea1924ae0ca0f7846b20d6b9d28/test/e2e/google-maps.e2e.test.js | test/e2e/google-maps.e2e.test.js | const { test, expect } = require('@playwright/test');
// Skip this suite entirely when running in replay/record-fixture mode.
// We intentionally do not use browser-side record/replay for Google Maps.
if (process.env.API_MODE === 'replay' || process.env.API_MODE === 'record') {
console.log('[fixtures] skipping googl... | javascript | MIT | 9c293df1922b1ea1924ae0ca0f7846b20d6b9d28 | 2026-01-04T15:00:19.585140Z | false |
sahat/hackathon-starter | https://github.com/sahat/hackathon-starter/blob/9c293df1922b1ea1924ae0ca0f7846b20d6b9d28/test/e2e/foursquare.e2e.test.js | test/e2e/foursquare.e2e.test.js | process.env.API_TEST_FILE = 'e2e/foursquare.e2e.test.js';
const { test, expect } = require('@playwright/test');
const { registerTestInManifest, isInManifest } = require('../tools/fixture-helpers');
// Self-register this test in the manifest when recording
registerTestInManifest('e2e/foursquare.e2e.test.js');
// Skip ... | javascript | MIT | 9c293df1922b1ea1924ae0ca0f7846b20d6b9d28 | 2026-01-04T15:00:19.585140Z | false |
sahat/hackathon-starter | https://github.com/sahat/hackathon-starter/blob/9c293df1922b1ea1924ae0ca0f7846b20d6b9d28/test/e2e/here-maps.e2e.test.js | test/e2e/here-maps.e2e.test.js | const { test, expect } = require('@playwright/test');
// Skip this suite entirely when running in record/replay fixture mode.
// We intentionally do not use browser-side record/replay for HERE Maps.
if (process.env.API_MODE === 'replay' || process.env.API_MODE === 'record') {
console.log('[fixtures] skipping here-ma... | javascript | MIT | 9c293df1922b1ea1924ae0ca0f7846b20d6b9d28 | 2026-01-04T15:00:19.585140Z | false |
sahat/hackathon-starter | https://github.com/sahat/hackathon-starter/blob/9c293df1922b1ea1924ae0ca0f7846b20d6b9d28/test/e2e-nokey/lastfm.e2e.test.js | test/e2e-nokey/lastfm.e2e.test.js | process.env.API_TEST_FILE = 'e2e-nokey/lastfm.e2e.test.js';
const { test, expect } = require('@playwright/test');
// Skip this test in record/replay modes
if (process.env.API_MODE === 'replay' || process.env.API_MODE === 'record') {
console.log('[fixtures] skipping lastfm.e2e.test.js in record/replay mode (legacy ht... | javascript | MIT | 9c293df1922b1ea1924ae0ca0f7846b20d6b9d28 | 2026-01-04T15:00:19.585140Z | false |
sahat/hackathon-starter | https://github.com/sahat/hackathon-starter/blob/9c293df1922b1ea1924ae0ca0f7846b20d6b9d28/test/e2e-nokey/rag.e2e.test.js | test/e2e-nokey/rag.e2e.test.js | const { test, expect } = require('@playwright/test');
const fs = require('fs');
const path = require('path');
test.describe('RAG File Upload Integration', () => {
test.describe.configure({ mode: 'serial' });
// Helper to remove 'test-*' files from RAG input and 'ingested' dirs
const cleanupTestFiles = () => {
... | javascript | MIT | 9c293df1922b1ea1924ae0ca0f7846b20d6b9d28 | 2026-01-04T15:00:19.585140Z | false |
sahat/hackathon-starter | https://github.com/sahat/hackathon-starter/blob/9c293df1922b1ea1924ae0ca0f7846b20d6b9d28/test/e2e-nokey/upload.e2e.test.js | test/e2e-nokey/upload.e2e.test.js | const { test, expect } = require('@playwright/test');
const fs = require('fs');
const path = require('path');
test.describe('File Upload API Integration', () => {
test.describe.configure({ mode: 'serial' });
let sharedPage;
test.beforeAll(async ({ browser }) => {
sharedPage = await browser.newPage();
aw... | javascript | MIT | 9c293df1922b1ea1924ae0ca0f7846b20d6b9d28 | 2026-01-04T15:00:19.585140Z | false |
sahat/hackathon-starter | https://github.com/sahat/hackathon-starter/blob/9c293df1922b1ea1924ae0ca0f7846b20d6b9d28/test/e2e-nokey/wikipedia.e2e.test.js | test/e2e-nokey/wikipedia.e2e.test.js | process.env.API_TEST_FILE = 'e2e-nokey/wikipedia.e2e.test.js';
const { test, expect } = require('@playwright/test');
const { registerTestInManifest, isInManifest } = require('../tools/fixture-helpers');
// Self-register this test in the manifest when recording
registerTestInManifest('e2e-nokey/wikipedia.e2e.test.js');... | javascript | MIT | 9c293df1922b1ea1924ae0ca0f7846b20d6b9d28 | 2026-01-04T15:00:19.585140Z | false |
sahat/hackathon-starter | https://github.com/sahat/hackathon-starter/blob/9c293df1922b1ea1924ae0ca0f7846b20d6b9d28/test/e2e-nokey/github-api.e2e.test.js | test/e2e-nokey/github-api.e2e.test.js | process.env.API_TEST_FILE = 'e2e-nokey/github-api.e2e.test.js';
const { test, expect } = require('@playwright/test');
const fs = require('fs');
const path = require('path');
const { registerTestInManifest, isInManifest } = require('../tools/fixture-helpers');
// Self-register this test in the manifest when recording
r... | javascript | MIT | 9c293df1922b1ea1924ae0ca0f7846b20d6b9d28 | 2026-01-04T15:00:19.585140Z | false |
sahat/hackathon-starter | https://github.com/sahat/hackathon-starter/blob/9c293df1922b1ea1924ae0ca0f7846b20d6b9d28/test/e2e-nokey/scraping.e2e.test.js | test/e2e-nokey/scraping.e2e.test.js | process.env.API_TEST_FILE = 'e2e-nokey/scraping.e2e.test.js';
const { test, expect } = require('@playwright/test');
const { registerTestInManifest, isInManifest } = require('../tools/fixture-helpers');
// Self-register this test in the manifest when recording
registerTestInManifest('e2e-nokey/scraping.e2e.test.js');
... | javascript | MIT | 9c293df1922b1ea1924ae0ca0f7846b20d6b9d28 | 2026-01-04T15:00:19.585140Z | false |
sahat/hackathon-starter | https://github.com/sahat/hackathon-starter/blob/9c293df1922b1ea1924ae0ca0f7846b20d6b9d28/test/e2e-nokey/pubchem.e2e.test.js | test/e2e-nokey/pubchem.e2e.test.js | process.env.API_TEST_FILE = 'e2e-nokey/pubchem.e2e.test.js';
const { test, expect } = require('@playwright/test');
const { registerTestInManifest, isInManifest } = require('../tools/fixture-helpers');
// Self-register this test in the manifest when recording
registerTestInManifest('e2e-nokey/pubchem.e2e.test.js');
// ... | javascript | MIT | 9c293df1922b1ea1924ae0ca0f7846b20d6b9d28 | 2026-01-04T15:00:19.585140Z | false |
sahat/hackathon-starter | https://github.com/sahat/hackathon-starter/blob/9c293df1922b1ea1924ae0ca0f7846b20d6b9d28/models/Session.js | models/Session.js | const mongoose = require('mongoose');
const sessionSchema = new mongoose.Schema({
session: String,
expires: Date,
});
sessionSchema.statics = {
/**
* Removes all valid sessions for a given user
* @param {string} userId
* @returns {Promise}
*/
removeSessionByUserId(userId) {
return this.deleteM... | javascript | MIT | 9c293df1922b1ea1924ae0ca0f7846b20d6b9d28 | 2026-01-04T15:00:19.585140Z | false |
sahat/hackathon-starter | https://github.com/sahat/hackathon-starter/blob/9c293df1922b1ea1924ae0ca0f7846b20d6b9d28/models/User.js | models/User.js | const crypto = require('crypto');
const bcrypt = require('@node-rs/bcrypt');
const mongoose = require('mongoose');
const userSchema = new mongoose.Schema(
{
email: { type: String, unique: true, required: true },
password: String,
passwordResetToken: String,
passwordResetExpires: Date,
passwordRe... | javascript | MIT | 9c293df1922b1ea1924ae0ca0f7846b20d6b9d28 | 2026-01-04T15:00:19.585140Z | false |
sahat/hackathon-starter | https://github.com/sahat/hackathon-starter/blob/9c293df1922b1ea1924ae0ca0f7846b20d6b9d28/public/js/main.js | public/js/main.js | /* eslint-env jquery, browser */
/* global $ */
$(() => {
// Place JavaScript code here...
});
| javascript | MIT | 9c293df1922b1ea1924ae0ca0f7846b20d6b9d28 | 2026-01-04T15:00:19.585140Z | false |
sahat/hackathon-starter | https://github.com/sahat/hackathon-starter/blob/9c293df1922b1ea1924ae0ca0f7846b20d6b9d28/config/morgan.js | config/morgan.js | const logger = require('morgan');
const Bowser = require('bowser');
// Color definitions for console output
const colors = {
red: '\x1b[31m',
green: '\x1b[32m',
yellow: '\x1b[33m',
cyan: '\x1b[36m',
reset: '\x1b[0m',
};
// Custom colored status token
logger.token('colored-status', (req, res) => {
const st... | javascript | MIT | 9c293df1922b1ea1924ae0ca0f7846b20d6b9d28 | 2026-01-04T15:00:19.585140Z | false |
sahat/hackathon-starter | https://github.com/sahat/hackathon-starter/blob/9c293df1922b1ea1924ae0ca0f7846b20d6b9d28/config/flash.js | config/flash.js | const { format } = require('util');
// Flash Middleware as a replacement for express-flash / connect-flash
// Those packages are unmaintained and have some issues. This is a simple
// implementation that provides the same functionality.
exports.flash = (req, res, next) => {
if (req.flash) return next();
req.flash ... | javascript | MIT | 9c293df1922b1ea1924ae0ca0f7846b20d6b9d28 | 2026-01-04T15:00:19.585140Z | false |
sahat/hackathon-starter | https://github.com/sahat/hackathon-starter/blob/9c293df1922b1ea1924ae0ca0f7846b20d6b9d28/config/nodemailer.js | config/nodemailer.js | const nodemailer = require('nodemailer');
/**
* Helper Function to Send Mail.
*/
exports.sendMail = (settings) => {
const transportConfig = {
host: process.env.SMTP_HOST,
port: 465,
secure: true,
auth: {
user: process.env.SMTP_USER,
pass: process.env.SMTP_PASSWORD,
},
};
let tr... | javascript | MIT | 9c293df1922b1ea1924ae0ca0f7846b20d6b9d28 | 2026-01-04T15:00:19.585140Z | false |
sahat/hackathon-starter | https://github.com/sahat/hackathon-starter/blob/9c293df1922b1ea1924ae0ca0f7846b20d6b9d28/config/passport.js | config/passport.js | const crypto = require('crypto');
const passport = require('passport');
const refresh = require('passport-oauth2-refresh');
const { Strategy: LocalStrategy } = require('passport-local');
const { Strategy: FacebookStrategy } = require('passport-facebook');
const { Strategy: TwitterStrategy } = require('@passport-js/pass... | javascript | MIT | 9c293df1922b1ea1924ae0ca0f7846b20d6b9d28 | 2026-01-04T15:00:19.585140Z | true |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/verdaccioPublish.js | verdaccioPublish.js | const {execSync} = require('child_process');
const fs = require('fs');
const path = require('path');
const run = cmd => execSync(cmd, {encoding: 'utf8', cwd: __dirname});
const bin = cmd => path.join(__dirname, 'node_modules/.bin', cmd);
const sha = run('git rev-parse --short HEAD').trim();
const version = JSON.parse... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/gulpfile.js | gulpfile.js | const {Transform} = require('stream');
const babel = require('gulp-babel');
const gulp = require('gulp');
const path = require('path');
const {rimraf} = require('rimraf');
const swc = require('@swc/core');
const babelConfig = require('./babel.config.json');
const IGNORED_PACKAGES = [
'!packages/examples/**',
'!pac... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/.proxyrc.js | .proxyrc.js | module.exports = function (app) {
app.use(function (req, res, next) {
res.setHeader('Cross-Origin-Embedder-Policy', 'require-corp');
res.setHeader('Cross-Origin-Opener-Policy', 'same-origin');
res.setHeader('Cross-Origin-Resource-Policy', 'same-origin');
next();
});
};
| javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/scripts/postinstall.js | scripts/postinstall.js | /* eslint-disable no-console */
const fs = require('fs');
const path = require('path');
if (shouldBuildNative()) {
require('./build-native');
}
function shouldBuildNative() {
try {
fs.statSync(path.join(__dirname, '..', 'packages/native-packages'));
} catch (e) {
console.log('Could not find linked nativ... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/scripts/to-fs-fixture.js | scripts/to-fs-fixture.js | #! /usr/bin/env node
/* eslint-disable no-console */
require('@parcel/babel-register');
const fs = require('node:fs').promises;
const path = require('node:path');
const {spawn, execSync} = require('node:child_process');
/* eslint-disable import/no-extraneous-dependencies */
const commander = require('commander');
co... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/scripts/update-config-dependencies.js | scripts/update-config-dependencies.js | const fs = require('fs');
const path = require('path');
const exec = require('child_process').execSync;
let packages = JSON.parse(
exec(
`${path.join(__dirname, '..', 'node_modules', '.bin', 'lerna')} ls --json`,
),
);
let packageVersions = new Map(packages.map(pkg => [pkg.name, pkg.version]));
let configsDir... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/scripts/common.js | scripts/common.js | /* eslint-disable no-console */
const fs = require('fs');
const np = require('path');
const child_process = require('child_process');
/**
* Returns an object where
* key = path to project root
* value = parsed package.json
*/
exports.findProjects = function findProjects(rootDir, files = {}) {
for (let file of ... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/scripts/update-engines-peerdeps.js | scripts/update-engines-peerdeps.js | const fs = require('fs');
const path = require('path');
const exec = require('child_process').execSync;
let packages = JSON.parse(
exec(
`${path.join(__dirname, '..', 'node_modules', '.bin', 'lerna')} ls --json`,
),
);
let packageVersions = new Map(
packages.map(pkg => [
pkg.name,
{version: pkg.vers... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/scripts/unlink-all.js | scripts/unlink-all.js | #!/usr/bin/env node
// unlinks all packages and deletes their node_modules folders
/* eslint-disable no-console */
let args = process.argv.slice(2);
if (args.length < 1) {
console.log(
`Usage:
unlink_all rootdir
`,
);
process.exit(1);
}
const rootDir = args[0];
const {findProjects, exec} = require('./c... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/scripts/build-native.js | scripts/build-native.js | /* eslint-disable no-console */
const fs = require('fs');
const glob = require('fast-glob');
const path = require('path');
const {spawn, execSync} = require('child_process');
let release = process.argv.includes('--release');
let canary = process.argv.includes('--canary');
let wasm = process.argv.includes('--wasm');
b... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/scripts/link-all.js | scripts/link-all.js | #!/usr/bin/env node
/* eslint-disable no-console */
// links all packages that are interdependent within a directory recursively.
let args = process.argv.slice(2);
if (args.length < 1) {
console.log(
`Usage:
link_all rootdir
`,
);
process.exit(1);
}
console.log(
"Yarn installing and linking all packa... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/flow-typed/npm/semver_v6.2.x.js | flow-typed/npm/semver_v6.2.x.js | // flow-typed signature: 0f3a5488505547a0a71d5b49cf5c2954
// flow-typed version: 01cfe946d5/semver_v6.2.x/flow_>=v0.104.x
declare module "semver" {
declare type Release =
| "major"
| "premajor"
| "minor"
| "preminor"
| "patch"
| "prepatch"
| "prerelease";
// The supported comparators a... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/flow-typed/npm/is-url_v1.x.x.js | flow-typed/npm/is-url_v1.x.x.js | // flow-typed signature: ea5cb9dfe7dceda7305dd7cb03175302
// flow-typed version: 94e9f7e0a4/is-url_v1.x.x/flow_>=v0.25.x
declare module 'is-url' {
declare module.exports: (url: string) => boolean;
}
| javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/flow-typed/npm/sinon_v7.x.x.js | flow-typed/npm/sinon_v7.x.x.js | // flow-typed signature: b8dbe7970939676d2e1e0478e2bb77e5
// flow-typed version: c87d478d4c/sinon_v7.x.x/flow_>=v0.80.x
declare module 'sinon' {
declare interface SinonFakeCallApi {
thisValue: any;
args: Array<any>;
exception: any;
returnValue: any;
calledOn(obj: any): boolean;
calledWith(...... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/flow-typed/npm/mocha_v8.x.x.js | flow-typed/npm/mocha_v8.x.x.js | // flow-typed signature: a9c051e037cdcce97b16e692321e6856
// flow-typed version: b074eb3e38/mocha_v8.x.x/flow_>=v0.104.x
declare interface $npm$mocha$SetupOptions {
slow?: number;
timeout?: number;
ui?: string;
globals?: Array<any>;
reporter?: any;
bail?: boolean;
ignoreLeaks?: boolean;
grep?: any;
}
... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/flow-typed/npm/typescript_v3.3.x.js | flow-typed/npm/typescript_v3.3.x.js | // flow-typed signature: 1cfd67767aab1e3b8debc8321518b5a0
// flow-typed version: 3069537731/typescript_v3.3.x/flow_>=v0.104.x
declare module "typescript" {
declare var versionMajorMinor: "3.3"; // "3.3";
declare var version: string;
declare type MapLike<T> = { [index: string]: T, ... };
declare class SortedRe... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | true |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/flow-typed/npm/clone_v2.x.x.js | flow-typed/npm/clone_v2.x.x.js | // flow-typed signature: e65d25838d862100b2564dec170532b3
// flow-typed version: da30fe6876/clone_v2.x.x/flow_>=v0.25.x
// @flow
declare module 'clone' {
declare module.exports: <T>(object: T) => T;
}
| javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/flow-typed/npm/rimraf_v5.x.x.js | flow-typed/npm/rimraf_v5.x.x.js | // https://github.com/flow-typed/flow-typed/pull/4556
declare module 'rimraf' {
declare type Options = {
maxRetries?: number,
glob?: boolean,
...
};
declare module.exports: {
(f: string, opts?: Options): Promise<boolean>,
sync(path: string, opts?: Options): boolean,
...
};
}
| javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/flow-typed/npm/chalk_v4.x.x.js | flow-typed/npm/chalk_v4.x.x.js | // flow-typed signature: 79cfa6bcaa67fdb60f10d320da0470fc
// flow-typed version: 6cecea2e51/chalk_v4.x.x/flow_>=v0.104.x
// From: https://github.com/chalk/chalk/blob/master/index.d.ts
declare module "chalk" {
declare type ForegroundColor =
| 'black'
| 'red'
| 'green'
| 'yellow'
| 'blue'
| 'm... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/flow-typed/npm/mime_v2.x.x.js | flow-typed/npm/mime_v2.x.x.js | // flow-typed signature: 31e500511ae049defd391e018e0d8fa9
// flow-typed version: c6154227d1/mime_v2.x.x/flow_>=v0.104.x
declare type $npm$mime$TypeMap = { [mime: string]: Array<string>, ... };
declare class $npm$mime$Mime {
constructor(...typeMap: Array<$npm$mime$TypeMap>): void;
define(typeMap: $npm$mime$TypeMa... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/flow-typed/npm/express_v4.x.x.js | flow-typed/npm/express_v4.x.x.js | // flow-typed signature: 5c17cfda258a9db73cd2282d14ff18d0
// flow-typed version: 2f514ea8dd/express_v4.x.x/flow_>=v0.104.x
declare type express$RouterOptions = {
caseSensitive?: boolean,
mergeParams?: boolean,
strict?: boolean,
...
};
declare class express$RequestResponseBase {
app: express$Application<any,... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/flow-typed/npm/source-map_v0.7.x.js | flow-typed/npm/source-map_v0.7.x.js | // flow-typed signature: df79a314b7d0c7ec7dd9f01a8fcd37cf
// flow-typed version: 4f76a29260/source-map_v0.7.x/flow_>=v0.104.x
declare module 'source-map' {
declare export type SourceMapUrl = string;
declare export type StartOfSourceMap = {|
+file?: string,
+sourceRoot?: string,
+skipValidation?: boolea... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/flow-typed/npm/tempy_v0.x.x.js | flow-typed/npm/tempy_v0.x.x.js | // flow-typed signature: 4c5b8e467850f482876c1b4ee92e2cba
// flow-typed version: c6154227d1/tempy_v0.x.x/flow_>=v0.104.x
type $npm$tempy$Options = {
extension?: string,
name?: string,
...
};
declare module "tempy" {
declare module.exports: {
directory: () => string,
file: (options?: $npm$tempy$Options... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/flow-typed/npm/mkdirp_v0.5.x.js | flow-typed/npm/mkdirp_v0.5.x.js | // flow-typed signature: b1b274e8ae71623bf11c20224c446842
// flow-typed version: c6154227d1/mkdirp_v0.5.x/flow_>=v0.104.x
declare module 'mkdirp' {
declare type Options = number | {
mode?: number,
fs?: mixed,
...
};
declare type Callback = (err: ?Error, path: ?string) => void;
declare module.expo... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/flow-typed/npm/@swc/core_v1.x.x.js | flow-typed/npm/@swc/core_v1.x.x.js | // @flow
declare module '@swc/core' {
/**
* Flowtype definitions for types
* Generated by Flowgen from a Typescript Definition
* Flowgen v1.21.0
*/
// see https://gist.github.com/thecotne/6e5969f4aaf8f253985ed36b30ac9fe0
declare type $FlowGen$If<X: boolean, Then, Else = empty> = $Call<
((true, T... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | true |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/flow-libs/deasync.js | flow-libs/deasync.js | // @flow
declare module 'deasync' {
declare module.exports: {
// TODO: Main callable signature
loopWhile(() => boolean): void,
runLoopOnce(): void,
sleep(sleepTimeMs: number): void,
...
};
}
| javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/compressors/brotli/src/BrotliCompressor.js | packages/compressors/brotli/src/BrotliCompressor.js | // @flow strict-local
import {Compressor} from '@parcel/plugin';
import zlib from 'zlib';
export default (new Compressor({
compress({options, stream}) {
if (options.mode !== 'production') {
return null;
}
return {
stream: stream.pipe(
zlib.createBrotliCompress({
[zlib.const... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/compressors/raw/src/RawCompressor.js | packages/compressors/raw/src/RawCompressor.js | // @flow
import {Compressor} from '@parcel/plugin';
export default (new Compressor({
compress({stream}) {
return {stream};
},
}): Compressor);
| javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/compressors/gzip/src/GzipCompressor.js | packages/compressors/gzip/src/GzipCompressor.js | // @flow strict-local
import {Compressor} from '@parcel/plugin';
import zlib from 'zlib';
export default (new Compressor({
compress({options, stream}) {
if (options.mode !== 'production') {
return null;
}
return {
stream: stream.pipe(zlib.createGzip({level: 9})),
type: 'gz',
};
}... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/runtimes/webextension/src/WebExtensionRuntime.js | packages/runtimes/webextension/src/WebExtensionRuntime.js | // @flow strict-local
import {Runtime} from '@parcel/plugin';
import {replaceURLReferences} from '@parcel/utils';
import nullthrows from 'nullthrows';
import fs from 'fs';
import path from 'path';
const AUTORELOAD_BG = fs.readFileSync(
path.join(__dirname, 'autoreload-bg.js'),
'utf8',
);
export default (new Runt... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
parcel-bundler/parcel | https://github.com/parcel-bundler/parcel/blob/73f691d67d22482440babb2d1846b7da2160f7cc/packages/runtimes/webextension/src/autoreload-bg.js | packages/runtimes/webextension/src/autoreload-bg.js | /* global chrome, browser */
let env = typeof browser === 'undefined' ? chrome : browser;
let origReload = env.runtime.reload;
let avoidID = -1;
let promisify =
(obj, fn) =>
(...args) => {
if (typeof browser === 'undefined') {
return new Promise((resolve, reject) =>
obj[fn](...args, res =>
... | javascript | MIT | 73f691d67d22482440babb2d1846b7da2160f7cc | 2026-01-04T14:58:42.192224Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.