eddev 0.2.65 → 0.2.67-beta1

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.
Files changed (190) hide show
  1. package/admin/components/ImageWell.d.ts +2 -3
  2. package/admin/components/ImageWell.js +39 -51
  3. package/admin/defineField.d.ts +2 -2
  4. package/admin/defineWidget.d.ts +1 -1
  5. package/admin/defineWidget.js +2 -2
  6. package/admin/index.js +5 -1
  7. package/admin/installFieldTypes.js +26 -26
  8. package/admin/runWidgets.js +17 -28
  9. package/admin/selectMedia.d.ts +2 -2
  10. package/admin/selectMedia.js +1 -1
  11. package/blocks/ContentBlocks.d.ts +6 -6
  12. package/blocks/ContentBlocks.js +58 -66
  13. package/blocks/ErrorBoundaryEditor.d.ts +1 -1
  14. package/blocks/ErrorBoundaryEditor.js +16 -45
  15. package/blocks/ErrorBoundaryFrontend.d.ts +1 -1
  16. package/blocks/ErrorBoundaryFrontend.js +16 -45
  17. package/blocks/InspectorControls.d.ts +1 -1
  18. package/blocks/InspectorControls.js +3 -3
  19. package/blocks/blockAttributes.d.ts +2 -2
  20. package/blocks/blockAttributes.js +24 -44
  21. package/blocks/index.js +5 -1
  22. package/blocks/inlineEditing.d.ts +7 -7
  23. package/blocks/inlineEditing.js +36 -55
  24. package/blocks/installGutenbergHooks.js +48 -68
  25. package/build/babel/plugin-name-defined-components.js +15 -16
  26. package/build/build-favicon.js +11 -62
  27. package/build/clean.js +5 -52
  28. package/build/create-codegen-worker.js +78 -33
  29. package/build/create-serverless-dev-worker.js +61 -39
  30. package/build/create-webpack-worker.js +65 -33
  31. package/build/file-tree.d.ts +2 -2
  32. package/build/file-tree.js +12 -12
  33. package/build/get-webpack-config.js +341 -395
  34. package/build/graphql-codegen/graphql-codegen-files.js +31 -25
  35. package/build/graphql-codegen/graphql-codegen-no-duplicates.js +4 -4
  36. package/build/graphql-codegen/graphql-codegen-queries.js +102 -99
  37. package/build/manifests/manifest-blocks.d.ts +1 -1
  38. package/build/manifests/manifest-blocks.js +37 -29
  39. package/build/manifests/manifest-fields.d.ts +1 -1
  40. package/build/manifests/manifest-fields.js +23 -21
  41. package/build/manifests/manifest-views.d.ts +1 -1
  42. package/build/manifests/manifest-views.js +32 -25
  43. package/build/manifests/manifest-widgets.d.ts +1 -1
  44. package/build/manifests/manifest-widgets.js +22 -20
  45. package/build/manifests/manifest.d.ts +2 -2
  46. package/build/manifests/manifest.js +30 -90
  47. package/build/reporter.d.ts +1 -1
  48. package/build/reporter.js +29 -32
  49. package/build/serverless/create-next-app.d.ts +1 -1
  50. package/build/serverless/create-next-app.js +245 -467
  51. package/build/state/codegen-state.d.ts +4 -4
  52. package/build/state/compiler-state.d.ts +5 -5
  53. package/build/state/serverless-state.d.ts +3 -3
  54. package/build/workers/codegen-worker-script.js +392 -507
  55. package/build/workers/serverless-worker-dev-script.js +4 -4
  56. package/build/workers/webpack-worker-script.js +89 -150
  57. package/cli/build.dev.d.ts +1 -1
  58. package/cli/build.dev.js +79 -126
  59. package/cli/build.prod.d.ts +1 -1
  60. package/cli/build.prod.js +42 -98
  61. package/cli/cli.js +16 -55
  62. package/cli/display/components/BundleDisplay.d.ts +1 -2
  63. package/cli/display/components/BundleDisplay.js +13 -24
  64. package/cli/display/components/CodegenDisplay.d.ts +1 -2
  65. package/cli/display/components/CodegenDisplay.js +14 -25
  66. package/cli/display/components/DevCLIDisplay.d.ts +2 -3
  67. package/cli/display/components/DevCLIDisplay.js +14 -25
  68. package/cli/display/components/Fullscreen.js +9 -20
  69. package/cli/display/components/ServerlessDisplay.d.ts +2 -3
  70. package/cli/display/components/ServerlessDisplay.js +15 -26
  71. package/cli/display/components/StatusIcon.d.ts +2 -3
  72. package/cli/display/components/StatusIcon.js +3 -3
  73. package/cli/preinstall.js +4 -5
  74. package/cli/setup.js +25 -73
  75. package/components/AdminBar.d.ts +1 -2
  76. package/components/AdminBar.js +37 -3
  77. package/components/BrowserRouter.d.ts +2 -2
  78. package/components/BrowserRouter.js +41 -54
  79. package/components/InlinePage.d.ts +2 -2
  80. package/components/InlinePage.js +17 -29
  81. package/components/NextRouter.d.ts +2 -2
  82. package/components/NextRouter.js +20 -29
  83. package/components/index.js +5 -1
  84. package/config/config-schema.d.ts +1 -1
  85. package/config/config-schema.js +1 -1
  86. package/config/create-schema-file.js +6 -6
  87. package/config/get-config.js +10 -13
  88. package/config/index.js +5 -1
  89. package/config/parse-config.js +1 -1
  90. package/config/print-zod-errors.js +3 -3
  91. package/dev-ui/components/BreakpointColumnHeader.d.ts +2 -3
  92. package/dev-ui/components/BreakpointColumnHeader.js +7 -18
  93. package/dev-ui/components/BreakpointIndicator.d.ts +1 -2
  94. package/dev-ui/components/BreakpointIndicator.js +25 -32
  95. package/dev-ui/components/DevUI.d.ts +1 -2
  96. package/dev-ui/components/DevUI.js +13 -13
  97. package/dev-ui/components/Launcher.d.ts +2 -2
  98. package/dev-ui/components/Launcher.js +13 -25
  99. package/dev-ui/components/PanelWrapper.d.ts +2 -2
  100. package/dev-ui/components/PanelWrapper.js +8 -8
  101. package/dev-ui/components/ResponsiveLerpControl.d.ts +2 -3
  102. package/dev-ui/components/ResponsiveLerpControl.js +27 -38
  103. package/dev-ui/components/ResponsiveScaleEditor.d.ts +4 -5
  104. package/dev-ui/components/ResponsiveScaleEditor.js +64 -78
  105. package/dev-ui/components/atoms/Button.js +1 -1
  106. package/dev-ui/components/atoms/Dropdown.d.ts +3 -3
  107. package/dev-ui/components/atoms/Dropdown.js +8 -9
  108. package/dev-ui/components/atoms/NumberField.d.ts +2 -3
  109. package/dev-ui/components/atoms/NumberField.js +29 -42
  110. package/dev-ui/components/atoms/Spacer.js +1 -1
  111. package/dev-ui/components/atoms/Text.js +1 -1
  112. package/dev-ui/components/atoms/ToggleButton.d.ts +2 -2
  113. package/dev-ui/components/atoms/ToggleButton.js +5 -16
  114. package/dev-ui/components/atoms/Tooltip.d.ts +2 -2
  115. package/dev-ui/components/atoms/Tooltip.js +8 -20
  116. package/dev-ui/components/panels/AppDataDebugger.d.ts +1 -2
  117. package/dev-ui/components/panels/AppDataDebugger.js +8 -19
  118. package/dev-ui/components/panels/ColorEditor.d.ts +1 -2
  119. package/dev-ui/components/panels/ColorEditor.js +35 -42
  120. package/dev-ui/components/panels/PageDataDebugger.d.ts +1 -2
  121. package/dev-ui/components/panels/PageDataDebugger.js +8 -20
  122. package/dev-ui/components/panels/QueryDebugger.d.ts +1 -2
  123. package/dev-ui/components/panels/QueryDebugger.js +12 -24
  124. package/dev-ui/components/panels/SpacingEditor.d.ts +1 -2
  125. package/dev-ui/components/panels/SpacingEditor.js +34 -48
  126. package/dev-ui/components/panels/TypographyEditor.d.ts +1 -2
  127. package/dev-ui/components/panels/TypographyEditor.js +38 -46
  128. package/dev-ui/hooks/useBreakpoint.d.ts +1 -1
  129. package/dev-ui/hooks/useBreakpoint.js +13 -13
  130. package/dev-ui/hooks/usePersistState.js +6 -7
  131. package/dev-ui/hooks/useStylesheet.js +6 -6
  132. package/dev-ui/icons.d.ts +15 -16
  133. package/dev-ui/icons.js +16 -27
  134. package/dev-ui/index.js +5 -1
  135. package/dev-ui/loader.d.ts +1 -2
  136. package/dev-ui/loader.js +13 -9
  137. package/dev-ui/panels.d.ts +2 -2
  138. package/dev-ui/panels.js +7 -7
  139. package/dev-ui/theme.d.ts +96 -70
  140. package/dev-ui/theme.js +3 -3
  141. package/dynamic/dynamic-component.d.ts +1 -10
  142. package/dynamic/dynamic-component.js +1 -1
  143. package/dynamic/index.js +5 -1
  144. package/entry/Root.d.ts +2 -3
  145. package/entry/Root.js +16 -26
  146. package/entry/entry.admin.dev.js +4 -4
  147. package/entry/entry.admin.prod.js +4 -4
  148. package/entry/entry.monolith.dev.js +5 -5
  149. package/entry/entry.monolith.prod.js +5 -5
  150. package/gravityforms/gravity-forms.d.ts +2 -2
  151. package/gravityforms/index.js +5 -1
  152. package/gravityforms/useGravityForm.d.ts +2 -2
  153. package/gravityforms/useGravityForm.js +126 -130
  154. package/hooks/index.js +5 -1
  155. package/hooks/queryUtils.d.ts +14 -14
  156. package/hooks/queryUtils.js +101 -192
  157. package/hooks/useAppData.d.ts +2 -2
  158. package/hooks/useAppData.js +9 -9
  159. package/hooks/usePageLoad.js +4 -4
  160. package/hooks/useQueryDebug.d.ts +1 -1
  161. package/hooks/useQueryDebug.js +7 -7
  162. package/hooks/useRPC.d.ts +4 -4
  163. package/hooks/useRPC.js +3 -3
  164. package/package.json +7 -7
  165. package/routing/index.js +5 -1
  166. package/routing/remoteProps.d.ts +1 -1
  167. package/routing/remoteProps.js +31 -72
  168. package/routing/routing.d.ts +15 -15
  169. package/routing/routing.js +108 -170
  170. package/routing/updateEditLink.js +1 -1
  171. package/serverless/define-api.d.ts +1 -1
  172. package/serverless/define-rpc-router.js +8 -4
  173. package/serverless/index.js +6 -2
  174. package/serverless-template/_utils/fetch-wordpress-props.ts +0 -4
  175. package/serverless-template/_utils/fetch-wp.ts +0 -1
  176. package/style/createStitches.d.ts +375 -783
  177. package/style/createStitches.js +164 -142
  178. package/style/index.js +5 -1
  179. package/tsconfig.json +1 -1
  180. package/utils/Observable.d.ts +2 -2
  181. package/utils/Observable.js +12 -15
  182. package/utils/getRepoName.js +3 -3
  183. package/utils/promptIfRepoNameIncorrect.js +18 -64
  184. package/utils/refreshOverlayInterop.js +1 -1
  185. package/utils/reportErrorStack.d.ts +1 -1
  186. package/utils/reportErrorStack.js +1 -1
  187. package/utils/serverlessAppContext.js +1 -1
  188. package/utils/updateEnvFile.js +19 -69
  189. package/utils/useObservable.js +3 -3
  190. package/views/index.js +5 -1
package/cli/build.prod.js CHANGED
@@ -1,107 +1,51 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
- function verb(n) { return function (v) { return step([n, v]); }; }
15
- function step(op) {
16
- if (f) throw new TypeError("Generator is already executing.");
17
- while (_) try {
18
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
- if (y = 0, t) op = [op[0] & 2, t.value];
20
- switch (op[0]) {
21
- case 0: case 1: t = op; break;
22
- case 4: _.label++; return { value: op[1], done: false };
23
- case 5: _.label++; y = op[1]; op = [0]; continue;
24
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
- default:
26
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
- if (t[2]) _.ops.pop();
31
- _.trys.pop(); continue;
32
- }
33
- op = body.call(thisArg, _);
34
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
- }
37
- };
38
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
39
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
40
4
  };
41
5
  Object.defineProperty(exports, "__esModule", { value: true });
42
6
  exports.prodCommand = void 0;
43
- var get_webpack_config_1 = __importDefault(require("../build/get-webpack-config"));
44
- var webpack_1 = require("webpack");
45
- var promptIfRepoNameIncorrect_1 = require("../utils/promptIfRepoNameIncorrect");
46
- var path_1 = __importDefault(require("path"));
47
- var clean_1 = require("../build/clean");
48
- var build_favicon_1 = require("../build/build-favicon");
49
- function prodCommand(opts) {
50
- return __awaiter(this, void 0, void 0, function () {
51
- var contentBase, themeName, compiler, _a, _b;
52
- return __generator(this, function (_c) {
53
- switch (_c.label) {
54
- case 0:
55
- contentBase = process.cwd() + "/dist/";
56
- (0, build_favicon_1.buildFavicon)().catch(function (err) {
57
- console.log("Error building favicon:");
58
- console.error(err);
59
- });
60
- return [4 /*yield*/, (0, promptIfRepoNameIncorrect_1.promptIfRepoThemeMismatch)()];
61
- case 1:
62
- _c.sent();
63
- themeName = path_1.default.basename(process.cwd());
64
- return [4 /*yield*/, (0, clean_1.cleanOutput)()];
65
- case 2:
66
- _c.sent();
67
- _a = webpack_1.webpack;
68
- return [4 /*yield*/, (0, get_webpack_config_1.default)({
69
- title: "Frontend Client",
70
- baseDirectory: process.cwd() + "/",
71
- mode: "production",
72
- target: "client",
73
- serverless: opts.serverless,
74
- themeName: themeName,
75
- isAdmin: false,
76
- })];
77
- case 3:
78
- _b = [
79
- _c.sent()
80
- ];
81
- return [4 /*yield*/, (0, get_webpack_config_1.default)({
82
- title: "Admin Client",
83
- baseDirectory: process.cwd() + "/",
84
- mode: "production",
85
- target: "client",
86
- serverless: opts.serverless,
87
- themeName: themeName,
88
- isAdmin: true,
89
- })];
90
- case 4:
91
- compiler = _a.apply(void 0, [_b.concat([
92
- _c.sent()
93
- ])]);
94
- compiler.run(function (err, stats) {
95
- if (stats === null || stats === void 0 ? void 0 : stats.hasErrors()) {
96
- process.exit(1);
97
- }
98
- if (err) {
99
- process.exit(1);
100
- }
101
- });
102
- return [2 /*return*/];
103
- }
104
- });
7
+ const get_webpack_config_1 = __importDefault(require("../build/get-webpack-config"));
8
+ const webpack_1 = require("webpack");
9
+ const promptIfRepoNameIncorrect_1 = require("../utils/promptIfRepoNameIncorrect");
10
+ const path_1 = __importDefault(require("path"));
11
+ const clean_1 = require("../build/clean");
12
+ const build_favicon_1 = require("../build/build-favicon");
13
+ async function prodCommand(opts) {
14
+ const contentBase = process.cwd() + "/dist/";
15
+ (0, build_favicon_1.buildFavicon)().catch((err) => {
16
+ console.log("Error building favicon:");
17
+ console.error(err);
18
+ });
19
+ await (0, promptIfRepoNameIncorrect_1.promptIfRepoThemeMismatch)();
20
+ const themeName = path_1.default.basename(process.cwd());
21
+ await (0, clean_1.cleanOutput)();
22
+ const compiler = (0, webpack_1.webpack)([
23
+ await (0, get_webpack_config_1.default)({
24
+ title: "Frontend Client",
25
+ baseDirectory: process.cwd() + "/",
26
+ mode: "production",
27
+ target: "client",
28
+ serverless: opts.serverless,
29
+ themeName: themeName,
30
+ isAdmin: false,
31
+ }),
32
+ await (0, get_webpack_config_1.default)({
33
+ title: "Admin Client",
34
+ baseDirectory: process.cwd() + "/",
35
+ mode: "production",
36
+ target: "client",
37
+ serverless: opts.serverless,
38
+ themeName: themeName,
39
+ isAdmin: true,
40
+ }),
41
+ ]);
42
+ compiler.run((err, stats) => {
43
+ if (stats?.hasErrors()) {
44
+ process.exit(1);
45
+ }
46
+ if (err) {
47
+ process.exit(1);
48
+ }
105
49
  });
106
50
  }
107
51
  exports.prodCommand = prodCommand;
package/cli/cli.js CHANGED
@@ -1,45 +1,9 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
- function verb(n) { return function (v) { return step([n, v]); }; }
15
- function step(op) {
16
- if (f) throw new TypeError("Generator is already executing.");
17
- while (_) try {
18
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
- if (y = 0, t) op = [op[0] & 2, t.value];
20
- switch (op[0]) {
21
- case 0: case 1: t = op; break;
22
- case 4: _.label++; return { value: op[1], done: false };
23
- case 5: _.label++; y = op[1]; op = [0]; continue;
24
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
- default:
26
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
- if (t[2]) _.ops.pop();
31
- _.trys.pop(); continue;
32
- }
33
- op = body.call(thisArg, _);
34
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
- }
37
- };
38
2
  Object.defineProperty(exports, "__esModule", { value: true });
39
- var commander_1 = require("commander");
40
- var create_next_app_1 = require("../build/serverless/create-next-app");
41
- var setup_1 = require("./setup");
42
- var program = new commander_1.Command();
3
+ const commander_1 = require("commander");
4
+ const create_next_app_1 = require("../build/serverless/create-next-app");
5
+ const setup_1 = require("./setup");
6
+ const program = new commander_1.Command();
43
7
  program.version("0.0.1");
44
8
  require("dotenv").config();
45
9
  program
@@ -48,8 +12,8 @@ program
48
12
  .option("-s, --serverless", 'Build in "serverless" mode', false)
49
13
  .option("-m, --mode <mode>", 'Defaults to all modes, but use "frontend", "admin" or "codegen" to run in just one mode', undefined)
50
14
  .option("--verbose", "Enables log retention", false)
51
- .action(function (options) {
52
- var devCommand = require("./build.dev").devCommand;
15
+ .action((options) => {
16
+ const devCommand = require("./build.dev").devCommand;
53
17
  devCommand({
54
18
  serverless: options.serverless,
55
19
  mode: options.mode,
@@ -59,14 +23,14 @@ program
59
23
  program
60
24
  .command("preinstall")
61
25
  .description("Pre-installs for Vercel")
62
- .action(function (options) {
63
- var main = require("./preinstall").main;
26
+ .action((options) => {
27
+ const main = require("./preinstall").main;
64
28
  main();
65
29
  });
66
30
  program
67
31
  .command("build")
68
32
  .description("Build in production mode")
69
- .action(function (options) {
33
+ .action((options) => {
70
34
  if (process.env.VERCEL) {
71
35
  (0, create_next_app_1.createNextApp)({
72
36
  baseDirectory: process.cwd(),
@@ -75,7 +39,7 @@ program
75
39
  });
76
40
  }
77
41
  else {
78
- var prodCommand = require("./build.prod").prodCommand;
42
+ const prodCommand = require("./build.prod").prodCommand;
79
43
  prodCommand({
80
44
  serverless: options.serverless,
81
45
  });
@@ -94,7 +58,7 @@ program
94
58
  program
95
59
  .command("next")
96
60
  .description("Run the serverless app in standalone mode")
97
- .action(function (options) {
61
+ .action((options) => {
98
62
  (0, create_next_app_1.createNextApp)({
99
63
  baseDirectory: process.cwd(),
100
64
  dev: true,
@@ -104,17 +68,14 @@ program
104
68
  program
105
69
  .command("setup")
106
70
  .description("Initialize the WordPress theme interactively")
107
- .action(function () {
71
+ .action(() => {
108
72
  (0, setup_1.setupTheme)();
109
73
  });
110
74
  program
111
75
  .command("generate")
112
76
  .description("Generate GraphQL Schemas")
113
- .action(function () { return __awaiter(void 0, void 0, void 0, function () {
114
- return __generator(this, function (_a) {
115
- console.log("This command has been deprecated! Please use `yarn dev` instead.");
116
- process.exit();
117
- return [2 /*return*/];
118
- });
119
- }); });
77
+ .action(async () => {
78
+ console.log("This command has been deprecated! Please use `yarn dev` instead.");
79
+ process.exit();
80
+ });
120
81
  program.parse(process.argv);
@@ -1,6 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { CompilerState } from "../../../build/state/compiler-state";
3
2
  import { Observable } from "../../../utils/Observable";
4
3
  export declare function BundleDisplay(props: {
5
4
  bundle: Observable<CompilerState>;
6
- }): JSX.Element;
5
+ }): import("react/jsx-runtime").JSX.Element;
@@ -1,23 +1,12 @@
1
1
  "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
2
  Object.defineProperty(exports, "__esModule", { value: true });
14
3
  exports.BundleDisplay = void 0;
15
- var jsx_runtime_1 = require("react/jsx-runtime");
16
- var ink_1 = require("ink");
17
- var react_1 = require("react");
18
- var useObservable_1 = require("../../../utils/useObservable");
19
- var StatusIcon_1 = require("./StatusIcon");
20
- var statusLabels = {
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const ink_1 = require("ink");
6
+ const react_1 = require("react");
7
+ const useObservable_1 = require("../../../utils/useObservable");
8
+ const StatusIcon_1 = require("./StatusIcon");
9
+ const statusLabels = {
21
10
  compiling: "Compiling...",
22
11
  error: "Error!",
23
12
  starting: "Preparing to start...",
@@ -25,7 +14,7 @@ var statusLabels = {
25
14
  waiting: "Success! Watching for file changes...",
26
15
  };
27
16
  function StatusLabel(props) {
28
- var color = (0, react_1.useMemo)(function () {
17
+ const color = (0, react_1.useMemo)(() => {
29
18
  if (props.status === "compiling") {
30
19
  return "yellowBright";
31
20
  }
@@ -39,18 +28,18 @@ function StatusLabel(props) {
39
28
  return "whiteBright";
40
29
  }
41
30
  }, [props.status]);
42
- var label = props.statusLabel || statusLabels[props.status];
43
- var duration = props.duration ? "(".concat(props.duration, "ms)") : "";
44
- return ((0, jsx_runtime_1.jsxs)(ink_1.Text, __assign({ color: color }, { children: [label, " ", duration] }), void 0));
31
+ const label = props.statusLabel || statusLabels[props.status];
32
+ const duration = props.duration ? `(${props.duration}ms)` : "";
33
+ return ((0, jsx_runtime_1.jsxs)(ink_1.Text, { color: color, children: [label, " ", duration] }));
45
34
  }
46
35
  function BundleDisplay(props) {
47
- var data = (0, useObservable_1.useObservable)(props.bundle);
48
- return ((0, jsx_runtime_1.jsxs)(ink_1.Box, __assign({ width: "100%", flexDirection: "column" }, { children: [(0, jsx_runtime_1.jsxs)(ink_1.Box, __assign({ width: "100%", paddingX: 1, borderStyle: "round", borderColor: data.status === "success" ? "green" : data.status === "error" ? "red" : "yellow", flexDirection: "row" }, { children: [(0, jsx_runtime_1.jsx)(ink_1.Box, __assign({ width: 2, flexGrow: 0, flexShrink: 0 }, { children: (0, jsx_runtime_1.jsx)(StatusIcon_1.StatusIcon, { icon: data.status === "success" || data.status === "waiting"
36
+ const data = (0, useObservable_1.useObservable)(props.bundle);
37
+ return ((0, jsx_runtime_1.jsxs)(ink_1.Box, { width: "100%", flexDirection: "column", children: [(0, jsx_runtime_1.jsxs)(ink_1.Box, { width: "100%", paddingX: 1, borderStyle: "round", borderColor: data.status === "success" ? "green" : data.status === "error" ? "red" : "yellow", flexDirection: "row", children: [(0, jsx_runtime_1.jsx)(ink_1.Box, { width: 2, flexGrow: 0, flexShrink: 0, children: (0, jsx_runtime_1.jsx)(StatusIcon_1.StatusIcon, { icon: data.status === "success" || data.status === "waiting"
49
38
  ? "tick"
50
39
  : data.status === "compiling"
51
40
  ? "loading"
52
41
  : data.status === "error"
53
42
  ? "error"
54
- : "none" }, void 0) }), void 0), (0, jsx_runtime_1.jsx)(ink_1.Box, { children: (0, jsx_runtime_1.jsxs)(ink_1.Box, { children: [(0, jsx_runtime_1.jsxs)(ink_1.Text, __assign({ bold: true }, { children: [data.title, " "] }), void 0), (0, jsx_runtime_1.jsx)(StatusLabel, { status: data.status, statusLabel: data.statusLabel, duration: data.duration }, void 0)] }, void 0) }, void 0)] }), void 0), (0, jsx_runtime_1.jsxs)(ink_1.Box, __assign({ flexGrow: 1, flexDirection: "column" }, { children: [Array.isArray(data.errors) && data.errors.length > 0 ? ((0, jsx_runtime_1.jsx)(ink_1.Box, __assign({ flexDirection: "column" }, { children: data.errors.map(function (err, i) { return ((0, jsx_runtime_1.jsxs)(ink_1.Box, __assign({ flexDirection: "column" }, { children: [(0, jsx_runtime_1.jsx)(ink_1.Box, { children: (0, jsx_runtime_1.jsx)(ink_1.Text, __assign({ color: err.type === "error" ? "red" : "yellow", bold: true }, { children: err.type === "error" ? "The following error occurred" : "Please be aware of the following warning" }), void 0) }, void 0), (0, jsx_runtime_1.jsx)(ink_1.Box, { children: (0, jsx_runtime_1.jsx)(ink_1.Text, { children: err.message }, void 0) }, void 0)] }), void 0)); }) }), void 0)) : null, data.log ? ((0, jsx_runtime_1.jsx)(ink_1.Box, { children: (0, jsx_runtime_1.jsx)(ink_1.Text, { children: data.log }, void 0) }, void 0)) : null] }), void 0)] }), void 0));
43
+ : "none" }) }), (0, jsx_runtime_1.jsx)(ink_1.Box, { children: (0, jsx_runtime_1.jsxs)(ink_1.Box, { children: [(0, jsx_runtime_1.jsxs)(ink_1.Text, { bold: true, children: [data.title, " "] }), (0, jsx_runtime_1.jsx)(StatusLabel, { status: data.status, statusLabel: data.statusLabel, duration: data.duration })] }) })] }), (0, jsx_runtime_1.jsxs)(ink_1.Box, { flexGrow: 1, flexDirection: "column", children: [Array.isArray(data.errors) && data.errors.length > 0 ? ((0, jsx_runtime_1.jsx)(ink_1.Box, { flexDirection: "column", children: data.errors.map((err, i) => ((0, jsx_runtime_1.jsxs)(ink_1.Box, { flexDirection: "column", children: [(0, jsx_runtime_1.jsx)(ink_1.Box, { children: (0, jsx_runtime_1.jsx)(ink_1.Text, { color: err.type === "error" ? "red" : "yellow", bold: true, children: err.type === "error" ? "The following error occurred" : "Please be aware of the following warning" }) }), (0, jsx_runtime_1.jsx)(ink_1.Box, { children: (0, jsx_runtime_1.jsx)(ink_1.Text, { children: err.message }) })] }))) })) : null, data.log ? ((0, jsx_runtime_1.jsx)(ink_1.Box, { children: (0, jsx_runtime_1.jsx)(ink_1.Text, { children: data.log }) })) : null] })] }));
55
44
  }
56
45
  exports.BundleDisplay = BundleDisplay;
@@ -1,6 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { CodegenState } from "../../../build/state/codegen-state";
3
2
  import { Observable } from "../../../utils/Observable";
4
3
  export declare function CodegenDisplay(props: {
5
4
  codegen: Observable<CodegenState>;
6
- }): JSX.Element;
5
+ }): import("react/jsx-runtime").JSX.Element;
@@ -1,23 +1,12 @@
1
1
  "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
2
  Object.defineProperty(exports, "__esModule", { value: true });
14
3
  exports.CodegenDisplay = void 0;
15
- var jsx_runtime_1 = require("react/jsx-runtime");
16
- var ink_1 = require("ink");
17
- var react_1 = require("react");
18
- var useObservable_1 = require("../../../utils/useObservable");
19
- var StatusIcon_1 = require("./StatusIcon");
20
- var statusLabels = {
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const ink_1 = require("ink");
6
+ const react_1 = require("react");
7
+ const useObservable_1 = require("../../../utils/useObservable");
8
+ const StatusIcon_1 = require("./StatusIcon");
9
+ const statusLabels = {
21
10
  generating: "Generating...",
22
11
  error: "Error!",
23
12
  success: "Complete",
@@ -26,7 +15,7 @@ var statusLabels = {
26
15
  invalidated: "Detected file change",
27
16
  };
28
17
  function StatusLabel(props) {
29
- var color = (0, react_1.useMemo)(function () {
18
+ const color = (0, react_1.useMemo)(() => {
30
19
  if (props.status === "generating" || props.status === "fetching" || props.status === "invalidated") {
31
20
  return "yellowBright";
32
21
  }
@@ -40,23 +29,23 @@ function StatusLabel(props) {
40
29
  return "whiteBright";
41
30
  }
42
31
  }, [props.status]);
43
- var label = props.statusLabel || statusLabels[props.status];
32
+ let label = props.statusLabel || statusLabels[props.status];
44
33
  if (props.reason) {
45
- label += " (".concat(props.reason, ")");
34
+ label += ` (${props.reason})`;
46
35
  }
47
36
  if (props.duration) {
48
- label += " (".concat(props.duration, "ms)");
37
+ label += ` (${props.duration}ms)`;
49
38
  }
50
- return (0, jsx_runtime_1.jsx)(ink_1.Text, __assign({ color: color }, { children: label }), void 0);
39
+ return (0, jsx_runtime_1.jsx)(ink_1.Text, { color: color, children: label });
51
40
  }
52
41
  function CodegenDisplay(props) {
53
- var data = (0, useObservable_1.useObservable)(props.codegen);
54
- return ((0, jsx_runtime_1.jsxs)(ink_1.Box, __assign({ width: "100%", flexDirection: "column" }, { children: [(0, jsx_runtime_1.jsxs)(ink_1.Box, __assign({ width: "100%", paddingX: 1, borderStyle: "round", borderColor: data.status === "success" ? "green" : data.status === "error" ? "red" : "yellow", flexDirection: "row" }, { children: [(0, jsx_runtime_1.jsx)(ink_1.Box, __assign({ width: 2, flexGrow: 0, flexShrink: 0 }, { children: (0, jsx_runtime_1.jsx)(StatusIcon_1.StatusIcon, { icon: data.status === "success" || data.status === "ready"
42
+ const data = (0, useObservable_1.useObservable)(props.codegen);
43
+ return ((0, jsx_runtime_1.jsxs)(ink_1.Box, { width: "100%", flexDirection: "column", children: [(0, jsx_runtime_1.jsxs)(ink_1.Box, { width: "100%", paddingX: 1, borderStyle: "round", borderColor: data.status === "success" ? "green" : data.status === "error" ? "red" : "yellow", flexDirection: "row", children: [(0, jsx_runtime_1.jsx)(ink_1.Box, { width: 2, flexGrow: 0, flexShrink: 0, children: (0, jsx_runtime_1.jsx)(StatusIcon_1.StatusIcon, { icon: data.status === "success" || data.status === "ready"
55
44
  ? "tick"
56
45
  : data.status === "generating" || data.status === "fetching" || data.status === "invalidated"
57
46
  ? "loading"
58
47
  : data.status === "error"
59
48
  ? "error"
60
- : "none" }, void 0) }), void 0), (0, jsx_runtime_1.jsx)(ink_1.Box, { children: (0, jsx_runtime_1.jsxs)(ink_1.Box, { children: [(0, jsx_runtime_1.jsxs)(ink_1.Text, __assign({ bold: true }, { children: [data.title, " "] }), void 0), (0, jsx_runtime_1.jsx)(StatusLabel, { status: data.status, statusLabel: "", reason: data.reason, duration: data.duration }, void 0)] }, void 0) }, void 0)] }), void 0), (0, jsx_runtime_1.jsxs)(ink_1.Box, __assign({ flexGrow: 1, flexDirection: "column" }, { children: [Array.isArray(data.errors) && data.errors.length > 0 ? ((0, jsx_runtime_1.jsx)(ink_1.Box, __assign({ flexDirection: "column" }, { children: data.errors.map(function (err, i) { return ((0, jsx_runtime_1.jsx)(ink_1.Box, __assign({ flexDirection: "column" }, { children: (0, jsx_runtime_1.jsx)(ink_1.Box, { children: (0, jsx_runtime_1.jsx)(ink_1.Text, { children: err }, void 0) }, void 0) }), void 0)); }) }), void 0)) : null, data.log ? ((0, jsx_runtime_1.jsx)(ink_1.Box, { children: (0, jsx_runtime_1.jsx)(ink_1.Text, { children: data.log }, void 0) }, void 0)) : null] }), void 0)] }), void 0));
49
+ : "none" }) }), (0, jsx_runtime_1.jsx)(ink_1.Box, { children: (0, jsx_runtime_1.jsxs)(ink_1.Box, { children: [(0, jsx_runtime_1.jsxs)(ink_1.Text, { bold: true, children: [data.title, " "] }), (0, jsx_runtime_1.jsx)(StatusLabel, { status: data.status, statusLabel: "", reason: data.reason, duration: data.duration })] }) })] }), (0, jsx_runtime_1.jsxs)(ink_1.Box, { flexGrow: 1, flexDirection: "column", children: [Array.isArray(data.errors) && data.errors.length > 0 ? ((0, jsx_runtime_1.jsx)(ink_1.Box, { flexDirection: "column", children: data.errors.map((err, i) => ((0, jsx_runtime_1.jsx)(ink_1.Box, { flexDirection: "column", children: (0, jsx_runtime_1.jsx)(ink_1.Box, { children: (0, jsx_runtime_1.jsx)(ink_1.Text, { children: err }) }) }))) })) : null, data.log ? ((0, jsx_runtime_1.jsx)(ink_1.Box, { children: (0, jsx_runtime_1.jsx)(ink_1.Text, { children: data.log }) })) : null] })] }));
61
50
  }
62
51
  exports.CodegenDisplay = CodegenDisplay;
@@ -1,13 +1,12 @@
1
- /// <reference types="react" />
2
1
  import { CodegenState } from "../../../build/state/codegen-state";
3
2
  import { CompilerState } from "../../../build/state/compiler-state";
4
3
  import { ServerlessState } from "../../../build/state/serverless-state";
5
4
  import { Observable } from "../../../utils/Observable";
6
- declare type Props = {
5
+ type Props = {
7
6
  bundles: Observable<CompilerState>[];
8
7
  serverless?: Observable<ServerlessState>;
9
8
  codegen?: Observable<CodegenState>;
10
9
  configChanged: Observable<boolean>;
11
10
  };
12
- export declare function DevCLIDisplay(props: Props): JSX.Element;
11
+ export declare function DevCLIDisplay(props: Props): import("react/jsx-runtime").JSX.Element;
13
12
  export {};
@@ -1,42 +1,31 @@
1
1
  "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
2
  Object.defineProperty(exports, "__esModule", { value: true });
14
3
  exports.DevCLIDisplay = void 0;
15
- var jsx_runtime_1 = require("react/jsx-runtime");
16
- var ink_1 = require("ink");
17
- var react_1 = require("react");
18
- var useObservable_1 = require("../../../utils/useObservable");
19
- var BundleDisplay_1 = require("./BundleDisplay");
20
- var CodegenDisplay_1 = require("./CodegenDisplay");
21
- var Fullscreen_1 = require("./Fullscreen");
22
- var ServerlessDisplay_1 = require("./ServerlessDisplay");
23
- var MODE_LABELS = {
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const ink_1 = require("ink");
6
+ const react_1 = require("react");
7
+ const useObservable_1 = require("../../../utils/useObservable");
8
+ const BundleDisplay_1 = require("./BundleDisplay");
9
+ const CodegenDisplay_1 = require("./CodegenDisplay");
10
+ const Fullscreen_1 = require("./Fullscreen");
11
+ const ServerlessDisplay_1 = require("./ServerlessDisplay");
12
+ const MODE_LABELS = {
24
13
  serverless: "Serverless Log",
25
14
  bundles: "Build Log",
26
15
  };
27
16
  function DevCLIDisplay(props) {
28
- var _a = (0, react_1.useState)("bundles"), mode = _a[0], setMode = _a[1];
29
- (0, ink_1.useInput)(function (ev, key) {
17
+ const [mode, setMode] = (0, react_1.useState)("bundles");
18
+ (0, ink_1.useInput)((ev, key) => {
30
19
  if (ev.charAt(0) === "z") {
31
20
  if (props.serverless) {
32
- setMode(function (mode) { return (mode === "bundles" ? "serverless" : "bundles"); });
21
+ setMode((mode) => (mode === "bundles" ? "serverless" : "bundles"));
33
22
  }
34
23
  }
35
24
  else if (ev.charAt(0) === "c" || ev.charAt(0) === "q" || key.escape) {
36
25
  process.exit(0);
37
26
  }
38
27
  });
39
- var configChanged = (0, useObservable_1.useObservable)(props.configChanged);
40
- return ((0, jsx_runtime_1.jsx)(Fullscreen_1.Fullscreen, { children: (0, jsx_runtime_1.jsxs)(ink_1.Box, __assign({ width: "100%", height: "100%", flexDirection: "column", minHeight: "100%" }, { children: [mode === "bundles" ? ((0, jsx_runtime_1.jsxs)(ink_1.Box, __assign({ width: "100%", flexGrow: 1, flexDirection: "column" }, { children: [props.bundles.map(function (bundle, i) { return ((0, jsx_runtime_1.jsx)(BundleDisplay_1.BundleDisplay, { bundle: bundle }, i)); }), props.codegen && (0, jsx_runtime_1.jsx)(CodegenDisplay_1.CodegenDisplay, { codegen: props.codegen }, void 0), props.serverless && (0, jsx_runtime_1.jsx)(ServerlessDisplay_1.ServerlessDisplay, { serverless: props.serverless }, void 0)] }), void 0)) : mode === "serverless" ? ((0, jsx_runtime_1.jsx)(ink_1.Box, __assign({ width: "100%", flexGrow: 1, flexDirection: "column" }, { children: (0, jsx_runtime_1.jsx)(ServerlessDisplay_1.ServerlessLog, { serverless: props.serverless }, void 0) }), void 0)) : null, configChanged && ((0, jsx_runtime_1.jsx)(ink_1.Box, __assign({ paddingX: 1, borderColor: "yellow", borderStyle: "round" }, { children: (0, jsx_runtime_1.jsxs)(ink_1.Text, __assign({ color: "yellow" }, { children: ["\uD83D\uDEA8 Change detected in ", (0, jsx_runtime_1.jsx)(ink_1.Text, __assign({ color: "yellowBright" }, { children: "ed.config.json" }), void 0), " \u2014 Please restart", " ", (0, jsx_runtime_1.jsx)(ink_1.Text, __assign({ color: "yellowBright" }, { children: "yarn dev" }), void 0)] }), void 0) }), void 0)), (0, jsx_runtime_1.jsxs)(ink_1.Box, __assign({ paddingX: 1, borderColor: "cyan", borderStyle: "round", flexDirection: "row", justifyContent: "space-between" }, { children: [(0, jsx_runtime_1.jsx)(ink_1.Box, { children: (0, jsx_runtime_1.jsx)(ink_1.Text, __assign({ bold: true, color: "cyanBright" }, { children: MODE_LABELS[mode] }), void 0) }, void 0), (0, jsx_runtime_1.jsxs)(ink_1.Box, { children: [props.serverless && ((0, jsx_runtime_1.jsxs)(ink_1.Text, { children: [(0, jsx_runtime_1.jsx)(ink_1.Text, __assign({ bold: true, color: "white" }, { children: "z" }), void 0), ": Toggle Serverless Log", " "] }, void 0)), (0, jsx_runtime_1.jsxs)(ink_1.Text, { children: [(0, jsx_runtime_1.jsx)(ink_1.Text, __assign({ bold: true, color: "white" }, { children: "q" }), void 0), ": Quit"] }, void 0)] }, void 0)] }), void 0)] }), void 0) }, void 0));
28
+ const configChanged = (0, useObservable_1.useObservable)(props.configChanged);
29
+ return ((0, jsx_runtime_1.jsx)(Fullscreen_1.Fullscreen, { children: (0, jsx_runtime_1.jsxs)(ink_1.Box, { width: "100%", height: "100%", flexDirection: "column", minHeight: "100%", children: [mode === "bundles" ? ((0, jsx_runtime_1.jsxs)(ink_1.Box, { width: "100%", flexGrow: 1, flexDirection: "column", children: [props.bundles.map((bundle, i) => ((0, jsx_runtime_1.jsx)(BundleDisplay_1.BundleDisplay, { bundle: bundle }, i))), props.codegen && (0, jsx_runtime_1.jsx)(CodegenDisplay_1.CodegenDisplay, { codegen: props.codegen }), props.serverless && (0, jsx_runtime_1.jsx)(ServerlessDisplay_1.ServerlessDisplay, { serverless: props.serverless })] })) : mode === "serverless" ? ((0, jsx_runtime_1.jsx)(ink_1.Box, { width: "100%", flexGrow: 1, flexDirection: "column", children: (0, jsx_runtime_1.jsx)(ServerlessDisplay_1.ServerlessLog, { serverless: props.serverless }) })) : null, configChanged && ((0, jsx_runtime_1.jsx)(ink_1.Box, { paddingX: 1, borderColor: "yellow", borderStyle: "round", children: (0, jsx_runtime_1.jsxs)(ink_1.Text, { color: "yellow", children: ["\uD83D\uDEA8 Change detected in ", (0, jsx_runtime_1.jsx)(ink_1.Text, { color: "yellowBright", children: "ed.config.json" }), " \u2014 Please restart", " ", (0, jsx_runtime_1.jsx)(ink_1.Text, { color: "yellowBright", children: "yarn dev" })] }) })), (0, jsx_runtime_1.jsxs)(ink_1.Box, { paddingX: 1, borderColor: "cyan", borderStyle: "round", flexDirection: "row", justifyContent: "space-between", children: [(0, jsx_runtime_1.jsx)(ink_1.Box, { children: (0, jsx_runtime_1.jsx)(ink_1.Text, { bold: true, color: "cyanBright", children: MODE_LABELS[mode] }) }), (0, jsx_runtime_1.jsxs)(ink_1.Box, { children: [props.serverless && ((0, jsx_runtime_1.jsxs)(ink_1.Text, { children: [(0, jsx_runtime_1.jsx)(ink_1.Text, { bold: true, color: "white", children: "z" }), ": Toggle Serverless Log", " "] })), (0, jsx_runtime_1.jsxs)(ink_1.Text, { children: [(0, jsx_runtime_1.jsx)(ink_1.Text, { bold: true, color: "white", children: "q" }), ": Quit"] })] })] })] }) }));
41
30
  }
42
31
  exports.DevCLIDisplay = DevCLIDisplay;
@@ -1,26 +1,15 @@
1
1
  "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
2
  Object.defineProperty(exports, "__esModule", { value: true });
14
3
  exports.Fullscreen = void 0;
15
- var jsx_runtime_1 = require("react/jsx-runtime");
16
- var ink_1 = require("ink");
17
- var react_1 = require("react");
18
- var Fullscreen = function (props) {
19
- var _a = (0, react_1.useState)({
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const ink_1 = require("ink");
6
+ const react_1 = require("react");
7
+ const Fullscreen = (props) => {
8
+ const [size, setSize] = (0, react_1.useState)({
20
9
  columns: process.stdout.columns,
21
10
  rows: process.stdout.rows,
22
- }), size = _a[0], setSize = _a[1];
23
- (0, react_1.useEffect)(function () {
11
+ });
12
+ (0, react_1.useEffect)(() => {
24
13
  function onResize() {
25
14
  setSize({
26
15
  columns: process.stdout.columns,
@@ -29,11 +18,11 @@ var Fullscreen = function (props) {
29
18
  }
30
19
  process.stdout.on("resize", onResize);
31
20
  // process.stdout.write("\x1b[?1049h")
32
- return function () {
21
+ return () => {
33
22
  process.stdout.off("resize", onResize);
34
23
  // process.stdout.write("\x1b[?1049l")
35
24
  };
36
25
  }, []);
37
- return ((0, jsx_runtime_1.jsx)(ink_1.Box, __assign({ width: size.columns, minHeight: size.rows }, { children: props.children }), void 0));
26
+ return ((0, jsx_runtime_1.jsx)(ink_1.Box, { width: size.columns, minHeight: size.rows, children: props.children }));
38
27
  };
39
28
  exports.Fullscreen = Fullscreen;
@@ -1,9 +1,8 @@
1
- /// <reference types="react" />
2
1
  import { ServerlessState } from "../../../build/state/serverless-state";
3
2
  import { Observable } from "../../../utils/Observable";
4
3
  export declare function ServerlessDisplay(props: {
5
4
  serverless: Observable<ServerlessState>;
6
- }): JSX.Element;
5
+ }): import("react/jsx-runtime").JSX.Element;
7
6
  export declare function ServerlessLog(props: {
8
7
  serverless: Observable<ServerlessState>;
9
- }): JSX.Element;
8
+ }): import("react/jsx-runtime").JSX.Element;