@gtkx/cli 1.5.0 → 2.0.0-beta.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/README.md +5 -5
- package/dist/cli.js +4 -0
- package/dist/cli.js.map +1 -1
- package/dist/codegen/freshness.d.ts.map +1 -1
- package/dist/codegen/freshness.js +45 -15
- package/dist/codegen/freshness.js.map +1 -1
- package/dist/codegen/reference.d.ts +17 -0
- package/dist/codegen/reference.d.ts.map +1 -0
- package/dist/codegen/reference.js +31 -0
- package/dist/codegen/reference.js.map +1 -0
- package/dist/codegen/report.d.ts.map +1 -1
- package/dist/codegen/report.js +18 -15
- package/dist/codegen/report.js.map +1 -1
- package/dist/codegen/run-codegen.d.ts +5 -5
- package/dist/codegen/run-codegen.d.ts.map +1 -1
- package/dist/codegen/run-codegen.js +24 -59
- package/dist/codegen/run-codegen.js.map +1 -1
- package/dist/codegen/store-resolver.d.ts +0 -1
- package/dist/codegen/store-resolver.d.ts.map +1 -1
- package/dist/codegen/store-resolver.js +8 -17
- package/dist/codegen/store-resolver.js.map +1 -1
- package/dist/commands/docs.d.ts.map +1 -1
- package/dist/commands/docs.js +6 -22
- package/dist/commands/docs.js.map +1 -1
- package/dist/commands/mcp.d.ts +13 -0
- package/dist/commands/mcp.d.ts.map +1 -0
- package/dist/commands/mcp.js +68 -0
- package/dist/commands/mcp.js.map +1 -0
- package/dist/deploy/freedesktop/copyright.d.ts.map +1 -1
- package/dist/deploy/freedesktop/copyright.js +2 -13
- package/dist/deploy/freedesktop/copyright.js.map +1 -1
- package/dist/deploy/freedesktop/xml.d.ts.map +1 -1
- package/dist/deploy/freedesktop/xml.js +21 -25
- package/dist/deploy/freedesktop/xml.js.map +1 -1
- package/dist/deploy/node-runtime/license.d.ts.map +1 -1
- package/dist/deploy/node-runtime/license.js +2 -9
- package/dist/deploy/node-runtime/license.js.map +1 -1
- package/dist/deploy/notices/gtkx.js +1 -1
- package/dist/deploy/notices/gtkx.js.map +1 -1
- package/dist/deploy/notices/libraries.d.ts.map +1 -1
- package/dist/deploy/notices/libraries.js +2 -1
- package/dist/deploy/notices/libraries.js.map +1 -1
- package/dist/deploy/notices/packages.d.ts.map +1 -1
- package/dist/deploy/notices/packages.js +3 -10
- package/dist/deploy/notices/packages.js.map +1 -1
- package/dist/deploy/payload/copy-tree.d.ts.map +1 -1
- package/dist/deploy/payload/copy-tree.js +3 -3
- package/dist/deploy/payload/copy-tree.js.map +1 -1
- package/dist/deploy/payload/stage.d.ts.map +1 -1
- package/dist/deploy/payload/stage.js +1 -3
- package/dist/deploy/payload/stage.js.map +1 -1
- package/dist/deploy/settings/build-manifest.d.ts.map +1 -1
- package/dist/deploy/settings/build-manifest.js +4 -15
- package/dist/deploy/settings/build-manifest.js.map +1 -1
- package/dist/deploy/settings/libraries.d.ts.map +1 -1
- package/dist/deploy/settings/libraries.js +2 -21
- package/dist/deploy/settings/libraries.js.map +1 -1
- package/dist/deploy/settings/paths.d.ts +1 -2
- package/dist/deploy/settings/paths.d.ts.map +1 -1
- package/dist/deploy/settings/paths.js +5 -15
- package/dist/deploy/settings/paths.js.map +1 -1
- package/dist/deploy/settings/screenshots.d.ts.map +1 -1
- package/dist/deploy/settings/screenshots.js +6 -31
- package/dist/deploy/settings/screenshots.js.map +1 -1
- package/dist/deploy/targets/flatpak-pnpm.js +4 -4
- package/dist/deploy/targets/flatpak-pnpm.js.map +1 -1
- package/dist/deploy/targets/flatpak-source.d.ts.map +1 -1
- package/dist/deploy/targets/flatpak-source.js +4 -4
- package/dist/deploy/targets/flatpak-source.js.map +1 -1
- package/dist/deploy/targets/flatpak-sources.js +1 -1
- package/dist/deploy/targets/flatpak-sources.js.map +1 -1
- package/dist/deploy/tools.d.ts.map +1 -1
- package/dist/deploy/tools.js +1 -3
- package/dist/deploy/tools.js.map +1 -1
- package/dist/dev/runner-main.js +1 -1
- package/dist/dev/runner-main.js.map +1 -1
- package/dist/dev/schema-dir.d.ts +1 -1
- package/dist/dev/schema-dir.d.ts.map +1 -1
- package/dist/dev/schema-dir.js +2 -4
- package/dist/dev/schema-dir.js.map +1 -1
- package/dist/i18n/catalogs.d.ts.map +1 -1
- package/dist/i18n/catalogs.js +2 -1
- package/dist/i18n/catalogs.js.map +1 -1
- package/dist/i18n/metadata-templates.d.ts.map +1 -1
- package/dist/i18n/metadata-templates.js +2 -1
- package/dist/i18n/metadata-templates.js.map +1 -1
- package/dist/i18n/source-messages.d.ts +3 -21
- package/dist/i18n/source-messages.d.ts.map +1 -1
- package/dist/i18n/source-messages.js +66 -85
- package/dist/i18n/source-messages.js.map +1 -1
- package/dist/i18n/types.d.ts +6 -7
- package/dist/i18n/types.d.ts.map +1 -1
- package/dist/i18n/types.js +83 -96
- package/dist/i18n/types.js.map +1 -1
- package/dist/internal/agent-rules.d.ts +7 -0
- package/dist/internal/agent-rules.d.ts.map +1 -0
- package/dist/internal/agent-rules.js +106 -0
- package/dist/internal/agent-rules.js.map +1 -0
- package/dist/internal/docs-elements.d.ts +8 -0
- package/dist/internal/docs-elements.d.ts.map +1 -0
- package/dist/internal/docs-elements.js +12 -0
- package/dist/internal/docs-elements.js.map +1 -0
- package/dist/internal/icon-path.d.ts.map +1 -1
- package/dist/internal/icon-path.js +5 -16
- package/dist/internal/icon-path.js.map +1 -1
- package/dist/internal/source-imports.d.ts.map +1 -1
- package/dist/internal/source-imports.js +10 -42
- package/dist/internal/source-imports.js.map +1 -1
- package/dist/mcp/client-config.d.ts +22 -0
- package/dist/mcp/client-config.d.ts.map +1 -0
- package/dist/mcp/client-config.js +94 -0
- package/dist/mcp/client-config.js.map +1 -0
- package/dist/settings/render.d.ts +0 -1
- package/dist/settings/render.d.ts.map +1 -1
- package/dist/settings/render.js +1 -11
- package/dist/settings/render.js.map +1 -1
- package/dist/settings/schema.d.ts +2 -2
- package/dist/settings/schema.d.ts.map +1 -1
- package/dist/settings/schema.js +21 -62
- package/dist/settings/schema.js.map +1 -1
- package/dist/vite-plugins/asset-imports.d.ts +1 -2
- package/dist/vite-plugins/asset-imports.d.ts.map +1 -1
- package/dist/vite-plugins/asset-imports.js +19 -32
- package/dist/vite-plugins/asset-imports.js.map +1 -1
- package/dist/vite-plugins/asset-specifier.d.ts +1 -3
- package/dist/vite-plugins/asset-specifier.d.ts.map +1 -1
- package/dist/vite-plugins/asset-specifier.js +1 -4
- package/dist/vite-plugins/asset-specifier.js.map +1 -1
- package/dist/vite-plugins/i18n.d.ts.map +1 -1
- package/dist/vite-plugins/i18n.js +2 -1
- package/dist/vite-plugins/i18n.js.map +1 -1
- package/dist/vite-plugins/index.js +2 -2
- package/dist/vite-plugins/index.js.map +1 -1
- package/dist/vite-plugins/resources.d.ts.map +1 -1
- package/dist/vite-plugins/resources.js +31 -96
- package/dist/vite-plugins/resources.js.map +1 -1
- package/dist/vite-plugins/settings-worker-env.d.ts.map +1 -1
- package/dist/vite-plugins/settings-worker-env.js +1 -3
- package/dist/vite-plugins/settings-worker-env.js.map +1 -1
- package/dist/vite-plugins/settings.d.ts +1 -2
- package/dist/vite-plugins/settings.d.ts.map +1 -1
- package/dist/vite-plugins/settings.js +8 -13
- package/dist/vite-plugins/settings.js.map +1 -1
- package/dist/vite-plugins/undeclared-library.d.ts.map +1 -1
- package/dist/vite-plugins/undeclared-library.js +10 -13
- package/dist/vite-plugins/undeclared-library.js.map +1 -1
- package/dist/vite-plugins/worker.d.ts.map +1 -1
- package/dist/vite-plugins/worker.js +0 -1
- package/dist/vite-plugins/worker.js.map +1 -1
- package/package.json +21 -14
- package/src/cli.ts +5 -0
- package/src/codegen/freshness.ts +66 -16
- package/src/codegen/reference.ts +52 -0
- package/src/codegen/report.ts +16 -17
- package/src/codegen/run-codegen.ts +31 -91
- package/src/codegen/store-resolver.ts +8 -24
- package/src/commands/docs.ts +6 -36
- package/src/commands/mcp.ts +81 -0
- package/src/deploy/freedesktop/copyright.ts +2 -14
- package/src/deploy/freedesktop/xml.ts +24 -32
- package/src/deploy/node-runtime/license.ts +2 -8
- package/src/deploy/notices/gtkx.ts +1 -1
- package/src/deploy/notices/libraries.ts +2 -1
- package/src/deploy/notices/packages.ts +3 -11
- package/src/deploy/payload/copy-tree.ts +3 -4
- package/src/deploy/payload/stage.ts +2 -6
- package/src/deploy/settings/build-manifest.ts +4 -16
- package/src/deploy/settings/libraries.ts +1 -25
- package/src/deploy/settings/paths.ts +6 -16
- package/src/deploy/settings/screenshots.ts +8 -46
- package/src/deploy/targets/flatpak-pnpm.ts +4 -4
- package/src/deploy/targets/flatpak-source.ts +4 -4
- package/src/deploy/targets/flatpak-sources.ts +1 -1
- package/src/deploy/tools.ts +1 -3
- package/src/dev/runner-main.ts +1 -1
- package/src/dev/schema-dir.ts +2 -4
- package/src/i18n/catalogs.ts +2 -1
- package/src/i18n/metadata-templates.ts +2 -1
- package/src/i18n/source-messages.ts +77 -115
- package/src/i18n/types.ts +97 -131
- package/src/internal/agent-rules.ts +135 -0
- package/src/internal/docs-elements.ts +21 -0
- package/src/internal/icon-path.ts +6 -19
- package/src/internal/source-imports.ts +14 -50
- package/src/mcp/client-config.ts +130 -0
- package/src/settings/render.ts +1 -13
- package/src/settings/schema.ts +19 -81
- package/src/vite-plugins/asset-imports.ts +20 -44
- package/src/vite-plugins/asset-specifier.ts +0 -5
- package/src/vite-plugins/i18n.ts +2 -1
- package/src/vite-plugins/index.ts +2 -2
- package/src/vite-plugins/resources.ts +36 -139
- package/src/vite-plugins/settings-worker-env.ts +1 -3
- package/src/vite-plugins/settings.ts +11 -19
- package/src/vite-plugins/undeclared-library.ts +14 -20
- package/src/vite-plugins/worker.ts +0 -1
- package/dist/i18n/binding-extractor.d.ts +0 -30
- package/dist/i18n/binding-extractor.d.ts.map +0 -1
- package/dist/i18n/binding-extractor.js +0 -1324
- package/dist/i18n/binding-extractor.js.map +0 -1
- package/dist/i18n/extractor-plugin.d.ts +0 -8
- package/dist/i18n/extractor-plugin.d.ts.map +0 -1
- package/dist/i18n/extractor-plugin.js +0 -247
- package/dist/i18n/extractor-plugin.js.map +0 -1
- package/dist/internal/data-dir.d.ts +0 -4
- package/dist/internal/data-dir.d.ts.map +0 -1
- package/dist/internal/data-dir.js +0 -52
- package/dist/internal/data-dir.js.map +0 -1
- package/src/i18n/binding-extractor.ts +0 -1969
- package/src/i18n/extractor-plugin.ts +0 -413
- package/src/internal/data-dir.ts +0 -70
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { ModuleNode, Plugin, ResolvedConfig, UserConfig, ViteDevServer } from "vite";
|
|
1
|
+
import type { ModuleNode, Plugin, ResolvedConfig, ViteDevServer } from "vite";
|
|
3
2
|
import { error, errorMessage, info, sortStrings } from "@gtkx/utils";
|
|
4
3
|
import { readFileSync } from "node:fs";
|
|
5
4
|
import { basename, join } from "node:path";
|
|
6
5
|
import type { BuildManifestCollector } from "../internal/build-manifest.js";
|
|
7
6
|
import type { AssetEmitter } from "./asset-emitter.js";
|
|
8
7
|
import { prependBanner } from "../internal/banner.js";
|
|
9
|
-
import { resolveDataDir } from "../internal/data-dir.js";
|
|
10
8
|
import { createRetainedStagingDir, type RetainedStagingDir, withStagingDir } from "../internal/staging-dir.js";
|
|
11
9
|
import { compileSchemas } from "../settings/compile.js";
|
|
12
10
|
import { parseSchemaXml, SchemaParseError } from "../settings/parser.js";
|
|
@@ -24,8 +22,6 @@ import { createVirtualNamespace } from "./virtual-module.js";
|
|
|
24
22
|
type PluginState = {
|
|
25
23
|
schemaDir: RetainedStagingDir;
|
|
26
24
|
rootDir: string | null;
|
|
27
|
-
dataDir: string | null;
|
|
28
|
-
isV2ResourceImports: boolean;
|
|
29
25
|
isBuild: boolean;
|
|
30
26
|
schemaEnvTimer: ReturnType<typeof setTimeout> | null;
|
|
31
27
|
trackedSchemas: Map<string, string>;
|
|
@@ -80,7 +76,7 @@ const syncSchemaEnv = (state: PluginState): void => {
|
|
|
80
76
|
}
|
|
81
77
|
|
|
82
78
|
try {
|
|
83
|
-
emitSchemaEnv(state.rootDir
|
|
79
|
+
emitSchemaEnv(state.rootDir);
|
|
84
80
|
} catch (error_) {
|
|
85
81
|
error(`Failed to generate GSettings schema types: ${errorMessage(error_)}`);
|
|
86
82
|
}
|
|
@@ -104,12 +100,6 @@ const scheduleSchemaEnvSync = (state: PluginState): void => {
|
|
|
104
100
|
}, SCHEMA_ENV_DEBOUNCE_MS);
|
|
105
101
|
};
|
|
106
102
|
|
|
107
|
-
const applyUserConfig = async (state: PluginState, config: UserConfig, loadConfig: ConfigLoader): Promise<void> => {
|
|
108
|
-
const loaded = await loadConfig.load(config.root ?? process.cwd());
|
|
109
|
-
state.isV2ResourceImports = loaded.config.future?.v2ResourceImports === true;
|
|
110
|
-
state.dataDir = state.isV2ResourceImports ? null : resolveDataDir(loaded.root);
|
|
111
|
-
};
|
|
112
|
-
|
|
113
103
|
const applyResolvedConfig = (state: PluginState, config: ResolvedConfig): void => {
|
|
114
104
|
state.isBuild = config.command === "build";
|
|
115
105
|
state.rootDir = typeof config.root === "string" ? config.root : null;
|
|
@@ -172,6 +162,12 @@ const compileBuildSchemas = (schemaFiles: string[]): Buffer =>
|
|
|
172
162
|
return readFileSync(join(dir, "gschemas.compiled"));
|
|
173
163
|
});
|
|
174
164
|
|
|
165
|
+
const rejectLegacySchemaSpecifier = (source: string): void => {
|
|
166
|
+
if (source.startsWith("#data/")) {
|
|
167
|
+
throw new Error(`${JSON.stringify(source)} uses the legacy #data schema form`);
|
|
168
|
+
}
|
|
169
|
+
};
|
|
170
|
+
|
|
175
171
|
const buildSchemaPaths = (rootDir: string, schemaFiles: string[]): string[] =>
|
|
176
172
|
schemaFiles.map((filePath) => {
|
|
177
173
|
const rel = projectRelativeSchemaPath(rootDir, filePath);
|
|
@@ -261,12 +257,10 @@ const watchSchemaFiles = (state: PluginState, server: ViteDevServer): void => {
|
|
|
261
257
|
server.watcher.on("unlink", refreshSchemaTypes);
|
|
262
258
|
};
|
|
263
259
|
|
|
264
|
-
function gtkxSettings(
|
|
260
|
+
function gtkxSettings(buildManifest?: BuildManifestCollector): Plugin {
|
|
265
261
|
const state: PluginState = {
|
|
266
262
|
schemaDir: createRetainedStagingDir(SCHEMA_STAGING_PREFIX),
|
|
267
263
|
rootDir: null,
|
|
268
|
-
dataDir: null,
|
|
269
|
-
isV2ResourceImports: false,
|
|
270
264
|
isBuild: false,
|
|
271
265
|
schemaEnvTimer: null,
|
|
272
266
|
trackedSchemas: new Map(),
|
|
@@ -277,10 +271,6 @@ function gtkxSettings(loadConfig: ConfigLoader, buildManifest?: BuildManifestCol
|
|
|
277
271
|
name: "gtkx:settings",
|
|
278
272
|
enforce: "pre",
|
|
279
273
|
|
|
280
|
-
async config(config: UserConfig) {
|
|
281
|
-
await applyUserConfig(state, config, loadConfig);
|
|
282
|
-
},
|
|
283
|
-
|
|
284
274
|
configResolved(config) {
|
|
285
275
|
applyResolvedConfig(state, config);
|
|
286
276
|
},
|
|
@@ -302,6 +292,8 @@ function gtkxSettings(loadConfig: ConfigLoader, buildManifest?: BuildManifestCol
|
|
|
302
292
|
return;
|
|
303
293
|
}
|
|
304
294
|
|
|
295
|
+
rejectLegacySchemaSpecifier(source);
|
|
296
|
+
|
|
305
297
|
return resolveToVirtual(this, { source, importer, options });
|
|
306
298
|
},
|
|
307
299
|
|
|
@@ -15,11 +15,12 @@ type PluginState = {
|
|
|
15
15
|
type GeneratedModule = {
|
|
16
16
|
source: string;
|
|
17
17
|
kind: string;
|
|
18
|
-
namespace: string
|
|
18
|
+
namespace: string;
|
|
19
19
|
importer: string;
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
const GENERATED_MODULE_PATTERN = /^@gtkx\/(gi|jsx)\/([a-z0-9]+)$/;
|
|
23
|
+
const DEFAULT_LIBRARY_NAMESPACES: Set<string> = new Set(["gtk", "adw"]);
|
|
23
24
|
|
|
24
25
|
const girSearchPaths = async (state: PluginState): Promise<string[]> => {
|
|
25
26
|
if (state.girPath === null) {
|
|
@@ -36,10 +37,6 @@ const findGirIdentifier = (girPath: string[], namespace: string): string | undef
|
|
|
36
37
|
discoverGirNamespaces(girPath).find((identifier) => getNamespace(identifier) === namespace);
|
|
37
38
|
|
|
38
39
|
const parseGeneratedModule = (source: string, importer: string | undefined): GeneratedModule | null => {
|
|
39
|
-
if (source === "@gtkx/jsx") {
|
|
40
|
-
return { source, kind: "jsx", namespace: null, importer: importer ?? "the project's sources" };
|
|
41
|
-
}
|
|
42
|
-
|
|
43
40
|
const matched = GENERATED_MODULE_PATTERN.exec(source);
|
|
44
41
|
const kind = matched?.[1];
|
|
45
42
|
const namespace = matched?.[2];
|
|
@@ -74,7 +71,7 @@ const hasStoreModule = (storeDir: string, exportKey: string): boolean => {
|
|
|
74
71
|
};
|
|
75
72
|
|
|
76
73
|
const unreachableStoreError = (generated: GeneratedModule, options: StoreOptions): Error => {
|
|
77
|
-
const provided =
|
|
74
|
+
const provided = `"${generated.namespace}"`;
|
|
78
75
|
|
|
79
76
|
return new Error(
|
|
80
77
|
`Cannot resolve "${generated.source}": the generated store in ${options.storeDir} does provide ` +
|
|
@@ -84,21 +81,22 @@ const unreachableStoreError = (generated: GeneratedModule, options: StoreOptions
|
|
|
84
81
|
);
|
|
85
82
|
};
|
|
86
83
|
|
|
87
|
-
const missingIndexError = (generated: GeneratedModule): Error =>
|
|
88
|
-
new Error(
|
|
89
|
-
`Cannot resolve "${generated.source}": the binding store has no index module. ` +
|
|
90
|
-
"Run gtkx codegen to regenerate the store.",
|
|
91
|
-
);
|
|
92
|
-
|
|
93
84
|
const undeclaredLibraryError = (source: string, namespace: string, girPath: string[]): Error => {
|
|
94
85
|
const identifier = findGirIdentifier(girPath, namespace);
|
|
95
86
|
|
|
96
87
|
if (identifier === undefined) {
|
|
97
88
|
return new Error(
|
|
98
89
|
`Cannot resolve "${source}": the binding store has no "${namespace}" module, and no ` +
|
|
99
|
-
`GIR data for it was found in [${girPath.join(", ")}]. If "${namespace}" is a library, ` +
|
|
100
|
-
"
|
|
101
|
-
"gtkx.config.ts. Otherwise run gtkx codegen to regenerate the store.",
|
|
90
|
+
`GIR data for it was found in [${girPath.join(", ")}]. If "${namespace}" is a library, install ` +
|
|
91
|
+
"its gobject-introspection data package. Gtk-4.0 and Adw-1 are bound by default; add only other " +
|
|
92
|
+
"GIR identifiers to `libraries` in gtkx.config.ts. Otherwise run gtkx codegen to regenerate the store.",
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
if (DEFAULT_LIBRARY_NAMESPACES.has(namespace)) {
|
|
97
|
+
return new Error(
|
|
98
|
+
`Cannot resolve "${source}": the "${identifier}" bindings have not been generated. ` +
|
|
99
|
+
"The Gtk and Adwaita namespaces are bound by default; run gtkx dev or gtkx build again.",
|
|
102
100
|
);
|
|
103
101
|
}
|
|
104
102
|
|
|
@@ -110,16 +108,12 @@ const undeclaredLibraryError = (source: string, namespace: string, girPath: stri
|
|
|
110
108
|
|
|
111
109
|
const unresolvedModuleError = async (state: PluginState, generated: GeneratedModule): Promise<Error> => {
|
|
112
110
|
const options = getStoreOptions(state.root, generated.kind);
|
|
113
|
-
const exportKey =
|
|
111
|
+
const exportKey = `./${generated.namespace}`;
|
|
114
112
|
|
|
115
113
|
if (options !== null && hasStoreModule(options.storeDir, exportKey)) {
|
|
116
114
|
return unreachableStoreError(generated, options);
|
|
117
115
|
}
|
|
118
116
|
|
|
119
|
-
if (generated.namespace === null) {
|
|
120
|
-
return missingIndexError(generated);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
117
|
return undeclaredLibraryError(generated.source, generated.namespace, await girSearchPaths(state));
|
|
124
118
|
};
|
|
125
119
|
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
type ScopeInfo = {
|
|
2
|
-
defaultNs?: string;
|
|
3
|
-
keyPrefix?: string;
|
|
4
|
-
namespaces?: string[];
|
|
5
|
-
};
|
|
6
|
-
type ExtractedCall = {
|
|
7
|
-
info: ScopeInfo;
|
|
8
|
-
key: string;
|
|
9
|
-
};
|
|
10
|
-
type ExtractedMessage = {
|
|
11
|
-
defaultValue: string;
|
|
12
|
-
explicitDefault: boolean;
|
|
13
|
-
key: string;
|
|
14
|
-
location: {
|
|
15
|
-
column?: number;
|
|
16
|
-
file: string;
|
|
17
|
-
line?: number;
|
|
18
|
-
};
|
|
19
|
-
ns?: string;
|
|
20
|
-
};
|
|
21
|
-
type BindingExtraction = {
|
|
22
|
-
blockedGetFixedT: Set<string>;
|
|
23
|
-
calls: Map<string, ExtractedCall>;
|
|
24
|
-
errors: string[];
|
|
25
|
-
messages: ExtractedMessage[];
|
|
26
|
-
trans: Map<string, ScopeInfo | null>;
|
|
27
|
-
};
|
|
28
|
-
declare const extractBindings: (code: string, path: string) => Promise<BindingExtraction>;
|
|
29
|
-
export { type BindingExtraction, type ScopeInfo, extractBindings };
|
|
30
|
-
//# sourceMappingURL=binding-extractor.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"binding-extractor.d.ts","sourceRoot":"","sources":["../../src/i18n/binding-extractor.ts"],"names":[],"mappings":"AAgBA,KAAK,SAAS,GAAG;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB,CAAC;AAiBF,KAAK,aAAa,GAAG;IACjB,IAAI,EAAE,SAAS,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,KAAK,gBAAgB,GAAG;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,OAAO,CAAC;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE;QACN,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,EAAE,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,KAAK,iBAAiB,GAAG;IACrB,gBAAgB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC9B,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IAClC,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,gBAAgB,EAAE,CAAC;IAC7B,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAAC,CAAC;CACxC,CAAC;AAslBF,QAAA,MAAM,eAAe,GAAU,MAAM,MAAM,EAAE,MAAM,MAAM,KAAG,OAAO,CAAC,iBAAiB,CA6BpF,CAAC;AAiwCF,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,SAAS,EAAE,eAAe,EAAE,CAAC"}
|