Merge branch 'staging' into reinit_firmware

pull/939/head
Rick Carlino 2018-07-27 13:30:23 -05:00 committed by GitHub
commit fc6df5fe73
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 1109 additions and 927 deletions

View File

@ -61,7 +61,7 @@ GEM
builder (3.2.3)
bunny (2.11.0)
amq-protocol (~> 2.3.0)
capybara (3.3.1)
capybara (3.4.2)
addressable
mini_mime (>= 0.1.3)
nokogiri (~> 1.8)
@ -109,7 +109,7 @@ GEM
factory_bot_rails (4.10.0)
factory_bot (~> 4.10.0)
railties (>= 3.0.0)
faker (1.8.7)
faker (1.9.1)
i18n (>= 0.7)
faraday (0.13.1)
multipart-post (>= 1.2, < 3)
@ -141,7 +141,7 @@ GEM
formatador (0.2.5)
globalid (0.4.1)
activesupport (>= 4.2.0)
google-api-client (0.23.2)
google-api-client (0.23.4)
addressable (~> 2.5, >= 2.5.1)
googleauth (>= 0.5, < 0.7.0)
httpclient (>= 2.8.1, < 3.0)
@ -229,7 +229,7 @@ GEM
rack-attack (5.4.0)
rack (>= 1.0, < 3)
rack-cors (1.0.2)
rack-test (1.0.0)
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (5.2.0)
actioncable (= 5.2.0)
@ -276,7 +276,7 @@ GEM
actionpack (>= 4.2.0, < 5.3)
railties (>= 4.2.0, < 5.3)
retriable (3.1.2)
rollbar (2.16.2)
rollbar (2.16.3)
multi_json
rspec (3.7.0)
rspec-core (~> 3.7.0)
@ -305,7 +305,7 @@ GEM
activerecord (>= 4.0.0)
railties (>= 4.0.0)
secure_headers (6.0.0)
selenium-webdriver (3.13.0)
selenium-webdriver (3.13.1)
childprocess (~> 0.5)
rubyzip (~> 1.2)
signet (0.8.1)

View File

@ -0,0 +1,7 @@
class IndexLogsTypeVerbosity < ActiveRecord::Migration[5.2]
disable_ddl_transaction!
def change
add_index :logs, [:verbosity, :type], algorithm: :concurrently
end
end

View File

@ -1862,6 +1862,13 @@ CREATE INDEX index_logs_on_updated_at ON public.logs USING btree (updated_at);
CREATE INDEX index_logs_on_verbosity ON public.logs USING btree (verbosity);
--
-- Name: index_logs_on_verbosity_and_type; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_logs_on_verbosity_and_type ON public.logs USING btree (verbosity, type);
--
-- Name: index_peripherals_on_device_id; Type: INDEX; Schema: public; Owner: -
--
@ -2295,6 +2302,7 @@ INSERT INTO "schema_migrations" (version) VALUES
('20180719143412'),
('20180720021451'),
('20180726145505'),
('20180726165546');
('20180726165546'),
('20180727152741');

View File

@ -24,21 +24,21 @@
"author": "farmbot.io",
"license": "MIT",
"optionalDependencies": {
"webpack-dev-server": "3.1.4"
"webpack-dev-server": "3.1.5"
},
"dependencies": {
"@blueprintjs/core": "2.3.1",
"@blueprintjs/datetime": "2.0.3",
"@blueprintjs/select": "^2.0.1",
"@types/enzyme": "3.1.11",
"@types/enzyme": "3.1.12",
"@types/fastclick": "^1.0.28",
"@types/history": "^4.6.1",
"@types/i18next": "^8.4.2",
"@types/jest": "23.1.4",
"@types/lodash": "4.14.110",
"@types/jest": "23.3.1",
"@types/lodash": "4.14.114",
"@types/markdown-it": "^0.0.4",
"@types/moxios": "^0.4.5",
"@types/node": "10.5.1",
"@types/node": "10.5.3",
"@types/react": "16.3.14",
"@types/react-color": "2.13.5",
"@types/react-dom": "16.0.5",
@ -48,24 +48,24 @@
"boxed_value": "^1.0.0",
"browser-speech": "1.1.1",
"coveralls": "3.0.2",
"css-loader": "0.28.11",
"css-loader": "1.0.0",
"enzyme": "^3.1.0",
"enzyme-adapter-react-16": "^1.1.0",
"farmbot": "6.4.0",
"farmbot-toastr": "^1.0.3",
"fastclick": "^1.0.6",
"file-loader": "1.1.11",
"i18next": "11.3.3",
"i18next": "11.5.0",
"imports-loader": "0.8.0",
"jest": "23.2.0",
"jest": "23.4.1",
"json-loader": "0.5.7",
"lodash": "4.17.10",
"markdown-it": "^8.4.0",
"markdown-it-emoji": "^1.4.0",
"moment": "2.22.2",
"moxios": "^0.4.0",
"node-sass": "4.9.0",
"optimize-css-assets-webpack-plugin": "4.0.3",
"node-sass": "4.9.2",
"optimize-css-assets-webpack-plugin": "5.0.0",
"raf": "^3.4.0",
"react": "16.4.1",
"react-addons-css-transition-group": "^15.6.2",
@ -76,20 +76,20 @@
"react-router": "^3",
"react-test-renderer": "16.4.1",
"react-transition-group": "^2.3.1",
"redux": "^3.7.2",
"redux": "4.0.0",
"redux-immutable-state-invariant": "^2.1.0",
"redux-thunk": "^2.0.1",
"redux-thunk": "2.3.0",
"rollbar-sourcemap-webpack-plugin": "^2.3.0",
"sass-loader": "7.0.3",
"stats-webpack-plugin": "0.6.2",
"style-loader": "0.21.0",
"ts-jest": "23.0.0",
"ts-jest": "23.0.1",
"ts-lint": "^4.5.1",
"ts-loader": "4.4.2",
"tslint": "5.10.0",
"tslint": "5.11.0",
"typescript": "2.9.2",
"url-loader": "1.0.1",
"webpack": "4.14.0",
"webpack": "4.16.3",
"webpack-uglify-js-plugin": "1.1.9",
"weinre": "^2.0.0-pre-I0Z7U9OV",
"which": "1.3.1",
@ -97,7 +97,7 @@
},
"devDependencies": {
"jscpd": "0.6.22",
"webpack-cli": "3.0.8",
"webpack-cli": "3.1.0",
"webpack-notifier": "^1.5.0"
},
"jest": {

View File

@ -1,6 +1,6 @@
I hope that we can someday not use this folder and use all the @types/* repositories.
Some (legacy) libraries don't work with the newer typings (eg: Karma).
Some (legacy) libraries don't work with the newer typings (eg: react-redux).
In those rare circumstances, we can put them in here.

View File

@ -38,7 +38,7 @@ describe("AJAX data tracking", () => {
it("sets consistency when calling destroy()", () => {
const uuid = store.getState().resources.index.byKind.Tool[0];
store.dispatch(destroy(uuid));
store.dispatch(destroy(uuid) as any);
expect(maybeStartTracking).toHaveBeenCalled();
});
@ -47,7 +47,7 @@ describe("AJAX data tracking", () => {
x.specialStatus = SpecialStatus.DIRTY;
return x;
});
store.dispatch(saveAll(r));
store.dispatch(saveAll(r) as any);
expect(maybeStartTracking).toHaveBeenCalled();
const uuids: string[] =
_.uniq((maybeStartTracking as jest.Mock).mock.calls
@ -57,7 +57,7 @@ describe("AJAX data tracking", () => {
it("sets consistency when calling initSave()", () => {
mockBody = resources()[0].body;
store.dispatch(initSave(resources()[0]));
store.dispatch(initSave(resources()[0]) as any);
expect(maybeStartTracking).toHaveBeenCalled();
});
});

View File

@ -28,7 +28,7 @@ export function setBoolViaRedux(key: BooleanConfigKey, val: boolean) {
const conf = getWebAppConfig(store.getState().resources.index);
if (conf) {
store.dispatch(edit(conf, { [key]: val }));
store.dispatch(save(conf.uuid));
store.dispatch(save(conf.uuid) as any);
}
return val;
}
@ -44,7 +44,7 @@ export function setNumViaRedux(key: NumberConfigKey, val: number): number {
const conf = getWebAppConfig(store.getState().resources.index);
if (conf) {
store.dispatch(edit(conf, { [key]: val }));
store.dispatch(save(conf.uuid));
store.dispatch(save(conf.uuid) as any);
}
return val;
}

View File

@ -2,7 +2,6 @@ import { fakeState } from "../../__test_support__/fake_state";
import { versionChangeMiddleware } from "../version_tracker_middleware";
import { buildResourceIndex, fakeDevice } from "../../__test_support__/resource_index_builder";
import { MiddlewareAPI } from "redux";
import { Everything } from "../../interfaces";
describe("version tracker middleware", () => {
it("Calls Rollbar.configure", () => {
@ -10,7 +9,7 @@ describe("version tracker middleware", () => {
window.Rollbar = { configure: jest.fn() };
const state = fakeState();
state.resources = buildResourceIndex([fakeDevice()]);
type Mw = MiddlewareAPI<Everything>;
type Mw = MiddlewareAPI<any>;
const fakeStore: Partial<Mw> = {
getState: () => state
};

View File

@ -3,7 +3,7 @@ import { determineInstalledOsVersion, MinVersionOverride } from "../util/index";
import { maybeGetDevice } from "../resources/selectors";
import { MW } from "./middlewares";
import { Everything } from "../interfaces";
import { Store } from "redux";
import { Store, Action } from "redux";
import { Dispatch } from "redux";
import { createReminderFn } from "./upgrade_reminder";
@ -19,7 +19,7 @@ function getVersionFromState(state: Everything) {
const fn: MW =
(store: Store<Everything>) =>
(dispatch: Dispatch<object>) =>
(dispatch: Dispatch<Action<object>>) =>
(action: any) => {
const fbos = getVersionFromState(store.getState());
window.Rollbar && window.Rollbar.configure({ payload: { fbos } });

View File

@ -16,7 +16,7 @@ interface RootComponentProps { store: Store; }
export const attachAppToDom: Callback = () => {
attachToRoot(RootComponent, { store: _store });
_store.dispatch(ready());
_store.dispatch(ready() as any);
};
export class RootComponent extends React.Component<RootComponentProps, {}> {

1954
yarn.lock

File diff suppressed because it is too large Load Diff