@fadhelhaidar/pi-ask-user 1.0.2 → 1.0.4

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/README.md CHANGED
@@ -30,20 +30,16 @@ This repository therefore owns its releases independently. The config helper and
30
30
  ## Install
31
31
 
32
32
  ```sh
33
- pi install git:github.com/FadhelHaidar/pi-ask-user@v1.0.1
33
+ pi install npm:@fadhelhaidar/pi-ask-user
34
34
  ```
35
35
 
36
- Starting with v1.0.1, Git releases include prebuilt JavaScript and translations in `dist/`. Installation uses these files directly: no Bun, compiler, development dependencies, or local build is required. Pi and its runtime dependencies are still required.
36
+ The npm package and Git releases include prebuilt JavaScript and translations in `dist/`. Installation uses these files directly: no Bun, compiler, development dependencies, or local build is required. Pi and its runtime dependencies are still required.
37
37
 
38
38
  Restart Pi after installing. Remove any other package registering `ask_user_question` to avoid duplicate registration.
39
39
 
40
40
  ### GitSync and new machines
41
41
 
42
- Sync the Pi package declaration `git:github.com/FadhelHaidar/pi-ask-user@v1.0.1`, then install the declared package on the destination machine using Pi. If you sync a local checkout instead, include the tracked `dist/` directory and install it with `pi install /path/to/pi-ask-user`. Neither route needs `bun run build` on the destination.
43
-
44
- Pinned tags do not automatically advance. A machine still configured for `@v1.0.0` keeps the old package until you change the declaration to a prebuilt release tag. A tag must be published before the corresponding install command works; source changes alone do not create a release.
45
-
46
- The package is published to npm as `@fadhelhaidar/pi-ask-user`; use the unpinned Pi source `npm:@fadhelhaidar/pi-ask-user` to let Pi compare registry versions and detect updates. GitHub releases also provide the same prebuilt runtime as versioned and stable `.tgz` assets for direct installation.
42
+ For GitSync and new machines, use the unpinned Pi package source `npm:@fadhelhaidar/pi-ask-user`. Pi can compare npm versions and notify about updates; `pi update --extensions` installs the latest published version. GitHub releases also provide versioned and stable `.tgz` assets for direct installation, but pinned Git tags do not advance automatically. If you sync a local checkout instead, include the tracked `dist/` directory and install it with `pi install /path/to/pi-ask-user`.
47
43
 
48
44
  ## Preserved custom behavior
49
45
 
@@ -99,11 +95,15 @@ Tests and fixtures live in this repository, including the multi-select/custom-an
99
95
 
100
96
  ### Preparing a release
101
97
 
102
- 1. Set `package.json` to the new release version and commit the source and manifest changes. Local build/test and `npm pack --dry-run --ignore-scripts` checks are optional validation.
103
- 2. After review, push or merge the changes to `main` and wait for its Tests workflow, including `publish-dist`, to succeed. If `dist/` changed, wait for the automatic build commit to appear on `main`; if it did not change, no extra commit is needed.
104
- 3. Fetch the updated `main` and inspect the commit you will tag. Only then create and push a matching `v<version>` tag on that fresh, prebuilt commit. Do not tag the earlier source-only commit or move an existing release tag.
98
+ Use Conventional Commit messages for changes merged to `main`; Release Please opens or updates a Release PR with the proposed version and changelog:
99
+
100
+ - `fix: ...` creates a patch release.
101
+ - `feat: ...` creates a minor release.
102
+ - A breaking change (for example, a `BREAKING CHANGE:` footer) creates a major release.
103
+
104
+ The Release PR is the human approval gate. Review and merge it to approve the version/changelog update; do not manually edit the version or auto-merge this PR. When the merge creates a GitHub release, automation explicitly dispatches the existing release workflow for its generated tag. That workflow validates and publishes the checked-in prebuilt files.
105
105
 
106
- Tag pushes do not run the branch build/publish workflow. They validate the checked-in prebuilt runtime rather than silently rebuilding a release.
106
+ Manual matching `v<version>` tag pushes and `workflow_dispatch` with `release_tag` remain available for recovery. Tag pushes still validate the checked-in prebuilt runtime rather than silently rebuilding a release.
107
107
 
108
108
  The release workflow rejects tags that do not match `package.json`, checks build freshness, runs tests, and packs the prebuilt files. It attaches both a versioned tarball and the stable `pi-ask-user.tgz` asset to the GitHub release, then publishes the same package to npm from a separate least-privilege job using npm Trusted Publishing (GitHub OIDC; no long-lived npm token). The npm CLI is pinned to 11.5.1 for OIDC support. Configure the package's npm Trusted Publisher for GitHub owner `FadhelHaidar`, repository `pi-ask-user`, and workflow `release.yml`; allow `npm publish`. The stable GitHub URL `/releases/latest/download/pi-ask-user.tgz` remains available for direct installs.
109
109
 
@@ -343,7 +343,7 @@ function perTabBinding(spec) {
343
343
  import { truncateToWidth as truncateToWidth2, visibleWidth, wrapTextWithAnsi as wrapTextWithAnsi2 } from "@earendil-works/pi-tui";
344
344
 
345
345
  // view/components/inline-input.ts
346
- import { CURSOR_MARKER, wrapTextWithAnsi } from "@earendil-works/pi-tui";
346
+ import { CURSOR_MARKER, renderFakeCursor, wrapTextWithAnsi } from "@earendil-works/pi-tui";
347
347
  var graphemeSegmenter = new Intl.Segmenter(undefined, { granularity: "grapheme" });
348
348
  function resolveCursorOffset(buffer, requested) {
349
349
  if (requested !== undefined && requested >= 0 && requested <= buffer.length)
@@ -358,7 +358,7 @@ function buildCursorRaw(buffer, offset) {
358
358
  `;
359
359
  const atCursor = rawAt === "" || rawAt === " " || cursorAtLineEnd ? " " : rawAt;
360
360
  const after = buffer.slice(offset + (cursorAtLineEnd ? 0 : rawAt.length));
361
- return `${before}${CURSOR_MARKER}\x1B[7m${atCursor}\x1B[27m${after}`;
361
+ return `${before}${CURSOR_MARKER}${renderFakeCursor(atCursor)}${after}`;
362
362
  }
363
363
  function renderInlineInputRow(opts) {
364
364
  const { buffer, cursorOffset, rowPrefix, continuationPrefix, contentWidth, selectedText } = opts;
package/dist/index.js CHANGED
@@ -314,7 +314,7 @@ var PREWARM_DELAY_MS = 2000;
314
314
  async function loadQuestionnaireSession() {
315
315
  let mod;
316
316
  try {
317
- mod = await import("./chunks/questionnaire-session-gdq5zqtt.js");
317
+ mod = await import("./chunks/questionnaire-session-j2wmt696.js");
318
318
  } catch (e) {
319
319
  const cause = e instanceof Error ? e.message : String(e);
320
320
  return { ok: false, error: "session_load_failed", message: `${ERROR_SESSION_LOAD_FAILED} (cause: ${cause})` };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fadhelhaidar/pi-ask-user",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "Standalone Pi questionnaire with combined multi-select and custom answers, Enter-only toggling, and preserved drafts.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -57,8 +57,8 @@
57
57
  }
58
58
  },
59
59
  "devDependencies": {
60
- "@earendil-works/pi-coding-agent": "1.0.2",
61
- "@earendil-works/pi-tui": "1.0.2",
60
+ "@earendil-works/pi-coding-agent": "1.2.0",
61
+ "@earendil-works/pi-tui": "1.2.0",
62
62
  "@juicesharp/rpiv-i18n": "2.12.0",
63
63
  "typescript": "5.9.3",
64
64
  "vitest": "4.1.10"