@intlayer/sync-json-plugin 9.7.0 → 9.7.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/dist/cjs/index.cjs +4 -4
- package/dist/cjs/jsonCodec.cjs +1 -2
- package/dist/cjs/loadJSON.cjs +2 -3
- package/dist/cjs/syncJSON.cjs +3 -4
- package/dist/esm/jsonCodec.mjs +1 -2
- package/dist/esm/loadJSON.mjs +1 -2
- package/dist/esm/syncJSON.mjs +1 -2
- package/dist/types/jsonCodec.d.ts +0 -2
- package/dist/types/jsonCodec.d.ts.map +1 -1
- package/dist/types/loadJSON.d.ts +0 -2
- package/dist/types/loadJSON.d.ts.map +1 -1
- package/dist/types/syncJSON.d.ts +0 -2
- package/dist/types/syncJSON.d.ts.map +1 -1
- package/package.json +7 -7
package/dist/cjs/index.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_jsonCodec = require(
|
|
3
|
-
const require_loadJSON = require(
|
|
4
|
-
const require_syncJSON = require(
|
|
2
|
+
const require_jsonCodec = require("./jsonCodec.cjs");
|
|
3
|
+
const require_loadJSON = require("./loadJSON.cjs");
|
|
4
|
+
const require_syncJSON = require("./syncJSON.cjs");
|
|
5
5
|
let _intlayer_engine_syncPluginKit = require("@intlayer/engine/syncPluginKit");
|
|
6
6
|
|
|
7
|
-
Object.defineProperty(exports,
|
|
7
|
+
Object.defineProperty(exports, "extractKeyAndLocaleFromPath", {
|
|
8
8
|
enumerable: true,
|
|
9
9
|
get: function () {
|
|
10
10
|
return _intlayer_engine_syncPluginKit.extractKeyAndLocaleFromPath;
|
package/dist/cjs/jsonCodec.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
let _intlayer_config_file = require("@intlayer/config/file");
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/jsonCodec.ts
|
|
5
5
|
/**
|
|
6
6
|
* JSON payload codec: standard JSON parsing, pretty-printed serialization
|
|
7
7
|
* (2-space indentation, trailing newline).
|
|
@@ -17,7 +17,6 @@ const jsonCodec = {
|
|
|
17
17
|
*/
|
|
18
18
|
const readJSONEntry = async (absoluteFilePath) => await (0, _intlayer_config_file.loadExternalFile)(absoluteFilePath, { logError: false });
|
|
19
19
|
|
|
20
|
-
//#endregion
|
|
21
20
|
exports.jsonCodec = jsonCodec;
|
|
22
21
|
exports.readJSONEntry = readJSONEntry;
|
|
23
22
|
//# sourceMappingURL=jsonCodec.cjs.map
|
package/dist/cjs/loadJSON.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_jsonCodec = require(
|
|
2
|
+
const require_jsonCodec = require("./jsonCodec.cjs");
|
|
3
3
|
let _intlayer_engine_syncPluginKit = require("@intlayer/engine/syncPluginKit");
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/loadJSON.ts
|
|
6
6
|
/**
|
|
7
7
|
* Read-only JSON ingestion plugin: loads JSON message files as dictionaries
|
|
8
8
|
* without ever writing back to them.
|
|
@@ -23,6 +23,5 @@ const loadJSON = (options) => (0, _intlayer_engine_syncPluginKit.createSyncPlugi
|
|
|
23
23
|
localeOverride: options.locale
|
|
24
24
|
});
|
|
25
25
|
|
|
26
|
-
//#endregion
|
|
27
26
|
exports.loadJSON = loadJSON;
|
|
28
27
|
//# sourceMappingURL=loadJSON.cjs.map
|
package/dist/cjs/syncJSON.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_jsonCodec = require(
|
|
2
|
+
const require_jsonCodec = require("./jsonCodec.cjs");
|
|
3
3
|
let _intlayer_engine_syncPluginKit = require("@intlayer/engine/syncPluginKit");
|
|
4
4
|
let _intlayer_config_utils = require("@intlayer/config/utils");
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/syncJSON.ts
|
|
7
7
|
/**
|
|
8
8
|
* Two-way JSON synchronization plugin: ingests JSON message files as
|
|
9
9
|
* dictionaries and writes the merged build output back to the same files.
|
|
@@ -26,8 +26,7 @@ const syncJSON = async (options) => {
|
|
|
26
26
|
});
|
|
27
27
|
};
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
Object.defineProperty(exports, 'extractKeyAndLocaleFromPath', {
|
|
29
|
+
Object.defineProperty(exports, "extractKeyAndLocaleFromPath", {
|
|
31
30
|
enumerable: true,
|
|
32
31
|
get: function () {
|
|
33
32
|
return _intlayer_engine_syncPluginKit.extractKeyAndLocaleFromPath;
|
package/dist/esm/jsonCodec.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { loadExternalFile } from "@intlayer/config/file";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/jsonCodec.ts
|
|
4
4
|
/**
|
|
5
5
|
* JSON payload codec: standard JSON parsing, pretty-printed serialization
|
|
6
6
|
* (2-space indentation, trailing newline).
|
|
@@ -16,6 +16,5 @@ const jsonCodec = {
|
|
|
16
16
|
*/
|
|
17
17
|
const readJSONEntry = async (absoluteFilePath) => await loadExternalFile(absoluteFilePath, { logError: false });
|
|
18
18
|
|
|
19
|
-
//#endregion
|
|
20
19
|
export { jsonCodec, readJSONEntry };
|
|
21
20
|
//# sourceMappingURL=jsonCodec.mjs.map
|
package/dist/esm/loadJSON.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsonCodec, readJSONEntry } from "./jsonCodec.mjs";
|
|
2
2
|
import { createFileAdapter, createSyncPlugin } from "@intlayer/engine/syncPluginKit";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/loadJSON.ts
|
|
5
5
|
/**
|
|
6
6
|
* Read-only JSON ingestion plugin: loads JSON message files as dictionaries
|
|
7
7
|
* without ever writing back to them.
|
|
@@ -22,6 +22,5 @@ const loadJSON = (options) => createSyncPlugin({
|
|
|
22
22
|
localeOverride: options.locale
|
|
23
23
|
});
|
|
24
24
|
|
|
25
|
-
//#endregion
|
|
26
25
|
export { loadJSON };
|
|
27
26
|
//# sourceMappingURL=loadJSON.mjs.map
|
package/dist/esm/syncJSON.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { jsonCodec, readJSONEntry } from "./jsonCodec.mjs";
|
|
|
2
2
|
import { buildFilePathPatternContext, createFileAdapter, createSyncPlugin, extractKeyAndLocaleFromPath } from "@intlayer/engine/syncPluginKit";
|
|
3
3
|
import { parseFilePathPattern } from "@intlayer/config/utils";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/syncJSON.ts
|
|
6
6
|
/**
|
|
7
7
|
* Two-way JSON synchronization plugin: ingests JSON message files as
|
|
8
8
|
* dictionaries and writes the merged build output back to the same files.
|
|
@@ -25,6 +25,5 @@ const syncJSON = async (options) => {
|
|
|
25
25
|
});
|
|
26
26
|
};
|
|
27
27
|
|
|
28
|
-
//#endregion
|
|
29
28
|
export { extractKeyAndLocaleFromPath, syncJSON };
|
|
30
29
|
//# sourceMappingURL=syncJSON.mjs.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { FormatCodec, SyncContent } from "@intlayer/engine/syncPluginKit";
|
|
2
|
-
//#region src/jsonCodec.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* JSON payload codec: standard JSON parsing, pretty-printed serialization
|
|
5
4
|
* (2-space indentation, trailing newline).
|
|
@@ -11,5 +10,4 @@ export declare const jsonCodec: FormatCodec;
|
|
|
11
10
|
* unreadable files so callers fall back to empty content.
|
|
12
11
|
*/
|
|
13
12
|
export declare const readJSONEntry: (absoluteFilePath: string) => Promise<SyncContent | undefined>;
|
|
14
|
-
//#endregion
|
|
15
13
|
//# sourceMappingURL=jsonCodec.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsonCodec.d.ts","names":[],"sources":["../../src/jsonCodec.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"jsonCodec.d.ts","names":[],"sources":["../../src/jsonCodec.ts"],"mappings":";;;;;qBAOa,WAAW;;;;;;qBAUX,gBAAa,6BAEvB,QAAQ"}
|
package/dist/types/loadJSON.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ import { Locale } from "@intlayer/types/allLocales";
|
|
|
3
3
|
import { DictionaryFormat } from "@intlayer/types/dictionary";
|
|
4
4
|
import { FilePathPattern } from "@intlayer/types/filePathPattern";
|
|
5
5
|
import { Plugin } from "@intlayer/types/plugin";
|
|
6
|
-
//#region src/loadJSON.d.ts
|
|
7
6
|
export type LoadJSONPluginOptions = {
|
|
8
7
|
/**
|
|
9
8
|
* The source of the plugin.
|
|
@@ -93,5 +92,4 @@ export type LoadJSONPluginOptions = {
|
|
|
93
92
|
* without ever writing back to them.
|
|
94
93
|
*/
|
|
95
94
|
export declare const loadJSON: (options: LoadJSONPluginOptions) => Plugin;
|
|
96
|
-
//#endregion
|
|
97
95
|
//# sourceMappingURL=loadJSON.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loadJSON.d.ts","names":[],"sources":["../../src/loadJSON.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"loadJSON.d.ts","names":[],"sources":["../../src/loadJSON.ts"],"mappings":";;;;;YAWY;;;;;;;;;;;;EAYV,QAAQ;;;;;;;;;;;;;;EAeR,SAAS;;;;;;;;;;;;;;;;;;;;;;;EAwBT;;;;;;;;;EAUA;;;;;;;;;;;EAYA,SAAS;;;;;;;;;;;;;EAcT,YAAY;;;;;;qBAOD,WAAQ,SAAa,0BAAwB"}
|
package/dist/types/syncJSON.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ import { SplitKeysMode, extractKeyAndLocaleFromPath } from "@intlayer/engine/syn
|
|
|
2
2
|
import { DictionaryFormat, DictionaryLocation } from "@intlayer/types/dictionary";
|
|
3
3
|
import { FilePathPattern } from "@intlayer/types/filePathPattern";
|
|
4
4
|
import { Plugin } from "@intlayer/types/plugin";
|
|
5
|
-
//#region src/syncJSON.d.ts
|
|
6
5
|
export type SyncJSONPluginOptions = {
|
|
7
6
|
/**
|
|
8
7
|
* The source of the plugin.
|
|
@@ -100,6 +99,5 @@ export type SyncJSONPluginOptions = {
|
|
|
100
99
|
* dictionaries and writes the merged build output back to the same files.
|
|
101
100
|
*/
|
|
102
101
|
export declare const syncJSON: (options: SyncJSONPluginOptions) => Promise<Plugin>;
|
|
103
|
-
//#endregion
|
|
104
102
|
export { extractKeyAndLocaleFromPath };
|
|
105
103
|
//# sourceMappingURL=syncJSON.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"syncJSON.d.ts","names":[],"sources":["../../src/syncJSON.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"syncJSON.d.ts","names":[],"sources":["../../src/syncJSON.ts"],"mappings":";;;;YAkBY;;;;;;;;;;;EAWV,QAAQ;;;;;;;;;;;;;;;;;;;;;;;EAwBR,WAAW;;;;;;;;;EAUX;;;;;;;;EASA,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwCT,YAAY;;;;;;qBAOD,WAAQ,SACV,0BACR,QAAQ"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intlayer/sync-json-plugin",
|
|
3
|
-
"version": "9.7.
|
|
3
|
+
"version": "9.7.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A plugin for Intlayer that syncs JSON files to dictionaries.",
|
|
6
6
|
"keywords": [
|
|
@@ -72,10 +72,10 @@
|
|
|
72
72
|
"typecheck": "tsc --noEmit --project tsconfig.types.json"
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
|
-
"@intlayer/config": "9.
|
|
76
|
-
"@intlayer/core": "9.7.
|
|
77
|
-
"@intlayer/engine": "9.7.
|
|
78
|
-
"@intlayer/types": "9.7.
|
|
75
|
+
"@intlayer/config": "9.7.1",
|
|
76
|
+
"@intlayer/core": "9.7.1",
|
|
77
|
+
"@intlayer/engine": "9.7.1",
|
|
78
|
+
"@intlayer/types": "9.7.1",
|
|
79
79
|
"fast-glob": "3.3.3"
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
|
@@ -84,9 +84,9 @@
|
|
|
84
84
|
"@utils/ts-config-types": "1.0.4",
|
|
85
85
|
"@utils/tsdown-config": "1.0.4",
|
|
86
86
|
"rimraf": "6.1.3",
|
|
87
|
-
"tsdown": "0.23.
|
|
87
|
+
"tsdown": "0.23.4",
|
|
88
88
|
"typescript": "7.0.2",
|
|
89
|
-
"vitest": "5.0
|
|
89
|
+
"vitest": "5.1.0"
|
|
90
90
|
},
|
|
91
91
|
"engines": {
|
|
92
92
|
"node": ">=14.18"
|