@bamboocss/node 1.45.5 → 1.46.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/dist/index.cjs +614 -295
- package/dist/index.d.cts +59 -9
- package/dist/index.d.mts +59 -9
- package/dist/index.mjs +610 -291
- package/dist/static-compiler-C1QNL5nu.d.cts +6 -0
- package/dist/static-compiler-CvT9iHM_.d.mts +6 -0
- package/dist/static-compiler.cjs +22 -0
- package/dist/static-compiler.d.cts +2 -0
- package/dist/static-compiler.d.mts +2 -0
- package/dist/static-compiler.mjs +20 -0
- package/package.json +29 -16
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
//#region src/static-compiler.d.ts
|
|
2
|
+
/** Called synchronously by an integration that compiles source, as it is constructed. */
|
|
3
|
+
declare const markStaticCompilerActive: () => void;
|
|
4
|
+
declare const isStaticCompilerActive: () => boolean;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { markStaticCompilerActive as n, isStaticCompilerActive as t };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
//#region src/static-compiler.d.ts
|
|
2
|
+
/** Called synchronously by an integration that compiles source, as it is constructed. */
|
|
3
|
+
declare const markStaticCompilerActive: () => void;
|
|
4
|
+
declare const isStaticCompilerActive: () => boolean;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { markStaticCompilerActive as n, isStaticCompilerActive as t };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
//#region src/static-compiler.ts
|
|
3
|
+
/**
|
|
4
|
+
* Whether a Bamboo source compiler is running in this JavaScript realm.
|
|
5
|
+
*
|
|
6
|
+
* Kept in a dependency-free entrypoint because integrations need to announce and observe the
|
|
7
|
+
* flag while their configuration files are evaluated. Importing the Node package root for this
|
|
8
|
+
* one bit also initializes Bamboo's config, extraction, generation, and watcher stacks before a
|
|
9
|
+
* Vite hook has asked for any of them.
|
|
10
|
+
*
|
|
11
|
+
* A registered symbol rather than module state keeps CommonJS PostCSS configs and ESM Vite
|
|
12
|
+
* configs in agreement even though Node loads a separate module instance for each format.
|
|
13
|
+
*/
|
|
14
|
+
const FLAG = Symbol.for("bamboocss.static-compiler");
|
|
15
|
+
/** Called synchronously by an integration that compiles source, as it is constructed. */
|
|
16
|
+
const markStaticCompilerActive = () => {
|
|
17
|
+
globalThis[FLAG] = true;
|
|
18
|
+
};
|
|
19
|
+
const isStaticCompilerActive = () => Boolean(globalThis[FLAG]);
|
|
20
|
+
//#endregion
|
|
21
|
+
exports.isStaticCompilerActive = isStaticCompilerActive;
|
|
22
|
+
exports.markStaticCompilerActive = markStaticCompilerActive;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
//#region src/static-compiler.ts
|
|
2
|
+
/**
|
|
3
|
+
* Whether a Bamboo source compiler is running in this JavaScript realm.
|
|
4
|
+
*
|
|
5
|
+
* Kept in a dependency-free entrypoint because integrations need to announce and observe the
|
|
6
|
+
* flag while their configuration files are evaluated. Importing the Node package root for this
|
|
7
|
+
* one bit also initializes Bamboo's config, extraction, generation, and watcher stacks before a
|
|
8
|
+
* Vite hook has asked for any of them.
|
|
9
|
+
*
|
|
10
|
+
* A registered symbol rather than module state keeps CommonJS PostCSS configs and ESM Vite
|
|
11
|
+
* configs in agreement even though Node loads a separate module instance for each format.
|
|
12
|
+
*/
|
|
13
|
+
const FLAG = Symbol.for("bamboocss.static-compiler");
|
|
14
|
+
/** Called synchronously by an integration that compiles source, as it is constructed. */
|
|
15
|
+
const markStaticCompilerActive = () => {
|
|
16
|
+
globalThis[FLAG] = true;
|
|
17
|
+
};
|
|
18
|
+
const isStaticCompilerActive = () => Boolean(globalThis[FLAG]);
|
|
19
|
+
//#endregion
|
|
20
|
+
export { isStaticCompilerActive, markStaticCompilerActive };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bamboocss/node",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.46.0",
|
|
4
4
|
"description": "The core css bamboo library",
|
|
5
5
|
"homepage": "https://bamboocss.com",
|
|
6
6
|
"license": "MIT",
|
|
@@ -20,11 +20,24 @@
|
|
|
20
20
|
"exports": {
|
|
21
21
|
".": {
|
|
22
22
|
"source": "./src/index.ts",
|
|
23
|
-
"types": "./dist/index.d.cts",
|
|
24
|
-
"require": "./dist/index.cjs",
|
|
25
23
|
"import": {
|
|
26
24
|
"types": "./dist/index.d.mts",
|
|
27
25
|
"default": "./dist/index.mjs"
|
|
26
|
+
},
|
|
27
|
+
"require": {
|
|
28
|
+
"types": "./dist/index.d.cts",
|
|
29
|
+
"default": "./dist/index.cjs"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"./static-compiler": {
|
|
33
|
+
"source": "./src/static-compiler.ts",
|
|
34
|
+
"import": {
|
|
35
|
+
"types": "./dist/static-compiler.d.mts",
|
|
36
|
+
"default": "./dist/static-compiler.mjs"
|
|
37
|
+
},
|
|
38
|
+
"require": {
|
|
39
|
+
"types": "./dist/static-compiler.d.cts",
|
|
40
|
+
"default": "./dist/static-compiler.cjs"
|
|
28
41
|
}
|
|
29
42
|
},
|
|
30
43
|
"./package.json": "./package.json"
|
|
@@ -52,17 +65,17 @@
|
|
|
52
65
|
"postcss": "8.5.26",
|
|
53
66
|
"ts-morph": "28.0.0",
|
|
54
67
|
"ts-pattern": "5.9.0",
|
|
55
|
-
"@bamboocss/config": "1.
|
|
56
|
-
"@bamboocss/core": "1.
|
|
57
|
-
"@bamboocss/
|
|
58
|
-
"@bamboocss/
|
|
59
|
-
"@bamboocss/
|
|
60
|
-
"@bamboocss/plugin-svelte": "1.
|
|
61
|
-
"@bamboocss/plugin-vue": "1.
|
|
62
|
-
"@bamboocss/reporter": "1.
|
|
63
|
-
"@bamboocss/shared": "1.
|
|
64
|
-
"@bamboocss/token-dictionary": "1.
|
|
65
|
-
"@bamboocss/types": "1.
|
|
68
|
+
"@bamboocss/config": "1.46.0",
|
|
69
|
+
"@bamboocss/core": "1.46.0",
|
|
70
|
+
"@bamboocss/logger": "1.46.0",
|
|
71
|
+
"@bamboocss/parser": "1.46.0",
|
|
72
|
+
"@bamboocss/generator": "1.46.0",
|
|
73
|
+
"@bamboocss/plugin-svelte": "1.46.0",
|
|
74
|
+
"@bamboocss/plugin-vue": "1.46.0",
|
|
75
|
+
"@bamboocss/reporter": "1.46.0",
|
|
76
|
+
"@bamboocss/shared": "1.46.0",
|
|
77
|
+
"@bamboocss/token-dictionary": "1.46.0",
|
|
78
|
+
"@bamboocss/types": "1.46.0"
|
|
66
79
|
},
|
|
67
80
|
"devDependencies": {
|
|
68
81
|
"@types/fs-extra": "11.0.4",
|
|
@@ -72,8 +85,8 @@
|
|
|
72
85
|
"boxen": "8.0.1"
|
|
73
86
|
},
|
|
74
87
|
"scripts": {
|
|
75
|
-
"build": "tsdown --tsconfig tsconfig.build.json src/index.ts --format=cjs,esm --shims --dts",
|
|
76
|
-
"build-fast": "tsdown --dts=false --tsconfig tsconfig.build.json src/index.ts --format=cjs,esm --shims",
|
|
88
|
+
"build": "tsdown --tsconfig tsconfig.build.json src/index.ts src/static-compiler.ts --format=cjs,esm --shims --dts",
|
|
89
|
+
"build-fast": "tsdown --dts=false --tsconfig tsconfig.build.json src/index.ts src/static-compiler.ts --format=cjs,esm --shims",
|
|
77
90
|
"dev": "pnpm build-fast --watch"
|
|
78
91
|
}
|
|
79
92
|
}
|