planning
All checks were successful
Publish To Prod / deploy_and_publish (push) Successful in 35s

This commit is contained in:
2024-10-14 09:15:30 +02:00
parent bcba00a730
commit 6e64e138e2
21059 changed files with 2317811 additions and 1 deletions

13
node_modules/decap-cms-core/dist/esm/redux/index.js generated vendored Normal file
View File

@@ -0,0 +1,13 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.store = void 0;
var _redux = require("redux");
var _reduxDevtoolsExtension = require("redux-devtools-extension");
var _reduxThunk = _interopRequireDefault(require("redux-thunk"));
var _waitUntilAction = require("./middleware/waitUntilAction");
var _combinedReducer = _interopRequireDefault(require("../reducers/combinedReducer"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
const store = exports.store = (0, _redux.createStore)((0, _combinedReducer.default)(), (0, _reduxDevtoolsExtension.composeWithDevTools)((0, _redux.applyMiddleware)(_reduxThunk.default, _waitUntilAction.waitUntilAction)));

View File

@@ -0,0 +1,55 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.waitUntilAction = exports.WAIT_UNTIL_ACTION = void 0;
// Based on wait-service by Mozilla:
// https://github.com/mozilla/gecko-dev/blob/master/devtools/client/shared/redux/middleware/wait-service.js
/**
* A middleware that provides the ability for actions to install a
* function to be run once when a specific condition is met by an
* action coming through the system. Think of it as a thunk that
* blocks until the condition is met.
*/
const WAIT_UNTIL_ACTION = exports.WAIT_UNTIL_ACTION = 'WAIT_UNTIL_ACTION';
// eslint-disable-next-line func-style
const waitUntilAction = ({
dispatch,
getState
}) => {
let pending = [];
function checkPending(action) {
const readyRequests = [];
const stillPending = [];
// Find the pending requests whose predicates are satisfied with
// this action. Wait to run the requests until after we update the
// pending queue because the request handler may synchronously
// dispatch again and run this service (that use case is
// completely valid).
for (const request of pending) {
if (request.predicate(action)) {
readyRequests.push(request);
} else {
stillPending.push(request);
}
}
pending = stillPending;
for (const request of readyRequests) {
request.run(dispatch, getState, action);
}
}
return next => action => {
if (action.type === WAIT_UNTIL_ACTION) {
pending.push(action);
return null;
}
const result = next(action);
checkPending(action);
return result;
};
};
exports.waitUntilAction = waitUntilAction;