ember-cli 4.0.0 → 4.2.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 (115) hide show
  1. package/.github/workflows/ci.yml +8 -4
  2. package/CHANGELOG.md +43 -2
  3. package/README.md +1 -1
  4. package/blueprints/addon/additional-dev-dependencies.json +1 -1
  5. package/blueprints/addon/files/CONTRIBUTING.md +1 -1
  6. package/blueprints/app/files/README.md +2 -2
  7. package/blueprints/app/files/package.json +8 -8
  8. package/docs/build/data.json +64 -3
  9. package/lib/debug/assert.js +37 -0
  10. package/lib/debug/deprecate.js +111 -0
  11. package/lib/debug/index.js +6 -0
  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/tasks/npm-task.js +1 -1
  15. package/lib/utilities/get-lang-arg.js +45 -45
  16. package/package.json +31 -31
  17. package/.github/ISSUE_TEMPLATE.md +0 -12
  18. package/.github/dependabot.yml +0 -15
  19. package/.github/workflows/coverage.yml +0 -31
  20. package/docs/analytics.md +0 -44
  21. package/docs/architecture.md +0 -316
  22. package/docs/assets/architecture/Ember-CLI architecture.png +0 -0
  23. package/docs/assets/architecture/Ember-CLI architecture.xml +0 -1
  24. package/docs/assets/architecture/README.md +0 -5
  25. package/docs/brocfile-transition.md +0 -46
  26. package/docs/build/api.js +0 -44
  27. package/docs/build/assets/css/external-small.png +0 -0
  28. package/docs/build/assets/css/logo.png +0 -0
  29. package/docs/build/assets/css/main.css +0 -555
  30. package/docs/build/assets/favicon.ico +0 -0
  31. package/docs/build/assets/img/spinner.gif +0 -0
  32. package/docs/build/assets/index.html +0 -10
  33. package/docs/build/assets/js/api-filter.js +0 -56
  34. package/docs/build/assets/js/api-list.js +0 -255
  35. package/docs/build/assets/js/api-search.js +0 -98
  36. package/docs/build/assets/js/apidocs.js +0 -376
  37. package/docs/build/assets/js/yui-prettify.js +0 -17
  38. package/docs/build/assets/vendor/prettify/CHANGES.html +0 -130
  39. package/docs/build/assets/vendor/prettify/COPYING +0 -202
  40. package/docs/build/assets/vendor/prettify/README.html +0 -203
  41. package/docs/build/assets/vendor/prettify/prettify-min.css +0 -1
  42. package/docs/build/assets/vendor/prettify/prettify-min.js +0 -1
  43. package/docs/build/classes/Addon.html +0 -4318
  44. package/docs/build/classes/AmdTransformAddon.html +0 -202
  45. package/docs/build/classes/Blueprint.html +0 -4796
  46. package/docs/build/classes/Builder.html +0 -611
  47. package/docs/build/classes/CLI.html +0 -810
  48. package/docs/build/classes/Command.html +0 -1655
  49. package/docs/build/classes/DefaultPackager.html +0 -202
  50. package/docs/build/classes/EmberAddon.html +0 -2207
  51. package/docs/build/classes/EmberApp.html +0 -2225
  52. package/docs/build/classes/HardwareInfo.html +0 -620
  53. package/docs/build/classes/HistorySupportAddon.html +0 -203
  54. package/docs/build/classes/Instrumentation.html +0 -695
  55. package/docs/build/classes/NodeModulesList.html +0 -460
  56. package/docs/build/classes/NpmTask.html +0 -333
  57. package/docs/build/classes/PackageInfo.html +0 -1390
  58. package/docs/build/classes/PackageInfoCache.html +0 -963
  59. package/docs/build/classes/PerBundleAddonCache {.html +0 -1010
  60. package/docs/build/classes/Project.html +0 -2083
  61. package/docs/build/classes/ServeFilesAddon.html +0 -260
  62. package/docs/build/classes/TestsServerAddon.html +0 -203
  63. package/docs/build/classes/WatcherAddon.html +0 -204
  64. package/docs/build/classes/WindowsSymlinkChecker.html +0 -1505
  65. package/docs/build/files/lib_broccoli_default-packager.js.html +0 -1426
  66. package/docs/build/files/lib_broccoli_ember-addon.js.html +0 -159
  67. package/docs/build/files/lib_broccoli_ember-app.js.html +0 -1913
  68. package/docs/build/files/lib_cli_cli.js.html +0 -417
  69. package/docs/build/files/lib_models_addon-info.js.html +0 -112
  70. package/docs/build/files/lib_models_addon.js.html +0 -1866
  71. package/docs/build/files/lib_models_blueprint.js.html +0 -1678
  72. package/docs/build/files/lib_models_builder.js.html +0 -417
  73. package/docs/build/files/lib_models_command.js.html +0 -804
  74. package/docs/build/files/lib_models_hardware-info.js.html +0 -479
  75. package/docs/build/files/lib_models_host-info-cache.js.html +0 -428
  76. package/docs/build/files/lib_models_installation-checker.js.html +0 -181
  77. package/docs/build/files/lib_models_instantiate-addons.js.html +0 -191
  78. package/docs/build/files/lib_models_instrumentation.js.html +0 -433
  79. package/docs/build/files/lib_models_package-info-cache_index.js.html +0 -793
  80. package/docs/build/files/lib_models_package-info-cache_node-modules-list.js.html +0 -208
  81. package/docs/build/files/lib_models_package-info-cache_package-info.js.html +0 -661
  82. package/docs/build/files/lib_models_per-bundle-addon-cache_addon-proxy.js.html +0 -252
  83. package/docs/build/files/lib_models_per-bundle-addon-cache_index.js.html +0 -485
  84. package/docs/build/files/lib_models_per-bundle-addon-cache_target-instance.js.html +0 -108
  85. package/docs/build/files/lib_models_project.js.html +0 -913
  86. package/docs/build/files/lib_models_task.js.html +0 -117
  87. package/docs/build/files/lib_tasks_build-watch.js.html +0 -157
  88. package/docs/build/files/lib_tasks_npm-task.js.html +0 -463
  89. package/docs/build/files/lib_tasks_serve.js.html +0 -207
  90. package/docs/build/files/lib_tasks_server_middleware_broccoli-serve-files_index.js.html +0 -127
  91. package/docs/build/files/lib_tasks_server_middleware_broccoli-watcher_index.js.html +0 -158
  92. package/docs/build/files/lib_tasks_server_middleware_history-support_index.js.html +0 -181
  93. package/docs/build/files/lib_tasks_server_middleware_tests-server_index.js.html +0 -171
  94. package/docs/build/files/lib_tasks_test-server.js.html +0 -167
  95. package/docs/build/files/lib_tasks_transforms_amd_index.js.html +0 -143
  96. package/docs/build/files/lib_utilities_ember-app-utils.js.html +0 -292
  97. package/docs/build/files/lib_utilities_insert-into-file.js.html +0 -219
  98. package/docs/build/files/lib_utilities_is-lazy-engine.js.html +0 -125
  99. package/docs/build/files/lib_utilities_is-yarn-project.js.html +0 -120
  100. package/docs/build/files/lib_utilities_valid-project-name.js.html +0 -142
  101. package/docs/build/files/lib_utilities_will-interrupt-process.js.html +0 -290
  102. package/docs/build/files/lib_utilities_windows-admin.js.html +0 -230
  103. package/docs/build/index.html +0 -125
  104. package/docs/build/modules/ember-cli.html +0 -152
  105. package/docs/build/modules/is-lazy-engine.html +0 -106
  106. package/docs/build-concurrency.md +0 -15
  107. package/docs/build-pipeline-debugging.md +0 -33
  108. package/docs/code-coverage.md +0 -14
  109. package/docs/error-propagation.md +0 -136
  110. package/docs/experiments.md +0 -53
  111. package/docs/node-support.md +0 -43
  112. package/docs/perf-guide.md +0 -250
  113. package/docs/project_version_preprocessor.js +0 -8
  114. package/docs/sourcemaps.md +0 -60
  115. package/docs/yuidoc.json +0 -13
@@ -1,290 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8">
5
- <title>lib/utilities/will-interrupt-process.js - 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
-
69
-
70
-
71
- <div class="version-info">
72
- Version: 4.0.0-release-b4cbb1029f
73
- </div>
74
-
75
- </div>
76
-
77
- <div id="main" class="yui3-u">
78
- <div class="content"><div class="title">
79
- <h1 class="file-name">lib/utilities/will-interrupt-process.js</h1>
80
- </div>
81
-
82
- <pre class="code prettyprint linenums">
83
- &#x27;use strict&#x27;;
84
-
85
- // Allows to setup process interruption handlers.
86
- // The process can be interrupted when ges SIGINT, SIGTERM signal,
87
- // something called process.exit(exitCode) or CTRL+C was pressed.
88
- //
89
- // Node.js doesn&#x27;t allow to perform async tasks when the process is exiting.
90
- // Also there are some work arounds for exit in the node.js ecosystem.
91
- //
92
- // In order to supply reliable process exit phase, &#x60;will-interrupt-process&#x60;
93
- // is tightly integrated with &#x60;capture-exit&#x60; which allows us to perform async cleanup
94
- // on &#x60;process.exit()&#x60; and control the final exit code.
95
-
96
- const captureExit = require(&#x27;capture-exit&#x27;);
97
- const EventEmitter = require(&#x27;events&#x27;);
98
-
99
- const handlers = [];
100
-
101
- let _process, _processCapturedLocation, windowsCtrlCTrap, originalIsRaw;
102
-
103
- module.exports = {
104
- capture(outerProcess) {
105
- if (_process) {
106
- throw new Error(&#x60;process already captured at: \n\n${_processCapturedLocation.stack}&#x60;);
107
- }
108
-
109
- if (outerProcess instanceof EventEmitter === false) {
110
- throw new Error(&#x27;attempt to capture bad process instance&#x27;);
111
- }
112
-
113
- _process = outerProcess;
114
- _processCapturedLocation = new Error();
115
-
116
- // ember-cli and user apps have many dependencies, many of which require
117
- // process.addListener(&#x27;exit&#x27;, ....) for cleanup, by default this limit for
118
- // such listeners is 10, recently users have been increasing this and not to
119
- // their fault, rather they are including large and more diverse sets of
120
- // node_modules.
121
- //
122
- // https://github.com/babel/ember-cli-babel/issues/76
123
- _process.setMaxListeners(1000);
124
-
125
- // work around misbehaving libraries, so we can correctly cleanup before actually exiting.
126
- captureExit.captureExit();
127
- },
128
-
129
- /**
130
- * Drops all the interruption handlers and disables an ability to add new one
131
- *
132
- * Note: We don&#x27;t call &#x60;captureExit.releaseExit() here.
133
- * In some rare scenarios it can lead to the hard to debug issues.
134
- * see: https://github.com/ember-cli/ember-cli/issues/6779#issuecomment-280940358
135
- *
136
- * We can more or less feel comfortable with a captured exit because it behaves very
137
- * similar to the original &#x60;exit&#x60; except of cases when we need to do cleanup before exit.
138
- *
139
- * @private
140
- * @method release
141
- */
142
- release() {
143
- while (handlers.length &gt; 0) {
144
- this.removeHandler(handlers[0]);
145
- }
146
-
147
- _process = null;
148
- _processCapturedLocation = null;
149
- },
150
-
151
- /**
152
- * Add process interruption handler
153
- *
154
- * When the first handler is added then automatically
155
- * sets up process interruption signals listeners
156
- *
157
- * @private
158
- * @method addHandler
159
- * @param {function} cb Callback to be called when process interruption fired
160
- */
161
- addHandler(cb) {
162
- if (!_process) {
163
- throw new Error(&#x27;process is not captured&#x27;);
164
- }
165
-
166
- let index = handlers.indexOf(cb);
167
- if (index &gt; -1) {
168
- return;
169
- }
170
-
171
- if (handlers.length === 0) {
172
- setupSignalsTrap();
173
- }
174
-
175
- handlers.push(cb);
176
- captureExit.onExit(cb);
177
- },
178
-
179
- /**
180
- * Remove process interruption handler
181
- *
182
- * If there are no remaining handlers after removal
183
- * then clean up all the process interruption signal listeners
184
- *
185
- * @private
186
- * @method removeHandler
187
- * @param {function} cb Callback to be removed
188
- */
189
- removeHandler(cb) {
190
- let index = handlers.indexOf(cb);
191
- if (index &lt; 0) {
192
- return;
193
- }
194
-
195
- handlers.splice(index, 1);
196
- captureExit.offExit(cb);
197
-
198
- if (handlers.length === 0) {
199
- teardownSignalsTrap();
200
- }
201
- },
202
- };
203
-
204
- /**
205
- * Sets up listeners for interruption signals
206
- *
207
- * When one of these signals is caught than raise process.exit()
208
- * which enforces &#x60;capture-exit&#x60; to run registered interruption handlers
209
- *
210
- * @method setupSignalsTrap
211
- */
212
- function setupSignalsTrap() {
213
- _process.on(&#x27;SIGINT&#x27;, exit);
214
- _process.on(&#x27;SIGTERM&#x27;, exit);
215
- _process.on(&#x27;message&#x27;, onMessage);
216
-
217
- if (isWindowsTTY(_process)) {
218
- trapWindowsSignals(_process);
219
- }
220
- }
221
-
222
- /**
223
- * Removes interruption signal listeners and tears down capture-exit
224
- *
225
- * @method teardownSignalsTrap
226
- */
227
- function teardownSignalsTrap() {
228
- _process.removeListener(&#x27;SIGINT&#x27;, exit);
229
- _process.removeListener(&#x27;SIGTERM&#x27;, exit);
230
- _process.removeListener(&#x27;message&#x27;, onMessage);
231
-
232
- if (isWindowsTTY(_process)) {
233
- cleanupWindowsSignals(_process);
234
- }
235
- }
236
-
237
- /**
238
- * Suppresses &quot;Terminate batch job (Y/N)&quot; confirmation on Windows
239
- *
240
- * @method trapWindowsSignals
241
- */
242
- function trapWindowsSignals(_process) {
243
- const stdin = _process.stdin;
244
-
245
- originalIsRaw = stdin.isRaw;
246
-
247
- // This is required to capture Ctrl + C on Windows
248
- stdin.setRawMode(true);
249
-
250
- windowsCtrlCTrap = function (data) {
251
- if (data.length === 1 &amp;&amp; data[0] === 0x03) {
252
- _process.emit(&#x27;SIGINT&#x27;);
253
- }
254
- };
255
- stdin.on(&#x27;data&#x27;, windowsCtrlCTrap);
256
- }
257
-
258
- function cleanupWindowsSignals(_process) {
259
- const stdin = _process.stdin;
260
-
261
- stdin.setRawMode(originalIsRaw);
262
-
263
- stdin.removeListener(&#x27;data&#x27;, windowsCtrlCTrap);
264
- }
265
-
266
- function isWindowsTTY(_process) {
267
- return /^win/.test(_process.platform) &amp;&amp; _process.stdin &amp;&amp; _process.stdin.isTTY;
268
- }
269
-
270
- function exit() {
271
- _process.exit();
272
- }
273
-
274
- function onMessage(message) {
275
- if (message.kill) {
276
- exit();
277
- }
278
- }
279
-
280
- </pre>
281
-
282
- </div>
283
- </div>
284
- </div>
285
- </div>
286
- <script src="../assets/vendor/prettify/prettify-min.js"></script>
287
- <script>prettyPrint();</script>
288
- <script src="../assets/js/yui-prettify.js"></script>
289
- </body>
290
- </html>
@@ -1,230 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8">
5
- <title>lib/utilities/windows-admin.js - 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
-
69
-
70
-
71
- <div class="version-info">
72
- Version: 4.0.0-release-b4cbb1029f
73
- </div>
74
-
75
- </div>
76
-
77
- <div id="main" class="yui3-u">
78
- <div class="content"><div class="title">
79
- <h1 class="file-name">lib/utilities/windows-admin.js</h1>
80
- </div>
81
-
82
- <pre class="code prettyprint linenums">
83
- &#x27;use strict&#x27;;
84
-
85
- const chalk = require(&#x27;chalk&#x27;);
86
-
87
- class WindowsSymlinkChecker {
88
- /**
89
- *
90
- * On Windows, users will have a much better experience if symlinks are enabled
91
- * and usable. When queried, this object informs Windows users regarding
92
- * improving their build performance, and how.
93
- *
94
- * &gt; Windows Vista: nothing we can really do, so we fall back to junctions for folders + copying of files
95
- * &lt;= Windows Vista: symlinks are available but using them is somewhat tricky
96
- * * if the user is an admin, the process needs to have been started with elevated privileges
97
- * * if the user is not an admin, a specific setting needs to be enabled
98
- * &lt;= Windows 10
99
- * * if developer mode is enabled, symlinks &quot;just work&quot;
100
- * * https://blogs.windows.com/buildingapps/2016/12/02/symlinks-windows-10
101
- *
102
- * &#x60;&#x60;&#x60;js
103
- * let checker = WindowsSymlinkChecker;
104
- * let {
105
- * windows,
106
- * elevated
107
- * } = await = checker.checkIfSymlinksNeedToBeEnabled(); // aslso emits helpful warnings
108
- * &#x60;&#x60;&#x60;
109
- *
110
- * @public
111
- * @class WindowsSymlinkChecker
112
- */
113
- constructor(ui, isWindows, canSymlink, exec) {
114
- this.ui = ui;
115
- this.isWindows = isWindows;
116
- this.canSymlink = canSymlink;
117
- this.exec = exec;
118
- }
119
-
120
- /**
121
- *
122
- * if not windows, will fulfill with:
123
- * &#x60;{ windows: false, elevated: null)&#x60;
124
- *
125
- * if windows, and elevated will fulfill with:
126
- * &#x60;{ windows: false, elevated: true)&#x60;
127
- *
128
- * if windows, and is NOT elevated will fulfill with:
129
- * &#x60;{ windows: false, elevated: false)&#x60;
130
- *
131
- * will include heplful warning, so that users know (if possible) how to
132
- * achieve better windows build performance
133
- *
134
- * @public
135
- * @method checkIfSymlinksNeedToBeEnabled
136
- * @return {Promise&lt;Object&gt;} Object describing whether we&#x27;re on windows and if admin rights exist
137
- */
138
- static checkIfSymlinksNeedToBeEnabled(ui) {
139
- return this._setup(ui).checkIfSymlinksNeedToBeEnabled();
140
- }
141
-
142
- /**
143
- * sets up a WindowsSymlinkChecker
144
- *
145
- * providing it with defaults for:
146
- *
147
- * * if we are on windows
148
- * * if we can symlink
149
- * * a reference to exec
150
- *
151
- * @private
152
- * @method _setup
153
- * @param UI {UI}
154
- * @return {WindowsSymlinkChecker}
155
- */
156
- static _setup(ui) {
157
- const exec = require(&#x27;child_process&#x27;).exec;
158
- const symlinkOrCopy = require(&#x27;symlink-or-copy&#x27;);
159
-
160
- return new WindowsSymlinkChecker(ui, /^win/.test(process.platform), symlinkOrCopy.canSymlink, exec);
161
- }
162
-
163
- /**
164
- * @public
165
- * @method checkIfSymlinksNeedToBeEnabled
166
- * @return {Promise&lt;Object&gt;} Object describing whether we&#x27;re on windows and if admin rights exist
167
- */
168
- checkIfSymlinksNeedToBeEnabled() {
169
- return new Promise((resolve) =&gt; {
170
- if (!this.isWindows) {
171
- resolve({
172
- windows: false,
173
- elevated: null,
174
- });
175
- } else if (this.canSymlink) {
176
- resolve({
177
- windows: true,
178
- elevated: null,
179
- });
180
- } else {
181
- resolve(this._checkForElevatedRights(this.ui));
182
- }
183
- });
184
- }
185
-
186
- /**
187
- *
188
- * Uses the eon-old command NET SESSION to determine whether or not the
189
- * current user has elevated rights (think sudo, but Windows).
190
- *
191
- * @private
192
- * @method _checkForElevatedRights
193
- * @param {Object} ui - ui object used to call writeLine();
194
- * @return {Object} Object describing whether we&#x27;re on windows and if admin rights exist
195
- */
196
- _checkForElevatedRights() {
197
- let ui = this.ui;
198
- let exec = this.exec;
199
-
200
- return new Promise((resolve) =&gt; {
201
- exec(&#x27;NET SESSION&#x27;, (error, stdout, stderr) =&gt; {
202
- let elevated = !stderr || stderr.length === 0;
203
-
204
- if (!elevated) {
205
- ui.writeLine(chalk.yellow(&#x27;\nRunning without permission to symlink will degrade build performance.&#x27;));
206
- ui.writeLine(&#x27;See https://cli.emberjs.com/release/appendix/windows/ for details.\n&#x27;);
207
- }
208
-
209
- resolve({
210
- windows: true,
211
- elevated,
212
- });
213
- });
214
- });
215
- }
216
- }
217
-
218
- module.exports = WindowsSymlinkChecker;
219
-
220
- </pre>
221
-
222
- </div>
223
- </div>
224
- </div>
225
- </div>
226
- <script src="../assets/vendor/prettify/prettify-min.js"></script>
227
- <script>prettyPrint();</script>
228
- <script src="../assets/js/yui-prettify.js"></script>
229
- </body>
230
- </html>
@@ -1,125 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8">
5
- <title>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
-
69
-
70
-
71
- <div class="version-info">
72
- Version: 4.0.0-release-b4cbb1029f
73
- </div>
74
-
75
- </div>
76
-
77
- <div id="main" class="yui3-u">
78
- <div class="content"><h1>ember-cli</h1>
79
- <p><a href="https://www.npmjs.com/package/ember-cli"><img src="https://img.shields.io/npm/v/ember-cli.svg" alt="Latest npm release"></a>
80
- <a href="https://github.com/ember-cli/ember-cli/actions?query=workflow%3ACI"><img src="https://github.com/ember-cli/ember-cli/workflows/CI/badge.svg" alt="GitHub Actions CI"></a>
81
- <a href="https://coveralls.io/github/ember-cli/ember-cli"><img src="https://img.shields.io/coveralls/ember-cli/ember-cli/master.svg" alt="Test Coverage"></a>
82
- <a href="https://codeclimate.com/github/ember-cli/ember-cli"><img src="https://codeclimate.com/github/ember-cli/ember-cli/badges/gpa.svg" alt="Code Climate"></a></p>
83
- <p>The Ember.js command line utility.</p>
84
- <h2>Features</h2>
85
- <ul>
86
- <li>Asset build pipeline using <a href="https://broccoli.build/">Broccoli.js</a></li>
87
- <li>ES6 transpilation using <a href="https://babeljs.io/">Babel</a></li>
88
- <li>Project structure conventions using ES6 module syntax</li>
89
- <li>Development server including live-reload and API proxy</li>
90
- <li>File/Project generator using blueprints</li>
91
- <li>Unit, Integration and Acceptance test support using
92
- <a href="https://github.com/testem/testem">Testem</a></li>
93
- <li>Powerful addon system for extensibility</li>
94
- </ul>
95
- <h2>Installation</h2>
96
- <pre><code>npm install -g ember-cli
97
- </code></pre>
98
- <h2>Usage</h2>
99
- <p>After installation the <code>ember</code> CLI tool will be available to you. It is the
100
- entrypoint for all the functionality mentioned above.</p>
101
- <p>You can call <code>ember &lt;command&gt; --help</code> to find out more about <a href="https://cli.emberjs.com/release/basic-use/cli-commands/">all of the
102
- following commands</a> or visit <a href="https://cli.emberjs.com/release/">https://cli.emberjs.com/release/</a> to read
103
- the in-depth documentation.</p>
104
- <h2>Documentation</h2>
105
- <p>Please refer to the <a href="https://cli.emberjs.com/release/">CLI guides</a> for help using Ember CLI.</p>
106
- <h2>Contributing</h2>
107
- <p>Please see the <a href="https://github.com/ember-cli/ember-cli/blob/master/CONTRIBUTING.md">contributing guidelines</a></p>
108
- <h2>Community</h2>
109
- <ul>
110
- <li>Discord: <a href="https://discord.gg/emberjs">Get your invite</a></li>
111
- <li>Issues: <a href="https://github.com/ember-cli/ember-cli/issues">ember-cli/issues</a></li>
112
- <li>Documentation: <a href="https://cli.emberjs.com/release/">ember-cli.com</a></li>
113
- </ul>
114
- <h2>License</h2>
115
- <p>This project is licensed under the <a href="LICENSE">MIT License</a>.</p>
116
-
117
- </div>
118
- </div>
119
- </div>
120
- </div>
121
- <script src="./assets/vendor/prettify/prettify-min.js"></script>
122
- <script>prettyPrint();</script>
123
- <script src="./assets/js/yui-prettify.js"></script>
124
- </body>
125
- </html>