index int64 0 0 | repo_id stringlengths 16 181 | file_path stringlengths 28 270 | content stringlengths 1 11.6M | __index_level_0__ int64 0 10k |
|---|---|---|---|---|
0 | petrpan-code/tapexyz/tape/packages/workers/stream/src | petrpan-code/tapexyz/tape/packages/workers/stream/src/handlers/getUnlonelyStream.ts | import { UNLONELY_LIVE_DETAIL, UNLONELY_LIVE_FEED } from '../queries'
export default async (channel?: string) => {
try {
const result: any = await fetch(
'https://unlonely-vqeii.ondigitalocean.app/graphql',
{
method: 'POST',
headers: {
'Content-Type': 'application/json'
... | 2,300 |
0 | petrpan-code/tapexyz/tape/packages/workers/stream/src | petrpan-code/tapexyz/tape/packages/workers/stream/src/helper/buildRequest.ts | import type { Env, WorkerRequest } from '../types'
const buildRequest = (
request: Request,
env: Env,
ctx: ExecutionContext
): WorkerRequest => {
const temp: WorkerRequest = request as WorkerRequest
temp.req = request
temp.env = env
temp.ctx = ctx
return temp
}
export default buildRequest
| 2,301 |
0 | petrpan-code/tapexyz/tape/packages/workers/stream/src | petrpan-code/tapexyz/tape/packages/workers/stream/src/helper/constants.ts | export const CURRENT_STREAMS = [] as any[]
// {
// title: 'rAAVE İstanbul 2023',
// content:
// 'Dance with Ronnie from anywhere in the globe featuring Veronika Fleyta, GALLiVANTER, Henri Bergmann, Jamiie and Jimi Jules. \n Livestream at 5PM UTC: https://rad.lol/stream',
// posterUrl: 'https://static.tape.xyz... | 2,302 |
0 | petrpan-code/tapexyz/tape/packages/workers | petrpan-code/tapexyz/tape/packages/workers/sts/.dev.vars.example | EVER_ACCESS_KEY = ""
EVER_ACCESS_SECRET = ""
| 2,303 |
0 | petrpan-code/tapexyz/tape/packages/workers | petrpan-code/tapexyz/tape/packages/workers/sts/package.json | {
"name": "@workers/sts",
"version": "0.0.0",
"license": "AGPL-3.0",
"private": true,
"scripts": {
"worker:dev": "wrangler dev",
"worker:deploy": "wrangler deploy",
"typecheck": "tsc --pretty"
},
"dependencies": {
"@aws-sdk/client-sts": "3.454.0"
},
"devDependencies": {
"@cloudflar... | 2,304 |
0 | petrpan-code/tapexyz/tape/packages/workers | petrpan-code/tapexyz/tape/packages/workers/sts/tsconfig.json | {
"extends": "@tape.xyz/config/base.tsconfig.json",
"compilerOptions": {
"lib": ["es2021"],
"noEmit": true,
"types": ["@cloudflare/workers-types"]
}
}
| 2,305 |
0 | petrpan-code/tapexyz/tape/packages/workers | petrpan-code/tapexyz/tape/packages/workers/sts/wrangler.toml | name = "sts"
main = "src/index.ts"
compatibility_date = "2023-01-25"
routes = [
{ pattern = "sts.tape.xyz", custom_domain = true }
]
keep_vars = true
[env.production.vars]
EVER_ACCESS_KEY = ""
EVER_ACCESS_SECRET = ""
| 2,306 |
0 | petrpan-code/tapexyz/tape/packages/workers/sts | petrpan-code/tapexyz/tape/packages/workers/sts/src/index.ts | import { AssumeRoleCommand, STSClient } from '@aws-sdk/client-sts'
type EnvType = {
EVER_ACCESS_KEY: string
EVER_ACCESS_SECRET: string
}
const headers = {
'Access-Control-Allow-Origin': '*',
'Content-Type': 'application/json'
}
const bucketName = 'tape'
const everEndpoint = 'https://endpoint.4everland.co'
co... | 2,307 |
0 | petrpan-code/tapexyz/tape/packages/workers | petrpan-code/tapexyz/tape/packages/workers/tail/.dev.vars.example | LOGTAIL_API_KEY=""
| 2,308 |
0 | petrpan-code/tapexyz/tape/packages/workers | petrpan-code/tapexyz/tape/packages/workers/tail/package.json | {
"name": "@workers/tail",
"version": "0.0.0",
"license": "AGPL-3.0",
"private": true,
"scripts": {
"worker:dev": "wrangler dev",
"worker:deploy": "wrangler deploy"
},
"devDependencies": {
"@cloudflare/workers-types": "^4.20231025.0",
"@tape.xyz/config": "*",
"typescript": "^5.3.2",
... | 2,309 |
0 | petrpan-code/tapexyz/tape/packages/workers | petrpan-code/tapexyz/tape/packages/workers/tail/tsconfig.json | {
"extends": "@tape.xyz/config/base.tsconfig.json",
"compilerOptions": {
"lib": ["es2021"],
"noEmit": true,
"types": ["@cloudflare/workers-types"]
}
}
| 2,310 |
0 | petrpan-code/tapexyz/tape/packages/workers | petrpan-code/tapexyz/tape/packages/workers/tail/wrangler.toml | name = "tail"
main = "src/index.ts"
compatibility_date = "2023-01-25"
routes = [
{ pattern = "tail.tape.xyz", custom_domain = true }
]
keep_vars = true
[env.production.vars]
LOGTAIL_API_KEY = ""
| 2,311 |
0 | petrpan-code/tapexyz/tape/packages/workers/tail | petrpan-code/tapexyz/tape/packages/workers/tail/src/index.ts | export interface Env {
LOGTAIL_API_KEY: string
}
const logtailApiURL = 'https://in.logtail.com/'
// A list of allowed origins that can access our backend API
const allowedOrigins = ['https://tape.xyz', 'https://www.tape.xyz']
// A function that returns a set of CORS headers
const corsHeaders = (origin: string) => (... | 2,312 |
0 | petrpan-code/tapexyz/tape/packages/workers | petrpan-code/tapexyz/tape/packages/workers/tower/.dev.vars.example | INGEST_REST_ENDPOINT=""
IP_API_KEY=""
| 2,313 |
0 | petrpan-code/tapexyz/tape/packages/workers | petrpan-code/tapexyz/tape/packages/workers/tower/README.md | ## Schema
```sql
CREATE TABLE events (
id UUID DEFAULT generateUUIDv4(),
actor Nullable(String),
name String,
properties Nullable(String),
referrer Nullable(String),
url Nullable(String),
platform String,
browser Nullable(String),
browser_version Nullable(String),
os Nullable(String),
city Nullab... | 2,314 |
0 | petrpan-code/tapexyz/tape/packages/workers | petrpan-code/tapexyz/tape/packages/workers/tower/package.json | {
"name": "@workers/tower",
"version": "0.0.0",
"license": "AGPL-3.0",
"private": true,
"scripts": {
"worker:dev": "wrangler dev",
"worker:deploy": "wrangler deploy"
},
"dependencies": {
"itty-router": "^4.0.23",
"ua-parser-js": "^1.0.37",
"zod": "^3.22.4"
},
"devDependencies": {
... | 2,315 |
0 | petrpan-code/tapexyz/tape/packages/workers | petrpan-code/tapexyz/tape/packages/workers/tower/tsconfig.json | {
"extends": "@tape.xyz/config/base.tsconfig.json",
"compilerOptions": {
"types": ["@cloudflare/workers-types"]
}
}
| 2,316 |
0 | petrpan-code/tapexyz/tape/packages/workers | petrpan-code/tapexyz/tape/packages/workers/tower/wrangler.toml | name = "tower"
main = "src/index.ts"
compatibility_date = "2023-01-25"
keep_vars = true
node_compat = true
routes = [
{ pattern = "tower.tape.xyz", custom_domain = true }
]
[env.production.vars]
INGEST_REST_ENDPOINT = ""
IP_API_KEY = ""
| 2,317 |
0 | petrpan-code/tapexyz/tape/packages/workers/tower | petrpan-code/tapexyz/tape/packages/workers/tower/src/index.ts | import { createCors, error, Router, status } from 'itty-router'
import ingest from './handlers/ingest'
import buildRequest from './helpers/buildRequest'
import type { Env } from './types'
const { preflight, corsify } = createCors({
origins: ['*'],
methods: ['HEAD', 'GET', 'POST']
})
const router = Router()
rout... | 2,318 |
0 | petrpan-code/tapexyz/tape/packages/workers/tower | petrpan-code/tapexyz/tape/packages/workers/tower/src/types.ts | import type { IRequestStrict } from 'itty-router'
export interface Env {
INGEST_REST_ENDPOINT: string
IP_API_KEY: string
}
export type WorkerRequest = {
req: Request
env: Env
ctx: ExecutionContext
} & IRequestStrict
| 2,319 |
0 | petrpan-code/tapexyz/tape/packages/workers/tower/src | petrpan-code/tapexyz/tape/packages/workers/tower/src/handlers/ingest.ts | import UAParser from 'ua-parser-js'
import { any, object, string } from 'zod'
import { ALL_EVENTS } from '@tape.xyz/generic/events'
import checkEventExistence from '../helpers/checkEventExistence'
import type { WorkerRequest } from '../types'
type ExtensionRequest = {
name: string
actor?: string
url: string
r... | 2,320 |
0 | petrpan-code/tapexyz/tape/packages/workers/tower/src | petrpan-code/tapexyz/tape/packages/workers/tower/src/helpers/buildRequest.ts | import type { Env, WorkerRequest } from '../types'
const buildRequest = (
request: Request,
env: Env,
ctx: ExecutionContext
): WorkerRequest => {
const temp: WorkerRequest = request as WorkerRequest
temp.req = request
temp.env = env
temp.ctx = ctx
return temp
}
export default buildRequest
| 2,321 |
0 | petrpan-code/tapexyz/tape/packages/workers/tower/src | petrpan-code/tapexyz/tape/packages/workers/tower/src/helpers/checkEventExistence.ts | const checkEventExistence = (obj: any, event: string): boolean => {
for (const key in obj) {
if (typeof obj[key] === 'object') {
if (checkEventExistence(obj[key], event)) {
return true
}
} else if (obj[key] === event) {
return true
}
}
return false
}
export default checkEven... | 2,322 |
0 | petrpan-code/tapexyz/tape/packages/workers | petrpan-code/tapexyz/tape/packages/workers/views/.dev.vars.example | LIVEPEER_API_TOKEN=""
| 2,323 |
0 | petrpan-code/tapexyz/tape/packages/workers | petrpan-code/tapexyz/tape/packages/workers/views/package.json | {
"name": "@workers/views",
"version": "0.0.0",
"private": true,
"license": "AGPL-3.0",
"scripts": {
"worker:dev": "wrangler dev",
"worker:deploy": "wrangler deploy",
"typecheck": "tsc --pretty"
},
"devDependencies": {
"@cloudflare/workers-types": "^4.20231025.0",
"typescript": "^5.3.2... | 2,324 |
0 | petrpan-code/tapexyz/tape/packages/workers | petrpan-code/tapexyz/tape/packages/workers/views/tsconfig.json | {
"extends": "@tape.xyz/config/base.tsconfig.json",
"compilerOptions": {
"lib": ["es2021"],
"noEmit": true,
"types": ["@cloudflare/workers-types"]
}
}
| 2,325 |
0 | petrpan-code/tapexyz/tape/packages/workers | petrpan-code/tapexyz/tape/packages/workers/views/wrangler.toml | name = "views"
main = "src/index.ts"
compatibility_date = "2023-01-25"
routes = [
{ pattern = "views.tape.xyz", custom_domain = true }
]
keep_vars = true
[env.production.vars]
LIVEPEER_API_TOKEN = ""
| 2,326 |
0 | petrpan-code/tapexyz/tape/packages/workers/views | petrpan-code/tapexyz/tape/packages/workers/views/src/index.ts | export interface Env {
LIVEPEER_API_TOKEN: string
}
const headers = {
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Headers': 'Content-Type',
'Content-Type': 'application/json'
}
const handleRequest = async (request: Request, env: Env) => {
if (request.method !== 'POST') {
return new Respons... | 2,327 |
0 | petrpan-code/tapexyz/tape | petrpan-code/tapexyz/tape/scripts/clean-branches | #!/bin/bash
echo "Deleting all branches except 'main' and 'testnet' 🗑"
git branch | grep -v "main" | grep -v "testnet" | xargs git branch -D
echo "Branches deleted 🎉"
| 2,328 |
0 | petrpan-code/tapexyz/tape | petrpan-code/tapexyz/tape/scripts/clean-packages | #!/bin/bash
#/ Usage: script/clean
#/ Clean all node_modules and yarn.lock files recursively.
echo "Deleting all node_modules and yarn.lock files recursively 🗑"
find . -name "node_modules" -type d -prune -exec rm -rf '{}' + -print
find . -name ".next" -type d -prune -exec rm -rf '{}' + -print
find . -name ".turbo" -... | 2,329 |
0 | petrpan-code/tapexyz/tape | petrpan-code/tapexyz/tape/scripts/get-all-commits | #!/bin/bash
author=$(git config user.name)
remote_url=$(git config --get remote.origin.url)
github_url=$(echo "$remote_url" | sed -n 's/.*github.com[:/]\(.*\)\.git/\1/p')
git_log_command="git log --since='midnight' --author='$author' --format='%h|%s'"
output=$(eval "$git_log_command")
IFS=$'\n' read -rd '' -a comm... | 2,330 |
0 | petrpan-code/tapexyz/tape | petrpan-code/tapexyz/tape/scripts/sync-branches | #!/bin/bash
git checkout main
echo "Syncing testnet branch with main branch 🔄"
git pull origin main
git checkout testnet
git merge main
git push origin testnet
git checkout main
echo "Branches synced 🎉" | 2,331 |
0 | petrpan-code/jamiebuilds | petrpan-code/jamiebuilds/unstated-next/.prettierignore | .rts2_cache_*
node_modules
.*ignore
dist
LICENSE
| 2,332 |
0 | petrpan-code/jamiebuilds | petrpan-code/jamiebuilds/unstated-next/.prettierrc | {
"useTabs": true,
"semi": false,
"trailingComma": "all",
"overrides": [
{
"files": "*.md",
"options": {
"useTabs": false
}
}
]
}
| 2,333 |
0 | petrpan-code/jamiebuilds | petrpan-code/jamiebuilds/unstated-next/LICENSE | Copyright (c)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell... | 2,334 |
0 | petrpan-code/jamiebuilds | petrpan-code/jamiebuilds/unstated-next/README-ru-ru.md | <p align="right">
<strong>
<a href="README.md">English</a> |
<a href="README-zh-cn.md">中文</a> |
<a href="README-ru-ru.md">Русский</a> |
<a href="README-th-th.md">ภาษาไทย</a> |
<a href="README-vi-vn.md">Tiếng Việt</a>
</strong>
<br/>
<sup><em>(Please contribute translations!)</em></sup>
</p>... | 2,335 |
0 | petrpan-code/jamiebuilds | petrpan-code/jamiebuilds/unstated-next/README-th-th.md | <p align="right">
<strong>
<a href="README.md">English</a> |
<a href="README-zh-cn.md">中文</a> |
<a href="README-ru-ru.md">Русский</a> |
<a href="README-th-th.md">ภาษาไทย</a> |
<a href="README-vi-vn.md">Tiếng Việt</a>
</strong>
<br/>
<sup><em>(Please contribute translations!)</em></sup>
</p>
... | 2,336 |
0 | petrpan-code/jamiebuilds | petrpan-code/jamiebuilds/unstated-next/README-vi-vn.md | <p align="right">
<strong>
<a href="README.md">English</a> |
<a href="README-zh-cn.md">中文</a> |
<a href="README-ru-ru.md">Русский</a> |
<a href="README-th-th.md">ภาษาไทย</a> |
<a href="README-vi-vn.md">Tiếng Việt</a>
</strong>
<br/>
<sup><em>(Please contribute translations!)</em></sup>
</p>... | 2,337 |
0 | petrpan-code/jamiebuilds | petrpan-code/jamiebuilds/unstated-next/README-zh-cn.md | <p align="right">
<strong>
<a href="README.md">English</a> |
<a href="README-zh-cn.md">中文</a> |
<a href="README-ru-ru.md">Русский</a> |
<a href="README-th-th.md">ภาษาไทย</a> |
<a href="README-vi-vn.md">Tiếng Việt</a>
</strong>
<br/>
<sup><em>(Please contribute translations!)</em></sup>
</p>... | 2,338 |
0 | petrpan-code/jamiebuilds | petrpan-code/jamiebuilds/unstated-next/README.md | <p align="right">
<strong>
<a href="README.md">English</a> |
<a href="README-zh-cn.md">中文</a> |
<a href="README-ru-ru.md">Русский</a> |
<a href="README-th-th.md">ภาษาไทย</a> |
<a href="README-vi-vn.md">Tiếng Việt</a>
</strong>
<br/>
<sup><em>(Please contribute translations!)</em></sup>
</p>... | 2,339 |
0 | petrpan-code/jamiebuilds | petrpan-code/jamiebuilds/unstated-next/package-lock.json | {
"name": "unstated-next",
"version": "1.1.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@ava/babel-plugin-throws-helper": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/@ava/babel-plugin-throws-helper/-/babel-plugin-throws-helper-3.0.0.tgz",
"integrity": "sha512-mN9UolOs... | 2,340 |
0 | petrpan-code/jamiebuilds | petrpan-code/jamiebuilds/unstated-next/package.json | {
"name": "unstated-next",
"version": "1.1.0",
"description": "200 bytes to never think about React state management libraries ever again",
"source": "src/unstated-next.tsx",
"main": "dist/unstated-next.js",
"module": "dist/unstated-next.mjs",
"unpkg": "dist/unstated-next.umd.js",
"types": "dist/unstated-next.d... | 2,341 |
0 | petrpan-code/jamiebuilds | petrpan-code/jamiebuilds/unstated-next/tsconfig.json | // prettier-ignore
{
"include": ["src"],
"exclude": ["test", "example"],
"compilerOptions": {
/* Basic Options */
"target": "ES5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
"module": "ES2015",... | 2,342 |
0 | petrpan-code/jamiebuilds/unstated-next | petrpan-code/jamiebuilds/unstated-next/example/index.html | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Document</title>
</head>
<body>
<div id="root"></div>
<script src="./index.tsx"></script>
</body>
</htm... | 2,343 |
0 | petrpan-code/jamiebuilds/unstated-next | petrpan-code/jamiebuilds/unstated-next/example/index.tsx | import React, { useState } from "react"
import { createContainer } from "../src/unstated-next"
import { render } from "react-dom"
function useCounter(initialState = 0) {
let [count, setCount] = useState(initialState)
let decrement = () => setCount(count - 1)
let increment = () => setCount(count + 1)
return { count... | 2,344 |
0 | petrpan-code/jamiebuilds/unstated-next | petrpan-code/jamiebuilds/unstated-next/src/unstated-next.tsx | import React from "react"
const EMPTY: unique symbol = Symbol()
export interface ContainerProviderProps<State = void> {
initialState?: State
children: React.ReactNode
}
export interface Container<Value, State = void> {
Provider: React.ComponentType<ContainerProviderProps<State>>
useContainer: () => Value
}
expo... | 2,345 |
0 | petrpan-code/gitify-app | petrpan-code/gitify-app/gitify/.npmrc | node-linker=hoisted
shamefully-hoist=true | 2,346 |
0 | petrpan-code/gitify-app | petrpan-code/gitify-app/gitify/.nvmrc | 18.18.0 | 2,347 |
0 | petrpan-code/gitify-app | petrpan-code/gitify-app/gitify/.prettierrc | {
"tabWidth": 2,
"singleQuote": true
}
| 2,348 |
0 | petrpan-code/gitify-app | petrpan-code/gitify-app/gitify/LICENSE | The MIT License (MIT)
Copyright (c) 2020 Emmanouil Konstantinidis
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify... | 2,349 |
0 | petrpan-code/gitify-app | petrpan-code/gitify-app/gitify/README.md | # Gitify [![github][github-image]][github-url] [![coveralls][coveralls-image]][coveralls-url] [![downloads][downloads-image]][downloads-url]
> GitHub Notifications on your menu bar. Available on macOS, Windows and Linux. Gitify Mobile has been deprecated in favour of the official [GitHub mobile app](https://github.com... | 2,350 |
0 | petrpan-code/gitify-app | petrpan-code/gitify-app/gitify/codecov.yml | coverage:
precision: 2
round: down
range: '70...100'
status:
project: false
patch: false
changes: false
comment: false
| 2,351 |
0 | petrpan-code/gitify-app | petrpan-code/gitify-app/gitify/first-run.js | const { app, dialog } = require('electron');
const fs = require('fs');
const path = require('path');
async function onFirstRunMaybe() {
if (isFirstRun()) {
await promptMoveToApplicationsFolder();
}
}
// Ask user if the app should be moved to the applications folder.
async function promptMoveToApplicationsFol... | 2,352 |
0 | petrpan-code/gitify-app | petrpan-code/gitify-app/gitify/index.html | <!DOCTYPE html>
<html>
<head>
<title>Gitify</title>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta http-equiv="Content-Security-Policy" content="script-src 'self';" />
</head>
<body>... | 2,353 |
0 | petrpan-code/gitify-app | petrpan-code/gitify-app/gitify/jest.config.js | const config = {
"preset": "ts-jest/presets/js-with-ts",
"setupFiles": [
"<rootDir>/src/__helpers__/setupEnvVars.js"
],
"testEnvironment": "jsdom",
"coverageThreshold": {
"global": {
"lines": 90
}
},
"moduleNameMapper": {
// Force CommonJS build for http adapter to be available.
... | 2,354 |
0 | petrpan-code/gitify-app | petrpan-code/gitify-app/gitify/main.js | const { ipcMain, app, nativeTheme } = require('electron');
const { menubar } = require('menubar');
const { autoUpdater } = require('electron-updater');
const { onFirstRunMaybe } = require('./first-run');
const path = require('path');
require('@electron/remote/main').initialize()
app.setAppUserModelId('com.electron.gi... | 2,355 |
0 | petrpan-code/gitify-app | petrpan-code/gitify-app/gitify/package.json | {
"name": "gitify",
"version": "4.4.0",
"description": "GitHub Notifications on your menu bar.",
"main": "main.js",
"scripts": {
"build": "webpack --config webpack.prod.js",
"watch": "webpack --config webpack.common.js --watch",
"make:linux": "electron-builder --linux",
"make:macos": "electron... | 2,356 |
0 | petrpan-code/gitify-app | petrpan-code/gitify-app/gitify/pnpm-lock.yaml | lockfileVersion: '6.0'
settings:
autoInstallPeers: true
excludeLinksFromLockfile: false
dependencies:
'@electron/remote':
specifier: 2.0.11
version: 2.0.11(electron@13.1.7)
'@primer/octicons-react':
specifier: 19.8.0
version: 19.8.0(react@18.2.0)
axios:
specifier: 1.6.0
version: 1.6.... | 2,357 |
0 | petrpan-code/gitify-app | petrpan-code/gitify-app/gitify/postcss.config.js | module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
};
| 2,358 |
0 | petrpan-code/gitify-app | petrpan-code/gitify-app/gitify/renovate.json | {
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["config:recommended"],
"labels": ["dependency"],
"prConcurrentLimit": 5,
"rangeStrategy": "pin",
"schedule": ["monthly"]
}
| 2,359 |
0 | petrpan-code/gitify-app | petrpan-code/gitify-app/gitify/tailwind.config.js | module.exports = {
content: ['./src/**/*.js', './src/**/*.ts', './src/**/*.tsx'],
darkMode: 'class',
theme: {
extend: {
colors: {
gray: {
sidebar: '#24292e',
dark: '#161b22',
darker: '#090E15',
darkest: '#000209',
},
primary: '#203354',
... | 2,360 |
0 | petrpan-code/gitify-app | petrpan-code/gitify-app/gitify/tsconfig.json | {
"compilerOptions": {
"module": "es6",
"moduleResolution": "node",
"target": "es2022",
"outDir": "./build/",
"sourceMap": true,
"noImplicitAny": false,
"noUnusedLocals": true,
"jsx": "react",
"allowJs": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
... | 2,361 |
0 | petrpan-code/gitify-app | petrpan-code/gitify-app/gitify/webpack.common.js | const path = require('path');
const webpack = require('webpack');
module.exports = {
mode: 'development',
entry: './src/index.tsx',
devtool: 'inline-source-map',
target: 'electron-renderer',
module: {
rules: [
{
test: /\.(js|ts|tsx)?$/,
use: 'ts-loader',
exclude: /node_modul... | 2,362 |
0 | petrpan-code/gitify-app | petrpan-code/gitify-app/gitify/webpack.prod.js | const { merge } = require('webpack-merge');
const common = require('./webpack.common.js');
module.exports = merge(common, {
mode: 'production',
devtool: 'source-map',
});
| 2,363 |
0 | petrpan-code/gitify-app/gitify | petrpan-code/gitify-app/gitify/.husky/pre-commit | #!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
pnpx lint-staged
pnpm test -- --onlyChanged
| 2,364 |
0 | petrpan-code/gitify-app/gitify | petrpan-code/gitify-app/gitify/.vscode/launch.json | {
// Use IntelliSense to learn about possible Node.js debug attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"requ... | 2,365 |
0 | petrpan-code/gitify-app/gitify | petrpan-code/gitify-app/gitify/entitlements/entitlements.mac.plist | <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
</dict>
</plist>
| 2,366 |
0 | petrpan-code/gitify-app/gitify | petrpan-code/gitify-app/gitify/scripts/notarize.js | const { notarize } = require('electron-notarize');
const packageJson = require('../package.json');
const appBundleId = packageJson.build.appId;
const notarizeApp = async (context) => {
const { electronPlatformName, appOutDir } = context;
const appName = context.packager.appInfo.productFilename;
const isMacOS = ... | 2,367 |
0 | petrpan-code/gitify-app/gitify | petrpan-code/gitify-app/gitify/src/app.tsx | import React, { useContext } from 'react';
import {
Navigate,
HashRouter as Router,
Route,
Routes,
useLocation,
} from 'react-router-dom';
import { AppContext, AppProvider } from './context/App';
import { Loading } from './components/Loading';
import { LoginEnterpriseRoute } from './routes/LoginEnterprise';
... | 2,368 |
0 | petrpan-code/gitify-app/gitify | petrpan-code/gitify-app/gitify/src/index.tsx | import { createRoot } from 'react-dom/client';
import * as React from 'react';
import 'tailwindcss/tailwind.css';
import 'nprogress/nprogress.css';
import { App } from './app';
const container = document.getElementById('gitify');
const root = createRoot(container);
root.render(<App />);
| 2,369 |
0 | petrpan-code/gitify-app/gitify | petrpan-code/gitify-app/gitify/src/types.ts | import { Notification, User } from './typesGithub';
export interface AuthState {
token?: string;
enterpriseAccounts: EnterpriseAccount[];
user: User | null;
}
export interface SettingsState {
participating: boolean;
playSound: boolean;
showNotifications: boolean;
markOnClick: boolean;
openAtStartup: b... | 2,370 |
0 | petrpan-code/gitify-app/gitify | petrpan-code/gitify-app/gitify/src/typesGithub.ts | export type Reason =
| 'assign'
| 'author'
| 'comment'
| 'invitation'
| 'manual'
| 'mention'
| 'review_requested'
| 'security_alert'
| 'state_change'
| 'subscribed'
| 'team_mention'
| 'ci_activity';
export type SubjectType =
| 'CheckSuite'
| 'Commit'
| 'Discussion'
| 'Issue'
| 'PullRe... | 2,371 |
0 | petrpan-code/gitify-app/gitify/src | petrpan-code/gitify-app/gitify/src/__helpers__/setupEnvVars.js | process.env.OAUTH_CLIENT_ID = 'FAKE_CLIENT_ID_123';
process.env.OAUTH_CLIENT_SECRET = 'FAKE_CLIENT_SECRET_123';
| 2,372 |
0 | petrpan-code/gitify-app/gitify/src | petrpan-code/gitify-app/gitify/src/__mocks__/electron.js | window.Notification = function (title) {
this.title = title;
return {
onclick: jest.fn(),
};
};
window.Audio = class Audio {
constructor(path) {
this.path = path;
}
play() {}
};
window.localStorage = {
store: {},
getItem: function (key) {
return this.store[key];
},
setItem: function ... | 2,373 |
0 | petrpan-code/gitify-app/gitify/src | petrpan-code/gitify-app/gitify/src/__mocks__/mock-state.ts | import { Appearance, AuthState, SettingsState } from '../types';
import { mockedUser } from './mockedData';
export const mockAccounts: AuthState = {
token: 'token-123-456',
enterpriseAccounts: [
{
token: 'token-gitify-123-456',
hostname: 'github.gitify.io',
},
],
user: mockedUser,
};
expor... | 2,374 |
0 | petrpan-code/gitify-app/gitify/src | petrpan-code/gitify-app/gitify/src/__mocks__/mockedData.ts | import { AccountNotifications, EnterpriseAccount } from '../types';
import { Notification, Repository, User, GraphQLSearch } from '../typesGithub';
export const mockedEnterpriseAccounts: EnterpriseAccount[] = [
{
hostname: 'github.gitify.io',
token: '1234568790',
},
];
export const mockedUser: User = {
... | 2,375 |
0 | petrpan-code/gitify-app/gitify/src/__mocks__ | petrpan-code/gitify-app/gitify/src/__mocks__/@electron/remote.js | let instance;
class BrowserWindow {
constructor() {
if (!instance) {
instance = this;
}
return instance;
}
loadURL = jest.fn();
webContents = {
on: () => {},
session: {
clearStorageData: jest.fn(),
},
};
on() {}
close = jest.fn();
hide = jest.fn();
destroy = jest.f... | 2,376 |
0 | petrpan-code/gitify-app/gitify/src | petrpan-code/gitify-app/gitify/src/components/AccountNotifications.test.tsx | import React from 'react';
import TestRendener from 'react-test-renderer';
import { AccountNotifications } from './AccountNotifications';
import { mockedGithubNotifications } from '../__mocks__/mockedData';
jest.mock('./Repository', () => ({
RepositoryNotifications: () => <div>Repository</div>,
}));
describe('comp... | 2,377 |
0 | petrpan-code/gitify-app/gitify/src | petrpan-code/gitify-app/gitify/src/components/AccountNotifications.tsx | import React from 'react';
import { ChevronDownIcon, ChevronLeftIcon } from '@primer/octicons-react';
import { Notification } from '../typesGithub';
import { RepositoryNotifications } from './Repository';
interface IProps {
hostname: string;
notifications: Notification[];
showAccountHostname: boolean;
}
export... | 2,378 |
0 | petrpan-code/gitify-app/gitify/src | petrpan-code/gitify-app/gitify/src/components/AllRead.test.tsx | import * as React from 'react';
import * as TestRenderer from 'react-test-renderer';
import { mockMathRandom } from './test-utils';
import { AllRead } from './AllRead';
describe('components/all-read.tsx', function () {
// The read emoji randomly rotates, but then the snapshots would never match
// Have to make i... | 2,379 |
0 | petrpan-code/gitify-app/gitify/src | petrpan-code/gitify-app/gitify/src/components/AllRead.tsx | import * as React from 'react';
import { Constants } from '../utils/constants';
export const AllRead = () => {
const emoji = React.useMemo(
() =>
Constants.ALLREAD_EMOJIS[
Math.floor(Math.random() * Constants.ALLREAD_EMOJIS.length)
],
[],
);
return (
<div className="flex flex-1 ... | 2,380 |
0 | petrpan-code/gitify-app/gitify/src | petrpan-code/gitify-app/gitify/src/components/Loading.test.tsx | import React from 'react';
import { render } from '@testing-library/react';
import NProgress from 'nprogress';
import { AppContext } from '../context/App';
import { Loading } from './Loading';
jest.mock('nprogress', () => {
return {
configure: jest.fn(),
start: jest.fn(),
done: jest.fn(),
remove: je... | 2,381 |
0 | petrpan-code/gitify-app/gitify/src | petrpan-code/gitify-app/gitify/src/components/Loading.tsx | import { useContext, useEffect } from 'react';
import NProgress from 'nprogress';
import { AppContext } from '../context/App';
export const Loading = () => {
const { isFetching } = useContext(AppContext);
useEffect(() => {
NProgress.configure({
showSpinner: false,
});
return () => {
NPro... | 2,382 |
0 | petrpan-code/gitify-app/gitify/src | petrpan-code/gitify-app/gitify/src/components/Logo.test.tsx | import * as React from 'react';
import * as TestRenderer from 'react-test-renderer';
import { fireEvent, render } from '@testing-library/react';
import { Logo } from './Logo';
describe('components/ui/logo.tsx', () => {
it('renders correctly (light)', () => {
const tree = TestRenderer.create(<Logo />);
expe... | 2,383 |
0 | petrpan-code/gitify-app/gitify/src | petrpan-code/gitify-app/gitify/src/components/Logo.tsx | import * as React from 'react';
interface IProps {
isDark?: boolean;
onClick?: () => void;
className?: string;
}
const LIGHT_GRADIENT_START = '#CCCCCC';
const LIGHT_GRADIENT_END = '#FFFFFF';
const DARK_GRADIENT_START = '#22283B';
const DARK_GRADIENT_END = '#555B6E';
export const Logo = ({ isDark, onClick, cla... | 2,384 |
0 | petrpan-code/gitify-app/gitify/src | petrpan-code/gitify-app/gitify/src/components/NotificationRow.test.tsx | import * as React from 'react';
import * as TestRenderer from 'react-test-renderer';
import { fireEvent, render } from '@testing-library/react';
const { shell } = require('electron');
import { AppContext } from '../context/App';
import { mockedSingleNotification } from '../__mocks__/mockedData';
import { Notification... | 2,385 |
0 | petrpan-code/gitify-app/gitify/src | petrpan-code/gitify-app/gitify/src/components/NotificationRow.tsx | import React, { useCallback, useContext } from 'react';
import { formatDistanceToNow, parseISO } from 'date-fns';
import { CheckIcon, MuteIcon } from '@primer/octicons-react';
import {
formatReason,
getNotificationTypeIcon,
getNotificationTypeIconColor,
} from '../utils/github-api';
import { openInBrowser } from... | 2,386 |
0 | petrpan-code/gitify-app/gitify/src | petrpan-code/gitify-app/gitify/src/components/Oops.test.tsx | import * as React from 'react';
import * as TestRenderer from 'react-test-renderer';
import { mockMathRandom } from './test-utils';
import { Oops } from './Oops';
describe('components/oops.tsx', function () {
// The error emoji randomly rotates, but then the snapshots would never match
// Have to make it consist... | 2,387 |
0 | petrpan-code/gitify-app/gitify/src | petrpan-code/gitify-app/gitify/src/components/Oops.tsx | import * as React from 'react';
import { Constants } from '../utils/constants';
export const Oops = () => {
const emoji = React.useMemo(
() =>
Constants.ERROR_EMOJIS[
Math.floor(Math.random() * Constants.ERROR_EMOJIS.length)
],
[],
);
return (
<div className="flex flex-1 flex-co... | 2,388 |
0 | petrpan-code/gitify-app/gitify/src | petrpan-code/gitify-app/gitify/src/components/Repository.test.tsx | import React from 'react';
import TestRenderer from 'react-test-renderer';
import { render, fireEvent } from '@testing-library/react';
import { AppContext } from '../context/App';
import { mockedGithubNotifications } from '../__mocks__/mockedData';
import { RepositoryNotifications } from './Repository';
const { shell... | 2,389 |
0 | petrpan-code/gitify-app/gitify/src | petrpan-code/gitify-app/gitify/src/components/Repository.tsx | const { shell } = require('electron');
import React, { useCallback, useContext } from 'react';
import { CheckIcon } from '@primer/octicons-react';
import { CSSTransition, TransitionGroup } from 'react-transition-group';
import { AppContext } from '../context/App';
import { Notification } from '../typesGithub';
import... | 2,390 |
0 | petrpan-code/gitify-app/gitify/src | petrpan-code/gitify-app/gitify/src/components/Sidebar.test.tsx | import { fireEvent, render, screen } from '@testing-library/react';
import * as React from 'react';
import { MemoryRouter } from 'react-router-dom';
import * as TestRenderer from 'react-test-renderer';
const { shell, ipcRenderer } = require('electron');
import { mockSettings } from '../__mocks__/mock-state';
import {... | 2,391 |
0 | petrpan-code/gitify-app/gitify/src | petrpan-code/gitify-app/gitify/src/components/Sidebar.tsx | import { BellIcon } from '@primer/octicons-react';
import { ipcRenderer, shell } from 'electron';
import React, { useCallback, useContext, useMemo } from 'react';
import { useNavigate, useLocation } from 'react-router-dom';
import { Logo } from '../components/Logo';
import { AppContext } from '../context/App';
import ... | 2,392 |
0 | petrpan-code/gitify-app/gitify/src | petrpan-code/gitify-app/gitify/src/components/test-utils.ts | const originalMathRandom = Math.random;
export const mockMathRandom = (mockValue: number) => {
beforeEach(() => {
global.Math.random = jest.fn(() => mockValue);
});
afterEach(() => {
global.Math.random = originalMathRandom;
});
};
| 2,393 |
0 | petrpan-code/gitify-app/gitify/src/components | petrpan-code/gitify-app/gitify/src/components/__snapshots__/AccountNotifications.test.tsx.snap | // Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`components/AccountNotifications.tsx should render itself (github.com with notifications) 1`] = `
[
<div
className="flex flex-1 items-center justify-between py-2 px-4 bg-gray-300 dark:bg-gray-darkest dark:text-white text-sm"
>
github.com
<svg
ari... | 2,394 |
0 | petrpan-code/gitify-app/gitify/src/components | petrpan-code/gitify-app/gitify/src/components/__snapshots__/AllRead.test.tsx.snap | // Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`components/all-read.tsx should render itself & its children 1`] = `
<div
className="flex flex-1 flex-col justify-center items-center p-4 bg-white dark:bg-gray-dark text-black dark:text-white"
>
<h1
className="text-5xl mb-5"
>
😉
</h1>
<h2
classN... | 2,395 |
0 | petrpan-code/gitify-app/gitify/src/components | petrpan-code/gitify-app/gitify/src/components/__snapshots__/Logo.test.tsx.snap | // Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`components/ui/logo.tsx renders correctly (light) 1`] = `
<svg
className=""
onClick={[Function]}
role="logo"
viewBox="0 0 500 500"
xmlns="http://www.w3.org/2000/svg"
xmlnsXlink="http://www.w3.org/1999/xlink"
>
<defs>
<linearGradient
id="linearG... | 2,396 |
0 | petrpan-code/gitify-app/gitify/src/components | petrpan-code/gitify-app/gitify/src/components/__snapshots__/NotificationRow.test.tsx.snap | // Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`components/Notification.js should render itself & its children 1`] = `
<div
className="flex space-x-2 p-2 bg-white dark:bg-gray-dark dark:text-white hover:bg-gray-100 dark:hover:bg-gray-darker border-b border-gray-100 dark:border-gray-darker"
>
<div
className... | 2,397 |
0 | petrpan-code/gitify-app/gitify/src/components | petrpan-code/gitify-app/gitify/src/components/__snapshots__/Oops.test.tsx.snap | // Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`components/oops.tsx should render itself & its children 1`] = `
<div
className="flex flex-1 flex-col justify-center items-center p-4 bg-white dark:bg-gray-dark text-black dark:text-white"
>
<h1
className="text-5xl mb-5"
>
🤔
</h1>
<h2
className=... | 2,398 |
0 | petrpan-code/gitify-app/gitify/src/components | petrpan-code/gitify-app/gitify/src/components/__snapshots__/Repository.test.tsx.snap | // Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`components/Repository.tsx should render itself & its children 1`] = `
[
<div
className="flex p-2 bg-gray-100 dark:bg-gray-darker dark:text-white"
>
<div
className="flex flex-1 p-0.5 items-center mt-0 text-sm font-medium overflow-hidden overflow-elli... | 2,399 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.