@microtronics/studio-cli 1.1.0-alpha.0 → 1.1.0-alpha.2
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 +46 -0
- package/dist/main.js +44 -42
- package/dist/studio-cli.d.ts +35 -2
- package/out/api.js +35 -33
- package/out/studio-cli.d.ts +35 -2
- package/package.json +4 -1
- package/studio-cli +1 -1
package/dist/studio-cli.d.ts
CHANGED
|
@@ -1945,9 +1945,38 @@ export declare namespace Dependencies {
|
|
|
1945
1945
|
* @param libraryName
|
|
1946
1946
|
*/
|
|
1947
1947
|
export function uninstallDependency(cwd: URI, fs: LocalFS, logger: Log.Logger, publisherId: string, libraryName: string): Promise<void>;
|
|
1948
|
+
/**
|
|
1949
|
+
* Read the npm workspace patterns declared in the root package.json, if any.
|
|
1950
|
+
* Supports both the array form (`workspaces: [...]`) and the object form (`workspaces: { packages: [...] }`).
|
|
1951
|
+
* Never throws - returns null if the file is missing, invalid JSON, or has no usable workspaces field.
|
|
1952
|
+
* @param cwd
|
|
1953
|
+
* @param fs
|
|
1954
|
+
*/
|
|
1955
|
+
export function readNpmWorkspacePatterns(cwd: URI, fs: LocalFS): Promise<string[] | null>;
|
|
1956
|
+
/**
|
|
1957
|
+
* Check if the given working path is covered by any of the given npm workspace patterns.
|
|
1958
|
+
* @param workingPath
|
|
1959
|
+
* @param patterns
|
|
1960
|
+
*/
|
|
1961
|
+
export function isPathInWorkspaces(workingPath: string, patterns: string[]): boolean;
|
|
1962
|
+
/**
|
|
1963
|
+
* Plan which parts need a dedicated `npm install`/`npm ci` and whether a single install at the project root
|
|
1964
|
+
* covers the rest via npm workspaces.
|
|
1965
|
+
* @param parts
|
|
1966
|
+
* @param patterns - npm workspace patterns from the root package.json, or null if not a workspace root
|
|
1967
|
+
*/
|
|
1968
|
+
export function planNpmInstalls(parts: {
|
|
1969
|
+
name: string;
|
|
1970
|
+
workingPath: string;
|
|
1971
|
+
}[], patterns: string[] | null): {
|
|
1972
|
+
rootInstall: boolean;
|
|
1973
|
+
partInstalls: string[];
|
|
1974
|
+
};
|
|
1948
1975
|
/**
|
|
1949
1976
|
* Install npm dependencies in pov and blo working paths if they exist and contain a package.json.
|
|
1950
1977
|
* This ensures that a single `studio install` command sets up the entire project.
|
|
1978
|
+
* If the root package.json declares npm workspaces that cover a part, the install is done once at the
|
|
1979
|
+
* project root instead of separately for each covered part.
|
|
1951
1980
|
* @param cwd
|
|
1952
1981
|
* @param fs
|
|
1953
1982
|
* @param logger
|
|
@@ -2441,8 +2470,12 @@ export declare enum HttpMethod {
|
|
|
2441
2470
|
|
|
2442
2471
|
/**
|
|
2443
2472
|
* Installs the specified dependencies or all dependencies if none are provided.
|
|
2444
|
-
* Additionally runs
|
|
2445
|
-
* ensuring a single install command sets up the entire project.
|
|
2473
|
+
* Additionally runs npm install in pov and blo working paths if they exist and contain a package.json,
|
|
2474
|
+
* ensuring a single install command sets up the entire project. When the root package.json declares npm
|
|
2475
|
+
* workspaces that cover a part, the npm dependencies are installed once at the project root instead of
|
|
2476
|
+
* separately for each covered part; parts not covered by any workspace pattern are still installed
|
|
2477
|
+
* individually. `npm install` is used instead of `npm ci` when no package-lock.json exists, or as a
|
|
2478
|
+
* fallback when the lockfile is out of sync with package.json.
|
|
2446
2479
|
*
|
|
2447
2480
|
* @param {URI} cwd - The current working directory where the installation process takes place.
|
|
2448
2481
|
* @param {LocalFS} fs - The file system interface used for managing files during the installation process.
|