I2D System
Script para descargar los boletines judiciales en México.
An update to teacher's archaic HTML page for form elements
Platform to share your dreams
Videojuego que busca ayudar a los niños a aprender sobre la higiene
School project that consists of a jeopardy for teachers to use in their classes
PatoBeltran/metodos-numericos 1
Repositorio que albergara una cantidad de métodos numéricos que serán realizados como parte del curso "Métodos numéricos en la Ingeniería".
Site for trying to give information of political candidates to citizens
Repositorio de Buzón Legal
Web APP Roady
pull request commentNuGet/NuGetGallery
[Stats]Enable Alternate storage for downloads.v1.json
The idea is to support sourcing downloads.v1.json from multiple locations. This way, we can have multiple generators of downloads.v1.json and allow all to operate without clobbering each other.
comment created time in a day
pull request commentNuGet/NuGetGallery
[Stats]Enable Alternate storage for downloads.v1.json
I must have missed a design spec or something -- what's the motivation here? Are we moving the file and this allows side-by-side?
comment created time in a day
issue openedNuGet/NuGetGallery
Add Cake instructions for NuGet packages
Background
Cake (C# Make) is a free and open source cross-platform build automation system with a C# DSL for tasks such as compiling code, copying files and folders, running unit tests, compressing files and building NuGet packages.
Cake is widely used by thousands of open-source projects, is the third most downloaded .NET tool at the moment with over 4 million downloads, has a healthy community of contributors, and is a member of the .NET Foundation.
One of the features of Cake is the ability to consume NuGet packages from any NuGet compatible feed, and leverage them in the build orchestration process. For example, within a Cake build, a user can reference the Polly NuGet package, and leverage all of its features, defining and executing different Polly policies.
NuGet packages can be used in Cake in a variety of ways:
-
As a regular NuGet package (Package Reference, packages.config, NuGet Package Manager UI, etc.) on a Console application.
-
As a Cake Addin (
#addin
). In short, this means: Download the NuGet package, and load the assemblies within it into the host process executing the build process. Virtually any NuGet package containing .NET assembly(ies) can be loaded as a Cake Addin. e.g.#addin nuget:?package=Polly&version=7.2.1
-
As a Cake Tool (
#tool
). In short, this means: Download the NuGet package, and extract its contents to a folder, so that its files become available to the build process. Virtually any NuGet package can be loaded as a Cake Tool. e.g.#tool nuget:?package=7-Zip.CommandLine&version=18.1.0
-
As a Cake Module (
#module
). In short, this is very similar to Cake Addin, with the exception that modules are loaded earlier in the lifecycle and can replace and/or add Cake features that can be leveraged by the build process later. e.g.#module nuget:?package=Cake.Npm.Module&version=0.1.0
-
As a Cake Recipe (
#load
). In short, this means: Download a NuGet package containing Cake scripts, and merge these scripts into the current build, allowing for sharing of reusable snippets of code. e.g.#load nuget:?package=Cake.Recipe&version=2.1.0
Proposal
We'd like to display installation instructions on how to use NuGet packages with Cake, in the NuGet Gallery, on a new tab with the title "Cake Build", which would display a tailored set of instructions if a package is detected as being built specifically for use with Cake (Cake Extension) or generic instructions otherwise.
The criteria we'd like to use for detecting if a package as built specifically for use with Cake would be the presence of specific tags
in the package metadata:
Cake Addin
- If a package contains the tag
cake-addin
, we assume its author meant for this package to be consumed as a Cake Addin. As such we would show a tailored instruction to install as a Cake Addin:
Cake Module
- If a package contains the tag
cake-module
, we assume its author meant for this package to be consumed as a Cake Module . As such we would show a tailored instruction to install as a Cake Module:
Cake Recipe
- If a package contains the tag
cake-recipe
, we assume its author meant for this package to be consumed as a Cake Recipe. As such we would show a tailored instruction to install as a Cake Recipe:
Other packages
- If a package does not contain any of the known
cake-
tags, we'd display generic instructions for the user to consume the package either as a Cake Addin or as a Cake Tool, and leave it to the user to choose what is more appropriate for their scenario.
3rd-Party NuGet client listing criteria
We believe Cake meets all the criteria for being listed as a 3rd-party client on nuget.org:
- :white_check_mark: Significant adoption in .NET community: Cake is widely used by thousands of open-source projects, is the third most downloaded .NET tool at the moment with over 4 (four) million downloads
- :white_check_mark: Cake is actively maintained and updated: Cake published over
110
releases since 2014 (with10
releases in 2020), has a healthy community of contributors, and is a member of the .NET Foundation - :white_check_mark: Security compliance: Cake is compliant with the latest security requirements as implemented by NuGet.org
Implementation
Members of the Cake team would send one or more pull-requests to implement the final design that ends up being agreed, based on the above.
/cc @joelverhagen @anangaur, @jcjiang
created time in a day
push eventNuGet/NuGetGallery
commit sha f9e3cbcbe6f403524c20087fca1d41ddb459b057
Stub new config to account deleter.
push time in a day
PR opened NuGet/NuGetGallery
Enables (behind a feature flag) support for allowing an alternate location for downloads.v1.json source.
pr created time in a day
push eventNuGet/NuGetGallery
commit sha c7c40230a2b709c134f08ab77d94d4b656944342
Add setting for alternate stats storage
push time in a day
push eventNuGet/NuGetGallery
commit sha 1b366b58a288f6d344fc38af1ab45687cdcf8302
a
commit sha 61b332c1c9a8d56ba53126e79fcebc43c4a06535
a
push time in a day
Pull request review commentNuGet/NuGetGallery
Gallery store/fetch/delete embedded readmes file from flat container
+// Copyright (c) .NET Foundation. All rights reserved.+// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.++using System;+using System.IO;+using System.Threading.Tasks;+using NuGet.Packaging;+using NuGet.Services.Entities;+using NuGetGallery.Packaging;++namespace NuGetGallery+{+ public class CoreReadmeFileService : ICoreReadmeFileService+ {+ private const string ReadmeFileName = "readme";++ private readonly ICoreFileStorageService _fileStorageService;+ private readonly IContentFileMetadataService _metadata;++ public CoreReadmeFileService(ICoreFileStorageService fileStorageService, IContentFileMetadataService metadata)+ {+ _fileStorageService = fileStorageService ?? throw new ArgumentNullException(nameof(fileStorageService));+ _metadata = metadata ?? throw new ArgumentNullException(nameof(metadata));+ }++ /// <summary>+ /// Saves the package readme.md file to storage. This method should throw if the package+ /// does not have an embedded readme file + /// </summary>+ /// <param name="package">The package associated with the readme.</param>+ /// <param name="readmeFile">The content of readme file.</param>+ public Task SaveReadmeFileAsync(Package package, Stream readmeFile)+ {+ if (package == null)+ {+ throw new ArgumentNullException(nameof(package));+ }++ if (readmeFile == null)+ {+ throw new ArgumentNullException(nameof(readmeFile));+ }++ if (package.EmbeddedReadmeType == EmbeddedReadmeFileType.Absent)+ {+ throw new ArgumentException("Package must have an embedded readme", nameof(package));+ }++ var fileName = BuildReadmeFileName(package);++ return _fileStorageService.SaveFileAsync(_metadata.PackageContentFolderName, fileName, readmeFile, overwrite: true);+ }++ /// <summary>+ /// Save the readme file from package stream. This method should throw if the package+ /// does not have an embedded readme file + /// </summary>+ /// <param name="package">Package information.</param>+ /// <param name="packageStream">Package stream with .nupkg contents.</param>+ public async Task ExtractAndSaveReadmeFileAsync(Package package, Stream packageStream)+ {+ if (package == null)+ {+ throw new ArgumentNullException(nameof(package));+ }++ if (packageStream == null)+ {+ throw new ArgumentNullException(nameof(packageStream));+ }++ packageStream.Seek(0, SeekOrigin.Begin);+ using (var packageArchiveReader = new PackageArchiveReader(packageStream, leaveStreamOpen: true))+ {+ var packageMetadata = PackageMetadata.FromNuspecReader(packageArchiveReader.GetNuspecReader(), strict: true);+ if (string.IsNullOrWhiteSpace(packageMetadata.ReadmeFile))+ {+ throw new InvalidOperationException("No readme file specified in the nuspec");+ }++ var filename = FileNameHelper.GetZipEntryPath(packageMetadata.ReadmeFile);+ var ReadmeFileEntry = packageArchiveReader.GetEntry(filename); // throws on non-existent file+ using (var readmeFileStream = ReadmeFileEntry.Open())+ {+ await SaveReadmeFileAsync(package, readmeFileStream);+ }+ }+ }++ public async Task<string> DownloadReadmeFileAsync(Package package)+ {+ if (package == null)+ {+ throw new ArgumentNullException(nameof(package));+ }++ var fileName = BuildReadmeFileName(package);++ using (var readmeFileStream = await _fileStorageService.GetFileAsync(_metadata.PackageContentFolderName, fileName))+ {+ if (readmeFileStream != null)+ {+ using (var readMeMdReader = new StreamReader(readmeFileStream))+ {+ return await readMeMdReader.ReadToEndAsync();+ }+ }+ }+ return null;+ }++ public Task DeleteReadmeFileAsync(string id, string version)+ {+ if (id == null)+ {+ throw new ArgumentNullException(nameof(id));+ }++ if (string.IsNullOrWhiteSpace(id))+ {+ throw new ArgumentException($"{nameof(id)} cannot be empty", nameof(id));+ }++ if (version == null)+ {+ throw new ArgumentNullException(nameof(version));+ }++ if (string.IsNullOrWhiteSpace(version))+ {+ throw new ArgumentException($"{nameof(version)} cannot be empty", nameof(version));+ }++ var normalizedVersion = NuGetVersionFormatter.Normalize(version);+ var fileName = BuildReadmeFileName(id, normalizedVersion);++ return _fileStorageService.DeleteFileAsync(_metadata.PackageContentFolderName, fileName);+ }++ private string ReadmePathTemplate => $"{_metadata.PackageContentPathTemplate}/{ReadmeFileName}";++ private string BuildReadmeFileName(Package package)+ => FileNameHelper.BuildFileName(package, ReadmePathTemplate, string.Empty);++ private string BuildReadmeFileName(string id, string version)+ => FileNameHelper.BuildFileName(id, version, ReadmePathTemplate, string.Empty);
Verified that no double normalize versions here.
Similar to legacy readme, their versions
are normalized in FileNameHelper.BuildFileName
https://github.com/NuGet/NuGetGallery/blob/master/src/NuGetGallery/Services/PackageFileService.cs#L70
comment created time in a day
push eventNuGet/NuGetGallery
commit sha b534dc3e489a2801af53c57c8ca153be63e079d2
remove extra space & change method modifier access
push time in a day
Pull request review commentNuGet/NuGetGallery
Gallery store/fetch/delete embedded readmes file from flat container
+// Copyright (c) .NET Foundation. All rights reserved.+// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.++using System;+using System.IO;+using System.Threading.Tasks;+using NuGet.Packaging;+using NuGet.Services.Entities;+using NuGetGallery.Packaging;++namespace NuGetGallery+{+ public class CoreReadmeFileService : ICoreReadmeFileService+ {+ private const string ReadmeFileName = "readme";++ private readonly ICoreFileStorageService _fileStorageService;+ private readonly IContentFileMetadataService _metadata;++ public CoreReadmeFileService(ICoreFileStorageService fileStorageService, IContentFileMetadataService metadata)+ {+ _fileStorageService = fileStorageService ?? throw new ArgumentNullException(nameof(fileStorageService));+ _metadata = metadata ?? throw new ArgumentNullException(nameof(metadata));+ }++ /// <summary>+ /// Saves the package readme.md file to storage. This method should throw if the package+ /// does not have an embedded readme file + /// </summary>+ /// <param name="package">The package associated with the readme.</param>+ /// <param name="readmeFile">The content of readme file.</param>+ public Task SaveReadmeFileAsync(Package package, Stream readmeFile)+ {+ if (package == null)+ {+ throw new ArgumentNullException(nameof(package));+ }++ if (readmeFile == null)+ {+ throw new ArgumentNullException(nameof(readmeFile));+ }++ if (package.EmbeddedReadmeType == EmbeddedReadmeFileType.Absent)+ {+ throw new ArgumentException("Package must have an embedded readme", nameof(package));+ }++ var fileName = BuildReadmeFileName(package);++ return _fileStorageService.SaveFileAsync(_metadata.PackageContentFolderName, fileName, readmeFile, overwrite: true);+ }++ /// <summary>+ /// Save the readme file from package stream. This method should throw if the package+ /// does not have an embedded readme file + /// </summary>+ /// <param name="package">Package information.</param>+ /// <param name="packageStream">Package stream with .nupkg contents.</param>+ public async Task ExtractAndSaveReadmeFileAsync(Package package, Stream packageStream)+ {+ if (package == null)+ {+ throw new ArgumentNullException(nameof(package));+ }++ if (packageStream == null)+ {+ throw new ArgumentNullException(nameof(packageStream));+ }++ packageStream.Seek(0, SeekOrigin.Begin);+ using (var packageArchiveReader = new PackageArchiveReader(packageStream, leaveStreamOpen: true))+ {+ var packageMetadata = PackageMetadata.FromNuspecReader(packageArchiveReader.GetNuspecReader(), strict: true);+ if (string.IsNullOrWhiteSpace(packageMetadata.ReadmeFile))+ {+ throw new InvalidOperationException("No readme file specified in the nuspec");+ }++ var filename = FileNameHelper.GetZipEntryPath(packageMetadata.ReadmeFile);+ var ReadmeFileEntry = packageArchiveReader.GetEntry(filename); // throws on non-existent file+ using (var readmeFileStream = ReadmeFileEntry.Open())+ {+ await SaveReadmeFileAsync(package, readmeFileStream);+ }+ }+ }++ public async Task<string> DownloadReadmeFileAsync(Package package)+ {+ if (package == null)+ {+ throw new ArgumentNullException(nameof(package));+ }++ var fileName = BuildReadmeFileName(package);++ using (var readmeFileStream = await _fileStorageService.GetFileAsync(_metadata.PackageContentFolderName, fileName))+ {+ if (readmeFileStream != null)+ {+ using (var readMeMdReader = new StreamReader(readmeFileStream))+ {+ return await readMeMdReader.ReadToEndAsync();+ }+ }+ }+ return null;+ }++ public Task DeleteReadmeFileAsync(string id, string version)+ {+ if (id == null)+ {+ throw new ArgumentNullException(nameof(id));+ }++ if (string.IsNullOrWhiteSpace(id))+ {+ throw new ArgumentException($"{nameof(id)} cannot be empty", nameof(id));+ }++ if (version == null)+ {+ throw new ArgumentNullException(nameof(version));+ }++ if (string.IsNullOrWhiteSpace(version))+ {+ throw new ArgumentException($"{nameof(version)} cannot be empty", nameof(version));+ }++ var normalizedVersion = NuGetVersionFormatter.Normalize(version);+ var fileName = BuildReadmeFileName(id, normalizedVersion);++ return _fileStorageService.DeleteFileAsync(_metadata.PackageContentFolderName, fileName);+ }++ private string ReadmePathTemplate => $"{_metadata.PackageContentPathTemplate}/{ReadmeFileName}";++ private string BuildReadmeFileName(Package package)+ => FileNameHelper.BuildFileName(package, ReadmePathTemplate, string.Empty);++ private string BuildReadmeFileName(string id, string version)+ => FileNameHelper.BuildFileName(id, version, ReadmePathTemplate, string.Empty);
Looks like version
gets normalized in FileNameHelper.BuildFileName
. Please confirm (with UTs and even manually) but we should not double normalize versions
comment created time in a day
Pull request review commentNuGet/NuGetGallery
Gallery store/fetch/delete embedded readmes file from flat container
+// Copyright (c) .NET Foundation. All rights reserved.+// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.++using System.IO;+using System.Threading.Tasks;+using NuGet.Services.Entities;++namespace NuGetGallery+{+ /// <summary>+ /// Provides readmes file related operations+ /// </summary>+ public interface ICoreReadmeFileService+ {+
nit: extra space
comment created time in a day
Pull request review commentNuGet/NuGetGallery
Gallery store/fetch/delete embedded readmes file from flat container
+// Copyright (c) .NET Foundation. All rights reserved.+// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.++using System;+using System.IO;+using System.Threading.Tasks;+using NuGet.Packaging;+using NuGet.Services.Entities;+using NuGetGallery.Packaging;++namespace NuGetGallery+{+ public class CoreReadmeFileService : ICoreReadmeFileService+ {+ private const string ReadmeFileName = "readme";++ private readonly ICoreFileStorageService _fileStorageService;+ private readonly IContentFileMetadataService _metadata;++ public CoreReadmeFileService(ICoreFileStorageService fileStorageService, IContentFileMetadataService metadata)+ {+ _fileStorageService = fileStorageService ?? throw new ArgumentNullException(nameof(fileStorageService));+ _metadata = metadata ?? throw new ArgumentNullException(nameof(metadata));+ }++ /// <summary>+ /// Saves the package readme.md file to storage. This method should throw if the package+ /// does not have an embedded readme file + /// </summary>+ /// <param name="package">The package associated with the readme.</param>+ /// <param name="readmeFile">The content of readme file.</param>+ public Task SaveReadmeFileAsync(Package package, Stream readmeFile)
This shouldn't be public, right? I only see ExtractAndSaveReadmeFileAsync
using this.
comment created time in a day
issue openedNuGet/NuGetGallery
We don't see https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-1469 in GitHub. How many others are there, and how many apply to NuGet.org packages?
created time in 2 days
issue openedNuGet/NuGetGallery
Getting messages as package id is reserved contact the owner when uploading new packages
Hi, I am trying to upload a new package which starts with IBM.Data.Db2.NET5 but keep getting messages something like " This package ID has been reserved. Please request access to upload to this reserved namespace from the owner of the reserved prefix, or re-upload the package with a different ID." We are the owners of these namespace (IBM.Data.DB2 series) and its not sure who could reserve these names and how to get them back. The other variants of the above name also did not succeed.
Thanks and regards Vishwa
created time in 5 days
push eventNuGet/NuGetGallery
commit sha 39168799655edd0de33c335aa70784d1c58f7a15
Fix tests for build
push time in 5 days
Pull request review commentNuGet/NuGetGallery
gallery fetch/delete readmes file from flat container
+// Copyright (c) .NET Foundation. All rights reserved.+// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.++using System;+using System.IO;+using System.Threading.Tasks;+using NuGet.Packaging;+using NuGet.Services.Entities;+using NuGetGallery.Packaging;++namespace NuGetGallery+{+ public class CoreReadmeFileService : ICoreReadmeFileService+ {+ private const string ReadmeFileName = "readme";++ private readonly ICoreFileStorageService _fileStorageService;+ private readonly IContentFileMetadataService _metadata;++ public CoreReadmeFileService(ICoreFileStorageService fileStorageService, IContentFileMetadataService metadata)+ {+ _fileStorageService = fileStorageService ?? throw new ArgumentNullException(nameof(fileStorageService));+ _metadata = metadata ?? throw new ArgumentNullException(nameof(metadata));+ }++ /// <summary>+ /// Saves the package readme.md file to storage. This method should throw if the package+ /// does not have an embedded readme file + /// </summary>+ /// <param name="package">The package associated with the readme.</param>+ /// <param name="readmeFile">The content of readme file.</param>+ public Task SaveReadmeFileAsync(Package package, Stream readmeFile)+ {+ if (package == null)+ {+ throw new ArgumentNullException(nameof(package));+ }++ if (readmeFile == null)+ {+ throw new ArgumentNullException(nameof(readmeFile));+ }++ if (package.EmbeddedReadmeType == EmbeddedReadmeFileType.Absent)+ {+ throw new ArgumentException("Package must have an embedded readme", nameof(package));+ }++ var fileName = BuildReadmeFileName(package);++ return _fileStorageService.SaveFileAsync(_metadata.PackageContentFolderName, fileName, readmeFile, overwrite: true);+ }++ /// <summary>+ /// Save the readme file from package stream. This method should throw if the package+ /// does not have an embedded readme file + /// </summary>+ /// <param name="package">Package information.</param>+ /// <param name="packageStream">Package stream with .nupkg contents.</param>+ public async Task ExtractAndSaveReadmeFileAsync(Package package, Stream packageStream)
Moved from https://github.com/NuGet/NuGetGallery/blob/dev/src/NuGetGallery/Services/PackageFileService.cs#L84
comment created time in 5 days
Pull request review commentNuGet/NuGetGallery
gallery fetch/delete readmes file from flat container
+// Copyright (c) .NET Foundation. All rights reserved.+// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.++using System;+using System.IO;+using System.Threading.Tasks;+using NuGet.Packaging;+using NuGet.Services.Entities;+using NuGetGallery.Packaging;++namespace NuGetGallery+{+ public class CoreReadmeFileService : ICoreReadmeFileService+ {+ private const string ReadmeFileName = "readme";++ private readonly ICoreFileStorageService _fileStorageService;+ private readonly IContentFileMetadataService _metadata;++ public CoreReadmeFileService(ICoreFileStorageService fileStorageService, IContentFileMetadataService metadata)+ {+ _fileStorageService = fileStorageService ?? throw new ArgumentNullException(nameof(fileStorageService));+ _metadata = metadata ?? throw new ArgumentNullException(nameof(metadata));+ }++ /// <summary>+ /// Saves the package readme.md file to storage. This method should throw if the package+ /// does not have an embedded readme file + /// </summary>+ /// <param name="package">The package associated with the readme.</param>+ /// <param name="readmeFile">The content of readme file.</param>+ public Task SaveReadmeFileAsync(Package package, Stream readmeFile)
Moved from https://github.com/NuGet/NuGetGallery/blob/dev/src/NuGetGallery/Services/PackageFileService.cs#L63
comment created time in 5 days
PR opened NuGet/NuGetGallery
- Add new service to store/fetch/delete readme from flat container
- Modified logic to upload/display embedded readme
Addresses:https://github.com/NuGet/Engineering/issues/3593
pr created time in 5 days
push eventNuGet/NuGetGallery
commit sha 6e16a0c4ae34e9bb26889308a901e14aa397b897
gallery fetch/delete readmes file from flat container
push time in 6 days
push eventNuGet/NuGetGallery
commit sha 47ff12c4e8d2f586939a75b8d3eb58529defff8c
modified unit test
push time in 6 days
push eventNuGet/NuGetGallery
commit sha 1f8bf745f214d3ec42f669e2a2a01b731c31602c
modified unit test
push time in 6 days
push eventNuGet/NuGetGallery
commit sha 8b85ce97428a3528032e4bace73f9e9165ea53ef
modified unit test
push time in 6 days
issue openedNuGet/NuGetGallery
[Stats]Support multiple stats sources
Make gallery changes to allow multiple specified locations for downloads statistics.
created time in 6 days
push eventNuGet/NuGetGallery
commit sha 2f88fd9e3f970fd5513b7f19fa0fcc1621d7fac8
[A11y]Fixing a missed horizontal scroll bar case (#8353) * Adding some style workarounds for narrow screen * Update similar snippet for 2FA dialog * Remove display flex from login account row
push time in 6 days
PR merged NuGet/NuGetGallery
Fixing https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1188115 being reopened.
pr closed time in 6 days
issue commentNuGet/NuGetGallery
Introduce GitHub Usage for NuGet packages
Ahhh, so it's under Used by, all the way to the bottom! Quite hard to discover if you've been in nuget.org for a while.
I'd suggest adding a second collapsible level under Used By, so that both NuGet Packages and GitHub Repositories become collapsible too and therefore easy to spot when first expanding Used By.
Thanks
comment created time in 6 days
issue commentNuGet/NuGetGallery
Introduce GitHub Usage for NuGet packages
Here's a screenshot of the page you linked:
comment created time in 7 days