17 Commits

Author SHA1 Message Date
3cd09a7bf5 2.0.0 2022-03-18 02:15:55 +01:00
ce1eeb8a9a BREAKING CHANGE(core): switch to esm 2022-03-18 02:15:55 +01:00
1d894c7907 1.0.23 2022-03-18 02:15:18 +01:00
f23760abc6 fix(core): update 2022-03-18 02:15:17 +01:00
1e5e1ced6a 1.0.22 2019-09-05 17:17:34 +02:00
4d3df85041 fix(core): update 2019-09-05 17:17:33 +02:00
fa2a5607c4 1.0.21 2019-06-04 13:55:57 +02:00
36f79cac12 fix(core): update 2019-06-04 13:55:56 +02:00
c446c50d75 1.0.20 2019-06-04 11:46:17 +02:00
0ccff2a370 fix(core): update 2019-06-04 11:46:16 +02:00
1b54d2ca30 1.0.19 2019-06-04 11:41:48 +02:00
691e78ecbc fix(core): update 2019-06-04 11:41:47 +02:00
e42cdcf339 1.0.18 2019-06-04 11:33:38 +02:00
49c56c3d53 fix(core): update 2019-06-04 11:33:38 +02:00
18454e53dc 1.0.17 2019-06-04 11:27:28 +02:00
4d219d37d7 1.0.16 2019-06-04 11:25:51 +02:00
42e6898dc5 fix(core): update 2019-06-04 11:25:51 +02:00
13 changed files with 18293 additions and 1057 deletions

4
.gitignore vendored
View File

@ -15,8 +15,6 @@ node_modules/
# builds # builds
dist/ dist/
dist_web/ dist_*/
dist_serve/
dist_ts_web/
# custom # custom

View File

@ -1,16 +1,19 @@
# gitzone standard # gitzone ci_default
image: hosttoday/ht-docker-node:npmci image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
cache: cache:
paths: paths:
- .npmci_cache/ - .npmci_cache/
key: "$CI_BUILD_STAGE" key: '$CI_BUILD_STAGE'
stages: stages:
- security - security
- test - test
- release - release
- metadata - metadata
before_script:
- npm install -g @shipzone/npmci
# ==================== # ====================
# security stage # security stage
@ -18,102 +21,114 @@ stages:
mirror: mirror:
stage: security stage: security
script: script:
- npmci git mirror - npmci git mirror
only:
- tags
tags: tags:
- docker - lossless
- notpriv - docker
- notpriv
snyk: auditProductionDependencies:
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
stage: security stage: security
script: script:
- npmci npm prepare - npmci npm prepare
- npmci command npm install -g snyk - npmci command npm install --production --ignore-scripts
- npmci command npm install --ignore-scripts - npmci command npm config set registry https://registry.npmjs.org
- npmci command snyk test - npmci command npm audit --audit-level=high --only=prod --production
tags: tags:
- docker - docker
- notpriv allow_failure: true
auditDevDependencies:
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
stage: security
script:
- npmci npm prepare
- npmci command npm install --ignore-scripts
- npmci command npm config set registry https://registry.npmjs.org
- npmci command npm audit --audit-level=high --only=dev
tags:
- docker
allow_failure: true
# ==================== # ====================
# test stage # test stage
# ==================== # ====================
testLTS: testStable:
stage: test stage: test
script: script:
- npmci npm prepare - npmci npm prepare
- npmci node install lts - npmci node install stable
- npmci npm install - npmci npm install
- npmci npm test - npmci npm test
coverage: /\d+.?\d+?\%\s*coverage/ coverage: /\d+.?\d+?\%\s*coverage/
tags: tags:
- docker - docker
- notpriv
testSTABLE: testBuild:
stage: test stage: test
script: script:
- npmci npm prepare - npmci npm prepare
- npmci node install stable - npmci node install stable
- npmci npm install - npmci npm install
- npmci npm test - npmci command npm run build
coverage: /\d+.?\d+?\%\s*coverage/ coverage: /\d+.?\d+?\%\s*coverage/
tags: tags:
- docker - docker
- notpriv
release: release:
stage: release stage: release
script: script:
- npmci node install stable - npmci node install stable
- npmci npm publish - npmci npm publish
only: only:
- tags - tags
tags: tags:
- docker - lossless
- notpriv - docker
- notpriv
# ==================== # ====================
# metadata stage # metadata stage
# ==================== # ====================
codequality: codequality:
stage: metadata stage: metadata
image: docker:stable
allow_failure: true allow_failure: true
services: only:
- docker:stable-dind - tags
script: script:
- export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/') - npmci command npm install -g typescript
- docker run - npmci npm prepare
--env SOURCE_CODE="$PWD" - npmci npm install
--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]
tags: tags:
- docker - lossless
- priv - docker
- priv
trigger: trigger:
stage: metadata stage: metadata
script: script:
- npmci trigger - npmci trigger
only: only:
- tags - tags
tags: tags:
- docker - lossless
- notpriv - docker
- notpriv
pages: pages:
image: hosttoday/ht-docker-node:npmci
stage: metadata stage: metadata
script: script:
- npmci node install lts
- npmci command npm install -g @gitzone/tsdoc - npmci command npm install -g @gitzone/tsdoc
- npmci npm prepare - npmci npm prepare
- npmci npm install - npmci npm install
- npmci command tsdoc - npmci command tsdoc
tags: tags:
- lossless
- docker - docker
- notpriv - notpriv
only: only:
@ -121,5 +136,5 @@ pages:
artifacts: artifacts:
expire_in: 1 week expire_in: 1 week
paths: paths:
- public - public
allow_failure: true allow_failure: true

11
.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,11 @@
{
"version": "0.2.0",
"configurations": [
{
"command": "npm test",
"name": "Run npm test",
"request": "launch",
"type": "node-terminal"
}
]
}

26
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,26 @@
{
"json.schemas": [
{
"fileMatch": ["/npmextra.json"],
"schema": {
"type": "object",
"properties": {
"npmci": {
"type": "object",
"description": "settings for npmci"
},
"gitzone": {
"type": "object",
"description": "settings for gitzone",
"properties": {
"projectType": {
"type": "string",
"enum": ["website", "element", "service", "npm", "wcc"]
}
}
}
}
}
}
]
}

View File

@ -1,36 +0,0 @@
# @pushrocks/smartopen
open things
## Availabililty and Links
* [npmjs.org (npm package)](https://www.npmjs.com/package/@pushrocks/smartopen)
* [gitlab.com (source)](https://gitlab.com/pushrocks/smartopen)
* [github.com (source mirror)](https://github.com/pushrocks/smartopen)
* [docs (typedoc)](https://pushrocks.gitlab.io/smartopen/)
## Status for master
[![build status](https://gitlab.com/pushrocks/smartopen/badges/master/build.svg)](https://gitlab.com/pushrocks/smartopen/commits/master)
[![coverage report](https://gitlab.com/pushrocks/smartopen/badges/master/coverage.svg)](https://gitlab.com/pushrocks/smartopen/commits/master)
[![npm downloads per month](https://img.shields.io/npm/dm/@pushrocks/smartopen.svg)](https://www.npmjs.com/package/@pushrocks/smartopen)
[![Known Vulnerabilities](https://snyk.io/test/npm/@pushrocks/smartopen/badge.svg)](https://snyk.io/test/npm/@pushrocks/smartopen)
[![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
Use TypeScript for best in class instellisense.
```typescript
import * as smartopen from '@pushrocks/smartopen';
const run = async () => {
await smartopen.openUrl('https://lossless.com');
};
run();
```
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,21 +1,18 @@
{ {
"npmci": { "npmci": {
"npmGlobalTools": [ "npmGlobalTools": [],
"npmts",
"ts-node",
"typescript"
],
"npmAccessLevel": "public" "npmAccessLevel": "public"
}, },
"npmts": { "npmts": {
"coverageTreshold": 60 "coverageTreshold": 60
}, },
"gitzone": { "gitzone": {
"projectType": "npm",
"module": { "module": {
"githost": "gitlab.com", "githost": "gitlab.com",
"gitscope": "pushrocks", "gitscope": "pushrocks",
"gitrepo": "smartopen", "gitrepo": "smartopen",
"shortDescription": "open things", "description": "open things",
"npmPackagename": "@pushrocks/smartopen", "npmPackagename": "@pushrocks/smartopen",
"license": "MIT" "license": "MIT"
} }

19019
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,9 +1,10 @@
{ {
"name": "@pushrocks/smartopen", "name": "@pushrocks/smartopen",
"version": "1.0.15", "version": "2.0.0",
"description": "open things", "description": "open things",
"main": "dist/index.js", "main": "dist_ts/index.js",
"typings": "dist/index.d.ts", "typings": "dist_ts/index.d.ts",
"type": "module",
"scripts": { "scripts": {
"test": "tstest test/", "test": "tstest test/",
"build": "tsbuild" "build": "tsbuild"
@ -22,14 +23,28 @@
}, },
"homepage": "https://gitlab.com/pushrocks/smartopen#README", "homepage": "https://gitlab.com/pushrocks/smartopen#README",
"dependencies": { "dependencies": {
"@types/opn": "^5.1.0", "open": "^8.4.0"
"opn": "^5.3.0"
}, },
"devDependencies": { "devDependencies": {
"@gitzone/tsbuild": "^2.1.8", "@gitzone/tsbuild": "^2.1.56",
"@gitzone/tstest": "^1.0.20", "@gitzone/tstest": "^1.0.69",
"@types/node": "^10.1.2", "@pushrocks/tapbundle": "^5.0.2",
"tapbundle": "^2.0.0" "@types/node": "^17.0.21"
}, },
"private": true "private": false,
"files": [
"ts/**/*",
"ts_web/**/*",
"dist/**/*",
"dist_*/**/*",
"dist_ts/**/*",
"dist_ts_web/**/*",
"assets/**/*",
"cli.js",
"npmextra.json",
"readme.md"
],
"browserslist": [
"last 1 chrome versions"
]
} }

48
readme.md Normal file
View File

@ -0,0 +1,48 @@
# @pushrocks/smartopen
open things
## Availabililty and Links
* [npmjs.org (npm package)](https://www.npmjs.com/package/@pushrocks/smartopen)
* [gitlab.com (source)](https://gitlab.com/pushrocks/smartopen)
* [github.com (source mirror)](https://github.com/pushrocks/smartopen)
* [docs (typedoc)](https://pushrocks.gitlab.io/smartopen/)
## Status for master
Status Category | Status Badge
-- | --
GitLab Pipelines | [![pipeline status](https://gitlab.com/pushrocks/smartopen/badges/master/pipeline.svg)](https://lossless.cloud)
GitLab Pipline Test Coverage | [![coverage report](https://gitlab.com/pushrocks/smartopen/badges/master/coverage.svg)](https://lossless.cloud)
npm | [![npm downloads per month](https://badgen.net/npm/dy/@pushrocks/smartopen)](https://lossless.cloud)
Snyk | [![Known Vulnerabilities](https://badgen.net/snyk/pushrocks/smartopen)](https://lossless.cloud)
TypeScript Support | [![TypeScript](https://badgen.net/badge/TypeScript/>=%203.x/blue?icon=typescript)](https://lossless.cloud)
node Support | [![node](https://img.shields.io/badge/node->=%2010.x.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/)
Code Style | [![Code Style](https://badgen.net/badge/style/prettier/purple)](https://lossless.cloud)
PackagePhobia (total standalone install weight) | [![PackagePhobia](https://badgen.net/packagephobia/install/@pushrocks/smartopen)](https://lossless.cloud)
PackagePhobia (package size on registry) | [![PackagePhobia](https://badgen.net/packagephobia/publish/@pushrocks/smartopen)](https://lossless.cloud)
BundlePhobia (total size when bundled) | [![BundlePhobia](https://badgen.net/bundlephobia/minzip/@pushrocks/smartopen)](https://lossless.cloud)
Platform support | [![Supports Windows 10](https://badgen.net/badge/supports%20Windows%2010/yes/green?icon=windows)](https://lossless.cloud) [![Supports Mac OS X](https://badgen.net/badge/supports%20Mac%20OS%20X/yes/green?icon=apple)](https://lossless.cloud)
## Usage
Use TypeScript for best in class instellisense.
```typescript
import * as smartopen from '@pushrocks/smartopen';
const run = async () => {
await smartopen.openUrl('https://lossless.com');
};
run();
```
## Contribution
We are always happy for code contributions. If you are not the code contributing type that is ok. Still, maintaining Open Source repositories takes considerable time and thought. If you like the quality of what we do and our modules are useful to you we would appreciate a little monthly contribution: You can [contribute one time](https://lossless.link/contribute-onetime) or [contribute monthly](https://lossless.link/contribute). :)
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)
[![repo-footer](https://lossless.gitlab.io/publicrelations/repofooter.svg)](https://maintainedby.lossless.com)

View File

@ -1,6 +1,6 @@
import { expect, tap } from 'tapbundle'; import { expect, tap } from '@pushrocks/tapbundle';
import * as smartopen from '../ts/index'; import * as smartopen from '../ts/index.js';
tap.test('should open a webpage', async () => { tap.test('should open a webpage', async () => {
await smartopen.openUrl('https://lossless.com'); await smartopen.openUrl('https://lossless.com');

View File

@ -1,10 +1,9 @@
import open = require('opn'); import open from 'open';
import { ChildProcess } from 'child_process';
export let openUrl = async urlArg => { export let openUrl = async (urlArg: string) => {
if (!(process.env.CI === 'true')) { if (!(process.env.CI === 'true')) {
const childProcess = await open(urlArg, { const childProcess = await open(urlArg, {
wait: false wait: false,
}); });
return childProcess; return childProcess;
} else { } else {

7
tsconfig.json Normal file
View File

@ -0,0 +1,7 @@
{
"compilerOptions": {
"target": "ES2020",
"module": "ES2020",
"moduleResolution": "node12"
}
}

View File

@ -1,17 +0,0 @@
{
"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"
}