Skip to content

Commit

Permalink
Merge pull request #259 from RabotaRu/v3.0.1
Browse files Browse the repository at this point in the history
V3.0.1
  • Loading branch information
rpiontik committed Apr 3, 2023
2 parents e92b870 + d6444b1 commit 8c0d584
Show file tree
Hide file tree
Showing 86 changed files with 11,844 additions and 3,763 deletions.
13 changes: 13 additions & 0 deletions babel-jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = {
presets: [
['@babel/preset-typescript', { 'onlyRemoveTypeImports': true }],
'@vue/cli-plugin-babel/preset',
'@babel/preset-env'
],
plugins: [
'@babel/plugin-proposal-class-properties',
'@babel/proposal-object-rest-spread',
'@babel/transform-runtime',
'babel-plugin-transform-import-meta'
]
};
15 changes: 15 additions & 0 deletions config.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
declare var DochubVsCodeExt: {
rootManifest: string,
settings: {
isEnterprise: boolean, // Признак использования фронта в плагине как Enterprise портала
render: {
external: boolean,
mode: string,
Expand All @@ -11,6 +12,20 @@ declare var DochubVsCodeExt: {
}
};

// eslint-disable-next-line no-var
declare var DocHubIDEACodeExt: {
rootManifest: string, // Корневой манифест (с чего начинается загрузка)
settings: {
isEnterprise: boolean, // Признак использования фронта в плагине как Enterprise портала
render: {
external: boolean, // Признак рендера на внешнем сервере
mode: string, // Режим рендера ELK / Smetana / GraphVis
request_type: string, // Тип запросов к сервер рендеринга POST / GET
server: string // Сервер рендеринга
}
}
};

declare const vscode: {
postMessage: ({
command,
Expand Down
Binary file not shown.
18 changes: 14 additions & 4 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
module.exports = {
'testEnvironment': 'jest-environment-jsdom',
setupFiles: [
'fake-indexeddb/auto'
'fake-indexeddb/auto',
'dotenv/config'
],
setupFilesAfterEnv: [
'<rootDir>/jest.setup.js'
],
transform: {
'^.+\\.js$': ['babel-jest', { configFile: './babel-jest.config.js' }],
'^.+\\.mjs$': ['babel-jest', { configFile: './babel-jest.config.js' }],
'^.+\\.ts$': 'babel-jest'
},
transformIgnorePatterns: [
'<rootDir>/node_modules/'
],
Expand All @@ -11,15 +20,16 @@ module.exports = {
'src'
],
moduleNameMapper: {
'^@/storage/(.*)': '<rootDir>/src/storage/$1',
'^@/helpers/(.*)': '<rootDir>/src/helpers/$1'
uuid: require.resolve('uuid'),
'^@front/(.*)': '<rootDir>/src/frontend/$1',
'^@global/(.*)': '<rootDir>/src/global/$1',
'^@back/(.*)': '<rootDir>/src/backend/$1'
},
moduleFileExtensions: [
'js',
'ts',
'tsx',
'vue'
],
testTimeout: 5000,
verbose: true
};
8 changes: 8 additions & 0 deletions jest.setup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
global.console = {
...console,
log: jest.fn(),
debug: jest.fn(),
info: jest.fn(),
warn: jest.fn(),
// error: jest.fn(),
};

0 comments on commit 8c0d584

Please sign in to comment.