Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cdk8s

Package Overview
Dependencies
Maintainers
1
Versions
1847
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cdk8s - npm Package Compare versions

Comparing version 0.13.0 to 0.13.1-pre.80e8402790c4112e64bda2dd9a42fa897ee4ab8b

4

lib/api-object.d.ts

@@ -89,2 +89,6 @@ import { Construct } from '@aws-cdk/core';

constructor(scope: Construct, ns: string, options: ApiObjectOptions);
/**
* Renders the object to Kubernetes JSON.
*/
toJson(): any;
}

14

lib/api-object.js

@@ -5,2 +5,4 @@ "use strict";

const chart_1 = require("./chart");
const _util_1 = require("./_util");
const _tokens_1 = require("./_tokens");
class ApiObject extends core_1.Construct {

@@ -24,7 +26,6 @@ /**

/**
* Renders the object to Kubernetes config.
* @internal
* Renders the object to Kubernetes JSON.
*/
_render() {
return {
toJson() {
const data = {
...this.options,

@@ -36,5 +37,8 @@ metadata: {

};
// convert to "pure data" so, for example, when we convert to yaml these
// references are not converted to anchors.
return JSON.parse(JSON.stringify(_util_1.removeEmpty(_tokens_1.resolve(this, data))));
}
}
exports.ApiObject = ApiObject;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBpLW9iamVjdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImFwaS1vYmplY3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSx3Q0FBMEM7QUFDMUMsbUNBQWdDO0FBa0VoQyxNQUFhLFNBQVUsU0FBUSxnQkFBUztJQXlCdEM7Ozs7OztPQU1HO0lBQ0gsWUFBWSxLQUFnQixFQUFFLEVBQVUsRUFBbUIsT0FBeUI7O1FBQ2xGLEtBQUssQ0FBQyxLQUFLLEVBQUUsRUFBRSxDQUFDLENBQUM7UUFEd0MsWUFBTyxHQUFQLE9BQU8sQ0FBa0I7UUFFbEY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XG4gIH1cblxuICAvKipcbiAgICogUmVuZGVycyB0aGUgb2JqZWN0IHRvIEt1YmVybmV0ZXMgSlNPTi5cbiAgICovXG4gIHB1YmxpYyB0b0pzb24oKTogYW55IHtcbiAgICBjb25zdCBkYXRhID0ge1xuICAgICAgLi4udGhpcy5vcHRpb25zLFxuICAgICAgbWV0YWRhdGE6IHtcbiAgICAgICAgLi4udGhpcy5vcHRpb25zLm1ldGFkYXRhLFxuICAgICAgICBuYW1lOiB0aGlzLm5hbWVcbiAgICAgIH1cbiAgICB9O1xuXG4gICAgLy8gY29udmVydCB0byBcInB1cmUgZGF0YVwiIHNvLCBmb3IgZXhhbXBsZSwgd2hlbiB3ZSBjb252ZXJ0IHRvIHlhbWwgdGhlc2VcbiAgICAvLyByZWZlcmVuY2VzIGFyZSBub3QgY29udmVydGVkIHRvIGFuY2hvcnMuXG4gICAgcmV0dXJuIEpTT04ucGFyc2UoSlNPTi5zdHJpbmdpZnkocmVtb3ZlRW1wdHkocmVzb2x2ZSh0aGlzLCBkYXRhKSkpKTtcbiAgfVxufVxuXG4iXX0=

@@ -36,3 +36,11 @@ import { Construct, ISynthesisSession } from '@aws-cdk/core';

generateObjectName(apiObject: ApiObject): string;
/**
* Renders this chart to a set of Kubernetes JSON resources.
* @returns array of resource manifests
*/
toJson(): any[];
/**
* Called by the app to synthesize the chart as a YAML file in the output directory/
*/
protected synthesize(session: ISynthesisSession): void;
}

@@ -8,4 +8,2 @@ "use strict";

const YAML = require("yaml");
const _tokens_1 = require("./_tokens");
const _util_1 = require("./_util");
const names_1 = require("./names");

@@ -54,13 +52,15 @@ class Chart extends core_1.Construct {

}
/**
* Renders this chart to a set of Kubernetes JSON resources.
* @returns array of resource manifests
*/
toJson() {
return this.node.findAll().filter(x => x instanceof api_object_1.ApiObject).map(x => x.toJson());
}
/**
* Called by the app to synthesize the chart as a YAML file in the output directory/
*/
synthesize(session) {
const resources = new Array();
for (const resource of this.node.findAll()) {
if (!(resource instanceof api_object_1.ApiObject)) {
continue;
}
const manifest = _util_1.removeEmpty(_tokens_1.resolve(this, resource._render()));
resources.push(manifest);
}
// convert each resource to yaml and separate with a '---' line
const doc = resources.map(r => toYaml(r)).join('---\n');
const doc = this.toJson().map(r => YAML.stringify(r)).join('---\n');
fs.writeFileSync(path.join(session.assembly.outdir, this.manifestFile), doc);

@@ -70,7 +70,2 @@ }

exports.Chart = Chart;
function toYaml(o) {
// lose anchors which are based on reference equality
const x = JSON.parse(JSON.stringify(o));
return YAML.stringify(x);
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hhcnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJjaGFydC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLHdDQUE2RDtBQUM3RCx5QkFBeUI7QUFDekIsNkJBQTZCO0FBQzdCLDZDQUF5QztBQUN6Qyw2QkFBNkI7QUFDN0IsdUNBQW9DO0FBQ3BDLG1DQUFzQztBQUN0QyxtQ0FBZ0M7QUFFaEMsTUFBYSxLQUFNLFNBQVEsZ0JBQVM7SUF5QmxDLFlBQVksS0FBZ0IsRUFBRSxFQUFVO1FBQ3RDLEtBQUssQ0FBQyxLQUFLLEVBQUUsRUFBRSxDQUFDLENBQUM7UUFDakIsSUFBSSxDQUFDLFlBQVksR0FBRyxHQUFHLElBQUksQ0FBQyxJQUFJLENBQUMsUUFBUSxXQUFXLENBQUM7SUFDdkQsQ0FBQztJQTFCRDs7O09BR0c7SUFDSSxNQUFNLENBQUMsRUFBRSxDQUFDLElBQWU7UUFDOUIsSUFBSSxJQUFJLFlBQVksS0FBSyxFQUFFO1lBQ3pCLE9BQU8sSUFBSSxDQUFDO1NBQ2I7UUFFRCxNQUFNLE1BQU0sR0FBRyxJQUFJLENBQUMsSUFBSSxDQUFDLEtBQWtCLENBQUM7UUFDNUMsSUFBSSxDQUFDLE1BQU0sRUFBRTtZQUNYLE1BQU0sSUFBSSxLQUF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1hcCh4ID0+ICh4IGFzIEFwaU9iamVjdCkudG9Kc29uKCkpO1xuICB9XG5cbiAgLyoqXG4gICAqIENhbGxlZCBieSB0aGUgYXBwIHRvIHN5bnRoZXNpemUgdGhlIGNoYXJ0IGFzIGEgWUFNTCBmaWxlIGluIHRoZSBvdXRwdXQgZGlyZWN0b3J5L1xuICAgKi9cbiAgcHJvdGVjdGVkIHN5bnRoZXNpemUoc2Vzc2lvbjogSVN5bnRoZXNpc1Nlc3Npb24pIHtcbiAgICAvLyBjb252ZXJ0IGVhY2ggcmVzb3VyY2UgdG8geWFtbCBhbmQgc2VwYXJhdGUgd2l0aCBhICctLS0nIGxpbmVcbiAgICBjb25zdCBkb2MgPSB0aGlzLnRvSnNvbigpLm1hcChyID0+IFlBTUwuc3RyaW5naWZ5KHIpKS5qb2luKCctLS1cXG4nKTtcbiAgICBmcy53cml0ZUZpbGVTeW5jKHBhdGguam9pbihzZXNzaW9uLmFzc2VtYmx5Lm91dGRpciwgdGhpcy5tYW5pZmVzdEZpbGUpLCBkb2MpO1xuICB9XG59XG4iXX0=

@@ -7,3 +7,2 @@ "use strict";

const lib_1 = require("../lib");
const YAML = require("yaml");
/**

@@ -25,6 +24,3 @@ * Testing utilities for cdk8s applications.

static synth(chart) {
const app = chart.node.root;
app.synth();
const filePath = path.join(app.outdir, chart.manifestFile);
return YAML.parseAllDocuments(fs.readFileSync(filePath, 'utf-8')).map((doc) => doc.toJSON());
return chart.toJson();
}

@@ -37,2 +33,2 @@ /* istanbul ignore next */

exports.Testing = Testing;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdGluZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlc3RpbmcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSx5QkFBMEI7QUFDMUIsNkJBQThCO0FBQzlCLHlCQUEwQjtBQUMxQixnQ0FBb0M7QUFDcEMsNkJBQTZ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gIC8qKlxuICAgKiBSZXR1cm5zIGFuIGFwcCBmb3IgdGVzdGluZyB3aXRoIHRoZSBmb2xsb3dpbmcgcHJvcGVydGllczpcbiAgICogLSBPdXRwdXQgZGlyZWN0b3J5IGlzIGEgdGVtcCBkaXIuXG4gICAqL1xuICBwdWJsaWMgc3RhdGljIGFwcCgpIHtcbiAgICBjb25zdCBvdXRkaXIgPSBmcy5ta2R0ZW1wU3luYyhwYXRoLmpvaW4ob3MudG1wZGlyKCksICdjZGs4cy5vdXRkaXIuJykpO1xuICAgIHJldHVybiBuZXcgQXBwKHsgb3V0ZGlyIH0pO1xuICB9XG5cbiAgLyoqXG4gICAqIFJldHVybnMgdGhlIEt1YmVybmV0ZXMgbWFuaWZlc3Qgc3ludGhlc2l6ZWQgZnJvbSB0aGlzIGNoYXJ0LlxuICAgKi9cbiAgcHVibGljIHN0YXRpYyBzeW50aChjaGFydDogQ2hhcnQpIHtcbiAgICByZXR1cm4gY2hhcnQudG9Kc29uKCk7XG4gIH1cblxuICAvKiBpc3RhbmJ1bCBpZ25vcmUgbmV4dCAqL1xuICBwcml2YXRlIGNvbnN0cnVjdG9yKCkge1xuICAgIHJldHVybjtcbiAgfVxufVxuIl19
{
"name": "cdk8s",
"version": "0.13.0",
"version": "0.13.1-pre.80e8402790c4112e64bda2dd9a42fa897ee4ab8b",
"description": "Cloud Development Kit for Kubernetes",

@@ -5,0 +5,0 @@ "scripts": {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc