@nizza/devkit 0.1.0-alpha.11 → 0.1.0-alpha.12
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/executors/update-executors-file/index.cjs +2 -2
- package/dist/cjs/index.cjs +7 -7
- package/dist/cjs/{vite-utils → vitejs}/config-builder/configs/lib.cjs +2 -1
- package/dist/cjs/{vite-utils → vitejs}/config-builder/plugins.cjs +3 -3
- package/dist/cjs/{vite-utils → vitejs}/plugins/third-party-css-inject/utils.cjs +1 -3
- package/dist/esm/executors/update-executors-file/index.mjs +2 -2
- package/dist/esm/index.mjs +7 -7
- package/dist/esm/{vite-utils → vitejs}/config-builder/configs/lib.mjs +2 -1
- package/dist/esm/{vite-utils → vitejs}/config-builder/plugins.mjs +3 -3
- package/dist/esm/{vite-utils → vitejs}/plugins/third-party-css-inject/utils.mjs +1 -3
- package/package.json +2 -4
- /package/dist/cjs/{vite-utils → vitejs}/config-builder/configs/app.cjs +0 -0
- /package/dist/cjs/{vite-utils → vitejs}/config-builder/configs/base.cjs +0 -0
- /package/dist/cjs/{vite-utils → vitejs}/config-builder/configs/index.cjs +0 -0
- /package/dist/cjs/{vite-utils → vitejs}/config-builder/configs/script.cjs +0 -0
- /package/dist/cjs/{vite-utils → vitejs}/config-builder/main.cjs +0 -0
- /package/dist/cjs/{vite-utils → vitejs}/config-builder/shared/types.cjs +0 -0
- /package/dist/cjs/{vite-utils → vitejs}/config-builder/shared/utils/helpers.cjs +0 -0
- /package/dist/cjs/{vite-utils → vitejs}/config-builder/shared/utils/projectConfig.cjs +0 -0
- /package/dist/cjs/{vite-utils → vitejs}/config-builder/shared/utils/viteCommand.cjs +0 -0
- /package/dist/cjs/{vite-utils → vitejs}/plugins/shadow-dom-inject-css/index.cjs +0 -0
- /package/dist/cjs/{vite-utils → vitejs}/plugins/third-party-css-inject/main.cjs +0 -0
- /package/dist/esm/{vite-utils → vitejs}/config-builder/configs/app.mjs +0 -0
- /package/dist/esm/{vite-utils → vitejs}/config-builder/configs/base.mjs +0 -0
- /package/dist/esm/{vite-utils → vitejs}/config-builder/configs/index.mjs +0 -0
- /package/dist/esm/{vite-utils → vitejs}/config-builder/configs/script.mjs +0 -0
- /package/dist/esm/{vite-utils → vitejs}/config-builder/main.mjs +0 -0
- /package/dist/esm/{vite-utils → vitejs}/config-builder/shared/types.mjs +0 -0
- /package/dist/esm/{vite-utils → vitejs}/config-builder/shared/utils/helpers.mjs +0 -0
- /package/dist/esm/{vite-utils → vitejs}/config-builder/shared/utils/projectConfig.mjs +0 -0
- /package/dist/esm/{vite-utils → vitejs}/config-builder/shared/utils/viteCommand.mjs +0 -0
- /package/dist/esm/{vite-utils → vitejs}/plugins/shadow-dom-inject-css/index.mjs +0 -0
- /package/dist/esm/{vite-utils → vitejs}/plugins/third-party-css-inject/main.mjs +0 -0
|
@@ -17,7 +17,7 @@ const { readFile } = fs.promises;
|
|
|
17
17
|
const projectConfig = utils.getProjectConfig(ctx);
|
|
18
18
|
const rootDir = projectConfig.root;
|
|
19
19
|
const executorsFilePath = path.join(rootDir, 'executors.json');
|
|
20
|
-
const distExecutorsFilePath =
|
|
20
|
+
// const distExecutorsFilePath = join(rootDir, 'dist', 'executors.json');
|
|
21
21
|
const originalContent = JSON.parse(await readFile(executorsFilePath, 'utf8'));
|
|
22
22
|
// Update paths to point to './dist/' and add '.js'
|
|
23
23
|
const updatedExecutors = helpers.updateExecutorPaths(originalContent.executors, false);
|
|
@@ -29,7 +29,7 @@ const { readFile } = fs.promises;
|
|
|
29
29
|
executors: updatedExecutors
|
|
30
30
|
})
|
|
31
31
|
]);
|
|
32
|
-
return utils.ok(
|
|
32
|
+
return utils.ok();
|
|
33
33
|
} catch (error) {
|
|
34
34
|
return utils.err(error, `❌ Error processing file: ${error}`);
|
|
35
35
|
}
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -5,13 +5,13 @@ var index$1 = require('./executors/environments/index.cjs');
|
|
|
5
5
|
var index$2 = require('./executors/publish/index.cjs');
|
|
6
6
|
var index$3 = require('./executors/update-executors-file/index.cjs');
|
|
7
7
|
var index$4 = require('./executors/vtex-link/index.cjs');
|
|
8
|
-
var main = require('./
|
|
9
|
-
var types = require('./
|
|
10
|
-
var helpers = require('./
|
|
11
|
-
var projectConfig = require('./
|
|
12
|
-
var viteCommand = require('./
|
|
13
|
-
var main$1 = require('./
|
|
14
|
-
var index$5 = require('./
|
|
8
|
+
var main = require('./vitejs/config-builder/main.cjs');
|
|
9
|
+
var types = require('./vitejs/config-builder/shared/types.cjs');
|
|
10
|
+
var helpers = require('./vitejs/config-builder/shared/utils/helpers.cjs');
|
|
11
|
+
var projectConfig = require('./vitejs/config-builder/shared/utils/projectConfig.cjs');
|
|
12
|
+
var viteCommand = require('./vitejs/config-builder/shared/utils/viteCommand.cjs');
|
|
13
|
+
var main$1 = require('./vitejs/plugins/third-party-css-inject/main.cjs');
|
|
14
|
+
var index$5 = require('./vitejs/plugins/shadow-dom-inject-css/index.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
@@ -65,13 +65,13 @@ require('mri');
|
|
|
65
65
|
filename: 'bundle-analysis.html'
|
|
66
66
|
})
|
|
67
67
|
],
|
|
68
|
-
condition: ({ viteCmd })=>viteCmd.flags?.[types.Flag.ANALYZE]
|
|
68
|
+
condition: ({ viteCmd })=>viteCmd.flags?.[types.Flag.ANALYZE]
|
|
69
69
|
};
|
|
70
70
|
/**
|
|
71
71
|
* Plugin configuration for injecting CSS into JS files
|
|
72
72
|
* using vite-plugin-css-injected-by-js.
|
|
73
73
|
*/ const injectCssByJsPlugin = {
|
|
74
|
-
generate: (
|
|
74
|
+
generate: ()=>[
|
|
75
75
|
cssInjectedByJsPlugin()
|
|
76
76
|
],
|
|
77
77
|
condition: ({ projectConfig })=>!projectConfig.shadowDom
|
|
@@ -80,7 +80,7 @@ require('mri');
|
|
|
80
80
|
* Plugin configuration for injecting CSS into Shadow Dom.
|
|
81
81
|
* using local plugin.
|
|
82
82
|
*/ const injectCssIntoShadowDomPlugin = {
|
|
83
|
-
generate: (
|
|
83
|
+
generate: ()=>[
|
|
84
84
|
index.injectCssIntoShadowDom()
|
|
85
85
|
],
|
|
86
86
|
condition: ({ projectConfig })=>projectConfig.shadowDom
|
|
@@ -66,13 +66,11 @@ async function buildCSSInjectionCode(execute) {
|
|
|
66
66
|
*/ function injectionCSSCodePlugin(execute) {
|
|
67
67
|
return {
|
|
68
68
|
name: 'vite:third-party-css-inject',
|
|
69
|
-
// @ts-ignore
|
|
70
69
|
resolveId (id) {
|
|
71
70
|
if (id == cssInjectedByJsId) {
|
|
72
71
|
return id;
|
|
73
72
|
}
|
|
74
73
|
},
|
|
75
|
-
// @ts-ignore
|
|
76
74
|
load (id) {
|
|
77
75
|
if (id == cssInjectedByJsId) {
|
|
78
76
|
let executeJs = [];
|
|
@@ -86,7 +84,7 @@ async function buildCSSInjectionCode(execute) {
|
|
|
86
84
|
return `try{if(typeof document != 'undefined'){
|
|
87
85
|
const waitForElement=${waitForElement.toString()};
|
|
88
86
|
${executeJs.join(' ')}
|
|
89
|
-
}}catch(e){console.error('vite
|
|
87
|
+
}}catch(e){console.error('vite:third-party-css-inject', e);}`;
|
|
90
88
|
}
|
|
91
89
|
}
|
|
92
90
|
};
|
|
@@ -15,7 +15,7 @@ const { readFile } = promises;
|
|
|
15
15
|
const projectConfig = getProjectConfig(ctx);
|
|
16
16
|
const rootDir = projectConfig.root;
|
|
17
17
|
const executorsFilePath = join(rootDir, 'executors.json');
|
|
18
|
-
const distExecutorsFilePath = join(rootDir, 'dist', 'executors.json');
|
|
18
|
+
// const distExecutorsFilePath = join(rootDir, 'dist', 'executors.json');
|
|
19
19
|
const originalContent = JSON.parse(await readFile(executorsFilePath, 'utf8'));
|
|
20
20
|
// Update paths to point to './dist/' and add '.js'
|
|
21
21
|
const updatedExecutors = updateExecutorPaths(originalContent.executors, false);
|
|
@@ -27,7 +27,7 @@ const { readFile } = promises;
|
|
|
27
27
|
executors: updatedExecutors
|
|
28
28
|
})
|
|
29
29
|
]);
|
|
30
|
-
return ok(
|
|
30
|
+
return ok();
|
|
31
31
|
} catch (error) {
|
|
32
32
|
return err(error, `❌ Error processing file: ${error}`);
|
|
33
33
|
}
|
package/dist/esm/index.mjs
CHANGED
|
@@ -3,10 +3,10 @@ export { default as environmentsExecutor } from './executors/environments/index.
|
|
|
3
3
|
export { default as publishExecutor } from './executors/publish/index.mjs';
|
|
4
4
|
export { default as updateExecutorsFileExecutor } from './executors/update-executors-file/index.mjs';
|
|
5
5
|
export { default as vtexLinkExecutor } from './executors/vtex-link/index.mjs';
|
|
6
|
-
export { createConfigBuilder } from './
|
|
7
|
-
export { Flag, ProjectType, Stage, Target, ViteMode } from './
|
|
8
|
-
export { chunkName, deepMerge, getNxTsConfigPaths, getPlugins, when } from './
|
|
9
|
-
export { getExternalDependencies, getInitials, initializeConfig, mergeConfigs } from './
|
|
10
|
-
export { getViteCmdFlags, getViteCommand } from './
|
|
11
|
-
export { thirdPartyCssInjectPlugin } from './
|
|
12
|
-
export { injectCssIntoShadowDom } from './
|
|
6
|
+
export { createConfigBuilder } from './vitejs/config-builder/main.mjs';
|
|
7
|
+
export { Flag, ProjectType, Stage, Target, ViteMode } from './vitejs/config-builder/shared/types.mjs';
|
|
8
|
+
export { chunkName, deepMerge, getNxTsConfigPaths, getPlugins, when } from './vitejs/config-builder/shared/utils/helpers.mjs';
|
|
9
|
+
export { getExternalDependencies, getInitials, initializeConfig, mergeConfigs } from './vitejs/config-builder/shared/utils/projectConfig.mjs';
|
|
10
|
+
export { getViteCmdFlags, getViteCommand } from './vitejs/config-builder/shared/utils/viteCommand.mjs';
|
|
11
|
+
export { thirdPartyCssInjectPlugin } from './vitejs/plugins/third-party-css-inject/main.mjs';
|
|
12
|
+
export { injectCssIntoShadowDom } from './vitejs/plugins/shadow-dom-inject-css/index.mjs';
|
|
@@ -63,13 +63,13 @@ import 'mri';
|
|
|
63
63
|
filename: 'bundle-analysis.html'
|
|
64
64
|
})
|
|
65
65
|
],
|
|
66
|
-
condition: ({ viteCmd })=>viteCmd.flags?.[Flag.ANALYZE]
|
|
66
|
+
condition: ({ viteCmd })=>viteCmd.flags?.[Flag.ANALYZE]
|
|
67
67
|
};
|
|
68
68
|
/**
|
|
69
69
|
* Plugin configuration for injecting CSS into JS files
|
|
70
70
|
* using vite-plugin-css-injected-by-js.
|
|
71
71
|
*/ const injectCssByJsPlugin = {
|
|
72
|
-
generate: (
|
|
72
|
+
generate: ()=>[
|
|
73
73
|
cssInjectedByJsPlugin()
|
|
74
74
|
],
|
|
75
75
|
condition: ({ projectConfig })=>!projectConfig.shadowDom
|
|
@@ -78,7 +78,7 @@ import 'mri';
|
|
|
78
78
|
* Plugin configuration for injecting CSS into Shadow Dom.
|
|
79
79
|
* using local plugin.
|
|
80
80
|
*/ const injectCssIntoShadowDomPlugin = {
|
|
81
|
-
generate: (
|
|
81
|
+
generate: ()=>[
|
|
82
82
|
injectCssIntoShadowDom()
|
|
83
83
|
],
|
|
84
84
|
condition: ({ projectConfig })=>projectConfig.shadowDom
|
|
@@ -64,13 +64,11 @@ async function buildCSSInjectionCode(execute) {
|
|
|
64
64
|
*/ function injectionCSSCodePlugin(execute) {
|
|
65
65
|
return {
|
|
66
66
|
name: 'vite:third-party-css-inject',
|
|
67
|
-
// @ts-ignore
|
|
68
67
|
resolveId (id) {
|
|
69
68
|
if (id == cssInjectedByJsId) {
|
|
70
69
|
return id;
|
|
71
70
|
}
|
|
72
71
|
},
|
|
73
|
-
// @ts-ignore
|
|
74
72
|
load (id) {
|
|
75
73
|
if (id == cssInjectedByJsId) {
|
|
76
74
|
let executeJs = [];
|
|
@@ -84,7 +82,7 @@ async function buildCSSInjectionCode(execute) {
|
|
|
84
82
|
return `try{if(typeof document != 'undefined'){
|
|
85
83
|
const waitForElement=${waitForElement.toString()};
|
|
86
84
|
${executeJs.join(' ')}
|
|
87
|
-
}}catch(e){console.error('vite
|
|
85
|
+
}}catch(e){console.error('vite:third-party-css-inject', e);}`;
|
|
88
86
|
}
|
|
89
87
|
}
|
|
90
88
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nizza/devkit",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.12",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/cjs/index.cjs",
|
|
6
6
|
"module": "dist/esm/index.mjs",
|
|
@@ -39,10 +39,8 @@
|
|
|
39
39
|
"rollup": "^4.2.0",
|
|
40
40
|
"rollup-plugin-copy": "^3.5.0",
|
|
41
41
|
"rollup-plugin-delete": "^2.0.0",
|
|
42
|
-
"rollup-plugin-dts": "^6.1.0",
|
|
43
42
|
"rollup-plugin-dts-bundle-generator": "^1.4.0",
|
|
44
|
-
"rollup-plugin-swc3": "^0.10.3"
|
|
45
|
-
"rollup-plugin-ts": "^3.4.5"
|
|
43
|
+
"rollup-plugin-swc3": "^0.10.3"
|
|
46
44
|
},
|
|
47
45
|
"peerDependencies": {
|
|
48
46
|
"@nx/devkit": "17.0.2",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|