vite-plugin-spire.officejs-test 2.0.6 → 2.0.8
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.
- package/lib/index.mjs +7 -5
- package/package.json +1 -1
package/lib/index.mjs
CHANGED
|
@@ -6,8 +6,8 @@ import { access, constants } from "node:fs/promises";
|
|
|
6
6
|
import { statSync, createReadStream, existsSync, mkdirSync, chmodSync, readFileSync } from "node:fs";
|
|
7
7
|
import { readdir, mkdir, cp } from "fs/promises";
|
|
8
8
|
import { spawn } from "node:child_process";
|
|
9
|
-
const web = [{ "package": "spire.officejs-web-word-
|
|
10
|
-
const service = [{ "package": "spire.officejs-service-win-
|
|
9
|
+
const web = [{ "package": "spire.officejs-web-word-vr", "route": "/service/spireword", "name": "spireword", "build": "/web/spireword", "identify": "word" }, { "package": "spire.officejs-web-excel-vr", "route": "/service/spireexcel", "name": "spireexcel", "build": "/service/spireexcel", "identify": "excel" }, { "package": "spire.officejs-web-powerpoint-vr", "route": "/service/spirepowerpoint", "name": "spirepowerpoint", "build": "/service/spirepowerpoint", "identify": "ppt" }, { "package": "spire.officejs-web-pdf-vr", "route": "/service/spireword", "name": "pdf", "build": "/service/spireword", "identify": "pdf" }, { "package": "spire.officejs-web-common-vr", "route": "/service/spirecommon", "name": "spirecommon", "build": "/service/spirecommon", "identify": "spirecommon" }, { "package": "spire.officejs-web-editors-vr", "route": "/editors", "name": "editors", "build": "/editors", "identify": "editors" }, { "package": "spire.officejs-web-externs-vr", "route": "/externs", "name": "externs", "build": "/externs", "identify": "externs" }, { "package": "spire.officejs-web-fontsweb-vr", "route": "/fontsweb", "name": "fontsweb", "build": "/fontsweb", "identify": "fontsweb" }];
|
|
10
|
+
const service = [{ "package": "spire.officejs-service-win-vr", "path": "/lib", "name": "service-windows", "platform": "win32", "build": "/", "identify": "windows" }, { "package": "spire.officejs-service-linux-vr", "path": "/lib", "name": "service-linux", "platform": "linux", "build": "/", "identify": "linux" }, { "package": "spire.officejs-service-arm-vr", "path": "/lib", "name": "service-arm", "platform": "arm", "build": "/", "identify": "arm" }];
|
|
11
11
|
const configJSon = {
|
|
12
12
|
web,
|
|
13
13
|
service
|
|
@@ -178,7 +178,6 @@ const initBundle = async (options, projectRoot) => {
|
|
|
178
178
|
let buildDir = targetStaticPrfix2;
|
|
179
179
|
const packageJsonPath = requireFunc.resolve(`${packageName}/package.json`);
|
|
180
180
|
const packageRoot = path.dirname(packageJsonPath) + packagePath2;
|
|
181
|
-
console.log("packageRoot", packageRoot);
|
|
182
181
|
const targetStaticDir = path.join(buildOutDir, buildDir);
|
|
183
182
|
console.log(`copying ${packageName} ......`);
|
|
184
183
|
await copyFile(packageRoot, targetStaticDir, excludesFile_copy);
|
|
@@ -360,7 +359,7 @@ const createSqlDirInDev = async (targetDir, sourceFile) => {
|
|
|
360
359
|
}
|
|
361
360
|
};
|
|
362
361
|
const createSqlDirInProd = async (root) => {
|
|
363
|
-
const configDir = resolve(root,
|
|
362
|
+
const configDir = resolve(root, targetStaticPrfix, prodConfigDir);
|
|
364
363
|
const configPath = resolve(configDir, prodConfigName);
|
|
365
364
|
const sqlDir = await getConfigDbPath(configPath);
|
|
366
365
|
const absoluteDir = sqlDir && resolve(configDir, "..", sqlDir);
|
|
@@ -415,10 +414,13 @@ const bundleCoAuthServer = async (options, projectRoot) => {
|
|
|
415
414
|
const packageJsonPath = requireFunc.resolve(`${packageName}/package.json`);
|
|
416
415
|
const packageRoot = dirname(packageJsonPath) + packagePath2;
|
|
417
416
|
const targetStaticDir = join(buildOutDir, buildDir);
|
|
417
|
+
console.log("buildOutDir", buildOutDir);
|
|
418
|
+
console.log("configtargetPath", configtargetPath);
|
|
419
|
+
console.log("targetStaticDir", targetStaticDir);
|
|
418
420
|
console.log(`copying ${packageName} ......`);
|
|
419
421
|
await copyFile(packageRoot, targetStaticDir, ["logs", "data"]);
|
|
420
422
|
await copySingleFile(configSourcetPath, configtargetPath);
|
|
421
|
-
await createSqlDirInProd(
|
|
423
|
+
await createSqlDirInProd(buildOutDir);
|
|
422
424
|
console.log(`✅ successfully copied to: ${targetDir}`);
|
|
423
425
|
} catch (error) {
|
|
424
426
|
throw new Error(error);
|