Skip to main content

teraslice-cli / helpers/asset-src / AssetSrc

Class: AssetSrc

Constructors

new AssetSrc()

new AssetSrc(srcDir, devMode, debug, bundle, bundleTarget, overwrite): AssetSrc

Parameters

ParameterTypeDefault value
srcDirstringundefined
devModebooleanfalse
debugbooleanfalse
bundlebooleantrue
bundleTargetstring'node22'
overwritebooleanfalse

Returns

AssetSrc

Source

teraslice-cli/src/helpers/asset-src.ts:59

Properties

assetFile

assetFile: string

Source

teraslice-cli/src/helpers/asset-src.ts:46


assetPackageJson

assetPackageJson: any

Source

teraslice-cli/src/helpers/asset-src.ts:48


bundle?

optional bundle: boolean

Source

teraslice-cli/src/helpers/asset-src.ts:51


bundleTarget?

optional bundleTarget: string

Source

teraslice-cli/src/helpers/asset-src.ts:52


debug

debug: boolean

Source

teraslice-cli/src/helpers/asset-src.ts:54


devMode

devMode: boolean = false

Source

teraslice-cli/src/helpers/asset-src.ts:57


isESM

isESM: boolean = false

Source

teraslice-cli/src/helpers/asset-src.ts:56


name

name: string

Source

teraslice-cli/src/helpers/asset-src.ts:49


outputFileName

outputFileName: string

Source

teraslice-cli/src/helpers/asset-src.ts:53


overwrite

overwrite: boolean

Source

teraslice-cli/src/helpers/asset-src.ts:55


packageJson

packageJson: any

Source

teraslice-cli/src/helpers/asset-src.ts:47


srcDir

srcDir: string

Param

Path to a valid asset source directory, must must contain asset/asset.json and asset/package.json files.

Source

teraslice-cli/src/helpers/asset-src.ts:45


version

version: string

Source

teraslice-cli/src/helpers/asset-src.ts:50

Accessors

buildDir

get buildDir(): string

Returns

string

Path to the output directory for the finished asset zipfile

Source

teraslice-cli/src/helpers/asset-src.ts:97


zipFileName

get zipFileName(): string

Returns

string

Source

teraslice-cli/src/helpers/asset-src.ts:101

Methods

build()

build(): Promise<ZipResults>

Returns

Promise<ZipResults>

Source

teraslice-cli/src/helpers/asset-src.ts:182


generateRegistry()

generateRegistry(): Promise<[AssetRegistry, string]>

generates the registry object that is used to generate the index.js asset registry

Returns

Promise<[AssetRegistry, string]>

Source

teraslice-cli/src/helpers/asset-src.ts:140


operatorFiles()

operatorFiles(ext): Promise<string[]>

operatorFiles finds all of the Teraslice operator files, including: api.js/ts fetcher.js/ts processor.js/ts schema.js/ts slicer.js/ts observer.js/ts

Parameters

ParameterType
ext"js" | "ts"

Returns

Promise<string[]>

array of paths to all of the operator files

Source

teraslice-cli/src/helpers/asset-src.ts:130


zip()

static zip(tmpAssetDir, outputFileName): Promise<ZipResults>

zip - Creates properly named zip archive of asset from tmpAssetDir

Parameters

ParameterTypeDescription
tmpAssetDirstringPath to the temporary asset source directory
outputFileNamestring

Returns

Promise<ZipResults>

ZipResults

Source

teraslice-cli/src/helpers/asset-src.ts:348