@gurulu/cli 1.5.3 → 1.5.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.
package/dist/bin.js CHANGED
@@ -40695,8 +40695,8 @@ function snippetWeb(workspaceKey, jsError = false) {
40695
40695
  return `import gurulu from '@gurulu/web';
40696
40696
 
40697
40697
  gurulu.init({
40698
- workspaceKey: process.env.NEXT_PUBLIC_GURULU_WORKSPACE ?? '${workspaceKey}',
40699
- endpoint: process.env.NEXT_PUBLIC_GURULU_ENDPOINT, // optional, defaults to https://ingest.gurulu.io${autocaptureLine(jsError, " ")}
40698
+ workspaceKey: process.env.VITE_GURULU_WORKSPACE ?? '${workspaceKey}',
40699
+ endpoint: process.env.VITE_GURULU_ENDPOINT, // optional, defaults to https://ingest.gurulu.io${autocaptureLine(jsError, " ")}
40700
40700
  });`;
40701
40701
  }
40702
40702
  function snippetNext(workspaceKey, jsError = false) {
@@ -41666,8 +41666,9 @@ async function runFeatures(client, detected, opts) {
41666
41666
  try {
41667
41667
  await client.post("/features/register", { features: selectedKeys });
41668
41668
  s2.stop(c3.neon(`✓ ${selected.length} özellik kuruldu`));
41669
- } catch {
41670
- s2.stop("Özellik kurulumu atlandı (gateway hatası) sonra: gurulu doctor", 1);
41669
+ } catch (err) {
41670
+ const detail = err && typeof err === "object" && "status" in err ? `${err.status} ${err.message ?? ""}`.trim() : err instanceof Error ? err.message : String(err);
41671
+ s2.stop(`Özellik kurulumu atlandı (${detail}) — sonra: gurulu doctor`, 1);
41671
41672
  return { selected, registered: false };
41672
41673
  }
41673
41674
  p2.note(selected.map((f3) => `${c3.bold(f3.label)}
@@ -42179,7 +42180,12 @@ async function runWizard(opts) {
42179
42180
  let identifyHint = null;
42180
42181
  if (!opts.noAi && authed && detected.hasPackageJson) {
42181
42182
  const ctx = gatherContext({ cwd: opts.cwd });
42182
- const aiPlan = await fetchPlan(client, ctx, { framework });
42183
+ let sector;
42184
+ try {
42185
+ const ws = (await client.listWorkspaces()).workspaces.find((w2) => w2.workspace_id === workspaceId);
42186
+ sector = ws?.sector_pack ?? undefined;
42187
+ } catch {}
42188
+ const aiPlan = await fetchPlan(client, ctx, { framework, ...sector ? { sector } : {} });
42183
42189
  if (aiPlan) {
42184
42190
  identifyHint = aiPlan.identify_hint;
42185
42191
  const approved = opts.yes ? aiPlan.events : await renderPlan(aiPlan);
@@ -42255,6 +42261,7 @@ async function runWizard(opts) {
42255
42261
  }
42256
42262
  const envFile = isNode ? ".env" : ".env.local";
42257
42263
  const vars = [];
42264
+ let secretKeyManual = false;
42258
42265
  for (const k2 of plan.envKeys) {
42259
42266
  if (k2.key.endsWith("_WORKSPACE")) {
42260
42267
  vars.push({ key: k2.key, value: writeKey });
@@ -42262,6 +42269,7 @@ async function runWizard(opts) {
42262
42269
  if (auth.apiKey.startsWith("sk_")) {
42263
42270
  vars.push({ key: k2.key, value: auth.apiKey });
42264
42271
  } else {
42272
+ secretKeyManual = true;
42265
42273
  p4.log.warn("GURULU_SECRET_KEY atlandı (login token workspace sk_ anahtarı değil). Dashboard → Settings → API Keys'ten server key oluşturup .env'e elle ekle.");
42266
42274
  }
42267
42275
  }
@@ -42412,6 +42420,9 @@ ${captureGuide(approvedEvents, identifyHint, isNode)}`);
42412
42420
  if (agentNative.docWritten)
42413
42421
  lines.push("✓ GURULU_IMPLEMENTATION.md (AI-agent handoff)");
42414
42422
  }
42423
+ if (secretKeyManual) {
42424
+ lines.push("⚠ GURULU_SECRET_KEY elle gir (Dashboard → Settings → API Keys → sk_ server key)");
42425
+ }
42415
42426
  if (checkpoint && (installed || wiredCount > 0)) {
42416
42427
  const hint = checkpoint.recoveryHint();
42417
42428
  if (hint)
@@ -42925,7 +42936,7 @@ var uninstallCmd = defineCommand({
42925
42936
  });
42926
42937
 
42927
42938
  // src/index.ts
42928
- var VERSION = "1.5.3";
42939
+ var VERSION = "1.5.4";
42929
42940
  var mainCmd = defineCommand({
42930
42941
  meta: {
42931
42942
  name: "gurulu",
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export declare const VERSION = "1.5.3";
1
+ export declare const VERSION = "1.5.4";
2
2
  declare const mainCmd: import("citty").CommandDef<{
3
3
  workspace: {
4
4
  type: "string";
package/dist/index.js CHANGED
@@ -40272,8 +40272,8 @@ function snippetWeb(workspaceKey, jsError = false) {
40272
40272
  return `import gurulu from '@gurulu/web';
40273
40273
 
40274
40274
  gurulu.init({
40275
- workspaceKey: process.env.NEXT_PUBLIC_GURULU_WORKSPACE ?? '${workspaceKey}',
40276
- endpoint: process.env.NEXT_PUBLIC_GURULU_ENDPOINT, // optional, defaults to https://ingest.gurulu.io${autocaptureLine(jsError, " ")}
40275
+ workspaceKey: process.env.VITE_GURULU_WORKSPACE ?? '${workspaceKey}',
40276
+ endpoint: process.env.VITE_GURULU_ENDPOINT, // optional, defaults to https://ingest.gurulu.io${autocaptureLine(jsError, " ")}
40277
40277
  });`;
40278
40278
  }
40279
40279
  function snippetNext(workspaceKey, jsError = false) {
@@ -41243,8 +41243,9 @@ async function runFeatures(client, detected, opts) {
41243
41243
  try {
41244
41244
  await client.post("/features/register", { features: selectedKeys });
41245
41245
  s2.stop(c3.neon(`✓ ${selected.length} özellik kuruldu`));
41246
- } catch {
41247
- s2.stop("Özellik kurulumu atlandı (gateway hatası) sonra: gurulu doctor", 1);
41246
+ } catch (err) {
41247
+ const detail = err && typeof err === "object" && "status" in err ? `${err.status} ${err.message ?? ""}`.trim() : err instanceof Error ? err.message : String(err);
41248
+ s2.stop(`Özellik kurulumu atlandı (${detail}) — sonra: gurulu doctor`, 1);
41248
41249
  return { selected, registered: false };
41249
41250
  }
41250
41251
  p2.note(selected.map((f3) => `${c3.bold(f3.label)}
@@ -41756,7 +41757,12 @@ async function runWizard(opts) {
41756
41757
  let identifyHint = null;
41757
41758
  if (!opts.noAi && authed && detected.hasPackageJson) {
41758
41759
  const ctx = gatherContext({ cwd: opts.cwd });
41759
- const aiPlan = await fetchPlan(client, ctx, { framework });
41760
+ let sector;
41761
+ try {
41762
+ const ws = (await client.listWorkspaces()).workspaces.find((w2) => w2.workspace_id === workspaceId);
41763
+ sector = ws?.sector_pack ?? undefined;
41764
+ } catch {}
41765
+ const aiPlan = await fetchPlan(client, ctx, { framework, ...sector ? { sector } : {} });
41760
41766
  if (aiPlan) {
41761
41767
  identifyHint = aiPlan.identify_hint;
41762
41768
  const approved = opts.yes ? aiPlan.events : await renderPlan(aiPlan);
@@ -41832,6 +41838,7 @@ async function runWizard(opts) {
41832
41838
  }
41833
41839
  const envFile = isNode ? ".env" : ".env.local";
41834
41840
  const vars = [];
41841
+ let secretKeyManual = false;
41835
41842
  for (const k2 of plan.envKeys) {
41836
41843
  if (k2.key.endsWith("_WORKSPACE")) {
41837
41844
  vars.push({ key: k2.key, value: writeKey });
@@ -41839,6 +41846,7 @@ async function runWizard(opts) {
41839
41846
  if (auth.apiKey.startsWith("sk_")) {
41840
41847
  vars.push({ key: k2.key, value: auth.apiKey });
41841
41848
  } else {
41849
+ secretKeyManual = true;
41842
41850
  p4.log.warn("GURULU_SECRET_KEY atlandı (login token workspace sk_ anahtarı değil). Dashboard → Settings → API Keys'ten server key oluşturup .env'e elle ekle.");
41843
41851
  }
41844
41852
  }
@@ -41989,6 +41997,9 @@ ${captureGuide(approvedEvents, identifyHint, isNode)}`);
41989
41997
  if (agentNative.docWritten)
41990
41998
  lines.push("✓ GURULU_IMPLEMENTATION.md (AI-agent handoff)");
41991
41999
  }
42000
+ if (secretKeyManual) {
42001
+ lines.push("⚠ GURULU_SECRET_KEY elle gir (Dashboard → Settings → API Keys → sk_ server key)");
42002
+ }
41992
42003
  if (checkpoint && (installed || wiredCount > 0)) {
41993
42004
  const hint = checkpoint.recoveryHint();
41994
42005
  if (hint)
@@ -42502,7 +42513,7 @@ var uninstallCmd = defineCommand({
42502
42513
  });
42503
42514
 
42504
42515
  // src/index.ts
42505
- var VERSION = "1.5.3";
42516
+ var VERSION = "1.5.4";
42506
42517
  var mainCmd = defineCommand({
42507
42518
  meta: {
42508
42519
  name: "gurulu",
@@ -1 +1 @@
1
- {"version":3,"file":"install-plan.d.ts","sourceRoot":"","sources":["../../src/lib/install-plan.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE9E,MAAM,MAAM,UAAU,GAAG,aAAa,GAAG,cAAc,CAAC;AAExD,MAAM,WAAW,kBAAkB;IACjC,iEAAiE;IACjE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0CAA0C;IAC1C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kDAAkD;IAClD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,UAAU,CAAC;IAChB,cAAc,EAAE,cAAc,CAAC;IAC/B,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,KAAK,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IACpE,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,SAAS,CAAC;CACtB;AAqND;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAIrD;AAID,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,uFAAuF;AACvF,wBAAgB,cAAc,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,EAAE,QAAQ,EAAE,MAAM,GAAG,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Q,EAAE,QAAQ,GAAG,IAAI,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS,CA0BrF;AAED,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,eAAe,EACzB,GAAG,GAAE,kBAAuB,GAC3B,WAAW,CAiBb"}
@@ -31,8 +31,8 @@ function snippetWeb(workspaceKey, jsError = false) {
31
31
  return `import gurulu from '@gurulu/web';
32
32
 
33
33
  gurulu.init({
34
- workspaceKey: process.env.NEXT_PUBLIC_GURULU_WORKSPACE ?? '${workspaceKey}',
35
- endpoint: process.env.NEXT_PUBLIC_GURULU_ENDPOINT, // optional, defaults to https://ingest.gurulu.io${autocaptureLine(jsError, " ")}
34
+ workspaceKey: process.env.VITE_GURULU_WORKSPACE ?? '${workspaceKey}',
35
+ endpoint: process.env.VITE_GURULU_ENDPOINT, // optional, defaults to https://ingest.gurulu.io${autocaptureLine(jsError, " ")}
36
36
  });`;
37
37
  }
38
38
  function snippetNext(workspaceKey, jsError = false) {
@@ -1 +1 @@
1
- {"version":3,"file":"features.d.ts","sourceRoot":"","sources":["../../src/wizard/features.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,KAAK,eAAe,EAAoB,MAAM,kBAAkB,CAAC;AAG1E,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,SAAS,GAAG,KAAK,GAAG,YAAY,CAAC;AAEpE,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,UAAU,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,+BAA+B;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,4DAA4D;IAC5D,UAAU,EAAE,MAAM,CAAC;IACnB,2BAA2B;IAC3B,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,2CAA2C;AAC3C,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,eAAe,GAAG,aAAa,EAAE,CAwD5E;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,UAAU,EAAE,OAAO,CAAC;CACrB;AAED;;;GAGG;AACH,wBAAsB,WAAW,CAC/B,MAAM,EAAE,SAAS,EACjB,QAAQ,EAAE,eAAe,EACzB,IAAI,EAAE;IAAE,GAAG,CAAC,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAE,GACvC,OAAO,CAAC,cAAc,CAAC,CAqCzB"}
1
+ {"version":3,"file":"features.d.ts","sourceRoot":"","sources":["../../src/wizard/features.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,KAAK,eAAe,EAAoB,MAAM,kBAAkB,CAAC;AAG1E,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,SAAS,GAAG,KAAK,GAAG,YAAY,CAAC;AAEpE,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,UAAU,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,+BAA+B;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,4DAA4D;IAC5D,UAAU,EAAE,MAAM,CAAC;IACnB,2BAA2B;IAC3B,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,2CAA2C;AAC3C,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,eAAe,GAAG,aAAa,EAAE,CAwD5E;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,UAAU,EAAE,OAAO,CAAC;CACrB;AAED;;;GAGG;AACH,wBAAsB,WAAW,CAC/B,MAAM,EAAE,SAAS,EACjB,QAAQ,EAAE,eAAe,EACzB,IAAI,EAAE;IAAE,GAAG,CAAC,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAE,GACvC,OAAO,CAAC,cAAc,CAAC,CA6CzB"}
@@ -1 +1 @@
1
- {"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/wizard/run.ts"],"names":[],"mappings":"AAqCA,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,0DAA0D;IAC1D,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,4CAA4C;IAC5C,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,sFAAsF;IACtF,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AA6BD,wBAAsB,SAAS,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAkalE"}
1
+ {"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/wizard/run.ts"],"names":[],"mappings":"AAqCA,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,0DAA0D;IAC1D,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,4CAA4C;IAC5C,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,sFAAsF;IACtF,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AA6BD,wBAAsB,SAAS,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAkblE"}
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@gurulu/cli",
3
- "version": "1.5.3",
3
+ "version": "1.5.5",
4
4
  "private": false,
5
5
  "license": "BUSL-1.1",
6
6
  "publishConfig": {
7
7
  "access": "public"
8
8
  },
9
9
  "type": "module",
10
- "description": "Gurulu CLI. init / pull / push / validate / doctor \u2014 registry as code, local schema sync.",
10
+ "description": "Gurulu CLI. init / pull / push / validate / doctor registry as code, local schema sync.",
11
11
  "homepage": "https://gurulu.io",
12
12
  "repository": {
13
13
  "type": "git",