@originator-profile/opvc 0.7.0-beta.1 → 0.7.0-beta.2

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
@@ -137,7 +137,7 @@ FLAG DESCRIPTIONS
137
137
  }
138
138
  ```
139
139
 
140
- _See code: [src/commands/ca/sign.ts](https://github.com/originator-profile/originator-profile/blob/v0.7.0-beta.1/packages/opvc/src/commands/ca/sign.ts)_
140
+ _See code: [src/commands/ca/sign.ts](https://github.com/originator-profile/originator-profile/blob/v0.7.0-beta.2/packages/opvc/src/commands/ca/sign.ts)_
141
141
 
142
142
  ## `opvc ca:unsigned`
143
143
 
@@ -222,7 +222,7 @@ FLAG DESCRIPTIONS
222
222
  }
223
223
  ```
224
224
 
225
- _See code: [src/commands/ca/unsigned.ts](https://github.com/originator-profile/originator-profile/blob/v0.7.0-beta.1/packages/opvc/src/commands/ca/unsigned.ts)_
225
+ _See code: [src/commands/ca/unsigned.ts](https://github.com/originator-profile/originator-profile/blob/v0.7.0-beta.2/packages/opvc/src/commands/ca/unsigned.ts)_
226
226
 
227
227
  ## `opvc help [COMMAND]`
228
228
 
@@ -242,7 +242,7 @@ DESCRIPTION
242
242
  Display help for opvc.
243
243
  ```
244
244
 
245
- _See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/6.2.48/src/commands/help.ts)_
245
+ _See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/6.2.55/src/commands/help.ts)_
246
246
 
247
247
  ## `opvc key-gen`
248
248
 
@@ -260,7 +260,7 @@ DESCRIPTION
260
260
  鍵ペアの生成
261
261
  ```
262
262
 
263
- _See code: [src/commands/key-gen/index.ts](https://github.com/originator-profile/originator-profile/blob/v0.7.0-beta.1/packages/opvc/src/commands/key-gen/index.ts)_
263
+ _See code: [src/commands/key-gen/index.ts](https://github.com/originator-profile/originator-profile/blob/v0.7.0-beta.2/packages/opvc/src/commands/key-gen/index.ts)_
264
264
 
265
265
  ## `opvc sign`
266
266
 
@@ -427,7 +427,7 @@ FLAG DESCRIPTIONS
427
427
  }
428
428
  ```
429
429
 
430
- _See code: [src/commands/sign.ts](https://github.com/originator-profile/originator-profile/blob/v0.7.0-beta.1/packages/opvc/src/commands/sign.ts)_
430
+ _See code: [src/commands/sign.ts](https://github.com/originator-profile/originator-profile/blob/v0.7.0-beta.2/packages/opvc/src/commands/sign.ts)_
431
431
 
432
432
  ## `opvc wsp:sign`
433
433
 
@@ -565,7 +565,7 @@ FLAG DESCRIPTIONS
565
565
  ]
566
566
  ```
567
567
 
568
- _See code: [src/commands/wsp/sign.ts](https://github.com/originator-profile/originator-profile/blob/v0.7.0-beta.1/packages/opvc/src/commands/wsp/sign.ts)_
568
+ _See code: [src/commands/wsp/sign.ts](https://github.com/originator-profile/originator-profile/blob/v0.7.0-beta.2/packages/opvc/src/commands/wsp/sign.ts)_
569
569
 
570
570
  ## `opvc wsp:unsigned`
571
571
 
@@ -695,7 +695,7 @@ FLAG DESCRIPTIONS
695
695
  ]
696
696
  ```
697
697
 
698
- _See code: [src/commands/wsp/unsigned.ts](https://github.com/originator-profile/originator-profile/blob/v0.7.0-beta.1/packages/opvc/src/commands/wsp/unsigned.ts)_
698
+ _See code: [src/commands/wsp/unsigned.ts](https://github.com/originator-profile/originator-profile/blob/v0.7.0-beta.2/packages/opvc/src/commands/wsp/unsigned.ts)_
699
699
  <!-- commandsstop -->
700
700
  <!-- prettier-ignore-end -->
701
701
 
@@ -1,4 +1,4 @@
1
- import { n as sign } from "../../content-attestation-DbHCVSbI.js";
1
+ import { n as sign } from "../../content-attestation-BydW0zgM.js";
2
2
  import { r as privateKey, t as expirationDate } from "../../flags-BSM3ANoc.js";
3
3
  import { Command, Flags } from "@oclif/core";
4
4
  import fs from "node:fs/promises";
@@ -1,4 +1,4 @@
1
- import { r as unsignedCa } from "../../content-attestation-DbHCVSbI.js";
1
+ import { r as unsignedCa } from "../../content-attestation-BydW0zgM.js";
2
2
  import { t as expirationDate } from "../../flags-BSM3ANoc.js";
3
3
  import { Command, Flags } from "@oclif/core";
4
4
  import fs from "node:fs/promises";
@@ -1,4 +1,4 @@
1
- import { t as sign } from "../../website-profile-Brt0iuRN.js";
1
+ import { t as sign } from "../../website-profile-B_7x7iSY.js";
2
2
  import { r as privateKey, t as expirationDate } from "../../flags-BSM3ANoc.js";
3
3
  import { Command, Flags } from "@oclif/core";
4
4
  import fs from "node:fs/promises";
@@ -1,4 +1,4 @@
1
- import { n as unsignedWsp } from "../../website-profile-Brt0iuRN.js";
1
+ import { n as unsignedWsp } from "../../website-profile-B_7x7iSY.js";
2
2
  import { t as expirationDate } from "../../flags-BSM3ANoc.js";
3
3
  import { Command, Flags } from "@oclif/core";
4
4
  import fs from "node:fs/promises";
@@ -54,16 +54,16 @@ async function unsignedCa(uca, { integrityAlg = "sha256", documentProvider: docu
54
54
  /**
55
55
  * Content Attestation への署名
56
56
  * @param uca 未署名 Content Attestation オブジェクト
57
- * @param privateKey プライベート鍵
57
+ * @param signer プライベート鍵、または HSM・KMS・WebAuthn等の外部署名者 (JwtSigner)
58
58
  * @throws {BadRequestError} 入力が UnsignedContentAttestation スキーマに適合しない場合/検証対象のコンテンツが存在しない/コンテンツにアクセスできない/Integrityの計算に失敗
59
59
  * @return Content Attestation
60
60
  */
61
- async function sign(uca, privateKey, options = {}) {
61
+ async function sign(uca, signer, options = {}) {
62
62
  const { issuedAt, expiredAt } = parseDates(options);
63
63
  return await signCa(await unsignedCa(uca, {
64
64
  issuedAt,
65
65
  expiredAt
66
- }), privateKey, {
66
+ }), signer, {
67
67
  issuedAt,
68
68
  expiredAt,
69
69
  documentProvider
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
- import { Jwk, RawTarget, UnsignedContentAttestation, UnsignedWebsiteProfile, UnsignedWebsiteProfileSet } from "@originator-profile/model";
1
+ import { RawTarget, UnsignedContentAttestation, UnsignedWebsiteProfile, UnsignedWebsiteProfileSet } from "@originator-profile/model";
2
2
  import { DocumentProvider, UnsignedWebsiteProfileInput } from "@originator-profile/sign";
3
+ import { JwtSigner, KeyMaterial } from "@originator-profile/securing-mechanism";
3
4
 
4
5
  //#region src/document-provider.d.ts
5
6
  declare function documentProvider$1({
@@ -51,11 +52,11 @@ declare function unsignedCa(uca: UnsignedContentAttestation, {
51
52
  /**
52
53
  * Content Attestation への署名
53
54
  * @param uca 未署名 Content Attestation オブジェクト
54
- * @param privateKey プライベート鍵
55
+ * @param signer プライベート鍵、または HSM・KMS・WebAuthn等の外部署名者 (JwtSigner)
55
56
  * @throws {BadRequestError} 入力が UnsignedContentAttestation スキーマに適合しない場合/検証対象のコンテンツが存在しない/コンテンツにアクセスできない/Integrityの計算に失敗
56
57
  * @return Content Attestation
57
58
  */
58
- declare function sign$1(uca: UnsignedContentAttestation, privateKey: Jwk, options?: TimingOptions): Promise<string>;
59
+ declare function sign$1(uca: UnsignedContentAttestation, signer: KeyMaterial | JwtSigner, options?: TimingOptions): Promise<string>;
59
60
  /**
60
61
  * CA server 経由で Content Attestation を作成
61
62
  * @param uca 未署名 Content Attestation オブジェクト
@@ -92,10 +93,10 @@ declare function unsignedWsp<U extends UnsignedWebsiteProfileInput>(uwsp: U, opt
92
93
  * 配列を渡した場合、各要素を個別に署名して JWT 文字列の配列を返します。
93
94
  *
94
95
  * @param uwsp 未署名 Website Profile (単一または配列)
95
- * @param privateKey プライベート鍵
96
+ * @param signer プライベート鍵、または HSM・KMS・WebAuthn等の外部署名者 (JwtSigner)
96
97
  * @throws {BadRequestError} 配列入力の整合性違反や入力が UnsignedWebsiteProfile スキーマに適合しない場合
97
98
  * @return 単一入力時は JWT 文字列、配列入力時は JWT 文字列の配列
98
99
  */
99
- declare function sign<U extends UnsignedWebsiteProfileInput>(uwsp: U, privateKey: Jwk, options?: TimingOptions): Promise<U extends unknown[] ? string[] : string>;
100
+ declare function sign<U extends UnsignedWebsiteProfileInput>(uwsp: U, signer: KeyMaterial | JwtSigner, options?: TimingOptions): Promise<U extends unknown[] ? string[] : string>;
100
101
  //#endregion
101
102
  export { content_attestation_d_exports as ContentAttestation, website_profile_d_exports as WebsiteProfile, documentProvider$1 as documentProvider };
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
- import { i as documentProvider, t as content_attestation_exports } from "./content-attestation-DbHCVSbI.js";
2
- import { r as website_profile_exports } from "./website-profile-Brt0iuRN.js";
1
+ import { i as documentProvider, t as content_attestation_exports } from "./content-attestation-BydW0zgM.js";
2
+ import { r as website_profile_exports } from "./website-profile-B_7x7iSY.js";
3
3
  export { content_attestation_exports as ContentAttestation, website_profile_exports as WebsiteProfile, documentProvider };
@@ -44,14 +44,14 @@ async function unsignedWsp(uwsp, options) {
44
44
  * 配列を渡した場合、各要素を個別に署名して JWT 文字列の配列を返します。
45
45
  *
46
46
  * @param uwsp 未署名 Website Profile (単一または配列)
47
- * @param privateKey プライベート鍵
47
+ * @param signer プライベート鍵、または HSM・KMS・WebAuthn等の外部署名者 (JwtSigner)
48
48
  * @throws {BadRequestError} 配列入力の整合性違反や入力が UnsignedWebsiteProfile スキーマに適合しない場合
49
49
  * @return 単一入力時は JWT 文字列、配列入力時は JWT 文字列の配列
50
50
  */
51
- async function sign(uwsp, privateKey, options = {}) {
51
+ async function sign(uwsp, signer, options = {}) {
52
52
  const timing = parseDates(options);
53
53
  try {
54
- return await signWsp(uwsp, privateKey, timing);
54
+ return await signWsp(uwsp, signer, timing);
55
55
  } catch (e) {
56
56
  throw new BadRequestError(e.message, { cause: e });
57
57
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@originator-profile/opvc",
3
- "version": "0.7.0-beta.1",
3
+ "version": "0.7.0-beta.2",
4
4
  "license": "Apache-2.0",
5
5
  "homepage": "https://docs.originator-profile.org",
6
6
  "repository": {
@@ -40,26 +40,25 @@
40
40
  "jose": "^6.2.2",
41
41
  "jsdom": "^29.0.1",
42
42
  "wrap-ansi": "^9.0.2",
43
- "@originator-profile/core": "0.7.0-beta.1",
44
- "@originator-profile/cryptography": "0.7.0-beta.1",
45
- "@originator-profile/model": "0.7.0-beta.1",
46
- "@originator-profile/sign": "0.7.0-beta.1",
47
- "@originator-profile/securing-mechanism": "0.7.0-beta.1"
43
+ "@originator-profile/cryptography": "0.7.0-beta.2",
44
+ "@originator-profile/core": "0.7.0-beta.2",
45
+ "@originator-profile/model": "0.7.0-beta.2",
46
+ "@originator-profile/securing-mechanism": "0.7.0-beta.2",
47
+ "@originator-profile/sign": "0.7.0-beta.2"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@types/node": "25.6.0",
51
- "eslint": "10.2.0",
52
51
  "oclif": "4.23.0",
52
+ "oxlint": "^1.73.0",
53
+ "oxlint-tsgolint": "^0.24.0",
53
54
  "tsdown": "0.21.7",
54
55
  "typescript": "6.0.2",
55
56
  "websri": "1.0.1",
56
- "eslint-config-originator-profile": "0.7.0-beta.1",
57
- "@originator-profile/tsconfig": "0.7.0-beta.1"
57
+ "@originator-profile/tsconfig": "0.7.0-beta.2"
58
58
  },
59
59
  "scripts": {
60
60
  "build": "tsdown && oclif manifest && oclif readme",
61
- "lint": "eslint --fix .",
62
- "type-check": "tsc",
61
+ "lint": "oxlint --fix .",
63
62
  "test": "node --test"
64
63
  },
65
64
  "bin": {