@webneat/codewiki 0.0.6 → 0.0.8
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/dist/bin.cjs +217 -205
- package/dist/bin.cjs.map +1 -1
- package/dist/bin.js +217 -205
- package/dist/bin.js.map +1 -1
- package/dist/cli.cjs +217 -205
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +217 -205
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +18 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -4
- package/dist/index.d.ts +2 -4
- package/dist/index.js +18 -2
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.cjs
CHANGED
|
@@ -30,8 +30,6 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
30
|
// src/index.ts
|
|
31
31
|
var src_exports = {};
|
|
32
32
|
__export(src_exports, {
|
|
33
|
-
context_from_config: () => context_from_config,
|
|
34
|
-
context_from_db: () => context_from_db,
|
|
35
33
|
create: () => create,
|
|
36
34
|
load: () => load
|
|
37
35
|
});
|
|
@@ -1407,6 +1405,7 @@ var import_typescript4 = __toESM(require("typescript"), 1);
|
|
|
1407
1405
|
var import_node_path4 = __toESM(require("path"), 1);
|
|
1408
1406
|
var import_typescript3 = __toESM(require("typescript"), 1);
|
|
1409
1407
|
function is_external_module(ctx, source_file, module_path) {
|
|
1408
|
+
if (module_path.startsWith("#")) return false;
|
|
1410
1409
|
const resolved = import_typescript3.default.resolveModuleName(module_path, source_file.fileName, ctx.program.getCompilerOptions(), import_typescript3.default.sys);
|
|
1411
1410
|
if (!resolved.resolvedModule) return true;
|
|
1412
1411
|
const resolved_path = import_node_path4.default.resolve(resolved.resolvedModule.resolvedFileName);
|
|
@@ -2353,6 +2352,21 @@ async function update6(ctx) {
|
|
|
2353
2352
|
await link_symbols(ctx);
|
|
2354
2353
|
}
|
|
2355
2354
|
|
|
2355
|
+
// src/update_config.ts
|
|
2356
|
+
function update_config(ctx, config, updates) {
|
|
2357
|
+
if (Object.keys(updates).length === 0) return;
|
|
2358
|
+
const new_config = { ...config, ...updates };
|
|
2359
|
+
err.or_throw(
|
|
2360
|
+
configs_exports.upsert(ctx, {
|
|
2361
|
+
project_path: new_config.project_path,
|
|
2362
|
+
description: new_config.description ?? null,
|
|
2363
|
+
package_json_path: new_config.package_json_path ?? null,
|
|
2364
|
+
node_modules_paths: new_config.node_modules_paths ? JSON.stringify(new_config.node_modules_paths) : null
|
|
2365
|
+
})
|
|
2366
|
+
);
|
|
2367
|
+
Object.assign(config, updates);
|
|
2368
|
+
}
|
|
2369
|
+
|
|
2356
2370
|
// src/counts.ts
|
|
2357
2371
|
var import_drizzle_orm13 = require("drizzle-orm");
|
|
2358
2372
|
function counts(ctx) {
|
|
@@ -2672,6 +2686,7 @@ async function create(config) {
|
|
|
2672
2686
|
const ctx = await context_from_config(config);
|
|
2673
2687
|
return {
|
|
2674
2688
|
config,
|
|
2689
|
+
update_config: (updates) => update_config(ctx, config, updates),
|
|
2675
2690
|
update: () => update6(ctx),
|
|
2676
2691
|
counts: () => counts(ctx),
|
|
2677
2692
|
to_describe: (limit) => to_describe(ctx, limit),
|
|
@@ -2693,6 +2708,7 @@ async function load(db_path) {
|
|
|
2693
2708
|
};
|
|
2694
2709
|
return {
|
|
2695
2710
|
config,
|
|
2711
|
+
update_config: (updates) => update_config(ctx, config, updates),
|
|
2696
2712
|
update: () => update6(ctx),
|
|
2697
2713
|
counts: () => counts(ctx),
|
|
2698
2714
|
to_describe: (limit) => to_describe(ctx, limit),
|
|
@@ -2704,8 +2720,6 @@ async function load(db_path) {
|
|
|
2704
2720
|
}
|
|
2705
2721
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2706
2722
|
0 && (module.exports = {
|
|
2707
|
-
context_from_config,
|
|
2708
|
-
context_from_db,
|
|
2709
2723
|
create,
|
|
2710
2724
|
load
|
|
2711
2725
|
});
|