@commercetools-frontend/mc-scripts 21.7.0 → 21.9.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/LICENSE +1 -1
- package/README.md +1 -42
- package/application-runtime/dist/commercetools-frontend-mc-scripts-application-runtime.cjs.d.ts +1 -0
- package/application-runtime/dist/commercetools-frontend-mc-scripts-application-runtime.cjs.dev.js +7 -0
- package/application-runtime/dist/commercetools-frontend-mc-scripts-application-runtime.cjs.js +7 -0
- package/{build/config/application-runtime.js → application-runtime/dist/commercetools-frontend-mc-scripts-application-runtime.cjs.prod.js} +2 -2
- package/application-runtime/dist/commercetools-frontend-mc-scripts-application-runtime.esm.js +5 -0
- package/application-runtime/package.json +4 -0
- package/bin/cli.js +1 -1
- package/cli/dist/commercetools-frontend-mc-scripts-cli.cjs.d.ts +1 -0
- package/cli/dist/commercetools-frontend-mc-scripts-cli.cjs.dev.js +361 -0
- package/cli/dist/commercetools-frontend-mc-scripts-cli.cjs.js +7 -0
- package/cli/dist/commercetools-frontend-mc-scripts-cli.cjs.prod.js +361 -0
- package/cli/dist/commercetools-frontend-mc-scripts-cli.esm.js +345 -0
- package/cli/package.json +4 -0
- package/config/create-webpack-config-for-development.js +7 -1
- package/config/create-webpack-config-for-production.js +7 -1
- package/config/vendors-to-transpile.js +5 -1
- package/dist/build-5357ad26.cjs.prod.js +224 -0
- package/dist/build-9b6d7eee.cjs.dev.js +224 -0
- package/dist/build-c483e87f.esm.js +209 -0
- package/dist/build-vite-3b82522e.cjs.dev.js +151 -0
- package/dist/build-vite-93abdc95.esm.js +139 -0
- package/dist/build-vite-b7cd993a.cjs.prod.js +151 -0
- package/dist/commercetools-frontend-mc-scripts.cjs.d.ts +1 -0
- package/dist/commercetools-frontend-mc-scripts.cjs.dev.js +30 -0
- package/dist/commercetools-frontend-mc-scripts.cjs.js +7 -0
- package/dist/commercetools-frontend-mc-scripts.cjs.prod.js +30 -0
- package/dist/commercetools-frontend-mc-scripts.esm.js +22 -0
- package/dist/compile-html-4361a0b3.esm.js +77 -0
- package/dist/compile-html-d6331c35.cjs.prod.js +87 -0
- package/dist/compile-html-d9e731aa.cjs.dev.js +87 -0
- package/dist/config-sync-6b31d972.esm.js +840 -0
- package/dist/config-sync-a478bc0f.cjs.dev.js +864 -0
- package/dist/config-sync-f07734e4.cjs.prod.js +859 -0
- package/{build/config/create-postcss-config.js → dist/create-postcss-config-04243dea.esm.js} +27 -25
- package/dist/create-postcss-config-760e2dc5.cjs.dev.js +90 -0
- package/dist/create-postcss-config-ddc3abee.cjs.prod.js +90 -0
- package/dist/create-webpack-config-for-development-76fdab59.cjs.prod.js +419 -0
- package/{build/config/create-webpack-config-for-development.js → dist/create-webpack-config-for-development-d93ae4b2.esm.js} +94 -57
- package/dist/create-webpack-config-for-development-dfd1c174.cjs.dev.js +419 -0
- package/{build/config/create-webpack-config-for-production.js → dist/create-webpack-config-for-production-9290479a.esm.js} +120 -54
- package/dist/create-webpack-config-for-production-bc8c1f37.cjs.dev.js +469 -0
- package/dist/create-webpack-config-for-production-d652ad1a.cjs.prod.js +469 -0
- package/dist/declarations/src/application-runtime.d.ts +1 -0
- package/dist/declarations/src/cli.d.ts +4 -0
- package/dist/declarations/src/commands/build-vite.d.ts +2 -0
- package/dist/declarations/src/commands/build.d.ts +2 -0
- package/dist/declarations/src/commands/compile-html.d.ts +3 -0
- package/dist/declarations/src/commands/config-sync.d.ts +3 -0
- package/dist/declarations/src/commands/login.d.ts +2 -0
- package/dist/declarations/src/commands/serve.d.ts +2 -0
- package/dist/declarations/src/commands/start-vite.d.ts +2 -0
- package/dist/declarations/src/commands/start.d.ts +2 -0
- package/dist/declarations/src/config/create-postcss-config.d.ts +4 -0
- package/dist/declarations/src/config/create-webpack-config-for-development.d.ts +10 -0
- package/dist/declarations/src/config/create-webpack-config-for-production.d.ts +10 -0
- package/dist/declarations/src/config/has-jsx-runtime.d.ts +2 -0
- package/dist/declarations/src/config/moment-locales.d.ts +2 -0
- package/dist/declarations/src/config/paths.d.ts +12 -0
- package/dist/declarations/src/config/vendors-to-transpile.d.ts +2 -0
- package/dist/declarations/src/config/webpack-dev-server.config.d.ts +6 -0
- package/dist/declarations/src/deprecated-entry-points.d.ts +7 -0
- package/dist/declarations/src/generated/core.d.ts +710 -0
- package/dist/declarations/src/generated/settings.d.ts +2485 -0
- package/dist/declarations/src/index.d.ts +3 -0
- package/dist/declarations/src/postcss.d.ts +1 -0
- package/dist/declarations/src/types.d.ts +82 -0
- package/dist/declarations/src/utils/auth.d.ts +6 -0
- package/dist/declarations/src/utils/credentials-storage.d.ts +11 -0
- package/dist/declarations/src/utils/get-config-diff.d.ts +3 -0
- package/dist/declarations/src/utils/graphql-requests.d.ts +80 -0
- package/dist/declarations/src/utils/user-agent.d.ts +2 -0
- package/dist/declarations/src/version.d.ts +2 -0
- package/dist/declarations/src/vite-plugins/vite-plugin-custom-application.d.ts +4 -0
- package/dist/declarations/src/vite-plugins/vite-plugin-dynamic-base-assets-globals.d.ts +3 -0
- package/dist/declarations/src/vite-plugins/vite-plugin-svgr.d.ts +3 -0
- package/dist/declarations/src/webpack-plugins/final-stats-writer-plugin.d.ts +12 -0
- package/dist/declarations/src/webpack-plugins/local-html-webpack-plugin.d.ts +5 -0
- package/dist/declarations/src/webpack.d.ts +2 -0
- package/dist/has-jsx-runtime-0b03b72e.cjs.prod.js +17 -0
- package/dist/has-jsx-runtime-3d4bb633.cjs.dev.js +17 -0
- package/{build/config/has-jsx-runtime.js → dist/has-jsx-runtime-8314226e.esm.js} +1 -3
- package/dist/login-7b7ae27e.esm.js +155 -0
- package/dist/login-b13f26e7.cjs.dev.js +165 -0
- package/dist/login-c11fb977.cjs.prod.js +165 -0
- package/dist/package-4b4fcf02.cjs.prod.js +139 -0
- package/dist/package-4c3e3fb7.cjs.dev.js +139 -0
- package/dist/package-8e6305bd.esm.js +137 -0
- package/dist/paths-16823f56.cjs.dev.js +55 -0
- package/dist/paths-76b66e74.cjs.prod.js +55 -0
- package/dist/paths-ed23d5a1.esm.js +46 -0
- package/dist/serve-12de323b.cjs.dev.js +70 -0
- package/dist/serve-784f4fcd.cjs.prod.js +70 -0
- package/dist/serve-d6b437b1.esm.js +62 -0
- package/dist/start-1b7dad90.cjs.prod.js +209 -0
- package/dist/start-45ca01f2.cjs.dev.js +209 -0
- package/dist/start-600d06a3.esm.js +194 -0
- package/dist/start-vite-22de08dc.cjs.dev.js +151 -0
- package/dist/start-vite-dc046cba.esm.js +138 -0
- package/dist/start-vite-fe13330b.cjs.prod.js +151 -0
- package/dist/user-agent-5f8ec93d.cjs.prod.js +106 -0
- package/dist/user-agent-ca628320.esm.js +94 -0
- package/dist/user-agent-ee57c98a.cjs.dev.js +106 -0
- package/dist/vendors-to-transpile-367e0ba8.cjs.prod.js +5 -0
- package/dist/vendors-to-transpile-68e03526.esm.js +3 -0
- package/dist/vendors-to-transpile-b51af5d3.cjs.dev.js +5 -0
- package/dist/vite-plugin-svgr-4205f2b5.cjs.dev.js +110 -0
- package/dist/vite-plugin-svgr-eb8524fa.esm.js +85 -0
- package/dist/vite-plugin-svgr-f3bbedbe.cjs.prod.js +110 -0
- package/package.json +56 -50
- package/postcss/dist/commercetools-frontend-mc-scripts-postcss.cjs.d.ts +1 -0
- package/postcss/dist/commercetools-frontend-mc-scripts-postcss.cjs.dev.js +14 -0
- package/postcss/dist/commercetools-frontend-mc-scripts-postcss.cjs.js +7 -0
- package/postcss/dist/commercetools-frontend-mc-scripts-postcss.cjs.prod.js +14 -0
- package/postcss/dist/commercetools-frontend-mc-scripts-postcss.esm.js +6 -0
- package/postcss/package.json +4 -0
- package/webpack/dist/commercetools-frontend-mc-scripts-webpack.cjs.d.ts +1 -0
- package/webpack/dist/commercetools-frontend-mc-scripts-webpack.cjs.dev.js +51 -0
- package/webpack/dist/commercetools-frontend-mc-scripts-webpack.cjs.js +7 -0
- package/webpack/dist/commercetools-frontend-mc-scripts-webpack.cjs.prod.js +51 -0
- package/webpack/dist/commercetools-frontend-mc-scripts-webpack.esm.js +42 -0
- package/webpack/package.json +4 -0
- package/build/bin/cli.js +0 -264
- package/build/commands/build-vite.js +0 -91
- package/build/commands/build.js +0 -140
- package/build/commands/compile-html.js +0 -53
- package/build/commands/config-sync.js +0 -176
- package/build/commands/login.js +0 -60
- package/build/commands/serve.js +0 -37
- package/build/commands/start-vite.js +0 -138
- package/build/commands/start.js +0 -108
- package/build/config/paths.js +0 -38
- package/build/config/vendors-to-transpile.js +0 -3
- package/build/config/webpack-dev-server.config.js +0 -69
- package/build/index.js +0 -16
- package/build/utils/auth.js +0 -34
- package/build/utils/auth.spec.js +0 -61
- package/build/utils/create-custom-application.settings.graphql +0 -8
- package/build/utils/credentials-storage.js +0 -72
- package/build/utils/credentials-storage.spec.js +0 -69
- package/build/utils/fetch-custom-application.settings.graphql +0 -36
- package/build/utils/fetch-user-organizations.core.graphql +0 -9
- package/build/utils/get-config-diff.js +0 -308
- package/build/utils/get-config-diff.spec.js +0 -285
- package/build/utils/graphql-requests.js +0 -105
- package/build/utils/graphql-requests.spec.js +0 -159
- package/build/utils/require-graphql.js +0 -15
- package/build/utils/update-custom-application.settings.graphql +0 -13
- package/build/utils/user-agent.js +0 -15
- package/build/webpack-plugins/final-stats-writer-plugin.js +0 -50
- package/build/webpack-plugins/local-html-webpack-plugin.js +0 -38
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import _asyncToGenerator from '@babel/runtime-corejs3/helpers/esm/asyncToGenerator';
|
|
2
|
+
import _regeneratorRuntime from '@babel/runtime-corejs3/regenerator';
|
|
3
|
+
import _parseInt from '@babel/runtime-corejs3/core-js-stable/parse-int';
|
|
4
|
+
import _JSON$stringify from '@babel/runtime-corejs3/core-js-stable/json/stringify';
|
|
5
|
+
import fs from 'fs-extra';
|
|
6
|
+
import path from 'path';
|
|
7
|
+
import { build } from 'vite';
|
|
8
|
+
import pluginGraphql from '@rollup/plugin-graphql';
|
|
9
|
+
import pluginReact from '@vitejs/plugin-react';
|
|
10
|
+
import { generateTemplate } from '@commercetools-frontend/mc-html-template';
|
|
11
|
+
import { packageLocation } from '@commercetools-frontend/assets';
|
|
12
|
+
import { p as paths } from './paths-ed23d5a1.esm.js';
|
|
13
|
+
import { v as vitePluginSvgr } from './vite-plugin-svgr-eb8524fa.esm.js';
|
|
14
|
+
import '@babel/runtime-corejs3/core-js-stable/instance/find';
|
|
15
|
+
import '@babel/runtime-corejs3/core-js-stable/instance/concat';
|
|
16
|
+
import 'fs';
|
|
17
|
+
import '@rollup/pluginutils';
|
|
18
|
+
|
|
19
|
+
// This script/function is injected into the `index.html` and used by Vite
|
|
20
|
+
// on runtime to build the assets URL (for example when using a separate CDN for the assets).
|
|
21
|
+
// Inspired by https://github.com/vitejs/vite/blob/main/playground/assets/vite.config-runtime-base.js
|
|
22
|
+
var dynamicBaseAssetsCode = "globalThis.__toCdnUrl = filePath => window.app.cdnUrl.replace(/\\/$/, '') + '/' + filePath;";
|
|
23
|
+
|
|
24
|
+
function vitePluginDynamicBaseAssetsGlobals() {
|
|
25
|
+
return {
|
|
26
|
+
name: 'dynamic-base-assets-globals',
|
|
27
|
+
transformIndexHtml: function transformIndexHtml(html, ctx) {
|
|
28
|
+
if (ctx.bundle) {
|
|
29
|
+
// Only inject during build
|
|
30
|
+
return [{
|
|
31
|
+
tag: 'script',
|
|
32
|
+
attrs: {
|
|
33
|
+
type: 'module'
|
|
34
|
+
},
|
|
35
|
+
children: dynamicBaseAssetsCode
|
|
36
|
+
}];
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
return html;
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function run() {
|
|
45
|
+
return _run.apply(this, arguments);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function _run() {
|
|
49
|
+
_run = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
50
|
+
var DEFAULT_PORT, appEntryPoint, html;
|
|
51
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
52
|
+
while (1) {
|
|
53
|
+
switch (_context.prev = _context.next) {
|
|
54
|
+
case 0:
|
|
55
|
+
DEFAULT_PORT = _parseInt(String(process.env.HTTP_PORT), 10) || 3001; // Ensure the `/public` folder exists.
|
|
56
|
+
|
|
57
|
+
fs.mkdirSync(paths.appBuild, {
|
|
58
|
+
recursive: true
|
|
59
|
+
}); // Generate `index.html` (template).
|
|
60
|
+
|
|
61
|
+
appEntryPoint = path.relative(paths.appRoot, paths.entryPoint);
|
|
62
|
+
html = generateTemplate({
|
|
63
|
+
// Define the module entry point (path relative from the `/public` folder).
|
|
64
|
+
// NOTE: that this is different from the development configuration.
|
|
65
|
+
scriptImports: ["<script type=\"module\" src=\"/".concat(appEntryPoint, "\"></script>")]
|
|
66
|
+
}); // Write `index.html` (template) into the `/public` folder.
|
|
67
|
+
|
|
68
|
+
fs.writeFileSync(paths.appIndexHtml, html, {
|
|
69
|
+
encoding: 'utf8'
|
|
70
|
+
});
|
|
71
|
+
_context.next = 7;
|
|
72
|
+
return build({
|
|
73
|
+
root: paths.appRoot,
|
|
74
|
+
base: './',
|
|
75
|
+
// <-- Important to allow configuring the runtime base path.
|
|
76
|
+
define: {
|
|
77
|
+
'process.env.DEBUG': _JSON$stringify(false),
|
|
78
|
+
'process.env.NODE_ENV': _JSON$stringify('production')
|
|
79
|
+
},
|
|
80
|
+
build: {
|
|
81
|
+
outDir: 'public',
|
|
82
|
+
rollupOptions: {
|
|
83
|
+
// This is necessary to instruct Vite that the `index.html` (template)
|
|
84
|
+
// is located in the `/public` folder.
|
|
85
|
+
// NOTE that after the build, Vite will write the `index.html` (template)
|
|
86
|
+
// at the `/public/public/index.html` location. See `fs.renameSync` below.
|
|
87
|
+
input: paths.appIndexHtml
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
server: {
|
|
91
|
+
port: DEFAULT_PORT
|
|
92
|
+
},
|
|
93
|
+
experimental: {
|
|
94
|
+
// https://vitejs.dev/guide/build.html#advanced-base-options
|
|
95
|
+
renderBuiltUrl: function renderBuiltUrl(filename, _ref) {
|
|
96
|
+
var hostType = _ref.hostType;
|
|
97
|
+
|
|
98
|
+
if (hostType === 'html') {
|
|
99
|
+
return "__CDN_URL__".concat(filename);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
return {
|
|
103
|
+
runtime: "window.__toCdnUrl(".concat(_JSON$stringify(filename), ")")
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
plugins: [pluginGraphql(), pluginReact({
|
|
108
|
+
jsxImportSource: '@emotion/react',
|
|
109
|
+
babel: {
|
|
110
|
+
plugins: ['@emotion/babel-plugin']
|
|
111
|
+
}
|
|
112
|
+
}), vitePluginSvgr(), vitePluginDynamicBaseAssetsGlobals()]
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
case 7:
|
|
116
|
+
// Rename `/public/public/index.html` to `/public/index.html.template`
|
|
117
|
+
fs.renameSync( // Because of our custom entry point path (`/public/index.html`),
|
|
118
|
+
// Vite will write the `index.html` to `/public/public/index.html`.
|
|
119
|
+
// We need to move this file to the `/public` folder and rename it
|
|
120
|
+
// to `index.html.template` (as expected by the `compile-html` command).
|
|
121
|
+
path.join(paths.appBuild, 'public/index.html'), paths.appIndexHtmlTemplate); // Clean up nested folder
|
|
122
|
+
|
|
123
|
+
fs.rmdirSync(path.join(paths.appBuild, 'public')); // Copy public assets
|
|
124
|
+
|
|
125
|
+
fs.copySync(path.join(packageLocation, 'html-page'), paths.appBuild, {
|
|
126
|
+
dereference: true
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
case 10:
|
|
130
|
+
case "end":
|
|
131
|
+
return _context.stop();
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}, _callee);
|
|
135
|
+
}));
|
|
136
|
+
return _run.apply(this, arguments);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export { run as default };
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _asyncToGenerator = require('@babel/runtime-corejs3/helpers/asyncToGenerator');
|
|
4
|
+
var _regeneratorRuntime = require('@babel/runtime-corejs3/regenerator');
|
|
5
|
+
var _parseInt = require('@babel/runtime-corejs3/core-js-stable/parse-int');
|
|
6
|
+
var _JSON$stringify = require('@babel/runtime-corejs3/core-js-stable/json/stringify');
|
|
7
|
+
var fs = require('fs-extra');
|
|
8
|
+
var path = require('path');
|
|
9
|
+
var vite = require('vite');
|
|
10
|
+
var pluginGraphql = require('@rollup/plugin-graphql');
|
|
11
|
+
var pluginReact = require('@vitejs/plugin-react');
|
|
12
|
+
var mcHtmlTemplate = require('@commercetools-frontend/mc-html-template');
|
|
13
|
+
var assets = require('@commercetools-frontend/assets');
|
|
14
|
+
var paths = require('./paths-76b66e74.cjs.prod.js');
|
|
15
|
+
var vitePluginSvgr = require('./vite-plugin-svgr-f3bbedbe.cjs.prod.js');
|
|
16
|
+
require('@babel/runtime-corejs3/core-js-stable/instance/find');
|
|
17
|
+
require('@babel/runtime-corejs3/core-js-stable/instance/concat');
|
|
18
|
+
require('fs');
|
|
19
|
+
require('@rollup/pluginutils');
|
|
20
|
+
|
|
21
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
22
|
+
|
|
23
|
+
var _regeneratorRuntime__default = /*#__PURE__*/_interopDefault(_regeneratorRuntime);
|
|
24
|
+
var _parseInt__default = /*#__PURE__*/_interopDefault(_parseInt);
|
|
25
|
+
var _JSON$stringify__default = /*#__PURE__*/_interopDefault(_JSON$stringify);
|
|
26
|
+
var fs__default = /*#__PURE__*/_interopDefault(fs);
|
|
27
|
+
var path__default = /*#__PURE__*/_interopDefault(path);
|
|
28
|
+
var pluginGraphql__default = /*#__PURE__*/_interopDefault(pluginGraphql);
|
|
29
|
+
var pluginReact__default = /*#__PURE__*/_interopDefault(pluginReact);
|
|
30
|
+
|
|
31
|
+
// This script/function is injected into the `index.html` and used by Vite
|
|
32
|
+
// on runtime to build the assets URL (for example when using a separate CDN for the assets).
|
|
33
|
+
// Inspired by https://github.com/vitejs/vite/blob/main/playground/assets/vite.config-runtime-base.js
|
|
34
|
+
var dynamicBaseAssetsCode = "globalThis.__toCdnUrl = filePath => window.app.cdnUrl.replace(/\\/$/, '') + '/' + filePath;";
|
|
35
|
+
|
|
36
|
+
function vitePluginDynamicBaseAssetsGlobals() {
|
|
37
|
+
return {
|
|
38
|
+
name: 'dynamic-base-assets-globals',
|
|
39
|
+
transformIndexHtml: function transformIndexHtml(html, ctx) {
|
|
40
|
+
if (ctx.bundle) {
|
|
41
|
+
// Only inject during build
|
|
42
|
+
return [{
|
|
43
|
+
tag: 'script',
|
|
44
|
+
attrs: {
|
|
45
|
+
type: 'module'
|
|
46
|
+
},
|
|
47
|
+
children: dynamicBaseAssetsCode
|
|
48
|
+
}];
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
return html;
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function run() {
|
|
57
|
+
return _run.apply(this, arguments);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function _run() {
|
|
61
|
+
_run = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee() {
|
|
62
|
+
var DEFAULT_PORT, appEntryPoint, html;
|
|
63
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
|
|
64
|
+
while (1) {
|
|
65
|
+
switch (_context.prev = _context.next) {
|
|
66
|
+
case 0:
|
|
67
|
+
DEFAULT_PORT = _parseInt__default["default"](String(process.env.HTTP_PORT), 10) || 3001; // Ensure the `/public` folder exists.
|
|
68
|
+
|
|
69
|
+
fs__default["default"].mkdirSync(paths.paths.appBuild, {
|
|
70
|
+
recursive: true
|
|
71
|
+
}); // Generate `index.html` (template).
|
|
72
|
+
|
|
73
|
+
appEntryPoint = path__default["default"].relative(paths.paths.appRoot, paths.paths.entryPoint);
|
|
74
|
+
html = mcHtmlTemplate.generateTemplate({
|
|
75
|
+
// Define the module entry point (path relative from the `/public` folder).
|
|
76
|
+
// NOTE: that this is different from the development configuration.
|
|
77
|
+
scriptImports: ["<script type=\"module\" src=\"/".concat(appEntryPoint, "\"></script>")]
|
|
78
|
+
}); // Write `index.html` (template) into the `/public` folder.
|
|
79
|
+
|
|
80
|
+
fs__default["default"].writeFileSync(paths.paths.appIndexHtml, html, {
|
|
81
|
+
encoding: 'utf8'
|
|
82
|
+
});
|
|
83
|
+
_context.next = 7;
|
|
84
|
+
return vite.build({
|
|
85
|
+
root: paths.paths.appRoot,
|
|
86
|
+
base: './',
|
|
87
|
+
// <-- Important to allow configuring the runtime base path.
|
|
88
|
+
define: {
|
|
89
|
+
'process.env.DEBUG': _JSON$stringify__default["default"](false),
|
|
90
|
+
'process.env.NODE_ENV': _JSON$stringify__default["default"]('production')
|
|
91
|
+
},
|
|
92
|
+
build: {
|
|
93
|
+
outDir: 'public',
|
|
94
|
+
rollupOptions: {
|
|
95
|
+
// This is necessary to instruct Vite that the `index.html` (template)
|
|
96
|
+
// is located in the `/public` folder.
|
|
97
|
+
// NOTE that after the build, Vite will write the `index.html` (template)
|
|
98
|
+
// at the `/public/public/index.html` location. See `fs.renameSync` below.
|
|
99
|
+
input: paths.paths.appIndexHtml
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
server: {
|
|
103
|
+
port: DEFAULT_PORT
|
|
104
|
+
},
|
|
105
|
+
experimental: {
|
|
106
|
+
// https://vitejs.dev/guide/build.html#advanced-base-options
|
|
107
|
+
renderBuiltUrl: function renderBuiltUrl(filename, _ref) {
|
|
108
|
+
var hostType = _ref.hostType;
|
|
109
|
+
|
|
110
|
+
if (hostType === 'html') {
|
|
111
|
+
return "__CDN_URL__".concat(filename);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
return {
|
|
115
|
+
runtime: "window.__toCdnUrl(".concat(_JSON$stringify__default["default"](filename), ")")
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
plugins: [pluginGraphql__default["default"](), pluginReact__default["default"]({
|
|
120
|
+
jsxImportSource: '@emotion/react',
|
|
121
|
+
babel: {
|
|
122
|
+
plugins: ['@emotion/babel-plugin']
|
|
123
|
+
}
|
|
124
|
+
}), vitePluginSvgr.vitePluginSvgr(), vitePluginDynamicBaseAssetsGlobals()]
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
case 7:
|
|
128
|
+
// Rename `/public/public/index.html` to `/public/index.html.template`
|
|
129
|
+
fs__default["default"].renameSync( // Because of our custom entry point path (`/public/index.html`),
|
|
130
|
+
// Vite will write the `index.html` to `/public/public/index.html`.
|
|
131
|
+
// We need to move this file to the `/public` folder and rename it
|
|
132
|
+
// to `index.html.template` (as expected by the `compile-html` command).
|
|
133
|
+
path__default["default"].join(paths.paths.appBuild, 'public/index.html'), paths.paths.appIndexHtmlTemplate); // Clean up nested folder
|
|
134
|
+
|
|
135
|
+
fs__default["default"].rmdirSync(path__default["default"].join(paths.paths.appBuild, 'public')); // Copy public assets
|
|
136
|
+
|
|
137
|
+
fs__default["default"].copySync(path__default["default"].join(assets.packageLocation, 'html-page'), paths.paths.appBuild, {
|
|
138
|
+
dereference: true
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
case 10:
|
|
142
|
+
case "end":
|
|
143
|
+
return _context.stop();
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}, _callee);
|
|
147
|
+
}));
|
|
148
|
+
return _run.apply(this, arguments);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
exports["default"] = run;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./declarations/src/index";
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var vendorsToTranspile = require('./vendors-to-transpile-b51af5d3.cjs.dev.js');
|
|
6
|
+
|
|
7
|
+
// NOTE: This string will be replaced on build time with the package version.
|
|
8
|
+
var version = "21.9.0";
|
|
9
|
+
|
|
10
|
+
// These exports are deprecated.
|
|
11
|
+
function createWebpackConfigForDevelopment(options) {
|
|
12
|
+
console.log('Importing the function "createWebpackConfigForDevelopment" from the main entry point "@commercetools-frontend/mc-scripts" is deprecated. Use the entry point "@commercetools-frontend/mc-scripts/create-webpack-config" instead.');
|
|
13
|
+
return require('@commercetools-frontend/mc-scripts/webpack').createWebpackConfigForDevelopment(options);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function createWebpackConfigForProduction(options) {
|
|
17
|
+
console.log('Importing the function "createWebpackConfigForProduction" from the main entry point "@commercetools-frontend/mc-scripts" is deprecated. Use the entry point "@commercetools-frontend/mc-scripts/create-webpack-config" instead.');
|
|
18
|
+
return require('@commercetools-frontend/mc-scripts/webpack').createWebpackConfigForProduction(options);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function createPostcssConfig(options) {
|
|
22
|
+
console.log('Importing the function "createPostcssConfig" from the main entry point "@commercetools-frontend/mc-scripts" is deprecated. Use the entry point "@commercetools-frontend/mc-scripts/create-postcss-config" instead.');
|
|
23
|
+
return require('@commercetools-frontend/mc-scripts/postcss').createPostcssConfig(options);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
exports.vendorsToTranspile = vendorsToTranspile.vendorsToTranspile;
|
|
27
|
+
exports.createPostcssConfig = createPostcssConfig;
|
|
28
|
+
exports.createWebpackConfigForDevelopment = createWebpackConfigForDevelopment;
|
|
29
|
+
exports.createWebpackConfigForProduction = createWebpackConfigForProduction;
|
|
30
|
+
exports.version = version;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var vendorsToTranspile = require('./vendors-to-transpile-367e0ba8.cjs.prod.js');
|
|
6
|
+
|
|
7
|
+
// NOTE: This string will be replaced on build time with the package version.
|
|
8
|
+
var version = "21.9.0";
|
|
9
|
+
|
|
10
|
+
// These exports are deprecated.
|
|
11
|
+
function createWebpackConfigForDevelopment(options) {
|
|
12
|
+
console.log('Importing the function "createWebpackConfigForDevelopment" from the main entry point "@commercetools-frontend/mc-scripts" is deprecated. Use the entry point "@commercetools-frontend/mc-scripts/create-webpack-config" instead.');
|
|
13
|
+
return require('@commercetools-frontend/mc-scripts/webpack').createWebpackConfigForDevelopment(options);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function createWebpackConfigForProduction(options) {
|
|
17
|
+
console.log('Importing the function "createWebpackConfigForProduction" from the main entry point "@commercetools-frontend/mc-scripts" is deprecated. Use the entry point "@commercetools-frontend/mc-scripts/create-webpack-config" instead.');
|
|
18
|
+
return require('@commercetools-frontend/mc-scripts/webpack').createWebpackConfigForProduction(options);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function createPostcssConfig(options) {
|
|
22
|
+
console.log('Importing the function "createPostcssConfig" from the main entry point "@commercetools-frontend/mc-scripts" is deprecated. Use the entry point "@commercetools-frontend/mc-scripts/create-postcss-config" instead.');
|
|
23
|
+
return require('@commercetools-frontend/mc-scripts/postcss').createPostcssConfig(options);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
exports.vendorsToTranspile = vendorsToTranspile.vendorsToTranspile;
|
|
27
|
+
exports.createPostcssConfig = createPostcssConfig;
|
|
28
|
+
exports.createWebpackConfigForDevelopment = createWebpackConfigForDevelopment;
|
|
29
|
+
exports.createWebpackConfigForProduction = createWebpackConfigForProduction;
|
|
30
|
+
exports.version = version;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export { v as vendorsToTranspile } from './vendors-to-transpile-68e03526.esm.js';
|
|
2
|
+
|
|
3
|
+
// NOTE: This string will be replaced on build time with the package version.
|
|
4
|
+
var version = "21.9.0";
|
|
5
|
+
|
|
6
|
+
// These exports are deprecated.
|
|
7
|
+
function createWebpackConfigForDevelopment(options) {
|
|
8
|
+
console.log('Importing the function "createWebpackConfigForDevelopment" from the main entry point "@commercetools-frontend/mc-scripts" is deprecated. Use the entry point "@commercetools-frontend/mc-scripts/create-webpack-config" instead.');
|
|
9
|
+
return require('@commercetools-frontend/mc-scripts/webpack').createWebpackConfigForDevelopment(options);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function createWebpackConfigForProduction(options) {
|
|
13
|
+
console.log('Importing the function "createWebpackConfigForProduction" from the main entry point "@commercetools-frontend/mc-scripts" is deprecated. Use the entry point "@commercetools-frontend/mc-scripts/create-webpack-config" instead.');
|
|
14
|
+
return require('@commercetools-frontend/mc-scripts/webpack').createWebpackConfigForProduction(options);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function createPostcssConfig(options) {
|
|
18
|
+
console.log('Importing the function "createPostcssConfig" from the main entry point "@commercetools-frontend/mc-scripts" is deprecated. Use the entry point "@commercetools-frontend/mc-scripts/create-postcss-config" instead.');
|
|
19
|
+
return require('@commercetools-frontend/mc-scripts/postcss').createPostcssConfig(options);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { createPostcssConfig, createWebpackConfigForDevelopment, createWebpackConfigForProduction, version };
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import _asyncToGenerator from '@babel/runtime-corejs3/helpers/esm/asyncToGenerator';
|
|
2
|
+
import _regeneratorRuntime from '@babel/runtime-corejs3/regenerator';
|
|
3
|
+
import _concatInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/concat';
|
|
4
|
+
import _JSON$stringify from '@babel/runtime-corejs3/core-js-stable/json/stringify';
|
|
5
|
+
import fs from 'fs';
|
|
6
|
+
import chalk from 'chalk';
|
|
7
|
+
import { compileHtml } from '@commercetools-frontend/mc-html-template';
|
|
8
|
+
import { p as paths } from './paths-ed23d5a1.esm.js';
|
|
9
|
+
import '@babel/runtime-corejs3/core-js-stable/instance/find';
|
|
10
|
+
import 'path';
|
|
11
|
+
|
|
12
|
+
var appDirectory = fs.realpathSync(process.cwd());
|
|
13
|
+
|
|
14
|
+
function run(_x) {
|
|
15
|
+
return _run.apply(this, arguments);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function _run() {
|
|
19
|
+
_run = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(options) {
|
|
20
|
+
var compiled, transformerPath, transformerFn, _context;
|
|
21
|
+
|
|
22
|
+
return _regeneratorRuntime.wrap(function _callee$(_context2) {
|
|
23
|
+
while (1) {
|
|
24
|
+
switch (_context2.prev = _context2.next) {
|
|
25
|
+
case 0:
|
|
26
|
+
console.log('Compiling index.html...');
|
|
27
|
+
_context2.next = 3;
|
|
28
|
+
return compileHtml(paths.appIndexHtmlTemplate);
|
|
29
|
+
|
|
30
|
+
case 3:
|
|
31
|
+
compiled = _context2.sent;
|
|
32
|
+
fs.writeFileSync(paths.appIndexHtml, compiled.indexHtmlContent, {
|
|
33
|
+
encoding: 'utf8'
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
if (!options.transformer) {
|
|
37
|
+
_context2.next = 17;
|
|
38
|
+
break;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
_context2.prev = 6;
|
|
42
|
+
transformerPath = require.resolve(options.transformer, {
|
|
43
|
+
paths: [appDirectory]
|
|
44
|
+
});
|
|
45
|
+
transformerFn = require(transformerPath);
|
|
46
|
+
transformerFn(compiled);
|
|
47
|
+
_context2.next = 15;
|
|
48
|
+
break;
|
|
49
|
+
|
|
50
|
+
case 12:
|
|
51
|
+
_context2.prev = 12;
|
|
52
|
+
_context2.t0 = _context2["catch"](6);
|
|
53
|
+
throw new Error(_concatInstanceProperty(_context = "Could not load transformer module \"".concat(options.transformer, "\"\n")).call(_context, _context2.t0 instanceof Error ? _context2.t0.stack : ''));
|
|
54
|
+
|
|
55
|
+
case 15:
|
|
56
|
+
_context2.next = 18;
|
|
57
|
+
break;
|
|
58
|
+
|
|
59
|
+
case 17:
|
|
60
|
+
if (options.printSecurityHeaders) {
|
|
61
|
+
console.log(_JSON$stringify(compiled.headers));
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
case 18:
|
|
65
|
+
console.log(chalk.green('Compiled successfully.\n'));
|
|
66
|
+
|
|
67
|
+
case 19:
|
|
68
|
+
case "end":
|
|
69
|
+
return _context2.stop();
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}, _callee, null, [[6, 12]]);
|
|
73
|
+
}));
|
|
74
|
+
return _run.apply(this, arguments);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export { run as default };
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _asyncToGenerator = require('@babel/runtime-corejs3/helpers/asyncToGenerator');
|
|
4
|
+
var _regeneratorRuntime = require('@babel/runtime-corejs3/regenerator');
|
|
5
|
+
var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
|
|
6
|
+
var _JSON$stringify = require('@babel/runtime-corejs3/core-js-stable/json/stringify');
|
|
7
|
+
var fs = require('fs');
|
|
8
|
+
var chalk = require('chalk');
|
|
9
|
+
var mcHtmlTemplate = require('@commercetools-frontend/mc-html-template');
|
|
10
|
+
var paths = require('./paths-76b66e74.cjs.prod.js');
|
|
11
|
+
require('@babel/runtime-corejs3/core-js-stable/instance/find');
|
|
12
|
+
require('path');
|
|
13
|
+
|
|
14
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
15
|
+
|
|
16
|
+
var _regeneratorRuntime__default = /*#__PURE__*/_interopDefault(_regeneratorRuntime);
|
|
17
|
+
var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInstanceProperty);
|
|
18
|
+
var _JSON$stringify__default = /*#__PURE__*/_interopDefault(_JSON$stringify);
|
|
19
|
+
var fs__default = /*#__PURE__*/_interopDefault(fs);
|
|
20
|
+
var chalk__default = /*#__PURE__*/_interopDefault(chalk);
|
|
21
|
+
|
|
22
|
+
var appDirectory = fs__default["default"].realpathSync(process.cwd());
|
|
23
|
+
|
|
24
|
+
function run(_x) {
|
|
25
|
+
return _run.apply(this, arguments);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function _run() {
|
|
29
|
+
_run = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(options) {
|
|
30
|
+
var compiled, transformerPath, transformerFn, _context;
|
|
31
|
+
|
|
32
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee$(_context2) {
|
|
33
|
+
while (1) {
|
|
34
|
+
switch (_context2.prev = _context2.next) {
|
|
35
|
+
case 0:
|
|
36
|
+
console.log('Compiling index.html...');
|
|
37
|
+
_context2.next = 3;
|
|
38
|
+
return mcHtmlTemplate.compileHtml(paths.paths.appIndexHtmlTemplate);
|
|
39
|
+
|
|
40
|
+
case 3:
|
|
41
|
+
compiled = _context2.sent;
|
|
42
|
+
fs__default["default"].writeFileSync(paths.paths.appIndexHtml, compiled.indexHtmlContent, {
|
|
43
|
+
encoding: 'utf8'
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
if (!options.transformer) {
|
|
47
|
+
_context2.next = 17;
|
|
48
|
+
break;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
_context2.prev = 6;
|
|
52
|
+
transformerPath = require.resolve(options.transformer, {
|
|
53
|
+
paths: [appDirectory]
|
|
54
|
+
});
|
|
55
|
+
transformerFn = require(transformerPath);
|
|
56
|
+
transformerFn(compiled);
|
|
57
|
+
_context2.next = 15;
|
|
58
|
+
break;
|
|
59
|
+
|
|
60
|
+
case 12:
|
|
61
|
+
_context2.prev = 12;
|
|
62
|
+
_context2.t0 = _context2["catch"](6);
|
|
63
|
+
throw new Error(_concatInstanceProperty__default["default"](_context = "Could not load transformer module \"".concat(options.transformer, "\"\n")).call(_context, _context2.t0 instanceof Error ? _context2.t0.stack : ''));
|
|
64
|
+
|
|
65
|
+
case 15:
|
|
66
|
+
_context2.next = 18;
|
|
67
|
+
break;
|
|
68
|
+
|
|
69
|
+
case 17:
|
|
70
|
+
if (options.printSecurityHeaders) {
|
|
71
|
+
console.log(_JSON$stringify__default["default"](compiled.headers));
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
case 18:
|
|
75
|
+
console.log(chalk__default["default"].green('Compiled successfully.\n'));
|
|
76
|
+
|
|
77
|
+
case 19:
|
|
78
|
+
case "end":
|
|
79
|
+
return _context2.stop();
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}, _callee, null, [[6, 12]]);
|
|
83
|
+
}));
|
|
84
|
+
return _run.apply(this, arguments);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
exports["default"] = run;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _asyncToGenerator = require('@babel/runtime-corejs3/helpers/asyncToGenerator');
|
|
4
|
+
var _regeneratorRuntime = require('@babel/runtime-corejs3/regenerator');
|
|
5
|
+
var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
|
|
6
|
+
var _JSON$stringify = require('@babel/runtime-corejs3/core-js-stable/json/stringify');
|
|
7
|
+
var fs = require('fs');
|
|
8
|
+
var chalk = require('chalk');
|
|
9
|
+
var mcHtmlTemplate = require('@commercetools-frontend/mc-html-template');
|
|
10
|
+
var paths = require('./paths-16823f56.cjs.dev.js');
|
|
11
|
+
require('@babel/runtime-corejs3/core-js-stable/instance/find');
|
|
12
|
+
require('path');
|
|
13
|
+
|
|
14
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
15
|
+
|
|
16
|
+
var _regeneratorRuntime__default = /*#__PURE__*/_interopDefault(_regeneratorRuntime);
|
|
17
|
+
var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInstanceProperty);
|
|
18
|
+
var _JSON$stringify__default = /*#__PURE__*/_interopDefault(_JSON$stringify);
|
|
19
|
+
var fs__default = /*#__PURE__*/_interopDefault(fs);
|
|
20
|
+
var chalk__default = /*#__PURE__*/_interopDefault(chalk);
|
|
21
|
+
|
|
22
|
+
var appDirectory = fs__default["default"].realpathSync(process.cwd());
|
|
23
|
+
|
|
24
|
+
function run(_x) {
|
|
25
|
+
return _run.apply(this, arguments);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function _run() {
|
|
29
|
+
_run = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(options) {
|
|
30
|
+
var compiled, transformerPath, transformerFn, _context;
|
|
31
|
+
|
|
32
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee$(_context2) {
|
|
33
|
+
while (1) {
|
|
34
|
+
switch (_context2.prev = _context2.next) {
|
|
35
|
+
case 0:
|
|
36
|
+
console.log('Compiling index.html...');
|
|
37
|
+
_context2.next = 3;
|
|
38
|
+
return mcHtmlTemplate.compileHtml(paths.paths.appIndexHtmlTemplate);
|
|
39
|
+
|
|
40
|
+
case 3:
|
|
41
|
+
compiled = _context2.sent;
|
|
42
|
+
fs__default["default"].writeFileSync(paths.paths.appIndexHtml, compiled.indexHtmlContent, {
|
|
43
|
+
encoding: 'utf8'
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
if (!options.transformer) {
|
|
47
|
+
_context2.next = 17;
|
|
48
|
+
break;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
_context2.prev = 6;
|
|
52
|
+
transformerPath = require.resolve(options.transformer, {
|
|
53
|
+
paths: [appDirectory]
|
|
54
|
+
});
|
|
55
|
+
transformerFn = require(transformerPath);
|
|
56
|
+
transformerFn(compiled);
|
|
57
|
+
_context2.next = 15;
|
|
58
|
+
break;
|
|
59
|
+
|
|
60
|
+
case 12:
|
|
61
|
+
_context2.prev = 12;
|
|
62
|
+
_context2.t0 = _context2["catch"](6);
|
|
63
|
+
throw new Error(_concatInstanceProperty__default["default"](_context = "Could not load transformer module \"".concat(options.transformer, "\"\n")).call(_context, _context2.t0 instanceof Error ? _context2.t0.stack : ''));
|
|
64
|
+
|
|
65
|
+
case 15:
|
|
66
|
+
_context2.next = 18;
|
|
67
|
+
break;
|
|
68
|
+
|
|
69
|
+
case 17:
|
|
70
|
+
if (options.printSecurityHeaders) {
|
|
71
|
+
console.log(_JSON$stringify__default["default"](compiled.headers));
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
case 18:
|
|
75
|
+
console.log(chalk__default["default"].green('Compiled successfully.\n'));
|
|
76
|
+
|
|
77
|
+
case 19:
|
|
78
|
+
case "end":
|
|
79
|
+
return _context2.stop();
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}, _callee, null, [[6, 12]]);
|
|
83
|
+
}));
|
|
84
|
+
return _run.apply(this, arguments);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
exports["default"] = run;
|