@kontur.candy/tools 2.236.0 → 2.236.2
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.
|
@@ -75,43 +75,28 @@ async function createConfigVariant(options) {
|
|
|
75
75
|
}]
|
|
76
76
|
}, {
|
|
77
77
|
test: /\.jsx?$/,
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
corejs: 3
|
|
101
|
-
}]],
|
|
102
|
-
plugins: [[require.resolve("@babel/plugin-proposal-decorators"), {
|
|
103
|
-
legacy: true
|
|
104
|
-
}], [require.resolve("@babel/plugin-transform-class-properties"), {
|
|
105
|
-
loose: true
|
|
106
|
-
}], require.resolve("@babel/plugin-proposal-export-default-from")],
|
|
107
|
-
cacheDirectory: true
|
|
108
|
-
}
|
|
109
|
-
}],
|
|
110
|
-
resolve: {
|
|
111
|
-
fullySpecified: false
|
|
112
|
-
},
|
|
113
|
-
exclude: [/node_modules/]
|
|
114
|
-
}]
|
|
78
|
+
use: [{
|
|
79
|
+
loader: require.resolve("babel-loader"),
|
|
80
|
+
options: {
|
|
81
|
+
babelrc: false,
|
|
82
|
+
configFile: false,
|
|
83
|
+
presets: [require.resolve("@babel/preset-react"), [require.resolve("@babel/preset-env"), {
|
|
84
|
+
targets: {
|
|
85
|
+
browsers: "> 0%"
|
|
86
|
+
},
|
|
87
|
+
loose: true
|
|
88
|
+
}]],
|
|
89
|
+
plugins: [[require.resolve("@babel/plugin-proposal-decorators"), {
|
|
90
|
+
legacy: true
|
|
91
|
+
}], [require.resolve("@babel/plugin-transform-class-properties"), {
|
|
92
|
+
loose: true
|
|
93
|
+
}], require.resolve("@babel/plugin-proposal-export-default-from")]
|
|
94
|
+
}
|
|
95
|
+
}],
|
|
96
|
+
resolve: {
|
|
97
|
+
fullySpecified: false
|
|
98
|
+
},
|
|
99
|
+
exclude: [/node_modules/]
|
|
115
100
|
}, {
|
|
116
101
|
test: /\.(png|svg)$/,
|
|
117
102
|
loader: require.resolve("file-loader"),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createFormWebpackConfiguration.js","names":["_path","_interopRequireDefault","require","_miniCssExtractPlugin","_webpack","_CacheAssetsPlugin","createConfigVariant","options","gfv","fileNameSuffix","mode","formPath","buildCache","buildCacheOptions","undefined","BuildCache","farmDirectory","buildCacheWebpackPlugin","createWebpackPlugin","devtoolOption","isLocalDev","target","context","output","filename","path","resourcesDirectoryPath","publicPath","resolve","alias","join","__dirname","variables","Resources","extensions","entry","devtool","cache","type","maxGenerations","module","rules","test","use","loader","MiniCssExtractPlugin","modules","localIdentName","postcssOptions","ident","plugins","overrideBrowserslist","oneOf","workers","workerParallelJobs","workerNodeArgs","babelrc","configFile","presets","targets","browsers","loose","useBuiltIns","corejs","legacy","cacheDirectory","fullySpecified","exclude","name","webpack","DefinePlugin","GFV","JSON","stringify","NODE_ENV","RESOURCES_HASH","resourcesHash","filter","isNotNullOrUndefined","input","createConfig","result","modes","push","Promise","all"],"sources":["../../../../src/FormWebpackConfiguration/createFormWebpackConfiguration.ts"],"sourcesContent":["import path from \"path\";\n\nimport MiniCssExtractPlugin from \"mini-css-extract-plugin\";\nimport webpack, { Configuration } from \"webpack\";\n\nimport { BuildCache, FormBuildCacheOptions } from \"./CacheAssetsPlugin\";\n\ntype BuildMode = \"production\" | \"development\";\n\ninterface CreateWebpackConfigurationVariantOptions {\n gfv: string;\n resourcesHash: string;\n formPath: string;\n mode?: BuildMode;\n isLocalDev?: boolean;\n resourcesDirectoryPath: string;\n buildCacheOptions?: FormBuildCacheOptions;\n}\n\nasync function createConfigVariant(options: CreateWebpackConfigurationVariantOptions): Promise<Configuration> {\n const { gfv } = options;\n\n const fileNameSuffix = options.mode === \"production\" ? \".min\" : \"\";\n\n const formPath = options.formPath;\n const buildCache =\n options.buildCacheOptions != undefined\n ? new BuildCache(options.buildCacheOptions.farmDirectory, options.buildCacheOptions.mode)\n : undefined;\n\n const buildCacheWebpackPlugin =\n buildCache != undefined && options.buildCacheOptions != undefined\n ? await buildCache.createWebpackPlugin(options.buildCacheOptions)\n : undefined;\n\n const devtoolOption: Configuration[\"devtool\"] =\n options.mode === \"production\" ? \"hidden-source-map\" : options.isLocalDev ? \"inline-source-map\" : \"source-map\";\n\n return {\n mode: options.mode,\n target: [\"web\", \"es5\"],\n context: formPath,\n output: {\n filename: `public/scripts/${gfv}${fileNameSuffix}.js`,\n path: options.resourcesDirectoryPath,\n publicPath: \"/static/\",\n },\n resolve: {\n alias: {\n \"variables.less\": path.resolve(path.join(__dirname, \"variables.less\")),\n variables: path.resolve(path.join(__dirname, \"variables.less\")),\n Resources: path.join(formPath, \"form\", \"resources\"),\n },\n extensions: [\".js\", \".jsx\"],\n },\n entry: [path.join(formPath, \"form\", \"./web\")],\n devtool: devtoolOption,\n cache:\n options.mode === \"development\"\n ? {\n type: \"memory\",\n maxGenerations: 5,\n }\n : false,\n module: {\n rules: [\n {\n test: /\\.less$/,\n use: [\n {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n loader: MiniCssExtractPlugin.loader as any,\n options: { publicPath: \"../../\" },\n },\n {\n loader: require.resolve(\"css-loader\"),\n options: {\n modules: {\n localIdentName: \"[hash:base64:5]\",\n },\n },\n },\n {\n loader: require.resolve(\"postcss-loader\"),\n options: {\n postcssOptions: {\n ident: \"postcss\",\n plugins: [\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n require(\"autoprefixer\")({\n // Просто дефолтные значение из текущего (1.7.7) browserslist\n overrideBrowserslist: \"> 1%, last 2 versions, Firefox ESR\",\n }),\n ],\n },\n },\n },\n {\n loader: require.resolve(\"less-loader\"),\n },\n ],\n },\n {\n test: /\\.jsx?$/,\n oneOf: [\n {\n test: /(kcXmlValidationConfigurator|kcXmlAutoCalculationConfigurator|dataDeclaration)\\.js$/,\n type: \"javascript/auto\",\n },\n {\n use: [\n {\n loader: require.resolve(\"thread-loader\"),\n options: {\n workers: 4,\n workerParallelJobs: 10,\n workerNodeArgs: [\"--max-old-space-size=3072\"],\n },\n },\n {\n loader: require.resolve(\"babel-loader\"),\n options: {\n babelrc: false,\n configFile: false,\n presets: [\n require.resolve(\"@babel/preset-react\"),\n [\n require.resolve(\"@babel/preset-env\"),\n {\n targets: {\n browsers: [\">0.5%\", \"last 2 versions\", \"not dead\", \"not IE 11\"],\n },\n loose: true,\n useBuiltIns: \"usage\",\n corejs: 3,\n },\n ],\n ],\n plugins: [\n [require.resolve(\"@babel/plugin-proposal-decorators\"), { legacy: true }],\n [\n require.resolve(\"@babel/plugin-transform-class-properties\"),\n { loose: true },\n ],\n require.resolve(\"@babel/plugin-proposal-export-default-from\"),\n ],\n cacheDirectory: true,\n },\n },\n ],\n resolve: {\n fullySpecified: false,\n },\n exclude: [/node_modules/],\n },\n ],\n },\n {\n test: /\\.(png|svg)$/,\n loader: require.resolve(\"file-loader\"),\n options: { name: \"public/images/[hash].[ext]\" },\n },\n {\n test: /\\.(ttf|eot|woff2?)$/,\n loader: require.resolve(\"file-loader\"),\n options: { name: \"public/fonts/[hash].[ext]\" },\n },\n ],\n },\n // @ts-expect-error Починится, когда все либы обновятся\n plugins: [\n new MiniCssExtractPlugin({\n filename: `public/styles/${gfv}${fileNameSuffix}.css`,\n }),\n new webpack.DefinePlugin({\n \"process.env\": {\n GFV: JSON.stringify(gfv),\n NODE_ENV: JSON.stringify(options.mode),\n RESOURCES_HASH: JSON.stringify(options.resourcesHash),\n },\n }),\n buildCacheWebpackPlugin,\n ].filter(isNotNullOrUndefined),\n };\n}\n\nfunction isNotNullOrUndefined<T>(input: T | undefined | null): input is T {\n return input != undefined;\n}\n\nexport interface CreateWebpackConfigurationOptions {\n gfv: string;\n resourcesHash: string;\n formPath: string;\n resourcesDirectoryPath: string;\n modes: BuildMode[];\n isLocalDev?: boolean;\n buildCacheOptions?: FormBuildCacheOptions;\n}\n\nexport function createConfig(options: CreateWebpackConfigurationOptions): Promise<Configuration[]> {\n const result: Array<Promise<Configuration>> = [];\n\n for (const mode of options.modes) {\n result.push(\n createConfigVariant({\n gfv: options.gfv,\n resourcesHash: options.resourcesHash,\n formPath: options.formPath,\n resourcesDirectoryPath: options.resourcesDirectoryPath,\n mode: mode,\n isLocalDev: options.isLocalDev,\n buildCacheOptions: options.buildCacheOptions,\n })\n );\n }\n return Promise.all(result);\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,qBAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,QAAA,GAAAH,sBAAA,CAAAC,OAAA;AAEA,IAAAG,kBAAA,GAAAH,OAAA;AAcA,eAAeI,mBAAmBA,CAACC,OAAiD,EAA0B;EAC1G,MAAM;IAAEC;EAAI,CAAC,GAAGD,OAAO;EAEvB,MAAME,cAAc,GAAGF,OAAO,CAACG,IAAI,KAAK,YAAY,GAAG,MAAM,GAAG,EAAE;EAElE,MAAMC,QAAQ,GAAGJ,OAAO,CAACI,QAAQ;EACjC,MAAMC,UAAU,GACZL,OAAO,CAACM,iBAAiB,IAAIC,SAAS,GAChC,IAAIC,6BAAU,CAACR,OAAO,CAACM,iBAAiB,CAACG,aAAa,EAAET,OAAO,CAACM,iBAAiB,CAACH,IAAI,CAAC,GACvFI,SAAS;EAEnB,MAAMG,uBAAuB,GACzBL,UAAU,IAAIE,SAAS,IAAIP,OAAO,CAACM,iBAAiB,IAAIC,SAAS,GAC3D,MAAMF,UAAU,CAACM,mBAAmB,CAACX,OAAO,CAACM,iBAAiB,CAAC,GAC/DC,SAAS;EAEnB,MAAMK,aAAuC,GACzCZ,OAAO,CAACG,IAAI,KA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tE,OAAOA,KAAK,IAAIjE,SAAS;AAC7B;AAYO,SAASkE,YAAYA,CAACzE,OAA0C,EAA4B;EAC/F,MAAM0E,MAAqC,GAAG,EAAE;EAEhD,KAAK,MAAMvE,IAAI,IAAIH,OAAO,CAAC2E,KAAK,EAAE;IAC9BD,MAAM,CAACE,IAAI,CACP7E,mBAAmB,CAAC;MAChBE,GAAG,EAAED,OAAO,CAACC,GAAG;MAChBoE,aAAa,EAAErE,OAAO,CAACqE,aAAa;MACpCjE,QAAQ,EAAEJ,OAAO,CAACI,QAAQ;MAC1Be,sBAAsB,EAAEnB,OAAO,CAACmB,sBAAsB;MACtDhB,IAAI,EAAEA,IAAI;MACVU,UAAU,EAAEb,OAAO,CAACa,UAAU;MAC9BP,iBAAiB,EAAEN,OAAO,CAACM;IAC/B,CAAC,CACL,CAAC;EACL;EACA,OAAOuE,OAAO,CAACC,GAAG,CAACJ,MAAM,CAAC;AAC9B","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"createFormWebpackConfiguration.js","names":["_path","_interopRequireDefault","require","_miniCssExtractPlugin","_webpack","_CacheAssetsPlugin","createConfigVariant","options","gfv","fileNameSuffix","mode","formPath","buildCache","buildCacheOptions","undefined","BuildCache","farmDirectory","buildCacheWebpackPlugin","createWebpackPlugin","devtoolOption","isLocalDev","target","context","output","filename","path","resourcesDirectoryPath","publicPath","resolve","alias","join","__dirname","variables","Resources","extensions","entry","devtool","cache","type","maxGenerations","module","rules","test","use","loader","MiniCssExtractPlugin","modules","localIdentName","postcssOptions","ident","plugins","overrideBrowserslist","babelrc","configFile","presets","targets","browsers","loose","legacy","fullySpecified","exclude","name","webpack","DefinePlugin","GFV","JSON","stringify","NODE_ENV","RESOURCES_HASH","resourcesHash","filter","isNotNullOrUndefined","input","createConfig","result","modes","push","Promise","all"],"sources":["../../../../src/FormWebpackConfiguration/createFormWebpackConfiguration.ts"],"sourcesContent":["import path from \"path\";\n\nimport MiniCssExtractPlugin from \"mini-css-extract-plugin\";\nimport webpack, { Configuration } from \"webpack\";\n\nimport { BuildCache, FormBuildCacheOptions } from \"./CacheAssetsPlugin\";\n\ntype BuildMode = \"production\" | \"development\";\n\ninterface CreateWebpackConfigurationVariantOptions {\n gfv: string;\n resourcesHash: string;\n formPath: string;\n mode?: BuildMode;\n isLocalDev?: boolean;\n resourcesDirectoryPath: string;\n buildCacheOptions?: FormBuildCacheOptions;\n}\n\nasync function createConfigVariant(options: CreateWebpackConfigurationVariantOptions): Promise<Configuration> {\n const { gfv } = options;\n\n const fileNameSuffix = options.mode === \"production\" ? \".min\" : \"\";\n\n const formPath = options.formPath;\n const buildCache =\n options.buildCacheOptions != undefined\n ? new BuildCache(options.buildCacheOptions.farmDirectory, options.buildCacheOptions.mode)\n : undefined;\n\n const buildCacheWebpackPlugin =\n buildCache != undefined && options.buildCacheOptions != undefined\n ? await buildCache.createWebpackPlugin(options.buildCacheOptions)\n : undefined;\n\n const devtoolOption: Configuration[\"devtool\"] =\n options.mode === \"production\" ? \"hidden-source-map\" : options.isLocalDev ? \"inline-source-map\" : \"source-map\";\n\n return {\n mode: options.mode,\n target: [\"web\", \"es5\"],\n context: formPath,\n output: {\n filename: `public/scripts/${gfv}${fileNameSuffix}.js`,\n path: options.resourcesDirectoryPath,\n publicPath: \"/static/\",\n },\n resolve: {\n alias: {\n \"variables.less\": path.resolve(path.join(__dirname, \"variables.less\")),\n variables: path.resolve(path.join(__dirname, \"variables.less\")),\n Resources: path.join(formPath, \"form\", \"resources\"),\n },\n extensions: [\".js\", \".jsx\"],\n },\n entry: [path.join(formPath, \"form\", \"./web\")],\n devtool: devtoolOption,\n cache:\n options.mode === \"development\"\n ? {\n type: \"memory\",\n maxGenerations: 5,\n }\n : false,\n module: {\n rules: [\n {\n test: /\\.less$/,\n use: [\n {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n loader: MiniCssExtractPlugin.loader as any,\n options: { publicPath: \"../../\" },\n },\n {\n loader: require.resolve(\"css-loader\"),\n options: {\n modules: {\n localIdentName: \"[hash:base64:5]\",\n },\n },\n },\n {\n loader: require.resolve(\"postcss-loader\"),\n options: {\n postcssOptions: {\n ident: \"postcss\",\n plugins: [\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n require(\"autoprefixer\")({\n // Просто дефолтные значение из текущего (1.7.7) browserslist\n overrideBrowserslist: \"> 1%, last 2 versions, Firefox ESR\",\n }),\n ],\n },\n },\n },\n {\n loader: require.resolve(\"less-loader\"),\n },\n ],\n },\n {\n test: /\\.jsx?$/,\n use: [\n {\n loader: require.resolve(\"babel-loader\"),\n options: {\n babelrc: false,\n configFile: false,\n presets: [\n require.resolve(\"@babel/preset-react\"),\n [\n require.resolve(\"@babel/preset-env\"),\n {\n targets: { browsers: \"> 0%\" },\n loose: true,\n },\n ],\n ],\n plugins: [\n [require.resolve(\"@babel/plugin-proposal-decorators\"), { legacy: true }],\n [require.resolve(\"@babel/plugin-transform-class-properties\"), { loose: true }],\n require.resolve(\"@babel/plugin-proposal-export-default-from\"),\n ],\n },\n },\n ],\n resolve: {\n fullySpecified: false,\n },\n exclude: [/node_modules/],\n },\n {\n test: /\\.(png|svg)$/,\n loader: require.resolve(\"file-loader\"),\n options: { name: \"public/images/[hash].[ext]\" },\n },\n {\n test: /\\.(ttf|eot|woff2?)$/,\n loader: require.resolve(\"file-loader\"),\n options: { name: \"public/fonts/[hash].[ext]\" },\n },\n ],\n },\n // @ts-expect-error Починится, когда все либы обновятся\n plugins: [\n new MiniCssExtractPlugin({\n filename: `public/styles/${gfv}${fileNameSuffix}.css`,\n }),\n new webpack.DefinePlugin({\n \"process.env\": {\n GFV: JSON.stringify(gfv),\n NODE_ENV: JSON.stringify(options.mode),\n RESOURCES_HASH: JSON.stringify(options.resourcesHash),\n },\n }),\n buildCacheWebpackPlugin,\n ].filter(isNotNullOrUndefined),\n };\n}\n\nfunction isNotNullOrUndefined<T>(input: T | undefined | null): input is T {\n return input != undefined;\n}\n\nexport interface CreateWebpackConfigurationOptions {\n gfv: string;\n resourcesHash: string;\n formPath: string;\n resourcesDirectoryPath: string;\n modes: BuildMode[];\n isLocalDev?: boolean;\n buildCacheOptions?: FormBuildCacheOptions;\n}\n\nexport function createConfig(options: CreateWebpackConfigurationOptions): Promise<Configuration[]> {\n const result: Array<Promise<Configuration>> = [];\n\n for (const mode of options.modes) {\n result.push(\n createConfigVariant({\n gfv: options.gfv,\n resourcesHash: options.resourcesHash,\n formPath: options.formPath,\n resourcesDirectoryPath: options.resourcesDirectoryPath,\n mode: mode,\n isLocalDev: options.isLocalDev,\n buildCacheOptions: options.buildCacheOptions,\n })\n );\n }\n return Promise.all(result);\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,qBAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,QAAA,GAAAH,sBAAA,CAAAC,OAAA;AAEA,IAAAG,kBAAA,GAAAH,OAAA;AAcA,eAAeI,mBAAmBA,CAACC,OAAiD,EAA0B;EAC1G,MAAM;IAAEC;EAAI,CAAC,GAAGD,OAAO;EAEvB,MAAME,cAAc,GAAGF,OAAO,CAACG,IAAI,KAAK,YAAY,GAAG,MAAM,GAAG,EAAE;EAElE,MAAMC,QAAQ,GAAGJ,OAAO,CAACI,QAAQ;EACjC,MAAMC,UAAU,GACZL,OAAO,CAACM,iBAAiB,IAAIC,SAAS,GAChC,IAAIC,6BAAU,CAACR,OAAO,CAACM,iBAAiB,CAACG,aAAa,EAAET,OAAO,CAACM,iBAAiB,CAACH,IAAI,CAAC,GACvFI,SAAS;EAEnB,MAAMG,uBAAuB,GACzBL,UAAU,IAAIE,SAAS,IAAIP,OAAO,CAACM,iBAAiB,IAAIC,SAAS,GAC3D,MAAMF,UAAU,CAACM,mBAAmB,CAACX,OAAO,CAACM,iBAAiB,CAAC,GAC/DC,SAAS;EAEnB,MAAMK,aAAuC,GACzCZ,OAAO,CAACG,IAAI,KAAK,YAAY,GAAG,mBAAmB,GAAGH,OAAO,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a,UAAU;MAC9BP,iBAAiB,EAAEN,OAAO,CAACM;IAC/B,CAAC,CACL,CAAC;EACL;EACA,OAAOgE,OAAO,CAACC,GAAG,CAACJ,MAAM,CAAC;AAC9B","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kontur.candy/tools",
|
|
3
|
-
"version": "2.236.
|
|
3
|
+
"version": "2.236.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"files": [
|
|
6
6
|
"candy.js",
|
|
@@ -64,8 +64,7 @@
|
|
|
64
64
|
"babel-plugin-transform-typescript-metadata": "^0.3.2",
|
|
65
65
|
"classnames-loader": "^2.1.0",
|
|
66
66
|
"conventional-changelog": "^3.1.24",
|
|
67
|
-
"conventional-changelog-cli": "^2.1.1"
|
|
68
|
-
"thread-loader": "^4.0.4"
|
|
67
|
+
"conventional-changelog-cli": "^2.1.1"
|
|
69
68
|
},
|
|
70
69
|
"dependencies": {
|
|
71
70
|
"@babel/core": "7.24.*",
|