Skip to content

Commit aaa1f06

Browse files
committed
chore(cli)!: Generate - remove support for --user-context, please use -p (--payload)
1 parent 922515d commit aaa1f06

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

packages/cubejs-cli/src/command/token.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -52,20 +52,6 @@ export const token = async (options: TokenOptions) => {
5252
...parsePayload(options.payload),
5353
};
5454

55-
const userContext = parsePayload(options.userContext);
56-
if (userContext) {
57-
displayWarning('Option --user-context was deprecated and payload will be stored inside root instead of u');
58-
59-
// eslint-disable-next-line no-restricted-syntax
60-
for (const key of Object.keys(userContext)) {
61-
if (key in payload) {
62-
displayWarning(`Key ${key} already exists inside payload and will be overritten by user-context`);
63-
}
64-
65-
payload[key] = userContext[key];
66-
}
67-
}
68-
6955
console.log('Generating Cube JWT token');
7056
console.log('');
7157
console.log(`${chalk.yellow('-----------------------------------------------------------------------------------------')}`);
@@ -95,7 +81,6 @@ export function configureTokenCommand(program: CommanderStatic) {
9581
.option('-e, --expiry [expiry]', 'Token expiry. Set to 0 for no expiry')
9682
.option('-s, --secret [secret]', 'Cube app secret. Also can be set via environment variable CUBEJS_API_SECRET')
9783
.option('-p, --payload [values]', 'Payload. Example: -p foo=bar', collect, [])
98-
.option('-u, --user-context [values]', 'USER_CONTEXT. Example: -u baz=qux', collect, [])
9984
.description('Create JWT token')
10085
.action(
10186
(options) => token(options)

0 commit comments

Comments
 (0)