@infomaximum/package-cli 2.26.2 → 2.27.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/CHANGELOG.md +15 -0
- package/dist/integration/scripts/init.js +21 -1
- package/dist/integration/templates/integrationConfigs.d.ts +8 -5
- package/dist/integration/templates/integrationConfigs.js +73 -10
- package/dist/integration/templates/integrationPackageJson.d.ts +1 -1
- package/dist/integration/templates/integrationPackageJson.js +4 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [2.27.0](https://github.com/Infomaximum/package-cli/compare/v2.26.3...v2.27.0) (2026-02-13)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* add package for semver ([1299345](https://github.com/Infomaximum/package-cli/commit/1299345b70085609574a556252f26a3abfdb421b))
|
|
11
|
+
* added i18n localization ([d1c7ecf](https://github.com/Infomaximum/package-cli/commit/d1c7ecf618595512176757287e73f415b345a7fd))
|
|
12
|
+
|
|
13
|
+
### [2.26.3](https://github.com/Infomaximum/package-cli/compare/v2.26.2...v2.26.3) (2026-01-29)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
* remove useless rule ([38a6858](https://github.com/Infomaximum/package-cli/commit/38a6858188e770b6bf1d9295452c7607774eeb62))
|
|
19
|
+
|
|
5
20
|
### [2.26.2](https://github.com/Infomaximum/package-cli/compare/v2.26.1...v2.26.2) (2026-01-22)
|
|
6
21
|
|
|
7
22
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __awaiter } from "tslib";
|
|
2
|
-
import { INTEGRATION_BABEL_CONFIG, INTEGRATION_COMMITLINT_CONFIG, INTEGRATION_ENV_EXAMPLE_CONFIG, INTEGRATION_ESLINTRC, INTEGRATION_GITIGNORE, INTEGRATION_HUSKY_COMMITMSG, INTEGRATION_HUSKY_PRECOMMIT, INTEGRATION_RC_CONFIG, INTEGRATION_TSCONFIG_JSON, INTEGRATION_VITEST_CONFIG, INTEGRATION_VSCODE_EXTENSIONS, INTEGRATION_VSCODE_LAUNCH, INTEGRATION_VSCODE_SETTINGS, } from "../templates/integrationConfigs.js";
|
|
2
|
+
import { INTEGRATION_BABEL_CONFIG, INTEGRATION_COMMITLINT_CONFIG, INTEGRATION_ENV_EXAMPLE_CONFIG, INTEGRATION_ESLINTRC, INTEGRATION_GITIGNORE, INTEGRATION_HUSKY_COMMITMSG, INTEGRATION_HUSKY_PRECOMMIT, INTEGRATION_I18NEXT_CONFIG, INTEGRATION_I18NEXT_LOCALE_TEMPLATE, INTEGRATION_I18NEXT_REG_NAMESPACES, INTEGRATION_RC_CONFIG, INTEGRATION_TSCONFIG_JSON, INTEGRATION_VITEST_CONFIG, INTEGRATION_VSCODE_EXTENSIONS, INTEGRATION_VSCODE_LAUNCH, INTEGRATION_VSCODE_SETTINGS, } from "../templates/integrationConfigs.js";
|
|
3
3
|
import { getPackageActions } from "../../package/scripts/actions.js";
|
|
4
4
|
import { INTEGRATION_INDEX_TEMPLATE } from "../templates/integrationIndex.js";
|
|
5
5
|
import { INTEGRATION_PACKAGE_JSON_TEMPLATE } from "../templates/integrationPackageJson.js";
|
|
@@ -13,11 +13,31 @@ const actions = ({ packageCliVersion, integrationSdkVersion }) => {
|
|
|
13
13
|
path: "src/index.ts",
|
|
14
14
|
template: INTEGRATION_INDEX_TEMPLATE,
|
|
15
15
|
},
|
|
16
|
+
{
|
|
17
|
+
type: "add",
|
|
18
|
+
path: "src/i18n.ts",
|
|
19
|
+
template: INTEGRATION_I18NEXT_CONFIG,
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
type: "add",
|
|
23
|
+
path: "src/const.ts",
|
|
24
|
+
template: "",
|
|
25
|
+
},
|
|
16
26
|
{
|
|
17
27
|
type: "add",
|
|
18
28
|
path: "src/types/common.d.ts",
|
|
19
29
|
template: "",
|
|
20
30
|
},
|
|
31
|
+
{
|
|
32
|
+
type: "add",
|
|
33
|
+
path: "src/types/i18n.d.ts",
|
|
34
|
+
template: INTEGRATION_I18NEXT_REG_NAMESPACES,
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
type: "add",
|
|
38
|
+
path: "src/locales/ru.json",
|
|
39
|
+
template: INTEGRATION_I18NEXT_LOCALE_TEMPLATE,
|
|
40
|
+
},
|
|
21
41
|
{
|
|
22
42
|
type: "add",
|
|
23
43
|
path: "src/utils/index.ts",
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
export declare const INTEGRATION_TSCONFIG_JSON = "{\n \"compilerOptions\": {\n \"target\": \"ES2024\",\n \"lib\": [\"ES2024\",\"DOM\"],\n \"types\": [\"@infomaximum/integration-sdk\"],\n \"module\": \"Preserve\",\n \"esModuleInterop\": true,\n \"forceConsistentCasingInFileNames\": true,\n \"strict\": true,\n \"skipLibCheck\": true,\n \"isolatedModules\": false\n },\n \"include\": [\"src\"]\n}\n";
|
|
1
|
+
export declare const INTEGRATION_TSCONFIG_JSON = "{\n \"compilerOptions\": {\n \"target\": \"ES2024\",\n \"lib\": [\"ES2024\",\"DOM\"],\n \"types\": [\"@infomaximum/integration-sdk\"],\n \"module\": \"Preserve\",\n \"esModuleInterop\": true,\n \"forceConsistentCasingInFileNames\": true,\n \"strict\": true,\n \"skipLibCheck\": true,\n \"isolatedModules\": false,\n \"resolveJsonModule\": true\n },\n \"include\": [\"src\"]\n}\n";
|
|
2
2
|
export declare const INTEGRATION_GITIGNORE = "# dependencies\n/node_modules\n/.pnp\n.pnp.js\n\n# testing\n/coverage\n\n# production\n/dist\n\n#documentation\n/docs\n\n\n# misc\n.DS_Store\n.env\n.env.local\n.env.development.local\n.env.test.local\n.env.production.local\n\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n\n/build\n.ultra.cache.json\n*.tsbuildinfo\n.node-xmlhttprequest-content-*\n.node-xmlhttprequest-sync-*\n";
|
|
3
3
|
export declare const INTEGRATION_BABEL_CONFIG = "module.exports = {\n sourceType: \"unambiguous\",\n presets: [],\n plugins: [\"@babel/plugin-transform-block-scoping\"],\n};\n";
|
|
4
|
-
export declare const INTEGRATION_ESLINTRC = "import eslint from \"@eslint/js\";\nimport { defineConfig } from \"eslint/config\";\nimport tseslint from \"typescript-eslint\";\nimport fp from \"eslint-plugin-fp\";\nimport sonarPlugin from \"eslint-plugin-sonarjs\";\nexport default defineConfig(\n eslint.configs.recommended,\n tseslint.configs.recommended,\n tseslint.configs.strict,\n tseslint.configs.stylistic,\n\n [\n {\n ignores: [\n \"**/dist/**\",\n \"**/build/**\",\n \"**/node_modules/**\",\n \"**/*.config.js\",\n \"**/*.config.cjs\",\n \"**/*.config.mjs\",\n ],\n files: [\"**/*.ts\", \"**/*.tsx\"],\n languageOptions: {\n ecmaVersion: \"latest\",\n sourceType: \"module\",\n parserOptions: {\n project: \"./tsconfig.json\",\n },\n },\n plugins: {\n \"@typescript-eslint\": tseslint.plugin,\n fp,\n sonarjs: sonarPlugin,\n },\n rules: {\n \"@typescript-eslint/no-unused-vars\": [\n \"error\",\n {\n argsIgnorePattern: \"^_\",\n varsIgnorePattern: \"^_\",\n },\n ],\n \"@typescript-eslint/no-explicit-any\": \"warn\",\n \"@typescript-eslint/consistent-type-definitions\": [\n \"error\",\n \"interface\",\n ],\n \"@typescript-eslint/explicit-function-return-type\": [\n \"error\",\n {\n allowExpressions: true,\n allowTypedFunctionExpressions: true,\n },\n ],\n \"@typescript-eslint/naming-convention\": [\n \"error\",\n {\n selector: [\"
|
|
5
|
-
export declare const INTEGRATION_VITEST_CONFIG = "import { defineConfig } from
|
|
4
|
+
export declare const INTEGRATION_ESLINTRC = "import eslint from \"@eslint/js\";\nimport { defineConfig } from \"eslint/config\";\nimport tseslint from \"typescript-eslint\";\nimport fp from \"eslint-plugin-fp\";\nimport sonarPlugin from \"eslint-plugin-sonarjs\";\nexport default defineConfig(\n eslint.configs.recommended,\n tseslint.configs.recommended,\n tseslint.configs.strict,\n tseslint.configs.stylistic,\n\n [\n {\n ignores: [\n \"**/dist/**\",\n \"**/build/**\",\n \"**/node_modules/**\",\n \"**/*.config.js\",\n \"**/*.config.cjs\",\n \"**/*.config.mjs\",\n ],\n files: [\"**/*.ts\", \"**/*.tsx\"],\n languageOptions: {\n ecmaVersion: \"latest\",\n sourceType: \"module\",\n parserOptions: {\n project: \"./tsconfig.json\",\n },\n },\n plugins: {\n \"@typescript-eslint\": tseslint.plugin,\n fp,\n sonarjs: sonarPlugin,\n },\n rules: {\n \"@typescript-eslint/no-unused-vars\": [\n \"error\",\n {\n argsIgnorePattern: \"^_\",\n varsIgnorePattern: \"^_\",\n },\n ],\n \"@typescript-eslint/no-explicit-any\": \"warn\",\n \"@typescript-eslint/consistent-type-definitions\": [\n \"error\",\n \"interface\",\n ],\n \"@typescript-eslint/explicit-function-return-type\": [\n \"error\",\n {\n allowExpressions: true,\n allowTypedFunctionExpressions: true,\n },\n ],\n \"@typescript-eslint/naming-convention\": [\n \"error\",\n {\n selector: [\"function\"],\n format: [\"camelCase\"],\n leadingUnderscore: \"allow\",\n trailingUnderscore: \"forbid\",\n },\n\n {\n selector: [\"typeLike\", \"class\"],\n format: [\"PascalCase\"],\n },\n {\n selector: \"interface\",\n format: [\"PascalCase\"],\n custom: {\n regex: \"^I[A-Z]\",\n match: true,\n },\n },\n {\n selector: \"typeAlias\",\n format: [\"PascalCase\"],\n custom: {\n regex: \"^T[A-Z]\",\n match: true,\n },\n },\n {\n selector: \"enum\",\n format: [\"PascalCase\"],\n custom: {\n regex: \"^E[A-Z]\",\n match: true,\n },\n },\n {\n selector: \"enumMember\",\n format: [\"PascalCase\"],\n },\n {\n selector: \"method\",\n format: [\"camelCase\"],\n },\n {\n selector: \"parameter\",\n format: [\"camelCase\"],\n leadingUnderscore: \"allow\",\n },\n ],\n \"@typescript-eslint/prefer-for-of\": \"error\",\n \"prefer-const\": \"error\",\n \"no-var\": \"error\",\n \"prefer-arrow-callback\": \"error\",\n\n eqeqeq: [\"error\", \"always\"],\n yoda: \"error\",\n \"no-lonely-if\": \"error\",\n curly: \"error\",\n // \u041E\u0433\u0440\u0430\u0447\u0438\u0447\u0435\u043D\u0438\u0435 \u043D\u0430 \u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u0441\u0442\u0440\u043E\u043A \u0432 \u0444\u0443\u043D\u043A\u0446\u0438\u0438, \u0447\u0442\u043E\u0431\u044B \u043F\u043E\u043E\u0449\u0440\u044F\u0442\u044C \u0431\u043E\u043B\u0435\u0435 \u043C\u0435\u043B\u043A\u0438\u0435, \u0431\u043E\u043B\u0435\u0435 \u0443\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u043C\u044B\u0435 \u0444\u0443\u043D\u043A\u0446\u0438\u0438.\n \"max-lines-per-function\": [\n \"error\",\n { max: 100, skipComments: true, skipBlankLines: true },\n ],\n \"max-depth\": [\"error\", { max: 3 }],\n\n \"no-param-reassign\": [\"error\", { props: true }],\n //sonarjs \u043F\u0440\u0430\u0432\u0438\u043B\u0430\n \"sonarjs/cognitive-complexity\": [\"error\", 10],\n \"sonarjs/no-identical-expressions\": \"error\",\n \"sonarjs/no-ignored-return\": \"error\",\n \"sonarjs/no-redundant-boolean\": \"error\",\n },\n },\n ]\n);\n";
|
|
5
|
+
export declare const INTEGRATION_VITEST_CONFIG = "import { defineConfig } from \"vitest/config\";\n\nexport default defineConfig({\n test: {\n coverage: {\n provider: \"v8\",\n exclude: [\n \"**/*.config.*\",\n \"src/index.ts\",\n \"**/*.types.ts\",\n \"**/types/*\",\n \"**/*.d.ts\",\n \"**/const.ts\",\n \"**/i18n.ts\",\n \"**/*.js\",\n \"**/connections/*\",\n ],\n },\n },\n});\n";
|
|
6
6
|
export declare const INTEGRATION_RC_CONFIG = "//@ts-check\n\nrequire(\"dotenv\").config();\n\nconst query = `\nmutation UpdateIntegration($id: Long!, $js_code: String) {\n automation {\n integration {\n update(id: $id, js_code: $js_code) {\n id\n }\n }\n }\n}`;\n\n/**\n * @type {import(\"@infomaximum/package-cli\").IntegrationRCConfig}\n */\nconst config = {\n entry: \"src/index.ts\",\n fetcher: (integrationCode) => {\n return {\n graphqlUrl: process.env.GRAPHQL_URL,\n apiKey: process.env.API_KEY,\n query,\n variables: {\n id: process.env.INTEGRATION_ID,\n js_code: integrationCode,\n },\n };\n },\n\n debugging: {\n seriesIterations: 3,\n commonAuthData: {\n BASE_URL: process.env.WEBHOOK_URL\n },\n blocks: {},\n connections: {},\n },\n};\n\nmodule.exports = config;\n";
|
|
7
7
|
export declare const INTEGRATION_ENV_EXAMPLE_CONFIG = "INTEGRATION_ID=0\nGRAPHQL_URL=https://example.com/graphql\nAPI_KEY=123456789qwertyuiop\nWEBHOOK_URL=https://example.com/webhook\n";
|
|
8
8
|
export declare const INTEGRATION_VSCODE_LAUNCH: string;
|
|
9
|
-
export declare const INTEGRATION_VSCODE_SETTINGS = "{\n \"typescript.tsdk\": \"node_modules/typescript/lib\",\n \"integration-debugger.isEnabled\": true,\n \"integration-debugger.debugConfigurationName\": \"Debug Integration\",\n \"integration-debugger.functionNames\": {\n
|
|
10
|
-
export declare const INTEGRATION_VSCODE_EXTENSIONS = "{\n \"recommendations\": [\"Jokerok.integration-debugger\"]\n}\n";
|
|
9
|
+
export declare const INTEGRATION_VSCODE_SETTINGS = "{\n \"typescript.tsdk\": \"node_modules/typescript/lib\",\n \"integration-debugger.isEnabled\": true,\n \"integration-debugger.debugConfigurationName\": \"Debug Integration\",\n \"integration-debugger.functionNames\": {\n \"single\": [\"executePagination\", \"execute\"],\n \"series\": [\"executePagination\"]\n },\n \"i18n-ally.localesPaths\": [\"src/locales\"],\n \"i18n-ally.sourceLanguage\": \"ru\",\n \"i18n-ally.displayLanguage\": \"ru\",\n \"i18n-ally.enabledParsers\": [\"json\"],\n \"i18n-ally.keystyle\": \"nested\",\n \"i18n-ally.pathMatcher\": \"{locale}.json\",\n \"i18n-ally.namespace\": true,\n \"i18n-ally.extract.autoDetect\": true\n}\n";
|
|
10
|
+
export declare const INTEGRATION_VSCODE_EXTENSIONS = "{\n \"recommendations\": [\"Jokerok.integration-debugger\",\"lokalise.i18n-ally\"]\n}\n";
|
|
11
11
|
export declare const INTEGRATION_HUSKY_PRECOMMIT = "yarn lint\n";
|
|
12
12
|
export declare const INTEGRATION_HUSKY_COMMITMSG = "yarn commitlint --edit $1\n";
|
|
13
13
|
export declare const INTEGRATION_COMMITLINT_CONFIG = "{\n \"extends\": [\"@commitlint/config-conventional\"]\n}\n";
|
|
14
|
+
export declare const INTEGRATION_I18NEXT_CONFIG = "import i18next from \"i18next\";\nimport ruLocale from \"./locales/ru.json\";\n\ni18next.init({\n lng: \"ru\",\n fallbackLng: \"ru\",\n ns: [\"ru\", \"templates\"],\n defaultNS: \"ru\",\n resources: {\n ru: {\n ru: ruLocale,\n },\n },\n});\n\nexport default i18next;\n";
|
|
15
|
+
export declare const INTEGRATION_I18NEXT_REG_NAMESPACES = "import \"i18next\";\nimport ruLocale from \"../locales/ru.json\";\n\ndeclare module \"i18next\" {\n interface CustomTypeOptions {\n defaultNS: \"ru\";\n resources: {\n ru: typeof ruLocale; // \u041D\u0435\u0439\u043C\u0441\u043F\u0435\u0439\u0441 \"ru\"\n };\n }\n}\n";
|
|
16
|
+
export declare const INTEGRATION_I18NEXT_LOCALE_TEMPLATE = "{\n \"blocks\": {\n \"template\": {\n \"blockname\": \"\u0411\u0430\u0437\u043E\u0432\u044B\u0439 \u0431\u043B\u043E\u043A\",\n \"blockdescription\": \"\u041F\u043E\u0434\u0440\u043E\u0431\u043D\u043E\u0435 \u043E\u043F\u0438\u0441\u0430\u043D\u0438\u0435 \u0444\u0443\u043D\u043A\u0446\u0438\u043E\u043D\u0430\u043B\u044C\u043D\u043E\u0441\u0442\u0438 \u0431\u043B\u043E\u043A\u0430\",\n \"fields\": {\n \"base_url\": {\n \"label\": \"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 url\",\n \"hint\": \"\u041D\u0430\u0447\u0438\u043D\u0430\u0435\u0442\u0441\u044F \u0441 https\"\n }\n }\n }\n }\n}\n";
|
|
@@ -11,7 +11,8 @@ export const INTEGRATION_TSCONFIG_JSON = `\
|
|
|
11
11
|
"forceConsistentCasingInFileNames": true,
|
|
12
12
|
"strict": true,
|
|
13
13
|
"skipLibCheck": true,
|
|
14
|
-
"isolatedModules": false
|
|
14
|
+
"isolatedModules": false,
|
|
15
|
+
"resolveJsonModule": true
|
|
15
16
|
},
|
|
16
17
|
"include": ["src"]
|
|
17
18
|
}
|
|
@@ -115,7 +116,7 @@ export default defineConfig(
|
|
|
115
116
|
"@typescript-eslint/naming-convention": [
|
|
116
117
|
"error",
|
|
117
118
|
{
|
|
118
|
-
selector: ["
|
|
119
|
+
selector: ["function"],
|
|
119
120
|
format: ["camelCase"],
|
|
120
121
|
leadingUnderscore: "allow",
|
|
121
122
|
trailingUnderscore: "forbid",
|
|
@@ -191,15 +192,22 @@ export default defineConfig(
|
|
|
191
192
|
);
|
|
192
193
|
`;
|
|
193
194
|
export const INTEGRATION_VITEST_CONFIG = `\
|
|
194
|
-
import { defineConfig } from
|
|
195
|
+
import { defineConfig } from "vitest/config";
|
|
195
196
|
|
|
196
197
|
export default defineConfig({
|
|
197
198
|
test: {
|
|
198
199
|
coverage: {
|
|
199
|
-
|
|
200
|
+
provider: "v8",
|
|
200
201
|
exclude: [
|
|
201
|
-
|
|
202
|
-
|
|
202
|
+
"**/*.config.*",
|
|
203
|
+
"src/index.ts",
|
|
204
|
+
"**/*.types.ts",
|
|
205
|
+
"**/types/*",
|
|
206
|
+
"**/*.d.ts",
|
|
207
|
+
"**/const.ts",
|
|
208
|
+
"**/i18n.ts",
|
|
209
|
+
"**/*.js",
|
|
210
|
+
"**/connections/*",
|
|
203
211
|
],
|
|
204
212
|
},
|
|
205
213
|
},
|
|
@@ -287,14 +295,22 @@ export const INTEGRATION_VSCODE_SETTINGS = `\
|
|
|
287
295
|
"integration-debugger.isEnabled": true,
|
|
288
296
|
"integration-debugger.debugConfigurationName": "Debug Integration",
|
|
289
297
|
"integration-debugger.functionNames": {
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
298
|
+
"single": ["executePagination", "execute"],
|
|
299
|
+
"series": ["executePagination"]
|
|
300
|
+
},
|
|
301
|
+
"i18n-ally.localesPaths": ["src/locales"],
|
|
302
|
+
"i18n-ally.sourceLanguage": "ru",
|
|
303
|
+
"i18n-ally.displayLanguage": "ru",
|
|
304
|
+
"i18n-ally.enabledParsers": ["json"],
|
|
305
|
+
"i18n-ally.keystyle": "nested",
|
|
306
|
+
"i18n-ally.pathMatcher": "{locale}.json",
|
|
307
|
+
"i18n-ally.namespace": true,
|
|
308
|
+
"i18n-ally.extract.autoDetect": true
|
|
293
309
|
}
|
|
294
310
|
`;
|
|
295
311
|
export const INTEGRATION_VSCODE_EXTENSIONS = `\
|
|
296
312
|
{
|
|
297
|
-
"recommendations": ["Jokerok.integration-debugger"]
|
|
313
|
+
"recommendations": ["Jokerok.integration-debugger","lokalise.i18n-ally"]
|
|
298
314
|
}
|
|
299
315
|
`;
|
|
300
316
|
export const INTEGRATION_HUSKY_PRECOMMIT = `\
|
|
@@ -308,3 +324,50 @@ export const INTEGRATION_COMMITLINT_CONFIG = `\
|
|
|
308
324
|
"extends": ["@commitlint/config-conventional"]
|
|
309
325
|
}
|
|
310
326
|
`;
|
|
327
|
+
export const INTEGRATION_I18NEXT_CONFIG = `\
|
|
328
|
+
import i18next from "i18next";
|
|
329
|
+
import ruLocale from "./locales/ru.json";
|
|
330
|
+
|
|
331
|
+
i18next.init({
|
|
332
|
+
lng: "ru",
|
|
333
|
+
fallbackLng: "ru",
|
|
334
|
+
ns: ["ru", "templates"],
|
|
335
|
+
defaultNS: "ru",
|
|
336
|
+
resources: {
|
|
337
|
+
ru: {
|
|
338
|
+
ru: ruLocale,
|
|
339
|
+
},
|
|
340
|
+
},
|
|
341
|
+
});
|
|
342
|
+
|
|
343
|
+
export default i18next;
|
|
344
|
+
`;
|
|
345
|
+
export const INTEGRATION_I18NEXT_REG_NAMESPACES = `\
|
|
346
|
+
import "i18next";
|
|
347
|
+
import ruLocale from "../locales/ru.json";
|
|
348
|
+
|
|
349
|
+
declare module "i18next" {
|
|
350
|
+
interface CustomTypeOptions {
|
|
351
|
+
defaultNS: "ru";
|
|
352
|
+
resources: {
|
|
353
|
+
ru: typeof ruLocale; // Неймспейс "ru"
|
|
354
|
+
};
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
`;
|
|
358
|
+
export const INTEGRATION_I18NEXT_LOCALE_TEMPLATE = `\
|
|
359
|
+
{
|
|
360
|
+
"blocks": {
|
|
361
|
+
"template": {
|
|
362
|
+
"blockname": "Базовый блок",
|
|
363
|
+
"blockdescription": "Подробное описание функциональности блока",
|
|
364
|
+
"fields": {
|
|
365
|
+
"base_url": {
|
|
366
|
+
"label": "Введите url",
|
|
367
|
+
"hint": "Начинается с https"
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const INTEGRATION_PACKAGE_JSON_TEMPLATE = "{\n \"name\": \"template_integration\",\n \"version\": \"1.0.0\",\n \"main\": \"src/index.ts\",\n \"scripts\": {\n \"build\": \"im-package-cli integration build\",\n \"build:script\": \"im-package-cli integration build --type=script --beautify\",\n \"dev\": \"im-package-cli integration build --watch --beautify\",\n \"serve\": \"im-package-cli integration build --watch --fetchToServer --beautify\",\n \"lint\": \"tsc --noEmit && eslint src/ --ext .ts,.tsx --quiet\",\n \"test\": \"vitest --run\",\n \"test:coverage\": \"vitest --run --coverage\",\n \"test:ui\": \"vitest --ui\",\n \"debug\": \"node --import tsx ./node_modules/.bin/im-package-cli integration debug\",\n \"prepare\": \"husky\"\n },\n \"devDependencies\": {\n \"@babel/plugin-transform-block-scoping\": \"^7.25.9\",\n \"@eslint/js\": \"^9.23.0\",\n \"@infomaximum/integration-sdk\": \"^{{integrationSdkVersion}}\",\n \"@infomaximum/package-cli\": \"^{{packageCliVersion}}\",\n \"@types/node\": \"^0\",\n \"dotenv\": \"^16.4.7\",\n \"eslint\": \"^9.23.0\",\n \"globals\": \"^15.14.0\",\n \"tsx\": \"^4.19.3\",\n \"typescript\": \"^5.8.2\",\n \"typescript-eslint\": \"^8.29.0\",\n \"vitest\": \"^3.0.4\",\n \"@vitest/coverage-v8\": \"3.0.7\",\n \"@vitest/ui\": \"3.0.7\",\n \"husky\": \"^9.1.7\",\n \"eslint-plugin-fp\": \"^2.3.0\",\n \"eslint-plugin-sonarjs\": \"^3.0.5\",\n \"@commitlint/cli\": \"^19.8.1\",\n \"@commitlint/config-conventional\": \"^19.8.1\",\n \"@infomaximum/config\": \"^2.7.0\",\n \"commitlint\": \"^19.8.1\"\n }\n}\n";
|
|
1
|
+
export declare const INTEGRATION_PACKAGE_JSON_TEMPLATE = "{\n \"name\": \"template_integration\",\n \"version\": \"1.0.0\",\n \"main\": \"src/index.ts\",\n \"scripts\": {\n \"build\": \"im-package-cli integration build\",\n \"build:script\": \"im-package-cli integration build --type=script --beautify\",\n \"dev\": \"im-package-cli integration build --watch --beautify\",\n \"serve\": \"im-package-cli integration build --watch --fetchToServer --beautify\",\n \"lint\": \"tsc --noEmit && eslint src/ --ext .ts,.tsx --quiet\",\n \"test\": \"vitest --run\",\n \"test:coverage\": \"vitest --run --coverage\",\n \"test:ui\": \"vitest --ui\",\n \"debug\": \"node --import tsx ./node_modules/.bin/im-package-cli integration debug\",\n \"prepare\": \"husky\"\n },\n \"devDependencies\": {\n \"@babel/plugin-transform-block-scoping\": \"^7.25.9\",\n \"@eslint/js\": \"^9.23.0\",\n \"@infomaximum/integration-sdk\": \"^{{integrationSdkVersion}}\",\n \"@infomaximum/package-cli\": \"^{{packageCliVersion}}\",\n \"@types/node\": \"^0\",\n \"dotenv\": \"^16.4.7\",\n \"eslint\": \"^9.23.0\",\n \"globals\": \"^15.14.0\",\n \"tsx\": \"^4.19.3\",\n \"typescript\": \"^5.8.2\",\n \"typescript-eslint\": \"^8.29.0\",\n \"vitest\": \"^3.0.4\",\n \"@vitest/coverage-v8\": \"3.0.7\",\n \"@vitest/ui\": \"3.0.7\",\n \"husky\": \"^9.1.7\",\n \"standard-version\": \"^9.5.0\",\n \"eslint-plugin-fp\": \"^2.3.0\",\n \"eslint-plugin-sonarjs\": \"^3.0.5\",\n \"@commitlint/cli\": \"^19.8.1\",\n \"@commitlint/config-conventional\": \"^19.8.1\",\n \"@infomaximum/config\": \"^2.7.0\",\n \"commitlint\": \"^19.8.1\"\n },\n \"dependencies\": {\n \"i18next\": \"^25.8.5\"\n }\n}\n";
|
|
@@ -33,12 +33,16 @@ export const INTEGRATION_PACKAGE_JSON_TEMPLATE = `\
|
|
|
33
33
|
"@vitest/coverage-v8": "3.0.7",
|
|
34
34
|
"@vitest/ui": "3.0.7",
|
|
35
35
|
"husky": "^9.1.7",
|
|
36
|
+
"standard-version": "^9.5.0",
|
|
36
37
|
"eslint-plugin-fp": "^2.3.0",
|
|
37
38
|
"eslint-plugin-sonarjs": "^3.0.5",
|
|
38
39
|
"@commitlint/cli": "^19.8.1",
|
|
39
40
|
"@commitlint/config-conventional": "^19.8.1",
|
|
40
41
|
"@infomaximum/config": "^2.7.0",
|
|
41
42
|
"commitlint": "^19.8.1"
|
|
43
|
+
},
|
|
44
|
+
"dependencies": {
|
|
45
|
+
"i18next": "^25.8.5"
|
|
42
46
|
}
|
|
43
47
|
}
|
|
44
48
|
`;
|