@pipelab/core-node 1.0.1-beta.27 → 1.0.1-beta.29
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/CHANGELOG.md +18 -0
- package/dist/index.d.mts +2 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +11 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
- package/src/context.ts +16 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pipelab/core-node",
|
|
3
|
-
"version": "1.0.1-beta.
|
|
3
|
+
"version": "1.0.1-beta.29",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The Pipelab automation engine for Node.js",
|
|
6
6
|
"license": "FSL-1.1-MIT",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"type-fest": "4.39.0",
|
|
40
40
|
"ws": "8.18.3",
|
|
41
41
|
"yauzl": "2.10.0",
|
|
42
|
-
"@pipelab/constants": "1.0.1-beta.
|
|
43
|
-
"@pipelab/shared": "2.0.1-beta.
|
|
42
|
+
"@pipelab/constants": "1.0.1-beta.25",
|
|
43
|
+
"@pipelab/shared": "2.0.1-beta.26"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@types/adm-zip": "0.5.7",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@types/yauzl": "2.10.3",
|
|
54
54
|
"tsdown": "0.21.2",
|
|
55
55
|
"typescript": "^5.0.0",
|
|
56
|
-
"@pipelab/tsconfig": "1.0.1-beta.
|
|
56
|
+
"@pipelab/tsconfig": "1.0.1-beta.25"
|
|
57
57
|
},
|
|
58
58
|
"scripts": {
|
|
59
59
|
"build": "tsdown",
|
package/src/context.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { join, dirname, resolve } from "node:path";
|
|
2
|
-
import { homedir } from "node:os";
|
|
2
|
+
import { homedir, platform } from "node:os";
|
|
3
3
|
import { fileURLToPath } from "node:url";
|
|
4
4
|
import { existsSync } from "node:fs";
|
|
5
5
|
|
|
@@ -12,6 +12,21 @@ const _dirname =
|
|
|
12
12
|
|
|
13
13
|
export const isDev = process.env.NODE_ENV === "development";
|
|
14
14
|
|
|
15
|
+
export const getDefaultUserDataPath = () => {
|
|
16
|
+
const base = (() => {
|
|
17
|
+
switch (platform()) {
|
|
18
|
+
case "win32":
|
|
19
|
+
return process.env.APPDATA || join(homedir(), "AppData", "Roaming");
|
|
20
|
+
case "darwin":
|
|
21
|
+
return join(homedir(), "Library", "Application Support");
|
|
22
|
+
default:
|
|
23
|
+
return process.env.XDG_CONFIG_HOME || join(homedir(), ".config");
|
|
24
|
+
}
|
|
25
|
+
})();
|
|
26
|
+
|
|
27
|
+
return join(base, "@pipelab", isDev ? "app-dev" : "app");
|
|
28
|
+
};
|
|
29
|
+
|
|
15
30
|
/**
|
|
16
31
|
* Finds the monorepo root by looking for pnpm-workspace.yaml.
|
|
17
32
|
*/
|