Skip to content

Commit 572019d

Browse files
0.7.1
feat: Add verbosity support (#46)
1 parent 05d57fa commit 572019d

File tree

17 files changed

+38
-224
lines changed

17 files changed

+38
-224
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ $ npm install -g codify
1818
$ codify COMMAND
1919
running command...
2020
$ codify (--version)
21-
codify/0.7.0 darwin-arm64 node-v20.15.1
21+
codify/0.7.1 darwin-arm64 node-v20.15.1
2222
$ codify --help [COMMAND]
2323
USAGE
2424
$ codify COMMAND
@@ -74,7 +74,7 @@ EXAMPLES
7474
$ codify apply -S <sudo password>
7575
```
7676

77-
_See code: [src/commands/apply.ts](https://github.com/kevinwang5658/codify/blob/v0.7.0/src/commands/apply.ts)_
77+
_See code: [src/commands/apply.ts](https://github.com/kevinwang5658/codify/blob/v0.7.1/src/commands/apply.ts)_
7878

7979
## `codify destroy`
8080

@@ -113,7 +113,7 @@ EXAMPLES
113113
$ codify destroy
114114
```
115115

116-
_See code: [src/commands/destroy.ts](https://github.com/kevinwang5658/codify/blob/v0.7.0/src/commands/destroy.ts)_
116+
_See code: [src/commands/destroy.ts](https://github.com/kevinwang5658/codify/blob/v0.7.1/src/commands/destroy.ts)_
117117

118118
## `codify help [COMMAND]`
119119

@@ -189,7 +189,7 @@ EXAMPLES
189189
$ codify import \*
190190
```
191191

192-
_See code: [src/commands/import.ts](https://github.com/kevinwang5658/codify/blob/v0.7.0/src/commands/import.ts)_
192+
_See code: [src/commands/import.ts](https://github.com/kevinwang5658/codify/blob/v0.7.1/src/commands/import.ts)_
193193

194194
## `codify init`
195195

@@ -217,7 +217,7 @@ EXAMPLES
217217
$ codify init
218218
```
219219

220-
_See code: [src/commands/init.ts](https://github.com/kevinwang5658/codify/blob/v0.7.0/src/commands/init.ts)_
220+
_See code: [src/commands/init.ts](https://github.com/kevinwang5658/codify/blob/v0.7.1/src/commands/init.ts)_
221221

222222
## `codify plan`
223223

@@ -254,7 +254,7 @@ EXAMPLES
254254
$ codify plan -p ../
255255
```
256256

257-
_See code: [src/commands/plan.ts](https://github.com/kevinwang5658/codify/blob/v0.7.0/src/commands/plan.ts)_
257+
_See code: [src/commands/plan.ts](https://github.com/kevinwang5658/codify/blob/v0.7.1/src/commands/plan.ts)_
258258

259259
## `codify update [CHANNEL]`
260260

codify.json

Lines changed: 2 additions & 206 deletions
Original file line numberDiff line numberDiff line change
@@ -5,213 +5,9 @@
55
"default": "../codify-homebrew-plugin/src/index.ts"
66
}
77
},
8-
{ "type": "virtualenv" },
9-
{ "type": "virtualenv-project", "dest": ".venv12", "cwd": "~/Projects/python-temp2", "automaticallyInstallRequirementsTxt": true },
10-
{ "type": "pnpm", "version": "9.15.5", "globalEnvNodeVersion": "20.15" },
11-
{ "type": "path", "path": "$HOME/.bun/bin"},
12-
{
13-
"type": "path",
14-
"paths": [
15-
"$PYENV_ROOT/bin",
16-
"$BUN_INSTALL/bin",
17-
"$DENO_INSTALL/bin",
18-
"~/.jenv/bin",
19-
"~/a/random/path",
20-
"$NVM_DIR/.bin/2",
21-
"$NVM_DIR/.bin/3"
22-
],
23-
"declarationsOnly": true,
24-
"name": "1"
25-
},
26-
{
27-
"type": "homebrew",
28-
"taps": [
29-
"cirruslabs/cli",
30-
"hashicorp/tap",
31-
"homebrew/bundle",
32-
"homebrew/services"
33-
],
34-
"casks": [
35-
"android-commandlinetools",
36-
"android-studio",
37-
"mitmproxy"
38-
],
39-
"formulae": [
40-
"ack",
41-
"asciinema",
42-
"cirrus",
43-
"expect",
44-
"git-lfs",
45-
"groff",
46-
"hyperfine",
47-
"jenv",
48-
"jq",
49-
"mas",
50-
"openjdk@11",
51-
"openjdk@17",
52-
"openjdk@21",
53-
"packer",
54-
"pgcli",
55-
"postgresql@14",
56-
"sshpass",
57-
"tart",
58-
"xz",
59-
"zstd",
60-
"f1bonacc1/tap/process-compose"
61-
]
62-
},
63-
{ "version":"1.10.5","type":"terraform" },
64-
{ "type": "alias", "alias": "gcdsdd", "value": "git clone" },
65-
{
66-
"type": "ssh-config",
67-
"hosts": [
68-
{
69-
"Host": "192.168.64.94",
70-
"HostName": "192.168.64.94",
71-
"User": "admin"
72-
},
73-
{
74-
"Host": "192.168.2.48",
75-
"HostName": "192.168.2.48",
76-
"User": "pi"
77-
},
78-
{
79-
"Host": "*",
80-
"AddKeysToAgent": true,
81-
"IdentityFile": "~/.ssh/id_ed25519"
82-
},
83-
{
84-
"Host": "ec2",
85-
"HostName": "54.82.78.202",
86-
"User": "ec2-user",
87-
"IdentityFile": "~/.ssh/ed25519"
88-
},
89-
{
90-
"Host": "ec2-2",
91-
"HostName": "35.153.180.154",
92-
"User": "ec2-user",
93-
"IdentityFile": "~/.ssh/ed25519"
94-
}
95-
]
96-
},
97-
{
98-
"type": "ssh-key",
99-
"fileName": "id_ed25519",
100-
"passphrase": "",
101-
"keyType": "ed25519"
102-
},
1038
{
1049
"type": "alias",
105-
"alias": "gc",
106-
"value": "git commit -v"
107-
},
108-
{
109-
"type": "pgcli"
110-
},
111-
{
112-
"type": "file",
113-
"contents": "[\n\t{\n \"type\": \"homebrew\",\n \"taps\": [\n \"cirruslabs/cli\",\n \"hashicorp/tap\",\n \"homebrew/services\"\n ],\n \"formulae\": [\n \"asciinema\",\n \"cairo\",\n \"cirrus\",\n \"expect\",\n \"glib\",\n \"hyperfine\",\n \"icu4c\",\n \"jq\",\n \"mas\",\n \"packer\",\n \"sshpass\",\n \"tart\"\n ],\n \"casks\": [\n \t\"firefox\",\n \t\"notion\",\n \t\"sublime-text\",\n \t\"webstorm\",\n \t\"mac-mouse-fix\",\n \t\"wins\",\n \t\"warp\",\n \t\"hammerspoon\",\n \t\"rectangle\",\n \t\"alt-tab\",\n \t\"betterdisplay\",\n \t\"daisydisk\",\n \t\"visual-studio-code\"\n ]\n },\n\n\t{ \"type\": \"nvm\", \"nodeVersions\": [\"20\"], \"global\": \"20\" },\n\t{ \"type\": \"pyenv\", \"pythonVersions\": [\"3.12\", \"3.11\"], \"global\": \"3.11\" },\n\n\t{\n \"type\": \"ssh-key\",\n \"fileName\": \"id_ed25519\",\n \"passphrase\": \"\",\n \"folder\": \"/Users/kevinwang/.ssh\",\n \"keyType\": \"ed25519\"\n },\n { \"type\": \"terraform\" },\n { \"type\": \"git-clone\", \"directory\": \"~/projects/codify\", \"repository\": \"git@github.com:kevinwang5658/codify.git\" },\n { \"type\": \"git-clone\", \"directory\": \"~/projects/codify-web\", \"repository\": \"git@github.com:kevinwang5658/codify-web.git\" },\n\t{ \"type\": \"git-clone\", \"directory\": \"~/projects/codify-homebrew-plugin\", \"repository\": \"git@github.com:kevinwang5658/codify-homebrew-plugin.git\" },\n { \"type\": \"git-clone\", \"directory\": \"~/projects/codify-infrastructure\", \"repository\": \"git@github.com:kevinwang5658/codify-infrastructure.git\" },\n { \"type\": \"git-clone\", \"directory\": \"~/projects/codify-docs\", \"repository\": \"git@github.com:kevinwang5658/codify-docs.git\" },\n { \"type\": \"git-clone\", \"directory\": \"~/projects/codify-ink-form\", \"repository\": \"git@github.com:kevinwang5658/codify-ink-form.git\" },\n\n\n { \"type\": \"action\", \"condition\": \"[ -d node_modules ]\", \"action\": \"npm install\", \"cwd\": \"~/projects/codify\", \"dependsOn\": [\"git-clone.0\", \"nvm\"]},\n { \"type\": \"action\", \"condition\": \"[ -d node_modules ]\", \"action\": \"npm install\", \"cwd\": \"~/projects/codify-web\", \"dependsOn\": [\"git-clone.1\", \"nvm\"]},\n { \"type\": \"action\", \"condition\": \"[ -d node_modules ]\", \"action\": \"npm install\", \"cwd\": \"~/projects/codify-homebrew-plugin\", \"dependsOn\": [\"git-clone.2\", \"nvm\"]},\n { \"type\": \"action\", \"condition\": \"[ -d node_modules ]\", \"action\": \"npm install\", \"cwd\": \"~/projects/codify-docs\", \"dependsOn\": [\"git-clone.4\", \"nvm\"]},\n { \"type\": \"action\", \"condition\": \"[ -d node_modules ]\", \"action\": \"npm install\", \"cwd\": \"~/projects/codify-ink-form\", \"dependsOn\": [\"git-clone.5\", \"nvm\"]}\n]",
114-
"path": "~/codify.json"
115-
},
116-
{
117-
"type": "aws-cli"
118-
},
119-
{
120-
"type": "git-repository",
121-
"directory": "~/Projects/codify-homebrew-plugin",
122-
"repository": "git@github.com:kevinwang5658/codify-homebrew-plugin.git"
123-
},
124-
{
125-
"type": "vscode"
126-
},
127-
{
128-
"type": "git-repository",
129-
"directory": "~/Projects/codify-plugin-lib",
130-
"repository": "git@github.com:kevinwang5658/codify-plugin-lib.git"
131-
},
132-
{
133-
"type": "git-repository",
134-
"directory": "~/Projects/codify",
135-
"repository": "git@github.com:kevinwang5658/codify.git"
136-
},
137-
{
138-
"type": "wait-github-ssh-key"
139-
},
140-
{
141-
"type": "git-lfs"
142-
},
143-
{
144-
"type": "pyenv",
145-
"global": "3.11",
146-
"pythonVersions": [
147-
"3.9.19",
148-
"3.10.14",
149-
"3.11.8",
150-
"3.12.2"
151-
]
152-
},
153-
{
154-
"type": "git",
155-
"email": "kevinwang5658@gmail.com",
156-
"username": "kevinwang"
157-
},
158-
{
159-
"type": "android-studio",
160-
"version": "2023.3.1.20"
161-
},
162-
{
163-
"type": "ssh-add",
164-
"path": "~/.ssh/id_ed25519"
165-
},
166-
{
167-
"type": "jenv",
168-
"add": [
169-
"11",
170-
"17",
171-
"21"
172-
],
173-
"global": "17"
174-
},
175-
{
176-
"type": "aws-profile",
177-
"awsAccessKeyId": "AKIATCKATKL55TT5UZ7P",
178-
"awsSecretAccessKey": "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",
179-
"profile": "codify",
180-
"region": "us-east-1"
181-
},
182-
{
183-
"type": "git-repository",
184-
"directory": "~/Projects/codify-homebrew-plugin",
185-
"repository": "git@github.com:kevinwang5658/codify-homebrew-plugin.git"
186-
},
187-
{
188-
"type": "git-repository",
189-
"directory": "~/Projects/codify-homebrew-plugin",
190-
"repository": "git@github.com:kevinwang5658/codify-homebrew-plugin.git"
191-
},
192-
{
193-
"type": "git-repository",
194-
"directory": "~/Projects/codify-homebrew-plugin",
195-
"repository": "git@github.com:kevinwang5658/codify-homebrew-plugin.git"
196-
},
197-
{
198-
"type": "git-repository",
199-
"directory": "~/Projects/codify-homebrew-plugin",
200-
"repository": "git@github.com:kevinwang5658/codify-homebrew-plugin.git"
201-
},
202-
{
203-
"type": "git-repository",
204-
"directory": "~/Projects/codify-homebrew-plugin",
205-
"repository": "git@github.com:kevinwang5658/codify-homebrew-plugin.git"
206-
},
207-
{
208-
"type": "git-repository",
209-
"directory": "~/Projects/codify-homebrew-plugin",
210-
"repository": "git@github.com:kevinwang5658/codify-homebrew-plugin.git"
211-
},
212-
{
213-
"type": "git-repository",
214-
"directory": "~/Projects/codify-homebrew-plugin",
215-
"repository": "git@github.com:kevinwang5658/codify-homebrew-plugin.git"
10+
"alias": "la",
11+
"value": "ls"
21612
}
21713
]

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
"start:dev": "./bin/dev.js",
124124
"start:vm": "npm run build && npm run pack:macos && npm run start:vm"
125125
},
126-
"version": "0.7.0",
126+
"version": "0.7.1",
127127
"bugs": "https://github.com/kevinwang5658/codify/issues",
128128
"keywords": [
129129
"oclif"

src/commands/apply.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ For more information, visit: https://docs.codifycli.com/commands/apply
4444

4545
await ApplyOrchestrator.run({
4646
path: flags.path,
47+
verbosityLevel: flags.debug ? 3 : 0,
4748
// secure: flags.secure,
4849
}, this.reporter);
4950

src/commands/destroy.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ For more information, visit: https://docs.codifycli.com/commands/destory`
4747
}
4848

4949
await DestroyOrchestrator.run({
50+
verbosityLevel: flags.debug ? 3 : 0,
5051
typeIds: args,
5152
path: flags.path,
5253
}, this.reporter)

src/commands/import.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ For more information, visit: https://docs.codifycli.com/commands/import`
6161
const cleanedArgs = await this.cleanupZshStarExpansion(args);
6262

6363
await ImportOrchestrator.run({
64+
verbosityLevel: flags.debug ? 3 : 0,
6465
typeIds: cleanedArgs,
6566
path: resolvedPath,
6667
secureMode: flags.secure,

src/commands/init.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ For more information, visit: https://docs.codifycli.com/commands/init`
2525
]
2626

2727
public async run(): Promise<void> {
28-
await InitializeOrchestrator.run(this.reporter);
28+
const { flags } = await this.parse(Init)
29+
30+
await InitializeOrchestrator.run({
31+
verbosityLevel: flags.debug ? 3 : 0,
32+
},this.reporter);
2933
}
3034
}

src/commands/plan.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ For more information, visit: https://docs.codifycli.com/commands/plan`
3030
const { flags } = await this.parse(Plan)
3131

3232
await PlanOrchestrator.run({
33+
verbosityLevel: flags.debug ? 3 : 0,
3334
path: flags.path,
3435
secureMode: flags.secure,
3536
}, this.reporter);

src/common/initialize-plugins.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { Reporter } from '../ui/reporters/reporter.js';
1111
export interface InitializeArgs {
1212
path?: string;
1313
secure?: boolean;
14+
verbosityLevel?: number;
1415
transformProject?: (project: Project) => Project | Promise<Project>;
1516
allowEmptyProject?: boolean;
1617
}
@@ -37,7 +38,7 @@ export class PluginInitOrchestrator {
3738

3839
ctx.subprocessStarted(SubProcessName.INITIALIZE_PLUGINS)
3940
const pluginManager = new PluginManager();
40-
const typeIdsToDependenciesMap = await pluginManager.initialize(project, args.secure);
41+
const typeIdsToDependenciesMap = await pluginManager.initialize(project, args.secure, args.verbosityLevel);
4142
ctx.subprocessFinished(SubProcessName.INITIALIZE_PLUGINS)
4243

4344
return { typeIdsToDependenciesMap, pluginManager, project };

src/orchestrators/apply.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { PlanOrchestrator } from './plan.js';
66
export interface ApplyArgs {
77
path?: string;
88
secure?: boolean;
9+
verbosityLevel?: number;
910
}
1011

1112
export const ApplyOrchestrator = {

0 commit comments

Comments
 (0)