@sentio/cli 2.18.8-rc.2 → 2.18.8-rc.3

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/lib/index.js CHANGED
@@ -87828,6 +87828,10 @@ async function runGraph(processorConfig, argv2) {
87828
87828
  }
87829
87829
  finalizeHost(processorConfig, options.host);
87830
87830
  FinalizeProjectName(processorConfig, options.owner, options.name);
87831
+ if (!/^[\w-]+\/[\w-]+$/.test(processorConfig.project)) {
87832
+ console.error("Must provide a valid project identifier: --owner OWNER --name NAME");
87833
+ process.exit(1);
87834
+ }
87831
87835
  let apiKey = ReadKey(processorConfig.host);
87832
87836
  if (options["api-key"]) {
87833
87837
  apiKey = options["api-key"];
@@ -87982,14 +87986,17 @@ if (mainOptions.command === "login") {
87982
87986
  process.exit(1);
87983
87987
  }
87984
87988
  const yamlPath = path12.join(pwd, "sentio.yaml");
87985
- if (!fs15.existsSync(yamlPath)) {
87989
+ const yamlExists = fs15.existsSync(yamlPath);
87990
+ if (!yamlExists && mainOptions.command !== "graph") {
87986
87991
  console.error("sentio.yaml not found, please create one according to: TODO docs");
87987
87992
  process.exit(1);
87988
87993
  }
87989
- processorConfig = import_yaml3.default.parse(fs15.readFileSync("sentio.yaml", "utf8"));
87990
- if (!processorConfig.project === void 0) {
87991
- console.error("Config yaml must have contain a valid project identifier");
87992
- process.exit(1);
87994
+ if (yamlExists) {
87995
+ processorConfig = import_yaml3.default.parse(fs15.readFileSync("sentio.yaml", "utf8"));
87996
+ if (!processorConfig.project) {
87997
+ console.error("Config yaml must contain a valid project identifier");
87998
+ process.exit(1);
87999
+ }
87993
88000
  }
87994
88001
  if (processorConfig.build === void 0) {
87995
88002
  processorConfig.build = true;