Skip to content

Commit

Permalink
feat: add support for listing Schema apps by organization
Browse files Browse the repository at this point in the history
  • Loading branch information
rossiam committed Aug 14, 2024
1 parent 99cfdb5 commit 77976d2
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 46 deletions.
5 changes: 5 additions & 0 deletions .changeset/green-mangos-pretend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@smartthings/cli": minor
---

add support for listing Schema apps by organization
64 changes: 24 additions & 40 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"@oclif/plugin-not-found": "^2.3.1",
"@oclif/plugin-plugins": "^2.1.0",
"@smartthings/cli-lib": "^2.2.4",
"@smartthings/core-sdk": "^8.1.2",
"@smartthings/core-sdk": "^8.2.0",
"@smartthings/plugin-cli-edge": "^3.3.3",
"inquirer": "^8.2.4",
"js-yaml": "^4.1.0",
Expand Down
3 changes: 2 additions & 1 deletion packages/cli/src/__tests__/commands/schema.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ describe('SchemaCommand', () => {

await expect(listFunction()).resolves.toStrictEqual([schemaApp])
expect(listSpy).toHaveBeenCalledTimes(1)
expect(listSpy).toHaveBeenCalledWith()
// TODO: when converting to yargs add case for testing with this flag set to true
expect(listSpy).toHaveBeenCalledWith({ includeAllOrganizations: undefined })
})
})
2 changes: 1 addition & 1 deletion packages/cli/src/commands/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export default class SchemaCommand extends APIOrganizationCommand<typeof SchemaC
}

await outputItemOrList(this, config, this.args.id,
() => this.client.schema.list(),
() => this.client.schema.list({ includeAllOrganizations: this.flags['all-organizations'] }),
id => this.client.schema.get(id),
)
}
Expand Down
2 changes: 1 addition & 1 deletion packages/edge/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"@log4js-node/log4js-api": "^1.0.2",
"@oclif/core": "^1.16.3",
"@smartthings/cli-lib": "^2.2.4",
"@smartthings/core-sdk": "^8.1.2",
"@smartthings/core-sdk": "^8.2.0",
"axios": "^0.28.0",
"inquirer": "^8.2.4",
"js-yaml": "^4.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"dependencies": {
"@log4js-node/log4js-api": "^1.0.2",
"@oclif/core": "^1.16.3",
"@smartthings/core-sdk": "^8.1.2",
"@smartthings/core-sdk": "^8.2.0",
"@types/eventsource": "^1.1.9",
"axios": "^0.28.0",
"chalk": "^4.1.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/testlib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
},
"dependencies": {
"@smartthings/cli-lib": "^2.2.4",
"@smartthings/core-sdk": "^8.1.2"
"@smartthings/core-sdk": "^8.2.0"
},
"devDependencies": {
"@types/jest": "^28.1.5",
Expand Down

0 comments on commit 77976d2

Please sign in to comment.