@charlie_deng/e2e-assistant-config 0.0.0-stage → 0.0.6

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,13 @@
1
+ /**
2
+ * 平台默认 CLI 监听端口。
3
+ */
4
+ export declare const DEFAULT_AUTHINE_CLI_PORT = 5826;
5
+ /**
6
+ * 本地 Web 工作台开发服务默认端口。
7
+ */
8
+ export declare const DEFAULT_AUTHINE_WEB_DEV_PORT = 5176;
9
+ /**
10
+ * 独立发布的 Web 工作台包名。
11
+ */
12
+ export declare const AUTHINE_WEB_PACKAGE_NAME = "@charlie_deng/e2e-assistant-web";
13
+ export { getAuthineConfigDirectory, getUserConfigRootDirectory, } from './user-config-directory';
package/dist/index.js ADDED
@@ -0,0 +1,40 @@
1
+ // src/user-config-directory.ts
2
+ import { homedir } from "os";
3
+ import path from "path";
4
+ import process from "process";
5
+ var AUTHINE_CONFIG_DIRECTORY_NAME = "e2e_assistant";
6
+ function getUserConfigRootDirectory() {
7
+ if (process.platform === "win32") {
8
+ return resolveWindowsConfigRootDirectory();
9
+ }
10
+ return resolvePosixConfigRootDirectory();
11
+ }
12
+ function getAuthineConfigDirectory() {
13
+ return path.join(getUserConfigRootDirectory(), AUTHINE_CONFIG_DIRECTORY_NAME);
14
+ }
15
+ function resolveWindowsConfigRootDirectory() {
16
+ const temp_appDataDirectory = process.env.APPDATA?.trim();
17
+ if (temp_appDataDirectory) {
18
+ return temp_appDataDirectory;
19
+ }
20
+ return path.join(homedir(), "AppData", "Roaming");
21
+ }
22
+ function resolvePosixConfigRootDirectory() {
23
+ const temp_xdgConfigHome = process.env.XDG_CONFIG_HOME?.trim();
24
+ if (temp_xdgConfigHome) {
25
+ return temp_xdgConfigHome;
26
+ }
27
+ return path.join(homedir(), ".config");
28
+ }
29
+
30
+ // src/index.ts
31
+ var DEFAULT_AUTHINE_CLI_PORT = 5826;
32
+ var DEFAULT_AUTHINE_WEB_DEV_PORT = 5176;
33
+ var AUTHINE_WEB_PACKAGE_NAME = "@charlie_deng/e2e-assistant-web";
34
+ export {
35
+ AUTHINE_WEB_PACKAGE_NAME,
36
+ DEFAULT_AUTHINE_CLI_PORT,
37
+ DEFAULT_AUTHINE_WEB_DEV_PORT,
38
+ getAuthineConfigDirectory,
39
+ getUserConfigRootDirectory
40
+ };
@@ -0,0 +1,16 @@
1
+ /**
2
+ * 解析当前操作系统下的用户级配置根目录。
3
+ *
4
+ * @returns 当前系统建议使用的配置根目录绝对路径。
5
+ * @throws 不抛出异常。
6
+ */
7
+ export declare function getUserConfigRootDirectory(): string;
8
+ /**
9
+ * 获取平台配置目录的绝对路径(用户级配置根目录下的固定目录名)。
10
+ *
11
+ * 两侧各自在此之下拼接自己的文件名:CLI 用 runtime.json,服务层用 config.json。
12
+ *
13
+ * @returns 跨平台统一的 Authine 配置目录绝对路径。
14
+ * @throws 不抛出异常。
15
+ */
16
+ export declare function getAuthineConfigDirectory(): string;
package/package.json CHANGED
@@ -1,6 +1,36 @@
1
1
  {
2
2
  "name": "@charlie_deng/e2e-assistant-config",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.0.6",
4
+ "private": false,
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.js"
12
+ }
13
+ },
14
+ "files": [
15
+ "dist"
16
+ ],
17
+ "publishConfig": {
18
+ "access": "public"
19
+ },
20
+ "devDependencies": {
21
+ "@types/node": "^22.19.0",
22
+ "tsup": "^8.5.1",
23
+ "typescript": "^6.0.3",
24
+ "vitest": "^4.1.10"
25
+ },
26
+ "engines": {
27
+ "node": ">=22.19.0"
28
+ },
29
+ "scripts": {
30
+ "build": "tsup src/index.ts --format esm && tsc --ignoreConfig src/index.ts --declaration --emitDeclarationOnly --outDir dist --module ESNext --target ES2022 --moduleResolution Bundler --ignoreDeprecations 6.0 --skipLibCheck --types node",
31
+ "dev": "tsup src/index.ts --format esm --watch",
32
+ "typecheck": "tsc --noEmit",
33
+ "test": "vitest run",
34
+ "test:unit": "vitest run"
35
+ }
6
36
  }
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.