@quilted/rollup 0.2.4 → 0.2.6
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/CHANGELOG.md +12 -0
- package/build/esm/app.mjs +130 -125
- package/build/esm/features/node.mjs +57 -0
- package/build/esm/module.mjs +21 -22
- package/build/esm/package.mjs +36 -79
- package/build/esm/server.mjs +16 -25
- package/build/esm/shared/magic-module.mjs +5 -3
- package/build/esm/shared/project.mjs +100 -0
- package/build/tsconfig.tsbuildinfo +1 -1
- package/build/typescript/app.d.ts +23 -18
- package/build/typescript/app.d.ts.map +1 -1
- package/build/typescript/features/env.d.ts +3 -5
- package/build/typescript/features/env.d.ts.map +1 -1
- package/build/typescript/features/node.d.ts +4 -0
- package/build/typescript/features/node.d.ts.map +1 -0
- package/build/typescript/features/request-router.d.ts +2 -2
- package/build/typescript/module.d.ts +1 -1
- package/build/typescript/module.d.ts.map +1 -1
- package/build/typescript/package.d.ts +3 -5
- package/build/typescript/package.d.ts.map +1 -1
- package/build/typescript/server.d.ts +0 -1
- package/build/typescript/server.d.ts.map +1 -1
- package/build/typescript/shared/magic-module.d.ts +3 -3
- package/build/typescript/shared/magic-module.d.ts.map +1 -1
- package/build/typescript/shared/project.d.ts +33 -0
- package/build/typescript/shared/project.d.ts.map +1 -0
- package/package.json +19 -1
- package/source/app.ts +158 -154
- package/source/features/node.ts +74 -0
- package/source/module.ts +20 -22
- package/source/package.ts +37 -109
- package/source/server.ts +16 -30
- package/source/shared/magic-module.ts +10 -4
- package/source/shared/project.ts +150 -0
- package/build/esm/shared/package-json.mjs +0 -16
- package/build/esm/shared/path.mjs +0 -7
- package/source/shared/package-json.ts +0 -20
- package/source/shared/path.ts +0 -5
|
@@ -163,7 +163,7 @@ export interface AppServerOutputOptions extends Pick<RollupNodePluginOptions, 'b
|
|
|
163
163
|
format?: 'esmodules' | 'esm' | 'es' | 'commonjs' | 'cjs';
|
|
164
164
|
}
|
|
165
165
|
export { MAGIC_MODULE_ENTRY, MAGIC_MODULE_APP_COMPONENT, MAGIC_MODULE_BROWSER_ASSETS, MAGIC_MODULE_REQUEST_ROUTER, };
|
|
166
|
-
export declare function quiltAppOptions({ root
|
|
166
|
+
export declare function quiltAppOptions({ root, app, env, graphql, assets, browser: browserOptions, server: serverOptions, }?: AppOptions): Promise<RollupOptions[]>;
|
|
167
167
|
export declare function quiltAppBrowserOptions(options?: AppBrowserOptions): Promise<{
|
|
168
168
|
plugins: InputPluginOption[];
|
|
169
169
|
output: {
|
|
@@ -183,8 +183,8 @@ export declare function quiltAppBrowserOptions(options?: AppBrowserOptions): Pro
|
|
|
183
183
|
};
|
|
184
184
|
};
|
|
185
185
|
}>;
|
|
186
|
-
export declare function quiltAppBrowser({ root
|
|
187
|
-
export declare function quiltAppBrowserInput({ root
|
|
186
|
+
export declare function quiltAppBrowser({ root, app, entry, env, assets, module, graphql, }?: AppBrowserOptions): Promise<InputPluginOption[]>;
|
|
187
|
+
export declare function quiltAppBrowserInput({ root, entry, }?: Pick<AppBrowserOptions, 'root' | 'entry'>): {
|
|
188
188
|
name: string;
|
|
189
189
|
options(this: import("rollup").MinimalPluginContext, options: import("rollup").InputOptions): Promise<{
|
|
190
190
|
input: import("rollup").InputOption;
|
|
@@ -222,8 +222,8 @@ export declare function quiltAppServerOptions(options?: AppServerOptions): Promi
|
|
|
222
222
|
generatedCode: "es2015";
|
|
223
223
|
};
|
|
224
224
|
}>;
|
|
225
|
-
export declare function quiltAppServer({ root
|
|
226
|
-
export declare function quiltAppServerInput({ root
|
|
225
|
+
export declare function quiltAppServer({ root, app, env, entry, format, graphql, assets, output, }?: AppServerOptions): Promise<InputPluginOption[]>;
|
|
226
|
+
export declare function quiltAppServerInput({ root, entry, format, }?: Pick<AppServerOptions, 'root' | 'entry' | 'format'>): {
|
|
227
227
|
name: string;
|
|
228
228
|
options(this: import("rollup").MinimalPluginContext, options: import("rollup").InputOptions): Promise<{
|
|
229
229
|
input: import("rollup").InputOption;
|
|
@@ -250,25 +250,26 @@ export declare function quiltAppServerInput({ root: rootPath, entry, format, }?:
|
|
|
250
250
|
watch?: false | import("rollup").WatcherOptions | undefined;
|
|
251
251
|
}>;
|
|
252
252
|
};
|
|
253
|
-
export declare function magicModuleAppComponent({ entry }: {
|
|
254
|
-
entry
|
|
253
|
+
export declare function magicModuleAppComponent({ entry, root, }: {
|
|
254
|
+
entry?: string;
|
|
255
|
+
root?: string;
|
|
255
256
|
}): {
|
|
256
257
|
name: string;
|
|
257
|
-
resolveId(this: import("rollup").PluginContext, id: string): {
|
|
258
|
+
resolveId(this: import("rollup").PluginContext, id: string): Promise<{
|
|
258
259
|
id: string;
|
|
259
260
|
moduleSideEffects: "no-treeshake" | undefined;
|
|
260
|
-
} | null
|
|
261
|
+
} | null>;
|
|
261
262
|
load: ((this: import("rollup").PluginContext, source: string) => Promise<{
|
|
262
263
|
code: string;
|
|
263
264
|
moduleSideEffects: "no-treeshake" | undefined;
|
|
264
265
|
} | null>) | undefined;
|
|
265
266
|
};
|
|
266
|
-
export declare function magicModuleAppRequestRouter({ entry, }?: Pick<AppServerOptions, 'entry'>): {
|
|
267
|
+
export declare function magicModuleAppRequestRouter({ entry, root, }?: Pick<AppServerOptions, 'entry' | 'root'>): {
|
|
267
268
|
name: string;
|
|
268
|
-
resolveId(this: import("rollup").PluginContext, id: string): {
|
|
269
|
+
resolveId(this: import("rollup").PluginContext, id: string): Promise<{
|
|
269
270
|
id: string;
|
|
270
271
|
moduleSideEffects: "no-treeshake" | undefined;
|
|
271
|
-
} | null
|
|
272
|
+
} | null>;
|
|
272
273
|
load: ((this: import("rollup").PluginContext, source: string) => Promise<{
|
|
273
274
|
code: string;
|
|
274
275
|
moduleSideEffects: "no-treeshake" | undefined;
|
|
@@ -276,10 +277,10 @@ export declare function magicModuleAppRequestRouter({ entry, }?: Pick<AppServerO
|
|
|
276
277
|
};
|
|
277
278
|
export declare function magicModuleAppBrowserEntry({ hydrate, selector, }?: AppBrowserModuleOptions): {
|
|
278
279
|
name: string;
|
|
279
|
-
resolveId(this: import("rollup").PluginContext, id: string): {
|
|
280
|
+
resolveId(this: import("rollup").PluginContext, id: string): Promise<{
|
|
280
281
|
id: string;
|
|
281
282
|
moduleSideEffects: "no-treeshake" | undefined;
|
|
282
|
-
} | null
|
|
283
|
+
} | null>;
|
|
283
284
|
load: ((this: import("rollup").PluginContext, source: string) => Promise<{
|
|
284
285
|
code: string;
|
|
285
286
|
moduleSideEffects: "no-treeshake" | undefined;
|
|
@@ -294,10 +295,10 @@ export declare function magicModuleAppServerEntry({ host, port, assets, format,
|
|
|
294
295
|
format?: 'module' | 'commonjs';
|
|
295
296
|
}): {
|
|
296
297
|
name: string;
|
|
297
|
-
resolveId(this: import("rollup").PluginContext, id: string): {
|
|
298
|
+
resolveId(this: import("rollup").PluginContext, id: string): Promise<{
|
|
298
299
|
id: string;
|
|
299
300
|
moduleSideEffects: "no-treeshake" | undefined;
|
|
300
|
-
} | null
|
|
301
|
+
} | null>;
|
|
301
302
|
load: ((this: import("rollup").PluginContext, source: string) => Promise<{
|
|
302
303
|
code: string;
|
|
303
304
|
moduleSideEffects: "no-treeshake" | undefined;
|
|
@@ -305,13 +306,17 @@ export declare function magicModuleAppServerEntry({ host, port, assets, format,
|
|
|
305
306
|
};
|
|
306
307
|
export declare function magicModuleAppAssetManifests(): {
|
|
307
308
|
name: string;
|
|
308
|
-
resolveId(this: import("rollup").PluginContext, id: string): {
|
|
309
|
+
resolveId(this: import("rollup").PluginContext, id: string): Promise<{
|
|
309
310
|
id: string;
|
|
310
311
|
moduleSideEffects: "no-treeshake" | undefined;
|
|
311
|
-
} | null
|
|
312
|
+
} | null>;
|
|
312
313
|
load: ((this: import("rollup").PluginContext, source: string) => Promise<{
|
|
313
314
|
code: string;
|
|
314
315
|
moduleSideEffects: "no-treeshake" | undefined;
|
|
315
316
|
} | null>) | undefined;
|
|
316
317
|
};
|
|
318
|
+
export declare function sourceForAppBrowser({ entry, root, }: {
|
|
319
|
+
entry?: string;
|
|
320
|
+
root?: string | URL;
|
|
321
|
+
}): Promise<string | undefined>;
|
|
317
322
|
//# sourceMappingURL=app.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../source/app.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../source/app.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAEV,aAAa,EACb,iBAAiB,EACjB,cAAc,EACf,MAAM,QAAQ,CAAC;AAGhB,OAAO,EACL,kBAAkB,EAClB,0BAA0B,EAC1B,2BAA2B,EAC3B,2BAA2B,EAC5B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAmB,KAAK,qBAAqB,EAAC,MAAM,mBAAmB,CAAC;AAG/E,OAAO,EAIL,KAAK,uBAAuB,EAC7B,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAML,KAAK,2BAA2B,EACjC,MAAM,0BAA0B,CAAC;AAGlC,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC;IAEpB;;;;;;;;;;;;OAYG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;;;OAKG;IACH,GAAG,CAAC,EAAE,qBAAqB,GAAG,qBAAqB,CAAC,MAAM,CAAC,CAAC;CAC7D;AAED,MAAM,WAAW,UAAW,SAAQ,cAAc;IAChD;;OAEG;IACH,OAAO,CAAC,EAAE,IAAI,CAAC,iBAAiB,EAAE,MAAM,cAAc,CAAC,GACrD,IAAI,CAAC,iBAAiB,EAAE,KAAK,CAAC,CAAC;IAEjC;;OAEG;IACH,MAAM,CAAC,EAAE,iBAAiB,CAAC,QAAQ,CAAC,CAAC;IAErC;;OAEG;IACH,MAAM,CAAC,EAAE,IAAI,CAAC,gBAAgB,EAAE,MAAM,cAAc,CAA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AE,MAAM,CAAC;CACf;;;;;;;;;;EA+BA;AAED,wBAAgB,2BAA2B,CAAC,EAC1C,KAAK,EACL,IAAoB,GACrB,GAAE,IAAI,CAAC,gBAAgB,EAAE,OAAO,GAAG,MAAM,CAAM;;;;;;;;;;EAiD/C;AAED,wBAAgB,0BAA0B,CAAC,EACzC,OAAc,EACd,QAAiB,GAClB,GAAE,uBAA4B;;;;;;;;;;EA0B9B;AAED,wBAAgB,yBAAyB,CAAC,EACxC,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,MAAiB,GAClB,GAAE;IACD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,GAAG;QAAC,OAAO,EAAE,MAAM,CAAA;KAAC,CAAC;IACrC,MAAM,CAAC,EAAE,QAAQ,GAAG,UAAU,CAAC;CAC3B;;;;;;;;;;EAyDL;AAED,wBAAgB,4BAA4B;;;;;;;;;;EAqE3C;AAED,wBAAsB,mBAAmB,CAAC,EACxC,KAAK,EACL,IAAoB,GACrB,EAAE;IACD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC;CACrB,+BAgBA"}
|
|
@@ -44,15 +44,13 @@ export interface MagicModuleEnvOptions {
|
|
|
44
44
|
export declare function resolveEnvOption(option?: MagicModuleEnvOptions['mode'] | MagicModuleEnvOptions): MagicModuleEnvOptions;
|
|
45
45
|
export declare function magicModuleEnv({ mode, dotenv, inline, runtime, }?: MagicModuleEnvOptions): {
|
|
46
46
|
name: string;
|
|
47
|
-
resolveId(this: PluginContext, id: string): {
|
|
47
|
+
resolveId(this: PluginContext, id: string): Promise<{
|
|
48
48
|
id: string;
|
|
49
49
|
moduleSideEffects: "no-treeshake" | undefined;
|
|
50
|
-
} | null
|
|
50
|
+
} | null>;
|
|
51
51
|
load: ((this: PluginContext, source: string) => Promise<{
|
|
52
52
|
code: string;
|
|
53
53
|
moduleSideEffects: "no-treeshake" | undefined;
|
|
54
|
-
} | null>) | undefined;
|
|
55
|
-
* The runtime mode for your target environment.
|
|
56
|
-
*/
|
|
54
|
+
} | null>) | undefined;
|
|
57
55
|
};
|
|
58
56
|
//# sourceMappingURL=env.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../../source/features/env.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,QAAQ,CAAC;AAa1C,wBAAgB,iBAAiB,CAAC,EAChC,IAAI,EACJ,QAAe,GAChB,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,gCAQA;AAED,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,IAAI,CAAC,EAAE,YAAY,GAAG,aAAa,CAAC;IAEpC;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAElB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,EACH,KAAK,GACL;QAAC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;QAAC,KAAK,CAAC,EAAE,KAAK,CAAA;KAAC,GACjC;QAAC,KAAK,CAAC,EAAE,KAAK,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;KAAC,CAAC;CACvC;AAED,wBAAgB,gBAAgB,CAC9B,MAAM,CAAC,EAAE,qBAAqB,CAAC,MAAM,CAAC,GAAG,qBAAqB,yBAG/D;AAED,wBAAgB,cAAc,CAAC,EAC7B,IAAI,EACJ,MAAwC,EACxC,MAAW,EACX,OAAc,GACf,GAAE,qBAA0B
|
|
1
|
+
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../../source/features/env.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,QAAQ,CAAC;AAa1C,wBAAgB,iBAAiB,CAAC,EAChC,IAAI,EACJ,QAAe,GAChB,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,gCAQA;AAED,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,IAAI,CAAC,EAAE,YAAY,GAAG,aAAa,CAAC;IAEpC;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAElB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,EACH,KAAK,GACL;QAAC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;QAAC,KAAK,CAAC,EAAE,KAAK,CAAA;KAAC,GACjC;QAAC,KAAK,CAAC,EAAE,KAAK,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;KAAC,CAAC;CACvC;AAED,wBAAgB,gBAAgB,CAC9B,MAAM,CAAC,EAAE,qBAAqB,CAAC,MAAM,CAAC,GAAG,qBAAqB,yBAG/D;AAED,wBAAgB,cAAc,CAAC,EAC7B,IAAI,EACJ,MAAwC,EACxC,MAAW,EACX,OAAc,GACf,GAAE,qBAA0B;;;;;;;;;;EA0C5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../../source/features/node.ts"],"names":[],"mappings":"AAIA,wBAAsB,sBAAsB,CAAC,EAC3C,IAAoB,GACrB,GAAE;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAM,yCAmEtB"}
|
|
@@ -3,10 +3,10 @@ export declare function magicModuleRequestRouterEntry({ host, port, }?: {
|
|
|
3
3
|
port?: number;
|
|
4
4
|
}): {
|
|
5
5
|
name: string;
|
|
6
|
-
resolveId(this: import("rollup").PluginContext, id: string): {
|
|
6
|
+
resolveId(this: import("rollup").PluginContext, id: string): Promise<{
|
|
7
7
|
id: string;
|
|
8
8
|
moduleSideEffects: "no-treeshake" | undefined;
|
|
9
|
-
} | null
|
|
9
|
+
} | null>;
|
|
10
10
|
load: ((this: import("rollup").PluginContext, source: string) => Promise<{
|
|
11
11
|
code: string;
|
|
12
12
|
moduleSideEffects: "no-treeshake" | undefined;
|
|
@@ -41,7 +41,7 @@ export interface ModuleAssetsOptions extends Pick<RollupNodePluginOptions, 'bund
|
|
|
41
41
|
hash?: boolean | 'async-only';
|
|
42
42
|
targets?: BrowserGroupTargetSelection;
|
|
43
43
|
}
|
|
44
|
-
export declare function quiltModule({ root
|
|
44
|
+
export declare function quiltModule({ root, entry, env, assets, graphql, }?: ModuleOptions): Promise<{
|
|
45
45
|
input: string;
|
|
46
46
|
plugins: InputPluginOption[];
|
|
47
47
|
output: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../source/module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../source/module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,iBAAiB,EAAqB,MAAM,QAAQ,CAAC;AAGlE,OAAO,EACL,uBAAuB,EAGxB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAGL,KAAK,2BAA2B,EACjC,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAmB,KAAK,qBAAqB,EAAC,MAAM,mBAAmB,CAAC;AAE/E,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC;IAEpB;;;;;;;OAOG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,GAAG,CAAC,EAAE,qBAAqB,GAAG,qBAAqB,CAAC,MAAM,CAAC,CAAC;IAE5D;;OAEG;IACH,MAAM,CAAC,EAAE,mBAAmB,CAAC;CAC9B;AAED,MAAM,WAAW,mBACf,SAAQ,IAAI,CAAC,uBAAuB,EAAE,QAAQ,CAAC;IAC/C;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,OAAO,GAAG,YAAY,CAAC;IAC9B,OAAO,CAAC,EAAE,2BAA2B,CAAC;CACvC;AAED,wBAAsB,WAAW,CAAC,EAChC,IAAoB,EACpB,KAAK,EACL,GAAG,EACH,MAAM,EACN,OAAc,GACf,GAAE,aAAkB;;;;;;;;;;;;;;;;;;GAyFpB"}
|
|
@@ -99,10 +99,9 @@ export interface PackageOptions extends PackageESModuleOptions {
|
|
|
99
99
|
*/
|
|
100
100
|
esnext?: boolean;
|
|
101
101
|
}
|
|
102
|
-
export declare function quiltPackage({ root
|
|
102
|
+
export declare function quiltPackage({ root, commonjs, esnext: explicitESNext, entries, executable, bundle, react, graphql, customize, }?: PackageOptions): Promise<(RollupOptions | {
|
|
103
103
|
input: string[];
|
|
104
104
|
plugins: Plugin<any>[];
|
|
105
|
-
onwarn(warning: import("rollup").RollupLog, defaultWarn: import("rollup").LoggingFunction): void;
|
|
106
105
|
output: OutputOptions[];
|
|
107
106
|
} | {
|
|
108
107
|
input: string[];
|
|
@@ -150,10 +149,9 @@ export declare function quiltPackage({ root: rootPath, commonjs, esnext: explici
|
|
|
150
149
|
treeshake?: boolean | import("rollup").TreeshakingPreset | import("rollup").TreeshakingOptions | undefined;
|
|
151
150
|
watch?: false | import("rollup").WatcherOptions | undefined;
|
|
152
151
|
})[]>;
|
|
153
|
-
export declare function quiltPackageESModules({ root
|
|
152
|
+
export declare function quiltPackageESModules({ root, commonjs, entries, executable, react: useReact, bundle, graphql, customize, }?: PackageESModuleOptions): Promise<RollupOptions | {
|
|
154
153
|
input: string[];
|
|
155
154
|
plugins: Plugin<any>[];
|
|
156
|
-
onwarn(warning: import("rollup").RollupLog, defaultWarn: import("rollup").LoggingFunction): void;
|
|
157
155
|
output: OutputOptions[];
|
|
158
156
|
}>;
|
|
159
157
|
/**
|
|
@@ -176,7 +174,7 @@ export declare function quiltPackageESModules({ root: rootPath, commonjs, entrie
|
|
|
176
174
|
* }
|
|
177
175
|
* ```
|
|
178
176
|
*/
|
|
179
|
-
export declare function quiltPackageESNext({ root
|
|
177
|
+
export declare function quiltPackageESNext({ root, react: useReact, graphql, entries, bundle, customize, }?: PackageBaseOptions): Promise<RollupOptions | {
|
|
180
178
|
input: string[];
|
|
181
179
|
plugins: Plugin<any>[];
|
|
182
180
|
onwarn(warning: import("rollup").RollupLog, defaultWarn: import("rollup").LoggingFunction): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package.d.ts","sourceRoot":"","sources":["../../source/package.ts"],"names":[],"mappings":"AAKA,OAAO,EAAC,MAAM,EAAE,KAAK,aAAa,EAAE,KAAK,aAAa,EAAC,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"package.d.ts","sourceRoot":"","sources":["../../source/package.ts"],"names":[],"mappings":"AAKA,OAAO,EAAC,MAAM,EAAE,KAAK,aAAa,EAAE,KAAK,aAAa,EAAC,MAAM,QAAQ,CAAC;AAItE,OAAO,EAGL,KAAK,uBAAuB,EAC7B,MAAM,oBAAoB,CAAC;AAM5B,MAAM,WAAW,kBACf,SAAQ,IAAI,CAAC,uBAAuB,EAAE,QAAQ,CAAC;IAC/C;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC;IAEpB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;;;;;;;;;;;;;;;;;OAmBG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEjC;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAC;IAErC;;;;;OAKG;IACH,SAAS,CAAC,EACN,aAAa,GACb,CAAC,CAAC,OAAO,EAAE,aAAa,KAAK,aAAa,GAAG,OAAO,CAAC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}
|
|
@@ -89,7 +89,6 @@ export declare function quiltServer({ root: rootPath, entry, format, env, graphq
|
|
|
89
89
|
server: string;
|
|
90
90
|
};
|
|
91
91
|
plugins: InputPluginOption[];
|
|
92
|
-
onwarn(warning: import("rollup").RollupLog, defaultWarn: import("rollup").LoggingFunction): void;
|
|
93
92
|
output: {
|
|
94
93
|
format: "esm" | "cjs";
|
|
95
94
|
dir: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../source/server.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../source/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,iBAAiB,EAAqB,MAAM,QAAQ,CAAC;AAGlE,OAAO,EACL,uBAAuB,EAGxB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAmB,KAAK,qBAAqB,EAAC,MAAM,mBAAmB,CAAC;AAC/E,OAAO,EAAC,kBAAkB,EAAE,2BAA2B,EAAC,MAAM,gBAAgB,CAAC;AAG/E,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC;IAEpB;;;;;;;;OAQG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,gBAAgB,GAAG,QAAQ,CAAC;IAErC;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,GAAG,CAAC,EAAE,qBAAqB,GAAG,qBAAqB,CAAC,MAAM,CAAC,CAAC;IAE5D;;OAEG;IACH,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAE7B;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAEvB;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,mBACf,SAAQ,IAAI,CAAC,uBAAuB,EAAE,QAAQ,CAAC;IAC/C;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;;;;;;;OAQG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,YAAY,CAAC;IAE9B;;;;OAIG;IACH,MAAM,CAAC,EAAE,WAAW,GAAG,KAAK,GAAG,IAAI,GAAG,UAAU,GAAG,KAAK,CAAC;CAC1D;AAED,OAAO,EAAC,kBAAkB,EAAE,2BAA2B,EAAC,CAAC;AAEzD,wBAAsB,WAAW,CAAC,EAChC,IAAI,EAAE,QAAwB,EAC9B,KAAK,EACL,MAAyB,EACzB,GAAG,EACH,OAAc,EACd,MAAM,EACN,IAAI,EACJ,IAAI,GACL,GAAE,aAAkB;;;;;;;;;;;;;GAqGpB"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import type { PluginContext } from 'rollup';
|
|
2
2
|
export declare function createMagicModulePlugin({ name, module, alias, source: getSource, sideEffects, }: {
|
|
3
3
|
readonly name: string;
|
|
4
|
-
readonly alias?: string;
|
|
4
|
+
readonly alias?: string | (() => string | Promise<string>);
|
|
5
5
|
readonly module: string;
|
|
6
6
|
readonly sideEffects?: boolean;
|
|
7
7
|
source?(this: PluginContext): string | Promise<string>;
|
|
8
8
|
}): {
|
|
9
9
|
name: string;
|
|
10
|
-
resolveId(this: PluginContext, id: string): {
|
|
10
|
+
resolveId(this: PluginContext, id: string): Promise<{
|
|
11
11
|
id: string;
|
|
12
12
|
moduleSideEffects: "no-treeshake" | undefined;
|
|
13
|
-
} | null
|
|
13
|
+
} | null>;
|
|
14
14
|
load: ((this: PluginContext, source: string) => Promise<{
|
|
15
15
|
code: string;
|
|
16
16
|
moduleSideEffects: "no-treeshake" | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"magic-module.d.ts","sourceRoot":"","sources":["../../../source/shared/magic-module.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAS,aAAa,EAAC,MAAM,QAAQ,CAAC;AAKlD,wBAAgB,uBAAuB,CAAC,EACtC,IAAI,EACJ,MAAM,EACN,KAAoE,EACpE,MAAM,EAAE,SAAS,EACjB,WAAmB,GACpB,EAAE;IACD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"magic-module.d.ts","sourceRoot":"","sources":["../../../source/shared/magic-module.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAS,aAAa,EAAC,MAAM,QAAQ,CAAC;AAKlD,wBAAgB,uBAAuB,CAAC,EACtC,IAAI,EACJ,MAAM,EACN,KAAoE,EACpE,MAAM,EAAE,SAAS,EACjB,WAAmB,GACpB,EAAE;IACD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;IAC3D,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;IAC/B,MAAM,CAAC,CAAC,IAAI,EAAE,aAAa,GAAG,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CACxD;;;;;;;;;;EA8BA"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { type GlobOptions } from 'glob';
|
|
2
|
+
export declare class Project {
|
|
3
|
+
#private;
|
|
4
|
+
static load(root: string | URL): Project;
|
|
5
|
+
readonly root: string;
|
|
6
|
+
get path(): string;
|
|
7
|
+
get name(): string;
|
|
8
|
+
get packageJSON(): PackageJSON;
|
|
9
|
+
constructor(root: string | URL);
|
|
10
|
+
resolve(...segments: string[]): string;
|
|
11
|
+
glob(pattern: string | string[], options?: GlobOptions): Promise<string[]>;
|
|
12
|
+
}
|
|
13
|
+
export interface PackageJSONRaw {
|
|
14
|
+
name: string;
|
|
15
|
+
main?: string;
|
|
16
|
+
private?: boolean;
|
|
17
|
+
exports?: Record<string, string | Record<string, string>>;
|
|
18
|
+
dependencies?: Record<string, string>;
|
|
19
|
+
peerDependencies?: Record<string, string>;
|
|
20
|
+
peerDependenciesMeta?: Record<string, {
|
|
21
|
+
optional?: boolean;
|
|
22
|
+
}>;
|
|
23
|
+
devDependencies?: Record<string, string>;
|
|
24
|
+
[key: string]: unknown;
|
|
25
|
+
}
|
|
26
|
+
export declare class PackageJSON {
|
|
27
|
+
readonly raw: PackageJSONRaw;
|
|
28
|
+
readonly path: string;
|
|
29
|
+
get name(): string;
|
|
30
|
+
constructor(rootOrPath: string);
|
|
31
|
+
}
|
|
32
|
+
export declare function sourceEntriesForProject(project: Project): Promise<Record<string, string>>;
|
|
33
|
+
//# sourceMappingURL=project.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../../source/shared/project.ts"],"names":[],"mappings":"AAIA,OAAO,EAAO,KAAK,WAAW,EAAC,MAAM,MAAM,CAAC;AAI5C,qBAAa,OAAO;;IAClB,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG;IAa9B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB,IAAI,IAAI,WAEP;IAED,IAAI,IAAI,WAEP;IAGD,IAAI,WAAW,gBAGd;gBAEW,IAAI,EAAE,MAAM,GAAG,GAAG;IAI9B,OAAO,CAAC,GAAG,QAAQ,EAAE,MAAM,EAAE;IAI7B,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,WAAW;CAOvD;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAC1D,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1C,oBAAoB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAC,CAAC,CAAC;IAC5D,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,qBAAa,WAAW;IACtB,QAAQ,CAAC,GAAG,EAAE,cAAc,CAAC;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB,IAAI,IAAI,WAEP;gBAEW,UAAU,EAAE,MAAM;CAM/B;AAMD,wBAAsB,uBAAuB,CAAC,OAAO,EAAE,OAAO,mCA4C7D"}
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"access": "public",
|
|
7
7
|
"@quilted/registry": "https://registry.npmjs.org"
|
|
8
8
|
},
|
|
9
|
-
"version": "0.2.
|
|
9
|
+
"version": "0.2.6",
|
|
10
10
|
"engines": {
|
|
11
11
|
"node": ">=14.0.0"
|
|
12
12
|
},
|
|
@@ -52,12 +52,24 @@
|
|
|
52
52
|
"quilt:esnext": "./build/esnext/features/assets.esnext",
|
|
53
53
|
"import": "./build/esm/features/assets.mjs"
|
|
54
54
|
},
|
|
55
|
+
"./features/env": {
|
|
56
|
+
"types": "./build/typescript/features/env.d.ts",
|
|
57
|
+
"quilt:source": "./source/features/env.ts",
|
|
58
|
+
"quilt:esnext": "./build/esnext/features/env.esnext",
|
|
59
|
+
"import": "./build/esm/features/env.mjs"
|
|
60
|
+
},
|
|
55
61
|
"./features/graphql": {
|
|
56
62
|
"types": "./build/typescript/features/graphql.d.ts",
|
|
57
63
|
"quilt:source": "./source/features/graphql.ts",
|
|
58
64
|
"quilt:esnext": "./build/esnext/features/graphql.esnext",
|
|
59
65
|
"import": "./build/esm/features/graphql.mjs"
|
|
60
66
|
},
|
|
67
|
+
"./features/node": {
|
|
68
|
+
"types": "./build/typescript/features/node.d.ts",
|
|
69
|
+
"quilt:source": "./source/features/node.ts",
|
|
70
|
+
"quilt:esnext": "./build/esnext/features/node.esnext",
|
|
71
|
+
"import": "./build/esm/features/node.mjs"
|
|
72
|
+
},
|
|
61
73
|
"./features/typescript": {
|
|
62
74
|
"types": "./build/typescript/features/typescript.d.ts",
|
|
63
75
|
"quilt:source": "./source/features/typescript.ts",
|
|
@@ -83,9 +95,15 @@
|
|
|
83
95
|
"features/assets": [
|
|
84
96
|
"./build/typescript/features/assets.d.ts"
|
|
85
97
|
],
|
|
98
|
+
"features/env": [
|
|
99
|
+
"./build/typescript/features/env.d.ts"
|
|
100
|
+
],
|
|
86
101
|
"features/graphql": [
|
|
87
102
|
"./build/typescript/features/graphql.d.ts"
|
|
88
103
|
],
|
|
104
|
+
"features/node": [
|
|
105
|
+
"./build/typescript/features/node.d.ts"
|
|
106
|
+
],
|
|
89
107
|
"features/typescript": [
|
|
90
108
|
"./build/typescript/features/typescript.d.ts"
|
|
91
109
|
]
|