Skip to content

Commit

Permalink
fix: serialization of defaultMemberPermissions
Browse files Browse the repository at this point in the history
  • Loading branch information
jacoobes committed Sep 25, 2023
1 parent 816b48b commit 42232e3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/commands/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { pathExists, pathExistsSync } from 'find-up';
import { mkdir, writeFile } from 'fs/promises';
import * as Preprocessor from '../utilities/preprocessor';
import { bold, magentaBright } from 'colorette';
import { fileURLToPath } from 'url'

type BuildOptions = {
/**
* Define __VERSION__
Expand Down
2 changes: 1 addition & 1 deletion src/commands/publish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export async function publish(commandDir: string | undefined, args: Partial<Publ
// assign args.import to empty array if non existent
args.import ??= [];

args.token && console.info('token passed through command line');
args.token && console.info('Token passed through command line');
args.applicationId && console.info('applicationId passed through command line');
commandDir && console.info('Publishing with override path: ', commandDir);

Expand Down
8 changes: 4 additions & 4 deletions src/create-publish.mts
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,12 @@ const makeDescription = (type: number, desc: string) => {
};
const serialize = (permissions: unknown) => {
if(typeof permissions === 'bigint') {
return permissions;
return permissions.toString();
}
if(Array.isArray(permissions)) {
return permissions.reduce((acc, cur) => {
return acc | cur;
}, 0)
return permissions
.reduce((acc, cur) => acc | cur, BigInt(0))
.toString()
}
return null;
}
Expand Down

0 comments on commit 42232e3

Please sign in to comment.