@nmakarov/cli-toolkit 0.32.0 → 0.36.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/README.md +17 -0
- package/dist/aws.cjs +61 -0
- package/dist/aws.cjs.map +1 -1
- package/dist/aws.js +61 -0
- package/dist/aws.js.map +1 -1
- package/dist/cli-runner.cjs +455 -73
- package/dist/cli-runner.cjs.map +1 -1
- package/dist/cli-runner.js +455 -73
- package/dist/cli-runner.js.map +1 -1
- package/dist/db.cjs +332 -3
- package/dist/db.cjs.map +1 -1
- package/dist/db.js +325 -2
- package/dist/db.js.map +1 -1
- package/dist/index.cjs +541 -73
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +535 -73
- package/dist/index.js.map +1 -1
- package/dist/init.cjs +37 -0
- package/dist/init.cjs.map +1 -1
- package/dist/init.js +37 -0
- package/dist/init.js.map +1 -1
- package/dist/params.cjs +37 -0
- package/dist/params.cjs.map +1 -1
- package/dist/params.js +37 -0
- package/dist/params.js.map +1 -1
- package/dist/tasks.cjs +196 -72
- package/dist/tasks.cjs.map +1 -1
- package/dist/tasks.js +196 -72
- package/dist/tasks.js.map +1 -1
- package/package.json +4 -2
- package/scripts/aws/discover.js +60 -0
package/dist/init.cjs
CHANGED
|
@@ -1866,6 +1866,43 @@ var Params = class _Params {
|
|
|
1866
1866
|
module: moduleName ?? this._currentModule
|
|
1867
1867
|
});
|
|
1868
1868
|
}
|
|
1869
|
+
/**
|
|
1870
|
+
* Report a param value that a component RESOLVED ON ITS OWN — outside
|
|
1871
|
+
* Params.get() — e.g. discovered by combining its config files (the way
|
|
1872
|
+
* blueprints merge defaults/aggregator/feed data). Without this, every
|
|
1873
|
+
* key such a component probed for an override shows up in the
|
|
1874
|
+
* --showUsedParams dump as "undefined (default)"; reporting upgrades the
|
|
1875
|
+
* entry to the value the component actually works with.
|
|
1876
|
+
*
|
|
1877
|
+
* Attribution rules:
|
|
1878
|
+
* - entries figured from an explicit input (cli/env/options/…) are left
|
|
1879
|
+
* untouched — the component merely confirmed them, the origin stands;
|
|
1880
|
+
* - entries whose source is "default" (Params had nothing) are upgraded
|
|
1881
|
+
* in place to the reported value and source;
|
|
1882
|
+
* - keys never seen by Params are appended as new entries.
|
|
1883
|
+
* First report wins: once upgraded, later reports for the same key/module
|
|
1884
|
+
* are ignored (the source is no longer "default").
|
|
1885
|
+
*
|
|
1886
|
+
* @param {string} key
|
|
1887
|
+
* @param {*} value - the value the component actually uses
|
|
1888
|
+
* @param {string} [source="discovered"] - short origin label, e.g. "blueprint"
|
|
1889
|
+
* @param {string} [moduleName] - dump section; defaults to the current module
|
|
1890
|
+
*/
|
|
1891
|
+
reportResolved(key, value, source = "discovered", moduleName) {
|
|
1892
|
+
const mod = moduleName ?? this._currentModule;
|
|
1893
|
+
const mine = this.trackedParams.filter((e) => e.key === key && e.module === mod);
|
|
1894
|
+
if (mine.some((e) => e.source !== "default")) {
|
|
1895
|
+
return;
|
|
1896
|
+
}
|
|
1897
|
+
if (mine.length === 0) {
|
|
1898
|
+
this.trackParam(key, "reported", value, source, mod);
|
|
1899
|
+
return;
|
|
1900
|
+
}
|
|
1901
|
+
for (const entry of mine) {
|
|
1902
|
+
entry.value = value;
|
|
1903
|
+
entry.source = source;
|
|
1904
|
+
}
|
|
1905
|
+
}
|
|
1869
1906
|
/**
|
|
1870
1907
|
* Get all tracked parameters (for --stopAfter=init)
|
|
1871
1908
|
*/
|