Skip to content

Commit f865033

Browse files
committed
initial commit
0 parents  commit f865033

38 files changed

Lines changed: 747 additions & 0 deletions

.github/workflows/test.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
3+
jobs:
4+
test:
5+
strategy:
6+
matrix:
7+
include:
8+
- image_tag: "nightly"
9+
pulp_api_root: "/relocated/djnd/"
10+
python: "3.11"
11+
- image_tag: "latest"
12+
lower_bounds: true
13+
python: "3.8"

CHANGES.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Changelog
2+
3+
[//]: # (You should *NOT* be adding new change log entries to this file, this)
4+
[//]: # (file is managed by towncrier. You *may* edit previous change logs to)
5+
[//]: # (fix problems like typo corrections or such.)
6+
[//]: # (To add a new change log entry, please see)
7+
[//]: # (https://docs.pulpproject.org/contributing/git.html#changelog-update)
8+
9+
[//]: # (WARNING: Don't drop the towncrier directive!)
10+
11+
[//]: # (towncrier release notes start)
12+

lower_bounds_constraints.lock

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
pulp-cli==0.23.1
2+
pulp-glue==0.23.1

pulp-glue-npm/pyproject.toml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
[build-system]
2+
requires = ["setuptools"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "pulp-glue-npm"
7+
version = "0.0.1.dev0"
8+
description = "Version agnostic glue library to talk to pulpcore's REST API. (Npm plugin)"
9+
readme = "README.md"
10+
requires-python = ">=3.10"
11+
license = "GPL-2.0-or-later"
12+
authors = [
13+
{name = "Pulp Team", email = "pulp-list@redhat.com"},
14+
]
15+
classifiers = [
16+
"Development Status :: 4 - Beta",
17+
"Environment :: Other Environment",
18+
"Intended Audience :: Developers",
19+
"Operating System :: OS Independent",
20+
"Programming Language :: Python :: 3",
21+
"Topic :: System :: Software Distribution",
22+
"Typing :: Typed",
23+
]
24+
dependencies = [
25+
"pulp-glue>=0.23.1,<0.37",
26+
]
27+
28+
[project.urls]
29+
repository = "https://github.com/pulp/pulp-cli-npm"
30+
changelog = "https://github.com/pulp/pulp-cli-npm/blob/main/CHANGES.md"
31+
32+
[tool.mypy]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__version__ = "0.0.1.dev0"
Binary file not shown.
Binary file not shown.
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
from pulp_glue.common.context import (
2+
EntityDefinition,
3+
PluginRequirement,
4+
PulpContentContext,
5+
PulpDistributionContext,
6+
PulpRemoteContext,
7+
PulpRepositoryContext,
8+
PulpRepositoryVersionContext,
9+
)
10+
from pulp_glue.common.i18n import get_translation
11+
12+
translation = get_translation(__package__)
13+
_ = translation.gettext
14+
15+
16+
class PulpNpmPackageContentContext(PulpContentContext):
17+
PLUGIN = "npm"
18+
RESOURCE_TYPE = "package"
19+
ENTITY = _("npm package")
20+
ENTITIES = _("npm packages")
21+
HREF = "npm_package_href"
22+
ID_PREFIX = "content_npm_packages"
23+
NEEDS_PLUGINS = [PluginRequirement("npm", specifier=">=0.1.0")]
24+
CAPABILITIES = {"upload": []}
25+
26+
27+
class PulpNpmDistributionContext(PulpDistributionContext):
28+
PLUGIN = "npm"
29+
RESOURCE_TYPE = "npm"
30+
ENTITY = _("npm distribution")
31+
ENTITIES = _("npm distributions")
32+
HREF = "npm_npm_distribution_href"
33+
ID_PREFIX = "distributions_npm_npm"
34+
NEEDS_PLUGINS = [PluginRequirement("npm", specifier=">=0.1.0")]
35+
36+
37+
class PulpNpmRemoteContext(PulpRemoteContext):
38+
PLUGIN = "npm"
39+
RESOURCE_TYPE = "npm"
40+
ENTITY = _("npm remote")
41+
ENTITIES = _("npm remotes")
42+
HREF = "npm_npm_remote_href"
43+
ID_PREFIX = "remotes_npm_npm"
44+
NEEDS_PLUGINS = [PluginRequirement("npm", specifier=">=0.1.0")]
45+
46+
47+
class PulpNpmRepositoryVersionContext(PulpRepositoryVersionContext):
48+
HREF = "npm_npm_repository_version_href"
49+
ID_PREFIX = "repositories_npm_npm_versions"
50+
NEEDS_PLUGINS = [PluginRequirement("npm", specifier=">=0.1.0")]
51+
52+
53+
class PulpNpmRepositoryContext(PulpRepositoryContext):
54+
PLUGIN = "npm"
55+
RESOURCE_TYPE = "npm"
56+
HREF = "npm_npm_repository_href"
57+
ENTITY = _("npm repository")
58+
ENTITIES = _("npm repositories")
59+
ID_PREFIX = "repositories_npm_npm"
60+
VERSION_CONTEXT = PulpNpmRepositoryVersionContext
61+
CAPABILITIES = {
62+
"sync": [PluginRequirement("npm")],
63+
}
64+
NULLABLES = PulpRepositoryContext.NULLABLES | {"remote"}
65+
NEEDS_PLUGINS = [PluginRequirement("npm", specifier=">=0.1.0")]

pulp-glue-npm/src/pulp_glue/npm/py.typed

Whitespace-only changes.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
Metadata-Version: 2.4
2+
Name: pulp-glue-npm
3+
Version: 0.0.1.dev0
4+
Summary: Version agnostic glue library to talk to pulpcore's REST API. (Npm plugin)
5+
Author-email: Pulp Team <pulp-list@redhat.com>
6+
License-Expression: GPL-2.0-or-later
7+
Project-URL: repository, https://github.com/pulp/pulp-cli-npm
8+
Project-URL: changelog, https://github.com/pulp/pulp-cli-npm/blob/main/CHANGES.md
9+
Classifier: Development Status :: 4 - Beta
10+
Classifier: Environment :: Other Environment
11+
Classifier: Intended Audience :: Developers
12+
Classifier: Operating System :: OS Independent
13+
Classifier: Programming Language :: Python :: 3
14+
Classifier: Topic :: System :: Software Distribution
15+
Classifier: Typing :: Typed
16+
Requires-Python: >=3.10
17+
Description-Content-Type: text/markdown
18+
Requires-Dist: pulp-glue<0.37,>=0.23.1

0 commit comments

Comments
 (0)