@intlayer/engine 9.0.0-canary.13 → 9.0.0-canary.15
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/createType/createModuleAugmentation.cjs +1 -1
- package/dist/cjs/createType/createModuleAugmentation.cjs.map +1 -1
- package/dist/cjs/createType/createType.cjs +2 -1
- package/dist/cjs/createType/createType.cjs.map +1 -1
- package/dist/cjs/init/index.cjs +2 -1
- package/dist/cjs/init/index.cjs.map +1 -1
- package/dist/cjs/init/utils/configManipulation.cjs +39 -5
- package/dist/cjs/init/utils/configManipulation.cjs.map +1 -1
- package/dist/cjs/init/utils/githubActions.cjs +3 -0
- package/dist/cjs/init/utils/githubActions.cjs.map +1 -1
- package/dist/cjs/init/utils/index.cjs +1 -0
- package/dist/cjs/init/utils/packageManager.cjs +8 -0
- package/dist/cjs/init/utils/packageManager.cjs.map +1 -1
- package/dist/cjs/loadDictionaries/loadContentDeclaration.cjs +2 -2
- package/dist/cjs/loadDictionaries/loadContentDeclaration.cjs.map +1 -1
- package/dist/cjs/prepareIntlayer.cjs +11 -7
- package/dist/cjs/prepareIntlayer.cjs.map +1 -1
- package/dist/cjs/syncPluginKit/createFileAdapter.cjs +119 -0
- package/dist/cjs/syncPluginKit/createFileAdapter.cjs.map +1 -0
- package/dist/cjs/syncPluginKit/createSyncPlugin.cjs +154 -0
- package/dist/cjs/syncPluginKit/createSyncPlugin.cjs.map +1 -0
- package/dist/cjs/syncPluginKit/extractKeyAndLocaleFromPath.cjs +37 -0
- package/dist/cjs/syncPluginKit/extractKeyAndLocaleFromPath.cjs.map +1 -0
- package/dist/cjs/syncPluginKit/filePathPatternHelpers.cjs +20 -0
- package/dist/cjs/syncPluginKit/filePathPatternHelpers.cjs.map +1 -0
- package/dist/cjs/syncPluginKit/index.cjs +11 -0
- package/dist/cjs/syncPluginKit/types.cjs +0 -0
- package/dist/cjs/utils/runParallel/index.cjs +2 -2
- package/dist/cjs/utils/runParallel/index.cjs.map +1 -1
- package/dist/cjs/watcher.cjs +2 -3
- package/dist/cjs/watcher.cjs.map +1 -1
- package/dist/cjs/writeFileIfChanged.cjs +41 -17
- package/dist/cjs/writeFileIfChanged.cjs.map +1 -1
- package/dist/esm/createType/createModuleAugmentation.mjs +1 -1
- package/dist/esm/createType/createModuleAugmentation.mjs.map +1 -1
- package/dist/esm/createType/createType.mjs +3 -2
- package/dist/esm/createType/createType.mjs.map +1 -1
- package/dist/esm/init/index.mjs +3 -2
- package/dist/esm/init/index.mjs.map +1 -1
- package/dist/esm/init/utils/configManipulation.mjs +39 -6
- package/dist/esm/init/utils/configManipulation.mjs.map +1 -1
- package/dist/esm/init/utils/githubActions.mjs +3 -0
- package/dist/esm/init/utils/githubActions.mjs.map +1 -1
- package/dist/esm/init/utils/index.mjs +2 -2
- package/dist/esm/init/utils/packageManager.mjs +8 -0
- package/dist/esm/init/utils/packageManager.mjs.map +1 -1
- package/dist/esm/loadDictionaries/loadContentDeclaration.mjs +2 -2
- package/dist/esm/loadDictionaries/loadContentDeclaration.mjs.map +1 -1
- package/dist/esm/prepareIntlayer.mjs +11 -7
- package/dist/esm/prepareIntlayer.mjs.map +1 -1
- package/dist/esm/syncPluginKit/createFileAdapter.mjs +115 -0
- package/dist/esm/syncPluginKit/createFileAdapter.mjs.map +1 -0
- package/dist/esm/syncPluginKit/createSyncPlugin.mjs +152 -0
- package/dist/esm/syncPluginKit/createSyncPlugin.mjs.map +1 -0
- package/dist/esm/syncPluginKit/extractKeyAndLocaleFromPath.mjs +35 -0
- package/dist/esm/syncPluginKit/extractKeyAndLocaleFromPath.mjs.map +1 -0
- package/dist/esm/syncPluginKit/filePathPatternHelpers.mjs +18 -0
- package/dist/esm/syncPluginKit/filePathPatternHelpers.mjs.map +1 -0
- package/dist/esm/syncPluginKit/index.mjs +6 -0
- package/dist/esm/syncPluginKit/types.mjs +0 -0
- package/dist/esm/utils/runParallel/index.mjs +2 -2
- package/dist/esm/utils/runParallel/index.mjs.map +1 -1
- package/dist/esm/watcher.mjs +2 -3
- package/dist/esm/watcher.mjs.map +1 -1
- package/dist/esm/writeFileIfChanged.mjs +44 -20
- package/dist/esm/writeFileIfChanged.mjs.map +1 -1
- package/dist/types/createType/createType.d.ts.map +1 -1
- package/dist/types/init/index.d.ts.map +1 -1
- package/dist/types/init/utils/configManipulation.d.ts +9 -1
- package/dist/types/init/utils/configManipulation.d.ts.map +1 -1
- package/dist/types/init/utils/githubActions.d.ts.map +1 -1
- package/dist/types/init/utils/index.d.ts +2 -2
- package/dist/types/init/utils/packageManager.d.ts.map +1 -1
- package/dist/types/syncPluginKit/createFileAdapter.d.ts +51 -0
- package/dist/types/syncPluginKit/createFileAdapter.d.ts.map +1 -0
- package/dist/types/syncPluginKit/createSyncPlugin.d.ts +18 -0
- package/dist/types/syncPluginKit/createSyncPlugin.d.ts.map +1 -0
- package/dist/types/syncPluginKit/extractKeyAndLocaleFromPath.d.ts +20 -0
- package/dist/types/syncPluginKit/extractKeyAndLocaleFromPath.d.ts.map +1 -0
- package/dist/types/syncPluginKit/filePathPatternHelpers.d.ts +16 -0
- package/dist/types/syncPluginKit/filePathPatternHelpers.d.ts.map +1 -0
- package/dist/types/syncPluginKit/index.d.ts +6 -0
- package/dist/types/syncPluginKit/types.d.ts +149 -0
- package/dist/types/syncPluginKit/types.d.ts.map +1 -0
- package/dist/types/utils/runParallel/index.d.ts +6 -1
- package/dist/types/utils/runParallel/index.d.ts.map +1 -1
- package/dist/types/watcher.d.ts.map +1 -1
- package/dist/types/writeFileIfChanged.d.ts +30 -6
- package/dist/types/writeFileIfChanged.d.ts.map +1 -1
- package/package.json +24 -8
|
@@ -1,11 +1,35 @@
|
|
|
1
1
|
//#region src/writeFileIfChanged.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Options for {@link writeFileIfChanged}.
|
|
4
|
+
*/
|
|
5
|
+
type WriteFileIfChangedOptions = {
|
|
6
|
+
/** Encoding used to turn `data` into bytes. Defaults to `'utf8'`. */encoding?: BufferEncoding; /** Directory to hold the temporary file used for the atomic swap. */
|
|
7
|
+
tempDir?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Write atomically via a temp file + `rename` so readers never observe a
|
|
10
|
+
* half-written file. This creates a fresh inode on every write, which roughly
|
|
11
|
+
* doubles the cost of a changed write compared to overwriting in place. Set to
|
|
12
|
+
* `false` for callers whose consumers tolerate torn reads to write directly.
|
|
13
|
+
* Defaults to `true`.
|
|
14
|
+
*/
|
|
15
|
+
atomic?: boolean;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Write `data` to `path` only when it differs from the file already on disk,
|
|
19
|
+
* preserving the existing file's permission mode.
|
|
20
|
+
*
|
|
21
|
+
* The whole file is read back and byte-compared because the files written here
|
|
22
|
+
* (dictionaries, entry points, types) are small, so reading beats streaming a
|
|
23
|
+
* hash. When the content is unchanged the write is skipped entirely, which both
|
|
24
|
+
* avoids inode churn and prevents downstream watchers from rebuilding.
|
|
25
|
+
*
|
|
26
|
+
* @returns `true` when the file was written, `false` when it was already up to date.
|
|
27
|
+
*/
|
|
2
28
|
declare const writeFileIfChanged: (path: string, data: string, {
|
|
3
29
|
encoding,
|
|
4
|
-
tempDir
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
tempDir?: string;
|
|
8
|
-
}) => Promise<boolean>;
|
|
30
|
+
tempDir,
|
|
31
|
+
atomic
|
|
32
|
+
}?: WriteFileIfChangedOptions) => Promise<boolean>;
|
|
9
33
|
//#endregion
|
|
10
|
-
export { writeFileIfChanged };
|
|
34
|
+
export { WriteFileIfChangedOptions, writeFileIfChanged };
|
|
11
35
|
//# sourceMappingURL=writeFileIfChanged.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"writeFileIfChanged.d.ts","names":[],"sources":["../../src/writeFileIfChanged.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"writeFileIfChanged.d.ts","names":[],"sources":["../../src/writeFileIfChanged.ts"],"mappings":";;AAoCA;;KAAY,yBAAA;EAEe,qEAAzB,QAAA,GAAW,cAAA,EAAA;EAEX,OAAA;EAQA;;;AAcF;;;;EAdE,MAAA;AAAA;;;;;;;;;;;;cAcW,kBAAA,GACX,IAAA,UACA,IAAA;EACA,QAAA;EAAA,OAAA;EAAA;AAAA,IAA+C,yBAAA,KAC9C,OAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intlayer/engine",
|
|
3
|
-
"version": "9.0.0-canary.
|
|
3
|
+
"version": "9.0.0-canary.15",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Scans and builds Intlayer declaration files into dictionaries based on Intlayer configuration.",
|
|
6
6
|
"keywords": [
|
|
@@ -50,11 +50,21 @@
|
|
|
50
50
|
"require": "./dist/cjs/cli.cjs",
|
|
51
51
|
"import": "./dist/esm/cli.mjs"
|
|
52
52
|
},
|
|
53
|
+
"./logConfigDetails": {
|
|
54
|
+
"types": "./dist/types/logConfigDetails.d.ts",
|
|
55
|
+
"require": "./dist/cjs/logConfigDetails.cjs",
|
|
56
|
+
"import": "./dist/esm/logConfigDetails.mjs"
|
|
57
|
+
},
|
|
53
58
|
"./utils": {
|
|
54
59
|
"types": "./dist/types/utils/index.d.ts",
|
|
55
60
|
"require": "./dist/cjs/utils/index.cjs",
|
|
56
61
|
"import": "./dist/esm/utils/index.mjs"
|
|
57
62
|
},
|
|
63
|
+
"./syncPluginKit": {
|
|
64
|
+
"types": "./dist/types/syncPluginKit/index.d.ts",
|
|
65
|
+
"require": "./dist/cjs/syncPluginKit/index.cjs",
|
|
66
|
+
"import": "./dist/esm/syncPluginKit/index.mjs"
|
|
67
|
+
},
|
|
58
68
|
"./listDictionaries": {
|
|
59
69
|
"types": "./dist/types/listDictionariesPath.d.ts",
|
|
60
70
|
"require": "./dist/cjs/listDictionariesPath.cjs",
|
|
@@ -86,9 +96,15 @@
|
|
|
86
96
|
"cli": [
|
|
87
97
|
"./dist/types/cli.d.ts"
|
|
88
98
|
],
|
|
99
|
+
"logConfigDetails": [
|
|
100
|
+
"./dist/types/logConfigDetails.d.ts"
|
|
101
|
+
],
|
|
89
102
|
"utils": [
|
|
90
103
|
"./dist/types/utils/index.d.ts"
|
|
91
104
|
],
|
|
105
|
+
"syncPluginKit": [
|
|
106
|
+
"./dist/types/syncPluginKit/index.d.ts"
|
|
107
|
+
],
|
|
92
108
|
"listDictionaries": [
|
|
93
109
|
"./dist/types/listDictionariesPath.d.ts"
|
|
94
110
|
],
|
|
@@ -126,13 +142,13 @@
|
|
|
126
142
|
},
|
|
127
143
|
"dependencies": {
|
|
128
144
|
"@babel/parser": "7.29.7",
|
|
129
|
-
"@intlayer/api": "9.0.0-canary.
|
|
130
|
-
"@intlayer/config": "9.0.0-canary.
|
|
131
|
-
"@intlayer/core": "9.0.0-canary.
|
|
132
|
-
"@intlayer/dictionaries-entry": "9.0.0-canary.
|
|
133
|
-
"@intlayer/remote-dictionaries-entry": "9.0.0-canary.
|
|
134
|
-
"@intlayer/types": "9.0.0-canary.
|
|
135
|
-
"@intlayer/unmerged-dictionaries-entry": "9.0.0-canary.
|
|
145
|
+
"@intlayer/api": "9.0.0-canary.15",
|
|
146
|
+
"@intlayer/config": "9.0.0-canary.15",
|
|
147
|
+
"@intlayer/core": "9.0.0-canary.15",
|
|
148
|
+
"@intlayer/dictionaries-entry": "9.0.0-canary.15",
|
|
149
|
+
"@intlayer/remote-dictionaries-entry": "9.0.0-canary.15",
|
|
150
|
+
"@intlayer/types": "9.0.0-canary.15",
|
|
151
|
+
"@intlayer/unmerged-dictionaries-entry": "9.0.0-canary.15",
|
|
136
152
|
"@parcel/watcher": "2.5.6",
|
|
137
153
|
"defu": "6.1.7",
|
|
138
154
|
"fast-glob": "3.3.3",
|