You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add publication time to registry package release metadata (#6407) (#6413)
* Add publication time to registry package release metadata
Motivation:
Registry should have information about how a package was published. This includes who published it, who signed it, and when it was published.
- "Who published the package release?": this is `metadata.author`, which is already defined in the metadata JSON schema.
- "Who signed the package release?": this can be extracted from the signing certificate if signed (requires rdar://107483043 and will be done in separate PR)
- "When was the release published?": added in this PR
rdar://106674475
Modifications:
- Add `originalPublicationTime` to user-provided metadata during publication
- Add `publishedAt` to registry's package release metadata response
- Update registry API spec
* Add publishedAt to PackageSearchClient
|`id`| String | The namespaced package identifier. | ✓ |
480
+
|`version`| String | The package release version number. | ✓ |
481
+
|`resources`| Array | The resources available for the release. | ✓ |
482
+
|`metadata`| Object | Additional information about the release. | ✓ |
483
+
|`publishedAt`| String | The [ISO 8601]-formatted datetime string of when the package release was published, as recorded by the registry. See related [`originalPublicationTime`](#appendix-b---package-release-metadata-json-schema) in `metadata`. ||
481
484
482
485
A server SHOULD respond with a `Link` header containing the following entries:
483
486
@@ -520,7 +523,8 @@ with a given combination of `name` and `type` values.
520
523
521
524
#### 4.2.2. Package release metadata standards
522
525
523
-
SE-391 defines the [JSON schema] for package release metadata that
|`author`|[Author](#author-type)| Author of the package release. ||
1817
+
|`description`| String | A description of the package release. ||
1818
+
|`licenseURL`| String | URL of the package release's license document. ||
1819
+
|`originalPublicationTime`| String | Original publication time of the package release in [ISO 8601] format. This can be set if the package release was previously published elsewhere.<br>A registry should record the publication time independently and include it as `publishedAt` in the [package release metadata response](#42-fetch-information-about-a-package-release). <br>In case both `originalPublicationTime` and `publishedAt` are set, `originalPublicationTime` should be used. ||
1820
+
|`readmeURL`| String | URL of the README specifically for the package release or broadly for the package. ||
1821
+
|`repositoryURLs`| Array | Code repository URL(s) of the package. It is recommended to include all URL variations (e.g., SSH, HTTPS) for the same repository. This can be an empty array if the package does not have source control representation.<br/>Setting this property is one way through which a registry can obtain repository URL to package identifier mappings for the ["lookup package identifiers registered for a URL" API](https://github.com/apple/swift-package-manager/blob/main/Documentation/Registry.md#45-lookup-package-identifiers-registered-for-a-url). A registry may choose other mechanism(s) for package authors to specify such mappings. ||
0 commit comments