open-index/open-npm huggingface dataset:
npm package: @nagyv/gitlab-agent-token
Description: Registers a new GitLab Kubernetes Agent with your GitLab instance, and retrieves its secret token
Latest version: 1.1.4

# GitLab Agent Token generator

This script helps setting up a new GitLab Kubernetes Agent by providing a CLI script to register a new agent with a GitLab instance and retrieve the agent's token.

The GitLab Kubernetes Agent is GitLab's cluster side component to support GitLab's Kubernetes integration features like pull based deployments. Once the token is available, it [should be added to your cluster as a secret](https://docs.gitlab.com/ee/user/clusters/agent/#create-the-kubernetes-secret). See [the GitLab documentation](https://docs.gitlab.com/ee/user/clusters/agent/) for more details about setting up the GitLab Kubernetes Agent.

## Usage

```bash
$ npx @nagyv/gitlab-agent-token
```

## Todo

See the issues: https://gitlab.com/nagyv-gitlab/gitlab-agent-token/-/issues

## Release

Release a new version with `npm version ...` run locally
npm package: @nagyv/parcel-plugin-precache-json
Description: Parcel plugin that generates a precache manifest json of the bundle to be injected into [Workbox'](https://developers.google.com/web/tools/workbox) `precacheAndRoute`.
Author: Viktor Nagy
Latest version: 0.1.9

# parcel-plugin-workbox-precache

Parcel plugin that generates a precache manifest json of the bundle to be injected
into [Workbox'](https://developers.google.com/web/tools/workbox) `precacheAndRoute`.

## Installation

```Shell
npm i -d @nagyv/parcel-plugin-precache-json
```

or

```Shell
yarn add --dev @nagyv/parcel-plugin-precache-json
```

_Attention: parcel-bundler has to be installed_

## Usage

This module can be used to generate and load extra files to pre-cache with Workbox, like when a single service worker would be used to cache a main frame and an iframe at once.

Example code to load the generated `json` from `/child/` directory:

```js
// iframe precache handler
const childCacheName = 'child'
const childCache = new workbox.precaching.PrecacheController(childCacheName)

// as the iframe precache handler can not use `precacheAndRoute` we have to register a route
workbox.routing.registerRoute(
  new RegExp('/child/'),
  childCache.createHandler(true)
);

// as the iframe precach handler can no use `precacheAndRoute` we have to install the cache
self.addEventListener('install', (event) => {
  event.waitUntil(fetch('/child/precache.json').then(data => data.json()).then(precacheManifest => {
    childCache.addToCacheList(precacheManifest)
    return childCache.install()
  }).catch(err => {
    console.error('Failed adding extra pre-cache', err)
  }))
})

// as the iframe precach handler can no use `precacheAndRoute` we have to activate it
self.addEventListener('activate', () => {
  childCache.activate()
})
```

## Credits

- The initial version was built on top of [wearespindle/parcel-plugin-workbox-precache](https://github.com/wearespindle/parcel-plugin-workbox-precache)
npm package: @nagyv/parcel-plugin-workbox-precache
Description: Parcel plugin that generates a precache manifest of the bundle and injects it in the `service_worker.js` file.
Author: Jos van Bakel
Latest version: 0.1.9

# parcel-plugin-workbox-precache

Parcel plugin that generates a precache manifest of the bundle and
injects it in the `service_worker.js` file.

## Installation

```Shell
$ npm i -d parcel-plugin-workbox-precache
```
or
```Shell
$ yarn add --dev parcel-plugin-workbox-precache
```

_Attention: parcel-bundler has to be installed_

## Usage

This module can be used to generate a precache manifest for use with
workbox. It expects an asset named `service_worker.js` after the
Parcel bundler has been run. It injects a `importScripts` of workbox
from the Google CDN and injects a generated precache manifest as a
constant named `precacheManifest`.

The script is injected in the head of the service worker
file. Injected code is surrounded with the comments `//BEGIN workbox`
and `//END workbox`, when the comments are found the code is injected
between them. This is to make sure that `parcel dev` works as
expected.

Note that this plugin probably does not work with multiple entry
assets.

### Example

_**index.html**_

```html
<html>
<head>
<script src="./index.js"></script>
</head>
<body>
</body>
</html>
```

_**index.js**_

```javascript
navigator.serviceWorker.register('/service_worker.js');
```

_**service_worker.js**_
```javascript
/* global self, workbox, precacheManifest */
workbox.precacheAndRoute(precacheManifest);
```