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

@glimmer/manager

Package Overview
Dependencies
Maintainers
12
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@glimmer/manager - npm Package Compare versions

Comparing version 0.83.1 to 0.84.0

dist/commonjs/es2017/lib/internal/defaults.d.ts.map

29

dist/commonjs/es2017/lib/internal/index.js

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

var _helper = require("../public/helper");
var _defaults = require("./defaults");
const COMPONENT_MANAGERS = new WeakMap();

@@ -83,2 +87,4 @@ const MODIFIER_MANAGERS = new WeakMap();

const DEFAULT_MANAGER = new _helper.CustomHelperManager(() => new _defaults.FunctionHelperManager());
function getInternalHelperManager(definition, isOptional) {

@@ -89,13 +95,18 @@ if (_env.DEBUG && typeof definition !== 'function' && (typeof definition !== 'object' || definition === null)) {

const manager = getManager(HELPER_MANAGERS, definition);
let manager = getManager(HELPER_MANAGERS, definition); // Functions are special-cased because functions are defined
// as the "default" helper, per: https://github.com/emberjs/rfcs/pull/756
if (manager === undefined) {
if (isOptional === true) {
return null;
} else if (_env.DEBUG) {
throw new Error(`Attempted to load a helper, but there wasn't a helper manager associated with the definition. The definition was: ${(0, _util.debugToString)(definition)}`);
}
if (manager === undefined && typeof definition === 'function') {
manager = DEFAULT_MANAGER;
}
return manager;
if (manager) {
return manager;
} else if (isOptional === true) {
return null;
} else if (_env.DEBUG) {
throw new Error(`Attempted to load a helper, but there wasn't a helper manager associated with the definition. The definition was: ${(0, _util.debugToString)(definition)}`);
}
return null;
}

@@ -137,2 +148,2 @@

}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL0BnbGltbWVyL21hbmFnZXIvbGliL2ludGVybmFsL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7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TdHJpbmchKFxuICAgICAgICAgIGRlZmluaXRpb25cbiAgICAgICAgKX1gXG4gICAgICApO1xuICAgIH1cbiAgfVxuXG4gIHJldHVybiBtYW5hZ2VyO1xufVxuXG4vLy8vLy8vLy8vL1xuXG5leHBvcnQgZnVuY3Rpb24gaGFzSW50ZXJuYWxDb21wb25lbnRNYW5hZ2VyKGRlZmluaXRpb246IG9iamVjdCk6IGJvb2xlYW4ge1xuICByZXR1cm4gZ2V0TWFuYWdlcihDT01QT05FTlRfTUFOQUdFUlMsIGRlZmluaXRpb24pICE9PSB1bmRlZmluZWQ7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBoYXNJbnRlcm5hbEhlbHBlck1hbmFnZXIoZGVmaW5pdGlvbjogb2JqZWN0KTogYm9vbGVhbiB7XG4gIHJldHVybiBnZXRNYW5hZ2VyKEhFTFBFUl9NQU5BR0VSUywgZGVmaW5pdGlvbikgIT09IHVuZGVmaW5lZDtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIGhhc0ludGVybmFsTW9kaWZpZXJNYW5hZ2VyKGRlZmluaXRpb246IG9iamVjdCk6IGJvb2xlYW4ge1xuICByZXR1cm4gZ2V0TWFuYWdlcihNT0RJRklFUl9NQU5BR0VSUywgZGVmaW5pdGlvbikgIT09IHVuZGVmaW5lZDtcbn1cbiJdLCJzb3VyY2VSb290IjoiIn0=

@@ -152,3 +152,3 @@ "use strict";

const setHandler = function (_target, prop) {
throw new Error(`You attempted to set ${String(prop)} on the arguments of a component, helper, or modifier. Arguments are immutable and cannot be updated directly, they always represent the values that is passed down. If you want to set default values, you should use a getter and local tracked state instead.`);
throw new Error(`You attempted to set ${String(prop)} on the arguments of a component, helper, or modifier. Arguments are immutable and cannot be updated directly; they always represent the values that are passed down. If you want to set default values, you should use a getter and local tracked state instead.`);
};

@@ -226,2 +226,2 @@

}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4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KCkge1xuICAgICAgICAgIHJldHVybiB2YWx1ZUZvclJlZihyZWYpO1xuICAgICAgICB9LFxuICAgICAgfSk7XG4gICAgfSk7XG5cbiAgICBpZiAoREVCVUcpIHtcbiAgICAgIC8vIFByZXZlbnQgbXV0YXRpb25zIGluIGRldmVsb3BtZW50IG1vZGUuIFRoaXMgd2lsbCBub3QgcHJldmVudCB0aGVcbiAgICAgIC8vIHByb3h5IGZyb20gdXBkYXRpbmcsIGJ1dCB3aWxsIHByZXZlbnQgYXNzaWduaW5nIG5ldyB2YWx1ZXMgb3IgcHVzaGluZ1xuICAgICAgLy8gZm9yIGluc3RhbmNlLlxuICAgICAgT2JqZWN0LmZyZWV6ZShuYW1lZFByb3h5KTtcbiAgICAgIE9iamVjdC5mcmVlemUocG9zaXRpb25hbFByb3h5KTtcbiAgICB9XG5cbiAgICByZXR1cm4ge1xuICAgICAgbmFtZWQ6IG5hbWVkUHJveHksXG4gICAgICBwb3NpdGlvbmFsOiBwb3NpdGlvbmFsUHJveHksXG4gICAgfTtcbiAgfTtcbn1cbiJdLCJzb3VyY2VSb290IjoiIn0=

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

var _helper = require("../public/helper");
var _defaults = require("./defaults");
var COMPONENT_MANAGERS = new WeakMap();

@@ -83,2 +87,6 @@ var MODIFIER_MANAGERS = new WeakMap();

var DEFAULT_MANAGER = new _helper.CustomHelperManager(function () {
return new _defaults.FunctionHelperManager();
});
function getInternalHelperManager(definition, isOptional) {

@@ -89,13 +97,18 @@ if (_env.DEBUG && typeof definition !== 'function' && (typeof definition !== 'object' || definition === null)) {

var manager = getManager(HELPER_MANAGERS, definition);
var manager = getManager(HELPER_MANAGERS, definition); // Functions are special-cased because functions are defined
// as the "default" helper, per: https://github.com/emberjs/rfcs/pull/756
if (manager === undefined) {
if (isOptional === true) {
return null;
} else if (_env.DEBUG) {
throw new Error("Attempted to load a helper, but there wasn't a helper manager associated with the definition. The definition was: " + (0, _util.debugToString)(definition));
}
if (manager === undefined && typeof definition === 'function') {
manager = DEFAULT_MANAGER;
}
return manager;
if (manager) {
return manager;
} else if (isOptional === true) {
return null;
} else if (_env.DEBUG) {
throw new Error("Attempted to load a helper, but there wasn't a helper manager associated with the definition. The definition was: " + (0, _util.debugToString)(definition));
}
return null;
}

@@ -137,2 +150,2 @@

}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL0BnbGltbWVyL21hbmFnZXIvbGliL2ludGVybmFsL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7OztBQUFBOztBQUNBOztBQWVBLElBQU0sa0JBQWtCLEdBQUcsSUFBM0IsT0FBMkIsRUFBM0I7QUFFQSxJQUFNLGlCQUFpQixHQUFHLElBQTFCLE9BQTBCLEVBQTFCO0FBRUEsSUFBTSxlQUFlLEdBQUcsSUFBeEIsT0FBd0IsRUFBeEIsQyxDQUVBOztBQUVBLElBQU0sY0FBYyxHQUFHLE1BQU0sQ0FBN0IsY0FBQTs7QUFFQSxTQUFBLFVBQUEsQ0FBQSxHQUFBLEVBQUEsT0FBQSxFQUFBLEdBQUEsRUFHVTtBQUVSLE1BQUksZUFBVSxPQUFBLEdBQUEsS0FBQSxRQUFBLElBQTJCLEdBQUcsS0FBeEMsSUFBQSxLQUFzRCxPQUFBLEdBQUEsS0FBMUQsVUFBQSxFQUFxRjtBQUNuRixVQUFNLElBQUEsS0FBQSxDQUFBLDRIQUNzSCx5QkFENUgsR0FDNEgsQ0FEdEgsQ0FBTjtBQUtEOztBQUVELE1BQUksY0FBUyxHQUFHLENBQUgsR0FBQSxDQUFiLEdBQWEsQ0FBYixFQUEyQjtBQUN6QixVQUFNLElBQUEsS0FBQSxDQUFBLHdKQUNrSix5QkFEeEosR0FDd0osQ0FEbEosQ0FBTjtBQUtEOztBQUVELEVBQUEsR0FBRyxDQUFILEdBQ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WYgKERFQlVHKSB7XG4gICAgICB0aHJvdyBuZXcgRXJyb3IoXG4gICAgICAgIGBBdHRlbXB0ZWQgdG8gbG9hZCBhIGNvbXBvbmVudCwgYnV0IHRoZXJlIHdhc24ndCBhIGNvbXBvbmVudCBtYW5hZ2VyIGFzc29jaWF0ZWQgd2l0aCB0aGUgZGVmaW5pdGlvbi4gVGhlIGRlZmluaXRpb24gd2FzOiAke2RlYnVnVG9TdHJpbmchKFxuICAgICAgICAgIGRlZmluaXRpb25cbiAgICAgICAgKX1gXG4gICAgICApO1xuICAgIH1cbiAgfVxuXG4gIHJldHVybiBtYW5hZ2VyO1xufVxuXG4vLy8vLy8vLy8vL1xuXG5leHBvcnQgZnVuY3Rpb24gaGFzSW50ZXJuYWxDb21wb25lbnRNYW5hZ2VyKGRlZmluaXRpb246IG9iamVjdCk6IGJvb2xlYW4ge1xuICByZXR1cm4gZ2V0TWFuYWdlcihDT01QT05FTlRfTUFOQUdFUlMsIGRlZmluaXRpb24pICE9PSB1bmRlZmluZWQ7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBoYXNJbnRlcm5hbEhlbHBlck1hbmFnZXIoZGVmaW5pdGlvbjogb2JqZWN0KTogYm9vbGVhbiB7XG4gIHJldHVybiBnZXRNYW5hZ2VyKEhFTFBFUl9NQU5BR0VSUywgZGVmaW5pdGlvbikgIT09IHVuZGVmaW5lZDtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIGhhc0ludGVybmFsTW9kaWZpZXJNYW5hZ2VyKGRlZmluaXRpb246IG9iamVjdCk6IGJvb2xlYW4ge1xuICByZXR1cm4gZ2V0TWFuYWdlcihNT0RJRklFUl9NQU5BR0VSUywgZGVmaW5pdGlvbikgIT09IHVuZGVmaW5lZDtcbn1cbiJdLCJzb3VyY2VSb290IjoiIn0=

@@ -158,3 +158,3 @@ "use strict";

var setHandler = function setHandler(_target, prop) {
throw new Error("You attempted to set " + String(prop) + " on the arguments of a component, helper, or modifier. Arguments are immutable and cannot be updated directly, they always represent the values that is passed down. If you want to set default values, you should use a getter and local tracked state instead.");
throw new Error("You attempted to set " + String(prop) + " on the arguments of a component, helper, or modifier. Arguments are immutable and cannot be updated directly; they always represent the values that are passed down. If you want to set default values, you should use a getter and local tracked state instead.");
};

@@ -230,2 +230,2 @@

}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL0BnbGltbWVyL21hbmFnZXIvbGliL3V0aWwvYXJncy1wcm94eS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7QUFBQTs7QUFPQTs7QUFDQTs7QUFDQTs7QUFFQSxJQUFNLGNBQWMsR0FBRyxJQUF2QixPQUF1QixFQUF2Qjs7QUFFTSxTQUFBLGVBQUEsQ0FBQSxHQUFBLEVBQXFDO0FBQ3pDLFNBQU8sY0FBYyxDQUFkLEdBQUEsQ0FBUCxHQUFPLENBQVA7QUFDRDs7QUFFSyxTQUFBLGVBQUEsQ0FBQSxHQUFBLEVBQUEsV0FBQSxFQUFxRjtBQUN6RixFQUFBLGNBQWMsQ0FBZCxHQUFBLENBQUEsR0FBQSxFQUFBLFdBQUE7QUFDRDs7QUFFRCxTQUFBLFlBQUEsQ0FBQSxJQUFBLEVBQW9EO0FBQ2xELE1BQUksT0FBQSxJQUFBLEtBQUosUUFBQSxFQUE4QixPQUFBLElBQUE7QUFFOUIsTUFBTSxHQUFHLEdBQUcsTUFBTSxDQUFsQixJQUFrQixDQUFsQjtBQUVBLE1BQUksS0FBSyxDQUFULEdBQVMsQ0FBVCxFQUFnQixPQUFBLElBQUE7QUFFaEIsU0FBTyxHQUFHLEdBQUgsQ0FBQSxLQUFBLENBQUEsR0FBQSxHQUFBLEdBQVAsSUFBQTtBQUNEOztBQUVELFNBQUEsY0FBQSxDQUFBLFNBQUEsRUFBQSxHQUFBLEVBQXNFO0FBQ3BFLFNBQU8sc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RbbmFtZV0pO1xuICAgICAgICB9LFxuICAgICAgfSk7XG4gICAgfSk7XG5cbiAgICBwb3NpdGlvbmFsLmZvckVhY2goKHJlZjogUmVmZXJlbmNlLCBpbmRleDogbnVtYmVyKSA9PiB7XG4gICAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkocG9zaXRpb25hbFByb3h5LCBpbmRleCwge1xuICAgICAgICBlbnVtZXJhYmxlOiB0cnVlLFxuICAgICAgICBjb25maWd1cmFibGU6IHRydWUsXG4gICAgICAgIGdldCgpIHtcbiAgICAgICAgICByZXR1cm4gdmFsdWVGb3JSZWYocmVmKTtcbiAgICAgICAgfSxcbiAgICAgIH0pO1xuICAgIH0pO1xuXG4gICAgaWYgKERFQlVHKSB7XG4gICAgICAvLyBQcmV2ZW50IG11dGF0aW9ucyBpbiBkZXZlbG9wbWVudCBtb2RlLiBUaGlzIHdpbGwgbm90IHByZXZlbnQgdGhlXG4gICAgICAvLyBwcm94eSBmcm9tIHVwZGF0aW5nLCBidXQgd2lsbCBwcmV2ZW50IGFzc2lnbmluZyBuZXcgdmFsdWVzIG9yIHB1c2hpbmdcbiAgICAgIC8vIGZvciBpbnN0YW5jZS5cbiAgICAgIE9iamVjdC5mcmVlemUobmFtZWRQcm94eSk7XG4gICAgICBPYmplY3QuZnJlZXplKHBvc2l0aW9uYWxQcm94eSk7XG4gICAgfVxuXG4gICAgcmV0dXJuIHtcbiAgICAgIG5hbWVkOiBuYW1lZFByb3h5LFxuICAgICAgcG9zaXRpb25hbDogcG9zaXRpb25hbFByb3h5LFxuICAgIH07XG4gIH07XG59XG4iXSwic291cmNlUm9vdCI6IiJ9
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL0BnbGltbWVyL21hbmFnZXIvbGliL3V0aWwvYXJncy1wcm94eS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Oz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gICAgICAgIH0sXG4gICAgICB9KTtcbiAgICB9KTtcblxuICAgIGlmIChERUJVRykge1xuICAgICAgLy8gUHJldmVudCBtdXRhdGlvbnMgaW4gZGV2ZWxvcG1lbnQgbW9kZS4gVGhpcyB3aWxsIG5vdCBwcmV2ZW50IHRoZVxuICAgICAgLy8gcHJveHkgZnJvbSB1cGRhdGluZywgYnV0IHdpbGwgcHJldmVudCBhc3NpZ25pbmcgbmV3IHZhbHVlcyBvciBwdXNoaW5nXG4gICAgICAvLyBmb3IgaW5zdGFuY2UuXG4gICAgICBPYmplY3QuZnJlZXplKG5hbWVkUHJveHkpO1xuICAgICAgT2JqZWN0LmZyZWV6ZShwb3NpdGlvbmFsUHJveHkpO1xuICAgIH1cblxuICAgIHJldHVybiB7XG4gICAgICBuYW1lZDogbmFtZWRQcm94eSxcbiAgICAgIHBvc2l0aW9uYWw6IHBvc2l0aW9uYWxQcm94eSxcbiAgICB9O1xuICB9O1xufVxuIl0sInNvdXJjZVJvb3QiOiIifQ==
import { DEBUG } from '@glimmer/env';
import { debugToString } from '@glimmer/util';
import { CustomHelperManager } from '../public/helper';
import { FunctionHelperManager } from './defaults';
const COMPONENT_MANAGERS = new WeakMap();

@@ -62,2 +64,3 @@ const MODIFIER_MANAGERS = new WeakMap();

}
const DEFAULT_MANAGER = new CustomHelperManager(() => new FunctionHelperManager());
export function getInternalHelperManager(definition, isOptional) {

@@ -68,13 +71,18 @@ if (DEBUG && typeof definition !== 'function' && (typeof definition !== 'object' || definition === null)) {

const manager = getManager(HELPER_MANAGERS, definition);
let manager = getManager(HELPER_MANAGERS, definition); // Functions are special-cased because functions are defined
// as the "default" helper, per: https://github.com/emberjs/rfcs/pull/756
if (manager === undefined) {
if (isOptional === true) {
return null;
} else if (DEBUG) {
throw new Error(`Attempted to load a helper, but there wasn't a helper manager associated with the definition. The definition was: ${debugToString(definition)}`);
}
if (manager === undefined && typeof definition === 'function') {
manager = DEFAULT_MANAGER;
}
return manager;
if (manager) {
return manager;
} else if (isOptional === true) {
return null;
} else if (DEBUG) {
throw new Error(`Attempted to load a helper, but there wasn't a helper manager associated with the definition. The definition was: ${debugToString(definition)}`);
}
return null;
}

@@ -111,2 +119,2 @@ export function setInternalComponentManager(factory, obj) {

}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL0BnbGltbWVyL21hbmFnZXIvbGliL2ludGVybmFsL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLFNBQVMsS0FBVCxRQUFzQixjQUF0QjtBQUNBLFNBQVMsYUFBVCxRQUF3QyxlQUF4QztBQWVBLE1BQU0sa0JBQWtCLEdBQUcsSUFBSSxPQUFKLEVBQTNCO0FBRUEsTUFBTSxpQkFBaUIsR0FBRyxJQUFJLE9BQUosRUFBMUI7QUFFQSxNQUFNLGVBQWUsR0FBRyxJQUFJLE9BQUosRUFBeEIsQyxDQUVBOztBQUVBLE1BQU0sY0FBYyxHQUFHLE1BQU0sQ0FBQyxjQUE5Qjs7QUFFQSxTQUFTLFVBQVQsQ0FDRSxHQURGLEVBRUUsT0FGRixFQUdFLEdBSEYsRUFHVTtBQUVSLE1BQUksS0FBSyxLQUFLLE9BQU8sR0FBUCxLQUFlLFFBQWYsSUFBMkIsR0FBRyxLQUFLLElBQXhDLENBQUwsSUFBc0QsT0FBTyxHQUFQLEtBQWUsVUFBekUsRUFBcUY7QUFDbkYsVUFBTSxJQUFJLEtBQUosQ0FDSiwwSEFBMEgsYUFBYyxDQUN0SSxHQURzSSxDQUV2SSxFQUhHLENBQU47QUFLRDs7QUFFRCxNQUFJLEtBQUssSUFBSSxHQUFHLENBQUMsR0FBSixDQUFRLEdBQVIsQ0FBYixFQUEyQjtBQUN6QixVQUFNLElBQUksS0FBSixDQUNKLHNKQUFzSixhQUFjLENBQ2xLLEdBRGtLLENBRW5LLEVBSEcsQ0FBTjt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9uIGhhc0ludGVybmFsSGVscGVyTWFuYWdlcihkZWZpbml0aW9uOiBvYmplY3QpOiBib29sZWFuIHtcbiAgcmV0dXJuIGdldE1hbmFnZXIoSEVMUEVSX01BTkFHRVJTLCBkZWZpbml0aW9uKSAhPT0gdW5kZWZpbmVkO1xufVxuXG5leHBvcnQgZnVuY3Rpb24gaGFzSW50ZXJuYWxNb2RpZmllck1hbmFnZXIoZGVmaW5pdGlvbjogb2JqZWN0KTogYm9vbGVhbiB7XG4gIHJldHVybiBnZXRNYW5hZ2VyKE1PRElGSUVSX01BTkFHRVJTLCBkZWZpbml0aW9uKSAhPT0gdW5kZWZpbmVkO1xufVxuIl0sInNvdXJjZVJvb3QiOiIifQ==

@@ -136,3 +136,3 @@ import { DEBUG } from '@glimmer/env';

const setHandler = function (_target, prop) {
throw new Error(`You attempted to set ${String(prop)} on the arguments of a component, helper, or modifier. Arguments are immutable and cannot be updated directly, they always represent the values that is passed down. If you want to set default values, you should use a getter and local tracked state instead.`);
throw new Error(`You attempted to set ${String(prop)} on the arguments of a component, helper, or modifier. Arguments are immutable and cannot be updated directly; they always represent the values that are passed down. If you want to set default values, you should use a getter and local tracked state instead.`);
};

@@ -210,2 +210,2 @@

}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL0BnbGltbWVyL21hbmFnZXIvbGliL3V0aWwvYXJncy1wcm94eS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxTQUFTLEtBQVQsUUFBc0IsY0FBdEI7QUFPQSxTQUFvQixXQUFwQixRQUF1QyxvQkFBdkM7QUFDQSxTQUFTLGdCQUFULFFBQWlDLGVBQWpDO0FBQ0EsU0FBYyxLQUFkLFFBQTJCLG9CQUEzQjtBQUVBLE1BQU0sY0FBYyxHQUFHLElBQUksT0FBSixFQUF2QjtBQUVBLE9BQU0sU0FBVSxlQUFWL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q3VzdG9tVGFnRm9yKG5hbWVkUHJveHksIGdldE5hbWVkVGFnKTtcbiAgICBzZXRDdXN0b21UYWdGb3IocG9zaXRpb25hbFByb3h5LCBnZXRQb3NpdGlvbmFsVGFnKTtcblxuICAgIE9iamVjdC5rZXlzKG5hbWVkKS5mb3JFYWNoKChuYW1lKSA9PiB7XG4gICAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkobmFtZWRQcm94eSwgbmFtZSwge1xuICAgICAgICBlbnVtZXJhYmxlOiB0cnVlLFxuICAgICAgICBjb25maWd1cmFibGU6IHRydWUsXG4gICAgICAgIGdldCgpIHtcbiAgICAgICAgICByZXR1cm4gdmFsdWVGb3JSZWYobmFtZWRbbmFtZV0pO1xuICAgICAgICB9LFxuICAgICAgfSk7XG4gICAgfSk7XG5cbiAgICBwb3NpdGlvbmFsLmZvckVhY2goKHJlZjogUmVmZXJlbmNlLCBpbmRleDogbnVtYmVyKSA9PiB7XG4gICAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkocG9zaXRpb25hbFByb3h5LCBpbmRleCwge1xuICAgICAgICBlbnVtZXJhYmxlOiB0cnVlLFxuICAgICAgICBjb25maWd1cmFibGU6IHRydWUsXG4gICAgICAgIGdldCgpIHtcbiAgICAgICAgICByZXR1cm4gdmFsdWVGb3JSZWYocmVmKTtcbiAgICAgICAgfSxcbiAgICAgIH0pO1xuICAgIH0pO1xuXG4gICAgaWYgKERFQlVHKSB7XG4gICAgICAvLyBQcmV2ZW50IG11dGF0aW9ucyBpbiBkZXZlbG9wbWVudCBtb2RlLiBUaGlzIHdpbGwgbm90IHByZXZlbnQgdGhlXG4gICAgICAvLyBwcm94eSBmcm9tIHVwZGF0aW5nLCBidXQgd2lsbCBwcmV2ZW50IGFzc2lnbmluZyBuZXcgdmFsdWVzIG9yIHB1c2hpbmdcbiAgICAgIC8vIGZvciBpbnN0YW5jZS5cbiAgICAgIE9iamVjdC5mcmVlemUobmFtZWRQcm94eSk7XG4gICAgICBPYmplY3Q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ZWY6IFJlZmVyZW5jZSwgaW5kZXg6IG51bWJlcikgPT4ge1xuICAgICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KHBvc2l0aW9uYWxQcm94eSwgaW5kZXgsIHtcbiAgICAgICAgZW51bWVyYWJsZTogdHJ1ZSxcbiAgICAgICAgY29uZmlndXJhYmxlOiB0cnVlLFxuICAgICAgICBnZXQoKSB7XG4gICAgICAgICAgcmV0dXJuIHZhbHVlRm9yUmVmKHJlZik7XG4gICAgICAgIH0sXG4gICAgICB9KTtcbiAgICB9KTtcblxuICAgIGlmIChERUJVRykge1xuICAgICAgLy8gUHJldmVudCBtdXRhdGlvbnMgaW4gZGV2ZWxvcG1lbnQgbW9kZS4gVGhpcyB3aWxsIG5vdCBwcmV2ZW50IHRoZVxuICAgICAgLy8gcHJveHkgZnJvbSB1cGRhdGluZywgYnV0IHdpbGwgcHJldmVudCBhc3NpZ25pbmcgbmV3IHZhbHVlcyBvciBwdXNoaW5nXG4gICAgICAvLyBmb3IgaW5zdGFuY2UuXG4gICAgICBPYmplY3QuZnJlZXplKG5hbWVkUHJveHkpO1xuICAgICAgT2JqZWN0LmZyZWV6ZShwb3NpdGlvbmFsUHJveHkpO1xuICAgIH1cblxuICAgIHJldHVybiB7XG4gICAgICBuYW1lZDogbmFtZWRQcm94eSxcbiAgICAgIHBvc2l0aW9uYWw6IHBvc2l0aW9uYWxQcm94eSxcbiAgICB9O1xuICB9O1xufVxuIl0sInNvdXJjZVJvb3QiOiIifQ==
import { DEBUG } from '@glimmer/env';
import { debugToString } from '@glimmer/util';
import { CustomHelperManager } from '../public/helper';
import { FunctionHelperManager } from './defaults';
var COMPONENT_MANAGERS = new WeakMap();

@@ -62,2 +64,5 @@ var MODIFIER_MANAGERS = new WeakMap();

}
var DEFAULT_MANAGER = new CustomHelperManager(function () {
return new FunctionHelperManager();
});
export function getInternalHelperManager(definition, isOptional) {

@@ -68,13 +73,18 @@ if (DEBUG && typeof definition !== 'function' && (typeof definition !== 'object' || definition === null)) {

var manager = getManager(HELPER_MANAGERS, definition);
var manager = getManager(HELPER_MANAGERS, definition); // Functions are special-cased because functions are defined
// as the "default" helper, per: https://github.com/emberjs/rfcs/pull/756
if (manager === undefined) {
if (isOptional === true) {
return null;
} else if (DEBUG) {
throw new Error("Attempted to load a helper, but there wasn't a helper manager associated with the definition. The definition was: " + debugToString(definition));
}
if (manager === undefined && typeof definition === 'function') {
manager = DEFAULT_MANAGER;
}
return manager;
if (manager) {
return manager;
} else if (isOptional === true) {
return null;
} else if (DEBUG) {
throw new Error("Attempted to load a helper, but there wasn't a helper manager associated with the definition. The definition was: " + debugToString(definition));
}
return null;
}

@@ -111,2 +121,2 @@ export function setInternalComponentManager(factory, obj) {

}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL0BnbGltbWVyL21hbmFnZXIvbGliL2ludGVybmFsL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLFNBQUEsS0FBQSxRQUFBLGNBQUE7QUFDQSxTQUFBLGFBQUEsUUFBQSxlQUFBO0FBZUEsSUFBTSxrQkFBa0IsR0FBRyxJQUEzQixPQUEyQixFQUEzQjtBQUVBLElBQU0saUJBQWlCLEdBQUcsSUFBMUIsT0FBMEIsRUFBMUI7QUFFQSxJQUFNLGVBQWUsR0FBRyxJQUF4QixPQUF3QixFQUF4QixDLENBRUE7O0FBRUEsSUFBTSxjQUFjLEdBQUcsTUFBTSxDQUE3QixjQUFBOztBQUVBLFNBQUEsVUFBQSxDQUFBLEdBQUEsRUFBQSxPQUFBLEVBQUEsR0FBQSxFQUdVO0FBRVIsTUFBSSxLQUFLLEtBQUssT0FBQSxHQUFBLEtBQUEsUUFBQSxJQUEyQixHQUFHLEtBQXhDLElBQUssQ0FBTCxJQUFzRCxPQUFBLEdBQUEsS0FBMUQsVUFBQSxFQUFxRjtBQUNuR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IGZ1bmN0aW9uIGhhc0ludGVybmFsSGVscGVyTWFuYWdlcihkZWZpbml0aW9uOiBvYmplY3QpOiBib29sZWFuIHtcbiAgcmV0dXJuIGdldE1hbmFnZXIoSEVMUEVSX01BTkFHRVJTLCBkZWZpbml0aW9uKSAhPT0gdW5kZWZpbmVkO1xufVxuXG5leHBvcnQgZnVuY3Rpb24gaGFzSW50ZXJuYWxNb2RpZmllck1hbmFnZXIoZGVmaW5pdGlvbjogb2JqZWN0KTogYm9vbGVhbiB7XG4gIHJldHVybiBnZXRNYW5hZ2VyKE1PRElGSUVSX01BTkFHRVJTLCBkZWZpbml0aW9uKSAhPT0gdW5kZWZpbmVkO1xufVxuIl0sInNvdXJjZVJvb3QiOiIifQ==

@@ -142,3 +142,3 @@ import { DEBUG } from '@glimmer/env';

var setHandler = function setHandler(_target, prop) {
throw new Error("You attempted to set " + String(prop) + " on the arguments of a component, helper, or modifier. Arguments are immutable and cannot be updated directly, they always represent the values that is passed down. If you want to set default values, you should use a getter and local tracked state instead.");
throw new Error("You attempted to set " + String(prop) + " on the arguments of a component, helper, or modifier. Arguments are immutable and cannot be updated directly; they always represent the values that are passed down. If you want to set default values, you should use a getter and local tracked state instead.");
};

@@ -214,2 +214,2 @@

}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL0BnbGltbWVyL21hbmFnZXIvbGliL3V0aWwvYXJncy1wcm94eS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxTQUFBLEtBQUEsUUFBQSxjQUFBO0FBT0EsU0FBQSxXQUFBLFFBQUEsb0JBQUE7QUFDQSxTQUFBLGdCQUFBLFFBQUEsZUFBQTtBQUNBLFNBQUEsS0FBQSxRQUFBLG9CQUFBO0FBRUEsSUFBTSxjQUFjLEdBQUcsSUFBdkIsT0FBdUIsRUFBdkI7QUFFQSxPQUFNLFNBQUE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m94eSwgbmFtZSwge1xuICAgICAgICBlbnVtZXJhYmxlOiB0cnVlLFxuICAgICAgICBjb25maWd1cmFibGU6IHRydWUsXG4gICAgICAgIGdldCgpIHtcbiAgICAgICAgICByZXR1cm4gdmFsdWVGb3JSZWYobmFtZWRbbmFtZV0pO1xuICAgICAgICB9LFxuICAgICAgfSk7XG4gICAgfSk7XG5cbiAgICBwb3NpdGlvbmFsLmZvckVhY2goKHJlZjogUmVmZXJlbmNlLCBpbmRleDogbnVtYmVyKSA9PiB7XG4gICAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkocG9zaXRpb25hbFByb3h5LCBpbmRleCwge1xuICAgICAgICBlbnVtZXJhYmxlOiB0cnVlLFxuICAgICAgICBjb25maWd1cmFibGU6IHRydWUsXG4gICAgICAgIGdldCgpIHtcbiAgICAgICAgICByZXR1cm4gdmFsdWVGb3JSZWYocmVmKTtcbiAgICAgICAgfSxcbiAgICAgIH0pO1xuICAgIH0pO1xuXG4gICAgaWYgKERFQlVHKSB7XG4gICAgICAvLyBQcmV2ZW50IG11dGF0aW9ucyBpbiBkZXZlbG9wbWVudCBtb2RlLiBUaGlzIHdpbGwgbm90IHByZXZlbnQgdGhlXG4gICAgICAvLyBwcm94eSBmcm9tIHVwZGF0aW5nLCBidXQgd2lsbCBwcmV2ZW50IGFzc2lnbmluZyBuZXcgdmFsdWVzIG9yIHB1c2hpbmdcbiAgICAgIC8vIGZvciBpbnN0YW5jZS5cbiAgICAgIE9iamVjdC5mcmVlemUobmFtZWRQcm94eSk7XG4gICAgICBPYmplY3QuZnJlZXplKHBvc2l0aW9uYWxQcm94eSk7XG4gICAgfVxuXG4gICAgcmV0dXJuIHtcbiAgICAgIG5hbWVkOiBuYW1lZFByb3h5LFxuICAgICAgcG9zaXRpb25hbDogcG9zaXRpb25hbFByb3h5LFxuICAgIH07XG4gIH07XG59XG4iXSwic291cmNlUm9vdCI6IiJ9
{
"name": "@glimmer/manager",
"version": "0.83.1",
"version": "0.84.0",
"repository": "https://github.com/glimmerjs/glimmer-vm/tree/master/packages/@glimmer/program",
"dependencies": {
"@glimmer/env": "0.1.7",
"@glimmer/interfaces": "0.83.1",
"@glimmer/destroyable": "0.83.1",
"@glimmer/reference": "0.83.1",
"@glimmer/validator": "0.83.1",
"@glimmer/util": "0.83.1"
"@glimmer/interfaces": "0.84.0",
"@glimmer/destroyable": "0.84.0",
"@glimmer/reference": "0.84.0",
"@glimmer/validator": "0.84.0",
"@glimmer/util": "0.84.0"
},

@@ -13,0 +13,0 @@ "main": "dist/commonjs/es2017/index.js",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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