@zimbra/zimlet-cli 15.1.0 → 16.1.0
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/.eslintrc.js +15 -0
- package/dist/cli.js +9 -10
- package/dist/commands/create.js +43 -83
- package/dist/commands/package.js +10 -42
- package/dist/entry.js +5 -7
- package/dist/index.js +67 -91
- package/dist/lib/async-command.js +2 -6
- package/dist/lib/setup.js +3 -12
- package/dist/lib/webpack/transform-config.js +0 -11
- package/dist/shims/@apollo/client/index.js +66 -120
- package/dist/shims/@apollo/client/react/components/index.js +5 -11
- package/dist/shims/@apollo/client/react/hoc/index.js +7 -15
- package/dist/shims/@apollo/client/react/index.js +15 -31
- package/dist/shims/@zimbra-client/blocks/index.js +27 -55
- package/dist/shims/@zimbra-client/browser/index.js +3 -7
- package/dist/shims/@zimbra-client/components/index.js +53 -107
- package/dist/shims/@zimbra-client/constants/index.js +6 -13
- package/dist/shims/@zimbra-client/enhancers/index.js +9 -19
- package/dist/shims/@zimbra-client/errors/index.js +4 -9
- package/dist/shims/@zimbra-client/graphql/index.js +31 -63
- package/dist/shims/@zimbra-client/hooks/graphql/index.js +7 -15
- package/dist/shims/@zimbra-client/hooks/index.js +7 -15
- package/dist/shims/@zimbra-client/platform/index.js +4 -9
- package/dist/shims/@zimbra-client/util/contacts/index.js +3 -7
- package/dist/shims/@zimbra-client/util/index.js +13 -27
- package/dist/shims/@zimbra-client/util/redux/index.js +7 -15
- package/dist/shims/dompurify/index.js +5 -11
- package/dist/shims/index.js +3 -4
- package/dist/shims/moment/index.js +42 -85
- package/dist/shims/preact/compat/index.js +47 -82
- package/dist/shims/preact/hooks/index.js +15 -28
- package/dist/shims/preact/index.js +14 -29
- package/dist/shims/preact/jsx-runtime/index.js +20 -0
- package/dist/shims/preact-context-provider/index.js +5 -13
- package/dist/shims/preact-i18n/index.js +11 -25
- package/dist/shims/preact-pwa-install/index.js +2 -6
- package/dist/shims/preact-render-to-string/index.js +4 -9
- package/dist/shims/preact-router/index.js +8 -17
- package/dist/shims/preact-router/match/index.js +3 -7
- package/dist/shims/react-redux/index.js +14 -30
- package/dist/shims/recompose/index.js +45 -91
- package/dist/shims/redux-actions/index.js +8 -17
- package/dist/util.js +0 -15
- package/dist/zimlet-style-loader.js +2 -11
- package/package-lock.json +4526 -9373
- package/package.json +42 -46
|
@@ -4,102 +4,56 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.wrapDisplayName = exports.withStateHandlers = exports.withState = exports.withReducer = exports.withPropsOnChange = exports.withProps = exports.withHandlers = exports.withContext = exports.toRenderProps = exports.toClass = exports.shouldUpdate = exports.shallowEqual = exports.setStatic = exports.setPropTypes = exports.setObservableConfig = exports.setDisplayName = exports.renderNothing = exports.renderComponent = exports.renameProps = exports.renameProp = exports.pure = exports.onlyUpdateForPropTypes = exports.onlyUpdateForKeys = exports.nest = exports.mapPropsStreamWithConfig = exports.mapPropsStream = exports.mapProps = exports.lifecycle = exports.isClassComponent = exports.hoistStatics = exports.getDisplayName = exports.getContext = exports.fromRenderProps = exports.flattenProp = exports.defaultProps = exports.default = exports.createSink = exports.createEventHandlerWithConfig = exports.createEventHandler = exports.compose = exports.componentFromStreamWithConfig = exports.componentFromStream = exports.componentFromProp = exports.branch = void 0;
|
|
7
|
-
|
|
8
7
|
var _ = require("../");
|
|
9
|
-
|
|
10
8
|
/** This file is an auto-generated shim, aliased in for "recompose" in the webpack config.
|
|
11
9
|
* When components import 'recompose', we want to give them back the copy
|
|
12
10
|
* Zimbra passed down when it called the factory provided to zimlet().
|
|
13
11
|
*/
|
|
14
12
|
|
|
15
13
|
/* eslint-disable camelcase, dot-notation */
|
|
16
|
-
const wrap = _.warnOnMissingExport.bind(null, global.shims['recompose'], 'recompose');
|
|
17
14
|
|
|
18
|
-
const
|
|
19
|
-
exports.mapProps = mapProps;
|
|
20
|
-
const withProps = wrap('withProps');
|
|
21
|
-
exports.
|
|
22
|
-
const
|
|
23
|
-
exports.
|
|
24
|
-
const
|
|
25
|
-
exports.
|
|
26
|
-
const
|
|
27
|
-
exports.
|
|
28
|
-
const
|
|
29
|
-
exports.
|
|
30
|
-
const
|
|
31
|
-
exports.
|
|
32
|
-
const
|
|
33
|
-
exports.
|
|
34
|
-
const
|
|
35
|
-
exports.
|
|
36
|
-
const
|
|
37
|
-
exports.
|
|
38
|
-
const
|
|
39
|
-
exports.
|
|
40
|
-
const
|
|
41
|
-
exports.
|
|
42
|
-
const
|
|
43
|
-
exports.
|
|
44
|
-
const
|
|
45
|
-
exports.
|
|
46
|
-
const
|
|
47
|
-
exports.
|
|
48
|
-
const
|
|
49
|
-
exports.
|
|
50
|
-
const
|
|
51
|
-
exports.
|
|
52
|
-
const
|
|
53
|
-
exports.
|
|
54
|
-
const
|
|
55
|
-
exports.
|
|
56
|
-
const
|
|
57
|
-
exports.
|
|
58
|
-
const
|
|
59
|
-
exports.
|
|
60
|
-
const
|
|
61
|
-
exports.
|
|
62
|
-
|
|
63
|
-
exports.toRenderProps = toRenderProps;
|
|
64
|
-
const fromRenderProps = wrap('fromRenderProps');
|
|
65
|
-
exports.fromRenderProps = fromRenderProps;
|
|
66
|
-
const setStatic = wrap('setStatic');
|
|
67
|
-
exports.setStatic = setStatic;
|
|
68
|
-
const setPropTypes = wrap('setPropTypes');
|
|
69
|
-
exports.setPropTypes = setPropTypes;
|
|
70
|
-
const setDisplayName = wrap('setDisplayName');
|
|
71
|
-
exports.setDisplayName = setDisplayName;
|
|
72
|
-
const compose = wrap('compose');
|
|
73
|
-
exports.compose = compose;
|
|
74
|
-
const getDisplayName = wrap('getDisplayName');
|
|
75
|
-
exports.getDisplayName = getDisplayName;
|
|
76
|
-
const wrapDisplayName = wrap('wrapDisplayName');
|
|
77
|
-
exports.wrapDisplayName = wrapDisplayName;
|
|
78
|
-
const shallowEqual = wrap('shallowEqual');
|
|
79
|
-
exports.shallowEqual = shallowEqual;
|
|
80
|
-
const isClassComponent = wrap('isClassComponent');
|
|
81
|
-
exports.isClassComponent = isClassComponent;
|
|
82
|
-
const createSink = wrap('createSink');
|
|
83
|
-
exports.createSink = createSink;
|
|
84
|
-
const componentFromProp = wrap('componentFromProp');
|
|
85
|
-
exports.componentFromProp = componentFromProp;
|
|
86
|
-
const nest = wrap('nest');
|
|
87
|
-
exports.nest = nest;
|
|
88
|
-
const hoistStatics = wrap('hoistStatics');
|
|
89
|
-
exports.hoistStatics = hoistStatics;
|
|
90
|
-
const componentFromStream = wrap('componentFromStream');
|
|
91
|
-
exports.componentFromStream = componentFromStream;
|
|
92
|
-
const componentFromStreamWithConfig = wrap('componentFromStreamWithConfig');
|
|
93
|
-
exports.componentFromStreamWithConfig = componentFromStreamWithConfig;
|
|
94
|
-
const mapPropsStream = wrap('mapPropsStream');
|
|
95
|
-
exports.mapPropsStream = mapPropsStream;
|
|
96
|
-
const mapPropsStreamWithConfig = wrap('mapPropsStreamWithConfig');
|
|
97
|
-
exports.mapPropsStreamWithConfig = mapPropsStreamWithConfig;
|
|
98
|
-
const createEventHandler = wrap('createEventHandler');
|
|
99
|
-
exports.createEventHandler = createEventHandler;
|
|
100
|
-
const createEventHandlerWithConfig = wrap('createEventHandlerWithConfig');
|
|
101
|
-
exports.createEventHandlerWithConfig = createEventHandlerWithConfig;
|
|
102
|
-
const setObservableConfig = wrap('setObservableConfig');
|
|
103
|
-
exports.setObservableConfig = setObservableConfig;
|
|
104
|
-
var _default = global.shims['recompose'];
|
|
105
|
-
exports.default = _default;
|
|
15
|
+
const wrap = _.warnOnMissingExport.bind(null, global.shims['recompose'], 'recompose');
|
|
16
|
+
const mapProps = exports.mapProps = wrap('mapProps');
|
|
17
|
+
const withProps = exports.withProps = wrap('withProps');
|
|
18
|
+
const withPropsOnChange = exports.withPropsOnChange = wrap('withPropsOnChange');
|
|
19
|
+
const withHandlers = exports.withHandlers = wrap('withHandlers');
|
|
20
|
+
const defaultProps = exports.defaultProps = wrap('defaultProps');
|
|
21
|
+
const renameProp = exports.renameProp = wrap('renameProp');
|
|
22
|
+
const renameProps = exports.renameProps = wrap('renameProps');
|
|
23
|
+
const flattenProp = exports.flattenProp = wrap('flattenProp');
|
|
24
|
+
const withState = exports.withState = wrap('withState');
|
|
25
|
+
const withStateHandlers = exports.withStateHandlers = wrap('withStateHandlers');
|
|
26
|
+
const withReducer = exports.withReducer = wrap('withReducer');
|
|
27
|
+
const branch = exports.branch = wrap('branch');
|
|
28
|
+
const renderComponent = exports.renderComponent = wrap('renderComponent');
|
|
29
|
+
const renderNothing = exports.renderNothing = wrap('renderNothing');
|
|
30
|
+
const shouldUpdate = exports.shouldUpdate = wrap('shouldUpdate');
|
|
31
|
+
const pure = exports.pure = wrap('pure');
|
|
32
|
+
const onlyUpdateForKeys = exports.onlyUpdateForKeys = wrap('onlyUpdateForKeys');
|
|
33
|
+
const onlyUpdateForPropTypes = exports.onlyUpdateForPropTypes = wrap('onlyUpdateForPropTypes');
|
|
34
|
+
const withContext = exports.withContext = wrap('withContext');
|
|
35
|
+
const getContext = exports.getContext = wrap('getContext');
|
|
36
|
+
const lifecycle = exports.lifecycle = wrap('lifecycle');
|
|
37
|
+
const toClass = exports.toClass = wrap('toClass');
|
|
38
|
+
const toRenderProps = exports.toRenderProps = wrap('toRenderProps');
|
|
39
|
+
const fromRenderProps = exports.fromRenderProps = wrap('fromRenderProps');
|
|
40
|
+
const setStatic = exports.setStatic = wrap('setStatic');
|
|
41
|
+
const setPropTypes = exports.setPropTypes = wrap('setPropTypes');
|
|
42
|
+
const setDisplayName = exports.setDisplayName = wrap('setDisplayName');
|
|
43
|
+
const compose = exports.compose = wrap('compose');
|
|
44
|
+
const getDisplayName = exports.getDisplayName = wrap('getDisplayName');
|
|
45
|
+
const wrapDisplayName = exports.wrapDisplayName = wrap('wrapDisplayName');
|
|
46
|
+
const shallowEqual = exports.shallowEqual = wrap('shallowEqual');
|
|
47
|
+
const isClassComponent = exports.isClassComponent = wrap('isClassComponent');
|
|
48
|
+
const createSink = exports.createSink = wrap('createSink');
|
|
49
|
+
const componentFromProp = exports.componentFromProp = wrap('componentFromProp');
|
|
50
|
+
const nest = exports.nest = wrap('nest');
|
|
51
|
+
const hoistStatics = exports.hoistStatics = wrap('hoistStatics');
|
|
52
|
+
const componentFromStream = exports.componentFromStream = wrap('componentFromStream');
|
|
53
|
+
const componentFromStreamWithConfig = exports.componentFromStreamWithConfig = wrap('componentFromStreamWithConfig');
|
|
54
|
+
const mapPropsStream = exports.mapPropsStream = wrap('mapPropsStream');
|
|
55
|
+
const mapPropsStreamWithConfig = exports.mapPropsStreamWithConfig = wrap('mapPropsStreamWithConfig');
|
|
56
|
+
const createEventHandler = exports.createEventHandler = wrap('createEventHandler');
|
|
57
|
+
const createEventHandlerWithConfig = exports.createEventHandlerWithConfig = wrap('createEventHandlerWithConfig');
|
|
58
|
+
const setObservableConfig = exports.setObservableConfig = wrap('setObservableConfig');
|
|
59
|
+
var _default = exports.default = global.shims['recompose'];
|
|
@@ -4,28 +4,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.handleActions = exports.handleAction = exports.default = exports.createCurriedAction = exports.createActions = exports.createAction = exports.combineActions = void 0;
|
|
7
|
-
|
|
8
7
|
var _ = require("../");
|
|
9
|
-
|
|
10
8
|
/** This file is an auto-generated shim, aliased in for "redux-actions" in the webpack config.
|
|
11
9
|
* When components import 'redux-actions', we want to give them back the copy
|
|
12
10
|
* Zimbra passed down when it called the factory provided to zimlet().
|
|
13
11
|
*/
|
|
14
12
|
|
|
15
13
|
/* eslint-disable camelcase, dot-notation */
|
|
16
|
-
const wrap = _.warnOnMissingExport.bind(null, global.shims['redux-actions'], 'redux-actions');
|
|
17
14
|
|
|
18
|
-
const
|
|
19
|
-
exports.combineActions = combineActions;
|
|
20
|
-
const createAction = wrap('createAction');
|
|
21
|
-
exports.
|
|
22
|
-
const
|
|
23
|
-
exports.
|
|
24
|
-
const
|
|
25
|
-
exports.
|
|
26
|
-
const handleAction = wrap('handleAction');
|
|
27
|
-
exports.handleAction = handleAction;
|
|
28
|
-
const handleActions = wrap('handleActions');
|
|
29
|
-
exports.handleActions = handleActions;
|
|
30
|
-
var _default = global.shims['redux-actions'];
|
|
31
|
-
exports.default = _default;
|
|
15
|
+
const wrap = _.warnOnMissingExport.bind(null, global.shims['redux-actions'], 'redux-actions');
|
|
16
|
+
const combineActions = exports.combineActions = wrap('combineActions');
|
|
17
|
+
const createAction = exports.createAction = wrap('createAction');
|
|
18
|
+
const createActions = exports.createActions = wrap('createActions');
|
|
19
|
+
const createCurriedAction = exports.createCurriedAction = wrap('createCurriedAction');
|
|
20
|
+
const handleAction = exports.handleAction = wrap('handleAction');
|
|
21
|
+
const handleActions = exports.handleActions = wrap('handleActions');
|
|
22
|
+
var _default = exports.default = global.shims['redux-actions'];
|
package/dist/util.js
CHANGED
|
@@ -11,56 +11,41 @@ exports.isDir = isDir;
|
|
|
11
11
|
exports.success = success;
|
|
12
12
|
exports.trim = trim;
|
|
13
13
|
exports.warn = warn;
|
|
14
|
-
|
|
15
14
|
var _chalk = _interopRequireDefault(require("chalk"));
|
|
16
|
-
|
|
17
15
|
var _fs = require("fs");
|
|
18
|
-
|
|
19
16
|
var _logSymbols = _interopRequireDefault(require("log-symbols"));
|
|
20
|
-
|
|
21
17
|
var _which = _interopRequireDefault(require("which"));
|
|
22
|
-
|
|
23
18
|
var _path = _interopRequireDefault(require("path"));
|
|
24
|
-
|
|
25
19
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
26
|
-
|
|
27
20
|
function crossPlatformPathRegex(regexp) {
|
|
28
21
|
if (_path.default.sep === '\\') {
|
|
29
22
|
regexp = new RegExp(regexp.source.replace(/(^|[^\\])\\\//g, '$1\\\\'), regexp.flags);
|
|
30
23
|
}
|
|
31
|
-
|
|
32
24
|
return regexp;
|
|
33
25
|
}
|
|
34
|
-
|
|
35
26
|
function isDir(str) {
|
|
36
27
|
return (0, _fs.existsSync)(str) && (0, _fs.statSync)(str).isDirectory();
|
|
37
28
|
}
|
|
38
|
-
|
|
39
29
|
function hasCommand(str) {
|
|
40
30
|
return !!_which.default.sync(str, {
|
|
41
31
|
nothrow: true
|
|
42
32
|
});
|
|
43
33
|
}
|
|
44
|
-
|
|
45
34
|
function trim(str) {
|
|
46
35
|
return str.trim().replace(/^\t+/gm, '');
|
|
47
36
|
}
|
|
48
|
-
|
|
49
37
|
function success(text, code) {
|
|
50
38
|
process.stderr.write(_logSymbols.default.success + ' ' + text + '\n');
|
|
51
39
|
code && process.exit(code);
|
|
52
40
|
}
|
|
53
|
-
|
|
54
41
|
function info(text, code) {
|
|
55
42
|
process.stderr.write(_logSymbols.default.info + _chalk.default.blue(' INFO ') + text + '\n');
|
|
56
43
|
code && process.exit(code);
|
|
57
44
|
}
|
|
58
|
-
|
|
59
45
|
function warn(text, code) {
|
|
60
46
|
process.stdout.write(_logSymbols.default.warning + _chalk.default.yellow(' WARN ') + text + '\n');
|
|
61
47
|
code && process.exit(code);
|
|
62
48
|
}
|
|
63
|
-
|
|
64
49
|
function error(text, code) {
|
|
65
50
|
process.stderr.write(_logSymbols.default.error + _chalk.default.red(' ERROR ') + text + '\n');
|
|
66
51
|
code && process.exit(code);
|
|
@@ -4,29 +4,20 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = ZimletStyleLoader;
|
|
7
|
-
|
|
8
|
-
var _loaderUtils = _interopRequireDefault(require("loader-utils"));
|
|
9
|
-
|
|
10
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
|
|
12
7
|
/** zimlet-style-loader is a replacement for style-loader.
|
|
13
8
|
* Instead of injecting CSS stylesheets into the a style tag in the document,
|
|
14
9
|
* this loader injects them into a global array called `ZIMLET_STYLES`.
|
|
15
10
|
* That array of string stylesheets is automatically passed to `styles.add()` by zimlet-cli's entrypoint.
|
|
16
11
|
*/
|
|
17
12
|
function ZimletStyleLoader() {}
|
|
18
|
-
|
|
19
13
|
ZimletStyleLoader.pitch = function (request) {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const stringified = _loaderUtils.default.stringifyRequest(this, '!!' + request); // Add the styles to global.ZIMLET_STYLES and then return the generated classnames.
|
|
23
|
-
|
|
14
|
+
const stringified = JSON.stringify(this.utils.contextify(this.context || this.rootContext, '!!' + request));
|
|
24
15
|
|
|
16
|
+
// Add the styles to global.ZIMLET_STYLES and then return the generated classnames.
|
|
25
17
|
return `
|
|
26
18
|
var styles = require(${stringified}).default;
|
|
27
19
|
ZIMLET_STYLES.push(styles);
|
|
28
20
|
module.exports = styles.locals;
|
|
29
21
|
`;
|
|
30
22
|
};
|
|
31
|
-
|
|
32
23
|
module.exports = exports.default;
|