diff --git a/package-lock.json b/package-lock.json index 51709ed..aaef972 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1389,6 +1389,70 @@ "symbol-tree": "^3.2.4" } }, + "@pushrocks/qenv": { + "version": "4.0.10", + "resolved": "https://verdaccio.lossless.one/@pushrocks%2fqenv/-/qenv-4.0.10.tgz", + "integrity": "sha512-bQknJrGa9zXDTmohi2W0fi/gZ5H36J1138WsRgdR2u/9D/0gwjBasL0kqBokH9sddcLSYe/H9itGFxbT7i7MCg==", + "dev": true, + "requires": { + "@pushrocks/smartfile": "^7.0.12", + "@pushrocks/smartlog": "^2.0.26" + }, + "dependencies": { + "@pushrocks/smartfile": { + "version": "7.0.12", + "resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartfile/-/smartfile-7.0.12.tgz", + "integrity": "sha512-/4T4K07WqOXGvQQ/VFyRMUd8kN1RdqQgmrqHjZE/vMDLz7RYsqU9FlEN6OGX1G1E6pR9IdHnT4ClXPlvzClHYg==", + "dev": true, + "requires": { + "@pushrocks/smarthash": "^2.1.6", + "@pushrocks/smartmime": "^1.0.3", + "@pushrocks/smartpath": "^4.0.1", + "@pushrocks/smartpromise": "^3.0.6", + "@pushrocks/smartrequest": "^1.1.47", + "@types/fs-extra": "^8.1.0", + "fs-extra": "^8.1.0", + "glob": "^7.1.6", + "js-yaml": "^3.13.1" + } + }, + "@types/fs-extra": { + "version": "8.1.1", + "resolved": "https://verdaccio.lossless.one/@types%2ffs-extra/-/fs-extra-8.1.1.tgz", + "integrity": "sha512-TcUlBem321DFQzBNuz8p0CLLKp0VvF/XH9E4KHNmgwyp4E3AfgI5cjiIVZWlbfThBop2qxFIh4+LeY6hVWWZ2w==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "fs-extra": { + "version": "8.1.0", + "resolved": "https://verdaccio.lossless.one/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://verdaccio.lossless.one/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "universalify": { + "version": "0.1.2", + "resolved": "https://verdaccio.lossless.one/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true + } + } + }, "@pushrocks/smartbrowser": { "version": "1.0.17", "resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartbrowser/-/smartbrowser-1.0.17.tgz", diff --git a/package.json b/package.json index a1bb165..3e39ce1 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "@gitzone/tsbuild": "^2.1.25", "@gitzone/tsbundle": "^1.0.78", "@gitzone/tstest": "^1.0.44", + "@pushrocks/qenv": "^4.0.10", "@pushrocks/tapbundle": "^3.2.9", "@types/node": "^14.11.2", "tslint": "^6.1.3", diff --git a/qenv.yml b/qenv.yml new file mode 100644 index 0000000..8ee071c --- /dev/null +++ b/qenv.yml @@ -0,0 +1,2 @@ +required: + - PADDLE_APIKEY \ No newline at end of file diff --git a/test/test.ts b/test/test.ts index c7c06c0..3a82754 100644 --- a/test/test.ts +++ b/test/test.ts @@ -1,8 +1,14 @@ import { expect, tap } from '@pushrocks/tapbundle'; +import * as qenv from '@pushrocks/qenv'; + +const testQenv = new qenv.Qenv('.', './.nogit'); + import * as paddle from '../ts/index'; -tap.test('first test', async () => { - console.log(paddle.standardExport); +let testPaddleAccount: paddle.PaddleAccount; + +tap.test('should create a paddle account', async () => { + testPaddleAccount = new paddle.PaddleAccount(testQenv.getEnvVarOnDemand('PADDLE_APIKEY')); }); tap.start(); diff --git a/ts/index.ts b/ts/index.ts index e1e6d41..efd6d1e 100644 --- a/ts/index.ts +++ b/ts/index.ts @@ -1,3 +1 @@ -import * as plugins from './paddle.plugins'; - -export let standardExport = 'Hi there! :) This is an exported string'; +export * from './paddle.classes.accounts'; diff --git a/ts/paddle.classes.accounts.ts b/ts/paddle.classes.accounts.ts new file mode 100644 index 0000000..a3ad1b1 --- /dev/null +++ b/ts/paddle.classes.accounts.ts @@ -0,0 +1,9 @@ +import * as plugins from './paddle.plugins'; + +export class PaddleAccount { + private apiKey: string + + constructor(apiKeyArg: string) { + this.apiKey = apiKeyArg; + } +} \ No newline at end of file