@kaiba-cloud/cli 0.2.1 → 0.2.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.
Files changed (2) hide show
  1. package/dist/cli.js +15 -3
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -1297,7 +1297,7 @@ var HubClient = class {
1297
1297
  };
1298
1298
 
1299
1299
  // src/version.ts
1300
- var CLI_VERSION = true ? "0.2.1" : "0.0.0-dev";
1300
+ var CLI_VERSION = true ? "0.2.2" : "0.0.0-dev";
1301
1301
 
1302
1302
  // src/commands/auth.ts
1303
1303
  function peekNonInteractive(context) {
@@ -8812,6 +8812,8 @@ function renderRootHelp(registry) {
8812
8812
  }
8813
8813
 
8814
8814
  // src/cli.ts
8815
+ import { realpathSync as realpathSync2 } from "node:fs";
8816
+ import { pathToFileURL } from "node:url";
8815
8817
  var DEFAULT_HUB_URL = "https://cloud.kaiba.ai";
8816
8818
  function peekFlag(argv, name) {
8817
8819
  for (let index = 0; index < argv.length; index += 1) {
@@ -8956,8 +8958,18 @@ async function main() {
8956
8958
  });
8957
8959
  process.exitCode = code;
8958
8960
  }
8959
- var invokedDirectly = process.argv[1]?.endsWith("cli.js") || process.argv[1]?.endsWith("cli.ts");
8960
- if (invokedDirectly) {
8961
+ function invokedDirectly() {
8962
+ const entry = process.argv[1];
8963
+ if (!entry) {
8964
+ return false;
8965
+ }
8966
+ try {
8967
+ return import.meta.url === pathToFileURL(realpathSync2(entry)).href;
8968
+ } catch {
8969
+ return false;
8970
+ }
8971
+ }
8972
+ if (invokedDirectly()) {
8961
8973
  void main();
8962
8974
  }
8963
8975
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kaiba-cloud/cli",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Kaiba CLI \u2014 build and deploy your apps from CI or a terminal.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",