text stringlengths 9 39.2M | dir stringlengths 25 226 | lang stringclasses 163
values | created_date timestamp[s] | updated_date timestamp[s] | repo_name stringclasses 751
values | repo_full_name stringclasses 752
values | star int64 1.01k 183k | len_tokens int64 1 18.5M |
|---|---|---|---|---|---|---|---|---|
```swift
import Foundation
import UIKit
@objc(ZLPConstants)
class ZLPConstants: NSObject {
// For why we include this, see
// path_to_url#exporting-constants
@objc
static func requiresMainQueueSetup() -> Bool {
// UIApplication, which we use in `constantsToExport`, is provided by
// UIKit. I think th... | /content/code_sandbox/ios/ZulipMobile/ZLPConstants.swift | swift | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 335 |
```unknown
[ignore]
; ### From React Native's template app:
; We fork some components by platform
.*/*[.]android.js
; Ignore polyfills
node_modules/react-native/Libraries/polyfills/.*
; Flow doesn't support platforms
.*/Libraries/Utilities/LoadingView.js
; ### Custom ignores
.*/ios/Pods/*
.*/node_modules/mitt/src/... | /content/code_sandbox/.flowconfig | unknown | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 1,030 |
```unknown
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:ZulipMobile.xcodeproj">
</FileRef>
<FileRef
location = "group:Pods/Pods.xcodeproj">
</FileRef>
</Workspace>
``` | /content/code_sandbox/ios/ZulipMobile.xcworkspace/contents.xcworkspacedata | unknown | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 77 |
```unknown
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "path_to_url">
<plist version="1.0">
<dict>
<key>NSPrivacyCollectedDataTypes</key>
<array/>
<key>NSPrivacyAccessedAPITypes</key>
<array>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessed... | /content/code_sandbox/ios/PrivacyInfo.xcprivacy | unknown | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 424 |
```javascript
module.exports = {
/**
* These two were added to the RN template file in
* `facebook/react-native@f4d5e8c23` (released in 0.60.5) because of
* conflicts with `eslint-config-react-native-community`. We haven't
* activated that config (we might, it's #4119), and we haven't
* otherwise found... | /content/code_sandbox/.prettierrc.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 202 |
```javascript
/* @flow strict-local */
// React Navigation requires this react-native-gesture-handler import,
// as the very first import of this entry-point file. See our #5373.
import 'react-native-gesture-handler';
import { AppRegistry } from 'react-native';
import ZulipMobile from './src/ZulipMobile';
AppRegistry... | /content/code_sandbox/index.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 86 |
```objective-c
#import "React/RCTBridgeModule.h"
// Register the ZLPConstants implementation with React Native, needed
// because ZLPConstants is in Swift:
// path_to_url#exporting-swift
@interface RCT_EXTERN_MODULE(ZLPConstants, NSObject)
@end
``` | /content/code_sandbox/ios/ZulipMobile/ZLPConstantsBridge.m | objective-c | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 56 |
```yaml
# Our main ESLint config.
# Tips for developing on this file:
#
# * To see what config currently applies, try a command like:
#
# $ npx eslint --print-config src/types.js | less
#
# or for a specific rule:
#
# $ npx eslint --print-config src/types.js | jq '.rules["no-continue"]'
#
# Especially... | /content/code_sandbox/.eslintrc.yaml | yaml | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 3,961 |
```unknown
# This should be the only .eslintignore file in our tree.
# See apply_eslintignore in tools/test.
# These are purely type definitions, no runtime code. Most of them
# are third-party code, too, so naturally don't match our style.
**/flow-typed/**
types/react-intl.js.flow
types/@react-native-community/netin... | /content/code_sandbox/.eslintignore | unknown | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 166 |
```unknown
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "path_to_url">
<plist version="1.0">
<dict>
<key>aps-environment</key>
<string>development</string>
<key>com.apple.developer.applesignin</key>
<array>
<string>Default</string>
</array>
</dict>
</plist>
``` | /content/code_sandbox/ios/ZulipMobile/ZulipMobile.entitlements | unknown | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 102 |
```unknown
# Windows users might need to set an absolute path for this.
# See path_to_url .
script-shell = bash
``` | /content/code_sandbox/.npmrc | unknown | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 25 |
```objective-c
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
int main(int argc, char *argv[])
{
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}
``` | /content/code_sandbox/ios/ZulipMobile/main.m | objective-c | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 44 |
```unknown
[android]
target = Google Inc.:Google APIs:23
[maven_repositories]
central = path_to_url
``` | /content/code_sandbox/.buckconfig | unknown | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 28 |
```unknown
# This should match the iOS Deployment Target
# (project > ZulipMobile > Info in Xcode)
platform :ios, '14.0'
require_relative '../node_modules/expo/scripts/autolinking.rb'
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli... | /content/code_sandbox/ios/Podfile | unknown | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 916 |
```nix
# All our non-NPM dependencies and dev-dependencies, expressed with Nix.
#
# TODO: Expand this to cover the full Android dev environment,
# and everything in tools/.
#
# If you're using NixOS, this file may be helpful:
# * Type `nix-shell` in this directory.
# * You'll get a shell with the environment all se... | /content/code_sandbox/shell.nix | nix | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 459 |
```objective-c
#import <React/RCTBridgeDelegate.h>
#import <UIKit/UIKit.h>
#import <UserNotifications/UNUserNotificationCenter.h>
#import <Expo/Expo.h>
@interface AppDelegate : EXAppDelegateWrapper <UIApplicationDelegate, RCTBridgeDelegate, UNUserNotificationCenterDelegate>
@property (nonatomic, strong) UIWindow *win... | /content/code_sandbox/ios/ZulipMobile/AppDelegate.h | objective-c | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 66 |
```objective-c
// To use an Objective-C module in a Swift file, first just try importing it
// at the top of your Swift file, like so:
//
// import React.RCTBridgeModule
//
// If you can't find an import line that Xcode understands, instead try
// adding an import line in this file, like so:
//
// #import <React/RC... | /content/code_sandbox/ios/ZulipMobile-Bridging-Header.h | objective-c | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 214 |
```javascript
// @format
const path = require('path');
// Packages we might apply `yarn link` to.
// TODO compute what packages actually *are* under `yarn link` instead.
const linkablePackages = [
'@zulip/shared',
'zulip-markdown-parser',
// Add more as needed! See also .flowconfig and docs/howto/yarn-link.md ... | /content/code_sandbox/metro.config.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 858 |
```javascript
module.exports = (wallaby) => ({
files: ['src/**/*.js', '!src/**/__tests__/*.js'],
tests: ['src/**/__tests__/*.js'],
env: {
type: 'node',
runner: 'node',
},
testFramework: 'jest',
compilers: {
'src/**/*.js': wallaby.compilers.babel(),
},
setup: () =>
wallaby.testFramework.c... | /content/code_sandbox/wallaby.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 147 |
```objective-c
//
// UtilManager.h
// ZulipMobile
//
#import <React/RCTBridgeModule.h>
@interface UtilManager : NSObject <RCTBridgeModule>
@end
``` | /content/code_sandbox/ios/ZulipMobile/UtilManager.h | objective-c | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 37 |
```objective-c
#import "React/RCTBridgeModule.h"
#import "React/RCTEventEmitter.h"
// Register our Swift modules with React Native:
// path_to_url#exporting-swift
@interface RCT_EXTERN_MODULE(ZLPNotificationsEvents, RCTEventEmitter)
@end
@interface RCT_EXTERN_MODULE(ZLPNotificationsStatus, NSObject)
RCT_EXTER... | /content/code_sandbox/ios/ZulipMobile/ZLPNotificationsBridge.m | objective-c | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 103 |
```javascript
// This file is seen only by Babel 7, not Babel 6.
// There are other semantic differences: see
// path_to_url
module.exports = {
presets: [
'module:metro-react-native-babel-preset',
],
plugins: [
// We can remove this once it's included in
// metro-react-native-babel-preset; see
... | /content/code_sandbox/babel.config.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 196 |
```unknown
# This file teaches `git log` and friends the canonical names
# and email addresses to use for our contributors.
#
# For details on the format, see:
# path_to_url
#
# Handy commands for examining or adding to this file:
#
# # shows all names/emails after mapping, sorted:
# $ git shortlog -es | sort -... | /content/code_sandbox/.mailmap | unknown | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 863 |
```javascript
// Modules in `node_modules` which are published in uncompiled form, and
// therefore need to be compiled by Babel before Jest can use them.
//
// These will be used as regexp fragments.
const transformModulesWhitelist = [
'expo-apple-authentication',
'expo-application',
'expo-modules-core',
'expo... | /content/code_sandbox/jest.config.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 856 |
```xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "path_to_url">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
``` | /content/code_sandbox/ios/ZulipMobile.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist | xml | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 72 |
```xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "path_to_url">
<plist version="1.0">
<dict>
<key>method</key>
<string>app-store</string>
<key>destination</key>
<string>upload</string>
<key>signingStyle</key>
<string>manual</string>
<key>prov... | /content/code_sandbox/ios/upload.plist | xml | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 167 |
```javascript
/**
* See path_to_url
*
* To print the full config from the React Native CLI, run
* `react-native config`.
*/
module.exports = {
/**
* See path_to_url
*
* Currently, we only use this to blacklist some native-code
* libraries, per-platform, that we don't want to be linked with
* "auto... | /content/code_sandbox/react-native.config.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 156 |
```objective-c
//
// UtilManager.m
// ZulipMobile
//
#import "UtilManager.h"
@implementation UtilManager
RCT_EXPORT_MODULE();
RCT_EXPORT_METHOD(randomBase64:(NSUInteger)length
resolver:(RCTPromiseResolveBlock)resolve
rejecter:(RCTPromiseRejectBlock)reject)
{
NSMutableData *data... | /content/code_sandbox/ios/ZulipMobile/UtilManager.m | objective-c | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 164 |
```xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "path_to_url">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>Zulip</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</st... | /content/code_sandbox/ios/ZulipMobile/Info.plist | xml | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 991 |
```xml
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17156" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initi... | /content/code_sandbox/ios/ZulipMobile/Base.lproj/LaunchScreen.storyboard | xml | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 520 |
```json
PODS:
- boost (1.76.0)
- DoubleConversion (1.1.6)
- EXAppleAuthentication (4.2.1):
- ExpoModulesCore
- EXApplication (4.1.0):
- ExpoModulesCore
- EXConstants (13.1.1):
- ExpoModulesCore
- EXErrorRecovery (3.1.0):
- ExpoModulesCore
- EXFileSystem (14.0.0):
- ExpoModulesCore
- ... | /content/code_sandbox/ios/Podfile.lock | json | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 9,005 |
```unknown
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1250"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning ... | /content/code_sandbox/ios/ZulipMobile.xcodeproj/xcshareddata/xcschemes/ZulipMobile release-mode.xcscheme | unknown | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 808 |
```unknown
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1250"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning ... | /content/code_sandbox/ios/ZulipMobile.xcodeproj/xcshareddata/xcschemes/ZulipMobile.xcscheme | unknown | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 816 |
```unknown
#!/usr/bin/env bash
set -euo pipefail
this_dir=${BASH_SOURCE[0]%/*}
. "${this_dir}"/lib/ensure-coreutils.sh
root_dir=$(readlink -f "${this_dir}"/..)
exec "${root_dir}"/android/gradlew -p "${root_dir}"/android "$@"
``` | /content/code_sandbox/tools/gradle | unknown | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 71 |
```unknown
#!/usr/bin/env node
// TODO: Type-check this file
// Sadly our auto-format doesn't seem to run eslint on this file; give in to
// Prettier here.
// TODO: debug
/* eslint-disable operator-linebreak */
const fs = require('fs');
const path = require('path');
const { namedTypes: n, visit } = require('ast-type... | /content/code_sandbox/tools/check-messages-en | unknown | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 1,600 |
```unknown
#!/usr/bin/env bash
set -e
## CLI PARSING
usage() {
cat >&2 <<EOF
usage: tools/ios {build | upload}
Build the app for release on iOS, or upload the result to the
App Store.
EOF
exit 2
}
action=
case "${1}" in
build|upload) action="${1}"; shift;;
*) usage;;
esac
if (( ${#} )); then
usa... | /content/code_sandbox/tools/ios | unknown | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 439 |
```unknown
#!/usr/bin/env bash
set -eu
run_visibly () {
set -x
"$@"
{ set +x; } 2>&-
}
THIS_DIR=${BASH_SOURCE[0]%/*}
. "${THIS_DIR}"/lib/ensure-coreutils.sh
ROOT_DIR=$(readlink -f "${THIS_DIR}"/..)
cd "${ROOT_DIR}"
# These steps are based on observing `react-native run-android`
# with a command `strace -... | /content/code_sandbox/tools/run-android | unknown | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 323 |
```unknown
#!/usr/bin/env bash
set -e
root_dir=$(git rev-parse --show-toplevel)
this_dir=${BASH_SOURCE[0]%/*}
. "${this_dir}"/lib/eslintignore.sh
## CLI PARSING
usage() {
cat >&2 <<EOF
usage: tools/fmt [--all]
Options:
--all Run on all files (default: only files changed in this
branch, a... | /content/code_sandbox/tools/fmt | unknown | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 285 |
```unknown
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 54;
objects = {
/* Begin PBXBuildFile section */
13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; };
13B07FBF1A68108700A75B9A /* Assets.xcassets... | /content/code_sandbox/ios/ZulipMobile.xcodeproj/project.pbxproj | unknown | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 9,195 |
```unknown
#!/usr/bin/env bash
shopt -s globstar
this_file=$(readlink -f "$0")
rootdir=${this_file%/*/*}
bindir=$rootdir/node_modules/.bin
import_pairs()
{
"$bindir"/flow get-imports --json "$rootdir"/src/**/*.js \
| jq '.[] | .requirements[] | [.import, .path]
| map(ltrimstr("'"$rootdir"'... | /content/code_sandbox/tools/tsort-modules | unknown | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 347 |
```unknown
#!/usr/bin/env bash
# Careful! `set -e` doesn't do everything you'd think it does. In
# fact, we don't get its benefit in any of the `run_foo` functions.
#
# This is because it has an effect only when it can exit the whole shell.
# (Its full name is `set -o errexit`, and it means "exit" literally.) See:
# ... | /content/code_sandbox/tools/test | unknown | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 2,370 |
```unknown
#!/usr/bin/env node
/* eslint-env node */
const { rollup } = require('rollup');
const rollupBabel = require('@rollup/plugin-babel').default;
const rollupNodeResolve = require('@rollup/plugin-node-resolve').default;
const assert = require('assert');
const fs = require('fs');
const util = require('util');
c... | /content/code_sandbox/tools/generate-webview-js | unknown | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 1,892 |
```unknown
#!/usr/bin/env bash
set -eu
ROOT_DIR=$(git rev-parse --show-toplevel)
patch_package() {
node_modules/.bin/patch-package
}
pod_install() {
[[ "$OSTYPE" == "darwin"* ]] \
|| return 0
if ! hash pod 2>/dev/null; then
cat >&2 <<EOF
The Zulip mobile app requires CocoaPods for its iO... | /content/code_sandbox/tools/postinstall | unknown | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 169 |
```unknown
#!/usr/bin/env bash
set -e
usage () {
cat <<EOF >&2
usage: bump-version VERSION_NAME
Updates the version number in our Android and iOS build configs,
and in the changelog.
Example:
bump-version 27.155
EOF
exit 2
}
version_name="$1";
shift || usage;
shift && usage;
version_code="${version_name#... | /content/code_sandbox/tools/bump-version | unknown | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 469 |
```unknown
#!/usr/bin/env bash
set -eu
unset CDPATH
# tools/build-webview: WebView assets collection script.
# CAVEAT EMENDATOR: Neither of the build systems have any visibility into this
# script's dependencies -- it is run unconditionally, and must ensure on its own
# that it performs as few actions as possible whe... | /content/code_sandbox/tools/build-webview | unknown | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 1,531 |
```unknown
#!/usr/bin/env bash
set -eu
# Generate the many different versions of our logo we need across the app.
#
# This script is not run as part of the build, in order to avoid introducing
# its somewhat specialized dependencies as requirements for normal
# development. Instead, we keep its outputs checked into t... | /content/code_sandbox/tools/generate-logos | unknown | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 1,804 |
```unknown
#!/usr/bin/env bash
oldjs=$(<./src/webview/js/generatedEs3.js)
tools/generate-webview-js
newjs=$(<./src/webview/js/generatedEs3.js)
if [ "$oldjs" != "$newjs" ]; then
echo "generatedEs3.js is not updated with current js file."
exit 1
fi
``` | /content/code_sandbox/tools/verify-webview-js | unknown | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 78 |
```unknown
#!/usr/bin/env bash
# Compute what remote name is being used for the upstream repo.
upstream_remote_name() {
# Out of the names listed by `git remote`, pick one from the
# list below, in preference order.
grep -m1 -xFf <(git remote) <<EOF
upstream
origin
EOF
}
upstream_ref() {
echo refs/rem... | /content/code_sandbox/tools/git | unknown | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 276 |
```yaml
# Formatting rules which overrule Prettier. These are in their own file so
# we can follow each Prettier run with a streamlined (and faster) ESLint run
# that uses only these rules.
parser: "hermes-eslint"
plugins:
- ft-flow
- import
- jest
- react
- react-hooks
rules:
# Disallow tucking a condi... | /content/code_sandbox/tools/formatting.eslintrc.yaml | yaml | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 322 |
```unknown
#!/usr/bin/env bash
this_file=$(readlink -f "${BASH_SOURCE[0]}")
root=${this_file%/*/*}
changelog_file=${root}/docs/changelog.md
. "${root}"/tools/lib/ensure-coreutils.sh
# Extract the most recent changelog entry.
extract() {
perl -0n \
-e 'print $& if (
/^ \#\#\ (?!Unreleased) # an... | /content/code_sandbox/tools/changelog | unknown | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 628 |
```unknown
#!/usr/bin/env bash
set -e
set -o pipefail
shopt -s extglob
this_file=$(readlink -f "${BASH_SOURCE[0]}")
root=${this_file%/*/*}
. "${root}"/tools/lib/ensure-coreutils.sh
rn_gh_base_url=path_to_url
# Fetch the package.json of the given RN version.
get_rn_pjson() {
local version=$1
curl -sf "${rn_... | /content/code_sandbox/tools/upgrade | unknown | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 754 |
```unknown
#!/usr/bin/env bash
set -euo pipefail
shopt -s globstar
usage() {
cat >&2 <<EOF
usage: tools/tsflower SUBCOMMAND [ARGS...]
This tool runs TsFlower to generate Flow type definitions for
some of our dependencies using TS type definitions from upstream.
It also manages a stack of our own patches to the ge... | /content/code_sandbox/tools/tsflower | unknown | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 4,016 |
```unknown
#!/usr/bin/env bash
set -eu
usage () {
cat >&2 <<EOF
usage: $0
Sync translations from and to Transifex, and commit.
For background and setup instructions, see docs:
docs/howto/translations.md
This script is only useful for maintainers of the app (people
who merge PRs), with Transifex credentials se... | /content/code_sandbox/tools/tx-sync | unknown | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 1,063 |
```unknown
#!/usr/bin/env bash
set -euo pipefail
shopt -s globstar
# Tool to explore import cycles, as seen by Flow.
#
# Basic usage:
#
# # See what cycles exist:
# $ tools/import-cycles
#
# # Then pick one and investigate:
# $ tools/import-cycles inspect src/foo/bar.js
#
# Look for edges that seem lik... | /content/code_sandbox/tools/import-cycles | unknown | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 690 |
```unknown
#!/usr/bin/env bash
this_file=$(readlink -f "${BASH_SOURCE[0]}")
root=${this_file%/*/*}
# List all direct dependencies, as package names.
direct_dep_names() {
<package.json \
jq '.dependencies + .devDependencies | keys[]' -r \
| LC_ALL=C sort
}
usage() {
cat >&2 <<EOF
usage: ${BASH_SOURC... | /content/code_sandbox/tools/deps | unknown | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 116 |
```unknown
#!/usr/bin/env bash
set -e
## CLI PARSING
usage() {
cat >&2 <<EOF
usage: tools/android {apk | aab}
Build the app for release on Android, either as an APK or an
Android App Bundle.
EOF
exit 2
}
action=
case "${1}" in
apk|aab) action="${1}"; shift;;
*) usage;;
esac
if (( ${#} )); then
... | /content/code_sandbox/tools/android | unknown | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 376 |
```unknown
#!/usr/bin/env bash
set -e
## CLI PARSING
usage() {
cat >&2 <<EOF
usage: tools/checkout-keystore
Temporarily decrypt the keystore file for signing an Android release.
By using this, a release manager can ensure that the secrets are only
accessible for short periods when they're explicitly thinking ab... | /content/code_sandbox/tools/checkout-keystore | unknown | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 507 |
```yaml
parser: hermes-eslint
plugins:
- ft-flow
rules:
ft-flow/no-weak-types: error
ft-flow/require-parameter-type:
- error
- excludeArrowFunctions: true
ft-flow/require-return-type:
- error
- always
- excludeArrowFunctions: true
excludeMatching:
- "^render$"
# Things that mi... | /content/code_sandbox/tools/flow-todo.eslintrc.yaml | yaml | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 128 |
```unknown
#!/usr/bin/env node
/**
* Rebuild our custom icon font, zulip-icons.ttf.
*
* To use these icons, just use our component `ZulipIcon`.
*
* To add a new icon:
*
* * Update the shared package to a version that has the icon.
* (The icons are `shared/icons/*.svg`.) See:
* path_to_url
*
* * Re... | /content/code_sandbox/tools/build-icon-font | unknown | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 746 |
```shell
# shellcheck shell=bash
# Filter out filenames excluded by our .eslintignore.
#
# Filenames are expected as arguments, and printed, leaving out those that
# should be ignored.
#
# (This is a workaround: the ideal solution would be for ESLint to accept an
# option saying to apply its ignore rules and to not wo... | /content/code_sandbox/tools/lib/eslintignore.sh | shell | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 395 |
```shell
# shellcheck shell=bash
#
# Usage:
# . ensure-coreutils.sh
#
# Ensures GNU coreutils are available in PATH.
# May add to PATH, or exit with a message to stderr.
#
# The GNU coreutils are a basic piece of infrastructure for having
# a reasonable 21st-century shell scripting environment, so we
# freely invoke ... | /content/code_sandbox/tools/lib/ensure-coreutils.sh | shell | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 724 |
```javascript
/**
* Setup:
* yarn global add jscodeshift
*
* Sample usage:
* jscodeshift -t tools/codemod/intersection-to-spread.js src/actionTypes.js
*
* NOTE doesn't quite work right -- turns `type Foo` to `type type Foo`.
* This seems to be a bug triggered by handing jscodeshift's `replaceWith`
* a resu... | /content/code_sandbox/tools/codemod/intersection-to-spread.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 552 |
```javascript
// For facebook/jest#10221. After savePromise.js and Jest's setup
// files have run, restore the natural value of `global.Promise`.
global.Promise = global.originalPromise;
``` | /content/code_sandbox/jest/restorePromise.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 40 |
```javascript
// For facebook/jest#10221. Before Jest's setup files have run, take
// note of what the natural value of `global.Promise` is, so we can
// restore it in restorePromise.js.
global.originalPromise = Promise;
``` | /content/code_sandbox/jest/savePromise.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 52 |
```javascript
/**
* The preset we're making tweaks to.
*/
const basePreset = require('../node_modules/jest-expo/ios/jest-preset.js');
// See comment in our Jest config about how this is used.
module.exports = {
...basePreset,
setupFiles: [
require.resolve('./savePromise.js'),
...basePreset.setupFiles,
... | /content/code_sandbox/jest/presetIos.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 88 |
```javascript
global.fetch = jest.fn();
fetch.mockResponseSuccess = body => {
fetch.mockImplementation(() =>
Promise.resolve({ json: () => Promise.resolve(JSON.parse(body)), status: 200, ok: true }),
);
};
fetch.mockResponseFailure = error => {
fetch.mockImplementation(() => Promise.reject(error));
};
fetc... | /content/code_sandbox/jest/globalFetch.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 94 |
```javascript
/**
* The preset we're making tweaks to.
*/
const basePreset = require('../node_modules/jest-expo/android/jest-preset.js');
// See comment in our Jest config about how this is used.
module.exports = {
...basePreset,
setupFiles: [
require.resolve('./savePromise.js'),
...basePreset.setupFiles... | /content/code_sandbox/jest/presetAndroid.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 87 |
```javascript
// @flow strict-local
/* eslint-disable no-underscore-dangle */
let _allowUnhandled = false;
/**
* (If using this, be sure to check for unhandled.)
*
* For example:
beforeAll(() => immediate.allowUnhandled());
afterAll(() => immediate.disallowUnhandled());
afterEach(() => expect(imme... | /content/code_sandbox/jest/mock-immediate.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 298 |
```javascript
// @flow strict-local
//
// TODO: this should probably go to expo-sqlite upstream.
//
// Not really so much a "mock" as a fourth platform-specific implementation:
// this one for Node (and therefore for Jest), complementing upstream's for
// Android, iOS, and web.
//
// OK, well, it's a mock in one respec... | /content/code_sandbox/jest/mock-expo-sqlite.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 985 |
```javascript
/* @flow strict-local */
// This is supposed to be an async function:
// path_to_url#globalsetup-string.
// But something goes wrong with React Native v0.64, and the global
// `regeneratorRuntime` from @babel/plugin-transform-runtime, the thing that
// transpiles away async function syntax, isn't avail... | /content/code_sandbox/jest/globalSetup.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 267 |
```javascript
/*
* This file is @generated -- do not edit.
* To make changes, see tools/build-icon-font.
*
* @flow strict
*/
export default {
"bot": 61697,
"ellipsis-v-solid": 61698,
"gif": 61699,
"globe": 61700,
"language": 61701,
"mute": 61702,
"readreceipts": 61703,
"follow": 61704
};
``` | /content/code_sandbox/static/assets/fonts/zulip-icons.map.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 104 |
```javascript
/* @flow strict-local */
import type { Subscription } from './types';
export const NULL_OBJECT: {||} = Object.freeze({});
export const NULL_ARRAY: $ReadOnlyArray<empty> = Object.freeze([]);
/*
* All the below objects are DEPRECATED; rather than using one, choose the
* appropriate fallback behavior ex... | /content/code_sandbox/src/nullObjects.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 414 |
```javascript
/* @flow strict-local */
/* eslint-disable global-require */
import * as ReactNative from 'react-native';
import { polyfillGlobal } from 'react-native/Libraries/Utilities/PolyfillFunctions';
import { URL, URLSearchParams } from 'react-native-url-polyfill';
// $FlowIgnore[untyped-import] - this is not anyw... | /content/code_sandbox/jest/jestSetup.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 1,475 |
```javascript
/**
* Backports of handy functions from newer (or proposed) versions of JavaScript.
*
* Almost like polyfills -- except rather than actually muck with names and
* objects that belong to the standard library, we give our versions their
* own distinct names.
*
* @flow strict-local
*/
/**
* Backpor... | /content/code_sandbox/src/jsBackport.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 371 |
```javascript
/* @flow strict-local */
import React from 'react';
import type { Node } from 'react';
import { View, Text, TextInput, ScrollView, Button, Platform } from 'react-native';
import Clipboard from '@react-native-clipboard/clipboard';
import Toast from 'react-native-simple-toast';
import * as logging from './... | /content/code_sandbox/src/RootErrorBoundary.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 1,134 |
```javascript
/* @flow strict-local */
import type {
PerAccountState,
GlobalState,
AccountsState,
SubscriptionsState,
StreamsState,
OutboxState,
UsersState,
UserGroupsState,
DraftsState,
FetchingState,
FlagsState,
MessagesState,
MutedUsersState,
NarrowsState,
TopicsState,
CrossRealmBot,
... | /content/code_sandbox/src/directSelectors.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 817 |
```javascript
/* @flow strict-local */
/**
* Tools for manipulating generic types in the Flow type system.
*/
/**
* The type `S`, plus a check that `S` is a supertype of `T`.
*
* Gives an error unless `S` is a supertype of `T` -- i.e., a `T` can always
* be used where an `S` is required.
*
* See also `typesEqu... | /content/code_sandbox/src/generics.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 2,418 |
```javascript
/* @flow strict-local */
import React, { type ComponentType, type ElementConfig, useRef } from 'react';
import { connectGlobal } from './react-redux';
import { getHaveServerDataGlobal } from './haveServerDataSelectors';
import FullScreenLoading from './common/FullScreenLoading';
/**
* A HOC for any ser... | /content/code_sandbox/src/withHaveServerDataGate.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 824 |
```javascript
/* @flow strict-local */
import React from 'react';
import { AppState, Platform } from 'react-native';
import type { AppStateValues as AppStateValuesBusted } from 'react-native/Libraries/AppState/AppState';
// eslint-disable-next-line id-match
import type { ____ViewStyle_Internal } from 'react-native/Lib... | /content/code_sandbox/src/reactNativeUtils.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 1,228 |
```javascript
/* @flow strict-local */
import config from './config';
/**
* Whether a URL is hosted by the same org that publishes the app.
*/
export default function isAppOwnDomain(url: URL): boolean {
return config.appOwnDomains.some(
domain => url.host === domain || url.host.endsWith(`.${domain}`),
);
}
... | /content/code_sandbox/src/isAppOwnDomain.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 70 |
```javascript
// @flow strict-local
import type { GlobalState, PerAccountState } from './types';
import { getUsers } from './directSelectors';
import { tryGetAuth, tryGetActiveAccountState, getAccount } from './account/accountsSelectors';
import { getUsersById } from './users/userSelectors';
import { kMinAllowedServer... | /content/code_sandbox/src/haveServerDataSelectors.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 2,082 |
```javascript
/* @flow strict-local */
import invariant from 'invariant';
import * as React from 'react';
/**
* Like React.ElementConfig, but includes the pseudoprops `ref` and `key`.
*
* That is, this contains exactly the set of JSX attributes one can pass
* when creating an element of this component-type.
*
* ... | /content/code_sandbox/src/reactUtils.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 1,520 |
```javascript
/* @flow strict-local */
export const REHYDRATE: 'persist/REHYDRATE' = 'persist/REHYDRATE';
export const APP_ONLINE: 'APP_ONLINE' = 'APP_ONLINE';
export const APP_ORIENTATION: 'APP_ORIENTATION' = 'APP_ORIENTATION';
export const DEAD_QUEUE: 'DEAD_QUEUE' = 'DEAD_QUEUE';
export const ACCOUNT_REMOVE: 'ACCOU... | /content/code_sandbox/src/actionConstants.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 1,233 |
```javascript
/* @flow strict-local */
import type { Node } from 'react';
import type { IntlShape } from 'react-intl';
import type { DangerouslyImpreciseStyleProp } from 'react-native/Libraries/StyleSheet/StyleSheet';
import type { BoundedDiff, SubsetProperties } from './generics';
import type {
Auth,
Topic,
Mes... | /content/code_sandbox/src/types.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 3,895 |
```javascript
/**
* Ponyfills for better-typed versions of functions than the Flow stdlib.
*
* FlowIssue: Everything here should really become a fix upstream in
* flowlib.
*
* @flow strict
*/
/**
* Ponyfill for properly-typed `Object.entries`.
*
* See also `objectValues`, for `Object.values`.
*/
export func... | /content/code_sandbox/src/flowPonyfill.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 214 |
```javascript
/* @flow strict-local */
export * from './account/accountsSelectors';
export * from './pm-conversations/pmConversationsSelectors';
export * from './caughtup/caughtUpSelectors';
export * from './chat/narrowsSelectors';
export * from './chat/fetchingSelectors';
export * from './directSelectors';
export * fr... | /content/code_sandbox/src/selectors.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 125 |
```javascript
/* @flow strict-local */
/**
* A special value we internally take to mean "first unread message".
*
* In particular this is interpreted by the `fetchMessages*` functions in
* `fetchActions.js` as meaning the underlying API request should set
* `use_first_unread_anchor: true`. (Which causes the actu... | /content/code_sandbox/src/anchor.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 252 |
```javascript
/** General helpers to augment Immutable.js. */
// @flow strict-local
import Immutable from 'immutable';
// Like `Immutable.Map#update`, but prune returned values equal to `zero`.
export function updateAndPrune<K, V>(
map: Immutable.Map<K, V>,
zero: V,
key: K,
updater: (V | void) => V,
): Immuta... | /content/code_sandbox/src/immutableUtils.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 716 |
```javascript
/* @flow strict-local */
import type { PerAccountState, UserId } from './types';
import { ensureUnreachable } from './types';
import { Role, CreateWebPublicStreamPolicy } from './api/permissionsTypes';
import { getRealm, getOwnUser, getUserForId } from './selectors';
const { Member, Moderator, Admin, Own... | /content/code_sandbox/src/permissionSelectors.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 1,279 |
```javascript
/* @flow strict-local */
import React from 'react';
import type { Node } from 'react';
import { Platform, UIManager } from 'react-native';
import 'react-native-url-polyfill/auto';
// $FlowFixMe[untyped-import]
import { ActionSheetProvider } from '@expo/react-native-action-sheet';
import RootErrorBoundary... | /content/code_sandbox/src/ZulipMobile.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 996 |
```javascript
/* @flow strict-local */
/**
* The Sentry "client key" aka "DSN".
*
* When non-null, this is the destination we send Sentry events to.
* When null, the app does not send anything to Sentry.
*
* For more on the meaning of this value, see Sentry upstream docs:
* path_to_url#dsn
* path_to_url
*... | /content/code_sandbox/src/sentryConfig.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 271 |
```javascript
/* @flow strict-local */
import { ensureUnreachable } from './generics';
import {
REHYDRATE,
APP_ONLINE,
DEAD_QUEUE,
APP_ORIENTATION,
ACCOUNT_SWITCH,
ACCOUNT_REMOVE,
LOGIN_SUCCESS,
LOGOUT,
RESET_ACCOUNT_DATA,
DISMISS_SERVER_PUSH_SETUP_NOTICE,
GOT_PUSH_TOKEN,
UNACK_PUSH_TOKEN,
ACK... | /content/code_sandbox/src/actionTypes.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 5,619 |
```javascript
/**
* Handy generic functions for operating on JS collections.
*
* Any function here is the sort of thing that perhaps should be in the
* language's standard library, or is just a bit too algorithmical for that.
*
* See also
* * `jsBackport.js`, for things that actually are in newer versions of JS... | /content/code_sandbox/src/collections.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 690 |
```javascript
/**
* Type-wrappers for the react-redux package.
*
* These functions each correspond directly to a function exported by
* react-redux upstream, but with more-specific types.
*
* @flow strict-local
*/
import type { ComponentType, ElementConfig } from 'react';
// We use the ESLint rule `no-restricted... | /content/code_sandbox/src/react-redux.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 1,551 |
```javascript
/* @flow strict-local */
export * from './account/accountActions';
export * from './events/eventActions';
export * from './nav/navActions';
export * from './drafts/draftsActions';
export * from './message/fetchActions';
export * from './message/messagesActions';
export * from './outbox/outboxActions';
exp... | /content/code_sandbox/src/actions.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 119 |
```javascript
/**
* Types describing our Redux state and store.
*
* This isn't the place for types that are borrowed from the API;
* those go under `src/api/` (typically in `src/api/modelTypes.js`)
* and can be imported here as needed.
*
* @flow strict-local
*/
import type Immutable from 'immutable';
import typ... | /content/code_sandbox/src/reduxTypes.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 5,558 |
```javascript
/* @flow strict-local */
import type { ComponentType, ElementConfig } from 'react';
// $FlowFixMe[untyped-import]
import { connectActionSheet as connectActionSheetInner } from '@expo/react-native-action-sheet';
import type { BoundedDiff } from './generics';
export type ShowActionSheetWithOptions = (
{... | /content/code_sandbox/src/react-native-action-sheet.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 185 |
```javascript
/* @flow strict-local */
import * as Sentry from '@sentry/react-native';
import { nativeApplicationVersion } from 'expo-application';
// $FlowFixMe[untyped-import]
import md5 from 'blueimp-md5';
import { Platform } from 'react-native';
import type { Identity } from './types';
import isAppOwnDomain from '... | /content/code_sandbox/src/sentry.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 1,882 |
```javascript
/* @flow strict-local */
import type { Store } from 'redux';
import type { GlobalSelector, GlobalState, Action } from './reduxTypes';
/**
* Call a function whenever a selected piece of state changes.
*
* When the return value of `select` isn't equal (===) to the previous
* value, `onChange` gets cal... | /content/code_sandbox/src/redux.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 225 |
```javascript
/**
* Helpers for using react-navigation and its relatives.
*
* @flow strict-local
*/
import { type ElementConfig } from 'react';
import { useNavigation as useNavigationInner, type Route } from '@react-navigation/native';
import type { AppNavigationMethods } from './nav/AppNavigator';
/**
* A type... | /content/code_sandbox/src/react-navigation.js | javascript | 2016-05-08T05:41:48 | 2024-08-15T07:25:47 | zulip-mobile | zulip/zulip-mobile | 1,274 | 928 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.