@hubspot/cli 7.2.0-experimental.0 → 7.2.0
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/commands/account/info.d.ts +1 -1
- package/commands/account/info.js +8 -5
- package/commands/auth.d.ts +9 -0
- package/commands/auth.js +89 -83
- package/commands/init.d.ts +11 -0
- package/commands/init.js +114 -100
- package/commands/list.d.ts +9 -0
- package/commands/list.js +63 -57
- package/commands/mv.d.ts +10 -0
- package/commands/mv.js +32 -32
- package/commands/open.d.ts +10 -0
- package/commands/open.js +37 -34
- package/commands/project/dev/deprecatedFlow.d.ts +5 -0
- package/commands/project/{dev.js → dev/deprecatedFlow.js} +14 -44
- package/commands/project/{dev.d.ts → dev/index.d.ts} +1 -3
- package/commands/project/dev/index.js +52 -0
- package/commands/project/dev/unifiedFlow.d.ts +5 -0
- package/commands/project/dev/unifiedFlow.js +112 -0
- package/commands/remove.d.ts +9 -0
- package/commands/remove.js +25 -23
- package/lang/en.lyaml +10 -6
- package/lib/DevServerManagerV2.d.ts +34 -0
- package/lib/DevServerManagerV2.js +85 -0
- package/lib/LocalDevManagerV2.d.ts +64 -0
- package/lib/LocalDevManagerV2.js +382 -0
- package/lib/commonOpts.d.ts +1 -0
- package/lib/commonOpts.js +30 -0
- package/lib/constants.d.ts +12 -0
- package/lib/constants.js +13 -1
- package/lib/localDev.d.ts +1 -1
- package/lib/localDev.js +2 -2
- package/lib/projects/structure.d.ts +4 -0
- package/lib/projects/structure.js +9 -0
- package/lib/prompts/accountNamePrompt.d.ts +2 -3
- package/lib/prompts/personalAccessKeyPrompt.d.ts +4 -4
- package/lib/ui/index.d.ts +1 -1
- package/lib/ui/index.js +2 -2
- package/lib/ui/supportHyperlinks.js +2 -2
- package/lib/ui/supportsColor.js +2 -2
- package/lib/usageTracking.d.ts +1 -1
- package/lib/yargsUtils.d.ts +9 -0
- package/lib/yargsUtils.js +40 -0
- package/package.json +3 -3
- package/types/ProjectComponents.d.ts +38 -0
- package/types/ProjectComponents.js +3 -0
- package/types/Yargs.d.ts +1 -0
- package/lib/hasFlag.d.ts +0 -1
- package/lib/hasFlag.js +0 -15
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Argv } from 'yargs';
|
|
2
|
+
export declare function hasFlag(flag: string, argv?: string[]): boolean;
|
|
3
|
+
export declare function makeYargsBuilder<T>(callback: (yargs: Argv) => Argv<T>, command: string, describe: string, options: {
|
|
4
|
+
useGlobalOptions?: boolean;
|
|
5
|
+
useAccountOptions?: boolean;
|
|
6
|
+
useConfigOptions?: boolean;
|
|
7
|
+
useUseEnvironmentOptions?: boolean;
|
|
8
|
+
useTestingOptions?: boolean;
|
|
9
|
+
}): (yargs: Argv) => Promise<Argv<T>>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.hasFlag = hasFlag;
|
|
7
|
+
exports.makeYargsBuilder = makeYargsBuilder;
|
|
8
|
+
const process_1 = __importDefault(require("process"));
|
|
9
|
+
const commonOpts_1 = require("./commonOpts");
|
|
10
|
+
// See https://github.com/sindresorhus/has-flag/blob/main/index.js (License: https://github.com/sindresorhus/has-flag/blob/main/license)
|
|
11
|
+
function hasFlag(flag, argv = process_1.default.argv) {
|
|
12
|
+
const prefix = flag.startsWith('-') ? '' : flag.length === 1 ? '-' : '--';
|
|
13
|
+
const position = argv.indexOf(prefix + flag);
|
|
14
|
+
const terminatorPosition = argv.indexOf('--');
|
|
15
|
+
return (position !== -1 &&
|
|
16
|
+
(terminatorPosition === -1 || position < terminatorPosition));
|
|
17
|
+
}
|
|
18
|
+
function makeYargsBuilder(callback, command, describe, options) {
|
|
19
|
+
return async function (yargs) {
|
|
20
|
+
if (options.useGlobalOptions) {
|
|
21
|
+
(0, commonOpts_1.addGlobalOptions)(yargs);
|
|
22
|
+
}
|
|
23
|
+
if (options.useAccountOptions) {
|
|
24
|
+
(0, commonOpts_1.addAccountOptions)(yargs);
|
|
25
|
+
}
|
|
26
|
+
if (options.useConfigOptions) {
|
|
27
|
+
(0, commonOpts_1.addConfigOptions)(yargs);
|
|
28
|
+
}
|
|
29
|
+
if (options.useUseEnvironmentOptions) {
|
|
30
|
+
(0, commonOpts_1.addUseEnvironmentOptions)(yargs);
|
|
31
|
+
}
|
|
32
|
+
if (options.useTestingOptions) {
|
|
33
|
+
(0, commonOpts_1.addTestingOptions)(yargs);
|
|
34
|
+
}
|
|
35
|
+
const result = callback(yargs);
|
|
36
|
+
// Must go last to pick up available options
|
|
37
|
+
await (0, commonOpts_1.addCustomHelpOutput)(result, command, describe);
|
|
38
|
+
return result;
|
|
39
|
+
};
|
|
40
|
+
}
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hubspot/cli",
|
|
3
|
-
"version": "7.2.0
|
|
3
|
+
"version": "7.2.0",
|
|
4
4
|
"description": "The official CLI for developing on HubSpot",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": "https://github.com/HubSpot/hubspot-cli",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@hubspot/local-dev-lib": "3.3.2",
|
|
9
|
-
"@hubspot/project-parsing-lib": "0.
|
|
9
|
+
"@hubspot/project-parsing-lib": "0.1.1",
|
|
10
10
|
"@hubspot/serverless-dev-runtime": "7.0.2",
|
|
11
11
|
"@hubspot/theme-preview-dev-server": "0.0.10",
|
|
12
|
-
"@hubspot/ui-extensions-dev-server": "0.8.
|
|
12
|
+
"@hubspot/ui-extensions-dev-server": "0.8.48",
|
|
13
13
|
"archiver": "7.0.1",
|
|
14
14
|
"chalk": "4.1.2",
|
|
15
15
|
"chokidar": "3.6.0",
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { IntermediateRepresentationNodeLocalDev } from '@hubspot/project-parsing-lib/src/lib/types';
|
|
2
|
+
import { IR_COMPONENT_TYPES, APP_DISTRIBUTION_TYPES, APP_AUTH_TYPES } from '../lib/constants';
|
|
3
|
+
import { ValueOf } from '@hubspot/local-dev-lib/types/Utils';
|
|
4
|
+
type AppDistributionType = ValueOf<typeof APP_DISTRIBUTION_TYPES>;
|
|
5
|
+
type AppAuthType = ValueOf<typeof APP_AUTH_TYPES>;
|
|
6
|
+
type AppConfig = {
|
|
7
|
+
description: string;
|
|
8
|
+
name: string;
|
|
9
|
+
logo: string;
|
|
10
|
+
distribution: AppDistributionType;
|
|
11
|
+
auth: {
|
|
12
|
+
type: AppAuthType;
|
|
13
|
+
redirectUrls: string[];
|
|
14
|
+
requiredScopes: string[];
|
|
15
|
+
optionalScopes: string[];
|
|
16
|
+
conditionallyRequiredScopes: string[];
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
type CardConfig = {
|
|
20
|
+
name: string;
|
|
21
|
+
description: string;
|
|
22
|
+
previewImage: {
|
|
23
|
+
file: string;
|
|
24
|
+
altText: string;
|
|
25
|
+
};
|
|
26
|
+
entrypoint: string;
|
|
27
|
+
location: string;
|
|
28
|
+
objectTypes: string[];
|
|
29
|
+
};
|
|
30
|
+
export interface AppIRNode extends IntermediateRepresentationNodeLocalDev {
|
|
31
|
+
componentType: typeof IR_COMPONENT_TYPES.APPLICATION;
|
|
32
|
+
config: AppConfig;
|
|
33
|
+
}
|
|
34
|
+
export interface CardIRNode extends IntermediateRepresentationNodeLocalDev {
|
|
35
|
+
componentType: typeof IR_COMPONENT_TYPES.CARD;
|
|
36
|
+
config: CardConfig;
|
|
37
|
+
}
|
|
38
|
+
export {};
|
package/types/Yargs.d.ts
CHANGED
package/lib/hasFlag.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function hasFlag(flag: string, argv?: string[]): boolean;
|
package/lib/hasFlag.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.hasFlag = hasFlag;
|
|
7
|
-
const process_1 = __importDefault(require("process"));
|
|
8
|
-
// See https://github.com/sindresorhus/has-flag/blob/main/index.js (License: https://github.com/sindresorhus/has-flag/blob/main/license)
|
|
9
|
-
function hasFlag(flag, argv = process_1.default.argv) {
|
|
10
|
-
const prefix = flag.startsWith('-') ? '' : flag.length === 1 ? '-' : '--';
|
|
11
|
-
const position = argv.indexOf(prefix + flag);
|
|
12
|
-
const terminatorPosition = argv.indexOf('--');
|
|
13
|
-
return (position !== -1 &&
|
|
14
|
-
(terminatorPosition === -1 || position < terminatorPosition));
|
|
15
|
-
}
|