ember-cli 4.0.0-beta.2 → 4.1.0-beta.1

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.
Files changed (114) hide show
  1. package/.github/workflows/ci.yml +5 -5
  2. package/CHANGELOG.md +48 -3
  3. package/blueprints/addon/additional-dev-dependencies.json +2 -2
  4. package/blueprints/addon/files/.github/workflows/ci.yml +5 -1
  5. package/blueprints/addon/files/.travis.yml +1 -1
  6. package/blueprints/addon/files/README.md +2 -2
  7. package/blueprints/addon/files/addon-config/ember-try.js +4 -4
  8. package/blueprints/app/files/.github/workflows/ci.yml +4 -0
  9. package/blueprints/app/files/package.json +17 -17
  10. package/docs/build/data.json +3 -3
  11. package/lib/commands/init.js +9 -1
  12. package/lib/models/host-info-cache.js +3 -5
  13. package/lib/models/per-bundle-addon-cache/index.js +2 -3
  14. package/lib/utilities/get-lang-arg.js +45 -45
  15. package/package.json +25 -25
  16. package/.github/ISSUE_TEMPLATE.md +0 -12
  17. package/.github/dependabot.yml +0 -15
  18. package/.github/workflows/coverage.yml +0 -31
  19. package/docs/analytics.md +0 -44
  20. package/docs/architecture.md +0 -316
  21. package/docs/assets/architecture/Ember-CLI architecture.png +0 -0
  22. package/docs/assets/architecture/Ember-CLI architecture.xml +0 -1
  23. package/docs/assets/architecture/README.md +0 -5
  24. package/docs/brocfile-transition.md +0 -46
  25. package/docs/build/api.js +0 -44
  26. package/docs/build/assets/css/external-small.png +0 -0
  27. package/docs/build/assets/css/logo.png +0 -0
  28. package/docs/build/assets/css/main.css +0 -555
  29. package/docs/build/assets/favicon.ico +0 -0
  30. package/docs/build/assets/img/spinner.gif +0 -0
  31. package/docs/build/assets/index.html +0 -10
  32. package/docs/build/assets/js/api-filter.js +0 -56
  33. package/docs/build/assets/js/api-list.js +0 -255
  34. package/docs/build/assets/js/api-search.js +0 -98
  35. package/docs/build/assets/js/apidocs.js +0 -376
  36. package/docs/build/assets/js/yui-prettify.js +0 -17
  37. package/docs/build/assets/vendor/prettify/CHANGES.html +0 -130
  38. package/docs/build/assets/vendor/prettify/COPYING +0 -202
  39. package/docs/build/assets/vendor/prettify/README.html +0 -203
  40. package/docs/build/assets/vendor/prettify/prettify-min.css +0 -1
  41. package/docs/build/assets/vendor/prettify/prettify-min.js +0 -1
  42. package/docs/build/classes/Addon.html +0 -4318
  43. package/docs/build/classes/AmdTransformAddon.html +0 -202
  44. package/docs/build/classes/Blueprint.html +0 -4796
  45. package/docs/build/classes/Builder.html +0 -611
  46. package/docs/build/classes/CLI.html +0 -810
  47. package/docs/build/classes/Command.html +0 -1655
  48. package/docs/build/classes/DefaultPackager.html +0 -202
  49. package/docs/build/classes/EmberAddon.html +0 -2207
  50. package/docs/build/classes/EmberApp.html +0 -2225
  51. package/docs/build/classes/HardwareInfo.html +0 -620
  52. package/docs/build/classes/HistorySupportAddon.html +0 -203
  53. package/docs/build/classes/Instrumentation.html +0 -695
  54. package/docs/build/classes/NodeModulesList.html +0 -460
  55. package/docs/build/classes/NpmTask.html +0 -333
  56. package/docs/build/classes/PackageInfo.html +0 -1390
  57. package/docs/build/classes/PackageInfoCache.html +0 -963
  58. package/docs/build/classes/PerBundleAddonCache {.html +0 -1010
  59. package/docs/build/classes/Project.html +0 -2083
  60. package/docs/build/classes/ServeFilesAddon.html +0 -260
  61. package/docs/build/classes/TestsServerAddon.html +0 -203
  62. package/docs/build/classes/WatcherAddon.html +0 -204
  63. package/docs/build/classes/WindowsSymlinkChecker.html +0 -1505
  64. package/docs/build/files/lib_broccoli_default-packager.js.html +0 -1426
  65. package/docs/build/files/lib_broccoli_ember-addon.js.html +0 -159
  66. package/docs/build/files/lib_broccoli_ember-app.js.html +0 -1913
  67. package/docs/build/files/lib_cli_cli.js.html +0 -417
  68. package/docs/build/files/lib_models_addon-info.js.html +0 -112
  69. package/docs/build/files/lib_models_addon.js.html +0 -1866
  70. package/docs/build/files/lib_models_blueprint.js.html +0 -1678
  71. package/docs/build/files/lib_models_builder.js.html +0 -417
  72. package/docs/build/files/lib_models_command.js.html +0 -804
  73. package/docs/build/files/lib_models_hardware-info.js.html +0 -479
  74. package/docs/build/files/lib_models_host-info-cache.js.html +0 -428
  75. package/docs/build/files/lib_models_installation-checker.js.html +0 -181
  76. package/docs/build/files/lib_models_instantiate-addons.js.html +0 -191
  77. package/docs/build/files/lib_models_instrumentation.js.html +0 -433
  78. package/docs/build/files/lib_models_package-info-cache_index.js.html +0 -793
  79. package/docs/build/files/lib_models_package-info-cache_node-modules-list.js.html +0 -208
  80. package/docs/build/files/lib_models_package-info-cache_package-info.js.html +0 -661
  81. package/docs/build/files/lib_models_per-bundle-addon-cache_addon-proxy.js.html +0 -252
  82. package/docs/build/files/lib_models_per-bundle-addon-cache_index.js.html +0 -485
  83. package/docs/build/files/lib_models_per-bundle-addon-cache_target-instance.js.html +0 -108
  84. package/docs/build/files/lib_models_project.js.html +0 -913
  85. package/docs/build/files/lib_models_task.js.html +0 -117
  86. package/docs/build/files/lib_tasks_build-watch.js.html +0 -157
  87. package/docs/build/files/lib_tasks_npm-task.js.html +0 -463
  88. package/docs/build/files/lib_tasks_serve.js.html +0 -207
  89. package/docs/build/files/lib_tasks_server_middleware_broccoli-serve-files_index.js.html +0 -127
  90. package/docs/build/files/lib_tasks_server_middleware_broccoli-watcher_index.js.html +0 -158
  91. package/docs/build/files/lib_tasks_server_middleware_history-support_index.js.html +0 -181
  92. package/docs/build/files/lib_tasks_server_middleware_tests-server_index.js.html +0 -171
  93. package/docs/build/files/lib_tasks_test-server.js.html +0 -167
  94. package/docs/build/files/lib_tasks_transforms_amd_index.js.html +0 -143
  95. package/docs/build/files/lib_utilities_ember-app-utils.js.html +0 -292
  96. package/docs/build/files/lib_utilities_insert-into-file.js.html +0 -219
  97. package/docs/build/files/lib_utilities_is-lazy-engine.js.html +0 -125
  98. package/docs/build/files/lib_utilities_is-yarn-project.js.html +0 -120
  99. package/docs/build/files/lib_utilities_valid-project-name.js.html +0 -142
  100. package/docs/build/files/lib_utilities_will-interrupt-process.js.html +0 -290
  101. package/docs/build/files/lib_utilities_windows-admin.js.html +0 -230
  102. package/docs/build/index.html +0 -125
  103. package/docs/build/modules/ember-cli.html +0 -152
  104. package/docs/build/modules/is-lazy-engine.html +0 -106
  105. package/docs/build-concurrency.md +0 -15
  106. package/docs/build-pipeline-debugging.md +0 -33
  107. package/docs/code-coverage.md +0 -14
  108. package/docs/error-propagation.md +0 -136
  109. package/docs/experiments.md +0 -53
  110. package/docs/node-support.md +0 -43
  111. package/docs/perf-guide.md +0 -250
  112. package/docs/project_version_preprocessor.js +0 -8
  113. package/docs/sourcemaps.md +0 -60
  114. package/docs/yuidoc.json +0 -13
@@ -1,1390 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8">
5
- <title>PackageInfo - ember-cli</title>
6
- <link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
7
- <link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
8
- <script src="https://cdnjs.cloudflare.com/ajax/libs/yui/3.18.0/yui/yui-min.js"></script>
9
- </head>
10
- <body class="yui3-skin-sam">
11
-
12
- <div id="doc">
13
- <div class="yui3-g">
14
- <div id="sidebar" class="yui3-u">
15
- <div class="logo">
16
- <a href="../index.html">
17
- <img src="https://ember-cli.com/assets/images/ember-cli-logo-small-dark.png">
18
- </a>
19
- </div>
20
-
21
- <div id="modules" class="sidebox">
22
- <div class="hd">
23
- <h2 class="no-toc">Modules</h2>
24
- </div>
25
- <div class="bd">
26
- <ul>
27
- <li><a href="../modules/ember-cli.html">ember-cli</a>
28
- </li>
29
- <li><a href="../modules/is-lazy-engine.html">is-lazy-engine</a>
30
- </li>
31
- </ul>
32
- </div>
33
- </div>
34
-
35
- <div id="classes" class="sidebox">
36
- <div class="hd">
37
- <h2 class="no-toc">Classes</h2>
38
- </div>
39
- <div class="bd">
40
- <ul>
41
- <li><a href="../classes/Addon.html">Addon</a></li>
42
- <li><a href="../classes/AmdTransformAddon.html">AmdTransformAddon</a></li>
43
- <li><a href="../classes/Blueprint.html">Blueprint</a></li>
44
- <li><a href="../classes/Builder.html">Builder</a></li>
45
- <li><a href="../classes/CLI.html">CLI</a></li>
46
- <li><a href="../classes/Command.html">Command</a></li>
47
- <li><a href="../classes/DefaultPackager.html">DefaultPackager</a></li>
48
- <li><a href="../classes/EmberAddon.html">EmberAddon</a></li>
49
- <li><a href="../classes/EmberApp.html">EmberApp</a></li>
50
- <li><a href="../classes/HardwareInfo.html">HardwareInfo</a></li>
51
- <li><a href="../classes/HistorySupportAddon.html">HistorySupportAddon</a></li>
52
- <li><a href="../classes/Instrumentation.html">Instrumentation</a></li>
53
- <li><a href="../classes/NodeModulesList.html">NodeModulesList</a></li>
54
- <li><a href="../classes/NpmTask.html">NpmTask</a></li>
55
- <li><a href="../classes/PackageInfo.html">PackageInfo</a></li>
56
- <li><a href="../classes/PackageInfoCache.html">PackageInfoCache</a></li>
57
- <li><a href="../classes/PerBundleAddonCache {.html">PerBundleAddonCache {</a></li>
58
- <li><a href="../classes/Project.html">Project</a></li>
59
- <li><a href="../classes/ServeFilesAddon.html">ServeFilesAddon</a></li>
60
- <li><a href="../classes/TestsServerAddon.html">TestsServerAddon</a></li>
61
- <li><a href="../classes/WatcherAddon.html">WatcherAddon</a></li>
62
- <li><a href="../classes/WindowsSymlinkChecker.html">WindowsSymlinkChecker</a></li>
63
- </ul>
64
- </div>
65
- </div>
66
-
67
-
68
- <div id="sections" class="sidebox">
69
- <div class="hd">
70
- <h2 class="no-toc">PackageInfo</h2>
71
- </div>
72
- <div class="bd">
73
-
74
-
75
-
76
-
77
- <div><a href="#method-summary">Method Summary</a></div>
78
-
79
-
80
-
81
-
82
-
83
-
84
-
85
-
86
-
87
-
88
-
89
-
90
-
91
- <div><a href="#public-methods">Public Methods</a></div>
92
- <ul>
93
- <li><a href="#method_addPackages">addPackages</a></li>
94
- <li><a href="#method_discoverAddonAddons">discoverAddonAddons</a></li>
95
- <li><a href="#method_discoverProjectAddons">discoverProjectAddons</a></li>
96
- <li><a href="#method_generateAddonPackages">generateAddonPackages</a></li>
97
- <li><a href="#method_getAddonInstance">getAddonInstance</a></li>
98
- <li><a href="#method_hasErrors">hasErrors</a></li>
99
- <li><a href="#method_initChildAddons">initChildAddons</a></li>
100
- <li><a href="#method_isForAddon">isForAddon</a></li>
101
- <li><a href="#method_isForBundleHost">isForBundleHost</a></li>
102
- <li><a href="#method_isForEngine">isForEngine</a></li>
103
- <li><a href="#method_isForLazyEngine">isForLazyEngine</a></li>
104
- <li><a href="#method_isForProject">isForProject</a></li>
105
- </ul>
106
-
107
- <div><a href="#protected-methods">Protected Methods</a></div>
108
- <ul>
109
- <li><a href="#method_addDependencies">addDependencies</a></li>
110
- <li><a href="#method_addError">addError</a></li>
111
- <li><a href="#method_addInRepoAddon">addInRepoAddon</a></li>
112
- <li><a href="#method_addInternalAddon">addInternalAddon</a></li>
113
- </ul>
114
-
115
- <div><a href="#private-methods">Private Methods</a></div>
116
- <ul>
117
- <li><a href="#method__getAddonEntryPoint">_getAddonEntryPoint</a></li>
118
- <li><a href="#method_constructAddonInstance">constructAddonInstance</a></li>
119
- <li><a href="#method_getAddonConstructor">getAddonConstructor</a></li>
120
- </ul>
121
- </div>
122
- </div>
123
-
124
-
125
-
126
- <div class="version-info">
127
- Version: 4.0.0-beta.2-beta-6d064ff49f
128
- </div>
129
-
130
- </div>
131
-
132
- <div id="main" class="yui3-u">
133
- <div class="content"><div class="title">
134
- <span class="source-link"><a href="../files/lib_models_package-info-cache_package-info.js.html#l50"><code>lib&#x2F;models&#x2F;package-info-cache&#x2F;package-info.js:50</code></a></span>
135
- <h1 class="class-name">PackageInfo</h1>
136
- </div>
137
-
138
-
139
-
140
-
141
- <div class="class-description"><p>Class that stores information about a single package (directory tree with
142
- a package.json and other data, like and Addon or Project.) It is one of the
143
- two types of entries in a PackageInfoCache. It is only created by the
144
- PackageInfoCache.</p>
145
- </div>
146
-
147
-
148
-
149
-
150
-
151
-
152
-
153
-
154
- <h2 id="method-summary">Method Summary</h2>
155
-
156
- <table class="summary">
157
- <thead>
158
- <tr>
159
- <th colspan="2">Public Methods</th>
160
- </tr>
161
- </thead>
162
- <tbody>
163
- <tr>
164
- <td>
165
- public
166
-
167
-
168
- </td>
169
- <td>
170
- <div class="method-name ">
171
- <a href="#method_addPackages">addPackages</a>(addonPackageList, packageInfoList, excludeFn)
172
- </div>
173
- <div class="short-description">
174
- <p>Add to a list of child addon PackageInfos for this packageInfo.</p>
175
- </div>
176
- </td>
177
- </tr>
178
- <tr>
179
- <td>
180
- public
181
-
182
-
183
- </td>
184
- <td>
185
- <div class="method-name ">
186
- <a href="#method_discoverAddonAddons">discoverAddonAddons</a>( )
187
- </div>
188
- <div class="short-description">
189
- <p>Discover the child addons for this packageInfo, which corresponds to an Addon.</p>
190
- </div>
191
- </td>
192
- </tr>
193
- <tr>
194
- <td>
195
- public
196
-
197
-
198
- </td>
199
- <td>
200
- <div class="method-name ">
201
- <a href="#method_discoverProjectAddons">discoverProjectAddons</a>( )
202
- </div>
203
- <div class="short-description">
204
- <p>Discover the child addons for this packageInfo, which corresponds to a Project.</p>
205
- </div>
206
- </td>
207
- </tr>
208
- <tr>
209
- <td>
210
- public
211
-
212
-
213
- </td>
214
- <td>
215
- <div class="method-name ">
216
- <a href="#method_generateAddonPackages">generateAddonPackages</a>(addonPackageList, excludeFn)
217
- </div>
218
- <div class="short-description">
219
- <p>Given a list of PackageInfo objects, generate the 'addonPackages' object (keyed by name, value = AddonInfo instance, for all packages marked 'valid'). This is stored in both Addon and Project instances.</p>
220
- </div>
221
- </td>
222
- </tr>
223
- <tr>
224
- <td>
225
- public
226
-
227
-
228
- </td>
229
- <td>
230
- <div class="method-name ">
231
- <a href="#method_getAddonInstance">getAddonInstance</a>(parent, project): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a>
232
- </div>
233
- <div class="short-description">
234
- <p>Create an instance of the addon represented by this packageInfo or (if we are supporting per-bundle caching and this is an allow-caching-per-bundle addon) check if we should be creating a proxy instead.</p>
235
- </div>
236
- </td>
237
- </tr>
238
- <tr>
239
- <td>
240
- public
241
-
242
-
243
- </td>
244
- <td>
245
- <div class="method-name ">
246
- <a href="#method_hasErrors">hasErrors</a>(true)
247
- </div>
248
- <div class="short-description">
249
- <p>Indicate if there are any errors in the ErrorList for this package. Note that this does NOT indicate if there are any errors in the objects referred to by this package (e.g., internal addons or dependencies).</p>
250
- </div>
251
- </td>
252
- </tr>
253
- <tr>
254
- <td>
255
- public
256
-
257
-
258
- </td>
259
- <td>
260
- <div class="method-name ">
261
- <a href="#method_initChildAddons">initChildAddons</a>(addonInstance)
262
- </div>
263
- <div class="short-description">
264
- <p>Initialize the child addons array of a newly-created addon instance. Normally when an addon derives from Addon, child addons will be created during 'setupRegistry' and this code is essentially unnecessary. But if an addon is created with custom constructors that don't call 'setupRegistry', any child addons may not yet be initialized.</p>
265
- </div>
266
- </td>
267
- </tr>
268
- <tr>
269
- <td>
270
- public
271
-
272
-
273
- </td>
274
- <td>
275
- <div class="method-name ">
276
- <a href="#method_isForAddon">isForAddon</a>( ): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a>
277
- </div>
278
- <div class="short-description">
279
- <p>Indicate if this packageInfo is for an Addon.</p>
280
- </div>
281
- </td>
282
- </tr>
283
- <tr>
284
- <td>
285
- public
286
-
287
-
288
- </td>
289
- <td>
290
- <div class="method-name ">
291
- <a href="#method_isForBundleHost">isForBundleHost</a>( ): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a>
292
- </div>
293
- <div class="short-description">
294
- <p>For use with the PerBundleAddonCache, is this packageInfo representing a bundle host (for now, a Project or a lazy engine).</p>
295
- </div>
296
- </td>
297
- </tr>
298
- <tr>
299
- <td>
300
- public
301
-
302
-
303
- </td>
304
- <td>
305
- <div class="method-name ">
306
- <a href="#method_isForEngine">isForEngine</a>( ): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a>
307
- </div>
308
- <div class="short-description">
309
- <p>Indicate if this packageInfo represents an engine.</p>
310
- </div>
311
- </td>
312
- </tr>
313
- <tr>
314
- <td>
315
- public
316
-
317
-
318
- </td>
319
- <td>
320
- <div class="method-name ">
321
- <a href="#method_isForLazyEngine">isForLazyEngine</a>( ): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a>
322
- </div>
323
- <div class="short-description">
324
- <p>Indicate if this packageInfo represents a lazy engine.</p>
325
- </div>
326
- </td>
327
- </tr>
328
- <tr>
329
- <td>
330
- public
331
-
332
-
333
- </td>
334
- <td>
335
- <div class="method-name ">
336
- <a href="#method_isForProject">isForProject</a>( ): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a>
337
- </div>
338
- <div class="short-description">
339
- <p>Indicate if this packageInfo is for a project. Should be called only after the project has been loaded (see {@link PackageInfoCache#loadProject} for details).</p>
340
- </div>
341
- </td>
342
- </tr>
343
- </tbody>
344
- </table>
345
-
346
- <table class="summary">
347
- <thead>
348
- <tr>
349
- <th colspan="2">Protected Methods</th>
350
- </tr>
351
- </thead>
352
- <tbody>
353
- <tr>
354
- <td>
355
- protected
356
-
357
-
358
- </td>
359
- <td>
360
- <div class="method-name ">
361
- <a href="#method_addDependencies">addDependencies</a>(dependencies): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a>
362
- </div>
363
- <div class="short-description">
364
- <p>For each dependency in the given list, find the corresponding PackageInfo object in the cache (going up the file tree if necessary, as in the node resolution algorithm). Return a map of the dependencyName to PackageInfo object. Caller can then store it wherever they like.</p>
365
- </div>
366
- </td>
367
- </tr>
368
- <tr>
369
- <td>
370
- protected
371
-
372
-
373
- </td>
374
- <td>
375
- <div class="method-name ">
376
- <a href="#method_addError">addError</a>(errorType, errorData)
377
- </div>
378
- <div class="short-description">
379
- <p>Given error data, add an ErrorEntry to the ErrorList for this object. This is used by the _readPackage and _readNodeModulesList methods. It should not be called otherwise.</p>
380
- </div>
381
- </td>
382
- </tr>
383
- <tr>
384
- <td>
385
- protected
386
-
387
-
388
- </td>
389
- <td>
390
- <div class="method-name ">
391
- <a href="#method_addInRepoAddon">addInRepoAddon</a>(inRepoAddonPkg):
392
- </div>
393
- <div class="short-description">
394
- <p>Add a reference to an in-repo addon PackageInfo object.</p>
395
- </div>
396
- </td>
397
- </tr>
398
- <tr>
399
- <td>
400
- protected
401
-
402
-
403
- </td>
404
- <td>
405
- <div class="method-name ">
406
- <a href="#method_addInternalAddon">addInternalAddon</a>(internalAddonPkg):
407
- </div>
408
- <div class="short-description">
409
- <p>Add a reference to an internal addon PackageInfo object. "internal" addons (note: not in-repo addons) only exist in Projects, not other packages. Since the cache is loaded from 'loadProject', this can be done appropriately.</p>
410
- </div>
411
- </td>
412
- </tr>
413
- </tbody>
414
- </table>
415
-
416
- <table class="summary">
417
- <thead>
418
- <tr>
419
- <th colspan="2">Private Methods</th>
420
- </tr>
421
- </thead>
422
- <tbody>
423
- <tr>
424
- <td>
425
- private
426
-
427
-
428
- </td>
429
- <td>
430
- <div class="method-name ">
431
- <a href="#method__getAddonEntryPoint">_getAddonEntryPoint</a>( ): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="crosslink external" target="_blank">Function</a>
432
- </div>
433
- <div class="short-description">
434
- <p>Gets the addon entry point</p>
435
- </div>
436
- </td>
437
- </tr>
438
- <tr>
439
- <td>
440
- private
441
-
442
-
443
- </td>
444
- <td>
445
- <div class="method-name ">
446
- <a href="#method_constructAddonInstance">constructAddonInstance</a>(parent, project)
447
- </div>
448
- <div class="short-description">
449
- <p>Construct an addon instance.</p>
450
- </div>
451
- </td>
452
- </tr>
453
- <tr>
454
- <td>
455
- private
456
-
457
-
458
- </td>
459
- <td>
460
- <div class="method-name ">
461
- <a href="#method_getAddonConstructor">getAddonConstructor</a>( ): AddonConstructor
462
- </div>
463
- <div class="short-description">
464
- <p>This is only supposed to be called by the addon instantiation code. Also, the assumption here is that this PackageInfo really is for an Addon, so we don't need to check each time.</p>
465
- </div>
466
- </td>
467
- </tr>
468
- </tbody>
469
- </table>
470
-
471
-
472
-
473
-
474
-
475
-
476
-
477
-
478
-
479
-
480
-
481
-
482
-
483
- <div id="methods public">
484
- <h2 id="public-methods">Public Methods</h2>
485
- <div class="method item">
486
- <div id="method_addPackages" class="title">
487
- <span class="source-link"><a href="../files/lib_models_package-info-cache_package-info.js.html#l279"><code>lib&#x2F;models&#x2F;package-info-cache&#x2F;package-info.js:279</code></a></span>
488
- <h3 class="">
489
- public
490
-
491
-
492
- addPackages(addonPackageList, packageInfoList, excludeFn)
493
- </h3>
494
- </div>
495
-
496
-
497
-
498
- <div class="method-description"><p>Add to a list of child addon PackageInfos for this packageInfo.</p>
499
- </div>
500
-
501
- <div class="params">
502
- <h4>Parameters:</h4>
503
- <table>
504
- <thead>
505
- <tr>
506
- <th>Name</th>
507
- <th>Type</th>
508
- <th>Attribute</th>
509
- <th>Description</th>
510
- </tr>
511
- </thead>
512
- <tbody>
513
- <tr>
514
- <td>addonPackageList</td>
515
- <td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array" class="crosslink external" target="_blank">Array</a></td>
516
- <td>
517
- <ul>
518
-
519
-
520
-
521
- </ul>
522
- </td>
523
- <td><p>the list of child addon PackageInfos being constructed from various
524
- sources in this packageInfo.</p>
525
- </td>
526
- </tr>
527
-
528
- <tr>
529
- <td>packageInfoList</td>
530
- <td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array" class="crosslink external" target="_blank">Array</a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></td>
531
- <td>
532
- <ul>
533
-
534
-
535
-
536
- </ul>
537
- </td>
538
- <td><p>a list or map of PackageInfos being considered
539
- (e.g., pkgInfo.dependencyPackages) for inclusion in the addonPackageList.</p>
540
- </td>
541
- </tr>
542
-
543
- <tr>
544
- <td>excludeFn</td>
545
- <td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="crosslink external" target="_blank">Function</a></td>
546
- <td>
547
- <ul>
548
-
549
-
550
-
551
- </ul>
552
- </td>
553
- <td><p>an optional function. If passed in, each child PackageInfo
554
- will be tested against the function and only included in the package map if the function
555
- returns a truthy value.</p>
556
- </td>
557
- </tr>
558
-
559
- </tbody>
560
- </table>
561
- </div>
562
-
563
-
564
-
565
- </div>
566
- <div class="method item">
567
- <div id="method_discoverAddonAddons" class="title">
568
- <span class="source-link"><a href="../files/lib_models_package-info-cache_package-info.js.html#l318"><code>lib&#x2F;models&#x2F;package-info-cache&#x2F;package-info.js:318</code></a></span>
569
- <h3 class="">
570
- public
571
-
572
-
573
- discoverAddonAddons( )
574
- </h3>
575
- </div>
576
-
577
-
578
-
579
- <div class="method-description"><p>Discover the child addons for this packageInfo, which corresponds to an Addon.</p>
580
- </div>
581
-
582
-
583
-
584
-
585
- </div>
586
- <div class="method item">
587
- <div id="method_discoverProjectAddons" class="title">
588
- <span class="source-link"><a href="../files/lib_models_package-info-cache_package-info.js.html#l336"><code>lib&#x2F;models&#x2F;package-info-cache&#x2F;package-info.js:336</code></a></span>
589
- <h3 class="">
590
- public
591
-
592
-
593
- discoverProjectAddons( )
594
- </h3>
595
- </div>
596
-
597
-
598
-
599
- <div class="method-description"><p>Discover the child addons for this packageInfo, which corresponds to a Project.</p>
600
- </div>
601
-
602
-
603
-
604
-
605
- </div>
606
- <div class="method item">
607
- <div id="method_generateAddonPackages" class="title">
608
- <span class="source-link"><a href="../files/lib_models_package-info-cache_package-info.js.html#l356"><code>lib&#x2F;models&#x2F;package-info-cache&#x2F;package-info.js:356</code></a></span>
609
- <h3 class="">
610
- public
611
-
612
-
613
- generateAddonPackages(addonPackageList, excludeFn)
614
- </h3>
615
- </div>
616
-
617
-
618
-
619
- <div class="method-description"><p>Given a list of PackageInfo objects, generate the 'addonPackages' object (keyed by
620
- name, value = AddonInfo instance, for all packages marked 'valid'). This is stored in
621
- both Addon and Project instances.</p>
622
- </div>
623
-
624
- <div class="params">
625
- <h4>Parameters:</h4>
626
- <table>
627
- <thead>
628
- <tr>
629
- <th>Name</th>
630
- <th>Type</th>
631
- <th>Attribute</th>
632
- <th>Description</th>
633
- </tr>
634
- </thead>
635
- <tbody>
636
- <tr>
637
- <td>addonPackageList</td>
638
- <td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array" class="crosslink external" target="_blank">Array</a></td>
639
- <td>
640
- <ul>
641
-
642
-
643
-
644
- </ul>
645
- </td>
646
- <td><p>the list of child addon PackageInfos to work from</p>
647
- </td>
648
- </tr>
649
-
650
- <tr>
651
- <td>excludeFn</td>
652
- <td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="crosslink external" target="_blank">Function</a></td>
653
- <td>
654
- <ul>
655
-
656
-
657
-
658
- </ul>
659
- </td>
660
- <td><p>an optional function. If passed in, each child PackageInfo
661
- will be tested against the function and only included in the package map if the function
662
- returns a truthy value.</p>
663
- </td>
664
- </tr>
665
-
666
- </tbody>
667
- </table>
668
- </div>
669
-
670
-
671
-
672
- </div>
673
- <div class="method item">
674
- <div id="method_getAddonInstance" class="title">
675
- <span class="source-link"><a href="../files/lib_models_package-info-cache_package-info.js.html#l496"><code>lib&#x2F;models&#x2F;package-info-cache&#x2F;package-info.js:496</code></a></span>
676
- <h3 class="">
677
- public
678
-
679
-
680
- getAddonInstance(parent, project): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a>
681
- </h3>
682
- </div>
683
-
684
-
685
-
686
- <div class="method-description"><p>Create an instance of the addon represented by this packageInfo or (if we
687
- are supporting per-bundle caching and this is an allow-caching-per-bundle addon)
688
- check if we should be creating a proxy instead.</p>
689
- <p>NOTE: we assume that the value of 'allowCachingPerBundle' does not change between
690
- calls to the constructor! A given addon is either allowing or not allowing caching
691
- for an entire run.</p>
692
- </div>
693
-
694
- <div class="params">
695
- <h4>Parameters:</h4>
696
- <table>
697
- <thead>
698
- <tr>
699
- <th>Name</th>
700
- <th>Type</th>
701
- <th>Attribute</th>
702
- <th>Description</th>
703
- </tr>
704
- </thead>
705
- <tbody>
706
- <tr>
707
- <td>parent</td>
708
- <td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></td>
709
- <td>
710
- <ul>
711
-
712
-
713
-
714
- </ul>
715
- </td>
716
- <td><p>the addon/project that is to be the direct parent of the
717
- addon instance created here</p>
718
- </td>
719
- </tr>
720
-
721
- <tr>
722
- <td>project</td>
723
- <td></td>
724
- <td>
725
- <ul>
726
-
727
-
728
-
729
- </ul>
730
- </td>
731
- <td><p>the project that is to contain this addon instance</p>
732
- </td>
733
- </tr>
734
-
735
- </tbody>
736
- </table>
737
- </div>
738
-
739
- <div class="return">
740
- <h4>Return:</h4>
741
- <div>
742
- <span class="return-type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>
743
- <span class="return-description"><p>the constructed instance of the addon</p>
744
- </span>
745
- </div>
746
- </div>
747
-
748
-
749
- </div>
750
- <div class="method item public">
751
- <div id="method_hasErrors" class="title">
752
- <span class="source-link"><a href="../files/lib_models_package-info-cache_package-info.js.html#l111"><code>lib&#x2F;models&#x2F;package-info-cache&#x2F;package-info.js:111</code></a></span>
753
- <h3 class="">
754
- public
755
-
756
-
757
- hasErrors(true)
758
- </h3>
759
- </div>
760
-
761
-
762
-
763
- <div class="method-description"><p>Indicate if there are any errors in the ErrorList for this package. Note that this does
764
- NOT indicate if there are any errors in the objects referred to by this package (e.g.,
765
- internal addons or dependencies).</p>
766
- </div>
767
-
768
- <div class="params">
769
- <h4>Parameters:</h4>
770
- <table>
771
- <thead>
772
- <tr>
773
- <th>Name</th>
774
- <th>Type</th>
775
- <th>Attribute</th>
776
- <th>Description</th>
777
- </tr>
778
- </thead>
779
- <tbody>
780
- <tr>
781
- <td>true</td>
782
- <td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></td>
783
- <td>
784
- <ul>
785
-
786
-
787
-
788
- </ul>
789
- </td>
790
- <td><p>if there are errors in the ErrorList, else false.</p>
791
- </td>
792
- </tr>
793
-
794
- </tbody>
795
- </table>
796
- </div>
797
-
798
-
799
-
800
- </div>
801
- <div class="method item">
802
- <div id="method_initChildAddons" class="title">
803
- <span class="source-link"><a href="../files/lib_models_package-info-cache_package-info.js.html#l529"><code>lib&#x2F;models&#x2F;package-info-cache&#x2F;package-info.js:529</code></a></span>
804
- <h3 class="">
805
- public
806
-
807
-
808
- initChildAddons(addonInstance)
809
- </h3>
810
- </div>
811
-
812
-
813
-
814
- <div class="method-description"><p>Initialize the child addons array of a newly-created addon instance. Normally when
815
- an addon derives from Addon, child addons will be created during 'setupRegistry' and
816
- this code is essentially unnecessary. But if an addon is created with custom constructors
817
- that don't call 'setupRegistry', any child addons may not yet be initialized.</p>
818
- </div>
819
-
820
- <div class="params">
821
- <h4>Parameters:</h4>
822
- <table>
823
- <thead>
824
- <tr>
825
- <th>Name</th>
826
- <th>Type</th>
827
- <th>Attribute</th>
828
- <th>Description</th>
829
- </tr>
830
- </thead>
831
- <tbody>
832
- <tr>
833
- <td>addonInstance</td>
834
- <td><a href="../classes/Addon.html" class="crosslink">Addon</a></td>
835
- <td>
836
- <ul>
837
-
838
-
839
-
840
- </ul>
841
- </td>
842
- <td> </td>
843
- </tr>
844
-
845
- </tbody>
846
- </table>
847
- </div>
848
-
849
-
850
-
851
- </div>
852
- <div class="method item">
853
- <div id="method_isForAddon" class="title">
854
- <span class="source-link"><a href="../files/lib_models_package-info-cache_package-info.js.html#l237"><code>lib&#x2F;models&#x2F;package-info-cache&#x2F;package-info.js:237</code></a></span>
855
- <h3 class="">
856
- public
857
-
858
-
859
- isForAddon( ): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a>
860
- </h3>
861
- </div>
862
-
863
-
864
-
865
- <div class="method-description"><p>Indicate if this packageInfo is for an Addon.</p>
866
- </div>
867
-
868
-
869
- <div class="return">
870
- <h4>Return:</h4>
871
- <div>
872
- <span class="return-type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>
873
- <span class="return-description"><p>true if this packageInfo is for an Addon, false otherwise.</p>
874
- </span>
875
- </div>
876
- </div>
877
-
878
-
879
- </div>
880
- <div class="method item">
881
- <div id="method_isForBundleHost" class="title">
882
- <span class="source-link"><a href="../files/lib_models_package-info-cache_package-info.js.html#l268"><code>lib&#x2F;models&#x2F;package-info-cache&#x2F;package-info.js:268</code></a></span>
883
- <h3 class="">
884
- public
885
-
886
-
887
- isForBundleHost( ): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a>
888
- </h3>
889
- </div>
890
-
891
-
892
-
893
- <div class="method-description"><p>For use with the PerBundleAddonCache, is this packageInfo representing a
894
- bundle host (for now, a Project or a lazy engine).</p>
895
- </div>
896
-
897
-
898
- <div class="return">
899
- <h4>Return:</h4>
900
- <div>
901
- <span class="return-type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>
902
- <span class="return-description"><p>true if this pkgInfo is for a bundle host, false otherwise.</p>
903
- </span>
904
- </div>
905
- </div>
906
-
907
-
908
- </div>
909
- <div class="method item">
910
- <div id="method_isForEngine" class="title">
911
- <span class="source-link"><a href="../files/lib_models_package-info-cache_package-info.js.html#l247"><code>lib&#x2F;models&#x2F;package-info-cache&#x2F;package-info.js:247</code></a></span>
912
- <h3 class="">
913
- public
914
-
915
-
916
- isForEngine( ): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a>
917
- </h3>
918
- </div>
919
-
920
-
921
-
922
- <div class="method-description"><p>Indicate if this packageInfo represents an engine.</p>
923
- </div>
924
-
925
-
926
- <div class="return">
927
- <h4>Return:</h4>
928
- <div>
929
- <span class="return-type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>
930
- <span class="return-description"><p>true if this pkgInfo is configured as an engine &amp; false otherwise</p>
931
- </span>
932
- </div>
933
- </div>
934
-
935
-
936
- </div>
937
- <div class="method item">
938
- <div id="method_isForLazyEngine" class="title">
939
- <span class="source-link"><a href="../files/lib_models_package-info-cache_package-info.js.html#l257"><code>lib&#x2F;models&#x2F;package-info-cache&#x2F;package-info.js:257</code></a></span>
940
- <h3 class="">
941
- public
942
-
943
-
944
- isForLazyEngine( ): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a>
945
- </h3>
946
- </div>
947
-
948
-
949
-
950
- <div class="method-description"><p>Indicate if this packageInfo represents a lazy engine.</p>
951
- </div>
952
-
953
-
954
- <div class="return">
955
- <h4>Return:</h4>
956
- <div>
957
- <span class="return-type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>
958
- <span class="return-description"><p>true if this pkgInfo is configured as an engine and the
959
- module this represents has lazyLoading enabled, false otherwise.</p>
960
- </span>
961
- </div>
962
- </div>
963
-
964
-
965
- </div>
966
- <div class="method item">
967
- <div id="method_isForProject" class="title">
968
- <span class="source-link"><a href="../files/lib_models_package-info-cache_package-info.js.html#l226"><code>lib&#x2F;models&#x2F;package-info-cache&#x2F;package-info.js:226</code></a></span>
969
- <h3 class="">
970
- public
971
-
972
-
973
- isForProject( ): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a>
974
- </h3>
975
- </div>
976
-
977
-
978
-
979
- <div class="method-description"><p>Indicate if this packageInfo is for a project. Should be called only after the project
980
- has been loaded (see {@link PackageInfoCache#loadProject} for details).</p>
981
- </div>
982
-
983
-
984
- <div class="return">
985
- <h4>Return:</h4>
986
- <div>
987
- <span class="return-type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>
988
- <span class="return-description"><p>true if this packageInfo is for a Project, false otherwise.</p>
989
- </span>
990
- </div>
991
- </div>
992
-
993
-
994
- </div>
995
- </div>
996
-
997
- <div id="methods protected">
998
- <h2 id="protected-methods">Protected Methods</h2>
999
- <div class="method item protected">
1000
- <div id="method_addDependencies" class="title">
1001
- <span class="source-link"><a href="../files/lib_models_package-info-cache_package-info.js.html#l157"><code>lib&#x2F;models&#x2F;package-info-cache&#x2F;package-info.js:157</code></a></span>
1002
- <h3 class="">
1003
- protected
1004
-
1005
-
1006
- addDependencies(dependencies): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a>
1007
- </h3>
1008
- </div>
1009
-
1010
-
1011
-
1012
- <div class="method-description"><p>For each dependency in the given list, find the corresponding
1013
- PackageInfo object in the cache (going up the file tree if
1014
- necessary, as in the node resolution algorithm). Return a map
1015
- of the dependencyName to PackageInfo object. Caller can then
1016
- store it wherever they like.</p>
1017
- <p>Note: this is not to be called until all packages that can be have
1018
- been added to the cache.</p>
1019
- <p>Note: this is for ALL dependencies, not just addons. To get just
1020
- addons, filter the result by calling pkgInfo.isForAddon().</p>
1021
- <p>Note: this is only intended for use from PackageInfoCache._resolveDependencies.
1022
- It is not to be called directly by anything else.</p>
1023
- </div>
1024
-
1025
- <div class="params">
1026
- <h4>Parameters:</h4>
1027
- <table>
1028
- <thead>
1029
- <tr>
1030
- <th>Name</th>
1031
- <th>Type</th>
1032
- <th>Attribute</th>
1033
- <th>Description</th>
1034
- </tr>
1035
- </thead>
1036
- <tbody>
1037
- <tr>
1038
- <td>dependencies</td>
1039
- <td><a href="../classes/PackageInfo.html" class="crosslink">PackageInfo</a></td>
1040
- <td>
1041
- <ul>
1042
-
1043
-
1044
-
1045
- </ul>
1046
- </td>
1047
- <td><p>value of 'dependencies' or 'devDependencies'
1048
- attributes of a package.json.</p>
1049
- </td>
1050
- </tr>
1051
-
1052
- </tbody>
1053
- </table>
1054
- </div>
1055
-
1056
- <div class="return">
1057
- <h4>Return:</h4>
1058
- <div>
1059
- <span class="return-type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>
1060
- <span class="return-description"><p>a JavaScript object keyed on dependency name/path with
1061
- values the corresponding PackageInfo object from the cache.</p>
1062
- </span>
1063
- </div>
1064
- </div>
1065
-
1066
-
1067
- </div>
1068
- <div class="method item protected">
1069
- <div id="method_addError" class="title">
1070
- <span class="source-link"><a href="../files/lib_models_package-info-cache_package-info.js.html#l96"><code>lib&#x2F;models&#x2F;package-info-cache&#x2F;package-info.js:96</code></a></span>
1071
- <h3 class="">
1072
- protected
1073
-
1074
-
1075
- addError(errorType, errorData)
1076
- </h3>
1077
- </div>
1078
-
1079
-
1080
-
1081
- <div class="method-description"><p>Given error data, add an ErrorEntry to the ErrorList for this object.
1082
- This is used by the _readPackage and _readNodeModulesList methods. It
1083
- should not be called otherwise.</p>
1084
- </div>
1085
-
1086
- <div class="params">
1087
- <h4>Parameters:</h4>
1088
- <table>
1089
- <thead>
1090
- <tr>
1091
- <th>Name</th>
1092
- <th>Type</th>
1093
- <th>Attribute</th>
1094
- <th>Description</th>
1095
- </tr>
1096
- </thead>
1097
- <tbody>
1098
- <tr>
1099
- <td>errorType</td>
1100
- <td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></td>
1101
- <td>
1102
- <ul>
1103
-
1104
-
1105
-
1106
- </ul>
1107
- </td>
1108
- <td><p>one of the Errors.ERROR_* constants.</p>
1109
- </td>
1110
- </tr>
1111
-
1112
- <tr>
1113
- <td>errorData</td>
1114
- <td><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></td>
1115
- <td>
1116
- <ul>
1117
-
1118
-
1119
-
1120
- </ul>
1121
- </td>
1122
- <td><p>any error data relevant to the type of error
1123
- being created. See showErrors().</p>
1124
- </td>
1125
- </tr>
1126
-
1127
- </tbody>
1128
- </table>
1129
- </div>
1130
-
1131
-
1132
-
1133
- </div>
1134
- <div class="method item protected">
1135
- <div id="method_addInRepoAddon" class="title">
1136
- <span class="source-link"><a href="../files/lib_models_package-info-cache_package-info.js.html#l124"><code>lib&#x2F;models&#x2F;package-info-cache&#x2F;package-info.js:124</code></a></span>
1137
- <h3 class="">
1138
- protected
1139
-
1140
-
1141
- addInRepoAddon(inRepoAddonPkg):
1142
- </h3>
1143
- </div>
1144
-
1145
-
1146
-
1147
- <div class="method-description"><p>Add a reference to an in-repo addon PackageInfo object.</p>
1148
- </div>
1149
-
1150
- <div class="params">
1151
- <h4>Parameters:</h4>
1152
- <table>
1153
- <thead>
1154
- <tr>
1155
- <th>Name</th>
1156
- <th>Type</th>
1157
- <th>Attribute</th>
1158
- <th>Description</th>
1159
- </tr>
1160
- </thead>
1161
- <tbody>
1162
- <tr>
1163
- <td>inRepoAddonPkg</td>
1164
- <td><a href="../classes/PackageInfo.html" class="crosslink">PackageInfo</a></td>
1165
- <td>
1166
- <ul>
1167
-
1168
-
1169
-
1170
- </ul>
1171
- </td>
1172
- <td><p>the PackageInfo for the in-repo addon</p>
1173
- </td>
1174
- </tr>
1175
-
1176
- </tbody>
1177
- </table>
1178
- </div>
1179
-
1180
- <div class="return">
1181
- <h4>Return:</h4>
1182
- <div>
1183
-
1184
- <span class="return-description"><p>null</p>
1185
- </span>
1186
- </div>
1187
- </div>
1188
-
1189
-
1190
- </div>
1191
- <div class="method item protected">
1192
- <div id="method_addInternalAddon" class="title">
1193
- <span class="source-link"><a href="../files/lib_models_package-info-cache_package-info.js.html#l139"><code>lib&#x2F;models&#x2F;package-info-cache&#x2F;package-info.js:139</code></a></span>
1194
- <h3 class="">
1195
- protected
1196
-
1197
-
1198
- addInternalAddon(internalAddonPkg):
1199
- </h3>
1200
- </div>
1201
-
1202
-
1203
-
1204
- <div class="method-description"><p>Add a reference to an internal addon PackageInfo object.
1205
- "internal" addons (note: not in-repo addons) only exist in
1206
- Projects, not other packages. Since the cache is loaded from
1207
- 'loadProject', this can be done appropriately.</p>
1208
- </div>
1209
-
1210
- <div class="params">
1211
- <h4>Parameters:</h4>
1212
- <table>
1213
- <thead>
1214
- <tr>
1215
- <th>Name</th>
1216
- <th>Type</th>
1217
- <th>Attribute</th>
1218
- <th>Description</th>
1219
- </tr>
1220
- </thead>
1221
- <tbody>
1222
- <tr>
1223
- <td>internalAddonPkg</td>
1224
- <td><a href="../classes/PackageInfo.html" class="crosslink">PackageInfo</a></td>
1225
- <td>
1226
- <ul>
1227
-
1228
-
1229
-
1230
- </ul>
1231
- </td>
1232
- <td><p>the PackageInfo for the internal addon</p>
1233
- </td>
1234
- </tr>
1235
-
1236
- </tbody>
1237
- </table>
1238
- </div>
1239
-
1240
- <div class="return">
1241
- <h4>Return:</h4>
1242
- <div>
1243
-
1244
- <span class="return-description"><p>null</p>
1245
- </span>
1246
- </div>
1247
- </div>
1248
-
1249
-
1250
- </div>
1251
- </div>
1252
-
1253
- <div id="methods private">
1254
- <h2 id="private-methods">Private Methods</h2>
1255
- <div class="method item private">
1256
- <div id="method__getAddonEntryPoint" class="title">
1257
- <span class="source-link"><a href="../files/lib_models_package-info-cache_package-info.js.html#l546"><code>lib&#x2F;models&#x2F;package-info-cache&#x2F;package-info.js:546</code></a></span>
1258
- <h3 class="">
1259
- private
1260
-
1261
-
1262
- _getAddonEntryPoint( ): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="crosslink external" target="_blank">Function</a>
1263
- </h3>
1264
- </div>
1265
-
1266
-
1267
-
1268
- <div class="method-description"><p>Gets the addon entry point</p>
1269
- </div>
1270
-
1271
-
1272
- <div class="return">
1273
- <h4>Return:</h4>
1274
- <div>
1275
- <span class="return-type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="crosslink external" target="_blank">Function</a></span>
1276
- <span class="return-description"><p>The exported addon entry point</p>
1277
- </span>
1278
- </div>
1279
- </div>
1280
-
1281
-
1282
- </div>
1283
- <div class="method item private">
1284
- <div id="method_constructAddonInstance" class="title">
1285
- <span class="source-link"><a href="../files/lib_models_package-info-cache_package-info.js.html#l461"><code>lib&#x2F;models&#x2F;package-info-cache&#x2F;package-info.js:461</code></a></span>
1286
- <h3 class="">
1287
- private
1288
-
1289
-
1290
- constructAddonInstance(parent, project)
1291
- </h3>
1292
- </div>
1293
-
1294
-
1295
-
1296
- <div class="method-description"><p>Construct an addon instance.</p>
1297
- <p>NOTE: this does NOT call constructors for the child addons. That is left to
1298
- the caller to do, so they can insert any other logic they want.</p>
1299
- </div>
1300
-
1301
- <div class="params">
1302
- <h4>Parameters:</h4>
1303
- <table>
1304
- <thead>
1305
- <tr>
1306
- <th>Name</th>
1307
- <th>Type</th>
1308
- <th>Attribute</th>
1309
- <th>Description</th>
1310
- </tr>
1311
- </thead>
1312
- <tbody>
1313
- <tr>
1314
- <td>parent</td>
1315
- <td><a href="../classes/Project.html" class="crosslink">Project</a> | <a href="../classes/Addon.html" class="crosslink">Addon</a></td>
1316
- <td>
1317
- <ul>
1318
-
1319
-
1320
-
1321
- </ul>
1322
- </td>
1323
- <td><p>the parent that directly contains this addon</p>
1324
- </td>
1325
- </tr>
1326
-
1327
- <tr>
1328
- <td>project</td>
1329
- <td><a href="../classes/Project.html" class="crosslink">Project</a></td>
1330
- <td>
1331
- <ul>
1332
-
1333
-
1334
-
1335
- </ul>
1336
- </td>
1337
- <td><p>the project that is/contains this addon</p>
1338
- </td>
1339
- </tr>
1340
-
1341
- </tbody>
1342
- </table>
1343
- </div>
1344
-
1345
-
1346
-
1347
- </div>
1348
- <div class="method item private">
1349
- <div id="method_getAddonConstructor" class="title">
1350
- <span class="source-link"><a href="../files/lib_models_package-info-cache_package-info.js.html#l423"><code>lib&#x2F;models&#x2F;package-info-cache&#x2F;package-info.js:423</code></a></span>
1351
- <h3 class="">
1352
- private
1353
-
1354
-
1355
- getAddonConstructor( ): AddonConstructor
1356
- </h3>
1357
- </div>
1358
-
1359
-
1360
-
1361
- <div class="method-description"><p>This is only supposed to be called by the addon instantiation code.
1362
- Also, the assumption here is that this PackageInfo really is for an
1363
- Addon, so we don't need to check each time.</p>
1364
- </div>
1365
-
1366
-
1367
- <div class="return">
1368
- <h4>Return:</h4>
1369
- <div>
1370
- <span class="return-type">AddonConstructor</span>
1371
- <span class="return-description"><p>an instance of a constructor function for the Addon class
1372
- whose package information is stored in this object.</p>
1373
- </span>
1374
- </div>
1375
- </div>
1376
-
1377
-
1378
- </div>
1379
- </div>
1380
-
1381
-
1382
- </div>
1383
- </div>
1384
- </div>
1385
- </div>
1386
- <script src="../assets/vendor/prettify/prettify-min.js"></script>
1387
- <script>prettyPrint();</script>
1388
- <script src="../assets/js/yui-prettify.js"></script>
1389
- </body>
1390
- </html>