@aigne/doc-smith 0.8.12-beta.2 → 0.8.12-beta.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.
@@ -1,3 +1,3 @@
1
1
  {
2
- ".": "0.8.12-beta.2"
2
+ ".": "0.8.12-beta.3"
3
3
  }
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.8.12-beta.3](https://github.com/AIGNE-io/aigne-doc-smith/compare/v0.8.12-beta.2...v0.8.12-beta.3) (2025-10-09)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * should not require admin when publish to cloud ([0a74dd1](https://github.com/AIGNE-io/aigne-doc-smith/commit/0a74dd19a2c2390ca223d0cc393661bf3f408a6f))
9
+
3
10
  ## [0.8.12-beta.2](https://github.com/AIGNE-io/aigne-doc-smith/compare/v0.8.12-beta.1...v0.8.12-beta.2) (2025-10-09)
4
11
 
5
12
 
@@ -6,7 +6,7 @@ import fs from "fs-extra";
6
6
 
7
7
  import { getAccessToken } from "../../utils/auth-utils.mjs";
8
8
  import {
9
- DEFAULT_APP_URL,
9
+ CLOUD_SERVICE_URL_PROD,
10
10
  DISCUSS_KIT_STORE_URL,
11
11
  DOC_SMITH_DIR,
12
12
  TMP_DIR,
@@ -45,7 +45,7 @@ export default async function publishDocs(
45
45
 
46
46
  // Check if appUrl is default and not saved in config (only when not using env variable)
47
47
  const config = await loadConfigFromFile();
48
- const isDefaultAppUrl = appUrl === DEFAULT_APP_URL;
48
+ const isDefaultAppUrl = appUrl === CLOUD_SERVICE_URL_PROD;
49
49
  const hasAppUrlInConfig = config?.appUrl;
50
50
 
51
51
  let token = "";
@@ -207,7 +207,7 @@ publishDocs.input_schema = {
207
207
  appUrl: {
208
208
  type: "string",
209
209
  description: "The url of the app",
210
- default: DEFAULT_APP_URL,
210
+ default: CLOUD_SERVICE_URL_PROD,
211
211
  },
212
212
  boardId: {
213
213
  type: "string",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aigne/doc-smith",
3
- "version": "0.8.12-beta.2",
3
+ "version": "0.8.12-beta.3",
4
4
  "description": "AI-driven documentation generation tool built on the AIGNE Framework",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -15,7 +15,8 @@ import {
15
15
  } from "./blocklet.mjs";
16
16
  import {
17
17
  BLOCKLET_ADD_COMPONENT_DOCS,
18
- DEFAULT_APP_URL,
18
+ CLOUD_SERVICE_URL_PROD,
19
+ CLOUD_SERVICE_URL_STAGING,
19
20
  DISCUSS_KIT_DID,
20
21
  DISCUSS_KIT_STORE_URL,
21
22
  DOC_OFFICIAL_ACCESS_TOKEN,
@@ -98,7 +99,7 @@ export async function getAccessToken(appUrl, ltToken = "") {
98
99
  appLogo: "https://docsmith.aigne.io/image-bin/uploads/9645caf64b4232699982c4d940b03b90.svg",
99
100
  openPage: (pageUrl) => {
100
101
  const url = new URL(pageUrl);
101
- if (url.hostname !== DEFAULT_APP_URL) {
102
+ if ([CLOUD_SERVICE_URL_PROD, CLOUD_SERVICE_URL_STAGING].includes(url.origin) === false) {
102
103
  url.searchParams.set("required_roles", "owner,admin");
103
104
  }
104
105
  if (ltToken) {
@@ -335,7 +335,8 @@ export const PAYMENT_KIT_DID = "z2qaCNvKMv5GjouKdcDWexv6WqtHbpNPQDnAk";
335
335
  export const DOC_OFFICIAL_ACCESS_TOKEN = "DOC_OFFICIAL_ACCESS_TOKEN";
336
336
 
337
337
  // Default application URL for the document deployment website.
338
- export const DEFAULT_APP_URL = "https://docsmith.aigne.io";
338
+ export const CLOUD_SERVICE_URL_PROD = "https://docsmith.aigne.io";
339
+ export const CLOUD_SERVICE_URL_STAGING = "https://staging.docsmith.aigne.io";
339
340
 
340
341
  // Discuss Kit related URLs
341
342
  export const DISCUSS_KIT_STORE_URL =
package/utils/deploy.mjs CHANGED
@@ -2,11 +2,11 @@ import { BrokerClient, STEPS } from "@blocklet/payment-broker-client/node";
2
2
  import chalk from "chalk";
3
3
  import open from "open";
4
4
  import { getOfficialAccessToken } from "./auth-utils.mjs";
5
- import { DEFAULT_APP_URL } from "./constants/index.mjs";
5
+ import { CLOUD_SERVICE_URL_PROD } from "./constants/index.mjs";
6
6
  import { saveValueToConfig } from "./utils.mjs";
7
7
 
8
8
  // ==================== Configuration ====================
9
- const BASE_URL = process.env.DOC_SMITH_BASE_URL || DEFAULT_APP_URL;
9
+ const BASE_URL = process.env.DOC_SMITH_BASE_URL || CLOUD_SERVICE_URL_PROD;
10
10
  const SUCCESS_MESSAGE = {
11
11
  en: "Congratulations! Your website has been successfully installed. You can return to the command-line tool to continue the next steps.",
12
12
  zh: "恭喜您,你的网站已安装成功!可以返回命令行工具继续后续操作!",