Skip to content

Commit f577d37

Browse files
chore: remove not used npm related services
Remove `printPluginsService`, `npmPluginsService` and `npmService` - they were used for a product that is no longer supported - Proton.
1 parent 956c6d1 commit f577d37

File tree

11 files changed

+0
-887
lines changed

11 files changed

+0
-887
lines changed

lib/common/appbuilder/appbuilder-bootstrap.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,4 @@ $injector.require("iosLiveSyncServiceLocator", "./appbuilder/services/livesync/i
77
$injector.require("nativeScriptProjectCapabilities", "./appbuilder/project/nativescript-project-capabilities");
88
$injector.require("cordovaProjectCapabilities", "./appbuilder/project/cordova-project-capabilities");
99
$injector.require("mobilePlatformsCapabilities", "./appbuilder/mobile-platforms-capabilities");
10-
$injector.requirePublic("npmService", "./appbuilder/services/npm-service");
1110
$injector.require("iOSLogFilter", "./mobile/ios/ios-log-filter");

lib/common/appbuilder/declarations.d.ts

Lines changed: 0 additions & 130 deletions
Original file line numberDiff line numberDiff line change
@@ -197,133 +197,3 @@ interface IAppInstalledInfo extends ILiveSyncSupportedInfo {
197197
*/
198198
isInstalled: boolean;
199199
}
200-
201-
/**
202-
* Describes information for single npm dependency that has to be installed.
203-
*/
204-
interface INpmDependency {
205-
/**
206-
* Name of the dependency.
207-
*/
208-
name: string;
209-
210-
/**
211-
* @optional The version of the dependency that has to be installed.
212-
*/
213-
version?: string;
214-
215-
/**
216-
* Defines if @types/<name> should be installed as well.
217-
*/
218-
installTypes: boolean;
219-
}
220-
221-
222-
/**
223-
* Describes the result of npm install <dependency> and npm install @types/<dependency> command.
224-
*/
225-
interface INpmInstallDependencyResult {
226-
/**
227-
* Defines if the dependency is installed successfully.
228-
*/
229-
isInstalled: boolean;
230-
/**
231-
* Defines if the @types/<dependency> is installed successfully.
232-
*/
233-
isTypesInstalled: boolean;
234-
}
235-
236-
/**
237-
* Describes the result of npm install command.
238-
*/
239-
interface INpmInstallResult {
240-
/**
241-
* The result of installing a single dependency.
242-
*/
243-
result?: INpmInstallDependencyResult,
244-
245-
/**
246-
* The error that occurred during the operation.
247-
*/
248-
error?: Error;
249-
}
250-
251-
/**
252-
* Describes methods for working with npm.
253-
*/
254-
interface INpmService {
255-
/**
256-
* Uninstalls the dependency and the @types/<dependency> devDependency.
257-
* The method will remove them from package.json and from node_modules dir.
258-
* @param {string} projectDir Directory of the project, where package.json is located.
259-
* @param {string} dependency The name of the dependency that has to be removed.
260-
* @return {Promise<void>}
261-
*/
262-
uninstall(projectDir: string, dependency: string): Promise<void>;
263-
264-
/**
265-
* Installs everything from package.json or specified dependency.
266-
* In case there's information which dependency to install, the method will check it and install only this dependency and possibly its @types.
267-
* @param {string} projectDir Directory of the project, where package.json is located.
268-
* @param @optional {INpmDependency} dependency Description of the dependency that has to be installed.
269-
* @return {Promise<INpmInstallResult>} Returns object that will have error in case something fails.
270-
* In case there's no specific dependency that has to be installed and everything is installed successfully, the result will be empty object.
271-
* In case there's dependency that has to be installed, the result object will contain information for the successfull installation of the dependency and the @types reference.
272-
*/
273-
install(projectDir: string, dependencyToInstall?: INpmDependency): Promise<INpmInstallResult>;
274-
275-
/**
276-
* Searches for plugins in npm.
277-
* @param {string} projectDir The project directory.
278-
* @param {string[]} keywords The keywords for the search.
279-
* @param @optional {string[]} args Additional flags for the npm search command.
280-
* @return {Promise<IBasicPluginInformation[]>} Array of basic plugin information for the search results.
281-
*/
282-
search(projectDir: string, keywords: string[], args?: string[]): Promise<IBasicPluginInformation[]>;
283-
284-
/**
285-
* Gets package.json of a specific dependency from registry.npmjs.org.
286-
* @param {string} packageName The name of the dependency.
287-
* @param {string} version The version that has to be taken from registry. "latest" will be used in case there's no version passed.
288-
* @return {any} package.json of a dependency or null in case such dependency or version does not exist.
289-
*/
290-
getPackageJsonFromNpmRegistry(packageName: string, version?: string): Promise<any>;
291-
292-
/**
293-
* Checks if dependency is scoped.
294-
* @param {string} dependency The dependency to check.
295-
* @return {boolean} true if the dependency is scoped and false if it's not.
296-
*/
297-
isScopedDependency(dependency: string): boolean;
298-
299-
/**
300-
* Gets the name of dependency and the version if it is specified.
301-
* @param {string} dependency The dependency to check.
302-
* @return {IScopedDependencyInformation} the name of the dependency and the version if it is specified.
303-
*/
304-
getDependencyInformation(dependency: string): IDependencyInformation;
305-
}
306-
307-
/**
308-
* Describes methods for searching for npm plugins.
309-
*/
310-
interface INpmPluginsService {
311-
/**
312-
* Searches for plugins in http://npmjs.org, if this search fails will try to find plugin in http://registry.npmjs.org.
313-
* If this search does not find anything this method will use the npm binary.
314-
* @param {string} projectDir The directory of the project.
315-
* @param {string[]} keywords The keywords for the search.
316-
* @param @optional {(keywords: string[]) => string[]} modifySearchQuery Function which will be used to modify the search query when using the npm binary.
317-
* @return {Promise<IPluginsSource>} The plugins source which can be used to get the result.
318-
*/
319-
search(projectDir: string, keywords: string[], modifySearchQuery?: (keywords: string[]) => string[]): Promise<IPluginsSource>;
320-
321-
/**
322-
* Searches for plugin in http://registry.npmjs.org plugins and if plugin is not found will continue the search in http://npmjs.org and the npm binary.
323-
* @param {string} projectDir The directory of the project.
324-
* @param {string[]} keywords The keywords for the search.
325-
* @param @optional {(keywords: string[]) => string[]} modifySearchQuery Function which will be used to modify the search query when using the npm binary.
326-
* @return {Promise<IPluginsSource>} The plugins source which can be used to get the result.
327-
*/
328-
optimizedSearch(projectDir: string, keywords: string[], modifySearchQuery?: (keywords: string[]) => string[]): Promise<IPluginsSource>;
329-
}

0 commit comments

Comments
 (0)