npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@acoustic-content-sdk/tooling

v9.0.10076

Published

Implementation of utility methods used for tooling.

Downloads

111

Readme

npm

Implementation of utility methods used for tooling.

API Documentation

Home > @acoustic-content-sdk/tooling

tooling package

Implementation of utility methods used for tooling.

Enumerations

| Enumeration | Description | | --- | --- | | ProjectType | |

Functions

| Function | Description | | --- | --- | | acceptJsonFile(aFile) | Tests if a file is either a directory or a JSON file | | addToWchToolsDependencies(aDeps, aPkg) | | | blackWhiteList(aInclude, aExclude) | | | bufferToIdentifier(aBuffer) | Converts a buffer to an identifier string | | canHaveLayout(aType) | | | canonicalizeAssets(options) | | | canonicalizeJson(aData) | Performs an inplace canonicalization of a JSON object | | createFileDescriptor(aName, aValue) | | | createGuid(aId, aSecret) | Constructs a GUID in a reproducible way from an ID | | createGuidFromBuffer(aBuffer) | Constructs a GUID in a reproducible way from an ID | | createReadDirectory(aRoot) | | | createRevision(aObj, aSecret) | | | createTypePredicate(aOptions) | | | ensureDirPath(aDir) | | | ensureLeadingSlash(aUrl) | | | ensureTrailingSlash(aUrl) | | | findSdkVersion(aReadFile) | Locates the SDK version | | findSdkVersionFromPkg(aPackage) | Locates the SDK version | | generateDataOverlay(aOptions) | Generates a stream of files for all wchtools data folders references by the addressed module. | | generateKeys(options) | | | generateLayout(options) | | | generateLayouts(options) | | | getOrganization(aPackageName) | Extracts the organization from a package name | | hasTrailingSlash(aUrl) | | | isFileDescriptor(aValue) | Tests if an item is a file descriptor | | logFileDescriptor() | | | relativePath(aSrc, aDst) | | | rxFindAuthoringAssets(aRoot, aTree) | Reads the authoring assets from a directory | | rxFindAuthoringContent(aRoot, aTree) | Reads the authoring types from a directory | | rxFindAuthoringLayoutMappings(aRoot, aTree) | Reads the authoring layouts from a directory | | rxFindAuthoringLayouts(aRoot, aTree) | Reads the authoring layouts from a directory | | rxFindAuthoringTypes(aRoot, aTree) | Reads the authoring types from a directory | | rxFindDataDir(host, options) | | | rxFindPackageJson(aDir, aReadFile) | Loads the package JSON file relative to the directory | | rxFindProject(workspaceOrHost, options) | Locates the workspace project, either from the configured project name, else falls back to the default project | | rxFindProjectName(workspaceOrHost, options) | Locates the workspace project, either from the configured project name, else falls back to the default project | | rxFindWchToolsOptions(host, options) | | | rxGetDependencies(aReadText, aRoot) | Lists all node dependencies of the module | | rxGetWorkspace(aReadText) | | | rxGetWorkspacePath(aReadText) | | | rxLocateRootDir(aBaseDir) | Locates the application root directory based on the working directory | | rxReadAuthoringContent(aRoot, aTree) | Reads the authoring content from a directory | | rxReadAuthoringLayoutMappings(aRoot, aTree) | Reads the authoring layouts from a directory | | rxReadAuthoringLayouts(aRoot, aTree) | Reads the authoring layouts from a directory | | rxReadAuthoringTypes(aRoot, aTree) | Reads the authoring types from a directory | | rxReadBuffer(aFile, aHost) | Reads a JSON file on top of a text callback | | rxReadDir(aBaseDir, aAccept) | Reads all files in the directory and all of its (accepted) subdirectories | | rxReadJsonFile(aFile, aHost) | Reads a JSON file on top of a text callback | | rxWchToolsManifest(aName) | Creates an operator that converts a sequence of files into a manifest | | rxWriteJsonFile(aName, aValue, aHost) | Persist a JSON file | | selectOptionsForTarget(aTarget, aConfiguration) | Returns a selector function that selects the configuration options for a target | | serializeJson(aData) | | | wchToolsCleanup(aItem) | | | wchToolsFileDescriptor(aItem) | Constructs a file descriptor from the item | | writeFiles(aRoot, aOverride) | Returns an operator that writes all file descriptors to disk |

Interfaces

| Interface | Description | | --- | --- | | DataOverlaySchema | | | JsonEntry | | | ReadDirectoryEntry | File descriptor | | WorkspaceProject | | | WorkspaceSchema | |

Variables

| Variable | Description | | --- | --- | | anyToBuffer | Converts an arbitrary value into a buffer | | camelCase | | | classCase | | | constantCase | | | createChalkLoggerService | Constructs a chalk based logger | | createReadBuffer | Constructs the read buffer callback | | createReadTextFile | Constructs the read text file callback | | dotCase | | | fixPath | Make sure the path starts with a slash | | kebabCase | | | readTextFile | Generates a ReadTextFile function on top of a ReadBuffer function | | rxDataDirectory | Creates an RX operator that locates data directories in the packages | | rxExists | Tests if a file exists | | rxWriteFileDescriptor | Persists a file descriptor | | TYPE_SUFFIX | | | TYPES_FOLDER | | | WCHTOOLS_DEPENDENCIES | | | WCHTOOLS_FOLDER_ASSET | | | WCHTOOLS_FOLDER_CONTENT_TYPE | | | WCHTOOLS_FOLDER_CONTENT | | | WCHTOOLS_FOLDER_LAYOUT_MAPPING | | | WCHTOOLS_FOLDER_LAYOUT | | | wchToolsGetCredentials | | | writeTextFile | Creates a WriteTextFile function on top of a WriteBuffer function |

Type Aliases

| Type Alias | Description | | --- | --- | | AuthoringItem | | | FileDescriptor | File descriptor, first element is path, second is content | | JsonEntryMap | | | PackageJson | | | ReadBuffer | | | ReadDirectory | Function type to read a directory | | ReadTextFile | | | WriteBuffer | | | WriteTextFile | |

Home > @acoustic-content-sdk/tooling > ProjectType

ProjectType enum

Signature:

export declare enum ProjectType 

Enumeration Members

| Member | Value | Description | | --- | --- | --- | | Application | "application" | | | Library | "library" | |

Home > @acoustic-content-sdk/tooling > acceptJsonFile

acceptJsonFile() function

Tests if a file is either a directory or a JSON file

Signature:

export declare function acceptJsonFile(aFile: ReadDirectoryEntry): boolean;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | aFile | ReadDirectoryEntry | the descriptor |

Returns:

boolean

true if we accept the file or directory

Home > @acoustic-content-sdk/tooling > addToWchToolsDependencies

addToWchToolsDependencies() function

Signature:

export declare function addToWchToolsDependencies(aDeps: string[], aPkg: any): void;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | aDeps | string[] | | | aPkg | any | |

Returns:

void

Home > @acoustic-content-sdk/tooling > blackWhiteList

blackWhiteList() function

Signature:

export declare function blackWhiteList(aInclude?: string[], aExclude?: string[]): Predicate<string>;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | aInclude | string[] | | | aExclude | string[] | |

Returns:

Predicate<string>

Home > @acoustic-content-sdk/tooling > bufferToIdentifier

bufferToIdentifier() function

Converts a buffer to an identifier string

Signature:

export declare function bufferToIdentifier(aBuffer: Uint8Array): string;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | aBuffer | Uint8Array | the buffer |

Returns:

string

the string

Home > @acoustic-content-sdk/tooling > canHaveLayout

canHaveLayout() function

Signature:

export declare function canHaveLayout(aType: AuthoringType): boolean;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | aType | AuthoringType | |

Returns:

boolean

Home > @acoustic-content-sdk/tooling > canonicalizeAssets

canonicalizeAssets() function

Signature:

export declare function canonicalizeAssets(options: Schema): (aReadDir: ReadDirectory, logSvc?: LoggerService) => Observable<FileDescriptor<BaseAuthoringItem>>;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | options | Schema | |

Returns:

(aReadDir: ReadDirectory, logSvc?: LoggerService) => Observable<FileDescriptor<BaseAuthoringItem>>

Home > @acoustic-content-sdk/tooling > canonicalizeJson

canonicalizeJson() function

Performs an inplace canonicalization of a JSON object

Signature:

export declare function canonicalizeJson(aData: any): any;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | aData | any | the JSON object |

Returns:

any

the canonicalized object

Home > @acoustic-content-sdk/tooling > createFileDescriptor

createFileDescriptor() function

Signature:

export declare function createFileDescriptor<T>(aName: string, aValue: T): FileDescriptor<T>;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | aName | string | | | aValue | T | |

Returns:

FileDescriptor<T>

Home > @acoustic-content-sdk/tooling > createGuid

createGuid() function

Constructs a GUID in a reproducible way from an ID

Signature:

export declare function createGuid(aId: BinaryLike, aSecret?: string): string;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | aId | BinaryLike | the original ID | | aSecret | string | some optional secret |

Returns:

string

the guid

Home > @acoustic-content-sdk/tooling > createGuidFromBuffer

createGuidFromBuffer() function

Constructs a GUID in a reproducible way from an ID

Signature:

export declare function createGuidFromBuffer(aBuffer: Buffer): string;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | aBuffer | Buffer | |

Returns:

string

the guid

Home > @acoustic-content-sdk/tooling > createReadDirectory

createReadDirectory() function

Signature:

export declare function createReadDirectory(aRoot: string): ReadDirectory;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | aRoot | string | |

Returns:

ReadDirectory

Home > @acoustic-content-sdk/tooling > createRevision

createRevision() function

Signature:

export declare function createRevision(aObj: any, aSecret?: string): string;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | aObj | any | | | aSecret | string | |

Returns:

string

Home > @acoustic-content-sdk/tooling > createTypePredicate

createTypePredicate() function

Signature:

export declare function createTypePredicate(aOptions: {
    include?: string[];
    exclude?: string[];
}): Predicate<AuthoringType>;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | aOptions | { include?: string[]; exclude?: string[];} | |

Returns:

Predicate<AuthoringType>

Home > @acoustic-content-sdk/tooling > ensureDirPath

ensureDirPath() function

Signature:

export declare function ensureDirPath(aDir: string): string;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | aDir | string | |

Returns:

string

Home > @acoustic-content-sdk/tooling > ensureLeadingSlash

ensureLeadingSlash() function

Signature:

export declare function ensureLeadingSlash(aUrl: string): string;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | aUrl | string | |

Returns:

string

Home > @acoustic-content-sdk/tooling > ensureTrailingSlash

ensureTrailingSlash() function

Signature:

export declare function ensureTrailingSlash(aUrl: string): string;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | aUrl | string | |

Returns:

string

Home > @acoustic-content-sdk/tooling > findSdkVersion

findSdkVersion() function

Locates the SDK version

Signature:

export declare function findSdkVersion(aReadFile: ReadTextFile): Observable<string>;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | aReadFile | ReadTextFile | read callback |

Returns:

Observable<string>

the SDK version

Home > @acoustic-content-sdk/tooling > findSdkVersionFromPkg

findSdkVersionFromPkg() function

Locates the SDK version

Signature:

export declare function findSdkVersionFromPkg(aPackage: any): string;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | aPackage | any | the package JSON |

Returns:

string

the SDK version or an exception if the SDK versions in the package are inconsistent

Home > @acoustic-content-sdk/tooling > generateDataOverlay

generateDataOverlay() function

Generates a stream of files for all wchtools data folders references by the addressed module.

Signature:

export declare function generateDataOverlay(aOptions: DataOverlaySchema): (aReadText: ReadTextFile, aReadDir: ReadDirectory, aLogSvc?: LoggerService) => Observable<FileDescriptor<Buffer>>;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | aOptions | DataOverlaySchema | options |

Returns:

(aReadText: ReadTextFile, aReadDir: ReadDirectory, aLogSvc?: LoggerService) => Observable<FileDescriptor<Buffer>>

a function that generates the overlay

Remarks

The filenames are relative to the referenced data directories, so they can ba aggregated easily

Home > @acoustic-content-sdk/tooling > generateKeys

generateKeys() function

Signature:

export declare function generateKeys(options: Schema): (aReadDir: ReadDirectory, aLogSvc?: LoggerService) => import("rxjs").Observable<import("../../public_api").FileDescriptor<AuthoringContentItem>>;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | options | Schema | |

Returns:

(aReadDir: ReadDirectory, aLogSvc?: LoggerService) => import("rxjs").Observable<import("../../public_api").FileDescriptor<AuthoringContentItem>>

Home > @acoustic-content-sdk/tooling > generateLayout

generateLayout() function

Signature:

export declare function generateLayout(options: Schema): (aReadDir: ReadDirectory, logSvc?: LoggerService) => import("rxjs").Observable<import("../../public_api").FileDescriptor<string | Buffer | import("@acoustic-content-sdk/api").AuthoringLayoutMapping | import("@acoustic-content-sdk/api").AuthoringLayoutItem>>;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | options | Schema | |

Returns:

(aReadDir: ReadDirectory, logSvc?: LoggerService) => import("rxjs").Observable<import("../../public_api").FileDescriptor<string | Buffer | import("@acoustic-content-sdk/api").AuthoringLayoutMapping | import("@acoustic-content-sdk/api").AuthoringLayoutItem>>

Home > @acoustic-content-sdk/tooling > generateLayouts

generateLayouts() function

Signature:

export declare function generateLayouts(options: Schema): (aReadDir: ReadDirectory, logSvc?: LoggerService) => import("rxjs").Observable<import("../../public_api").FileDescriptor<string | Buffer | import("@acoustic-content-sdk/api").AuthoringLayoutMapping | import("@acoustic-content-sdk/api").AuthoringLayoutItem>>;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | options | Schema | |

Returns:

(aReadDir: ReadDirectory, logSvc?: LoggerService) => import("rxjs").Observable<import("../../public_api").FileDescriptor<string | Buffer | import("@acoustic-content-sdk/api").AuthoringLayoutMapping | import("@acoustic-content-sdk/api").AuthoringLayoutItem>>

Home > @acoustic-content-sdk/tooling > getOrganization

getOrganization() function

Extracts the organization from a package name

Signature:

export declare function getOrganization(aPackageName: string): string;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | aPackageName | string | the package name |

Returns:

string

the organization

Home > @acoustic-content-sdk/tooling > hasTrailingSlash

hasTrailingSlash() function

Signature:

export declare function hasTrailingSlash(aUrl: string): boolean;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | aUrl | string | |

Returns:

boolean

Home > @acoustic-content-sdk/tooling > isFileDescriptor

isFileDescriptor() function

Tests if an item is a file descriptor

Signature:

export declare function isFileDescriptor<T>(aValue: any): aValue is FileDescriptor<T>;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | aValue | any | the value to test |

Returns:

aValue is FileDescriptor<T>

true if it is a descriptor

Home > @acoustic-content-sdk/tooling > logFileDescriptor

logFileDescriptor() function

Signature:

export declare function logFileDescriptor<T>(): MonoTypeOperatorFunction<FileDescriptor<T>>;

Returns:

MonoTypeOperatorFunction<FileDescriptor<T>>

Home > @acoustic-content-sdk/tooling > relativePath

relativePath() function

Signature:

export declare function relativePath(aSrc: string, aDst: string): string;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | aSrc | string | | | aDst | string | |

Returns:

string

Home > @acoustic-content-sdk/tooling > rxFindAuthoringAssets

rxFindAuthoringAssets() function

Reads the authoring assets from a directory

Signature:

export declare function rxFindAuthoringAssets(aRoot: string, aTree: ReadDirectory): Observable<JsonEntry<AuthoringAsset>>;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | aRoot | string | root directory | | aTree | ReadDirectory | the tree |

Returns:

Observable<JsonEntry<AuthoringAsset>>

the result

Home > @acoustic-content-sdk/tooling > rxFindAuthoringContent

rxFindAuthoringContent() function

Reads the authoring types from a directory

Signature:

export declare function rxFindAuthoringContent(aRoot: string, aTree: ReadDirectory): Observable<JsonEntry<AuthoringContentItem>>;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | aRoot | string | root directory | | aTree | ReadDirectory | the tree |

Returns:

Observable<JsonEntry<AuthoringContentItem>>

the result

Home > @acoustic-content-sdk/tooling > rxFindAuthoringLayoutMappings

rxFindAuthoringLayoutMappings() function

Reads the authoring layouts from a directory

Signature:

export declare function rxFindAuthoringLayoutMappings(aRoot: string, aTree: ReadDirectory): Observable<JsonEntry<AuthoringLayoutMapping>>;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | aRoot | string | root directory | | aTree | ReadDirectory | the tree |

Returns:

Observable<JsonEntry<AuthoringLayoutMapping>>

the result

Home > @acoustic-content-sdk/tooling > rxFindAuthoringLayouts

rxFindAuthoringLayouts() function

Reads the authoring layouts from a directory

Signature:

export declare function rxFindAuthoringLayouts(aRoot: string, aTree: ReadDirectory): Observable<JsonEntry<AuthoringLayoutItem>>;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | aRoot | string | root directory | | aTree | ReadDirectory | the tree |

Returns:

Observable<JsonEntry<AuthoringLayoutItem>>

the result

Home > @acoustic-content-sdk/tooling > rxFindAuthoringTypes

rxFindAuthoringTypes() function

Reads the authoring types from a directory

Signature:

export declare function rxFindAuthoringTypes(aRoot: string, aTree: ReadDirectory): Observable<JsonEntry<AuthoringType>>;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | aRoot | string | root directory | | aTree | ReadDirectory | the tree |

Returns:

Observable<JsonEntry<AuthoringType>>

the result

Home > @acoustic-content-sdk/tooling > rxFindDataDir

rxFindDataDir() function

Signature:

export declare function rxFindDataDir(host: ReadTextFile, options?: {
    data?: string;
}): Observable<string>;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | host | ReadTextFile | | | options | { data?: string;} | |

Returns:

Observable<string>

Home > @acoustic-content-sdk/tooling > rxFindPackageJson

rxFindPackageJson() function

Loads the package JSON file relative to the directory

Signature:

export declare function rxFindPackageJson(aDir: string, aReadFile: ReadTextFile): Observable<any>;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | aDir | string | the directory to start on | | aReadFile | ReadTextFile | the read file callback |

Returns:

Observable<any>

an observable with the file

Home > @acoustic-content-sdk/tooling > rxFindProject

rxFindProject() function

Locates the workspace project, either from the configured project name, else falls back to the default project

Signature:

export declare function rxFindProject<TProjectType extends ProjectType = ProjectType.Application>(workspaceOrHost: WorkspaceSchema | ReadTextFile, options: {
    project?: string;
}): Observable<WorkspaceProject<TProjectType>>;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | workspaceOrHost | WorkspaceSchema | ReadTextFile | the workspace root | | options | { project?: string;} | the options |

Returns:

Observable<WorkspaceProject<TProjectType>>

the project

Home > @acoustic-content-sdk/tooling > rxFindProjectName

rxFindProjectName() function

Locates the workspace project, either from the configured project name, else falls back to the default project

Signature:

export declare function rxFindProjectName(workspaceOrHost: WorkspaceSchema | ReadTextFile, options: {
    project?: string;
}): Observable<string>;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | workspaceOrHost | WorkspaceSchema | ReadTextFile | the workspace root | | options | { project?: string;} | the options |

Returns:

Observable<string>

the project

Home > @acoustic-content-sdk/tooling > rxFindWchToolsOptions

rxFindWchToolsOptions() function

Signature:

export declare function rxFindWchToolsOptions(host: ReadTextFile, options?: {
    data?: string;
}): Observable<string>;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | host | ReadTextFile | | | options | { data?: string;} | |

Returns:

Observable<string>

Home > @acoustic-content-sdk/tooling > rxGetDependencies

rxGetDependencies() function

Lists all node dependencies of the module

Signature:

export declare function rxGetDependencies(aReadText: ReadTextFile, aRoot?: string): Observable<FileDescriptor<any>>;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | aReadText | ReadTextFile | the read text callback | | aRoot | string | the root folder |

Returns:

Observable<FileDescriptor<any>>

a listing of the dependencies. The path of the returned FileDescriptor contains the directory of the package, not the name of the package.json file. The value is the package.json object.

Home > @acoustic-content-sdk/tooling > rxGetWorkspace

rxGetWorkspace() function

Signature:

export declare function rxGetWorkspace(aReadText: ReadTextFile): Observable<WorkspaceSchema>;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | aReadText | ReadTextFile | |

Returns:

Observable<WorkspaceSchema>

Home > @acoustic-content-sdk/tooling > rxGetWorkspacePath

rxGetWorkspacePath() function

Signature:

export declare function rxGetWorkspacePath(aReadText: ReadTextFile): Observable<string>;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | aReadText | ReadTextFile | |

Returns:

Observable<string>

Home > @acoustic-content-sdk/tooling > rxLocateRootDir

rxLocateRootDir() function

Locates the application root directory based on the working directory

Signature:

export declare function rxLocateRootDir(aBaseDir?: string): Observable<string>;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | aBaseDir | string | optionally the base directory, defaults to the current working dir |

Returns:

Observable<string>

the application root

Home > @acoustic-content-sdk/tooling > rxReadAuthoringContent

rxReadAuthoringContent() function

Reads the authoring content from a directory

Signature:

export declare function rxReadAuthoringContent(aRoot: string, aTree: ReadDirectory): Observable<JsonEntryMap<AuthoringContentItem>>;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | aRoot | string | root directory | | aTree | ReadDirectory | the tree |

Returns:

Observable<JsonEntryMap<AuthoringContentItem>>

the result

Home > @acoustic-content-sdk/tooling > rxReadAuthoringLayoutMappings

rxReadAuthoringLayoutMappings() function

Reads the authoring layouts from a directory

Signature:

export declare function rxReadAuthoringLayoutMappings(aRoot: string, aTree: ReadDirectory): Observable<JsonEntryMap<AuthoringLayoutMapping>>;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | aRoot | string | root directory | | aTree | ReadDirectory | the tree |

Returns:

Observable<JsonEntryMap<AuthoringLayoutMapping>>

the result

Home > @acoustic-content-sdk/tooling > rxReadAuthoringLayouts

rxReadAuthoringLayouts() function

Reads the authoring layouts from a directory

Signature:

export declare function rxReadAuthoringLayouts(aRoot: string, aTree: ReadDirectory): Observable<JsonEntryMap<AuthoringLayoutItem>>;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | aRoot | string | root directory | | aTree | ReadDirectory | the tree |

Returns:

Observable<JsonEntryMap<AuthoringLayoutItem>>

the result

Home > @acoustic-content-sdk/tooling > rxReadAuthoringTypes

rxReadAuthoringTypes() function

Reads the authoring types from a directory

Signature:

export declare function rxReadAuthoringTypes(aRoot: string, aTree: ReadDirectory): Observable<JsonEntryMap<AuthoringType>>;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | aRoot | string | root directory | | aTree | ReadDirectory | the tree |

Returns:

Observable<JsonEntryMap<AuthoringType>>

the result

Home > @acoustic-content-sdk/tooling > rxReadBuffer

rxReadBuffer() function

Reads a JSON file on top of a text callback

Signature:

export declare function rxReadBuffer<T>(aFile: string, aHost: ReadTextFile): Observable<T>;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | aFile | string | filename | | aHost | ReadTextFile | callback host |

Returns:

Observable<T>

the JSON file

Home > @acoustic-content-sdk/tooling > rxReadDir

rxReadDir() function

Reads all files in the directory and all of its (accepted) subdirectories

Signature:

export declare function rxReadDir(aBaseDir: string, aAccept?: Predicate<ReadDirectoryEntry>): Observable<FileDescriptor<Buffer>>;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | aBaseDir | string | root directory | | aAccept | Predicate<ReadDirectoryEntry> | function to test if the file is accepted |

Returns:

Observable<FileDescriptor<Buffer>>

a sequence of files in no particular order

Home > @acoustic-content-sdk/tooling > rxReadJsonFile

rxReadJsonFile() function

Reads a JSON file on top of a text callback

Signature:

export declare function rxReadJsonFile<T>(aFile: string, aHost: ReadTextFile): Observable<T>;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | aFile | string | filename | | aHost | ReadTextFile | callback host |

Returns:

Observable<T>

the JSON file

Home > @acoustic-content-sdk/tooling > rxWchToolsManifest

rxWchToolsManifest() function

Creates an operator that converts a sequence of files into a manifest

Signature:

export declare function rxWchToolsManifest(aName: string): OperatorFunction<FileDescriptor<any>, FileDescriptor<any>>;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | aName | string | the name of the manifest |

Returns:

OperatorFunction<FileDescriptor<any>, FileDescriptor<any>>

the operator

Home > @acoustic-content-sdk/tooling > rxWriteJsonFile

rxWriteJsonFile() function

Persist a JSON file

Signature:

export declare function rxWriteJsonFile(aName: string, aValue: any, aHost: WriteTextFile): Observable<string>;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | aName | string | name of the file | | aValue | any | value of the file | | aHost | WriteTextFile | host that can write text files |

Returns:

Observable<string>

the name of the file

Home > @acoustic-content-sdk/tooling > selectOptionsForTarget

selectOptionsForTarget() function

Returns a selector function that selects the configuration options for a target

Signature:

export declare function selectOptionsForTarget(aTarget?: string, aConfiguration?: string): UnaryFunction<WorkspaceProject, JSONObject>;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | aTarget | string | the project target, e.g. 'build' | | aConfiguration | string | the configuration name, probably more than one configurations |

Returns:

UnaryFunction<WorkspaceProject, JSONObject>

the options

Home > @acoustic-content-sdk/tooling > serializeJson

serializeJson() function

Signature:

export declare function serializeJson(aData: any): string | undefined;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | aData | any | |

Returns:

string | undefined

Home > @acoustic-content-sdk/tooling > wchToolsCleanup

wchToolsCleanup() function

Signature:

export declare function wchToolsCleanup<T>(aItem: FileDescriptor<T>): FileDescriptor<T>;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | aItem | FileDescriptor<T> | |

Returns:

FileDescriptor<T>

Home > @acoustic-content-sdk/tooling > wchToolsFileDescriptor

wchToolsFileDescriptor() function

Constructs a file descriptor from the item

Signature:

export declare function wchToolsFileDescriptor<T extends AuthoringItem>(aItem: T | FileDescriptor<T>): FileDescriptor<T>;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | aItem | T | FileDescriptor<T> | the authoring item |

Returns:

FileDescriptor<T>

the descriptor

Home > @acoustic-content-sdk/tooling > writeFiles

writeFiles() function

Returns an operator that writes all file descriptors to disk

Signature:

export declare function writeFiles<T>(aRoot: string, aOverride?: boolean): MonoTypeOperatorFunction<FileDescriptor<T>>;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | aRoot | string | the base of the target file system | | aOverride | boolean | override flag |

Returns:

MonoTypeOperatorFunction<FileDescriptor<T>>

the operator

Home > @acoustic-content-sdk/tooling > DataOverlaySchema

DataOverlaySchema interface

Signature:

export interface DataOverlaySchema 

Properties

| Property | Type | Description | | --- | --- | --- | | src | string | Source folder, uses the root folder if empty |

Home > @acoustic-content-sdk/tooling > JsonEntry

JsonEntry interface

Signature:

export interface JsonEntry<T> 

Properties

| Property | Type | Description | | --- | --- | --- | | entry | T | | | id | string | | | path | string | |

Home > @acoustic-content-sdk/tooling > ReadDirectoryEntry

ReadDirectoryEntry interface

File descriptor

Signature:

export interface ReadDirectoryEntry 

Properties

| Property | Type | Description | | --- | --- | --- | | isDirectory | boolean | | | path | string | |

Home > @acoustic-content-sdk/tooling > [WorkspaceProject](#_0293a864b1d10062de04112b8d5ec80a2d89f6d70f50635c