@laioutr/cli 0.3.0 → 0.3.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/CHANGELOG.md +31 -0
- package/README.md +1 -77
- package/oclif.manifest.json +2 -139
- package/package.json +9 -3
- package/dist/api/fetchRc.d.ts +0 -10
- package/dist/api/fetchRc.js +0 -28
- package/dist/commands/rc/fetch.d.ts +0 -18
- package/dist/commands/rc/fetch.js +0 -28
- package/dist/commands/rc/update.d.ts +0 -13
- package/dist/commands/rc/update.js +0 -33
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/laioutr-base-command.d.ts +0 -8
- package/dist/laioutr-base-command.js +0 -18
- package/dist/rc/validation.d.ts +0 -8
- package/dist/rc/validation.js +0 -8
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# @laioutr/cli
|
|
2
|
+
|
|
3
|
+
## 0.3.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 93b327e: Accept --project flag input with /p/ in string
|
|
8
|
+
|
|
9
|
+
## 0.3.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- Move `project fetch-rc` to `rc fetch`, introduce `rc update` command
|
|
14
|
+
|
|
15
|
+
## 0.2.1
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- Update readme
|
|
20
|
+
|
|
21
|
+
## 1.2.0
|
|
22
|
+
|
|
23
|
+
### Minor Changes
|
|
24
|
+
|
|
25
|
+
- Make fetch-rc more convenient
|
|
26
|
+
|
|
27
|
+
## 1.1.0
|
|
28
|
+
|
|
29
|
+
### Minor Changes
|
|
30
|
+
|
|
31
|
+
- Media Library upload handling, improved documentation-generation from canonical-types
|
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ $ npm install -g @laioutr/cli
|
|
|
20
20
|
$ laioutr COMMAND
|
|
21
21
|
running command...
|
|
22
22
|
$ laioutr (--version)
|
|
23
|
-
@laioutr/cli/0.3.
|
|
23
|
+
@laioutr/cli/0.3.1 linux-x64 node-v24.14.1
|
|
24
24
|
$ laioutr --help [COMMAND]
|
|
25
25
|
USAGE
|
|
26
26
|
$ laioutr COMMAND
|
|
@@ -42,9 +42,6 @@ USAGE
|
|
|
42
42
|
* [`laioutr plugins uninstall [PLUGIN]`](#laioutr-plugins-uninstall-plugin)
|
|
43
43
|
* [`laioutr plugins unlink [PLUGIN]`](#laioutr-plugins-unlink-plugin)
|
|
44
44
|
* [`laioutr plugins update`](#laioutr-plugins-update)
|
|
45
|
-
* [`laioutr project fetch-rc [FILENAME]`](#laioutr-project-fetch-rc-filename)
|
|
46
|
-
* [`laioutr rc fetch [FILENAME]`](#laioutr-rc-fetch-filename)
|
|
47
|
-
* [`laioutr rc update [FILENAME]`](#laioutr-rc-update-filename)
|
|
48
45
|
|
|
49
46
|
## `laioutr help [COMMAND]`
|
|
50
47
|
|
|
@@ -355,77 +352,4 @@ DESCRIPTION
|
|
|
355
352
|
```
|
|
356
353
|
|
|
357
354
|
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.41/src/commands/plugins/update.ts)_
|
|
358
|
-
|
|
359
|
-
## `laioutr project fetch-rc [FILENAME]`
|
|
360
|
-
|
|
361
|
-
Fetches the laioutrrc.json of a project from the cockpit api.
|
|
362
|
-
|
|
363
|
-
```
|
|
364
|
-
USAGE
|
|
365
|
-
$ laioutr project fetch-rc [FILENAME] --cockpitApiHost <value> --cwd <value> -e <value> -s <value> -p <value>
|
|
366
|
-
|
|
367
|
-
FLAGS
|
|
368
|
-
-e, --environmentName=<value> (required) [default: main] environment name
|
|
369
|
-
-p, --project=<value> (required) <organization slug>/<project slug>
|
|
370
|
-
-s, --projectSecret=<value> (required) project secret
|
|
371
|
-
--cockpitApiHost=<value> (required) [default: https://cockpit.laioutr.cloud] cockpit api host
|
|
372
|
-
--cwd=<value> (required) [default: /Users/sl/src/laioutr/apps/cli] current working directory
|
|
373
|
-
|
|
374
|
-
DESCRIPTION
|
|
375
|
-
Fetches the laioutrrc.json of a project from the cockpit api.
|
|
376
|
-
|
|
377
|
-
ALIASES
|
|
378
|
-
$ laioutr project fetch-rc
|
|
379
|
-
|
|
380
|
-
EXAMPLES
|
|
381
|
-
$ laioutr project fetch-rc
|
|
382
|
-
```
|
|
383
|
-
|
|
384
|
-
## `laioutr rc fetch [FILENAME]`
|
|
385
|
-
|
|
386
|
-
Fetches the laioutrrc.json of a project from the cockpit api.
|
|
387
|
-
|
|
388
|
-
```
|
|
389
|
-
USAGE
|
|
390
|
-
$ laioutr rc fetch [FILENAME] --cockpitApiHost <value> --cwd <value> -e <value> -s <value> -p <value>
|
|
391
|
-
|
|
392
|
-
FLAGS
|
|
393
|
-
-e, --environmentName=<value> (required) [default: main] environment name
|
|
394
|
-
-p, --project=<value> (required) <organization slug>/<project slug>
|
|
395
|
-
-s, --projectSecret=<value> (required) project secret
|
|
396
|
-
--cockpitApiHost=<value> (required) [default: https://cockpit.laioutr.cloud] cockpit api host
|
|
397
|
-
--cwd=<value> (required) [default: /Users/sl/src/laioutr/apps/cli] current working directory
|
|
398
|
-
|
|
399
|
-
DESCRIPTION
|
|
400
|
-
Fetches the laioutrrc.json of a project from the cockpit api.
|
|
401
|
-
|
|
402
|
-
ALIASES
|
|
403
|
-
$ laioutr project fetch-rc
|
|
404
|
-
|
|
405
|
-
EXAMPLES
|
|
406
|
-
$ laioutr rc fetch
|
|
407
|
-
```
|
|
408
|
-
|
|
409
|
-
_See code: [src/commands/rc/fetch.ts](https://github.com/packages/cli/blob/v0.3.0/src/commands/rc/fetch.ts)_
|
|
410
|
-
|
|
411
|
-
## `laioutr rc update [FILENAME]`
|
|
412
|
-
|
|
413
|
-
Updates an existing laioutrrc.json file with the latest from the cockpit api.
|
|
414
|
-
|
|
415
|
-
```
|
|
416
|
-
USAGE
|
|
417
|
-
$ laioutr rc update [FILENAME] --cockpitApiHost <value> --cwd <value>
|
|
418
|
-
|
|
419
|
-
FLAGS
|
|
420
|
-
--cockpitApiHost=<value> (required) [default: https://cockpit.laioutr.cloud] cockpit api host
|
|
421
|
-
--cwd=<value> (required) [default: /Users/sl/src/laioutr/apps/cli] current working directory
|
|
422
|
-
|
|
423
|
-
DESCRIPTION
|
|
424
|
-
Updates an existing laioutrrc.json file with the latest from the cockpit api.
|
|
425
|
-
|
|
426
|
-
EXAMPLES
|
|
427
|
-
$ laioutr rc update
|
|
428
|
-
```
|
|
429
|
-
|
|
430
|
-
_See code: [src/commands/rc/update.ts](https://github.com/packages/cli/blob/v0.3.0/src/commands/rc/update.ts)_
|
|
431
355
|
<!-- commandsstop -->
|
package/oclif.manifest.json
CHANGED
|
@@ -1,141 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"commands": {
|
|
3
|
-
|
|
4
|
-
"aliases": [
|
|
5
|
-
"project:fetch-rc"
|
|
6
|
-
],
|
|
7
|
-
"args": {
|
|
8
|
-
"fileName": {
|
|
9
|
-
"default": "laioutrrc.json",
|
|
10
|
-
"name": "fileName",
|
|
11
|
-
"required": false
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
"deprecateAliases": true,
|
|
15
|
-
"description": "Fetches the laioutrrc.json of a project from the cockpit api.",
|
|
16
|
-
"examples": [
|
|
17
|
-
"<%= config.bin %> <%= command.id %>"
|
|
18
|
-
],
|
|
19
|
-
"flags": {
|
|
20
|
-
"cockpitApiHost": {
|
|
21
|
-
"description": "cockpit api host",
|
|
22
|
-
"env": "COCKPIT_API_HOST",
|
|
23
|
-
"name": "cockpitApiHost",
|
|
24
|
-
"required": true,
|
|
25
|
-
"default": "https://cockpit.laioutr.cloud",
|
|
26
|
-
"hasDynamicHelp": false,
|
|
27
|
-
"multiple": false,
|
|
28
|
-
"type": "option"
|
|
29
|
-
},
|
|
30
|
-
"cwd": {
|
|
31
|
-
"description": "current working directory",
|
|
32
|
-
"env": "CWD",
|
|
33
|
-
"name": "cwd",
|
|
34
|
-
"required": true,
|
|
35
|
-
"default": "/Users/sl/src/laioutr/apps/cli",
|
|
36
|
-
"hasDynamicHelp": false,
|
|
37
|
-
"multiple": false,
|
|
38
|
-
"type": "option"
|
|
39
|
-
},
|
|
40
|
-
"environmentName": {
|
|
41
|
-
"char": "e",
|
|
42
|
-
"description": "environment name",
|
|
43
|
-
"env": "ENVIRONMENT_NAME",
|
|
44
|
-
"name": "environmentName",
|
|
45
|
-
"required": true,
|
|
46
|
-
"default": "main",
|
|
47
|
-
"hasDynamicHelp": false,
|
|
48
|
-
"multiple": false,
|
|
49
|
-
"type": "option"
|
|
50
|
-
},
|
|
51
|
-
"projectSecret": {
|
|
52
|
-
"char": "s",
|
|
53
|
-
"description": "project secret",
|
|
54
|
-
"env": "PROJECT_SECRET",
|
|
55
|
-
"name": "projectSecret",
|
|
56
|
-
"required": true,
|
|
57
|
-
"hasDynamicHelp": false,
|
|
58
|
-
"multiple": false,
|
|
59
|
-
"type": "option"
|
|
60
|
-
},
|
|
61
|
-
"project": {
|
|
62
|
-
"char": "p",
|
|
63
|
-
"description": "<organization slug>/<project slug>",
|
|
64
|
-
"env": "PROJECT",
|
|
65
|
-
"name": "project",
|
|
66
|
-
"required": true,
|
|
67
|
-
"hasDynamicHelp": false,
|
|
68
|
-
"multiple": false,
|
|
69
|
-
"type": "option"
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
"hasDynamicHelp": false,
|
|
73
|
-
"hiddenAliases": [],
|
|
74
|
-
"id": "rc:fetch",
|
|
75
|
-
"pluginAlias": "@laioutr/cli",
|
|
76
|
-
"pluginName": "@laioutr/cli",
|
|
77
|
-
"pluginType": "core",
|
|
78
|
-
"strict": true,
|
|
79
|
-
"enableJsonFlag": false,
|
|
80
|
-
"isESM": true,
|
|
81
|
-
"relativePath": [
|
|
82
|
-
"dist",
|
|
83
|
-
"commands",
|
|
84
|
-
"rc",
|
|
85
|
-
"fetch.js"
|
|
86
|
-
]
|
|
87
|
-
},
|
|
88
|
-
"rc:update": {
|
|
89
|
-
"aliases": [],
|
|
90
|
-
"args": {
|
|
91
|
-
"fileName": {
|
|
92
|
-
"default": "laioutrrc.json",
|
|
93
|
-
"name": "fileName",
|
|
94
|
-
"required": false
|
|
95
|
-
}
|
|
96
|
-
},
|
|
97
|
-
"description": "Updates an existing laioutrrc.json file with the latest from the cockpit api.",
|
|
98
|
-
"examples": [
|
|
99
|
-
"<%= config.bin %> <%= command.id %>"
|
|
100
|
-
],
|
|
101
|
-
"flags": {
|
|
102
|
-
"cockpitApiHost": {
|
|
103
|
-
"description": "cockpit api host",
|
|
104
|
-
"env": "COCKPIT_API_HOST",
|
|
105
|
-
"name": "cockpitApiHost",
|
|
106
|
-
"required": true,
|
|
107
|
-
"default": "https://cockpit.laioutr.cloud",
|
|
108
|
-
"hasDynamicHelp": false,
|
|
109
|
-
"multiple": false,
|
|
110
|
-
"type": "option"
|
|
111
|
-
},
|
|
112
|
-
"cwd": {
|
|
113
|
-
"description": "current working directory",
|
|
114
|
-
"env": "CWD",
|
|
115
|
-
"name": "cwd",
|
|
116
|
-
"required": true,
|
|
117
|
-
"default": "/Users/sl/src/laioutr/apps/cli",
|
|
118
|
-
"hasDynamicHelp": false,
|
|
119
|
-
"multiple": false,
|
|
120
|
-
"type": "option"
|
|
121
|
-
}
|
|
122
|
-
},
|
|
123
|
-
"hasDynamicHelp": false,
|
|
124
|
-
"hiddenAliases": [],
|
|
125
|
-
"id": "rc:update",
|
|
126
|
-
"pluginAlias": "@laioutr/cli",
|
|
127
|
-
"pluginName": "@laioutr/cli",
|
|
128
|
-
"pluginType": "core",
|
|
129
|
-
"strict": true,
|
|
130
|
-
"enableJsonFlag": false,
|
|
131
|
-
"isESM": true,
|
|
132
|
-
"relativePath": [
|
|
133
|
-
"dist",
|
|
134
|
-
"commands",
|
|
135
|
-
"rc",
|
|
136
|
-
"update.js"
|
|
137
|
-
]
|
|
138
|
-
}
|
|
139
|
-
},
|
|
140
|
-
"version": "0.3.0"
|
|
2
|
+
"commands": {},
|
|
3
|
+
"version": "0.3.1"
|
|
141
4
|
}
|
package/package.json
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@laioutr/cli",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Laioutr CLI",
|
|
5
|
-
"repository":
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/laioutr/laioutr.git",
|
|
8
|
+
"directory": "apps/cli"
|
|
9
|
+
},
|
|
6
10
|
"author": "Laioutr GmbH",
|
|
7
11
|
"type": "module",
|
|
8
12
|
"main": "dist/index.js",
|
|
@@ -13,7 +17,8 @@
|
|
|
13
17
|
"files": [
|
|
14
18
|
"/bin",
|
|
15
19
|
"/dist",
|
|
16
|
-
"/oclif.manifest.json"
|
|
20
|
+
"/oclif.manifest.json",
|
|
21
|
+
"/CHANGELOG.md"
|
|
17
22
|
],
|
|
18
23
|
"lint-staged": {
|
|
19
24
|
"*.{js,mjs,jsx,ts,tsx,vue}": [
|
|
@@ -36,6 +41,7 @@
|
|
|
36
41
|
"@oclif/core": "^4",
|
|
37
42
|
"@oclif/plugin-help": "^6",
|
|
38
43
|
"@oclif/plugin-plugins": "^5",
|
|
44
|
+
"jiti": "^2.6.1",
|
|
39
45
|
"zod": "3.25.61"
|
|
40
46
|
},
|
|
41
47
|
"devDependencies": {
|
package/dist/api/fetchRc.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
interface HostApiOptions {
|
|
2
|
-
cockpitApiHost: string;
|
|
3
|
-
}
|
|
4
|
-
export interface ProjectApiOptions extends HostApiOptions {
|
|
5
|
-
project: string;
|
|
6
|
-
projectSecret: string;
|
|
7
|
-
environmentName: string;
|
|
8
|
-
}
|
|
9
|
-
export declare const fetchRc: (flags: ProjectApiOptions) => Promise<string>;
|
|
10
|
-
export {};
|
package/dist/api/fetchRc.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod/v4';
|
|
2
|
-
const apiResponseSchema = z.object({
|
|
3
|
-
content: z.string(),
|
|
4
|
-
});
|
|
5
|
-
export const fetchRc = async (flags) => {
|
|
6
|
-
const url = `${flags.cockpitApiHost}/api/v1/project/fetch-rc`;
|
|
7
|
-
const [organizationSlug, projectSlug] = flags.project.split('/');
|
|
8
|
-
const response = await fetch(url, {
|
|
9
|
-
body: JSON.stringify({
|
|
10
|
-
environmentName: flags.environmentName,
|
|
11
|
-
organizationSlug,
|
|
12
|
-
projectSecret: flags.projectSecret,
|
|
13
|
-
projectSlug,
|
|
14
|
-
}),
|
|
15
|
-
headers: {
|
|
16
|
-
'Content-Type': 'application/json',
|
|
17
|
-
},
|
|
18
|
-
method: 'POST',
|
|
19
|
-
});
|
|
20
|
-
const data = await response.json();
|
|
21
|
-
if (response.status !== 200) {
|
|
22
|
-
// eslint-disable-next-line no-console
|
|
23
|
-
console.error(data);
|
|
24
|
-
throw new Error('Failed to fetch RC file. See error message above.');
|
|
25
|
-
}
|
|
26
|
-
const parsed = apiResponseSchema.parse(data);
|
|
27
|
-
return parsed.content;
|
|
28
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import LaioutrBaseCommand from '../../laioutr-base-command.js';
|
|
2
|
-
export default class ProjectRcFetch extends LaioutrBaseCommand {
|
|
3
|
-
static args: {
|
|
4
|
-
fileName: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
5
|
-
};
|
|
6
|
-
static description: string;
|
|
7
|
-
static examples: string[];
|
|
8
|
-
static flags: {
|
|
9
|
-
environmentName: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
-
projectSecret: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
-
project: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
-
cockpitApiHost: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
-
cwd: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
-
};
|
|
15
|
-
static aliases: string[];
|
|
16
|
-
static deprecateAliases: boolean;
|
|
17
|
-
run(): Promise<void>;
|
|
18
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { writeFile } from 'node:fs/promises';
|
|
2
|
-
import path from 'node:path';
|
|
3
|
-
import { Args, Flags } from '@oclif/core';
|
|
4
|
-
import { fetchRc } from '../../api/fetchRc.js';
|
|
5
|
-
import LaioutrBaseCommand from '../../laioutr-base-command.js';
|
|
6
|
-
export default class ProjectRcFetch extends LaioutrBaseCommand {
|
|
7
|
-
static args = {
|
|
8
|
-
...LaioutrBaseCommand.args,
|
|
9
|
-
fileName: Args.string({ default: 'laioutrrc.json', name: 'fileName', required: false }),
|
|
10
|
-
};
|
|
11
|
-
static description = 'Fetches the laioutrrc.json of a project from the cockpit api.';
|
|
12
|
-
static examples = ['<%= config.bin %> <%= command.id %>'];
|
|
13
|
-
static flags = {
|
|
14
|
-
...LaioutrBaseCommand.flags,
|
|
15
|
-
environmentName: Flags.string({ char: 'e', default: 'main', description: 'environment name', env: 'ENVIRONMENT_NAME', required: true }),
|
|
16
|
-
projectSecret: Flags.string({ char: 's', description: 'project secret', env: 'PROJECT_SECRET', required: true }),
|
|
17
|
-
project: Flags.string({ char: 'p', description: '<organization slug>/<project slug>', env: 'PROJECT', required: true }),
|
|
18
|
-
};
|
|
19
|
-
static aliases = ['project:fetch-rc'];
|
|
20
|
-
static deprecateAliases = true;
|
|
21
|
-
async run() {
|
|
22
|
-
const { args, flags } = await this.parse(ProjectRcFetch);
|
|
23
|
-
const rc = await fetchRc(flags);
|
|
24
|
-
const filePath = path.join(flags.cwd, args.fileName);
|
|
25
|
-
this.log('Writing RC file', filePath);
|
|
26
|
-
return writeFile(filePath, rc);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import LaioutrBaseCommand from '../../laioutr-base-command.js';
|
|
2
|
-
export default class ProjectRcUpdate extends LaioutrBaseCommand {
|
|
3
|
-
static args: {
|
|
4
|
-
fileName: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
5
|
-
};
|
|
6
|
-
static description: string;
|
|
7
|
-
static examples: string[];
|
|
8
|
-
static flags: {
|
|
9
|
-
cockpitApiHost: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
-
cwd: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
-
};
|
|
12
|
-
run(): Promise<void>;
|
|
13
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { readFile, writeFile } from 'node:fs/promises';
|
|
2
|
-
import path from 'node:path';
|
|
3
|
-
import { Args } from '@oclif/core';
|
|
4
|
-
import { fetchRc } from '../../api/fetchRc.js';
|
|
5
|
-
import LaioutrBaseCommand from '../../laioutr-base-command.js';
|
|
6
|
-
import { rcWithLaioutrMetaSchema } from '../../rc/validation.js';
|
|
7
|
-
export default class ProjectRcUpdate extends LaioutrBaseCommand {
|
|
8
|
-
static args = {
|
|
9
|
-
...LaioutrBaseCommand.args,
|
|
10
|
-
fileName: Args.string({ default: 'laioutrrc.json', name: 'fileName', required: false }),
|
|
11
|
-
};
|
|
12
|
-
static description = 'Updates an existing laioutrrc.json file with the latest from the cockpit api.';
|
|
13
|
-
static examples = ['<%= config.bin %> <%= command.id %>'];
|
|
14
|
-
static flags = {
|
|
15
|
-
...LaioutrBaseCommand.flags,
|
|
16
|
-
};
|
|
17
|
-
async run() {
|
|
18
|
-
const { args, flags } = await this.parse(ProjectRcUpdate);
|
|
19
|
-
const currentRcRaw = await readFile(path.join(flags.cwd, args.fileName), 'utf-8');
|
|
20
|
-
const currentRc = rcWithLaioutrMetaSchema.parse(JSON.parse(currentRcRaw));
|
|
21
|
-
const options = {
|
|
22
|
-
...flags,
|
|
23
|
-
project: currentRc.laioutr.projectSlug,
|
|
24
|
-
projectSecret: currentRc.laioutr.projectSecretKey,
|
|
25
|
-
environmentName: currentRc.laioutr.environmentName,
|
|
26
|
-
};
|
|
27
|
-
this.log('Fetching latest RC for project', options.project);
|
|
28
|
-
const rc = await fetchRc(options);
|
|
29
|
-
const filePath = path.join(flags.cwd, args.fileName);
|
|
30
|
-
this.log('Writing RC file', filePath);
|
|
31
|
-
return writeFile(filePath, rc);
|
|
32
|
-
}
|
|
33
|
-
}
|
package/dist/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { run } from '@oclif/core';
|
package/dist/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { run } from '@oclif/core';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Command } from '@oclif/core';
|
|
2
|
-
export default abstract class LaioutrBaseCommand extends Command {
|
|
3
|
-
static args: {};
|
|
4
|
-
static flags: {
|
|
5
|
-
cockpitApiHost: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
6
|
-
cwd: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
7
|
-
};
|
|
8
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Command, Flags } from '@oclif/core';
|
|
2
|
-
export default class LaioutrBaseCommand extends Command {
|
|
3
|
-
static args = {};
|
|
4
|
-
static flags = {
|
|
5
|
-
cockpitApiHost: Flags.string({
|
|
6
|
-
default: 'https://cockpit.laioutr.cloud',
|
|
7
|
-
description: 'cockpit api host',
|
|
8
|
-
env: 'COCKPIT_API_HOST',
|
|
9
|
-
required: true,
|
|
10
|
-
}),
|
|
11
|
-
cwd: Flags.string({
|
|
12
|
-
default: process.cwd(),
|
|
13
|
-
description: 'current working directory',
|
|
14
|
-
env: 'CWD',
|
|
15
|
-
required: true,
|
|
16
|
-
}),
|
|
17
|
-
};
|
|
18
|
-
}
|
package/dist/rc/validation.d.ts
DELETED