@lark-apaas/openclaw-dev-cli 0.1.8 → 0.1.10

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/index.js +7 -6
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -4074,8 +4074,7 @@ var import_node_child_process2 = require("child_process");
4074
4074
  // src/constants.ts
4075
4075
  var TEMPLATE_MAP = {
4076
4076
  html: "template-html",
4077
- "nextjs-static": "template-nextjs-pages",
4078
- nextjs: "template-nextjs-fullstack"
4077
+ "vite-react": "template-vite-react"
4079
4078
  };
4080
4079
  var TEMPLATE_TYPES = Object.keys(TEMPLATE_MAP);
4081
4080
  var RENAME_FILES = {
@@ -4094,9 +4093,6 @@ function buildAppUrl(appId) {
4094
4093
  return `${APP_BASE_URL}/${appId}`;
4095
4094
  }
4096
4095
  var CDN_BASE_URL = "https://lf-miaoda-static.feishucdn.com";
4097
- function buildCdnDomain(appId, version) {
4098
- return `${CDN_BASE_URL}/${appId}/${version}/client/`;
4099
- }
4100
4096
 
4101
4097
  // src/utils/http.ts
4102
4098
  var import_http_client = __toESM(require_dist());
@@ -7212,6 +7208,10 @@ async function pullTemplate(options) {
7212
7208
  }
7213
7209
  }
7214
7210
  replaceInFile(import_node_path11.default.join(targetDir, "package.json"), "{{projectName}}", projectName);
7211
+ const indexHtml = import_node_path11.default.join(targetDir, "client", "index.html");
7212
+ if (import_node_fs8.default.existsSync(indexHtml)) {
7213
+ replaceInFile(indexHtml, "{{projectName}}", projectName);
7214
+ }
7215
7215
  return { version };
7216
7216
  }
7217
7217
  function pullFromLocal(localPath, templateDir, targetDir) {
@@ -7631,7 +7631,8 @@ var deployCommand = {
7631
7631
  const preUploadResult = await preUploadStatic(meta.appId, bucketId);
7632
7632
  console.log(`Static prefix: ${preUploadResult.downloadURLPrefix}`);
7633
7633
  if (!options.skipBuild) {
7634
- const cdnDomain = buildCdnDomain(meta.appId, publishResult.version);
7634
+ const cdnBase = artifactCredential.path_prefixes?.resource_cdn_path || CDN_BASE_URL;
7635
+ const cdnDomain = `${cdnBase.replace(/\/+$/, "")}/${meta.appId}/${publishResult.version}/client/`;
7635
7636
  const buildEnv = {
7636
7637
  ...process.env,
7637
7638
  MCLAW_APP_ID: meta.appId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lark-apaas/openclaw-dev-cli",
3
- "version": "0.1.8",
3
+ "version": "0.1.10",
4
4
  "description": "CLI tool for OpenClaw development",
5
5
  "main": "dist/index.js",
6
6
  "bin": {