@gtkx/config 2.0.0-beta.10 → 2.0.0-beta.11
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/README.md +11 -169
- package/dist/config-dependencies.d.ts.map +1 -1
- package/dist/config-dependencies.js +3 -2
- package/dist/config-dependencies.js.map +1 -1
- package/dist/config-reloader.d.ts +8 -0
- package/dist/config-reloader.d.ts.map +1 -0
- package/dist/config-reloader.js +38 -0
- package/dist/config-reloader.js.map +1 -0
- package/dist/config-source.d.ts +7 -0
- package/dist/config-source.d.ts.map +1 -0
- package/dist/config-source.js +17 -0
- package/dist/config-source.js.map +1 -0
- package/dist/config.d.ts +32 -22
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +16 -10
- package/dist/config.js.map +1 -1
- package/dist/deploy.d.ts +3 -7
- package/dist/deploy.d.ts.map +1 -1
- package/dist/deploy.js +1 -2
- package/dist/deploy.js.map +1 -1
- package/dist/internal.d.ts +4 -2
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.js +4 -2
- package/dist/internal.js.map +1 -1
- package/dist/loader.d.ts +1 -1
- package/dist/loader.d.ts.map +1 -1
- package/dist/loader.js +3 -15
- package/dist/loader.js.map +1 -1
- package/dist/node-version.d.ts +2 -1
- package/dist/node-version.d.ts.map +1 -1
- package/dist/node-version.js +2 -1
- package/dist/node-version.js.map +1 -1
- package/dist/static-dependencies.d.ts +3 -0
- package/dist/static-dependencies.d.ts.map +1 -0
- package/dist/static-dependencies.js +350 -0
- package/dist/static-dependencies.js.map +1 -0
- package/dist/virtual.d.ts.map +1 -1
- package/dist/virtual.js +0 -2
- package/dist/virtual.js.map +1 -1
- package/dist/vite-plugin.d.ts.map +1 -1
- package/dist/vite-plugin.js.map +1 -1
- package/package.json +20 -6
- package/src/config-dependencies.ts +4 -2
- package/src/config-reloader.ts +54 -0
- package/src/config-source.ts +25 -0
- package/src/config.ts +22 -14
- package/src/deploy.ts +2 -3
- package/src/internal.ts +4 -1
- package/src/loader.ts +4 -24
- package/src/node-version.ts +2 -1
- package/src/static-dependencies.ts +464 -0
- package/src/virtual.ts +0 -2
- package/src/vite-plugin.ts +0 -2
package/src/virtual.ts
CHANGED
|
@@ -3,7 +3,6 @@ import { resourceBasePath } from "./resource-base-path.ts";
|
|
|
3
3
|
|
|
4
4
|
const GTKX_CONFIG_VIRTUAL_ID = "virtual:gtkx-config";
|
|
5
5
|
const RESOLVED_GTKX_CONFIG_VIRTUAL_ID = `\0${GTKX_CONFIG_VIRTUAL_ID}`;
|
|
6
|
-
const METADATA_SPECIFIER = "@gtkx/jsx/metadata";
|
|
7
6
|
|
|
8
7
|
const renderConfigModule = (config: ResolvedConfig): string => {
|
|
9
8
|
const lazyJson = JSON.stringify(Object.fromEntries(config.lazyElements.map((type) => [type, { isLazy: true }])));
|
|
@@ -18,7 +17,6 @@ const renderConfigModule = (config: ResolvedConfig): string => {
|
|
|
18
17
|
|
|
19
18
|
return [
|
|
20
19
|
...behaviorImports,
|
|
21
|
-
`export * from ${JSON.stringify(METADATA_SPECIFIER)};`,
|
|
22
20
|
`export const applicationId = ${JSON.stringify(config.applicationId)};`,
|
|
23
21
|
`export const resourceBasePath = ${JSON.stringify(resourceBasePath(config.applicationId))};`,
|
|
24
22
|
`export const userEventSignals = ${JSON.stringify(config.userEventSignals)};`,
|
package/src/vite-plugin.ts
CHANGED
|
@@ -3,9 +3,7 @@ import { type ConfigLoader, createConfigLoader } from "./loader.ts";
|
|
|
3
3
|
import { GTKX_CONFIG_VIRTUAL_ID, renderConfigModule, RESOLVED_GTKX_CONFIG_VIRTUAL_ID } from "./virtual.ts";
|
|
4
4
|
import { viteProjectRoot } from "./vite-root.ts";
|
|
5
5
|
|
|
6
|
-
/** State the plugin carries from Vite's `config` hook to the virtual module it serves. */
|
|
7
6
|
type PluginState = {
|
|
8
|
-
/** Project root taken from Vite's `config` hook, falling back to the working directory. */
|
|
9
7
|
root: string;
|
|
10
8
|
};
|
|
11
9
|
|