@m3rcena/eco 0.0.0-stage → 14.28.1-dev.0
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 +91 -0
- package/DOCUMENTATION.md +869 -0
- package/LICENSE +191 -0
- package/README.md +130 -2
- package/assets/logo.png +0 -0
- package/dist/host-3dAloQHW.cjs +6160 -0
- package/dist/host-3dAloQHW.cjs.map +1 -0
- package/dist/host-DYfnpiNu.mjs +5891 -0
- package/dist/host-DYfnpiNu.mjs.map +1 -0
- package/dist/host-XZmTzNyx.d.cts +1833 -0
- package/dist/host-XZmTzNyx.d.cts.map +1 -0
- package/dist/host-_xxHiG2p.d.mts +1833 -0
- package/dist/host-_xxHiG2p.d.mts.map +1 -0
- package/dist/host.cjs +4 -0
- package/dist/host.d.cts +2 -0
- package/dist/host.d.mts +2 -0
- package/dist/host.mjs +2 -0
- package/dist/index.cjs +1440 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +339 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +339 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +1371 -0
- package/dist/index.mjs.map +1 -0
- package/dist/register.cjs +46 -0
- package/dist/register.cjs.map +1 -0
- package/dist/register.d.cts +6 -0
- package/dist/register.d.cts.map +1 -0
- package/dist/register.d.mts +6 -0
- package/dist/register.d.mts.map +1 -0
- package/dist/register.mjs +44 -0
- package/dist/register.mjs.map +1 -0
- package/dist/resolver.cjs +292 -0
- package/dist/resolver.cjs.map +1 -0
- package/dist/resolver.d.cts +40 -0
- package/dist/resolver.d.cts.map +1 -0
- package/dist/resolver.d.mts +40 -0
- package/dist/resolver.d.mts.map +1 -0
- package/dist/resolver.mjs +283 -0
- package/dist/resolver.mjs.map +1 -0
- package/dist/rolldown-runtime-CmQyd0Gu.cjs +27 -0
- package/dist/rolldown-runtime-D3PmRqjj.mjs +4 -0
- package/package.json +94 -4
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
import { t as __require } from "./rolldown-runtime-D3PmRqjj.mjs";
|
|
2
|
+
import fs from "node:fs";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
// src/resolver.ts
|
|
5
|
+
/**
|
|
6
|
+
* @m3rcena/eco - Rust-Style Submodule & Path Resolver
|
|
7
|
+
*
|
|
8
|
+
* Inspired by Cargo's workspace and [patch.crates-io] resolver algorithm.
|
|
9
|
+
* Enables zero-friction consumption of @m3rcena packages via Git submodules,
|
|
10
|
+
* local vendor paths, or standard NPM registry installs without code changes.
|
|
11
|
+
*
|
|
12
|
+
* @copyright 2026 M3rcena Development. All rights reserved.
|
|
13
|
+
* @license Apache-2.0
|
|
14
|
+
*/
|
|
15
|
+
const KNOWN_PACKAGES = {
|
|
16
|
+
"@m3rcena/weky": {
|
|
17
|
+
aliases: [
|
|
18
|
+
"m3rcena-weky",
|
|
19
|
+
"weky",
|
|
20
|
+
"weky-manager"
|
|
21
|
+
],
|
|
22
|
+
envVar: "M3RCENA_WEKY_PATH"
|
|
23
|
+
},
|
|
24
|
+
"@m3rcena/eco": {
|
|
25
|
+
aliases: [
|
|
26
|
+
"m3rcena-eco",
|
|
27
|
+
"eco",
|
|
28
|
+
"economy"
|
|
29
|
+
],
|
|
30
|
+
envVar: "M3RCENA_ECO_PATH"
|
|
31
|
+
},
|
|
32
|
+
"@m3rcena/bridge": {
|
|
33
|
+
aliases: [
|
|
34
|
+
"m3rcena-bridge",
|
|
35
|
+
"bridge",
|
|
36
|
+
"m3rcena-core"
|
|
37
|
+
],
|
|
38
|
+
envVar: "M3RCENA_BRIDGE_PATH"
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
const CANDIDATE_CONTAINERS = [
|
|
42
|
+
"submodules",
|
|
43
|
+
"submodule",
|
|
44
|
+
"vendor",
|
|
45
|
+
"packages",
|
|
46
|
+
"libs",
|
|
47
|
+
"modules",
|
|
48
|
+
""
|
|
49
|
+
];
|
|
50
|
+
function isTypeScriptRuntime() {
|
|
51
|
+
if (typeof process.isBun !== "undefined") return true;
|
|
52
|
+
if (typeof process.isDeno !== "undefined") return true;
|
|
53
|
+
const execArgv = process.execArgv.join(" ");
|
|
54
|
+
if (/tsx|ts-node|@swc\/register|ts-loader/.test(execArgv)) return true;
|
|
55
|
+
if (process.argv[1]?.endsWith(".ts") || process.argv[1]?.endsWith(".mts")) return true;
|
|
56
|
+
if (process.env.M3RCENA_PREFER_SOURCE === "true" || process.env.M3RCENA_PREFER_SOURCE === "1") return true;
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
function findProjectRoot(startDir = process.cwd()) {
|
|
60
|
+
let current = path.resolve(startDir);
|
|
61
|
+
for (let i = 0; i < 6; i++) {
|
|
62
|
+
const pkgJson = path.join(current, "package.json");
|
|
63
|
+
if (fs.existsSync(pkgJson)) return current;
|
|
64
|
+
const parent = path.dirname(current);
|
|
65
|
+
if (parent === current) break;
|
|
66
|
+
current = parent;
|
|
67
|
+
}
|
|
68
|
+
return path.resolve(startDir);
|
|
69
|
+
}
|
|
70
|
+
function loadResolverConfig(cwd = process.cwd()) {
|
|
71
|
+
const root = findProjectRoot(cwd);
|
|
72
|
+
const resolverFile = path.join(root, "m3rcena.resolver.json");
|
|
73
|
+
if (fs.existsSync(resolverFile)) try {
|
|
74
|
+
return JSON.parse(fs.readFileSync(resolverFile, "utf-8"));
|
|
75
|
+
} catch {}
|
|
76
|
+
const pkgJsonPath = path.join(root, "package.json");
|
|
77
|
+
if (fs.existsSync(pkgJsonPath)) try {
|
|
78
|
+
const pkg = JSON.parse(fs.readFileSync(pkgJsonPath, "utf-8"));
|
|
79
|
+
if (pkg.m3rcena && typeof pkg.m3rcena === "object") return pkg.m3rcena;
|
|
80
|
+
} catch {}
|
|
81
|
+
return null;
|
|
82
|
+
}
|
|
83
|
+
function inspectSubmoduleDirectory(dirPath, expectedName) {
|
|
84
|
+
if (!fs.existsSync(dirPath)) return { isValid: false };
|
|
85
|
+
try {
|
|
86
|
+
if (!fs.statSync(dirPath).isDirectory()) return { isValid: false };
|
|
87
|
+
const pkgPath = path.join(dirPath, "package.json");
|
|
88
|
+
if (fs.existsSync(pkgPath)) {
|
|
89
|
+
const data = JSON.parse(fs.readFileSync(pkgPath, "utf-8"));
|
|
90
|
+
if (data.name === expectedName) return {
|
|
91
|
+
isValid: true,
|
|
92
|
+
version: data.version
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
if (fs.existsSync(path.join(dirPath, "src", "index.ts"))) return { isValid: true };
|
|
96
|
+
} catch {
|
|
97
|
+
return { isValid: false };
|
|
98
|
+
}
|
|
99
|
+
return { isValid: false };
|
|
100
|
+
}
|
|
101
|
+
function resolveSubmoduleEntryPoint(dirPath, preferSource) {
|
|
102
|
+
const srcTs = path.join(dirPath, "src", "index.ts");
|
|
103
|
+
const distMjs = path.join(dirPath, "dist", "index.mjs");
|
|
104
|
+
const distCjs = path.join(dirPath, "dist", "index.cjs");
|
|
105
|
+
const isBuilt = fs.existsSync(distMjs) || fs.existsSync(distCjs);
|
|
106
|
+
if (preferSource && fs.existsSync(srcTs)) return {
|
|
107
|
+
entryPath: srcTs,
|
|
108
|
+
type: "source",
|
|
109
|
+
isBuilt
|
|
110
|
+
};
|
|
111
|
+
if (fs.existsSync(distMjs)) return {
|
|
112
|
+
entryPath: distMjs,
|
|
113
|
+
type: "dist",
|
|
114
|
+
isBuilt: true
|
|
115
|
+
};
|
|
116
|
+
if (fs.existsSync(distCjs)) return {
|
|
117
|
+
entryPath: distCjs,
|
|
118
|
+
type: "dist",
|
|
119
|
+
isBuilt: true
|
|
120
|
+
};
|
|
121
|
+
if (fs.existsSync(srcTs)) return {
|
|
122
|
+
entryPath: srcTs,
|
|
123
|
+
type: "source",
|
|
124
|
+
isBuilt: false
|
|
125
|
+
};
|
|
126
|
+
return {
|
|
127
|
+
entryPath: dirPath,
|
|
128
|
+
type: "dist",
|
|
129
|
+
isBuilt
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
function resolvePackage(packageName, options = {}) {
|
|
133
|
+
const root = findProjectRoot(options.cwd ?? process.cwd());
|
|
134
|
+
const cfg = loadResolverConfig(root);
|
|
135
|
+
const pkgMeta = KNOWN_PACKAGES[packageName];
|
|
136
|
+
const preferSource = options.preferSource ?? cfg?.preferSource ?? isTypeScriptRuntime();
|
|
137
|
+
if (options.overrides?.[packageName]) {
|
|
138
|
+
const customPath = path.resolve(root, options.overrides[packageName]);
|
|
139
|
+
const inspected = inspectSubmoduleDirectory(customPath, packageName);
|
|
140
|
+
if (inspected.isValid) {
|
|
141
|
+
const ep = resolveSubmoduleEntryPoint(customPath, preferSource);
|
|
142
|
+
return {
|
|
143
|
+
name: packageName,
|
|
144
|
+
status: "submodule",
|
|
145
|
+
type: ep.type,
|
|
146
|
+
path: ep.entryPath,
|
|
147
|
+
rootDirectory: customPath,
|
|
148
|
+
version: inspected.version,
|
|
149
|
+
isBuilt: ep.isBuilt
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
const envVal = process.env[pkgMeta.envVar];
|
|
154
|
+
if (envVal) {
|
|
155
|
+
const customPath = path.resolve(root, envVal);
|
|
156
|
+
const inspected = inspectSubmoduleDirectory(customPath, packageName);
|
|
157
|
+
if (inspected.isValid) {
|
|
158
|
+
const ep = resolveSubmoduleEntryPoint(customPath, preferSource);
|
|
159
|
+
return {
|
|
160
|
+
name: packageName,
|
|
161
|
+
status: "submodule",
|
|
162
|
+
type: ep.type,
|
|
163
|
+
path: ep.entryPath,
|
|
164
|
+
rootDirectory: customPath,
|
|
165
|
+
version: inspected.version,
|
|
166
|
+
isBuilt: ep.isBuilt
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
if (cfg?.packages?.[packageName]) {
|
|
171
|
+
const customPath = path.resolve(root, cfg.packages[packageName]);
|
|
172
|
+
const inspected = inspectSubmoduleDirectory(customPath, packageName);
|
|
173
|
+
if (inspected.isValid) {
|
|
174
|
+
const ep = resolveSubmoduleEntryPoint(customPath, preferSource);
|
|
175
|
+
return {
|
|
176
|
+
name: packageName,
|
|
177
|
+
status: "submodule",
|
|
178
|
+
type: ep.type,
|
|
179
|
+
path: ep.entryPath,
|
|
180
|
+
rootDirectory: customPath,
|
|
181
|
+
version: inspected.version,
|
|
182
|
+
isBuilt: ep.isBuilt
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
const candidateContainers = [
|
|
187
|
+
options.submodulesDir,
|
|
188
|
+
cfg?.submodulesDir,
|
|
189
|
+
process.env.M3RCENA_SUBMODULES_DIR,
|
|
190
|
+
...CANDIDATE_CONTAINERS
|
|
191
|
+
].filter(Boolean);
|
|
192
|
+
const searchRoots = [
|
|
193
|
+
root,
|
|
194
|
+
path.resolve(root, ".."),
|
|
195
|
+
path.resolve(root, "../..")
|
|
196
|
+
];
|
|
197
|
+
for (const sRoot of searchRoots) for (const container of candidateContainers) for (const alias of pkgMeta.aliases) {
|
|
198
|
+
const candidateDir = path.resolve(sRoot, container, alias);
|
|
199
|
+
const inspected = inspectSubmoduleDirectory(candidateDir, packageName);
|
|
200
|
+
if (inspected.isValid) {
|
|
201
|
+
const ep = resolveSubmoduleEntryPoint(candidateDir, preferSource);
|
|
202
|
+
return {
|
|
203
|
+
name: packageName,
|
|
204
|
+
status: "submodule",
|
|
205
|
+
type: ep.type,
|
|
206
|
+
path: ep.entryPath,
|
|
207
|
+
rootDirectory: candidateDir,
|
|
208
|
+
version: inspected.version,
|
|
209
|
+
isBuilt: ep.isBuilt
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
try {
|
|
214
|
+
return {
|
|
215
|
+
name: packageName,
|
|
216
|
+
status: "npm",
|
|
217
|
+
type: "registry",
|
|
218
|
+
path: __require.resolve(packageName, { paths: [root, process.cwd()] })
|
|
219
|
+
};
|
|
220
|
+
} catch {
|
|
221
|
+
const nmPath = path.join(root, "node_modules", packageName);
|
|
222
|
+
if (fs.existsSync(nmPath)) return {
|
|
223
|
+
name: packageName,
|
|
224
|
+
status: "npm",
|
|
225
|
+
type: "registry",
|
|
226
|
+
path: nmPath
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
return {
|
|
230
|
+
name: packageName,
|
|
231
|
+
status: "missing",
|
|
232
|
+
type: "registry",
|
|
233
|
+
path: packageName
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
function getAllPackageResolutions(options = {}) {
|
|
237
|
+
return {
|
|
238
|
+
"@m3rcena/weky": resolvePackage("@m3rcena/weky", options),
|
|
239
|
+
"@m3rcena/eco": resolvePackage("@m3rcena/eco", options),
|
|
240
|
+
"@m3rcena/bridge": resolvePackage("@m3rcena/bridge", options)
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
function generateTsConfigPaths(options = {}) {
|
|
244
|
+
const resolutions = getAllPackageResolutions(options);
|
|
245
|
+
const root = findProjectRoot(options.cwd ?? process.cwd());
|
|
246
|
+
const paths = {};
|
|
247
|
+
for (const [name, res] of Object.entries(resolutions)) if (res.status === "submodule" && res.rootDirectory) {
|
|
248
|
+
const rel = path.relative(root, res.rootDirectory).replace(/\\/g, "/");
|
|
249
|
+
const cleanRel = !rel || rel === "." ? "." : rel.startsWith(".") ? rel : `./${rel}`;
|
|
250
|
+
paths[name] = [
|
|
251
|
+
`${cleanRel}/src`,
|
|
252
|
+
`${cleanRel}/dist/index.mjs`,
|
|
253
|
+
cleanRel
|
|
254
|
+
];
|
|
255
|
+
if (name === "@m3rcena/bridge") paths["@m3rcena/bridge/client"] = [`${cleanRel}/src/client`, `${cleanRel}/dist/client.mjs`];
|
|
256
|
+
}
|
|
257
|
+
return paths;
|
|
258
|
+
}
|
|
259
|
+
function printResolutionSummary(options = {}) {
|
|
260
|
+
const resolutions = getAllPackageResolutions(options);
|
|
261
|
+
const cyan = (s) => `\x1b[36m${s}\x1b[39m`;
|
|
262
|
+
const green = (s) => `\x1b[32m${s}\x1b[39m`;
|
|
263
|
+
const yellow = (s) => `\x1b[33m${s}\x1b[39m`;
|
|
264
|
+
const gray = (s) => `\x1b[90m${s}\x1b[39m`;
|
|
265
|
+
const bold = (s) => `\x1b[1m${s}\x1b[22m`;
|
|
266
|
+
console.log(cyan("┌────────────────────────────────────────────────────────────────────────┐"));
|
|
267
|
+
console.log(cyan("│") + bold(" 🦀 M3RCENA RUST-STYLE SUBMODULE RESOLVER ") + cyan("│"));
|
|
268
|
+
console.log(cyan("├────────────────────────────────────────────────────────────────────────┤"));
|
|
269
|
+
for (const [name, res] of Object.entries(resolutions)) {
|
|
270
|
+
const padName = name.padEnd(16);
|
|
271
|
+
if (res.status === "submodule") {
|
|
272
|
+
const mode = res.type === "source" ? yellow("[SOURCE]") : green("[DIST]");
|
|
273
|
+
const ver = res.version ? `v${res.version}` : "local";
|
|
274
|
+
const shortPath = res.rootDirectory ? path.basename(res.rootDirectory) : res.path;
|
|
275
|
+
console.log(cyan("│") + ` ${bold(padName)} -> ${green("submodule")} ${mode} ${gray(ver)} ${gray(`(${shortPath})`)}`.padEnd(79) + cyan("│"));
|
|
276
|
+
} else if (res.status === "npm") console.log(cyan("│") + ` ${bold(padName)} -> ${cyan("npm registry")} ${gray("(node_modules)")}`.padEnd(79) + cyan("│"));
|
|
277
|
+
else console.log(cyan("│") + ` ${bold(padName)} -> ${gray("not installed")}`.padEnd(79) + cyan("│"));
|
|
278
|
+
}
|
|
279
|
+
console.log(cyan("└────────────────────────────────────────────────────────────────────────┘"));
|
|
280
|
+
}
|
|
281
|
+
export { findProjectRoot, generateTsConfigPaths, getAllPackageResolutions, isTypeScriptRuntime, loadResolverConfig, printResolutionSummary, resolvePackage };
|
|
282
|
+
|
|
283
|
+
//# sourceMappingURL=resolver.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolver.mjs","names":[],"sources":["../src/resolver.ts"],"sourcesContent":["/**\n * @m3rcena/eco - Rust-Style Submodule & Path Resolver\n *\n * Inspired by Cargo's workspace and [patch.crates-io] resolver algorithm.\n * Enables zero-friction consumption of @m3rcena packages via Git submodules,\n * local vendor paths, or standard NPM registry installs without code changes.\n *\n * @copyright 2026 M3rcena Development. All rights reserved.\n * @license Apache-2.0\n */\n\nimport fs from \"node:fs\";\nimport path from \"node:path\";\n\nexport type M3rcenaPackageName = \"@m3rcena/weky\" | \"@m3rcena/eco\" | \"@m3rcena/bridge\";\n\nexport interface PackageResolution {\n name: M3rcenaPackageName;\n status: \"submodule\" | \"npm\" | \"missing\";\n type: \"source\" | \"dist\" | \"registry\";\n path: string;\n rootDirectory?: string;\n version?: string;\n isBuilt?: boolean;\n}\n\nexport interface ResolverOptions {\n cwd?: string;\n submodulesDir?: string;\n preferSource?: boolean;\n overrides?: Partial<Record<M3rcenaPackageName, string>>;\n silent?: boolean;\n}\n\nexport interface M3rcenaResolverConfig {\n submodulesDir?: string;\n preferSource?: boolean;\n packages?: Partial<Record<M3rcenaPackageName, string>>;\n}\n\nconst KNOWN_PACKAGES: Record<M3rcenaPackageName, { aliases: string[]; envVar: string }> = {\n \"@m3rcena/weky\": {\n aliases: [\"m3rcena-weky\", \"weky\", \"weky-manager\"],\n envVar: \"M3RCENA_WEKY_PATH\",\n },\n \"@m3rcena/eco\": {\n aliases: [\"m3rcena-eco\", \"eco\", \"economy\"],\n envVar: \"M3RCENA_ECO_PATH\",\n },\n \"@m3rcena/bridge\": {\n aliases: [\"m3rcena-bridge\", \"bridge\", \"m3rcena-core\"],\n envVar: \"M3RCENA_BRIDGE_PATH\",\n },\n};\n\nconst CANDIDATE_CONTAINERS = [\n \"submodules\",\n \"submodule\",\n \"vendor\",\n \"packages\",\n \"libs\",\n \"modules\",\n \"\",\n];\n\nexport function isTypeScriptRuntime(): boolean {\n if (typeof (process as any).isBun !== \"undefined\") return true;\n if (typeof (process as any).isDeno !== \"undefined\") return true;\n const execArgv = process.execArgv.join(\" \");\n if (/tsx|ts-node|@swc\\/register|ts-loader/.test(execArgv)) return true;\n if (process.argv[1]?.endsWith(\".ts\") || process.argv[1]?.endsWith(\".mts\")) return true;\n if (process.env.M3RCENA_PREFER_SOURCE === \"true\" || process.env.M3RCENA_PREFER_SOURCE === \"1\") return true;\n return false;\n}\n\nexport function findProjectRoot(startDir: string = process.cwd()): string {\n let current = path.resolve(startDir);\n for (let i = 0; i < 6; i++) {\n const pkgJson = path.join(current, \"package.json\");\n if (fs.existsSync(pkgJson)) {\n return current;\n }\n const parent = path.dirname(current);\n if (parent === current) break;\n current = parent;\n }\n return path.resolve(startDir);\n}\n\nexport function loadResolverConfig(cwd: string = process.cwd()): M3rcenaResolverConfig | null {\n const root = findProjectRoot(cwd);\n const resolverFile = path.join(root, \"m3rcena.resolver.json\");\n if (fs.existsSync(resolverFile)) {\n try {\n return JSON.parse(fs.readFileSync(resolverFile, \"utf-8\")) as M3rcenaResolverConfig;\n } catch {\n // Ignore\n }\n }\n\n const pkgJsonPath = path.join(root, \"package.json\");\n if (fs.existsSync(pkgJsonPath)) {\n try {\n const pkg = JSON.parse(fs.readFileSync(pkgJsonPath, \"utf-8\"));\n if (pkg.m3rcena && typeof pkg.m3rcena === \"object\") {\n return pkg.m3rcena as M3rcenaResolverConfig;\n }\n } catch {\n // Ignore\n }\n }\n\n return null;\n}\n\nfunction inspectSubmoduleDirectory(dirPath: string, expectedName: M3rcenaPackageName): { isValid: boolean; version?: string } {\n if (!fs.existsSync(dirPath)) return { isValid: false };\n try {\n const stat = fs.statSync(dirPath);\n if (!stat.isDirectory()) return { isValid: false };\n\n const pkgPath = path.join(dirPath, \"package.json\");\n if (fs.existsSync(pkgPath)) {\n const data = JSON.parse(fs.readFileSync(pkgPath, \"utf-8\"));\n if (data.name === expectedName) {\n return { isValid: true, version: data.version };\n }\n }\n\n if (fs.existsSync(path.join(dirPath, \"src\", \"index.ts\"))) {\n return { isValid: true };\n }\n } catch {\n return { isValid: false };\n }\n return { isValid: false };\n}\n\nfunction resolveSubmoduleEntryPoint(dirPath: string, preferSource: boolean): { entryPath: string; type: \"source\" | \"dist\"; isBuilt: boolean } {\n const srcTs = path.join(dirPath, \"src\", \"index.ts\");\n const distMjs = path.join(dirPath, \"dist\", \"index.mjs\");\n const distCjs = path.join(dirPath, \"dist\", \"index.cjs\");\n const isBuilt = fs.existsSync(distMjs) || fs.existsSync(distCjs);\n\n if (preferSource && fs.existsSync(srcTs)) {\n return { entryPath: srcTs, type: \"source\", isBuilt };\n }\n\n if (fs.existsSync(distMjs)) {\n return { entryPath: distMjs, type: \"dist\", isBuilt: true };\n }\n if (fs.existsSync(distCjs)) {\n return { entryPath: distCjs, type: \"dist\", isBuilt: true };\n }\n\n if (fs.existsSync(srcTs)) {\n return { entryPath: srcTs, type: \"source\", isBuilt: false };\n }\n\n return { entryPath: dirPath, type: \"dist\", isBuilt };\n}\n\nexport function resolvePackage(packageName: M3rcenaPackageName, options: ResolverOptions = {}): PackageResolution {\n const root = findProjectRoot(options.cwd ?? process.cwd());\n const cfg = loadResolverConfig(root);\n const pkgMeta = KNOWN_PACKAGES[packageName];\n\n const preferSource = options.preferSource ?? cfg?.preferSource ?? isTypeScriptRuntime();\n\n if (options.overrides?.[packageName]) {\n const customPath = path.resolve(root, options.overrides[packageName]!);\n const inspected = inspectSubmoduleDirectory(customPath, packageName);\n if (inspected.isValid) {\n const ep = resolveSubmoduleEntryPoint(customPath, preferSource);\n return {\n name: packageName,\n status: \"submodule\",\n type: ep.type,\n path: ep.entryPath,\n rootDirectory: customPath,\n version: inspected.version,\n isBuilt: ep.isBuilt,\n };\n }\n }\n\n const envVal = process.env[pkgMeta.envVar];\n if (envVal) {\n const customPath = path.resolve(root, envVal);\n const inspected = inspectSubmoduleDirectory(customPath, packageName);\n if (inspected.isValid) {\n const ep = resolveSubmoduleEntryPoint(customPath, preferSource);\n return {\n name: packageName,\n status: \"submodule\",\n type: ep.type,\n path: ep.entryPath,\n rootDirectory: customPath,\n version: inspected.version,\n isBuilt: ep.isBuilt,\n };\n }\n }\n\n if (cfg?.packages?.[packageName]) {\n const customPath = path.resolve(root, cfg.packages[packageName]!);\n const inspected = inspectSubmoduleDirectory(customPath, packageName);\n if (inspected.isValid) {\n const ep = resolveSubmoduleEntryPoint(customPath, preferSource);\n return {\n name: packageName,\n status: \"submodule\",\n type: ep.type,\n path: ep.entryPath,\n rootDirectory: customPath,\n version: inspected.version,\n isBuilt: ep.isBuilt,\n };\n }\n }\n\n const candidateContainers = [\n options.submodulesDir,\n cfg?.submodulesDir,\n process.env.M3RCENA_SUBMODULES_DIR,\n ...CANDIDATE_CONTAINERS,\n ].filter(Boolean) as string[];\n\n const searchRoots = [root, path.resolve(root, \"..\"), path.resolve(root, \"../..\")];\n\n for (const sRoot of searchRoots) {\n for (const container of candidateContainers) {\n for (const alias of pkgMeta.aliases) {\n const candidateDir = path.resolve(sRoot, container, alias);\n const inspected = inspectSubmoduleDirectory(candidateDir, packageName);\n if (inspected.isValid) {\n const ep = resolveSubmoduleEntryPoint(candidateDir, preferSource);\n return {\n name: packageName,\n status: \"submodule\",\n type: ep.type,\n path: ep.entryPath,\n rootDirectory: candidateDir,\n version: inspected.version,\n isBuilt: ep.isBuilt,\n };\n }\n }\n }\n }\n\n try {\n const resolvedNpm = require.resolve(packageName, { paths: [root, process.cwd()] });\n return {\n name: packageName,\n status: \"npm\",\n type: \"registry\",\n path: resolvedNpm,\n };\n } catch {\n const nmPath = path.join(root, \"node_modules\", packageName);\n if (fs.existsSync(nmPath)) {\n return {\n name: packageName,\n status: \"npm\",\n type: \"registry\",\n path: nmPath,\n };\n }\n }\n\n return {\n name: packageName,\n status: \"missing\",\n type: \"registry\",\n path: packageName,\n };\n}\n\nexport function getAllPackageResolutions(options: ResolverOptions = {}): Record<M3rcenaPackageName, PackageResolution> {\n return {\n \"@m3rcena/weky\": resolvePackage(\"@m3rcena/weky\", options),\n \"@m3rcena/eco\": resolvePackage(\"@m3rcena/eco\", options),\n \"@m3rcena/bridge\": resolvePackage(\"@m3rcena/bridge\", options),\n };\n}\n\nexport function generateTsConfigPaths(options: ResolverOptions = {}): Record<string, string[]> {\n const resolutions = getAllPackageResolutions(options);\n const root = findProjectRoot(options.cwd ?? process.cwd());\n const paths: Record<string, string[]> = {};\n\n for (const [name, res] of Object.entries(resolutions)) {\n if (res.status === \"submodule\" && res.rootDirectory) {\n const rel = path.relative(root, res.rootDirectory).replace(/\\\\/g, \"/\");\n const cleanRel = !rel || rel === \".\" ? \".\" : (rel.startsWith(\".\") ? rel : `./${rel}`);\n paths[name] = [`${cleanRel}/src`, `${cleanRel}/dist/index.mjs`, cleanRel];\n if (name === \"@m3rcena/bridge\") {\n paths[\"@m3rcena/bridge/client\"] = [`${cleanRel}/src/client`, `${cleanRel}/dist/client.mjs`];\n }\n }\n }\n\n return paths;\n}\n\nexport function printResolutionSummary(options: ResolverOptions = {}): void {\n const resolutions = getAllPackageResolutions(options);\n const cyan = (s: string) => `\\x1b[36m${s}\\x1b[39m`;\n const green = (s: string) => `\\x1b[32m${s}\\x1b[39m`;\n const yellow = (s: string) => `\\x1b[33m${s}\\x1b[39m`;\n const gray = (s: string) => `\\x1b[90m${s}\\x1b[39m`;\n const bold = (s: string) => `\\x1b[1m${s}\\x1b[22m`;\n\n console.log(cyan(\"┌────────────────────────────────────────────────────────────────────────┐\"));\n console.log(cyan(\"│\") + bold(\" 🦀 M3RCENA RUST-STYLE SUBMODULE RESOLVER \") + cyan(\"│\"));\n console.log(cyan(\"├────────────────────────────────────────────────────────────────────────┤\"));\n\n for (const [name, res] of Object.entries(resolutions)) {\n const padName = name.padEnd(16);\n if (res.status === \"submodule\") {\n const mode = res.type === \"source\" ? yellow(\"[SOURCE]\") : green(\"[DIST]\");\n const ver = res.version ? `v${res.version}` : \"local\";\n const shortPath = res.rootDirectory ? path.basename(res.rootDirectory) : res.path;\n console.log(\n cyan(\"│\") +\n ` ${bold(padName)} -> ${green(\"submodule\")} ${mode} ${gray(ver)} ${gray(`(${shortPath})`)}`.padEnd(79) +\n cyan(\"│\")\n );\n } else if (res.status === \"npm\") {\n console.log(cyan(\"│\") + ` ${bold(padName)} -> ${cyan(\"npm registry\")} ${gray(\"(node_modules)\")}`.padEnd(79) + cyan(\"│\"));\n } else {\n console.log(cyan(\"│\") + ` ${bold(padName)} -> ${gray(\"not installed\")}`.padEnd(79) + cyan(\"│\"));\n }\n }\n\n console.log(cyan(\"└────────────────────────────────────────────────────────────────────────┘\"));\n}\n"],"mappings":";;;;;;;;;;;;;;AAwCA,MAAM,iBAAoF;CACxF,iBAAiB;EACf,SAAS;GAAC;GAAgB;GAAQ;EAAc;EAChD,QAAQ;CACV;CACA,gBAAgB;EACd,SAAS;GAAC;GAAe;GAAO;EAAS;EACzC,QAAQ;CACV;CACA,mBAAmB;EACjB,SAAS;GAAC;GAAkB;GAAU;EAAc;EACpD,QAAQ;CACV;AACF;AAEA,MAAM,uBAAuB;CAC3B;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,SAAgB,sBAA+B;CAC7C,IAAI,OAAQ,QAAgB,UAAU,aAAa,OAAO;CAC1D,IAAI,OAAQ,QAAgB,WAAW,aAAa,OAAO;CAC3D,MAAM,WAAW,QAAQ,SAAS,KAAK,GAAG;CAC1C,IAAI,uCAAuC,KAAK,QAAQ,GAAG,OAAO;CAClE,IAAI,QAAQ,KAAK,EAAE,EAAE,SAAS,KAAK,KAAK,QAAQ,KAAK,EAAE,EAAE,SAAS,MAAM,GAAG,OAAO;CAClF,IAAI,QAAQ,IAAI,0BAA0B,UAAU,QAAQ,IAAI,0BAA0B,KAAK,OAAO;CACtG,OAAO;AACT;AAEA,SAAgB,gBAAgB,WAAmB,QAAQ,IAAI,GAAW;CACxE,IAAI,UAAU,KAAK,QAAQ,QAAQ;CACnC,KAAK,IAAI,IAAI,GAAG,IAAI,GAAG,KAAK;EAC1B,MAAM,UAAU,KAAK,KAAK,SAAS,cAAc;EACjD,IAAI,GAAG,WAAW,OAAO,GACvB,OAAO;EAET,MAAM,SAAS,KAAK,QAAQ,OAAO;EACnC,IAAI,WAAW,SAAS;EACxB,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MAAc,UAAU,EAAE;CAExC,QAAQ,IAAI,KAAK,4EAA4E,CAAC;CAC9F,QAAQ,IAAI,KAAK,GAAG,IAAI,KAAK,0EAA0E,IAAI,KAAK,GAAG,CAAC;CACpH,QAAQ,IAAI,KAAK,4EAA4E,CAAC;CAE9F,KAAK,MAAM,CAAC,MAAM,QAAQ,OAAO,QAAQ,WAAW,GAAG;EACrD,MAAM,UAAU,KAAK,OAAO,EAAE;EAC9B,IAAI,IAAI,WAAW,aAAa;GAC9B,MAAM,OAAO,IAAI,SAAS,WAAW,OAAO,UAAU,IAAI,MAAM,QAAQ;GACxE,MAAM,MAAM,IAAI,UAAU,IAAI,IAAI,YAAY;GAC9C,MAAM,YAAY,IAAI,gBAAgB,KAAK,SAAS,IAAI,aAAa,IAAI,IAAI;GAC7E,QAAQ,IACN,KAAK,GAAG,IACR,KAAK,KAAK,OAAO,EAAE,MAAM,MAAM,WAAW,EAAE,GAAG,KAAK,GAAG,KAAK,GAAG,EAAE,GAAG,KAAK,IAAI,UAAU,EAAE,IAAI,OAAO,EAAE,IACtG,KAAK,GAAG,CACV;EACF,OAAO,IAAI,IAAI,WAAW,OACxB,QAAQ,IAAI,KAAK,GAAG,IAAI,KAAK,KAAK,OAAO,EAAE,MAAM,KAAK,cAAc,EAAE,GAAG,KAAK,gBAAgB,IAAI,OAAO,EAAE,IAAI,KAAK,GAAG,CAAC;OAExH,QAAQ,IAAI,KAAK,GAAG,IAAI,KAAK,KAAK,OAAO,EAAE,MAAM,KAAK,eAAe,IAAI,OAAO,EAAE,IAAI,KAAK,GAAG,CAAC;CAEnG;CAEA,QAAQ,IAAI,KAAK,4EAA4E,CAAC;AAChG"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// \0rolldown/runtime.js
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
10
|
+
key = keys[i];
|
|
11
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
12
|
+
get: ((k) => from[k]).bind(null, key),
|
|
13
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
|
|
19
|
+
value: mod,
|
|
20
|
+
enumerable: true
|
|
21
|
+
}) : target, mod));
|
|
22
|
+
Object.defineProperty(exports, "__toESM", {
|
|
23
|
+
enumerable: true,
|
|
24
|
+
get: function() {
|
|
25
|
+
return __toESM;
|
|
26
|
+
}
|
|
27
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,96 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m3rcena/eco",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "14.28.1-dev.0",
|
|
4
|
+
"description": "The ultimate Discord.js v14 economy engine. Dual wallet/bank, career jobs, items & inventory, businesses, interactive casino gambling, robbery, market trading, and web dashboard bridge.",
|
|
5
|
+
"main": "./dist/index.cjs",
|
|
6
|
+
"module": "./dist/index.mjs",
|
|
7
|
+
"types": "./dist/index.d.cts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"development": "./src/index.ts",
|
|
11
|
+
"import": {
|
|
12
|
+
"types": "./dist/index.d.mts",
|
|
13
|
+
"default": "./dist/index.mjs"
|
|
14
|
+
},
|
|
15
|
+
"require": {
|
|
16
|
+
"types": "./dist/index.d.cts",
|
|
17
|
+
"default": "./dist/index.cjs"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"./resolver": {
|
|
21
|
+
"types": "./dist/resolver.d.mts",
|
|
22
|
+
"import": "./dist/resolver.mjs",
|
|
23
|
+
"require": "./dist/resolver.cjs"
|
|
24
|
+
},
|
|
25
|
+
"./register": {
|
|
26
|
+
"types": "./dist/register.d.mts",
|
|
27
|
+
"import": "./dist/register.mjs",
|
|
28
|
+
"require": "./dist/register.cjs"
|
|
29
|
+
},
|
|
30
|
+
"./host": {
|
|
31
|
+
"types": "./dist/host.d.mts",
|
|
32
|
+
"import": "./dist/host.mjs",
|
|
33
|
+
"require": "./dist/host.cjs"
|
|
34
|
+
},
|
|
35
|
+
"./source": "./src/index.ts",
|
|
36
|
+
"./package.json": "./package.json"
|
|
37
|
+
},
|
|
38
|
+
"files": [
|
|
39
|
+
"dist",
|
|
40
|
+
"assets",
|
|
41
|
+
"DOCUMENTATION.md",
|
|
42
|
+
"CHANGELOG.md",
|
|
43
|
+
"README.md",
|
|
44
|
+
"LICENSE"
|
|
45
|
+
],
|
|
46
|
+
"publishConfig": {
|
|
47
|
+
"access": "public"
|
|
48
|
+
},
|
|
49
|
+
"scripts": {
|
|
50
|
+
"build": "tsdown",
|
|
51
|
+
"prepare": "tsdown",
|
|
52
|
+
"dev": "tsdown --watch",
|
|
53
|
+
"host": "tsx src/host.ts",
|
|
54
|
+
"typecheck": "tsc --noEmit",
|
|
55
|
+
"test": "tsx test/index.test.ts && tsx test/database.test.ts && tsx test/connector.test.ts && tsx test/submodule.test.ts"
|
|
56
|
+
},
|
|
57
|
+
"keywords": [
|
|
58
|
+
"m3rcena",
|
|
59
|
+
"eco",
|
|
60
|
+
"economy",
|
|
61
|
+
"discord-economy",
|
|
62
|
+
"discord.js",
|
|
63
|
+
"discord.js-v14",
|
|
64
|
+
"components-v2",
|
|
65
|
+
"casino",
|
|
66
|
+
"blackjack",
|
|
67
|
+
"inventory",
|
|
68
|
+
"banking",
|
|
69
|
+
"businesses",
|
|
70
|
+
"jobs"
|
|
71
|
+
],
|
|
72
|
+
"author": "M3rcena <https://github.com/M3rcena>",
|
|
73
|
+
"license": "Apache-2.0",
|
|
74
|
+
"repository": {
|
|
75
|
+
"type": "git",
|
|
76
|
+
"url": "git+https://github.com/M3rcena/m3rcena-eco.git"
|
|
77
|
+
},
|
|
78
|
+
"bugs": {
|
|
79
|
+
"url": "https://github.com/M3rcena/m3rcena-eco/issues"
|
|
80
|
+
},
|
|
81
|
+
"homepage": "https://github.com/M3rcena/m3rcena-eco#readme",
|
|
82
|
+
"engines": {
|
|
83
|
+
"node": ">=22.0.0"
|
|
84
|
+
},
|
|
85
|
+
"dependencies": {
|
|
86
|
+
"@m3rcena/bridge": "^14.28.1-dev.0",
|
|
87
|
+
"@napi-rs/canvas": "^0.1.68",
|
|
88
|
+
"discord.js": "^14.28.0"
|
|
89
|
+
},
|
|
90
|
+
"devDependencies": {
|
|
91
|
+
"@types/node": "^26.6.6",
|
|
92
|
+
"tsdown": "^0.23.4",
|
|
93
|
+
"tsx": "^4.23.15",
|
|
94
|
+
"typescript": "^7.0.2"
|
|
95
|
+
}
|
|
96
|
+
}
|