@bleedingdev/modern-js-types 3.9.0-ultramodern.9 → 3.9.3-ultramodern.1
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.
- package/cli/base.d.ts +151 -0
- package/cli/index.d.ts +30 -140
- package/common/index.d.ts +2 -0
- package/package.json +34 -9
package/cli/base.d.ts
ADDED
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import type { Config as JestConfigTypes } from '@jest/types';
|
|
2
|
+
|
|
3
|
+
export type JestConfig = JestConfigTypes.InitialOptions;
|
|
4
|
+
|
|
5
|
+
export interface TestConfig {
|
|
6
|
+
/**
|
|
7
|
+
* Decide which transformer will be used to compile file
|
|
8
|
+
* @default 'babel-jest'
|
|
9
|
+
*/
|
|
10
|
+
transformer?: 'babel-jest' | 'ts-jest';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Original jest config
|
|
14
|
+
* Doc: https://jestjs.io/docs/configuration
|
|
15
|
+
*/
|
|
16
|
+
jest?: JestConfig | ((jestConfig: JestConfig) => JestConfig);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Bundle entrypoint
|
|
21
|
+
*/
|
|
22
|
+
export interface Entrypoint {
|
|
23
|
+
entryName: string;
|
|
24
|
+
isMainEntry: boolean;
|
|
25
|
+
entry: string;
|
|
26
|
+
internalEntry?: string;
|
|
27
|
+
nestedRoutesEntry?: string;
|
|
28
|
+
pageRoutesEntry?: string;
|
|
29
|
+
isAutoMount?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* use src/{entryName}/entry.tsx to custom entry
|
|
32
|
+
*/
|
|
33
|
+
customEntry?: boolean;
|
|
34
|
+
|
|
35
|
+
customServerEntry?: string | false;
|
|
36
|
+
|
|
37
|
+
fileSystemRoutes?: {
|
|
38
|
+
globalApp?: string | false;
|
|
39
|
+
routes?: any[];
|
|
40
|
+
};
|
|
41
|
+
absoluteEntryDir?: string;
|
|
42
|
+
/**
|
|
43
|
+
* use source.entries to custom entry
|
|
44
|
+
*/
|
|
45
|
+
isCustomSourceEntry?: boolean;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* file system routes.
|
|
50
|
+
*/
|
|
51
|
+
export type RouteLegacy = {
|
|
52
|
+
path: string;
|
|
53
|
+
exact: boolean;
|
|
54
|
+
component: string;
|
|
55
|
+
_component: string;
|
|
56
|
+
routes?: RouteLegacy[];
|
|
57
|
+
parent?: RouteLegacy;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export interface Route<Element> {
|
|
61
|
+
caseSensitive?: boolean;
|
|
62
|
+
path?: string;
|
|
63
|
+
id?: string;
|
|
64
|
+
loader?: any;
|
|
65
|
+
loaderDeps?: any;
|
|
66
|
+
action?: any;
|
|
67
|
+
hasErrorBoundary?: boolean;
|
|
68
|
+
shouldRevalidate?: any;
|
|
69
|
+
validateSearch?: any;
|
|
70
|
+
handle?: any;
|
|
71
|
+
index?: boolean;
|
|
72
|
+
children?: Route<Element>[] | undefined;
|
|
73
|
+
element?: Element | null;
|
|
74
|
+
errorElement?: Element | null;
|
|
75
|
+
type: string;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export interface NestedRoute<Component, Element> extends Route<Element> {
|
|
79
|
+
type: 'nested';
|
|
80
|
+
origin: 'file-system' | 'config';
|
|
81
|
+
// Route type to distinguish between page and layout routes
|
|
82
|
+
routeType?: 'page' | 'layout';
|
|
83
|
+
parentId?: string;
|
|
84
|
+
data?: string;
|
|
85
|
+
clientData?: string;
|
|
86
|
+
children?: NestedRoute<Component, Element>[];
|
|
87
|
+
filename?: string;
|
|
88
|
+
_component?: string;
|
|
89
|
+
component?: Component;
|
|
90
|
+
lazyImport?: () => Promise<any>;
|
|
91
|
+
loading?: Component;
|
|
92
|
+
error?: Component;
|
|
93
|
+
isRoot?: boolean;
|
|
94
|
+
config?: string | Record<string, any>;
|
|
95
|
+
inValidSSRRoute?: boolean;
|
|
96
|
+
isClientComponent?: boolean;
|
|
97
|
+
params?: string[];
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export interface PageRoute<Element> extends Route<Element> {
|
|
101
|
+
type: 'page';
|
|
102
|
+
parent?: PageRoute<Element>;
|
|
103
|
+
_component: string;
|
|
104
|
+
component: string;
|
|
105
|
+
children?: PageRoute<Element>[];
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* custom html partials.
|
|
110
|
+
*/
|
|
111
|
+
export interface HtmlPartials {
|
|
112
|
+
top: string[];
|
|
113
|
+
head: string[];
|
|
114
|
+
body: string[];
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export interface HtmlTemplates {
|
|
118
|
+
[name: string]: string;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export type SSGRouteOptions =
|
|
122
|
+
| string
|
|
123
|
+
| {
|
|
124
|
+
url: string;
|
|
125
|
+
output?: string;
|
|
126
|
+
headers?: Record<string, any>;
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
export type SSGSingleEntryOptions =
|
|
130
|
+
| boolean
|
|
131
|
+
| {
|
|
132
|
+
headers?: Record<string, any>;
|
|
133
|
+
routes?: SSGRouteOptions[];
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
export type SSGSingleEntryOptionsFactory = (
|
|
137
|
+
entryName: string,
|
|
138
|
+
ctx: { baseUrl?: string | string[] },
|
|
139
|
+
) => SSGSingleEntryOptions;
|
|
140
|
+
|
|
141
|
+
export type SSGMultiEntryOptions = Record<
|
|
142
|
+
string,
|
|
143
|
+
SSGSingleEntryOptions | SSGSingleEntryOptionsFactory
|
|
144
|
+
>;
|
|
145
|
+
|
|
146
|
+
export type SSGConfig =
|
|
147
|
+
| boolean
|
|
148
|
+
| SSGSingleEntryOptions
|
|
149
|
+
| SSGSingleEntryOptionsFactory;
|
|
150
|
+
|
|
151
|
+
export type { Merge } from 'type-fest';
|
package/cli/index.d.ts
CHANGED
|
@@ -1,155 +1,45 @@
|
|
|
1
|
-
import type { Config as JestConfigTypes } from '@jest/types';
|
|
2
1
|
import type * as React from 'react';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
isMainEntry: boolean;
|
|
26
|
-
entry: string;
|
|
27
|
-
internalEntry?: string;
|
|
28
|
-
nestedRoutesEntry?: string;
|
|
29
|
-
pageRoutesEntry?: string;
|
|
30
|
-
isAutoMount?: boolean;
|
|
31
|
-
/**
|
|
32
|
-
* use src/{entryName}/entry.tsx to custom entry
|
|
33
|
-
*/
|
|
34
|
-
customEntry?: boolean;
|
|
35
|
-
|
|
36
|
-
customServerEntry?: string | false;
|
|
37
|
-
|
|
38
|
-
fileSystemRoutes?: {
|
|
39
|
-
globalApp?: string | false;
|
|
40
|
-
routes?: any[];
|
|
41
|
-
};
|
|
42
|
-
absoluteEntryDir?: string;
|
|
43
|
-
/**
|
|
44
|
-
* use source.entries to custom entry
|
|
45
|
-
*/
|
|
46
|
-
isCustomSourceEntry?: boolean;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* file system routes.
|
|
51
|
-
*/
|
|
52
|
-
export type RouteLegacy = {
|
|
53
|
-
path: string;
|
|
54
|
-
exact: boolean;
|
|
55
|
-
component: string;
|
|
56
|
-
_component: string;
|
|
57
|
-
routes?: RouteLegacy[];
|
|
58
|
-
parent?: RouteLegacy;
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
export interface Route {
|
|
62
|
-
caseSensitive?: boolean;
|
|
63
|
-
path?: string;
|
|
64
|
-
id?: string;
|
|
65
|
-
loader?: any;
|
|
66
|
-
loaderDeps?: any;
|
|
67
|
-
action?: any;
|
|
68
|
-
hasErrorBoundary?: boolean;
|
|
69
|
-
shouldRevalidate?: any;
|
|
70
|
-
validateSearch?: any;
|
|
71
|
-
handle?: any;
|
|
72
|
-
index?: boolean;
|
|
2
|
+
import type {
|
|
3
|
+
NestedRoute as BaseNestedRoute,
|
|
4
|
+
PageRoute as BasePageRoute,
|
|
5
|
+
Route as BaseRoute,
|
|
6
|
+
} from './base';
|
|
7
|
+
|
|
8
|
+
export type {
|
|
9
|
+
Entrypoint,
|
|
10
|
+
HtmlPartials,
|
|
11
|
+
HtmlTemplates,
|
|
12
|
+
JestConfig,
|
|
13
|
+
Merge,
|
|
14
|
+
RouteLegacy,
|
|
15
|
+
SSGConfig,
|
|
16
|
+
SSGMultiEntryOptions,
|
|
17
|
+
SSGRouteOptions,
|
|
18
|
+
SSGSingleEntryOptions,
|
|
19
|
+
SSGSingleEntryOptionsFactory,
|
|
20
|
+
TestConfig,
|
|
21
|
+
} from './base';
|
|
22
|
+
|
|
23
|
+
export interface Route extends BaseRoute<React.ReactNode> {
|
|
73
24
|
children?: Route[] | undefined;
|
|
74
|
-
element?: React.ReactNode | null;
|
|
75
|
-
errorElement?: React.ReactNode | null;
|
|
76
|
-
type: string;
|
|
77
25
|
}
|
|
78
26
|
|
|
79
27
|
export type NestedRouteForCli = NestedRoute<string>;
|
|
80
28
|
|
|
81
29
|
export interface NestedRoute<T = string | (() => React.ReactElement)>
|
|
82
|
-
extends Route
|
|
30
|
+
extends Route,
|
|
31
|
+
Omit<
|
|
32
|
+
BaseNestedRoute<T, React.ReactNode>,
|
|
33
|
+
keyof BaseRoute<React.ReactNode>
|
|
34
|
+
> {
|
|
83
35
|
type: 'nested';
|
|
84
|
-
origin: 'file-system' | 'config';
|
|
85
|
-
// Route type to distinguish between page and layout routes
|
|
86
|
-
routeType?: 'page' | 'layout';
|
|
87
|
-
parentId?: string;
|
|
88
|
-
data?: string;
|
|
89
|
-
clientData?: string;
|
|
90
36
|
children?: NestedRoute<T>[];
|
|
91
|
-
filename?: string;
|
|
92
|
-
_component?: string;
|
|
93
|
-
component?: T;
|
|
94
|
-
lazyImport?: () => Promise<any>;
|
|
95
|
-
loading?: T;
|
|
96
|
-
error?: T;
|
|
97
|
-
isRoot?: boolean;
|
|
98
|
-
config?: string | Record<string, any>;
|
|
99
|
-
inValidSSRRoute?: boolean;
|
|
100
|
-
isClientComponent?: boolean;
|
|
101
|
-
params?: string[];
|
|
102
37
|
}
|
|
103
38
|
|
|
104
|
-
export interface PageRoute
|
|
39
|
+
export interface PageRoute
|
|
40
|
+
extends Route,
|
|
41
|
+
Omit<BasePageRoute<React.ReactNode>, keyof BaseRoute<React.ReactNode>> {
|
|
105
42
|
type: 'page';
|
|
106
43
|
parent?: PageRoute;
|
|
107
|
-
_component: string;
|
|
108
|
-
component: string;
|
|
109
44
|
children?: PageRoute[];
|
|
110
45
|
}
|
|
111
|
-
|
|
112
|
-
/**
|
|
113
|
-
* custom html partials.
|
|
114
|
-
*/
|
|
115
|
-
export interface HtmlPartials {
|
|
116
|
-
top: string[];
|
|
117
|
-
head: string[];
|
|
118
|
-
body: string[];
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
export interface HtmlTemplates {
|
|
122
|
-
[name: string]: string;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
export type SSGRouteOptions =
|
|
126
|
-
| string
|
|
127
|
-
| {
|
|
128
|
-
url: string;
|
|
129
|
-
output?: string;
|
|
130
|
-
headers?: Record<string, any>;
|
|
131
|
-
};
|
|
132
|
-
|
|
133
|
-
export type SSGSingleEntryOptions =
|
|
134
|
-
| boolean
|
|
135
|
-
| {
|
|
136
|
-
headers?: Record<string, any>;
|
|
137
|
-
routes?: SSGRouteOptions[];
|
|
138
|
-
};
|
|
139
|
-
|
|
140
|
-
export type SSGSingleEntryOptionsFactory = (
|
|
141
|
-
entryName: string,
|
|
142
|
-
ctx: { baseUrl?: string | string[] },
|
|
143
|
-
) => SSGSingleEntryOptions;
|
|
144
|
-
|
|
145
|
-
export type SSGMultiEntryOptions = Record<
|
|
146
|
-
string,
|
|
147
|
-
SSGSingleEntryOptions | SSGSingleEntryOptionsFactory
|
|
148
|
-
>;
|
|
149
|
-
|
|
150
|
-
export type SSGConfig =
|
|
151
|
-
| boolean
|
|
152
|
-
| SSGSingleEntryOptions
|
|
153
|
-
| SSGSingleEntryOptionsFactory;
|
|
154
|
-
|
|
155
|
-
export type { Merge } from 'type-fest';
|
package/common/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bleedingdev/modern-js-types",
|
|
3
3
|
"description": "A Progressive React Framework for modern web development.",
|
|
4
|
-
"homepage": "https://github.com/
|
|
4
|
+
"homepage": "https://github.com/ultramodernjs/ultramodern.js#readme",
|
|
5
5
|
"bugs": {
|
|
6
|
-
"url": "https://github.com/
|
|
6
|
+
"url": "https://github.com/ultramodernjs/ultramodern.js/issues"
|
|
7
7
|
},
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
10
|
-
"url": "git+https://github.com/
|
|
10
|
+
"url": "git+https://github.com/ultramodernjs/ultramodern.js.git",
|
|
11
11
|
"directory": "packages/toolkit/types"
|
|
12
12
|
},
|
|
13
13
|
"license": "MIT",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"modern",
|
|
18
18
|
"modern.js"
|
|
19
19
|
],
|
|
20
|
-
"version": "3.9.
|
|
20
|
+
"version": "3.9.3-ultramodern.1",
|
|
21
21
|
"types": "./index.d.ts",
|
|
22
22
|
"exports": {
|
|
23
23
|
".": {
|
|
@@ -31,6 +31,14 @@
|
|
|
31
31
|
"./cli": {
|
|
32
32
|
"types": "./cli/index.d.ts",
|
|
33
33
|
"default": "./cli/index.d.ts"
|
|
34
|
+
},
|
|
35
|
+
"./cli/base": {
|
|
36
|
+
"types": "./cli/base.d.ts",
|
|
37
|
+
"default": "./cli/base.d.ts"
|
|
38
|
+
},
|
|
39
|
+
"./common": {
|
|
40
|
+
"types": "./common/index.d.ts",
|
|
41
|
+
"default": "./common/index.d.ts"
|
|
34
42
|
}
|
|
35
43
|
},
|
|
36
44
|
"typesVersions": {
|
|
@@ -43,25 +51,42 @@
|
|
|
43
51
|
],
|
|
44
52
|
"cli": [
|
|
45
53
|
"./cli/index.d.ts"
|
|
54
|
+
],
|
|
55
|
+
"cli/base": [
|
|
56
|
+
"./cli/base.d.ts"
|
|
57
|
+
],
|
|
58
|
+
"common": [
|
|
59
|
+
"./common/index.d.ts"
|
|
46
60
|
]
|
|
47
61
|
}
|
|
48
62
|
},
|
|
49
63
|
"dependencies": {
|
|
50
64
|
"@jest/types": "^30.5.1",
|
|
51
|
-
"
|
|
52
|
-
"type-fest": "5.9.0"
|
|
65
|
+
"type-fest": "5.10.0"
|
|
53
66
|
},
|
|
54
67
|
"devDependencies": {
|
|
55
68
|
"@types/babel__core": "^7.20.5",
|
|
56
|
-
"@types/node": "^26.
|
|
69
|
+
"@types/node": "^26.6.3",
|
|
70
|
+
"@types/react": "^19.3.0",
|
|
57
71
|
"http-proxy-middleware": "^4.2.0"
|
|
58
72
|
},
|
|
59
73
|
"sideEffects": false,
|
|
60
74
|
"publishConfig": {
|
|
61
75
|
"access": "public"
|
|
62
76
|
},
|
|
77
|
+
"peerDependencies": {
|
|
78
|
+
"@types/react": "^19.3.0"
|
|
79
|
+
},
|
|
80
|
+
"peerDependenciesMeta": {
|
|
81
|
+
"@types/react": {
|
|
82
|
+
"optional": true
|
|
83
|
+
}
|
|
84
|
+
},
|
|
63
85
|
"scripts": {
|
|
64
|
-
"test": "rstest
|
|
86
|
+
"test": "rstest"
|
|
65
87
|
},
|
|
66
|
-
"main": ""
|
|
88
|
+
"main": "",
|
|
89
|
+
"ultramodern": {
|
|
90
|
+
"sourceName": "@modern-js/types"
|
|
91
|
+
}
|
|
67
92
|
}
|