Skip to content

Commit bc0d065

Browse files
committed
feat: remove logs and improve imports for python resources.
1 parent 0c31392 commit bc0d065

File tree

5 files changed

+9
-5
lines changed

5 files changed

+9
-5
lines changed

src/resources/macports/install-parameter.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ export class MacportsInstallParameter extends StatefulParameter<MacportsConfig,
4646
return installed;
4747
})
4848

49-
console.log(r)
50-
5149
return r;
5250
}
5351

src/resources/macports/macports.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ export class MacportsResource extends Resource<MacportsConfig> {
4141
}
4242

4343
override async refresh(parameters: Partial<MacportsConfig>): Promise<Partial<MacportsConfig> | null> {
44-
console.log(fsSync.readFileSync(path.join(os.homedir(), '.zshrc'), 'utf8'))
4544
const $ = getPty();
4645

4746
const homebrewInfo = await $.spawnSafe('which port');

src/resources/node/npm/global-install.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export class NpmGlobalInstallParameter extends StatefulParameter<NpmConfig, Arra
3232
async refresh(desired: (NpmPackage | string)[] | null, config: Partial<NpmConfig>): Promise<(NpmPackage | string)[] | null> {
3333
const pty = getPty();
3434

35-
const { data } = await pty.spawnSafe('npm ls --json --global --depth=0 --loglevel=error')
35+
const { data } = await pty.spawnSafe('npm ls --json --global --depth=0 --loglevel=silent')
3636
if (!data) {
3737
return null;
3838
}

src/resources/python/pip-sync/pip-sync.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ export class PipSync extends Resource<PipSyncConfig> {
2424
dependencies: ['pyenv', 'pip', 'venv-project', 'virtualenv-project', 'virtualenv'],
2525
allowMultiple: {
2626
identifyingParameters: ['virtualEnv'],
27+
},
28+
importAndDestroy: {
29+
preventImport: true,
2730
}
2831
};
2932
}

src/resources/python/pip/pip.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,11 @@ export class Pip extends Resource<PipResourceConfig> {
4343
virtualEnv: { type: 'directory', setting: true }
4444
},
4545
allowMultiple: {
46-
identifyingParameters: ['virtualEnv']
46+
identifyingParameters: ['virtualEnv'],
47+
},
48+
importAndDestroy: {
49+
refreshKeys: ['install'],
50+
requiredParameters: []
4751
},
4852
dependencies: ['pyenv', 'git-repository']
4953
}

0 commit comments

Comments
 (0)