diff --git a/test-all.sh b/test-all.sh index dda48d48..c4250599 100755 --- a/test-all.sh +++ b/test-all.sh @@ -3,19 +3,34 @@ set -euo pipefail WING=${WING:-wing} -for i in $(ls -F); do - if [ -f "$i/package.json" ]; then - echo "-----------------------------------------------------------------------------" - echo $i - echo "-----------------------------------------------------------------------------" - ( - cd $i - npm i - if [ -x test.sh ]; then - ./test.sh - else - $WING test - fi - ) +# Read the skipped packages from the JSON file +skipped_packages=$(jq -r '.["skipped-packages"][].name' SKIPPED_LIBRARIES.json) + +for package_file in */package.json; do + # Check if the package.json file exists + if [[ ! -f "$package_file" ]]; then + continue + fi + + package_name="${package_file%/package.json}" + + echo "-----------------------------------------------------------------------------" + echo $package_name + echo "-----------------------------------------------------------------------------" + + # Check if the package should be skipped + if echo "$skipped_packages" | grep -q "^$package_name$"; then + echo "Skipping $package_name" + continue fi + + ( + cd $package_name + npm i + if [ -x test.sh ]; then + ./test.sh + else + $WING test + fi + ) done diff --git a/tsoa/lib.extern.d.ts b/tsoa/lib.extern.d.ts index 97cf3791..f0546230 100644 --- a/tsoa/lib.extern.d.ts +++ b/tsoa/lib.extern.d.ts @@ -44,145 +44,8 @@ export interface IHostedLiftable extends ILiftable { one or more of its methods are called. */ readonly onLift: (host: IInflightHost, ops: (readonly (string)[])) => void; } -/** Options for `construct.addMetadata()`. */ -export interface MetadataOptions { - /** Include stack trace with metadata entry. */ - readonly stackTrace?: (boolean) | undefined; - /** A JavaScript function to begin tracing from. - This option is ignored unless `stackTrace` is `true`. */ - readonly traceFromFunction?: (any) | undefined; -} -/** Implement this interface in order for the construct to be able to validate itself. */ -export interface IValidation { - /** Validate the current construct. - This method can be implemented by derived constructs in order to perform - validation logic. It is called on all constructs before synthesis. - @returns An array of validation error messages, or an empty array if there the construct is valid. */ - readonly validate: () => (readonly (string)[]); -} -/** In what order to return constructs. */ -export enum ConstructOrder { - PREORDER = 0, - POSTORDER = 1, -} -/** An entry in the construct metadata table. */ -export interface MetadataEntry { - /** The data. */ - readonly data?: any; - /** Stack trace at the point of adding the metadata. - Only available if `addMetadata()` is called with `stackTrace: true`. */ - readonly trace?: ((readonly (string)[])) | undefined; - /** The metadata entry type. */ - readonly type: string; -} -/** Represents the construct node in the scope tree. */ -export class Node { - /** Add an ordering dependency on another construct. - An `IDependable` */ - readonly addDependency: (deps: (readonly (IDependable)[])) => void; - /** Adds a metadata entry to this construct. - Entries are arbitrary values and will also include a stack trace to allow tracing back to - the code location for when the entry was added. It can be used, for example, to include source - mapping in CloudFormation templates to improve diagnostics. */ - readonly addMetadata: (type: string, data?: any, options?: (MetadataOptions) | undefined) => void; - /** 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. */ - readonly addValidation: (validation: IValidation) => void; - /** Returns an opaque tree-unique address for this construct. - Addresses are 42 characters hexadecimal strings. They begin with "c8" - followed by 40 lowercase hexadecimal characters (0-9a-f). - - Addresses are calculated using a SHA-1 of the components of the construct - path. - - To enable refactorings of construct trees, constructs with the ID `Default` - will be excluded from the calculation. In those cases constructs in the - same tree may have the same addreess. - c83a2846e506bcc5f10682b564084bca2d275709ee */ - readonly addr: string; - /** All direct children of this construct. */ - readonly children: (readonly (IConstruct)[]); - /** Returns the child construct that has the id `Default` or `Resource"`. - This is usually the construct that provides the bulk of the underlying functionality. - Useful for modifications of the underlying construct that are not available at the higher levels. - Override the defaultChild property. - - This should only be used in the cases where the correct - default child is not named 'Resource' or 'Default' as it - should be. - - If you set this to undefined, the default behavior of finding - the child named 'Resource' or 'Default' will be used. - @returns a construct or undefined if there is no default child */ - defaultChild?: (IConstruct) | undefined; - /** Return all dependencies registered on this node (non-recursive). */ - readonly dependencies: (readonly (IConstruct)[]); - /** Return this construct and all of its children in the given order. */ - readonly findAll: (order?: (ConstructOrder) | undefined) => (readonly (IConstruct)[]); - /** Return a direct child by id. - Throws an error if the child is not found. - @returns Child with the given id. */ - readonly findChild: (id: string) => IConstruct; - /** Retrieves the all context of a node from tree context. - Context is usually initialized at the root, but can be overridden at any point in the tree. - @returns The context object or an empty object if there is discovered context */ - readonly getAllContext: (defaults?: (Readonly) | undefined) => any; - /** Retrieves a value from tree context if present. Otherwise, would throw an error. - Context is usually initialized at the root, but can be overridden at any point in the tree. - @returns The context value or throws error if there is no context value for this key */ - readonly getContext: (key: string) => any; - /** The id of this construct within the current scope. - This is a scope-unique id. To obtain an app-unique id for this construct, use `addr`. */ - readonly id: string; - /** Locks this construct from allowing more children to be added. - After this - call, no more children can be added to this construct or to any children. */ - readonly lock: () => void; - /** Returns true if this construct or the scopes in which it is defined are locked. */ - readonly locked: boolean; - /** An immutable array of metadata objects associated with this construct. - This can be used, for example, to implement support for deprecation notices, source mapping, etc. */ - readonly metadata: (readonly (MetadataEntry)[]); - /** The full, absolute path of this construct in the tree. - Components are separated by '/'. */ - readonly path: string; - /** Returns the root of the construct tree. - @returns The root of the construct tree. */ - readonly root: IConstruct; - /** Returns the scope in which this construct is defined. - The value is `undefined` at the root of the construct scope tree. */ - readonly scope?: (IConstruct) | undefined; - /** All parent scopes of this construct. - @returns a list of parent scopes. The last element in the list will always - be the current construct and the first element will be the root of the - tree. */ - readonly scopes: (readonly (IConstruct)[]); - /** This can be used to set contextual values. - Context must be set before any children are added, since children may consult context info during construction. - If the key already exists, it will be overridden. */ - readonly setContext: (key: string, value?: any) => void; - /** Return a direct child by id, or undefined. - @returns the child if found, or undefined */ - readonly tryFindChild: (id: string) => IConstruct | void; - /** Retrieves a value from tree context. - Context is usually initialized at the root, but can be overridden at any point in the tree. - @returns The context value or `undefined` if there is no context value for this key. */ - readonly tryGetContext: (key: string) => any; - /** Remove the child with the given name, if present. - @returns Whether a child with the given name was deleted. */ - readonly tryRemoveChild: (childName: string) => boolean; - /** Validates this construct. - Invokes the `validate()` method on all validations added through - `addValidation()`. - @returns an array of validation error messages associated with this - construct. */ - readonly validate: () => (readonly (string)[]); -} /** Abstract interface for `Resource`. */ export interface IResource extends IConstruct, IHostedLiftable { - /** The tree node. */ - readonly node: Node; /** A hook called by the Wing compiler once for each inflight host that needs to use this object inflight. The list of requested inflight methods needed by the inflight host are given by `ops`. diff --git a/tsoa/package-lock.json b/tsoa/package-lock.json index a4f4b429..1c5cb81f 100644 --- a/tsoa/package-lock.json +++ b/tsoa/package-lock.json @@ -1,12 +1,12 @@ { "name": "@winglibs/tsoa", - "version": "0.1.15", + "version": "0.1.16", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@winglibs/tsoa", - "version": "0.1.15", + "version": "0.1.16", "license": "MIT", "peerDependencies": { "@cdktf/provider-aws": "^19.13.0", diff --git a/tsoa/package.json b/tsoa/package.json index ba333a08..1982531b 100644 --- a/tsoa/package.json +++ b/tsoa/package.json @@ -1,7 +1,7 @@ { "name": "@winglibs/tsoa", "description": "TSOA library for Wing", - "version": "0.1.15", + "version": "0.1.16", "author": { "email": "eyalk@wing.cloud", "name": "Eyal Keren"