open-index/open-npm huggingface dataset:
npm package: @magda/arbitraries
Description: MAGDA jsverify property-based testing arbitraries definitions
Latest version: 6.0.0-alpha.14

### MAGDA jsverify property-based testing arbitraries definitions

This package provides [jsverify](https://github.com/jsverify/jsverify) property-based testing arbitraries definitions.

It may be handy if you want to write test cases in property-based testing style around Magda data structures.
npm package: @magda/ci-utils
Description: A set of CI scripts that helps set up CI
Author: Jacky Jiang
Latest version: 1.0.5

# ci-utils

A set of CI scripts that helps set up CI.


## check-helm-chart-version

Make sure the helm chart version is same as current Github Release Tag Name Version.

Usage:

```bash
yarn check-helm-chart-version [path to chart.yaml file of the chart...]
```


## update-helm-chart-version

Update the version of all helm charts in a folder to a new version number.

Usage:

Add the following `scripts` entries to your package.json:

```
"add-all-chart-version-changes": "git ls-files -m | grep Chart.yaml | xargs git add && git ls-files -m | grep Chart.lock | xargs git add",
"add-all-helm-docs-changes": "helm-docs && git ls-files -m | grep -i readme.md | xargs git add",
"version": "yarn update-helm-chart-version && yarn update-all-charts && yarn add-all-chart-version-changes && yarn add-all-helm-docs-changes"
```

Then you can run:

```bash
npm version [new version number]
```

to set version.

### Config Options

You can set the following fields in package.json to customize the helm chart version update behavior:
- `versionUpdateExclude`: 
  - Type: `string[]`
  - You can set `versionUpdateExclude` field of package.json to specify a list charts that should be excluded from changing version.
- `versionUpdateValues`:
  - Type: `{ [chartName:string]: string[]; }`
  - This field allow you to specify a list fields that should be update to current version in selected charts' "values" files.

  e.g. the following config:
  ```
  "versionUpdateValues": {
    "helm-chart-A": [
      "field1.field2.field3",
      "field4"
    ],
    "helm-chart-B": ["field5"]
  }
  ```

  will make the following fields:
  - `helm-chart-A` chart's "field1.field2.field3" & "field4" fields
  - `helm-chart-B`chart's "field5" field

  set to the current package version.
npm package: @magda/connector-test-utils
Description: MAGDA Connector Utils for Test Cases
Latest version: 6.0.0-alpha.14

### Magda Connector Utils for Test Cases

The package includes the following utilities for writing [Magda connector](https://github.com/magda-io/magda#connectors) test cases:

```typescript
export declare abstract class MockExpressServer {
    server: any;
    run(port: number): Promise<unknown>;
    abstract runImplementation(app: any): void;
}

export declare class MockRegistry extends MockExpressServer {
    aspects: any;
    records: any;
    env: any;
    runImplementation(registry: any): void;
}

/**
 * Hoping to re-use this functionality for all black-box style connector
 * testing.
 */
export declare function runConnectorTest(
    TEST_CASES: any[],
    Catalog: any,
    options?: any
): void;
```
npm package: @magda/esm-utils
Description: Utilities helps when migrating to ESM projects
Author: Jacky Jiang
Latest version: 1.0.1

# esm-utils

[![npm version](https://img.shields.io/npm/v/@magda/esm-utils.svg)](https://www.npmjs.com/package/@magda/esm-utils)

Utilities help to migrate your [Node.js](https://nodejs.org/en) projects to ESM projects.

> All utility functions here don't require you to supply [import.meta.url](https://nodejs.org/api/esm.html#importmetaurl) and will use the function caller file's path as the base.

> All required dependencies are bundled -- no need to install any dependencies.

```typescript
/**
 * Allow to require modules relative to the caller file.
 * require() is not support in ESM modules. This function provides a workaround when you have to use require() in ESM modules.
 * e.g. use to load JSON files.
 * Or use to load legacy commonjs modules where formal `import` syntax is not convenient.
 * e.g. load legacy commonjs modules without type definition files.
 *
 * Please note: before use this function, you should try to use `import` syntax whenever possible.
 *
 * @param {string} id
 * @return {*}  {*}
 */
export declare function require(id: string): any;
export declare function requireResolve(id: string): string;
/**
 * This is an ESM replacement for `__filename`.
 *
 * Use it like this: `__filename()`.
 */
export declare const __filename: () => string;
/**
 * Alias of `__filename`.
 */
export declare const getCurrentFilePath: () => string;
/**
 * This is an ESM replacement for `__dirname`.
 *
 * Use it like this: `__dirname()`.
 */
export declare const __dirname: () => string;
/**
 * Alias of `__dirname`.
 */
export declare const getCurrentDirPath: () => string;
/**
 * Indicates that the script was run directly.
 * This is an ESM replacement for `require.main === module`.
 *
 * Use it like this: `isMain()`.
 */
export declare const isMain: () => boolean;
```
npm package: @magda/external-ui-plugin-sdk
Description: MAGDA external UI plugin SDK
Author: Jacky Jiang
Latest version: 6.0.0-alpha.14

### MAGDA External UI Plugin SDK

Magda allows you to build / bundle React UI components with your own logic and supply the customised UI components to Magda at the time of deployment (via [Helm chart config](https://github.com/magda-io/magda/tree/master/deploy/helm/internal-charts/web-server)) to replace the functionality of existing UI components. For those custom built UI components, we call External UI Plugin Components.

For more information of how to create / config External UI Plugin Components, please refer to [magda-plugin-ui-component-examples repo](https://github.com/magda-io/magda-plugin-ui-component-examples).

This SDK at this moment only contains typescript types of all key data structures.

Not all built-in Magda built-in components can be replaced by an External UI Plugin Component.

For the list of replacable components, please refer to exported component types.

### Documentation

SDK document is available from [here](./docs/modules.md).
npm package: @magda/minion-framework
Description: MAGDA Minion Framework
Latest version: 6.0.0-alpha.14

### Magda Minion Framework

CommonJs bundle of [Magda](https://github.com/magda-io/magda) minion framework.

For general [Magda](https://github.com/magda-io/magda) minion development usage, [@magda/minion-sdk](https://www.npmjs.com/package/@magda/minion-sdk) is recommended.
npm package: @magda/minion-sdk
Description: MAGDA Minion SDK
Latest version: 6.0.0-alpha.14

### MAGDA Minion SDK

A minion is a [Magda](https://github.com/magda-io/magda) service that listens for new records or changes to existing records, performs some kind of operation and then writes the result back to the [Magda registry](https://github.com/magda-io/magda#registry). For instance, we have a broken link minion that listens for changes to distributions, retrieves the URLs described, records whether they were able to be accessed successfully and then writes that back to the registry in its own aspect.

Other aspects exist that are written to by many minions - for instance, we have a "quality" aspect that contains a number of different quality ratings from different sources, which are averaged out and used by search.

While develops a custom build Magda minion, this SDK helps you to focus on the core minion logic without starting from scratch.

### Get Started

```javascript
import minion, { commonYargs } from "@magda/minion-sdk";
import onRecordFound from "./onRecordFound";

const MINION_ID = "minion-format";
const argv = commonYargs(6311, "http://localhost:6311");

const aspectDefinition = {
    id: "dataset-format",
    name: "Details about the format of the distribution",
    jsonSchema: require("@magda/registry-aspects/dataset-format.schema.json")
};

// --- will be called when changes are made to records in magda registry
async function onRecordFound(record, authorizedRegistryClient) {
    // --- adding logic of based on the current record data, create / update extra data and save back to registry via `authorizedRegistryClient`
}

minion({
    argv,
    // --- monitor `dcat-distribution-strings` aspect
    aspects: ["dcat-distribution-strings"],
    async: true,
    id: MINION_ID,
    onRecordFound,
    optionalAspects: [],
    writeAspectDefs: [aspectDefinition]
}).catch((e: Error) => {
    console.error("Error: " + e.message, e);
    process.exit(1);
});
```
npm package: @magda/registry-aspects
Description: Common aspects for use with the registry.
Latest version: 6.0.0-alpha.14

### Magda Registry Aspects Json Schemas

This package includes all built-in [Magda](https://github.com/magda-io/magda) registry Aspects Json Schemas:

- access.schema.json
- ckan-dataset.schema.json
- ckan-resource.schema.json
- csv-dataset.schema.json
- information-security.schema.json
- csw-dataset.schema.json
- organization-details.schema.json
- csw-distribution.schema.json
- currency.schema.json
- project-open-data-dataset.schema.json
- dap-dataset.schema.json
- project-open-data-distribution.schema.json
- dap-resource.schema.json
- project.schema.json
- access-control.schema.json (previously `dataset-access-control` aspect)
- provenance.schema.json
- dataset-distributions.schema.json
- publishing.schema.json
- dataset-format.schema.json
- source-link-status.schema.json
- dataset-linked-data-rating.schema.json
- source.schema.json
- dataset-publisher.schema.json
- spatial-coverage.schema.json
- dataset-quality-rating.schema.json
- temporal-coverage.schema.json