Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions src/commands/cloud/download-typings.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import type * as Config from '@oclif/config';

import { flags } from '@oclif/command';
import chalk from 'chalk';

import AbstractAuthenticatedCommand from '../../abstract-authenticated-command';

export default class DownloadTypingsCommand extends AbstractAuthenticatedCommand {
private env: { FOREST_SERVER_URL: string; FOREST_ENV_SECRET: string };

static override flags = {
format: flags.string({
char: 'o',
description: 'Output path',
default: './typings.d.ts',
}),
};

static override description = 'Download typings from your cloud project';

constructor(argv: string[], config: Config.IConfig, plan?) {
super(argv, config, plan);

const { assertPresent, env, projectRenderer } = this.context;
assertPresent({
env,
projectRenderer,
});

this.env = env;
}

async runAuthenticated() {
const parsed = this.parse(DownloadTypingsCommand);

// const config = { ...this.env, ...parsed.flags, ...(parsed.args as { projectId: string }) };
this.logger.info(chalk.bgGreenBright(`Downloading typings`));
}
}
30 changes: 30 additions & 0 deletions src/commands/cloud/publish.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import type * as Config from '@oclif/config';

import { flags } from '@oclif/command';
import chalk from 'chalk';

import AbstractAuthenticatedCommand from '../../abstract-authenticated-command';

export default class PublishCommand extends AbstractAuthenticatedCommand {
private env: { FOREST_SERVER_URL: string; FOREST_ENV_SECRET: string };

static override description = 'Publish your code';

constructor(argv: string[], config: Config.IConfig, plan?) {
super(argv, config, plan);

const { assertPresent, env, projectRenderer } = this.context;
assertPresent({
env,
projectRenderer,
});

this.env = env;
}

async runAuthenticated() {
const parsed = this.parse(PublishCommand);
// const config = { ...this.env, ...parsed.flags, ...(parsed.args as { projectId: string }) };
this.logger.info(chalk.bgGreenBright('publishing code to lambda'));
}
}