@intlayer/chokidar 5.3.6 → 5.3.7
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/fetchDistantDictionaryKeys.cjs +3 -4
- package/dist/cjs/fetchDistantDictionaryKeys.cjs.map +1 -1
- package/dist/esm/fetchDistantDictionaryKeys.mjs +3 -4
- package/dist/esm/fetchDistantDictionaryKeys.mjs.map +1 -1
- package/dist/types/fetchDistantDictionaryKeys.d.ts +2 -1
- package/dist/types/fetchDistantDictionaryKeys.d.ts.map +1 -1
- package/package.json +12 -12
|
@@ -23,15 +23,14 @@ __export(fetchDistantDictionaryKeys_exports, {
|
|
|
23
23
|
module.exports = __toCommonJS(fetchDistantDictionaryKeys_exports);
|
|
24
24
|
var import_api = require("@intlayer/api");
|
|
25
25
|
var import_config = require("@intlayer/config");
|
|
26
|
-
const fetchDistantDictionaryKeys = async () => {
|
|
27
|
-
const
|
|
28
|
-
const { clientId, clientSecret } = config.editor;
|
|
26
|
+
const fetchDistantDictionaryKeys = async (configuration = (0, import_config.getConfiguration)()) => {
|
|
27
|
+
const { clientId, clientSecret } = configuration.editor;
|
|
29
28
|
if (!clientId || !clientSecret) {
|
|
30
29
|
throw new Error(
|
|
31
30
|
"Missing OAuth2 client ID or client secret. To get access token go to https://intlayer.org/dashboard/project."
|
|
32
31
|
);
|
|
33
32
|
}
|
|
34
|
-
const intlayerAPI = (0, import_api.getIntlayerAPI)(void 0,
|
|
33
|
+
const intlayerAPI = (0, import_api.getIntlayerAPI)(void 0, configuration);
|
|
35
34
|
const oAuth2TokenResult = await intlayerAPI.auth.getOAuth2AccessToken();
|
|
36
35
|
const oAuth2AccessToken = oAuth2TokenResult.data?.accessToken;
|
|
37
36
|
const getDictionariesKeysResult = await intlayerAPI.dictionary.getDictionariesKeys({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/fetchDistantDictionaryKeys.ts"],"sourcesContent":["import { getIntlayerAPI } from '@intlayer/api';\nimport { getConfiguration } from '@intlayer/config';\n\nexport const fetchDistantDictionaryKeys = async (): Promise<string[]> => {\n const
|
|
1
|
+
{"version":3,"sources":["../../src/fetchDistantDictionaryKeys.ts"],"sourcesContent":["import { getIntlayerAPI } from '@intlayer/api';\nimport { getConfiguration, type IntlayerConfig } from '@intlayer/config';\n\nexport const fetchDistantDictionaryKeys = async (\n configuration: IntlayerConfig = getConfiguration()\n): Promise<string[]> => {\n const { clientId, clientSecret } = configuration.editor;\n\n if (!clientId || !clientSecret) {\n throw new Error(\n 'Missing OAuth2 client ID or client secret. To get access token go to https://intlayer.org/dashboard/project.'\n );\n }\n\n const intlayerAPI = getIntlayerAPI(undefined, configuration);\n\n const oAuth2TokenResult = await intlayerAPI.auth.getOAuth2AccessToken();\n\n const oAuth2AccessToken = oAuth2TokenResult.data?.accessToken;\n\n // Get the list of dictionary keys\n const getDictionariesKeysResult =\n await intlayerAPI.dictionary.getDictionariesKeys({\n headers: { Authorization: `Bearer ${oAuth2AccessToken}` },\n });\n\n if (!getDictionariesKeysResult.data) {\n throw new Error('No distant dictionaries found');\n }\n\n const distantDictionariesKeys: string[] = getDictionariesKeysResult.data;\n\n // Apply any filtering if needed\n return distantDictionariesKeys;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAA+B;AAC/B,oBAAsD;AAE/C,MAAM,6BAA6B,OACxC,oBAAgC,gCAAiB,MAC3B;AACtB,QAAM,EAAE,UAAU,aAAa,IAAI,cAAc;AAEjD,MAAI,CAAC,YAAY,CAAC,cAAc;AAC9B,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AAEA,QAAM,kBAAc,2BAAe,QAAW,aAAa;AAE3D,QAAM,oBAAoB,MAAM,YAAY,KAAK,qBAAqB;AAEtE,QAAM,oBAAoB,kBAAkB,MAAM;AAGlD,QAAM,4BACJ,MAAM,YAAY,WAAW,oBAAoB;AAAA,IAC/C,SAAS,EAAE,eAAe,UAAU,iBAAiB,GAAG;AAAA,EAC1D,CAAC;AAEH,MAAI,CAAC,0BAA0B,MAAM;AACnC,UAAM,IAAI,MAAM,+BAA+B;AAAA,EACjD;AAEA,QAAM,0BAAoC,0BAA0B;AAGpE,SAAO;AACT;","names":[]}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { getIntlayerAPI } from "@intlayer/api";
|
|
2
2
|
import { getConfiguration } from "@intlayer/config";
|
|
3
|
-
const fetchDistantDictionaryKeys = async () => {
|
|
4
|
-
const
|
|
5
|
-
const { clientId, clientSecret } = config.editor;
|
|
3
|
+
const fetchDistantDictionaryKeys = async (configuration = getConfiguration()) => {
|
|
4
|
+
const { clientId, clientSecret } = configuration.editor;
|
|
6
5
|
if (!clientId || !clientSecret) {
|
|
7
6
|
throw new Error(
|
|
8
7
|
"Missing OAuth2 client ID or client secret. To get access token go to https://intlayer.org/dashboard/project."
|
|
9
8
|
);
|
|
10
9
|
}
|
|
11
|
-
const intlayerAPI = getIntlayerAPI(void 0,
|
|
10
|
+
const intlayerAPI = getIntlayerAPI(void 0, configuration);
|
|
12
11
|
const oAuth2TokenResult = await intlayerAPI.auth.getOAuth2AccessToken();
|
|
13
12
|
const oAuth2AccessToken = oAuth2TokenResult.data?.accessToken;
|
|
14
13
|
const getDictionariesKeysResult = await intlayerAPI.dictionary.getDictionariesKeys({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/fetchDistantDictionaryKeys.ts"],"sourcesContent":["import { getIntlayerAPI } from '@intlayer/api';\nimport { getConfiguration } from '@intlayer/config';\n\nexport const fetchDistantDictionaryKeys = async (): Promise<string[]> => {\n const
|
|
1
|
+
{"version":3,"sources":["../../src/fetchDistantDictionaryKeys.ts"],"sourcesContent":["import { getIntlayerAPI } from '@intlayer/api';\nimport { getConfiguration, type IntlayerConfig } from '@intlayer/config';\n\nexport const fetchDistantDictionaryKeys = async (\n configuration: IntlayerConfig = getConfiguration()\n): Promise<string[]> => {\n const { clientId, clientSecret } = configuration.editor;\n\n if (!clientId || !clientSecret) {\n throw new Error(\n 'Missing OAuth2 client ID or client secret. To get access token go to https://intlayer.org/dashboard/project.'\n );\n }\n\n const intlayerAPI = getIntlayerAPI(undefined, configuration);\n\n const oAuth2TokenResult = await intlayerAPI.auth.getOAuth2AccessToken();\n\n const oAuth2AccessToken = oAuth2TokenResult.data?.accessToken;\n\n // Get the list of dictionary keys\n const getDictionariesKeysResult =\n await intlayerAPI.dictionary.getDictionariesKeys({\n headers: { Authorization: `Bearer ${oAuth2AccessToken}` },\n });\n\n if (!getDictionariesKeysResult.data) {\n throw new Error('No distant dictionaries found');\n }\n\n const distantDictionariesKeys: string[] = getDictionariesKeysResult.data;\n\n // Apply any filtering if needed\n return distantDictionariesKeys;\n};\n"],"mappings":"AAAA,SAAS,sBAAsB;AAC/B,SAAS,wBAA6C;AAE/C,MAAM,6BAA6B,OACxC,gBAAgC,iBAAiB,MAC3B;AACtB,QAAM,EAAE,UAAU,aAAa,IAAI,cAAc;AAEjD,MAAI,CAAC,YAAY,CAAC,cAAc;AAC9B,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AAEA,QAAM,cAAc,eAAe,QAAW,aAAa;AAE3D,QAAM,oBAAoB,MAAM,YAAY,KAAK,qBAAqB;AAEtE,QAAM,oBAAoB,kBAAkB,MAAM;AAGlD,QAAM,4BACJ,MAAM,YAAY,WAAW,oBAAoB;AAAA,IAC/C,SAAS,EAAE,eAAe,UAAU,iBAAiB,GAAG;AAAA,EAC1D,CAAC;AAEH,MAAI,CAAC,0BAA0B,MAAM;AACnC,UAAM,IAAI,MAAM,+BAA+B;AAAA,EACjD;AAEA,QAAM,0BAAoC,0BAA0B;AAGpE,SAAO;AACT;","names":[]}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import { type IntlayerConfig } from '@intlayer/config';
|
|
2
|
+
export declare const fetchDistantDictionaryKeys: (configuration?: IntlayerConfig) => Promise<string[]>;
|
|
2
3
|
//# sourceMappingURL=fetchDistantDictionaryKeys.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetchDistantDictionaryKeys.d.ts","sourceRoot":"","sources":["../../src/fetchDistantDictionaryKeys.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fetchDistantDictionaryKeys.d.ts","sourceRoot":"","sources":["../../src/fetchDistantDictionaryKeys.ts"],"names":[],"mappings":"AACA,OAAO,EAAoB,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEzE,eAAO,MAAM,0BAA0B,GACrC,gBAAe,cAAmC,KACjD,OAAO,CAAC,MAAM,EAAE,CA6BlB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intlayer/chokidar",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.7",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Uses chokidar to scan and build Intlayer declaration files into dictionaries based on Intlayer configuration.",
|
|
6
6
|
"keywords": [
|
|
@@ -63,11 +63,11 @@
|
|
|
63
63
|
"deepmerge": "^4.3.1",
|
|
64
64
|
"fast-glob": "^3.3.3",
|
|
65
65
|
"p-limit": "^3.1.0",
|
|
66
|
-
"@intlayer/api": "5.3.
|
|
67
|
-
"@intlayer/config": "5.3.
|
|
68
|
-
"@intlayer/core": "5.3.
|
|
69
|
-
"@intlayer/dictionaries-entry": "5.3.
|
|
70
|
-
"intlayer": "5.3.
|
|
66
|
+
"@intlayer/api": "5.3.7",
|
|
67
|
+
"@intlayer/config": "5.3.7",
|
|
68
|
+
"@intlayer/core": "5.3.7",
|
|
69
|
+
"@intlayer/dictionaries-entry": "5.3.7",
|
|
70
|
+
"intlayer": "5.3.7"
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
73
|
"@changesets/cli": "2.27.12",
|
|
@@ -82,19 +82,19 @@
|
|
|
82
82
|
"tsc-alias": "^1.8.10",
|
|
83
83
|
"tsup": "^8.3.5",
|
|
84
84
|
"typescript": "^5.7.3",
|
|
85
|
-
"@intlayer/backend": "5.3.
|
|
85
|
+
"@intlayer/backend": "5.3.7",
|
|
86
86
|
"@utils/eslint-config": "1.0.4",
|
|
87
|
-
"@utils/ts-config": "1.0.4",
|
|
88
87
|
"@utils/ts-config-types": "1.0.4",
|
|
88
|
+
"@utils/ts-config": "1.0.4",
|
|
89
89
|
"@utils/tsup-config": "1.0.4"
|
|
90
90
|
},
|
|
91
91
|
"peerDependencies": {
|
|
92
92
|
"fast-glob": "^3.3.3",
|
|
93
93
|
"react": ">=16.0.0",
|
|
94
|
-
"@intlayer/api": "5.3.
|
|
95
|
-
"@intlayer/config": "5.3.
|
|
96
|
-
"@intlayer/core": "5.3.
|
|
97
|
-
"intlayer": "5.3.
|
|
94
|
+
"@intlayer/api": "5.3.7",
|
|
95
|
+
"@intlayer/config": "5.3.7",
|
|
96
|
+
"@intlayer/core": "5.3.7",
|
|
97
|
+
"intlayer": "5.3.7"
|
|
98
98
|
},
|
|
99
99
|
"engines": {
|
|
100
100
|
"node": ">=14.18"
|