You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2026/05/30 08:25:27 UTC

(doris-cli) branch main updated: build(npm): publish under the @apache-doris scope

This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/doris-cli.git


The following commit(s) were added to refs/heads/main by this push:
     new 8f5b0bf  build(npm): publish under the @apache-doris scope
8f5b0bf is described below

commit 8f5b0bf2c6886e71870f0ed9c9276ad303ba1909
Author: Mingyu Chen (Rayner) <yu...@selectdb.com>
AuthorDate: Sat May 30 16:25:21 2026 +0800

    build(npm): publish under the @apache-doris scope
    
    Rename the npm packages from unscoped (doriscli, doriscli-<plat>) to the
    @apache-doris org scope (@apache-doris/doriscli, @apache-doris/doriscli-<plat>)
    to match the apache-doris npm org and its scoped publish token. The bin
    launcher resolves the scoped platform package and build-packages.cjs emits
    scoped names + optionalDependencies; install instructions/messages follow.
    The dist/ directory layout is unchanged, so release-npm.yml needs no edits.
    
    Also repoint homepage/repository and the README/launcher links from the
    personal fork to github.com/apache/doris-cli.
    
    Co-Authored-By: Claude Opus 4.8 (1M context) <no...@anthropic.com>
---
 npm/build-packages.cjs    | 6 +++---
 npm/doriscli/README.md    | 6 +++---
 npm/doriscli/bin/doriscli | 8 ++++----
 npm/doriscli/package.json | 6 +++---
 npm/doriscli/platforms.js | 2 +-
 5 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/npm/build-packages.cjs b/npm/build-packages.cjs
index 8e906bc..5f97836 100644
--- a/npm/build-packages.cjs
+++ b/npm/build-packages.cjs
@@ -50,11 +50,11 @@ function buildPlatform(key, binPath) {
   fs.chmodSync(destBin, 0o755);
 
   const pkg = {
-    name: `doriscli-${key}`,
+    name: `@apache-doris/doriscli-${key}`,
     version,
     description: `Prebuilt doriscli binary for ${key}.`,
     license: "Apache-2.0",
-    repository: { type: "git", url: "git+https://github.com/morningman/doris-cli.git" },
+    repository: { type: "git", url: "git+https://github.com/apache/doris-cli.git" },
     os: [os],
     cpu: [cpu],
     files: ["bin/"],
@@ -82,7 +82,7 @@ function buildMain() {
   pkg.version = version;
   pkg.optionalDependencies = {};
   for (const key of Object.keys(PLATFORMS)) {
-    pkg.optionalDependencies[`doriscli-${key}`] = version;
+    pkg.optionalDependencies[`@apache-doris/doriscli-${key}`] = version;
   }
   fs.writeFileSync(path.join(outDir, "package.json"), JSON.stringify(pkg, null, 2) + "\n");
   console.log(`built ${path.relative(ROOT, outDir)}  (${version}, ${Object.keys(PLATFORMS).length} optional deps)`);
diff --git a/npm/doriscli/README.md b/npm/doriscli/README.md
index 411c633..344446f 100644
--- a/npm/doriscli/README.md
+++ b/npm/doriscli/README.md
@@ -6,7 +6,7 @@ protocol (+ the FE HTTP API), executes, and returns **structured JSON**.
 ## Install
 
 ```bash
-npm install -g doriscli
+npm install -g @apache-doris/doriscli
 doriscli --version
 ```
 
@@ -15,7 +15,7 @@ This package ships a prebuilt native binary. On install, npm automatically pulls
 + `os`/`cpu` constraints), so there is no compile step and no Rust toolchain needed.
 
 Supported platforms: macOS (arm64), Linux (x64, arm64). On any other platform,
-[build from source](https://github.com/morningman/doris-cli#build).
+[build from source](https://github.com/apache/doris-cli#build).
 
 ## Quick start
 
@@ -30,7 +30,7 @@ doriscli --env prod auth status
 doriscli --env prod sql "SELECT COUNT(*) FROM db.orders"
 ```
 
-See the [full documentation](https://github.com/morningman/doris-cli#readme) for
+See the [full documentation](https://github.com/apache/doris-cli#readme) for
 `sql`, `profile`, `tablet`, `auth`, stateless mode, and SOCKS5 tunneling.
 
 ## License
diff --git a/npm/doriscli/bin/doriscli b/npm/doriscli/bin/doriscli
index 4ece3c5..341d8a7 100644
--- a/npm/doriscli/bin/doriscli
+++ b/npm/doriscli/bin/doriscli
@@ -1,7 +1,7 @@
 #!/usr/bin/env node
 "use strict";
 // Thin launcher: locate the prebuilt binary that ships in the matching optional
-// platform sub-package (e.g. doriscli-darwin-arm64) and exec it, forwarding the
+// platform sub-package (e.g. @apache-doris/doriscli-darwin-arm64) and exec it,
 // args, stdio and exit code. No build step, no postinstall — works even with
 // `npm install --ignore-scripts` and in read-only install dirs.
 const { spawnSync } = require("child_process");
@@ -18,11 +18,11 @@ const entry = PLATFORMS[key];
 if (!entry) {
   fail(
     `unsupported platform "${key}". Supported: ${Object.keys(PLATFORMS).join(", ")}.\n` +
-      `Build from source instead: https://github.com/morningman/doris-cli#build`
+      `Build from source instead: https://github.com/apache/doris-cli#build`
   );
 }
 
-const pkg = `doriscli-${key}`;
+const pkg = `@apache-doris/doriscli-${key}`;
 let binPath;
 try {
   // Resolve via the sub-package's package.json so we don't depend on the
@@ -33,7 +33,7 @@ try {
   fail(
     `the platform package "${pkg}" is not installed.\n` +
       `This usually means npm skipped optional dependencies. Reinstall with:\n` +
-      `  npm install -g doriscli        (do not pass --no-optional / --omit=optional)`
+      `  npm install -g @apache-doris/doriscli   (do not pass --no-optional / --omit=optional)`
   );
 }
 
diff --git a/npm/doriscli/package.json b/npm/doriscli/package.json
index f27f7ce..5d30fe4 100644
--- a/npm/doriscli/package.json
+++ b/npm/doriscli/package.json
@@ -1,11 +1,11 @@
 {
   "//": "version + optionalDependencies are injected by npm/build-packages.cjs from Cargo.toml at release time. Publish ONLY from npm/dist/, never this directory.",
-  "name": "doriscli",
+  "name": "@apache-doris/doriscli",
   "version": "0.0.0-dev",
   "description": "Doris CLI — SQL, profiles, and tablet analysis against an Apache Doris kernel",
   "keywords": ["doris", "apache-doris", "cli", "sql", "mysql", "olap", "tablet", "profile"],
-  "homepage": "https://github.com/morningman/doris-cli#readme",
-  "repository": { "type": "git", "url": "git+https://github.com/morningman/doris-cli.git" },
+  "homepage": "https://github.com/apache/doris-cli#readme",
+  "repository": { "type": "git", "url": "git+https://github.com/apache/doris-cli.git" },
   "license": "Apache-2.0",
   "bin": { "doriscli": "bin/doriscli" },
   "files": ["bin/", "platforms.js", "README.md", "LICENSE.txt"],
diff --git a/npm/doriscli/platforms.js b/npm/doriscli/platforms.js
index b4ab2d3..bc569e4 100644
--- a/npm/doriscli/platforms.js
+++ b/npm/doriscli/platforms.js
@@ -4,7 +4,7 @@
 //
 // The key is `${process.platform}-${process.arch}`, which also doubles as:
 //   - the npm "<os>-<cpu>" pair (e.g. darwin-arm64), and
-//   - the platform sub-package name suffix: `doriscli-<key>`.
+//   - the platform sub-package name: `@apache-doris/doriscli-<key>`.
 const PLATFORMS = {
   "darwin-arm64": { rustTarget: "aarch64-apple-darwin", binName: "doriscli" },
   "linux-x64": { rustTarget: "x86_64-unknown-linux-gnu", binName: "doriscli" },


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org