c-capcut 1.0.3 → 1.0.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/config.js +36 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "c-capcut",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "capcut": "./index.js"
package/src/config.js ADDED
@@ -0,0 +1,36 @@
1
+ /**
2
+ * config.js
3
+ * Loads config.json and exports all constants.
4
+ */
5
+
6
+ import { readFileSync } from "fs";
7
+ import { resolve, dirname } from "path";
8
+ import { fileURLToPath } from "url";
9
+
10
+ const __dirname = dirname(fileURLToPath(import.meta.url));
11
+ const raw = readFileSync(resolve(__dirname, "../config.json"), "utf-8");
12
+ const config = JSON.parse(raw);
13
+
14
+ // ─── Account / Email Service ──────────────────────────────────────────────────
15
+ export const PASSWORD = config.password;
16
+ export const ACCOUNT_API_URL = config.account.apiUrl;
17
+ export const ACCOUNT_API_KEY = config.account.apiKey;
18
+
19
+ // ─── Process ──────────────────────────────────────────────────────────────────
20
+ export const BATCH_SIZE = config.batchSize;
21
+
22
+ // ─── OTP ──────────────────────────────────────────────────────────────────────
23
+ export const OTP_TIMEOUT = config.otp.timeout;
24
+ export const OTP_POLL = config.otp.pollInterval;
25
+
26
+ // ─── CapCut Passport ────────────────────────────────────────────────────────────
27
+ export const CAPCUT_AID = config.capcut.aid;
28
+ export const CAPCUT_SDK_VERSION = config.capcut.sdkVersion;
29
+ export const CAPCUT_LANGUAGE = config.capcut.language;
30
+ export const CAPCUT_REGION = config.capcut.region;
31
+ export const CAPCUT_LOGIN_DOMAIN = config.capcut.loginDomain;
32
+
33
+ // ─── File Paths ───────────────────────────────────────────────────────────────
34
+ export const ACCOUNTS_FILE = config.paths.accounts;
35
+ export const RESULT_FILE = config.paths.result;
36
+ export const EMAIL_DB_FILE = config.paths.emailDb;