rollipop 1.0.0-alpha.26 → 1.0.0-alpha.28
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/client.d.ts +5 -1
- package/dist/config/index.d.ts +1 -1
- package/dist/config/load-config.js +2 -0
- package/dist/config/notice.js +7 -0
- package/dist/config/types.d.ts +36 -3
- package/dist/constants.js +1 -1
- package/dist/core/assets.d.ts +4 -3
- package/dist/core/assets.js +124 -78
- package/dist/core/bundler.js +2 -2
- package/dist/core/plugins/alias-plugin.d.ts +13 -0
- package/dist/core/plugins/alias-plugin.js +8 -0
- package/dist/core/plugins/dev-server-plugin.d.ts +4 -2
- package/dist/core/plugins/dev-server-plugin.js +5 -3
- package/dist/core/plugins/import-glob-plugin.d.ts +11 -0
- package/dist/core/plugins/import-glob-plugin.js +7 -0
- package/dist/core/plugins/index.d.ts +4 -2
- package/dist/core/plugins/index.js +7 -1
- package/dist/core/plugins/react-native-plugin.d.ts +1 -1
- package/dist/core/rolldown.js +44 -5
- package/dist/core/types.d.ts +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1 -1
- package/dist/internal/react-native.js +2 -5
- package/dist/node/commands/bundle/action.js +1 -1
- package/dist/node/commands/start/action.js +2 -3
- package/dist/package.js +1 -1
- package/dist/server/create-dev-server.js +0 -7
- package/dist/server/mcp/server.js +1 -1
- package/dist/server/mcp/tools/index.js +1 -1
- package/dist/server/middlewares/dashboard.js +8 -2
- package/dist/server/middlewares/serve-assets.js +5 -4
- package/dist/server/middlewares/symbolicate.js +20 -16
- package/dist/server/rest/domains/actions.js +2 -2
- package/dist/server/state/store.js +9 -1
- package/dist/server/symbolicate.js +35 -19
- package/dist/storage/file-storage.js +1 -1
- package/dist/utils/reset-cache.d.ts +2 -3
- package/dist/utils/reset-cache.js +4 -19
- package/import-glob.d.ts +129 -0
- package/package.json +4 -3
package/import-glob.d.ts
ADDED
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @see https://github.com/vitejs/vite/blob/3dcf7bd9418e02282cbfa0254ace59fe702c11bd/packages/vite/types/importGlob.d.ts
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
// make input suggestions work
|
|
6
|
+
type StringQueryType = `?${keyof KnownAsTypeMap}` | (string & {});
|
|
7
|
+
type BaseQueryType = StringQueryType | Record<string, string | number | boolean>;
|
|
8
|
+
|
|
9
|
+
export interface ImportGlobOptions<
|
|
10
|
+
Eager extends boolean,
|
|
11
|
+
AsType extends string,
|
|
12
|
+
QueryType extends BaseQueryType,
|
|
13
|
+
> {
|
|
14
|
+
/**
|
|
15
|
+
* Import type for the import url.
|
|
16
|
+
*
|
|
17
|
+
* @deprecated Use `query` instead, e.g. `as: 'url'` -> `query: '?url', import: 'default'`
|
|
18
|
+
*/
|
|
19
|
+
as?: AsType;
|
|
20
|
+
/**
|
|
21
|
+
* Import as static or dynamic
|
|
22
|
+
*
|
|
23
|
+
* @default false
|
|
24
|
+
*/
|
|
25
|
+
eager?: Eager;
|
|
26
|
+
/**
|
|
27
|
+
* Import only the specific named export. Set to `default` to import the default export.
|
|
28
|
+
*/
|
|
29
|
+
import?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Custom queries
|
|
32
|
+
*/
|
|
33
|
+
query?: QueryType;
|
|
34
|
+
/**
|
|
35
|
+
* Search files also inside `node_modules/` and hidden directories (e.g. `.git/`). This might have impact on performance.
|
|
36
|
+
*
|
|
37
|
+
* @default false
|
|
38
|
+
*/
|
|
39
|
+
exhaustive?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Base path to resolve relative paths.
|
|
42
|
+
*/
|
|
43
|
+
base?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Whether the glob pattern matching should be case-sensitive. Defaults to `true`.
|
|
46
|
+
*/
|
|
47
|
+
caseSensitive?: boolean;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export type ImportGlobOptionsWithoutAs<
|
|
51
|
+
Eager extends boolean,
|
|
52
|
+
QueryType extends BaseQueryType,
|
|
53
|
+
> = Omit<ImportGlobOptions<Eager, string, QueryType>, 'as'> & {
|
|
54
|
+
as?: never;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export type GeneralImportGlobOptions = ImportGlobOptions<boolean, string, BaseQueryType>;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Declare Worker in case DOM is not added to the tsconfig lib causing
|
|
61
|
+
* Worker interface is not defined. For developers with DOM lib added,
|
|
62
|
+
* the Worker interface will be merged correctly.
|
|
63
|
+
*/
|
|
64
|
+
declare global {
|
|
65
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
66
|
+
interface Worker {}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export interface KnownAsTypeMap {
|
|
70
|
+
raw: string;
|
|
71
|
+
url: string;
|
|
72
|
+
worker: Worker;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
type KnownQueryTypeMap = {
|
|
76
|
+
[K in keyof KnownAsTypeMap as `?${K}`]: KnownAsTypeMap[K];
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
export interface ImportGlobFunction {
|
|
80
|
+
/**
|
|
81
|
+
* Import a list of files with a glob pattern.
|
|
82
|
+
*
|
|
83
|
+
* Overload 1A: No generic provided, infer the type from `eager` and `query`
|
|
84
|
+
*/
|
|
85
|
+
<
|
|
86
|
+
Eager extends boolean,
|
|
87
|
+
Query extends BaseQueryType,
|
|
88
|
+
T = Query extends keyof KnownQueryTypeMap ? KnownQueryTypeMap[Query] : unknown,
|
|
89
|
+
>(
|
|
90
|
+
glob: string | string[],
|
|
91
|
+
options?: ImportGlobOptionsWithoutAs<Eager, Query>,
|
|
92
|
+
): (Eager extends true ? true : false) extends true
|
|
93
|
+
? Record<string, T>
|
|
94
|
+
: Record<string, () => Promise<T>>;
|
|
95
|
+
/**
|
|
96
|
+
* Import a list of files with a glob pattern.
|
|
97
|
+
*
|
|
98
|
+
* Overload 1B: No generic provided, infer the type from `eager` and `as`
|
|
99
|
+
* (deprecated, use `query` instead)
|
|
100
|
+
*/
|
|
101
|
+
<
|
|
102
|
+
Eager extends boolean,
|
|
103
|
+
As extends string,
|
|
104
|
+
T = As extends keyof KnownAsTypeMap ? KnownAsTypeMap[As] : unknown,
|
|
105
|
+
>(
|
|
106
|
+
glob: string | string[],
|
|
107
|
+
options?: ImportGlobOptions<Eager, As, BaseQueryType>,
|
|
108
|
+
): (Eager extends true ? true : false) extends true
|
|
109
|
+
? Record<string, T>
|
|
110
|
+
: Record<string, () => Promise<T>>;
|
|
111
|
+
/**
|
|
112
|
+
* Import a list of files with a glob pattern.
|
|
113
|
+
*
|
|
114
|
+
* Overload 2: Module generic provided, infer the type from `eager: false`
|
|
115
|
+
*/
|
|
116
|
+
<M>(
|
|
117
|
+
glob: string | string[],
|
|
118
|
+
options?: ImportGlobOptions<false, string, BaseQueryType>,
|
|
119
|
+
): Record<string, () => Promise<M>>;
|
|
120
|
+
/**
|
|
121
|
+
* Import a list of files with a glob pattern.
|
|
122
|
+
*
|
|
123
|
+
* Overload 3: Module generic provided, infer the type from `eager: true`
|
|
124
|
+
*/
|
|
125
|
+
<M>(
|
|
126
|
+
glob: string | string[],
|
|
127
|
+
options: ImportGlobOptions<true, string, BaseQueryType>,
|
|
128
|
+
): Record<string, M>;
|
|
129
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rollipop",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.28",
|
|
4
4
|
"stableVersion": "1.0.0-alpha.23",
|
|
5
5
|
"homepage": "https://github.com/rollipop-dev/rollipop#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
"bin": "./bin/index.js",
|
|
17
17
|
"files": [
|
|
18
18
|
"client.d.ts",
|
|
19
|
+
"import-glob.d.ts",
|
|
19
20
|
"bin",
|
|
20
21
|
"dist",
|
|
21
22
|
"skills",
|
|
@@ -70,8 +71,8 @@
|
|
|
70
71
|
"@react-native-community/cli-types": "20.1.3",
|
|
71
72
|
"@react-native/babel-plugin-codegen": "0.86.0",
|
|
72
73
|
"@react-native/dev-middleware": "0.86.0",
|
|
73
|
-
"@rollipop/dashboard": "1.0.0-alpha.
|
|
74
|
-
"@rollipop/rolldown": "1.0.
|
|
74
|
+
"@rollipop/dashboard": "1.0.0-alpha.28",
|
|
75
|
+
"@rollipop/rolldown": "1.0.21",
|
|
75
76
|
"@swc/core": "1.15.41",
|
|
76
77
|
"@swc/helpers": "0.5.23",
|
|
77
78
|
"@types/ws": "8.18.1",
|