diff --git a/waspc/ChangeLog.md b/waspc/ChangeLog.md index 28cceef20..c1105d83b 100644 --- a/waspc/ChangeLog.md +++ b/waspc/ChangeLog.md @@ -2,6 +2,9 @@ ## 0.11.3 +### 🐞 Bug fixes +- Fixes API types exports for TypeScript users + ### 🎉 [New Feature] Type-safe links Wasp now offers a way to link to pages in your app in a type-safe way. This means that you can't accidentally link to a page that doesn't exist, or pass the wrong arguments to a page. diff --git a/waspc/data/Generator/templates/react-app/src/auth/types.ts b/waspc/data/Generator/templates/react-app/src/auth/types.ts index 900f531e9..b9614390c 100644 --- a/waspc/data/Generator/templates/react-app/src/auth/types.ts +++ b/waspc/data/Generator/templates/react-app/src/auth/types.ts @@ -1,2 +1,2 @@ // todo(filip): turn into a proper import/path -export { type SanitizedUser as User } from '../../../server/src/_types/' +export type { SanitizedUser as User } from '../../../server/src/_types/' diff --git a/waspc/data/Generator/templates/react-app/src/test/vitest/helpers.tsx b/waspc/data/Generator/templates/react-app/src/test/vitest/helpers.tsx index 703cc6ad7..415219112 100644 --- a/waspc/data/Generator/templates/react-app/src/test/vitest/helpers.tsx +++ b/waspc/data/Generator/templates/react-app/src/test/vitest/helpers.tsx @@ -10,7 +10,7 @@ import { Query } from '../../queries' import config from '../../config' import { HttpMethod, Route } from '../../types' -export { type Route } from '../../types' +export type { Route } from '../../types' export type MockQuery = ( query: Query, diff --git a/waspc/data/Generator/templates/server/src/apis/types.ts b/waspc/data/Generator/templates/server/src/apis/types.ts index bd54b693c..ff3ac901e 100644 --- a/waspc/data/Generator/templates/server/src/apis/types.ts +++ b/waspc/data/Generator/templates/server/src/apis/types.ts @@ -2,7 +2,7 @@ import { type ParamsDictionary as ExpressParams, type Query as ExpressQuery } from 'express-serve-static-core' -export { ParamsDictionary as ExpressParams, Query as ExpressQuery } from 'express-serve-static-core' +export type { ParamsDictionary as ExpressParams, Query as ExpressQuery } from 'express-serve-static-core' import { {=# allEntities =} diff --git a/waspc/data/Generator/templates/server/src/types/index.ts b/waspc/data/Generator/templates/server/src/types/index.ts index cc80863c6..93313219e 100644 --- a/waspc/data/Generator/templates/server/src/types/index.ts +++ b/waspc/data/Generator/templates/server/src/types/index.ts @@ -11,7 +11,7 @@ export type ServerSetupFnContext = { } export type { Application } from 'express' -export { Server } from 'http' +export type { Server } from 'http' {=# isExternalAuthEnabled =} export type { GetUserFieldsFn } from '../auth/providers/oauth/types'; 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 a45f12ef2..e8548ccc3 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 @@ -242,7 +242,7 @@ "file", "server/src/types/index.ts" ], - "1fd50e251e340a5bc8c51369766e8c889cf892cdbe6593b4d58a6ee585b6d2cc" + "1958cfc3e3b5f59490168797e4b8dcdc38f32346e734f90df3fb6baa264b36b5" ], [ [ @@ -536,7 +536,7 @@ "file", "web-app/src/test/vitest/helpers.tsx" ], - "a0576215b0786c6e082b8a83f6418a3acb084bfb673a152baad8e8a7fc46fcae" + "a38e55c9999a87ab497538bcad7c880f32a4d27f2227ae326cb76eb0848b89e9" ], [ [ diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/types/index.ts b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/types/index.ts index bef664aac..9540b5ddd 100644 --- a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/types/index.ts +++ b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/types/index.ts @@ -10,6 +10,6 @@ export type ServerSetupFnContext = { } export type { Application } from 'express' -export { Server } from 'http' +export type { Server } from 'http' diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/web-app/src/test/vitest/helpers.tsx b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/web-app/src/test/vitest/helpers.tsx index 703cc6ad7..415219112 100644 --- a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/web-app/src/test/vitest/helpers.tsx +++ b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/web-app/src/test/vitest/helpers.tsx @@ -10,7 +10,7 @@ import { Query } from '../../queries' import config from '../../config' import { HttpMethod, Route } from '../../types' -export { type Route } from '../../types' +export type { Route } from '../../types' export type MockQuery = ( query: Query, 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 9749a2433..1e975b9e4 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 @@ -249,7 +249,7 @@ "file", "server/src/types/index.ts" ], - "1fd50e251e340a5bc8c51369766e8c889cf892cdbe6593b4d58a6ee585b6d2cc" + "1958cfc3e3b5f59490168797e4b8dcdc38f32346e734f90df3fb6baa264b36b5" ], [ [ @@ -550,7 +550,7 @@ "file", "web-app/src/test/vitest/helpers.tsx" ], - "a0576215b0786c6e082b8a83f6418a3acb084bfb673a152baad8e8a7fc46fcae" + "a38e55c9999a87ab497538bcad7c880f32a4d27f2227ae326cb76eb0848b89e9" ], [ [ diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/types/index.ts b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/types/index.ts index bef664aac..9540b5ddd 100644 --- a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/types/index.ts +++ b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/types/index.ts @@ -10,6 +10,6 @@ export type ServerSetupFnContext = { } export type { Application } from 'express' -export { Server } from 'http' +export type { Server } from 'http' diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/web-app/src/test/vitest/helpers.tsx b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/web-app/src/test/vitest/helpers.tsx index 703cc6ad7..415219112 100644 --- a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/web-app/src/test/vitest/helpers.tsx +++ b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/web-app/src/test/vitest/helpers.tsx @@ -10,7 +10,7 @@ import { Query } from '../../queries' import config from '../../config' import { HttpMethod, Route } from '../../types' -export { type Route } from '../../types' +export type { Route } from '../../types' export type MockQuery = ( query: Query, diff --git a/waspc/e2e-test/test-outputs/waspComplexTest-golden/waspComplexTest/.wasp/out/.waspchecksums b/waspc/e2e-test/test-outputs/waspComplexTest-golden/waspComplexTest/.wasp/out/.waspchecksums index 0d3b0c58d..b841c9a30 100644 --- a/waspc/e2e-test/test-outputs/waspComplexTest-golden/waspComplexTest/.wasp/out/.waspchecksums +++ b/waspc/e2e-test/test-outputs/waspComplexTest-golden/waspComplexTest/.wasp/out/.waspchecksums @@ -123,7 +123,7 @@ "file", "server/src/apis/types.ts" ], - "68417d37842d9186a6a9d942d65f8a18f2da8c0a9cf8a0dd5f1a4b087f6d4e20" + "858df39f218f37d2500f8ea9847e6ff7a2e1b58214bbe717fe6b48651e7fc6a6" ], [ [ @@ -501,7 +501,7 @@ "file", "server/src/types/index.ts" ], - "04e01e653bd889436903843cf1dae0a6ba0ecbc1c369beef0e90fae4d0c21127" + "0044d2263b936cbc20a278afa4aa61cd9d85821325f490b3cee8bbfb068ed836" ], [ [ @@ -753,7 +753,7 @@ "file", "web-app/src/auth/types.ts" ], - "b6572845796b4217c142b855fc72652d5dfd67fd317b0ed5487fa70ba3d92219" + "0d37136807f6d196015d07b65ab56280ae5f56cac9be84992318886550ce4ad3" ], [ [ @@ -956,7 +956,7 @@ "file", "web-app/src/test/vitest/helpers.tsx" ], - "a0576215b0786c6e082b8a83f6418a3acb084bfb673a152baad8e8a7fc46fcae" + "a38e55c9999a87ab497538bcad7c880f32a4d27f2227ae326cb76eb0848b89e9" ], [ [ diff --git a/waspc/e2e-test/test-outputs/waspComplexTest-golden/waspComplexTest/.wasp/out/server/src/apis/types.ts b/waspc/e2e-test/test-outputs/waspComplexTest-golden/waspComplexTest/.wasp/out/server/src/apis/types.ts index 8d6aa3cb0..513bbc59e 100644 --- a/waspc/e2e-test/test-outputs/waspComplexTest-golden/waspComplexTest/.wasp/out/server/src/apis/types.ts +++ b/waspc/e2e-test/test-outputs/waspComplexTest-golden/waspComplexTest/.wasp/out/server/src/apis/types.ts @@ -1,7 +1,7 @@ import { type ParamsDictionary as ExpressParams, type Query as ExpressQuery } from 'express-serve-static-core' -export { ParamsDictionary as ExpressParams, Query as ExpressQuery } from 'express-serve-static-core' +export type { ParamsDictionary as ExpressParams, Query as ExpressQuery } from 'express-serve-static-core' import { type Api, diff --git a/waspc/e2e-test/test-outputs/waspComplexTest-golden/waspComplexTest/.wasp/out/server/src/types/index.ts b/waspc/e2e-test/test-outputs/waspComplexTest-golden/waspComplexTest/.wasp/out/server/src/types/index.ts index 6ac9afb13..a7f36194f 100644 --- a/waspc/e2e-test/test-outputs/waspComplexTest-golden/waspComplexTest/.wasp/out/server/src/types/index.ts +++ b/waspc/e2e-test/test-outputs/waspComplexTest-golden/waspComplexTest/.wasp/out/server/src/types/index.ts @@ -10,7 +10,7 @@ export type ServerSetupFnContext = { } export type { Application } from 'express' -export { Server } from 'http' +export type { Server } from 'http' export type { GetUserFieldsFn } from '../auth/providers/oauth/types'; diff --git a/waspc/e2e-test/test-outputs/waspComplexTest-golden/waspComplexTest/.wasp/out/web-app/src/auth/types.ts b/waspc/e2e-test/test-outputs/waspComplexTest-golden/waspComplexTest/.wasp/out/web-app/src/auth/types.ts index 900f531e9..b9614390c 100644 --- a/waspc/e2e-test/test-outputs/waspComplexTest-golden/waspComplexTest/.wasp/out/web-app/src/auth/types.ts +++ b/waspc/e2e-test/test-outputs/waspComplexTest-golden/waspComplexTest/.wasp/out/web-app/src/auth/types.ts @@ -1,2 +1,2 @@ // todo(filip): turn into a proper import/path -export { type SanitizedUser as User } from '../../../server/src/_types/' +export type { SanitizedUser as User } from '../../../server/src/_types/' diff --git a/waspc/e2e-test/test-outputs/waspComplexTest-golden/waspComplexTest/.wasp/out/web-app/src/test/vitest/helpers.tsx b/waspc/e2e-test/test-outputs/waspComplexTest-golden/waspComplexTest/.wasp/out/web-app/src/test/vitest/helpers.tsx index 703cc6ad7..415219112 100644 --- a/waspc/e2e-test/test-outputs/waspComplexTest-golden/waspComplexTest/.wasp/out/web-app/src/test/vitest/helpers.tsx +++ b/waspc/e2e-test/test-outputs/waspComplexTest-golden/waspComplexTest/.wasp/out/web-app/src/test/vitest/helpers.tsx @@ -10,7 +10,7 @@ import { Query } from '../../queries' import config from '../../config' import { HttpMethod, Route } from '../../types' -export { type Route } from '../../types' +export type { Route } from '../../types' export type MockQuery = ( query: Query, 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 ebdc496af..32814444f 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 @@ -263,7 +263,7 @@ "file", "server/src/types/index.ts" ], - "1fd50e251e340a5bc8c51369766e8c889cf892cdbe6593b4d58a6ee585b6d2cc" + "1958cfc3e3b5f59490168797e4b8dcdc38f32346e734f90df3fb6baa264b36b5" ], [ [ @@ -564,7 +564,7 @@ "file", "web-app/src/test/vitest/helpers.tsx" ], - "a0576215b0786c6e082b8a83f6418a3acb084bfb673a152baad8e8a7fc46fcae" + "a38e55c9999a87ab497538bcad7c880f32a4d27f2227ae326cb76eb0848b89e9" ], [ [ diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/types/index.ts b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/types/index.ts index bef664aac..9540b5ddd 100644 --- a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/types/index.ts +++ b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/types/index.ts @@ -10,6 +10,6 @@ export type ServerSetupFnContext = { } export type { Application } from 'express' -export { Server } from 'http' +export type { Server } from 'http' diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/web-app/src/test/vitest/helpers.tsx b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/web-app/src/test/vitest/helpers.tsx index 703cc6ad7..415219112 100644 --- a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/web-app/src/test/vitest/helpers.tsx +++ b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/web-app/src/test/vitest/helpers.tsx @@ -10,7 +10,7 @@ import { Query } from '../../queries' import config from '../../config' import { HttpMethod, Route } from '../../types' -export { type Route } from '../../types' +export type { Route } from '../../types' export type MockQuery = ( query: Query, 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 b9fad01ca..a3298df72 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 @@ -249,7 +249,7 @@ "file", "server/src/types/index.ts" ], - "1fd50e251e340a5bc8c51369766e8c889cf892cdbe6593b4d58a6ee585b6d2cc" + "1958cfc3e3b5f59490168797e4b8dcdc38f32346e734f90df3fb6baa264b36b5" ], [ [ @@ -550,7 +550,7 @@ "file", "web-app/src/test/vitest/helpers.tsx" ], - "a0576215b0786c6e082b8a83f6418a3acb084bfb673a152baad8e8a7fc46fcae" + "a38e55c9999a87ab497538bcad7c880f32a4d27f2227ae326cb76eb0848b89e9" ], [ [ diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/types/index.ts b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/types/index.ts index bef664aac..9540b5ddd 100644 --- a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/types/index.ts +++ b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/types/index.ts @@ -10,6 +10,6 @@ export type ServerSetupFnContext = { } export type { Application } from 'express' -export { Server } from 'http' +export type { Server } from 'http' diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/web-app/src/test/vitest/helpers.tsx b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/web-app/src/test/vitest/helpers.tsx index 703cc6ad7..415219112 100644 --- a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/web-app/src/test/vitest/helpers.tsx +++ b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/web-app/src/test/vitest/helpers.tsx @@ -10,7 +10,7 @@ import { Query } from '../../queries' import config from '../../config' import { HttpMethod, Route } from '../../types' -export { type Route } from '../../types' +export type { Route } from '../../types' export type MockQuery = ( query: Query,