@rebasepro/cli 0.19.2-canary.g9b599d4 → 0.20.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.
@@ -23,8 +23,30 @@ import { TelemetryEventName } from "./payload.js";
23
23
  * the same builder the sender uses, so it cannot drift into a comfortable
24
24
  * fiction.
25
25
  */
26
- /** True when we may ask: no decision recorded, and nothing else forbids it. */
27
- export declare function shouldPrompt(env?: NodeJS.ProcessEnv): boolean;
26
+ /** Where the question is being asked from, which decides how often it may be. */
27
+ export interface PromptOptions {
28
+ /**
29
+ * Ask again even though this machine already declined.
30
+ *
31
+ * Set by `rebase init`, and only there. Scaffolding a project is a
32
+ * deliberate, occasional act with a natural pause in it — not something
33
+ * anyone does in a loop — so asking each time is an offer rather than
34
+ * nagging, and it reaches the person whose first answer was a reflex before
35
+ * they had seen the tool do anything.
36
+ *
37
+ * It does **not** re-ask someone who accepted: they are already sharing, so
38
+ * the only thing another prompt could do is talk them out of it.
39
+ *
40
+ * Nothing else changes. `DO_NOT_TRACK`, `REBASE_TELEMETRY_DISABLED`, `CI`
41
+ * and a project's `"telemetry": false` are answers, not questions, and they
42
+ * still suppress the prompt entirely — a re-ask that could override a
43
+ * committed repository policy would be exactly the consent-by-proxy the
44
+ * policy exists to prevent.
45
+ */
46
+ reAskDeclined?: boolean;
47
+ }
48
+ /** True when we may ask: nothing forbids it, and there is a question to ask. */
49
+ export declare function shouldPrompt(env?: NodeJS.ProcessEnv, { reAskDeclined }?: PromptOptions): boolean;
28
50
  export declare function renderPreview(event: TelemetryEventName, properties: Record<string, unknown>): string;
29
51
  /**
30
52
  * Ask, record the answer, and report it.
@@ -33,6 +55,6 @@ export declare function renderPreview(event: TelemetryEventName, properties: Rec
33
55
  * CI must behave exactly as it does today, which means not asking and not
34
56
  * sending.
35
57
  */
36
- export declare function promptForConsent(event: TelemetryEventName, properties: Record<string, unknown>): Promise<boolean>;
58
+ export declare function promptForConsent(event: TelemetryEventName, properties: Record<string, unknown>, options?: PromptOptions): Promise<boolean>;
37
59
  /** Human-readable current state, for `rebase telemetry status`. */
38
60
  export declare function describeState(env?: NodeJS.ProcessEnv): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rebasepro/cli",
3
- "version": "0.19.2-canary.g9b599d4",
3
+ "version": "0.20.0",
4
4
  "description": "Developer tools for Rebase projects",
5
5
  "keywords": [
6
6
  "cli",
@@ -43,12 +43,12 @@
43
43
  "inquirer": "14.0.2",
44
44
  "jiti": "^2.7.0",
45
45
  "pg": "^8.22.0",
46
- "@rebasepro/agent-skills": "0.19.2-canary.g9b599d4",
47
- "@rebasepro/client": "0.19.2-canary.g9b599d4",
48
- "@rebasepro/codegen": "0.19.2-canary.g9b599d4",
49
- "@rebasepro/server": "0.19.2-canary.g9b599d4",
50
- "@rebasepro/types": "0.19.2-canary.g9b599d4",
51
- "@rebasepro/server-postgres": "0.19.2-canary.g9b599d4"
46
+ "@rebasepro/agent-skills": "0.20.0",
47
+ "@rebasepro/client": "0.20.0",
48
+ "@rebasepro/codegen": "0.20.0",
49
+ "@rebasepro/server": "0.20.0",
50
+ "@rebasepro/server-postgres": "0.20.0",
51
+ "@rebasepro/types": "0.20.0"
52
52
  },
53
53
  "devDependencies": {
54
54
  "@types/node": "^26.1.2",
@@ -6,7 +6,12 @@ import tailwindcss from "@tailwindcss/vite";
6
6
  import { rebaseCollectionsPlugin } from "@rebasepro/app/vitePlugin";
7
7
 
8
8
  export default defineConfig({
9
- envDir: path.resolve(__dirname, ".."),
9
+ // `import.meta.dirname`, not `__dirname`: vite 8 warns that the latter is
10
+ // unsupported by `configLoader: "native"`, which becomes the default in a
11
+ // future major — so every new project printed a warning telling its author
12
+ // to fix a file they had not written yet. Available since Node 20.11, and
13
+ // this scaffold requires 22.22.
14
+ envDir: path.resolve(import.meta.dirname, ".."),
10
15
  // The public path this app is served under, from its `path` in rebase.json.
11
16
  // `rebase build` sets REBASE_APP_BASE; without this line an app declared at
12
17
  // "/admin" would emit assets rooted at "/" and render a blank page. The