Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node 12.x #55

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ defaults: &defaults
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update
sudo apt-get install --no-install-recommends yarn=1.5.1-1
sudo apt-get install --no-install-recommends yarn
- checkout
- restore_cache:
keys:
Expand Down Expand Up @@ -40,17 +40,17 @@ defaults: &defaults

version: 2
jobs:
"node-6":
"node-10":
<<: *defaults
docker:
- image: circleci/node:6
"node-8":
- image: circleci/node:10
"node-12":
<<: *defaults
docker:
- image: circleci/node:8
- image: circleci/node:12
workflows:
version: 2
build:
jobs:
- "node-6"
- "node-8"
- "node-10"
- "node-12"
179 changes: 92 additions & 87 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,17 +68,22 @@ specifications to classes one-to-one. That has a few implications:
- [AdBuffet](#adbuffet)
- [adPod](#adpod)
- [ads](#ads)
- [SortedList](#sortedlist)
- [TrackingEvents](#trackingevents)
- [add](#add)
- [clear](#clear)
- [Parameters](#parameters)
- [get](#get)
- [Parameters](#parameters-1)
- [types](#types)
- [SortedList](#sortedlist)
- [add](#add-1)
- [Parameters](#parameters-2)
- [clear](#clear)
- [get](#get-1)
- [Parameters](#parameters-3)
- [length](#length)
- [remove](#remove)
- [Parameters](#parameters-4)
- [toArray](#toarray)
- [TrackingEvents](#trackingevents)
- [add](#add-1)
- [get](#get-1)
- [types](#types)
- [Creative](#creative)
- [adID](#adid)
- [apiFramework](#apiframework-1)
Expand Down Expand Up @@ -158,8 +163,12 @@ specifications to classes one-to-one. That has a few implications:
- [width](#width-2)
- [xPosition](#xposition)
- [yPosition](#yposition)
- [MediaFile](#mediafile)
- [InteractiveCreativeFile](#interactivecreativefile)
- [apiFramework](#apiframework-5)
- [type](#type-1)
- [uri](#uri-1)
- [MediaFile](#mediafile)
- [apiFramework](#apiframework-6)
- [bitrate](#bitrate)
- [codec](#codec)
- [delivery](#delivery)
Expand All @@ -169,13 +178,9 @@ specifications to classes one-to-one. That has a few implications:
- [maxBitrate](#maxbitrate)
- [minBitrate](#minbitrate)
- [scalable](#scalable-1)
- [type](#type-1)
- [uri](#uri-1)
- [width](#width-3)
- [InteractiveCreativeFile](#interactivecreativefile)
- [apiFramework](#apiframework-6)
- [type](#type-2)
- [uri](#uri-2)
- [width](#width-3)
- [Category](#category)
- [authority](#authority)
- [code](#code)
Expand Down Expand Up @@ -211,14 +216,14 @@ specifications to classes one-to-one. That has a few implications:
- [viewableImpression](#viewableimpression-1)
- [HTMLResource](#htmlresource)
- [IconClicks](#iconclicks)
- [ViewableImpression](#viewableimpression-2)
- [Impression](#impression)
- [id](#id-6)
- [uri](#uri-5)
- [ViewableImpression](#viewableimpression-2)
- [id](#id-7)
- [notViewables](#notviewables)
- [viewables](#viewables)
- [viewUndetermineds](#viewundetermineds)
- [Impression](#impression)
- [id](#id-7)
- [uri](#uri-5)
- [IFrameResource](#iframeresource)
- [JavaScriptResource](#javascriptresource)
- [NonLinearAds](#nonlinearads-1)
Expand Down Expand Up @@ -388,6 +393,36 @@ The ads in this ad buffet.

Type: [SortedList](#sortedlist)

### TrackingEvents

Configures tracking events. Maps VAST event types to arrays of
[TrackingEvent](#trackingevent) instances.

#### add

Adds a tracking-event configuration for the given event type.

##### Parameters

- `event` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the event type.
- `config` **[TrackingEvent](#trackingevent)** the tracking event configuration.

#### get

Gets the tracking-event configurations for the given event type.

##### Parameters

- `event` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the event type.

Returns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)&lt;[TrackingEvent](#trackingevent)>** the tracking event configurations.

#### types

The event types tracked by this configuration.

Type: [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)&lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>

### SortedList

Represents a list of [SortedListItem](#sortedlistitem)s, ordered by
Expand All @@ -397,7 +432,7 @@ Represents a list of [SortedListItem](#sortedlistitem)s, ordered by

Adds the given item to this list.

**Parameters**
##### Parameters

- `item` **[SortedListItem](#sortedlistitem)** the item.

Expand All @@ -409,7 +444,7 @@ Empties this list.

Gets the item at the given index.

**Parameters**
##### Parameters

- `index` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** the index.

Expand All @@ -425,7 +460,7 @@ Type: [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Globa

Removes the given item from this list.

**Parameters**
##### Parameters

- `item` **[SortedListItem](#sortedlistitem)** the item.

Expand All @@ -435,36 +470,6 @@ Creates an array representation of this list.

Returns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)&lt;[SortedListItem](#sortedlistitem)>** the item array.

### TrackingEvents

Configures tracking events. Maps VAST event types to arrays of
[TrackingEvent](#trackingevent) instances.

#### add

Adds a tracking-event configuration for the given event type.

**Parameters**

- `event` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the event type.
- `config` **[TrackingEvent](#trackingevent)** the tracking event configuration.

#### get

Gets the tracking-event configurations for the given event type.

**Parameters**

- `event` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the event type.

Returns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)&lt;[TrackingEvent](#trackingevent)>** the tracking event configurations.

#### types

The event types tracked by this configuration.

Type: [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)&lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>

### Creative

**Extends SortedListItem**
Expand Down Expand Up @@ -952,6 +957,28 @@ string `"top"` or `"bottom"`.

Type: ([number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number) \| [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String))

### InteractiveCreativeFile

Represents an interactive creative file used in a [Linear](#linear) creative.

#### apiFramework

The API framework used by this interactive creative file.

Type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)

#### type

The MIME type of this interactive creative file.

Type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)

#### uri

The URI to this interactive creative file.

Type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)

### MediaFile

Represents a media file used in a [Linear](#linear) creative.
Expand Down Expand Up @@ -1034,28 +1061,6 @@ The width of this media file in pixels.

Type: [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)

### InteractiveCreativeFile

Represents an interactive creative file used in a [Linear](#linear) creative.

#### apiFramework

The API framework used by this interactive creative file.

Type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)

#### type

The MIME type of this interactive creative file.

Type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)

#### uri

The URI to this interactive creative file.

Type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)

### Category

Pricing information for real-time bidding.
Expand Down Expand Up @@ -1259,6 +1264,22 @@ Describes an HTML snippet.

Represents the click tracking configuration for an [Icon](#icon).

### Impression

Represents an impression.

#### id

The ad server id for the impression.

Type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)

#### uri

The URI of this impression resource.

Type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)

### ViewableImpression

Represents the impression-tracking URIs for both an [InLine](#inline) and any
Expand Down Expand Up @@ -1294,22 +1315,6 @@ is met for a viewable impression.

Type: [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)&lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>

### Impression

Represents an impression.

#### id

The ad server id for the impression.

Type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)

#### uri

The URI of this impression resource.

Type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)

### IFrameResource

**Extends AbstractResource**
Expand Down
35 changes: 18 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,29 +23,30 @@
"build": "rimraf lib && babel src -d lib",
"prepublish": "in-publish && yarn run build || not-in-publish",
"lint": "standard '{src,test}/**/*.js'",
"test:cover": "cross-env NODE_ENV=test nyc mocha --require babel-polyfill --require babel-register 'test/lib/setup.js' 'test/unit/**/*.js'",
"test:cover": "cross-env NODE_ENV=test nyc mocha --require babel-polyfill --require @babel/register 'test/lib/setup.js' 'test/unit/**/*.js'",
"test": "yarn run lint && yarn run test:cover",
"ci": "yarn run lint && MOCHA_FILE=$CIRCLE_TEST_REPORTS/junit.xml yarn run test:cover --reporter mocha-junit-reporter && nyc report --reporter=text-lcov | coveralls",
"doc": "documentation readme src/index.js -s API --sort-order alpha"
},
"repository": "zentrick/iab-vast-model",
"bugs": "https://github.com/zentrick/iab-vast-model/issues",
"devDependencies": {
"babel-cli": "^6.26.0",
"babel-plugin-istanbul": "^4.1.5",
"@babel/cli": "^7.10.4",
"@babel/core": "^7.0.0",
"babel-plugin-istanbul": "^6.0.0",
"babel-polyfill": "^6.26.0",
"babel-preset-env": "^1.6.1",
"babel-register": "^6.26.0",
"chai": "^4.1.2",
"coveralls": "^3.0.0",
"cross-env": "^5.1.3",
"documentation": "^6.1.0",
"in-publish": "^2.0.0",
"mocha": "^5.0.1",
"mocha-junit-reporter": "^1.17.0",
"nyc": "^11.4.1",
"rimraf": "^2.6.2",
"standard": "^11.0.0"
"@babel/preset-env": "^7.10.4",
"@babel/register": "^7.10.4",
"chai": "^4.2.0",
"coveralls": "^3.1.0",
"cross-env": "^7.0.2",
"documentation": "^13.0.2",
"in-publish": "^2.0.1",
"mocha": "^8.0.1",
"mocha-junit-reporter": "^2.0.0",
"nyc": "^15.1.0",
"rimraf": "^3.0.2",
"standard": "^14.3.4"
},
"standard": {
"globals": [
Expand All @@ -56,7 +57,7 @@
},
"babel": {
"presets": [
"env"
"@babel/preset-env"
],
"env": {
"test": {
Expand All @@ -76,7 +77,7 @@
"src/**/*.js"
],
"require": [
"babel-register"
"@babel/register"
],
"sourceMap": false,
"instrument": false
Expand Down
2 changes: 1 addition & 1 deletion src/core/vast.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {AdBuffet} from '../util/ad-buffet'
import { AdBuffet } from '../util/ad-buffet'

/**
* Represents a VAST document.
Expand Down
2 changes: 1 addition & 1 deletion src/util/ad-pod.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {SortedList} from './sorted-list'
import { SortedList } from './sorted-list'

/**
* Represents a VAST ad pod.
Expand Down
Loading