eddev 0.2.0-beta.32 → 0.2.0-beta.33

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.
@@ -76,7 +76,6 @@ var glob_promise_1 = __importDefault(require("glob-promise"));
76
76
  var child_process_1 = require("child_process");
77
77
  var fs_1 = require("fs");
78
78
  var manifest_blocks_1 = require("../manifests/manifest-blocks");
79
- var promises_1 = require("fs/promises");
80
79
  var manifest_views_1 = require("../manifests/manifest-views");
81
80
  var getRepoName_1 = require("../../utils/getRepoName");
82
81
  var updateEnvFile_1 = require("../../utils/updateEnvFile");
@@ -143,7 +142,7 @@ function createNextApp(opts) {
143
142
  case 7:
144
143
  // Also sync APIs into the APIs folder
145
144
  _b.sent();
146
- return [4 /*yield*/, syncAPIProxies((0, path_1.join)(serverlessDirectory, "api"), (0, path_1.join)(serverlessDirectory, "pages/api"))
145
+ return [4 /*yield*/, syncAPIProxies((0, path_1.join)(opts.baseDirectory, "api"), (0, path_1.join)(serverlessDirectory, "pages/api"))
147
146
  // Sync the public folder
148
147
  ];
149
148
  case 8:
@@ -327,7 +326,7 @@ function writeAPIProxies(sourceFolder, targetFolder) {
327
326
  var outputPath = (0, path_1.join)(targetFolder, name);
328
327
  if (name.includes("_rpc"))
329
328
  return;
330
- return (0, promises_1.writeFile)(outputPath, "import handler from \"".concat(file, "\"; export default handler;"));
329
+ return (0, fs_extra_1.writeFile)(outputPath, "import handler from \"".concat(file, "\"; export default handler;"));
331
330
  }))];
332
331
  case 2:
333
332
  _a.sent();
@@ -339,7 +338,8 @@ function writeAPIProxies(sourceFolder, targetFolder) {
339
338
  function syncAPIProxies(sourceFolder, targetFolder) {
340
339
  return __awaiter(this, void 0, void 0, function () {
341
340
  return __generator(this, function (_a) {
342
- return [2 /*return*/, syncFiles(sourceFolder, targetFolder, ["**/*.{tsx,ts,js}"], function (inputPath) {
341
+ console.log("Syncing files", sourceFolder, targetFolder);
342
+ return [2 /*return*/, syncFiles(sourceFolder, targetFolder, ["**/*"], function (inputPath) {
343
343
  if (inputPath.includes("_rpc"))
344
344
  return null;
345
345
  return "import handler from \"".concat(inputPath.replace(/\.(ts|js)x?$/, ""), "\"; export default handler;");
@@ -389,7 +389,8 @@ function syncFiles(sourceFolder, targetFolder, patterns, proxy) {
389
389
  if (proxy) {
390
390
  var output = proxy((0, path_1.relative)(targetFolder, (0, path_1.join)(sourceFolder, path)), (0, path_1.join)(targetFolder, path));
391
391
  if (typeof output === "string") {
392
- (0, promises_1.writeFile)((0, path_1.join)(targetFolder, path), output);
392
+ (0, fs_extra_1.ensureFileSync)((0, path_1.join)(targetFolder, path));
393
+ (0, fs_extra_1.writeFile)((0, path_1.join)(targetFolder, path), output);
393
394
  }
394
395
  }
395
396
  else {
@@ -463,7 +464,7 @@ function initManifests(dir, dev) {
463
464
  isServerless: true,
464
465
  onGenerate: function (manifest) { return __awaiter(_this, void 0, void 0, function () {
465
466
  return __generator(this, function (_a) {
466
- (0, promises_1.writeFile)((0, path_1.resolve)(dir, "manifest_blocks.ts"), manifest);
467
+ (0, fs_extra_1.writeFile)((0, path_1.resolve)(dir, "manifest_blocks.ts"), manifest);
467
468
  return [2 /*return*/];
468
469
  });
469
470
  }); },
@@ -476,7 +477,7 @@ function initManifests(dir, dev) {
476
477
  isServerless: true,
477
478
  onGenerate: function (manifest) { return __awaiter(_this, void 0, void 0, function () {
478
479
  return __generator(this, function (_a) {
479
- (0, promises_1.writeFile)((0, path_1.resolve)(dir, "manifest_views.ts"), manifest);
480
+ (0, fs_extra_1.writeFile)((0, path_1.resolve)(dir, "manifest_views.ts"), manifest);
480
481
  return [2 /*return*/];
481
482
  });
482
483
  }); },
package/dev-ui/theme.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const styled: <Type extends import("react").ComponentType<any> | keyof JSX.IntrinsicElements | import("@stitches/react/types/util").Function, Composers extends (string | import("react").ComponentType<any> | import("@stitches/react/types/util").Function | {
3
2
  [name: string]: unknown;
4
3
  })[], CSS = import("@stitches/react/types/css-util").CSS<{}, {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const dynamic: {
3
2
  <Props, Module = import("@loadable/component").DefaultComponent<Props>>(loadFn: (props: Props) => Promise<Module>, options: import("@loadable/component").OptionsWithResolver<Props, Module>): import("@loadable/component").LoadableComponent<Props>;
4
3
  <Props_1>(loadFn: (props: Props_1) => Promise<import("@loadable/component").DefaultComponent<Props_1>>, options?: import("@loadable/component").OptionsWithoutResolver<Props_1> | undefined): import("@loadable/component").LoadableComponent<Props_1>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eddev",
3
- "version": "0.2.0-beta.32",
3
+ "version": "0.2.0-beta.33",
4
4
  "main": "./index.js",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -15,7 +15,7 @@ const validProxyPaths = {
15
15
 
16
16
  export default async function (req: any, res: any) {
17
17
  // Ensure that the request is for a proxy path
18
- const proxyPath = validProxyPaths[req.query.method[0] as keyof typeof validProxyPaths]!
18
+ const proxyPath = validProxyPaths[req.query.method as keyof typeof validProxyPaths]!
19
19
 
20
20
  if (!proxyPath) {
21
21
  return res.status(404).json({
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { DefaultThemeMap } from "@stitches/react";
3
2
  import { ConfigType } from "@stitches/core/types/config";
4
3
  import { Properties as CSS } from "csstype";