From 67eca7ecf6d105ca9dc370eb44b8070701880db0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Fri, 11 Nov 2022 17:38:38 +0100 Subject: [PATCH] Add peek and go to definition for JS files (#795) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Separate ext code to client and server * Use skeleton in createNewProject and refactor * Refactor Lib.hs to use ExceptT * Fix formatting * Pop up returns * Extract liftIO and add a do block Co-authored-by: Shayne Czyzewski <523636+shayneczyzewski@users.noreply.github.com> * Address some review comments * Add skeleton comment * Extract common CommandError message * Separate skeleton comment into two rows * Move server and client dirs into src * Simplify maybeToEither * Further refactor Lib.hs * Further simplify skeleton comment * Add shared code directory to project structure * Update e2e test inputs * Update e2e test outputs * Fix formatting * Fix bug in compile function Co-authored-by: Martin Šošić * Change map to fmap in compile function * Fix formatting * Force git to include empty directories * Remove extra empty line from .gitkeep files * Add .jsconfig to enable go-to-definition * Watch shared directory for changes * Add final newline to jsconfigs * Fix regular and e2e tests * Update e2e tests * Fix cli template packaging and update todoApp * Add a shared function demo to todoApp * Update waspc and e2e tests * Fix compiler warnings and rename function * Rename mkError to mkParserError * Remove redundant empty line * Fix test warnings * Fix formatting * Update waspc.cabal with jsconfigs * Minimize jsconfig.json files * Add jsconfigs to waspc todoApp * Update e2e tests * Update e2e tests * Fix directory tree watching on wasp start * Implement review feedback Co-authored-by: Shayne Czyzewski <523636+shayneczyzewski@users.noreply.github.com> Co-authored-by: Martin Šošić --- .../Cli/templates/new/src/client/.gitkeep | 1 - .../templates/new/src/client/jsconfig.json | 27 +++++++++++++++++ .../Cli/templates/new/src/server/.gitkeep | 1 - .../templates/new/src/server/jsconfig.json | 27 +++++++++++++++++ .../Cli/templates/new/src/shared/.gitkeep | 1 - .../templates/new/src/shared/jsconfig.json | 23 ++++++++++++++ .../waspBuild-golden/files.manifest | 14 ++++----- .../waspBuild/.wasp/build/.waspchecksums | 26 ++++++++-------- .../.wasp/build/server/src/ext-src/.gitkeep | 1 - .../build/server/src/ext-src/jsconfig.json | 27 +++++++++++++++++ .../.wasp/build/server/src/shared/.gitkeep | 1 - .../build/server/src/shared/jsconfig.json | 23 ++++++++++++++ .../.wasp/build/web-app/src/ext-src/.gitkeep | 1 - .../build/web-app/src/ext-src/jsconfig.json | 27 +++++++++++++++++ .../.wasp/build/web-app/src/shared/.gitkeep | 1 - .../build/web-app/src/shared/jsconfig.json | 23 ++++++++++++++ .../waspBuild/src/client/.gitkeep | 1 - .../waspBuild/src/client/jsconfig.json | 27 +++++++++++++++++ .../waspBuild/src/server/.gitkeep | 1 - .../waspBuild/src/server/jsconfig.json | 27 +++++++++++++++++ .../waspBuild/src/shared/.gitkeep | 1 - .../waspBuild/src/shared/jsconfig.json | 23 ++++++++++++++ .../waspCompile-golden/files.manifest | 14 ++++----- .../waspCompile/.wasp/out/.waspchecksums | 26 ++++++++-------- .../.wasp/out/server/src/ext-src/.gitkeep | 1 - .../out/server/src/ext-src/jsconfig.json | 27 +++++++++++++++++ .../.wasp/out/server/src/shared/.gitkeep | 1 - .../.wasp/out/server/src/shared/jsconfig.json | 23 ++++++++++++++ .../.wasp/out/web-app/src/ext-src/.gitkeep | 1 - .../out/web-app/src/ext-src/jsconfig.json | 27 +++++++++++++++++ .../.wasp/out/web-app/src/shared/.gitkeep | 1 - .../out/web-app/src/shared/jsconfig.json | 23 ++++++++++++++ .../waspCompile/src/client/.gitkeep | 1 - .../waspCompile/src/client/jsconfig.json | 27 +++++++++++++++++ .../waspCompile/src/server/.gitkeep | 1 - .../waspCompile/src/server/jsconfig.json | 27 +++++++++++++++++ .../waspCompile/src/shared/.gitkeep | 1 - .../waspCompile/src/shared/jsconfig.json | 23 ++++++++++++++ .../waspJob-golden/files.manifest | 14 ++++----- .../waspJob/.wasp/out/.waspchecksums | 30 +++++++++---------- .../.wasp/out/server/src/ext-src/.gitkeep | 1 - .../out/server/src/ext-src/jsconfig.json | 27 +++++++++++++++++ .../.wasp/out/server/src/shared/.gitkeep | 1 - .../.wasp/out/server/src/shared/jsconfig.json | 23 ++++++++++++++ .../.wasp/out/web-app/src/ext-src/.gitkeep | 1 - .../out/web-app/src/ext-src/jsconfig.json | 27 +++++++++++++++++ .../.wasp/out/web-app/src/shared/.gitkeep | 1 - .../out/web-app/src/shared/jsconfig.json | 23 ++++++++++++++ .../waspJob/src/client/.gitkeep | 1 - .../waspJob/src/client/jsconfig.json | 27 +++++++++++++++++ .../waspJob/src/server/.gitkeep | 1 - .../waspJob/src/server/jsconfig.json | 27 +++++++++++++++++ .../waspJob/src/shared/.gitkeep | 1 - .../waspJob/src/shared/jsconfig.json | 23 ++++++++++++++ .../waspMigrate-golden/files.manifest | 14 ++++----- .../waspMigrate/.wasp/out/.waspchecksums | 26 ++++++++-------- .../.wasp/out/server/src/ext-src/.gitkeep | 1 - .../out/server/src/ext-src/jsconfig.json | 27 +++++++++++++++++ .../.wasp/out/server/src/shared/.gitkeep | 1 - .../.wasp/out/server/src/shared/jsconfig.json | 23 ++++++++++++++ .../.wasp/out/web-app/src/ext-src/.gitkeep | 1 - .../out/web-app/src/ext-src/jsconfig.json | 27 +++++++++++++++++ .../.wasp/out/web-app/src/shared/.gitkeep | 1 - .../out/web-app/src/shared/jsconfig.json | 23 ++++++++++++++ .../waspMigrate/src/client/.gitkeep | 1 - .../waspMigrate/src/client/jsconfig.json | 27 +++++++++++++++++ .../waspMigrate/src/server/.gitkeep | 1 - .../waspMigrate/src/server/jsconfig.json | 27 +++++++++++++++++ .../waspMigrate/src/shared/.gitkeep | 1 - .../waspMigrate/src/shared/jsconfig.json | 23 ++++++++++++++ .../waspNew-golden/files.manifest | 6 ++-- .../waspNew/src/client/.gitkeep | 1 - .../waspNew/src/client/jsconfig.json | 27 +++++++++++++++++ .../waspNew/src/server/.gitkeep | 1 - .../waspNew/src/server/jsconfig.json | 27 +++++++++++++++++ .../waspNew/src/shared/.gitkeep | 1 - .../waspNew/src/shared/jsconfig.json | 23 ++++++++++++++ waspc/examples/todoApp/src/client/.gitkeep | 1 - .../examples/todoApp/src/client/jsconfig.json | 27 +++++++++++++++++ waspc/examples/todoApp/src/server/.gitkeep | 1 - .../examples/todoApp/src/server/jsconfig.json | 27 +++++++++++++++++ waspc/examples/todoApp/src/shared/.gitkeep | 1 - .../examples/todoApp/src/shared/jsconfig.json | 23 ++++++++++++++ waspc/waspc.cabal | 4 +-- 84 files changed, 1025 insertions(+), 125 deletions(-) delete mode 100644 waspc/data/Cli/templates/new/src/client/.gitkeep create mode 100644 waspc/data/Cli/templates/new/src/client/jsconfig.json delete mode 100644 waspc/data/Cli/templates/new/src/server/.gitkeep create mode 100644 waspc/data/Cli/templates/new/src/server/jsconfig.json delete mode 100644 waspc/data/Cli/templates/new/src/shared/.gitkeep create mode 100644 waspc/data/Cli/templates/new/src/shared/jsconfig.json delete mode 100644 waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/ext-src/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/ext-src/jsconfig.json delete mode 100644 waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/shared/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/shared/jsconfig.json delete mode 100644 waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/web-app/src/ext-src/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/web-app/src/ext-src/jsconfig.json delete mode 100644 waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/web-app/src/shared/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/web-app/src/shared/jsconfig.json delete mode 100644 waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/client/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/client/jsconfig.json delete mode 100644 waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/server/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/server/jsconfig.json delete mode 100644 waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/shared/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/shared/jsconfig.json delete mode 100644 waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/ext-src/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/ext-src/jsconfig.json delete mode 100644 waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/shared/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/shared/jsconfig.json delete mode 100644 waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/web-app/src/ext-src/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/web-app/src/ext-src/jsconfig.json delete mode 100644 waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/web-app/src/shared/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/web-app/src/shared/jsconfig.json delete mode 100644 waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/client/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/client/jsconfig.json delete mode 100644 waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/server/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/server/jsconfig.json delete mode 100644 waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/shared/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/shared/jsconfig.json delete mode 100644 waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/ext-src/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/ext-src/jsconfig.json delete mode 100644 waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/shared/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/shared/jsconfig.json delete mode 100644 waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/web-app/src/ext-src/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/web-app/src/ext-src/jsconfig.json delete mode 100644 waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/web-app/src/shared/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/web-app/src/shared/jsconfig.json delete mode 100644 waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/client/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/client/jsconfig.json delete mode 100644 waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/server/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/server/jsconfig.json delete mode 100644 waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/shared/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/shared/jsconfig.json delete mode 100644 waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/ext-src/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/ext-src/jsconfig.json delete mode 100644 waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/shared/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/shared/jsconfig.json delete mode 100644 waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/web-app/src/ext-src/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/web-app/src/ext-src/jsconfig.json delete mode 100644 waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/web-app/src/shared/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/web-app/src/shared/jsconfig.json delete mode 100644 waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/client/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/client/jsconfig.json delete mode 100644 waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/server/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/server/jsconfig.json delete mode 100644 waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/shared/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/shared/jsconfig.json delete mode 100644 waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/client/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/client/jsconfig.json delete mode 100644 waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/server/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/server/jsconfig.json delete mode 100644 waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/shared/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/shared/jsconfig.json delete mode 100644 waspc/examples/todoApp/src/client/.gitkeep create mode 100644 waspc/examples/todoApp/src/client/jsconfig.json delete mode 100644 waspc/examples/todoApp/src/server/.gitkeep create mode 100644 waspc/examples/todoApp/src/server/jsconfig.json delete mode 100644 waspc/examples/todoApp/src/shared/.gitkeep create mode 100644 waspc/examples/todoApp/src/shared/jsconfig.json diff --git a/waspc/data/Cli/templates/new/src/client/.gitkeep b/waspc/data/Cli/templates/new/src/client/.gitkeep deleted file mode 100644 index 878bca16e..000000000 --- a/waspc/data/Cli/templates/new/src/client/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/data/Cli/templates/new/src/client/jsconfig.json b/waspc/data/Cli/templates/new/src/client/jsconfig.json new file mode 100644 index 000000000..e9b5551fd --- /dev/null +++ b/waspc/data/Cli/templates/new/src/client/jsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/web-app/", + "paths": { + // Resolve all "@wasp" imports to the generated source code. + "@wasp/*": [ + "src/*" + ], + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping + "*": [ + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" + ] + } + } +} diff --git a/waspc/data/Cli/templates/new/src/server/.gitkeep b/waspc/data/Cli/templates/new/src/server/.gitkeep deleted file mode 100644 index 878bca16e..000000000 --- a/waspc/data/Cli/templates/new/src/server/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/data/Cli/templates/new/src/server/jsconfig.json b/waspc/data/Cli/templates/new/src/server/jsconfig.json new file mode 100644 index 000000000..9e996fc5d --- /dev/null +++ b/waspc/data/Cli/templates/new/src/server/jsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server/", + "paths": { + // Resolve all "@wasp" imports to the generated source code. + "@wasp/*": [ + "src/*" + ], + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping + "*": [ + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, Try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" + ] + } + } +} diff --git a/waspc/data/Cli/templates/new/src/shared/.gitkeep b/waspc/data/Cli/templates/new/src/shared/.gitkeep deleted file mode 100644 index 878bca16e..000000000 --- a/waspc/data/Cli/templates/new/src/shared/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/data/Cli/templates/new/src/shared/jsconfig.json b/waspc/data/Cli/templates/new/src/shared/jsconfig.json new file mode 100644 index 000000000..0c4e7f7eb --- /dev/null +++ b/waspc/data/Cli/templates/new/src/shared/jsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server", + "paths": { + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping + "*": [ + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" + ] + } + } +} diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/files.manifest b/waspc/e2e-test/test-outputs/waspBuild-golden/files.manifest index fa92ad53d..e9b129701 100644 --- a/waspc/e2e-test/test-outputs/waspBuild-golden/files.manifest +++ b/waspc/e2e-test/test-outputs/waspBuild-golden/files.manifest @@ -11,7 +11,7 @@ waspBuild/.wasp/build/server/src/config.js waspBuild/.wasp/build/server/src/core/AuthError.js waspBuild/.wasp/build/server/src/core/HttpError.js waspBuild/.wasp/build/server/src/dbClient.js -waspBuild/.wasp/build/server/src/ext-src/.gitkeep +waspBuild/.wasp/build/server/src/ext-src/jsconfig.json waspBuild/.wasp/build/server/src/jobs/core/Job.js waspBuild/.wasp/build/server/src/jobs/core/SubmittedJob.js waspBuild/.wasp/build/server/src/jobs/core/allJobs.js @@ -21,7 +21,7 @@ waspBuild/.wasp/build/server/src/jobs/core/simpleJob.js waspBuild/.wasp/build/server/src/routes/index.js waspBuild/.wasp/build/server/src/routes/operations/index.js waspBuild/.wasp/build/server/src/server.js -waspBuild/.wasp/build/server/src/shared/.gitkeep +waspBuild/.wasp/build/server/src/shared/jsconfig.json waspBuild/.wasp/build/server/src/utils.js waspBuild/.wasp/build/web-app/.npmrc waspBuild/.wasp/build/web-app/README.md @@ -34,9 +34,9 @@ waspBuild/.wasp/build/web-app/src/actions/core.js waspBuild/.wasp/build/web-app/src/actions/index.js waspBuild/.wasp/build/web-app/src/api.js waspBuild/.wasp/build/web-app/src/config.js -waspBuild/.wasp/build/web-app/src/ext-src/.gitkeep waspBuild/.wasp/build/web-app/src/ext-src/Main.css waspBuild/.wasp/build/web-app/src/ext-src/MainPage.js +waspBuild/.wasp/build/web-app/src/ext-src/jsconfig.json waspBuild/.wasp/build/web-app/src/ext-src/waspLogo.png waspBuild/.wasp/build/web-app/src/index.js waspBuild/.wasp/build/web-app/src/logo.png @@ -48,14 +48,14 @@ waspBuild/.wasp/build/web-app/src/queries/index.js waspBuild/.wasp/build/web-app/src/queryClient.js waspBuild/.wasp/build/web-app/src/router.js waspBuild/.wasp/build/web-app/src/serviceWorker.js -waspBuild/.wasp/build/web-app/src/shared/.gitkeep +waspBuild/.wasp/build/web-app/src/shared/jsconfig.json waspBuild/.wasp/build/web-app/src/utils.js waspBuild/.wasproot waspBuild/main.wasp waspBuild/src/.waspignore -waspBuild/src/client/.gitkeep waspBuild/src/client/Main.css waspBuild/src/client/MainPage.js +waspBuild/src/client/jsconfig.json waspBuild/src/client/waspLogo.png -waspBuild/src/server/.gitkeep -waspBuild/src/shared/.gitkeep +waspBuild/src/server/jsconfig.json +waspBuild/src/shared/jsconfig.json diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/.waspchecksums b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/.waspchecksums index 039c3b6cc..dca5a39c5 100644 --- a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/.waspchecksums +++ b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/.waspchecksums @@ -86,9 +86,9 @@ [ [ "file", - "server/src/ext-src/.gitkeep" + "server/src/ext-src/jsconfig.json" ], - "3c93961ee5013ddc0149b57c9eb7b469aea5f3cb197429bded0d20498a267b06" + "4130060d02d39d5fdc11bdb288cfe08d36dc89be29ade017b16db6477e63c47a" ], [ [ @@ -156,9 +156,9 @@ [ [ "file", - "server/src/shared/.gitkeep" + "server/src/shared/jsconfig.json" ], - "3c93961ee5013ddc0149b57c9eb7b469aea5f3cb197429bded0d20498a267b06" + "6972bc64315755788fd02be62c44ea8ffb60dd874b863fca2878f6160ab4b0e2" ], [ [ @@ -251,13 +251,6 @@ ], "a30d5ae7c1b317a7132cac93f4b5bffc3daf11f4f07b5e0d977d063810ffdd11" ], - [ - [ - "file", - "web-app/src/ext-src/.gitkeep" - ], - "3c93961ee5013ddc0149b57c9eb7b469aea5f3cb197429bded0d20498a267b06" - ], [ [ "file", @@ -272,6 +265,13 @@ ], "c9ed9b5271f648715373095f43d60a2ab3e47f159c6dd6f3337ed22e5b73e80c" ], + [ + [ + "file", + "web-app/src/ext-src/jsconfig.json" + ], + "06804c81fa3b227c1b3a04e950f8db9ed85bf41d042b90e8e8332856016e113f" + ], [ [ "file", @@ -352,9 +352,9 @@ [ [ "file", - "web-app/src/shared/.gitkeep" + "web-app/src/shared/jsconfig.json" ], - "3c93961ee5013ddc0149b57c9eb7b469aea5f3cb197429bded0d20498a267b06" + "6972bc64315755788fd02be62c44ea8ffb60dd874b863fca2878f6160ab4b0e2" ], [ [ diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/ext-src/.gitkeep b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/ext-src/.gitkeep deleted file mode 100644 index 878bca16e..000000000 --- a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/ext-src/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/ext-src/jsconfig.json b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/ext-src/jsconfig.json new file mode 100644 index 000000000..9e996fc5d --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/ext-src/jsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server/", + "paths": { + // Resolve all "@wasp" imports to the generated source code. + "@wasp/*": [ + "src/*" + ], + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping + "*": [ + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, Try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" + ] + } + } +} diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/shared/.gitkeep b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/shared/.gitkeep deleted file mode 100644 index 878bca16e..000000000 --- a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/shared/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/shared/jsconfig.json b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/shared/jsconfig.json new file mode 100644 index 000000000..0c4e7f7eb --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/shared/jsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server", + "paths": { + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping + "*": [ + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" + ] + } + } +} diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/web-app/src/ext-src/.gitkeep b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/web-app/src/ext-src/.gitkeep deleted file mode 100644 index 878bca16e..000000000 --- a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/web-app/src/ext-src/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/web-app/src/ext-src/jsconfig.json b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/web-app/src/ext-src/jsconfig.json new file mode 100644 index 000000000..e9b5551fd --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/web-app/src/ext-src/jsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/web-app/", + "paths": { + // Resolve all "@wasp" imports to the generated source code. + "@wasp/*": [ + "src/*" + ], + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping + "*": [ + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" + ] + } + } +} diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/web-app/src/shared/.gitkeep b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/web-app/src/shared/.gitkeep deleted file mode 100644 index 878bca16e..000000000 --- a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/web-app/src/shared/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/web-app/src/shared/jsconfig.json b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/web-app/src/shared/jsconfig.json new file mode 100644 index 000000000..0c4e7f7eb --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/web-app/src/shared/jsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server", + "paths": { + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping + "*": [ + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" + ] + } + } +} diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/client/.gitkeep b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/client/.gitkeep deleted file mode 100644 index 878bca16e..000000000 --- a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/client/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/client/jsconfig.json b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/client/jsconfig.json new file mode 100644 index 000000000..e9b5551fd --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/client/jsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/web-app/", + "paths": { + // Resolve all "@wasp" imports to the generated source code. + "@wasp/*": [ + "src/*" + ], + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping + "*": [ + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" + ] + } + } +} diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/server/.gitkeep b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/server/.gitkeep deleted file mode 100644 index 878bca16e..000000000 --- a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/server/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/server/jsconfig.json b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/server/jsconfig.json new file mode 100644 index 000000000..9e996fc5d --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/server/jsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server/", + "paths": { + // Resolve all "@wasp" imports to the generated source code. + "@wasp/*": [ + "src/*" + ], + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping + "*": [ + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, Try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" + ] + } + } +} diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/shared/.gitkeep b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/shared/.gitkeep deleted file mode 100644 index 878bca16e..000000000 --- a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/shared/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/shared/jsconfig.json b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/shared/jsconfig.json new file mode 100644 index 000000000..0c4e7f7eb --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/shared/jsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server", + "paths": { + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping + "*": [ + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" + ] + } + } +} diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/files.manifest b/waspc/e2e-test/test-outputs/waspCompile-golden/files.manifest index fca2497fd..d9afa537f 100644 --- a/waspc/e2e-test/test-outputs/waspCompile-golden/files.manifest +++ b/waspc/e2e-test/test-outputs/waspCompile-golden/files.manifest @@ -11,7 +11,7 @@ waspCompile/.wasp/out/server/src/config.js waspCompile/.wasp/out/server/src/core/AuthError.js waspCompile/.wasp/out/server/src/core/HttpError.js waspCompile/.wasp/out/server/src/dbClient.js -waspCompile/.wasp/out/server/src/ext-src/.gitkeep +waspCompile/.wasp/out/server/src/ext-src/jsconfig.json waspCompile/.wasp/out/server/src/jobs/core/Job.js waspCompile/.wasp/out/server/src/jobs/core/SubmittedJob.js waspCompile/.wasp/out/server/src/jobs/core/allJobs.js @@ -21,7 +21,7 @@ waspCompile/.wasp/out/server/src/jobs/core/simpleJob.js waspCompile/.wasp/out/server/src/routes/index.js waspCompile/.wasp/out/server/src/routes/operations/index.js waspCompile/.wasp/out/server/src/server.js -waspCompile/.wasp/out/server/src/shared/.gitkeep +waspCompile/.wasp/out/server/src/shared/jsconfig.json waspCompile/.wasp/out/server/src/utils.js waspCompile/.wasp/out/web-app/.npmrc waspCompile/.wasp/out/web-app/README.md @@ -34,9 +34,9 @@ waspCompile/.wasp/out/web-app/src/actions/core.js waspCompile/.wasp/out/web-app/src/actions/index.js waspCompile/.wasp/out/web-app/src/api.js waspCompile/.wasp/out/web-app/src/config.js -waspCompile/.wasp/out/web-app/src/ext-src/.gitkeep waspCompile/.wasp/out/web-app/src/ext-src/Main.css waspCompile/.wasp/out/web-app/src/ext-src/MainPage.js +waspCompile/.wasp/out/web-app/src/ext-src/jsconfig.json waspCompile/.wasp/out/web-app/src/ext-src/waspLogo.png waspCompile/.wasp/out/web-app/src/index.js waspCompile/.wasp/out/web-app/src/logo.png @@ -48,14 +48,14 @@ waspCompile/.wasp/out/web-app/src/queries/index.js waspCompile/.wasp/out/web-app/src/queryClient.js waspCompile/.wasp/out/web-app/src/router.js waspCompile/.wasp/out/web-app/src/serviceWorker.js -waspCompile/.wasp/out/web-app/src/shared/.gitkeep +waspCompile/.wasp/out/web-app/src/shared/jsconfig.json waspCompile/.wasp/out/web-app/src/utils.js waspCompile/.wasproot waspCompile/main.wasp waspCompile/src/.waspignore -waspCompile/src/client/.gitkeep waspCompile/src/client/Main.css waspCompile/src/client/MainPage.js +waspCompile/src/client/jsconfig.json waspCompile/src/client/waspLogo.png -waspCompile/src/server/.gitkeep -waspCompile/src/shared/.gitkeep +waspCompile/src/server/jsconfig.json +waspCompile/src/shared/jsconfig.json diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/.waspchecksums b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/.waspchecksums index 4628b2215..f5680645c 100644 --- a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/.waspchecksums +++ b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/.waspchecksums @@ -86,9 +86,9 @@ [ [ "file", - "server/src/ext-src/.gitkeep" + "server/src/ext-src/jsconfig.json" ], - "3c93961ee5013ddc0149b57c9eb7b469aea5f3cb197429bded0d20498a267b06" + "4130060d02d39d5fdc11bdb288cfe08d36dc89be29ade017b16db6477e63c47a" ], [ [ @@ -156,9 +156,9 @@ [ [ "file", - "server/src/shared/.gitkeep" + "server/src/shared/jsconfig.json" ], - "3c93961ee5013ddc0149b57c9eb7b469aea5f3cb197429bded0d20498a267b06" + "6972bc64315755788fd02be62c44ea8ffb60dd874b863fca2878f6160ab4b0e2" ], [ [ @@ -251,13 +251,6 @@ ], "a30d5ae7c1b317a7132cac93f4b5bffc3daf11f4f07b5e0d977d063810ffdd11" ], - [ - [ - "file", - "web-app/src/ext-src/.gitkeep" - ], - "3c93961ee5013ddc0149b57c9eb7b469aea5f3cb197429bded0d20498a267b06" - ], [ [ "file", @@ -272,6 +265,13 @@ ], "c9ed9b5271f648715373095f43d60a2ab3e47f159c6dd6f3337ed22e5b73e80c" ], + [ + [ + "file", + "web-app/src/ext-src/jsconfig.json" + ], + "06804c81fa3b227c1b3a04e950f8db9ed85bf41d042b90e8e8332856016e113f" + ], [ [ "file", @@ -352,9 +352,9 @@ [ [ "file", - "web-app/src/shared/.gitkeep" + "web-app/src/shared/jsconfig.json" ], - "3c93961ee5013ddc0149b57c9eb7b469aea5f3cb197429bded0d20498a267b06" + "6972bc64315755788fd02be62c44ea8ffb60dd874b863fca2878f6160ab4b0e2" ], [ [ diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/ext-src/.gitkeep b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/ext-src/.gitkeep deleted file mode 100644 index 878bca16e..000000000 --- a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/ext-src/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/ext-src/jsconfig.json b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/ext-src/jsconfig.json new file mode 100644 index 000000000..9e996fc5d --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/ext-src/jsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server/", + "paths": { + // Resolve all "@wasp" imports to the generated source code. + "@wasp/*": [ + "src/*" + ], + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping + "*": [ + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, Try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" + ] + } + } +} diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/shared/.gitkeep b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/shared/.gitkeep deleted file mode 100644 index 878bca16e..000000000 --- a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/shared/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/shared/jsconfig.json b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/shared/jsconfig.json new file mode 100644 index 000000000..0c4e7f7eb --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/shared/jsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server", + "paths": { + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping + "*": [ + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" + ] + } + } +} diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/web-app/src/ext-src/.gitkeep b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/web-app/src/ext-src/.gitkeep deleted file mode 100644 index 878bca16e..000000000 --- a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/web-app/src/ext-src/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/web-app/src/ext-src/jsconfig.json b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/web-app/src/ext-src/jsconfig.json new file mode 100644 index 000000000..e9b5551fd --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/web-app/src/ext-src/jsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/web-app/", + "paths": { + // Resolve all "@wasp" imports to the generated source code. + "@wasp/*": [ + "src/*" + ], + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping + "*": [ + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" + ] + } + } +} diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/web-app/src/shared/.gitkeep b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/web-app/src/shared/.gitkeep deleted file mode 100644 index 878bca16e..000000000 --- a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/web-app/src/shared/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/web-app/src/shared/jsconfig.json b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/web-app/src/shared/jsconfig.json new file mode 100644 index 000000000..0c4e7f7eb --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/web-app/src/shared/jsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server", + "paths": { + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping + "*": [ + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" + ] + } + } +} diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/client/.gitkeep b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/client/.gitkeep deleted file mode 100644 index 878bca16e..000000000 --- a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/client/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/client/jsconfig.json b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/client/jsconfig.json new file mode 100644 index 000000000..e9b5551fd --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/client/jsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/web-app/", + "paths": { + // Resolve all "@wasp" imports to the generated source code. + "@wasp/*": [ + "src/*" + ], + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping + "*": [ + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" + ] + } + } +} diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/server/.gitkeep b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/server/.gitkeep deleted file mode 100644 index 878bca16e..000000000 --- a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/server/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/server/jsconfig.json b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/server/jsconfig.json new file mode 100644 index 000000000..9e996fc5d --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/server/jsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server/", + "paths": { + // Resolve all "@wasp" imports to the generated source code. + "@wasp/*": [ + "src/*" + ], + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping + "*": [ + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, Try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" + ] + } + } +} diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/shared/.gitkeep b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/shared/.gitkeep deleted file mode 100644 index 878bca16e..000000000 --- a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/shared/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/shared/jsconfig.json b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/shared/jsconfig.json new file mode 100644 index 000000000..0c4e7f7eb --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/shared/jsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server", + "paths": { + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping + "*": [ + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" + ] + } + } +} diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/files.manifest b/waspc/e2e-test/test-outputs/waspJob-golden/files.manifest index 56dbc8c78..68ed4aceb 100644 --- a/waspc/e2e-test/test-outputs/waspJob-golden/files.manifest +++ b/waspc/e2e-test/test-outputs/waspJob-golden/files.manifest @@ -11,8 +11,8 @@ waspJob/.wasp/out/server/src/config.js waspJob/.wasp/out/server/src/core/AuthError.js waspJob/.wasp/out/server/src/core/HttpError.js waspJob/.wasp/out/server/src/dbClient.js -waspJob/.wasp/out/server/src/ext-src/.gitkeep waspJob/.wasp/out/server/src/ext-src/jobs/bar.js +waspJob/.wasp/out/server/src/ext-src/jsconfig.json waspJob/.wasp/out/server/src/jobs/MySpecialJob.js waspJob/.wasp/out/server/src/jobs/core/Job.js waspJob/.wasp/out/server/src/jobs/core/SubmittedJob.js @@ -23,7 +23,7 @@ waspJob/.wasp/out/server/src/jobs/core/simpleJob.js waspJob/.wasp/out/server/src/routes/index.js waspJob/.wasp/out/server/src/routes/operations/index.js waspJob/.wasp/out/server/src/server.js -waspJob/.wasp/out/server/src/shared/.gitkeep +waspJob/.wasp/out/server/src/shared/jsconfig.json waspJob/.wasp/out/server/src/utils.js waspJob/.wasp/out/web-app/.npmrc waspJob/.wasp/out/web-app/README.md @@ -36,9 +36,9 @@ waspJob/.wasp/out/web-app/src/actions/core.js waspJob/.wasp/out/web-app/src/actions/index.js waspJob/.wasp/out/web-app/src/api.js waspJob/.wasp/out/web-app/src/config.js -waspJob/.wasp/out/web-app/src/ext-src/.gitkeep waspJob/.wasp/out/web-app/src/ext-src/Main.css waspJob/.wasp/out/web-app/src/ext-src/MainPage.js +waspJob/.wasp/out/web-app/src/ext-src/jsconfig.json waspJob/.wasp/out/web-app/src/ext-src/waspLogo.png waspJob/.wasp/out/web-app/src/index.js waspJob/.wasp/out/web-app/src/logo.png @@ -50,15 +50,15 @@ waspJob/.wasp/out/web-app/src/queries/index.js waspJob/.wasp/out/web-app/src/queryClient.js waspJob/.wasp/out/web-app/src/router.js waspJob/.wasp/out/web-app/src/serviceWorker.js -waspJob/.wasp/out/web-app/src/shared/.gitkeep +waspJob/.wasp/out/web-app/src/shared/jsconfig.json waspJob/.wasp/out/web-app/src/utils.js waspJob/.wasproot waspJob/main.wasp waspJob/src/.waspignore -waspJob/src/client/.gitkeep waspJob/src/client/Main.css waspJob/src/client/MainPage.js +waspJob/src/client/jsconfig.json waspJob/src/client/waspLogo.png -waspJob/src/server/.gitkeep waspJob/src/server/jobs/bar.js -waspJob/src/shared/.gitkeep +waspJob/src/server/jsconfig.json +waspJob/src/shared/jsconfig.json diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/.waspchecksums b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/.waspchecksums index 1a1fdc238..82c4e21a7 100644 --- a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/.waspchecksums +++ b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/.waspchecksums @@ -86,16 +86,16 @@ [ [ "file", - "server/src/ext-src/.gitkeep" + "server/src/ext-src/jobs/bar.js" ], - "3c93961ee5013ddc0149b57c9eb7b469aea5f3cb197429bded0d20498a267b06" + "2e126f35b3a3e9a289e0dcfd8707fe903c6a053e0cf85899fb5f686d77dd3eb5" ], [ [ "file", - "server/src/ext-src/jobs/bar.js" + "server/src/ext-src/jsconfig.json" ], - "2e126f35b3a3e9a289e0dcfd8707fe903c6a053e0cf85899fb5f686d77dd3eb5" + "4130060d02d39d5fdc11bdb288cfe08d36dc89be29ade017b16db6477e63c47a" ], [ [ @@ -170,9 +170,9 @@ [ [ "file", - "server/src/shared/.gitkeep" + "server/src/shared/jsconfig.json" ], - "3c93961ee5013ddc0149b57c9eb7b469aea5f3cb197429bded0d20498a267b06" + "6972bc64315755788fd02be62c44ea8ffb60dd874b863fca2878f6160ab4b0e2" ], [ [ @@ -265,13 +265,6 @@ ], "a30d5ae7c1b317a7132cac93f4b5bffc3daf11f4f07b5e0d977d063810ffdd11" ], - [ - [ - "file", - "web-app/src/ext-src/.gitkeep" - ], - "3c93961ee5013ddc0149b57c9eb7b469aea5f3cb197429bded0d20498a267b06" - ], [ [ "file", @@ -286,6 +279,13 @@ ], "c9ed9b5271f648715373095f43d60a2ab3e47f159c6dd6f3337ed22e5b73e80c" ], + [ + [ + "file", + "web-app/src/ext-src/jsconfig.json" + ], + "06804c81fa3b227c1b3a04e950f8db9ed85bf41d042b90e8e8332856016e113f" + ], [ [ "file", @@ -366,9 +366,9 @@ [ [ "file", - "web-app/src/shared/.gitkeep" + "web-app/src/shared/jsconfig.json" ], - "3c93961ee5013ddc0149b57c9eb7b469aea5f3cb197429bded0d20498a267b06" + "6972bc64315755788fd02be62c44ea8ffb60dd874b863fca2878f6160ab4b0e2" ], [ [ diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/ext-src/.gitkeep b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/ext-src/.gitkeep deleted file mode 100644 index 878bca16e..000000000 --- a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/ext-src/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/ext-src/jsconfig.json b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/ext-src/jsconfig.json new file mode 100644 index 000000000..9e996fc5d --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/ext-src/jsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server/", + "paths": { + // Resolve all "@wasp" imports to the generated source code. + "@wasp/*": [ + "src/*" + ], + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping + "*": [ + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, Try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" + ] + } + } +} diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/shared/.gitkeep b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/shared/.gitkeep deleted file mode 100644 index 878bca16e..000000000 --- a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/shared/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/shared/jsconfig.json b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/shared/jsconfig.json new file mode 100644 index 000000000..0c4e7f7eb --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/shared/jsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server", + "paths": { + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping + "*": [ + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" + ] + } + } +} diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/web-app/src/ext-src/.gitkeep b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/web-app/src/ext-src/.gitkeep deleted file mode 100644 index 878bca16e..000000000 --- a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/web-app/src/ext-src/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/web-app/src/ext-src/jsconfig.json b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/web-app/src/ext-src/jsconfig.json new file mode 100644 index 000000000..e9b5551fd --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/web-app/src/ext-src/jsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/web-app/", + "paths": { + // Resolve all "@wasp" imports to the generated source code. + "@wasp/*": [ + "src/*" + ], + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping + "*": [ + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" + ] + } + } +} diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/web-app/src/shared/.gitkeep b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/web-app/src/shared/.gitkeep deleted file mode 100644 index 878bca16e..000000000 --- a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/web-app/src/shared/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/web-app/src/shared/jsconfig.json b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/web-app/src/shared/jsconfig.json new file mode 100644 index 000000000..0c4e7f7eb --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/web-app/src/shared/jsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server", + "paths": { + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping + "*": [ + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" + ] + } + } +} diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/client/.gitkeep b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/client/.gitkeep deleted file mode 100644 index 878bca16e..000000000 --- a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/client/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/client/jsconfig.json b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/client/jsconfig.json new file mode 100644 index 000000000..e9b5551fd --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/client/jsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/web-app/", + "paths": { + // Resolve all "@wasp" imports to the generated source code. + "@wasp/*": [ + "src/*" + ], + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping + "*": [ + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" + ] + } + } +} diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/server/.gitkeep b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/server/.gitkeep deleted file mode 100644 index 878bca16e..000000000 --- a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/server/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/server/jsconfig.json b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/server/jsconfig.json new file mode 100644 index 000000000..9e996fc5d --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/server/jsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server/", + "paths": { + // Resolve all "@wasp" imports to the generated source code. + "@wasp/*": [ + "src/*" + ], + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping + "*": [ + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, Try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" + ] + } + } +} diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/shared/.gitkeep b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/shared/.gitkeep deleted file mode 100644 index 878bca16e..000000000 --- a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/shared/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/shared/jsconfig.json b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/shared/jsconfig.json new file mode 100644 index 000000000..0c4e7f7eb --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/shared/jsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server", + "paths": { + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping + "*": [ + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" + ] + } + } +} diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/files.manifest b/waspc/e2e-test/test-outputs/waspMigrate-golden/files.manifest index d36a82b0c..1f66cfcea 100644 --- a/waspc/e2e-test/test-outputs/waspMigrate-golden/files.manifest +++ b/waspc/e2e-test/test-outputs/waspMigrate-golden/files.manifest @@ -16,7 +16,7 @@ waspMigrate/.wasp/out/server/src/config.js waspMigrate/.wasp/out/server/src/core/AuthError.js waspMigrate/.wasp/out/server/src/core/HttpError.js waspMigrate/.wasp/out/server/src/dbClient.js -waspMigrate/.wasp/out/server/src/ext-src/.gitkeep +waspMigrate/.wasp/out/server/src/ext-src/jsconfig.json waspMigrate/.wasp/out/server/src/jobs/core/Job.js waspMigrate/.wasp/out/server/src/jobs/core/SubmittedJob.js waspMigrate/.wasp/out/server/src/jobs/core/allJobs.js @@ -26,7 +26,7 @@ waspMigrate/.wasp/out/server/src/jobs/core/simpleJob.js waspMigrate/.wasp/out/server/src/routes/index.js waspMigrate/.wasp/out/server/src/routes/operations/index.js waspMigrate/.wasp/out/server/src/server.js -waspMigrate/.wasp/out/server/src/shared/.gitkeep +waspMigrate/.wasp/out/server/src/shared/jsconfig.json waspMigrate/.wasp/out/server/src/utils.js waspMigrate/.wasp/out/web-app/.npmrc waspMigrate/.wasp/out/web-app/README.md @@ -39,9 +39,9 @@ waspMigrate/.wasp/out/web-app/src/actions/core.js waspMigrate/.wasp/out/web-app/src/actions/index.js waspMigrate/.wasp/out/web-app/src/api.js waspMigrate/.wasp/out/web-app/src/config.js -waspMigrate/.wasp/out/web-app/src/ext-src/.gitkeep waspMigrate/.wasp/out/web-app/src/ext-src/Main.css waspMigrate/.wasp/out/web-app/src/ext-src/MainPage.js +waspMigrate/.wasp/out/web-app/src/ext-src/jsconfig.json waspMigrate/.wasp/out/web-app/src/ext-src/waspLogo.png waspMigrate/.wasp/out/web-app/src/index.js waspMigrate/.wasp/out/web-app/src/logo.png @@ -53,16 +53,16 @@ waspMigrate/.wasp/out/web-app/src/queries/index.js waspMigrate/.wasp/out/web-app/src/queryClient.js waspMigrate/.wasp/out/web-app/src/router.js waspMigrate/.wasp/out/web-app/src/serviceWorker.js -waspMigrate/.wasp/out/web-app/src/shared/.gitkeep +waspMigrate/.wasp/out/web-app/src/shared/jsconfig.json waspMigrate/.wasp/out/web-app/src/utils.js waspMigrate/.wasproot waspMigrate/main.wasp waspMigrate/migrations/migration_lock.toml waspMigrate/migrations/no-date-foo/migration.sql waspMigrate/src/.waspignore -waspMigrate/src/client/.gitkeep waspMigrate/src/client/Main.css waspMigrate/src/client/MainPage.js +waspMigrate/src/client/jsconfig.json waspMigrate/src/client/waspLogo.png -waspMigrate/src/server/.gitkeep -waspMigrate/src/shared/.gitkeep +waspMigrate/src/server/jsconfig.json +waspMigrate/src/shared/jsconfig.json diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/.waspchecksums b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/.waspchecksums index 119df4e70..e59fa9f55 100644 --- a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/.waspchecksums +++ b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/.waspchecksums @@ -86,9 +86,9 @@ [ [ "file", - "server/src/ext-src/.gitkeep" + "server/src/ext-src/jsconfig.json" ], - "3c93961ee5013ddc0149b57c9eb7b469aea5f3cb197429bded0d20498a267b06" + "4130060d02d39d5fdc11bdb288cfe08d36dc89be29ade017b16db6477e63c47a" ], [ [ @@ -156,9 +156,9 @@ [ [ "file", - "server/src/shared/.gitkeep" + "server/src/shared/jsconfig.json" ], - "3c93961ee5013ddc0149b57c9eb7b469aea5f3cb197429bded0d20498a267b06" + "6972bc64315755788fd02be62c44ea8ffb60dd874b863fca2878f6160ab4b0e2" ], [ [ @@ -251,13 +251,6 @@ ], "a30d5ae7c1b317a7132cac93f4b5bffc3daf11f4f07b5e0d977d063810ffdd11" ], - [ - [ - "file", - "web-app/src/ext-src/.gitkeep" - ], - "3c93961ee5013ddc0149b57c9eb7b469aea5f3cb197429bded0d20498a267b06" - ], [ [ "file", @@ -272,6 +265,13 @@ ], "c9ed9b5271f648715373095f43d60a2ab3e47f159c6dd6f3337ed22e5b73e80c" ], + [ + [ + "file", + "web-app/src/ext-src/jsconfig.json" + ], + "06804c81fa3b227c1b3a04e950f8db9ed85bf41d042b90e8e8332856016e113f" + ], [ [ "file", @@ -352,9 +352,9 @@ [ [ "file", - "web-app/src/shared/.gitkeep" + "web-app/src/shared/jsconfig.json" ], - "3c93961ee5013ddc0149b57c9eb7b469aea5f3cb197429bded0d20498a267b06" + "6972bc64315755788fd02be62c44ea8ffb60dd874b863fca2878f6160ab4b0e2" ], [ [ diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/ext-src/.gitkeep b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/ext-src/.gitkeep deleted file mode 100644 index 878bca16e..000000000 --- a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/ext-src/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/ext-src/jsconfig.json b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/ext-src/jsconfig.json new file mode 100644 index 000000000..9e996fc5d --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/ext-src/jsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server/", + "paths": { + // Resolve all "@wasp" imports to the generated source code. + "@wasp/*": [ + "src/*" + ], + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping + "*": [ + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, Try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" + ] + } + } +} diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/shared/.gitkeep b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/shared/.gitkeep deleted file mode 100644 index 878bca16e..000000000 --- a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/shared/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/shared/jsconfig.json b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/shared/jsconfig.json new file mode 100644 index 000000000..0c4e7f7eb --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/shared/jsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server", + "paths": { + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping + "*": [ + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" + ] + } + } +} diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/web-app/src/ext-src/.gitkeep b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/web-app/src/ext-src/.gitkeep deleted file mode 100644 index 878bca16e..000000000 --- a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/web-app/src/ext-src/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/web-app/src/ext-src/jsconfig.json b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/web-app/src/ext-src/jsconfig.json new file mode 100644 index 000000000..e9b5551fd --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/web-app/src/ext-src/jsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/web-app/", + "paths": { + // Resolve all "@wasp" imports to the generated source code. + "@wasp/*": [ + "src/*" + ], + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping + "*": [ + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" + ] + } + } +} diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/web-app/src/shared/.gitkeep b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/web-app/src/shared/.gitkeep deleted file mode 100644 index 878bca16e..000000000 --- a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/web-app/src/shared/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/web-app/src/shared/jsconfig.json b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/web-app/src/shared/jsconfig.json new file mode 100644 index 000000000..0c4e7f7eb --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/web-app/src/shared/jsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server", + "paths": { + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping + "*": [ + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" + ] + } + } +} diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/client/.gitkeep b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/client/.gitkeep deleted file mode 100644 index 878bca16e..000000000 --- a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/client/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/client/jsconfig.json b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/client/jsconfig.json new file mode 100644 index 000000000..e9b5551fd --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/client/jsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/web-app/", + "paths": { + // Resolve all "@wasp" imports to the generated source code. + "@wasp/*": [ + "src/*" + ], + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping + "*": [ + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" + ] + } + } +} diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/server/.gitkeep b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/server/.gitkeep deleted file mode 100644 index 878bca16e..000000000 --- a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/server/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/server/jsconfig.json b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/server/jsconfig.json new file mode 100644 index 000000000..9e996fc5d --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/server/jsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server/", + "paths": { + // Resolve all "@wasp" imports to the generated source code. + "@wasp/*": [ + "src/*" + ], + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping + "*": [ + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, Try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" + ] + } + } +} diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/shared/.gitkeep b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/shared/.gitkeep deleted file mode 100644 index 878bca16e..000000000 --- a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/shared/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/shared/jsconfig.json b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/shared/jsconfig.json new file mode 100644 index 000000000..0c4e7f7eb --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/shared/jsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server", + "paths": { + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping + "*": [ + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" + ] + } + } +} diff --git a/waspc/e2e-test/test-outputs/waspNew-golden/files.manifest b/waspc/e2e-test/test-outputs/waspNew-golden/files.manifest index 095553862..733afa0d1 100644 --- a/waspc/e2e-test/test-outputs/waspNew-golden/files.manifest +++ b/waspc/e2e-test/test-outputs/waspNew-golden/files.manifest @@ -1,9 +1,9 @@ waspNew/.wasproot waspNew/main.wasp waspNew/src/.waspignore -waspNew/src/client/.gitkeep waspNew/src/client/Main.css waspNew/src/client/MainPage.js +waspNew/src/client/jsconfig.json waspNew/src/client/waspLogo.png -waspNew/src/server/.gitkeep -waspNew/src/shared/.gitkeep +waspNew/src/server/jsconfig.json +waspNew/src/shared/jsconfig.json diff --git a/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/client/.gitkeep b/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/client/.gitkeep deleted file mode 100644 index 878bca16e..000000000 --- a/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/client/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/client/jsconfig.json b/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/client/jsconfig.json new file mode 100644 index 000000000..e9b5551fd --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/client/jsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/web-app/", + "paths": { + // Resolve all "@wasp" imports to the generated source code. + "@wasp/*": [ + "src/*" + ], + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping + "*": [ + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" + ] + } + } +} diff --git a/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/server/.gitkeep b/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/server/.gitkeep deleted file mode 100644 index 878bca16e..000000000 --- a/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/server/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/server/jsconfig.json b/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/server/jsconfig.json new file mode 100644 index 000000000..9e996fc5d --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/server/jsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server/", + "paths": { + // Resolve all "@wasp" imports to the generated source code. + "@wasp/*": [ + "src/*" + ], + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping + "*": [ + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, Try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" + ] + } + } +} diff --git a/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/shared/.gitkeep b/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/shared/.gitkeep deleted file mode 100644 index 878bca16e..000000000 --- a/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/shared/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/shared/jsconfig.json b/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/shared/jsconfig.json new file mode 100644 index 000000000..0c4e7f7eb --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/shared/jsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server", + "paths": { + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping + "*": [ + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" + ] + } + } +} diff --git a/waspc/examples/todoApp/src/client/.gitkeep b/waspc/examples/todoApp/src/client/.gitkeep deleted file mode 100644 index 878bca16e..000000000 --- a/waspc/examples/todoApp/src/client/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/examples/todoApp/src/client/jsconfig.json b/waspc/examples/todoApp/src/client/jsconfig.json new file mode 100644 index 000000000..e9b5551fd --- /dev/null +++ b/waspc/examples/todoApp/src/client/jsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/web-app/", + "paths": { + // Resolve all "@wasp" imports to the generated source code. + "@wasp/*": [ + "src/*" + ], + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping + "*": [ + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" + ] + } + } +} diff --git a/waspc/examples/todoApp/src/server/.gitkeep b/waspc/examples/todoApp/src/server/.gitkeep deleted file mode 100644 index 878bca16e..000000000 --- a/waspc/examples/todoApp/src/server/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/examples/todoApp/src/server/jsconfig.json b/waspc/examples/todoApp/src/server/jsconfig.json new file mode 100644 index 000000000..9e996fc5d --- /dev/null +++ b/waspc/examples/todoApp/src/server/jsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server/", + "paths": { + // Resolve all "@wasp" imports to the generated source code. + "@wasp/*": [ + "src/*" + ], + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping + "*": [ + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, Try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" + ] + } + } +} diff --git a/waspc/examples/todoApp/src/shared/.gitkeep b/waspc/examples/todoApp/src/shared/.gitkeep deleted file mode 100644 index 878bca16e..000000000 --- a/waspc/examples/todoApp/src/shared/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/examples/todoApp/src/shared/jsconfig.json b/waspc/examples/todoApp/src/shared/jsconfig.json new file mode 100644 index 000000000..0c4e7f7eb --- /dev/null +++ b/waspc/examples/todoApp/src/shared/jsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server", + "paths": { + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping + "*": [ + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" + ] + } + } +} diff --git a/waspc/waspc.cabal b/waspc/waspc.cabal index c41e22b2d..c1df5d593 100644 --- a/waspc/waspc.cabal +++ b/waspc/waspc.cabal @@ -42,13 +42,11 @@ data-files: Cli/bash-completion Cli/templates/**/*.css Cli/templates/**/*.js + Cli/templates/**/*.json Cli/templates/**/*.png Cli/templates/new/.gitignore Cli/templates/new/.wasproot Cli/templates/new/src/.waspignore - Cli/templates/new/src/client/.gitkeep - Cli/templates/new/src/server/.gitkeep - Cli/templates/new/src/shared/.gitkeep data-dir: data/ source-repository head