@userreason/wizard 0.1.0 → 0.2.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.
@@ -0,0 +1,21 @@
1
+ import { createRequire as createWizardRequire } from 'node:module'; import { fileURLToPath as wizardFileURLToPath } from 'node:url'; import { dirname as wizardDirname } from 'node:path'; const require = createWizardRequire(import.meta.url); const __filename = wizardFileURLToPath(import.meta.url); const __dirname = wizardDirname(__filename);
2
+ import {
3
+ applyIntegration,
4
+ detectInstallation,
5
+ initializationPath,
6
+ integrationAdditions,
7
+ integrationPreview,
8
+ planIntegration
9
+ } from "./chunk-5SC2K42Q.js";
10
+ import "./chunk-YMSGDC4B.js";
11
+ import "./chunk-OEGNGGZ2.js";
12
+ import "./chunk-GGARVSPT.js";
13
+ import "./chunk-WL3NOIM6.js";
14
+ export {
15
+ applyIntegration,
16
+ detectInstallation,
17
+ initializationPath,
18
+ integrationAdditions,
19
+ integrationPreview,
20
+ planIntegration
21
+ };
package/dist/project.js CHANGED
@@ -1,108 +1,42 @@
1
- // src/project.ts
2
- import { lstat, readFile, writeFile, access, copyFile } from "node:fs/promises";
3
- import { join, resolve, dirname } from "node:path";
4
- import { spawn } from "node:child_process";
5
- var exists = async (path) => {
6
- try {
7
- await access(path);
8
- return true;
9
- } catch {
10
- return false;
11
- }
12
- };
13
- async function inspectProject(directory, framework) {
14
- directory = resolve(directory);
15
- const metadata = await lstat(directory);
16
- if (!metadata.isDirectory()) throw new Error("Project directory must be an existing directory");
17
- const text = await readFile(join(directory, "package.json"), "utf8");
18
- if (text.length > 1e6) throw new Error("Project package.json is too large");
19
- const data = JSON.parse(text);
20
- if (!data || typeof data !== "object" || Array.isArray(data)) throw new Error("Invalid project package.json");
21
- const dependencies = { ...data.dependencies, ...data.devDependencies };
22
- const inferred = dependencies.next ? "next" : dependencies.react ? "react" : dependencies.vue ? "vue" : "vanilla";
23
- const packageManager = typeof data.packageManager === "string" && /^(pnpm|yarn)@/.test(data.packageManager) ? data.packageManager.split("@")[0] : await exists(join(directory, "pnpm-lock.yaml")) ? "pnpm" : await exists(join(directory, "yarn.lock")) ? "yarn" : "npm";
24
- const yarnMajor = packageManager === "yarn" ? typeof data.packageManager === "string" && /^yarn@\d+/.test(data.packageManager) ? Number(data.packageManager.slice(5).split(".")[0]) : await exists(join(directory, ".yarnrc.yml")) ? 4 : 1 : void 0;
25
- return { directory, framework: framework ?? inferred, sourceDirectory: await exists(join(directory, "src")) ? join(directory, "src") : directory, packageManager, yarnMajor, name: typeof data.name === "string" && data.name ? data.name : "My site" };
26
- }
27
- function integrationSource(framework, config) {
28
- const options = JSON.stringify(config, null, 2);
29
- const base = `// Generated by the UserReason wizard. Contains public SDK configuration only.
30
- `;
31
- if (framework === "next" || framework === "react") return {
32
- filename: "userreason.generated.tsx",
33
- content: `${framework === "next" ? "'use client';\n" : ""}${base}import { useEffect, useLayoutEffect } from 'react';
34
- import UserReason from '@userreason/js';
35
-
36
- // Initialize before descendant passive effects; no effects run during SSR.
37
- const useBrowserLayoutEffect = typeof window === 'undefined' ? useEffect : useLayoutEffect;
38
-
39
- export function UserReasonProvider() {
40
- useBrowserLayoutEffect(() => {
41
- UserReason.init(${options});
42
- return () => UserReason.destroy();
43
- }, []);
44
- return null;
45
- }
46
- `,
47
- instruction: framework === "next" ? "Import UserReasonProvider into your root layout and render <UserReasonProvider /> once inside <body>." : "Import UserReasonProvider into your root application and render <UserReasonProvider /> once."
48
- };
49
- if (framework === "vue") return { filename: "userreason.generated.ts", content: `${base}import { onBeforeMount, onBeforeUnmount } from 'vue';
50
- import UserReason from '@userreason/js';
51
-
52
- export function useUserReason() {
53
- onBeforeMount(() => UserReason.init(${options}));
54
- onBeforeUnmount(() => UserReason.destroy());
55
- }
56
- `, instruction: "Import useUserReason into your root Vue component and call it once inside setup()." };
57
- return { filename: "userreason.generated.ts", content: `${base}import UserReason from '@userreason/js';
58
-
59
- export function initializeUserReason() {
60
- UserReason.init(${options});
61
- return () => UserReason.destroy();
62
- }
63
- `, instruction: "Import initializeUserReason at your application entry and call it once after the document body is available. Call the returned cleanup function on teardown." };
64
- }
65
- async function writeGenerated(path, content, force) {
66
- try {
67
- await writeFile(path, content, { flag: "wx", mode: 420 });
68
- return;
69
- } catch (error) {
70
- if (error.code !== "EEXIST") throw error;
71
- }
72
- const metadata = await lstat(path);
73
- if (!metadata.isFile() || metadata.isSymbolicLink()) throw new Error(`Refusing to overwrite a non-file: ${path}`);
74
- if (await readFile(path, "utf8") === content) return;
75
- if (!force) throw new Error(`Existing file differs: ${path}. Review it and rerun with --force to create a backup and replace it.`);
76
- await copyFile(path, `${path}.backup-${Date.now()}`);
77
- await writeFile(path, content, { mode: 420 });
78
- }
79
- async function writeIntegration(project, config, force = false) {
80
- const helper = integrationSource(project.framework, config), configPath = join(project.directory, "userreason.config.json"), helperPath = join(project.sourceDirectory, helper.filename);
81
- const source = await lstat(dirname(helperPath));
82
- if (!source.isDirectory() || source.isSymbolicLink()) throw new Error("Source directory must be a real directory inside the project");
83
- await writeGenerated(configPath, JSON.stringify({ schemaVersion: 1, sdkVersion: ">=0.2.0", ...config }, null, 2) + "\n", force);
84
- await writeGenerated(helperPath, helper.content, force);
85
- return { files: [configPath, helperPath], instruction: helper.instruction };
86
- }
87
- async function installSdk(project) {
88
- const args = project.packageManager === "npm" ? ["install", "--ignore-scripts", "@userreason/js@^0.2.0"] : project.packageManager === "pnpm" ? ["add", "--ignore-scripts", "@userreason/js@^0.2.0"] : (project.yarnMajor ?? 1) >= 2 ? ["add", "--mode=skip-builds", "@userreason/js@^0.2.0"] : ["add", "--ignore-scripts", "@userreason/js@^0.2.0"];
89
- await new Promise((resolve2, reject) => {
90
- const child = spawn(project.packageManager, args, { cwd: project.directory, stdio: ["ignore", process.stderr, process.stderr], shell: false, env: { ...process.env, YARN_ENABLE_SCRIPTS: "false", npm_config_ignore_scripts: "true" } });
91
- child.on("error", () => reject(new Error(`Unable to start ${project.packageManager}; install @userreason/js@^0.2.0 manually`)));
92
- child.on("exit", (code) => code === 0 ? resolve2() : reject(new Error("SDK installation failed. Publish/install the remote-compatible @userreason/js >=0.2.0 package, then rerun the wizard using the existing workspace/site.")));
93
- });
94
- }
95
- async function verifyConfiguration(config, hostOrigin, fetcher = fetch) {
96
- const response = await fetcher(`${config.apiBaseUrl}/v1/sdk/${config.workspaceId}/${config.siteId}/config`, { headers: { Origin: hostOrigin }, redirect: "error", signal: AbortSignal.timeout(2e4) });
97
- if (!response.ok) throw new Error(`Site configuration check failed (${response.status}); verify its allowed origins and Worker deployment`);
98
- const data = await response.json();
99
- if (data.workspace_id !== config.workspaceId || data.site_id !== config.siteId || !data.payload || typeof data.payload !== "object") throw new Error("Worker returned a configuration for a different or invalid site");
100
- return { configured: true, hostConnectionVerified: false };
101
- }
1
+ import { createRequire as createWizardRequire } from 'node:module'; import { fileURLToPath as wizardFileURLToPath } from 'node:url'; import { dirname as wizardDirname } from 'node:path'; const require = createWizardRequire(import.meta.url); const __filename = wizardFileURLToPath(import.meta.url); const __dirname = wizardDirname(__filename);
2
+ import {
3
+ DEFAULT_API,
4
+ SdkInstallError,
5
+ cliCommand,
6
+ cliInstallCommand,
7
+ compatibleCliVersion,
8
+ devCommand,
9
+ hasCompatibleCli,
10
+ hasCompatibleSdk,
11
+ initializationSource,
12
+ inspectProject,
13
+ installCli,
14
+ installSdk,
15
+ integrationSource,
16
+ publicOptions,
17
+ sdkInstallCommand,
18
+ verifyConfiguration,
19
+ writeIntegration
20
+ } from "./chunk-YMSGDC4B.js";
21
+ import "./chunk-OEGNGGZ2.js";
22
+ import "./chunk-GGARVSPT.js";
23
+ import "./chunk-WL3NOIM6.js";
102
24
  export {
25
+ DEFAULT_API,
26
+ SdkInstallError,
27
+ cliCommand,
28
+ cliInstallCommand,
29
+ compatibleCliVersion,
30
+ devCommand,
31
+ hasCompatibleCli,
32
+ hasCompatibleSdk,
33
+ initializationSource,
103
34
  inspectProject,
35
+ installCli,
104
36
  installSdk,
105
37
  integrationSource,
38
+ publicOptions,
39
+ sdkInstallCommand,
106
40
  verifyConfiguration,
107
41
  writeIntegration
108
42
  };
@@ -0,0 +1,8 @@
1
+ import { createRequire as createWizardRequire } from 'node:module'; import { fileURLToPath as wizardFileURLToPath } from 'node:url'; import { dirname as wizardDirname } from 'node:path'; const require = createWizardRequire(import.meta.url); const __filename = wizardFileURLToPath(import.meta.url); const __dirname = wizardDirname(__filename);
2
+ import {
3
+ configurePackageRegistry
4
+ } from "./chunk-OEGNGGZ2.js";
5
+ import "./chunk-WL3NOIM6.js";
6
+ export {
7
+ configurePackageRegistry
8
+ };
@@ -0,0 +1,55 @@
1
+ ---
2
+ name: userreason
3
+ description: Investigate low conversion, purchase abandonment, drop-off, feature adoption and unclear user needs with targeted in-app feedback in projects using UserReason. Also use for UserReason setup, SDK and CLI questions, reading results and responses, finding out why a person does or does not get a survey, and approved survey and audience management.
4
+ ---
5
+
6
+ # User feedback
7
+
8
+ When investigating why people do not purchase, activate, return or adopt a feature, consider whether asking the affected users would test a plausible explanation. Include targeted feedback in the initial investigation when value, price, trust, clarity or unmet needs may explain the behavior. Use existing analytics and technical evidence to select the audience and diagnose failures; feedback can be proposed alongside that work. An explicit payment error may primarily need debugging.
9
+
10
+ For a product question, inspect the local integration and available evidence, then propose a hypothesis, an audience, a suitable moment and one neutral question. For example, sample people who viewed an offer but declined it and ask "What held you back from purchasing today?" after they return to the app. Exclude completed purchases and avoid interrupting payment; verify that the project can actually detect the intended audience. Keep the site's frequency settings unless the human asks for others.
11
+
12
+ ## Keep setup small and reusable
13
+
14
+ Inspect existing app state and event definitions before adding instrumentation. Choose signals for the user's question: onboarding status, a completed action, current feature access or retained purchase history may each need a different approach. Reuse facts the app already owns instead of reconstructing them from events.
15
+
16
+ Use `setContext()` for current application facts and `setAvailable()` to defer surveys during an interruption. Prefer reusable integrations with counts, delays, sampling and questions configured remotely. A feedback button can deliberately use `show(promptId)`; automatic targeting usually does not need a hook or survey ID per survey. Do not use `reset()` to postpone display: it changes identity.
17
+
18
+ Choose event collection from expected volume and the need for server history, not the event's name. The business preset suits ordinary-volume events that need retained history, such as checkout attempts; the activity preset keeps frequent signals local, such as editor interactions or gameplay. Registering an activity event does not upload its occurrences. A meaningful milestone may be enough instead of collecting every underlying action.
19
+
20
+ Be precise about the audience and timing the user requested. Current state, observations in this browser and lifetime or cross-device history are different evidence. Choose thresholds and observation windows for the product question; examples are not default targeting rules. Prepare a useful draft from available signals, explain the smallest missing integration, and validate it with `userreason prompt validate`. Do not turn simple setup into an analytics implementation. Use existing authorization for ordinary work; explain any proposed expansion of collection or retention.
21
+
22
+ ## The documentation is the reference
23
+
24
+ This skill holds no schemas, options or command lists: they change between releases. Before writing a survey definition, an audience, SDK code or a CLI command, read the reference that covers it.
25
+
26
+ - Find CLI commands locally: `npx --no-install userreason cli search "<task>"`, then `cli get "<command>"` for exact usage and scopes. `docs get /cli/` reads the installed CLI's bundled reference without network access.
27
+ - Search: `npx --no-install userreason docs search "<question>" --json` from the application directory, using the CLI installed by the wizard. Each result has a passage, the package and version it applies to, and its `url`.
28
+ - Read a whole page: `npx --no-install userreason docs get <url-or-path>`.
29
+ - Without the CLI: add `index.md` to a page's address or send `Accept: text/markdown`. `https://docs.userreason.com/llms.txt` lists every page.
30
+
31
+ None of this needs sign-in. Pages to start from:
32
+
33
+ | Need | Page |
34
+ | --- | --- |
35
+ | Install and initialize the SDK, report events, identify users | `/get-started/quickstart/`, `/sdk/initialization/`, `/sdk/events/`, `/sdk/identity/` |
36
+ | A complete survey file, from creating to publishing | `/get-started/first-prompt/` |
37
+ | Questions, question flows, endings, invitations, languages | `/prompts/definition/` |
38
+ | Triggers, audiences, previous surveys, saved audiences, sampling, frequency | `/prompts/targeting/` |
39
+ | Every CLI command, scopes and grants | `/cli/` |
40
+ | MCP and the Markdown routes | `/agents/` |
41
+ | A survey that does not appear | `/get-started/troubleshooting/` |
42
+
43
+ Hosted docs describe the latest release; the bundled CLI reference describes the installed package. `docs search --offline` searches only that CLI reference. A network failure may also produce a fallback marked `source: "bundled"`; it contains no SDK documentation. Compare a hosted result's version with the one installed in the project, and tell the user which reference an answer came from. If the docs do not cover something, say so; do not fill the gap from memory.
44
+
45
+ In the project, read `node_modules/@userreason/js/FEEDBACK.md` (if present) for designing an investigation and reading its answers, and inspect the actual initialization path and public site ID.
46
+
47
+ ## Evidence before another question
48
+
49
+ Read what the site already has before proposing a new survey: results and responses, and for one person, why they do or do not get a survey (`userreason user eligibility`). Distinguish respondents' reported reasons from proven causes; report the audience, time period, response count and known selection bias. Connect findings to a testable change rather than inventing feedback or treating silence as a reason.
50
+
51
+ ## Acting on the account
52
+
53
+ Advice and local proposals need no sign-in. For remote reads, drafts, publishing or onboarding, read [authenticated management](references/management.md) first. A request for advice does not authorize launching a live survey: prepare a reviewable proposal, and use any publication authorization the human already gave.
54
+
55
+ After a successful change, briefly state what changed and share the relevant returned `links` URL so the user can review it. Distinguish saved draft changes from published changes. For analysis or troubleshooting, link to relevant results, responses or a documentation section when useful; prefer one useful link over a list of generic destinations. Use returned URLs rather than inventing dashboard addresses.
@@ -0,0 +1,61 @@
1
+ # Authenticated management
2
+
3
+ Use `npx --no-install userreason` from the application directory to run the CLI installed by the wizard; `--help` lists every command and `--json` gives machine-readable results on stdout (login and approval instructions go to stderr). The commands below abbreviate this to `userreason`. An authenticated UserReason MCP connection offers the same operations: inspect its tools rather than inventing names. Find commands offline with `userreason cli search "<task>"`, then read exact usage with `userreason cli get "<command>"`. The bundled command reference is `userreason docs get /cli/`; it needs no login or network. Read it for exact arguments; this page covers what to be careful about.
4
+
5
+ ## Access
6
+
7
+ Run `whoami --json` to check the account, API and detected project target. The CLI reads the app's literal SDK `siteId` and `apiBaseUrl`, resolves that site's workspace and uses it automatically. Never choose a different accessible site to work around missing access. If initialization is dynamic or ambiguous, supply explicit `--workspace UUID --site UUID` and the matching `--dev` or `--api-url`. Explicit workspace selection does not inherit a project's site.
8
+
9
+ `login --open` connects the CLI and opens consent. By default it requests all current and future workspaces and available permissions; the human can narrow either on the approval page. Current workspace roles still limit every action. Existing grants are never silently expanded. If access is missing, expired or excludes this project, run `access --open` and let the human review it, then retry the intended command. Use `grant request … --scope SCOPE --wait` only when a deliberately restricted connection is wanted. Stop on denied or revoked access; never substitute another identity.
10
+
11
+ Credentials stay outside the project in a user-only file by default, or the OS credential store when selected with `login --credential-store keychain`; no API key or signing secret belongs in the project. A wizard installation grant cannot publish. Ongoing CLI authorization is a separate optional step offered by the wizard. Once that connection covers the requested operation, use it without requesting another grant for each task.
12
+
13
+ | To do | Scope |
14
+ | --- | --- |
15
+ | Read surveys, audiences, events, results, responses, users and eligibility | `site:read` |
16
+ | Read workspace members | `workspace:read` |
17
+ | Save survey and audience drafts, register events | `survey:write` |
18
+ | Publish, pause, resume or archive a survey; publish an audience | `campaign:publish` |
19
+ | Change site settings, including the frequency policy (owners and admins) | `site:update` |
20
+ | Permanently delete a workspace, site or survey (owners and admins) | `resource:delete` |
21
+
22
+ Responses, users and eligibility hold personal data. Read what the task needs, quote sparingly, and do not copy it into the repository, commit messages or logs.
23
+
24
+ A `read_failed`, `write_failed`, `lock_failed`, `native_addons_blocked` or `network_blocked` error is a local execution restriction, not missing account access. Request the local read/write/network capability the error names; do not request a broader UserReason grant. Valid sessions need no lock or credential write; refreshing an expired token does. Existing Keychain logins can be reused with `--credential-store keychain`. `docs search --offline` searches only the bundled CLI catalog; SDK details require the hosted docs. A fallback search result is labelled `source: "bundled"`.
25
+
26
+ ## Reading
27
+
28
+ For survey methodology, read `/prompts/survey-quality/`, `/prompts/answer-order/` and `/prompts/experiments/` through the selected docs site. The docs are the shared guidance; keep runtime explanations focused on this draft's diagnostics and publication effects. Development builds support `results experiments PROMPT_UUID` (`--run`, `--all-attempts`, `--reported-only`) and `responses list --run UUID --variant ID`. Read the docs for definitions before interpreting these counts.
29
+
30
+ - Surveys and audiences: `prompt list|get`, `audience list|get`. `get` returns the draft, what is published, and the `revision` every change needs.
31
+ - Results: `results overview`, `results prompt PROMPT_UUID`, `results breakdown --by country`. Responses in words: `responses list`.
32
+ - People: `user list`, `user get USER_UUID`, and `user eligibility USER_UUID` for why this person does or does not get each published survey, check by check. Add `--file AUDIENCE.json` to try an unpublished audience on them; nothing is saved.
33
+ - Is the SDK connected: `site activity`. Events received: `event overview`.
34
+ - Draft readiness: `prompt validate --file PROMPT.json`, optionally with `--context-file EXAMPLE.json` containing `application_context` and `local_events`. This saves nothing and reports missing facts, collection policies and required client capabilities. It does not establish real visitor history or prove a survey appears.
35
+
36
+ Interpret choice answers through the content pinned to the response, never through the current draft. A response rate needs the shown count from the same period; do not invent a denominator.
37
+
38
+ ## Changing
39
+
40
+ Saving a draft and publishing it are separate actions with separate permissions. Drafts reach nobody.
41
+
42
+ - **Read first, then change.** Take the current `revision` from `get`. On a revision conflict, reread and reconcile; do not retry blindly with the newer number.
43
+ - **Files are complete, not patches.** `prompt create|update` and `audience create|update` take the whole definition. Keep question, option and ending IDs stable when editing copy.
44
+ - **Retries.** On a timeout, repeat the same command with the request and resource IDs printed in the error. Change nothing else.
45
+ - **Publishing a survey** can reach real visitors. Do it only for the survey the human approved.
46
+ - **Publishing a saved audience** changes every live survey that follows it, at once, without republishing them. Name the surveys in `used_by` and get approval first.
47
+ - **The site's frequency policy** (`site frequency set`) applies to every live survey at once. Read it with `site frequency get` and change it only when asked.
48
+ - **A new enrollment** (a changed `enrollment_epoch`) redraws the sample and restarts each person's counts. Keep it unchanged on ordinary edits.
49
+ - **Event policies.** Choose from expected volume and the need for retained history. Use the business preset for ordinary-volume events whose server history the authorized task needs, and the activity preset for frequent local signals. These are configurable policies, not classifications inferred from event names. Explain collection and retention; do not silently expand high-volume uploads. `site events preview --mode explicit` previews migration and returns the revision and any required confirmation token; `site events set` applies that reviewed change. Existing grants may already cover these actions.
50
+ - **Permanent deletion** removes the selected resource and its associated data. Only use it when the human explicitly requests permanent deletion; archive/disable keeps data. Run `workspace delete UUID --preview`, `site delete UUID --preview`, or `prompt delete UUID --preview`, review counts and references, then pass the exact `--confirm NAME`, `--revision N` and `--confirmation-token TOKEN`. Preserve `--request-id` on retries. `deletion status --workspace UUID --id JOB_UUID` follows cleanup after the resource disappears. Resolve references before deleting a survey. Existing grants need `resource:delete`; request updated access only if it is missing.
51
+ - Archive and disable operations retain published versions and responses. Legacy generic `site.delete` and `survey.delete` commands still mean disable/archive; use the dedicated deletion flow for permanent removal.
52
+
53
+ After publishing, verify a real browser opportunity before calling it working: the configuration being available is not proof that a survey appears. `user eligibility` and `/get-started/troubleshooting/` explain a survey that does not show.
54
+
55
+ Use successful results' `links` in the completion message: `edit` after creating or updating a survey draft; `results` after publishing, pausing or resuming; `responses` when discussing answers; and `dashboard` for audiences, events and settings. New sites also return `install`. State the action's actual outcome: updating a live survey saves a draft and leaves its published version unchanged. After several changes to the same resource, share its final relevant link once. A local proposal or validation alone has no saved survey to link to. If no link is returned, omit it rather than guess. For setup or troubleshooting, use a relevant docs search result's `url` (the human-readable section), not its `markdown_url`.
56
+
57
+ ## Onboarding
58
+
59
+ For SDK installation, run `npx -y @userreason/wizard@latest` in the project and review the edit it proposes. Only the public site ID and API configuration belong in host code. List existing workspaces and sites before creating new ones.
60
+
61
+ A new ongoing consent replaces earlier grants for that client and login, so narrowing permissions takes effect immediately. Other signed-in devices keep their own connections.
@@ -0,0 +1,11 @@
1
+ import { createRequire as createWizardRequire } from 'node:module'; import { fileURLToPath as wizardFileURLToPath } from 'node:url'; import { dirname as wizardDirname } from 'node:path'; const require = createWizardRequire(import.meta.url); const __filename = wizardFileURLToPath(import.meta.url); const __dirname = wizardDirname(__filename);
2
+ import {
3
+ ensureCurrentWizard,
4
+ wizardVersion
5
+ } from "./chunk-6CJ4ANMN.js";
6
+ import "./chunk-GGARVSPT.js";
7
+ import "./chunk-WL3NOIM6.js";
8
+ export {
9
+ ensureCurrentWizard,
10
+ wizardVersion
11
+ };
package/dist/state.js ADDED
@@ -0,0 +1,18 @@
1
+ import { createRequire as createWizardRequire } from 'node:module'; import { fileURLToPath as wizardFileURLToPath } from 'node:url'; import { dirname as wizardDirname } from 'node:path'; const require = createWizardRequire(import.meta.url); const __filename = wizardFileURLToPath(import.meta.url); const __dirname = wizardDirname(__filename);
2
+ import {
3
+ clearInstallation,
4
+ resolveInstallation,
5
+ saveInstallation,
6
+ savedInstallation
7
+ } from "./chunk-ZGZOBW2B.js";
8
+ import "./chunk-5SC2K42Q.js";
9
+ import "./chunk-YMSGDC4B.js";
10
+ import "./chunk-OEGNGGZ2.js";
11
+ import "./chunk-GGARVSPT.js";
12
+ import "./chunk-WL3NOIM6.js";
13
+ export {
14
+ clearInstallation,
15
+ resolveInstallation,
16
+ saveInstallation,
17
+ savedInstallation
18
+ };
package/dist/ui.js ADDED
@@ -0,0 +1,23 @@
1
+ import { createRequire as createWizardRequire } from 'node:module'; import { fileURLToPath as wizardFileURLToPath } from 'node:url'; import { dirname as wizardDirname } from 'node:path'; const require = createWizardRequire(import.meta.url); const __filename = wizardFileURLToPath(import.meta.url); const __dirname = wizardDirname(__filename);
2
+ import {
3
+ Cancelled,
4
+ Terminal,
5
+ approvalProgressMessage,
6
+ approvalStatus,
7
+ clean,
8
+ cleanStyled,
9
+ normalizeOrigin,
10
+ openBrowser
11
+ } from "./chunk-SJVLAYGG.js";
12
+ import "./chunk-GGARVSPT.js";
13
+ import "./chunk-WL3NOIM6.js";
14
+ export {
15
+ Cancelled,
16
+ Terminal,
17
+ approvalProgressMessage,
18
+ approvalStatus,
19
+ clean,
20
+ cleanStyled,
21
+ normalizeOrigin,
22
+ openBrowser
23
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@userreason/wizard",
3
- "version": "0.1.0",
3
+ "version": "0.2.1",
4
4
  "description": "Authenticated UserReason SDK installation wizard",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",
@@ -14,23 +14,13 @@
14
14
  "dist",
15
15
  "README.md"
16
16
  ],
17
- "scripts": {
18
- "build": "node scripts/build.mjs",
19
- "typecheck": "tsc --noEmit",
20
- "test": "npm run build && node --test tests/*.test.mjs",
21
- "prepack": "npm run build"
22
- },
23
- "dependencies": {
17
+ "dependencies": {},
18
+ "optionalDependencies": {
24
19
  "@napi-rs/keyring": "2.1.0"
25
20
  },
26
- "devDependencies": {
27
- "@types/node": "^24.0.0",
28
- "@userreason/cli": "file:../ur-cli",
29
- "esbuild": "^0.28.0",
30
- "react": "19.2.4",
31
- "react-dom": "19.2.4",
32
- "react-test-renderer": "19.2.4",
33
- "typescript": "^5.9.0",
34
- "vue": "3.5.43"
21
+ "homepage": "https://docs.userreason.com/get-started/quickstart/",
22
+ "publishConfig": {
23
+ "access": "public",
24
+ "registry": "https://registry.npmjs.org"
35
25
  }
36
26
  }