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

constructs

Package Overview
Dependencies
Maintainers
3
Versions
1339
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

constructs - npm Package Compare versions

Comparing version 4.1.1-pre.2 to 4.1.1-pre.3

115

API.md

@@ -8,3 +8,2 @@ # API Reference

[Construct](#constructs-construct)|Represents the building block of the construct graph.
[ConstructScopeSettings](#constructs-constructscopesettings)|Global settings for this library.
[Dependable](#constructs-dependable)|Trait for IDependable.

@@ -101,49 +100,2 @@ [DependencyGroup](#constructs-dependencygroup)|A set of constructs to be used as a dependable.

## class ConstructScopeSettings <a id="constructs-constructscopesettings"></a>
Global settings for this library.
Mostly here to enable backwards compatibility with the AWS CDK.
### Properties
Name | Type | Description
-----|------|-------------
**errorMetadataKey** | <code>string</code> | <span></span>
**infoMetadataKey** | <code>string</code> | <span></span>
**warningMetadataKey** | <code>string</code> | <span></span>
### Methods
#### disableStackTraces() <a id="constructs-constructscopesettings-disablestacktraces"></a>
```ts
disableStackTraces(): void
```
#### *static* of(scope) <a id="constructs-constructscopesettings-of"></a>
```ts
static of(scope: Construct): ConstructScopeSettings
```
* **scope** (<code>[Construct](#constructs-construct)</code>) *No description*
__Returns__:
* <code>[ConstructScopeSettings](#constructs-constructscopesettings)</code>
## class Dependable 🔹 <a id="constructs-dependable"></a>

@@ -239,6 +191,6 @@

```ts
new DependencyGroup(...scopes: IConstruct[])
new DependencyGroup(...deps: IDependable[])
```
* **scopes** (<code>[IConstruct](#constructs-iconstruct)</code>) *No description*
* **deps** (<code>[IDependable](#constructs-idependable)</code>) *No description*

@@ -254,6 +206,6 @@

```ts
add(...scopes: IConstruct[]): void
add(...scopes: IDependable[]): void
```
* **scopes** (<code>[IConstruct](#constructs-iconstruct)</code>) *No description*
* **scopes** (<code>[IDependable](#constructs-idependable)</code>) *No description*

@@ -306,3 +258,3 @@

#### addDependency(...dep) <a id="constructs-node-adddependency"></a>
#### addDependency(...deps) <a id="constructs-node-adddependency"></a>

@@ -314,6 +266,6 @@ Add an ordering dependency on another construct.

```ts
addDependency(...dep: IDependable[]): void
addDependency(...deps: IDependable[]): void
```
* **dep** (<code>[IDependable](#constructs-idependable)</code>) *No description*
* **deps** (<code>[IDependable](#constructs-idependable)</code>) *No description*

@@ -323,34 +275,2 @@

#### addError(message) <a id="constructs-node-adderror"></a>
Adds an { "error": <message> } metadata entry to this construct.
The toolkit will fail synthesis when errors are reported.
Stack trace will be included unless stack traces are disabled for this scope.
```ts
addError(message: string): void
```
* **message** (<code>string</code>) The error message.
#### addInfo(message) <a id="constructs-node-addinfo"></a>
Adds a { "info": <message> } metadata entry to this construct.
The toolkit will display the info message when apps are synthesized.
Stack trace will be included unless stack traces are disabled for this scope.
```ts
addInfo(message: string): void
```
* **message** (<code>string</code>) The info message.
#### addMetadata(type, data, options?) <a id="constructs-node-addmetadata"></a>

@@ -377,15 +297,14 @@

#### addWarning(message) <a id="constructs-node-addwarning"></a>
#### addValidation(validation) <a id="constructs-node-addvalidation"></a>
Adds a { "warning": <message> } metadata entry to this construct.
Adds a validation to this construct.
The toolkit will display the warning when an app is synthesized, or fail
if run in --strict mode.
Stack trace will be included unless stack traces are disabled for this scope.
When `node.validate()` is called, the `validate()` method will be called on
all validations and all errors will be returned.
```ts
addWarning(message: string): void
addValidation(validation: IValidation): void
```
* **message** (<code>string</code>) The warning message.
* **validation** (<code>[IValidation](#constructs-ivalidation)</code>) The validation object.

@@ -512,7 +431,7 @@

If the construct implements the `IValidation` interface and has a `validate()` method, it will be
invoked. Otherwise, just returns an empty list of validation errors.
Invokes the `validate()` method on all validations added through
`addValidation()`.
```ts
validate(): Array<ValidationError>
validate(): Array<string>
```

@@ -522,3 +441,3 @@

__Returns__:
* <code>Array<[ValidationError](#constructs-validationerror)></code>
* <code>Array<string></code>

@@ -525,0 +444,0 @@

7

CHANGELOG.md

@@ -5,2 +5,9 @@ # Changelog

### [4.1.1-pre.3](https://github.com/aws/constructs/compare/v4.1.1-pre.2...v4.1.1-pre.3) (2020-07-12)
### Features
* support composite dependables via DependencyGroup ([d8cffc0](https://github.com/aws/constructs/commit/d8cffc0de0d55f67fdbc88e2885fd110928426a5))
### [4.1.1-pre.2](https://github.com/aws/constructs/compare/v4.1.1-pre.0...v4.1.1-pre.2) (2020-07-12)

@@ -7,0 +14,0 @@

@@ -39,2 +39,3 @@ import { MetadataEntry } from './metadata';

private _defaultChild;
private readonly _validations;
constructor(host: Construct, scope: IConstruct, id: string);

@@ -130,24 +131,2 @@ /**

/**
* Adds a { "info": <message> } metadata entry to this construct.
* The toolkit will display the info message when apps are synthesized.
* Stack trace will be included unless stack traces are disabled for this scope.
* @param message The info message.
*/
addInfo(message: string): void;
/**
* Adds a { "warning": <message> } metadata entry to this construct.
* The toolkit will display the warning when an app is synthesized, or fail
* if run in --strict mode.
* Stack trace will be included unless stack traces are disabled for this scope.
* @param message The warning message.
*/
addWarning(message: string): void;
/**
* Adds an { "error": <message> } metadata entry to this construct.
* The toolkit will fail synthesis when errors are reported.
* Stack trace will be included unless stack traces are disabled for this scope.
* @param message The error message.
*/
addError(message: string): void;
/**
* All parent scopes of this construct.

@@ -175,3 +154,3 @@ *

*/
addDependency(...dep: IDependable[]): void;
addDependency(...deps: IDependable[]): void;
/**

@@ -189,10 +168,20 @@ * Return all dependencies registered on this node (non-recursive).

/**
* Adds a validation to this construct.
*
* When `node.validate()` is called, the `validate()` method will be called on
* all validations and all errors will be returned.
*
* @param validation The validation object
*/
addValidation(validation: IValidation): void;
/**
* Validates this construct.
*
* If the construct implements the `IValidation` interface and has a `validate()` method, it will be
* invoked. Otherwise, just returns an empty list of validation errors.
* Invokes the `validate()` method on all validations added through
* `addValidation()`.
*
* @returns an array of validation errors
* @returns an array of validation error messages associated with this
* construct.
*/
validate(): ValidationError[];
validate(): string[];
/**

@@ -215,3 +204,2 @@ * Locks this construct from allowing more children to be added. After this

private addChild;
private addMessageMetadata;
}

@@ -218,0 +206,0 @@ /**

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

const uniqueid_1 = require("./private/uniqueid");
const consts = require("./private/consts");
const CONSTRUCT_SYMBOL = Symbol.for('constructs.Construct');

@@ -20,2 +19,3 @@ /**

this._dependencies = new Set();
this._validations = new Array();
id = id !== null && id !== void 0 ? id : ''; // if undefined, convert to empty string

@@ -176,3 +176,3 @@ this.id = sanitizeId(id);

}
const shouldTrace = this.tryGetContext(consts.DISABLE_STACK_TRACE) ? false : ((_a = options.stackTrace) !== null && _a !== void 0 ? _a : false);
const shouldTrace = (_a = options.stackTrace) !== null && _a !== void 0 ? _a : false;
const trace = shouldTrace ? stack_trace_1.captureStackTrace((_b = options.traceFromFunction) !== null && _b !== void 0 ? _b : this.addMetadata) : undefined;

@@ -182,30 +182,2 @@ this._metadata.push({ type, data, trace });

/**
* Adds a { "info": <message> } metadata entry to this construct.
* The toolkit will display the info message when apps are synthesized.
* Stack trace will be included unless stack traces are disabled for this scope.
* @param message The info message.
*/
addInfo(message) {
this.addMessageMetadata(consts.DEFAULT_INFO_KEY, consts.CUSTOM_INFO_KEY, message);
}
/**
* Adds a { "warning": <message> } metadata entry to this construct.
* The toolkit will display the warning when an app is synthesized, or fail
* if run in --strict mode.
* Stack trace will be included unless stack traces are disabled for this scope.
* @param message The warning message.
*/
addWarning(message) {
this.addMessageMetadata(consts.DEFAULT_WARNING_KEY, consts.CUSTOM_WARNING_KEY, message);
}
/**
* Adds an { "error": <message> } metadata entry to this construct.
* The toolkit will fail synthesis when errors are reported.
* Stack trace will be included unless stack traces are disabled for this scope.
* @param message The error message.
*/
addError(message) {
this.addMessageMetadata(consts.DEFAULT_ERROR_KEY, consts.CUSTOM_ERROR_KEY, message);
}
/**
* All parent scopes of this construct.

@@ -251,8 +223,5 @@ *

*/
addDependency(...dep) {
for (const scope of dep) {
const roots = dependency_1.Dependable.of(scope).dependencyRoots;
for (const root of roots) {
this._dependencies.add(root);
}
addDependency(...deps) {
for (const d of deps) {
this._dependencies.add(d);
}

@@ -264,3 +233,9 @@ }

get dependencies() {
return [...this._dependencies];
const result = new Array();
for (const dep of this._dependencies) {
for (const root of dependency_1.Dependable.of(dep).dependencyRoots) {
result.push(root);
}
}
return result;
}

@@ -281,15 +256,34 @@ /**

/**
* Adds a validation to this construct.
*
* When `node.validate()` is called, the `validate()` method will be called on
* all validations and all errors will be returned.
*
* @param validation The validation object
*/
addValidation(validation) {
this._validations.push(validation);
}
/**
* Validates this construct.
*
* If the construct implements the `IValidation` interface and has a `validate()` method, it will be
* invoked. Otherwise, just returns an empty list of validation errors.
* Invokes the `validate()` method on all validations added through
* `addValidation()`.
*
* @returns an array of validation errors
* @returns an array of validation error messages associated with this
* construct.
*/
validate() {
const errors = new Array();
for (const v of this._validations) {
errors.push(...v.validate());
}
// throw if the construct itself has a validate() method
// for backwards compatibility, if the construct itself has a "validate()"
// method treat it as a validation.
const validation = this.host;
if (!validation.validate || typeof (validation.validate) !== 'function') {
return [];
if (validation.validate && typeof (validation.validate) === 'function') {
throw new Error(`the construct ${this.path} has a "validate()" method which is no longer supported. Use "construct.node.addValidation()" to add validations to a construct`);
}
return validation.validate().map(msg => ({ source: this.host, message: msg }));
return errors;
}

@@ -338,8 +332,2 @@ /**

}
addMessageMetadata(defaultKey, customContextKey, message) {
var _a;
const key = (_a = this.tryGetContext(customContextKey)) !== null && _a !== void 0 ? _a : defaultKey;
const stackTrace = !this.tryGetContext(consts.DISABLE_STACK_TRACE);
this.addMetadata(key, message, { stackTrace });
}
}

@@ -417,2 +405,2 @@ exports.Node = Node;

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uc3RydWN0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2NvbnN0cnVjdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUNBLDZDQUF1RDtBQUN2RCx1REFBMEQ7QUFDMUQsaURBQWtEO0FBQ2xELDJDQUE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bmZ1bmN0aW9uIHNhbml0aXplSWQoaWQ6IHN0cmluZykge1xuICAvLyBFc2NhcGUgcGF0aCBzZXBzIGFzIGRvdWJsZSBkYXNoZXNcbiAgcmV0dXJuIGlkLnJlcGxhY2UoUEFUSF9TRVBfUkVHRVgsICctLScpO1xufVxuXG4vKipcbiAqIE9wdGlvbnMgZm9yIGBjb25zdHJ1Y3QuYWRkTWV0YWRhdGEoKWAuXG4gKi9cbmV4cG9ydCBpbnRlcmZhY2UgTWV0YWRhdGFPcHRpb25zIHtcbiAgLyoqXG4gICAqIEluY2x1ZGUgc3RhY2sgdHJhY2Ugd2l0aCBtZXRhZGF0YSBlbnRyeS5cbiAgICogQGRlZmF1bHQgZmFsc2VcbiAgICovXG4gIHJlYWRvbmx5IHN0YWNrVHJhY2U/OiBib29sZWFuO1xuXG4gIC8qKlxuICAgKiBBIEphdmFTY3JpcHQgZnVuY3Rpb24gdG8gYmVnaW4gdHJhY2luZyBmcm9tLlxuICAgKlxuICAgKiBUaGlzIG9wdGlvbiBpcyBpZ25vcmVkIHVubGVzcyBgc3RhY2tUcmFjZWAgaXMgYHRydWVgLlxuICAgKlxuICAgKiBAZGVmYXVsdCBhZGRNZXRhZGF0YSgpXG4gICAqL1xuICByZWFkb25seSB0cmFjZUZyb21GdW5jdGlvbj86IGFueTtcbn0iXX0=

@@ -24,8 +24,8 @@ import { IConstruct } from './construct';

export declare class DependencyGroup implements IDependable {
private readonly _dependencyRoots;
constructor(...scopes: IConstruct[]);
private readonly _deps;
constructor(...deps: IDependable[]);
/**
* Add a construct to the dependency roots
*/
add(...scopes: IConstruct[]): void;
add(...scopes: IDependable[]): void;
}

@@ -32,0 +32,0 @@ /**

@@ -12,9 +12,15 @@ "use strict";

class DependencyGroup {
constructor(...scopes) {
this._dependencyRoots = new Array();
constructor(...deps) {
this._deps = new Array();
const self = this;
Dependable.implement(this, {
get dependencyRoots() { return self._dependencyRoots; },
get dependencyRoots() {
const result = new Array();
for (const d of self._deps) {
result.push(...Dependable.of(d).dependencyRoots);
}
return result;
},
});
this.add(...scopes);
this.add(...deps);
}

@@ -25,3 +31,3 @@ /**

add(...scopes) {
this._dependencyRoots.push(...scopes);
this._deps.push(...scopes);
}

@@ -81,2 +87,2 @@ }

exports.Dependable = Dependable;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVwZW5kZW5jeS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9kZXBlbmRlbmN5LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBaUJBOzs7Ozs7O0dBT0c7QUFDSCxNQUFhLGVBQWU7SUFHMUIsWUFBWSxHQUFHLE1BQW9CO1FBRmxCLHFCQUFnQixHQUFHLElBQUksS0FBSyxFQUFjLENBQUM7UUFHMUQsTUFBTSxJQUFJLEdBQUcsSUFBSSxDQUFDO1FBQ2xCLFVBQVUsQ0FBQyxTQUFTLENBQUMsSUFBSSxFQUFFO1lBQ3pCLElBQUksZUFBZSxLQUFLLE9BQU8sSUFBSSxDQUFDLGdCQUFnQixDQUFDLENBQUMsQ0FBQztTQUN4RCxDQUFDLENBQUM7UUFFSCxJQUFJLENBQUMsR0FBRyxDQUFDLEdBQUcsTUFBTSxDQUFDLENBQUM7SUFDdEIsQ0FBQztJQUVEOztPQUVHO0lBQ0ksR0FBRyxDQUFDLEdBQUcsTUFBb0I7UUFDaEMsSUFBSSxDQUFDLGdCQUFnQixDQUFDLElBQUksQ0FBQyxHQUFHLE1BQU0sQ0FBQyxDQUFDO0lBQ3hDLENBQUM7Q0FDRjtBQWxCRCwwQ0FrQkM7QUFFRCxNQUFNLGlCQUFpQixHQUFHLE1BQU0sQ0FBQyxHQUFHLENBQUMsK0JBQStCLENBQUMsQ0FBQztBQUV0RTs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7R0FvQkc7QUFDSCxNQUFzQixVQUFVO0lBQzlCOztPQUVHO0lBQ0ksTU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ByZXR1cm4gdGhpcy5vZihpbnN0YW5jZSk7XG4gIH1cblxuICAvKipcbiAgICogVGhlIHNldCBvZiBjb25zdHJ1Y3RzIHRoYXQgZm9ybSB0aGUgcm9vdCBvZiB0aGlzIGRlcGVuZGFibGVcbiAgICpcbiAgICogQWxsIHJlc291cmNlcyB1bmRlciBhbGwgcmV0dXJuZWQgY29uc3RydWN0cyBhcmUgaW5jbHVkZWQgaW4gdGhlIG9yZGVyaW5nXG4gICAqIGRlcGVuZGVuY3kuXG4gICAqL1xuICBwdWJsaWMgYWJzdHJhY3QgcmVhZG9ubHkgZGVwZW5kZW5jeVJvb3RzOiBJQ29uc3RydWN0W107XG59XG4iXX0=
export * from './construct';
export * from './metadata';
export * from './dependency';
export * from './settings';

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

__export(require("./dependency"));
__export(require("./settings"));
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSxpQ0FBNEI7QUFFNUIsa0NBQTZCO0FBQzdCLGdDQUEyQiIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vY29uc3RydWN0JztcbmV4cG9ydCAqIGZyb20gJy4vbWV0YWRhdGEnO1xuZXhwb3J0ICogZnJvbSAnLi9kZXBlbmRlbmN5JztcbmV4cG9ydCAqIGZyb20gJy4vc2V0dGluZ3MnOyJdfQ==
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSxpQ0FBNEI7QUFFNUIsa0NBQTZCIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9jb25zdHJ1Y3QnO1xuZXhwb3J0ICogZnJvbSAnLi9tZXRhZGF0YSc7XG5leHBvcnQgKiBmcm9tICcuL2RlcGVuZGVuY3knOyJdfQ==

@@ -67,3 +67,3 @@ {

"license": "Apache-2.0",
"version": "4.1.1-pre.2",
"version": "4.1.1-pre.3",
"types": "lib/index.d.ts",

@@ -70,0 +70,0 @@ "stability": "stable",

{
"version": "4.1.1-pre.2"
"version": "4.1.1-pre.3"
}

Sorry, the diff of this file is not supported yet

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