fix(core): update

This commit is contained in:
Philipp Kunz 2019-07-07 10:48:24 +02:00
parent daadb89d25
commit 778d170e2e
14 changed files with 1047 additions and 620 deletions

19
.gitignore vendored
View File

@ -1,5 +1,22 @@
.nogit/
node_modules/
# artifacts
coverage/
public/
pages/
# installs
node_modules/
# caches
.yarn/
.cache/
.rpt2_cache
# builds
dist/
dist_web/
dist_serve/
dist_ts_web/
# custom

View File

@ -1,5 +1,5 @@
# gitzone standard
image: hosttoday/ht-docker-node:npmci
# gitzone ci_default
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
cache:
paths:
@ -26,6 +26,7 @@ mirror:
snyk:
stage: security
script:
- npmci npm prepare
- npmci command npm install -g snyk
- npmci command npm install --ignore-scripts
- npmci command snyk test
@ -36,21 +37,11 @@ snyk:
# ====================
# test stage
# ====================
testLEGACY:
stage: test
script:
- npmci node install legacy
- npmci npm install
- npmci npm test
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- docker
- notpriv
allow_failure: true
testLTS:
stage: test
script:
- npmci npm prepare
- npmci node install lts
- npmci npm install
- npmci npm test
@ -58,22 +49,11 @@ testLTS:
tags:
- docker
- notpriv
testSTABLE:
stage: test
script:
- npmci node install stable
- npmci npm install
- npmci npm test
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- docker
- notpriv
release:
stage: release
script:
- npmci node install stable
- npmci node install lts
- npmci npm publish
only:
- tags
@ -86,19 +66,11 @@ release:
# ====================
codequality:
stage: metadata
image: docker:stable
allow_failure: true
services:
- docker:stable-dind
script:
- export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/')
- docker run
--env SOURCE_CODE="$PWD"
--volume "$PWD":/code
--volume /var/run/docker.sock:/var/run/docker.sock
"registry.gitlab.com/gitlab-org/security-products/codequality:$SP_VERSION" /code
artifacts:
paths: [codeclimate.json]
- npmci command npm install -g tslint typescript
- npmci npm install
- npmci command "tslint -c tslint.json ./ts/**/*.ts"
tags:
- docker
- priv
@ -117,9 +89,10 @@ pages:
image: hosttoday/ht-docker-node:npmci
stage: metadata
script:
- npmci command npm install -g typedoc typescript
- npmci command npm install -g @gitzone/tsdoc
- npmci npm prepare
- npmci npm install
- npmci command typedoc --module "commonjs" --target "ES2016" --out public/ ts/
- npmci command tsdoc
tags:
- docker
- notpriv
@ -130,13 +103,3 @@ pages:
paths:
- public
allow_failure: true
windowsCompatibility:
image: stefanscherer/node-windows:10-build-tools
stage: metadata
script:
- npm install & npm test
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- windows
allow_failure: true

1
dist/index.d.ts vendored
View File

@ -1 +0,0 @@
export declare let standardExport: string;

4
dist/index.js vendored
View File

@ -1,4 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.standardExport = 'Hi there! :) This is an exported string';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUVXLFFBQUEsY0FBYyxHQUFHLHlDQUF5QyxDQUFDIn0=

View File

@ -1,2 +0,0 @@
declare const removeme: {};
export { removeme };

View File

@ -1,5 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const removeme = {};
exports.removeme = removeme;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRidWNrZXQucGx1Z2lucy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3NtYXJ0YnVja2V0LnBsdWdpbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSxNQUFNLFFBQVEsR0FBRyxFQUFFLENBQUM7QUFFbEIsNEJBQVEifQ==

View File

@ -3,5 +3,15 @@
"npmGlobalTools": [
"npmts"
]
},
"gitzone": {
"module": {
"githost": "gitlab.com",
"gitscope": "pushrocks",
"gitrepo": "smartbucket",
"shortDescription": "simple cloud independent object storage",
"npmPackagename": "@pushrocks/smartbucket",
"license": "MIT"
}
}
}
}

1470
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
{
"name": "@pushrocks/smartbucket",
"version": "1.0.3",
"description": "simple cloud independent bucket storage",
"description": "simple cloud independent object storage",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"author": "Lossless GmbH",
@ -12,11 +12,25 @@
"build": "echo \"Not needed for now\""
},
"devDependencies": {
"tapbundle": "^1.0.13"
"@pushrocks/tapbundle": "^3.0.11",
"tslint": "^5.18.0",
"tslint-config-prettier": "^1.18.0"
},
"dependencies": {
"@google-cloud/storage": "^2.0.3",
"@pushrocks/smartpromise": "^2.0.5"
"@google-cloud/storage": "^3.0.2",
"@pushrocks/smartpromise": "^3.0.2",
"@types/minio": "^7.0.2",
"minio": "^7.0.10"
},
"private": true
"private": true,
"files": [
"ts/*",
"ts_web/*",
"dist/*",
"dist_web/*",
"assets/*",
"cli.js",
"npmextra.json",
"readme.md"
]
}

26
readme.md Normal file
View File

@ -0,0 +1,26 @@
# @pushrocks/smartbucket
simple cloud independent object storage
## Availabililty and Links
* [npmjs.org (npm package)](https://www.npmjs.com/package/@pushrocks/smartbucket)
* [gitlab.com (source)](https://gitlab.com/pushrocks/smartbucket)
* [github.com (source mirror)](https://github.com/pushrocks/smartbucket)
* [docs (typedoc)](https://pushrocks.gitlab.io/smartbucket/)
## Status for master
[![build status](https://gitlab.com/pushrocks/smartbucket/badges/master/build.svg)](https://gitlab.com/pushrocks/smartbucket/commits/master)
[![coverage report](https://gitlab.com/pushrocks/smartbucket/badges/master/coverage.svg)](https://gitlab.com/pushrocks/smartbucket/commits/master)
[![npm downloads per month](https://img.shields.io/npm/dm/@pushrocks/smartbucket.svg)](https://www.npmjs.com/package/@pushrocks/smartbucket)
[![Known Vulnerabilities](https://snyk.io/test/npm/@pushrocks/smartbucket/badge.svg)](https://snyk.io/test/npm/@pushrocks/smartbucket)
[![TypeScript](https://img.shields.io/badge/TypeScript->=%203.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/)
[![node](https://img.shields.io/badge/node->=%2010.x.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/)
[![JavaScript Style Guide](https://img.shields.io/badge/code%20style-prettier-ff69b4.svg)](https://prettier.io/)
## Usage
For further information read the linked docs at the top of this readme.
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html)
[![repo-footer](https://pushrocks.gitlab.io/assets/repo-footer.svg)](https://maintainedby.lossless.com)

View File

@ -1,8 +1,8 @@
import { expect, tap } from 'tapbundle';
import { expect, tap } from '@pushrocks/tapbundle';
import * as smartbucket from '../ts/index';
tap.test('first test', async () => {
console.log(smartbucket.standardExport);
console.log('hi');
});
tap.start();

View File

@ -4,28 +4,27 @@ export interface ISmartBucketConfig {
provider: 'google';
projectId: string;
bucketName: string;
};
}
export class SmartBucket {
config: ISmartBucketConfig;
private _googleBucket
private _googleBucket;
/**
* the constructor of SmartBucket
*/
constructor(configArg: ISmartBucketConfig) {
this.config = configArg;
}
/**
* initializes the Smartbucket
*/
async init() {
if(this.config.provider === 'google') {
if (this.config.provider === 'google') {
const storage = new plugins.googleCloudStorage.Storage({
projectId: this.config.projectId,
})
storage.createBucket(this.config.bucketName, () => {})
projectId: this.config.projectId
});
storage.createBucket(this.config.bucketName, () => {});
}
}
}

View File

@ -1,7 +1,9 @@
import * as googleCloudStorage from '@google-cloud/storage';
import * as smartpromise from '@pushrocks/smartpromise';
export {
googleCloudStorage,
smartpromise
}
export { smartpromise };
// third party scope
import * as googleCloudStorage from '@google-cloud/storage';
import * as minio from 'minio';
export { googleCloudStorage };

View File

@ -1,3 +1,17 @@
{
"extends": "tslint-config-standard"
"extends": ["tslint:latest", "tslint-config-prettier"],
"rules": {
"semicolon": [true, "always"],
"no-console": false,
"ordered-imports": false,
"object-literal-sort-keys": false,
"member-ordering": {
"options":{
"order": [
"static-method"
]
}
}
},
"defaultSeverity": "warning"
}