@arcbridge/core 0.3.1 → 0.3.3

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/index.js CHANGED
@@ -3551,6 +3551,7 @@ function architectTemplate() {
3551
3551
  "arcbridge_get_route_map",
3552
3552
  "arcbridge_get_boundary_analysis",
3553
3553
  "arcbridge_propose_arc42_update",
3554
+ "arcbridge_update_arc42_section",
3554
3555
  "arcbridge_check_drift",
3555
3556
  "arcbridge_get_open_questions"
3556
3557
  ],
@@ -4477,6 +4478,7 @@ function generateDatabase(targetDir, input) {
4477
4478
  );
4478
4479
  upsert.run("project_name", input.name);
4479
4480
  upsert.run("project_type", input.template);
4481
+ upsert.run("platforms", input.platforms.join(", "));
4480
4482
  upsert.run("last_full_index", (/* @__PURE__ */ new Date()).toISOString());
4481
4483
  transaction(db, () => {
4482
4484
  allWarnings.push(...populateBuildingBlocks(db, targetDir));
@@ -5237,13 +5239,13 @@ function getPropsType(node, checker) {
5237
5239
  if (typeStr === "{}" || typeStr === "any") return null;
5238
5240
  return typeStr;
5239
5241
  }
5240
- function analyzeComponents(sourceFiles, checker, projectRoot, db) {
5242
+ function analyzeComponents(sourceFiles, checker, projectRoot, db, allClient = false) {
5241
5243
  const components = [];
5242
5244
  for (const sf of sourceFiles) {
5243
5245
  const relPath = relative2(projectRoot, sf.fileName);
5244
5246
  const directive = getFileDirective(sf);
5245
- const isClient = directive === "use client";
5246
- const isServerAction = directive === "use server";
5247
+ const isClient = allClient || directive === "use client";
5248
+ const isServerAction = !allClient && directive === "use server";
5247
5249
  ts5.forEachChild(sf, (node) => {
5248
5250
  if (ts5.isFunctionDeclaration(node) && node.name) {
5249
5251
  const name = node.name.text;
@@ -6948,7 +6950,10 @@ function indexTypeScriptProject(db, options) {
6948
6950
  });
6949
6951
  db.prepare("DELETE FROM dependencies WHERE source_symbol IN (SELECT id FROM symbols WHERE service = ?)").run(service);
6950
6952
  writeDependencies(db, allDeps);
6951
- const componentsAnalyzed = analyzeComponents(sourceFiles, checker, projectRoot, db);
6953
+ const CLIENT_ONLY_TEMPLATES = /* @__PURE__ */ new Set(["react-vite"]);
6954
+ const projectType = db.prepare("SELECT value FROM arcbridge_meta WHERE key = 'project_type'").get()?.value;
6955
+ const allClient = projectType ? CLIENT_ONLY_TEMPLATES.has(projectType) : false;
6956
+ const componentsAnalyzed = analyzeComponents(sourceFiles, checker, projectRoot, db, allClient);
6952
6957
  const routesAnalyzed = analyzeRoutes(projectRoot, db, service);
6953
6958
  return {
6954
6959
  symbolsIndexed: allSymbols.length,