hereya-cli 0.83.2 ā 0.84.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/README.md +233 -57
- package/dist/backend/cloud/cloud-backend.d.ts +124 -1
- package/dist/backend/cloud/cloud-backend.js +176 -0
- package/dist/commands/app/deploy/index.d.ts +16 -0
- package/dist/commands/app/deploy/index.js +113 -0
- package/dist/commands/app/deployments/index.d.ts +9 -0
- package/dist/commands/app/deployments/index.js +34 -0
- package/dist/commands/app/destroy/index.d.ts +12 -0
- package/dist/commands/app/destroy/index.js +52 -0
- package/dist/commands/app/env/index.d.ts +13 -0
- package/dist/commands/app/env/index.js +50 -0
- package/dist/commands/app/list/index.d.ts +6 -0
- package/dist/commands/app/list/index.js +30 -0
- package/dist/commands/app/new/index.d.ts +13 -0
- package/dist/commands/app/new/index.js +69 -0
- package/dist/commands/app/status/index.d.ts +12 -0
- package/dist/commands/app/status/index.js +51 -0
- package/dist/commands/executor/start/index.d.ts +13 -0
- package/dist/commands/executor/start/index.js +291 -0
- package/dist/commands/publish/index.d.ts +5 -3
- package/dist/commands/publish/index.js +75 -0
- package/dist/lib/app-source.d.ts +21 -0
- package/dist/lib/app-source.js +55 -0
- package/dist/lib/app-vars.d.ts +10 -0
- package/dist/lib/app-vars.js +45 -0
- package/dist/lib/package/index.d.ts +5 -0
- package/dist/lib/package/index.js +2 -0
- package/oclif.manifest.json +327 -11
- package/package.json +1 -1
|
@@ -3,6 +3,7 @@ import { existsSync, readFileSync } from 'node:fs';
|
|
|
3
3
|
import { join } from 'node:path';
|
|
4
4
|
import { simpleGit } from 'simple-git';
|
|
5
5
|
import * as yaml from 'yaml';
|
|
6
|
+
import { CloudBackend } from '../../backend/cloud/cloud-backend.js';
|
|
6
7
|
import { getBackend } from '../../backend/index.js';
|
|
7
8
|
export default class Publish extends Command {
|
|
8
9
|
static description = 'Publish a package to the Hereya registry';
|
|
@@ -165,6 +166,11 @@ export default class Publish extends Command {
|
|
|
165
166
|
try {
|
|
166
167
|
// Load and validate configuration
|
|
167
168
|
const config = await this.loadConfig(packageDir);
|
|
169
|
+
const isApp = config.kind === 'app';
|
|
170
|
+
if (isApp) {
|
|
171
|
+
await this.publishApp(packageDir, config);
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
168
174
|
// Display package info
|
|
169
175
|
this.log(`\nš¦ Preparing package ${config.name}@${config.version}`);
|
|
170
176
|
this.log(` Description: ${config.description}`);
|
|
@@ -226,6 +232,10 @@ export default class Publish extends Command {
|
|
|
226
232
|
if (!config.version) {
|
|
227
233
|
this.error('Missing required field "version" in hereyarc.yaml');
|
|
228
234
|
}
|
|
235
|
+
if (config.kind === 'app') {
|
|
236
|
+
// Apps don't require iac/infra; description optional but recommended.
|
|
237
|
+
return;
|
|
238
|
+
}
|
|
229
239
|
if (!config.description) {
|
|
230
240
|
this.error('Missing required field "description" in hereyarc.yaml');
|
|
231
241
|
}
|
|
@@ -236,4 +246,69 @@ export default class Publish extends Command {
|
|
|
236
246
|
this.error('Missing required field "infra" in hereyarc.yaml');
|
|
237
247
|
}
|
|
238
248
|
}
|
|
249
|
+
async publishApp(packageDir, config) {
|
|
250
|
+
this.log(`\nš¦ Preparing app ${config.name}@${config.version}`);
|
|
251
|
+
if (config.description) {
|
|
252
|
+
this.log(` Description: ${config.description}`);
|
|
253
|
+
}
|
|
254
|
+
if (config.visibility) {
|
|
255
|
+
this.log(` Visibility: ${config.visibility}`);
|
|
256
|
+
}
|
|
257
|
+
// Validate hereya.yaml shape: must exist; must NOT contain `project:` or `workspace:`.
|
|
258
|
+
const hereyaYamlPath = ['hereya.yaml', 'hereya.yml']
|
|
259
|
+
.map((name) => join(packageDir, name))
|
|
260
|
+
.find((p) => existsSync(p));
|
|
261
|
+
if (!hereyaYamlPath) {
|
|
262
|
+
this.error('Apps must have a hereya.yaml file in the package directory');
|
|
263
|
+
}
|
|
264
|
+
const hereyaYamlContent = readFileSync(hereyaYamlPath, 'utf8');
|
|
265
|
+
let parsedHereyaYaml = null;
|
|
266
|
+
try {
|
|
267
|
+
parsedHereyaYaml = (yaml.parse(hereyaYamlContent) ?? {});
|
|
268
|
+
}
|
|
269
|
+
catch (error) {
|
|
270
|
+
this.error(`Failed to parse hereya.yaml: ${error instanceof Error ? error.message : String(error)}`);
|
|
271
|
+
}
|
|
272
|
+
if (parsedHereyaYaml && typeof parsedHereyaYaml === 'object') {
|
|
273
|
+
if ('project' in parsedHereyaYaml) {
|
|
274
|
+
this.error('App hereya.yaml must not contain a "project:" key (it is set at deploy time)');
|
|
275
|
+
}
|
|
276
|
+
if ('workspace' in parsedHereyaYaml) {
|
|
277
|
+
this.error('App hereya.yaml must not contain a "workspace:" key (it is set at deploy time)');
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
this.log('\nš Analyzing repository...');
|
|
281
|
+
const gitInfo = await this.getGitInfo(packageDir);
|
|
282
|
+
const { commit, repository, sha256 } = gitInfo;
|
|
283
|
+
this.log(` Repository: ${repository}`);
|
|
284
|
+
this.log(` Commit: ${commit.slice(0, 8)}`);
|
|
285
|
+
this.log(` SHA256: ${sha256.slice(0, 16)}...`);
|
|
286
|
+
this.log('\nš Checking authentication...');
|
|
287
|
+
const backend = await getBackend();
|
|
288
|
+
if (!(backend instanceof CloudBackend) || typeof backend.publishAppVersion !== 'function') {
|
|
289
|
+
this.log('\nā Authentication failed\n');
|
|
290
|
+
this.error('Publishing apps is only supported with the cloud backend. Please run `hereya login` first.');
|
|
291
|
+
}
|
|
292
|
+
this.log(' ā Authenticated with Hereya Cloud');
|
|
293
|
+
this.log('\nš¤ Publishing app version to registry...');
|
|
294
|
+
const result = await backend.publishAppVersion({
|
|
295
|
+
commit: commit.trim(),
|
|
296
|
+
description: config.description,
|
|
297
|
+
hereyaYaml: hereyaYamlContent,
|
|
298
|
+
name: config.name,
|
|
299
|
+
repository,
|
|
300
|
+
sha256,
|
|
301
|
+
version: config.version,
|
|
302
|
+
visibility: config.visibility?.toLowerCase(),
|
|
303
|
+
});
|
|
304
|
+
if (!result.success) {
|
|
305
|
+
this.displayPublishError(result.reason, config);
|
|
306
|
+
return;
|
|
307
|
+
}
|
|
308
|
+
this.log(`\nā
Successfully published app ${result.app.name}@${result.app.version}`);
|
|
309
|
+
if (result.app.id) {
|
|
310
|
+
this.log(` App Version ID: ${result.app.id}`);
|
|
311
|
+
}
|
|
312
|
+
this.log('');
|
|
313
|
+
}
|
|
239
314
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Logger } from './log.js';
|
|
2
|
+
export interface DownloadAppSourceInput {
|
|
3
|
+
commit?: string;
|
|
4
|
+
logger?: Logger;
|
|
5
|
+
repository: string;
|
|
6
|
+
sha256?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface DownloadAppSourceOutput {
|
|
9
|
+
cleanup: () => Promise<void>;
|
|
10
|
+
rootDir: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Clone an app's source repository (by repo URL + commit SHA) into a fresh
|
|
14
|
+
* temp dir under ~/.hereya/downloads/<id>. Returns the rootDir path along
|
|
15
|
+
* with a cleanup() helper.
|
|
16
|
+
*
|
|
17
|
+
* Validates the git archive sha256 matches when provided.
|
|
18
|
+
*/
|
|
19
|
+
export declare const appSource: {
|
|
20
|
+
download(input: DownloadAppSourceInput): Promise<DownloadAppSourceOutput>;
|
|
21
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { createHash, randomUUID } from 'node:crypto';
|
|
2
|
+
import fs from 'node:fs/promises';
|
|
3
|
+
import os from 'node:os';
|
|
4
|
+
import path from 'node:path';
|
|
5
|
+
/**
|
|
6
|
+
* Clone an app's source repository (by repo URL + commit SHA) into a fresh
|
|
7
|
+
* temp dir under ~/.hereya/downloads/<id>. Returns the rootDir path along
|
|
8
|
+
* with a cleanup() helper.
|
|
9
|
+
*
|
|
10
|
+
* Validates the git archive sha256 matches when provided.
|
|
11
|
+
*/
|
|
12
|
+
export const appSource = {
|
|
13
|
+
async download(input) {
|
|
14
|
+
const downloadId = randomUUID();
|
|
15
|
+
const downloadsRoot = path.join(os.homedir(), '.hereya', 'downloads');
|
|
16
|
+
await fs.mkdir(downloadsRoot, { recursive: true });
|
|
17
|
+
const rootDir = path.join(downloadsRoot, downloadId);
|
|
18
|
+
const cleanup = async () => {
|
|
19
|
+
try {
|
|
20
|
+
await fs.rm(rootDir, { force: true, recursive: true });
|
|
21
|
+
}
|
|
22
|
+
catch {
|
|
23
|
+
// best-effort cleanup
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
try {
|
|
27
|
+
const { simpleGit } = await import('simple-git');
|
|
28
|
+
const git = simpleGit();
|
|
29
|
+
input.logger?.debug?.(`Cloning app source from ${input.repository}${input.commit ? `@${input.commit}` : ''} into ${rootDir}`);
|
|
30
|
+
if (input.commit) {
|
|
31
|
+
await git.clone(input.repository, rootDir, ['--no-checkout']);
|
|
32
|
+
const repoGit = simpleGit(rootDir);
|
|
33
|
+
await repoGit.checkout(input.commit);
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
await git.clone(input.repository, rootDir, ['--depth=1']);
|
|
37
|
+
}
|
|
38
|
+
if (input.sha256) {
|
|
39
|
+
const repoGit = simpleGit(rootDir);
|
|
40
|
+
const archiveBuffer = await repoGit.raw(['archive', '--format=tar', input.commit ?? 'HEAD']);
|
|
41
|
+
const hash = createHash('sha256');
|
|
42
|
+
hash.update(archiveBuffer);
|
|
43
|
+
const actualChecksum = hash.digest('hex');
|
|
44
|
+
if (actualChecksum !== input.sha256) {
|
|
45
|
+
throw new Error(`Checksum mismatch for app source ${input.repository}@${input.commit}. Expected: ${input.sha256}, Got: ${actualChecksum}`);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return { cleanup, rootDir };
|
|
49
|
+
}
|
|
50
|
+
catch (error) {
|
|
51
|
+
await cleanup();
|
|
52
|
+
throw error;
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Write per-deployment hereyavars overrides into <appRootDir>/hereyaconfig/hereyavars/.
|
|
3
|
+
*
|
|
4
|
+
* `hereyaVarsYaml` is a YAML string mapping filename -> YAML body (string).
|
|
5
|
+
* Each filename is validated against a safe pattern (no path traversal, must
|
|
6
|
+
* end in `.yaml`/`.yml`). Each body must be a string.
|
|
7
|
+
*/
|
|
8
|
+
export declare function applyHereyaVars(appRootDir: string, hereyaVarsYaml: string | undefined): Promise<{
|
|
9
|
+
filesWritten: string[];
|
|
10
|
+
}>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import fs from 'node:fs/promises';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import * as yaml from 'yaml';
|
|
4
|
+
const HEREYAVARS_FILENAME_PATTERN = /^[\w.-]+\.ya?ml$/;
|
|
5
|
+
/**
|
|
6
|
+
* Write per-deployment hereyavars overrides into <appRootDir>/hereyaconfig/hereyavars/.
|
|
7
|
+
*
|
|
8
|
+
* `hereyaVarsYaml` is a YAML string mapping filename -> YAML body (string).
|
|
9
|
+
* Each filename is validated against a safe pattern (no path traversal, must
|
|
10
|
+
* end in `.yaml`/`.yml`). Each body must be a string.
|
|
11
|
+
*/
|
|
12
|
+
export async function applyHereyaVars(appRootDir, hereyaVarsYaml) {
|
|
13
|
+
if (!hereyaVarsYaml || hereyaVarsYaml.trim() === '') {
|
|
14
|
+
return { filesWritten: [] };
|
|
15
|
+
}
|
|
16
|
+
let parsed;
|
|
17
|
+
try {
|
|
18
|
+
parsed = yaml.parse(hereyaVarsYaml);
|
|
19
|
+
}
|
|
20
|
+
catch (error) {
|
|
21
|
+
throw new Error(`Failed to parse hereyaVarsYaml: ${error.message}`);
|
|
22
|
+
}
|
|
23
|
+
if (parsed === null || parsed === undefined) {
|
|
24
|
+
return { filesWritten: [] };
|
|
25
|
+
}
|
|
26
|
+
if (typeof parsed !== 'object' || Array.isArray(parsed)) {
|
|
27
|
+
throw new TypeError('hereyaVarsYaml must be a YAML mapping of filename -> body string');
|
|
28
|
+
}
|
|
29
|
+
const targetDir = path.join(appRootDir, 'hereyaconfig', 'hereyavars');
|
|
30
|
+
await fs.mkdir(targetDir, { recursive: true });
|
|
31
|
+
const filesWritten = [];
|
|
32
|
+
for (const [filename, body] of Object.entries(parsed)) {
|
|
33
|
+
if (!HEREYAVARS_FILENAME_PATTERN.test(filename)) {
|
|
34
|
+
throw new Error(`Invalid hereyavars filename '${filename}'. Expected a name matching ${HEREYAVARS_FILENAME_PATTERN.source}`);
|
|
35
|
+
}
|
|
36
|
+
if (typeof body !== 'string') {
|
|
37
|
+
throw new TypeError(`hereyavars value for '${filename}' must be a string (YAML body)`);
|
|
38
|
+
}
|
|
39
|
+
const filePath = path.join(targetDir, filename);
|
|
40
|
+
// eslint-disable-next-line no-await-in-loop
|
|
41
|
+
await fs.writeFile(filePath, body, { encoding: 'utf8' });
|
|
42
|
+
filesWritten.push(filePath);
|
|
43
|
+
}
|
|
44
|
+
return { filesWritten };
|
|
45
|
+
}
|
|
@@ -29,6 +29,8 @@ export type ResolvePackageOutput = {
|
|
|
29
29
|
found: false;
|
|
30
30
|
reason: string;
|
|
31
31
|
};
|
|
32
|
+
export declare const PackageKind: z.ZodDefault<z.ZodEnum<["app", "package"]>>;
|
|
33
|
+
export type PackageKindType = z.infer<typeof PackageKind>;
|
|
32
34
|
export declare const PackageMetadata: z.ZodObject<{
|
|
33
35
|
dependencies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
34
36
|
deploy: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -36,6 +38,7 @@ export declare const PackageMetadata: z.ZodObject<{
|
|
|
36
38
|
iac: z.ZodNativeEnum<typeof IacType>;
|
|
37
39
|
infra: z.ZodNativeEnum<typeof InfrastructureType>;
|
|
38
40
|
inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>>;
|
|
41
|
+
kind: z.ZodOptional<z.ZodDefault<z.ZodEnum<["app", "package"]>>>;
|
|
39
42
|
onDeploy: z.ZodOptional<z.ZodObject<{
|
|
40
43
|
pkg: z.ZodString;
|
|
41
44
|
version: z.ZodString;
|
|
@@ -53,6 +56,7 @@ export declare const PackageMetadata: z.ZodObject<{
|
|
|
53
56
|
infra: InfrastructureType;
|
|
54
57
|
iac: IacType;
|
|
55
58
|
dependencies?: Record<string, string> | undefined;
|
|
59
|
+
kind?: "package" | "app" | undefined;
|
|
56
60
|
deploy?: boolean | undefined;
|
|
57
61
|
devDeploy?: boolean | undefined;
|
|
58
62
|
inputs?: Record<string, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">> | undefined;
|
|
@@ -67,6 +71,7 @@ export declare const PackageMetadata: z.ZodObject<{
|
|
|
67
71
|
infra: InfrastructureType;
|
|
68
72
|
iac: IacType;
|
|
69
73
|
dependencies?: Record<string, string> | undefined;
|
|
74
|
+
kind?: "package" | "app" | undefined;
|
|
70
75
|
deploy?: boolean | undefined;
|
|
71
76
|
devDeploy?: boolean | undefined;
|
|
72
77
|
inputs?: Record<string, z.objectInputType<{}, z.ZodTypeAny, "passthrough">> | undefined;
|
|
@@ -74,6 +74,7 @@ export async function downloadPackage(pkgUrl, destPath) {
|
|
|
74
74
|
const packageManager = await getPackageManager(protocol);
|
|
75
75
|
return packageManager.downloadPackage(pkgUrl, destPath);
|
|
76
76
|
}
|
|
77
|
+
export const PackageKind = z.enum(['app', 'package']).default('package');
|
|
77
78
|
export const PackageMetadata = z.object({
|
|
78
79
|
dependencies: z.record(z.string()).optional(),
|
|
79
80
|
deploy: z.boolean().optional(),
|
|
@@ -81,6 +82,7 @@ export const PackageMetadata = z.object({
|
|
|
81
82
|
iac: z.nativeEnum(IacType),
|
|
82
83
|
infra: z.nativeEnum(InfrastructureType),
|
|
83
84
|
inputs: z.record(z.object({}).passthrough()).optional(),
|
|
85
|
+
kind: PackageKind.optional(),
|
|
84
86
|
onDeploy: z
|
|
85
87
|
.object({
|
|
86
88
|
pkg: z.string(),
|
package/oclif.manifest.json
CHANGED
|
@@ -1185,24 +1185,217 @@
|
|
|
1185
1185
|
"index.js"
|
|
1186
1186
|
]
|
|
1187
1187
|
},
|
|
1188
|
-
"
|
|
1188
|
+
"app:deploy": {
|
|
1189
1189
|
"aliases": [],
|
|
1190
1190
|
"args": {
|
|
1191
|
-
"
|
|
1192
|
-
"description": "
|
|
1193
|
-
"name": "
|
|
1191
|
+
"name": {
|
|
1192
|
+
"description": "app name in org/name format",
|
|
1193
|
+
"name": "name",
|
|
1194
|
+
"required": true
|
|
1195
|
+
}
|
|
1196
|
+
},
|
|
1197
|
+
"description": "Deploy a hereya-app to a workspace.",
|
|
1198
|
+
"examples": [
|
|
1199
|
+
"<%= config.bin %> <%= command.id %> my-org/my-app -w my-workspace",
|
|
1200
|
+
"<%= config.bin %> <%= command.id %> my-org/my-app -w prod --version 1.2.0",
|
|
1201
|
+
"<%= config.bin %> <%= command.id %> my-org/my-app -w prod -V 'app.yaml: \"key: value\"'",
|
|
1202
|
+
"<%= config.bin %> <%= command.id %> my-org/my-app -w prod --vars-file ./hereyavars.yaml"
|
|
1203
|
+
],
|
|
1204
|
+
"flags": {
|
|
1205
|
+
"parameter": {
|
|
1206
|
+
"char": "p",
|
|
1207
|
+
"description": "parameter for the app deployment, in the form of key=value (repeatable)",
|
|
1208
|
+
"name": "parameter",
|
|
1209
|
+
"default": [],
|
|
1210
|
+
"hasDynamicHelp": false,
|
|
1211
|
+
"multiple": true,
|
|
1212
|
+
"type": "option"
|
|
1213
|
+
},
|
|
1214
|
+
"vars": {
|
|
1215
|
+
"char": "V",
|
|
1216
|
+
"description": "YAML string mapping hereyavars filename -> YAML body (mutually exclusive with --vars-file)",
|
|
1217
|
+
"exclusive": [
|
|
1218
|
+
"vars-file"
|
|
1219
|
+
],
|
|
1220
|
+
"name": "vars",
|
|
1221
|
+
"hasDynamicHelp": false,
|
|
1222
|
+
"multiple": false,
|
|
1223
|
+
"type": "option"
|
|
1224
|
+
},
|
|
1225
|
+
"vars-file": {
|
|
1226
|
+
"description": "path to a YAML file mapping hereyavars filename -> YAML body (mutually exclusive with --vars)",
|
|
1227
|
+
"exclusive": [
|
|
1228
|
+
"vars"
|
|
1229
|
+
],
|
|
1230
|
+
"name": "vars-file",
|
|
1231
|
+
"hasDynamicHelp": false,
|
|
1232
|
+
"multiple": false,
|
|
1233
|
+
"type": "option"
|
|
1234
|
+
},
|
|
1235
|
+
"version": {
|
|
1236
|
+
"description": "specific app version to deploy (defaults to latest)",
|
|
1237
|
+
"name": "version",
|
|
1238
|
+
"hasDynamicHelp": false,
|
|
1239
|
+
"multiple": false,
|
|
1240
|
+
"type": "option"
|
|
1241
|
+
},
|
|
1242
|
+
"workspace": {
|
|
1243
|
+
"char": "w",
|
|
1244
|
+
"description": "name of the workspace to deploy the app to",
|
|
1245
|
+
"name": "workspace",
|
|
1246
|
+
"required": true,
|
|
1247
|
+
"hasDynamicHelp": false,
|
|
1248
|
+
"multiple": false,
|
|
1249
|
+
"type": "option"
|
|
1250
|
+
}
|
|
1251
|
+
},
|
|
1252
|
+
"hasDynamicHelp": false,
|
|
1253
|
+
"hiddenAliases": [],
|
|
1254
|
+
"id": "app:deploy",
|
|
1255
|
+
"pluginAlias": "hereya-cli",
|
|
1256
|
+
"pluginName": "hereya-cli",
|
|
1257
|
+
"pluginType": "core",
|
|
1258
|
+
"strict": true,
|
|
1259
|
+
"enableJsonFlag": false,
|
|
1260
|
+
"isESM": true,
|
|
1261
|
+
"relativePath": [
|
|
1262
|
+
"dist",
|
|
1263
|
+
"commands",
|
|
1264
|
+
"app",
|
|
1265
|
+
"deploy",
|
|
1266
|
+
"index.js"
|
|
1267
|
+
]
|
|
1268
|
+
},
|
|
1269
|
+
"app:deployments": {
|
|
1270
|
+
"aliases": [],
|
|
1271
|
+
"args": {
|
|
1272
|
+
"name": {
|
|
1273
|
+
"description": "app name in org/name format",
|
|
1274
|
+
"name": "name",
|
|
1275
|
+
"required": true
|
|
1276
|
+
}
|
|
1277
|
+
},
|
|
1278
|
+
"description": "List workspaces a hereya-app has been deployed to.",
|
|
1279
|
+
"examples": [
|
|
1280
|
+
"<%= config.bin %> <%= command.id %> my-org/my-app"
|
|
1281
|
+
],
|
|
1282
|
+
"flags": {},
|
|
1283
|
+
"hasDynamicHelp": false,
|
|
1284
|
+
"hiddenAliases": [],
|
|
1285
|
+
"id": "app:deployments",
|
|
1286
|
+
"pluginAlias": "hereya-cli",
|
|
1287
|
+
"pluginName": "hereya-cli",
|
|
1288
|
+
"pluginType": "core",
|
|
1289
|
+
"strict": true,
|
|
1290
|
+
"enableJsonFlag": false,
|
|
1291
|
+
"isESM": true,
|
|
1292
|
+
"relativePath": [
|
|
1293
|
+
"dist",
|
|
1294
|
+
"commands",
|
|
1295
|
+
"app",
|
|
1296
|
+
"deployments",
|
|
1297
|
+
"index.js"
|
|
1298
|
+
]
|
|
1299
|
+
},
|
|
1300
|
+
"app:destroy": {
|
|
1301
|
+
"aliases": [],
|
|
1302
|
+
"args": {
|
|
1303
|
+
"name": {
|
|
1304
|
+
"description": "app name in org/name format",
|
|
1305
|
+
"name": "name",
|
|
1306
|
+
"required": true
|
|
1307
|
+
}
|
|
1308
|
+
},
|
|
1309
|
+
"description": "Destroy a hereya-app deployment from a workspace.",
|
|
1310
|
+
"examples": [
|
|
1311
|
+
"<%= config.bin %> <%= command.id %> my-org/my-app -w my-workspace"
|
|
1312
|
+
],
|
|
1313
|
+
"flags": {
|
|
1314
|
+
"workspace": {
|
|
1315
|
+
"char": "w",
|
|
1316
|
+
"description": "workspace where the app is currently deployed",
|
|
1317
|
+
"name": "workspace",
|
|
1318
|
+
"required": true,
|
|
1319
|
+
"hasDynamicHelp": false,
|
|
1320
|
+
"multiple": false,
|
|
1321
|
+
"type": "option"
|
|
1322
|
+
}
|
|
1323
|
+
},
|
|
1324
|
+
"hasDynamicHelp": false,
|
|
1325
|
+
"hiddenAliases": [],
|
|
1326
|
+
"id": "app:destroy",
|
|
1327
|
+
"pluginAlias": "hereya-cli",
|
|
1328
|
+
"pluginName": "hereya-cli",
|
|
1329
|
+
"pluginType": "core",
|
|
1330
|
+
"strict": true,
|
|
1331
|
+
"enableJsonFlag": false,
|
|
1332
|
+
"isESM": true,
|
|
1333
|
+
"relativePath": [
|
|
1334
|
+
"dist",
|
|
1335
|
+
"commands",
|
|
1336
|
+
"app",
|
|
1337
|
+
"destroy",
|
|
1338
|
+
"index.js"
|
|
1339
|
+
]
|
|
1340
|
+
},
|
|
1341
|
+
"app:env": {
|
|
1342
|
+
"aliases": [],
|
|
1343
|
+
"args": {
|
|
1344
|
+
"name": {
|
|
1345
|
+
"description": "app name in org/name format",
|
|
1346
|
+
"name": "name",
|
|
1347
|
+
"required": true
|
|
1348
|
+
},
|
|
1349
|
+
"key": {
|
|
1350
|
+
"description": "optional env var key to print (omit to print all)",
|
|
1351
|
+
"name": "key",
|
|
1194
1352
|
"required": false
|
|
1195
1353
|
}
|
|
1196
1354
|
},
|
|
1197
|
-
"description": "
|
|
1355
|
+
"description": "Print environment variables exported by a hereya-app deployment.",
|
|
1198
1356
|
"examples": [
|
|
1199
|
-
"<%= config.bin %> <%= command.id %>",
|
|
1200
|
-
"<%= config.bin %> <%= command.id %>
|
|
1357
|
+
"<%= config.bin %> <%= command.id %> my-org/my-app -w my-workspace",
|
|
1358
|
+
"<%= config.bin %> <%= command.id %> my-org/my-app -w my-workspace DATABASE_URL"
|
|
1359
|
+
],
|
|
1360
|
+
"flags": {
|
|
1361
|
+
"workspace": {
|
|
1362
|
+
"char": "w",
|
|
1363
|
+
"description": "workspace to read env outputs from",
|
|
1364
|
+
"name": "workspace",
|
|
1365
|
+
"required": true,
|
|
1366
|
+
"hasDynamicHelp": false,
|
|
1367
|
+
"multiple": false,
|
|
1368
|
+
"type": "option"
|
|
1369
|
+
}
|
|
1370
|
+
},
|
|
1371
|
+
"hasDynamicHelp": false,
|
|
1372
|
+
"hiddenAliases": [],
|
|
1373
|
+
"id": "app:env",
|
|
1374
|
+
"pluginAlias": "hereya-cli",
|
|
1375
|
+
"pluginName": "hereya-cli",
|
|
1376
|
+
"pluginType": "core",
|
|
1377
|
+
"strict": true,
|
|
1378
|
+
"enableJsonFlag": false,
|
|
1379
|
+
"isESM": true,
|
|
1380
|
+
"relativePath": [
|
|
1381
|
+
"dist",
|
|
1382
|
+
"commands",
|
|
1383
|
+
"app",
|
|
1384
|
+
"env",
|
|
1385
|
+
"index.js"
|
|
1386
|
+
]
|
|
1387
|
+
},
|
|
1388
|
+
"app:list": {
|
|
1389
|
+
"aliases": [],
|
|
1390
|
+
"args": {},
|
|
1391
|
+
"description": "List hereya-apps available to your account.",
|
|
1392
|
+
"examples": [
|
|
1393
|
+
"<%= config.bin %> <%= command.id %>"
|
|
1201
1394
|
],
|
|
1202
1395
|
"flags": {},
|
|
1203
1396
|
"hasDynamicHelp": false,
|
|
1204
1397
|
"hiddenAliases": [],
|
|
1205
|
-
"id": "
|
|
1398
|
+
"id": "app:list",
|
|
1206
1399
|
"pluginAlias": "hereya-cli",
|
|
1207
1400
|
"pluginName": "hereya-cli",
|
|
1208
1401
|
"pluginType": "core",
|
|
@@ -1212,8 +1405,99 @@
|
|
|
1212
1405
|
"relativePath": [
|
|
1213
1406
|
"dist",
|
|
1214
1407
|
"commands",
|
|
1215
|
-
"
|
|
1216
|
-
"
|
|
1408
|
+
"app",
|
|
1409
|
+
"list",
|
|
1410
|
+
"index.js"
|
|
1411
|
+
]
|
|
1412
|
+
},
|
|
1413
|
+
"app:new": {
|
|
1414
|
+
"aliases": [],
|
|
1415
|
+
"args": {
|
|
1416
|
+
"dirname": {
|
|
1417
|
+
"description": "directory to create the app skeleton in",
|
|
1418
|
+
"name": "dirname",
|
|
1419
|
+
"required": true
|
|
1420
|
+
}
|
|
1421
|
+
},
|
|
1422
|
+
"description": "Scaffold a new hereya-app directory with starter hereyarc.yaml + hereya.yaml.",
|
|
1423
|
+
"examples": [
|
|
1424
|
+
"<%= config.bin %> <%= command.id %> ./my-app -n my-org/my-app",
|
|
1425
|
+
"<%= config.bin %> <%= command.id %> ./my-app -n my-org/my-app --description \"An ai-app-builder app\""
|
|
1426
|
+
],
|
|
1427
|
+
"flags": {
|
|
1428
|
+
"description": {
|
|
1429
|
+
"description": "description of the app",
|
|
1430
|
+
"name": "description",
|
|
1431
|
+
"required": false,
|
|
1432
|
+
"hasDynamicHelp": false,
|
|
1433
|
+
"multiple": false,
|
|
1434
|
+
"type": "option"
|
|
1435
|
+
},
|
|
1436
|
+
"name": {
|
|
1437
|
+
"char": "n",
|
|
1438
|
+
"description": "app name in org/name format (e.g. my-org/my-app)",
|
|
1439
|
+
"name": "name",
|
|
1440
|
+
"required": true,
|
|
1441
|
+
"hasDynamicHelp": false,
|
|
1442
|
+
"multiple": false,
|
|
1443
|
+
"type": "option"
|
|
1444
|
+
}
|
|
1445
|
+
},
|
|
1446
|
+
"hasDynamicHelp": false,
|
|
1447
|
+
"hiddenAliases": [],
|
|
1448
|
+
"id": "app:new",
|
|
1449
|
+
"pluginAlias": "hereya-cli",
|
|
1450
|
+
"pluginName": "hereya-cli",
|
|
1451
|
+
"pluginType": "core",
|
|
1452
|
+
"strict": true,
|
|
1453
|
+
"enableJsonFlag": false,
|
|
1454
|
+
"isESM": true,
|
|
1455
|
+
"relativePath": [
|
|
1456
|
+
"dist",
|
|
1457
|
+
"commands",
|
|
1458
|
+
"app",
|
|
1459
|
+
"new",
|
|
1460
|
+
"index.js"
|
|
1461
|
+
]
|
|
1462
|
+
},
|
|
1463
|
+
"app:status": {
|
|
1464
|
+
"aliases": [],
|
|
1465
|
+
"args": {
|
|
1466
|
+
"name": {
|
|
1467
|
+
"description": "app name in org/name format",
|
|
1468
|
+
"name": "name",
|
|
1469
|
+
"required": true
|
|
1470
|
+
}
|
|
1471
|
+
},
|
|
1472
|
+
"description": "Show the deployment status of a hereya-app on a workspace.",
|
|
1473
|
+
"examples": [
|
|
1474
|
+
"<%= config.bin %> <%= command.id %> my-org/my-app -w my-workspace"
|
|
1475
|
+
],
|
|
1476
|
+
"flags": {
|
|
1477
|
+
"workspace": {
|
|
1478
|
+
"char": "w",
|
|
1479
|
+
"description": "workspace to read deployment status from",
|
|
1480
|
+
"name": "workspace",
|
|
1481
|
+
"required": true,
|
|
1482
|
+
"hasDynamicHelp": false,
|
|
1483
|
+
"multiple": false,
|
|
1484
|
+
"type": "option"
|
|
1485
|
+
}
|
|
1486
|
+
},
|
|
1487
|
+
"hasDynamicHelp": false,
|
|
1488
|
+
"hiddenAliases": [],
|
|
1489
|
+
"id": "app:status",
|
|
1490
|
+
"pluginAlias": "hereya-cli",
|
|
1491
|
+
"pluginName": "hereya-cli",
|
|
1492
|
+
"pluginType": "core",
|
|
1493
|
+
"strict": true,
|
|
1494
|
+
"enableJsonFlag": false,
|
|
1495
|
+
"isESM": true,
|
|
1496
|
+
"relativePath": [
|
|
1497
|
+
"dist",
|
|
1498
|
+
"commands",
|
|
1499
|
+
"app",
|
|
1500
|
+
"status",
|
|
1217
1501
|
"index.js"
|
|
1218
1502
|
]
|
|
1219
1503
|
},
|
|
@@ -1242,6 +1526,38 @@
|
|
|
1242
1526
|
"index.js"
|
|
1243
1527
|
]
|
|
1244
1528
|
},
|
|
1529
|
+
"config:export-backend": {
|
|
1530
|
+
"aliases": [],
|
|
1531
|
+
"args": {
|
|
1532
|
+
"file": {
|
|
1533
|
+
"description": "Path to save the export file. Defaults to cloud-backend.json in current directory",
|
|
1534
|
+
"name": "file",
|
|
1535
|
+
"required": false
|
|
1536
|
+
}
|
|
1537
|
+
},
|
|
1538
|
+
"description": "Export the cloud backend configuration to a file",
|
|
1539
|
+
"examples": [
|
|
1540
|
+
"<%= config.bin %> <%= command.id %>",
|
|
1541
|
+
"<%= config.bin %> <%= command.id %> ./path/to/export.json"
|
|
1542
|
+
],
|
|
1543
|
+
"flags": {},
|
|
1544
|
+
"hasDynamicHelp": false,
|
|
1545
|
+
"hiddenAliases": [],
|
|
1546
|
+
"id": "config:export-backend",
|
|
1547
|
+
"pluginAlias": "hereya-cli",
|
|
1548
|
+
"pluginName": "hereya-cli",
|
|
1549
|
+
"pluginType": "core",
|
|
1550
|
+
"strict": true,
|
|
1551
|
+
"enableJsonFlag": false,
|
|
1552
|
+
"isESM": true,
|
|
1553
|
+
"relativePath": [
|
|
1554
|
+
"dist",
|
|
1555
|
+
"commands",
|
|
1556
|
+
"config",
|
|
1557
|
+
"export-backend",
|
|
1558
|
+
"index.js"
|
|
1559
|
+
]
|
|
1560
|
+
},
|
|
1245
1561
|
"config:import-backend": {
|
|
1246
1562
|
"aliases": [],
|
|
1247
1563
|
"args": {
|
|
@@ -2881,5 +3197,5 @@
|
|
|
2881
3197
|
]
|
|
2882
3198
|
}
|
|
2883
3199
|
},
|
|
2884
|
-
"version": "0.
|
|
3200
|
+
"version": "0.84.0"
|
|
2885
3201
|
}
|