@objectiv/plugin-application-context
Advanced tools
Comparing version 0.0.23-2 to 0.0.23-next.0
@@ -0,50 +1,5 @@ | ||
import { ApplicationContext } from '@objectiv/schema'; | ||
import { TrackerPluginInterface, TrackerInterface, ContextsConfig } from '@objectiv/tracker-core'; | ||
/** | ||
* AbstractContext defines the bare minimum properties for every Context. All Contexts inherit from it. | ||
* Inheritance: AbstractContext | ||
*/ | ||
declare abstract class AbstractContext { | ||
/** | ||
* A unique identifier to discriminate Context instances across Location Stacks. | ||
*/ | ||
__instance_id: string; | ||
/** | ||
* A unique string identifier to be combined with the Context Type (`_type`) | ||
*for Context instance uniqueness. | ||
*/ | ||
id: string; | ||
/** | ||
* A string literal used during serialization. Should always match the Context interface name. | ||
*/ | ||
_type: string; | ||
} | ||
/** | ||
* This is the abstract parent of all Global Contexts. Global contexts add general information to an Event. | ||
* Inheritance: AbstractGlobalContext -> AbstractContext | ||
*/ | ||
declare abstract class AbstractGlobalContext extends AbstractContext { | ||
readonly __global_context = true; | ||
} | ||
/* | ||
* Copyright 2022 Objectiv B.V. | ||
*/ | ||
/** | ||
* A GlobalContext describing in which app the event happens, like a website or iOS app. | ||
* Inheritance: ApplicationContext -> AbstractGlobalContext -> AbstractContext | ||
*/ | ||
interface ApplicationContext extends AbstractGlobalContext { | ||
/** | ||
* Typescript discriminator | ||
*/ | ||
readonly _type: 'ApplicationContext'; | ||
} | ||
/** | ||
* The ApplicationContextPlugin adds an ApplicationContext as GlobalContext before events are transported. | ||
@@ -51,0 +6,0 @@ * ApplicationContext Validation is performed by OpenTaxonomyValidationPlugin |
{ | ||
"name": "@objectiv/plugin-application-context", | ||
"version": "0.0.23-2", | ||
"version": "0.0.23-next.0", | ||
"description": "Plugin for Objectiv trackers to automatically generate and attach ApplicationContext to all Events", | ||
@@ -47,13 +47,10 @@ "license": "Apache-2.0", | ||
"tsc": "tsc --noEmit", | ||
"test": "jest --silent --runInBand", | ||
"test:ci": "jest --silent --ci --runInBand", | ||
"test:coverage": "jest --silent --coverage --runInBand", | ||
"check:dependencies": "npx depcheck", | ||
"npm-publish": "npm publish --access=public --tag=$TAG", | ||
"npm-publish:verdaccio": "npm publish --tag=$TAG" | ||
"test": "jest --silent", | ||
"test:ci": "jest --silent --ci", | ||
"test:coverage": "jest --silent --coverage", | ||
"depcheck": "npx depcheck" | ||
}, | ||
"devDependencies": { | ||
"@objectiv/developer-tools": "^0.0.23-2", | ||
"@objectiv/schema": "^0.0.23-2", | ||
"@objectiv/testing-tools": "^0.0.23-2", | ||
"@objectiv/developer-tools": "^0.0.23-next.0", | ||
"@objectiv/testing-tools": "^0.0.23-next.0", | ||
"@types/jest": "^27.4.1", | ||
@@ -68,4 +65,5 @@ "jest": "^27.5.1", | ||
"peerDependencies": { | ||
"@objectiv/tracker-core": "^0.0.23-2" | ||
"@objectiv/schema": "^0.0.23-next.0", | ||
"@objectiv/tracker-core": "^0.0.23-next.0" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9
11702
2
36