9 Commits

Author SHA1 Message Date
bc1a89e3c7 2.0.0 2023-06-11 22:17:05 +02:00
92ae017d0f BREAKING CHANGE(core): update 2023-06-11 22:17:04 +02:00
405f87d744 1.0.9 2023-06-11 22:16:29 +02:00
aefa8795dd fix(core): update 2023-06-11 22:16:28 +02:00
90d722de00 1.0.8 2020-01-30 12:56:45 +00:00
0639e0f4e5 fix(core): update 2020-01-30 12:56:44 +00:00
dc5457996b 1.0.7 2020-01-30 11:50:36 +00:00
065592df59 fix(core): update 2020-01-30 11:50:35 +00:00
4d4e2483cf 1.0.6 2019-06-15 18:35:10 +02:00
14 changed files with 4640 additions and 1891 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,77 +1,85 @@
# gitzone ci_default # 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:
- pnpm install -g pnpm
- pnpm install -g @shipzone/npmci
- npmci npm prepare
# ==================== # ====================
# security stage # security stage
# ==================== # ====================
mirror: # ====================
# security stage
# ====================
auditProductionDependencies:
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
stage: security stage: security
script: script:
- npmci git mirror - npmci command npm config set registry https://registry.npmjs.org
- npmci command pnpm audit --audit-level=high --prod
tags: tags:
- docker - lossless
- notpriv - docker
allow_failure: true
snyk: auditDevDependencies:
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
stage: security stage: security
script: script:
- npmci npm prepare - npmci command npm config set registry https://registry.npmjs.org
- npmci command npm install -g snyk - npmci command pnpm audit --audit-level=high --dev
- npmci command npm install --ignore-scripts
- npmci command snyk test
tags: tags:
- docker - lossless
- notpriv - docker
allow_failure: true
# ==================== # ====================
# test stage # test stage
# ==================== # ====================
testLTS: testStable:
stage: test stage: test
script: script:
- npmci npm prepare - npmci node install stable
- npmci node install lts - 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
testBuild:
testSTABLE:
stage: test stage: test
script: script:
- npmci npm prepare - npmci node install stable
- npmci node install stable - npmci npm install
- npmci npm install - npmci npm build
- npmci npm test
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
@ -79,33 +87,36 @@ release:
codequality: codequality:
stage: metadata stage: metadata
allow_failure: true allow_failure: true
only:
- tags
script: script:
- npmci command npm install -g tslint typescript - npmci command npm install -g typescript
- npmci npm prepare
- npmci npm install - npmci npm install
- npmci command "tslint -c tslint.json ./ts/**/*.ts"
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 command npm install -g @gitzone/tsdoc - npmci node install stable
- npmci npm prepare
- npmci npm install - npmci npm install
- npmci command tsdoc - npmci command npm run buildDocs
tags: tags:
- lossless
- docker - docker
- notpriv - notpriv
only: only:
@ -113,5 +124,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,10 +1,11 @@
{ {
"gitzone": { "gitzone": {
"projectType": "npm",
"module": { "module": {
"githost": "gitlab.com", "githost": "gitlab.com",
"gitscope": "pushrocks", "gitscope": "pushrocks",
"gitrepo": "smartmanifest", "gitrepo": "smartmanifest",
"shortDescription": "a module for creating web app manifests", "description": "a module for creating web app manifests",
"npmPackagename": "@pushrocks/smartmanifest", "npmPackagename": "@pushrocks/smartmanifest",
"license": "MIT", "license": "MIT",
"projectDomain": "push.rocks" "projectDomain": "push.rocks"

1772
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,34 +1,39 @@
{ {
"name": "@pushrocks/smartmanifest", "name": "@pushrocks/smartmanifest",
"version": "1.0.5", "version": "2.0.0",
"private": false, "private": false,
"description": "a module for creating web app manifests", "description": "a module for creating web app manifests",
"main": "dist/index.js", "main": "dist_ts/index.js",
"typings": "dist/index.d.ts", "typings": "dist_ts/index.d.ts",
"author": "Lossless GmbH", "author": "Lossless GmbH",
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"test": "(tstest test/)", "test": "(tstest test/)",
"build": "(tsbuild)", "build": "(tsbuild)",
"format": "(gitzone format)" "format": "(gitzone format)",
"buildDocs": "tsdoc"
}, },
"devDependencies": { "devDependencies": {
"@gitzone/tsbuild": "^2.0.22", "@gitzone/tsbuild": "^2.1.66",
"@gitzone/tstest": "^1.0.24", "@gitzone/tsrun": "^1.2.42",
"@pushrocks/tapbundle": "^3.0.7", "@gitzone/tstest": "^1.0.74",
"@types/node": "^12.0.8", "@pushrocks/tapbundle": "^5.0.4",
"tslint": "^5.17.0", "@types/node": "^20.3.0"
"tslint-config-prettier": "^1.15.0"
}, },
"dependencies": {},
"files": [ "files": [
"ts/*", "ts/**/*",
"ts_web/*", "ts_web/**/*",
"dist/*", "dist/**/*",
"dist_web/*", "dist_*/**/*",
"assets/*", "dist_ts/**/*",
"dist_ts_web/**/*",
"assets/**/*",
"cli.js", "cli.js",
"npmextra.json", "npmextra.json",
"readme.md" "readme.md"
],
"type": "module",
"browserslist": [
"last 1 chrome versions"
] ]
} }

4441
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -8,19 +8,33 @@ a module for creating web app manifests
* [docs (typedoc)](https://pushrocks.gitlab.io/smartmanifest/) * [docs (typedoc)](https://pushrocks.gitlab.io/smartmanifest/)
## Status for master ## Status for master
[![build status](https://gitlab.com/pushrocks/smartmanifest/badges/master/build.svg)](https://gitlab.com/pushrocks/smartmanifest/commits/master)
[![coverage report](https://gitlab.com/pushrocks/smartmanifest/badges/master/coverage.svg)](https://gitlab.com/pushrocks/smartmanifest/commits/master) Status Category | Status Badge
[![npm downloads per month](https://img.shields.io/npm/dm/@pushrocks/smartmanifest.svg)](https://www.npmjs.com/package/@pushrocks/smartmanifest) -- | --
[![Known Vulnerabilities](https://snyk.io/test/npm/@pushrocks/smartmanifest/badge.svg)](https://snyk.io/test/npm/@pushrocks/smartmanifest) GitLab Pipelines | [![pipeline status](https://gitlab.com/pushrocks/smartmanifest/badges/master/pipeline.svg)](https://lossless.cloud)
[![TypeScript](https://img.shields.io/badge/TypeScript->=%203.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/) GitLab Pipline Test Coverage | [![coverage report](https://gitlab.com/pushrocks/smartmanifest/badges/master/coverage.svg)](https://lossless.cloud)
[![node](https://img.shields.io/badge/node->=%2010.x.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/) npm | [![npm downloads per month](https://badgen.net/npm/dy/@pushrocks/smartmanifest)](https://lossless.cloud)
[![JavaScript Style Guide](https://img.shields.io/badge/code%20style-prettier-ff69b4.svg)](https://prettier.io/) Snyk | [![Known Vulnerabilities](https://badgen.net/snyk/pushrocks/smartmanifest)](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/smartmanifest)](https://lossless.cloud)
PackagePhobia (package size on registry) | [![PackagePhobia](https://badgen.net/packagephobia/publish/@pushrocks/smartmanifest)](https://lossless.cloud)
BundlePhobia (total size when bundled) | [![BundlePhobia](https://badgen.net/bundlephobia/minzip/@pushrocks/smartmanifest)](https://lossless.cloud)
## Usage ## Usage
## 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). :)
## 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. For further information read the linked docs at the top of this readme.
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh) ## Legal
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html) > MIT licensed | **©** [Task Venture Capital GmbH](https://task.vc)
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy)
[![repo-footer](https://pushrocks.gitlab.io/assets/repo-footer.svg)](https://maintainedby.lossless.com)

View File

@ -1,14 +1,14 @@
import { expect, tap } from '@pushrocks/tapbundle'; import { expect, tap } from '@pushrocks/tapbundle';
import * as smartmanifest from '../ts/index'; import * as smartmanifest from '../ts/index.js';
let testSmartManifest: smartmanifest.SmartManifest; let testSmartManifest: smartmanifest.SmartManifest;
tap.test('first test', async () => { tap.test('first test', async () => {
testSmartManifest = new smartmanifest.SmartManifest({ testSmartManifest = new smartmanifest.SmartManifest({
name: 'test app', name: 'test app',
short_name: 'app' short_name: 'app',
}); });
expect(testSmartManifest).to.be.instanceOf(smartmanifest.SmartManifest); expect(testSmartManifest).toBeInstanceOf(smartmanifest.SmartManifest);
}); });
tap.test('should produce a web app manifest', async () => { tap.test('should produce a web app manifest', async () => {

8
ts/00_commitinfo_data.ts Normal file
View File

@ -0,0 +1,8 @@
/**
* autocreated commitinfo by @pushrocks/commitinfo
*/
export const commitinfo = {
name: '@pushrocks/smartmanifest',
version: '2.0.0',
description: 'a module for creating web app manifests'
}

View File

@ -1,20 +1,22 @@
import * as plugins from './smartmanifest.plugins'; import * as plugins from './smartmanifest.plugins.js';
export interface ISmartManifestConstructorOptions { export interface ISmartManifestConstructorOptions {
name: string; name: string;
short_name: string; short_name: string;
start_url?: '/'; start_url?: '/';
display?: string; display?: 'standalone';
orientation?: string; orientation?: 'any';
background_color?: string; background_color?: string;
theme_color?: string; theme_color?: string;
icons?: [ icons?: Array<{
{ src: string;
src: string; type: string;
type: string; sizes: string;
sizes: string; }>;
} related_applications?: Array<{
]; platform: 'play' | string;
id: string;
}>;
} }
const defaultConstructorOptions: ISmartManifestConstructorOptions = { const defaultConstructorOptions: ISmartManifestConstructorOptions = {
@ -23,15 +25,26 @@ const defaultConstructorOptions: ISmartManifestConstructorOptions = {
start_url: '/', start_url: '/',
display: 'standalone', display: 'standalone',
orientation: 'any', orientation: 'any',
background_color: '#fff', background_color: '#000000',
theme_color: '#f78f21', theme_color: '#000000',
icons: [ icons: [
{ {
src: '/assets/icon-large.png', src: '/assetbroker/manifest/icon-large.png',
type: 'image/png', type: 'image/png',
sizes: '1024x1024' sizes: '1024x1024',
} },
] {
src: '/assetbroker/manifest/icon-144x144.png',
sizes: '144x144',
type: 'image/png',
},
{
src: '/assetbroker/manifest/icon-512x512.png',
sizes: '512x512',
type: 'image/png',
},
],
related_applications: [],
}; };
export class SmartManifest { export class SmartManifest {
@ -39,7 +52,7 @@ export class SmartManifest {
constructor(optionsArg: ISmartManifestConstructorOptions) { constructor(optionsArg: ISmartManifestConstructorOptions) {
this.options = { this.options = {
...defaultConstructorOptions, ...defaultConstructorOptions,
...optionsArg ...optionsArg,
}; };
} }

10
tsconfig.json Normal file
View File

@ -0,0 +1,10 @@
{
"compilerOptions": {
"experimentalDecorators": true,
"useDefineForClassFields": false,
"target": "ES2022",
"module": "ES2022",
"moduleResolution": "nodenext",
"esModuleInterop": true
}
}

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"
}