Skip to content

Commit

Permalink
📦 - Packaged for Release
Browse files Browse the repository at this point in the history
  • Loading branch information
zrosenbauer committed Jan 3, 2023
1 parent c16b230 commit a1ffbdd
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ exports.validateAppName = void 0;
const github = __importStar(__nccwpck_require__(5438));
const axios_1 = __importDefault(__nccwpck_require__(6545));
const github_1 = __nccwpck_require__(2979);
const API_URL = (_a = process.env.DEBUG___URL_API_LAUNCHPAD) !== null && _a !== void 0 ? _a : 'https://launchpad-api.bluenova-app.com';
const API_URL = (_a = process.env.DEBUG___URL_API_LAUNCHPAD) !== null && _a !== void 0 ? _a : 'https://api.codereviews.ai';
// Utils
// -----
function validateAppName(appName) {
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/lib/launchpad.js

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

2 changes: 1 addition & 1 deletion dist/lib/launchpad.js.map

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

12 changes: 6 additions & 6 deletions src/lib/launchpad.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export interface Organization {
// Utils
// -----

export function validateAppName (appName: string) {
export function validateAppName(appName: string) {
if (!/^([a-z]+)$/.test(appName)) {
throw new Error(`The appName "${appName}" is invalid, as it must be all lower case, no number and no special characters`);
}
Expand Down Expand Up @@ -49,7 +49,7 @@ export default class LaunchPad {
private isSetup = false;
private readonly envVars?: string;

constructor (props: LaunchPadConfig) {
constructor(props: LaunchPadConfig) {
this.apiKey = props.apiKey;
this.name = props.name;
this.port = props.port;
Expand All @@ -60,7 +60,7 @@ export default class LaunchPad {
this.branch = getBranch();
}

public async setup (): Promise<void> {
public async setup(): Promise<void> {
const organization = await this.readOrganization();

this.projectId = organization.projectId;
Expand All @@ -69,7 +69,7 @@ export default class LaunchPad {
this.isSetup = true;
}

public async createDeployment (): Promise<Deployment> {
public async createDeployment(): Promise<Deployment> {
this.assertSetup();

const result = await axios.post(`${API_URL}/deployments`, {
Expand All @@ -86,12 +86,12 @@ export default class LaunchPad {
return result.data;
}

private async readOrganization (): Promise<Organization> {
private async readOrganization(): Promise<Organization> {
const result = await axios.get(`${API_URL}/organizations/${this.apiKey}`);
return result.data;
}

private assertSetup () {
private assertSetup() {
if (!this.isSetup) {
throw new Error('You must call the "LaunchPad#setup" method before running any commands');
}
Expand Down
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { parseListInputs } from './lib/parser';
import * as github from './lib/github';
import Docker from './lib/docker';

async function run (): Promise<void> {
async function run(): Promise<void> {
try {
const serviceAccountKey = core.getInput('service_account_key');
const directory = core.getInput('directory');
Expand Down

0 comments on commit a1ffbdd

Please sign in to comment.