@intlayer/chokidar 2.0.13 → 3.0.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/cjs/chokidar/watcher.cjs +18 -26
- package/dist/cjs/chokidar/watcher.cjs.map +1 -1
- package/dist/cjs/fetchDistantDictionaries.cjs +101 -0
- package/dist/cjs/fetchDistantDictionaries.cjs.map +1 -0
- package/dist/cjs/fetchDistantDictionaryKeys.cjs +50 -0
- package/dist/cjs/fetchDistantDictionaryKeys.cjs.map +1 -0
- package/dist/cjs/index.cjs +10 -0
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/loadDictionaries/index.cjs +29 -0
- package/dist/cjs/loadDictionaries/index.cjs.map +1 -0
- package/dist/cjs/{transpiler/declaration_file_to_dictionary/intlayer_dictionary → loadDictionaries}/loadContentDeclaration.cjs +23 -7
- package/dist/cjs/loadDictionaries/loadContentDeclaration.cjs.map +1 -0
- package/dist/cjs/loadDictionaries/loadDictionaries.cjs +86 -0
- package/dist/cjs/loadDictionaries/loadDictionaries.cjs.map +1 -0
- package/dist/cjs/{transpiler/declaration_file_to_dictionary/intlayer_dictionary/extractNestedJSON.cjs → loadDictionaries/loadDistantDictionaries.cjs} +15 -22
- package/dist/cjs/loadDictionaries/loadDistantDictionaries.cjs.map +1 -0
- package/dist/cjs/loadDictionaries/loadLocalDictionaries.cjs +51 -0
- package/dist/cjs/loadDictionaries/loadLocalDictionaries.cjs.map +1 -0
- package/dist/cjs/log.cjs +255 -0
- package/dist/cjs/log.cjs.map +1 -0
- package/dist/cjs/mergeDictionaries.cjs +62 -0
- package/dist/cjs/mergeDictionaries.cjs.map +1 -0
- package/dist/cjs/transpiler/declaration_file_to_dictionary/i18n_dictionary/buildI18nDictionary.cjs +13 -49
- package/dist/cjs/transpiler/declaration_file_to_dictionary/i18n_dictionary/buildI18nDictionary.cjs.map +1 -1
- package/dist/cjs/transpiler/declaration_file_to_dictionary/i18n_dictionary/convertContentDeclarationInto18nDictionaries.cjs.map +1 -1
- package/dist/cjs/transpiler/declaration_file_to_dictionary/i18n_dictionary/writeDictionary.cjs +52 -0
- package/dist/cjs/transpiler/declaration_file_to_dictionary/i18n_dictionary/writeDictionary.cjs.map +1 -0
- package/dist/cjs/transpiler/declaration_file_to_dictionary/index.cjs +1 -1
- package/dist/cjs/transpiler/declaration_file_to_dictionary/index.cjs.map +1 -1
- package/dist/cjs/transpiler/declaration_file_to_dictionary/intlayer_dictionary/buildIntlayerDictionary.cjs +4 -37
- package/dist/cjs/transpiler/declaration_file_to_dictionary/intlayer_dictionary/buildIntlayerDictionary.cjs.map +1 -1
- package/dist/cjs/transpiler/declaration_file_to_dictionary/intlayer_dictionary/index.cjs +0 -2
- package/dist/cjs/transpiler/declaration_file_to_dictionary/intlayer_dictionary/index.cjs.map +1 -1
- package/dist/cjs/transpiler/declaration_file_to_dictionary/intlayer_dictionary/processContentDeclaration.cjs +8 -10
- package/dist/cjs/transpiler/declaration_file_to_dictionary/intlayer_dictionary/processContentDeclaration.cjs.map +1 -1
- package/dist/cjs/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeDictionary.cjs +46 -0
- package/dist/cjs/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeDictionary.cjs.map +1 -0
- package/dist/cjs/transpiler/dictionary_to_type/createModuleAugmentation.cjs +1 -1
- package/dist/cjs/transpiler/dictionary_to_type/createModuleAugmentation.cjs.map +1 -1
- package/dist/cjs/transpiler/dictionary_to_type/createType.cjs +8 -9
- package/dist/cjs/transpiler/dictionary_to_type/createType.cjs.map +1 -1
- package/dist/esm/chokidar/watcher.mjs +18 -16
- package/dist/esm/chokidar/watcher.mjs.map +1 -1
- package/dist/esm/fetchDistantDictionaries.mjs +67 -0
- package/dist/esm/fetchDistantDictionaries.mjs.map +1 -0
- package/dist/esm/fetchDistantDictionaryKeys.mjs +26 -0
- package/dist/esm/fetchDistantDictionaryKeys.mjs.map +1 -0
- package/dist/esm/index.mjs +10 -0
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/loadDictionaries/index.mjs +5 -0
- package/dist/esm/loadDictionaries/index.mjs.map +1 -0
- package/dist/esm/{transpiler/declaration_file_to_dictionary/intlayer_dictionary → loadDictionaries}/loadContentDeclaration.mjs +22 -5
- package/dist/esm/loadDictionaries/loadContentDeclaration.mjs.map +1 -0
- package/dist/esm/loadDictionaries/loadDictionaries.mjs +52 -0
- package/dist/esm/loadDictionaries/loadDictionaries.mjs.map +1 -0
- package/dist/esm/loadDictionaries/loadDistantDictionaries.mjs +14 -0
- package/dist/esm/loadDictionaries/loadDistantDictionaries.mjs.map +1 -0
- package/dist/esm/loadDictionaries/loadLocalDictionaries.mjs +27 -0
- package/dist/esm/loadDictionaries/loadLocalDictionaries.mjs.map +1 -0
- package/dist/esm/log.mjs +221 -0
- package/dist/esm/log.mjs.map +1 -0
- package/dist/esm/mergeDictionaries.mjs +28 -0
- package/dist/esm/mergeDictionaries.mjs.map +1 -0
- package/dist/esm/transpiler/declaration_file_to_dictionary/i18n_dictionary/buildI18nDictionary.mjs +15 -54
- package/dist/esm/transpiler/declaration_file_to_dictionary/i18n_dictionary/buildI18nDictionary.mjs.map +1 -1
- package/dist/esm/transpiler/declaration_file_to_dictionary/i18n_dictionary/convertContentDeclarationInto18nDictionaries.mjs.map +1 -1
- package/dist/esm/transpiler/declaration_file_to_dictionary/i18n_dictionary/writeDictionary.mjs +28 -0
- package/dist/esm/transpiler/declaration_file_to_dictionary/i18n_dictionary/writeDictionary.mjs.map +1 -0
- package/dist/esm/transpiler/declaration_file_to_dictionary/index.mjs +1 -1
- package/dist/esm/transpiler/declaration_file_to_dictionary/index.mjs.map +1 -1
- package/dist/esm/transpiler/declaration_file_to_dictionary/intlayer_dictionary/buildIntlayerDictionary.mjs +5 -38
- package/dist/esm/transpiler/declaration_file_to_dictionary/intlayer_dictionary/buildIntlayerDictionary.mjs.map +1 -1
- package/dist/esm/transpiler/declaration_file_to_dictionary/intlayer_dictionary/index.mjs +0 -1
- package/dist/esm/transpiler/declaration_file_to_dictionary/intlayer_dictionary/index.mjs.map +1 -1
- package/dist/esm/transpiler/declaration_file_to_dictionary/intlayer_dictionary/processContentDeclaration.mjs +8 -10
- package/dist/esm/transpiler/declaration_file_to_dictionary/intlayer_dictionary/processContentDeclaration.mjs.map +1 -1
- package/dist/esm/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeDictionary.mjs +22 -0
- package/dist/esm/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeDictionary.mjs.map +1 -0
- package/dist/esm/transpiler/dictionary_to_type/createModuleAugmentation.mjs +1 -1
- package/dist/esm/transpiler/dictionary_to_type/createModuleAugmentation.mjs.map +1 -1
- package/dist/esm/transpiler/dictionary_to_type/createType.mjs +9 -9
- package/dist/esm/transpiler/dictionary_to_type/createType.mjs.map +1 -1
- package/dist/types/chokidar/index.d.ts +2 -0
- package/dist/types/chokidar/index.d.ts.map +1 -0
- package/dist/types/chokidar/watcher.d.ts +4 -0
- package/dist/types/chokidar/watcher.d.ts.map +1 -0
- package/dist/types/fetchDistantDictionaries.d.ts +12 -0
- package/dist/types/fetchDistantDictionaries.d.ts.map +1 -0
- package/dist/types/fetchDistantDictionaryKeys.d.ts +2 -0
- package/dist/types/fetchDistantDictionaryKeys.d.ts.map +1 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/loadDictionaries/index.d.ts +5 -0
- package/dist/types/loadDictionaries/index.d.ts.map +1 -0
- package/dist/types/loadDictionaries/loadContentDeclaration.d.ts +3 -0
- package/dist/types/loadDictionaries/loadContentDeclaration.d.ts.map +1 -0
- package/dist/types/loadDictionaries/loadDictionaries.d.ts +3 -0
- package/dist/types/loadDictionaries/loadDictionaries.d.ts.map +1 -0
- package/dist/types/loadDictionaries/loadDistantDictionaries.d.ts +8 -0
- package/dist/types/loadDictionaries/loadDistantDictionaries.d.ts.map +1 -0
- package/dist/types/loadDictionaries/loadLocalDictionaries.d.ts +3 -0
- package/dist/types/loadDictionaries/loadLocalDictionaries.d.ts.map +1 -0
- package/dist/types/log.d.ts +40 -0
- package/dist/types/log.d.ts.map +1 -0
- package/dist/types/mergeDictionaries.d.ts +5 -0
- package/dist/types/mergeDictionaries.d.ts.map +1 -0
- package/dist/types/transpiler/declaration_file_to_dictionary/i18n_dictionary/buildI18nDictionary.d.ts +6 -0
- package/dist/types/transpiler/declaration_file_to_dictionary/i18n_dictionary/buildI18nDictionary.d.ts.map +1 -0
- package/dist/types/transpiler/declaration_file_to_dictionary/i18n_dictionary/convertContentDeclarationInto18nDictionaries.d.ts +7 -0
- package/dist/types/transpiler/declaration_file_to_dictionary/i18n_dictionary/convertContentDeclarationInto18nDictionaries.d.ts.map +1 -0
- package/dist/types/transpiler/declaration_file_to_dictionary/i18n_dictionary/convertPluralsValues.d.ts +2 -0
- package/dist/types/transpiler/declaration_file_to_dictionary/i18n_dictionary/convertPluralsValues.d.ts.map +1 -0
- package/dist/types/transpiler/declaration_file_to_dictionary/i18n_dictionary/index.d.ts +2 -0
- package/dist/types/transpiler/declaration_file_to_dictionary/i18n_dictionary/index.d.ts.map +1 -0
- package/dist/types/transpiler/declaration_file_to_dictionary/i18n_dictionary/writeDictionary.d.ts +7 -0
- package/dist/types/transpiler/declaration_file_to_dictionary/i18n_dictionary/writeDictionary.d.ts.map +1 -0
- package/dist/types/transpiler/declaration_file_to_dictionary/index.d.ts +3 -0
- package/dist/types/transpiler/declaration_file_to_dictionary/index.d.ts.map +1 -0
- package/dist/types/transpiler/declaration_file_to_dictionary/intlayer_dictionary/buildIntlayerDictionary.d.ts +6 -0
- package/dist/types/transpiler/declaration_file_to_dictionary/intlayer_dictionary/buildIntlayerDictionary.d.ts.map +1 -0
- package/dist/types/transpiler/declaration_file_to_dictionary/intlayer_dictionary/index.d.ts +3 -0
- package/dist/types/transpiler/declaration_file_to_dictionary/intlayer_dictionary/index.d.ts.map +1 -0
- package/dist/types/transpiler/declaration_file_to_dictionary/intlayer_dictionary/processContentDeclaration.d.ts +6 -0
- package/dist/types/transpiler/declaration_file_to_dictionary/intlayer_dictionary/processContentDeclaration.d.ts.map +1 -0
- package/dist/types/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeDictionary.d.ts +3 -0
- package/dist/types/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeDictionary.d.ts.map +1 -0
- package/dist/types/transpiler/dictionary_to_main/createDictionaryList.d.ts +5 -0
- package/dist/types/transpiler/dictionary_to_main/createDictionaryList.d.ts.map +1 -0
- package/dist/types/transpiler/dictionary_to_main/index.d.ts +2 -0
- package/dist/types/transpiler/dictionary_to_main/index.d.ts.map +1 -0
- package/dist/types/transpiler/dictionary_to_type/createModuleAugmentation.d.ts +6 -0
- package/dist/types/transpiler/dictionary_to_type/createModuleAugmentation.d.ts.map +1 -0
- package/dist/types/transpiler/dictionary_to_type/createType.d.ts +6 -0
- package/dist/types/transpiler/dictionary_to_type/createType.d.ts.map +1 -0
- package/dist/types/transpiler/dictionary_to_type/index.d.ts +3 -0
- package/dist/types/transpiler/dictionary_to_type/index.d.ts.map +1 -0
- package/dist/types/utils.d.ts +3 -0
- package/dist/types/utils.d.ts.map +1 -0
- package/package.json +32 -16
- package/dist/cjs/chokidar/index.d.ts +0 -2
- package/dist/cjs/chokidar/watcher.d.ts +0 -5
- package/dist/cjs/index.d.ts +0 -4
- package/dist/cjs/transpiler/declaration_file_to_dictionary/i18n_dictionary/buildI18nDictionary.d.ts +0 -6
- package/dist/cjs/transpiler/declaration_file_to_dictionary/i18n_dictionary/convertContentDeclarationInto18nDictionaries.d.ts +0 -8
- package/dist/cjs/transpiler/declaration_file_to_dictionary/i18n_dictionary/convertPluralsValues.d.ts +0 -3
- package/dist/cjs/transpiler/declaration_file_to_dictionary/i18n_dictionary/index.d.ts +0 -1
- package/dist/cjs/transpiler/declaration_file_to_dictionary/index.d.ts +0 -3
- package/dist/cjs/transpiler/declaration_file_to_dictionary/intlayer_dictionary/buildIntlayerDictionary.d.ts +0 -6
- package/dist/cjs/transpiler/declaration_file_to_dictionary/intlayer_dictionary/extractNestedJSON.cjs.map +0 -1
- package/dist/cjs/transpiler/declaration_file_to_dictionary/intlayer_dictionary/extractNestedJSON.d.ts +0 -44
- package/dist/cjs/transpiler/declaration_file_to_dictionary/intlayer_dictionary/index.d.ts +0 -4
- package/dist/cjs/transpiler/declaration_file_to_dictionary/intlayer_dictionary/loadContentDeclaration.cjs.map +0 -1
- package/dist/cjs/transpiler/declaration_file_to_dictionary/intlayer_dictionary/loadContentDeclaration.d.ts +0 -10
- package/dist/cjs/transpiler/declaration_file_to_dictionary/intlayer_dictionary/processContentDeclaration.d.ts +0 -8
- package/dist/cjs/transpiler/dictionary_to_main/createDictionaryList.d.ts +0 -6
- package/dist/cjs/transpiler/dictionary_to_main/index.d.ts +0 -1
- package/dist/cjs/transpiler/dictionary_to_type/createModuleAugmentation.d.ts +0 -7
- package/dist/cjs/transpiler/dictionary_to_type/createType.d.ts +0 -7
- package/dist/cjs/transpiler/dictionary_to_type/index.d.ts +0 -2
- package/dist/cjs/utils.d.ts +0 -4
- package/dist/esm/chokidar/index.d.mts +0 -2
- package/dist/esm/chokidar/watcher.d.mts +0 -5
- package/dist/esm/index.d.mts +0 -4
- package/dist/esm/transpiler/declaration_file_to_dictionary/i18n_dictionary/buildI18nDictionary.d.mts +0 -6
- package/dist/esm/transpiler/declaration_file_to_dictionary/i18n_dictionary/convertContentDeclarationInto18nDictionaries.d.mts +0 -8
- package/dist/esm/transpiler/declaration_file_to_dictionary/i18n_dictionary/convertPluralsValues.d.mts +0 -3
- package/dist/esm/transpiler/declaration_file_to_dictionary/i18n_dictionary/index.d.mts +0 -1
- package/dist/esm/transpiler/declaration_file_to_dictionary/index.d.mts +0 -3
- package/dist/esm/transpiler/declaration_file_to_dictionary/intlayer_dictionary/buildIntlayerDictionary.d.mts +0 -6
- package/dist/esm/transpiler/declaration_file_to_dictionary/intlayer_dictionary/extractNestedJSON.d.mts +0 -44
- package/dist/esm/transpiler/declaration_file_to_dictionary/intlayer_dictionary/extractNestedJSON.mjs +0 -21
- package/dist/esm/transpiler/declaration_file_to_dictionary/intlayer_dictionary/extractNestedJSON.mjs.map +0 -1
- package/dist/esm/transpiler/declaration_file_to_dictionary/intlayer_dictionary/index.d.mts +0 -4
- package/dist/esm/transpiler/declaration_file_to_dictionary/intlayer_dictionary/loadContentDeclaration.d.mts +0 -10
- package/dist/esm/transpiler/declaration_file_to_dictionary/intlayer_dictionary/loadContentDeclaration.mjs.map +0 -1
- package/dist/esm/transpiler/declaration_file_to_dictionary/intlayer_dictionary/processContentDeclaration.d.mts +0 -8
- package/dist/esm/transpiler/dictionary_to_main/createDictionaryList.d.mts +0 -6
- package/dist/esm/transpiler/dictionary_to_main/index.d.mts +0 -1
- package/dist/esm/transpiler/dictionary_to_type/createModuleAugmentation.d.mts +0 -7
- package/dist/esm/transpiler/dictionary_to_type/createType.d.mts +0 -7
- package/dist/esm/transpiler/dictionary_to_type/index.d.mts +0 -2
- package/dist/esm/utils.d.mts +0 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,aAAc,MAAM,WAO3C,CAAC;AAEF,eAAO,MAAM,oBAAoB,WAAY,MAAM,KAAG,MAcrD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intlayer/chokidar",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Chokidar application for IntLayer - Transpile IntLayer declaration files into dictionaries.",
|
|
6
6
|
"keywords": [
|
|
@@ -15,27 +15,27 @@
|
|
|
15
15
|
],
|
|
16
16
|
"homepage": "https://intlayer.org",
|
|
17
17
|
"bugs": {
|
|
18
|
-
"url": "https://github.com/
|
|
18
|
+
"url": "https://github.com/aymericzip/intlayer/issues"
|
|
19
19
|
},
|
|
20
20
|
"repository": {
|
|
21
21
|
"type": "git",
|
|
22
|
-
"url": "git+https://github.com/
|
|
22
|
+
"url": "git+https://github.com/aymericzip/intlayer.git"
|
|
23
23
|
},
|
|
24
24
|
"license": "Apache-2.0",
|
|
25
25
|
"author": {
|
|
26
26
|
"name": "Aymeric PINEAU",
|
|
27
|
-
"url": "https://github.com/
|
|
27
|
+
"url": "https://github.com/aymericzip"
|
|
28
28
|
},
|
|
29
29
|
"contributors": [
|
|
30
30
|
{
|
|
31
31
|
"name": "Aymeric Pineau",
|
|
32
32
|
"email": "ay.pineau@gmail.com",
|
|
33
|
-
"url": "https://github.com/
|
|
33
|
+
"url": "https://github.com/aymericzip"
|
|
34
34
|
}
|
|
35
35
|
],
|
|
36
36
|
"exports": {
|
|
37
37
|
".": {
|
|
38
|
-
"types": "./dist/
|
|
38
|
+
"types": "./dist/types/index.d.ts",
|
|
39
39
|
"require": "./dist/cjs/index.cjs",
|
|
40
40
|
"import": "./dist/esm/index.mjs"
|
|
41
41
|
},
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
},
|
|
44
44
|
"main": "dist/cjs/index.cjs",
|
|
45
45
|
"module": "dist/esm/index.mjs",
|
|
46
|
+
"types": "dist/types/index.d.ts",
|
|
46
47
|
"typesVersions": {
|
|
47
48
|
"*": {
|
|
48
49
|
"package.json": [
|
|
@@ -57,40 +58,55 @@
|
|
|
57
58
|
"dependencies": {
|
|
58
59
|
"chokidar": "^3.6.0",
|
|
59
60
|
"crypto-js": "^4.2.0",
|
|
61
|
+
"deepmerge": "^4.3.1",
|
|
60
62
|
"esbuild": "^0.20.2",
|
|
61
63
|
"esbuild-loader": "^4.2.0",
|
|
62
64
|
"glob": "^10.4.2",
|
|
63
65
|
"node-loader": "^2.0.0",
|
|
66
|
+
"p-limit": "^3.1.0",
|
|
64
67
|
"quicktype-core": "^23.0.170",
|
|
65
68
|
"react": "^18.3.1",
|
|
66
69
|
"rimraf": "5.0.5",
|
|
67
|
-
"@intlayer/
|
|
68
|
-
"@intlayer/
|
|
69
|
-
"intlayer": "^
|
|
70
|
+
"@intlayer/backend": "^3.0.0",
|
|
71
|
+
"@intlayer/config": "^3.0.0",
|
|
72
|
+
"@intlayer/core": "^3.0.0",
|
|
73
|
+
"@intlayer/design-system": "^3.0.0",
|
|
74
|
+
"@intlayer/dictionaries-entry": "^3.0.0",
|
|
75
|
+
"intlayer": "^3.0.0"
|
|
70
76
|
},
|
|
71
77
|
"devDependencies": {
|
|
72
78
|
"@changesets/cli": "2.27.1",
|
|
73
79
|
"@types/crypto-js": "^4.2.2",
|
|
80
|
+
"@types/lodash": "^4.17.10",
|
|
74
81
|
"@types/node": "^20.14.9",
|
|
82
|
+
"concurrently": "^8.2.2",
|
|
83
|
+
"eslint": "^9.11.1",
|
|
75
84
|
"node-polyfill-webpack-plugin": "^3.0.0",
|
|
76
|
-
"
|
|
85
|
+
"prettier": "3.3.3",
|
|
86
|
+
"tsc-alias": "^1.8.10",
|
|
87
|
+
"tsup": "^8.3.0",
|
|
77
88
|
"typescript": "^5.5.2",
|
|
78
89
|
"webpack-watch-files-plugin": "^1.2.1",
|
|
79
90
|
"@utils/eslint-config": "^1.0.4",
|
|
80
|
-
"@utils/ts-config": "^1.0.4"
|
|
91
|
+
"@utils/ts-config": "^1.0.4",
|
|
92
|
+
"@utils/ts-config-types": "^1.0.4",
|
|
93
|
+
"@utils/tsup-config": "^1.0.4"
|
|
81
94
|
},
|
|
82
95
|
"engines": {
|
|
83
96
|
"node": ">=14.18"
|
|
84
97
|
},
|
|
85
98
|
"bug": {
|
|
86
|
-
"url": "https://github.com/
|
|
99
|
+
"url": "https://github.com/aymericzip/intlayer/issues"
|
|
87
100
|
},
|
|
88
101
|
"scripts": {
|
|
89
|
-
"build": "
|
|
102
|
+
"build": "pnpm build:package & pnpm build:types",
|
|
103
|
+
"build:package": "tsup",
|
|
104
|
+
"build:types": "tsc --project ./tsconfig.types.json && tsc-alias --project ./tsconfig.types.json",
|
|
90
105
|
"clean": "rimraf ./dist",
|
|
91
|
-
"dev": "tsup --watch",
|
|
92
|
-
"lint": "eslint . --
|
|
93
|
-
"lint:fix": "eslint . --
|
|
106
|
+
"dev": "concurrently --prefix none \"tsup --watch\" \"tsc --project ./tsconfig.types.json --watch\" \"tsc-alias --project ./tsconfig.types.json --watch\"",
|
|
107
|
+
"lint": "eslint . --cache",
|
|
108
|
+
"lint:fix": "eslint . --cache --fix",
|
|
109
|
+
"prettier": "prettier . --check",
|
|
94
110
|
"prettier:fix": "prettier --write src/**/*"
|
|
95
111
|
}
|
|
96
112
|
}
|
package/dist/cjs/index.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Locales } from '@intlayer/config';
|
|
2
|
-
import { Content } from '@intlayer/core';
|
|
3
|
-
|
|
4
|
-
type Dictionary = Record<string, unknown>;
|
|
5
|
-
type I18nDictionariesOutput = Partial<Record<Locales, Dictionary>>;
|
|
6
|
-
declare const createI18nDictionaries: (content: Content) => I18nDictionariesOutput;
|
|
7
|
-
|
|
8
|
-
export { type I18nDictionariesOutput, createI18nDictionaries };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { buildI18nDictionary } from './buildI18nDictionary.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/transpiler/declaration_file_to_dictionary/intlayer_dictionary/extractNestedJSON.ts"],"sourcesContent":["import type { Content, DeclarationContent } from '@intlayer/core';\n\n/**\n *\n * This function extracts all nested objects with an 'id' field from the input object and returns them as an array\n *\n * Example:\n *\n * const input = {\n * id: '1',\n * name: 'John Doe',\n * address: {\n * id: '2',\n * street: '123 Main St',\n * city: 'Springfield',\n * state: 'IL'\n * },\n * };\n * const result = extractObjectsWithId(input);\n * console.log(result);\n *\n * Output:\n *\n * [{\n * id: '1',\n * name: 'John Doe',\n * address: {\n * id: '2',\n * street: '123 Main St',\n * city: 'Springfield',\n * state: 'IL'\n * }\n * },\n * {\n * id: '2',\n * street: '123 Main St',\n * city: 'Springfield',\n * state: 'IL'\n * }]\n *\n */\nexport const extractObjectsWithId = (\n input: DeclarationContent\n): DeclarationContent[] => {\n // Function to recursively search and extract nested objects with an 'id'\n const search = (obj: Content, results: DeclarationContent[]): void => {\n if (obj && typeof obj === 'object') {\n if (Object.hasOwn(obj, 'id')) {\n results.push(obj as DeclarationContent);\n }\n for (const key of Object.keys(obj)) {\n if (typeof obj[key] === 'object') {\n search(obj[key] as Content, results);\n }\n }\n }\n };\n\n const results: DeclarationContent[] = [];\n search(input, results);\n return results;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAyCO,MAAM,uBAAuB,CAClC,UACyB;AAEzB,QAAM,SAAS,CAAC,KAAcA,aAAwC;AACpE,QAAI,OAAO,OAAO,QAAQ,UAAU;AAClC,UAAI,OAAO,OAAO,KAAK,IAAI,GAAG;AAC5B,QAAAA,SAAQ,KAAK,GAAyB;AAAA,MACxC;AACA,iBAAW,OAAO,OAAO,KAAK,GAAG,GAAG;AAClC,YAAI,OAAO,IAAI,GAAG,MAAM,UAAU;AAChC,iBAAO,IAAI,GAAG,GAAcA,QAAO;AAAA,QACrC;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAEA,QAAM,UAAgC,CAAC;AACvC,SAAO,OAAO,OAAO;AACrB,SAAO;AACT;","names":["results"]}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { DeclarationContent } from '@intlayer/core';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
*
|
|
5
|
-
* This function extracts all nested objects with an 'id' field from the input object and returns them as an array
|
|
6
|
-
*
|
|
7
|
-
* Example:
|
|
8
|
-
*
|
|
9
|
-
* const input = {
|
|
10
|
-
* id: '1',
|
|
11
|
-
* name: 'John Doe',
|
|
12
|
-
* address: {
|
|
13
|
-
* id: '2',
|
|
14
|
-
* street: '123 Main St',
|
|
15
|
-
* city: 'Springfield',
|
|
16
|
-
* state: 'IL'
|
|
17
|
-
* },
|
|
18
|
-
* };
|
|
19
|
-
* const result = extractObjectsWithId(input);
|
|
20
|
-
* console.log(result);
|
|
21
|
-
*
|
|
22
|
-
* Output:
|
|
23
|
-
*
|
|
24
|
-
* [{
|
|
25
|
-
* id: '1',
|
|
26
|
-
* name: 'John Doe',
|
|
27
|
-
* address: {
|
|
28
|
-
* id: '2',
|
|
29
|
-
* street: '123 Main St',
|
|
30
|
-
* city: 'Springfield',
|
|
31
|
-
* state: 'IL'
|
|
32
|
-
* }
|
|
33
|
-
* },
|
|
34
|
-
* {
|
|
35
|
-
* id: '2',
|
|
36
|
-
* street: '123 Main St',
|
|
37
|
-
* city: 'Springfield',
|
|
38
|
-
* state: 'IL'
|
|
39
|
-
* }]
|
|
40
|
-
*
|
|
41
|
-
*/
|
|
42
|
-
declare const extractObjectsWithId: (input: DeclarationContent) => DeclarationContent[];
|
|
43
|
-
|
|
44
|
-
export { extractObjectsWithId };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/transpiler/declaration_file_to_dictionary/intlayer_dictionary/loadContentDeclaration.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-var-requires */\nimport { createRequire } from 'module';\nimport { type Context, runInNewContext } from 'vm';\nimport type { DeclarationContent } from '@intlayer/core';\nimport { type BuildOptions, buildSync, type BuildResult } from 'esbuild';\n\nconst isESModule = typeof import.meta.url === 'string';\n\nconst sandboxContext: Context = {\n exports: {\n default: {},\n },\n module: {\n exports: {},\n },\n console,\n require: isESModule ? createRequire(import.meta.url) : require,\n};\n\nconst transformationOption: BuildOptions = {\n loader: {\n '.js': 'js',\n '.jsx': 'jsx',\n '.mjs': 'js',\n '.ts': 'ts',\n '.tsx': 'tsx',\n '.cjs': 'js',\n '.json': 'json',\n },\n format: 'cjs', // Output format as commonjs\n target: 'es2017',\n packages: 'external',\n write: false,\n bundle: true,\n};\n\nconst filterValidContentDeclaration = (\n contentDeclaration: DeclarationContent\n): DeclarationContent => {\n // @TODO Implement filtering of valid content declaration\n return contentDeclaration;\n};\n\n/**\n * Load the content declaration from the given path\n *\n * Accepts JSON, JS, MJS and TS files as configuration\n */\nexport const loadContentDeclaration = (\n contentDeclarationFilePath: string\n): DeclarationContent | undefined => {\n let contentDeclaration: DeclarationContent | undefined = undefined;\n\n const fileExtension = contentDeclarationFilePath.split('.').pop() ?? '';\n\n try {\n if (fileExtension === 'json') {\n // Assume JSON\n return require(contentDeclarationFilePath);\n }\n\n // Rest is JS, MJS or TS\n\n const moduleResult: BuildResult = buildSync({\n entryPoints: [contentDeclarationFilePath],\n\n ...transformationOption,\n });\n\n const moduleResultString = moduleResult.outputFiles?.[0].text;\n\n if (!moduleResultString) {\n console.error('Configuration file could not be loaded.');\n return undefined;\n }\n\n runInNewContext(moduleResultString, sandboxContext);\n\n if (\n sandboxContext.exports.default &&\n Object.keys(sandboxContext.exports.default).length > 0\n ) {\n // ES Module\n contentDeclaration = sandboxContext.exports.default;\n } else if (\n sandboxContext.module.exports.defaults &&\n Object.keys(sandboxContext.module.exports.defaults).length > 0\n ) {\n // CommonJS\n contentDeclaration = sandboxContext.module.exports.default;\n } else if (\n sandboxContext.module.exports.default &&\n Object.keys(sandboxContext.module.exports.default).length > 0\n ) {\n // ES Module\n contentDeclaration = sandboxContext.module.exports.default;\n } else if (\n sandboxContext.module.exports &&\n Object.keys(sandboxContext.module.exports).length > 0\n ) {\n // Other\n contentDeclaration = sandboxContext.module.exports;\n }\n\n if (typeof contentDeclaration === 'undefined') {\n console.error('Configuration file could not be loaded.');\n return undefined;\n }\n\n return filterValidContentDeclaration(contentDeclaration);\n } catch (error) {\n console.error('Error:', error);\n }\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,oBAA8B;AAC9B,gBAA8C;AAE9C,qBAA+D;AAJ/D;AAMA,MAAM,aAAa,OAAO,YAAY,QAAQ;AAE9C,MAAM,iBAA0B;AAAA,EAC9B,SAAS;AAAA,IACP,SAAS,CAAC;AAAA,EACZ;AAAA,EACA,QAAQ;AAAA,IACN,SAAS,CAAC;AAAA,EACZ;AAAA,EACA;AAAA,EACA,SAAS,iBAAa,6BAAc,YAAY,GAAG,IAAI;AACzD;AAEA,MAAM,uBAAqC;AAAA,EACzC,QAAQ;AAAA,IACN,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,SAAS;AAAA,EACX;AAAA,EACA,QAAQ;AAAA;AAAA,EACR,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,OAAO;AAAA,EACP,QAAQ;AACV;AAEA,MAAM,gCAAgC,CACpC,uBACuB;AAEvB,SAAO;AACT;AAOO,MAAM,yBAAyB,CACpC,+BACmC;AACnC,MAAI,qBAAqD;AAEzD,QAAM,gBAAgB,2BAA2B,MAAM,GAAG,EAAE,IAAI,KAAK;AAErE,MAAI;AACF,QAAI,kBAAkB,QAAQ;AAE5B,aAAO,QAAQ,0BAA0B;AAAA,IAC3C;AAIA,UAAM,mBAA4B,0BAAU;AAAA,MAC1C,aAAa,CAAC,0BAA0B;AAAA,MAExC,GAAG;AAAA,IACL,CAAC;AAED,UAAM,qBAAqB,aAAa,cAAc,CAAC,EAAE;AAEzD,QAAI,CAAC,oBAAoB;AACvB,cAAQ,MAAM,yCAAyC;AACvD,aAAO;AAAA,IACT;AAEA,mCAAgB,oBAAoB,cAAc;AAElD,QACE,eAAe,QAAQ,WACvB,OAAO,KAAK,eAAe,QAAQ,OAAO,EAAE,SAAS,GACrD;AAEA,2BAAqB,eAAe,QAAQ;AAAA,IAC9C,WACE,eAAe,OAAO,QAAQ,YAC9B,OAAO,KAAK,eAAe,OAAO,QAAQ,QAAQ,EAAE,SAAS,GAC7D;AAEA,2BAAqB,eAAe,OAAO,QAAQ;AAAA,IACrD,WACE,eAAe,OAAO,QAAQ,WAC9B,OAAO,KAAK,eAAe,OAAO,QAAQ,OAAO,EAAE,SAAS,GAC5D;AAEA,2BAAqB,eAAe,OAAO,QAAQ;AAAA,IACrD,WACE,eAAe,OAAO,WACtB,OAAO,KAAK,eAAe,OAAO,OAAO,EAAE,SAAS,GACpD;AAEA,2BAAqB,eAAe,OAAO;AAAA,IAC7C;AAEA,QAAI,OAAO,uBAAuB,aAAa;AAC7C,cAAQ,MAAM,yCAAyC;AACvD,aAAO;AAAA,IACT;AAEA,WAAO,8BAA8B,kBAAkB;AAAA,EACzD,SAAS,OAAO;AACd,YAAQ,MAAM,UAAU,KAAK;AAAA,EAC/B;AACF;","names":[]}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { DeclarationContent } from '@intlayer/core';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Load the content declaration from the given path
|
|
5
|
-
*
|
|
6
|
-
* Accepts JSON, JS, MJS and TS files as configuration
|
|
7
|
-
*/
|
|
8
|
-
declare const loadContentDeclaration: (contentDeclarationFilePath: string) => DeclarationContent | undefined;
|
|
9
|
-
|
|
10
|
-
export { loadContentDeclaration };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { DeclarationContent } from '@intlayer/core';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Function to load, process the module and return the Intlayer DeclarationContent from the module file
|
|
5
|
-
*/
|
|
6
|
-
declare const processContentDeclaration: (file: string) => Promise<DeclarationContent | undefined>;
|
|
7
|
-
|
|
8
|
-
export { processContentDeclaration };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { createDictionaryList } from './createDictionaryList.js';
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
declare const generateTypeScriptType: (typeName: string, jsonString: string) => Promise<string>;
|
|
2
|
-
/**
|
|
3
|
-
* This function generates a TypeScript type definition from a JSON object
|
|
4
|
-
*/
|
|
5
|
-
declare const createTypes: (dictionariesPaths: string[]) => Promise<string[]>;
|
|
6
|
-
|
|
7
|
-
export { createTypes, generateTypeScriptType };
|
package/dist/cjs/utils.d.ts
DELETED
package/dist/esm/index.d.mts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export { watch } from './chokidar/watcher.mjs';
|
|
2
|
-
export { createDictionaryList } from './transpiler/dictionary_to_main/createDictionaryList.mjs';
|
|
3
|
-
export { createModuleAugmentation } from './transpiler/dictionary_to_type/createModuleAugmentation.mjs';
|
|
4
|
-
import 'chokidar';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Locales } from '@intlayer/config';
|
|
2
|
-
import { Content } from '@intlayer/core';
|
|
3
|
-
|
|
4
|
-
type Dictionary = Record<string, unknown>;
|
|
5
|
-
type I18nDictionariesOutput = Partial<Record<Locales, Dictionary>>;
|
|
6
|
-
declare const createI18nDictionaries: (content: Content) => I18nDictionariesOutput;
|
|
7
|
-
|
|
8
|
-
export { type I18nDictionariesOutput, createI18nDictionaries };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { buildI18nDictionary } from './buildI18nDictionary.mjs';
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { DeclarationContent } from '@intlayer/core';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
*
|
|
5
|
-
* This function extracts all nested objects with an 'id' field from the input object and returns them as an array
|
|
6
|
-
*
|
|
7
|
-
* Example:
|
|
8
|
-
*
|
|
9
|
-
* const input = {
|
|
10
|
-
* id: '1',
|
|
11
|
-
* name: 'John Doe',
|
|
12
|
-
* address: {
|
|
13
|
-
* id: '2',
|
|
14
|
-
* street: '123 Main St',
|
|
15
|
-
* city: 'Springfield',
|
|
16
|
-
* state: 'IL'
|
|
17
|
-
* },
|
|
18
|
-
* };
|
|
19
|
-
* const result = extractObjectsWithId(input);
|
|
20
|
-
* console.log(result);
|
|
21
|
-
*
|
|
22
|
-
* Output:
|
|
23
|
-
*
|
|
24
|
-
* [{
|
|
25
|
-
* id: '1',
|
|
26
|
-
* name: 'John Doe',
|
|
27
|
-
* address: {
|
|
28
|
-
* id: '2',
|
|
29
|
-
* street: '123 Main St',
|
|
30
|
-
* city: 'Springfield',
|
|
31
|
-
* state: 'IL'
|
|
32
|
-
* }
|
|
33
|
-
* },
|
|
34
|
-
* {
|
|
35
|
-
* id: '2',
|
|
36
|
-
* street: '123 Main St',
|
|
37
|
-
* city: 'Springfield',
|
|
38
|
-
* state: 'IL'
|
|
39
|
-
* }]
|
|
40
|
-
*
|
|
41
|
-
*/
|
|
42
|
-
declare const extractObjectsWithId: (input: DeclarationContent) => DeclarationContent[];
|
|
43
|
-
|
|
44
|
-
export { extractObjectsWithId };
|
package/dist/esm/transpiler/declaration_file_to_dictionary/intlayer_dictionary/extractNestedJSON.mjs
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
const extractObjectsWithId = (input) => {
|
|
2
|
-
const search = (obj, results2) => {
|
|
3
|
-
if (obj && typeof obj === "object") {
|
|
4
|
-
if (Object.hasOwn(obj, "id")) {
|
|
5
|
-
results2.push(obj);
|
|
6
|
-
}
|
|
7
|
-
for (const key of Object.keys(obj)) {
|
|
8
|
-
if (typeof obj[key] === "object") {
|
|
9
|
-
search(obj[key], results2);
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
const results = [];
|
|
15
|
-
search(input, results);
|
|
16
|
-
return results;
|
|
17
|
-
};
|
|
18
|
-
export {
|
|
19
|
-
extractObjectsWithId
|
|
20
|
-
};
|
|
21
|
-
//# sourceMappingURL=extractNestedJSON.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/transpiler/declaration_file_to_dictionary/intlayer_dictionary/extractNestedJSON.ts"],"sourcesContent":["import type { Content, DeclarationContent } from '@intlayer/core';\n\n/**\n *\n * This function extracts all nested objects with an 'id' field from the input object and returns them as an array\n *\n * Example:\n *\n * const input = {\n * id: '1',\n * name: 'John Doe',\n * address: {\n * id: '2',\n * street: '123 Main St',\n * city: 'Springfield',\n * state: 'IL'\n * },\n * };\n * const result = extractObjectsWithId(input);\n * console.log(result);\n *\n * Output:\n *\n * [{\n * id: '1',\n * name: 'John Doe',\n * address: {\n * id: '2',\n * street: '123 Main St',\n * city: 'Springfield',\n * state: 'IL'\n * }\n * },\n * {\n * id: '2',\n * street: '123 Main St',\n * city: 'Springfield',\n * state: 'IL'\n * }]\n *\n */\nexport const extractObjectsWithId = (\n input: DeclarationContent\n): DeclarationContent[] => {\n // Function to recursively search and extract nested objects with an 'id'\n const search = (obj: Content, results: DeclarationContent[]): void => {\n if (obj && typeof obj === 'object') {\n if (Object.hasOwn(obj, 'id')) {\n results.push(obj as DeclarationContent);\n }\n for (const key of Object.keys(obj)) {\n if (typeof obj[key] === 'object') {\n search(obj[key] as Content, results);\n }\n }\n }\n };\n\n const results: DeclarationContent[] = [];\n search(input, results);\n return results;\n};\n"],"mappings":"AAyCO,MAAM,uBAAuB,CAClC,UACyB;AAEzB,QAAM,SAAS,CAAC,KAAcA,aAAwC;AACpE,QAAI,OAAO,OAAO,QAAQ,UAAU;AAClC,UAAI,OAAO,OAAO,KAAK,IAAI,GAAG;AAC5B,QAAAA,SAAQ,KAAK,GAAyB;AAAA,MACxC;AACA,iBAAW,OAAO,OAAO,KAAK,GAAG,GAAG;AAClC,YAAI,OAAO,IAAI,GAAG,MAAM,UAAU;AAChC,iBAAO,IAAI,GAAG,GAAcA,QAAO;AAAA,QACrC;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAEA,QAAM,UAAgC,CAAC;AACvC,SAAO,OAAO,OAAO;AACrB,SAAO;AACT;","names":["results"]}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { DeclarationContent } from '@intlayer/core';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Load the content declaration from the given path
|
|
5
|
-
*
|
|
6
|
-
* Accepts JSON, JS, MJS and TS files as configuration
|
|
7
|
-
*/
|
|
8
|
-
declare const loadContentDeclaration: (contentDeclarationFilePath: string) => DeclarationContent | undefined;
|
|
9
|
-
|
|
10
|
-
export { loadContentDeclaration };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/transpiler/declaration_file_to_dictionary/intlayer_dictionary/loadContentDeclaration.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-var-requires */\nimport { createRequire } from 'module';\nimport { type Context, runInNewContext } from 'vm';\nimport type { DeclarationContent } from '@intlayer/core';\nimport { type BuildOptions, buildSync, type BuildResult } from 'esbuild';\n\nconst isESModule = typeof import.meta.url === 'string';\n\nconst sandboxContext: Context = {\n exports: {\n default: {},\n },\n module: {\n exports: {},\n },\n console,\n require: isESModule ? createRequire(import.meta.url) : require,\n};\n\nconst transformationOption: BuildOptions = {\n loader: {\n '.js': 'js',\n '.jsx': 'jsx',\n '.mjs': 'js',\n '.ts': 'ts',\n '.tsx': 'tsx',\n '.cjs': 'js',\n '.json': 'json',\n },\n format: 'cjs', // Output format as commonjs\n target: 'es2017',\n packages: 'external',\n write: false,\n bundle: true,\n};\n\nconst filterValidContentDeclaration = (\n contentDeclaration: DeclarationContent\n): DeclarationContent => {\n // @TODO Implement filtering of valid content declaration\n return contentDeclaration;\n};\n\n/**\n * Load the content declaration from the given path\n *\n * Accepts JSON, JS, MJS and TS files as configuration\n */\nexport const loadContentDeclaration = (\n contentDeclarationFilePath: string\n): DeclarationContent | undefined => {\n let contentDeclaration: DeclarationContent | undefined = undefined;\n\n const fileExtension = contentDeclarationFilePath.split('.').pop() ?? '';\n\n try {\n if (fileExtension === 'json') {\n // Assume JSON\n return require(contentDeclarationFilePath);\n }\n\n // Rest is JS, MJS or TS\n\n const moduleResult: BuildResult = buildSync({\n entryPoints: [contentDeclarationFilePath],\n\n ...transformationOption,\n });\n\n const moduleResultString = moduleResult.outputFiles?.[0].text;\n\n if (!moduleResultString) {\n console.error('Configuration file could not be loaded.');\n return undefined;\n }\n\n runInNewContext(moduleResultString, sandboxContext);\n\n if (\n sandboxContext.exports.default &&\n Object.keys(sandboxContext.exports.default).length > 0\n ) {\n // ES Module\n contentDeclaration = sandboxContext.exports.default;\n } else if (\n sandboxContext.module.exports.defaults &&\n Object.keys(sandboxContext.module.exports.defaults).length > 0\n ) {\n // CommonJS\n contentDeclaration = sandboxContext.module.exports.default;\n } else if (\n sandboxContext.module.exports.default &&\n Object.keys(sandboxContext.module.exports.default).length > 0\n ) {\n // ES Module\n contentDeclaration = sandboxContext.module.exports.default;\n } else if (\n sandboxContext.module.exports &&\n Object.keys(sandboxContext.module.exports).length > 0\n ) {\n // Other\n contentDeclaration = sandboxContext.module.exports;\n }\n\n if (typeof contentDeclaration === 'undefined') {\n console.error('Configuration file could not be loaded.');\n return undefined;\n }\n\n return filterValidContentDeclaration(contentDeclaration);\n } catch (error) {\n console.error('Error:', error);\n }\n};\n"],"mappings":"AACA,SAAS,qBAAqB;AAC9B,SAAuB,uBAAuB;AAE9C,SAA4B,iBAAmC;AAE/D,MAAM,aAAa,OAAO,YAAY,QAAQ;AAE9C,MAAM,iBAA0B;AAAA,EAC9B,SAAS;AAAA,IACP,SAAS,CAAC;AAAA,EACZ;AAAA,EACA,QAAQ;AAAA,IACN,SAAS,CAAC;AAAA,EACZ;AAAA,EACA;AAAA,EACA,SAAS,aAAa,cAAc,YAAY,GAAG,IAAI;AACzD;AAEA,MAAM,uBAAqC;AAAA,EACzC,QAAQ;AAAA,IACN,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,SAAS;AAAA,EACX;AAAA,EACA,QAAQ;AAAA;AAAA,EACR,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,OAAO;AAAA,EACP,QAAQ;AACV;AAEA,MAAM,gCAAgC,CACpC,uBACuB;AAEvB,SAAO;AACT;AAOO,MAAM,yBAAyB,CACpC,+BACmC;AACnC,MAAI,qBAAqD;AAEzD,QAAM,gBAAgB,2BAA2B,MAAM,GAAG,EAAE,IAAI,KAAK;AAErE,MAAI;AACF,QAAI,kBAAkB,QAAQ;AAE5B,aAAO,QAAQ,0BAA0B;AAAA,IAC3C;AAIA,UAAM,eAA4B,UAAU;AAAA,MAC1C,aAAa,CAAC,0BAA0B;AAAA,MAExC,GAAG;AAAA,IACL,CAAC;AAED,UAAM,qBAAqB,aAAa,cAAc,CAAC,EAAE;AAEzD,QAAI,CAAC,oBAAoB;AACvB,cAAQ,MAAM,yCAAyC;AACvD,aAAO;AAAA,IACT;AAEA,oBAAgB,oBAAoB,cAAc;AAElD,QACE,eAAe,QAAQ,WACvB,OAAO,KAAK,eAAe,QAAQ,OAAO,EAAE,SAAS,GACrD;AAEA,2BAAqB,eAAe,QAAQ;AAAA,IAC9C,WACE,eAAe,OAAO,QAAQ,YAC9B,OAAO,KAAK,eAAe,OAAO,QAAQ,QAAQ,EAAE,SAAS,GAC7D;AAEA,2BAAqB,eAAe,OAAO,QAAQ;AAAA,IACrD,WACE,eAAe,OAAO,QAAQ,WAC9B,OAAO,KAAK,eAAe,OAAO,QAAQ,OAAO,EAAE,SAAS,GAC5D;AAEA,2BAAqB,eAAe,OAAO,QAAQ;AAAA,IACrD,WACE,eAAe,OAAO,WACtB,OAAO,KAAK,eAAe,OAAO,OAAO,EAAE,SAAS,GACpD;AAEA,2BAAqB,eAAe,OAAO;AAAA,IAC7C;AAEA,QAAI,OAAO,uBAAuB,aAAa;AAC7C,cAAQ,MAAM,yCAAyC;AACvD,aAAO;AAAA,IACT;AAEA,WAAO,8BAA8B,kBAAkB;AAAA,EACzD,SAAS,OAAO;AACd,YAAQ,MAAM,UAAU,KAAK;AAAA,EAC/B;AACF;","names":[]}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { DeclarationContent } from '@intlayer/core';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Function to load, process the module and return the Intlayer DeclarationContent from the module file
|
|
5
|
-
*/
|
|
6
|
-
declare const processContentDeclaration: (file: string) => Promise<DeclarationContent | undefined>;
|
|
7
|
-
|
|
8
|
-
export { processContentDeclaration };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { createDictionaryList } from './createDictionaryList.mjs';
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
declare const generateTypeScriptType: (typeName: string, jsonString: string) => Promise<string>;
|
|
2
|
-
/**
|
|
3
|
-
* This function generates a TypeScript type definition from a JSON object
|
|
4
|
-
*/
|
|
5
|
-
declare const createTypes: (dictionariesPaths: string[]) => Promise<string[]>;
|
|
6
|
-
|
|
7
|
-
export { createTypes, generateTypeScriptType };
|
package/dist/esm/utils.d.mts
DELETED