Skip to main content

Package

Represents a package, which is a unit of distribution of content in the Datagrok platform.

Extends

Constructors

new Package()

new Package(dart): Package

Parameters

ParameterTypeDefault value
dartanyundefined

Returns

Package

Overrides

Entity . constructor

Source

src/entities/misc.ts:63

Properties

PropertyModifierTypeDefault valueInherited from
_logger?privatePackageLoggerundefined-
_nameprivatestring''-
_versionpublicstring''-
_webRootpublicundefined | stringundefined-
dartpublicanyundefinedEntity.dart

Accessors

author

get author(): any

Who created entity *

Returns

any

Source

src/entities/entity.ts:59


createdOn

get createdOn(): Dayjs

Time when entity was created *

Returns

Dayjs

Source

src/entities/entity.ts:50


entityType

get entityType(): string

Entity type name *

Returns

string

Source

src/entities/entity.ts:66


files

get files(): FilesDataSource

Global application data

Returns

FilesDataSource

Source

src/entities/misc.ts:193


friendlyName

get friendlyName(): string

Entity friendly name

set friendlyName(x): void

Parameters

ParameterType
xstring

Returns

string

Source

src/entities/entity.ts:36


id

get id(): string

Entity ID (GUID)

set id(x): void

Parameters

ParameterType
xstring

Returns

string

Source

src/entities/entity.ts:28


logger

get logger(): PackageLogger

Returns

PackageLogger

Source

src/entities/misc.ts:157


meta

get meta(): null | object

Returns metadata associated with the package. The metadata gets generated when the package is built. It is a concatenation of JSON files located under the /meta folder. See example: /packages/PowerPack.

Returns

null | object

Source

src/entities/misc.ts:146


name

get name(): string

Package short name

set name(x): void

Parameters

ParameterType
xstring

Returns

string

Source

src/entities/misc.ts:109


nqName

get nqName(): string

Entity full-qualified name

Returns

string

Source

src/entities/entity.ts:44


packageOwner

get packageOwner(): string

Returns

string

Source

src/entities/misc.ts:90


path

get path(): string

Entity path

Returns

string

Source

src/entities/entity.ts:47


settings

get settings(): object

Returns settings for a package.

Returns

object

Source

src/entities/misc.ts:183


updatedOn

get updatedOn(): null | Dayjs

Time when entity was updated *

Returns

null | Dayjs

Source

src/entities/entity.ts:53


version

get version(): string

set version(x): void

Parameters

ParameterType
xstring

Returns

string

Source

src/entities/misc.ts:94


webRoot

get webRoot(): string

set webRoot(x): void

Parameters

ParameterType
xstring

Returns

string

Source

src/entities/misc.ts:79

Methods

getCredentials()

getCredentials(): Promise <Credentials>

Returns credentials for package.

Returns

Promise <Credentials>

Source

src/entities/misc.ts:164


getIconUrl()

getIconUrl(): string

Returns

string

Source

src/entities/misc.ts:130


getModule()

getModule(file): any

Returns a JavaScript module for this package.

Parameters

ParameterType
filestring

Returns

any

Source

src/entities/misc.ts:135


getModuleName()

getModuleName(file): string

Parameters

ParameterType
filestring

Returns

string

Source

src/entities/misc.ts:123


getProperties()

getProperties(): Promise<any>

Returns

Promise<any>

Overrides

Entity . getProperties

Deprecated

The getProperties should not be used. Use settings instead

Source

src/entities/misc.ts:171


getSettings()

getSettings(): Promise<Map<string, any>>

Returns

Promise<Map<string, any>>

Deprecated

The getSettings should not be used. Use settings instead

Source

src/entities/misc.ts:178


getTests()

getTests(core): Promise<any>

Parameters

ParameterTypeDefault value
corebooleanfalse

Returns

Promise<any>

Source

src/entities/misc.ts:197


hasTag()

hasTag(tag): boolean

Parameters

ParameterType
tagstring

Returns

boolean

Inherited from

Entity . hasTag

Source

src/entities/entity.ts:81


init()

init(): Promise<null>

Override init() method to provide package-specific initialization. It is guaranteed to get called exactly once before the execution of any function below.

Returns

Promise<null>

Source

src/entities/misc.ts:75


load()

load(options?): Promise <Package>

Loads package.

Parameters

ParameterType
options?object
options.file?string

Returns

Promise <Package>

Source

src/entities/misc.ts:151


newId()

newId(): void

Generates new id for this entity.

Returns

void

Inherited from

Entity . newId

Source

src/entities/entity.ts:32


setProperties()

setProperties(props): Promise<any>

Sets entity properties

Parameters

ParameterType
propsobject

Returns

Promise<any>

Inherited from

Entity . setProperties

Source

src/entities/entity.ts:74


setSettings()

setSettings(props, group): Promise<void>

Updates settings for a package.

Parameters

ParameterType
propsMap<string, any>
groupGroup

Returns

Promise<void>

Source

src/entities/misc.ts:188


tag()

tag(tag): boolean

Adds a specified tag

Parameters

ParameterType
tagstring

Returns

boolean

Inherited from

Entity . tag

Source

src/entities/entity.ts:84


toString()

toString(): string

Returns a string representing the object

Returns

string

Inherited from

Entity . toString

Source

src/entities/entity.ts:79


unTag()

unTag(tag): boolean

Removes a specified tag

Parameters

ParameterType
tagstring

Returns

boolean

Inherited from

Entity . unTag

Source

src/entities/entity.ts:87