@shard-for-obsidian/lib 0.2.3 → 0.2.4
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 +5 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -19,10 +19,10 @@ pnpm add shard-lib
|
|
|
19
19
|
## Usage
|
|
20
20
|
|
|
21
21
|
```typescript
|
|
22
|
-
import { OciRegistryClient, parseRepoAndRef } from
|
|
22
|
+
import { OciRegistryClient, parseRepoAndRef } from "shard-lib";
|
|
23
23
|
|
|
24
24
|
// Parse a repository reference
|
|
25
|
-
const repo = parseRepoAndRef(
|
|
25
|
+
const repo = parseRepoAndRef("ghcr.io/owner/repo:latest");
|
|
26
26
|
console.log(repo.index.name); // 'ghcr.io'
|
|
27
27
|
console.log(repo.tag); // 'latest'
|
|
28
28
|
|
|
@@ -30,15 +30,15 @@ console.log(repo.tag); // 'latest'
|
|
|
30
30
|
const client = new OciRegistryClient({
|
|
31
31
|
repo: repo,
|
|
32
32
|
adapter: { fetch },
|
|
33
|
-
username:
|
|
34
|
-
password:
|
|
33
|
+
username: "user",
|
|
34
|
+
password: "token",
|
|
35
35
|
});
|
|
36
36
|
|
|
37
37
|
// List tags
|
|
38
38
|
const tags = await client.listTags();
|
|
39
39
|
|
|
40
40
|
// Get manifest
|
|
41
|
-
const manifest = await client.getManifest(
|
|
41
|
+
const manifest = await client.getManifest("latest");
|
|
42
42
|
```
|
|
43
43
|
|
|
44
44
|
## Project Structure
|
|
@@ -73,5 +73,3 @@ src/
|
|
|
73
73
|
### Types
|
|
74
74
|
|
|
75
75
|
See TypeScript definitions for complete type information.
|
|
76
|
-
|
|
77
|
-
|