@antelopejs/dms-frontend 0.2.4 → 0.2.5
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.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function createTemporaryWorkspace(prefix: string): string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createTemporaryWorkspace = createTemporaryWorkspace;
|
|
4
|
+
const node_fs_1 = require("node:fs");
|
|
5
|
+
const node_os_1 = require("node:os");
|
|
6
|
+
const node_path_1 = require("node:path");
|
|
7
|
+
function createTemporaryWorkspace(prefix) {
|
|
8
|
+
const workspace = (0, node_fs_1.mkdtempSync)((0, node_path_1.join)((0, node_os_1.tmpdir)(), prefix));
|
|
9
|
+
process.on("exit", () => {
|
|
10
|
+
(0, node_fs_1.rmSync)(workspace, { recursive: true, force: true });
|
|
11
|
+
});
|
|
12
|
+
return workspace;
|
|
13
|
+
}
|
|
@@ -39,9 +39,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
39
39
|
const strict_1 = __importDefault(require("node:assert/strict"));
|
|
40
40
|
const node_child_process_1 = require("node:child_process");
|
|
41
41
|
const node_fs_1 = require("node:fs");
|
|
42
|
-
const node_os_1 = require("node:os");
|
|
43
42
|
const node_path_1 = require("node:path");
|
|
44
43
|
const common_1 = require("./common");
|
|
44
|
+
const temporary_workspace_1 = require("./temporary-workspace");
|
|
45
45
|
function removeDevelopmentDependencies(root) {
|
|
46
46
|
const packagePath = (0, node_path_1.join)(root, "package.json");
|
|
47
47
|
if (!(0, node_fs_1.existsSync)(packagePath))
|
|
@@ -53,7 +53,7 @@ function removeDevelopmentDependencies(root) {
|
|
|
53
53
|
if (!process.env.DMS_LAYER_SOURCE)
|
|
54
54
|
throw new Error("DMS_LAYER_SOURCE must identify a frontend package");
|
|
55
55
|
const sourceRoot = (0, node_path_1.resolve)(process.env.DMS_LAYER_SOURCE);
|
|
56
|
-
const workspace = (0,
|
|
56
|
+
const workspace = (0, temporary_workspace_1.createTemporaryWorkspace)("dms-frontend-real-source-");
|
|
57
57
|
const templateRoot = (0, node_path_1.join)((0, common_1.getPackageRoot)(), "templates", "vue");
|
|
58
58
|
const commandEnvironment = { ...process.env };
|
|
59
59
|
const EMAIL_BUILD_SIZE_CEILING_BYTES = 256 * 1024;
|