nitrostack 1.0.49 → 1.0.51

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/dist/cli/commands/build.d.ts.map +1 -1
  2. package/dist/cli/commands/build.js +7 -33
  3. package/dist/cli/commands/build.js.map +1 -1
  4. package/dist/core/component.d.ts +1 -7
  5. package/dist/core/component.d.ts.map +1 -1
  6. package/dist/core/component.js +4 -49
  7. package/dist/core/component.js.map +1 -1
  8. package/dist/core/server.d.ts.map +1 -1
  9. package/dist/core/server.js +3 -9
  10. package/dist/core/server.js.map +1 -1
  11. package/dist/core/tool.d.ts.map +1 -1
  12. package/dist/core/tool.js +1 -16
  13. package/dist/core/tool.js.map +1 -1
  14. package/dist/ui-next/index.d.ts +0 -1
  15. package/dist/ui-next/index.d.ts.map +1 -1
  16. package/dist/ui-next/index.js +125 -126
  17. package/dist/ui-next/index.js.map +1 -1
  18. package/package.json +2 -3
  19. package/src/studio/components/WidgetRenderer.tsx +15 -24
  20. package/src/studio/middleware.ts +1 -2
  21. package/src/studio/next.config.js +0 -2
  22. package/templates/typescript-auth/src/modules/products/products.tools.ts +29 -29
  23. package/templates/typescript-oauth/src/widgets/package-lock.json +4464 -0
  24. package/templates/typescript-auth/.env.example +0 -23
  25. package/templates/typescript-auth-api-key/.env.example +0 -4
  26. package/templates/typescript-oauth/.env.example +0 -102
  27. package/templates/typescript-oauth/src/widgets/.next/BUILD_ID +0 -1
  28. package/templates/typescript-oauth/src/widgets/.next/app-build-manifest.json +0 -32
  29. package/templates/typescript-oauth/src/widgets/.next/app-path-routes-manifest.json +0 -1
  30. package/templates/typescript-oauth/src/widgets/.next/build-manifest.json +0 -32
  31. package/templates/typescript-oauth/src/widgets/.next/cache/webpack/client-production/0.pack +0 -0
  32. package/templates/typescript-oauth/src/widgets/.next/cache/webpack/client-production/index.pack +0 -0
  33. package/templates/typescript-oauth/src/widgets/.next/cache/webpack/edge-server-production/0.pack +0 -0
  34. package/templates/typescript-oauth/src/widgets/.next/cache/webpack/edge-server-production/index.pack +0 -0
  35. package/templates/typescript-oauth/src/widgets/.next/cache/webpack/server-production/0.pack +0 -0
  36. package/templates/typescript-oauth/src/widgets/.next/cache/webpack/server-production/index.pack +0 -0
  37. package/templates/typescript-oauth/src/widgets/.next/export-detail.json +0 -1
  38. package/templates/typescript-oauth/src/widgets/.next/export-marker.json +0 -1
  39. package/templates/typescript-oauth/src/widgets/.next/images-manifest.json +0 -1
  40. package/templates/typescript-oauth/src/widgets/.next/next-minimal-server.js.nft.json +0 -1
  41. package/templates/typescript-oauth/src/widgets/.next/next-server.js.nft.json +0 -1
  42. package/templates/typescript-oauth/src/widgets/.next/package.json +0 -1
  43. package/templates/typescript-oauth/src/widgets/.next/prerender-manifest.json +0 -1
  44. package/templates/typescript-oauth/src/widgets/.next/react-loadable-manifest.json +0 -1
  45. package/templates/typescript-oauth/src/widgets/.next/required-server-files.json +0 -1
  46. package/templates/typescript-oauth/src/widgets/.next/routes-manifest.json +0 -1
  47. package/templates/typescript-oauth/src/widgets/.next/server/app/_not-found/page.js +0 -1
  48. package/templates/typescript-oauth/src/widgets/.next/server/app/_not-found/page.js.nft.json +0 -1
  49. package/templates/typescript-oauth/src/widgets/.next/server/app/_not-found/page_client-reference-manifest.js +0 -1
  50. package/templates/typescript-oauth/src/widgets/.next/server/app/_not-found.html +0 -1
  51. package/templates/typescript-oauth/src/widgets/.next/server/app/_not-found.meta +0 -6
  52. package/templates/typescript-oauth/src/widgets/.next/server/app/_not-found.rsc +0 -9
  53. package/templates/typescript-oauth/src/widgets/.next/server/app/calculator-operations/page.js +0 -6
  54. package/templates/typescript-oauth/src/widgets/.next/server/app/calculator-operations/page.js.nft.json +0 -1
  55. package/templates/typescript-oauth/src/widgets/.next/server/app/calculator-operations/page_client-reference-manifest.js +0 -1
  56. package/templates/typescript-oauth/src/widgets/.next/server/app/calculator-operations.html +0 -1
  57. package/templates/typescript-oauth/src/widgets/.next/server/app/calculator-operations.meta +0 -5
  58. package/templates/typescript-oauth/src/widgets/.next/server/app/calculator-operations.rsc +0 -7
  59. package/templates/typescript-oauth/src/widgets/.next/server/app/calculator-result/page.js +0 -6
  60. package/templates/typescript-oauth/src/widgets/.next/server/app/calculator-result/page.js.nft.json +0 -1
  61. package/templates/typescript-oauth/src/widgets/.next/server/app/calculator-result/page_client-reference-manifest.js +0 -1
  62. package/templates/typescript-oauth/src/widgets/.next/server/app/calculator-result.html +0 -1
  63. package/templates/typescript-oauth/src/widgets/.next/server/app/calculator-result.meta +0 -5
  64. package/templates/typescript-oauth/src/widgets/.next/server/app/calculator-result.rsc +0 -7
  65. package/templates/typescript-oauth/src/widgets/.next/server/app-paths-manifest.json +0 -5
  66. package/templates/typescript-oauth/src/widgets/.next/server/chunks/682.js +0 -6
  67. package/templates/typescript-oauth/src/widgets/.next/server/chunks/819.js +0 -3
  68. package/templates/typescript-oauth/src/widgets/.next/server/chunks/font-manifest.json +0 -1
  69. package/templates/typescript-oauth/src/widgets/.next/server/font-manifest.json +0 -1
  70. package/templates/typescript-oauth/src/widgets/.next/server/functions-config-manifest.json +0 -1
  71. package/templates/typescript-oauth/src/widgets/.next/server/interception-route-rewrite-manifest.js +0 -1
  72. package/templates/typescript-oauth/src/widgets/.next/server/middleware-build-manifest.js +0 -1
  73. package/templates/typescript-oauth/src/widgets/.next/server/middleware-manifest.json +0 -6
  74. package/templates/typescript-oauth/src/widgets/.next/server/middleware-react-loadable-manifest.js +0 -1
  75. package/templates/typescript-oauth/src/widgets/.next/server/next-font-manifest.js +0 -1
  76. package/templates/typescript-oauth/src/widgets/.next/server/next-font-manifest.json +0 -1
  77. package/templates/typescript-oauth/src/widgets/.next/server/pages/404.html +0 -1
  78. package/templates/typescript-oauth/src/widgets/.next/server/pages/500.html +0 -1
  79. package/templates/typescript-oauth/src/widgets/.next/server/pages/_app.js +0 -1
  80. package/templates/typescript-oauth/src/widgets/.next/server/pages/_app.js.nft.json +0 -1
  81. package/templates/typescript-oauth/src/widgets/.next/server/pages/_document.js +0 -1
  82. package/templates/typescript-oauth/src/widgets/.next/server/pages/_document.js.nft.json +0 -1
  83. package/templates/typescript-oauth/src/widgets/.next/server/pages/_error.js +0 -1
  84. package/templates/typescript-oauth/src/widgets/.next/server/pages/_error.js.nft.json +0 -1
  85. package/templates/typescript-oauth/src/widgets/.next/server/pages-manifest.json +0 -1
  86. package/templates/typescript-oauth/src/widgets/.next/server/server-reference-manifest.js +0 -1
  87. package/templates/typescript-oauth/src/widgets/.next/server/server-reference-manifest.json +0 -1
  88. package/templates/typescript-oauth/src/widgets/.next/server/webpack-runtime.js +0 -1
  89. package/templates/typescript-oauth/src/widgets/.next/static/WU9THacVqL52RZbrZOLS1/_buildManifest.js +0 -1
  90. package/templates/typescript-oauth/src/widgets/.next/static/WU9THacVqL52RZbrZOLS1/_ssgManifest.js +0 -1
  91. package/templates/typescript-oauth/src/widgets/.next/static/chunks/117-eb57c7ef86f964a4.js +0 -2
  92. package/templates/typescript-oauth/src/widgets/.next/static/chunks/app/_not-found/page-dcb83ba3e4d0aafd.js +0 -1
  93. package/templates/typescript-oauth/src/widgets/.next/static/chunks/app/calculator-operations/page-b8913a740073ea8a.js +0 -1
  94. package/templates/typescript-oauth/src/widgets/.next/static/chunks/app/calculator-result/page-ddaaab2fce95dea2.js +0 -1
  95. package/templates/typescript-oauth/src/widgets/.next/static/chunks/app/layout-cbd3ebdc4ecc5247.js +0 -1
  96. package/templates/typescript-oauth/src/widgets/.next/static/chunks/fd9d1056-749e5812300142af.js +0 -1
  97. package/templates/typescript-oauth/src/widgets/.next/static/chunks/framework-f66176bb897dc684.js +0 -1
  98. package/templates/typescript-oauth/src/widgets/.next/static/chunks/main-76df43fcef3db344.js +0 -1
  99. package/templates/typescript-oauth/src/widgets/.next/static/chunks/main-app-f9c40224d04023c5.js +0 -1
  100. package/templates/typescript-oauth/src/widgets/.next/static/chunks/pages/_app-72b849fbd24ac258.js +0 -1
  101. package/templates/typescript-oauth/src/widgets/.next/static/chunks/pages/_error-7ba65e1336b92748.js +0 -1
  102. package/templates/typescript-oauth/src/widgets/.next/static/chunks/polyfills-42372ed130431b0a.js +0 -1
  103. package/templates/typescript-oauth/src/widgets/.next/static/chunks/webpack-100b9e646d9c912e.js +0 -1
  104. package/templates/typescript-oauth/src/widgets/.next/trace +0 -14
  105. package/templates/typescript-oauth/src/widgets/.next/types/app/calculator-operations/page.ts +0 -79
  106. package/templates/typescript-oauth/src/widgets/.next/types/app/calculator-result/page.ts +0 -79
  107. package/templates/typescript-oauth/src/widgets/.next/types/app/layout.ts +0 -79
  108. package/templates/typescript-oauth/src/widgets/.next/types/package.json +0 -1
  109. package/templates/typescript-oauth/src/widgets/next-env.d.ts +0 -5
  110. package/templates/typescript-starter/.env.example +0 -4
@@ -1,79 +0,0 @@
1
- // File: /Users/abhishekpandit/projects/nitro/nitrostack/typescript/templates/typescript-oauth/src/widgets/app/calculator-operations/page.tsx
2
- import * as entry from '../../../../app/calculator-operations/page.js'
3
- import type { ResolvingMetadata, ResolvingViewport } from 'next/dist/lib/metadata/types/metadata-interface.js'
4
-
5
- type TEntry = typeof import('../../../../app/calculator-operations/page.js')
6
-
7
- // Check that the entry is a valid entry
8
- checkFields<Diff<{
9
- default: Function
10
- config?: {}
11
- generateStaticParams?: Function
12
- revalidate?: RevalidateRange<TEntry> | false
13
- dynamic?: 'auto' | 'force-dynamic' | 'error' | 'force-static'
14
- dynamicParams?: boolean
15
- fetchCache?: 'auto' | 'force-no-store' | 'only-no-store' | 'default-no-store' | 'default-cache' | 'only-cache' | 'force-cache'
16
- preferredRegion?: 'auto' | 'global' | 'home' | string | string[]
17
- runtime?: 'nodejs' | 'experimental-edge' | 'edge'
18
- maxDuration?: number
19
-
20
- metadata?: any
21
- generateMetadata?: Function
22
- viewport?: any
23
- generateViewport?: Function
24
-
25
- }, TEntry, ''>>()
26
-
27
- // Check the prop type of the entry function
28
- checkFields<Diff<PageProps, FirstArg<TEntry['default']>, 'default'>>()
29
-
30
- // Check the arguments and return type of the generateMetadata function
31
- if ('generateMetadata' in entry) {
32
- checkFields<Diff<PageProps, FirstArg<MaybeField<TEntry, 'generateMetadata'>>, 'generateMetadata'>>()
33
- checkFields<Diff<ResolvingMetadata, SecondArg<MaybeField<TEntry, 'generateMetadata'>>, 'generateMetadata'>>()
34
- }
35
-
36
- // Check the arguments and return type of the generateViewport function
37
- if ('generateViewport' in entry) {
38
- checkFields<Diff<PageProps, FirstArg<MaybeField<TEntry, 'generateViewport'>>, 'generateViewport'>>()
39
- checkFields<Diff<ResolvingViewport, SecondArg<MaybeField<TEntry, 'generateViewport'>>, 'generateViewport'>>()
40
- }
41
-
42
- // Check the arguments and return type of the generateStaticParams function
43
- if ('generateStaticParams' in entry) {
44
- checkFields<Diff<{ params: PageParams }, FirstArg<MaybeField<TEntry, 'generateStaticParams'>>, 'generateStaticParams'>>()
45
- checkFields<Diff<{ __tag__: 'generateStaticParams', __return_type__: any[] | Promise<any[]> }, { __tag__: 'generateStaticParams', __return_type__: ReturnType<MaybeField<TEntry, 'generateStaticParams'>> }>>()
46
- }
47
-
48
- type PageParams = any
49
- export interface PageProps {
50
- params?: any
51
- searchParams?: any
52
- }
53
- export interface LayoutProps {
54
- children?: React.ReactNode
55
-
56
- params?: any
57
- }
58
-
59
- // =============
60
- // Utility types
61
- type RevalidateRange<T> = T extends { revalidate: any } ? NonNegative<T['revalidate']> : never
62
-
63
- // If T is unknown or any, it will be an empty {} type. Otherwise, it will be the same as Omit<T, keyof Base>.
64
- type OmitWithTag<T, K extends keyof any, _M> = Omit<T, K>
65
- type Diff<Base, T extends Base, Message extends string = ''> = 0 extends (1 & T) ? {} : OmitWithTag<T, keyof Base, Message>
66
-
67
- type FirstArg<T extends Function> = T extends (...args: [infer T, any]) => any ? unknown extends T ? any : T : never
68
- type SecondArg<T extends Function> = T extends (...args: [any, infer T]) => any ? unknown extends T ? any : T : never
69
- type MaybeField<T, K extends string> = T extends { [k in K]: infer G } ? G extends Function ? G : never : never
70
-
71
-
72
-
73
- function checkFields<_ extends { [k in keyof any]: never }>() {}
74
-
75
- // https://github.com/sindresorhus/type-fest
76
- type Numeric = number | bigint
77
- type Zero = 0 | 0n
78
- type Negative<T extends Numeric> = T extends Zero ? never : `${T}` extends `-${string}` ? T : never
79
- type NonNegative<T extends Numeric> = T extends Zero ? T : Negative<T> extends never ? T : '__invalid_negative_number__'
@@ -1,79 +0,0 @@
1
- // File: /Users/abhishekpandit/projects/nitro/nitrostack/typescript/templates/typescript-oauth/src/widgets/app/calculator-result/page.tsx
2
- import * as entry from '../../../../app/calculator-result/page.js'
3
- import type { ResolvingMetadata, ResolvingViewport } from 'next/dist/lib/metadata/types/metadata-interface.js'
4
-
5
- type TEntry = typeof import('../../../../app/calculator-result/page.js')
6
-
7
- // Check that the entry is a valid entry
8
- checkFields<Diff<{
9
- default: Function
10
- config?: {}
11
- generateStaticParams?: Function
12
- revalidate?: RevalidateRange<TEntry> | false
13
- dynamic?: 'auto' | 'force-dynamic' | 'error' | 'force-static'
14
- dynamicParams?: boolean
15
- fetchCache?: 'auto' | 'force-no-store' | 'only-no-store' | 'default-no-store' | 'default-cache' | 'only-cache' | 'force-cache'
16
- preferredRegion?: 'auto' | 'global' | 'home' | string | string[]
17
- runtime?: 'nodejs' | 'experimental-edge' | 'edge'
18
- maxDuration?: number
19
-
20
- metadata?: any
21
- generateMetadata?: Function
22
- viewport?: any
23
- generateViewport?: Function
24
-
25
- }, TEntry, ''>>()
26
-
27
- // Check the prop type of the entry function
28
- checkFields<Diff<PageProps, FirstArg<TEntry['default']>, 'default'>>()
29
-
30
- // Check the arguments and return type of the generateMetadata function
31
- if ('generateMetadata' in entry) {
32
- checkFields<Diff<PageProps, FirstArg<MaybeField<TEntry, 'generateMetadata'>>, 'generateMetadata'>>()
33
- checkFields<Diff<ResolvingMetadata, SecondArg<MaybeField<TEntry, 'generateMetadata'>>, 'generateMetadata'>>()
34
- }
35
-
36
- // Check the arguments and return type of the generateViewport function
37
- if ('generateViewport' in entry) {
38
- checkFields<Diff<PageProps, FirstArg<MaybeField<TEntry, 'generateViewport'>>, 'generateViewport'>>()
39
- checkFields<Diff<ResolvingViewport, SecondArg<MaybeField<TEntry, 'generateViewport'>>, 'generateViewport'>>()
40
- }
41
-
42
- // Check the arguments and return type of the generateStaticParams function
43
- if ('generateStaticParams' in entry) {
44
- checkFields<Diff<{ params: PageParams }, FirstArg<MaybeField<TEntry, 'generateStaticParams'>>, 'generateStaticParams'>>()
45
- checkFields<Diff<{ __tag__: 'generateStaticParams', __return_type__: any[] | Promise<any[]> }, { __tag__: 'generateStaticParams', __return_type__: ReturnType<MaybeField<TEntry, 'generateStaticParams'>> }>>()
46
- }
47
-
48
- type PageParams = any
49
- export interface PageProps {
50
- params?: any
51
- searchParams?: any
52
- }
53
- export interface LayoutProps {
54
- children?: React.ReactNode
55
-
56
- params?: any
57
- }
58
-
59
- // =============
60
- // Utility types
61
- type RevalidateRange<T> = T extends { revalidate: any } ? NonNegative<T['revalidate']> : never
62
-
63
- // If T is unknown or any, it will be an empty {} type. Otherwise, it will be the same as Omit<T, keyof Base>.
64
- type OmitWithTag<T, K extends keyof any, _M> = Omit<T, K>
65
- type Diff<Base, T extends Base, Message extends string = ''> = 0 extends (1 & T) ? {} : OmitWithTag<T, keyof Base, Message>
66
-
67
- type FirstArg<T extends Function> = T extends (...args: [infer T, any]) => any ? unknown extends T ? any : T : never
68
- type SecondArg<T extends Function> = T extends (...args: [any, infer T]) => any ? unknown extends T ? any : T : never
69
- type MaybeField<T, K extends string> = T extends { [k in K]: infer G } ? G extends Function ? G : never : never
70
-
71
-
72
-
73
- function checkFields<_ extends { [k in keyof any]: never }>() {}
74
-
75
- // https://github.com/sindresorhus/type-fest
76
- type Numeric = number | bigint
77
- type Zero = 0 | 0n
78
- type Negative<T extends Numeric> = T extends Zero ? never : `${T}` extends `-${string}` ? T : never
79
- type NonNegative<T extends Numeric> = T extends Zero ? T : Negative<T> extends never ? T : '__invalid_negative_number__'
@@ -1,79 +0,0 @@
1
- // File: /Users/abhishekpandit/projects/nitro/nitrostack/typescript/templates/typescript-oauth/src/widgets/app/layout.tsx
2
- import * as entry from '../../../app/layout.js'
3
- import type { ResolvingMetadata, ResolvingViewport } from 'next/dist/lib/metadata/types/metadata-interface.js'
4
-
5
- type TEntry = typeof import('../../../app/layout.js')
6
-
7
- // Check that the entry is a valid entry
8
- checkFields<Diff<{
9
- default: Function
10
- config?: {}
11
- generateStaticParams?: Function
12
- revalidate?: RevalidateRange<TEntry> | false
13
- dynamic?: 'auto' | 'force-dynamic' | 'error' | 'force-static'
14
- dynamicParams?: boolean
15
- fetchCache?: 'auto' | 'force-no-store' | 'only-no-store' | 'default-no-store' | 'default-cache' | 'only-cache' | 'force-cache'
16
- preferredRegion?: 'auto' | 'global' | 'home' | string | string[]
17
- runtime?: 'nodejs' | 'experimental-edge' | 'edge'
18
- maxDuration?: number
19
-
20
- metadata?: any
21
- generateMetadata?: Function
22
- viewport?: any
23
- generateViewport?: Function
24
-
25
- }, TEntry, ''>>()
26
-
27
- // Check the prop type of the entry function
28
- checkFields<Diff<LayoutProps, FirstArg<TEntry['default']>, 'default'>>()
29
-
30
- // Check the arguments and return type of the generateMetadata function
31
- if ('generateMetadata' in entry) {
32
- checkFields<Diff<LayoutProps, FirstArg<MaybeField<TEntry, 'generateMetadata'>>, 'generateMetadata'>>()
33
- checkFields<Diff<ResolvingMetadata, SecondArg<MaybeField<TEntry, 'generateMetadata'>>, 'generateMetadata'>>()
34
- }
35
-
36
- // Check the arguments and return type of the generateViewport function
37
- if ('generateViewport' in entry) {
38
- checkFields<Diff<LayoutProps, FirstArg<MaybeField<TEntry, 'generateViewport'>>, 'generateViewport'>>()
39
- checkFields<Diff<ResolvingViewport, SecondArg<MaybeField<TEntry, 'generateViewport'>>, 'generateViewport'>>()
40
- }
41
-
42
- // Check the arguments and return type of the generateStaticParams function
43
- if ('generateStaticParams' in entry) {
44
- checkFields<Diff<{ params: PageParams }, FirstArg<MaybeField<TEntry, 'generateStaticParams'>>, 'generateStaticParams'>>()
45
- checkFields<Diff<{ __tag__: 'generateStaticParams', __return_type__: any[] | Promise<any[]> }, { __tag__: 'generateStaticParams', __return_type__: ReturnType<MaybeField<TEntry, 'generateStaticParams'>> }>>()
46
- }
47
-
48
- type PageParams = any
49
- export interface PageProps {
50
- params?: any
51
- searchParams?: any
52
- }
53
- export interface LayoutProps {
54
- children?: React.ReactNode
55
-
56
- params?: any
57
- }
58
-
59
- // =============
60
- // Utility types
61
- type RevalidateRange<T> = T extends { revalidate: any } ? NonNegative<T['revalidate']> : never
62
-
63
- // If T is unknown or any, it will be an empty {} type. Otherwise, it will be the same as Omit<T, keyof Base>.
64
- type OmitWithTag<T, K extends keyof any, _M> = Omit<T, K>
65
- type Diff<Base, T extends Base, Message extends string = ''> = 0 extends (1 & T) ? {} : OmitWithTag<T, keyof Base, Message>
66
-
67
- type FirstArg<T extends Function> = T extends (...args: [infer T, any]) => any ? unknown extends T ? any : T : never
68
- type SecondArg<T extends Function> = T extends (...args: [any, infer T]) => any ? unknown extends T ? any : T : never
69
- type MaybeField<T, K extends string> = T extends { [k in K]: infer G } ? G extends Function ? G : never : never
70
-
71
-
72
-
73
- function checkFields<_ extends { [k in keyof any]: never }>() {}
74
-
75
- // https://github.com/sindresorhus/type-fest
76
- type Numeric = number | bigint
77
- type Zero = 0 | 0n
78
- type Negative<T extends Numeric> = T extends Zero ? never : `${T}` extends `-${string}` ? T : never
79
- type NonNegative<T extends Numeric> = T extends Zero ? T : Negative<T> extends never ? T : '__invalid_negative_number__'
@@ -1 +0,0 @@
1
- {"type": "module"}
@@ -1,5 +0,0 @@
1
- /// <reference types="next" />
2
- /// <reference types="next/image-types/global" />
3
-
4
- // NOTE: This file should not be edited
5
- // see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
@@ -1,4 +0,0 @@
1
- # Server Configuration
2
- NODE_ENV=development
3
- PORT=3000
4
-