ember-source 3.28.6 → 3.28.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,7 +6,7 @@
6
6
  * Portions Copyright 2008-2011 Apple Inc. All rights reserved.
7
7
  * @license Licensed under MIT license
8
8
  * See https://raw.github.com/emberjs/ember.js/master/LICENSE
9
- * @version 3.28.6
9
+ * @version 3.28.7
10
10
  */
11
11
  /* eslint-disable no-var */
12
12
 
@@ -391,7 +391,7 @@ define("@ember/-internals/container/index", ["exports", "@ember/-internals/owner
391
391
  _exports.privatize = privatize;
392
392
  _exports.getFactoryFor = getFactoryFor;
393
393
  _exports.setFactoryFor = setFactoryFor;
394
- _exports.INIT_FACTORY = _exports.Container = _exports.Registry = void 0;
394
+ _exports.DeprecatedStoreInjection = _exports.INIT_FACTORY = _exports.Container = _exports.Registry = void 0;
395
395
  var leakTracking;
396
396
  var containers;
397
397
 
@@ -427,6 +427,13 @@ define("@ember/-internals/container/index", ["exports", "@ember/-internals/owner
427
427
  } catch (e) {// ignore
428
428
  }
429
429
  }
430
+
431
+ class DeprecatedStoreInjection {
432
+ constructor(store) {
433
+ this.store = store;
434
+ }
435
+
436
+ }
430
437
  /**
431
438
  A container used to instantiate and cache objects.
432
439
 
@@ -442,6 +449,8 @@ define("@ember/-internals/container/index", ["exports", "@ember/-internals/owner
442
449
  */
443
450
 
444
451
 
452
+ _exports.DeprecatedStoreInjection = DeprecatedStoreInjection;
453
+
445
454
  class Container {
446
455
  constructor(registry, options = {}) {
447
456
  this.registry = registry;
@@ -798,7 +807,15 @@ define("@ember/-internals/container/index", ["exports", "@ember/-internals/owner
798
807
  var [type] = fullName.split(':');
799
808
  var typeInjections = registry.getTypeInjections(type);
800
809
  var injections = registry.getInjections(fullName);
801
- return buildInjections(container, typeInjections, injections);
810
+ var result = buildInjections(container, typeInjections, injections);
811
+
812
+ if (true
813
+ /* DEBUG */
814
+ && type === 'route' && result.injections.store) {
815
+ result.injections.store = new DeprecatedStoreInjection(result.injections.store);
816
+ }
817
+
818
+ return result;
802
819
  }
803
820
 
804
821
  function destroyDestroyables(container) {
@@ -19064,7 +19081,7 @@ define("@ember/-internals/routing/lib/system/route-info", [], function () {
19064
19081
  @public
19065
19082
  */
19066
19083
  });
19067
- define("@ember/-internals/routing/lib/system/route", ["exports", "@ember/polyfills", "@ember/-internals/container", "@ember/-internals/metal", "@ember/-internals/owner", "@ember/-internals/runtime", "@ember/-internals/utils", "@ember/debug", "@ember/deprecated-features", "@ember/object/compat", "@ember/runloop", "@ember/string", "router_js", "@ember/-internals/routing/lib/utils", "@ember/-internals/routing/lib/system/generate_controller"], function (_exports, _polyfills, _container, _metal, _owner, _runtime, _utils, _debug, _deprecatedFeatures, _compat, _runloop, _string, _router_js, _utils2, _generate_controller) {
19084
+ define("@ember/-internals/routing/lib/system/route", ["exports", "@ember/polyfills", "@ember/-internals/container", "@ember/-internals/metal", "@ember/-internals/owner", "@ember/-internals/runtime", "@ember/-internals/utils", "@ember/debug", "@ember/deprecated-features", "@ember/object/compat", "@ember/runloop", "router_js", "@ember/-internals/routing/lib/utils", "@ember/-internals/routing/lib/system/generate_controller"], function (_exports, _polyfills, _container, _metal, _owner, _runtime, _utils, _debug, _deprecatedFeatures, _compat, _runloop, _router_js, _utils2, _generate_controller) {
19068
19085
  "use strict";
19069
19086
 
19070
19087
  Object.defineProperty(_exports, "__esModule", {
@@ -21066,18 +21083,17 @@ define("@ember/-internals/routing/lib/system/route", ["exports", "@ember/polyfil
21066
21083
  get() {
21067
21084
  var owner = (0, _owner.getOwner)(this);
21068
21085
  var routeName = this.routeName;
21069
- var namespace = (0, _metal.get)(this, '_router.namespace');
21070
21086
  return {
21071
21087
  find(name, value) {
21072
21088
  var modelClass = owner.factoryFor(`model:${name}`);
21073
- (true && !(Boolean(modelClass)) && (0, _debug.assert)(`You used the dynamic segment ${name}_id in your route ${routeName}, but ${namespace}.${(0, _string.classify)(name)} did not exist and you did not override your route's \`model\` hook.`, Boolean(modelClass)));
21089
+ (true && !(Boolean(modelClass)) && (0, _debug.assert)(`You used the dynamic segment \`${name}_id\` in your route ` + `\`${routeName}\` for which Ember requires you provide a ` + `data-loading implementation. Commonly, that is done by ` + `adding a model hook implementation on the route ` + `(\`model({${name}_id}) {\`) or by injecting an implemention of ` + `a data store: \`@service store;\`.`, Boolean(modelClass)));
21074
21090
 
21075
21091
  if (!modelClass) {
21076
21092
  return;
21077
21093
  }
21078
21094
 
21079
21095
  modelClass = modelClass.class;
21080
- (true && !(typeof modelClass.find === 'function') && (0, _debug.assert)(`${(0, _string.classify)(name)} has no method \`find\`.`, typeof modelClass.find === 'function'));
21096
+ (true && !(typeof modelClass.find === 'function') && (0, _debug.assert)(`You used the dynamic segment \`${name}_id\` in your route ` + `\`${routeName}\` for which Ember requires you provide a ` + `data-loading implementation. Commonly, that is done by ` + `adding a model hook implementation on the route ` + `(\`model({${name}_id}) {\`) or by injecting an implemention of ` + `a data store: \`@service store;\`.\n\n` + `Rarely, applications may attempt to use a legacy behavior where ` + `the model class (in this case \`${name}\`) is resolved and the ` + `\`find\` method on that class is invoked to load data. In this ` + `application, a model of \`${name}\` was found but it did not ` + `provide a \`find\` method. You should not add a \`find\` ` + `method to your model. Instead, please implement an appropriate ` + `\`model\` hook on the \`${routeName}\` route.`, typeof modelClass.find === 'function'));
21081
21097
  return modelClass.find(value);
21082
21098
  }
21083
21099
 
@@ -21085,7 +21101,30 @@ define("@ember/-internals/routing/lib/system/route", ["exports", "@ember/polyfil
21085
21101
  },
21086
21102
 
21087
21103
  set(key, value) {
21088
- (0, _metal.defineProperty)(this, key, null, value);
21104
+ if (true
21105
+ /* DEBUG */
21106
+ && value instanceof _container.DeprecatedStoreInjection) {
21107
+ Object.defineProperty(this, key, {
21108
+ configurable: true,
21109
+ enumerable: false,
21110
+
21111
+ get() {
21112
+ (true && !(false) && (0, _debug.deprecate)(`A value for the \`store\` property was injected onto a route via the owner API. Implicit injection via the owner API is now deprecated, please add an explicit injection for this value. If the injected value is a service, consider using the @service decorator.`, false, {
21113
+ id: 'implicit-injections',
21114
+ until: '4.0.0',
21115
+ url: 'https://deprecations.emberjs.com/v3.x/#toc_implicit-injections',
21116
+ for: 'ember-source',
21117
+ since: {
21118
+ enabled: '3.28.7'
21119
+ }
21120
+ }));
21121
+ return value.store;
21122
+ }
21123
+
21124
+ });
21125
+ } else {
21126
+ (0, _metal.defineProperty)(this, key, null, value);
21127
+ }
21089
21128
  }
21090
21129
 
21091
21130
  }),
@@ -63189,7 +63228,7 @@ define("ember/version", ["exports"], function (_exports) {
63189
63228
  value: true
63190
63229
  });
63191
63230
  _exports.default = void 0;
63192
- var _default = "3.28.6";
63231
+ var _default = "3.28.7";
63193
63232
  _exports.default = _default;
63194
63233
  });
63195
63234
  define("jquery/index", ["exports", "@ember/-internals/views"], function (_exports, _views) {