17 Commits

Author SHA1 Message Date
7926ced69d 2.0.2 2023-06-12 00:42:30 +02:00
fc0369cded fix(core): update 2023-06-12 00:42:30 +02:00
b0bc321cc2 2.0.1 2023-06-11 22:25:13 +02:00
8c3214b872 fix(core): update 2023-06-11 22:25:12 +02:00
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
7f3b28f27b 1.0.5 2019-06-15 18:10:09 +02:00
e3d6dced15 fix(core): update 2019-06-15 18:10:09 +02:00
a508266e40 1.0.4 2019-06-15 18:05:59 +02:00
95d5c61275 fix(core): update 2019-06-15 18:05:59 +02:00
15 changed files with 4673 additions and 1769 deletions

4
.gitignore vendored
View File

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

View File

@ -1,119 +1,122 @@
# gitzone standard
image: hosttoday/ht-docker-node:npmci
# gitzone ci_default
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
cache:
paths:
- .npmci_cache/
key: "$CI_BUILD_STAGE"
- .npmci_cache/
key: '$CI_BUILD_STAGE'
stages:
- security
- test
- release
- metadata
- security
- test
- release
- metadata
before_script:
- pnpm install -g pnpm
- pnpm install -g @shipzone/npmci
- npmci npm prepare
# ====================
# security stage
# ====================
mirror:
# ====================
# security stage
# ====================
auditProductionDependencies:
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
stage: security
script:
- npmci git mirror
- npmci command npm config set registry https://registry.npmjs.org
- npmci command pnpm audit --audit-level=high --prod
tags:
- docker
- notpriv
- lossless
- docker
allow_failure: true
snyk:
auditDevDependencies:
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
stage: security
script:
- npmci npm prepare
- npmci command npm install -g snyk
- npmci command npm install --ignore-scripts
- npmci command snyk test
- npmci command npm config set registry https://registry.npmjs.org
- npmci command pnpm audit --audit-level=high --dev
tags:
- docker
- notpriv
- lossless
- docker
allow_failure: true
# ====================
# test stage
# ====================
testLTS:
testStable:
stage: test
script:
- npmci npm prepare
- npmci node install lts
- npmci npm install
- npmci npm test
- npmci node install stable
- npmci npm install
- npmci npm test
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- docker
- notpriv
testSTABLE:
- docker
testBuild:
stage: test
script:
- npmci npm prepare
- npmci node install stable
- npmci npm install
- npmci npm test
- npmci node install stable
- npmci npm install
- npmci npm build
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- docker
- notpriv
- docker
release:
stage: release
script:
- npmci node install stable
- npmci npm publish
- npmci node install stable
- npmci npm publish
only:
- tags
- tags
tags:
- docker
- notpriv
- lossless
- docker
- notpriv
# ====================
# metadata stage
# ====================
codequality:
stage: metadata
image: docker:stable
allow_failure: true
services:
- docker:stable-dind
only:
- tags
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 typescript
- npmci npm prepare
- npmci npm install
tags:
- docker
- priv
- lossless
- docker
- priv
trigger:
stage: metadata
script:
- npmci trigger
- npmci trigger
only:
- tags
- tags
tags:
- docker
- notpriv
- lossless
- docker
- notpriv
pages:
image: hosttoday/ht-docker-node:npmci
stage: metadata
script:
- npmci command npm install -g @gitzone/tsdoc
- npmci npm prepare
- npmci node install stable
- npmci npm install
- npmci command tsdoc
- npmci command npm run buildDocs
tags:
- lossless
- docker
- notpriv
only:
@ -121,5 +124,5 @@ pages:
artifacts:
expire_in: 1 week
paths:
- public
- public
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": {
"projectType": "npm",
"module": {
"githost": "gitlab.com",
"gitscope": "pushrocks",
"gitrepo": "smartmanifest",
"shortDescription": "a module for creating web app manifests",
"description": "a module for creating web app manifests",
"npmPackagename": "@pushrocks/smartmanifest",
"license": "MIT",
"projectDomain": "push.rocks"
@ -14,4 +15,4 @@
"npmGlobalTools": [],
"npmAccessLevel": "public"
}
}
}

1652
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,24 +1,39 @@
{
"name": "@pushrocks/smartmanifest",
"version": "1.0.3",
"version": "2.0.2",
"private": false,
"description": "a module for creating web app manifests",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"main": "dist_ts/index.js",
"typings": "dist_ts/index.d.ts",
"author": "Lossless GmbH",
"license": "MIT",
"scripts": {
"test": "(tstest test/)",
"build": "(tsbuild)",
"format": "(gitzone format)"
"format": "(gitzone format)",
"buildDocs": "tsdoc"
},
"devDependencies": {
"@gitzone/tsbuild": "^2.0.22",
"@gitzone/tstest": "^1.0.22",
"@pushrocks/tapbundle": "^3.0.7",
"@types/node": "^12.0.2",
"tslint": "^5.11.0",
"tslint-config-prettier": "^1.15.0"
"@gitzone/tsbuild": "^2.1.66",
"@gitzone/tsrun": "^1.2.42",
"@gitzone/tstest": "^1.0.74",
"@pushrocks/tapbundle": "^5.0.4",
"@types/node": "^20.3.0"
},
"dependencies": {}
"files": [
"ts/**/*",
"ts_web/**/*",
"dist/**/*",
"dist_*/**/*",
"dist_ts/**/*",
"dist_ts_web/**/*",
"assets/**/*",
"cli.js",
"npmextra.json",
"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

40
readme.md Normal file
View File

@ -0,0 +1,40 @@
# @pushrocks/smartmanifest
a module for creating web app manifests
## Availabililty and Links
* [npmjs.org (npm package)](https://www.npmjs.com/package/@pushrocks/smartmanifest)
* [gitlab.com (source)](https://gitlab.com/pushrocks/smartmanifest)
* [github.com (source mirror)](https://github.com/pushrocks/smartmanifest)
* [docs (typedoc)](https://pushrocks.gitlab.io/smartmanifest/)
## Status for master
Status Category | Status Badge
-- | --
GitLab Pipelines | [![pipeline status](https://gitlab.com/pushrocks/smartmanifest/badges/master/pipeline.svg)](https://lossless.cloud)
GitLab Pipline Test Coverage | [![coverage report](https://gitlab.com/pushrocks/smartmanifest/badges/master/coverage.svg)](https://lossless.cloud)
npm | [![npm downloads per month](https://badgen.net/npm/dy/@pushrocks/smartmanifest)](https://lossless.cloud)
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
## 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.
## Legal
> MIT licensed | **©** [Task Venture Capital GmbH](https://task.vc)
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy)

View File

@ -1,14 +1,14 @@
import { expect, tap } from '@pushrocks/tapbundle';
import * as smartmanifest from '../ts/index';
import * as smartmanifest from '../ts/index.js';
let testSmartManifest: smartmanifest.SmartManifest;
tap.test('first test', async () => {
testSmartManifest = new smartmanifest.SmartManifest({
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 () => {

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.2',
description: 'a module for creating web app manifests'
}

View File

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

View File

@ -1,4 +1,2 @@
const removeme = {};
export {
removeme
}
export { removeme };

11
tsconfig.json Normal file
View File

@ -0,0 +1,11 @@
{
"compilerOptions": {
"experimentalDecorators": true,
"useDefineForClassFields": false,
"target": "ES2022",
"module": "ES2022",
"moduleResolution": "nodenext",
"esModuleInterop": true,
"verbatimModuleSyntax": 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"
}