@jk2908/cxx 0.3.1 → 0.3.4
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/README.md +0 -3
- package/dist/build.d.ts +19 -11
- package/dist/build.d.ts.map +1 -1
- package/dist/build.js +204 -82
- package/dist/build.js.map +6 -5
- package/dist/logger.d.ts +1 -1
- package/dist/logger.d.ts.map +1 -1
- package/dist/next/cxx-loader.cjs +109 -58
- package/dist/next/cxx-loader.cjs.map +7 -7
- package/dist/next/index.d.ts +5 -3
- package/dist/next/index.d.ts.map +1 -1
- package/dist/next/index.js +219 -107
- package/dist/next/index.js.map +7 -6
- package/dist/types.d.ts +1 -4
- package/dist/types.d.ts.map +1 -1
- package/dist/utils.d.ts +0 -16
- package/dist/utils.d.ts.map +1 -1
- package/dist/vite/index.d.ts +1 -7
- package/dist/vite/index.d.ts.map +1 -1
- package/dist/vite/index.js +240 -247
- package/dist/vite/index.js.map +7 -7
- package/package.json +6 -6
- package/src/build.ts +202 -73
- package/src/logger.ts +2 -7
- package/src/next/cxx-loader.js +8 -1
- package/src/next/index.ts +25 -27
- package/src/types.ts +1 -7
- package/src/utils.ts +0 -79
- package/src/vite/index.ts +60 -100
package/dist/types.d.ts
CHANGED
|
@@ -7,13 +7,10 @@ export type Tags = Map<string, string[]>;
|
|
|
7
7
|
export type PluginConfig = {
|
|
8
8
|
typeSuffix?: string | false;
|
|
9
9
|
watch?: {
|
|
10
|
+
/** Root used for type-regeneration watching. Defaults to the Vite root or Next Turbopack root. */
|
|
10
11
|
root?: string;
|
|
11
|
-
ignore?: string[];
|
|
12
12
|
};
|
|
13
13
|
};
|
|
14
|
-
export type BuildContext = {
|
|
15
|
-
tagsByFile: Map<string, Tags>;
|
|
16
|
-
};
|
|
17
14
|
export type Tag = <ClassName extends string = string>(name: string) => (_: TemplateStringsArray) => Result<ClassName>;
|
|
18
15
|
export type Cxx = ((_: TemplateStringsArray) => Result) & {
|
|
19
16
|
tag: Tag;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,MAAM,CAAC,SAAS,SAAS,MAAM,GAAG,MAAM,IAAI,SAAS;IAChE,GAAG,EAAE,MAAM;IACX,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IAC5C,IAAI,EAAE,MAAM;CACZ,CAAA;AAED,MAAM,MAAM,IAAI,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAA;AAExC,MAAM,MAAM,YAAY,GAAG;IAC1B,UAAU,CAAC,EAAE,MAAM,GAAG,KAAK,CAAA;IAC3B,KAAK,CAAC,EAAE;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,MAAM,CAAC,SAAS,SAAS,MAAM,GAAG,MAAM,IAAI,SAAS;IAChE,GAAG,EAAE,MAAM;IACX,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IAC5C,IAAI,EAAE,MAAM;CACZ,CAAA;AAED,MAAM,MAAM,IAAI,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAA;AAExC,MAAM,MAAM,YAAY,GAAG;IAC1B,UAAU,CAAC,EAAE,MAAM,GAAG,KAAK,CAAA;IAC3B,KAAK,CAAC,EAAE;QACP,kGAAkG;QAClG,IAAI,CAAC,EAAE,MAAM,CAAA;KACb,CAAA;CACD,CAAA;AAED,MAAM,MAAM,GAAG,GAAG,CAAC,SAAS,SAAS,MAAM,GAAG,MAAM,EACnD,IAAI,EAAE,MAAM,KACR,CAAC,CAAC,EAAE,oBAAoB,KAAK,MAAM,CAAC,SAAS,CAAC,CAAA;AAEnD,MAAM,MAAM,GAAG,GAAG,CAAC,CAAC,CAAC,EAAE,oBAAoB,KAAK,MAAM,CAAC,GAAG;IACzD,GAAG,EAAE,GAAG,CAAA;CACR,CAAA"}
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,19 +1,3 @@
|
|
|
1
1
|
export declare function capitalise(str: string): string;
|
|
2
2
|
export declare function pascalise(str: string): string;
|
|
3
|
-
export type Batcher<K, V> = {
|
|
4
|
-
/**
|
|
5
|
-
* Queue a value for a key. Queueing the same key again replaces the previous value.
|
|
6
|
-
*/
|
|
7
|
-
add: (key: K, value: V) => void;
|
|
8
|
-
/**
|
|
9
|
-
* Run any waiting work now and resolve once it has finished.
|
|
10
|
-
*/
|
|
11
|
-
flush: () => Promise<void>;
|
|
12
|
-
};
|
|
13
|
-
/**
|
|
14
|
-
* Group bursts of work and run them together. Every key queued within `wait` is
|
|
15
|
-
* included once, and a key queued while a batch is running is handled in the next
|
|
16
|
-
* batch instead of replacing the one in progress.
|
|
17
|
-
*/
|
|
18
|
-
export declare function createBatcher<K, V>(wait: number, flush: (batch: Map<K, V>) => void | Promise<void>): Batcher<K, V>;
|
|
19
3
|
//# sourceMappingURL=utils.d.ts.map
|
package/dist/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,UAErC;AAED,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,UAKpC
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,UAErC;AAED,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,UAKpC"}
|
package/dist/vite/index.d.ts
CHANGED
|
@@ -3,14 +3,8 @@ import type { PluginConfig } from '../types.js';
|
|
|
3
3
|
export default function cxx(pluginConfig?: PluginConfig): {
|
|
4
4
|
name: string;
|
|
5
5
|
enforce: "pre";
|
|
6
|
-
config(this: import("vite").ConfigPluginContext): {
|
|
7
|
-
server: {
|
|
8
|
-
watch: {
|
|
9
|
-
ignored: string[];
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
} | null;
|
|
13
6
|
configResolved(this: import("vite").MinimalPluginContextWithoutEnvironment, config: ResolvedConfig): void;
|
|
7
|
+
buildStart(this: import("rolldown").PluginContext): Promise<void>;
|
|
14
8
|
transform(this: import("rolldown").TransformPluginContext, code: string, id: string): {
|
|
15
9
|
code: string;
|
|
16
10
|
map: import("magic-string").SourceMap | null;
|
package/dist/vite/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/vite/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/vite/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAe,KAAK,cAAc,EAAE,KAAK,aAAa,EAAE,MAAM,MAAM,CAAA;AAE3E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAkB/C,MAAM,CAAC,OAAO,UAAU,GAAG,CAAC,YAAY,GAAE,YAAiB;;;wFA6ElC,cAAc;;;;;;yFAkCb,aAAa;;EAYtC"}
|