@lage-run/config 0.5.0 → 0.7.0

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.json CHANGED
@@ -2,7 +2,37 @@
2
2
  "name": "@lage-run/config",
3
3
  "entries": [
4
4
  {
5
- "date": "Mon, 01 Sep 2025 08:10:04 GMT",
5
+ "date": "Tue, 21 Oct 2025 23:42:14 GMT",
6
+ "version": "0.7.0",
7
+ "tag": "@lage-run/config_v0.7.0",
8
+ "comments": {
9
+ "minor": [
10
+ {
11
+ "author": "nemanjatesic@microsoft.com",
12
+ "package": "@lage-run/config",
13
+ "commit": "cd3ca59beba687a1d3c859524786e2aeeea09953",
14
+ "comment": "Add custom reporter capability to Lage"
15
+ }
16
+ ]
17
+ }
18
+ },
19
+ {
20
+ "date": "Thu, 25 Sep 2025 18:00:51 GMT",
21
+ "version": "0.6.0",
22
+ "tag": "@lage-run/config_v0.6.0",
23
+ "comments": {
24
+ "minor": [
25
+ {
26
+ "author": "brunoru@microsoft.com",
27
+ "package": "@lage-run/config",
28
+ "commit": "38888a6891fa45232aeba64f222d17177114dd23",
29
+ "comment": "Enhance CredentialCache to support multiple Azure credential types and allow configuration of credentialName in cache options"
30
+ }
31
+ ]
32
+ }
33
+ },
34
+ {
35
+ "date": "Mon, 01 Sep 2025 08:10:36 GMT",
6
36
  "version": "0.5.0",
7
37
  "tag": "@lage-run/config_v0.5.0",
8
38
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,28 @@
1
1
  # Change Log - @lage-run/config
2
2
 
3
- <!-- This log was last generated on Mon, 01 Sep 2025 08:10:04 GMT and should not be manually modified. -->
3
+ <!-- This log was last generated on Tue, 21 Oct 2025 23:42:14 GMT and should not be manually modified. -->
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 0.7.0
8
+
9
+ Tue, 21 Oct 2025 23:42:14 GMT
10
+
11
+ ### Minor changes
12
+
13
+ - Add custom reporter capability to Lage (nemanjatesic@microsoft.com)
14
+
15
+ ## 0.6.0
16
+
17
+ Thu, 25 Sep 2025 18:00:51 GMT
18
+
19
+ ### Minor changes
20
+
21
+ - Enhance CredentialCache to support multiple Azure credential types and allow configuration of credentialName in cache options (brunoru@microsoft.com)
22
+
7
23
  ## 0.5.0
8
24
 
9
- Mon, 01 Sep 2025 08:10:04 GMT
25
+ Mon, 01 Sep 2025 08:10:36 GMT
10
26
 
11
27
  ### Minor changes
12
28
 
package/lib/getConfig.js CHANGED
@@ -37,6 +37,7 @@ async function getConfig(cwd) {
37
37
  workerIdleMemoryLimit: config?.workerIdleMemoryLimit ?? _os.default.totalmem(),
38
38
  concurrency: config?.concurrency ?? availableParallelism,
39
39
  allowNoTargetRuns: config?.allowNoTargetRuns ?? false,
40
- enableTargetConfigMerging: config?.enableTargetConfigMerging ?? false
40
+ enableTargetConfigMerging: config?.enableTargetConfigMerging ?? false,
41
+ reporters: config?.reporters ?? {}
41
42
  };
42
43
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/getConfig.ts"],"sourcesContent":["import os from \"os\";\nimport { readConfigFile } from \"./readConfigFile.js\";\nimport type { ConfigOptions } from \"./types/ConfigOptions.js\";\nimport type { CacheOptions } from \"./types/CacheOptions.js\";\n\n/**\n * Get the lage config with defaults.\n */\nexport async function getConfig(cwd: string): Promise<ConfigOptions> {\n const config = (await readConfigFile(cwd)) || ({} as Partial<ConfigOptions>);\n const availableParallelism = \"availableParallelism\" in os ? (os as any)[\"availableParallelism\"]() : os.cpus().length - 1;\n return {\n cacheOptions: config?.cacheOptions ?? ({} as CacheOptions),\n ignore: config?.ignore ?? [],\n npmClient: config?.npmClient ?? \"npm\",\n pipeline: config?.pipeline ?? {},\n priorities: config?.priorities ?? [],\n repoWideChanges: config?.repoWideChanges ?? [\n \"lage.config.js\",\n \"package-lock.json\",\n \"yarn.lock\",\n \"pnpm-lock.yaml\",\n \"lerna.json\",\n \"rush.json\",\n ],\n loggerOptions: config?.loggerOptions ?? {},\n runners: config?.runners ?? {},\n workerIdleMemoryLimit: config?.workerIdleMemoryLimit ?? os.totalmem(), // 0 means no limit,\n concurrency: config?.concurrency ?? availableParallelism,\n allowNoTargetRuns: config?.allowNoTargetRuns ?? false,\n enableTargetConfigMerging: config?.enableTargetConfigMerging ?? false,\n };\n}\n"],"names":["getConfig","cwd","config","readConfigFile","availableParallelism","os","cpus","length","cacheOptions","ignore","npmClient","pipeline","priorities","repoWideChanges","loggerOptions","runners","workerIdleMemoryLimit","totalmem","concurrency","allowNoTargetRuns","enableTargetConfigMerging"],"mappings":";;;;+BAQsBA;;;eAAAA;;;2DARP;gCACgB;;;;;;AAOxB,eAAeA,UAAUC,GAAW;IACzC,MAAMC,SAAS,AAAC,MAAMC,IAAAA,8BAAc,EAACF,QAAU,CAAC;IAChD,MAAMG,uBAAuB,0BAA0BC,WAAE,GAAG,AAACA,WAAE,AAAQ,CAAC,uBAAuB,KAAKA,WAAE,CAACC,IAAI,GAAGC,MAAM,GAAG;IACvH,OAAO;QACLC,cAAcN,QAAQM,gBAAiB,CAAC;QACxCC,QAAQP,QAAQO,UAAU,EAAE;QAC5BC,WAAWR,QAAQQ,aAAa;QAChCC,UAAUT,QAAQS,YAAY,CAAC;QAC/BC,YAAYV,QAAQU,cAAc,EAAE;QACpCC,iBAAiBX,QAAQW,mBAAmB;YAC1C;YACA;YACA;YACA;YACA;YACA;SACD;QACDC,eAAeZ,QAAQY,iBAAiB,CAAC;QACzCC,SAASb,QAAQa,WAAW,CAAC;QAC7BC,uBAAuBd,QAAQc,yBAAyBX,WAAE,CAACY,QAAQ;QACnEC,aAAahB,QAAQgB,eAAed;QACpCe,mBAAmBjB,QAAQiB,qBAAqB;QAChDC,2BAA2BlB,QAAQkB,6BAA6B;IAClE;AACF"}
1
+ {"version":3,"sources":["../src/getConfig.ts"],"sourcesContent":["import os from \"os\";\nimport { readConfigFile } from \"./readConfigFile.js\";\nimport type { ConfigOptions } from \"./types/ConfigOptions.js\";\nimport type { CacheOptions } from \"./types/CacheOptions.js\";\n\n/**\n * Get the lage config with defaults.\n */\nexport async function getConfig(cwd: string): Promise<ConfigOptions> {\n const config = (await readConfigFile(cwd)) || ({} as Partial<ConfigOptions>);\n const availableParallelism = \"availableParallelism\" in os ? (os as any)[\"availableParallelism\"]() : os.cpus().length - 1;\n return {\n cacheOptions: config?.cacheOptions ?? ({} as CacheOptions),\n ignore: config?.ignore ?? [],\n npmClient: config?.npmClient ?? \"npm\",\n pipeline: config?.pipeline ?? {},\n priorities: config?.priorities ?? [],\n repoWideChanges: config?.repoWideChanges ?? [\n \"lage.config.js\",\n \"package-lock.json\",\n \"yarn.lock\",\n \"pnpm-lock.yaml\",\n \"lerna.json\",\n \"rush.json\",\n ],\n loggerOptions: config?.loggerOptions ?? {},\n runners: config?.runners ?? {},\n workerIdleMemoryLimit: config?.workerIdleMemoryLimit ?? os.totalmem(), // 0 means no limit,\n concurrency: config?.concurrency ?? availableParallelism,\n allowNoTargetRuns: config?.allowNoTargetRuns ?? false,\n enableTargetConfigMerging: config?.enableTargetConfigMerging ?? false,\n reporters: config?.reporters ?? {},\n };\n}\n"],"names":["getConfig","cwd","config","readConfigFile","availableParallelism","os","cpus","length","cacheOptions","ignore","npmClient","pipeline","priorities","repoWideChanges","loggerOptions","runners","workerIdleMemoryLimit","totalmem","concurrency","allowNoTargetRuns","enableTargetConfigMerging","reporters"],"mappings":";;;;+BAQsBA;;;eAAAA;;;2DARP;gCACgB;;;;;;AAOxB,eAAeA,UAAUC,GAAW;IACzC,MAAMC,SAAS,AAAC,MAAMC,IAAAA,8BAAc,EAACF,QAAU,CAAC;IAChD,MAAMG,uBAAuB,0BAA0BC,WAAE,GAAG,AAACA,WAAE,AAAQ,CAAC,uBAAuB,KAAKA,WAAE,CAACC,IAAI,GAAGC,MAAM,GAAG;IACvH,OAAO;QACLC,cAAcN,QAAQM,gBAAiB,CAAC;QACxCC,QAAQP,QAAQO,UAAU,EAAE;QAC5BC,WAAWR,QAAQQ,aAAa;QAChCC,UAAUT,QAAQS,YAAY,CAAC;QAC/BC,YAAYV,QAAQU,cAAc,EAAE;QACpCC,iBAAiBX,QAAQW,mBAAmB;YAC1C;YACA;YACA;YACA;YACA;YACA;SACD;QACDC,eAAeZ,QAAQY,iBAAiB,CAAC;QACzCC,SAASb,QAAQa,WAAW,CAAC;QAC7BC,uBAAuBd,QAAQc,yBAAyBX,WAAE,CAACY,QAAQ;QACnEC,aAAahB,QAAQgB,eAAed;QACpCe,mBAAmBjB,QAAQiB,qBAAqB;QAChDC,2BAA2BlB,QAAQkB,6BAA6B;QAChEC,WAAWnB,QAAQmB,aAAa,CAAC;IACnC;AACF"}
package/lib/index.d.ts CHANGED
@@ -5,5 +5,6 @@ export { readConfigFile } from "./readConfigFile.js";
5
5
  export type { PipelineDefinition } from "./types/PipelineDefinition.js";
6
6
  export type { ConfigOptions } from "./types/ConfigOptions.js";
7
7
  export type { CacheOptions } from "./types/CacheOptions.js";
8
+ export type { AzureCredentialName } from "./types/CacheOptions.js";
8
9
  export type { LoggerOptions } from "./types/LoggerOptions.js";
9
10
  export type { Priority } from "./types/Priority.js";
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export { getConfig } from \"./getConfig.js\";\nexport { getConcurrency } from \"./getConcurrency.js\";\nexport { getMaxWorkersPerTask, getMaxWorkersPerTaskFromOptions } from \"./getMaxWorkersPerTask.js\";\nexport { readConfigFile } from \"./readConfigFile.js\";\nexport type { PipelineDefinition } from \"./types/PipelineDefinition.js\";\nexport type { ConfigOptions } from \"./types/ConfigOptions.js\";\nexport type { CacheOptions } from \"./types/CacheOptions.js\";\nexport type { LoggerOptions } from \"./types/LoggerOptions.js\";\nexport type { Priority } from \"./types/Priority.js\";\n"],"names":["getConcurrency","getConfig","getMaxWorkersPerTask","getMaxWorkersPerTaskFromOptions","readConfigFile"],"mappings":";;;;;;;;;;;QACSA;eAAAA,8BAAc;;QADdC;eAAAA,oBAAS;;QAETC;eAAAA,0CAAoB;;QAAEC;eAAAA,qDAA+B;;QACrDC;eAAAA,8BAAc;;;2BAHG;gCACK;sCACuC;gCACvC"}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export { getConfig } from \"./getConfig.js\";\nexport { getConcurrency } from \"./getConcurrency.js\";\nexport { getMaxWorkersPerTask, getMaxWorkersPerTaskFromOptions } from \"./getMaxWorkersPerTask.js\";\nexport { readConfigFile } from \"./readConfigFile.js\";\nexport type { PipelineDefinition } from \"./types/PipelineDefinition.js\";\nexport type { ConfigOptions } from \"./types/ConfigOptions.js\";\nexport type { CacheOptions } from \"./types/CacheOptions.js\";\nexport type { AzureCredentialName } from \"./types/CacheOptions.js\";\nexport type { LoggerOptions } from \"./types/LoggerOptions.js\";\nexport type { Priority } from \"./types/Priority.js\";\n"],"names":["getConcurrency","getConfig","getMaxWorkersPerTask","getMaxWorkersPerTaskFromOptions","readConfigFile"],"mappings":";;;;;;;;;;;QACSA;eAAAA,8BAAc;;QADdC;eAAAA,oBAAS;;QAETC;eAAAA,0CAAoB;;QAAEC;eAAAA,qDAA+B;;QACrDC;eAAAA,8BAAc;;;2BAHG;gCACK;sCACuC;gCACvC"}
@@ -1,10 +1,39 @@
1
1
  import type { Config as BackfillCacheOptions, CustomStorageConfig } from "backfill-config";
2
+ /** Allowed credential names matching camelCase of @azure/identity credential class names
3
+ * @see https://learn.microsoft.com/en-us/azure/developer/javascript/sdk/authentication/credential-chains
4
+ */
5
+ export type AzureCredentialName = "environment" | "workload-identity" | "managed-identity" | "visual-studio-code" | "azure-cli";
6
+ /** Locally augment only the Azure Blob connection-string options by adding an optional `credentialName`.
7
+ * This does NOT modify upstream types; it narrows and re-composes the union for our config surface.
8
+ */
9
+ type AzureBlobFromBackfill = Extract<BackfillCacheOptions["cacheStorageConfig"], {
10
+ provider: "azure-blob";
11
+ }>;
12
+ type AugmentedAzureBlobConfig = AzureBlobFromBackfill extends {
13
+ provider: "azure-blob";
14
+ options: infer O;
15
+ } ? {
16
+ provider: "azure-blob";
17
+ options: O extends any ? O extends {
18
+ connectionString: string;
19
+ } ? // Assumption: make `credentialName` optional to preserve backward compatibility
20
+ O & {
21
+ credentialName?: AzureCredentialName;
22
+ } : O : never;
23
+ } : never;
24
+ /** Recompose the cache storage config union to swap in our augmented Azure Blob type
25
+ * This is necessary because we want to add the `credentialName` property only to the Azure Blob config,
26
+ * without affecting other cache storage configs.
27
+ */
28
+ type ExtendedCacheStorageConfig = Exclude<BackfillCacheOptions["cacheStorageConfig"], {
29
+ provider: "azure-blob";
30
+ } | CustomStorageConfig> | AugmentedAzureBlobConfig;
2
31
  export type CacheOptions = Omit<BackfillCacheOptions, "cacheStorageConfig"> & {
3
32
  /**
4
33
  * Use this to specify a remote cache provider such as `'azure-blob'`.
5
34
  * @see https://github.com/microsoft/backfill#configuration
6
35
  */
7
- cacheStorageConfig?: Exclude<BackfillCacheOptions["cacheStorageConfig"], CustomStorageConfig>;
36
+ cacheStorageConfig?: ExtendedCacheStorageConfig;
8
37
  /**
9
38
  * Whether to write to the remote cache - useful for continuous integration systems to provide build-over-build cache.
10
39
  * It is recommended to turn this OFF for local development, turning remote cache to be a build acceleration through remote cache downloads.
@@ -25,3 +54,4 @@ export type CacheOptions = Omit<BackfillCacheOptions, "cacheStorageConfig"> & {
25
54
  */
26
55
  cacheKey?: string;
27
56
  };
57
+ export {};
@@ -57,4 +57,16 @@ export interface ConfigOptions {
57
57
  * Enables the merging of target config files, rather than simply replace it when multiple matches are encoutered
58
58
  */
59
59
  enableTargetConfigMerging: boolean;
60
+ /**
61
+ * Custom reporters that can be referenced by name in the --reporter CLI flag.
62
+ * The key is the reporter name, and the value is the path to the reporter module.
63
+ *
64
+ * Example:
65
+ * ```
66
+ * {
67
+ * myReporter: "./custom-reporters/my-reporter.js"
68
+ * }
69
+ * ```
70
+ */
71
+ reporters: Record<string, string>;
60
72
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lage-run/config",
3
- "version": "0.5.0",
3
+ "version": "0.7.0",
4
4
  "description": "Config management for Lage",
5
5
  "repository": {
6
6
  "type": "git",