= {
goBack: vi.fn(),
proceed: vi.fn(),
watch: vi.fn((name: keyof typeof values) => values[name]) as any,
- register: vi.fn(),
+ register: vi.fn() as any,
formState: {
errors: { fields: { name: null } },
touchedFields: { fields: { name: true } },
diff --git a/protocol-designer/src/components/modals/FileUploadMessageModal/modalContents.tsx b/protocol-designer/src/components/modals/FileUploadMessageModal/modalContents.tsx
index cb323c80ce4..f09052a5c5f 100644
--- a/protocol-designer/src/components/modals/FileUploadMessageModal/modalContents.tsx
+++ b/protocol-designer/src/components/modals/FileUploadMessageModal/modalContents.tsx
@@ -195,7 +195,6 @@ export function useModalContents(
false,
`invalid messageKey ${uploadResponse.messageKey} specified for modal`
)
- // @ts-expect-error (ce, 2021-06-23) the case below will never happened, as we've already narrowed all posibilities
return { title: '', body: uploadResponse.messageKey }
}
}
diff --git a/protocol-designer/src/timelineMiddleware/__tests__/generateRobotStateTimeline.test.ts b/protocol-designer/src/timelineMiddleware/__tests__/generateRobotStateTimeline.test.ts
index 02f713835b3..dc4589e8515 100644
--- a/protocol-designer/src/timelineMiddleware/__tests__/generateRobotStateTimeline.test.ts
+++ b/protocol-designer/src/timelineMiddleware/__tests__/generateRobotStateTimeline.test.ts
@@ -130,8 +130,8 @@ describe('generateRobotStateTimeline', () => {
)
// NOTE: if you update this snapshot, make sure this it exhibits eager tip dropping
expect(commandOverview).toMatchInlineSnapshot(`
- Array [
- Array [
+ [
+ [
"pickUpTip",
"aspirate",
"dispense",
@@ -140,14 +140,14 @@ describe('generateRobotStateTimeline', () => {
"moveToAddressableAreaForDropTip",
"dropTipInPlace",
],
- Array [
+ [
"pickUpTip",
"aspirate",
"dispense",
"moveToAddressableAreaForDropTip",
"dropTipInPlace",
],
- Array [
+ [
"pickUpTip",
"aspirate",
"dispense",
diff --git a/protocol-designer/src/timelineMiddleware/generateRobotStateTimeline.ts b/protocol-designer/src/timelineMiddleware/generateRobotStateTimeline.ts
index 9af82141b7c..308c780b150 100644
--- a/protocol-designer/src/timelineMiddleware/generateRobotStateTimeline.ts
+++ b/protocol-designer/src/timelineMiddleware/generateRobotStateTimeline.ts
@@ -22,7 +22,6 @@ export interface GenerateRobotStateTimelineArgs {
export const generateRobotStateTimeline = (
args: GenerateRobotStateTimelineArgs
): StepGeneration.Timeline => {
- console.log('got to generateRobotStateTimeline')
const {
allStepArgsAndErrors,
orderedStepIds,
diff --git a/protocol-designer/tsconfig-data.json b/protocol-designer/tsconfig-data.json
index 1aad3b0f529..79a9673faa9 100644
--- a/protocol-designer/tsconfig-data.json
+++ b/protocol-designer/tsconfig-data.json
@@ -7,6 +7,6 @@
"rootDir": ".",
"outDir": "lib"
},
- "include": ["src/**/*.json", "fixtures/**/*.json"],
+ "include": ["src/**/*.json", "fixtures/**/*.json", "vite.config.ts"],
"exclude": ["**/*.ts", "**/*.tsx"]
}
diff --git a/protocol-designer/tsconfig.json b/protocol-designer/tsconfig.json
index 4a7f7ac1673..6a2a9eac5bd 100644
--- a/protocol-designer/tsconfig.json
+++ b/protocol-designer/tsconfig.json
@@ -12,8 +12,7 @@
},
{
"path": "../step-generation"
- },
- { "path": "./tsconfig.node.json" }
+ }
],
"compilerOptions": {
"rootDir": "src",
diff --git a/protocol-designer/tsconfig.node.json b/protocol-designer/tsconfig.node.json
deleted file mode 100644
index ebe804848f5..00000000000
--- a/protocol-designer/tsconfig.node.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "compilerOptions": {
- "composite": true,
- "skipLibCheck": true,
- "moduleResolution": "node",
- "allowSyntheticDefaultImports": true
- },
- "include": ["vite.config.ts"]
-}
diff --git a/protocol-designer/typings/global.d.ts b/protocol-designer/typings/global.d.ts
index 9fe08d2ebd8..2d45e0b9aaa 100644
--- a/protocol-designer/typings/global.d.ts
+++ b/protocol-designer/typings/global.d.ts
@@ -1,12 +1,12 @@
-declare global {
- interface Global {
- document: {
- getElementsByClassName: (val: string) => any[]
- }
- enablePrereleaseMode: () => void
+declare const global: typeof globalThis & {
+ document: {
+ getElementsByClassName: (val: string) => any[]
}
+ enablePrereleaseMode: () => void
+
}
+
interface Window {
__REDUX_DEVTOOLS_EXTENSION_COMPOSE__: (val: string) => any
}
\ No newline at end of file
diff --git a/step-generation/src/fixtures/commandFixtures.ts b/step-generation/src/fixtures/commandFixtures.ts
index 2948525d24d..2c38a361ee7 100644
--- a/step-generation/src/fixtures/commandFixtures.ts
+++ b/step-generation/src/fixtures/commandFixtures.ts
@@ -1,5 +1,12 @@
import { expect } from 'vitest'
-import { tiprackWellNamesFlat } from './data'
+import {
+ tiprackWellNamesFlat,
+ DEFAULT_PIPETTE,
+ SOURCE_LABWARE,
+ AIR_GAP_META,
+ DEFAULT_BLOWOUT_WELL,
+ DEST_LABWARE,
+} from './data'
import {
AddressableAreaName,
AspDispAirgapParams,
@@ -89,17 +96,6 @@ export const getFlowRateAndOffsetParamsMix = (): FlowRateAndOffsetParamsMix => (
// for mix only
touchTipMmFromBottom: TOUCH_TIP_OFFSET_FROM_BOTTOM_MM,
})
-// =================
-export const DEFAULT_PIPETTE = 'p300SingleId'
-export const MULTI_PIPETTE = 'p300MultiId'
-export const PIPETTE_96 = 'p100096Id'
-export const SOURCE_LABWARE = 'sourcePlateId'
-export const DEST_LABWARE = 'destPlateId'
-export const TROUGH_LABWARE = 'troughId'
-export const DEFAULT_BLOWOUT_WELL = 'A1'
-export const TIPRACK_1 = 'tiprack1Id'
-export const AIR_GAP_META = { isAirGap: true } // to differentiate if the aspirate or dispense command is an air gap or not
-// =================
type MakeAspDispHelper = (
bakedParams?: Partial
) => (well: string, volume: number, params?: Partial
) => CreateCommand
diff --git a/step-generation/src/fixtures/index.ts b/step-generation/src/fixtures/index.ts
index ed7f6c08311..be0ce610c9c 100644
--- a/step-generation/src/fixtures/index.ts
+++ b/step-generation/src/fixtures/index.ts
@@ -1,2 +1,3 @@
export * from './robotStateFixtures'
export * from './commandFixtures'
+export * from './data'
diff --git a/step-generation/src/index.ts b/step-generation/src/index.ts
index 36c4b115386..7b918ed0c68 100644
--- a/step-generation/src/index.ts
+++ b/step-generation/src/index.ts
@@ -30,3 +30,4 @@ export * from './types'
export * from './constants'
export * from './getNextRobotStateAndWarnings'
export * from './fixtures/robotStateFixtures'
+export * from './fixtures/data'
diff --git a/step-generation/src/utils/index.ts b/step-generation/src/utils/index.ts
index a5df9164f09..ac363cbcd97 100644
--- a/step-generation/src/utils/index.ts
+++ b/step-generation/src/utils/index.ts
@@ -5,6 +5,7 @@ import { reduceCommandCreators } from './reduceCommandCreators'
import { modulePipetteCollision } from './modulePipetteCollision'
import { thermocyclerPipetteCollision } from './thermocyclerPipetteCollision'
import { getLabwareSlot } from './getLabwareSlot'
+import { movableTrashCommandsUtil } from './movableTrashCommandsUtil'
export {
commandCreatorsTimeline,
@@ -13,6 +14,7 @@ export {
modulePipetteCollision,
thermocyclerPipetteCollision,
getLabwareSlot,
+ movableTrashCommandsUtil,
}
export * from './commandCreatorArgsGetters'
export * from './heaterShakerCollision'
diff --git a/step-generation/tsconfig.json b/step-generation/tsconfig.json
index ee6bdb2ec23..c6a7b651e8e 100644
--- a/step-generation/tsconfig.json
+++ b/step-generation/tsconfig.json
@@ -8,6 +8,7 @@
"compilerOptions": {
"composite": true,
"noErrorTruncation": true,
+ "emitDeclarationOnly": false,
"rootDir": "src",
"outDir": "lib"
},
diff --git a/tsconfig-base.json b/tsconfig-base.json
index cc899f23299..47271f50eba 100644
--- a/tsconfig-base.json
+++ b/tsconfig-base.json
@@ -13,8 +13,5 @@
"skipLibCheck": true,
"moduleResolution": "node",
"types": ["vite/client", "vitest/globals", "@testing-library/jest-dom"],
- "paths": {
- "@opentrons/shared-data": ["./shared-data"]
- }
}
}
diff --git a/usb-bridge/node-client/src/cli.ts b/usb-bridge/node-client/src/cli.ts
deleted file mode 100644
index e34c14a4731..00000000000
--- a/usb-bridge/node-client/src/cli.ts
+++ /dev/null
@@ -1,112 +0,0 @@
-import Yargs from 'yargs'
-import { buildUSBAgent } from './usb-agent'
-import fetch from 'node-fetch'
-
-import type { MiddlewareFunction } from 'yargs'
-
-type LogLevel =
- | 'error'
- | 'warn'
- | 'info'
- | 'http'
- | 'verbose'
- | 'debug'
- | 'silly'
-
-const LOG_LVLS: LogLevel[] = [
- 'error',
- 'warn',
- 'info',
- 'http',
- 'verbose',
- 'debug',
- 'silly',
-]
-
-type Logger = Record void>
-
-interface Argv {
- logLevel: LogLevel | string
-}
-
-interface CurlArgv extends Argv {
- serialPath: string
- method: string
- httpPath: string
-}
-
-const createLogger = (argv: Argv): Logger => {
- const level = (LOG_LVLS as string[]).indexOf(argv.logLevel)
-
- return {
- error: level >= 0 ? console.error : () => {},
- warn: level >= 1 ? console.warn : () => {},
- info: level >= 2 ? console.info : () => {},
- http: level >= 3 ? console.debug : () => {},
- verbose: level >= 4 ? console.debug : () => {},
- debug: level >= 5 ? console.debug : () => {},
- silly: level >= 6 ? console.debug : () => {},
- }
-}
-
-const debugLogArgvMiddleware: MiddlewareFunction = (argv): void => {
- const log = createLogger(argv)
- log.debug(`Calling ${argv.$0} with argv:`, argv)
-
- // @ts-expect-error(mc, 2021-02-16): this return is probably unnecessary, remove
- return argv
-}
-
-function curl(argv: CurlArgv): void {
- const log = createLogger(argv)
- log.verbose(`building agent for ${argv.serialPath}`)
- const agent = buildUSBAgent({ serialPort: argv.serialPath })
- const fakePath = `http://www.company.com/${argv.httpPath}`
- log.info(`starting fetch to ${fakePath}`)
- fetch(fakePath, {
- method: argv.method,
- agent: agent,
- headers: {
- 'opentrons-version': '2',
- },
- })
- .then(res => res.text())
- .then(text => console.log(text))
- .finally(() => {
- log.info('done, closing connection')
- agent.destroy()
- })
-}
-
-Yargs.options({
- logLevel: {
- describe: 'Log level',
- alias: 'l',
- choices: [...LOG_LVLS, 'off'],
- default: 'info',
- },
-})
- .middleware([debugLogArgvMiddleware])
- .command(
- 'usb-curl ',
- 'Provide a curl-like interface that will make a request via the specified USB serial',
- yargs => {
- yargs.positional('serialPath', {
- describe: 'Path to serial port to communicate with',
- type: 'string',
- })
- yargs.positional('method', {
- describe: 'HTTP method',
- type: 'string',
- })
- yargs.positional('httpPath', {
- describe: 'Path to query',
- type: 'string',
- })
- },
- curl
- )
- .strict()
- .version(_PKG_VERSION_)
- .help()
- .parse()