Skip to content
Merged
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
141 changes: 64 additions & 77 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"/oclif.manifest.json"
],
"dependencies": {
"@contentstack/cli-command": "^1.2.11",
"@contentstack/cli-utilities": "^1.5.1",
"@contentstack/cli-command": "^1.2.16",
"@contentstack/cli-utilities": "^1.5.8",
"adm-zip": "^0.5.10",
"chalk": "^4.1.2",
"lodash": "^4.17.21",
Expand Down
10 changes: 4 additions & 6 deletions src/commands/app/base-command.ts → src/base-command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import {
cliux,
} from "@contentstack/cli-utilities";

import config from "../../config";
import { ConfigType, LogFn } from "../../types";
import { Logger, getDeveloperHubUrl } from "../../util";
import messages, { $t, commonMsg } from "../../messages";
import config from "./config";
import { ConfigType, LogFn } from "./types";
import { Logger, getDeveloperHubUrl } from "./util";
import messages, { $t, commonMsg } from "./messages";

export type Flags<T extends typeof Command> = Interfaces.InferredFlags<
(typeof BaseCommand)["baseFlags"] & T["flags"]
Expand All @@ -42,8 +42,6 @@ export abstract class BaseCommand<T extends typeof Command> extends Command {
protected flags!: Flags<T>;
protected args!: Args<T>;

static hidden = true;

// NOTE define flags that can be inherited by any command that extends BaseCommand
static baseFlags: FlagInput = {
org: Flags.string({
Expand Down
3 changes: 1 addition & 2 deletions src/commands/app/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
} from "fs";
import { ux, cliux, flags, HttpClient } from "@contentstack/cli-utilities";

import { BaseCommand } from "./base-command";
import { BaseCommand } from "../../base-command";
import { AppManifest, AppType } from "../../types";
import { appCreate, commonMsg } from "../../messages";
import {
Expand All @@ -28,7 +28,6 @@ import {

export default class Create extends BaseCommand<typeof Create> {
private appData!: AppManifest;
static hidden: boolean = false;

static description =
"Create a new app in Developer Hub and optionally clone a boilerplate locally.";
Expand Down
4 changes: 1 addition & 3 deletions src/commands/app/delete.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import { BaseCommand } from "./base-command";
import { BaseCommand } from "../../base-command";
import { cliux, flags } from "@contentstack/cli-utilities";
import { $t, commonMsg, deleteAppMsg } from "../../messages";
import { getOrg, fetchAppInstallations, deleteApp, getApp } from "../../util";

export default class Delete extends BaseCommand<typeof Delete> {
static hidden: boolean = false;

static description = "Delete app from marketplace";

static examples = [
Expand Down
4 changes: 1 addition & 3 deletions src/commands/app/get.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import { BaseCommand } from "./base-command";
import { BaseCommand } from "../../base-command";
import { getOrg, getApp, writeFile, fetchApp } from "../../util";
import { flags } from "@contentstack/cli-utilities";
import { commonMsg } from "../../messages";

export default class Get extends BaseCommand<typeof Get> {
static hidden: boolean = false;

static description = "Get details of an app in developer hub";

static examples = [
Expand Down
2 changes: 0 additions & 2 deletions src/commands/app/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import { print } from "../../util/log";
export default class App extends Command {
static description = "Apps CLI plugin";

static hidden: boolean = true;

static examples = [
"$ <%= config.bin %> <%= command.id %>:create",
"$ <%= config.bin %> <%= command.id %>:get",
Expand Down
Loading