@openedx/frontend-build 12.10.0-alpha.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.
- package/.eslintignore +5 -0
- package/.eslintrc.js +10 -0
- package/.github/workflows/add-depr-ticket-to-depr-board.yml +19 -0
- package/.github/workflows/add-remove-label-on-comment.yml +20 -0
- package/.github/workflows/ci.yml +30 -0
- package/.github/workflows/commitlint.yml +20 -0
- package/.github/workflows/lockfileversion-check.yml +13 -0
- package/.github/workflows/release.yml +34 -0
- package/.github/workflows/self-assign-issue.yml +12 -0
- package/.github/workflows/sync-master-alpha.yml +35 -0
- package/.nvmrc +1 -0
- package/LICENSE +661 -0
- package/README.md +314 -0
- package/bin/fedx-scripts.js +88 -0
- package/config/.eslintrc.js +46 -0
- package/config/babel-preserve-modules.config.js +30 -0
- package/config/babel-typescript.config.js +5 -0
- package/config/babel.config.js +41 -0
- package/config/getLocalAliases.js +67 -0
- package/config/jest/fallback.env.config.js +12 -0
- package/config/jest/fileMock.js +1 -0
- package/config/jest/setupTest.js +10 -0
- package/config/jest/svgrMock.js +4 -0
- package/config/jest.config.js +45 -0
- package/config/webpack.common.config.js +40 -0
- package/config/webpack.dev-stage.config.js +191 -0
- package/config/webpack.dev.config.js +193 -0
- package/config/webpack.prod.config.js +219 -0
- package/coverage/clover.xml +6 -0
- package/coverage/coverage-final.json +1 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +101 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +196 -0
- package/coverage/lcov.info +0 -0
- package/docs/0001-non-usage-of-gatsby.rst +37 -0
- package/docs/0002-js-environment-config.md +47 -0
- package/docs/0003-fedx-scripts-serve.md +37 -0
- package/example/.env +0 -0
- package/example/.env.development +3 -0
- package/example/.env.test +2 -0
- package/example/.eslintignore +5 -0
- package/example/.eslintrc.js +3 -0
- package/example/dist/1382e1cbf8d733d7301cdd212192bfea.jpg +0 -0
- package/example/dist/6.4a131009e103f9d0c995.js +3 -0
- package/example/dist/6.4a131009e103f9d0c995.js.LICENSE.txt +41 -0
- package/example/dist/6.4a131009e103f9d0c995.js.map +1 -0
- package/example/dist/app.04e87df21a6686d7d2a5.css +3 -0
- package/example/dist/app.04e87df21a6686d7d2a5.css.map +1 -0
- package/example/dist/app.04e87df21a6686d7d2a5.js +2 -0
- package/example/dist/app.04e87df21a6686d7d2a5.js.map +1 -0
- package/example/dist/babel/App.js +94 -0
- package/example/dist/babel/App.js.map +1 -0
- package/example/dist/babel/App.test.jsx +11 -0
- package/example/dist/babel/Image.tsx +16 -0
- package/example/dist/babel/__snapshots__/App.test.jsx.snap +120 -0
- package/example/dist/babel/apple.jpg +0 -0
- package/example/dist/babel/apple.svg +1 -0
- package/example/dist/babel/index.js +13 -0
- package/example/dist/babel/index.js.map +1 -0
- package/example/dist/babel/style.scss +9 -0
- package/example/dist/cb28cdb1468c915e27e5cec9af64f22f.svg +1 -0
- package/example/dist/index.html +4 -0
- package/example/dist/report.html +39 -0
- package/example/dist/runtime.a27e316c40c13d63555d.js +2 -0
- package/example/dist/runtime.a27e316c40c13d63555d.js.map +1 -0
- package/example/env.config.js +6 -0
- package/example/node_modules/.package-lock.json +98 -0
- package/example/node_modules/js-tokens/CHANGELOG.md +151 -0
- package/example/node_modules/js-tokens/LICENSE +21 -0
- package/example/node_modules/js-tokens/README.md +240 -0
- package/example/node_modules/js-tokens/index.js +23 -0
- package/example/node_modules/js-tokens/package.json +30 -0
- package/example/node_modules/loose-envify/LICENSE +21 -0
- package/example/node_modules/loose-envify/README.md +45 -0
- package/example/node_modules/loose-envify/cli.js +16 -0
- package/example/node_modules/loose-envify/custom.js +4 -0
- package/example/node_modules/loose-envify/index.js +3 -0
- package/example/node_modules/loose-envify/loose-envify.js +36 -0
- package/example/node_modules/loose-envify/package.json +36 -0
- package/example/node_modules/loose-envify/replace.js +65 -0
- package/example/node_modules/object-assign/index.js +90 -0
- package/example/node_modules/object-assign/license +21 -0
- package/example/node_modules/object-assign/package.json +42 -0
- package/example/node_modules/object-assign/readme.md +61 -0
- package/example/node_modules/prop-types/LICENSE +21 -0
- package/example/node_modules/prop-types/README.md +302 -0
- package/example/node_modules/prop-types/checkPropTypes.js +103 -0
- package/example/node_modules/prop-types/factory.js +19 -0
- package/example/node_modules/prop-types/factoryWithThrowingShims.js +65 -0
- package/example/node_modules/prop-types/factoryWithTypeCheckers.js +610 -0
- package/example/node_modules/prop-types/index.js +19 -0
- package/example/node_modules/prop-types/lib/ReactPropTypesSecret.js +12 -0
- package/example/node_modules/prop-types/lib/has.js +1 -0
- package/example/node_modules/prop-types/package.json +60 -0
- package/example/node_modules/prop-types/prop-types.js +1315 -0
- package/example/node_modules/prop-types/prop-types.min.js +1 -0
- package/example/node_modules/react/LICENSE +21 -0
- package/example/node_modules/react/README.md +13 -0
- package/example/node_modules/react/build-info.json +8 -0
- package/example/node_modules/react/cjs/react-jsx-dev-runtime.development.js +889 -0
- package/example/node_modules/react/cjs/react-jsx-dev-runtime.production.min.js +9 -0
- package/example/node_modules/react/cjs/react-jsx-runtime.development.js +911 -0
- package/example/node_modules/react/cjs/react-jsx-runtime.production.min.js +10 -0
- package/example/node_modules/react/cjs/react.development.js +1912 -0
- package/example/node_modules/react/cjs/react.production.min.js +25 -0
- package/example/node_modules/react/index.js +7 -0
- package/example/node_modules/react/jsx-dev-runtime.js +7 -0
- package/example/node_modules/react/jsx-runtime.js +7 -0
- package/example/node_modules/react/package.json +44 -0
- package/example/node_modules/react/umd/react.development.js +3318 -0
- package/example/node_modules/react/umd/react.production.min.js +32 -0
- package/example/node_modules/react/umd/react.profiling.min.js +39 -0
- package/example/node_modules/react-dom/LICENSE +21 -0
- package/example/node_modules/react-dom/README.md +54 -0
- package/example/node_modules/react-dom/build-info.json +8 -0
- package/example/node_modules/react-dom/cjs/react-dom-server.browser.development.js +4043 -0
- package/example/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js +54 -0
- package/example/node_modules/react-dom/cjs/react-dom-server.node.development.js +4085 -0
- package/example/node_modules/react-dom/cjs/react-dom-server.node.production.min.js +55 -0
- package/example/node_modules/react-dom/cjs/react-dom-test-utils.development.js +1480 -0
- package/example/node_modules/react-dom/cjs/react-dom-test-utils.production.min.js +35 -0
- package/example/node_modules/react-dom/cjs/react-dom-unstable-fizz.browser.development.js +141 -0
- package/example/node_modules/react-dom/cjs/react-dom-unstable-fizz.browser.production.min.js +11 -0
- package/example/node_modules/react-dom/cjs/react-dom-unstable-fizz.node.development.js +162 -0
- package/example/node_modules/react-dom/cjs/react-dom-unstable-fizz.node.production.min.js +12 -0
- package/example/node_modules/react-dom/cjs/react-dom-unstable-native-dependencies.development.js +1629 -0
- package/example/node_modules/react-dom/cjs/react-dom-unstable-native-dependencies.production.min.js +31 -0
- package/example/node_modules/react-dom/cjs/react-dom.development.js +25012 -0
- package/example/node_modules/react-dom/cjs/react-dom.production.min.js +292 -0
- package/example/node_modules/react-dom/cjs/react-dom.profiling.min.js +299 -0
- package/example/node_modules/react-dom/index.js +38 -0
- package/example/node_modules/react-dom/package.json +60 -0
- package/example/node_modules/react-dom/profiling.js +38 -0
- package/example/node_modules/react-dom/server.browser.js +7 -0
- package/example/node_modules/react-dom/server.js +3 -0
- package/example/node_modules/react-dom/server.node.js +7 -0
- package/example/node_modules/react-dom/test-utils.js +7 -0
- package/example/node_modules/react-dom/umd/react-dom-server.browser.development.js +4147 -0
- package/example/node_modules/react-dom/umd/react-dom-server.browser.production.min.js +45 -0
- package/example/node_modules/react-dom/umd/react-dom-test-utils.development.js +1499 -0
- package/example/node_modules/react-dom/umd/react-dom-test-utils.production.min.js +30 -0
- package/example/node_modules/react-dom/umd/react-dom-unstable-fizz.browser.development.js +141 -0
- package/example/node_modules/react-dom/umd/react-dom-unstable-fizz.browser.production.min.js +10 -0
- package/example/node_modules/react-dom/umd/react-dom-unstable-native-dependencies.development.js +1628 -0
- package/example/node_modules/react-dom/umd/react-dom-unstable-native-dependencies.production.min.js +28 -0
- package/example/node_modules/react-dom/umd/react-dom.development.js +25147 -0
- package/example/node_modules/react-dom/umd/react-dom.production.min.js +239 -0
- package/example/node_modules/react-dom/umd/react-dom.profiling.min.js +247 -0
- package/example/node_modules/react-dom/unstable-fizz.browser.js +7 -0
- package/example/node_modules/react-dom/unstable-fizz.js +3 -0
- package/example/node_modules/react-dom/unstable-fizz.node.js +7 -0
- package/example/node_modules/react-dom/unstable-native-dependencies.js +7 -0
- package/example/node_modules/react-is/LICENSE +21 -0
- package/example/node_modules/react-is/README.md +104 -0
- package/example/node_modules/react-is/build-info.json +8 -0
- package/example/node_modules/react-is/cjs/react-is.development.js +181 -0
- package/example/node_modules/react-is/cjs/react-is.production.min.js +15 -0
- package/example/node_modules/react-is/index.js +7 -0
- package/example/node_modules/react-is/package.json +27 -0
- package/example/node_modules/react-is/umd/react-is.development.js +181 -0
- package/example/node_modules/react-is/umd/react-is.production.min.js +13 -0
- package/example/node_modules/react-test-renderer/LICENSE +21 -0
- package/example/node_modules/react-test-renderer/README.md +26 -0
- package/example/node_modules/react-test-renderer/build-info.json +8 -0
- package/example/node_modules/react-test-renderer/cjs/react-test-renderer-shallow.development.js +1019 -0
- package/example/node_modules/react-test-renderer/cjs/react-test-renderer-shallow.production.min.js +35 -0
- package/example/node_modules/react-test-renderer/cjs/react-test-renderer.development.js +15596 -0
- package/example/node_modules/react-test-renderer/cjs/react-test-renderer.production.min.js +181 -0
- package/example/node_modules/react-test-renderer/index.js +7 -0
- package/example/node_modules/react-test-renderer/package.json +41 -0
- package/example/node_modules/react-test-renderer/shallow.js +7 -0
- package/example/node_modules/react-test-renderer/umd/react-test-renderer-shallow.development.js +1176 -0
- package/example/node_modules/react-test-renderer/umd/react-test-renderer-shallow.production.min.js +31 -0
- package/example/node_modules/react-test-renderer/umd/react-test-renderer.development.js +15709 -0
- package/example/node_modules/react-test-renderer/umd/react-test-renderer.production.min.js +151 -0
- package/example/node_modules/scheduler/LICENSE +21 -0
- package/example/node_modules/scheduler/README.md +9 -0
- package/example/node_modules/scheduler/build-info.json +8 -0
- package/example/node_modules/scheduler/cjs/scheduler-tracing.development.js +349 -0
- package/example/node_modules/scheduler/cjs/scheduler-tracing.production.min.js +10 -0
- package/example/node_modules/scheduler/cjs/scheduler-tracing.profiling.min.js +17 -0
- package/example/node_modules/scheduler/cjs/scheduler-unstable_mock.development.js +857 -0
- package/example/node_modules/scheduler/cjs/scheduler-unstable_mock.production.min.js +20 -0
- package/example/node_modules/scheduler/cjs/scheduler.development.js +858 -0
- package/example/node_modules/scheduler/cjs/scheduler.production.min.js +21 -0
- package/example/node_modules/scheduler/index.js +7 -0
- package/example/node_modules/scheduler/package.json +39 -0
- package/example/node_modules/scheduler/tracing-profiling.js +7 -0
- package/example/node_modules/scheduler/tracing.js +7 -0
- package/example/node_modules/scheduler/umd/scheduler-tracing.development.js +80 -0
- package/example/node_modules/scheduler/umd/scheduler-tracing.production.min.js +80 -0
- package/example/node_modules/scheduler/umd/scheduler-tracing.profiling.min.js +80 -0
- package/example/node_modules/scheduler/umd/scheduler-unstable_mock.development.js +857 -0
- package/example/node_modules/scheduler/umd/scheduler-unstable_mock.production.min.js +17 -0
- package/example/node_modules/scheduler/umd/scheduler.development.js +152 -0
- package/example/node_modules/scheduler/umd/scheduler.production.min.js +146 -0
- package/example/node_modules/scheduler/umd/scheduler.profiling.min.js +146 -0
- package/example/node_modules/scheduler/unstable_mock.js +7 -0
- package/example/package-lock.json +110 -0
- package/example/package.json +24 -0
- package/example/public/index.html +13 -0
- package/example/src/App.jsx +43 -0
- package/example/src/App.test.jsx +11 -0
- package/example/src/Image.tsx +16 -0
- package/example/src/__snapshots__/App.test.jsx.snap +120 -0
- package/example/src/apple.jpg +0 -0
- package/example/src/apple.svg +1 -0
- package/example/src/index.jsx +13 -0
- package/example/src/style.scss +9 -0
- package/example/tsconfig.json +16 -0
- package/index.js +7 -0
- package/lib/ConfigPreset.js +28 -0
- package/lib/createConfig.js +7 -0
- package/lib/formatter.js +10 -0
- package/lib/getBaseConfig.js +9 -0
- package/lib/plugins/html-webpack-new-relic-plugin/HtmlWebpackNewRelicPlugin.js +86 -0
- package/lib/plugins/html-webpack-new-relic-plugin/LICENSE +21 -0
- package/lib/plugins/html-webpack-new-relic-plugin/README.md +7 -0
- package/lib/plugins/html-webpack-new-relic-plugin/index.js +3 -0
- package/lib/plugins/html-webpack-new-relic-plugin/test/HtmlWebpackNewRelicPlugin.test.js +80 -0
- package/lib/plugins/html-webpack-new-relic-plugin/test/fixtures/entry.js +1 -0
- package/lib/presets.js +75 -0
- package/lib/resolveFilepaths.js +14 -0
- package/lib/resolvePrivateEnvConfig.js +15 -0
- package/lib/scripts/serve.js +78 -0
- package/openedx.yaml +10 -0
- package/package.json +101 -0
- package/renovate.json +22 -0
- package/smoke-test.sh +11 -0
- package/tsconfig.json +22 -0
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
/** @license React v0.19.1
|
|
2
|
+
* scheduler-tracing.development.js
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the MIT license found in the
|
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
'use strict';
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
if (process.env.NODE_ENV !== "production") {
|
|
15
|
+
(function() {
|
|
16
|
+
'use strict';
|
|
17
|
+
|
|
18
|
+
var DEFAULT_THREAD_ID = 0; // Counters used to generate unique IDs.
|
|
19
|
+
|
|
20
|
+
var interactionIDCounter = 0;
|
|
21
|
+
var threadIDCounter = 0; // Set of currently traced interactions.
|
|
22
|
+
// Interactions "stack"–
|
|
23
|
+
// Meaning that newly traced interactions are appended to the previously active set.
|
|
24
|
+
// When an interaction goes out of scope, the previous set (if any) is restored.
|
|
25
|
+
|
|
26
|
+
exports.__interactionsRef = null; // Listener(s) to notify when interactions begin and end.
|
|
27
|
+
|
|
28
|
+
exports.__subscriberRef = null;
|
|
29
|
+
|
|
30
|
+
{
|
|
31
|
+
exports.__interactionsRef = {
|
|
32
|
+
current: new Set()
|
|
33
|
+
};
|
|
34
|
+
exports.__subscriberRef = {
|
|
35
|
+
current: null
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
function unstable_clear(callback) {
|
|
39
|
+
|
|
40
|
+
var prevInteractions = exports.__interactionsRef.current;
|
|
41
|
+
exports.__interactionsRef.current = new Set();
|
|
42
|
+
|
|
43
|
+
try {
|
|
44
|
+
return callback();
|
|
45
|
+
} finally {
|
|
46
|
+
exports.__interactionsRef.current = prevInteractions;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
function unstable_getCurrent() {
|
|
50
|
+
{
|
|
51
|
+
return exports.__interactionsRef.current;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
function unstable_getThreadID() {
|
|
55
|
+
return ++threadIDCounter;
|
|
56
|
+
}
|
|
57
|
+
function unstable_trace(name, timestamp, callback) {
|
|
58
|
+
var threadID = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : DEFAULT_THREAD_ID;
|
|
59
|
+
|
|
60
|
+
var interaction = {
|
|
61
|
+
__count: 1,
|
|
62
|
+
id: interactionIDCounter++,
|
|
63
|
+
name: name,
|
|
64
|
+
timestamp: timestamp
|
|
65
|
+
};
|
|
66
|
+
var prevInteractions = exports.__interactionsRef.current; // Traced interactions should stack/accumulate.
|
|
67
|
+
// To do that, clone the current interactions.
|
|
68
|
+
// The previous set will be restored upon completion.
|
|
69
|
+
|
|
70
|
+
var interactions = new Set(prevInteractions);
|
|
71
|
+
interactions.add(interaction);
|
|
72
|
+
exports.__interactionsRef.current = interactions;
|
|
73
|
+
var subscriber = exports.__subscriberRef.current;
|
|
74
|
+
var returnValue;
|
|
75
|
+
|
|
76
|
+
try {
|
|
77
|
+
if (subscriber !== null) {
|
|
78
|
+
subscriber.onInteractionTraced(interaction);
|
|
79
|
+
}
|
|
80
|
+
} finally {
|
|
81
|
+
try {
|
|
82
|
+
if (subscriber !== null) {
|
|
83
|
+
subscriber.onWorkStarted(interactions, threadID);
|
|
84
|
+
}
|
|
85
|
+
} finally {
|
|
86
|
+
try {
|
|
87
|
+
returnValue = callback();
|
|
88
|
+
} finally {
|
|
89
|
+
exports.__interactionsRef.current = prevInteractions;
|
|
90
|
+
|
|
91
|
+
try {
|
|
92
|
+
if (subscriber !== null) {
|
|
93
|
+
subscriber.onWorkStopped(interactions, threadID);
|
|
94
|
+
}
|
|
95
|
+
} finally {
|
|
96
|
+
interaction.__count--; // If no async work was scheduled for this interaction,
|
|
97
|
+
// Notify subscribers that it's completed.
|
|
98
|
+
|
|
99
|
+
if (subscriber !== null && interaction.__count === 0) {
|
|
100
|
+
subscriber.onInteractionScheduledWorkCompleted(interaction);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
return returnValue;
|
|
108
|
+
}
|
|
109
|
+
function unstable_wrap(callback) {
|
|
110
|
+
var threadID = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_THREAD_ID;
|
|
111
|
+
|
|
112
|
+
var wrappedInteractions = exports.__interactionsRef.current;
|
|
113
|
+
var subscriber = exports.__subscriberRef.current;
|
|
114
|
+
|
|
115
|
+
if (subscriber !== null) {
|
|
116
|
+
subscriber.onWorkScheduled(wrappedInteractions, threadID);
|
|
117
|
+
} // Update the pending async work count for the current interactions.
|
|
118
|
+
// Update after calling subscribers in case of error.
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
wrappedInteractions.forEach(function (interaction) {
|
|
122
|
+
interaction.__count++;
|
|
123
|
+
});
|
|
124
|
+
var hasRun = false;
|
|
125
|
+
|
|
126
|
+
function wrapped() {
|
|
127
|
+
var prevInteractions = exports.__interactionsRef.current;
|
|
128
|
+
exports.__interactionsRef.current = wrappedInteractions;
|
|
129
|
+
subscriber = exports.__subscriberRef.current;
|
|
130
|
+
|
|
131
|
+
try {
|
|
132
|
+
var returnValue;
|
|
133
|
+
|
|
134
|
+
try {
|
|
135
|
+
if (subscriber !== null) {
|
|
136
|
+
subscriber.onWorkStarted(wrappedInteractions, threadID);
|
|
137
|
+
}
|
|
138
|
+
} finally {
|
|
139
|
+
try {
|
|
140
|
+
returnValue = callback.apply(undefined, arguments);
|
|
141
|
+
} finally {
|
|
142
|
+
exports.__interactionsRef.current = prevInteractions;
|
|
143
|
+
|
|
144
|
+
if (subscriber !== null) {
|
|
145
|
+
subscriber.onWorkStopped(wrappedInteractions, threadID);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
return returnValue;
|
|
151
|
+
} finally {
|
|
152
|
+
if (!hasRun) {
|
|
153
|
+
// We only expect a wrapped function to be executed once,
|
|
154
|
+
// But in the event that it's executed more than once–
|
|
155
|
+
// Only decrement the outstanding interaction counts once.
|
|
156
|
+
hasRun = true; // Update pending async counts for all wrapped interactions.
|
|
157
|
+
// If this was the last scheduled async work for any of them,
|
|
158
|
+
// Mark them as completed.
|
|
159
|
+
|
|
160
|
+
wrappedInteractions.forEach(function (interaction) {
|
|
161
|
+
interaction.__count--;
|
|
162
|
+
|
|
163
|
+
if (subscriber !== null && interaction.__count === 0) {
|
|
164
|
+
subscriber.onInteractionScheduledWorkCompleted(interaction);
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
wrapped.cancel = function cancel() {
|
|
172
|
+
subscriber = exports.__subscriberRef.current;
|
|
173
|
+
|
|
174
|
+
try {
|
|
175
|
+
if (subscriber !== null) {
|
|
176
|
+
subscriber.onWorkCanceled(wrappedInteractions, threadID);
|
|
177
|
+
}
|
|
178
|
+
} finally {
|
|
179
|
+
// Update pending async counts for all wrapped interactions.
|
|
180
|
+
// If this was the last scheduled async work for any of them,
|
|
181
|
+
// Mark them as completed.
|
|
182
|
+
wrappedInteractions.forEach(function (interaction) {
|
|
183
|
+
interaction.__count--;
|
|
184
|
+
|
|
185
|
+
if (subscriber && interaction.__count === 0) {
|
|
186
|
+
subscriber.onInteractionScheduledWorkCompleted(interaction);
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
return wrapped;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
var subscribers = null;
|
|
196
|
+
|
|
197
|
+
{
|
|
198
|
+
subscribers = new Set();
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
function unstable_subscribe(subscriber) {
|
|
202
|
+
{
|
|
203
|
+
subscribers.add(subscriber);
|
|
204
|
+
|
|
205
|
+
if (subscribers.size === 1) {
|
|
206
|
+
exports.__subscriberRef.current = {
|
|
207
|
+
onInteractionScheduledWorkCompleted: onInteractionScheduledWorkCompleted,
|
|
208
|
+
onInteractionTraced: onInteractionTraced,
|
|
209
|
+
onWorkCanceled: onWorkCanceled,
|
|
210
|
+
onWorkScheduled: onWorkScheduled,
|
|
211
|
+
onWorkStarted: onWorkStarted,
|
|
212
|
+
onWorkStopped: onWorkStopped
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
function unstable_unsubscribe(subscriber) {
|
|
218
|
+
{
|
|
219
|
+
subscribers.delete(subscriber);
|
|
220
|
+
|
|
221
|
+
if (subscribers.size === 0) {
|
|
222
|
+
exports.__subscriberRef.current = null;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
function onInteractionTraced(interaction) {
|
|
228
|
+
var didCatchError = false;
|
|
229
|
+
var caughtError = null;
|
|
230
|
+
subscribers.forEach(function (subscriber) {
|
|
231
|
+
try {
|
|
232
|
+
subscriber.onInteractionTraced(interaction);
|
|
233
|
+
} catch (error) {
|
|
234
|
+
if (!didCatchError) {
|
|
235
|
+
didCatchError = true;
|
|
236
|
+
caughtError = error;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
});
|
|
240
|
+
|
|
241
|
+
if (didCatchError) {
|
|
242
|
+
throw caughtError;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
function onInteractionScheduledWorkCompleted(interaction) {
|
|
247
|
+
var didCatchError = false;
|
|
248
|
+
var caughtError = null;
|
|
249
|
+
subscribers.forEach(function (subscriber) {
|
|
250
|
+
try {
|
|
251
|
+
subscriber.onInteractionScheduledWorkCompleted(interaction);
|
|
252
|
+
} catch (error) {
|
|
253
|
+
if (!didCatchError) {
|
|
254
|
+
didCatchError = true;
|
|
255
|
+
caughtError = error;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
});
|
|
259
|
+
|
|
260
|
+
if (didCatchError) {
|
|
261
|
+
throw caughtError;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
function onWorkScheduled(interactions, threadID) {
|
|
266
|
+
var didCatchError = false;
|
|
267
|
+
var caughtError = null;
|
|
268
|
+
subscribers.forEach(function (subscriber) {
|
|
269
|
+
try {
|
|
270
|
+
subscriber.onWorkScheduled(interactions, threadID);
|
|
271
|
+
} catch (error) {
|
|
272
|
+
if (!didCatchError) {
|
|
273
|
+
didCatchError = true;
|
|
274
|
+
caughtError = error;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
});
|
|
278
|
+
|
|
279
|
+
if (didCatchError) {
|
|
280
|
+
throw caughtError;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
function onWorkStarted(interactions, threadID) {
|
|
285
|
+
var didCatchError = false;
|
|
286
|
+
var caughtError = null;
|
|
287
|
+
subscribers.forEach(function (subscriber) {
|
|
288
|
+
try {
|
|
289
|
+
subscriber.onWorkStarted(interactions, threadID);
|
|
290
|
+
} catch (error) {
|
|
291
|
+
if (!didCatchError) {
|
|
292
|
+
didCatchError = true;
|
|
293
|
+
caughtError = error;
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
});
|
|
297
|
+
|
|
298
|
+
if (didCatchError) {
|
|
299
|
+
throw caughtError;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
function onWorkStopped(interactions, threadID) {
|
|
304
|
+
var didCatchError = false;
|
|
305
|
+
var caughtError = null;
|
|
306
|
+
subscribers.forEach(function (subscriber) {
|
|
307
|
+
try {
|
|
308
|
+
subscriber.onWorkStopped(interactions, threadID);
|
|
309
|
+
} catch (error) {
|
|
310
|
+
if (!didCatchError) {
|
|
311
|
+
didCatchError = true;
|
|
312
|
+
caughtError = error;
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
});
|
|
316
|
+
|
|
317
|
+
if (didCatchError) {
|
|
318
|
+
throw caughtError;
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
function onWorkCanceled(interactions, threadID) {
|
|
323
|
+
var didCatchError = false;
|
|
324
|
+
var caughtError = null;
|
|
325
|
+
subscribers.forEach(function (subscriber) {
|
|
326
|
+
try {
|
|
327
|
+
subscriber.onWorkCanceled(interactions, threadID);
|
|
328
|
+
} catch (error) {
|
|
329
|
+
if (!didCatchError) {
|
|
330
|
+
didCatchError = true;
|
|
331
|
+
caughtError = error;
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
});
|
|
335
|
+
|
|
336
|
+
if (didCatchError) {
|
|
337
|
+
throw caughtError;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
exports.unstable_clear = unstable_clear;
|
|
342
|
+
exports.unstable_getCurrent = unstable_getCurrent;
|
|
343
|
+
exports.unstable_getThreadID = unstable_getThreadID;
|
|
344
|
+
exports.unstable_subscribe = unstable_subscribe;
|
|
345
|
+
exports.unstable_trace = unstable_trace;
|
|
346
|
+
exports.unstable_unsubscribe = unstable_unsubscribe;
|
|
347
|
+
exports.unstable_wrap = unstable_wrap;
|
|
348
|
+
})();
|
|
349
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** @license React v0.19.1
|
|
2
|
+
* scheduler-tracing.production.min.js
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the MIT license found in the
|
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
'use strict';var b=0;exports.__interactionsRef=null;exports.__subscriberRef=null;exports.unstable_clear=function(a){return a()};exports.unstable_getCurrent=function(){return null};exports.unstable_getThreadID=function(){return++b};exports.unstable_subscribe=function(){};exports.unstable_trace=function(a,d,c){return c()};exports.unstable_unsubscribe=function(){};exports.unstable_wrap=function(a){return a};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** @license React v0.19.1
|
|
2
|
+
* scheduler-tracing.profiling.min.js
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the MIT license found in the
|
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
'use strict';var g=0,l=0;exports.__interactionsRef=null;exports.__subscriberRef=null;exports.__interactionsRef={current:new Set};exports.__subscriberRef={current:null};var m=null;m=new Set;function n(e){var d=!1,a=null;m.forEach(function(c){try{c.onInteractionTraced(e)}catch(b){d||(d=!0,a=b)}});if(d)throw a;}function p(e){var d=!1,a=null;m.forEach(function(c){try{c.onInteractionScheduledWorkCompleted(e)}catch(b){d||(d=!0,a=b)}});if(d)throw a;}
|
|
11
|
+
function q(e,d){var a=!1,c=null;m.forEach(function(b){try{b.onWorkScheduled(e,d)}catch(f){a||(a=!0,c=f)}});if(a)throw c;}function r(e,d){var a=!1,c=null;m.forEach(function(b){try{b.onWorkStarted(e,d)}catch(f){a||(a=!0,c=f)}});if(a)throw c;}function t(e,d){var a=!1,c=null;m.forEach(function(b){try{b.onWorkStopped(e,d)}catch(f){a||(a=!0,c=f)}});if(a)throw c;}function u(e,d){var a=!1,c=null;m.forEach(function(b){try{b.onWorkCanceled(e,d)}catch(f){a||(a=!0,c=f)}});if(a)throw c;}
|
|
12
|
+
exports.unstable_clear=function(e){var d=exports.__interactionsRef.current;exports.__interactionsRef.current=new Set;try{return e()}finally{exports.__interactionsRef.current=d}};exports.unstable_getCurrent=function(){return exports.__interactionsRef.current};exports.unstable_getThreadID=function(){return++l};
|
|
13
|
+
exports.unstable_subscribe=function(e){m.add(e);1===m.size&&(exports.__subscriberRef.current={onInteractionScheduledWorkCompleted:p,onInteractionTraced:n,onWorkCanceled:u,onWorkScheduled:q,onWorkStarted:r,onWorkStopped:t})};
|
|
14
|
+
exports.unstable_trace=function(e,d,a){var c=3<arguments.length&&void 0!==arguments[3]?arguments[3]:0,b={__count:1,id:g++,name:e,timestamp:d},f=exports.__interactionsRef.current,k=new Set(f);k.add(b);exports.__interactionsRef.current=k;var h=exports.__subscriberRef.current;try{if(null!==h)h.onInteractionTraced(b)}finally{try{if(null!==h)h.onWorkStarted(k,c)}finally{try{var v=a()}finally{exports.__interactionsRef.current=f;try{if(null!==h)h.onWorkStopped(k,c)}finally{if(b.__count--,null!==h&&0===b.__count)h.onInteractionScheduledWorkCompleted(b)}}}}return v};
|
|
15
|
+
exports.unstable_unsubscribe=function(e){m.delete(e);0===m.size&&(exports.__subscriberRef.current=null)};
|
|
16
|
+
exports.unstable_wrap=function(e){function d(){var d=exports.__interactionsRef.current;exports.__interactionsRef.current=c;b=exports.__subscriberRef.current;try{try{if(null!==b)b.onWorkStarted(c,a)}finally{try{var h=e.apply(void 0,arguments)}finally{if(exports.__interactionsRef.current=d,null!==b)b.onWorkStopped(c,a)}}return h}finally{f||(f=!0,c.forEach(function(a){a.__count--;if(null!==b&&0===a.__count)b.onInteractionScheduledWorkCompleted(a)}))}}var a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:
|
|
17
|
+
0,c=exports.__interactionsRef.current,b=exports.__subscriberRef.current;if(null!==b)b.onWorkScheduled(c,a);c.forEach(function(a){a.__count++});var f=!1;d.cancel=function(){b=exports.__subscriberRef.current;try{if(null!==b)b.onWorkCanceled(c,a)}finally{c.forEach(function(a){a.__count--;if(b&&0===a.__count)b.onInteractionScheduledWorkCompleted(a)})}};return d};
|