open-index/open-npm huggingface dataset:
npm package: @mdworld/homeremote-dockerlist
Description: Show a list of docker containers and start or stop them
Latest version: 1.9.0

# homeremote-stream-player

Show a list of docker containers and start or stop them

See https://github.com/mdvanes/homeremote/issues/9

## How this project was set up

- nvm use 15
- copied package.json from other client package in the monorepo
- `yarn lerna add rescript -D --scope=@mdworld/homeremote-dockerlist`
- add bsconfig.json following https://rescript-lang.org/docs/manual/latest/installation#integrate-into-an-existing-js-project
- add `"re:build": "rescript", "re:start": "rescript build -w"` to package.json/scripts
- create a file /packages/dockerlist-client/src/Test.res with the button example from https://rescript-lang.org/try
- in /packages/dockerlist-client run `yarn re:build`
- now get an error that is probably caused because rescript-react is not yet installed, see https://rescript-lang.org/docs/react/latest/introduction
- compilation indeed does work, when Test.res only contains `Js.log("Hello, World!")`
- Add rescript-react: `yarn lerna add @rescript/react --scope=@mdworld/homeremote-dockerlist`
- Add {
  "reason": { "react-jsx": 3 },
  "bs-dependencies": ["@rescript/react"]
} in bsconfig.json
- in /packages/dockerlist-client run `yarn re:build`
- Add fetch to endpoint: `yarn lerna add bs-fetch --scope=@mdworld/homeremote-dockerlist` and add to bsconfig.json: "bs-dependencies": ["bs-fetch"]

## Running

-   dev: run in root: `yarn start` and it will start storybook, mock api, and `yarn re:start` (in this dir)

## TODO

- For now XHR works in Rescript, but Fetch only works in Reason files. Mainly decoding the JSON fails, even with "@glennsl/bs-json"
- Material UI bindings seem very unstable: https://jsiebern.github.io/bs-material-ui Adding it breaks the build sometimes
- Clean up old Elm deps from package.json
- Builders (like webpack) are discouraged: https://rescript-lang.org/docs/manual/latest/interop-with-js-build-systems
- Snowpack build to `dist` dir like in https://github.com/jihchi/rescript-react-realworld-example-app/blob/main/package.json https://www.snowpack.dev/
- Storybook like in https://raw.githubusercontent.com/elfsternberg/doc-rescript-with-storybook/main/src/stories/02_Noncard.stories.mdx
npm package: @mdworld/homeremote-stream-player
Description: Choose an audio stream from a list and play the stream. If configured, retrieve "now playing" information.
Latest version: 1.9.1

# homeremote-stream-player

Choose an audio stream from a list and play the stream. If configured, retrieve "now playing" information.

See https://github.com/mdvanes/homeremote/issues/2

## How this project was set up

See also mdvanes/elmstars, https://codeburst.io/using-elm-in-react-from-the-ground-up-e3866bb0369d, https://medium.com/javascript-inside/building-a-react-redux-elm-bridge-8f5b875a9b76

* nvm use 12
* npx create-react-app homeremote-streams-player
* push to git repo
* add .nvmrc with contents: 12
* yarn eject (because the webpack-elm-loader must be added to the webpack config)
* yarn add react-elm-components
* add Buttons.elm in /src/Elm
* add `import Elm from 'react-elm-components'; import Buttons from './Elm/Buttons.elm';` to App.jsx
* in App.jsx, replace `function App() { ... }` by `const App = () =>(
                                                     <Elm src={Buttons.Elm.Elm.Buttons} />
                                                   );`
* If elm does not exists in this nvm node instance, install it: npm i -g elm
* Make the elm.json: elm init
* Test if properly installed: elm make src/elm/Buttons.elm
* Replace the contents of index.js by `export { default as App } from './App.jsx';`
* `yarn add @storybook/react elm-webpack-loader`
* add these scripts to package.json:       "storybook": "start-storybook",
    "build-storybook": "build-storybook -c .storybook -o docs"
* add /stories/index.js 
* add /.storybook/*
* add /webpack.config.js and /webpack.elmloader.js
* start storybook for development with `yarn storybook`

## Running

* dev: `yarn storybook` and in second terminal, cwd to packages/server and run `yarn start`
* build only the Elm module (useful for debugging): `elm make packages/streamplayer-client/src/Elm/Audio.elm` 

## TODO

Audio element in Elm, see: https://vincent.jousse.org/en/tech/interacting-with-dom-element-using-elm-audio-video/

* Switch to other radio streams
* Show logo for each radio stream, design like this https://material-ui.com/components/cards/#ui-controls
* Custom stream player controls
* Lerna
* Back-end for "now playing"
* Deliverable that can be published as NPM module
* prettier, eslint, tests
npm package: @mdworld/ingress-headers
Description: A TypeScript utility for extracting and managing Content Security Policy (CSP) headers from Kubernetes ingress YAML files
Author: M.D. van Es
Latest version: 1.0.5

[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/mdvanes/ingress-headers/ci.yml)](https://github.com/mdvanes/ingress-headers/actions/workflows/ci.yml)
[![NPM Version](https://img.shields.io/npm/v/%40mdworld%2Fingress-headers?cb)](https://www.npmjs.com/package/@mdworld/ingress-headers)

# ingress-headers

A TypeScript utility for extracting and managing Content Security Policy (CSP) headers from Kubernetes ingress YAML files.

## Purpose

This package provides tools to:

- **Read** CSP policies from ingress YAML configurations and convert them to structured JSON format
- **Write** CSP policies in ingress YAML files using JSON input

## Use Cases

- **Environment Migration**: Easily copy CSP policies from one environment to another
- **Policy Analysis**: Convert complex CSP strings into readable JSON format for analysis
- **Bulk Updates**: Programmatically update CSP policies across multiple ingress configurations
- **CSP Debugging**: Break down CSP directives into organized, sortable JSON structures

## Installation

```bash
npm i -g @mdworld/ingress-headers
```

## Usage

### As a Library

```typescript
import { readCSP, writeCSP, CSPDirectives } from "ingress-headers";

// Read CSP from YAML file
const cspData: CSPDirectives = readCSP("path/to/ingress.yaml");

// Write CSP to YAML file
await writeCSP("path/to/target.yaml", cspData);
```

### Command Line Tools

After installation, you can use the unified CLI tool:

```bash
# Extracts CSP from a YAML file and outputs it as JSON to stdout
ingress-headers read example/ingress.yaml > headers.json

# Updates CSP in a YAML file using JSON input from stdin
ingress-headers write example/ingress.yaml < headers.json

# Pipe from read to write, this will just copy the CSP header to another YAML
ingress-headers read source.yaml | ingress-headers write target.yaml
```

### Development Mode

Installation:

```bash
npm install
npm run build
```

```bash
# Unified command (recommended)
npx ts-node src/ingress-headers.ts read example/ingress.yaml
npx ts-node src/ingress-headers.ts write target.yaml < headers.json
npx ts-node src/ingress-headers.ts read source.yaml | npx ts-node src/ingress-headers.ts write target.yaml

# Individual commands (for development)
npx ts-node src/read_headers.ts example/ingress.yaml
npx ts-node src/read_headers.ts source.yaml | npx ts-node src/write_headers.ts target.yaml
```