@gurulu/cli 0.4.7 → 1.0.1

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.
Files changed (190) hide show
  1. package/LICENSE +92 -0
  2. package/README.md +35 -106
  3. package/dist/bin.d.ts +3 -0
  4. package/dist/bin.d.ts.map +1 -0
  5. package/dist/bin.js +25751 -0
  6. package/dist/commands/auth.d.ts +23 -20
  7. package/dist/commands/auth.d.ts.map +1 -0
  8. package/dist/commands/doctor.d.ts +20 -6
  9. package/dist/commands/doctor.d.ts.map +1 -0
  10. package/dist/commands/init.d.ts +33 -11
  11. package/dist/commands/init.d.ts.map +1 -0
  12. package/dist/commands/pull.d.ts +13 -0
  13. package/dist/commands/pull.d.ts.map +1 -0
  14. package/dist/commands/push.d.ts +40 -0
  15. package/dist/commands/push.d.ts.map +1 -0
  16. package/dist/commands/validate.d.ts +36 -0
  17. package/dist/commands/validate.d.ts.map +1 -0
  18. package/dist/index.d.ts +4 -1
  19. package/dist/index.d.ts.map +1 -0
  20. package/dist/index.js +25326 -876
  21. package/dist/lib/api.d.ts +139 -0
  22. package/dist/lib/api.d.ts.map +1 -0
  23. package/dist/lib/codegen.d.ts +4 -0
  24. package/dist/lib/codegen.d.ts.map +1 -0
  25. package/dist/lib/config.d.ts +43 -0
  26. package/dist/lib/config.d.ts.map +1 -0
  27. package/dist/lib/detect.d.ts +27 -0
  28. package/dist/lib/detect.d.ts.map +1 -0
  29. package/dist/lib/detect.js +106 -0
  30. package/dist/lib/exec-install.d.ts +21 -0
  31. package/dist/lib/exec-install.d.ts.map +1 -0
  32. package/dist/lib/install-plan.d.ts +25 -0
  33. package/dist/lib/install-plan.d.ts.map +1 -0
  34. package/dist/lib/install-plan.js +161 -0
  35. package/package.json +51 -20
  36. package/bin/gurulu.js +0 -2
  37. package/dist/api-client.d.ts +0 -33
  38. package/dist/api-client.js +0 -175
  39. package/dist/commands/add-server.d.ts +0 -9
  40. package/dist/commands/add-server.js +0 -162
  41. package/dist/commands/alerts.d.ts +0 -27
  42. package/dist/commands/alerts.js +0 -309
  43. package/dist/commands/api-keys.d.ts +0 -20
  44. package/dist/commands/api-keys.js +0 -130
  45. package/dist/commands/attribution.d.ts +0 -22
  46. package/dist/commands/attribution.js +0 -111
  47. package/dist/commands/audiences.d.ts +0 -23
  48. package/dist/commands/audiences.js +0 -243
  49. package/dist/commands/audit.d.ts +0 -20
  50. package/dist/commands/audit.js +0 -130
  51. package/dist/commands/auth.js +0 -249
  52. package/dist/commands/chat.d.ts +0 -19
  53. package/dist/commands/chat.js +0 -118
  54. package/dist/commands/config.d.ts +0 -10
  55. package/dist/commands/config.js +0 -92
  56. package/dist/commands/consent.d.ts +0 -27
  57. package/dist/commands/consent.js +0 -233
  58. package/dist/commands/conversion-paths.d.ts +0 -19
  59. package/dist/commands/conversion-paths.js +0 -55
  60. package/dist/commands/db.d.ts +0 -25
  61. package/dist/commands/db.js +0 -330
  62. package/dist/commands/destinations.d.ts +0 -20
  63. package/dist/commands/destinations.js +0 -191
  64. package/dist/commands/doctor.js +0 -360
  65. package/dist/commands/errors.d.ts +0 -27
  66. package/dist/commands/errors.js +0 -121
  67. package/dist/commands/events.d.ts +0 -33
  68. package/dist/commands/events.js +0 -371
  69. package/dist/commands/experiments.d.ts +0 -22
  70. package/dist/commands/experiments.js +0 -264
  71. package/dist/commands/funnels.d.ts +0 -17
  72. package/dist/commands/funnels.js +0 -203
  73. package/dist/commands/goals.d.ts +0 -18
  74. package/dist/commands/goals.js +0 -214
  75. package/dist/commands/heatmap.d.ts +0 -27
  76. package/dist/commands/heatmap.js +0 -112
  77. package/dist/commands/identity.d.ts +0 -29
  78. package/dist/commands/identity.js +0 -328
  79. package/dist/commands/init.js +0 -215
  80. package/dist/commands/insights.d.ts +0 -10
  81. package/dist/commands/insights.js +0 -77
  82. package/dist/commands/install.d.ts +0 -259
  83. package/dist/commands/install.js +0 -1590
  84. package/dist/commands/login.d.ts +0 -20
  85. package/dist/commands/login.js +0 -170
  86. package/dist/commands/logout.d.ts +0 -10
  87. package/dist/commands/logout.js +0 -41
  88. package/dist/commands/playground.d.ts +0 -11
  89. package/dist/commands/playground.js +0 -47
  90. package/dist/commands/releases.d.ts +0 -17
  91. package/dist/commands/releases.js +0 -54
  92. package/dist/commands/replay.d.ts +0 -18
  93. package/dist/commands/replay.js +0 -64
  94. package/dist/commands/secrets.d.ts +0 -19
  95. package/dist/commands/secrets.js +0 -145
  96. package/dist/commands/setup.d.ts +0 -21
  97. package/dist/commands/setup.js +0 -67
  98. package/dist/commands/sites.d.ts +0 -18
  99. package/dist/commands/sites.js +0 -139
  100. package/dist/commands/skad.d.ts +0 -18
  101. package/dist/commands/skad.js +0 -53
  102. package/dist/commands/sourcemap.d.ts +0 -33
  103. package/dist/commands/sourcemap.js +0 -204
  104. package/dist/commands/status.d.ts +0 -7
  105. package/dist/commands/status.js +0 -136
  106. package/dist/commands/upgrade.d.ts +0 -21
  107. package/dist/commands/upgrade.js +0 -183
  108. package/dist/commands/warehouse.d.ts +0 -20
  109. package/dist/commands/warehouse.js +0 -65
  110. package/dist/commands/warehouses.d.ts +0 -17
  111. package/dist/commands/warehouses.js +0 -182
  112. package/dist/commands/watch.d.ts +0 -45
  113. package/dist/commands/watch.js +0 -258
  114. package/dist/commands/whoami.d.ts +0 -9
  115. package/dist/commands/whoami.js +0 -50
  116. package/dist/config.d.ts +0 -75
  117. package/dist/config.js +0 -329
  118. package/dist/frameworks/detect.d.ts +0 -8
  119. package/dist/frameworks/detect.js +0 -458
  120. package/dist/install-intent-proposal.d.ts +0 -99
  121. package/dist/install-intent-proposal.js +0 -202
  122. package/dist/utils/api.d.ts +0 -20
  123. package/dist/utils/api.js +0 -47
  124. package/dist/utils/config.d.ts +0 -13
  125. package/dist/utils/config.js +0 -30
  126. package/dist/utils/confirm.d.ts +0 -17
  127. package/dist/utils/confirm.js +0 -40
  128. package/dist/utils/dry-run.d.ts +0 -20
  129. package/dist/utils/dry-run.js +0 -67
  130. package/dist/utils/from-file.d.ts +0 -9
  131. package/dist/utils/from-file.js +0 -72
  132. package/dist/utils/redact.d.ts +0 -14
  133. package/dist/utils/redact.js +0 -48
  134. package/dist/utils/ui.d.ts +0 -14
  135. package/dist/utils/ui.js +0 -59
  136. package/scripts/.gitkeep +0 -0
  137. package/scripts/README-gurulu-agentic-install.md +0 -114
  138. package/scripts/README-gurulu-scan.md +0 -98
  139. package/scripts/audit-cli-scopes.mjs +0 -204
  140. package/scripts/backfill-tenant-id.mjs +0 -172
  141. package/scripts/backfill-tenant-links.ts +0 -252
  142. package/scripts/backup-clickhouse.sh +0 -27
  143. package/scripts/backup-postgres.sh +0 -19
  144. package/scripts/bootstrap-runtime-schema.mjs +0 -87
  145. package/scripts/bootstrap-stripe.mjs +0 -158
  146. package/scripts/gurulu-agentic-install.lib.cjs +0 -762
  147. package/scripts/gurulu-agentic-install.mjs +0 -623
  148. package/scripts/gurulu-scan.lib.cjs +0 -1509
  149. package/scripts/gurulu-scan.mjs +0 -91
  150. package/scripts/gurulu-verify-install.lib.cjs +0 -334
  151. package/scripts/gurulu-verify-install.mjs +0 -59
  152. package/scripts/init-ssl.sh +0 -26
  153. package/scripts/migrate-flow-graph-enums.sh +0 -86
  154. package/scripts/monitor-disk.sh +0 -24
  155. package/scripts/patches/astro.patch.cjs +0 -74
  156. package/scripts/patches/auto-instrument/ast-helper.cjs +0 -480
  157. package/scripts/patches/auto-instrument/astro.cjs +0 -273
  158. package/scripts/patches/auto-instrument/express.cjs +0 -383
  159. package/scripts/patches/auto-instrument/fastify.cjs +0 -262
  160. package/scripts/patches/auto-instrument/hono.cjs +0 -392
  161. package/scripts/patches/auto-instrument/index.cjs +0 -80
  162. package/scripts/patches/auto-instrument/nestjs.cjs +0 -286
  163. package/scripts/patches/auto-instrument/nextjs-app-router.cjs +0 -345
  164. package/scripts/patches/auto-instrument/nextjs-pages.cjs +0 -361
  165. package/scripts/patches/auto-instrument/remix.cjs +0 -168
  166. package/scripts/patches/auto-instrument/sdk-helper-map.cjs +0 -241
  167. package/scripts/patches/auto-instrument/singleton-helper.cjs +0 -193
  168. package/scripts/patches/auto-instrument/sveltekit.cjs +0 -161
  169. package/scripts/patches/auto-instrument/vite-react.cjs +0 -37
  170. package/scripts/patches/auto-instrument/vue.cjs +0 -196
  171. package/scripts/patches/express.patch.cjs +0 -99
  172. package/scripts/patches/fastify.patch.cjs +0 -108
  173. package/scripts/patches/index.cjs +0 -300
  174. package/scripts/patches/nestjs.patch.cjs +0 -112
  175. package/scripts/patches/nextjs-app-router.patch.cjs +0 -97
  176. package/scripts/patches/nextjs-pages.patch.cjs +0 -97
  177. package/scripts/patches/remix.patch.cjs +0 -75
  178. package/scripts/patches/sveltekit.patch.cjs +0 -72
  179. package/scripts/patches/vite-react.patch.cjs +0 -73
  180. package/scripts/patches/vue.patch.cjs +0 -82
  181. package/scripts/renew-ssl.sh +0 -14
  182. package/scripts/resolve-migration.sh +0 -23
  183. package/scripts/seed-cli-dev-keys.mjs +0 -130
  184. package/scripts/seed-test-data.mjs +0 -391
  185. package/scripts/spike-browserless.ts +0 -65
  186. package/scripts/tenant-pivot-consistency-check.mjs +0 -205
  187. package/scripts/tenant-pivot-phase-3-cleanup.lib.cjs +0 -258
  188. package/scripts/tenant-pivot-phase-3-cleanup.mjs +0 -98
  189. package/scripts/test-identity-resolution.ts +0 -804
  190. package/scripts/validate-gurulu-schemas.mjs +0 -79
@@ -1,20 +1,23 @@
1
- /**
2
- * Phase 18.6 — `gurulu auth` device-link command.
3
- *
4
- * Implements the client side of the OAuth 2.0 device authorization grant
5
- * against `/api/cli/device-link/{start,poll}`. The user-facing flow:
6
- * 1. POST /start with deviceType=cli + hostname as deviceLabel
7
- * 2. Print the pairing code + verify URL, try to auto-open the browser
8
- * 3. Poll /poll every pollIntervalMs until approved / denied / expired
9
- * 4. On approval, persist the returned secret key into the local profile
10
- *
11
- * Backward compat: if the user passes `--key gsk_...` (or `--email` +
12
- * `--secret-key`), we delegate to the existing `loginCommand` verbatim so
13
- * the legacy manual flow is unchanged.
14
- */
15
- import { type LoginArgs } from './login';
16
- export interface AuthArgs extends LoginArgs {
17
- key?: string;
18
- noBrowser?: boolean;
19
- }
20
- export declare function authCommand(args: AuthArgs): Promise<void>;
1
+ export declare const loginCmd: import("citty").CommandDef<{
2
+ endpoint: {
3
+ type: "string";
4
+ description: string;
5
+ default: string;
6
+ };
7
+ 'api-key': {
8
+ type: "string";
9
+ description: string;
10
+ };
11
+ workspace: {
12
+ type: "string";
13
+ description: string;
14
+ };
15
+ }>;
16
+ export declare const logoutCmd: import("citty").CommandDef<{
17
+ workspace: {
18
+ type: "string";
19
+ description: string;
20
+ };
21
+ }>;
22
+ export declare const whoamiCmd: import("citty").CommandDef<import("citty").ArgsDef>;
23
+ //# sourceMappingURL=auth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/commands/auth.ts"],"names":[],"mappings":"AA+BA,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;EAqGnB,CAAC;AAEH,eAAO,MAAM,SAAS;;;;;EAoBpB,CAAC;AAEH,eAAO,MAAM,SAAS,qDAkCpB,CAAC"}
@@ -1,7 +1,21 @@
1
- interface DoctorArgs {
2
- site?: string;
3
- json?: boolean;
4
- profile?: string;
1
+ export interface DoctorCheck {
2
+ name: string;
3
+ status: 'pass' | 'warn' | 'fail' | 'skip';
4
+ message: string;
5
+ detail?: Record<string, unknown>;
5
6
  }
6
- export declare function doctorCommand(args: DoctorArgs): Promise<void>;
7
- export {};
7
+ export interface DoctorReport {
8
+ checks: DoctorCheck[];
9
+ summary: {
10
+ pass: number;
11
+ warn: number;
12
+ fail: number;
13
+ skip: number;
14
+ };
15
+ }
16
+ export interface RunDoctorOpts {
17
+ cwd?: string;
18
+ }
19
+ export declare function runDoctor(opts?: RunDoctorOpts): Promise<DoctorReport>;
20
+ export declare const doctorCmd: import("citty").CommandDef<import("citty").ArgsDef>;
21
+ //# sourceMappingURL=doctor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../src/commands/doctor.ts"],"names":[],"mappings":"AAoBA,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IAC1C,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;CACrE;AAED,MAAM,WAAW,aAAa;IAC5B,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,wBAAsB,SAAS,CAAC,IAAI,GAAE,aAAkB,GAAG,OAAO,CAAC,YAAY,CAAC,CAiK/E;AA2BD,eAAO,MAAM,SAAS,qDAkBpB,CAAC"}
@@ -1,11 +1,33 @@
1
- interface InitArgs {
2
- siteId?: string;
3
- token?: string;
4
- framework?: string;
5
- noInteractive?: boolean;
6
- dryRun?: boolean;
7
- json?: boolean;
8
- profile?: string;
9
- }
10
- export declare function initCommand(args: InitArgs): Promise<void>;
11
- export {};
1
+ export declare const initCmd: import("citty").CommandDef<{
2
+ workspace: {
3
+ type: "string";
4
+ description: string;
5
+ };
6
+ endpoint: {
7
+ type: "string";
8
+ description: string;
9
+ default: string;
10
+ };
11
+ sdk: {
12
+ type: "string";
13
+ description: string;
14
+ default: string;
15
+ };
16
+ 'write-key': {
17
+ type: "string";
18
+ description: string;
19
+ };
20
+ 'no-install': {
21
+ type: "boolean";
22
+ description: string;
23
+ };
24
+ 'no-pull': {
25
+ type: "boolean";
26
+ description: string;
27
+ };
28
+ force: {
29
+ type: "boolean";
30
+ description: string;
31
+ };
32
+ }>;
33
+ //# sourceMappingURL=init.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAmCA,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgJlB,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { type RegistryPullResponse } from '../lib/api.ts';
2
+ export interface RunPullOpts {
3
+ cwd?: string;
4
+ workspaceId?: string;
5
+ }
6
+ export declare function runPull(opts?: RunPullOpts): Promise<RegistryPullResponse>;
7
+ export declare const pullCmd: import("citty").CommandDef<{
8
+ workspace: {
9
+ type: "string";
10
+ description: string;
11
+ };
12
+ }>;
13
+ //# sourceMappingURL=pull.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pull.d.ts","sourceRoot":"","sources":["../../src/commands/pull.ts"],"names":[],"mappings":"AAWA,OAAO,EAAa,KAAK,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAUrE,MAAM,WAAW,WAAW;IAC1B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAsB,OAAO,CAAC,IAAI,GAAE,WAAgB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAmCnF;AAED,eAAO,MAAM,OAAO;;;;;EA6BlB,CAAC"}
@@ -0,0 +1,40 @@
1
+ export declare const pushCmd: import("citty").CommandDef<{
2
+ resource: {
3
+ type: "positional";
4
+ description: string;
5
+ default: string;
6
+ required: false;
7
+ };
8
+ key: {
9
+ type: "positional";
10
+ description: string;
11
+ required: true;
12
+ };
13
+ meaning: {
14
+ type: "string";
15
+ description: string;
16
+ };
17
+ type: {
18
+ type: "string";
19
+ description: string;
20
+ };
21
+ producer: {
22
+ type: "string";
23
+ description: string;
24
+ default: string;
25
+ };
26
+ 'required-properties': {
27
+ type: "string";
28
+ description: string;
29
+ };
30
+ 'optional-properties': {
31
+ type: "string";
32
+ description: string;
33
+ };
34
+ source: {
35
+ type: "string";
36
+ description: string;
37
+ default: string;
38
+ };
39
+ }>;
40
+ //# sourceMappingURL=push.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"push.d.ts","sourceRoot":"","sources":["../../src/commands/push.ts"],"names":[],"mappings":"AAwBA,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0GlB,CAAC"}
@@ -0,0 +1,36 @@
1
+ interface DeprecatedCall {
2
+ file: string;
3
+ line: number;
4
+ event_key: string;
5
+ lifecycle: 'deprecated' | 'archived';
6
+ suggested_replacement: string | null;
7
+ }
8
+ interface UnknownCall {
9
+ file: string;
10
+ line: number;
11
+ event_key: string;
12
+ }
13
+ interface ScanResult {
14
+ scanned_files: number;
15
+ total_calls: number;
16
+ active_calls: number;
17
+ deprecated_calls: DeprecatedCall[];
18
+ unknown_calls: UnknownCall[];
19
+ }
20
+ export interface RunValidateOpts {
21
+ cwd?: string;
22
+ path?: string;
23
+ }
24
+ export declare function runValidate(opts?: RunValidateOpts): ScanResult;
25
+ export declare const validateCmd: import("citty").CommandDef<{
26
+ path: {
27
+ type: "string";
28
+ description: string;
29
+ };
30
+ strict: {
31
+ type: "boolean";
32
+ description: string;
33
+ };
34
+ }>;
35
+ export {};
36
+ //# sourceMappingURL=validate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../src/commands/validate.ts"],"names":[],"mappings":"AAkCA,UAAU,cAAc;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,YAAY,GAAG,UAAU,CAAC;IACrC,qBAAqB,EAAE,MAAM,GAAG,IAAI,CAAC;CACtC;AAED,UAAU,WAAW;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,UAAU,UAAU;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,cAAc,EAAE,CAAC;IACnC,aAAa,EAAE,WAAW,EAAE,CAAC;CAC9B;AA0BD,MAAM,WAAW,eAAe;IAC9B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,WAAW,CAAC,IAAI,GAAE,eAAoB,GAAG,UAAU,CA0DlE;AAED,eAAO,MAAM,WAAW;;;;;;;;;EAmDtB,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1 +1,4 @@
1
- export {};
1
+ export declare const VERSION = "1.0.1";
2
+ declare const mainCmd: import("citty").CommandDef<import("citty").ArgsDef>;
3
+ export default mainCmd;
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAuBA,eAAO,MAAM,OAAO,UAAU,CAAC;AA+B/B,QAAA,MAAM,OAAO,qDAiBX,CAAC;AAEH,eAAe,OAAO,CAAC"}