@intlayer/sync-po-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/loadPO.cjs +2 -3
- package/dist/cjs/poFormat.cjs +1 -2
- package/dist/cjs/syncPO.cjs +3 -4
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/loadPO.mjs +1 -2
- package/dist/esm/poFormat.mjs +1 -2
- package/dist/esm/syncPO.mjs +1 -2
- package/dist/types/loadPO.d.ts +0 -2
- package/dist/types/loadPO.d.ts.map +1 -1
- package/dist/types/poFormat.d.ts +0 -2
- package/dist/types/poFormat.d.ts.map +1 -1
- package/dist/types/syncPO.d.ts +0 -2
- package/dist/types/syncPO.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
|
|
3
|
-
const
|
|
4
|
-
const require_syncPO = require(
|
|
2
|
+
const require_loadPO = require("./loadPO.cjs");
|
|
3
|
+
const require_poFormat = require("./poFormat.cjs");
|
|
4
|
+
const require_syncPO = require("./syncPO.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/loadPO.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_poFormat = require(
|
|
2
|
+
const require_poFormat = require("./poFormat.cjs");
|
|
3
3
|
let _intlayer_engine_syncPluginKit = require("@intlayer/engine/syncPluginKit");
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/loadPO.ts
|
|
6
6
|
/**
|
|
7
7
|
* Read-only PO ingestion plugin: loads gettext PO files as dictionaries
|
|
8
8
|
* without ever writing back to them.
|
|
@@ -22,6 +22,5 @@ const loadPO = (options) => (0, _intlayer_engine_syncPluginKit.createSyncPlugin)
|
|
|
22
22
|
localeOverride: options.locale
|
|
23
23
|
});
|
|
24
24
|
|
|
25
|
-
//#endregion
|
|
26
25
|
exports.loadPO = loadPO;
|
|
27
26
|
//# sourceMappingURL=loadPO.cjs.map
|
package/dist/cjs/poFormat.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
|
|
2
|
+
// src/poFormat.ts
|
|
3
3
|
const unescapePO = (str) => str.replace(/\\n/g, "\n").replace(/\\t/g, " ").replace(/\\r/g, "\r").replace(/\\"/g, "\"").replace(/\\\\/g, "\\");
|
|
4
4
|
const escapePO = (str) => str.replace(/\\/g, "\\\\").replace(/"/g, "\\\"").replace(/\n/g, "\\n").replace(/\t/g, "\\t").replace(/\r/g, "\\r");
|
|
5
5
|
/**
|
|
@@ -78,7 +78,6 @@ const poCodec = {
|
|
|
78
78
|
serialize: (content, { locale }) => serializePO(content, locale)
|
|
79
79
|
};
|
|
80
80
|
|
|
81
|
-
//#endregion
|
|
82
81
|
exports.parsePO = parsePO;
|
|
83
82
|
exports.poCodec = poCodec;
|
|
84
83
|
exports.serializePO = serializePO;
|
package/dist/cjs/syncPO.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_poFormat = require(
|
|
2
|
+
const require_poFormat = require("./poFormat.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/syncPO.ts
|
|
7
7
|
/**
|
|
8
8
|
* Two-way PO synchronization plugin: ingests gettext PO files as dictionaries
|
|
9
9
|
* and writes the merged build output back to the same files.
|
|
@@ -25,8 +25,7 @@ const syncPO = async (options) => {
|
|
|
25
25
|
});
|
|
26
26
|
};
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
Object.defineProperty(exports, 'extractKeyAndLocaleFromPath', {
|
|
28
|
+
Object.defineProperty(exports, "extractKeyAndLocaleFromPath", {
|
|
30
29
|
enumerable: true,
|
|
31
30
|
get: function () {
|
|
32
31
|
return _intlayer_engine_syncPluginKit.extractKeyAndLocaleFromPath;
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { parsePO, poCodec, serializePO } from "./poFormat.mjs";
|
|
2
1
|
import { loadPO } from "./loadPO.mjs";
|
|
2
|
+
import { parsePO, poCodec, serializePO } from "./poFormat.mjs";
|
|
3
3
|
import { extractKeyAndLocaleFromPath, syncPO } from "./syncPO.mjs";
|
|
4
4
|
|
|
5
5
|
export { extractKeyAndLocaleFromPath, loadPO, parsePO, poCodec, serializePO, syncPO };
|
package/dist/esm/loadPO.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { poCodec } from "./poFormat.mjs";
|
|
2
2
|
import { createFileAdapter, createSyncPlugin } from "@intlayer/engine/syncPluginKit";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/loadPO.ts
|
|
5
5
|
/**
|
|
6
6
|
* Read-only PO ingestion plugin: loads gettext PO files as dictionaries
|
|
7
7
|
* without ever writing back to them.
|
|
@@ -21,6 +21,5 @@ const loadPO = (options) => createSyncPlugin({
|
|
|
21
21
|
localeOverride: options.locale
|
|
22
22
|
});
|
|
23
23
|
|
|
24
|
-
//#endregion
|
|
25
24
|
export { loadPO };
|
|
26
25
|
//# sourceMappingURL=loadPO.mjs.map
|
package/dist/esm/poFormat.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/poFormat.ts
|
|
2
2
|
const unescapePO = (str) => str.replace(/\\n/g, "\n").replace(/\\t/g, " ").replace(/\\r/g, "\r").replace(/\\"/g, "\"").replace(/\\\\/g, "\\");
|
|
3
3
|
const escapePO = (str) => str.replace(/\\/g, "\\\\").replace(/"/g, "\\\"").replace(/\n/g, "\\n").replace(/\t/g, "\\t").replace(/\r/g, "\\r");
|
|
4
4
|
/**
|
|
@@ -77,6 +77,5 @@ const poCodec = {
|
|
|
77
77
|
serialize: (content, { locale }) => serializePO(content, locale)
|
|
78
78
|
};
|
|
79
79
|
|
|
80
|
-
//#endregion
|
|
81
80
|
export { parsePO, poCodec, serializePO };
|
|
82
81
|
//# sourceMappingURL=poFormat.mjs.map
|
package/dist/esm/syncPO.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { parsePO, poCodec, serializePO } from "./poFormat.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/syncPO.ts
|
|
6
6
|
/**
|
|
7
7
|
* Two-way PO synchronization plugin: ingests gettext PO files as dictionaries
|
|
8
8
|
* and writes the merged build output back to the same files.
|
|
@@ -24,6 +24,5 @@ const syncPO = async (options) => {
|
|
|
24
24
|
});
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
-
//#endregion
|
|
28
27
|
export { extractKeyAndLocaleFromPath, parsePO, serializePO, syncPO };
|
|
29
28
|
//# sourceMappingURL=syncPO.mjs.map
|
package/dist/types/loadPO.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Locale } from "@intlayer/types/allLocales";
|
|
2
2
|
import { FilePathPattern } from "@intlayer/types/filePathPattern";
|
|
3
3
|
import { Plugin } from "@intlayer/types/plugin";
|
|
4
|
-
//#region src/loadPO.d.ts
|
|
5
4
|
export type LoadPOPluginOptions = {
|
|
6
5
|
/**
|
|
7
6
|
* The source of the plugin.
|
|
@@ -62,5 +61,4 @@ export type LoadPOPluginOptions = {
|
|
|
62
61
|
* without ever writing back to them.
|
|
63
62
|
*/
|
|
64
63
|
export declare const loadPO: (options: LoadPOPluginOptions) => Plugin;
|
|
65
|
-
//#endregion
|
|
66
64
|
//# sourceMappingURL=loadPO.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loadPO.d.ts","names":[],"sources":["../../src/loadPO.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"loadPO.d.ts","names":[],"sources":["../../src/loadPO.ts"],"mappings":";;;YASY;;;;;;;;;;;;EAYV,QAAQ;;;;;;;;;;;;;;EAeR,SAAS;;;;;;;;;;;;;;;;;;;EAoBT;;;;;;;;EASA;;;;;;qBAOW,SAAM,SAAa,wBAAsB"}
|
package/dist/types/poFormat.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { FormatCodec } from "@intlayer/engine/syncPluginKit";
|
|
2
|
-
//#region src/poFormat.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* Parse a PO file string into a flat msgid → msgstr record.
|
|
5
4
|
* Skips the PO header (msgid ""), comment lines, and plural/context keywords.
|
|
@@ -15,5 +14,4 @@ export declare const serializePO: (content: Record<string, unknown>, locale?: st
|
|
|
15
14
|
* sync-plugin kit.
|
|
16
15
|
*/
|
|
17
16
|
export declare const poCodec: FormatCodec;
|
|
18
|
-
//#endregion
|
|
19
17
|
//# sourceMappingURL=poFormat.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"poFormat.d.ts","names":[],"sources":["../../src/poFormat.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"poFormat.d.ts","names":[],"sources":["../../src/poFormat.ts"],"mappings":";;;;;qBAsBa,UAAO,wBAA0B;;;;;qBAsEjC,cAAW,SACb,yBAAuB;;;;;qBA+BrB,SAAS"}
|
package/dist/types/syncPO.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ import { FilePathPattern } from "@intlayer/types/filePathPattern";
|
|
|
3
3
|
import { Plugin } from "@intlayer/types/plugin";
|
|
4
4
|
import { extractKeyAndLocaleFromPath } from "@intlayer/engine/syncPluginKit";
|
|
5
5
|
import { DictionaryLocation } from "@intlayer/types/dictionary";
|
|
6
|
-
//#region src/syncPO.d.ts
|
|
7
6
|
export type SyncPOPluginOptions = {
|
|
8
7
|
/**
|
|
9
8
|
* The source of the plugin.
|
|
@@ -49,6 +48,5 @@ export type SyncPOPluginOptions = {
|
|
|
49
48
|
* and writes the merged build output back to the same files.
|
|
50
49
|
*/
|
|
51
50
|
export declare const syncPO: (options: SyncPOPluginOptions) => Promise<Plugin>;
|
|
52
|
-
//#endregion
|
|
53
51
|
export { extractKeyAndLocaleFromPath, parsePO, serializePO };
|
|
54
52
|
//# sourceMappingURL=syncPO.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"syncPO.d.ts","names":[],"sources":["../../src/syncPO.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"syncPO.d.ts","names":[],"sources":["../../src/syncPO.ts"],"mappings":";;;;;YAeY;;;;;;;;;;;EAWV,QAAQ;;;;;;;;;;;;;;;;;;;EAoBR,WAAW;;;;;;;;EASX;;;;;;qBAOW,SAAM,SAAmB,wBAAsB,QAAQ"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intlayer/sync-po-plugin",
|
|
3
|
-
"version": "9.7.
|
|
3
|
+
"version": "9.7.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A plugin for Intlayer that syncs Portable Object (.po) files to dictionaries.",
|
|
6
6
|
"keywords": [
|
|
@@ -73,10 +73,10 @@
|
|
|
73
73
|
"typecheck": "tsc --noEmit --project tsconfig.types.json"
|
|
74
74
|
},
|
|
75
75
|
"dependencies": {
|
|
76
|
-
"@intlayer/config": "9.
|
|
77
|
-
"@intlayer/core": "9.7.
|
|
78
|
-
"@intlayer/engine": "9.7.
|
|
79
|
-
"@intlayer/types": "9.7.
|
|
76
|
+
"@intlayer/config": "9.7.1",
|
|
77
|
+
"@intlayer/core": "9.7.1",
|
|
78
|
+
"@intlayer/engine": "9.7.1",
|
|
79
|
+
"@intlayer/types": "9.7.1",
|
|
80
80
|
"fast-glob": "3.3.3"
|
|
81
81
|
},
|
|
82
82
|
"devDependencies": {
|
|
@@ -85,9 +85,9 @@
|
|
|
85
85
|
"@utils/ts-config-types": "1.0.4",
|
|
86
86
|
"@utils/tsdown-config": "1.0.4",
|
|
87
87
|
"rimraf": "6.1.3",
|
|
88
|
-
"tsdown": "0.23.
|
|
88
|
+
"tsdown": "0.23.4",
|
|
89
89
|
"typescript": "7.0.2",
|
|
90
|
-
"vitest": "5.0
|
|
90
|
+
"vitest": "5.1.0"
|
|
91
91
|
},
|
|
92
92
|
"engines": {
|
|
93
93
|
"node": ">=14.18"
|