@zimbra/zimlet-cli 15.1.0 → 16.0.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 +39 -75
- package/dist/commands/package.js +9 -40
- package/dist/entry.js +5 -7
- package/dist/index.js +65 -89
- 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 +1 -3
- package/dist/shims/@apollo/client/react/components/index.js +1 -3
- package/dist/shims/@apollo/client/react/hoc/index.js +1 -3
- package/dist/shims/@apollo/client/react/index.js +1 -3
- package/dist/shims/@zimbra-client/blocks/index.js +1 -3
- package/dist/shims/@zimbra-client/browser/index.js +1 -3
- package/dist/shims/@zimbra-client/components/index.js +1 -3
- package/dist/shims/@zimbra-client/constants/index.js +1 -3
- package/dist/shims/@zimbra-client/enhancers/index.js +1 -3
- package/dist/shims/@zimbra-client/errors/index.js +1 -3
- package/dist/shims/@zimbra-client/graphql/index.js +1 -3
- package/dist/shims/@zimbra-client/hooks/graphql/index.js +1 -3
- package/dist/shims/@zimbra-client/hooks/index.js +1 -3
- package/dist/shims/@zimbra-client/platform/index.js +1 -3
- package/dist/shims/@zimbra-client/util/contacts/index.js +1 -3
- package/dist/shims/@zimbra-client/util/index.js +1 -3
- package/dist/shims/@zimbra-client/util/redux/index.js +1 -3
- package/dist/shims/dompurify/index.js +1 -3
- package/dist/shims/index.js +3 -4
- package/dist/shims/moment/index.js +1 -3
- package/dist/shims/preact/compat/index.js +71 -65
- package/dist/shims/preact/hooks/index.js +18 -18
- package/dist/shims/preact/index.js +17 -19
- package/dist/shims/preact/jsx-runtime/index.js +25 -0
- package/dist/shims/preact-context-provider/index.js +1 -5
- package/dist/shims/preact-i18n/index.js +1 -5
- package/dist/shims/preact-pwa-install/index.js +1 -4
- package/dist/shims/preact-render-to-string/index.js +1 -3
- package/dist/shims/preact-router/index.js +1 -3
- package/dist/shims/preact-router/match/index.js +1 -3
- package/dist/shims/react-redux/index.js +6 -10
- package/dist/shims/recompose/index.js +1 -3
- package/dist/shims/redux-actions/index.js +1 -3
- package/dist/util.js +0 -15
- package/dist/zimlet-style-loader.js +2 -11
- package/package-lock.json +3644 -7386
- package/package.json +42 -46
package/dist/index.js
CHANGED
|
@@ -6,41 +6,23 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.configure = configure;
|
|
8
8
|
exports.default = run;
|
|
9
|
-
|
|
10
9
|
var _fs = _interopRequireDefault(require("fs"));
|
|
11
|
-
|
|
12
10
|
var _path = _interopRequireDefault(require("path"));
|
|
13
|
-
|
|
14
11
|
var _ip = _interopRequireDefault(require("ip"));
|
|
15
|
-
|
|
16
12
|
var _chalk = _interopRequireDefault(require("chalk"));
|
|
17
|
-
|
|
18
13
|
var _transformConfig = _interopRequireDefault(require("./lib/webpack/transform-config"));
|
|
19
|
-
|
|
20
14
|
var _getPort = _interopRequireWildcard(require("get-port"));
|
|
21
|
-
|
|
22
15
|
var _webpack = _interopRequireDefault(require("webpack"));
|
|
23
|
-
|
|
24
16
|
var _webpackDevServer = _interopRequireDefault(require("webpack-dev-server"));
|
|
25
|
-
|
|
26
17
|
var _progressBarWebpackPlugin = _interopRequireDefault(require("progress-bar-webpack-plugin"));
|
|
27
|
-
|
|
28
18
|
var _postcssPresetEnv = _interopRequireDefault(require("postcss-preset-env"));
|
|
29
|
-
|
|
30
19
|
var _postcssDiscardComments = _interopRequireDefault(require("postcss-discard-comments"));
|
|
31
|
-
|
|
32
20
|
var _util = require("./util");
|
|
33
|
-
|
|
34
21
|
var _shims = require("./shims");
|
|
35
|
-
|
|
36
22
|
var _copyWebpackPlugin = _interopRequireDefault(require("copy-webpack-plugin"));
|
|
37
|
-
|
|
38
23
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
39
|
-
|
|
40
24
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
41
|
-
|
|
42
25
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
43
|
-
|
|
44
26
|
function run(args, callback) {
|
|
45
27
|
let config = configure(args);
|
|
46
28
|
let compiler = (0, _webpack.default)(config);
|
|
@@ -51,7 +33,6 @@ function run(args, callback) {
|
|
|
51
33
|
});
|
|
52
34
|
compiler.hooks.done.tap('zimlet-cli', stats => {
|
|
53
35
|
let info = stats.toJson();
|
|
54
|
-
|
|
55
36
|
if (stats.hasErrors()) {
|
|
56
37
|
process.stdout.write(_chalk.default.red('Build failed!\n\n'));
|
|
57
38
|
info.errors.forEach(err => console.error(err));
|
|
@@ -59,9 +40,7 @@ function run(args, callback) {
|
|
|
59
40
|
if (stats.hasWarnings()) {
|
|
60
41
|
info.warnings.forEach(err => console.warn(err));
|
|
61
42
|
}
|
|
62
|
-
|
|
63
43
|
process.stdout.write(_chalk.default.green('Compiled successfully!\n\n'));
|
|
64
|
-
|
|
65
44
|
if (config.devServer) {
|
|
66
45
|
let {
|
|
67
46
|
https,
|
|
@@ -72,18 +51,15 @@ function run(args, callback) {
|
|
|
72
51
|
if (host === '0.0.0.0') host = 'localhost';
|
|
73
52
|
let serverAddr = `${protocol}://${host}:${_chalk.default.bold(port)}/index.js`;
|
|
74
53
|
let localIpAddr = `${protocol}://${_ip.default.address()}:${_chalk.default.bold(port)}/index.js`;
|
|
75
|
-
|
|
76
54
|
if (preferredPort !== config.devServer.port) {
|
|
77
55
|
process.stdout.write(`NOTE: Port ${preferredPort} is not available, using ${port} instead.\n\n`);
|
|
78
56
|
}
|
|
79
|
-
|
|
80
57
|
process.stdout.write('You can view the application in browser.\n\n');
|
|
81
58
|
process.stdout.write(`${_chalk.default.bold('Local:')} ${serverAddr}\n`);
|
|
82
59
|
process.stdout.write(`${_chalk.default.bold('On Your Network:')} ${localIpAddr}\n`);
|
|
83
60
|
}
|
|
84
61
|
}
|
|
85
62
|
});
|
|
86
|
-
|
|
87
63
|
if (config.devServer) {
|
|
88
64
|
(0, _getPort.default)({
|
|
89
65
|
port: (0, _getPort.makeRange)(preferredPort, preferredPort + 100)
|
|
@@ -91,51 +67,54 @@ function run(args, callback) {
|
|
|
91
67
|
if (config.devServer.port !== port) {
|
|
92
68
|
config.devServer.port = port;
|
|
93
69
|
}
|
|
94
|
-
|
|
95
|
-
|
|
70
|
+
(async () => {
|
|
71
|
+
await new _webpackDevServer.default(config.devServer, compiler).start();
|
|
72
|
+
})();
|
|
96
73
|
});
|
|
97
74
|
} else {
|
|
98
75
|
compiler.run((err, stats) => {
|
|
99
76
|
if (!err && stats.hasErrors()) {
|
|
100
77
|
err = `${stats.toJson().errors.length} errors`;
|
|
101
78
|
}
|
|
102
|
-
|
|
103
79
|
callback(err, null);
|
|
104
80
|
});
|
|
105
81
|
}
|
|
106
82
|
}
|
|
107
|
-
|
|
108
83
|
function configure(env) {
|
|
109
84
|
env = env || {};
|
|
110
85
|
const watch = env.watch || env.w || process.env.NODE_ENV === 'dev' || process.env.NODE_ENV === 'development';
|
|
111
86
|
const PROD = !watch;
|
|
87
|
+
const CIRCLECI = process.env.CIRCLECI === 'true';
|
|
112
88
|
let https = !(process.env.HTTPS === 'false' || env.https === false),
|
|
113
|
-
|
|
114
|
-
|
|
89
|
+
host = process.env.HOST || env.host || 'localhost',
|
|
90
|
+
port = process.env.PORT || env.port || 8081;
|
|
115
91
|
let cwd = env.cwd = process.cwd(),
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
92
|
+
context = cwd,
|
|
93
|
+
pkg;
|
|
119
94
|
try {
|
|
120
95
|
pkg = require(_path.default.resolve(cwd, 'package.json'));
|
|
121
96
|
} catch (e) {}
|
|
122
|
-
|
|
123
97
|
if (!pkg) {
|
|
124
98
|
pkg = {
|
|
125
99
|
main: 'index.js'
|
|
126
100
|
};
|
|
127
|
-
}
|
|
128
|
-
|
|
101
|
+
}
|
|
129
102
|
|
|
103
|
+
// entry point (initial file to load)
|
|
130
104
|
let entry = _path.default.resolve(cwd, pkg.module || pkg['jsnext:main'] || pkg.main);
|
|
105
|
+
if (isDir(entry)) {
|
|
106
|
+
entry = _path.default.resolve(entry, 'index.js');
|
|
107
|
+
}
|
|
131
108
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
let dest = _path.default.resolve(cwd, env.dest || 'build'); // use absolute paths
|
|
109
|
+
// attempt to use ./src dir if present:
|
|
110
|
+
if (isDir(_path.default.resolve(cwd, 'src'))) {
|
|
111
|
+
context = _path.default.resolve(context, 'src');
|
|
112
|
+
}
|
|
137
113
|
|
|
114
|
+
// normalize desination dir
|
|
115
|
+
let dest = _path.default.resolve(cwd, env.dest || 'build');
|
|
138
116
|
|
|
117
|
+
// use absolute paths
|
|
139
118
|
context = _path.default.resolve(context);
|
|
140
119
|
let componentDirs = [_path.default.resolve(context, 'components'), _path.default.resolve(context, 'screens'), _path.default.resolve(context, 'pages')];
|
|
141
120
|
let cssLoaderOptions = {
|
|
@@ -166,7 +145,7 @@ function configure(env) {
|
|
|
166
145
|
output: {
|
|
167
146
|
path: dest,
|
|
168
147
|
filename: `index.js`,
|
|
169
|
-
chunkFilename: '[name].[chunkhash:8].chunk.js',
|
|
148
|
+
chunkFilename: 'scripts/[name].[chunkhash:8].chunk.js',
|
|
170
149
|
// NOTE: Explicit public path is required in order to make HMR work within an sourceless iframe.
|
|
171
150
|
// This is due to a bug in webpack-dev-server that uses the document protocol for all https pages:
|
|
172
151
|
// https://github.com/webpack/webpack-dev-server/blob/c490b245ad65f315762e03e51710f7f7177b1e7b/client/index.js#L188-L190
|
|
@@ -176,12 +155,12 @@ function configure(env) {
|
|
|
176
155
|
extensions: ['.mjs', '.jsx', '.js', '.json', '.css', '.less'],
|
|
177
156
|
mainFields: ['browser', 'module', 'jsnext:main', 'main'],
|
|
178
157
|
modules: [_path.default.resolve(cwd, 'node_modules'), 'node_modules'],
|
|
179
|
-
alias: {
|
|
158
|
+
alias: {
|
|
159
|
+
..._shims.SHIMMED_MODULES.reduce((shimAliases, name) => {
|
|
180
160
|
if (Array.isArray(name)) {
|
|
181
161
|
// If module name is an Array, the first element is the root name of the module
|
|
182
162
|
[name] = name;
|
|
183
163
|
}
|
|
184
|
-
|
|
185
164
|
shimAliases[name] = (0, _shims.getShimPath)(name);
|
|
186
165
|
return shimAliases;
|
|
187
166
|
}, {}),
|
|
@@ -212,6 +191,9 @@ function configure(env) {
|
|
|
212
191
|
loose: true
|
|
213
192
|
}], require.resolve('@babel/plugin-proposal-export-namespace-from'), require.resolve('@babel/plugin-proposal-export-default-from'), require.resolve('@babel/plugin-transform-object-assign'), require.resolve('@babel/plugin-proposal-optional-chaining'), [require.resolve('@babel/plugin-transform-react-jsx'), {
|
|
214
193
|
pragma: 'createElement'
|
|
194
|
+
// @TODO this is breaking change, so we will introduce in future
|
|
195
|
+
//runtime: 'automatic',
|
|
196
|
+
//importSource: 'preact'
|
|
215
197
|
}]]
|
|
216
198
|
}
|
|
217
199
|
}, {
|
|
@@ -222,7 +204,8 @@ function configure(env) {
|
|
|
222
204
|
loader: _path.default.resolve(__dirname, 'zimlet-style-loader.js')
|
|
223
205
|
}, {
|
|
224
206
|
loader: 'css-loader',
|
|
225
|
-
options: {
|
|
207
|
+
options: {
|
|
208
|
+
...cssLoaderOptions,
|
|
226
209
|
modules: {
|
|
227
210
|
localIdentRegExp: cssModulesRegexp,
|
|
228
211
|
localIdentName: '[1]_[2]_[local]'
|
|
@@ -252,23 +235,18 @@ function configure(env) {
|
|
|
252
235
|
}]
|
|
253
236
|
}, {
|
|
254
237
|
test: /\.(xml|html|txt|md)$/,
|
|
255
|
-
|
|
238
|
+
type: 'asset/resource'
|
|
256
239
|
}, {
|
|
257
240
|
test: /\.(svg|ttf|woff2?|eot|otf|jpe?g|png|gif)$/i,
|
|
258
|
-
|
|
241
|
+
type: 'asset/resource',
|
|
242
|
+
generator: {
|
|
243
|
+
filename: 'fonts/[name]_[contenthash:8].[ext]'
|
|
244
|
+
}
|
|
259
245
|
}]
|
|
260
246
|
},
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
__filename: false,
|
|
265
|
-
__dirname: false,
|
|
266
|
-
setImmediate: false
|
|
267
|
-
} : {},
|
|
268
|
-
plugins: [].concat(PROD ? [new _webpack.default.HashedModuleIdsPlugin()] : [new _webpack.default.HotModuleReplacementPlugin()], new _webpack.default.LoaderOptionsPlugin({
|
|
269
|
-
minimize: PROD,
|
|
270
|
-
debug: !PROD
|
|
271
|
-
}), new _progressBarWebpackPlugin.default({
|
|
247
|
+
plugins: [].concat(
|
|
248
|
+
// Remove progress plugin in cirleci for improving performance
|
|
249
|
+
!CIRCLECI && new _progressBarWebpackPlugin.default({
|
|
272
250
|
format: '\u001b[90m\u001b[44mBuild\u001b[49m\u001b[39m [:bar] \u001b[32m\u001b[1m:percent\u001b[22m\u001b[39m (:elapseds) \u001b[2m:msg\u001b[22m',
|
|
273
251
|
renderThrottle: 100,
|
|
274
252
|
summary: false
|
|
@@ -280,50 +258,48 @@ function configure(env) {
|
|
|
280
258
|
to: _path.default.join(dest, 'config_template.xml')
|
|
281
259
|
}]
|
|
282
260
|
})).filter(Boolean),
|
|
283
|
-
watchOptions: {
|
|
284
|
-
ignored: ['build', dest, _path.default.resolve(cwd, 'node_modules')]
|
|
285
|
-
},
|
|
286
261
|
stats: 'errors-only',
|
|
287
|
-
devtool: watch ? 'cheap-module-eval-source-map' : 'source-map'
|
|
288
|
-
};
|
|
289
|
-
|
|
290
|
-
if (watch) {
|
|
291
|
-
webpackConfig.devServer = {
|
|
292
|
-
host,
|
|
293
|
-
port,
|
|
294
|
-
hot: !process.env.DISABLE_HOT,
|
|
295
|
-
https,
|
|
296
|
-
compress: true,
|
|
297
|
-
publicPath: '/',
|
|
298
|
-
contentBase: context,
|
|
299
|
-
disableHostCheck: true,
|
|
300
|
-
|
|
301
|
-
before(app) {
|
|
302
|
-
app.use(require('cors')({
|
|
303
|
-
maxAge: 3600
|
|
304
|
-
}));
|
|
305
|
-
},
|
|
262
|
+
//devtool: watch ? 'cheap-module-eval-source-map' : 'source-map',
|
|
306
263
|
|
|
264
|
+
...(watch && {
|
|
307
265
|
watchOptions: {
|
|
308
266
|
ignored: ['build', dest, _path.default.resolve(cwd, 'node_modules')]
|
|
309
267
|
},
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
268
|
+
devtool: 'inline-source-map',
|
|
269
|
+
devServer: {
|
|
270
|
+
host,
|
|
271
|
+
port,
|
|
272
|
+
hot: !process.env.DISABLE_HOT,
|
|
273
|
+
server: {
|
|
274
|
+
type: https ? 'https' : 'http'
|
|
275
|
+
},
|
|
276
|
+
devMiddleware: {
|
|
277
|
+
publicPath: '/'
|
|
278
|
+
},
|
|
279
|
+
static: {
|
|
280
|
+
directory: context,
|
|
281
|
+
watch: true
|
|
282
|
+
},
|
|
283
|
+
allowedHosts: 'all',
|
|
284
|
+
setupMiddlewares: middlewares => {
|
|
285
|
+
middlewares.unshift(require('cors')({
|
|
286
|
+
maxAge: 3600
|
|
287
|
+
}));
|
|
288
|
+
return middlewares;
|
|
289
|
+
},
|
|
290
|
+
client: false,
|
|
291
|
+
open: true
|
|
292
|
+
}
|
|
293
|
+
})
|
|
294
|
+
};
|
|
317
295
|
(0, _transformConfig.default)(env, webpackConfig);
|
|
318
296
|
return webpackConfig;
|
|
319
297
|
}
|
|
320
|
-
|
|
321
298
|
function isDir(filepath) {
|
|
322
299
|
try {
|
|
323
300
|
return !!_fs.default.statSync(filepath).isDirectory();
|
|
324
301
|
} catch (err) {}
|
|
325
302
|
}
|
|
326
|
-
|
|
327
303
|
function isFile(filepath) {
|
|
328
304
|
try {
|
|
329
305
|
return !!_fs.default.statSync(filepath).isFile();
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = asyncCommand;
|
|
7
|
-
|
|
8
7
|
function done(err, result) {
|
|
9
8
|
if (err) {
|
|
10
9
|
process.stderr.write(String(err) + '\n');
|
|
@@ -14,16 +13,13 @@ function done(err, result) {
|
|
|
14
13
|
process.exit(0);
|
|
15
14
|
}
|
|
16
15
|
}
|
|
17
|
-
|
|
18
16
|
function asyncCommand(options) {
|
|
19
|
-
return {
|
|
20
|
-
|
|
17
|
+
return {
|
|
18
|
+
...options,
|
|
21
19
|
handler(argv) {
|
|
22
20
|
let r = options.handler(argv, done);
|
|
23
21
|
if (r && r.then) r.then(result => done(null, result), done);
|
|
24
22
|
}
|
|
25
|
-
|
|
26
23
|
};
|
|
27
24
|
}
|
|
28
|
-
|
|
29
25
|
module.exports = exports.default;
|
package/dist/lib/setup.js
CHANGED
|
@@ -6,13 +6,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.addScripts = addScripts;
|
|
7
7
|
exports.initGit = initGit;
|
|
8
8
|
exports.install = install;
|
|
9
|
-
|
|
10
9
|
var _crossSpawnPromise = _interopRequireDefault(require("cross-spawn-promise"));
|
|
11
|
-
|
|
12
10
|
var _util = require("../util");
|
|
13
|
-
|
|
14
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
16
12
|
function install(cwd, isYarn) {
|
|
17
13
|
let cmd = isYarn ? 'yarn' : 'npm';
|
|
18
14
|
return (0, _crossSpawnPromise.default)(cmd, ['install'], {
|
|
@@ -20,20 +16,18 @@ function install(cwd, isYarn) {
|
|
|
20
16
|
stdio: 'ignore'
|
|
21
17
|
});
|
|
22
18
|
}
|
|
23
|
-
|
|
24
19
|
async function addScripts(obj, cwd, isYarn) {
|
|
25
20
|
return {
|
|
26
21
|
build: 'zimlet build',
|
|
27
22
|
watch: 'zimlet watch',
|
|
28
23
|
package: 'zimlet package'
|
|
29
24
|
};
|
|
30
|
-
}
|
|
31
|
-
// if `git` is present in the $PATH.
|
|
32
|
-
|
|
25
|
+
}
|
|
33
26
|
|
|
27
|
+
// Initializes the folder using `git init` and a proper `.gitignore` file
|
|
28
|
+
// if `git` is present in the $PATH.
|
|
34
29
|
async function initGit(target) {
|
|
35
30
|
let git = (0, _util.hasCommand)('git');
|
|
36
|
-
|
|
37
31
|
if (git) {
|
|
38
32
|
const cwd = target;
|
|
39
33
|
await (0, _crossSpawnPromise.default)('git', ['init'], {
|
|
@@ -45,21 +39,18 @@ async function initGit(target) {
|
|
|
45
39
|
let gitUser, gitEmail;
|
|
46
40
|
const defaultGitUser = 'Zimlet CLI';
|
|
47
41
|
const defaultGitEmail = 'zimlet-cli@users.noreply.github.com';
|
|
48
|
-
|
|
49
42
|
try {
|
|
50
43
|
gitUser = (await (0, _crossSpawnPromise.default)('git', ['config', 'user.name'])).toString();
|
|
51
44
|
} catch (e) {
|
|
52
45
|
(0, _util.warn)(`Git config value of user.name not defined. Defaulting to ${defaultGitUser} for initial commit message.`);
|
|
53
46
|
gitUser = defaultGitUser;
|
|
54
47
|
}
|
|
55
|
-
|
|
56
48
|
try {
|
|
57
49
|
gitEmail = (await (0, _crossSpawnPromise.default)('git', ['config', 'user.email'])).toString();
|
|
58
50
|
} catch (e) {
|
|
59
51
|
(0, _util.warn)(`Git config value of user.email not defined. Defaulting to ${defaultGitEmail} for initial commit message.`);
|
|
60
52
|
gitEmail = defaultGitEmail;
|
|
61
53
|
}
|
|
62
|
-
|
|
63
54
|
try {
|
|
64
55
|
await (0, _crossSpawnPromise.default)('git', ['commit', '-m', 'initial commit from zimlet-cli'], {
|
|
65
56
|
cwd,
|
|
@@ -4,39 +4,28 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = transformConfig;
|
|
7
|
-
|
|
8
7
|
var _path = _interopRequireDefault(require("path"));
|
|
9
|
-
|
|
10
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
|
|
12
9
|
const defaultConfig = './zimlet.config.js';
|
|
13
|
-
|
|
14
10
|
function transformConfig(env, config) {
|
|
15
11
|
let transformerPath = _path.default.resolve(env.cwd, env.config || defaultConfig);
|
|
16
|
-
|
|
17
12
|
try {
|
|
18
13
|
require.resolve(transformerPath);
|
|
19
14
|
} catch (err) {
|
|
20
15
|
if (env.config && env.config !== defaultConfig) {
|
|
21
16
|
console.warn(`zimlet-cli config could not be loaded!\nFile ${env.config} not found.`);
|
|
22
17
|
}
|
|
23
|
-
|
|
24
18
|
return;
|
|
25
19
|
}
|
|
26
|
-
|
|
27
20
|
require('@babel/register')({
|
|
28
21
|
presets: [require.resolve('@babel/preset-env')]
|
|
29
22
|
});
|
|
30
|
-
|
|
31
23
|
const m = require(transformerPath);
|
|
32
|
-
|
|
33
24
|
const transformer = m && m.default || m;
|
|
34
|
-
|
|
35
25
|
try {
|
|
36
26
|
transformer(config, Object.assign({}, env));
|
|
37
27
|
} catch (err) {
|
|
38
28
|
console.error(`Error at ${transformerPath}: \n` + err);
|
|
39
29
|
}
|
|
40
30
|
}
|
|
41
|
-
|
|
42
31
|
module.exports = exports.default;
|
|
@@ -4,17 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.useSubscription = exports.useReactiveVar = exports.useQuery = exports.useMutation = exports.useLazyQuery = exports.useApolloClient = exports.toPromise = exports.throwServerError = exports.split = exports.setLogVerbosity = exports.serializeFetchParameter = exports.selectURI = exports.selectHttpOptionsAndBodyInternal = exports.selectHttpOptionsAndBody = exports.rewriteURIForGET = exports.resetCaches = exports.resetApolloContext = exports.parser = exports.parseAndCheckHttpResponse = exports.operationName = exports.mergeOptions = exports.makeVar = exports.makeReference = exports.isReference = exports.isApolloError = exports.gql = exports.getApolloContext = exports.fromPromise = exports.fromError = exports.from = exports.fallbackHttpConfig = exports.execute = exports.enableExperimentalFragmentVariables = exports.empty = exports.disableFragmentWarnings = exports.disableExperimentalFragmentVariables = exports.defaultPrinter = exports.defaultDataIdFromObject = exports.default = exports.createSignalIfSupported = exports.createHttpLink = exports.concat = exports.checkFetcher = exports.applyNextFetchPolicy = exports.ObservableQuery = exports.Observable = exports.NetworkStatus = exports.MissingFieldError = exports.InMemoryCache = exports.HttpLink = exports.DocumentType = exports.Cache = exports.ApolloProvider = exports.ApolloLink = exports.ApolloError = exports.ApolloConsumer = exports.ApolloClient = exports.ApolloCache = void 0;
|
|
7
|
-
|
|
8
7
|
var _ = require("../../");
|
|
9
|
-
|
|
10
8
|
/** This file is an auto-generated shim, aliased in for "@apollo/client" in the webpack config.
|
|
11
9
|
* When components import '@apollo/client', 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['@apollo/client'], '@apollo/client');
|
|
17
14
|
|
|
15
|
+
const wrap = _.warnOnMissingExport.bind(null, global.shims['@apollo/client'], '@apollo/client');
|
|
18
16
|
const NetworkStatus = wrap('NetworkStatus');
|
|
19
17
|
exports.NetworkStatus = NetworkStatus;
|
|
20
18
|
const Observable = wrap('Observable');
|
|
@@ -4,17 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = exports.Subscription = exports.Query = exports.Mutation = void 0;
|
|
7
|
-
|
|
8
7
|
var _ = require("../../../../");
|
|
9
|
-
|
|
10
8
|
/** This file is an auto-generated shim, aliased in for "@apollo/client/react/components" in the webpack config.
|
|
11
9
|
* When components import '@apollo/client/react/components', 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['@apollo/client/react/components'], '@apollo/client/react/components');
|
|
17
14
|
|
|
15
|
+
const wrap = _.warnOnMissingExport.bind(null, global.shims['@apollo/client/react/components'], '@apollo/client/react/components');
|
|
18
16
|
const Mutation = wrap('Mutation');
|
|
19
17
|
exports.Mutation = Mutation;
|
|
20
18
|
const Query = wrap('Query');
|
|
@@ -4,17 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.withSubscription = exports.withQuery = exports.withMutation = exports.withApollo = exports.graphql = exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _ = require("../../../../");
|
|
9
|
-
|
|
10
8
|
/** This file is an auto-generated shim, aliased in for "@apollo/client/react/hoc" in the webpack config.
|
|
11
9
|
* When components import '@apollo/client/react/hoc', 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['@apollo/client/react/hoc'], '@apollo/client/react/hoc');
|
|
17
14
|
|
|
15
|
+
const wrap = _.warnOnMissingExport.bind(null, global.shims['@apollo/client/react/hoc'], '@apollo/client/react/hoc');
|
|
18
16
|
const graphql = wrap('graphql');
|
|
19
17
|
exports.graphql = graphql;
|
|
20
18
|
const withApollo = wrap('withApollo');
|
|
@@ -4,17 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.useSubscription = exports.useReactiveVar = exports.useQuery = exports.useMutation = exports.useLazyQuery = exports.useApolloClient = exports.resetApolloContext = exports.parser = exports.operationName = exports.getApolloContext = exports.default = exports.DocumentType = exports.ApolloProvider = exports.ApolloConsumer = void 0;
|
|
7
|
-
|
|
8
7
|
var _ = require("../../../");
|
|
9
|
-
|
|
10
8
|
/** This file is an auto-generated shim, aliased in for "@apollo/client/react" in the webpack config.
|
|
11
9
|
* When components import '@apollo/client/react', 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['@apollo/client/react'], '@apollo/client/react');
|
|
17
14
|
|
|
15
|
+
const wrap = _.warnOnMissingExport.bind(null, global.shims['@apollo/client/react'], '@apollo/client/react');
|
|
18
16
|
const useApolloClient = wrap('useApolloClient');
|
|
19
17
|
exports.useApolloClient = useApolloClient;
|
|
20
18
|
const useLazyQuery = wrap('useLazyQuery');
|
|
@@ -4,17 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = exports.Tooltip = exports.Tabs = exports.Tab = exports.Spinner = exports.Select = exports.Scrim = exports.ProgressButton = exports.Popover = exports.Option = exports.ModalDialog = exports.LoaderBar = exports.Label = exports.KeyCodes = exports.Icon = exports.FontAwesome = exports.FixedDialog = exports.Dialog = exports.ContainerSize = exports.CloseOnClickOrKeydown = exports.ClickOutsideDetector = exports.ChoiceInput = exports.Card = exports.Button = exports.AnimatedButton = exports.AffixBottom = void 0;
|
|
7
|
-
|
|
8
7
|
var _ = require("../../");
|
|
9
|
-
|
|
10
8
|
/** This file is an auto-generated shim, aliased in for "@zimbra-client/blocks" in the webpack config.
|
|
11
9
|
* When components import '@zimbra-client/blocks', 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['@zimbra-client/blocks'], '@zimbra-client/blocks');
|
|
17
14
|
|
|
15
|
+
const wrap = _.warnOnMissingExport.bind(null, global.shims['@zimbra-client/blocks'], '@zimbra-client/blocks');
|
|
18
16
|
const Dialog = wrap('Dialog');
|
|
19
17
|
exports.Dialog = Dialog;
|
|
20
18
|
const FixedDialog = wrap('FixedDialog');
|
|
@@ -4,17 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.openExternalBrowser = exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _ = require("../../");
|
|
9
|
-
|
|
10
8
|
/** This file is an auto-generated shim, aliased in for "@zimbra-client/browser" in the webpack config.
|
|
11
9
|
* When components import '@zimbra-client/browser', 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['@zimbra-client/browser'], '@zimbra-client/browser');
|
|
17
14
|
|
|
15
|
+
const wrap = _.warnOnMissingExport.bind(null, global.shims['@zimbra-client/browser'], '@zimbra-client/browser');
|
|
18
16
|
const openExternalBrowser = wrap('openExternalBrowser');
|
|
19
17
|
exports.openExternalBrowser = openExternalBrowser;
|
|
20
18
|
var _default = global.shims['@zimbra-client/browser'];
|
|
@@ -4,17 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = exports.ZimletSlot = exports.ToolbarButton = exports.TinyMceComposer = exports.TextInput = exports.TextArea = exports.SmartList = exports.SignatureBox = exports.Sidebar = exports.Select = exports.SMIMEOperationDropDown = exports.ResponsiveModal = exports.PdfjsViewer = exports.NestedActionMenuItem = exports.NakedButton = exports.ModalDrawerToolbar = exports.ModalDrawer = exports.ModalDialog = exports.MenuItem = exports.MailSidebar = exports.InfiniteScroll = exports.HelpButton = exports.GenericMobileUIToolbar = exports.GenericMobileUISidebar = exports.FormGroup = exports.FolderListLight = exports.FolderList = exports.ErrorAlert = exports.DropDownWrapper = exports.DraggableCard = exports.DeleteWrapper = exports.ContextMenu = exports.ContactList = exports.ContactHoverCardWrapper = exports.ContactEditor = exports.ConfirmModalDialog = exports.ColorPicker = exports.CollapsedSubmenu = exports.CertificateModal = exports.CaptureBeforeUnload = exports.BackArrow = exports.Avatar = exports.AttachmentItem = exports.AppointmentEdit = exports.AlignedLabel = exports.AddressField = exports.AddMore = exports.ActionMenuMoveFolder = exports.ActionMenuItem = exports.ActionMenuGroup = exports.ActionMenu = exports.ActionButton = void 0;
|
|
7
|
-
|
|
8
7
|
var _ = require("../../");
|
|
9
|
-
|
|
10
8
|
/** This file is an auto-generated shim, aliased in for "@zimbra-client/components" in the webpack config.
|
|
11
9
|
* When components import '@zimbra-client/components', 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['@zimbra-client/components'], '@zimbra-client/components');
|
|
17
14
|
|
|
15
|
+
const wrap = _.warnOnMissingExport.bind(null, global.shims['@zimbra-client/components'], '@zimbra-client/components');
|
|
18
16
|
const MenuItem = wrap('MenuItem');
|
|
19
17
|
exports.MenuItem = MenuItem;
|
|
20
18
|
const Sidebar = wrap('Sidebar');
|
|
@@ -4,17 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.supportedMimes = exports.default = exports.ZIMBRA_ZIMLET_EVENTS = exports.PARTICIPATION_STATUS = exports.ATTENDEE_ROLE = void 0;
|
|
7
|
-
|
|
8
7
|
var _ = require("../../");
|
|
9
|
-
|
|
10
8
|
/** This file is an auto-generated shim, aliased in for "@zimbra-client/constants" in the webpack config.
|
|
11
9
|
* When components import '@zimbra-client/constants', 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['@zimbra-client/constants'], '@zimbra-client/constants');
|
|
17
14
|
|
|
15
|
+
const wrap = _.warnOnMissingExport.bind(null, global.shims['@zimbra-client/constants'], '@zimbra-client/constants');
|
|
18
16
|
const ATTENDEE_ROLE = wrap('ATTENDEE_ROLE');
|
|
19
17
|
exports.ATTENDEE_ROLE = ATTENDEE_ROLE;
|
|
20
18
|
const PARTICIPATION_STATUS = wrap('PARTICIPATION_STATUS');
|
|
@@ -4,17 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.withZimletIntlWrapper = exports.withTracking = exports.withTabManager = exports.withMediaQuery = exports.withIntlWrapper = exports.withIntlConsumer = exports.default = exports.clientConfiguration = void 0;
|
|
7
|
-
|
|
8
7
|
var _ = require("../../");
|
|
9
|
-
|
|
10
8
|
/** This file is an auto-generated shim, aliased in for "@zimbra-client/enhancers" in the webpack config.
|
|
11
9
|
* When components import '@zimbra-client/enhancers', 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['@zimbra-client/enhancers'], '@zimbra-client/enhancers');
|
|
17
14
|
|
|
15
|
+
const wrap = _.warnOnMissingExport.bind(null, global.shims['@zimbra-client/enhancers'], '@zimbra-client/enhancers');
|
|
18
16
|
const withMediaQuery = wrap('withMediaQuery');
|
|
19
17
|
exports.withMediaQuery = withMediaQuery;
|
|
20
18
|
const withTabManager = wrap('withTabManager');
|
|
@@ -4,17 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.faultCode = exports.errorMessage = exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _ = require("../../");
|
|
9
|
-
|
|
10
8
|
/** This file is an auto-generated shim, aliased in for "@zimbra-client/errors" in the webpack config.
|
|
11
9
|
* When components import '@zimbra-client/errors', 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['@zimbra-client/errors'], '@zimbra-client/errors');
|
|
17
14
|
|
|
15
|
+
const wrap = _.warnOnMissingExport.bind(null, global.shims['@zimbra-client/errors'], '@zimbra-client/errors');
|
|
18
16
|
const errorMessage = wrap('errorMessage');
|
|
19
17
|
exports.errorMessage = errorMessage;
|
|
20
18
|
const faultCode = wrap('faultCode');
|
|
@@ -4,17 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.withTags = exports.withTagCreate = exports.withTagAction = exports.withSetCustomMetaData = exports.withSearch = exports.withSaveSmimeCertificate = exports.withPreference = exports.withIdentities = exports.withGetSmimeCertificateInfo = exports.withGetCustomMetaData = exports.withDataSources = exports.withCreateContact = exports.withCreateCalendar = exports.withCreateAppointment = exports.withContactAction = exports.withCalendars = exports.withActionMutation = exports.withAccountInfo = exports.modifyFilterRules = exports.default = exports.cloneWithoutTypeName = exports.SetMailboxMetadataMutation = exports.SendShareNotificationMutation = exports.SearchFragment = exports.GetMailboxMetadataQuery = exports.GetFilterRules = exports.GetDocumentShareURLQuery = exports.CalendarsAndAppointmentsQuery = exports.CalendarCreateMutation = exports.AppointmentsQuery = void 0;
|
|
7
|
-
|
|
8
7
|
var _ = require("../../");
|
|
9
|
-
|
|
10
8
|
/** This file is an auto-generated shim, aliased in for "@zimbra-client/graphql" in the webpack config.
|
|
11
9
|
* When components import '@zimbra-client/graphql', 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['@zimbra-client/graphql'], '@zimbra-client/graphql');
|
|
17
14
|
|
|
15
|
+
const wrap = _.warnOnMissingExport.bind(null, global.shims['@zimbra-client/graphql'], '@zimbra-client/graphql');
|
|
18
16
|
const AppointmentsQuery = wrap('AppointmentsQuery');
|
|
19
17
|
exports.AppointmentsQuery = AppointmentsQuery;
|
|
20
18
|
const CalendarsAndAppointmentsQuery = wrap('CalendarsAndAppointmentsQuery');
|