@gurulu/cli 1.1.0 → 1.2.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/dist/bin.js CHANGED
@@ -26656,42 +26656,46 @@ function writeProjectScaffold(cwd, opts) {
26656
26656
  }
26657
26657
 
26658
26658
  // src/commands/init.ts
26659
+ var wizardArgs = {
26660
+ workspace: { type: "string", description: "Workspace ID (uuid) — non-interaktif" },
26661
+ "write-key": { type: "string", description: "Workspace write key (pk_xxx) — non-interaktif" },
26662
+ "api-key": { type: "string", description: "sk_xxx workspace key (CI auth)" },
26663
+ endpoint: { type: "string", description: "API endpoint", default: DEFAULT_ENDPOINT },
26664
+ framework: { type: "string", description: "Framework override (auto-detect yerine)" },
26665
+ install: { type: "boolean", description: "SDK install (--no-install ile atla)", default: true },
26666
+ pull: { type: "boolean", description: "İlk registry pull (--no-pull ile atla)", default: true },
26667
+ ai: { type: "boolean", description: "AI Plan/wire fazı (--no-ai ile atla → floor)", default: true },
26668
+ yes: { type: "boolean", description: "Onayları otomatik geç" },
26669
+ ci: { type: "boolean", description: "Non-interaktif (api-key + workspace zorunlu)" }
26670
+ };
26671
+ async function runWizardFromArgs(args) {
26672
+ const opts = {
26673
+ cwd: process.cwd(),
26674
+ noInstall: args.install === false,
26675
+ noPull: args.pull === false,
26676
+ noAi: args.ai === false,
26677
+ yes: Boolean(args.yes) || Boolean(args.ci),
26678
+ ...args.endpoint ? { endpoint: String(args.endpoint) } : {},
26679
+ ...args.workspace ? { workspaceId: String(args.workspace) } : {},
26680
+ ...args["write-key"] ? { writeKey: String(args["write-key"]) } : {},
26681
+ ...args["api-key"] ? { apiKey: String(args["api-key"]) } : {},
26682
+ ...args.framework ? { framework: String(args.framework) } : {}
26683
+ };
26684
+ try {
26685
+ await runWizard(opts);
26686
+ } catch (err) {
26687
+ console.error(`[gurulu] kurulum başarısız: ${err instanceof Error ? err.message : String(err)}`);
26688
+ process.exit(1);
26689
+ }
26690
+ }
26659
26691
  var initCmd = defineCommand({
26660
26692
  meta: {
26661
26693
  name: "init",
26662
26694
  description: "Otonom kurulum sihirbazı (auth → workspace → install → wire)"
26663
26695
  },
26664
- args: {
26665
- workspace: { type: "string", description: "Workspace ID (uuid) — non-interaktif" },
26666
- "write-key": { type: "string", description: "Workspace write key (pk_xxx) — non-interaktif" },
26667
- "api-key": { type: "string", description: "sk_xxx workspace key (CI auth)" },
26668
- endpoint: { type: "string", description: "API endpoint", default: DEFAULT_ENDPOINT },
26669
- framework: { type: "string", description: "Framework override (auto-detect yerine)" },
26670
- install: { type: "boolean", description: "SDK install (--no-install ile atla)", default: true },
26671
- pull: { type: "boolean", description: "İlk registry pull (--no-pull ile atla)", default: true },
26672
- ai: { type: "boolean", description: "AI Plan/wire fazı (--no-ai ile atla → floor)", default: true },
26673
- yes: { type: "boolean", description: "Onayları otomatik geç" },
26674
- ci: { type: "boolean", description: "Non-interaktif (api-key + workspace zorunlu)" }
26675
- },
26696
+ args: wizardArgs,
26676
26697
  async run({ args }) {
26677
- const opts = {
26678
- cwd: process.cwd(),
26679
- noInstall: args.install === false,
26680
- noPull: args.pull === false,
26681
- noAi: args.ai === false,
26682
- yes: Boolean(args.yes) || Boolean(args.ci),
26683
- ...args.endpoint ? { endpoint: String(args.endpoint) } : {},
26684
- ...args.workspace ? { workspaceId: String(args.workspace) } : {},
26685
- ...args["write-key"] ? { writeKey: String(args["write-key"]) } : {},
26686
- ...args["api-key"] ? { apiKey: String(args["api-key"]) } : {},
26687
- ...args.framework ? { framework: String(args.framework) } : {}
26688
- };
26689
- try {
26690
- await runWizard(opts);
26691
- } catch (err) {
26692
- console.error(`[gurulu] kurulum başarısız: ${err instanceof Error ? err.message : String(err)}`);
26693
- process.exit(1);
26694
- }
26698
+ await runWizardFromArgs(args);
26695
26699
  }
26696
26700
  });
26697
26701
 
@@ -26988,13 +26992,14 @@ var uninstallCmd = defineCommand({
26988
26992
  });
26989
26993
 
26990
26994
  // src/index.ts
26991
- var VERSION = "1.1.0";
26995
+ var VERSION = "1.2.0";
26992
26996
  var mainCmd = defineCommand({
26993
26997
  meta: {
26994
26998
  name: "gurulu",
26995
26999
  description: "Gurulu CLI — Truth Layer for product analytics. Registry-as-code, typed events.",
26996
27000
  version: VERSION
26997
27001
  },
27002
+ args: wizardArgs,
26998
27003
  subCommands: {
26999
27004
  init: initCmd,
27000
27005
  pull: pullCmd,
@@ -27007,6 +27012,11 @@ var mainCmd = defineCommand({
27007
27012
  whoami: whoamiCmd,
27008
27013
  mcp: mcpCmd,
27009
27014
  uninstall: uninstallCmd
27015
+ },
27016
+ async run({ args }) {
27017
+ if (args._.length > 0)
27018
+ return;
27019
+ await runWizardFromArgs(args);
27010
27020
  }
27011
27021
  });
27012
27022
  var src_default = mainCmd;
@@ -1,3 +1,50 @@
1
+ export declare const wizardArgs: {
2
+ workspace: {
3
+ type: "string";
4
+ description: string;
5
+ };
6
+ 'write-key': {
7
+ type: "string";
8
+ description: string;
9
+ };
10
+ 'api-key': {
11
+ type: "string";
12
+ description: string;
13
+ };
14
+ endpoint: {
15
+ type: "string";
16
+ description: string;
17
+ default: string;
18
+ };
19
+ framework: {
20
+ type: "string";
21
+ description: string;
22
+ };
23
+ install: {
24
+ type: "boolean";
25
+ description: string;
26
+ default: true;
27
+ };
28
+ pull: {
29
+ type: "boolean";
30
+ description: string;
31
+ default: true;
32
+ };
33
+ ai: {
34
+ type: "boolean";
35
+ description: string;
36
+ default: true;
37
+ };
38
+ yes: {
39
+ type: "boolean";
40
+ description: string;
41
+ };
42
+ ci: {
43
+ type: "boolean";
44
+ description: string;
45
+ };
46
+ };
47
+ export declare function runWizardFromArgs(args: Record<string, unknown>): Promise<void>;
1
48
  export declare const initCmd: import("citty").CommandDef<{
2
49
  workspace: {
3
50
  type: "string";
@@ -1 +1 @@
1
- {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqClB,CAAC"}
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAWJ,CAAC;AAIpB,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAmBpF;AAED,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EASlB,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,4 +1,49 @@
1
- export declare const VERSION = "1.1.0";
2
- declare const mainCmd: import("citty").CommandDef<import("citty").ArgsDef>;
1
+ export declare const VERSION = "1.2.0";
2
+ declare const mainCmd: import("citty").CommandDef<{
3
+ workspace: {
4
+ type: "string";
5
+ description: string;
6
+ };
7
+ 'write-key': {
8
+ type: "string";
9
+ description: string;
10
+ };
11
+ 'api-key': {
12
+ type: "string";
13
+ description: string;
14
+ };
15
+ endpoint: {
16
+ type: "string";
17
+ description: string;
18
+ default: string;
19
+ };
20
+ framework: {
21
+ type: "string";
22
+ description: string;
23
+ };
24
+ install: {
25
+ type: "boolean";
26
+ description: string;
27
+ default: true;
28
+ };
29
+ pull: {
30
+ type: "boolean";
31
+ description: string;
32
+ default: true;
33
+ };
34
+ ai: {
35
+ type: "boolean";
36
+ description: string;
37
+ default: true;
38
+ };
39
+ yes: {
40
+ type: "boolean";
41
+ description: string;
42
+ };
43
+ ci: {
44
+ type: "boolean";
45
+ description: string;
46
+ };
47
+ }>;
3
48
  export default mainCmd;
4
49
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AA0BA,eAAO,MAAM,OAAO,UAAU,CAAC;AAE/B,QAAA,MAAM,OAAO,qDAmBX,CAAC;AAEH,eAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AA0BA,eAAO,MAAM,OAAO,UAAU,CAAC;AAE/B,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4BX,CAAC;AAEH,eAAe,OAAO,CAAC"}
package/dist/index.js CHANGED
@@ -26233,42 +26233,46 @@ function writeProjectScaffold(cwd, opts) {
26233
26233
  }
26234
26234
 
26235
26235
  // src/commands/init.ts
26236
+ var wizardArgs = {
26237
+ workspace: { type: "string", description: "Workspace ID (uuid) — non-interaktif" },
26238
+ "write-key": { type: "string", description: "Workspace write key (pk_xxx) — non-interaktif" },
26239
+ "api-key": { type: "string", description: "sk_xxx workspace key (CI auth)" },
26240
+ endpoint: { type: "string", description: "API endpoint", default: DEFAULT_ENDPOINT },
26241
+ framework: { type: "string", description: "Framework override (auto-detect yerine)" },
26242
+ install: { type: "boolean", description: "SDK install (--no-install ile atla)", default: true },
26243
+ pull: { type: "boolean", description: "İlk registry pull (--no-pull ile atla)", default: true },
26244
+ ai: { type: "boolean", description: "AI Plan/wire fazı (--no-ai ile atla → floor)", default: true },
26245
+ yes: { type: "boolean", description: "Onayları otomatik geç" },
26246
+ ci: { type: "boolean", description: "Non-interaktif (api-key + workspace zorunlu)" }
26247
+ };
26248
+ async function runWizardFromArgs(args) {
26249
+ const opts = {
26250
+ cwd: process.cwd(),
26251
+ noInstall: args.install === false,
26252
+ noPull: args.pull === false,
26253
+ noAi: args.ai === false,
26254
+ yes: Boolean(args.yes) || Boolean(args.ci),
26255
+ ...args.endpoint ? { endpoint: String(args.endpoint) } : {},
26256
+ ...args.workspace ? { workspaceId: String(args.workspace) } : {},
26257
+ ...args["write-key"] ? { writeKey: String(args["write-key"]) } : {},
26258
+ ...args["api-key"] ? { apiKey: String(args["api-key"]) } : {},
26259
+ ...args.framework ? { framework: String(args.framework) } : {}
26260
+ };
26261
+ try {
26262
+ await runWizard(opts);
26263
+ } catch (err) {
26264
+ console.error(`[gurulu] kurulum başarısız: ${err instanceof Error ? err.message : String(err)}`);
26265
+ process.exit(1);
26266
+ }
26267
+ }
26236
26268
  var initCmd = defineCommand({
26237
26269
  meta: {
26238
26270
  name: "init",
26239
26271
  description: "Otonom kurulum sihirbazı (auth → workspace → install → wire)"
26240
26272
  },
26241
- args: {
26242
- workspace: { type: "string", description: "Workspace ID (uuid) — non-interaktif" },
26243
- "write-key": { type: "string", description: "Workspace write key (pk_xxx) — non-interaktif" },
26244
- "api-key": { type: "string", description: "sk_xxx workspace key (CI auth)" },
26245
- endpoint: { type: "string", description: "API endpoint", default: DEFAULT_ENDPOINT },
26246
- framework: { type: "string", description: "Framework override (auto-detect yerine)" },
26247
- install: { type: "boolean", description: "SDK install (--no-install ile atla)", default: true },
26248
- pull: { type: "boolean", description: "İlk registry pull (--no-pull ile atla)", default: true },
26249
- ai: { type: "boolean", description: "AI Plan/wire fazı (--no-ai ile atla → floor)", default: true },
26250
- yes: { type: "boolean", description: "Onayları otomatik geç" },
26251
- ci: { type: "boolean", description: "Non-interaktif (api-key + workspace zorunlu)" }
26252
- },
26273
+ args: wizardArgs,
26253
26274
  async run({ args }) {
26254
- const opts = {
26255
- cwd: process.cwd(),
26256
- noInstall: args.install === false,
26257
- noPull: args.pull === false,
26258
- noAi: args.ai === false,
26259
- yes: Boolean(args.yes) || Boolean(args.ci),
26260
- ...args.endpoint ? { endpoint: String(args.endpoint) } : {},
26261
- ...args.workspace ? { workspaceId: String(args.workspace) } : {},
26262
- ...args["write-key"] ? { writeKey: String(args["write-key"]) } : {},
26263
- ...args["api-key"] ? { apiKey: String(args["api-key"]) } : {},
26264
- ...args.framework ? { framework: String(args.framework) } : {}
26265
- };
26266
- try {
26267
- await runWizard(opts);
26268
- } catch (err) {
26269
- console.error(`[gurulu] kurulum başarısız: ${err instanceof Error ? err.message : String(err)}`);
26270
- process.exit(1);
26271
- }
26275
+ await runWizardFromArgs(args);
26272
26276
  }
26273
26277
  });
26274
26278
 
@@ -26565,13 +26569,14 @@ var uninstallCmd = defineCommand({
26565
26569
  });
26566
26570
 
26567
26571
  // src/index.ts
26568
- var VERSION = "1.1.0";
26572
+ var VERSION = "1.2.0";
26569
26573
  var mainCmd = defineCommand({
26570
26574
  meta: {
26571
26575
  name: "gurulu",
26572
26576
  description: "Gurulu CLI — Truth Layer for product analytics. Registry-as-code, typed events.",
26573
26577
  version: VERSION
26574
26578
  },
26579
+ args: wizardArgs,
26575
26580
  subCommands: {
26576
26581
  init: initCmd,
26577
26582
  pull: pullCmd,
@@ -26584,6 +26589,11 @@ var mainCmd = defineCommand({
26584
26589
  whoami: whoamiCmd,
26585
26590
  mcp: mcpCmd,
26586
26591
  uninstall: uninstallCmd
26592
+ },
26593
+ async run({ args }) {
26594
+ if (args._.length > 0)
26595
+ return;
26596
+ await runWizardFromArgs(args);
26587
26597
  }
26588
26598
  });
26589
26599
  var src_default = mainCmd;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gurulu/cli",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "private": false,
5
5
  "license": "BUSL-1.1",
6
6
  "publishConfig": {