@supernovaio/cli-next 2.0.37 → 2.0.38
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load-config.d.ts","sourceRoot":"","sources":["../../../src/hooks/prerun/load-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"load-config.d.ts","sourceRoot":"","sources":["../../../src/hooks/prerun/load-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAKlC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,QAAQ,CAqBxB,CAAA;AAED,eAAe,IAAI,CAAA"}
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
import * as console from "node:console";
|
|
2
|
+
import { BaseCommand } from "../../types/index.js";
|
|
3
|
+
const hook = async function ({ Command }) {
|
|
4
|
+
if (Command && Command.prototype instanceof BaseCommand) {
|
|
5
|
+
try {
|
|
6
|
+
}
|
|
7
|
+
catch {
|
|
8
|
+
console.log("Cannot apply configuration from .supernova.json");
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
};
|
|
2
12
|
export default hook;
|
|
3
13
|
//# sourceMappingURL=load-config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load-config.js","sourceRoot":"","sources":["../../../src/hooks/prerun/load-config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"load-config.js","sourceRoot":"","sources":["../../../src/hooks/prerun/load-config.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AAEvC,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAElD,MAAM,IAAI,GAAmB,KAAK,WAAW,EAAE,OAAO,EAAE;IACtD,IAAI,OAAO,IAAI,OAAO,CAAC,SAAS,YAAY,WAAW,EAAE,CAAC;QAExD,IAAI,CAAC;QAcL,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,CAAC,GAAG,CAAC,iDAAiD,CAAC,CAAA;QAChE,CAAC;IACH,CAAC;AACH,CAAC,CAAA;AAED,eAAe,IAAI,CAAA","sourcesContent":["import { Hook } from \"@oclif/core\"\nimport * as console from \"node:console\"\n\nimport { BaseCommand } from \"../../types/index.js\"\n\nconst hook: Hook<\"prerun\"> = async function ({ Command }) {\n if (Command && Command.prototype instanceof BaseCommand) {\n // const { commandId, configSchema } = new (Command as never)()\n try {\n // const configService = ConfigService.getInstance()\n // const fileConfig = configService.getCommandConfig(commandId, configSchema) as {\n // [key: string]: boolean | number | string | undefined\n // }\n // if (Command.flags) {\n // for (const [flagName, flagDef] of Object.entries(Command.flags)) {\n // If the flag is marked as required but exists in config\n // if (flagDef.required && fileConfig && flagName in fileConfig && fileConfig[flagName] !== undefined) {\n // // Make it not required since we'll use the config value\n // flagDef.required = false\n // }\n // }\n // }\n } catch {\n console.log(\"Cannot apply configuration from .supernova.json\")\n }\n }\n}\n\nexport default hook\n"]}
|
package/oclif.manifest.json
CHANGED