@pierre/storage 1.4.0 → 1.4.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/dist/index.cjs CHANGED
@@ -549,7 +549,7 @@ function concatChunks(a, b) {
549
549
 
550
550
  // package.json
551
551
  var package_default = {
552
- version: "1.4.0"};
552
+ version: "1.4.1"};
553
553
 
554
554
  // src/version.ts
555
555
  var PACKAGE_NAME = "code-storage-sdk";
@@ -1187,6 +1187,9 @@ var ApiFetcher = class {
1187
1187
  }
1188
1188
  };
1189
1189
 
1190
+ // src/types.ts
1191
+ var OP_NO_FORCE_PUSH = "no-force-push";
1192
+
1190
1193
  // src/util.ts
1191
1194
  function timingSafeEqual(a, b) {
1192
1195
  const bufferA = typeof a === "string" ? new TextEncoder().encode(a) : a;
@@ -2811,7 +2814,8 @@ var GitStorage = class _GitStorage {
2811
2814
  repo: repoId,
2812
2815
  scopes: permissions,
2813
2816
  iat: now,
2814
- exp: now + ttl
2817
+ exp: now + ttl,
2818
+ ...options?.ops && options.ops.length > 0 ? { ops: options.ops } : {}
2815
2819
  };
2816
2820
  const key = await jose.importPKCS8(this.options.key, "ES256");
2817
2821
  const jwt = await new jose.SignJWT(payload).setProtectedHeader({ alg: "ES256", typ: "JWT" }).sign(key);
@@ -2825,6 +2829,7 @@ function createClient(options) {
2825
2829
  exports.ApiError = ApiError;
2826
2830
  exports.CodeStorage = GitStorage;
2827
2831
  exports.GitStorage = GitStorage;
2832
+ exports.OP_NO_FORCE_PUSH = OP_NO_FORCE_PUSH;
2828
2833
  exports.RefUpdateError = RefUpdateError;
2829
2834
  exports.createClient = createClient;
2830
2835
  exports.parseSignatureHeader = parseSignatureHeader;