@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pierre/storage",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "description": "Pierre Git Storage SDK",
5
5
  "repository": {
6
6
  "type": "git",
package/src/index.ts CHANGED
@@ -1849,6 +1849,7 @@ export class GitStorage {
1849
1849
  scopes: permissions,
1850
1850
  iat: now,
1851
1851
  exp: now + ttl,
1852
+ ...(options?.ops && options.ops.length > 0 ? { ops: options.ops } : {}),
1852
1853
  };
1853
1854
 
1854
1855
  // Sign the JWT with the key as the secret
package/src/types.ts CHANGED
@@ -41,9 +41,18 @@ export interface GitStorageOptions extends OverrideableGitStorageOptions {
41
41
 
42
42
  export type ValidAPIVersion = 1;
43
43
 
44
+ /** A policy operation included in the JWT. */
45
+ export type Op = string;
46
+
47
+ export const OP_NO_FORCE_PUSH: Op = 'no-force-push';
48
+
49
+ /** A list of policy operations. */
50
+ export type Ops = Op[];
51
+
44
52
  export interface GetRemoteURLOptions {
45
53
  permissions?: ('git:write' | 'git:read' | 'repo:write' | 'org:read')[];
46
54
  ttl?: number;
55
+ ops?: Ops;
47
56
  }
48
57
 
49
58
  export interface Repo {