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 |
|---|---|---|---|---|---|---|---|---|
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/src/devTools.js | src/devTools.js | import { stringify, parse } from 'jsan';
import socketCluster from 'socketcluster-client';
import getHostForRN from 'rn-host-detect';
import { defaultSocketOptions } from './constants';
let socket;
let channel;
const listeners = {};
export function extractState(message) {
if (!message || !message.state) return unde... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/redux/index.js | examples/redux/index.js | import 'babel-polyfill';
import React from 'react';
import { render } from 'react-dom';
import { Provider } from 'react-redux';
import App from './containers/App';
import configureStore from './store/configureStore';
import 'todomvc-app-css/index.css';
const store = configureStore();
render(
<Provider store={store}... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/redux/webpack.config.js | examples/redux/webpack.config.js | var path = require('path');
var webpack = require('webpack');
module.exports = {
devtool: 'cheap-module-eval-source-map',
entry: [
'webpack-hot-middleware/client',
'./index'
],
output: {
path: path.join(__dirname, 'dist'),
filename: 'bundle.js',
publicPath: '/static/'
},
plugins: [
... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/redux/server.js | examples/redux/server.js | var webpack = require('webpack');
var webpackDevMiddleware = require('webpack-dev-middleware');
var webpackHotMiddleware = require('webpack-hot-middleware');
var config = require('./webpack.config');
var app = new require('express')();
var port = 4002;
var compiler = webpack(config);
app.use(webpackDevMiddleware(comp... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/redux/store/logRemotely.js | examples/redux/store/logRemotely.js | import { connectViaExtension } from 'remotedev';
function logReducer(reducer) {
const remotedev = connectViaExtension();
return (state, action) => {
const reducedState = reducer(state, action);
remotedev.send(action, reducedState);
return reducedState;
};
}
export default function logRemotely(next) ... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/redux/store/configureStore.js | examples/redux/store/configureStore.js | import { createStore } from 'redux';
import rootReducer from '../reducers';
import logRemotely from './logRemotely';
export default function configureStore(initialState) {
const store = logRemotely(createStore)(rootReducer, initialState);
if (module.hot) {
// Enable Webpack hot module replacement for reducers... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/redux/reducers/index.js | examples/redux/reducers/index.js | import { combineReducers } from 'redux';
import todos from './todos';
const rootReducer = combineReducers({
todos
});
export default rootReducer;
| javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/redux/reducers/todos.js | examples/redux/reducers/todos.js | import { ADD_TODO, DELETE_TODO, EDIT_TODO, COMPLETE_TODO, COMPLETE_ALL, CLEAR_COMPLETED } from '../constants/ActionTypes';
const initialState = [{
text: 'Use Redux',
completed: false,
id: 0
}];
export default function todos(state = initialState, action) {
switch (action.type) {
case ADD_TODO:
return [{
... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/redux/test/setup.js | examples/redux/test/setup.js | import { jsdom } from 'jsdom';
global.document = jsdom('<!doctype html><html><body></body></html>');
global.window = document.defaultView;
global.navigator = global.window.navigator;
| javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/redux/test/reducers/todos.spec.js | examples/redux/test/reducers/todos.spec.js | import expect from 'expect';
import todos from '../../reducers/todos';
import * as types from '../../constants/ActionTypes';
describe('todos reducer', () => {
it('should handle initial state', () => {
expect(
todos(undefined, {})
).toEqual([{
text: 'Use Redux',
completed: false,
id: 0... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/redux/test/components/TodoTextInput.spec.js | examples/redux/test/components/TodoTextInput.spec.js | import expect from 'expect';
import React from 'react';
import TestUtils from 'react-addons-test-utils';
import TodoTextInput from '../../components/TodoTextInput';
function setup(propOverrides) {
const props = Object.assign({
onSave: expect.createSpy(),
text: 'Use Redux',
placeholder: 'What needs to be ... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/redux/test/components/TodoItem.spec.js | examples/redux/test/components/TodoItem.spec.js | import expect from 'expect';
import React from 'react';
import TestUtils from 'react-addons-test-utils';
import TodoItem from '../../components/TodoItem';
import TodoTextInput from '../../components/TodoTextInput';
function setup( editing = false ) {
const props = {
todo: {
id: 0,
text: 'Use Redux',
... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/redux/test/components/Footer.spec.js | examples/redux/test/components/Footer.spec.js | import expect from 'expect';
import React from 'react';
import TestUtils from 'react-addons-test-utils';
import Footer from '../../components/Footer';
import { SHOW_ALL, SHOW_ACTIVE } from '../../constants/TodoFilters';
function setup(propOverrides) {
const props = Object.assign({
completedCount: 0,
activeCo... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/redux/test/components/Header.spec.js | examples/redux/test/components/Header.spec.js | import expect from 'expect';
import React from 'react';
import TestUtils from 'react-addons-test-utils';
import Header from '../../components/Header';
import TodoTextInput from '../../components/TodoTextInput';
function setup() {
const props = {
addTodo: expect.createSpy()
};
const renderer = TestUtils.crea... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/redux/test/components/MainSection.spec.js | examples/redux/test/components/MainSection.spec.js | import expect from 'expect';
import React from 'react';
import TestUtils from 'react-addons-test-utils';
import MainSection from '../../components/MainSection';
import TodoItem from '../../components/TodoItem';
import Footer from '../../components/Footer';
import { SHOW_ALL, SHOW_COMPLETED } from '../../constants/TodoF... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/redux/test/actions/todos.spec.js | examples/redux/test/actions/todos.spec.js | import expect from 'expect';
import * as types from '../../constants/ActionTypes';
import * as actions from '../../actions/todos';
describe('todo actions', () => {
it('addTodo should create ADD_TODO action', () => {
expect(actions.addTodo('Use Redux')).toEqual({
type: types.ADD_TODO,
text: 'Use Redux... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/redux/components/TodoTextInput.js | examples/redux/components/TodoTextInput.js | import React, { Component, PropTypes } from 'react';
import classnames from 'classnames';
class TodoTextInput extends Component {
constructor(props, context) {
super(props, context);
this.state = {
text: this.props.text || ''
};
}
handleSubmit(e) {
const text = e.target.value.trim();
i... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/redux/components/TodoItem.js | examples/redux/components/TodoItem.js | import React, { Component, PropTypes } from 'react';
import classnames from 'classnames';
import TodoTextInput from './TodoTextInput';
class TodoItem extends Component {
constructor(props, context) {
super(props, context);
this.state = {
editing: false
};
}
handleDoubleClick() {
this.setSt... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/redux/components/MainSection.js | examples/redux/components/MainSection.js | import React, { Component, PropTypes } from 'react';
import TodoItem from './TodoItem';
import Footer from './Footer';
import { SHOW_ALL, SHOW_COMPLETED, SHOW_ACTIVE } from '../constants/TodoFilters';
const TODO_FILTERS = {
[SHOW_ALL]: () => true,
[SHOW_ACTIVE]: todo => !todo.completed,
[SHOW_COMPLETED]: todo =>... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/redux/components/Footer.js | examples/redux/components/Footer.js | import React, { PropTypes, Component } from 'react';
import classnames from 'classnames';
import { SHOW_ALL, SHOW_COMPLETED, SHOW_ACTIVE } from '../constants/TodoFilters';
const FILTER_TITLES = {
[SHOW_ALL]: 'All',
[SHOW_ACTIVE]: 'Active',
[SHOW_COMPLETED]: 'Completed'
};
class Footer extends Component {
rend... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/redux/components/Header.js | examples/redux/components/Header.js | import React, { PropTypes, Component } from 'react';
import TodoTextInput from './TodoTextInput';
class Header extends Component {
handleSave(text) {
if (text.length !== 0) {
this.props.addTodo(text);
}
}
render() {
return (
<header className="header">
<h1>todos</h1>
... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/redux/actions/todos.js | examples/redux/actions/todos.js | import * as types from '../constants/ActionTypes';
export function addTodo(text) {
return { type: types.ADD_TODO, text };
}
export function deleteTodo(id) {
return { type: types.DELETE_TODO, id };
}
export function editTodo(id, text) {
return { type: types.EDIT_TODO, id, text };
}
export function completeTodo... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/redux/containers/App.js | examples/redux/containers/App.js | import React, { Component, PropTypes } from 'react';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import Header from '../components/Header';
import MainSection from '../components/MainSection';
import * as TodoActions from '../actions/todos';
class App extends Component {
render... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/redux/dist/bundle.js | examples/redux/dist/bundle.js | /******/ (function(modules) { // webpackBootstrap
/******/ var parentHotUpdateCallback = this["webpackHotUpdate"];
/******/ this["webpackHotUpdate"] =
/******/ function webpackHotUpdateCallback(chunkId, moreModules) { // eslint-disable-line no-unused-vars
/******/ hotAddUpdateChunk(chunkId, moreModules);
/******/... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | true |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/redux/constants/TodoFilters.js | examples/redux/constants/TodoFilters.js | export const SHOW_ALL = 'show_all';
export const SHOW_COMPLETED = 'show_completed';
export const SHOW_ACTIVE = 'show_active';
| javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/redux/constants/ActionTypes.js | examples/redux/constants/ActionTypes.js | export const ADD_TODO = 'ADD_TODO';
export const DELETE_TODO = 'DELETE_TODO';
export const EDIT_TODO = 'EDIT_TODO';
export const COMPLETE_TODO = 'COMPLETE_TODO';
export const COMPLETE_ALL = 'COMPLETE_ALL';
export const CLEAR_COMPLETED = 'CLEAR_COMPLETED';
| javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/facebook-flux/js/app.js | examples/facebook-flux/js/app.js | /**
* Copyright (c) 2014, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
var React = requir... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/facebook-flux/js/dispatcher/AppDispatcher.js | examples/facebook-flux/js/dispatcher/AppDispatcher.js | /*
* Copyright (c) 2014-2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* AppDispatcher... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/facebook-flux/js/dispatcher/__tests__/AppDispatcher-test.js | examples/facebook-flux/js/dispatcher/__tests__/AppDispatcher-test.js | "use strict";
jest.autoMockOff();
describe('AppDispatcher', function() {
var AppDispatcher;
beforeEach(function() {
AppDispatcher = require('../AppDispatcher.js');
});
it('sends actions to subscribers', function() {
var listener = jest.genMockFunction();
AppDispatcher.register(listener);
va... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/facebook-flux/js/components/Footer.react.js | examples/facebook-flux/js/components/Footer.react.js | /**
* Copyright (c) 2014-2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
var React = r... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/facebook-flux/js/components/TodoApp.react.js | examples/facebook-flux/js/components/TodoApp.react.js | /**
* Copyright (c) 2014-2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
/**
* This c... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/facebook-flux/js/components/TodoTextInput.react.js | examples/facebook-flux/js/components/TodoTextInput.react.js | /**
* Copyright (c) 2014-2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
var React = r... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/facebook-flux/js/components/Header.react.js | examples/facebook-flux/js/components/Header.react.js | /**
* Copyright (c) 2014-2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
var React = r... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/facebook-flux/js/components/TodoItem.react.js | examples/facebook-flux/js/components/TodoItem.react.js | /**
* Copyright (c) 2014-2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
var React = r... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/facebook-flux/js/components/MainSection.react.js | examples/facebook-flux/js/components/MainSection.react.js | /**
* Copyright (c) 2014-2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
var React = r... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/facebook-flux/js/actions/TodoActions.js | examples/facebook-flux/js/actions/TodoActions.js | /*
* Copyright (c) 2014-2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* TodoActions
... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/facebook-flux/js/stores/TodoStore.js | examples/facebook-flux/js/stores/TodoStore.js | /*
* Copyright (c) 2014, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* TodoStore
*/
var... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/facebook-flux/js/stores/__tests__/TodoStore-test.js | examples/facebook-flux/js/stores/__tests__/TodoStore-test.js | /*
* Copyright (c) 2014-2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* TodoStore-tes... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/facebook-flux/js/constants/TodoConstants.js | examples/facebook-flux/js/constants/TodoConstants.js | /*
* Copyright (c) 2014-2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* TodoConstants... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/rxjs/app/main.jsx | examples/rxjs/app/main.jsx | import Rx from 'rx';
import React from 'react';
import ReactDOM from 'react-dom';
import todosStore from './stores/todos';
import App from './components/App.jsx';
todosStore.subject.subscribe((store) => {
ReactDOM.render(<App store={store} />, document.getElementById('app'));
});
| javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/rxjs/app/components/Count.jsx | examples/rxjs/app/components/Count.jsx | import React, {Component} from 'react';
export default class Count extends Component {
constructor(props) {
super(props);
}
render() {
return (
<div>
<span className="todo-count"><strong>{this.props.length}</strong> item{(this.props.length !== 1) ? 's' : ''} left</span>
</div>
);... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/rxjs/app/components/ClearCompleted.jsx | examples/rxjs/app/components/ClearCompleted.jsx | import React, {Component} from 'react';
import todoActions from '../actions/todo';
export default class clearCompleted extends Component {
constructor(props) {
super(props);
}
render() {
if(this.props.length === 0) return null;
return (
<button
className="clear-completed"
onC... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/rxjs/app/components/Filter.jsx | examples/rxjs/app/components/Filter.jsx | import React, {Component} from 'react';
import classNames from 'classnames';
import todoActions from '../actions/todo';
export default class Filter extends Component {
constructor(props) {
super(props);
}
render() {
return (
<ul className="filters">
<li>
<a className={classNames... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/rxjs/app/components/Footer.jsx | examples/rxjs/app/components/Footer.jsx | import React, {Component} from 'react';
import Count from './Count.jsx';
import Filter from './Filter.jsx';
import ClearCompleted from './ClearCompleted.jsx';
import todoActions from '../actions/todo';
export default class Footer extends Component {
constructor(props) {
super(props);
}
shouldComponentUpdat... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/rxjs/app/components/Header.jsx | examples/rxjs/app/components/Header.jsx | import React, {Component} from 'react';
import ReactDOM from 'react-dom';
import todoActions from '../actions/todo';
import keys from '../utils/keys';
export default class Header extends Component {
constructor(props) {
super(props);
}
// check a proper way of doing this
shouldComponentUpdate() {
re... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/rxjs/app/components/App.jsx | examples/rxjs/app/components/App.jsx | import React, {Component} from 'react';
import Header from './Header.jsx';
import Todos from './Todos.jsx';
import Footer from './Footer.jsx';
export default class App extends Component {
constructor(props) {
super(props);
}
render() {
const store = {
todos: this.props.store.get('todos'),
f... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/rxjs/app/components/Todo.jsx | examples/rxjs/app/components/Todo.jsx | import React, {Component} from 'react';
import ReactDOM from 'react-dom';
import todoActions from '../actions/todo';
import keys from '../utils/keys';
import classNames from 'classnames';
export default class Todos extends Component {
constructor(props) {
super(props);
}
render() {
return (
<li c... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/rxjs/app/components/Todos.jsx | examples/rxjs/app/components/Todos.jsx | import React, {Component} from 'react';
import Todo from './Todo.jsx';
import todoActions from '../actions/todo';
export default class Todos extends Component {
constructor(props) {
super(props);
}
render() {
let todos = this.props.todos.filter(::this.renderTodo);
return (
<section className... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/rxjs/app/actions/todo.js | examples/rxjs/app/actions/todo.js | import Rx from 'rx';
const subjects = {
add: new Rx.Subject(),
delete: new Rx.Subject(),
update: new Rx.Subject(),
toggleEdit: new Rx.Subject(),
toggleCompleted: new Rx.Subject(),
toggleAll: new Rx.Subject(),
clearCompleted: new Rx.Subject(),
filter: new Rx.Subject()
};
export default {
subjects,
... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/rxjs/app/stores/todos.js | examples/rxjs/app/stores/todos.js | import Rx from 'rx';
import update from 'react-addons-update';
import Immutable from 'immutable';
import RemoteDev from 'remotedev';
import todoActions from '../actions/todo';
import todoRecord from '../utils/todoRecord';
import persist from '../utils/persist';
let persistedData = persist.get();
function toImmutabl... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/rxjs/app/utils/keys.js | examples/rxjs/app/utils/keys.js | export default {
ENTER: 13,
ESC: 27
};
| javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/rxjs/app/utils/todoRecord.js | examples/rxjs/app/utils/todoRecord.js | import Immutable from 'immutable';
import uuid from 'node-uuid'
export default () => new Immutable.Record({
id: uuid(),
edit: false,
completed: false,
text: ''
});
| javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/rxjs/app/utils/persist.js | examples/rxjs/app/utils/persist.js | import Immutable from 'immutable';
let persist = {
set(data) {
window.localStorage.todos = JSON.stringify(data.toJS());
},
get() {
let todos = window.localStorage.todos;
return (todos) ? JSON.parse(todos) : null;
}
};
export default persist;
| javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/rxjs/bundle/bundle.js | examples/rxjs/bundle/bundle.js | (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.ex... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | true |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/alt/Gruntfile.js | examples/alt/Gruntfile.js | 'use strict';
var mountFolder = function (connect, dir) {
return connect.static(require('path').resolve(dir));
};
var webpackDistConfig = require('./webpack.dist.config.js'),
webpackDevConfig = require('./webpack.config.js');
module.exports = function (grunt) {
// Let *load-grunt-tasks* require everything
... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/alt/webpack.dist.config.js | examples/alt/webpack.dist.config.js | /*
* Webpack distribution configuration
*
* This file is set up for serving the distribution version. It will be compiled to dist/ by default
*/
'use strict';
var webpack = require('webpack');
module.exports = {
output: {
publicPath: '/assets/',
path: 'dist/assets/',
filename: 'main.js'
},
de... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/alt/karma.conf.js | examples/alt/karma.conf.js | 'use strict';
var path = require('path');
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine'],
files: [
'test/helpers/**/*.js',
'test/spec/components/**/*.js'
],
preprocessors: {
'test/spec/components/**/*.js': ['webpack'],
'test/spec/c... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/alt/webpack.config.js | examples/alt/webpack.config.js | /*
* Webpack development server configuration
*
* This file is set up for serving the webpack-dev-server, which will watch for changes and recompile as required if
* the subfolder /webpack-dev-server/ is visited. Visiting the root will not automatically reload.
*/
'use strict';
var webpack = require('webpack');
m... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/alt/src/TodoList.js | examples/alt/src/TodoList.js | 'use strict';
require('bootstrap/less/bootstrap.less');
import React from 'react/addons';
import TodoList from 'components/TodoList';
React.render(<TodoList />, document.getElementById('todo-list'));
| javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/alt/src/components/TodoListTask.js | examples/alt/src/components/TodoListTask.js | import React from 'react/addons';
import { ListGroupItem, Glyphicon, Button } from 'react-bootstrap';
import TodoListActions from 'actions/TodoList';
class TodoListTask extends React.Component {
constructor(props) {
super(props);
this.removeTask = this.rem... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/alt/src/components/AddNewTaskForm.js | examples/alt/src/components/AddNewTaskForm.js | import React from 'react/addons';
import { Input, Button } from 'react-bootstrap';
import AddNewTaskFormActions from 'actions/AddNewTaskForm';
import TodoListActions from 'actions/TodoList';
import AddNewTaskFormStore from 'stores/AddNewTaskForm';
class AddNewTaskForm extends React.Compon... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/alt/src/components/TodoList.js | examples/alt/src/components/TodoList.js | import React from 'react/addons';
import { Grid, Row, ListGroup } from 'react-bootstrap';
import TodoListStore from 'stores/TodoList';
import TodoListTask from 'components/TodoListTask';
import AddNewTaskForm from 'components/AddNewTaskForm';
class TodoList extends R... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/alt/src/actions/AddNewTaskForm.js | examples/alt/src/actions/AddNewTaskForm.js | import AltInstance from 'lib/AltInstance';
class AddNewTaskFormActions {
changeContent(content) {
this.dispatch(content);
}
clearForm() {
this.dispatch();
}
}
/* If your actions are as simple as just dispatching passed values, you can use a slightly different (and more concise) API for such use case:... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/alt/src/actions/TodoList.js | examples/alt/src/actions/TodoList.js | import UUID from 'node-uuid';
import Immutable from 'immutable';
import AltInstance from 'lib/AltInstance';
class TodoListActions {
addTask(content) { this.dispatch(Immutable.fromJS({ id: UUID.v4(), content })); }
removeTask(taskID) { this.dispatch(taskID); }
}
export default AltInstance.createActions(To... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/alt/src/stores/AddNewTaskForm.js | examples/alt/src/stores/AddNewTaskForm.js | import AltInstance from 'lib/AltInstance';
import Actions from 'actions/AddNewTaskForm';
class AddNewTaskFormStore {
constructor() {
this.validationError = '';
this.content = '';
this.submittable = false;
let { changeContent, clearForm } = Actions;
this.bindListeners({ changeContent, clearFo... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/alt/src/stores/TodoList.js | examples/alt/src/stores/TodoList.js | import ImmutableStore from 'alt/utils/ImmutableUtil';
import { List, fromJS } from 'immutable';
import RemoteDev from 'remotedev';
import AltInstance from 'lib/AltInstance';
import Actions from 'actions/TodoList';
class TodoListStore {
constructor() {
let { addTask, removeTask } = Actions;
... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/alt/test/helpers/phantomjs-shims.js | examples/alt/test/helpers/phantomjs-shims.js | (function() {
var Ap = Array.prototype;
var slice = Ap.slice;
var Fp = Function.prototype;
if (!Fp.bind) {
// PhantomJS doesn't support Function.prototype.bind natively, so
// polyfill it whenever this module is required.
Fp.bind = function(context) {
var func = this;
var args = slice.call(arguments, 1)... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/alt/test/helpers/react/addons.js | examples/alt/test/helpers/react/addons.js | /**
* React (with addons) v0.9.0-alpha
*/
!function(e){"object"==typeof exports?module.exports=e():"function"==typeof define&&define.amd?define(e):"undefined"!=typeof window?window.React=e():"undefined"!=typeof global?global.React=e():"undefined"!=typeof self&&(self.React=e())}(function(){var define,module,exports;re... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | true |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/alt/test/spec/components/ReactImmutableAltTodoApp.js | examples/alt/test/spec/components/ReactImmutableAltTodoApp.js | 'use strict';
describe('ReactImmutableAltTodoApp', function () {
var React = require('react/addons');
var ReactImmutableAltTodoApp, component;
beforeEach(function () {
var container = document.createElement('div');
container.id = 'content';
document.body.appendChild(container);
ReactImmutableAl... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/reflux/Gruntfile.js | examples/reflux/Gruntfile.js | module.exports = function(grunt) {
var options = {
port: 8080
};
grunt.initConfig({
options: options,
pkg: grunt.file.readJSON('package.json'),
connect: {
server: {
options: {
port: options.port,
base: '.'
... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/reflux/js/components.jsx.js | examples/reflux/js/components.jsx.js | /** @jsx React.DOM */
(function(React, ReactRouter, Reflux, TodoActions, todoListStore, global) {
// Renders a single Todo item in the list
// Used in TodoMain
var TodoItem = React.createClass({
propTypes: {
label: React.PropTypes.string.isRequired,
isComplete: React.PropTy... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/reflux/js/store.js | examples/reflux/js/store.js | (function(Reflux, TodoActions, global) {
'use strict';
// some variables and helpers for our fake database stuff
var todoCounter = 0,
localStorageKey = "todos";
function getItemByKey(list,itemKey){
return _.find(list, function(item) {
return item.key === itemKey;
})... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
zalmoxisus/remotedev | https://github.com/zalmoxisus/remotedev/blob/f8256d934316b37a94cd24870fc1d3efcbe7d0b9/examples/reflux/js/actions.js | examples/reflux/js/actions.js | (function(Reflux, global) {
'use strict';
// Each action is like an event channel for one specific event. Actions are called by components.
// The store is listening to all actions, and the components in turn are listening to the store.
// Thus the flow is: User interaction -> component calls action ->... | javascript | MIT | f8256d934316b37a94cd24870fc1d3efcbe7d0b9 | 2026-01-05T03:37:24.491999Z | false |
soruly/trace.moe-api | https://github.com/soruly/trace.moe-api/blob/d86ac21aa9f2185537e25955e2132837970a4cef/sql.js | sql.js | import postgres from "postgres";
const { DB_NAME, DB_USER, DB_PASS, DB_HOST, DB_PORT } = process.env;
const sql = postgres({
host: DB_HOST,
port: DB_PORT,
database: DB_NAME,
username: DB_USER,
password: DB_PASS,
});
export default sql;
| javascript | MIT | d86ac21aa9f2185537e25955e2132837970a4cef | 2026-01-05T03:37:17.940022Z | false |
soruly/trace.moe-api | https://github.com/soruly/trace.moe-api/blob/d86ac21aa9f2185537e25955e2132837970a4cef/env.js | env.js | process.loadEnvFile();
if (
[
"VIDEO_PATH",
"TRACE_API_SALT",
"MILVUS_ADDR",
"MILVUS_TOKEN",
"DB_HOST",
"DB_PORT",
"DB_USER",
"DB_PASS",
"DB_NAME",
]
.filter((envVar) => !process.env[envVar])
.map((envVar) => {
console.warn(`${envVar} is not set`);
return envV... | javascript | MIT | d86ac21aa9f2185537e25955e2132837970a4cef | 2026-01-05T03:37:17.940022Z | false |
soruly/trace.moe-api | https://github.com/soruly/trace.moe-api/blob/d86ac21aa9f2185537e25955e2132837970a4cef/server.js | server.js | import os from "node:os";
import path from "node:path";
import fs from "node:fs/promises";
import Sqids from "sqids";
import { MilvusClient, DataType } from "@zilliz/milvus2-sdk-node";
import "./env.js";
import sql from "./sql.js";
import app from "./src/app.js";
import v8 from "v8";
import { ensureDir } from "./src/li... | javascript | MIT | d86ac21aa9f2185537e25955e2132837970a4cef | 2026-01-05T03:37:17.940022Z | false |
soruly/trace.moe-api | https://github.com/soruly/trace.moe-api/blob/d86ac21aa9f2185537e25955e2132837970a4cef/src/scan.js | src/scan.js | import path from "node:path";
import fs from "node:fs/promises";
import sql from "../sql.js";
import startWorker from "./worker/start-worker.js";
const { VIDEO_PATH } = process.env;
const VIDEO_PATH_NORMALIZED = path.normalize(VIDEO_PATH);
export default async (req, res) => {
const [dbFileList, fileList] = await Pr... | javascript | MIT | d86ac21aa9f2185537e25955e2132837970a4cef | 2026-01-05T03:37:17.940022Z | false |
soruly/trace.moe-api | https://github.com/soruly/trace.moe-api/blob/d86ac21aa9f2185537e25955e2132837970a4cef/src/get-status.js | src/get-status.js | import { MilvusClient } from "@zilliz/milvus2-sdk-node";
import sql from "../sql.js";
const { MILVUS_ADDR, MILVUS_TOKEN } = process.env;
export default async (req, res) => {
const { id } = req.query;
if (id) {
if (!id.match(/\d+/)) {
return res.status(400).json({
error: "Invalid param id: must b... | javascript | MIT | d86ac21aa9f2185537e25955e2132837970a4cef | 2026-01-05T03:37:17.940022Z | false |
soruly/trace.moe-api | https://github.com/soruly/trace.moe-api/blob/d86ac21aa9f2185537e25955e2132837970a4cef/src/get-me.js | src/get-me.js | import sql from "../sql.js";
export default async (req, res) => {
let priority = 0;
let concurrency = 0;
let quota = 0;
let quotaUsed = 0;
let id = req.ip;
const apiKey = req.query.key ?? req.header("x-trace-key") ?? "";
if (apiKey) {
const [user] = await sql`
SELECT
id,
email,... | javascript | MIT | d86ac21aa9f2185537e25955e2132837970a4cef | 2026-01-05T03:37:17.940022Z | false |
soruly/trace.moe-api | https://github.com/soruly/trace.moe-api/blob/d86ac21aa9f2185537e25955e2132837970a4cef/src/video.js | src/video.js | import path from "node:path";
import fs from "node:fs/promises";
import crypto from "node:crypto";
import child_process from "node:child_process";
import { Buffer } from "node:buffer";
import sql from "../sql.js";
import detectScene from "./lib/detect-scene.js";
const { VIDEO_PATH, TRACE_API_SALT, MEDIA_QUEUE = Infini... | javascript | MIT | d86ac21aa9f2185537e25955e2132837970a4cef | 2026-01-05T03:37:17.940022Z | false |
soruly/trace.moe-api | https://github.com/soruly/trace.moe-api/blob/d86ac21aa9f2185537e25955e2132837970a4cef/src/app.js | src/app.js | import { performance } from "node:perf_hooks";
import express from "express";
import rateLimit from "express-rate-limit";
import cors from "cors";
import multer from "multer";
import getMe from "./get-me.js";
import getStatus from "./get-status.js";
import getStats from "./get-stats.js";
import search from "./search.j... | javascript | MIT | d86ac21aa9f2185537e25955e2132837970a4cef | 2026-01-05T03:37:17.940022Z | false |
soruly/trace.moe-api | https://github.com/soruly/trace.moe-api/blob/d86ac21aa9f2185537e25955e2132837970a4cef/src/search.js | src/search.js | import crypto from "node:crypto";
import os from "node:os";
import path from "node:path";
import child_process from "node:child_process";
import fs from "node:fs/promises";
import aniep from "aniep";
import sharp from "sharp";
import { performance } from "node:perf_hooks";
import { MilvusClient } from "@zilliz/milvus2-... | javascript | MIT | d86ac21aa9f2185537e25955e2132837970a4cef | 2026-01-05T03:37:17.940022Z | false |
soruly/trace.moe-api | https://github.com/soruly/trace.moe-api/blob/d86ac21aa9f2185537e25955e2132837970a4cef/src/image.js | src/image.js | import path from "node:path";
import fs from "node:fs/promises";
import crypto from "node:crypto";
import child_process from "node:child_process";
import sql from "../sql.js";
const { VIDEO_PATH, TRACE_API_SALT, MEDIA_QUEUE = Infinity } = process.env;
const generateImagePreview = async (filePath, t, format = "jpeg", ... | javascript | MIT | d86ac21aa9f2185537e25955e2132837970a4cef | 2026-01-05T03:37:17.940022Z | false |
soruly/trace.moe-api | https://github.com/soruly/trace.moe-api/blob/d86ac21aa9f2185537e25955e2132837970a4cef/src/get-stats.js | src/get-stats.js | import sql from "../sql.js";
let lastUpdate = new Date();
let mediaCount = 0;
let mediaFramesTotal = 0;
let mediaDurationTotal = 0;
export default async (req, res) => {
const { type, period } = req.query;
if (type === "media") {
const [row] = await sql`
SELECT
updated
FROM
files
... | javascript | MIT | d86ac21aa9f2185537e25955e2132837970a4cef | 2026-01-05T03:37:17.940022Z | false |
soruly/trace.moe-api | https://github.com/soruly/trace.moe-api/blob/d86ac21aa9f2185537e25955e2132837970a4cef/src/worker/analyze.js | src/worker/analyze.js | import path from "node:path";
import fs from "node:fs/promises";
import child_process from "node:child_process";
import { parentPort, threadId, workerData } from "node:worker_threads";
import sql from "../../sql.js";
const { VIDEO_PATH } = process.env;
const { anilist_id, filePath } = workerData;
parentPort.postMessa... | javascript | MIT | d86ac21aa9f2185537e25955e2132837970a4cef | 2026-01-05T03:37:17.940022Z | false |
soruly/trace.moe-api | https://github.com/soruly/trace.moe-api/blob/d86ac21aa9f2185537e25955e2132837970a4cef/src/worker/start-worker.js | src/worker/start-worker.js | import { Worker } from "node:worker_threads";
import sql from "../../sql.js";
const { MAX_WORKER = 1 } = process.env;
// NEW => ANALYZING => ANALYZED => HASHING => HASHED => LOADING => LOADED
export default async (app) => {
const createWorker = async () => {
while (app.locals.mutex) await new Promise((resolve) ... | javascript | MIT | d86ac21aa9f2185537e25955e2132837970a4cef | 2026-01-05T03:37:17.940022Z | false |
soruly/trace.moe-api | https://github.com/soruly/trace.moe-api/blob/d86ac21aa9f2185537e25955e2132837970a4cef/src/worker/hash.js | src/worker/hash.js | import path from "node:path";
import os from "node:os";
import fs from "node:fs/promises";
import zlib from "node:zlib";
import child_process from "node:child_process";
import { parentPort, threadId, workerData } from "node:worker_threads";
import sql from "../../sql.js";
const { VIDEO_PATH } = process.env;
const { i... | javascript | MIT | d86ac21aa9f2185537e25955e2132837970a4cef | 2026-01-05T03:37:17.940022Z | false |
soruly/trace.moe-api | https://github.com/soruly/trace.moe-api/blob/d86ac21aa9f2185537e25955e2132837970a4cef/src/worker/cl_hi.js | src/worker/cl_hi.js | import path from "node:path";
import fs from "node:fs/promises";
import sharp from "sharp";
import colorLayout from "../lib/color-layout.js";
console.log(
JSON.stringify(
await Promise.all(
(await fs.readdir(process.argv[2]))
.filter((_, i) => i % Number(process.argv[4]) === Number(process.argv[3])... | javascript | MIT | d86ac21aa9f2185537e25955e2132837970a4cef | 2026-01-05T03:37:17.940022Z | false |
soruly/trace.moe-api | https://github.com/soruly/trace.moe-api/blob/d86ac21aa9f2185537e25955e2132837970a4cef/src/worker/load.js | src/worker/load.js | import path from "node:path";
import zlib from "node:zlib";
import { parentPort, threadId, workerData } from "node:worker_threads";
import { MilvusClient } from "@zilliz/milvus2-sdk-node";
import sql from "../../sql.js";
const { MILVUS_ADDR, MILVUS_TOKEN, DISCORD_URL, TELEGRAM_ID, TELEGRAM_URL } = process.env;
const ... | javascript | MIT | d86ac21aa9f2185537e25955e2132837970a4cef | 2026-01-05T03:37:17.940022Z | false |
soruly/trace.moe-api | https://github.com/soruly/trace.moe-api/blob/d86ac21aa9f2185537e25955e2132837970a4cef/src/user/reset-key.js | src/user/reset-key.js | import sql from "../../sql.js";
import generateAPIKey from "../lib/generate-api-key.js";
export default async (req, res) => {
const apiKey = req.query.key ?? req.header("x-trace-key") ?? "";
if (!apiKey) {
return res.status(403).json({
error: "Missing API key",
});
}
const rows = await sql`
S... | javascript | MIT | d86ac21aa9f2185537e25955e2132837970a4cef | 2026-01-05T03:37:17.940022Z | false |
soruly/trace.moe-api | https://github.com/soruly/trace.moe-api/blob/d86ac21aa9f2185537e25955e2132837970a4cef/src/user/login.js | src/user/login.js | import crypto from "node:crypto";
import sql from "../../sql.js";
const { TRACE_API_SALT } = process.env;
export default async (req, res) => {
if (!req.body?.email || !req.body?.password) {
return res.status(403).json({
error: "Invalid Email or Password",
});
}
const rows = await sql`
SELECT
... | javascript | MIT | d86ac21aa9f2185537e25955e2132837970a4cef | 2026-01-05T03:37:17.940022Z | false |
soruly/trace.moe-api | https://github.com/soruly/trace.moe-api/blob/d86ac21aa9f2185537e25955e2132837970a4cef/src/user/create.js | src/user/create.js | import sql from "../../sql.js";
import createNewUser from "../lib/create-new-user.js";
export default async (req, res) => {
const apiKey = req.query.key ?? req.header("x-trace-key") ?? "";
if (!apiKey) {
return res.status(403).json({
error: "Missing API key",
});
}
const rows = await sql`
SE... | javascript | MIT | d86ac21aa9f2185537e25955e2132837970a4cef | 2026-01-05T03:37:17.940022Z | false |
soruly/trace.moe-api | https://github.com/soruly/trace.moe-api/blob/d86ac21aa9f2185537e25955e2132837970a4cef/src/user/reset-password.js | src/user/reset-password.js | import crypto from "node:crypto";
import sql from "../../sql.js";
const { TRACE_API_SALT } = process.env;
export default async (req, res) => {
const apiKey = req.query.key ?? req.header("x-trace-key") ?? "";
if (!apiKey) {
return res.status(403).json({
error: "Missing API key",
});
}
const rows ... | javascript | MIT | d86ac21aa9f2185537e25955e2132837970a4cef | 2026-01-05T03:37:17.940022Z | false |
soruly/trace.moe-api | https://github.com/soruly/trace.moe-api/blob/d86ac21aa9f2185537e25955e2132837970a4cef/src/webhook/github.js | src/webhook/github.js | import crypto from "node:crypto";
const { WEBHOOK_GITHUB_SECRET } = process.env;
export default async (req, res) => {
const signature = req.header("X-Hub-Signature-256");
if (!signature || !req.rawBody) {
res.status(403).send("403 Forbidden");
return;
}
const hmac = crypto.createHmac("sha256", WEBHOOK... | javascript | MIT | d86ac21aa9f2185537e25955e2132837970a4cef | 2026-01-05T03:37:17.940022Z | false |
soruly/trace.moe-api | https://github.com/soruly/trace.moe-api/blob/d86ac21aa9f2185537e25955e2132837970a4cef/src/webhook/patreon.js | src/webhook/patreon.js | import crypto from "node:crypto";
import sql from "../../sql.js";
import createNewUser from "../lib/create-new-user.js";
const { WEBHOOK_PATREON_SECRET } = process.env;
export default async (req, res) => {
const signature = req.header("X-Patreon-Signature");
if (!signature || !req.rawBody) {
res.status(403).s... | javascript | MIT | d86ac21aa9f2185537e25955e2132837970a4cef | 2026-01-05T03:37:17.940022Z | false |
soruly/trace.moe-api | https://github.com/soruly/trace.moe-api/blob/d86ac21aa9f2185537e25955e2132837970a4cef/src/lib/generate-api-key.js | src/lib/generate-api-key.js | import crypto from "node:crypto";
export default (id) => {
const b = crypto.randomBytes(32);
b.writeUInt16LE(Number(id));
return b.toString("base64").replace(/[^0-9a-zA-Z]/g, "");
};
| javascript | MIT | d86ac21aa9f2185537e25955e2132837970a4cef | 2026-01-05T03:37:17.940022Z | false |
soruly/trace.moe-api | https://github.com/soruly/trace.moe-api/blob/d86ac21aa9f2185537e25955e2132837970a4cef/src/lib/ensure-dir.js | src/lib/ensure-dir.js | import fs from "node:fs/promises";
export async function ensureDir(directoryPath) {
try {
const videoPathStats = await fs.stat(directoryPath);
if (!videoPathStats.isDirectory()) {
throw new Error(`${directoryPath} is not a directory`);
}
} catch (err) {
if (err.code === "ENOENT") {
cons... | javascript | MIT | d86ac21aa9f2185537e25955e2132837970a4cef | 2026-01-05T03:37:17.940022Z | false |
soruly/trace.moe-api | https://github.com/soruly/trace.moe-api/blob/d86ac21aa9f2185537e25955e2132837970a4cef/src/lib/create-new-user.js | src/lib/create-new-user.js | import path from "node:path";
import fs from "node:fs/promises";
import crypto from "node:crypto";
import { URL } from "node:url";
import nodemailer from "nodemailer";
import sql from "../../sql.js";
import generateAPIKey from "./generate-api-key.js";
const { TRACE_API_SALT, EMAIL_SMTP, EMAIL_SMTP_PORT } = process.env... | javascript | MIT | d86ac21aa9f2185537e25955e2132837970a4cef | 2026-01-05T03:37:17.940022Z | false |
soruly/trace.moe-api | https://github.com/soruly/trace.moe-api/blob/d86ac21aa9f2185537e25955e2132837970a4cef/src/lib/color-layout.js | src/lib/color-layout.js | import sharp from "sharp";
export default async (imageBuffer) => {
const input = await sharp(imageBuffer);
const {
data,
info: { width, height },
} = await input.raw().toBuffer({ resolveWithObject: true });
let numCCoeff = 6;
let numYCoeff = 21;
let YCoeff = new Uint8Array(numYCoeff);
let CbCoe... | javascript | MIT | d86ac21aa9f2185537e25955e2132837970a4cef | 2026-01-05T03:37:17.940022Z | false |
soruly/trace.moe-api | https://github.com/soruly/trace.moe-api/blob/d86ac21aa9f2185537e25955e2132837970a4cef/src/lib/detect-scene.js | src/lib/detect-scene.js | import sql from "../../sql.js";
const { VIDEO_PATH } = process.env;
export default async (filePath, t, minDuration, maxDuration) => {
if (t < 0) {
return null;
}
const [file] = await sql`
SELECT
duration,
scene_changes
FROM
files
WHERE
path = ${filePath.replace(VIDEO_PAT... | javascript | MIT | d86ac21aa9f2185537e25955e2132837970a4cef | 2026-01-05T03:37:17.940022Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.