Move device-state/target state to api-binder/poll

This goes in the direction of grouping modules by responsibility. The
api-binder module is the middleware between the device and the backend,
thus the target state polling code makes more sense there.

Change-type: patch
This commit is contained in:
Felipe Lalanne 2024-05-28 11:27:28 -04:00 committed by Felipe Lalanne
parent af1ef086fe
commit 9497eed380
No known key found for this signature in database
GPG Key ID: 03E696BFD472B26A
6 changed files with 5 additions and 5 deletions

View File

@ -21,7 +21,7 @@ import log from '../lib/supervisor-console';
import * as deviceState from '../device-state';
import * as globalEventBus from '../event-bus';
import * as TargetState from '../device-state/target-state';
import * as TargetState from './poll';
import * as logger from '../logger';
import * as apiHelper from '../lib/api-helper';

View File

@ -13,7 +13,7 @@ import { generateStep } from '../compose/composition-steps';
import * as commitStore from '../compose/commit';
import type { Service } from '../compose/service';
import { getApp } from '../device-state/db-format';
import * as TargetState from '../device-state/target-state';
import * as TargetState from '../api-binder/poll';
import log from '../lib/supervisor-console';
import blink = require('../lib/blink');
import * as constants from '../lib/constants';

View File

@ -11,7 +11,7 @@ import * as config from '~/src/config';
import * as hostConfig from '~/src/host-config';
import * as apiKeys from '~/lib/api-keys';
import * as actions from '~/src/device-api/actions';
import * as TargetState from '~/src/device-state/target-state';
import * as TargetState from '~/src/api-binder/poll';
import * as updateLock from '~/lib/update-lock';
import { pathOnRoot } from '~/lib/host-utils';
import { exec } from '~/lib/fs-utils';

View File

@ -12,7 +12,7 @@ import Log from '~/lib/supervisor-console';
import balenaAPI = require('~/test-lib/mocked-balena-api');
import { schema } from '~/src/config/schema';
import ConfigJsonConfigBackend from '~/src/config/configJson';
import * as TargetState from '~/src/device-state/target-state';
import * as TargetState from '~/src/api-binder/poll';
import * as ApiHelper from '~/lib/api-helper';
import supervisorVersion = require('~/lib/supervisor-version');
import * as eventTracker from '~/src/event-tracker';

View File

@ -5,7 +5,7 @@ import _ from 'lodash';
import rewire from 'rewire';
import { expect } from 'chai';
import * as TargetState from '~/src/device-state/target-state';
import * as TargetState from '~/src/api-binder/poll';
import Log from '~/lib/supervisor-console';
import * as request from '~/lib/request';
import * as deviceConfig from '~/src/device-config';