@contentstack/cli-cm-bootstrap 1.4.7 → 1.4.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -15,7 +15,7 @@ $ npm install -g @contentstack/cli-cm-bootstrap
15
15
  $ csdx COMMAND
16
16
  running command...
17
17
  $ csdx (--version)
18
- @contentstack/cli-cm-bootstrap/1.4.7 linux-x64 node-v16.20.0
18
+ @contentstack/cli-cm-bootstrap/1.4.8 linux-x64 node-v16.20.0
19
19
  $ csdx --help [COMMAND]
20
20
  USAGE
21
21
  $ csdx COMMAND
@@ -0,0 +1,4 @@
1
+ export default class BootstrapError extends Error {
2
+ suggestions: string[];
3
+ constructor(message: string, suggestions: string[]);
4
+ }
@@ -0,0 +1,18 @@
1
+ /// <reference types="node" />
2
+ import { Stream } from 'stream';
3
+ export interface Repo {
4
+ user: string;
5
+ name: string;
6
+ branch?: string;
7
+ }
8
+ export default class GitHubClient {
9
+ readonly gitTarBallUrl: string;
10
+ readonly repo: Repo;
11
+ readonly private: boolean;
12
+ readonly accessToken?: string;
13
+ static parsePath(gitPath?: string): Repo;
14
+ constructor(repo: Repo, privateRepo?: boolean, token?: string);
15
+ getLatest(destination: string): Promise<void>;
16
+ streamRelease(url: string): Promise<Stream>;
17
+ extract(destination: string, stream: Stream): Promise<any>;
18
+ }
@@ -0,0 +1,4 @@
1
+ export default class GithubError extends Error {
2
+ status: number;
3
+ constructor(message: string, status: number);
4
+ }
@@ -0,0 +1,36 @@
1
+ import { AppConfig } from '../config';
2
+ export declare const ENGLISH_LOCALE = "en-us";
3
+ export interface BootstrapOptions {
4
+ cloneDirectory: string;
5
+ seedParams: SeedParams;
6
+ appConfig: AppConfig;
7
+ managementAPIClient: any;
8
+ region: any;
9
+ accessToken?: string;
10
+ appType: string;
11
+ livePreviewEnabled?: boolean;
12
+ }
13
+ export interface SeedParams {
14
+ stackAPIKey?: string;
15
+ org?: string;
16
+ stackName?: string;
17
+ yes?: string;
18
+ }
19
+ /**
20
+ * @description Bootstraps the sample app
21
+ * Clone the repo
22
+ * Create the stack from the source
23
+ * Setup the environment
24
+ * Ready to use!!
25
+ */
26
+ export default class Bootstrap {
27
+ options: BootstrapOptions;
28
+ private readonly ghClient;
29
+ private repo;
30
+ private appConfig;
31
+ private region;
32
+ private managementAPIClient;
33
+ private cloneDirectory;
34
+ constructor(options: BootstrapOptions);
35
+ run(): Promise<any>;
36
+ }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @description Inquire starter app
3
+ */
4
+ export declare function inquireApp(apps: Array<any>): Promise<any>;
5
+ /**
6
+ * @description Inquire clone destination directory
7
+ */
8
+ export declare function inquireCloneDirectory(): Promise<string>;
9
+ export declare function inquireGithubAccessToken(): Promise<any>;
10
+ export declare function inquireAppType(): Promise<string>;
11
+ export declare function inquireLivePreviewSupport(): Promise<any>;
@@ -0,0 +1,8 @@
1
+ import { AppConfig } from '../config';
2
+ /**
3
+ * @description Setup the environment for a given app for each environment
4
+ * Loads the environments for a given stack
5
+ * Create delivery token
6
+ * Create enviroment
7
+ */
8
+ export declare const setupEnvironments: (managementAPIClient: any, api_key: string, appConfig: AppConfig, clonedDirectory: string, region: any, livePreviewEnabled: boolean) => Promise<void>;
@@ -0,0 +1,9 @@
1
+ import { Command } from '@contentstack/cli-command';
2
+ import { FlagInput } from '@contentstack/cli-utilities';
3
+ export default class BootstrapCommand extends Command {
4
+ private bootstrapManagementAPIClient;
5
+ static description: string;
6
+ static examples: string[];
7
+ static flags: FlagInput;
8
+ run(): Promise<void>;
9
+ }
@@ -0,0 +1,15 @@
1
+ export interface Configuration {
2
+ starterApps: Array<any>;
3
+ sampleApps: any;
4
+ appLevelConfig: any;
5
+ }
6
+ export interface AppConfig {
7
+ source: string;
8
+ stack: string;
9
+ private?: boolean;
10
+ branch?: string;
11
+ appConfigKey?: string;
12
+ }
13
+ declare const config: Configuration;
14
+ export default config;
15
+ export declare function getAppLevelConfigByName(appConfigKey: string): any;
@@ -0,0 +1,7 @@
1
+ declare class Messages {
2
+ private readonly messages;
3
+ constructor();
4
+ parse(messageKey: string, ...substitutions: any): any;
5
+ }
6
+ declare const _default: Messages;
7
+ export default _default;
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.4.7",
2
+ "version": "1.4.8",
3
3
  "commands": {
4
4
  "cm:bootstrap": {
5
5
  "id": "cm:bootstrap",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@contentstack/cli-cm-bootstrap",
3
3
  "description": "Bootstrap contentstack apps",
4
- "version": "1.4.7",
4
+ "version": "1.4.8",
5
5
  "author": "Contentstack",
6
6
  "bugs": "https://github.com/contentstack/cli/issues",
7
7
  "scripts": {
@@ -17,9 +17,9 @@
17
17
  "test:report": "nyc --reporter=lcov mocha \"test/**/*.test.js\""
18
18
  },
19
19
  "dependencies": {
20
- "@contentstack/cli-cm-seed": "^1.4.7",
21
- "@contentstack/cli-command": "^1.2.7",
22
- "@contentstack/cli-utilities": "^1.4.3",
20
+ "@contentstack/cli-cm-seed": "^1.4.8",
21
+ "@contentstack/cli-command": "^1.2.8",
22
+ "@contentstack/cli-utilities": "^1.4.4",
23
23
  "inquirer": "8.2.4",
24
24
  "mkdirp": "^1.0.4",
25
25
  "tar": "^6.1.13"
@@ -73,4 +73,4 @@
73
73
  }
74
74
  },
75
75
  "repository": "contentstack/cli"
76
- }
76
+ }