@esri/hub-sites

中文文档
21.0.0发布于 2025/08/26Apache-2.0TypeScriptESM + CJS近 30 天下载 8598

Module to interact with ArcGIS Hub Sites in Node.js and modern browsers.

此软件包已被标记为弃用

The corresponding functionality of this package has moved to @esri/hub-common

原始使用文档
文档目录5 节
  1. Example
  2. Issues
  3. Versioning
  4. Contributing
  5. License

npm version build status ![gzip bundle size][gzip-image] Coverage Status apache licensed

@esri/hub-sites

Module to interact with ArcGIS Hub Sites in Node.js and modern browsers.

DEPRECATED: This package is no longer under active development and will soon be retired. The corresponding functionality has been added to @esri/hub-common.

Example

npm install @esri/hub-sites
import { getDomain  } from '@esri/hub-sites';

// pass in a site id
getDomain("abc123")
    .then(
        response => // get back initiative metadata
    );

Issues

If something isn't working the way you expected, please take a look at previously logged issues first. Have you found a new bug? Want to request a new feature? We'd love to hear from you.

If you're looking for help you can also post issues on GIS Stackexchange.

Versioning

For transparency into the release cycle and in striving to maintain backward compatibility, @esri/hub.js is maintained under Semantic Versioning guidelines and will adhere to these rules whenever possible.

For more information on SemVer, please visit http://semver.org/.

Contributing

Esri welcomes contributions from anyone and everyone. Please see our guidelines for contributing.

License

Copyright © 2018 Esri

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

A copy of the license is available in the repository's LICENSE file.

版本与发布记录

@esri/hub-sites 共发布 408 个版本,首次发布于 2018/07/10;过去 12 个月发布了 0 个版本。

版本发布日期距今
21.0.0latest2025/08/261.2 年前
20.0.12025/08/201.2 年前
20.0.02025/08/051.3 年前
19.0.22025/07/301.3 年前
19.0.12025/07/261.3 年前
19.0.02025/06/191.4 年前

其他发布通道:beta → 11.0.0-beta.5,alpha → 12.0.0-alpha.3,next → 16.1.0-next.1。

关于 @esri/hub-sites 的常见问题

@esri/hub-sites 是什么?

Module to interact with ArcGIS Hub Sites in Node.js and modern browsers.注意:该包已被作者标记为弃用——The corresponding functionality of this package has moved to @esri/hub-common

如何安装 @esri/hub-sites?

在项目目录运行 npm install @esri/hub-sites,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:@esri/hub-teams(^20.0.0)、@esri/hub-common(^20.0.0)、@esri/hub-initiatives(^20.0.0)、@esri/arcgis-rest-portal(^4.0.0)、@esri/arcgis-rest-request(^4.7.1)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@esri/hub-sites 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@esri/hub-sites 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@esri/hub-sites 可以商用吗?

@esri/hub-sites 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@esri/hub-sites 的下载量有多少?

根据 npm 官方下载统计,@esri/hub-sites 在 2026/10/14 – 2026/11/12 这 30 天内被下载 8,598 次,日均约 287 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@esri/hub-sites 还在维护吗?

最新版本 21.0.0 发布于 2025/08/26(1.2 年前);至今共发布 408 个版本,其中过去 12 个月发布了 0 个;首次发布于 2018/07/10。作者已将其标记为弃用,新项目建议寻找替代方案。