@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/README.md +18 -1
- package/dist/index.cjs +9 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +9 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +9 -0
- package/src/types.ts +1 -0
package/package.json
CHANGED
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>;
|