@pierre/storage 1.2.1 → 1.2.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pierre/storage",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "Pierre Git Storage SDK",
5
5
  "repository": {
6
6
  "type": "git",
package/src/index.ts CHANGED
@@ -635,6 +635,15 @@ class RepoImpl implements Repo {
635
635
  return url.toString();
636
636
  }
637
637
 
638
+ async getImportRemoteURL(urlOptions?: GetRemoteURLOptions): Promise<string> {
639
+ const url = new URL(
640
+ `https://${this.options.storageBaseUrl}/${this.id}+import.git`
641
+ );
642
+ url.username = `t`;
643
+ url.password = await this.generateJWT(this.id, urlOptions);
644
+ return url.toString();
645
+ }
646
+
638
647
  async getFileStream(options: GetFileOptions): Promise<Response> {
639
648
  const ttl = resolveInvocationTtlSeconds(options, DEFAULT_TOKEN_TTL_SECONDS);
640
649
  const jwt = await this.generateJWT(this.id, {
package/src/types.ts CHANGED
@@ -48,6 +48,7 @@ export interface Repo {
48
48
  createdAt: string;
49
49
  getRemoteURL(options?: GetRemoteURLOptions): Promise<string>;
50
50
  getEphemeralRemoteURL(options?: GetRemoteURLOptions): Promise<string>;
51
+ getImportRemoteURL(options?: GetRemoteURLOptions): Promise<string>;
51
52
 
52
53
  getFileStream(options: GetFileOptions): Promise<Response>;
53
54
  getArchiveStream(options?: ArchiveOptions): Promise<Response>;