🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@bamboocss/node

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bamboocss/node - npm Package Compare versions

Comparing version
1.12.0
to
1.12.1
+13
-13
package.json
{
"name": "@bamboocss/node",
"version": "1.12.0",
"version": "1.12.1",
"description": "The core css bamboo library",

@@ -55,14 +55,14 @@ "homepage": "https://bamboo-css.com",

"ts-pattern": "5.9.0",
"@bamboocss/config": "1.12.0",
"@bamboocss/core": "1.12.0",
"@bamboocss/logger": "1.12.0",
"@bamboocss/parser": "1.12.0",
"@bamboocss/generator": "1.12.0",
"@bamboocss/plugin-svelte": "1.12.0",
"@bamboocss/plugin-lightningcss": "1.12.0",
"@bamboocss/plugin-vue": "1.12.0",
"@bamboocss/reporter": "1.12.0",
"@bamboocss/shared": "1.12.0",
"@bamboocss/types": "1.12.0",
"@bamboocss/token-dictionary": "1.12.0"
"@bamboocss/config": "1.12.1",
"@bamboocss/core": "1.12.1",
"@bamboocss/logger": "1.12.1",
"@bamboocss/generator": "1.12.1",
"@bamboocss/parser": "1.12.1",
"@bamboocss/plugin-lightningcss": "1.12.1",
"@bamboocss/plugin-svelte": "1.12.1",
"@bamboocss/plugin-vue": "1.12.1",
"@bamboocss/reporter": "1.12.1",
"@bamboocss/shared": "1.12.1",
"@bamboocss/token-dictionary": "1.12.1",
"@bamboocss/types": "1.12.1"
},

@@ -69,0 +69,0 @@ "devDependencies": {

import { ReportFormat } from "@bamboocss/reporter";
import { AnalysisOptions, Artifact, ArtifactId, BambooHooks, Config, CssArtifactType, LoadConfigResult, Runtime, SpecFile, WatchOptions, WatcherEventType } from "@bamboocss/types";
import { StyleEncoder, Stylesheet } from "@bamboocss/core";
import { Generator } from "@bamboocss/generator";
import { ParserResult, Project } from "@bamboocss/parser";
import { Message, Root } from "postcss";
//#region src/diff-engine.d.ts
declare class DiffEngine {
private ctx;
private prevConfig;
constructor(ctx: Generator);
/**
* Reload config from disk and refresh the context
*/
reloadConfigAndRefreshContext(fn?: (conf: LoadConfigResult) => void): Promise<import("@bamboocss/types").DiffConfigResult>;
/**
* Update the context from the refreshed config
* then persist the changes on each affected engines
* Returns the list of affected artifacts/engines
*/
refresh(conf: LoadConfigResult, fn?: (conf: LoadConfigResult) => void): import("@bamboocss/types").DiffConfigResult;
}
//#endregion
//#region src/output-engine.d.ts
interface OutputEngineOptions extends Generator {
runtime: Runtime;
hooks: Partial<BambooHooks>;
}
declare class OutputEngine {
private paths;
private fs;
private path;
constructor(options: OutputEngineOptions);
empty: () => void;
ensure: (file: string, cwd: string) => string;
write: (output: Artifact | undefined) => Promise<PromiseSettledResult<void>[]> | undefined;
}
//#endregion
//#region src/create-context.d.ts
declare class BambooContext extends Generator {
runtime: Runtime;
project: Project;
output: OutputEngine;
diff: DiffEngine;
explicitDeps: string[];
constructor(conf: LoadConfigResult);
private getExplicitDependencies;
initMessage: () => string;
getFiles: () => string[];
parseFile: (filePath: string, styleEncoder?: StyleEncoder) => ParserResult | undefined;
parseFiles: (styleEncoder?: StyleEncoder) => {
filesWithCss: string[];
files: string[];
results: ParserResult[];
};
writeCss: (sheet?: Stylesheet) => Promise<PromiseSettledResult<void>[]> | undefined;
writeSplitCss: (sheet: Stylesheet) => Promise<void>;
watchConfig: (cb: (file: string) => void | Promise<void>, opts?: Omit<WatchOptions, "include">) => void;
watchFiles: (cb: (event: WatcherEventType, file: string) => void | Promise<void>, opts?: Omit<WatchOptions, "include" | "exclude" | "poll" | "cwd" | "logger">) => void;
}
//#endregion
//#region src/analyze.d.ts
declare function analyze(ctx: BambooContext, options?: AnalysisOptions): {
getRecipeReport(format?: ReportFormat): {
report: import("@bamboocss/reporter").RecipeReportEntry[];
formatted: string;
};
getTokenReport(format?: ReportFormat): {
report: import("@bamboocss/reporter").TokenAnalysisReport;
formatted: string;
};
writeReport(filePath: string): Promise<void>;
};
//#endregion
//#region src/build-info.d.ts
declare function buildInfo(ctx: BambooContext, outfile: string): Promise<void>;
//#endregion
//#region src/builder.d.ts
declare class Builder {
/**
* The current bamboo context
*/
context: BambooContext | undefined;
private hasEmitted;
private filesMeta;
private explicitDepsMeta;
private affecteds;
private configDependencies;
setConfigDependencies(options: SetupContextOptions): void;
setup: (options?: {
configPath?: string;
cwd?: string;
}) => Promise<BambooContext | undefined>;
emit(): Promise<void>;
setupContext: (options: SetupContextOptions) => Promise<BambooContext>;
getContextOrThrow: () => BambooContext;
getFileMeta: (file: string) => {
mtime: number;
isUnchanged: boolean;
};
checkFilesChanged(files: string[]): {
changes: Map<string, FileMeta>;
hasFilesChanged: boolean;
};
extractFile: (ctx: BambooContext, file: string) => import("@bamboocss/parser").ParserResult | undefined;
extract: () => void;
isValidRoot: (root: Root) => boolean;
write: (root: Root) => void;
registerDependency: (fn: (dep: Message) => void) => void;
}
interface FileMeta {
mtime: number;
isUnchanged: boolean;
}
interface SetupContextOptions {
configPath: string;
cwd?: string;
}
//#endregion
//#region src/codegen.d.ts
declare function codegen(ctx: BambooContext, ids?: ArtifactId[]): Promise<{
box: string;
msg: string;
}>;
//#endregion
//#region src/config.d.ts
/**
* Load config and create context with auto-injected plugins.
* Used by the CLI and PostCSS plugin.
*/
declare function loadConfigAndCreateContext(options?: {
cwd?: string;
config?: Config;
configPath?: string;
}): Promise<BambooContext>;
//#endregion
//#region src/cpu-profile.d.ts
declare const startProfiling: (cwd: string, prefix: string, isWatching?: boolean) => Promise<(cb?: () => void) => void>;
//#endregion
//#region src/cssgen.d.ts
interface CssGenOptions {
cwd: string;
outfile?: string;
type?: CssArtifactType;
minimal?: boolean;
splitting?: boolean;
}
declare const cssgen: (ctx: BambooContext, options: CssGenOptions) => Promise<void>;
//#endregion
//#region src/debug.d.ts
interface DebugOptions {
outdir: string;
dry: boolean;
onlyConfig?: boolean;
}
declare function debug(ctx: BambooContext, options: DebugOptions): Promise<void>;
//#endregion
//#region src/generate.d.ts
declare function generate(config: Config, configPath?: string): Promise<void>;
//#endregion
//#region src/git-ignore.d.ts
declare function setupGitIgnore(ctx: BambooContext): void;
//#endregion
//#region src/logstream.d.ts
interface LogstreamOptions {
cwd?: string;
logfile?: string;
}
declare const setLogStream: (options: LogstreamOptions) => {
end(): void;
[Symbol.dispose]: () => void;
};
//#endregion
//#region src/parse-dependency.d.ts
declare function parseDependency(fileOrGlob: string): Message | null;
//#endregion
//#region src/setup-config.d.ts
type SetupOptions = Partial<Config> & {
force?: boolean;
};
declare function setupConfig(cwd: string, opts?: SetupOptions): Promise<void>;
declare function setupPostcss(cwd: string): Promise<void>;
//#endregion
//#region src/spec.d.ts
interface SpecOptions {
outdir?: string;
}
declare function spec(ctx: BambooContext, options: SpecOptions): Promise<SpecFile[]>;
//#endregion
export { BambooContext, Builder, type CssGenOptions, analyze, buildInfo, codegen, cssgen, debug, generate, loadConfigAndCreateContext, parseDependency, setLogStream, setupConfig, setupGitIgnore, setupPostcss, spec, startProfiling };
import { ReportFormat } from "@bamboocss/reporter";
import { Generator } from "@bamboocss/generator";
import { ParserResult, Project } from "@bamboocss/parser";
import { StyleEncoder, Stylesheet } from "@bamboocss/core";
import { AnalysisOptions, Artifact, ArtifactId, BambooHooks, Config, CssArtifactType, LoadConfigResult, Runtime, SpecFile, WatchOptions, WatcherEventType } from "@bamboocss/types";
import { Message, Root } from "postcss";
//#region src/diff-engine.d.ts
declare class DiffEngine {
private ctx;
private prevConfig;
constructor(ctx: Generator);
/**
* Reload config from disk and refresh the context
*/
reloadConfigAndRefreshContext(fn?: (conf: LoadConfigResult) => void): Promise<import("@bamboocss/types").DiffConfigResult>;
/**
* Update the context from the refreshed config
* then persist the changes on each affected engines
* Returns the list of affected artifacts/engines
*/
refresh(conf: LoadConfigResult, fn?: (conf: LoadConfigResult) => void): import("@bamboocss/types").DiffConfigResult;
}
//#endregion
//#region src/output-engine.d.ts
interface OutputEngineOptions extends Generator {
runtime: Runtime;
hooks: Partial<BambooHooks>;
}
declare class OutputEngine {
private paths;
private fs;
private path;
constructor(options: OutputEngineOptions);
empty: () => void;
ensure: (file: string, cwd: string) => string;
write: (output: Artifact | undefined) => Promise<PromiseSettledResult<void>[]> | undefined;
}
//#endregion
//#region src/create-context.d.ts
declare class BambooContext extends Generator {
runtime: Runtime;
project: Project;
output: OutputEngine;
diff: DiffEngine;
explicitDeps: string[];
constructor(conf: LoadConfigResult);
private getExplicitDependencies;
initMessage: () => string;
getFiles: () => string[];
parseFile: (filePath: string, styleEncoder?: StyleEncoder) => ParserResult | undefined;
parseFiles: (styleEncoder?: StyleEncoder) => {
filesWithCss: string[];
files: string[];
results: ParserResult[];
};
writeCss: (sheet?: Stylesheet) => Promise<PromiseSettledResult<void>[]> | undefined;
writeSplitCss: (sheet: Stylesheet) => Promise<void>;
watchConfig: (cb: (file: string) => void | Promise<void>, opts?: Omit<WatchOptions, "include">) => void;
watchFiles: (cb: (event: WatcherEventType, file: string) => void | Promise<void>, opts?: Omit<WatchOptions, "include" | "exclude" | "poll" | "cwd" | "logger">) => void;
}
//#endregion
//#region src/analyze.d.ts
declare function analyze(ctx: BambooContext, options?: AnalysisOptions): {
getRecipeReport(format?: ReportFormat): {
report: import("@bamboocss/reporter").RecipeReportEntry[];
formatted: string;
};
getTokenReport(format?: ReportFormat): {
report: import("@bamboocss/reporter").TokenAnalysisReport;
formatted: string;
};
writeReport(filePath: string): Promise<void>;
};
//#endregion
//#region src/build-info.d.ts
declare function buildInfo(ctx: BambooContext, outfile: string): Promise<void>;
//#endregion
//#region src/builder.d.ts
declare class Builder {
/**
* The current bamboo context
*/
context: BambooContext | undefined;
private hasEmitted;
private filesMeta;
private explicitDepsMeta;
private affecteds;
private configDependencies;
setConfigDependencies(options: SetupContextOptions): void;
setup: (options?: {
configPath?: string;
cwd?: string;
}) => Promise<BambooContext | undefined>;
emit(): Promise<void>;
setupContext: (options: SetupContextOptions) => Promise<BambooContext>;
getContextOrThrow: () => BambooContext;
getFileMeta: (file: string) => {
mtime: number;
isUnchanged: boolean;
};
checkFilesChanged(files: string[]): {
changes: Map<string, FileMeta>;
hasFilesChanged: boolean;
};
extractFile: (ctx: BambooContext, file: string) => import("@bamboocss/parser").ParserResult | undefined;
extract: () => void;
isValidRoot: (root: Root) => boolean;
write: (root: Root) => void;
registerDependency: (fn: (dep: Message) => void) => void;
}
interface FileMeta {
mtime: number;
isUnchanged: boolean;
}
interface SetupContextOptions {
configPath: string;
cwd?: string;
}
//#endregion
//#region src/codegen.d.ts
declare function codegen(ctx: BambooContext, ids?: ArtifactId[]): Promise<{
box: string;
msg: string;
}>;
//#endregion
//#region src/config.d.ts
/**
* Load config and create context with auto-injected plugins.
* Used by the CLI and PostCSS plugin.
*/
declare function loadConfigAndCreateContext(options?: {
cwd?: string;
config?: Config;
configPath?: string;
}): Promise<BambooContext>;
//#endregion
//#region src/cpu-profile.d.ts
declare const startProfiling: (cwd: string, prefix: string, isWatching?: boolean) => Promise<(cb?: () => void) => void>;
//#endregion
//#region src/cssgen.d.ts
interface CssGenOptions {
cwd: string;
outfile?: string;
type?: CssArtifactType;
minimal?: boolean;
splitting?: boolean;
}
declare const cssgen: (ctx: BambooContext, options: CssGenOptions) => Promise<void>;
//#endregion
//#region src/debug.d.ts
interface DebugOptions {
outdir: string;
dry: boolean;
onlyConfig?: boolean;
}
declare function debug(ctx: BambooContext, options: DebugOptions): Promise<void>;
//#endregion
//#region src/generate.d.ts
declare function generate(config: Config, configPath?: string): Promise<void>;
//#endregion
//#region src/git-ignore.d.ts
declare function setupGitIgnore(ctx: BambooContext): void;
//#endregion
//#region src/logstream.d.ts
interface LogstreamOptions {
cwd?: string;
logfile?: string;
}
declare const setLogStream: (options: LogstreamOptions) => {
end(): void;
[Symbol.dispose]: () => void;
};
//#endregion
//#region src/parse-dependency.d.ts
declare function parseDependency(fileOrGlob: string): Message | null;
//#endregion
//#region src/setup-config.d.ts
type SetupOptions = Partial<Config> & {
force?: boolean;
};
declare function setupConfig(cwd: string, opts?: SetupOptions): Promise<void>;
declare function setupPostcss(cwd: string): Promise<void>;
//#endregion
//#region src/spec.d.ts
interface SpecOptions {
outdir?: string;
}
declare function spec(ctx: BambooContext, options: SpecOptions): Promise<SpecFile[]>;
//#endregion
export { BambooContext, Builder, type CssGenOptions, analyze, buildInfo, codegen, cssgen, debug, generate, loadConfigAndCreateContext, parseDependency, setLogStream, setupConfig, setupGitIgnore, setupPostcss, spec, startProfiling };