k8stypes
TypeScript icon, indicating that this package has built-in type declarations

0.1.14 • Public • Published

k8stypes

This repository contains TypeScript type definitions for Kubernetes resources.

Usage

Installation

npm install -D k8stypes;

Usage

TypeScript

import { Deployment } from 'k8stypes/apps/v1/Deployment';

const deployment : Deployment = {/* ... */};
export deployment;

JavaScript

/**
 * @typedef {import('k8stypes/apps/v1/Deployment').Deployment} Deployment
 */

/** @type {Deployment} */
const deployment = {/* ... */};
module.exports = deployment;

Development Runbook

All development should be done within the /src directory. The root directory is used only for publishing to NPM.

Retrieving the latest Kubernetes OpenAPI specification

npm run update;

This has only been tested to work on Ubuntu.

Generating the TypeScript definitions

npm run generate;

This will result in a ./src directory containing the TypeScript definitions.

Building the JavaScript version

npm run build;

This will result in the NPM publishable package at ./lib. Run npm publish from ./lib of the repository to publish it:

Publishing the package

  1. Bump the appropriate version in package.json
  2. Commit the change
  3. Navigate to ./lib and run:
npm publish;

License

This code is licensed under the MIT license.

Package Sidebar

Install

npm i k8stypes

Weekly Downloads

1

Version

0.1.14

License

MIT

Unpacked Size

1.02 MB

Total Files

1852

Last publish

Collaborators

  • zephinzer