jsii-release 0.2.402 → 0.2.403
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 +1 -0
- package/bin/publib-npm +13 -1
- package/package.json +1 -1
- package/package.json.bak +1 -1
package/README.md
CHANGED
|
@@ -71,6 +71,7 @@ npx publib-npm [DIR]
|
|
|
71
71
|
|`NPM_TOKEN`|Optional|Registry authentication token (either [npm.js publishing token](https://docs.npmjs.com/creating-and-viewing-authentication-tokens) or a [GitHub personal access token](https://help.github.com/en/packages/using-github-packages-with-your-projects-ecosystem/configuring-npm-for-use-with-github-packages#authenticating-to-github-packages)), not used for AWS CodeArtifact|
|
|
72
72
|
|`NPM_REGISTRY`|Optional|The registry URL (defaults to "registry.npmjs.org"). Use "npm.pkg.github.com" to publish to GitHub Packages. Use repository endpoint for AWS CodeAtifact, e.g. "my-domain-111122223333.d.codeartifact.us-west-2.amazonaws.com/npm/my_repo/".|
|
|
73
73
|
|`NPM_DIST_TAG`|Optional|Registers the published package with the given [dist-tag](https://docs.npmjs.com/cli/dist-tag) (e.g. `next`, default is `latest`)|
|
|
74
|
+
|`NPM_ACCESS_LEVEL`|Optional|Publishes the package with the given [access level](https://docs.npmjs.com/cli/v8/commands/npm-publish#access) (e.g. `public`, default is `restricted` for scoped packages and `public` for unscoped packages)|
|
|
74
75
|
|`AWS_ACCESS_KEY_ID`|Optional|If AWS CodeArtifact is used as registry, an AWS access key can be spedified.|
|
|
75
76
|
|`AWS_SECRET_ACCESS_KEY`|Optional|Secret access key that belongs to the AWS access key.|
|
|
76
77
|
|`AWS_ROLE_TO_ASSUME`|Optional|If AWS CodeArtifact is used as registry, an AWS role ARN to assume before authorizing.|
|
package/bin/publib-npm
CHANGED
|
@@ -57,10 +57,22 @@ if [ -n "${NPM_DIST_TAG:-}" ]; then
|
|
|
57
57
|
echo "Publishing under the following dist-tag: ${NPM_DIST_TAG}"
|
|
58
58
|
fi
|
|
59
59
|
|
|
60
|
+
# access level
|
|
61
|
+
access=""
|
|
62
|
+
if [ -n "${NPM_ACCESS_LEVEL:-}" ]; then
|
|
63
|
+
if ! [[ "${NPM_ACCESS_LEVEL}" =~ ^(public|restricted)$ ]]; then
|
|
64
|
+
echo "Invalid package access level: ${NPM_ACCESS_LEVEL}. Valid values are: public, restricted (default is restricted for scoped packages and public for unscoped packages)"
|
|
65
|
+
exit 1
|
|
66
|
+
fi
|
|
67
|
+
|
|
68
|
+
access="--access ${NPM_ACCESS_LEVEL}"
|
|
69
|
+
echo "Publishing package with access level: ${NPM_ACCESS_LEVEL}"
|
|
70
|
+
fi
|
|
71
|
+
|
|
60
72
|
log=$(mktemp -d)/npmlog.txt
|
|
61
73
|
|
|
62
74
|
for file in ${dir}/**.tgz; do
|
|
63
|
-
npm publish ${tag} ${file} 2>&1 | tee ${log}
|
|
75
|
+
npm publish ${tag} ${access} ${file} 2>&1 | tee ${log}
|
|
64
76
|
exit_code="${PIPESTATUS[0]}"
|
|
65
77
|
|
|
66
78
|
if [ ${exit_code} -ne 0 ]; then
|
package/package.json
CHANGED
package/package.json.bak
CHANGED