9.0.10076 • Published 5 years ago

@acoustic-content-sdk/tooling v9.0.10076

Weekly downloads
1
License
MIT
Repository
-
Last release
5 years ago

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

EnumerationDescription
ProjectType

Functions

FunctionDescription
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

InterfaceDescription
DataOverlaySchema
JsonEntry
ReadDirectoryEntryFile descriptor
WorkspaceProject
WorkspaceSchema

Variables

VariableDescription
anyToBufferConverts an arbitrary value into a buffer
camelCase
classCase
constantCase
createChalkLoggerServiceConstructs a chalk based logger
createReadBufferConstructs the read buffer callback
createReadTextFileConstructs the read text file callback
dotCase
fixPathMake sure the path starts with a slash
kebabCase
readTextFileGenerates a ReadTextFile function on top of a ReadBuffer function
rxDataDirectoryCreates an RX operator that locates data directories in the packages
rxExistsTests if a file exists
rxWriteFileDescriptorPersists 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
writeTextFileCreates a WriteTextFile function on top of a WriteBuffer function

Type Aliases

Type AliasDescription
AuthoringItem
FileDescriptorFile descriptor, first element is path, second is content
JsonEntryMap
PackageJson
ReadBuffer
ReadDirectoryFunction type to read a directory
ReadTextFile
WriteBuffer
WriteTextFile

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

ProjectType enum

Signature:

export declare enum ProjectType 

Enumeration Members

MemberValueDescription
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

ParameterTypeDescription
aFileReadDirectoryEntrythe 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

ParameterTypeDescription
aDepsstring[]
aPkgany

Returns:

void

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

blackWhiteList() function

Signature:

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

Parameters

ParameterTypeDescription
aIncludestring[]
aExcludestring[]

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

ParameterTypeDescription
aBufferUint8Arraythe buffer

Returns:

string

the string

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

canHaveLayout() function

Signature:

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

Parameters

ParameterTypeDescription
aTypeAuthoringType

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

ParameterTypeDescription
optionsSchema

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

ParameterTypeDescription
aDataanythe 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

ParameterTypeDescription
aNamestring
aValueT

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

ParameterTypeDescription
aIdBinaryLikethe original ID
aSecretstringsome 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

ParameterTypeDescription
aBufferBuffer

Returns:

string

the guid

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

createReadDirectory() function

Signature:

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

Parameters

ParameterTypeDescription
aRootstring

Returns:

ReadDirectory

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

createRevision() function

Signature:

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

Parameters

ParameterTypeDescription
aObjany
aSecretstring

Returns:

string

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

createTypePredicate() function

Signature:

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

Parameters

ParameterTypeDescription
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

ParameterTypeDescription
aDirstring

Returns:

string

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

ensureLeadingSlash() function

Signature:

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

Parameters

ParameterTypeDescription
aUrlstring

Returns:

string

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

ensureTrailingSlash() function

Signature:

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

Parameters

ParameterTypeDescription
aUrlstring

Returns:

string

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

findSdkVersion() function

Locates the SDK version

Signature:

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

Parameters

ParameterTypeDescription
aReadFileReadTextFileread 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

ParameterTypeDescription
aPackageanythe 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

ParameterTypeDescription
aOptionsDataOverlaySchemaoptions

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

ParameterTypeDescription
optionsSchema

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

ParameterTypeDescription
optionsSchema

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

ParameterTypeDescription
optionsSchema

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

ParameterTypeDescription
aPackageNamestringthe package name

Returns:

string

the organization

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

hasTrailingSlash() function

Signature:

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

Parameters

ParameterTypeDescription
aUrlstring

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

ParameterTypeDescription
aValueanythe 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

ParameterTypeDescription
aSrcstring
aDststring

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

ParameterTypeDescription
aRootstringroot directory
aTreeReadDirectorythe 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

ParameterTypeDescription
aRootstringroot directory
aTreeReadDirectorythe 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

ParameterTypeDescription
aRootstringroot directory
aTreeReadDirectorythe 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

ParameterTypeDescription
aRootstringroot directory
aTreeReadDirectorythe 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

ParameterTypeDescription
aRootstringroot directory
aTreeReadDirectorythe 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

ParameterTypeDescription
hostReadTextFile
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

ParameterTypeDescription
aDirstringthe directory to start on
aReadFileReadTextFilethe 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

ParameterTypeDescription
workspaceOrHostWorkspaceSchema | ReadTextFilethe 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

ParameterTypeDescription
workspaceOrHostWorkspaceSchema | ReadTextFilethe 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

ParameterTypeDescription
hostReadTextFile
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

ParameterTypeDescription
aReadTextReadTextFilethe read text callback
aRootstringthe 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

ParameterTypeDescription
aReadTextReadTextFile

Returns:

Observable<WorkspaceSchema>

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

rxGetWorkspacePath() function

Signature:

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

Parameters

ParameterTypeDescription
aReadTextReadTextFile

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

ParameterTypeDescription
aBaseDirstringoptionally 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

ParameterTypeDescription
aRootstringroot directory
aTreeReadDirectorythe 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

ParameterTypeDescription
aRootstringroot directory
aTreeReadDirectorythe 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

ParameterTypeDescription
aRootstringroot directory
aTreeReadDirectorythe 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

ParameterTypeDescription
aRootstringroot directory
aTreeReadDirectorythe 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

ParameterTypeDescription
aFilestringfilename
aHostReadTextFilecallback 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

ParameterTypeDescription
aBaseDirstringroot directory
aAcceptPredicate<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

ParameterTypeDescription
aFilestringfilename
aHostReadTextFilecallback 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

ParameterTypeDescription
aNamestringthe 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

ParameterTypeDescription
aNamestringname of the file
aValueanyvalue of the file
aHostWriteTextFilehost 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

ParameterTypeDescription
aTargetstringthe project target, e.g. 'build'
aConfigurationstringthe 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

ParameterTypeDescription
aDataany

Returns:

string | undefined

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

wchToolsCleanup() function

Signature:

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

Parameters

ParameterTypeDescription
aItemFileDescriptor<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

ParameterTypeDescription
aItemT | 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

ParameterTypeDescription
aRootstringthe base of the target file system
aOverridebooleanoverride flag

Returns:

MonoTypeOperatorFunction<FileDescriptor<T>>

the operator

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

DataOverlaySchema interface

Signature:

export interface DataOverlaySchema 

Properties

PropertyTypeDescription
srcstringSource folder, uses the root folder if empty

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

JsonEntry interface

Signature:

export interface JsonEntry<T> 

Properties

PropertyTypeDescription
entryT
idstring
pathstring

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

ReadDirectoryEntry interface

File descriptor

Signature:

export interface ReadDirectoryEntry 

Properties

PropertyTypeDescription
isDirectoryboolean
pathstring

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