So I'm trying to get smartthings-cli working on FreeBSD:
I downloaded the source code and figured out it was in Typescript format. So I installed Node.js and use ndm to install the Typescript compiler. I then tried running "tsc" in the smartthings-cli directory but it complained about a lot. I'm way out of my familiarity league here so it's at this point I pause and ask here for guidance.
I downloaded the source code and figured out it was in Typescript format. So I installed Node.js and use ndm to install the Typescript compiler. I then tried running "tsc" in the smartthings-cli directory but it complained about a lot. I'm way out of my familiarity league here so it's at this point I pause and ask here for guidance.
Code:
scott@FreeBSD-VM:/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1 $ tsc
error TS6305: Output file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/dist/__tests__/test-lib/mock-command.d.ts' has not been built from source file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/src/__tests__/test-lib/mock-command.ts'.
The file is in the program because:
Matched by default include pattern '**/*'
error TS6305: Output file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/dist/__tests__/test-lib/simple-type.d.ts' has not been built from source file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/src/__tests__/test-lib/simple-type.ts'.
The file is in the program because:
Matched by default include pattern '**/*'
error TS6305: Output file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/dist/format.d.ts' has not been built from source file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/src/format.ts'.
The file is in the program because:
Matched by default include pattern '**/*'
error TS6305: Output file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/dist/input-builder.d.ts' has not been built from source file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/src/input-builder.ts'.
The file is in the program because:
Matched by default include pattern '**/*'
error TS6305: Output file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/dist/input.d.ts' has not been built from source file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/src/input.ts'.
The file is in the program because:
Matched by default include pattern '**/*'
error TS6305: Output file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/dist/io-util.d.ts' has not been built from source file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/src/io-util.ts'.
The file is in the program because:
Matched by default include pattern '**/*'
error TS6305: Output file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/dist/item-input/array.d.ts' has not been built from source file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/src/item-input/array.ts'.
The file is in the program because:
Matched by default include pattern '**/*'
error TS6305: Output file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/dist/item-input/command-helpers.d.ts' has not been built from source file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/src/item-input/command-helpers.ts'.
The file is in the program because:
Matched by default include pattern '**/*'
error TS6305: Output file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/dist/item-input/defs.d.ts' has not been built from source file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/src/item-input/defs.ts'.
The file is in the program because:
Matched by default include pattern '**/*'
error TS6305: Output file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/dist/item-input/index.d.ts' has not been built from source file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/src/item-input/index.ts'.
The file is in the program because:
Matched by default include pattern '**/*'
error TS6305: Output file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/dist/item-input/object.d.ts' has not been built from source file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/src/item-input/object.ts'.
The file is in the program because:
Matched by default include pattern '**/*'
error TS6305: Output file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/dist/listing-io.d.ts' has not been built from source file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/src/listing-io.ts'.
The file is in the program because:
Matched by default include pattern '**/*'
error TS6305: Output file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/dist/login-authenticator.d.ts' has not been built from source file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/src/login-authenticator.ts'.
The file is in the program because:
Matched by default include pattern '**/*'
error TS6305: Output file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/dist/output-builder.d.ts' has not been built from source file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/src/output-builder.ts'.
The file is in the program because:
Matched by default include pattern '**/*'
error TS6305: Output file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/dist/output.d.ts' has not been built from source file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/src/output.ts'.
The file is in the program because:
Matched by default include pattern '**/*'
error TS6305: Output file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/dist/select.d.ts' has not been built from source file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/src/select.ts'.
The file is in the program because:
Matched by default include pattern '**/*'
error TS6305: Output file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/dist/smartthings-command.d.ts' has not been built from source file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/src/smartthings-command.ts'.
The file is in the program because:
Matched by default include pattern '**/*'
error TS6305: Output file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/dist/sse-command.d.ts' has not been built from source file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/src/sse-command.ts'.
The file is in the program because:
Matched by default include pattern '**/*'
error TS6305: Output file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/dist/sse-io.d.ts' has not been built from source file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/src/sse-io.ts'.
The file is in the program because:
Matched by default include pattern '**/*'
error TS6305: Output file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/dist/sse-util.d.ts' has not been built from source file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/src/sse-util.ts'.
The file is in the program because:
Matched by default include pattern '**/*'
error TS6305: Output file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/dist/table-generator.d.ts' has not been built from source file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/src/table-generator.ts'.
The file is in the program because:
Matched by default include pattern '**/*'
error TS6305: Output file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/dist/user-query.d.ts' has not been built from source file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/src/user-query.ts'.
The file is in the program because:
Matched by default include pattern '**/*'
error TS6305: Output file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/dist/util.d.ts' has not been built from source file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/src/util.ts'.
The file is in the program because:
Matched by default include pattern '**/*'
error TS6305: Output file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/dist/validate-util.d.ts' has not been built from source file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/src/validate-util.ts'.
The file is in the program because:
Matched by default include pattern '**/*'
Found 24 errors.
Code:
scott@FreeBSD-VM:/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib $ tsc
src/__tests__/select.test.ts:56:37 - error TS2345: Argument of type '{ tableFieldDefinitions: never[]; primaryKeyName: string; sortKeyName: string; }' is not assignable to parameter of type 'SelectFromListConfig<object>'.
Type '{ tableFieldDefinitions: never[]; primaryKeyName: string; sortKeyName: string; }' is not assignable to type 'Sorting<object> & Naming & CustomCommonListOutputProducer<object>'.
Type '{ tableFieldDefinitions: never[]; primaryKeyName: string; sortKeyName: string; }' is not assignable to type 'Sorting<object>'.
Types of property 'primaryKeyName' are incompatible.
Type 'string' is not assignable to type 'never'.
56 expect(await promptUser(command, config, { listItems })).toBe('chosen-id')
~~~~~~
src/__tests__/select.test.ts:77:37 - error TS2345: Argument of type '{ tableFieldDefinitions: never[]; primaryKeyName: string; sortKeyName: string; }' is not assignable to parameter of type 'SelectFromListConfig<object>'.
77 expect(await promptUser(command, config, { listItems })).toBe('chosen-id')
~~~~~~
src/__tests__/select.test.ts:90:37 - error TS2345: Argument of type '{ tableFieldDefinitions: never[]; primaryKeyName: string; sortKeyName: string; }' is not assignable to parameter of type 'SelectFromListConfig<object>'.
90 expect(await promptUser(command, config, { listItems, autoChoose: true })).toBe('string-id-1')
~~~~~~
src/__tests__/select.test.ts:103:41 - error TS2345: Argument of type '{ tableFieldDefinitions: never[]; primaryKeyName: string; sortKeyName: string; }' is not assignable to parameter of type 'SelectFromListConfig<object>'.
103 await expect(selectFromList(command, config, { listItems })).rejects.toThrow('should exit')
~~~~~~
src/__tests__/select.test.ts:116:37 - error TS2345: Argument of type '{ tableFieldDefinitions: never[]; primaryKeyName: string; sortKeyName: string; }' is not assignable to parameter of type 'SelectFromListConfig<object>'.
116 expect(await promptUser(command, config, { listItems, getIdFromUser })).toBe('special-id')
~~~~~~
src/__tests__/select.test.ts:131:41 - error TS2345: Argument of type '{ itemName: string; tableFieldDefinitions: never[]; primaryKeyName: string; sortKeyName: string; }' is not assignable to parameter of type 'SelectFromListConfig<object>'.
Type '{ itemName: string; tableFieldDefinitions: never[]; primaryKeyName: string; sortKeyName: string; }' is not assignable to type 'Sorting<object> & Naming & CustomCommonListOutputProducer<object>'.
Type '{ itemName: string; tableFieldDefinitions: never[]; primaryKeyName: string; sortKeyName: string; }' is not assignable to type 'Sorting<object>'.
Types of property 'primaryKeyName' are incompatible.
Type 'string' is not assignable to type 'never'.
131 expect(await selectFromList(command, configWithName, { listItems })).toBe('chosen-id')
~~~~~~~~~~~~~~
src/__tests__/select.test.ts:143:41 - error TS2345: Argument of type '{ tableFieldDefinitions: never[]; primaryKeyName: string; sortKeyName: string; }' is not assignable to parameter of type 'SelectFromListConfig<object>'.
143 expect(await selectFromList(command, config, { listItems, promptMessage: 'custom prompt' }))
~~~~~~
src/__tests__/select.test.ts:167:41 - error TS2345: Argument of type '{ tableFieldDefinitions: never[]; primaryKeyName: string; sortKeyName: string; }' is not assignable to parameter of type 'SelectFromListConfig<object>'.
167 expect(await selectFromList(command, config, { preselectedId: 'sample-id', listItems }))
~~~~~~
src/__tests__/select.test.ts:183:41 - error TS2345: Argument of type '{ tableFieldDefinitions: never[]; primaryKeyName: string; sortKeyName: string; }' is not assignable to parameter of type 'SelectFromListConfig<object>'.
183 expect(await selectFromList(command, config, { listItems }))
~~~~~~
Found 9 errors in the same file, starting at: src/__tests__/select.test.ts:56