@eudiplo/cli 9.1.0-main.2c15dc1 → 9.1.0-main.2d54936

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/dist/index.js CHANGED
@@ -15088,7 +15088,7 @@ var CONFIG_FORMATS = {
15088
15088
  RegistrarConfig: {
15089
15089
  slug: "registrar-config",
15090
15090
  file: "RegistrarConfigFile",
15091
- version: 1
15091
+ version: 2
15092
15092
  },
15093
15093
  IssuanceConfig: {
15094
15094
  slug: "issuance-config",
@@ -15145,6 +15145,8 @@ function resourceId(input) {
15145
15145
  function bareFileVersion(kind, spec) {
15146
15146
  if (kind === "KeyChain")
15147
15147
  return "type" in spec ? 2 : 1;
15148
+ if (kind === "RegistrarConfig")
15149
+ return "relyingPartyContact" in spec ? 2 : 1;
15148
15150
  if (kind === "KmsConfig") {
15149
15151
  const providers = Array.isArray(spec.providers) ? spec.providers : [];
15150
15152
  return providers.some((provider) => typeof provider === "object" && provider !== null && ("algorithms" in provider || "defaultAlgorithm" in provider)) ? 2 : 1;
@@ -15223,6 +15225,16 @@ var CONFIG_MIGRATIONS = [
15223
15225
  // their default algorithms.
15224
15226
  migrate: (spec) => ({ spec })
15225
15227
  },
15228
+ {
15229
+ id: "registrar-config-v2-relying-party-contact",
15230
+ kind: "RegistrarConfig",
15231
+ from: 1,
15232
+ to: 2,
15233
+ // v2 only adds the optional relyingPartyContact: a v1 spec is a
15234
+ // valid v2 spec, whose relying party is registered without contact
15235
+ // as before.
15236
+ migrate: (spec) => ({ spec })
15237
+ },
15226
15238
  {
15227
15239
  id: "key-chain-v2-type",
15228
15240
  kind: "KeyChain",
@@ -24225,6 +24237,135 @@ var CONFIG_SCHEMAS = [
24225
24237
  }
24226
24238
  }
24227
24239
  },
24240
+ {
24241
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
24242
+ "$id": "https://eudiplo.dev/schemas/v2/RegistrarConfigFile.schema.json",
24243
+ "title": "RegistrarConfigFile",
24244
+ "type": "object",
24245
+ "properties": {
24246
+ "$schema": {
24247
+ "type": "string",
24248
+ "const": "https://eudiplo.dev/schemas/v2/RegistrarConfigFile.schema.json"
24249
+ },
24250
+ "metadata": {
24251
+ "type": "object",
24252
+ "properties": {
24253
+ "generation": {
24254
+ "type": "integer",
24255
+ "minimum": 1,
24256
+ "description": "Monotonically increasing configuration generation."
24257
+ },
24258
+ "ownership": {
24259
+ "type": "string",
24260
+ "enum": [
24261
+ "unmanaged",
24262
+ "file-managed"
24263
+ ],
24264
+ "description": "Requested ownership recorded when the document is applied."
24265
+ }
24266
+ },
24267
+ "additionalProperties": false
24268
+ },
24269
+ "spec": {
24270
+ "$ref": "#/$defs/CreateRegistrarConfigDto"
24271
+ }
24272
+ },
24273
+ "required": [
24274
+ "$schema",
24275
+ "spec"
24276
+ ],
24277
+ "additionalProperties": false,
24278
+ "$defs": {
24279
+ "CreateRegistrarConfigDto": {
24280
+ "type": "object",
24281
+ "properties": {
24282
+ "registrarUrl": {
24283
+ "type": "string",
24284
+ "format": "uri",
24285
+ "description": "Base URL of the registrar service."
24286
+ },
24287
+ "oidcUrl": {
24288
+ "type": "string",
24289
+ "format": "uri",
24290
+ "description": "OIDC discovery or issuer URL used for authentication."
24291
+ },
24292
+ "clientId": {
24293
+ "type": "string",
24294
+ "minLength": 1,
24295
+ "description": "OAuth client ID used against the registrar."
24296
+ },
24297
+ "clientSecret": {
24298
+ "description": "Optional OAuth client secret for registrar authentication.",
24299
+ "type": "string",
24300
+ "minLength": 1
24301
+ },
24302
+ "username": {
24303
+ "type": "string",
24304
+ "minLength": 1,
24305
+ "description": "Username used for registrar authentication."
24306
+ },
24307
+ "password": {
24308
+ "type": "string",
24309
+ "minLength": 1,
24310
+ "description": "Password used for registrar authentication."
24311
+ },
24312
+ "registrationCertificateDefaults": {
24313
+ "description": "Optional default registration certificate values.",
24314
+ "anyOf": [
24315
+ {
24316
+ "type": "object",
24317
+ "propertyNames": {
24318
+ "type": "string"
24319
+ },
24320
+ "additionalProperties": {}
24321
+ },
24322
+ {
24323
+ "type": "null"
24324
+ }
24325
+ ]
24326
+ },
24327
+ "relyingPartyContact": {
24328
+ "description": "Contact of the relying party, sent when EUDIPLO registers the relying party at the registrar. The registrar needs at least one contact value to issue access certificates. A relying party that is already registered keeps its contact.",
24329
+ "anyOf": [
24330
+ {
24331
+ "type": "object",
24332
+ "properties": {
24333
+ "supportUri": {
24334
+ "description": "https URL where the relying party can be contacted.",
24335
+ "type": "string",
24336
+ "format": "uri"
24337
+ },
24338
+ "email": {
24339
+ "description": "Email address of the relying party.",
24340
+ "type": "string",
24341
+ "pattern": "^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}$"
24342
+ },
24343
+ "phone": {
24344
+ "description": "Phone number of the relying party.",
24345
+ "type": "string",
24346
+ "pattern": "^[+0-9()\\-\\s]{5,40}$"
24347
+ }
24348
+ },
24349
+ "additionalProperties": false
24350
+ },
24351
+ {
24352
+ "type": "null"
24353
+ }
24354
+ ]
24355
+ }
24356
+ },
24357
+ "required": [
24358
+ "registrarUrl",
24359
+ "oidcUrl",
24360
+ "clientId",
24361
+ "username",
24362
+ "password"
24363
+ ],
24364
+ "additionalProperties": false,
24365
+ "title": "CreateRegistrarConfigDto"
24366
+ }
24367
+ }
24368
+ },
24228
24369
  {
24229
24370
  "$schema": "https://json-schema.org/draft/2020-12/schema",
24230
24371
  "$id": "https://eudiplo.dev/schemas/v3/IssuanceConfigFile.schema.json",
@@ -29183,7 +29324,7 @@ function createDeploymentCommands(context, setExitCode) {
29183
29324
  // package.json
29184
29325
  var package_default = {
29185
29326
  name: "@eudiplo/cli",
29186
- version: "9.1.0-main.2c15dc1",
29327
+ version: "9.1.0-main.2d54936",
29187
29328
  description: "Deployment-aware command line tools for EUDIPLO",
29188
29329
  private: false,
29189
29330
  type: "module",
@@ -29198,11 +29339,12 @@ var package_default = {
29198
29339
  scripts: {
29199
29340
  "assets:sync": "node scripts/sync-cli-assets.cjs",
29200
29341
  "assets:check": "node scripts/check-cli-assets.cjs",
29342
+ "build:deps": 'pnpm --silent --filter "@eudiplo/cli^..." build',
29201
29343
  build: "pnpm assets:sync && pnpm assets:check && tsc -p tsconfig.json",
29202
29344
  "build:publish": "pnpm build && esbuild src/index.ts --bundle --platform=node --format=esm --target=node22.12 --alias:jsonc-parser=jsonc-parser/lib/esm/main.js --outfile=dist/index.js",
29203
29345
  "build:sea:bundle": "pnpm assets:sync && pnpm assets:check && esbuild src/index.ts --bundle --platform=node --format=esm --target=node22.12 --alias:jsonc-parser=jsonc-parser/lib/esm/main.js --outfile=dist-sea/index.js",
29204
29346
  "build:sea": "node scripts/build-cli-sea.mjs",
29205
- dev: "tsx src/index.ts",
29347
+ dev: "pnpm -s build:deps && tsx src/index.ts",
29206
29348
  test: "vitest run --root ../.. --project cli",
29207
29349
  lint: "biome lint .",
29208
29350
  format: "biome format --write .",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eudiplo/cli",
3
- "version": "9.1.0-main.2c15dc1",
3
+ "version": "9.1.0-main.2d54936",
4
4
  "description": "Deployment-aware command line tools for EUDIPLO",
5
5
  "private": false,
6
6
  "type": "module",
@@ -15,11 +15,12 @@
15
15
  "scripts": {
16
16
  "assets:sync": "node scripts/sync-cli-assets.cjs",
17
17
  "assets:check": "node scripts/check-cli-assets.cjs",
18
+ "build:deps": "pnpm --silent --filter \"@eudiplo/cli^...\" build",
18
19
  "build": "pnpm assets:sync && pnpm assets:check && tsc -p tsconfig.json",
19
20
  "build:publish": "pnpm build && esbuild src/index.ts --bundle --platform=node --format=esm --target=node22.12 --alias:jsonc-parser=jsonc-parser/lib/esm/main.js --outfile=dist/index.js",
20
21
  "build:sea:bundle": "pnpm assets:sync && pnpm assets:check && esbuild src/index.ts --bundle --platform=node --format=esm --target=node22.12 --alias:jsonc-parser=jsonc-parser/lib/esm/main.js --outfile=dist-sea/index.js",
21
22
  "build:sea": "node scripts/build-cli-sea.mjs",
22
- "dev": "tsx src/index.ts",
23
+ "dev": "pnpm -s build:deps && tsx src/index.ts",
23
24
  "test": "vitest run --root ../.. --project cli",
24
25
  "lint": "biome lint .",
25
26
  "format": "biome format --write .",
@@ -46,6 +46,35 @@
46
46
  "type": "null"
47
47
  }
48
48
  ]
49
+ },
50
+ "relyingPartyContact": {
51
+ "description": "Contact of the relying party, sent when EUDIPLO registers the relying party at the registrar. The registrar needs at least one contact value to issue access certificates. A relying party that is already registered keeps its contact.",
52
+ "anyOf": [
53
+ {
54
+ "type": "object",
55
+ "properties": {
56
+ "supportUri": {
57
+ "description": "https URL where the relying party can be contacted.",
58
+ "type": "string",
59
+ "format": "uri"
60
+ },
61
+ "email": {
62
+ "description": "Email address of the relying party.",
63
+ "type": "string",
64
+ "pattern": "^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}$"
65
+ },
66
+ "phone": {
67
+ "description": "Phone number of the relying party.",
68
+ "type": "string",
69
+ "pattern": "^[+0-9()\\-\\s]{5,40}$"
70
+ }
71
+ },
72
+ "additionalProperties": false
73
+ },
74
+ {
75
+ "type": "null"
76
+ }
77
+ ]
49
78
  }
50
79
  },
51
80
  "required": [
@@ -9,7 +9,7 @@
9
9
  "properties": {
10
10
  "$schema": {
11
11
  "type": "string",
12
- "const": "https://eudiplo.dev/schemas/v1/RegistrarConfigFile.schema.json"
12
+ "const": "https://eudiplo.dev/schemas/v2/RegistrarConfigFile.schema.json"
13
13
  },
14
14
  "metadata": {
15
15
  "type": "object",
@@ -39,6 +39,106 @@
39
39
  "spec"
40
40
  ],
41
41
  "additionalProperties": false
42
+ },
43
+ {
44
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
45
+ "$id": "https://eudiplo.dev/schemas/v1/RegistrarConfigFile.schema.json",
46
+ "title": "RegistrarConfigFile",
47
+ "type": "object",
48
+ "properties": {
49
+ "$schema": {
50
+ "type": "string",
51
+ "const": "https://eudiplo.dev/schemas/v1/RegistrarConfigFile.schema.json"
52
+ },
53
+ "metadata": {
54
+ "type": "object",
55
+ "properties": {
56
+ "generation": {
57
+ "type": "integer",
58
+ "minimum": 1,
59
+ "description": "Monotonically increasing configuration generation."
60
+ },
61
+ "ownership": {
62
+ "type": "string",
63
+ "enum": [
64
+ "unmanaged",
65
+ "file-managed"
66
+ ],
67
+ "description": "Requested ownership recorded when the document is applied."
68
+ }
69
+ },
70
+ "additionalProperties": false
71
+ },
72
+ "spec": {
73
+ "$ref": "#/$defs/CreateRegistrarConfigDto"
74
+ }
75
+ },
76
+ "required": [
77
+ "$schema",
78
+ "spec"
79
+ ],
80
+ "additionalProperties": false,
81
+ "$defs": {
82
+ "CreateRegistrarConfigDto": {
83
+ "type": "object",
84
+ "properties": {
85
+ "registrarUrl": {
86
+ "type": "string",
87
+ "format": "uri",
88
+ "description": "Base URL of the registrar service."
89
+ },
90
+ "oidcUrl": {
91
+ "type": "string",
92
+ "format": "uri",
93
+ "description": "OIDC discovery or issuer URL used for authentication."
94
+ },
95
+ "clientId": {
96
+ "type": "string",
97
+ "minLength": 1,
98
+ "description": "OAuth client ID used against the registrar."
99
+ },
100
+ "clientSecret": {
101
+ "description": "Optional OAuth client secret for registrar authentication.",
102
+ "type": "string",
103
+ "minLength": 1
104
+ },
105
+ "username": {
106
+ "type": "string",
107
+ "minLength": 1,
108
+ "description": "Username used for registrar authentication."
109
+ },
110
+ "password": {
111
+ "type": "string",
112
+ "minLength": 1,
113
+ "description": "Password used for registrar authentication."
114
+ },
115
+ "registrationCertificateDefaults": {
116
+ "description": "Optional default registration certificate values.",
117
+ "anyOf": [
118
+ {
119
+ "type": "object",
120
+ "propertyNames": {
121
+ "type": "string"
122
+ },
123
+ "additionalProperties": {}
124
+ },
125
+ {
126
+ "type": "null"
127
+ }
128
+ ]
129
+ }
130
+ },
131
+ "required": [
132
+ "registrarUrl",
133
+ "oidcUrl",
134
+ "clientId",
135
+ "username",
136
+ "password"
137
+ ],
138
+ "additionalProperties": false,
139
+ "title": "CreateRegistrarConfigDto"
140
+ }
141
+ }
42
142
  }
43
143
  ]
44
144
  }