@kubohiroya/turbowarp-extension-security-dialog 0.8.0 → 0.8.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.
package/NOTICE.md CHANGED
@@ -12,6 +12,13 @@ original to this package: a jigsaw piece outline with a serif T, drawn for it an
12
12
  other work. `scripts/build.mjs` embeds it into `dist` as a base64 data URI, so it travels in the
13
13
  published package.
14
14
 
15
+ ## Build provenance
16
+
17
+ Published archives include `dist/build-info.json` with this package's name, version and full Git
18
+ revision. `sourceState: "commit"` identifies a build from committed inputs; `"working-tree"` marks
19
+ a local build with changes to those inputs. This file records provenance, without changing the
20
+ licenses described here.
21
+
15
22
  ## Screenshots kept in this repository
16
23
 
17
24
  `assets/screenshots/` holds captures of the public Editor taken before the rewrite. They are
package/README.ja.md CHANGED
@@ -103,6 +103,14 @@ import '@kubohiroya/turbowarp-extension-security-dialog/styles.css';
103
103
  | `false` または無し | どちらでも | コードとメッセージだけ |
104
104
 
105
105
  `failure` を渡さなければ、これらの props が無かったときとまったく同じに描きます。
106
+ 必須なのは `message` だけです。`failure={{message: '取得できませんでした'}}` なら失敗の文だけを
107
+ 表示します。`code` は表示用の任意の値で、`retryable` を省略した場合はやり直しを提示しません。
108
+
109
+ 公開パッケージには `dist/build-info.json` を含め、
110
+ `@kubohiroya/turbowarp-extension-security-dialog/build-info` からも参照できます。`name`、`version`、
111
+ ソースの完全な `revision`、`sourceState`(`commit` または `working-tree`)を記録します。ホスト側は
112
+ 完全版を固定し、配信前に revision を照合できます。切り戻しはパッケージ版と lockfile を元に戻す
113
+ ことで行えます。新しい失敗表示だけを止める場合は、`failure` と `onRetry` を渡さないでください。
106
114
 
107
115
  **画面はエラーコードの表を持ちません。** もう一度試して結果が変わりうるかはホストの判断で、
108
116
  TurboWarp-Plus Editor ではローダーの `isWorthAskingAgain` が決め、真偽値として渡されます。コード
package/README.md CHANGED
@@ -107,6 +107,14 @@ carry a stale answer into a screen that no longer offers it.
107
107
  | `false` or missing | either | The code and message only |
108
108
 
109
109
  With no `failure` the screen renders exactly as it did before these props existed.
110
+ Only `message` is required: `failure={{message: 'Could not fetch'}}` displays the failure without
111
+ retry controls. `code` is optional display text, and `retryable` defaults to no retry.
112
+
113
+ Published packages include `dist/build-info.json`, also exported as
114
+ `@kubohiroya/turbowarp-extension-security-dialog/build-info`. It records `name`, `version`, the full
115
+ source `revision` and `sourceState` (`commit` or `working-tree`). Hosts can pin the exact version
116
+ and verify its revision before deployment. To roll back, restore the previous package version and
117
+ lockfile; to hide the new failure UI, stop passing `failure` and `onRetry`.
110
118
 
111
119
  **The screen keeps no table of error codes.** Whether asking again could change the outcome is the
112
120
  host's judgement — the Loader's `isWorthAskingAgain` in the TurboWarp-Plus Editor — passed in as a
@@ -0,0 +1,6 @@
1
+ {
2
+ "name": "@kubohiroya/turbowarp-extension-security-dialog",
3
+ "version": "0.8.1",
4
+ "revision": "65ae19aafb00bdbd83cbb80813f0ffc7844a6653",
5
+ "sourceState": "commit"
6
+ }
package/dist/react.cjs CHANGED
@@ -444,7 +444,7 @@ var Failure = ({ failure, onRetry, t }) => {
444
444
  className: "twextsec-failed",
445
445
  role: "alert"
446
446
  },
447
- /* @__PURE__ */ import_react2.default.createElement("p", null, t("failed"), ": ", failure.code, " ", failure.message),
447
+ /* @__PURE__ */ import_react2.default.createElement("p", null, t("failed"), ": ", failure.code && `${failure.code} `, failure.message),
448
448
  retry && /* @__PURE__ */ import_react2.default.createElement("p", { className: "twextsec-retry-note" }, t("retryNote")),
449
449
  retry && /* @__PURE__ */ import_react2.default.createElement(
450
450
  "button",
package/dist/react.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type {ComponentType} from 'react';
2
- import type {ExtensionMetadata, ReviewDecision, ReviewEntry, LoadingMode} from './review-types.js';
2
+ import type {ExtensionMetadata, ReviewDecision, ReviewEntry, ReviewFailure, LoadingMode} from './review-types.js';
3
3
  import type {PreviewCache, ReviewMode} from './index.js';
4
4
 
5
5
  export interface DialogFrameProps {
@@ -22,8 +22,9 @@ export interface ExtensionReviewProps {
22
22
  /**
23
23
  * A failure of the whole load, shown above the rows. Absent or null renders exactly as before.
24
24
  * `retryable` is the host's judgement, never derived here from `code`.
25
+ * Only `message` is required; missing `retryable` offers no retry.
25
26
  */
26
- failure?: {code: string; message: string; retryable: boolean} | null;
27
+ failure?: ReviewFailure | null;
27
28
  /**
28
29
  * Asks the host to try the load again. "Try again" appears only for a failure — `failure`, or a
29
30
  * row's `state.error` — whose `retryable` is `true`, and only when this is given.
package/dist/react.mjs CHANGED
@@ -411,7 +411,7 @@ var Failure = ({ failure, onRetry, t }) => {
411
411
  className: "twextsec-failed",
412
412
  role: "alert"
413
413
  },
414
- /* @__PURE__ */ React2.createElement("p", null, t("failed"), ": ", failure.code, " ", failure.message),
414
+ /* @__PURE__ */ React2.createElement("p", null, t("failed"), ": ", failure.code && `${failure.code} `, failure.message),
415
415
  retry && /* @__PURE__ */ React2.createElement("p", { className: "twextsec-retry-note" }, t("retryNote")),
416
416
  retry && /* @__PURE__ */ React2.createElement(
417
417
  "button",
@@ -65,7 +65,7 @@ export type ReviewSource =
65
65
  * only when the screen was also given `onRetry`; missing or `false` states the failure and stops.
66
66
  */
67
67
  export interface ReviewFailure {
68
- code: string;
68
+ code?: string;
69
69
  message: string;
70
70
  retryable?: boolean;
71
71
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubohiroya/turbowarp-extension-security-dialog",
3
- "version": "0.8.0",
3
+ "version": "0.8.1",
4
4
  "description": "Batch extension security review, previews and per-project defaults for TurboWarp hosts",
5
5
  "type": "module",
6
6
  "author": {
@@ -38,6 +38,7 @@
38
38
  "import": "./dist/turbowarp.mjs",
39
39
  "require": "./dist/turbowarp.cjs"
40
40
  },
41
+ "./build-info": "./dist/build-info.json",
41
42
  "./styles.css": "./styles.css",
42
43
  "./webpack4.css": "./webpack4.css"
43
44
  },