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
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@apillon/cli",
"description": "▶◀ Apillon CLI tools ▶◀",
"version": "1.8.0",
"version": "1.9.0",
"author": "Apillon",
"license": "MIT",
"main": "./dist/index.js",
Expand Down
1 change: 1 addition & 0 deletions packages/cli/src/modules/hosting/hosting.commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export function createHostingCommands(cli: Command) {
.argument('<path>', 'path to folder with website files')
.requiredOption('--uuid <website uuid>', 'UUID of website to deploy')
.option('-p, --preview', 'deploys to staging environment')
.option('--name <deployment name>', 'Name of the deployment')
.action(async function (path) {
await deployWebsite(path, this.optsWithGlobals());
});
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@apillon/sdk",
"description": "▶◀ Apillon SDK for NodeJS ▶◀",
"version": "3.12.0",
"version": "3.13.0",
"author": "Apillon",
"license": "MIT",
"main": "./dist/index.js",
Expand Down
6 changes: 3 additions & 3 deletions packages/sdk/src/modules/hosting/hosting-website.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { ApillonApi } from '../../lib/apillon-api';
import { ApillonLogger } from '../../lib/apillon-logger';
import { uploadFiles } from '../../util/file-utils';
import { ApillonModel } from '../../lib/apillon';
import { FileMetadata, IFileUploadRequest } from '../../types/storage';
import { FileMetadata, IDeployRequest, IFileUploadRequest } from '../../types/storage';

export class HostingWebsite extends ApillonModel {
/**
Expand Down Expand Up @@ -114,7 +114,7 @@ export class HostingWebsite extends ApillonModel {
* @param {DeployToEnvironment} toEnvironment The environment to deploy to
* @returns Newly created deployment
*/
public async deploy(toEnvironment: DeployToEnvironment) {
public async deploy(toEnvironment: DeployToEnvironment, params?: IDeployRequest) {
ApillonLogger.log(
`Deploying website ${this.uuid} to IPFS (${
toEnvironment === DeployToEnvironment.TO_STAGING
Expand All @@ -126,7 +126,7 @@ export class HostingWebsite extends ApillonModel {
ApillonLogger.logWithTime('Initiating deployment');
const data = await ApillonApi.post<Deployment & { deploymentUuid: string }>(
`${this.API_PREFIX}/deploy`,
{ environment: toEnvironment },
{ environment: toEnvironment, ...params },
);

ApillonLogger.logWithTime('Deployment in progress');
Expand Down
7 changes: 7 additions & 0 deletions packages/sdk/src/types/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,13 @@ export interface IFileUploadRequest {
ignoreFiles?: boolean;
}

export interface IDeployRequest {
/**
* Name of the deployment.
*/
name?: string;
}

export interface IFileUploadResponse {
files: FileMetadata[];
sessionUuid: string;
Expand Down