hereya-cli 0.72.1 → 0.73.1
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 +124 -58
- package/dist/backend/cloud/cloud-backend.d.ts +3 -1
- package/dist/backend/cloud/cloud-backend.js +44 -0
- package/dist/backend/common.d.ts +28 -0
- package/dist/backend/file.d.ts +3 -1
- package/dist/backend/file.js +9 -0
- package/dist/commands/credential-helper/index.d.ts +10 -0
- package/dist/commands/credential-helper/index.js +87 -0
- package/dist/commands/devenv/install/index.js +2 -28
- package/dist/commands/devenv/project/init/index.d.ts +2 -0
- package/dist/commands/devenv/project/init/index.js +30 -4
- package/dist/commands/devenv/project/uninit/index.d.ts +14 -0
- package/dist/commands/devenv/project/uninit/index.js +95 -0
- package/dist/commands/init/index.d.ts +2 -0
- package/dist/commands/init/index.js +133 -0
- package/dist/commands/uninit/index.d.ts +13 -0
- package/dist/commands/uninit/index.js +81 -0
- package/dist/lib/config/common.d.ts +4 -0
- package/dist/lib/config/simple.d.ts +2 -1
- package/dist/lib/config/simple.js +8 -1
- package/dist/lib/git-utils.d.ts +29 -0
- package/dist/lib/git-utils.js +70 -1
- package/dist/lib/hereya-token.d.ts +6 -0
- package/dist/lib/hereya-token.js +29 -0
- package/oclif.manifest.json +184 -17
- package/package.json +1 -1
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { Args, Command, Flags } from '@oclif/core';
|
|
2
|
+
import { Listr, ListrLogger, ListrLogLevels } from 'listr2';
|
|
3
|
+
import { getBackend } from '../../backend/index.js';
|
|
4
|
+
import { getExecutorForWorkspace } from '../../executor/context.js';
|
|
5
|
+
import { getConfigManager } from '../../lib/config/index.js';
|
|
6
|
+
import { getLogger, getLogPath, isDebug } from '../../lib/log.js';
|
|
7
|
+
export default class Uninit extends Command {
|
|
8
|
+
static args = {
|
|
9
|
+
project: Args.string({ description: 'project name', required: true }),
|
|
10
|
+
};
|
|
11
|
+
static description = 'Destroy template infrastructure and uninitialize a project.';
|
|
12
|
+
static examples = [
|
|
13
|
+
'<%= config.bin %> <%= command.id %> myProject -w dev',
|
|
14
|
+
];
|
|
15
|
+
static flags = {
|
|
16
|
+
chdir: Flags.string({
|
|
17
|
+
description: 'directory to run command in',
|
|
18
|
+
required: false,
|
|
19
|
+
}),
|
|
20
|
+
workspace: Flags.string({
|
|
21
|
+
char: 'w',
|
|
22
|
+
description: 'workspace used during init',
|
|
23
|
+
required: true,
|
|
24
|
+
}),
|
|
25
|
+
};
|
|
26
|
+
async run() {
|
|
27
|
+
const { args, flags } = await this.parse(Uninit);
|
|
28
|
+
const projectRootDir = flags.chdir || process.env.HEREYA_PROJECT_ROOT_DIR;
|
|
29
|
+
const task = new Listr([
|
|
30
|
+
{
|
|
31
|
+
async task(ctx) {
|
|
32
|
+
const backend = await getBackend();
|
|
33
|
+
if (!backend.getProjectMetadata) {
|
|
34
|
+
throw new Error('Uninit requires cloud backend. Run `hereya login` first.');
|
|
35
|
+
}
|
|
36
|
+
const result = await backend.getProjectMetadata({ project: args.project });
|
|
37
|
+
if (!result.found) {
|
|
38
|
+
throw new Error(`No template metadata found for project ${args.project}. Was it initialized with a template?`);
|
|
39
|
+
}
|
|
40
|
+
ctx.metadata = result.metadata;
|
|
41
|
+
},
|
|
42
|
+
title: 'Fetching project metadata',
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
rendererOptions: { persistentOutput: isDebug() },
|
|
46
|
+
async task(ctx, task) {
|
|
47
|
+
const executor$ = await getExecutorForWorkspace(flags.workspace, args.project);
|
|
48
|
+
if (!executor$.success)
|
|
49
|
+
throw new Error(executor$.reason);
|
|
50
|
+
const destroyOutput = await executor$.executor.destroy({
|
|
51
|
+
logger: getLogger(task),
|
|
52
|
+
package: ctx.metadata.template,
|
|
53
|
+
project: args.project,
|
|
54
|
+
workspace: flags.workspace,
|
|
55
|
+
});
|
|
56
|
+
if (!destroyOutput.success)
|
|
57
|
+
throw new Error(destroyOutput.reason);
|
|
58
|
+
},
|
|
59
|
+
title: 'Destroying template infrastructure',
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
async task() {
|
|
63
|
+
const backend = await getBackend();
|
|
64
|
+
await backend.deleteState({ project: args.project, workspace: flags.workspace });
|
|
65
|
+
const configManager = getConfigManager();
|
|
66
|
+
await configManager.deleteConfig({ projectRootDir });
|
|
67
|
+
},
|
|
68
|
+
title: 'Cleaning up project state',
|
|
69
|
+
},
|
|
70
|
+
], { concurrent: false });
|
|
71
|
+
try {
|
|
72
|
+
await task.run();
|
|
73
|
+
const myLogger = new ListrLogger({ useIcons: false });
|
|
74
|
+
myLogger.log(ListrLogLevels.COMPLETED, `Template infrastructure destroyed for ${args.project}`);
|
|
75
|
+
myLogger.log(ListrLogLevels.COMPLETED, 'Complete cleanup on Hereya Cloud dashboard.');
|
|
76
|
+
}
|
|
77
|
+
catch (error) {
|
|
78
|
+
this.error(`${error.message}\n\nSee ${getLogPath()} for more details`);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { IPackageMetadata } from '../package/index.js';
|
|
2
|
+
export interface DeleteConfigInput {
|
|
3
|
+
projectRootDir?: string;
|
|
4
|
+
}
|
|
2
5
|
export interface ConfigManager {
|
|
3
6
|
addPackage: (input: AddPackageInput) => Promise<void>;
|
|
7
|
+
deleteConfig: (input: DeleteConfigInput) => Promise<void>;
|
|
4
8
|
loadConfig: (input: LoadConfigInput) => Promise<LoadConfigOutput>;
|
|
5
9
|
removePackage: (input: RemovePackageInput) => Promise<void>;
|
|
6
10
|
saveConfig: (input: SaveConfigInput) => Promise<void>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { AddPackageInput, ConfigManager, LoadConfigInput, LoadConfigOutput, RemovePackageInput, SaveConfigInput } from './common.js';
|
|
1
|
+
import { AddPackageInput, ConfigManager, DeleteConfigInput, LoadConfigInput, LoadConfigOutput, RemovePackageInput, SaveConfigInput } from './common.js';
|
|
2
2
|
export declare class SimpleConfigManager implements ConfigManager {
|
|
3
3
|
addPackage(input: AddPackageInput): Promise<void>;
|
|
4
|
+
deleteConfig(input: DeleteConfigInput): Promise<void>;
|
|
4
5
|
loadConfig(input: LoadConfigInput): Promise<LoadConfigOutput>;
|
|
5
6
|
removePackage(input: RemovePackageInput): Promise<void>;
|
|
6
7
|
saveConfig(input: SaveConfigInput): Promise<void>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { unlink } from 'node:fs/promises';
|
|
1
2
|
import path from 'node:path';
|
|
2
|
-
import { getAnyPath } from '../filesystem.js';
|
|
3
|
+
import { fileExists, getAnyPath } from '../filesystem.js';
|
|
3
4
|
import * as yaml from '../yaml-utils.js';
|
|
4
5
|
export class SimpleConfigManager {
|
|
5
6
|
async addPackage(input) {
|
|
@@ -46,6 +47,12 @@ export class SimpleConfigManager {
|
|
|
46
47
|
...sectionUpdate,
|
|
47
48
|
}, await this.getConfigPath(input.projectRootDir));
|
|
48
49
|
}
|
|
50
|
+
async deleteConfig(input) {
|
|
51
|
+
const configPath = await this.getConfigPath(input.projectRootDir);
|
|
52
|
+
if (await fileExists(configPath)) {
|
|
53
|
+
await unlink(configPath);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
49
56
|
async loadConfig(input) {
|
|
50
57
|
const configFilePath = await this.getConfigPath(input.projectRootDir);
|
|
51
58
|
const { data: config, found } = await yaml.load(configFilePath);
|
package/dist/lib/git-utils.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export declare const gitUtils: {
|
|
2
|
+
/**
|
|
3
|
+
* Clones a git repository using the hereya credential helper.
|
|
4
|
+
*/
|
|
5
|
+
cloneWithCredentialHelper(input: CloneWithCredentialHelperInput): Promise<CloneOutput>;
|
|
2
6
|
/**
|
|
3
7
|
* Gets the current git branch name.
|
|
4
8
|
* @param cwd The working directory to execute git command in
|
|
@@ -26,4 +30,29 @@ export declare const gitUtils: {
|
|
|
26
30
|
* @returns The sanitized branch name
|
|
27
31
|
*/
|
|
28
32
|
sanitizeBranchName(branch: string): string;
|
|
33
|
+
/**
|
|
34
|
+
* Sets up the hereya credential helper in a git repository.
|
|
35
|
+
*/
|
|
36
|
+
setupCredentialHelper(input: {
|
|
37
|
+
hereyaBinPath: string;
|
|
38
|
+
projectDir: string;
|
|
39
|
+
}): Promise<void>;
|
|
40
|
+
};
|
|
41
|
+
export type CloneWithCredentialHelperInput = {
|
|
42
|
+
gitUrl: string;
|
|
43
|
+
hereyaBinPath: string;
|
|
44
|
+
password?: string;
|
|
45
|
+
targetDir: string;
|
|
46
|
+
username?: string;
|
|
47
|
+
};
|
|
48
|
+
export type CloneOutput = {
|
|
49
|
+
reason: string;
|
|
50
|
+
success: false;
|
|
51
|
+
} | {
|
|
52
|
+
success: true;
|
|
29
53
|
};
|
|
54
|
+
export declare function cloneWithCredentialHelper(input: CloneWithCredentialHelperInput): Promise<CloneOutput>;
|
|
55
|
+
export declare function setupCredentialHelper(input: {
|
|
56
|
+
hereyaBinPath: string;
|
|
57
|
+
projectDir: string;
|
|
58
|
+
}): Promise<void>;
|
package/dist/lib/git-utils.js
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
|
+
import { spawn } from 'node:child_process';
|
|
1
2
|
import { runShell } from './shell.js';
|
|
2
3
|
export const gitUtils = {
|
|
4
|
+
/**
|
|
5
|
+
* Clones a git repository using the hereya credential helper.
|
|
6
|
+
*/
|
|
7
|
+
async cloneWithCredentialHelper(input) {
|
|
8
|
+
return cloneWithCredentialHelper(input);
|
|
9
|
+
},
|
|
3
10
|
/**
|
|
4
11
|
* Gets the current git branch name.
|
|
5
12
|
* @param cwd The working directory to execute git command in
|
|
@@ -58,5 +65,67 @@ export const gitUtils = {
|
|
|
58
65
|
*/
|
|
59
66
|
sanitizeBranchName(branch) {
|
|
60
67
|
return branch.replaceAll(/[^a-zA-Z0-9_-]/g, '');
|
|
61
|
-
}
|
|
68
|
+
},
|
|
69
|
+
/**
|
|
70
|
+
* Sets up the hereya credential helper in a git repository.
|
|
71
|
+
*/
|
|
72
|
+
async setupCredentialHelper(input) {
|
|
73
|
+
return setupCredentialHelper(input);
|
|
74
|
+
},
|
|
62
75
|
};
|
|
76
|
+
export async function cloneWithCredentialHelper(input) {
|
|
77
|
+
const { gitUrl, hereyaBinPath, password, targetDir, username } = input;
|
|
78
|
+
// Build the credential helper config
|
|
79
|
+
// The ! prefix tells git to treat it as a shell command
|
|
80
|
+
const credHelper = `!${hereyaBinPath} credential-helper`;
|
|
81
|
+
return new Promise((resolve) => {
|
|
82
|
+
const env = { ...process.env };
|
|
83
|
+
if (username)
|
|
84
|
+
env.hereyaGitUsername = username;
|
|
85
|
+
if (password)
|
|
86
|
+
env.hereyaGitPassword = password;
|
|
87
|
+
const child = spawn('git', [
|
|
88
|
+
'clone',
|
|
89
|
+
'-c', 'credential.helper=',
|
|
90
|
+
'-c', `credential.helper=${credHelper}`,
|
|
91
|
+
gitUrl,
|
|
92
|
+
targetDir,
|
|
93
|
+
], {
|
|
94
|
+
env,
|
|
95
|
+
stdio: ['pipe', 'pipe', 'pipe'],
|
|
96
|
+
});
|
|
97
|
+
let stderr = '';
|
|
98
|
+
child.stderr?.on('data', (data) => {
|
|
99
|
+
stderr += data.toString();
|
|
100
|
+
});
|
|
101
|
+
child.on('close', (code) => {
|
|
102
|
+
if (code === 0) {
|
|
103
|
+
resolve({ success: true });
|
|
104
|
+
}
|
|
105
|
+
else {
|
|
106
|
+
resolve({ reason: `git clone failed (exit code ${code}): ${stderr.trim()}`, success: false });
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
child.on('error', (err) => {
|
|
110
|
+
resolve({ reason: `git clone failed: ${err.message}`, success: false });
|
|
111
|
+
});
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
export async function setupCredentialHelper(input) {
|
|
115
|
+
const { hereyaBinPath, projectDir } = input;
|
|
116
|
+
const credHelper = `!${hereyaBinPath} credential-helper`;
|
|
117
|
+
const runGitConfig = (args) => new Promise((resolve, reject) => {
|
|
118
|
+
const child = spawn('git', args, { cwd: projectDir, stdio: 'pipe' });
|
|
119
|
+
child.on('close', (code) => {
|
|
120
|
+
if (code === 0)
|
|
121
|
+
resolve();
|
|
122
|
+
else
|
|
123
|
+
reject(new Error(`git config failed with exit code ${code}`));
|
|
124
|
+
});
|
|
125
|
+
child.on('error', reject);
|
|
126
|
+
});
|
|
127
|
+
// Empty string resets the helper list, clearing any global/system helpers (e.g. GCM)
|
|
128
|
+
await runGitConfig(['config', 'credential.helper', '']);
|
|
129
|
+
// Then add ours — git tries helpers in config order, so this is the only one
|
|
130
|
+
await runGitConfig(['config', '--add', 'credential.helper', credHelper]);
|
|
131
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { getCloudCredentials, loadBackendConfig } from '../backend/config.js';
|
|
2
|
+
export const hereyaTokenUtils = {
|
|
3
|
+
async generateHereyaToken(description) {
|
|
4
|
+
const backendConfig = await loadBackendConfig();
|
|
5
|
+
if (!backendConfig.cloud) {
|
|
6
|
+
return null;
|
|
7
|
+
}
|
|
8
|
+
const { clientId, url } = backendConfig.cloud;
|
|
9
|
+
const credentials = await getCloudCredentials(clientId);
|
|
10
|
+
if (!credentials) {
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
13
|
+
const formData = new FormData();
|
|
14
|
+
formData.append('description', description);
|
|
15
|
+
formData.append('expiresInDays', '365');
|
|
16
|
+
const response = await fetch(`${url}/api/personal-tokens`, {
|
|
17
|
+
body: formData,
|
|
18
|
+
headers: {
|
|
19
|
+
Authorization: `Bearer ${credentials.accessToken}`,
|
|
20
|
+
},
|
|
21
|
+
method: 'POST',
|
|
22
|
+
});
|
|
23
|
+
if (!response.ok) {
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
const result = await response.json();
|
|
27
|
+
return { cloudUrl: url, token: result.data.token };
|
|
28
|
+
},
|
|
29
|
+
};
|
package/oclif.manifest.json
CHANGED
|
@@ -102,6 +102,34 @@
|
|
|
102
102
|
"index.js"
|
|
103
103
|
]
|
|
104
104
|
},
|
|
105
|
+
"credential-helper": {
|
|
106
|
+
"aliases": [],
|
|
107
|
+
"args": {
|
|
108
|
+
"operation": {
|
|
109
|
+
"description": "Git credential operation (get, store, erase)",
|
|
110
|
+
"name": "operation",
|
|
111
|
+
"required": true
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
"description": "Git credential helper for hereya-managed repositories",
|
|
115
|
+
"flags": {},
|
|
116
|
+
"hasDynamicHelp": false,
|
|
117
|
+
"hidden": true,
|
|
118
|
+
"hiddenAliases": [],
|
|
119
|
+
"id": "credential-helper",
|
|
120
|
+
"pluginAlias": "hereya-cli",
|
|
121
|
+
"pluginName": "hereya-cli",
|
|
122
|
+
"pluginType": "core",
|
|
123
|
+
"strict": true,
|
|
124
|
+
"enableJsonFlag": false,
|
|
125
|
+
"isESM": true,
|
|
126
|
+
"relativePath": [
|
|
127
|
+
"dist",
|
|
128
|
+
"commands",
|
|
129
|
+
"credential-helper",
|
|
130
|
+
"index.js"
|
|
131
|
+
]
|
|
132
|
+
},
|
|
105
133
|
"delete-state": {
|
|
106
134
|
"aliases": [],
|
|
107
135
|
"args": {},
|
|
@@ -459,7 +487,9 @@
|
|
|
459
487
|
"description": "Initialize hereya in a project directory.",
|
|
460
488
|
"examples": [
|
|
461
489
|
"<%= config.bin %> <%= command.id %> myProject -w=defaultWorkspace",
|
|
462
|
-
"<%= config.bin %> <%= command.id %> myProject -w=defaultWorkspace --chdir=./myProject"
|
|
490
|
+
"<%= config.bin %> <%= command.id %> myProject -w=defaultWorkspace --chdir=./myProject",
|
|
491
|
+
"<%= config.bin %> <%= command.id %> myProject -w=dev -t=acme/node-starter",
|
|
492
|
+
"<%= config.bin %> <%= command.id %> myProject -w=dev -t=acme/node-starter -p region=us-east-1"
|
|
463
493
|
],
|
|
464
494
|
"flags": {
|
|
465
495
|
"chdir": {
|
|
@@ -470,6 +500,24 @@
|
|
|
470
500
|
"multiple": false,
|
|
471
501
|
"type": "option"
|
|
472
502
|
},
|
|
503
|
+
"parameter": {
|
|
504
|
+
"char": "p",
|
|
505
|
+
"description": "template parameter, in the form of 'key=value'. Can be specified multiple times.",
|
|
506
|
+
"name": "parameter",
|
|
507
|
+
"default": [],
|
|
508
|
+
"hasDynamicHelp": false,
|
|
509
|
+
"multiple": true,
|
|
510
|
+
"type": "option"
|
|
511
|
+
},
|
|
512
|
+
"template": {
|
|
513
|
+
"char": "t",
|
|
514
|
+
"description": "template package name (e.g. owner/repo)",
|
|
515
|
+
"name": "template",
|
|
516
|
+
"required": false,
|
|
517
|
+
"hasDynamicHelp": false,
|
|
518
|
+
"multiple": false,
|
|
519
|
+
"type": "option"
|
|
520
|
+
},
|
|
473
521
|
"workspace": {
|
|
474
522
|
"char": "w",
|
|
475
523
|
"description": "workspace to set as default",
|
|
@@ -898,6 +946,54 @@
|
|
|
898
946
|
"index.js"
|
|
899
947
|
]
|
|
900
948
|
},
|
|
949
|
+
"uninit": {
|
|
950
|
+
"aliases": [],
|
|
951
|
+
"args": {
|
|
952
|
+
"project": {
|
|
953
|
+
"description": "project name",
|
|
954
|
+
"name": "project",
|
|
955
|
+
"required": true
|
|
956
|
+
}
|
|
957
|
+
},
|
|
958
|
+
"description": "Destroy template infrastructure and uninitialize a project.",
|
|
959
|
+
"examples": [
|
|
960
|
+
"<%= config.bin %> <%= command.id %> myProject -w dev"
|
|
961
|
+
],
|
|
962
|
+
"flags": {
|
|
963
|
+
"chdir": {
|
|
964
|
+
"description": "directory to run command in",
|
|
965
|
+
"name": "chdir",
|
|
966
|
+
"required": false,
|
|
967
|
+
"hasDynamicHelp": false,
|
|
968
|
+
"multiple": false,
|
|
969
|
+
"type": "option"
|
|
970
|
+
},
|
|
971
|
+
"workspace": {
|
|
972
|
+
"char": "w",
|
|
973
|
+
"description": "workspace used during init",
|
|
974
|
+
"name": "workspace",
|
|
975
|
+
"required": true,
|
|
976
|
+
"hasDynamicHelp": false,
|
|
977
|
+
"multiple": false,
|
|
978
|
+
"type": "option"
|
|
979
|
+
}
|
|
980
|
+
},
|
|
981
|
+
"hasDynamicHelp": false,
|
|
982
|
+
"hiddenAliases": [],
|
|
983
|
+
"id": "uninit",
|
|
984
|
+
"pluginAlias": "hereya-cli",
|
|
985
|
+
"pluginName": "hereya-cli",
|
|
986
|
+
"pluginType": "core",
|
|
987
|
+
"strict": true,
|
|
988
|
+
"enableJsonFlag": false,
|
|
989
|
+
"isESM": true,
|
|
990
|
+
"relativePath": [
|
|
991
|
+
"dist",
|
|
992
|
+
"commands",
|
|
993
|
+
"uninit",
|
|
994
|
+
"index.js"
|
|
995
|
+
]
|
|
996
|
+
},
|
|
901
997
|
"up": {
|
|
902
998
|
"aliases": [],
|
|
903
999
|
"args": {},
|
|
@@ -2227,6 +2323,56 @@
|
|
|
2227
2323
|
"index.js"
|
|
2228
2324
|
]
|
|
2229
2325
|
},
|
|
2326
|
+
"devenv:project:uninit": {
|
|
2327
|
+
"aliases": [],
|
|
2328
|
+
"args": {
|
|
2329
|
+
"project": {
|
|
2330
|
+
"description": "project name",
|
|
2331
|
+
"name": "project",
|
|
2332
|
+
"required": true
|
|
2333
|
+
}
|
|
2334
|
+
},
|
|
2335
|
+
"description": "Uninitialize a project on a remote dev environment.",
|
|
2336
|
+
"examples": [
|
|
2337
|
+
"<%= config.bin %> <%= command.id %> my-app -w my-workspace",
|
|
2338
|
+
"<%= config.bin %> <%= command.id %> my-app -w my-workspace --force"
|
|
2339
|
+
],
|
|
2340
|
+
"flags": {
|
|
2341
|
+
"force": {
|
|
2342
|
+
"char": "f",
|
|
2343
|
+
"description": "also remove the project directory after uninit",
|
|
2344
|
+
"name": "force",
|
|
2345
|
+
"allowNo": false,
|
|
2346
|
+
"type": "boolean"
|
|
2347
|
+
},
|
|
2348
|
+
"workspace": {
|
|
2349
|
+
"char": "w",
|
|
2350
|
+
"description": "name of the workspace",
|
|
2351
|
+
"name": "workspace",
|
|
2352
|
+
"required": true,
|
|
2353
|
+
"hasDynamicHelp": false,
|
|
2354
|
+
"multiple": false,
|
|
2355
|
+
"type": "option"
|
|
2356
|
+
}
|
|
2357
|
+
},
|
|
2358
|
+
"hasDynamicHelp": false,
|
|
2359
|
+
"hiddenAliases": [],
|
|
2360
|
+
"id": "devenv:project:uninit",
|
|
2361
|
+
"pluginAlias": "hereya-cli",
|
|
2362
|
+
"pluginName": "hereya-cli",
|
|
2363
|
+
"pluginType": "core",
|
|
2364
|
+
"strict": true,
|
|
2365
|
+
"enableJsonFlag": false,
|
|
2366
|
+
"isESM": true,
|
|
2367
|
+
"relativePath": [
|
|
2368
|
+
"dist",
|
|
2369
|
+
"commands",
|
|
2370
|
+
"devenv",
|
|
2371
|
+
"project",
|
|
2372
|
+
"uninit",
|
|
2373
|
+
"index.js"
|
|
2374
|
+
]
|
|
2375
|
+
},
|
|
2230
2376
|
"devenv:project:init": {
|
|
2231
2377
|
"aliases": [],
|
|
2232
2378
|
"args": {
|
|
@@ -2238,7 +2384,9 @@
|
|
|
2238
2384
|
},
|
|
2239
2385
|
"description": "Initialize a project on a remote dev environment.",
|
|
2240
2386
|
"examples": [
|
|
2241
|
-
"<%= config.bin %> <%= command.id %> my-app -w my-workspace"
|
|
2387
|
+
"<%= config.bin %> <%= command.id %> my-app -w my-workspace",
|
|
2388
|
+
"<%= config.bin %> <%= command.id %> my-app -w my-workspace -t acme/node-starter",
|
|
2389
|
+
"<%= config.bin %> <%= command.id %> my-app -w my-workspace -t acme/node-starter -p region=us-east-1"
|
|
2242
2390
|
],
|
|
2243
2391
|
"flags": {
|
|
2244
2392
|
"force": {
|
|
@@ -2248,6 +2396,25 @@
|
|
|
2248
2396
|
"allowNo": false,
|
|
2249
2397
|
"type": "boolean"
|
|
2250
2398
|
},
|
|
2399
|
+
"parameter": {
|
|
2400
|
+
"char": "p",
|
|
2401
|
+
"description": "parameter for the template, in the form of 'key=value'. Can be specified multiple times.",
|
|
2402
|
+
"name": "parameter",
|
|
2403
|
+
"required": false,
|
|
2404
|
+
"default": [],
|
|
2405
|
+
"hasDynamicHelp": false,
|
|
2406
|
+
"multiple": true,
|
|
2407
|
+
"type": "option"
|
|
2408
|
+
},
|
|
2409
|
+
"template": {
|
|
2410
|
+
"char": "t",
|
|
2411
|
+
"description": "template package to scaffold the project from",
|
|
2412
|
+
"name": "template",
|
|
2413
|
+
"required": false,
|
|
2414
|
+
"hasDynamicHelp": false,
|
|
2415
|
+
"multiple": false,
|
|
2416
|
+
"type": "option"
|
|
2417
|
+
},
|
|
2251
2418
|
"workspace": {
|
|
2252
2419
|
"char": "w",
|
|
2253
2420
|
"description": "name of the workspace",
|
|
@@ -2505,11 +2672,17 @@
|
|
|
2505
2672
|
"index.js"
|
|
2506
2673
|
]
|
|
2507
2674
|
},
|
|
2508
|
-
"workspace:executor:
|
|
2675
|
+
"workspace:executor:uninstall": {
|
|
2509
2676
|
"aliases": [],
|
|
2510
2677
|
"args": {},
|
|
2511
|
-
"description": "
|
|
2678
|
+
"description": "Uninstall the remote executor from a workspace",
|
|
2512
2679
|
"flags": {
|
|
2680
|
+
"debug": {
|
|
2681
|
+
"description": "enable debug mode",
|
|
2682
|
+
"name": "debug",
|
|
2683
|
+
"allowNo": false,
|
|
2684
|
+
"type": "boolean"
|
|
2685
|
+
},
|
|
2513
2686
|
"workspace": {
|
|
2514
2687
|
"char": "w",
|
|
2515
2688
|
"description": "name of the workspace",
|
|
@@ -2522,7 +2695,7 @@
|
|
|
2522
2695
|
},
|
|
2523
2696
|
"hasDynamicHelp": false,
|
|
2524
2697
|
"hiddenAliases": [],
|
|
2525
|
-
"id": "workspace:executor:
|
|
2698
|
+
"id": "workspace:executor:uninstall",
|
|
2526
2699
|
"pluginAlias": "hereya-cli",
|
|
2527
2700
|
"pluginName": "hereya-cli",
|
|
2528
2701
|
"pluginType": "core",
|
|
@@ -2534,21 +2707,15 @@
|
|
|
2534
2707
|
"commands",
|
|
2535
2708
|
"workspace",
|
|
2536
2709
|
"executor",
|
|
2537
|
-
"
|
|
2710
|
+
"uninstall",
|
|
2538
2711
|
"index.js"
|
|
2539
2712
|
]
|
|
2540
2713
|
},
|
|
2541
|
-
"workspace:executor:
|
|
2714
|
+
"workspace:executor:token": {
|
|
2542
2715
|
"aliases": [],
|
|
2543
2716
|
"args": {},
|
|
2544
|
-
"description": "
|
|
2717
|
+
"description": "Generate a workspace-scoped executor token for the remote executor",
|
|
2545
2718
|
"flags": {
|
|
2546
|
-
"debug": {
|
|
2547
|
-
"description": "enable debug mode",
|
|
2548
|
-
"name": "debug",
|
|
2549
|
-
"allowNo": false,
|
|
2550
|
-
"type": "boolean"
|
|
2551
|
-
},
|
|
2552
2719
|
"workspace": {
|
|
2553
2720
|
"char": "w",
|
|
2554
2721
|
"description": "name of the workspace",
|
|
@@ -2561,7 +2728,7 @@
|
|
|
2561
2728
|
},
|
|
2562
2729
|
"hasDynamicHelp": false,
|
|
2563
2730
|
"hiddenAliases": [],
|
|
2564
|
-
"id": "workspace:executor:
|
|
2731
|
+
"id": "workspace:executor:token",
|
|
2565
2732
|
"pluginAlias": "hereya-cli",
|
|
2566
2733
|
"pluginName": "hereya-cli",
|
|
2567
2734
|
"pluginType": "core",
|
|
@@ -2573,10 +2740,10 @@
|
|
|
2573
2740
|
"commands",
|
|
2574
2741
|
"workspace",
|
|
2575
2742
|
"executor",
|
|
2576
|
-
"
|
|
2743
|
+
"token",
|
|
2577
2744
|
"index.js"
|
|
2578
2745
|
]
|
|
2579
2746
|
}
|
|
2580
2747
|
},
|
|
2581
|
-
"version": "0.
|
|
2748
|
+
"version": "0.73.1"
|
|
2582
2749
|
}
|