chore:little fixes and formating and linting and patches
This commit is contained in:
@@ -50,7 +50,9 @@ async function promptForInput() {
|
||||
name: 'polarApiKey',
|
||||
message: 'Enter your Polar API key:',
|
||||
validate: (input: string) => {
|
||||
if (!input) return 'API key is required';
|
||||
if (!input) {
|
||||
return 'API key is required';
|
||||
}
|
||||
return true;
|
||||
},
|
||||
},
|
||||
@@ -63,7 +65,7 @@ async function promptForInput() {
|
||||
.filter(
|
||||
(org) =>
|
||||
org.name.toLowerCase().includes(input.toLowerCase()) ||
|
||||
org.id.toLowerCase().includes(input.toLowerCase()),
|
||||
org.id.toLowerCase().includes(input.toLowerCase())
|
||||
)
|
||||
.map((org) => ({
|
||||
name: `${org.name} (${org.id})`,
|
||||
@@ -99,7 +101,7 @@ async function promptForInput() {
|
||||
.includes(input.toLowerCase()) ||
|
||||
member.user?.firstName
|
||||
?.toLowerCase()
|
||||
.includes(input.toLowerCase()),
|
||||
.includes(input.toLowerCase())
|
||||
)
|
||||
.map((member) => ({
|
||||
name: `${
|
||||
@@ -108,7 +110,7 @@ async function promptForInput() {
|
||||
.join(' ') || 'No name'
|
||||
} (${member.user?.email}) [${member.role}]`,
|
||||
value: member.user?.id,
|
||||
})),
|
||||
}))
|
||||
);
|
||||
},
|
||||
},
|
||||
@@ -126,8 +128,12 @@ async function promptForInput() {
|
||||
name: 'price',
|
||||
message: 'Enter price',
|
||||
validate: (input: number) => {
|
||||
if (!Number.isInteger(input)) return false;
|
||||
if (input < 0) return false;
|
||||
if (!Number.isInteger(input)) {
|
||||
return false;
|
||||
}
|
||||
if (input < 0) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
},
|
||||
@@ -136,8 +142,12 @@ async function promptForInput() {
|
||||
name: 'eventsLimit',
|
||||
message: 'Enter events limit:',
|
||||
validate: (input: number) => {
|
||||
if (!Number.isInteger(input)) return false;
|
||||
if (input < 0) return false;
|
||||
if (!Number.isInteger(input)) {
|
||||
return false;
|
||||
}
|
||||
if (input < 0) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
},
|
||||
@@ -232,7 +242,7 @@ async function main() {
|
||||
? 'https://dashboard.openpanel.dev'
|
||||
: 'http://localhost:3000',
|
||||
organization.id,
|
||||
organization.projects[0]?.id,
|
||||
organization.projects[0]?.id
|
||||
),
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user