@messagevisor/catalog 0.6.0 → 0.8.0

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/dist/index.html CHANGED
@@ -5,7 +5,7 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <link rel="icon" type="image/png" href="/favicon.png" />
7
7
  <title>Messagevisor Catalog</title>
8
- <script type="module" crossorigin src="/assets/index-DJ8oQlZp.js"></script>
8
+ <script type="module" crossorigin src="/assets/index-4rkVIXGk.js"></script>
9
9
  <link rel="stylesheet" crossorigin href="/assets/index-DrsX4U8c.css">
10
10
  </head>
11
11
  <body>
@@ -51,6 +51,22 @@ export interface CatalogDevEditor {
51
51
  label: string;
52
52
  icon: CatalogDevEditorId;
53
53
  }
54
+ interface CatalogHistoryEntity {
55
+ type: CatalogEntityType | "test";
56
+ key: string;
57
+ set?: string;
58
+ }
59
+ interface CatalogHistoryEntry {
60
+ commit: string;
61
+ author: string;
62
+ timestamp: string;
63
+ entities: CatalogHistoryEntity[];
64
+ }
65
+ interface CatalogLastModified {
66
+ commit: string;
67
+ author: string;
68
+ timestamp: string;
69
+ }
54
70
  interface CatalogEvaluatedMessageExample {
55
71
  set?: string;
56
72
  message: string;
@@ -116,6 +132,8 @@ export interface CatalogExportOptions {
116
132
  devEditors?: CatalogDevEditor[];
117
133
  withTranslationSearch?: boolean;
118
134
  withDuplicates?: boolean;
135
+ devSession?: CatalogDevSession;
136
+ preserveAssets?: boolean;
119
137
  }
120
138
  export interface CatalogServeOptions {
121
139
  outDir?: string;
@@ -127,6 +145,36 @@ export interface CatalogServerHandle {
127
145
  close: () => Promise<void>;
128
146
  triggerReload: () => void;
129
147
  }
148
+ interface CatalogDevSession {
149
+ outputDirectoryPath: string;
150
+ devEditors: CatalogDevEditor[];
151
+ historyIndex: CatalogHistoryIndex;
152
+ links: ReturnType<typeof getRepoLinks>;
153
+ repositoryRootDirectoryPath: string;
154
+ repositorySourceRootDirectoryPath: string;
155
+ }
156
+ interface CatalogDevRebuildRequest {
157
+ kind: "full" | "set" | "message";
158
+ reason: string;
159
+ set?: string;
160
+ messageKeys?: string[];
161
+ }
162
+ interface CatalogHistoryIndex {
163
+ entries: CatalogHistoryEntry[];
164
+ bySet: Record<string, CatalogHistoryEntry[]>;
165
+ byEntity: Record<string, CatalogHistoryEntry[]>;
166
+ lastModifiedByEntity: Record<string, CatalogLastModified>;
167
+ }
168
+ declare function getRepoLinks(rootDirectoryPath: string): {
169
+ provider: CatalogGitProvider;
170
+ repository: string;
171
+ source: string;
172
+ commit: string;
173
+ };
174
+ declare function classifyCatalogDevChanges(rootDirectoryPath: string, projectConfig: any, changedPaths: string[], options: {
175
+ withTranslationSearch: boolean;
176
+ withDuplicates: boolean;
177
+ }): CatalogDevRebuildRequest;
130
178
  export declare function exportCatalog(runtime: CatalogRuntime, rootDirectoryPath: string, projectConfig: any, datasource: any, options?: CatalogExportOptions): Promise<{
131
179
  outputDirectoryPath: any;
132
180
  manifest: {
@@ -160,6 +208,7 @@ export declare function exportCatalog(runtime: CatalogRuntime, rootDirectoryPath
160
208
  };
161
209
  };
162
210
  }>;
211
+ declare function getCatalogInputWatchPaths(rootDirectoryPath: string, projectConfig: any): string[];
163
212
  export declare function serveCatalog(runtime: CatalogRuntime, rootDirectoryPath: string, projectConfig: any, datasource: any, options?: CatalogServeOptions): Promise<CatalogServerHandle>;
164
213
  export declare function createCatalogApi(runtime: CatalogRuntime): {
165
214
  exportCatalog: (rootDirectoryPath: string, projectConfig: any, datasource: any, options?: CatalogExportOptions) => Promise<{
@@ -197,5 +246,9 @@ export declare function createCatalogApi(runtime: CatalogRuntime): {
197
246
  }>;
198
247
  serveCatalog: (rootDirectoryPath: string, projectConfig: any, datasource: any, options?: CatalogServeOptions) => Promise<CatalogServerHandle>;
199
248
  };
249
+ export declare const __catalogDevInternals: {
250
+ classifyCatalogDevChanges: typeof classifyCatalogDevChanges;
251
+ getCatalogInputWatchPaths: typeof getCatalogInputWatchPaths;
252
+ };
200
253
  export declare function createCatalogPlugin(runtime: CatalogRuntime, api?: ReturnType<typeof createCatalogApi>): CatalogPlugin;
201
254
  export {};