Compare commits
10 Commits
Author | SHA1 | Date | |
---|---|---|---|
a7281760ac | |||
1c8fef7a07 | |||
71396208ee | |||
1dadeeb05a | |||
0fd7ae74f8 | |||
9d6238618f | |||
0dd10351ad | |||
1d2b489830 | |||
446c9d0f59 | |||
a689252f4b |
@ -13,31 +13,24 @@ stages:
|
||||
- metadata
|
||||
|
||||
before_script:
|
||||
- npm install -g @shipzone/npmci
|
||||
- pnpm install -g pnpm
|
||||
- pnpm install -g @shipzone/npmci
|
||||
- npmci npm prepare
|
||||
|
||||
# ====================
|
||||
# security stage
|
||||
# ====================
|
||||
mirror:
|
||||
stage: security
|
||||
script:
|
||||
- npmci git mirror
|
||||
only:
|
||||
- tags
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
- notpriv
|
||||
|
||||
# ====================
|
||||
# security stage
|
||||
# ====================
|
||||
auditProductionDependencies:
|
||||
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||
stage: security
|
||||
script:
|
||||
- npmci npm prepare
|
||||
- npmci command npm install --production --ignore-scripts
|
||||
- npmci command npm config set registry https://registry.npmjs.org
|
||||
- npmci command npm audit --audit-level=high --only=prod --production
|
||||
- npmci command npm config set registry https://registry.npmjs.org
|
||||
- npmci command pnpm audit --audit-level=high --prod
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
allow_failure: true
|
||||
|
||||
@ -45,11 +38,10 @@ 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
|
||||
- npmci command pnpm audit --audit-level=high --dev
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
allow_failure: true
|
||||
|
||||
@ -60,7 +52,6 @@ auditDevDependencies:
|
||||
testStable:
|
||||
stage: test
|
||||
script:
|
||||
- npmci npm prepare
|
||||
- npmci node install stable
|
||||
- npmci npm install
|
||||
- npmci npm test
|
||||
@ -71,10 +62,9 @@ testStable:
|
||||
testBuild:
|
||||
stage: test
|
||||
script:
|
||||
- npmci npm prepare
|
||||
- npmci node install stable
|
||||
- npmci npm install
|
||||
- npmci command npm run build
|
||||
- npmci npm build
|
||||
coverage: /\d+.?\d+?\%\s*coverage/
|
||||
tags:
|
||||
- docker
|
||||
@ -122,11 +112,9 @@ trigger:
|
||||
pages:
|
||||
stage: metadata
|
||||
script:
|
||||
- npmci node install lts
|
||||
- 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
|
||||
|
13821
package-lock.json
generated
13821
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
11
package.json
11
package.json
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@pushrocks/smartntml",
|
||||
"version": "1.0.12",
|
||||
"version": "2.0.4",
|
||||
"private": false,
|
||||
"description": "lit-html for the backend",
|
||||
"main": "dist_ts/index.js",
|
||||
@ -10,11 +10,13 @@
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"test": "(tstest test/ --web)",
|
||||
"build": "(tsbuild --web)"
|
||||
"build": "(tsbuild --web)",
|
||||
"buildDocs": "tsdoc"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@gitzone/tsbuild": "^2.1.65",
|
||||
"@gitzone/tsbundle": "^2.0.7",
|
||||
"@gitzone/tsrun": "^1.2.39",
|
||||
"@gitzone/tstest": "^1.0.73",
|
||||
"@pushrocks/tapbundle": "^5.0.4",
|
||||
"@types/node": "^18.7.23",
|
||||
@ -22,8 +24,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@designestate/dees-element": "^2.0.20",
|
||||
"@happy-dom/global-registrator": "^6.0.4",
|
||||
"@pushrocks/smartpromise": "^3.1.7"
|
||||
"@happy-dom/global-registrator": "^8.9.0",
|
||||
"@pushrocks/smartpromise": "^3.1.7",
|
||||
"fake-indexeddb": "^4.0.1"
|
||||
},
|
||||
"browserslist": [
|
||||
"last 1 chrome versions"
|
||||
|
155
pnpm-lock.yaml
generated
155
pnpm-lock.yaml
generated
@ -5,11 +5,14 @@ dependencies:
|
||||
specifier: ^2.0.20
|
||||
version: 2.0.20
|
||||
'@happy-dom/global-registrator':
|
||||
specifier: ^6.0.4
|
||||
version: 6.0.4
|
||||
specifier: ^8.9.0
|
||||
version: 8.9.0
|
||||
'@pushrocks/smartpromise':
|
||||
specifier: ^3.1.7
|
||||
version: 3.1.7
|
||||
fake-indexeddb:
|
||||
specifier: ^4.0.1
|
||||
version: 4.0.1
|
||||
|
||||
devDependencies:
|
||||
'@gitzone/tsbuild':
|
||||
@ -18,6 +21,9 @@ devDependencies:
|
||||
'@gitzone/tsbundle':
|
||||
specifier: ^2.0.7
|
||||
version: 2.0.7
|
||||
'@gitzone/tsrun':
|
||||
specifier: ^1.2.39
|
||||
version: 1.2.39(@types/node@18.15.11)
|
||||
'@gitzone/tstest':
|
||||
specifier: ^1.0.73
|
||||
version: 1.0.74(@types/node@18.15.11)
|
||||
@ -250,10 +256,10 @@ packages:
|
||||
- utf-8-validate
|
||||
dev: true
|
||||
|
||||
/@happy-dom/global-registrator@6.0.4:
|
||||
resolution: {integrity: sha512-SAIQRmz9+SyrOYdCYjs0lJKCb3x7iC1C9YW7C+IPmfGGAD3WTndHsnvslk/GalteZeIQNlUlNgCdOEjiUTn8Lg==}
|
||||
/@happy-dom/global-registrator@8.9.0:
|
||||
resolution: {integrity: sha512-Kw/YMNv1kmH862kQUzXM6K0Y4AW5b0I/+2EIopVc7edurBwY8LHSKd5gJzEEQvdgapSeDJowhOCgL0tkhJWi4A==}
|
||||
dependencies:
|
||||
happy-dom: 6.0.4
|
||||
happy-dom: 8.9.0
|
||||
transitivePeerDependencies:
|
||||
- encoding
|
||||
dev: false
|
||||
@ -1038,12 +1044,6 @@ packages:
|
||||
'@types/express': 4.17.17
|
||||
dev: true
|
||||
|
||||
/@types/concat-stream@1.6.1:
|
||||
resolution: {integrity: sha512-eHE4cQPoj6ngxBZMvVf6Hw7Mh4jMW4U9lpGmS5GBPB9RYxlFg+CHaVN7ErNY4W9XfLIEn20b4VDYaIrbq0q4uA==}
|
||||
dependencies:
|
||||
'@types/node': 18.15.11
|
||||
dev: false
|
||||
|
||||
/@types/connect@3.4.35:
|
||||
resolution: {integrity: sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==}
|
||||
dependencies:
|
||||
@ -1114,12 +1114,6 @@ packages:
|
||||
'@types/node': 18.15.11
|
||||
dev: true
|
||||
|
||||
/@types/form-data@0.0.33:
|
||||
resolution: {integrity: sha1-yayFsqX9GENbjIXZ7LUObWyJP/g=}
|
||||
dependencies:
|
||||
'@types/node': 18.15.11
|
||||
dev: false
|
||||
|
||||
/@types/from2@2.3.2:
|
||||
resolution: {integrity: sha512-s1pdctxW2+CA4FOxxTBRxC3RKQL9Br1a2s2LngP4jh1BI84JBL3mDXj87EwcckN9z/IXp8o3ySmvZveGEAAwqw==}
|
||||
dependencies:
|
||||
@ -1235,17 +1229,9 @@ packages:
|
||||
/@types/minimatch@5.1.2:
|
||||
resolution: {integrity: sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==}
|
||||
|
||||
/@types/node@10.17.60:
|
||||
resolution: {integrity: sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==}
|
||||
dev: false
|
||||
|
||||
/@types/node@18.15.11:
|
||||
resolution: {integrity: sha512-E5Kwq2n4SbMzQOn6wnmBjuK9ouqlURrcZDVfbo9ftDDTFt3nk7ZKK4GMOzoYgnpQJKcxwQw+lGaBvvlMo0qN/Q==}
|
||||
|
||||
/@types/node@8.10.66:
|
||||
resolution: {integrity: sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw==}
|
||||
dev: false
|
||||
|
||||
/@types/parse5@6.0.3:
|
||||
resolution: {integrity: sha512-SuT16Q1K51EAVPz1K29DJ/sXjhSQ0zjvsypYJ6tlwVsRV9jwW5Adq2ch8Dq8kDBCkYnELS7N7VNCSB5nC56t/g==}
|
||||
dev: true
|
||||
@ -1256,6 +1242,7 @@ packages:
|
||||
|
||||
/@types/qs@6.9.7:
|
||||
resolution: {integrity: sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==}
|
||||
dev: true
|
||||
|
||||
/@types/randomatic@3.1.3:
|
||||
resolution: {integrity: sha512-UlYMg/XxN+YMh6vAiB879yh2bhaTOU0DB1g4NGIhzlaiSf22rAVKIGTvH8HjCXu+wfFvjAWHuPG5waN4btEubw==}
|
||||
@ -1540,10 +1527,6 @@ packages:
|
||||
engines: {node: '>=8'}
|
||||
dev: true
|
||||
|
||||
/asap@2.0.6:
|
||||
resolution: {integrity: sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=}
|
||||
dev: false
|
||||
|
||||
/astral-regex@2.0.0:
|
||||
resolution: {integrity: sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==}
|
||||
engines: {node: '>=8'}
|
||||
@ -1551,6 +1534,7 @@ packages:
|
||||
|
||||
/asynckit@0.4.0:
|
||||
resolution: {integrity: sha1-x57Zf380y48robyXkLzDZkdLS3k=}
|
||||
dev: true
|
||||
|
||||
/axe-core@4.6.3:
|
||||
resolution: {integrity: sha512-/BQzOX780JhsxDnPpH4ZiyrJAzcd8AfzFPkv+89veFSr1rcMjuq2JDCwypKaPeB6ljHp9KjXhPpjgCvQlWYuqg==}
|
||||
@ -1666,10 +1650,6 @@ packages:
|
||||
resolution: {integrity: sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=}
|
||||
dev: true
|
||||
|
||||
/buffer-from@1.1.2:
|
||||
resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==}
|
||||
dev: false
|
||||
|
||||
/buffer-json@2.0.0:
|
||||
resolution: {integrity: sha512-+jjPFVqyfF1esi9fvfUs3NqM0pH1ziZ36VP4hmA/y/Ssfo/5w5xHKfTw9BwQjoJ1w/oVtpLomqwUHKdefGyuHw==}
|
||||
|
||||
@ -1735,10 +1715,6 @@ packages:
|
||||
upper-case: 1.1.3
|
||||
dev: true
|
||||
|
||||
/caseless@0.12.0:
|
||||
resolution: {integrity: sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=}
|
||||
dev: false
|
||||
|
||||
/chai-a11y-axe@1.4.1:
|
||||
resolution: {integrity: sha512-H3eRQhLbN1bk8thQXjZVKHVPlFGYrrmQ+iR8TwS9ML0HLu0Pjb6c7rMcaRZb99SsWMrenqE+W0AZRApVxlaltg==}
|
||||
dependencies:
|
||||
@ -1844,6 +1820,7 @@ packages:
|
||||
engines: {node: '>= 0.8'}
|
||||
dependencies:
|
||||
delayed-stream: 1.0.0
|
||||
dev: true
|
||||
|
||||
/commander@2.20.3:
|
||||
resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==}
|
||||
@ -1852,16 +1829,6 @@ packages:
|
||||
/concat-map@0.0.1:
|
||||
resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=}
|
||||
|
||||
/concat-stream@1.6.2:
|
||||
resolution: {integrity: sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==}
|
||||
engines: {'0': node >= 0.8}
|
||||
dependencies:
|
||||
buffer-from: 1.1.2
|
||||
inherits: 2.0.4
|
||||
readable-stream: 2.3.8
|
||||
typedarray: 0.0.6
|
||||
dev: false
|
||||
|
||||
/content-disposition@0.5.4:
|
||||
resolution: {integrity: sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==}
|
||||
engines: {node: '>= 0.6'}
|
||||
@ -1902,6 +1869,7 @@ packages:
|
||||
|
||||
/core-util-is@1.0.3:
|
||||
resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==}
|
||||
dev: true
|
||||
|
||||
/cors@2.8.5:
|
||||
resolution: {integrity: sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==}
|
||||
@ -2020,6 +1988,7 @@ packages:
|
||||
/delayed-stream@1.0.0:
|
||||
resolution: {integrity: sha1-3zrhmayt+31ECqrgsp4icrJOxhk=}
|
||||
engines: {node: '>=0.4.0'}
|
||||
dev: true
|
||||
|
||||
/delegates@1.0.0:
|
||||
resolution: {integrity: sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=}
|
||||
@ -2576,15 +2545,6 @@ packages:
|
||||
engines: {node: '>= 14.17'}
|
||||
dev: true
|
||||
|
||||
/form-data@2.5.1:
|
||||
resolution: {integrity: sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==}
|
||||
engines: {node: '>= 0.12'}
|
||||
dependencies:
|
||||
asynckit: 0.4.0
|
||||
combined-stream: 1.0.8
|
||||
mime-types: 2.1.35
|
||||
dev: false
|
||||
|
||||
/form-data@4.0.0:
|
||||
resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==}
|
||||
engines: {node: '>= 6'}
|
||||
@ -2645,11 +2605,6 @@ packages:
|
||||
has: 1.0.3
|
||||
has-symbols: 1.0.3
|
||||
|
||||
/get-port@3.2.0:
|
||||
resolution: {integrity: sha1-3Xzn3hh8Bsi/NTeWrHHgmfCYDrw=}
|
||||
engines: {node: '>=4'}
|
||||
dev: false
|
||||
|
||||
/get-stream@5.2.0:
|
||||
resolution: {integrity: sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==}
|
||||
engines: {node: '>=8'}
|
||||
@ -2723,13 +2678,13 @@ packages:
|
||||
resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==}
|
||||
dev: true
|
||||
|
||||
/happy-dom@6.0.4:
|
||||
resolution: {integrity: sha512-b+ID23Ms0BY08UNLymsOMG7EI2jSlwEt4cbJs938GZfeNAg+fqgkSO3TokQMgSOFoHznpjWmpVjBUL5boJ9PWw==}
|
||||
/happy-dom@8.9.0:
|
||||
resolution: {integrity: sha512-JZwJuGdR7ko8L61136YzmrLv7LgTh5b8XaEM3P709mLjyQuXJ3zHTDXvUtBBahRjGlcYW0zGjIiEWizoTUGKfA==}
|
||||
dependencies:
|
||||
css.escape: 1.5.1
|
||||
he: 1.2.0
|
||||
iconv-lite: 0.6.3
|
||||
node-fetch: 2.6.9
|
||||
sync-request: 6.1.0
|
||||
webidl-conversions: 7.0.0
|
||||
whatwg-encoding: 2.0.0
|
||||
whatwg-mimetype: 3.0.0
|
||||
@ -2799,16 +2754,6 @@ packages:
|
||||
http-errors: 1.8.1
|
||||
dev: true
|
||||
|
||||
/http-basic@8.1.3:
|
||||
resolution: {integrity: sha512-/EcDMwJZh3mABI2NhGfHOGOeOZITqfkEO4p/xK+l3NpyncIHUQBoMvCSF/b5GqvKtySC2srL/GGG3+EtlqlmCw==}
|
||||
engines: {node: '>=6.0.0'}
|
||||
dependencies:
|
||||
caseless: 0.12.0
|
||||
concat-stream: 1.6.2
|
||||
http-response-object: 3.0.2
|
||||
parse-cache-control: 1.0.1
|
||||
dev: false
|
||||
|
||||
/http-cache-semantics@4.1.1:
|
||||
resolution: {integrity: sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==}
|
||||
|
||||
@ -2844,12 +2789,6 @@ packages:
|
||||
toidentifier: 1.0.1
|
||||
dev: true
|
||||
|
||||
/http-response-object@3.0.2:
|
||||
resolution: {integrity: sha512-bqX0XTF6fnXSQcEJ2Iuyr75yVakyjIDCqroJQ/aHfSdlM743Cwqoi2nDYMzLGWUcuTWGWy8AAvOKXTfiv6q9RA==}
|
||||
dependencies:
|
||||
'@types/node': 10.17.60
|
||||
dev: false
|
||||
|
||||
/http2-wrapper@2.2.0:
|
||||
resolution: {integrity: sha512-kZB0wxMo0sh1PehyjJUWRFEd99KC5TLjZ2cULC4f9iqJBAmKQQXEICjxl5iPJRwP40dpeHFqqhm7tYCvODpqpQ==}
|
||||
engines: {node: '>=10.19.0'}
|
||||
@ -3029,6 +2968,7 @@ packages:
|
||||
|
||||
/isarray@1.0.0:
|
||||
resolution: {integrity: sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=}
|
||||
dev: true
|
||||
|
||||
/isbinaryfile@4.0.10:
|
||||
resolution: {integrity: sha512-iHrqe5shvBUcFbmZq9zOQHBoeOhZJu6RQGrDpBgenUm/Am+F3JM2MgQj+rK3Z601fzrL5gLZWtAPH2OBaSVcyw==}
|
||||
@ -3377,12 +3317,14 @@ packages:
|
||||
/mime-db@1.52.0:
|
||||
resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==}
|
||||
engines: {node: '>= 0.6'}
|
||||
dev: true
|
||||
|
||||
/mime-types@2.1.35:
|
||||
resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==}
|
||||
engines: {node: '>= 0.6'}
|
||||
dependencies:
|
||||
mime-db: 1.52.0
|
||||
dev: true
|
||||
|
||||
/mime@1.6.0:
|
||||
resolution: {integrity: sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==}
|
||||
@ -3520,6 +3462,7 @@ packages:
|
||||
|
||||
/object-inspect@1.12.3:
|
||||
resolution: {integrity: sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==}
|
||||
dev: true
|
||||
|
||||
/object-keys@1.1.1:
|
||||
resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==}
|
||||
@ -3612,10 +3555,6 @@ packages:
|
||||
no-case: 2.3.2
|
||||
dev: true
|
||||
|
||||
/parse-cache-control@1.0.1:
|
||||
resolution: {integrity: sha1-juqz5U+laSD+Fro493+iGqzC104=}
|
||||
dev: false
|
||||
|
||||
/parse-ms@2.1.0:
|
||||
resolution: {integrity: sha512-kHt7kzLoS9VBZfUsiKjv43mr91ea+U05EyKkEtqp7vNbHxmaVuEqN7XxeEVnGrMtYOAxGrDElSi96K7EgO1zCA==}
|
||||
engines: {node: '>=6'}
|
||||
@ -3723,18 +3662,13 @@ packages:
|
||||
|
||||
/process-nextick-args@2.0.1:
|
||||
resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==}
|
||||
dev: true
|
||||
|
||||
/progress@2.0.3:
|
||||
resolution: {integrity: sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==}
|
||||
engines: {node: '>=0.4.0'}
|
||||
dev: true
|
||||
|
||||
/promise@8.3.0:
|
||||
resolution: {integrity: sha512-rZPNPKTOYVNEEKFaq1HqTgOwZD+4/YHS5ukLzQCypkj+OkYx7iv0mA91lJlpPPZ8vMau3IIGj5Qlwrx+8iiSmg==}
|
||||
dependencies:
|
||||
asap: 2.0.6
|
||||
dev: false
|
||||
|
||||
/proxy-addr@2.0.7:
|
||||
resolution: {integrity: sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==}
|
||||
engines: {node: '>= 0.10'}
|
||||
@ -3807,6 +3741,7 @@ packages:
|
||||
engines: {node: '>=0.6'}
|
||||
dependencies:
|
||||
side-channel: 1.0.4
|
||||
dev: true
|
||||
|
||||
/querystring@0.2.0:
|
||||
resolution: {integrity: sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=}
|
||||
@ -3865,6 +3800,7 @@ packages:
|
||||
safe-buffer: 5.1.2
|
||||
string_decoder: 1.1.1
|
||||
util-deprecate: 1.0.2
|
||||
dev: true
|
||||
|
||||
/readable-stream@3.6.2:
|
||||
resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==}
|
||||
@ -3959,6 +3895,7 @@ packages:
|
||||
|
||||
/safe-buffer@5.1.2:
|
||||
resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==}
|
||||
dev: true
|
||||
|
||||
/safe-buffer@5.2.1:
|
||||
resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==}
|
||||
@ -4040,6 +3977,7 @@ packages:
|
||||
call-bind: 1.0.2
|
||||
get-intrinsic: 1.2.0
|
||||
object-inspect: 1.12.3
|
||||
dev: true
|
||||
|
||||
/siginfo@2.0.0:
|
||||
resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==}
|
||||
@ -4164,6 +4102,7 @@ packages:
|
||||
resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==}
|
||||
dependencies:
|
||||
safe-buffer: 5.1.2
|
||||
dev: true
|
||||
|
||||
/string_decoder@1.3.0:
|
||||
resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==}
|
||||
@ -4208,21 +4147,6 @@ packages:
|
||||
/symbol-tree@3.2.4:
|
||||
resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==}
|
||||
|
||||
/sync-request@6.1.0:
|
||||
resolution: {integrity: sha512-8fjNkrNlNCrVc/av+Jn+xxqfCjYaBoHqCsDz6mt030UMxJGr+GSfCV1dQt2gRtlL63+VPidwDVLr7V2OcTSdRw==}
|
||||
engines: {node: '>=8.0.0'}
|
||||
dependencies:
|
||||
http-response-object: 3.0.2
|
||||
sync-rpc: 1.3.6
|
||||
then-request: 6.0.2
|
||||
dev: false
|
||||
|
||||
/sync-rpc@1.3.6:
|
||||
resolution: {integrity: sha512-J8jTXuZzRlvU7HemDgHi3pGnh/rkoqR/OZSjhTyyZrEkkYQbk7Z33AXp37mkPfPpfdOuj7Ex3H/TJM1z48uPQw==}
|
||||
dependencies:
|
||||
get-port: 3.2.0
|
||||
dev: false
|
||||
|
||||
/systeminformation@5.17.12:
|
||||
resolution: {integrity: sha512-I3pfMW2vue53u+X08BNxaJieaHkRoMMKjWetY9lbYJeWFaeWPO6P4FkNc4XOCX8F9vbQ0HqQ25RJoz3U/B7liw==}
|
||||
engines: {node: '>=8.0.0'}
|
||||
@ -4250,23 +4174,6 @@ packages:
|
||||
readable-stream: 3.6.2
|
||||
dev: true
|
||||
|
||||
/then-request@6.0.2:
|
||||
resolution: {integrity: sha512-3ZBiG7JvP3wbDzA9iNY5zJQcHL4jn/0BWtXIkagfz7QgOL/LqjCEOBQuJNZfu0XYnv5JhKh+cDxCPM4ILrqruA==}
|
||||
engines: {node: '>=6.0.0'}
|
||||
dependencies:
|
||||
'@types/concat-stream': 1.6.1
|
||||
'@types/form-data': 0.0.33
|
||||
'@types/node': 8.10.66
|
||||
'@types/qs': 6.9.7
|
||||
caseless: 0.12.0
|
||||
concat-stream: 1.6.2
|
||||
form-data: 2.5.1
|
||||
http-basic: 8.1.3
|
||||
http-response-object: 3.0.2
|
||||
promise: 8.3.0
|
||||
qs: 6.11.1
|
||||
dev: false
|
||||
|
||||
/threads@1.7.0:
|
||||
resolution: {integrity: sha512-Mx5NBSHX3sQYR6iI9VYbgHKBLisyB+xROCBGjjWm1O9wb9vfLxdaGtmT/KCjUqMsSNW6nERzCW3T6H43LqjDZQ==}
|
||||
dependencies:
|
||||
@ -4390,10 +4297,6 @@ packages:
|
||||
mime-types: 2.1.35
|
||||
dev: true
|
||||
|
||||
/typedarray@0.0.6:
|
||||
resolution: {integrity: sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=}
|
||||
dev: false
|
||||
|
||||
/typescript@4.9.5:
|
||||
resolution: {integrity: sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==}
|
||||
engines: {node: '>=4.2.0'}
|
||||
|
@ -21,7 +21,6 @@ Code Style | [](htt
|
||||
PackagePhobia (total standalone install weight) | [](https://lossless.cloud)
|
||||
PackagePhobia (package size on registry) | [](https://lossless.cloud)
|
||||
BundlePhobia (total size when bundled) | [](https://lossless.cloud)
|
||||
Platform support | [](https://lossless.cloud) [](https://lossless.cloud)
|
||||
|
||||
## Usage
|
||||
|
||||
@ -33,7 +32,6 @@ We are always happy for code contributions. If you are not the code contributing
|
||||
|
||||
For further information read the linked docs at the top of this readme.
|
||||
|
||||
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
||||
## 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)
|
||||
|
||||
[](https://maintainedby.lossless.com)
|
||||
|
10
test/test.ts
10
test/test.ts
@ -5,14 +5,14 @@ import * as smartntml from '../ts/index.js';
|
||||
let testSmartntmlInstance: smartntml.Smartntml;
|
||||
|
||||
tap.test('first test', async () => {
|
||||
testSmartntmlInstance = await smartntml.Smartntml.create();
|
||||
testSmartntmlInstance = new smartntml.Smartntml();
|
||||
});
|
||||
|
||||
tap.test('should render a string', async () => {
|
||||
const arrayArg = [1, 2, 3, 4, 5, 6];
|
||||
const stringResult = await testSmartntmlInstance.renderTemplateResult(testSmartntmlInstance.html`
|
||||
const stringResult = await testSmartntmlInstance.renderTemplateResult(smartntml.deesElement.html`
|
||||
<div class="hello">${arrayArg.map(
|
||||
(element) => testSmartntmlInstance.html`<div>${element}</div>`
|
||||
(element) => smartntml.deesElement.html`<div>${element}</div>`
|
||||
)}</div>
|
||||
`);
|
||||
console.log(stringResult);
|
||||
@ -20,7 +20,7 @@ tap.test('should render a string', async () => {
|
||||
|
||||
tap.test('should log', async () => {
|
||||
log();
|
||||
setTimeout(()=> process.exit(0), 0);
|
||||
})
|
||||
setTimeout(() => process.exit(0), 0);
|
||||
});
|
||||
|
||||
tap.start();
|
||||
|
@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@pushrocks/smartntml',
|
||||
version: '1.0.12',
|
||||
version: '2.0.4',
|
||||
description: 'lit-html for the backend'
|
||||
}
|
||||
|
35
ts/index.ts
35
ts/index.ts
@ -1,35 +1,18 @@
|
||||
import './instrument/happydom.js';
|
||||
import * as plugins from './smartntml.plugins.js';
|
||||
|
||||
import * as deesElement from '@designestate/dees-element';
|
||||
export { deesElement };
|
||||
|
||||
export class Smartntml {
|
||||
// STATIC
|
||||
public static async create() {
|
||||
const smartntml = new Smartntml();
|
||||
return smartntml;
|
||||
}
|
||||
constructor() {}
|
||||
|
||||
private static smartntmlSingletonDeferred: plugins.smartpromise.Deferred<Smartntml>;
|
||||
public static async createSingleton() {
|
||||
if (this.smartntmlSingletonDeferred) {
|
||||
return this.smartntmlSingletonDeferred.promise;
|
||||
}
|
||||
this.smartntmlSingletonDeferred = plugins.smartpromise.defer();
|
||||
const smartntmlInstance = await this.create();
|
||||
this.smartntmlSingletonDeferred.resolve(smartntmlInstance);
|
||||
return this.smartntmlSingletonDeferred.promise;
|
||||
}
|
||||
|
||||
// INSTANCE
|
||||
private render = deesElement.render;
|
||||
public html = deesElement.html;
|
||||
public unsafeHTML = deesElement.unsafeHTML;
|
||||
|
||||
constructor() {
|
||||
}
|
||||
|
||||
public async renderTemplateResult(templateResult: deesElement.TemplateResult, stripCommentsArg = true) {
|
||||
public async renderTemplateResult(
|
||||
templateResult: plugins.deesElement.TemplateResult,
|
||||
stripCommentsArg = true
|
||||
) {
|
||||
const element = document.createElement('div');
|
||||
this.render(templateResult, element);
|
||||
plugins.deesElement.render(templateResult, element);
|
||||
let stringResult = element.innerHTML;
|
||||
if (stripCommentsArg) {
|
||||
stringResult = stringResult.replace(/<!--(.*?)-->/g, '');
|
||||
|
8
ts/instrument/happydom.ts
Normal file
8
ts/instrument/happydom.ts
Normal file
@ -0,0 +1,8 @@
|
||||
// happy-dom setup
|
||||
|
||||
// first lets setup indexeddb
|
||||
import 'fake-indexeddb/auto';
|
||||
|
||||
import { GlobalRegistrator } from '@happy-dom/global-registrator';
|
||||
GlobalRegistrator.register();
|
||||
window.location.href = 'http://localhost';
|
@ -1,13 +1,11 @@
|
||||
// happy-dom setup
|
||||
import { GlobalRegistrator } from '@happy-dom/global-registrator';
|
||||
GlobalRegistrator.register();
|
||||
window.location.href = 'http://localhost';
|
||||
|
||||
// @pushrocks scope
|
||||
import * as smartpromise from '@pushrocks/smartpromise';
|
||||
|
||||
export {
|
||||
smartpromise
|
||||
}
|
||||
export { smartpromise };
|
||||
|
||||
// designestate
|
||||
import * as deesElement from '@designestate/dees-element';
|
||||
|
||||
export { deesElement };
|
||||
|
||||
// third party scope
|
||||
|
Reference in New Issue
Block a user