hereya-cli 0.17.1 → 0.18.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 +23 -21
- package/dist/commands/down/index.js +7 -8
- package/dist/commands/env/set/index.js +11 -9
- package/dist/lib/package/github.d.ts +2 -0
- package/dist/lib/package/github.js +5 -1
- package/dist/lib/package/index.d.ts +3 -1
- package/dist/lib/package/index.js +25 -7
- package/dist/lib/package/local.d.ts +5 -0
- package/dist/lib/package/local.js +32 -0
- package/oclif.manifest.json +35 -34
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ $ npm install -g hereya-cli
|
|
|
20
20
|
$ hereya COMMAND
|
|
21
21
|
running command...
|
|
22
22
|
$ hereya (--version)
|
|
23
|
-
hereya-cli/0.
|
|
23
|
+
hereya-cli/0.18.0 linux-x64 node-v22.13.1
|
|
24
24
|
$ hereya --help [COMMAND]
|
|
25
25
|
USAGE
|
|
26
26
|
$ hereya COMMAND
|
|
@@ -74,7 +74,7 @@ EXAMPLES
|
|
|
74
74
|
$ hereya add cloudy/docker_postgres
|
|
75
75
|
```
|
|
76
76
|
|
|
77
|
-
_See code: [src/commands/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
77
|
+
_See code: [src/commands/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.18.0/src/commands/add/index.ts)_
|
|
78
78
|
|
|
79
79
|
## `hereya bootstrap INFRASTRUCTURETYPE`
|
|
80
80
|
|
|
@@ -99,7 +99,7 @@ EXAMPLES
|
|
|
99
99
|
$ hereya bootstrap local
|
|
100
100
|
```
|
|
101
101
|
|
|
102
|
-
_See code: [src/commands/bootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
102
|
+
_See code: [src/commands/bootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.18.0/src/commands/bootstrap/index.ts)_
|
|
103
103
|
|
|
104
104
|
## `hereya deploy`
|
|
105
105
|
|
|
@@ -121,7 +121,7 @@ EXAMPLES
|
|
|
121
121
|
$ hereya deploy
|
|
122
122
|
```
|
|
123
123
|
|
|
124
|
-
_See code: [src/commands/deploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
124
|
+
_See code: [src/commands/deploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.18.0/src/commands/deploy/index.ts)_
|
|
125
125
|
|
|
126
126
|
## `hereya down`
|
|
127
127
|
|
|
@@ -144,7 +144,7 @@ EXAMPLES
|
|
|
144
144
|
$ hereya down
|
|
145
145
|
```
|
|
146
146
|
|
|
147
|
-
_See code: [src/commands/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
147
|
+
_See code: [src/commands/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.18.0/src/commands/down/index.ts)_
|
|
148
148
|
|
|
149
149
|
## `hereya env [NAME]`
|
|
150
150
|
|
|
@@ -175,7 +175,7 @@ EXAMPLES
|
|
|
175
175
|
$ hereya env -w dev -l
|
|
176
176
|
```
|
|
177
177
|
|
|
178
|
-
_See code: [src/commands/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
178
|
+
_See code: [src/commands/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.18.0/src/commands/env/index.ts)_
|
|
179
179
|
|
|
180
180
|
## `hereya env set [NAME]`
|
|
181
181
|
|
|
@@ -197,10 +197,12 @@ DESCRIPTION
|
|
|
197
197
|
Set an user-defined environment variable for the project
|
|
198
198
|
|
|
199
199
|
EXAMPLES
|
|
200
|
-
$ hereya env set FOO bar
|
|
200
|
+
$ hereya env set FOO -v bar
|
|
201
|
+
|
|
202
|
+
$ hereya env set FOO -v bar -w dev
|
|
201
203
|
```
|
|
202
204
|
|
|
203
|
-
_See code: [src/commands/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
205
|
+
_See code: [src/commands/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.18.0/src/commands/env/set/index.ts)_
|
|
204
206
|
|
|
205
207
|
## `hereya help [COMMAND]`
|
|
206
208
|
|
|
@@ -246,7 +248,7 @@ EXAMPLES
|
|
|
246
248
|
$ hereya init myProject -w=defaultWorkspace --chdir=./myProject
|
|
247
249
|
```
|
|
248
250
|
|
|
249
|
-
_See code: [src/commands/init/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
251
|
+
_See code: [src/commands/init/index.ts](https://github.com/hereya/hereya-cli/blob/v0.18.0/src/commands/init/index.ts)_
|
|
250
252
|
|
|
251
253
|
## `hereya remove PACKAGE`
|
|
252
254
|
|
|
@@ -270,7 +272,7 @@ EXAMPLES
|
|
|
270
272
|
$ hereya remove cloudy/docker_postgres
|
|
271
273
|
```
|
|
272
274
|
|
|
273
|
-
_See code: [src/commands/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
275
|
+
_See code: [src/commands/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.18.0/src/commands/remove/index.ts)_
|
|
274
276
|
|
|
275
277
|
## `hereya run CMD`
|
|
276
278
|
|
|
@@ -296,7 +298,7 @@ EXAMPLES
|
|
|
296
298
|
$ hereya run -w uat -- node index.js
|
|
297
299
|
```
|
|
298
300
|
|
|
299
|
-
_See code: [src/commands/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
301
|
+
_See code: [src/commands/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.18.0/src/commands/run/index.ts)_
|
|
300
302
|
|
|
301
303
|
## `hereya unbootstrap INFRASTRUCTURETYPE`
|
|
302
304
|
|
|
@@ -321,7 +323,7 @@ EXAMPLES
|
|
|
321
323
|
$ hereya unbootstrap local
|
|
322
324
|
```
|
|
323
325
|
|
|
324
|
-
_See code: [src/commands/unbootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
326
|
+
_See code: [src/commands/unbootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.18.0/src/commands/unbootstrap/index.ts)_
|
|
325
327
|
|
|
326
328
|
## `hereya undeploy`
|
|
327
329
|
|
|
@@ -343,7 +345,7 @@ EXAMPLES
|
|
|
343
345
|
$ hereya undeploy
|
|
344
346
|
```
|
|
345
347
|
|
|
346
|
-
_See code: [src/commands/undeploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
348
|
+
_See code: [src/commands/undeploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.18.0/src/commands/undeploy/index.ts)_
|
|
347
349
|
|
|
348
350
|
## `hereya up`
|
|
349
351
|
|
|
@@ -366,7 +368,7 @@ EXAMPLES
|
|
|
366
368
|
$ hereya up
|
|
367
369
|
```
|
|
368
370
|
|
|
369
|
-
_See code: [src/commands/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
371
|
+
_See code: [src/commands/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.18.0/src/commands/up/index.ts)_
|
|
370
372
|
|
|
371
373
|
## `hereya workspace create NAME`
|
|
372
374
|
|
|
@@ -386,7 +388,7 @@ EXAMPLES
|
|
|
386
388
|
$ hereya workspace create dev
|
|
387
389
|
```
|
|
388
390
|
|
|
389
|
-
_See code: [src/commands/workspace/create/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
391
|
+
_See code: [src/commands/workspace/create/index.ts](https://github.com/hereya/hereya-cli/blob/v0.18.0/src/commands/workspace/create/index.ts)_
|
|
390
392
|
|
|
391
393
|
## `hereya workspace delete NAME`
|
|
392
394
|
|
|
@@ -406,7 +408,7 @@ EXAMPLES
|
|
|
406
408
|
$ hereya workspace delete dev
|
|
407
409
|
```
|
|
408
410
|
|
|
409
|
-
_See code: [src/commands/workspace/delete/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
411
|
+
_See code: [src/commands/workspace/delete/index.ts](https://github.com/hereya/hereya-cli/blob/v0.18.0/src/commands/workspace/delete/index.ts)_
|
|
410
412
|
|
|
411
413
|
## `hereya workspace env [NAME]`
|
|
412
414
|
|
|
@@ -432,7 +434,7 @@ EXAMPLES
|
|
|
432
434
|
$ hereya workspace env myEnv -w dev
|
|
433
435
|
```
|
|
434
436
|
|
|
435
|
-
_See code: [src/commands/workspace/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
437
|
+
_See code: [src/commands/workspace/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.18.0/src/commands/workspace/env/index.ts)_
|
|
436
438
|
|
|
437
439
|
## `hereya workspace env set`
|
|
438
440
|
|
|
@@ -456,7 +458,7 @@ EXAMPLES
|
|
|
456
458
|
$ hereya workspace env set -w my-workspace -n myVar -v my-value -i aws -s
|
|
457
459
|
```
|
|
458
460
|
|
|
459
|
-
_See code: [src/commands/workspace/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
461
|
+
_See code: [src/commands/workspace/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.18.0/src/commands/workspace/env/set/index.ts)_
|
|
460
462
|
|
|
461
463
|
## `hereya workspace env unset`
|
|
462
464
|
|
|
@@ -477,7 +479,7 @@ EXAMPLES
|
|
|
477
479
|
$ hereya workspace env unset -w my-workspace -n myVar
|
|
478
480
|
```
|
|
479
481
|
|
|
480
|
-
_See code: [src/commands/workspace/env/unset/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
482
|
+
_See code: [src/commands/workspace/env/unset/index.ts](https://github.com/hereya/hereya-cli/blob/v0.18.0/src/commands/workspace/env/unset/index.ts)_
|
|
481
483
|
|
|
482
484
|
## `hereya workspace install PACKAGE`
|
|
483
485
|
|
|
@@ -504,7 +506,7 @@ EXAMPLES
|
|
|
504
506
|
$ hereya workspace install hereya/aws-cognito
|
|
505
507
|
```
|
|
506
508
|
|
|
507
|
-
_See code: [src/commands/workspace/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
509
|
+
_See code: [src/commands/workspace/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.18.0/src/commands/workspace/install/index.ts)_
|
|
508
510
|
|
|
509
511
|
## `hereya workspace uninstall PACKAGE`
|
|
510
512
|
|
|
@@ -531,5 +533,5 @@ EXAMPLES
|
|
|
531
533
|
$ hereya workspace uninstall hereya/aws-cognito
|
|
532
534
|
```
|
|
533
535
|
|
|
534
|
-
_See code: [src/commands/workspace/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
536
|
+
_See code: [src/commands/workspace/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.18.0/src/commands/workspace/uninstall/index.ts)_
|
|
535
537
|
<!-- commandsstop -->
|
|
@@ -87,31 +87,30 @@ export default class Down extends Command {
|
|
|
87
87
|
{
|
|
88
88
|
skip: (ctx) => !ctx.packages || ctx.packages.length === 0,
|
|
89
89
|
async task(ctx) {
|
|
90
|
-
|
|
91
|
-
if (!packages || packages.length === 0) {
|
|
90
|
+
if (!ctx.packages || ctx.packages.length === 0) {
|
|
92
91
|
return;
|
|
93
92
|
}
|
|
94
|
-
return task.newListr(packages.map((packageName) => ({
|
|
93
|
+
return task.newListr(ctx.packages.map((packageName) => ({
|
|
95
94
|
async task() {
|
|
96
95
|
const parameterManager = getParameterManager();
|
|
97
96
|
const { parameters } = await parameterManager.getPackageParameters({
|
|
98
97
|
package: packageName,
|
|
99
98
|
projectRootDir,
|
|
100
|
-
workspace,
|
|
99
|
+
workspace: ctx.workspace,
|
|
101
100
|
});
|
|
102
101
|
const destroyOutput = await destroyPackage({
|
|
103
|
-
env: workspaceEnvOutput.env,
|
|
102
|
+
env: ctx.workspaceEnvOutput.env,
|
|
104
103
|
isDeploying: flags.deploy,
|
|
105
104
|
package: packageName,
|
|
106
105
|
parameters,
|
|
107
|
-
project: configOutput.config.project,
|
|
108
|
-
workspace,
|
|
106
|
+
project: ctx.configOutput.config.project,
|
|
107
|
+
workspace: ctx.workspace,
|
|
109
108
|
});
|
|
110
109
|
if (!destroyOutput.success) {
|
|
111
110
|
throw new Error(destroyOutput.reason);
|
|
112
111
|
}
|
|
113
112
|
const { env, metadata } = destroyOutput;
|
|
114
|
-
const output = destroyed || [];
|
|
113
|
+
const output = ctx.destroyed || [];
|
|
115
114
|
output.push({ env, metadata, packageName });
|
|
116
115
|
ctx.destroyed = output;
|
|
117
116
|
},
|
|
@@ -8,7 +8,10 @@ export default class EnvSet extends Command {
|
|
|
8
8
|
name: Args.string({ description: 'name of the environment variable to set' }),
|
|
9
9
|
};
|
|
10
10
|
static description = 'Set an user-defined environment variable for the project';
|
|
11
|
-
static examples = [
|
|
11
|
+
static examples = [
|
|
12
|
+
'<%= config.bin %> <%= command.id %> FOO -v bar',
|
|
13
|
+
'<%= config.bin %> <%= command.id %> FOO -v bar -w dev',
|
|
14
|
+
];
|
|
12
15
|
static flags = {
|
|
13
16
|
chdir: Flags.string({
|
|
14
17
|
description: 'project root directory',
|
|
@@ -38,15 +41,14 @@ export default class EnvSet extends Command {
|
|
|
38
41
|
return;
|
|
39
42
|
}
|
|
40
43
|
const rootDir = projectRootDir ?? process.cwd();
|
|
41
|
-
const candidates = flags.workspace
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
path.join(rootDir, 'hereyastaticenv', `env.yml`)
|
|
47
|
-
];
|
|
44
|
+
const candidates = flags.workspace
|
|
45
|
+
? [
|
|
46
|
+
path.join(rootDir, 'hereyastaticenv', `env.${flags.workspace}.yaml`),
|
|
47
|
+
path.join(rootDir, 'hereyastaticenv', `env.${flags.workspace}.yml`),
|
|
48
|
+
]
|
|
49
|
+
: [path.join(rootDir, 'hereyastaticenv', `env.yaml`), path.join(rootDir, 'hereyastaticenv', `env.yml`)];
|
|
48
50
|
const envFile = await getAnyPath(...candidates);
|
|
49
|
-
const { data: env
|
|
51
|
+
const { data: env } = await load(envFile);
|
|
50
52
|
env[args.name] = flags.value;
|
|
51
53
|
await save(env, envFile);
|
|
52
54
|
this.log(`Environment variable ${args.name} set to ${flags.value} in ${envFile}`);
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { GetRepoContentInput, GetRepoContentOutput, PackageManager } from './common.js';
|
|
2
2
|
export declare class GitHubPackageManager implements PackageManager {
|
|
3
|
+
private readonly registryUrl;
|
|
4
|
+
constructor(registryUrl?: string);
|
|
3
5
|
downloadPackage(pkgUrl: string, destPath: string): Promise<string>;
|
|
4
6
|
getRepoContent({ owner, path: filePath, repo }: GetRepoContentInput): Promise<GetRepoContentOutput>;
|
|
5
7
|
}
|
|
@@ -11,6 +11,10 @@ import { simpleGit } from 'simple-git';
|
|
|
11
11
|
import { BackOffPolicy, Retryable } from 'typescript-retry-decorator';
|
|
12
12
|
import { isNotEmpty } from '../filesystem.js';
|
|
13
13
|
export class GitHubPackageManager {
|
|
14
|
+
registryUrl;
|
|
15
|
+
constructor(registryUrl = process.env.HEREYA_REGISTRY_URL || 'https://github.com') {
|
|
16
|
+
this.registryUrl = registryUrl;
|
|
17
|
+
}
|
|
14
18
|
// eslint-disable-next-line new-cap
|
|
15
19
|
async downloadPackage(pkgUrl, destPath) {
|
|
16
20
|
if (await isNotEmpty(destPath)) {
|
|
@@ -24,7 +28,7 @@ export class GitHubPackageManager {
|
|
|
24
28
|
return destPath;
|
|
25
29
|
}
|
|
26
30
|
async getRepoContent({ owner, path: filePath, repo }) {
|
|
27
|
-
const pkgUrl =
|
|
31
|
+
const pkgUrl = `${this.registryUrl}/${owner}/${repo}`;
|
|
28
32
|
const tmpFolder = path.join(os.tmpdir(), 'hereya', 'github', owner, repo);
|
|
29
33
|
try {
|
|
30
34
|
const destPath = await this.downloadPackage(pkgUrl, tmpFolder);
|
|
@@ -2,8 +2,10 @@ import { z } from 'zod';
|
|
|
2
2
|
import { IacType } from '../../iac/common.js';
|
|
3
3
|
import { InfrastructureType } from '../../infrastructure/common.js';
|
|
4
4
|
import { PackageManager } from './common.js';
|
|
5
|
+
import { LocalPackageManager } from './local.js';
|
|
5
6
|
export declare const packageManager: PackageManager;
|
|
6
|
-
export declare
|
|
7
|
+
export declare const localPackageManager: LocalPackageManager;
|
|
8
|
+
export declare function getPackageManager(protocol: string): PackageManager;
|
|
7
9
|
export declare function resolvePackage(input: ResolvePackageInput): Promise<ResolvePackageOutput>;
|
|
8
10
|
export declare function getPackageCanonicalName(packageName: string): string;
|
|
9
11
|
export declare function downloadPackage(pkgUrl: string, destPath: string): Promise<string>;
|
|
@@ -3,17 +3,31 @@ import { z } from 'zod';
|
|
|
3
3
|
import { IacType } from '../../iac/common.js';
|
|
4
4
|
import { InfrastructureType } from '../../infrastructure/common.js';
|
|
5
5
|
import { GitHubPackageManager } from './github.js';
|
|
6
|
+
import { LocalPackageManager } from './local.js';
|
|
6
7
|
export const packageManager = new GitHubPackageManager();
|
|
7
|
-
export
|
|
8
|
+
export const localPackageManager = new LocalPackageManager();
|
|
9
|
+
export function getPackageManager(protocol) {
|
|
10
|
+
if (protocol === 'local') {
|
|
11
|
+
return localPackageManager;
|
|
12
|
+
}
|
|
8
13
|
return packageManager;
|
|
9
14
|
}
|
|
10
15
|
export async function resolvePackage(input) {
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
16
|
+
const isLocal = input.package.startsWith('local://');
|
|
17
|
+
let [owner, repo] = ['', ''];
|
|
18
|
+
if (isLocal) {
|
|
19
|
+
;
|
|
20
|
+
[owner, repo] = input.package.split('://');
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
const pkgParts = input.package.split('/');
|
|
24
|
+
if (pkgParts.length !== 2) {
|
|
25
|
+
return { found: false, reason: 'Invalid package format. Use owner/repository' };
|
|
26
|
+
}
|
|
27
|
+
;
|
|
28
|
+
[owner, repo] = pkgParts;
|
|
14
29
|
}
|
|
15
|
-
const
|
|
16
|
-
const packageManager = getPackageManager();
|
|
30
|
+
const packageManager = getPackageManager(isLocal ? 'local' : '');
|
|
17
31
|
const metadataContentCandidates = (await Promise.all([
|
|
18
32
|
packageManager.getRepoContent({ owner, path: 'hereyarc.yaml', repo }),
|
|
19
33
|
packageManager.getRepoContent({ owner, path: 'hereyarc.yml', repo }),
|
|
@@ -43,10 +57,14 @@ export async function resolvePackage(input) {
|
|
|
43
57
|
}
|
|
44
58
|
}
|
|
45
59
|
export function getPackageCanonicalName(packageName) {
|
|
60
|
+
const isLocal = packageName.startsWith('local://');
|
|
61
|
+
if (isLocal) {
|
|
62
|
+
return packageName.replace('local://', 'local--').replace('/', '-');
|
|
63
|
+
}
|
|
46
64
|
return packageName.replace('/', '-');
|
|
47
65
|
}
|
|
48
66
|
export async function downloadPackage(pkgUrl, destPath) {
|
|
49
|
-
const packageManager = getPackageManager();
|
|
67
|
+
const packageManager = getPackageManager(pkgUrl.startsWith('local://') ? 'local' : '');
|
|
50
68
|
return packageManager.downloadPackage(pkgUrl, destPath);
|
|
51
69
|
}
|
|
52
70
|
export const PackageMetadata = z.object({
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { GetRepoContentInput, GetRepoContentOutput, PackageManager } from './common.js';
|
|
2
|
+
export declare class LocalPackageManager implements PackageManager {
|
|
3
|
+
downloadPackage(pkgUrl: string, destPath: string): Promise<string>;
|
|
4
|
+
getRepoContent({ path: filePath, repo }: GetRepoContentInput): Promise<GetRepoContentOutput>;
|
|
5
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import fs from 'node:fs/promises';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
export class LocalPackageManager {
|
|
4
|
+
async downloadPackage(pkgUrl, destPath) {
|
|
5
|
+
const [, source] = pkgUrl.split('://');
|
|
6
|
+
await fs.cp(source, destPath, { recursive: true });
|
|
7
|
+
return destPath;
|
|
8
|
+
}
|
|
9
|
+
async getRepoContent({ path: filePath, repo }) {
|
|
10
|
+
try {
|
|
11
|
+
const resolvedPath = path.join(repo, filePath);
|
|
12
|
+
if (await fs.stat(resolvedPath)) {
|
|
13
|
+
const content = await fs.readFile(resolvedPath, 'utf8');
|
|
14
|
+
return {
|
|
15
|
+
content,
|
|
16
|
+
found: true,
|
|
17
|
+
pkgUrl: `local://${repo}`,
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
return {
|
|
21
|
+
found: false,
|
|
22
|
+
reason: `File ${filePath} not found in ${repo}`,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
catch (error) {
|
|
26
|
+
return {
|
|
27
|
+
found: false,
|
|
28
|
+
reason: error.message,
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
package/oclif.manifest.json
CHANGED
|
@@ -304,18 +304,19 @@
|
|
|
304
304
|
"index.js"
|
|
305
305
|
]
|
|
306
306
|
},
|
|
307
|
-
"
|
|
307
|
+
"run": {
|
|
308
308
|
"aliases": [],
|
|
309
309
|
"args": {
|
|
310
|
-
"
|
|
311
|
-
"description": "
|
|
312
|
-
"name": "
|
|
310
|
+
"cmd": {
|
|
311
|
+
"description": "command to run",
|
|
312
|
+
"name": "cmd",
|
|
313
313
|
"required": true
|
|
314
314
|
}
|
|
315
315
|
},
|
|
316
|
-
"description": "
|
|
316
|
+
"description": "Run a command with hereya env vars.",
|
|
317
317
|
"examples": [
|
|
318
|
-
"<%= config.bin %> <%= command.id %>
|
|
318
|
+
"<%= config.bin %> <%= command.id %> -- npm run dev",
|
|
319
|
+
"<%= config.bin %> <%= command.id %> -w uat -- node index.js"
|
|
319
320
|
],
|
|
320
321
|
"flags": {
|
|
321
322
|
"chdir": {
|
|
@@ -326,42 +327,44 @@
|
|
|
326
327
|
"multiple": false,
|
|
327
328
|
"type": "option"
|
|
328
329
|
},
|
|
329
|
-
"
|
|
330
|
-
"
|
|
331
|
-
"
|
|
332
|
-
"
|
|
333
|
-
"
|
|
330
|
+
"workspace": {
|
|
331
|
+
"char": "w",
|
|
332
|
+
"description": "name of the workspace to run the command in",
|
|
333
|
+
"name": "workspace",
|
|
334
|
+
"required": false,
|
|
335
|
+
"hasDynamicHelp": false,
|
|
336
|
+
"multiple": false,
|
|
337
|
+
"type": "option"
|
|
334
338
|
}
|
|
335
339
|
},
|
|
336
340
|
"hasDynamicHelp": false,
|
|
337
341
|
"hiddenAliases": [],
|
|
338
|
-
"id": "
|
|
342
|
+
"id": "run",
|
|
339
343
|
"pluginAlias": "hereya-cli",
|
|
340
344
|
"pluginName": "hereya-cli",
|
|
341
345
|
"pluginType": "core",
|
|
342
|
-
"strict":
|
|
346
|
+
"strict": false,
|
|
343
347
|
"enableJsonFlag": false,
|
|
344
348
|
"isESM": true,
|
|
345
349
|
"relativePath": [
|
|
346
350
|
"dist",
|
|
347
351
|
"commands",
|
|
348
|
-
"
|
|
352
|
+
"run",
|
|
349
353
|
"index.js"
|
|
350
354
|
]
|
|
351
355
|
},
|
|
352
|
-
"
|
|
356
|
+
"remove": {
|
|
353
357
|
"aliases": [],
|
|
354
358
|
"args": {
|
|
355
|
-
"
|
|
356
|
-
"description": "
|
|
357
|
-
"name": "
|
|
359
|
+
"package": {
|
|
360
|
+
"description": "The package to remove. Packages are gitHub repositories. Use the format owner/repository",
|
|
361
|
+
"name": "package",
|
|
358
362
|
"required": true
|
|
359
363
|
}
|
|
360
364
|
},
|
|
361
|
-
"description": "
|
|
365
|
+
"description": "Remove a package from the project.",
|
|
362
366
|
"examples": [
|
|
363
|
-
"<%= config.bin %> <%= command.id %>
|
|
364
|
-
"<%= config.bin %> <%= command.id %> -w uat -- node index.js"
|
|
367
|
+
"<%= config.bin %> <%= command.id %> cloudy/docker_postgres"
|
|
365
368
|
],
|
|
366
369
|
"flags": {
|
|
367
370
|
"chdir": {
|
|
@@ -372,29 +375,26 @@
|
|
|
372
375
|
"multiple": false,
|
|
373
376
|
"type": "option"
|
|
374
377
|
},
|
|
375
|
-
"
|
|
376
|
-
"
|
|
377
|
-
"
|
|
378
|
-
"
|
|
379
|
-
"
|
|
380
|
-
"hasDynamicHelp": false,
|
|
381
|
-
"multiple": false,
|
|
382
|
-
"type": "option"
|
|
378
|
+
"debug": {
|
|
379
|
+
"description": "enable debug mode",
|
|
380
|
+
"name": "debug",
|
|
381
|
+
"allowNo": false,
|
|
382
|
+
"type": "boolean"
|
|
383
383
|
}
|
|
384
384
|
},
|
|
385
385
|
"hasDynamicHelp": false,
|
|
386
386
|
"hiddenAliases": [],
|
|
387
|
-
"id": "
|
|
387
|
+
"id": "remove",
|
|
388
388
|
"pluginAlias": "hereya-cli",
|
|
389
389
|
"pluginName": "hereya-cli",
|
|
390
390
|
"pluginType": "core",
|
|
391
|
-
"strict":
|
|
391
|
+
"strict": true,
|
|
392
392
|
"enableJsonFlag": false,
|
|
393
393
|
"isESM": true,
|
|
394
394
|
"relativePath": [
|
|
395
395
|
"dist",
|
|
396
396
|
"commands",
|
|
397
|
-
"
|
|
397
|
+
"remove",
|
|
398
398
|
"index.js"
|
|
399
399
|
]
|
|
400
400
|
},
|
|
@@ -550,7 +550,8 @@
|
|
|
550
550
|
},
|
|
551
551
|
"description": "Set an user-defined environment variable for the project",
|
|
552
552
|
"examples": [
|
|
553
|
-
"<%= config.bin %> <%= command.id %> FOO bar"
|
|
553
|
+
"<%= config.bin %> <%= command.id %> FOO -v bar",
|
|
554
|
+
"<%= config.bin %> <%= command.id %> FOO -v bar -w dev"
|
|
554
555
|
],
|
|
555
556
|
"flags": {
|
|
556
557
|
"chdir": {
|
|
@@ -953,5 +954,5 @@
|
|
|
953
954
|
]
|
|
954
955
|
}
|
|
955
956
|
},
|
|
956
|
-
"version": "0.
|
|
957
|
+
"version": "0.18.0"
|
|
957
958
|
}
|