Socket
Socket
Sign inDemoInstall

aurelia-metadata

Package Overview
Dependencies
Maintainers
3
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aurelia-metadata - npm Package Compare versions

Comparing version 1.0.0-beta.1.2.1 to 1.0.0-beta.2.0.0

.eslintrc.json

2

bower.json
{
"name": "aurelia-metadata",
"version": "1.0.0-beta.1.2.1",
"version": "1.0.0-beta.2.0.0",
"description": "Utilities for reading and writing the metadata of JavaScript functions.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -5,3 +5,3 @@ var path = require('path');

exports.base = function() {
return {
var config = {
filename: '',

@@ -15,7 +15,11 @@ filenameRelative: '',

compact: false,
code:true,
presets: [ 'es2015-loose', 'stage-1'],
code: true,
presets: [ 'es2015-loose', 'stage-1' ],
plugins: [
'syntax-flow',
'transform-decorators-legacy',
]
};
if (!paths.useTypeScriptForDTS) {
config.plugins.push(
['babel-dts-generator', {

@@ -26,7 +30,9 @@ packageName: paths.packageName,

suppressComments: false,
memberOutputFilter: /^_.*/
}],
'transform-flow-strip-types'
]
memberOutputFilter: /^_.*/,
suppressAmbientDeclaration: true
}]
);
};
config.plugins.push('transform-flow-strip-types');
return config;
}

@@ -57,1 +63,7 @@

};
exports['native-modules'] = function() {
var options = exports.base();
options.presets[0] = 'es2015-loose-native-modules';
return options;
}

@@ -17,2 +17,39 @@ var path = require('path');

packageName: pkg.name
};var path = require('path');
var fs = require('fs');
// hide warning //
var emitter = require('events');
emitter.defaultMaxListeners = 20;
var appRoot = 'src/';
var pkg = JSON.parse(fs.readFileSync('./package.json', 'utf-8'));
var paths = {
root: appRoot,
source: appRoot + '**/*.js',
html: appRoot + '**/*.html',
style: 'styles/**/*.css',
output: 'dist/',
doc:'./doc',
e2eSpecsSrc: 'test/e2e/src/*.js',
e2eSpecsDist: 'test/e2e/dist/',
packageName: pkg.name,
ignore: [],
useTypeScriptForDTS: false,
importsToAdd: [],
sort: false
};
paths.files = [
'metadata.js',
'origin.js',
'decorators.js',
'deprecated.js',
'mixin.js',
'protocol.js'
].map(function(file){
return paths.root + file;
});
module.exports = paths;

@@ -6,2 +6,3 @@ var gulp = require('gulp');

var compilerOptions = require('../babel-options');
var compilerTsOptions = require('../typescript-options');
var assign = Object.assign || require('object.assign');

@@ -13,21 +14,34 @@ var through2 = require('through2');

var tools = require('aurelia-tools');
var ts = require('gulp-typescript');
var gutil = require('gulp-util');
var gulpIgnore = require('gulp-ignore');
var merge = require('merge2');
var jsName = paths.packageName + '.js';
var compileToModules = ['es2015', 'commonjs', 'amd', 'system', 'native-modules'];
gulp.task('build-index', function(){
var importsToAdd = [];
var files = [
'metadata.js',
'origin.js',
'decorators.js',
'deprecated.js',
'mixin.js',
'protocol.js'
].map(function(file){
return paths.root + file;
function cleanGeneratedCode() {
return through2.obj(function(file, enc, callback) {
file.contents = new Buffer(tools.cleanGeneratedCode(file.contents.toString('utf8')));
this.push(file);
return callback();
});
}
return gulp.src(files)
.pipe(through2.obj(function(file, enc, callback) {
file.contents = new Buffer(tools.extractImports(file.contents.toString("utf8"), importsToAdd));
gulp.task('build-index', function() {
var importsToAdd = paths.importsToAdd.slice();
var src = gulp.src(paths.files);
if (paths.sort) {
src = src.pipe(tools.sortFiles());
}
if (paths.ignore) {
paths.ignore.forEach(function(filename){
src = src.pipe(gulpIgnore.exclude(filename));
});
}
return src.pipe(through2.obj(function(file, enc, callback) {
file.contents = new Buffer(tools.extractImports(file.contents.toString('utf8'), importsToAdd));
this.push(file);

@@ -43,33 +57,53 @@ return callback();

gulp.task('build-es2015', function () {
return gulp.src(paths.output + jsName)
.pipe(to5(assign({}, compilerOptions.es2015())))
.pipe(gulp.dest(paths.output + 'es2015'));
});
function gulpFileFromString(filename, string) {
var src = require('stream').Readable({ objectMode: true });
src._read = function() {
this.push(new gutil.File({ cwd: paths.appRoot, base: paths.output, path: filename, contents: new Buffer(string) }))
this.push(null)
}
return src;
}
gulp.task('build-commonjs', function () {
return gulp.src(paths.output + jsName)
.pipe(to5(assign({}, compilerOptions.commonjs())))
.pipe(gulp.dest(paths.output + 'commonjs'));
});
function srcForBabel() {
return merge(
gulp.src(paths.output + jsName),
gulpFileFromString(paths.output + 'index.js', "export * from './" + paths.packageName + "';")
);
}
gulp.task('build-amd', function () {
return gulp.src(paths.output + jsName)
.pipe(to5(assign({}, compilerOptions.amd())))
.pipe(gulp.dest(paths.output + 'amd'));
});
function srcForTypeScript() {
return gulp
.src(paths.output + paths.packageName + '.js')
.pipe(rename(function (path) {
if (path.extname == '.js') {
path.extname = '.ts';
}
}));
}
gulp.task('build-system', function () {
return gulp.src(paths.output + jsName)
.pipe(to5(assign({}, compilerOptions.system())))
.pipe(gulp.dest(paths.output + 'system'));
compileToModules.forEach(function(moduleType){
gulp.task('build-babel-' + moduleType, function () {
return srcForBabel()
.pipe(to5(assign({}, compilerOptions[moduleType]())))
.pipe(cleanGeneratedCode())
.pipe(gulp.dest(paths.output + moduleType));
});
if (moduleType === 'native-modules') return; // typescript doesn't support the combination of: es5 + native modules
gulp.task('build-ts-' + moduleType, function () {
var tsProject = ts.createProject(
compilerTsOptions({ module: moduleType, target: moduleType == 'es2015' ? 'es2015' : 'es5' }), ts.reporter.defaultReporter());
var tsResult = srcForTypeScript().pipe(ts(tsProject));
return tsResult.js
.pipe(gulp.dest(paths.output + moduleType));
});
});
gulp.task('build-dts', function(){
return gulp.src(paths.output + paths.packageName + '.d.ts')
.pipe(rename(paths.packageName + '.d.ts'))
.pipe(gulp.dest(paths.output + 'es2015'))
.pipe(gulp.dest(paths.output + 'commonjs'))
.pipe(gulp.dest(paths.output + 'amd'))
.pipe(gulp.dest(paths.output + 'system'));
gulp.task('build-dts', function() {
var tsProject = ts.createProject(
compilerTsOptions({ removeComments: false, target: "es2015", module: "es2015" }), ts.reporter.defaultReporter());
var tsResult = srcForTypeScript().pipe(ts(tsProject));
return tsResult.dts
.pipe(gulp.dest(paths.output));
});

@@ -81,6 +115,20 @@

'build-index',
['build-es2015', 'build-commonjs', 'build-amd', 'build-system'],
'build-dts',
compileToModules
.map(function(moduleType) { return 'build-babel-' + moduleType })
.concat(paths.useTypeScriptForDTS ? ['build-dts'] : []),
callback
);
});
gulp.task('build-ts', function(callback) {
return runSequence(
'clean',
'build-index',
'build-babel-native-modules',
compileToModules
.filter(function(moduleType) { return moduleType !== 'native-modules' })
.map(function(moduleType) { return 'build-ts-' + moduleType })
.concat(paths.useTypeScriptForDTS ? ['build-dts'] : []),
callback
);
});
var gulp = require('gulp');
var paths = require('../paths');
var typedoc = require("gulp-typedoc");
var typedocExtractor = require("gulp-typedoc-extractor");
var typedoc = require('gulp-typedoc');
var runSequence = require('run-sequence');
var through2 = require('through2');
gulp.task('doc-generate', function(){
return gulp.src([paths.output + '*.d.ts', paths.doc + '/core-js.d.ts', './jspm_packages/npm/*/*.d.ts'])
return gulp.src([paths.output + paths.packageName + '.d.ts'])
.pipe(typedoc({
            target: "es6",
            includeDeclarations: true,
            json: paths.doc + '/api.json',
            name: paths.packageName + '-docs', 
mode: 'modules',
excludeExternals: true,
            ignoreCompilerErrors: false,
            version: true
        }));
target: 'es6',
includeDeclarations: true,
moduleResolution: 'node',
json: paths.doc + '/api.json',
name: paths.packageName + '-docs', 
mode: 'modules',
excludeExternals: true,
ignoreCompilerErrors: false,
version: true
}));
});
gulp.task('doc-extract', function(){
return gulp.src([paths.doc + '/api.json'])
.pipe(typedocExtractor(paths.packageName))
.pipe(gulp.dest(paths.doc));
gulp.task('doc-shape', function(){
return gulp.src([paths.doc + '/api.json'])
.pipe(through2.obj(function(file, enc, callback) {
var json = JSON.parse(file.contents.toString('utf8')).children[0];
json = {
name: paths.packageName,
children: json.children,
groups: json.groups
};
file.contents = new Buffer(JSON.stringify(json));
this.push(file);
return callback();
}))
.pipe(gulp.dest(paths.doc));
});

@@ -29,6 +42,6 @@

return runSequence(
'doc-generate',
'doc-extract',
'doc-generate',
'doc-shape',
callback
);
});

@@ -27,7 +27,3 @@ define(['exports', 'aurelia-pal'], function (exports, _aureliaPal) {

function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}

@@ -71,3 +67,3 @@ var metadata = exports.metadata = {

function Origin(moduleId, moduleMember) {
_classCallCheck(this, Origin);

@@ -95,2 +91,4 @@ this.moduleId = moduleId;

}
return false;
});

@@ -97,0 +95,0 @@ }

@@ -1,190 +0,188 @@

declare module 'aurelia-metadata' {
import {
PLATFORM
} from 'aurelia-pal';
import {
PLATFORM
} from 'aurelia-pal';
/**
* Helpers for working with metadata on functions.
*/
export declare interface MetadataType {
/**
* Helpers for working with metadata on functions.
*/
export interface MetadataType {
/**
* The metadata key representing pluggable resources.
*/
resource: string;
/**
* The metadata key representing parameter type information.
*/
paramTypes: string;
/**
* The metadata key representing property information.
*/
properties: string;
/**
* Gets metadata specified by a key on a target, searching up the inheritance hierarchy.
* @param metadataKey The key for the metadata to lookup.
* @param target The target to lookup the metadata on.
* @param targetKey The member on the target to lookup the metadata on.
*/
get(metadataKey: string, target: Function, targetKey?: string): Object;
/**
* Gets metadata specified by a key on a target, only searching the own instance.
* @param metadataKey The key for the metadata to lookup.
* @param target The target to lookup the metadata on.
* @param targetKey The member on the target to lookup the metadata on.
*/
getOwn(metadataKey: string, target: Function, targetKey?: string): Object;
/**
* Defines metadata specified by a key on a target.
* @param metadataKey The key for the metadata to define.
* @param target The target to set the metadata on.
* @param targetKey The member on the target to set the metadata on.
*/
define(metadataKey: string, metadataValue: Object, target: Function, targetKey?: string): void;
/**
* Gets metadata specified by a key on a target, or creates an instance of the specified metadata if not found.
* @param metadataKey The key for the metadata to lookup or create.
* @param Type The type of metadata to create if existing metadata is not found.
* @param target The target to lookup or create the metadata on.
* @param targetKey The member on the target to lookup or create the metadata on.
*/
getOrCreateOwn(metadataKey: string, Type: Function, target: Function, targetKey?: string): Object;
}
* The metadata key representing pluggable resources.
*/
resource: string;
/**
* An object capable of applying it's captured decorators to a target.
*/
export interface DecoratorApplicator {
/**
* Applies the decorators to the target.
* @param target The target.
* @param key If applying to a method, the member name.
* @param key If applying to a method, you may supply an initial descriptor to pass to the decorators.
*/
on(target: any, key?: string, descriptor?: Object): any;
}
* The metadata key representing parameter type information.
*/
paramTypes: string;
/**
* Options that control how the deprected decorator should function at runtime.
*/
export interface DeprecatedOptions {
/**
* Specifies a custom deprecation message.
*/
message: string;
/**
* Specifies whether or not the deprecation should throw an error.
*/
error: boolean;
}
* The metadata key representing property information.
*/
properties: string;
/**
* Options used during protocol creation.
*/
export interface ProtocolOptions {
/**
* A function that will be run to validate the decorated class when the protocol is applied. It is also used to validate adhoc instances.
* If the validation fails, a message should be returned which directs the developer in how to address the issue.
*/
validate?: (target: any) => string | boolean;
/**
* A function which has the opportunity to compose additional behavior into the decorated class when the protocol is applied.
*/
compose?: (target: any) => void;
}
* Gets metadata specified by a key on a target, searching up the inheritance hierarchy.
* @param metadataKey The key for the metadata to lookup.
* @param target The target to lookup the metadata on.
* @param targetKey The member on the target to lookup the metadata on.
*/
get(metadataKey: string, target: Function, targetKey?: string): Object;
/**
* Provides helpers for working with metadata.
*/
* Gets metadata specified by a key on a target, only searching the own instance.
* @param metadataKey The key for the metadata to lookup.
* @param target The target to lookup the metadata on.
* @param targetKey The member on the target to lookup the metadata on.
*/
getOwn(metadataKey: string, target: Function, targetKey?: string): Object;
/**
* Provides helpers for working with metadata.
*/
export const metadata: MetadataType;
* Defines metadata specified by a key on a target.
* @param metadataKey The key for the metadata to define.
* @param target The target to set the metadata on.
* @param targetKey The member on the target to set the metadata on.
*/
define(metadataKey: string, metadataValue: Object, target: Function, targetKey?: string): void;
/**
* A metadata annotation that describes the origin module of the function to which it's attached.
*/
export class Origin {
/**
* The id of the module from which the item originated.
*/
moduleId: string;
/**
* The member name of the export on the module object from which the item originated.
*/
moduleMember: string;
/**
* Creates an instance of Origin metadata.
* @param moduleId The id of the module from which the item originated.
* @param moduleMember The member name of the export on the module object from which the item originated.
*/
constructor(moduleId: string, moduleMember: string);
/**
* Get the Origin metadata for the specified function.
* @param fn The function to inspect for Origin metadata.
* @return Returns the Origin metadata.
*/
static get(fn: Function): Origin;
/**
* Set the Origin metadata for the specified function.
* @param fn The function to set the Origin metadata on.
* @param fn The Origin metadata to store on the function.
* @return Returns the Origin metadata.
*/
static set(fn: Function, origin: Origin): void;
}
* Gets metadata specified by a key on a target, or creates an instance of the specified metadata if not found.
* @param metadataKey The key for the metadata to lookup or create.
* @param Type The type of metadata to create if existing metadata is not found.
* @param target The target to lookup or create the metadata on.
* @param targetKey The member on the target to lookup or create the metadata on.
*/
getOrCreateOwn(metadataKey: string, Type: Function, target: Function, targetKey?: string): Object;
}
/**
* An object capable of applying it's captured decorators to a target.
*/
export declare interface DecoratorApplicator {
/**
* Enables applying decorators, particularly for use when there is no syntax support in the language, such as with ES5 and ES2016.
* @param rest The decorators to apply.
*/
* Applies the decorators to the target.
* @param target The target.
* @param key If applying to a method, the member name.
* @param key If applying to a method, you may supply an initial descriptor to pass to the decorators.
*/
on(target: any, key?: string, descriptor?: Object): any;
}
/**
* Options that control how the deprected decorator should function at runtime.
*/
export declare interface DeprecatedOptions {
/**
* Enables applying decorators, particularly for use when there is no syntax support in the language, such as with ES5 and ES2016.
* @param rest The decorators to apply.
*/
export function decorators(...rest: Function[]): DecoratorApplicator;
* Specifies a custom deprecation message.
*/
message: string;
/**
* Decorator: Enables marking methods as deprecated.
* @param optionsOrTarget Options for how the deprected decorator should function at runtime.
*/
* Specifies whether or not the deprecation should throw an error.
*/
error: boolean;
}
/**
* Options used during protocol creation.
*/
export declare interface ProtocolOptions {
/**
* Decorator: Enables marking methods as deprecated.
* @param optionsOrTarget Options for how the deprected decorator should function at runtime.
*/
export function deprecated(optionsOrTarget?: DeprecatedOptions, maybeKey?: string, maybeDescriptor?: Object): any;
* A function that will be run to validate the decorated class when the protocol is applied. It is also used to validate adhoc instances.
* If the validation fails, a message should be returned which directs the developer in how to address the issue.
*/
validate?: (target: any) => string | boolean;
/**
* Decorator: Enables mixing behaior into a class.
* @param behavior An object with keys for each method to mix into the target class.
*/
export function mixin(behavior: Object): any;
* A function which has the opportunity to compose additional behavior into the decorated class when the protocol is applied.
*/
compose?: (target: any) => void;
}
/**
* Provides helpers for working with metadata.
*/
/**
* Provides helpers for working with metadata.
*/
export declare const metadata: MetadataType;
/**
* A metadata annotation that describes the origin module of the function to which it's attached.
*/
export declare class Origin {
/**
* Decorator: Creates a protocol.
* @param name The name of the protocol.
* @param options The validation function or options object used in configuring the protocol.
*/
* The id of the module from which the item originated.
*/
moduleId: string;
/**
* Decorator: Creates a protocol.
* @param name The name of the protocol.
* @param options The validation function or options object used in configuring the protocol.
*/
export function protocol(name: string, options?: ((target: any) => string | boolean) | ProtocolOptions): any;
}
* The member name of the export on the module object from which the item originated.
*/
moduleMember: string;
/**
* Creates an instance of Origin metadata.
* @param moduleId The id of the module from which the item originated.
* @param moduleMember The member name of the export on the module object from which the item originated.
*/
constructor(moduleId: string, moduleMember: string);
/**
* Get the Origin metadata for the specified function.
* @param fn The function to inspect for Origin metadata.
* @return Returns the Origin metadata.
*/
static get(fn: Function): Origin;
/**
* Set the Origin metadata for the specified function.
* @param fn The function to set the Origin metadata on.
* @param fn The Origin metadata to store on the function.
* @return Returns the Origin metadata.
*/
static set(fn: Function, origin: Origin): void;
}
/**
* Enables applying decorators, particularly for use when there is no syntax support in the language, such as with ES5 and ES2016.
* @param rest The decorators to apply.
*/
/**
* Enables applying decorators, particularly for use when there is no syntax support in the language, such as with ES5 and ES2016.
* @param rest The decorators to apply.
*/
export declare function decorators(...rest: Function[]): DecoratorApplicator;
/**
* Decorator: Enables marking methods as deprecated.
* @param optionsOrTarget Options for how the deprected decorator should function at runtime.
*/
/**
* Decorator: Enables marking methods as deprecated.
* @param optionsOrTarget Options for how the deprected decorator should function at runtime.
*/
export declare function deprecated(optionsOrTarget?: DeprecatedOptions, maybeKey?: string, maybeDescriptor?: Object): any;
/**
* Decorator: Enables mixing behaior into a class.
* @param behavior An object with keys for each method to mix into the target class.
*/
export declare function mixin(behavior: Object): any;
/**
* Decorator: Creates a protocol.
* @param name The name of the protocol.
* @param options The validation function or options object used in configuring the protocol.
*/
/**
* Decorator: Creates a protocol.
* @param name The name of the protocol.
* @param options The validation function or options object used in configuring the protocol.
*/
export declare function protocol(name: string, options?: ((target: any) => string | boolean) | ProtocolOptions): any;

@@ -129,2 +129,4 @@ import {PLATFORM} from 'aurelia-pal';

}
return false;
});

@@ -131,0 +133,0 @@ }

@@ -17,4 +17,4 @@ 'use strict';

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var metadata = exports.metadata = {

@@ -57,3 +57,3 @@ resource: 'aurelia:resource',

function Origin(moduleId, moduleMember) {
_classCallCheck(this, Origin);

@@ -81,2 +81,4 @@ this.moduleId = moduleId;

}
return false;
});

@@ -83,0 +85,0 @@ }

@@ -63,2 +63,4 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

}
return false;
});

@@ -65,0 +67,0 @@ }

'use strict';
System.register(['aurelia-pal'], function (_export, _context) {
"use strict";
var PLATFORM, _extends, metadata, originStorage, unknownOrigin, Origin;
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}

@@ -111,3 +109,3 @@ function alwaysValid() {

function Origin(moduleId, moduleMember) {
_classCallCheck(this, Origin);

@@ -135,2 +133,4 @@ this.moduleId = moduleId;

}
return false;
});

@@ -137,0 +137,0 @@ }

@@ -1,1233 +0,1 @@

{
"id": 2,
"name": "\"aurelia-metadata\"",
"kind": 2,
"kindString": "Module",
"flags": {},
"children": [
{
"id": 47,
"name": "Origin",
"kind": 128,
"kindString": "Class",
"flags": {
"isExported": true
},
"comment": {
"shortText": "A metadata annotation that describes the origin module of the function to which it's attached."
},
"children": [
{
"id": 50,
"name": "constructor",
"kind": 512,
"kindString": "Constructor",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Creates an instance of Origin metadata."
},
"signatures": [
{
"id": 51,
"name": "new Origin",
"kind": 16384,
"kindString": "Constructor signature",
"flags": {},
"comment": {
"shortText": "Creates an instance of Origin metadata."
},
"parameters": [
{
"id": 52,
"name": "moduleId",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"comment": {
"shortText": "The id of the module from which the item originated."
},
"type": {
"type": "instrinct",
"name": "string"
}
},
{
"id": 53,
"name": "moduleMember",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"comment": {
"shortText": "The member name of the export on the module object from which the item originated.\n"
},
"type": {
"type": "instrinct",
"name": "string"
}
}
],
"type": {
"type": "reference",
"name": "Origin",
"id": 47,
"moduleName": "\"aurelia-metadata\""
}
}
]
},
{
"id": 48,
"name": "moduleId",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"comment": {
"shortText": "The id of the module from which the item originated."
},
"type": {
"type": "instrinct",
"name": "string"
}
},
{
"id": 49,
"name": "moduleMember",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"comment": {
"shortText": "The member name of the export on the module object from which the item originated."
},
"type": {
"type": "instrinct",
"name": "string"
}
},
{
"id": 54,
"name": "get",
"kind": 2048,
"kindString": "Method",
"flags": {
"isStatic": true,
"isExported": true
},
"signatures": [
{
"id": 55,
"name": "get",
"kind": 4096,
"kindString": "Call signature",
"flags": {},
"comment": {
"shortText": "Get the Origin metadata for the specified function.",
"returns": "Returns the Origin metadata.\n"
},
"parameters": [
{
"id": 56,
"name": "fn",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"comment": {
"text": "The function to inspect for Origin metadata."
},
"type": {
"type": "reference",
"name": "Function"
}
}
],
"type": {
"type": "reference",
"name": "Origin",
"id": 47,
"moduleName": "\"aurelia-metadata\""
}
}
]
},
{
"id": 57,
"name": "set",
"kind": 2048,
"kindString": "Method",
"flags": {
"isStatic": true,
"isExported": true
},
"signatures": [
{
"id": 58,
"name": "set",
"kind": 4096,
"kindString": "Call signature",
"flags": {},
"comment": {
"shortText": "Set the Origin metadata for the specified function.",
"returns": "Returns the Origin metadata.\n"
},
"parameters": [
{
"id": 59,
"name": "fn",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"comment": {
"shortText": "The Origin metadata to store on the function."
},
"type": {
"type": "reference",
"name": "Function"
}
},
{
"id": 60,
"name": "origin",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"type": {
"type": "reference",
"name": "Origin",
"id": 47,
"moduleName": "\"aurelia-metadata\""
}
}
],
"type": {
"type": "instrinct",
"name": "void"
}
}
]
}
],
"groups": [
{
"title": "Constructors",
"kind": 512,
"children": [
50
]
},
{
"title": "Properties",
"kind": 1024,
"children": [
48,
49
]
},
{
"title": "Methods",
"kind": 2048,
"children": [
54,
57
]
}
]
},
{
"id": 29,
"name": "DecoratorApplicator",
"kind": 256,
"kindString": "Interface",
"flags": {
"isExported": true
},
"comment": {
"shortText": "An object capable of applying it's captured decorators to a target."
},
"children": [
{
"id": 30,
"name": "on",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 31,
"name": "on",
"kind": 4096,
"kindString": "Call signature",
"flags": {},
"comment": {
"shortText": "Applies the decorators to the target."
},
"parameters": [
{
"id": 32,
"name": "target",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"comment": {
"text": "The target."
},
"type": {
"type": "instrinct",
"name": "any"
}
},
{
"id": 33,
"name": "key",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isOptional": true
},
"comment": {
"shortText": "If applying to a method, you may supply an initial descriptor to pass to the decorators.\n"
},
"type": {
"type": "instrinct",
"name": "string"
}
},
{
"id": 34,
"name": "descriptor",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isOptional": true
},
"type": {
"type": "reference",
"name": "Object"
}
}
],
"type": {
"type": "instrinct",
"name": "any"
}
}
]
}
],
"groups": [
{
"title": "Methods",
"kind": 2048,
"children": [
30
]
}
]
},
{
"id": 35,
"name": "DeprecatedOptions",
"kind": 256,
"kindString": "Interface",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Options that control how the deprected decorator should function at runtime."
},
"children": [
{
"id": 37,
"name": "error",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Specifies whether or not the deprecation should throw an error."
},
"type": {
"type": "instrinct",
"name": "boolean"
}
},
{
"id": 36,
"name": "message",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Specifies a custom deprecation message."
},
"type": {
"type": "instrinct",
"name": "string"
}
}
],
"groups": [
{
"title": "Properties",
"kind": 1024,
"children": [
37,
36
]
}
]
},
{
"id": 3,
"name": "MetadataType",
"kind": 256,
"kindString": "Interface",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Helpers for working with metadata on functions."
},
"children": [
{
"id": 5,
"name": "paramTypes",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"comment": {
"shortText": "The metadata key representing parameter type information."
},
"type": {
"type": "instrinct",
"name": "string"
}
},
{
"id": 6,
"name": "properties",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"comment": {
"shortText": "The metadata key representing property information."
},
"type": {
"type": "instrinct",
"name": "string"
}
},
{
"id": 4,
"name": "resource",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"comment": {
"shortText": "The metadata key representing pluggable resources."
},
"type": {
"type": "instrinct",
"name": "string"
}
},
{
"id": 17,
"name": "define",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 18,
"name": "define",
"kind": 4096,
"kindString": "Call signature",
"flags": {},
"comment": {
"shortText": "Defines metadata specified by a key on a target."
},
"parameters": [
{
"id": 19,
"name": "metadataKey",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"comment": {
"text": "The key for the metadata to define."
},
"type": {
"type": "instrinct",
"name": "string"
}
},
{
"id": 20,
"name": "metadataValue",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"type": {
"type": "reference",
"name": "Object"
}
},
{
"id": 21,
"name": "target",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"comment": {
"text": "The target to set the metadata on."
},
"type": {
"type": "reference",
"name": "Function"
}
},
{
"id": 22,
"name": "targetKey",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isOptional": true
},
"comment": {
"text": "The member on the target to set the metadata on.\n"
},
"type": {
"type": "instrinct",
"name": "string"
}
}
],
"type": {
"type": "instrinct",
"name": "void"
}
}
]
},
{
"id": 7,
"name": "get",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 8,
"name": "get",
"kind": 4096,
"kindString": "Call signature",
"flags": {},
"comment": {
"shortText": "Gets metadata specified by a key on a target, searching up the inheritance hierarchy."
},
"parameters": [
{
"id": 9,
"name": "metadataKey",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"comment": {
"text": "The key for the metadata to lookup."
},
"type": {
"type": "instrinct",
"name": "string"
}
},
{
"id": 10,
"name": "target",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"comment": {
"text": "The target to lookup the metadata on."
},
"type": {
"type": "reference",
"name": "Function"
}
},
{
"id": 11,
"name": "targetKey",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isOptional": true
},
"comment": {
"text": "The member on the target to lookup the metadata on.\n"
},
"type": {
"type": "instrinct",
"name": "string"
}
}
],
"type": {
"type": "reference",
"name": "Object"
}
}
]
},
{
"id": 23,
"name": "getOrCreateOwn",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 24,
"name": "getOrCreateOwn",
"kind": 4096,
"kindString": "Call signature",
"flags": {},
"comment": {
"shortText": "Gets metadata specified by a key on a target, or creates an instance of the specified metadata if not found."
},
"parameters": [
{
"id": 25,
"name": "metadataKey",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"comment": {
"text": "The key for the metadata to lookup or create."
},
"type": {
"type": "instrinct",
"name": "string"
}
},
{
"id": 26,
"name": "Type",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"comment": {
"text": "The type of metadata to create if existing metadata is not found."
},
"type": {
"type": "reference",
"name": "Function"
}
},
{
"id": 27,
"name": "target",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"comment": {
"text": "The target to lookup or create the metadata on."
},
"type": {
"type": "reference",
"name": "Function"
}
},
{
"id": 28,
"name": "targetKey",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isOptional": true
},
"comment": {
"text": "The member on the target to lookup or create the metadata on.\n"
},
"type": {
"type": "instrinct",
"name": "string"
}
}
],
"type": {
"type": "reference",
"name": "Object"
}
}
]
},
{
"id": 12,
"name": "getOwn",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 13,
"name": "getOwn",
"kind": 4096,
"kindString": "Call signature",
"flags": {},
"comment": {
"shortText": "Gets metadata specified by a key on a target, only searching the own instance."
},
"parameters": [
{
"id": 14,
"name": "metadataKey",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"comment": {
"text": "The key for the metadata to lookup."
},
"type": {
"type": "instrinct",
"name": "string"
}
},
{
"id": 15,
"name": "target",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"comment": {
"text": "The target to lookup the metadata on."
},
"type": {
"type": "reference",
"name": "Function"
}
},
{
"id": 16,
"name": "targetKey",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isOptional": true
},
"comment": {
"text": "The member on the target to lookup the metadata on.\n"
},
"type": {
"type": "instrinct",
"name": "string"
}
}
],
"type": {
"type": "reference",
"name": "Object"
}
}
]
}
],
"groups": [
{
"title": "Properties",
"kind": 1024,
"children": [
5,
6,
4
]
},
{
"title": "Methods",
"kind": 2048,
"children": [
17,
7,
23,
12
]
}
]
},
{
"id": 38,
"name": "ProtocolOptions",
"kind": 256,
"kindString": "Interface",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Options used during protocol creation."
},
"children": [
{
"id": 43,
"name": "compose",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true,
"isOptional": true
},
"comment": {
"shortText": "A function which has the opportunity to compose additional behavior into the decorated class when the protocol is applied."
},
"type": {
"type": "reflection",
"declaration": {
"id": 44,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {},
"signatures": [
{
"id": 45,
"name": "__call",
"kind": 4096,
"kindString": "Call signature",
"flags": {},
"parameters": [
{
"id": 46,
"name": "target",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"type": {
"type": "instrinct",
"name": "any"
}
}
],
"type": {
"type": "instrinct",
"name": "void"
}
}
]
}
}
},
{
"id": 39,
"name": "validate",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true,
"isOptional": true
},
"comment": {
"shortText": "A function that will be run to validate the decorated class when the protocol is applied. It is also used to validate adhoc instances.\nIf the validation fails, a message should be returned which directs the developer in how to address the issue."
},
"type": {
"type": "reflection",
"declaration": {
"id": 40,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {},
"signatures": [
{
"id": 41,
"name": "__call",
"kind": 4096,
"kindString": "Call signature",
"flags": {},
"parameters": [
{
"id": 42,
"name": "target",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"type": {
"type": "instrinct",
"name": "any"
}
}
],
"type": {
"type": "union",
"types": [
{
"type": "instrinct",
"name": "string"
},
{
"type": "instrinct",
"name": "boolean"
}
]
}
}
]
}
}
}
],
"groups": [
{
"title": "Properties",
"kind": 1024,
"children": [
43,
39
]
}
]
},
{
"id": 61,
"name": "metadata",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Provides helpers for working with metadata."
},
"type": {
"type": "reference",
"name": "MetadataType",
"id": 3,
"moduleName": "\"aurelia-metadata\""
}
},
{
"id": 62,
"name": "decorators",
"kind": 64,
"kindString": "Function",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 63,
"name": "decorators",
"kind": 4096,
"kindString": "Call signature",
"flags": {},
"comment": {
"shortText": "Enables applying decorators, particularly for use when there is no syntax support in the language, such as with ES5 and ES2016."
},
"parameters": [
{
"id": 64,
"name": "rest",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isRest": true
},
"comment": {
"text": "The decorators to apply.\n"
},
"type": {
"type": "reference",
"isArray": true,
"name": "Function"
}
}
],
"type": {
"type": "reference",
"name": "DecoratorApplicator",
"id": 29,
"moduleName": "\"aurelia-metadata\""
}
}
]
},
{
"id": 65,
"name": "deprecated",
"kind": 64,
"kindString": "Function",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 66,
"name": "deprecated",
"kind": 4096,
"kindString": "Call signature",
"flags": {},
"comment": {
"shortText": "Decorator: Enables marking methods as deprecated."
},
"parameters": [
{
"id": 67,
"name": "optionsOrTarget",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isOptional": true
},
"comment": {
"text": "Options for how the deprected decorator should function at runtime.\n"
},
"type": {
"type": "reference",
"name": "DeprecatedOptions",
"id": 35,
"moduleName": "\"aurelia-metadata\""
}
},
{
"id": 68,
"name": "maybeKey",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isOptional": true
},
"type": {
"type": "instrinct",
"name": "string"
}
},
{
"id": 69,
"name": "maybeDescriptor",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isOptional": true
},
"type": {
"type": "reference",
"name": "Object"
}
}
],
"type": {
"type": "instrinct",
"name": "any"
}
}
]
},
{
"id": 70,
"name": "mixin",
"kind": 64,
"kindString": "Function",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 71,
"name": "mixin",
"kind": 4096,
"kindString": "Call signature",
"flags": {},
"comment": {
"shortText": "Decorator: Enables mixing behaior into a class."
},
"parameters": [
{
"id": 72,
"name": "behavior",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"comment": {
"text": "An object with keys for each method to mix into the target class.\n"
},
"type": {
"type": "reference",
"name": "Object"
}
}
],
"type": {
"type": "instrinct",
"name": "any"
}
}
]
},
{
"id": 73,
"name": "protocol",
"kind": 64,
"kindString": "Function",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 74,
"name": "protocol",
"kind": 4096,
"kindString": "Call signature",
"flags": {},
"comment": {
"shortText": "Decorator: Creates a protocol."
},
"parameters": [
{
"id": 75,
"name": "name",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"comment": {
"text": "The name of the protocol."
},
"type": {
"type": "instrinct",
"name": "string"
}
},
{
"id": 76,
"name": "options",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isOptional": true
},
"comment": {
"text": "The validation function or options object used in configuring the protocol.\n"
},
"type": {
"type": "union",
"types": [
{
"type": "reflection",
"declaration": {
"id": 77,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {},
"signatures": [
{
"id": 78,
"name": "__call",
"kind": 4096,
"kindString": "Call signature",
"flags": {},
"parameters": [
{
"id": 79,
"name": "target",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"type": {
"type": "instrinct",
"name": "any"
}
}
],
"type": {
"type": "union",
"types": [
{
"type": "instrinct",
"name": "string"
},
{
"type": "instrinct",
"name": "boolean"
}
]
}
}
]
}
},
{
"type": "reference",
"name": "ProtocolOptions",
"id": 38
}
]
}
}
],
"type": {
"type": "instrinct",
"name": "any"
}
}
]
}
],
"groups": [
{
"title": "Classes",
"kind": 128,
"children": [
47
]
},
{
"title": "Interfaces",
"kind": 256,
"children": [
29,
35,
3,
38
]
},
{
"title": "Variables",
"kind": 32,
"children": [
61
]
},
{
"title": "Functions",
"kind": 64,
"children": [
62,
65,
70,
73
]
}
]
}
{"name":"aurelia-metadata","children":[{"id":46,"name":"Origin","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"A metadata annotation that describes the origin module of the function to which it's attached."},"children":[{"id":49,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"comment":{"shortText":"Creates an instance of Origin metadata."},"signatures":[{"id":50,"name":"new Origin","kind":16384,"kindString":"Constructor signature","flags":{},"comment":{"shortText":"Creates an instance of Origin metadata."},"parameters":[{"id":51,"name":"moduleId","kind":32768,"kindString":"Parameter","flags":{},"comment":{"shortText":"The id of the module from which the item originated."},"type":{"type":"instrinct","name":"string"}},{"id":52,"name":"moduleMember","kind":32768,"kindString":"Parameter","flags":{},"comment":{"shortText":"The member name of the export on the module object from which the item originated.\n"},"type":{"type":"instrinct","name":"string"}}],"type":{"type":"reference","name":"Origin","id":46}}]},{"id":47,"name":"moduleId","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The id of the module from which the item originated."},"type":{"type":"instrinct","name":"string"}},{"id":48,"name":"moduleMember","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The member name of the export on the module object from which the item originated."},"type":{"type":"instrinct","name":"string"}},{"id":53,"name":"get","kind":2048,"kindString":"Method","flags":{"isStatic":true,"isExported":true},"signatures":[{"id":54,"name":"get","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Get the Origin metadata for the specified function.","returns":"Returns the Origin metadata.\n"},"parameters":[{"id":55,"name":"fn","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The function to inspect for Origin metadata."},"type":{"type":"reference","name":"Function"}}],"type":{"type":"reference","name":"Origin","id":46}}]},{"id":56,"name":"set","kind":2048,"kindString":"Method","flags":{"isStatic":true,"isExported":true},"signatures":[{"id":57,"name":"set","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Set the Origin metadata for the specified function.","returns":"Returns the Origin metadata.\n"},"parameters":[{"id":58,"name":"fn","kind":32768,"kindString":"Parameter","flags":{},"comment":{"shortText":"The Origin metadata to store on the function."},"type":{"type":"reference","name":"Function"}},{"id":59,"name":"origin","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Origin","id":46}}],"type":{"type":"instrinct","name":"void"}}]}],"groups":[{"title":"Constructors","kind":512,"children":[49]},{"title":"Properties","kind":1024,"children":[47,48]},{"title":"Methods","kind":2048,"children":[53,56]}]},{"id":28,"name":"DecoratorApplicator","kind":256,"kindString":"Interface","flags":{"isExported":true},"comment":{"shortText":"An object capable of applying it's captured decorators to a target."},"children":[{"id":29,"name":"on","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":30,"name":"on","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies the decorators to the target."},"parameters":[{"id":31,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The target."},"type":{"type":"instrinct","name":"any"}},{"id":32,"name":"key","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"shortText":"If applying to a method, you may supply an initial descriptor to pass to the decorators.\n"},"type":{"type":"instrinct","name":"string"}},{"id":33,"name":"descriptor","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","name":"Object"}}],"type":{"type":"instrinct","name":"any"}}]}],"groups":[{"title":"Methods","kind":2048,"children":[29]}]},{"id":34,"name":"DeprecatedOptions","kind":256,"kindString":"Interface","flags":{"isExported":true},"comment":{"shortText":"Options that control how the deprected decorator should function at runtime."},"children":[{"id":36,"name":"error","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"Specifies whether or not the deprecation should throw an error."},"type":{"type":"instrinct","name":"boolean"}},{"id":35,"name":"message","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"Specifies a custom deprecation message."},"type":{"type":"instrinct","name":"string"}}],"groups":[{"title":"Properties","kind":1024,"children":[36,35]}]},{"id":2,"name":"MetadataType","kind":256,"kindString":"Interface","flags":{"isExported":true},"comment":{"shortText":"Helpers for working with metadata on functions."},"children":[{"id":4,"name":"paramTypes","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The metadata key representing parameter type information."},"type":{"type":"instrinct","name":"string"}},{"id":5,"name":"properties","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The metadata key representing property information."},"type":{"type":"instrinct","name":"string"}},{"id":3,"name":"resource","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The metadata key representing pluggable resources."},"type":{"type":"instrinct","name":"string"}},{"id":16,"name":"define","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":17,"name":"define","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Defines metadata specified by a key on a target."},"parameters":[{"id":18,"name":"metadataKey","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The key for the metadata to define."},"type":{"type":"instrinct","name":"string"}},{"id":19,"name":"metadataValue","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Object"}},{"id":20,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The target to set the metadata on."},"type":{"type":"reference","name":"Function"}},{"id":21,"name":"targetKey","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"The member on the target to set the metadata on.\n"},"type":{"type":"instrinct","name":"string"}}],"type":{"type":"instrinct","name":"void"}}]},{"id":6,"name":"get","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":7,"name":"get","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Gets metadata specified by a key on a target, searching up the inheritance hierarchy."},"parameters":[{"id":8,"name":"metadataKey","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The key for the metadata to lookup."},"type":{"type":"instrinct","name":"string"}},{"id":9,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The target to lookup the metadata on."},"type":{"type":"reference","name":"Function"}},{"id":10,"name":"targetKey","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"The member on the target to lookup the metadata on.\n"},"type":{"type":"instrinct","name":"string"}}],"type":{"type":"reference","name":"Object"}}]},{"id":22,"name":"getOrCreateOwn","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":23,"name":"getOrCreateOwn","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Gets metadata specified by a key on a target, or creates an instance of the specified metadata if not found."},"parameters":[{"id":24,"name":"metadataKey","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The key for the metadata to lookup or create."},"type":{"type":"instrinct","name":"string"}},{"id":25,"name":"Type","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The type of metadata to create if existing metadata is not found."},"type":{"type":"reference","name":"Function"}},{"id":26,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The target to lookup or create the metadata on."},"type":{"type":"reference","name":"Function"}},{"id":27,"name":"targetKey","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"The member on the target to lookup or create the metadata on.\n"},"type":{"type":"instrinct","name":"string"}}],"type":{"type":"reference","name":"Object"}}]},{"id":11,"name":"getOwn","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":12,"name":"getOwn","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Gets metadata specified by a key on a target, only searching the own instance."},"parameters":[{"id":13,"name":"metadataKey","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The key for the metadata to lookup."},"type":{"type":"instrinct","name":"string"}},{"id":14,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The target to lookup the metadata on."},"type":{"type":"reference","name":"Function"}},{"id":15,"name":"targetKey","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"The member on the target to lookup the metadata on.\n"},"type":{"type":"instrinct","name":"string"}}],"type":{"type":"reference","name":"Object"}}]}],"groups":[{"title":"Properties","kind":1024,"children":[4,5,3]},{"title":"Methods","kind":2048,"children":[16,6,22,11]}]},{"id":37,"name":"ProtocolOptions","kind":256,"kindString":"Interface","flags":{"isExported":true},"comment":{"shortText":"Options used during protocol creation."},"children":[{"id":42,"name":"compose","kind":1024,"kindString":"Property","flags":{"isExported":true,"isOptional":true},"comment":{"shortText":"A function which has the opportunity to compose additional behavior into the decorated class when the protocol is applied."},"type":{"type":"reflection","declaration":{"id":43,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":44,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":45,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"void"}}]}}},{"id":38,"name":"validate","kind":1024,"kindString":"Property","flags":{"isExported":true,"isOptional":true},"comment":{"shortText":"A function that will be run to validate the decorated class when the protocol is applied. It is also used to validate adhoc instances.\nIf the validation fails, a message should be returned which directs the developer in how to address the issue."},"type":{"type":"reflection","declaration":{"id":39,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":40,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":41,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"union","types":[{"type":"instrinct","name":"string"},{"type":"instrinct","name":"boolean"}]}}]}}}],"groups":[{"title":"Properties","kind":1024,"children":[42,38]}]},{"id":60,"name":"metadata","kind":32,"kindString":"Variable","flags":{"isExported":true},"comment":{"shortText":"Provides helpers for working with metadata."},"type":{"type":"reference","name":"MetadataType","id":2}},{"id":61,"name":"decorators","kind":64,"kindString":"Function","flags":{"isExported":true},"signatures":[{"id":62,"name":"decorators","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Enables applying decorators, particularly for use when there is no syntax support in the language, such as with ES5 and ES2016."},"parameters":[{"id":63,"name":"rest","kind":32768,"kindString":"Parameter","flags":{"isRest":true},"comment":{"text":"The decorators to apply.\n"},"type":{"type":"reference","isArray":true,"name":"Function"}}],"type":{"type":"reference","name":"DecoratorApplicator","id":28}}]},{"id":64,"name":"deprecated","kind":64,"kindString":"Function","flags":{"isExported":true},"signatures":[{"id":65,"name":"deprecated","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Decorator: Enables marking methods as deprecated."},"parameters":[{"id":66,"name":"optionsOrTarget","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"Options for how the deprected decorator should function at runtime.\n"},"type":{"type":"reference","name":"DeprecatedOptions","id":34}},{"id":67,"name":"maybeKey","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"string"}},{"id":68,"name":"maybeDescriptor","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","name":"Object"}}],"type":{"type":"instrinct","name":"any"}}]},{"id":69,"name":"mixin","kind":64,"kindString":"Function","flags":{"isExported":true},"signatures":[{"id":70,"name":"mixin","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Decorator: Enables mixing behaior into a class."},"parameters":[{"id":71,"name":"behavior","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"An object with keys for each method to mix into the target class.\n"},"type":{"type":"reference","name":"Object"}}],"type":{"type":"instrinct","name":"any"}}]},{"id":72,"name":"protocol","kind":64,"kindString":"Function","flags":{"isExported":true},"signatures":[{"id":73,"name":"protocol","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Decorator: Creates a protocol."},"parameters":[{"id":74,"name":"name","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The name of the protocol."},"type":{"type":"instrinct","name":"string"}},{"id":75,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"The validation function or options object used in configuring the protocol.\n"},"type":{"type":"union","types":[{"type":"reflection","declaration":{"id":76,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":77,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":78,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"union","types":[{"type":"instrinct","name":"string"},{"type":"instrinct","name":"boolean"}]}}]}},{"type":"reference","name":"ProtocolOptions","id":37}]}}],"type":{"type":"instrinct","name":"any"}}]}],"groups":[{"title":"Classes","kind":128,"children":[46]},{"title":"Interfaces","kind":256,"children":[28,34,2,37]},{"title":"Variables","kind":32,"children":[60]},{"title":"Functions","kind":64,"children":[61,64,69,72]}]}
{
"name": "aurelia-metadata",
"version": "1.0.0-beta.1.2.1",
"version": "1.0.0-beta.2.0.0",
"description": "Utilities for reading and writing the metadata of JavaScript functions.",

@@ -17,2 +17,3 @@ "keywords": [

"main": "dist/commonjs/aurelia-metadata.js",
"typings": "dist/aurelia-metadata.d.ts",
"repository": {

@@ -31,6 +32,6 @@ "type": "git",

"dependencies": {
"aurelia-pal": "^1.0.0-beta.1.1.1"
"aurelia-pal": "^1.0.0-beta.1.3.0"
},
"peerDependencies": {
"aurelia-pal": "^1.0.0-beta.1.1.1"
"aurelia-pal": "^1.0.0-beta.1.3.0"
},

@@ -45,42 +46,48 @@ "devDependencies": {

"dependencies": {
"aurelia-pal": "^1.0.0-beta.1.1.1"
"aurelia-pal": "^1.0.0-beta.1.3.0"
},
"devDependencies": {
"aurelia-tools": "^0.1.12",
"babel-dts-generator": "^0.4.7",
"babel-eslint": "^4.1.1",
"babel-plugin-syntax-flow": "^6.5.0",
"aurelia-tools": "^0.2.1",
"babel-dts-generator": "^0.5.1",
"babel-eslint": "^6.0.4",
"babel-plugin-syntax-flow": "^6.8.0",
"babel-plugin-transform-decorators-legacy": "^1.3.4",
"babel-plugin-transform-es2015-modules-amd": "^6.6.5",
"babel-plugin-transform-es2015-modules-commonjs": "^6.7.0",
"babel-plugin-transform-es2015-modules-systemjs": "^6.6.5",
"babel-plugin-transform-flow-strip-types": "^6.7.0",
"babel-preset-es2015": "^6.6.0",
"babel-plugin-transform-es2015-modules-amd": "^6.8.0",
"babel-plugin-transform-es2015-modules-commonjs": "^6.8.0",
"babel-plugin-transform-es2015-modules-systemjs": "^6.9.0",
"babel-plugin-transform-flow-strip-types": "^6.8.0",
"babel-preset-es2015": "^6.9.0",
"babel-preset-es2015-loose": "^7.0.0",
"babel-preset-es2015-loose-native-modules": "^1.0.0",
"babel-preset-stage-1": "^6.5.0",
"conventional-changelog": "0.0.11",
"del": "^1.1.0",
"gulp": "^3.8.10",
"conventional-changelog": "1.1.0",
"del": "^2.2.0",
"gulp": "^3.9.1",
"gulp-babel": "^6.1.2",
"gulp-bump": "^0.3.1",
"gulp-bump": "^2.1.0",
"gulp-concat": "^2.6.0",
"gulp-eslint": "^1.0.0",
"gulp-insert": "^0.4.0",
"gulp-eslint": "^2.0.0",
"gulp-ignore": "^2.0.1",
"gulp-insert": "^0.5.0",
"gulp-rename": "^1.2.2",
"gulp-typedoc": "^1.2.1",
"gulp-typedoc": "^2.0.0",
"gulp-typedoc-extractor": "0.0.8",
"jasmine-core": "^2.1.3",
"karma": "^0.13.15",
"gulp-typescript": "^2.13.6",
"jasmine-core": "^2.4.1",
"karma": "^0.13.22",
"karma-babel-preprocessor": "^6.0.1",
"karma-chrome-launcher": "^0.1.7",
"karma-coverage": "^0.3.1",
"karma-jasmine": "^0.3.2",
"karma-jspm": "^2.0.1",
"object.assign": "^1.0.3",
"require-dir": "^0.1.0",
"run-sequence": "^1.0.2",
"through2": "^2.0.0",
"vinyl": "^0.5.1",
"vinyl-paths": "^1.0.0",
"yargs": "^2.1.1"
"karma-chrome-launcher": "^1.0.1",
"karma-coverage": "^1.0.0",
"karma-jasmine": "^1.0.2",
"karma-jspm": "^2.1.1",
"merge2": "^1.0.2",
"object.assign": "^4.0.3",
"require-dir": "^0.3.0",
"run-sequence": "^1.2.1",
"through2": "^2.0.1",
"typedoc": "^0.4.2",
"typescript": "^1.9.0-dev.20160610-1.0",
"vinyl": "^1.1.1",
"vinyl-paths": "^2.1.0",
"yargs": "^4.7.1"
},

@@ -87,0 +94,0 @@ "aurelia": {

@@ -51,2 +51,4 @@ import {PLATFORM} from 'aurelia-pal';

}
return false;
});

@@ -53,0 +55,0 @@ }

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