@webneat/codewiki 0.0.6 → 0.0.7
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 +216 -205
- package/dist/bin.cjs.map +1 -1
- package/dist/bin.js +216 -205
- package/dist/bin.js.map +1 -1
- package/dist/cli.cjs +216 -205
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +216 -205
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +17 -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 +17 -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
|
});
|
|
@@ -2353,6 +2351,21 @@ async function update6(ctx) {
|
|
|
2353
2351
|
await link_symbols(ctx);
|
|
2354
2352
|
}
|
|
2355
2353
|
|
|
2354
|
+
// src/update_config.ts
|
|
2355
|
+
function update_config(ctx, config, updates) {
|
|
2356
|
+
if (Object.keys(updates).length === 0) return;
|
|
2357
|
+
const new_config = { ...config, ...updates };
|
|
2358
|
+
err.or_throw(
|
|
2359
|
+
configs_exports.upsert(ctx, {
|
|
2360
|
+
project_path: new_config.project_path,
|
|
2361
|
+
description: new_config.description ?? null,
|
|
2362
|
+
package_json_path: new_config.package_json_path ?? null,
|
|
2363
|
+
node_modules_paths: new_config.node_modules_paths ? JSON.stringify(new_config.node_modules_paths) : null
|
|
2364
|
+
})
|
|
2365
|
+
);
|
|
2366
|
+
Object.assign(config, updates);
|
|
2367
|
+
}
|
|
2368
|
+
|
|
2356
2369
|
// src/counts.ts
|
|
2357
2370
|
var import_drizzle_orm13 = require("drizzle-orm");
|
|
2358
2371
|
function counts(ctx) {
|
|
@@ -2672,6 +2685,7 @@ async function create(config) {
|
|
|
2672
2685
|
const ctx = await context_from_config(config);
|
|
2673
2686
|
return {
|
|
2674
2687
|
config,
|
|
2688
|
+
update_config: (updates) => update_config(ctx, config, updates),
|
|
2675
2689
|
update: () => update6(ctx),
|
|
2676
2690
|
counts: () => counts(ctx),
|
|
2677
2691
|
to_describe: (limit) => to_describe(ctx, limit),
|
|
@@ -2693,6 +2707,7 @@ async function load(db_path) {
|
|
|
2693
2707
|
};
|
|
2694
2708
|
return {
|
|
2695
2709
|
config,
|
|
2710
|
+
update_config: (updates) => update_config(ctx, config, updates),
|
|
2696
2711
|
update: () => update6(ctx),
|
|
2697
2712
|
counts: () => counts(ctx),
|
|
2698
2713
|
to_describe: (limit) => to_describe(ctx, limit),
|
|
@@ -2704,8 +2719,6 @@ async function load(db_path) {
|
|
|
2704
2719
|
}
|
|
2705
2720
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2706
2721
|
0 && (module.exports = {
|
|
2707
|
-
context_from_config,
|
|
2708
|
-
context_from_db,
|
|
2709
2722
|
create,
|
|
2710
2723
|
load
|
|
2711
2724
|
});
|