@clef-sh/core 0.1.19 → 0.1.20-beta.143

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.mjs CHANGED
@@ -30,9 +30,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
30
30
  mod
31
31
  ));
32
32
 
33
- // node_modules/signal-exit/dist/cjs/signals.js
33
+ // ../../node_modules/write-file-atomic/node_modules/signal-exit/dist/cjs/signals.js
34
34
  var require_signals = __commonJS({
35
- "node_modules/signal-exit/dist/cjs/signals.js"(exports) {
35
+ "../../node_modules/write-file-atomic/node_modules/signal-exit/dist/cjs/signals.js"(exports) {
36
36
  "use strict";
37
37
  Object.defineProperty(exports, "__esModule", { value: true });
38
38
  exports.signals = void 0;
@@ -61,9 +61,9 @@ var require_signals = __commonJS({
61
61
  }
62
62
  });
63
63
 
64
- // node_modules/signal-exit/dist/cjs/index.js
64
+ // ../../node_modules/write-file-atomic/node_modules/signal-exit/dist/cjs/index.js
65
65
  var require_cjs = __commonJS({
66
- "node_modules/signal-exit/dist/cjs/index.js"(exports) {
66
+ "../../node_modules/write-file-atomic/node_modules/signal-exit/dist/cjs/index.js"(exports) {
67
67
  "use strict";
68
68
  var _a;
69
69
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -296,9 +296,9 @@ var require_cjs = __commonJS({
296
296
  }
297
297
  });
298
298
 
299
- // node_modules/write-file-atomic/lib/index.js
299
+ // ../../node_modules/write-file-atomic/lib/index.js
300
300
  var require_lib = __commonJS({
301
- "node_modules/write-file-atomic/lib/index.js"(exports, module) {
301
+ "../../node_modules/write-file-atomic/lib/index.js"(exports, module) {
302
302
  "use strict";
303
303
  module.exports = writeFile;
304
304
  module.exports.sync = writeFileSync7;
@@ -2122,6 +2122,7 @@ var ClefError = class extends Error {
2122
2122
  this.fix = fix;
2123
2123
  this.name = "ClefError";
2124
2124
  }
2125
+ fix;
2125
2126
  };
2126
2127
  var ManifestValidationError = class extends ClefError {
2127
2128
  constructor(message, field) {
@@ -2129,6 +2130,7 @@ var ManifestValidationError = class extends ClefError {
2129
2130
  this.field = field;
2130
2131
  this.name = "ManifestValidationError";
2131
2132
  }
2133
+ field;
2132
2134
  };
2133
2135
  var SopsDecryptionError = class extends ClefError {
2134
2136
  constructor(message, filePath) {
@@ -2139,6 +2141,7 @@ var SopsDecryptionError = class extends ClefError {
2139
2141
  this.filePath = filePath;
2140
2142
  this.name = "SopsDecryptionError";
2141
2143
  }
2144
+ filePath;
2142
2145
  };
2143
2146
  var SopsEncryptionError = class extends ClefError {
2144
2147
  constructor(message, filePath) {
@@ -2149,6 +2152,7 @@ var SopsEncryptionError = class extends ClefError {
2149
2152
  this.filePath = filePath;
2150
2153
  this.name = "SopsEncryptionError";
2151
2154
  }
2155
+ filePath;
2152
2156
  };
2153
2157
  var SopsKeyNotFoundError = class extends ClefError {
2154
2158
  constructor(message) {
@@ -2168,6 +2172,7 @@ var PolicyValidationError = class extends ClefError {
2168
2172
  this.field = field;
2169
2173
  this.name = "PolicyValidationError";
2170
2174
  }
2175
+ field;
2171
2176
  };
2172
2177
  var SchemaLoadError = class extends ClefError {
2173
2178
  constructor(message, filePath) {
@@ -2178,6 +2183,7 @@ var SchemaLoadError = class extends ClefError {
2178
2183
  this.filePath = filePath;
2179
2184
  this.name = "SchemaLoadError";
2180
2185
  }
2186
+ filePath;
2181
2187
  };
2182
2188
  var SopsMissingError = class extends ClefError {
2183
2189
  constructor(installHint) {
@@ -2189,6 +2195,7 @@ Then run clef doctor to verify your setup.`
2189
2195
  this.installHint = installHint;
2190
2196
  this.name = "SopsMissingError";
2191
2197
  }
2198
+ installHint;
2192
2199
  };
2193
2200
  var SopsVersionError = class extends ClefError {
2194
2201
  constructor(installed, required, installHint) {
@@ -2202,6 +2209,9 @@ Then run clef doctor to verify your setup.`
2202
2209
  this.installHint = installHint;
2203
2210
  this.name = "SopsVersionError";
2204
2211
  }
2212
+ installed;
2213
+ required;
2214
+ installHint;
2205
2215
  };
2206
2216
  function isKmsEnvelope(cfg) {
2207
2217
  return cfg.kms !== void 0;
@@ -2213,6 +2223,7 @@ var CloudApiError = class extends ClefError {
2213
2223
  this.statusCode = statusCode;
2214
2224
  this.name = "CloudApiError";
2215
2225
  }
2226
+ statusCode;
2216
2227
  };
2217
2228
 
2218
2229
  // src/manifest/parser.ts
@@ -3000,6 +3011,7 @@ var ScanRunner = class {
3000
3011
  constructor(runner) {
3001
3012
  this.runner = runner;
3002
3013
  }
3014
+ runner;
3003
3015
  /**
3004
3016
  * Scan tracked (or staged) files for secret-like values and unencrypted matrix files.
3005
3017
  *
@@ -3711,6 +3723,7 @@ var BulkOps = class {
3711
3723
  constructor(tx) {
3712
3724
  this.tx = tx;
3713
3725
  }
3726
+ tx;
3714
3727
  /**
3715
3728
  * Set a key to different values in multiple environments at once.
3716
3729
  *
@@ -3854,6 +3867,7 @@ var GitIntegration = class {
3854
3867
  constructor(runner) {
3855
3868
  this.runner = runner;
3856
3869
  }
3870
+ runner;
3857
3871
  /**
3858
3872
  * Stage one or more file paths with `git add`.
3859
3873
  *
@@ -4237,6 +4251,7 @@ var TransactionLockError = class extends Error {
4237
4251
  this.holderPid = holderPid;
4238
4252
  this.name = "TransactionLockError";
4239
4253
  }
4254
+ holderPid;
4240
4255
  };
4241
4256
  var TransactionPreflightError = class extends Error {
4242
4257
  constructor(reason, message, hint) {
@@ -4245,6 +4260,8 @@ var TransactionPreflightError = class extends Error {
4245
4260
  this.hint = hint;
4246
4261
  this.name = "TransactionPreflightError";
4247
4262
  }
4263
+ reason;
4264
+ hint;
4248
4265
  };
4249
4266
  var TransactionRollbackError = class extends Error {
4250
4267
  constructor(originalError, rollbackOk, message) {
@@ -4253,6 +4270,8 @@ var TransactionRollbackError = class extends Error {
4253
4270
  this.rollbackOk = rollbackOk;
4254
4271
  this.name = "TransactionRollbackError";
4255
4272
  }
4273
+ originalError;
4274
+ rollbackOk;
4256
4275
  };
4257
4276
 
4258
4277
  // src/tx/transaction-manager.ts
@@ -4267,6 +4286,7 @@ var TransactionManager = class {
4267
4286
  constructor(git) {
4268
4287
  this.git = git;
4269
4288
  }
4289
+ git;
4270
4290
  async run(repoRoot, opts) {
4271
4291
  const shouldCommit = opts.commit !== false;
4272
4292
  const allowDirty = opts.allowDirty === true;
@@ -4665,6 +4685,9 @@ var SopsClient = class {
4665
4685
  this.sopsCommand = sopsPath ?? resolveSopsPath().path;
4666
4686
  this.keyserviceArgs = keyserviceAddr ? Object.freeze(["--enable-local-keyservice=false", "--keyservice", keyserviceAddr]) : Object.freeze([]);
4667
4687
  }
4688
+ runner;
4689
+ ageKeyFile;
4690
+ ageKey;
4668
4691
  sopsCommand;
4669
4692
  keyserviceArgs;
4670
4693
  buildSopsEnv() {
@@ -5216,6 +5239,9 @@ var LintRunner = class {
5216
5239
  this.schemaValidator = schemaValidator;
5217
5240
  this.sopsClient = sopsClient;
5218
5241
  }
5242
+ matrixManager;
5243
+ schemaValidator;
5244
+ sopsClient;
5219
5245
  /**
5220
5246
  * Lint the entire matrix: check missing files, schema errors, SOPS integrity,
5221
5247
  * single-recipient warnings, and cross-environment key drift.
@@ -5757,6 +5783,8 @@ var ImportRunner = class {
5757
5783
  this.sopsClient = sopsClient;
5758
5784
  this.tx = tx;
5759
5785
  }
5786
+ sopsClient;
5787
+ tx;
5760
5788
  /**
5761
5789
  * Parse a source file and import its key/value pairs into a target `namespace/environment` cell.
5762
5790
  *
@@ -5913,6 +5941,9 @@ var RecipientManager = class {
5913
5941
  this.matrixManager = matrixManager;
5914
5942
  this.tx = tx;
5915
5943
  }
5944
+ encryption;
5945
+ matrixManager;
5946
+ tx;
5916
5947
  /**
5917
5948
  * List all age recipients declared in the manifest.
5918
5949
  *
@@ -6355,6 +6386,10 @@ var ReportGenerator = class {
6355
6386
  this.matrixManager = matrixManager;
6356
6387
  this.schemaValidator = schemaValidator;
6357
6388
  }
6389
+ runner;
6390
+ sopsClient;
6391
+ matrixManager;
6392
+ schemaValidator;
6358
6393
  /**
6359
6394
  * Generate a full {@link ClefReport} for the given repository root.
6360
6395
  * Each section gathers data independently — partial failures return empty
@@ -6766,6 +6801,7 @@ var SopsMergeDriver = class {
6766
6801
  constructor(sopsClient) {
6767
6802
  this.sopsClient = sopsClient;
6768
6803
  }
6804
+ sopsClient;
6769
6805
  /**
6770
6806
  * Perform a three-way merge on three in-memory key/value maps.
6771
6807
  *
@@ -6963,6 +6999,9 @@ var ServiceIdentityManager = class {
6963
6999
  this.matrixManager = matrixManager;
6964
7000
  this.tx = tx;
6965
7001
  }
7002
+ encryption;
7003
+ matrixManager;
7004
+ tx;
6966
7005
  /**
6967
7006
  * Compute repo-relative paths for a set of cells plus the manifest. Used
6968
7007
  * to seed TransactionManager.run's `paths` argument.
@@ -7498,6 +7537,9 @@ var StructureManager = class {
7498
7537
  this.encryption = encryption;
7499
7538
  this.tx = tx;
7500
7539
  }
7540
+ matrixManager;
7541
+ encryption;
7542
+ tx;
7501
7543
  // ── add ──────────────────────────────────────────────────────────────────
7502
7544
  /**
7503
7545
  * Add a new namespace to the manifest and scaffold an empty encrypted cell
@@ -8068,6 +8110,7 @@ var FilePackOutput = class {
8068
8110
  constructor(outputPath) {
8069
8111
  this.outputPath = outputPath;
8070
8112
  }
8113
+ outputPath;
8071
8114
  async write(_artifact, json) {
8072
8115
  const outputDir = path23.dirname(this.outputPath);
8073
8116
  if (!fs19.existsSync(outputDir)) {
@@ -8181,6 +8224,9 @@ var ArtifactPacker = class {
8181
8224
  this.matrixManager = matrixManager;
8182
8225
  this.kms = kms;
8183
8226
  }
8227
+ encryption;
8228
+ matrixManager;
8229
+ kms;
8184
8230
  /**
8185
8231
  * Pack an artifact: decrypt scoped SOPS files, age-encrypt the merged
8186
8232
  * values to the service identity's recipient, and write a JSON envelope.
@@ -8495,6 +8541,8 @@ var BackendMigrator = class {
8495
8541
  this.decryptBackend = encryption;
8496
8542
  this.encryptBackend = targetEncryption ?? encryption;
8497
8543
  }
8544
+ matrixManager;
8545
+ tx;
8498
8546
  decryptBackend;
8499
8547
  encryptBackend;
8500
8548
  async migrate(manifest, repoRoot, options, onProgress) {
@@ -8678,6 +8726,10 @@ var ResetManager = class {
8678
8726
  this.schemaValidator = schemaValidator;
8679
8727
  this.tx = tx;
8680
8728
  }
8729
+ matrixManager;
8730
+ encryption;
8731
+ schemaValidator;
8732
+ tx;
8681
8733
  async reset(opts, manifest, repoRoot) {
8682
8734
  validateResetScope(opts.scope, manifest);
8683
8735
  validateBackendKeyCombination(opts.backend, opts.key);
@@ -8873,6 +8925,9 @@ var SyncManager = class {
8873
8925
  this.encryption = encryption;
8874
8926
  this.tx = tx;
8875
8927
  }
8928
+ matrixManager;
8929
+ encryption;
8930
+ tx;
8876
8931
  /**
8877
8932
  * Compute what sync would do without mutating anything.
8878
8933
  */
@@ -9091,6 +9146,7 @@ var PolicyEvaluator = class {
9091
9146
  constructor(policy) {
9092
9147
  this.policy = policy;
9093
9148
  }
9149
+ policy;
9094
9150
  /**
9095
9151
  * Evaluate a single encrypted file's per-key rotation state.
9096
9152
  *