teraslice-cli / helpers/asset-src / AssetSrc
Class: AssetSrc
Defined in: teraslice-cli/src/helpers/asset-src.ts:33
Constructors
Constructor
new AssetSrc(
srcDir,devMode?,debug?,bundle?,bundleTarget?,overwrite?):AssetSrc
Defined in: teraslice-cli/src/helpers/asset-src.ts:54
Parameters
| Parameter | Type | Default value |
|---|---|---|
srcDir | string | undefined |
devMode | boolean | false |
debug | boolean | false |
bundle | boolean | true |
bundleTarget | string | 'node22' |
overwrite | boolean | false |
Returns
AssetSrc
Properties
Accessors
buildDir
Get Signature
get buildDir():
string
Defined in: teraslice-cli/src/helpers/asset-src.ts:93
Returns
string
Path to the output directory for the finished asset zipfile
zipFileName
Get Signature
get zipFileName():
string
Defined in: teraslice-cli/src/helpers/asset-src.ts:97
Returns
string
Methods
_packageCmd()
_packageCmd(
dir,args):Promise<Result<{cwd:string; }>>
Defined in: teraslice-cli/src/helpers/asset-src.ts:110
Runs a package manager command (yarn, npm, or pnpm) based on what is detected in the project's package.json.
Parameters
| Parameter | Type | Description |
|---|---|---|
dir | string | Path to directory containing package.json |
args | string[] | Array of arguments or options to be passed to the package manager |
Returns
Promise<Result<{ cwd: string; }>>
build()
build():
Promise<ZipResults>
Defined in: teraslice-cli/src/helpers/asset-src.ts:176
Returns
Promise<ZipResults>
generateRegistry()
generateRegistry():
Promise<[AssetRegistry,string]>
Defined in: teraslice-cli/src/helpers/asset-src.ts:134
generates the registry object that is used to generate the index.js asset registry
Returns
Promise<[AssetRegistry, string]>
operatorFiles()
operatorFiles(
ext):Promise<string[]>
Defined in: teraslice-cli/src/helpers/asset-src.ts:124
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
| Parameter | Type |
|---|---|
ext | "js" | "ts" |
Returns
Promise<string[]>
array of paths to all of the operator files
zip()
staticzip(tmpAssetDir,outputFileName):Promise<ZipResults>
Defined in: teraslice-cli/src/helpers/asset-src.ts:342
zip - Creates properly named zip archive of asset from tmpAssetDir
Parameters
| Parameter | Type | Description |
|---|---|---|
tmpAssetDir | string | Path to the temporary asset source directory |
outputFileName | string | - |
Returns
Promise<ZipResults>
ZipResults