Skip to content

Commit

Permalink
- revert last commit
Browse files Browse the repository at this point in the history
  • Loading branch information
kaizhu256 committed May 13, 2021
1 parent 5b1f053 commit b076bfa
Show file tree
Hide file tree
Showing 14 changed files with 291 additions and 300 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npm run-script build-ci
npm run build-ci
# - run: npm ci
# - run: npm run-script build --if-present
# - run: npm run build --if-present
# - run: npm test
# - run: npm run-script ci-github
# - run: npm run ci-github
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"*
'*
*.[0123456789][0123456789]
*.lock
*.log
Expand All @@ -13,9 +11,7 @@ node_modules
package-lock.json
temp*
tmp
undefined
utility2

!.gitconfig
!.github
!.gitignore
16 changes: 8 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ before_install:
- CI_COMMIT_MESSAGE="$(git log -1 --pretty=%s)" && if (printf "$CI_COMMIT_MESSAGE" | grep -qE "\bNODE_VERSION="); then nvm install "$(printf "$CI_COMMIT_MESSAGE" | sed -e "s/.*\bNODE_VERSION=//" -e "s/ .*//")" && node --version && npm --version; fi
branches:
only:
- /^alpha$/
- /^beta$/
- /^benchmark\..*/
- /^cron$/
- /^docker\..*/
- /^master$/
- /^publish$/
- /^task$/
#!! - /^alpha$/
#!! - /^beta$/
#!! - /^benchmark\..*/
#!! - /^cron$/
#!! - /^docker\..*/
#!! - /^master$/
#!! - /^publish$/
#!! - /^task$/
- none
cache:
npm: false
Expand Down
58 changes: 29 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@
this zero-dependency package will provide high-level functions to to build, test, and deploy webapps

# live web demo
- [https://kaizhu256.github.io/node-utility2/build..beta..github.com/app](https://kaizhu256.github.io/node-utility2/build..beta..github.com/app/)
- [https://kaizhu256.github.io/node-utility2/build..beta..travis-ci.com/app](https://kaizhu256.github.io/node-utility2/build..beta..travis-ci.com/app/)

[![screenshot](https://kaizhu256.github.io/node-utility2/build/screenshot.deployGithub.browser.%252Fnode-utility2%252Fbuild%252Fapp.png)](https://kaizhu256.github.io/node-utility2/build..beta..github.com/app/)
[![screenshot](https://kaizhu256.github.io/node-utility2/build/screenshot.deployGithub.browser.%252Fnode-utility2%252Fbuild%252Fapp.png)](https://kaizhu256.github.io/node-utility2/build..beta..travis-ci.com/app/)


[![github.com ci-status](https://github.com/kaizhu256/node-utility2/workflows/Node.js%20CI/badge.svg)](https://github.com/kaizhu256/node-utility2/actions) [![coverage](https://kaizhu256.github.io/node-utility2/build/coverage/coverage.badge.svg)](https://kaizhu256.github.io/node-utility2/build/coverage/index.html)
[![travis-ci.com build-status](https://api.travis-ci.com/kaizhu256/node-utility2.svg)](https://travis-ci.com/kaizhu256/node-utility2) [![coverage](https://kaizhu256.github.io/node-utility2/build/coverage/coverage.badge.svg)](https://kaizhu256.github.io/node-utility2/build/coverage/index.html)

[![commit status](https://kaizhu256.github.io/node-utility2/build/commit.badge.svg)](https://github.com/kaizhu256/node-utility2/actions)
[![build commit status](https://kaizhu256.github.io/node-utility2/build/build.badge.svg)](https://travis-ci.com/kaizhu256/node-utility2)

| git-branch : | [master](https://github.com/kaizhu256/node-utility2/tree/master) | [beta](https://github.com/kaizhu256/node-utility2/tree/beta) | [alpha](https://github.com/kaizhu256/node-utility2/tree/alpha)|
|--:|:--|:--|:--|
| test-server-github : | [![github.com test-server](https://kaizhu256.github.io/node-utility2/GitHub-Mark-32px.png)](https://kaizhu256.github.io/node-utility2/build..master..github.com/app) | [![github.com test-server](https://kaizhu256.github.io/node-utility2/GitHub-Mark-32px.png)](https://kaizhu256.github.io/node-utility2/build..beta..github.com/app) | [![github.com test-server](https://kaizhu256.github.io/node-utility2/GitHub-Mark-32px.png)](https://kaizhu256.github.io/node-utility2/build..alpha..github.com/app)|
| test-server-github : | [![github.com test-server](https://kaizhu256.github.io/node-utility2/GitHub-Mark-32px.png)](https://kaizhu256.github.io/node-utility2/build..master..travis-ci.com/app) | [![github.com test-server](https://kaizhu256.github.io/node-utility2/GitHub-Mark-32px.png)](https://kaizhu256.github.io/node-utility2/build..beta..travis-ci.com/app) | [![github.com test-server](https://kaizhu256.github.io/node-utility2/GitHub-Mark-32px.png)](https://kaizhu256.github.io/node-utility2/build..alpha..travis-ci.com/app)|
| test-server-heroku : | [![heroku.com test-server](https://kaizhu256.github.io/node-utility2/heroku-logo.75x25.png)](https://h1-utility2-master.herokuapp.com) | [![heroku.com test-server](https://kaizhu256.github.io/node-utility2/heroku-logo.75x25.png)](https://h1-utility2-beta.herokuapp.com) | [![heroku.com test-server](https://kaizhu256.github.io/node-utility2/heroku-logo.75x25.png)](https://h1-utility2-alpha.herokuapp.com)|
| test-report : | [![test-report](https://kaizhu256.github.io/node-utility2/build..master..github.com/test-report.badge.svg)](https://kaizhu256.github.io/node-utility2/build..master..github.com/test-report.html) | [![test-report](https://kaizhu256.github.io/node-utility2/build..beta..github.com/test-report.badge.svg)](https://kaizhu256.github.io/node-utility2/build..beta..github.com/test-report.html) | [![test-report](https://kaizhu256.github.io/node-utility2/build..alpha..github.com/test-report.badge.svg)](https://kaizhu256.github.io/node-utility2/build..alpha..github.com/test-report.html)|
| coverage : | [![coverage](https://kaizhu256.github.io/node-utility2/build..master..github.com/coverage/coverage.badge.svg)](https://kaizhu256.github.io/node-utility2/build..master..github.com/coverage/index.html) | [![coverage](https://kaizhu256.github.io/node-utility2/build..beta..github.com/coverage/coverage.badge.svg)](https://kaizhu256.github.io/node-utility2/build..beta..github.com/coverage/index.html) | [![coverage](https://kaizhu256.github.io/node-utility2/build..alpha..github.com/coverage/coverage.badge.svg)](https://kaizhu256.github.io/node-utility2/build..alpha..github.com/coverage/index.html)|
| build-artifacts : | [![build-artifacts](https://kaizhu256.github.io/node-utility2/glyphicons_144_folder_open.png)](https://github.com/kaizhu256/node-utility2/tree/gh-pages/build..master..github.com) | [![build-artifacts](https://kaizhu256.github.io/node-utility2/glyphicons_144_folder_open.png)](https://github.com/kaizhu256/node-utility2/tree/gh-pages/build..beta..github.com) | [![build-artifacts](https://kaizhu256.github.io/node-utility2/glyphicons_144_folder_open.png)](https://github.com/kaizhu256/node-utility2/tree/gh-pages/build..alpha..github.com)|
| test-report : | [![test-report](https://kaizhu256.github.io/node-utility2/build..master..travis-ci.com/test-report.badge.svg)](https://kaizhu256.github.io/node-utility2/build..master..travis-ci.com/test-report.html) | [![test-report](https://kaizhu256.github.io/node-utility2/build..beta..travis-ci.com/test-report.badge.svg)](https://kaizhu256.github.io/node-utility2/build..beta..travis-ci.com/test-report.html) | [![test-report](https://kaizhu256.github.io/node-utility2/build..alpha..travis-ci.com/test-report.badge.svg)](https://kaizhu256.github.io/node-utility2/build..alpha..travis-ci.com/test-report.html)|
| coverage : | [![coverage](https://kaizhu256.github.io/node-utility2/build..master..travis-ci.com/coverage/coverage.badge.svg)](https://kaizhu256.github.io/node-utility2/build..master..travis-ci.com/coverage/index.html) | [![coverage](https://kaizhu256.github.io/node-utility2/build..beta..travis-ci.com/coverage/coverage.badge.svg)](https://kaizhu256.github.io/node-utility2/build..beta..travis-ci.com/coverage/index.html) | [![coverage](https://kaizhu256.github.io/node-utility2/build..alpha..travis-ci.com/coverage/coverage.badge.svg)](https://kaizhu256.github.io/node-utility2/build..alpha..travis-ci.com/coverage/index.html)|
| build-artifacts : | [![build-artifacts](https://kaizhu256.github.io/node-utility2/glyphicons_144_folder_open.png)](https://github.com/kaizhu256/node-utility2/tree/gh-pages/build..master..travis-ci.com) | [![build-artifacts](https://kaizhu256.github.io/node-utility2/glyphicons_144_folder_open.png)](https://github.com/kaizhu256/node-utility2/tree/gh-pages/build..beta..travis-ci.com) | [![build-artifacts](https://kaizhu256.github.io/node-utility2/glyphicons_144_folder_open.png)](https://github.com/kaizhu256/node-utility2/tree/gh-pages/build..alpha..travis-ci.com)|

[![npmPackageListing](https://kaizhu256.github.io/node-utility2/build/screenshot.npmPackageListing.svg)](https://github.com/kaizhu256/node-utility2)

Expand All @@ -35,20 +35,20 @@ this zero-dependency package will provide high-level functions to to build, test


# cdn download
- [https://kaizhu256.github.io/node-utility2/build..beta..github.com/app/assets.utility2.rollup.js](https://kaizhu256.github.io/node-utility2/build..beta..github.com/app/assets.utility2.rollup.js)
- [https://kaizhu256.github.io/node-utility2/build..beta..travis-ci.com/app/assets.utility2.rollup.js](https://kaizhu256.github.io/node-utility2/build..beta..travis-ci.com/app/assets.utility2.rollup.js)


# documentation
#### api doc
- [https://kaizhu256.github.io/node-utility2/build..beta..github.com/apidoc.html](https://kaizhu256.github.io/node-utility2/build..beta..github.com/apidoc.html)
- [https://kaizhu256.github.io/node-utility2/build..beta..travis-ci.com/apidoc.html](https://kaizhu256.github.io/node-utility2/build..beta..travis-ci.com/apidoc.html)

[![apidoc](https://kaizhu256.github.io/node-utility2/build/screenshot.ci.browser.%252F.tmp%252Fbuild%252Fapidoc.html.png)](https://kaizhu256.github.io/node-utility2/build..beta..github.com/apidoc.html)
[![apidoc](https://kaizhu256.github.io/node-utility2/build/screenshot.ci.browser.%252F.tmp%252Fbuild%252Fapidoc.html.png)](https://kaizhu256.github.io/node-utility2/build..beta..travis-ci.com/apidoc.html)

#### cli help
![screenshot](https://kaizhu256.github.io/node-utility2/build/screenshot.npmPackageCliHelp.svg)

#### changelog 2021.1.1
- part 1 - migrate ci from travis-ci.com to github.com
#### changelog 2020.12.3
- pre - migrate ci from travis-ci.com to github.com
- remove shell-functions shBuildInsideDocker, shChromeSocks5, shCryptoTravisEncrypt, shMacAddressSpoof, shNpmDeprecateAlias, shNpmPublishAlias, shTravisRepoCreate, shTravisRepoTrigger
- init shell-var \$CI_xxx in shell-function shCiInit instead of shCiMain
- rename shBuildXxx to shCiXxx
Expand All @@ -63,7 +63,7 @@ this zero-dependency package will provide high-level functions to to build, test
- none

#### todo
- part 2 - migrate ci from travis-ci.com to github.com
- migrate ci from travis-ci.com to github.com
- reimplement timerTimeout in function testRunDefault
- fix broken auto-jslint for README.md
- fix test-report bug with duplicate github and heroku tests
Expand All @@ -77,14 +77,14 @@ this zero-dependency package will provide high-level functions to to build, test

# quickstart standalone app
#### to run this example, follow instruction in script below
- [assets.app.js](https://kaizhu256.github.io/node-utility2/build..beta..github.com/app/assets.app.js)
- [assets.app.js](https://kaizhu256.github.io/node-utility2/build..beta..travis-ci.com/app/assets.app.js)
```shell
# example.sh

# this shell script will download and run web-demo of utility2 as standalone app

# 1. download standalone app
curl -O https://kaizhu256.github.io/node-utility2/build..beta..github.com/app/assets.app.js
curl -O https://kaizhu256.github.io/node-utility2/build..beta..travis-ci.com/app/assets.app.js
# 2. run standalone app
PORT=8081 node ./assets.app.js
# 3. open browser to http://127.0.0.1:8081 and play with web-demo
Expand Down Expand Up @@ -209,8 +209,8 @@ instruction
}
function documentQuerySelectorAll(selector) {
/*
* this function will return document.querySelectorAll(<selector>) or
* empty list if function is not available
* this function will return document.querySelectorAll(<selector>)
* or empty list if function is not available
*/
return Array.from(
(
Expand All @@ -235,8 +235,8 @@ instruction
}
function objectAssignDefault(tgt = {}, src = {}, depth = 0) {
/*
* this function will if items from <tgt> are null, undefined, or
* "", then overwrite them with items from <src>
* this function will if items from <tgt> are null, undefined,
* or "", then overwrite them with items from <src>
*/
function recurse(tgt, src, depth) {
Object.entries(src).forEach(function ([
Expand Down Expand Up @@ -419,7 +419,7 @@ local.assetsDict["/"] = `<!doctype html>
name="viewport"
>
<!-- "assets.utility2.template.html" -->
<title>utility2 (2021.1.1)</title>
<title>utility2 (2020.12.3)</title>
<style>
/* jslint utility2:true */
/*csslint
Expand Down Expand Up @@ -499,7 +499,7 @@ pre {
.button:hover {
background: #bbb;
}
.styleColorError {
.colorError {
color: #d00;
}
.textarea {
Expand Down Expand Up @@ -580,7 +580,7 @@ pre {
</script>
<h1>
<a href="https://github.com/kaizhu256/node-utility2" target="_blank">
utility2 (2021.1.1)
utility2 (2020.12.3)
</a>
</h1>
<h3>this zero-dependency package will provide high-level functions to to build, test, and deploy webapps</h3>
Expand Down Expand Up @@ -661,7 +661,7 @@ pre {
class="button"
id="buttonJslintAutofix1"
>jslint autofix</button><br>
<pre class= "styleColorError" id="outputJslintPre1" tabindex="0"></pre>
<pre class= "colorError" id="outputJslintPre1" tabindex="0"></pre>
<label>instrumented-code</label>
<textarea
class="readonly textarea"
Expand Down Expand Up @@ -745,7 +745,7 @@ npm_package_description: "this zero-dependency package will provide high-level f
npm_package_homepage: "https://github.com/kaizhu256/node-utility2",
npm_package_name: "utility2",
npm_package_nameLib: "utility2",
npm_package_version: "2021.1.1"
npm_package_version: "2020.12.3"
}
</script>
<script src="assets.utility2.lib.istanbul.js"></script>
Expand Down Expand Up @@ -966,9 +966,9 @@ require("http").createServer(function (req, res) {
"2020.08.19 sqlite3-lite",
"2020.10.27 jslint-lite",
"2020.11.12 istanbul-lite",
"2021.01.01 utility2"
"2020.12.01 utility2"
],
"version": "2021.1.1"
"version": "2020.12.3"
}
```

Expand Down Expand Up @@ -1009,8 +1009,7 @@ RUN (set -e; \
ca-certificates \
curl \
git \
gnupg \
libnss3-tools; \
gnupg; \
(busybox --list | xargs -n1 /bin/sh -c \
'ln -s /bin/busybox /bin/$0 2>/dev/null' || true); \
curl -Lf https://deb.nodesource.com/setup_14.x | /bin/bash -; \
Expand Down Expand Up @@ -1131,6 +1130,7 @@ rm -rf \
done
;;
esac
# https://docs.travis-ci.com/user/docker/#Pushing-a-Docker-Image-to-a-Registry
# docker push
if [ "$DOCKER_PASSWORD" ]
then
Expand Down
10 changes: 5 additions & 5 deletions lib.apidoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@
}
function documentQuerySelectorAll(selector) {
/*
* this function will return document.querySelectorAll(<selector>) or
* empty list if function is not available
* this function will return document.querySelectorAll(<selector>)
* or empty list if function is not available
*/
return Array.from(
(
Expand All @@ -118,8 +118,8 @@
}
function objectAssignDefault(tgt = {}, src = {}, depth = 0) {
/*
* this function will if items from <tgt> are null, undefined, or
* "", then overwrite them with items from <src>
* this function will if items from <tgt> are null, undefined,
* or "", then overwrite them with items from <src>
*/
function recurse(tgt, src, depth) {
Object.entries(src).forEach(function ([
Expand Down Expand Up @@ -1011,7 +1011,7 @@ vendor\\)s\\{0,1\\}\\(\\b\\|_\\)\
tmp = function () {
return;
};
// coverage-hack
// hack-coverage
tmp();
Object.defineProperties(tmp, {
toString: {
Expand Down
8 changes: 4 additions & 4 deletions lib.istanbul.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@
}
function documentQuerySelectorAll(selector) {
/*
* this function will return document.querySelectorAll(<selector>) or
* empty list if function is not available
* this function will return document.querySelectorAll(<selector>)
* or empty list if function is not available
*/
return Array.from(
(
Expand All @@ -118,8 +118,8 @@
}
function objectAssignDefault(tgt = {}, src = {}, depth = 0) {
/*
* this function will if items from <tgt> are null, undefined, or
* "", then overwrite them with items from <src>
* this function will if items from <tgt> are null, undefined,
* or "", then overwrite them with items from <src>
*/
function recurse(tgt, src, depth) {
Object.entries(src).forEach(function ([
Expand Down
20 changes: 11 additions & 9 deletions lib.jslint.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@
}
function documentQuerySelectorAll(selector) {
/*
* this function will return document.querySelectorAll(<selector>) or
* empty list if function is not available
* this function will return document.querySelectorAll(<selector>)
* or empty list if function is not available
*/
return Array.from(
(
Expand All @@ -118,8 +118,8 @@
}
function objectAssignDefault(tgt = {}, src = {}, depth = 0) {
/*
* this function will if items from <tgt> are null, undefined, or
* "", then overwrite them with items from <src>
* this function will if items from <tgt> are null, undefined,
* or "", then overwrite them with items from <src>
*/
function recurse(tgt, src, depth) {
Object.entries(src).forEach(function ([
Expand Down Expand Up @@ -11862,7 +11862,6 @@ function tokenize(source) {
[].concat(
allowed_option.browser,
allowed_option.node,
"await",
"global",
"globalThis"
).forEach(function (key) {
Expand Down Expand Up @@ -16304,6 +16303,13 @@ local.jslint0 = Object.freeze(function (
);
}
break;
// expected_a_before_b: "Expected '{a}' before '{b}'.",
case "expected_a_before_b":
bb = (
aa.slice(0, warning.column - 1) + warning.a
+ aa.slice(warning.column - 1)
);
break;
// expected_identifier_a:
// "Expected an identifier and instead saw '{a}'.",
case "expected_identifier_a":
Expand Down Expand Up @@ -16444,10 +16450,6 @@ function jslintAutofix(code, file, opt, {fileType, globalList, iiLine}) {
let rgx1;
let rgx2;
let tmp;
// normalize carriage-return
code = code.replace((
/\r\n*/g
), "\n");
// autofix-all - normalize local-function
if (
globalThis.utility2
Expand Down
8 changes: 4 additions & 4 deletions lib.marked.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@
}
function documentQuerySelectorAll(selector) {
/*
* this function will return document.querySelectorAll(<selector>) or
* empty list if function is not available
* this function will return document.querySelectorAll(<selector>)
* or empty list if function is not available
*/
return Array.from(
(
Expand All @@ -112,8 +112,8 @@
}
function objectAssignDefault(tgt = {}, src = {}, depth = 0) {
/*
* this function will if items from <tgt> are null, undefined, or
* "", then overwrite them with items from <src>
* this function will if items from <tgt> are null, undefined,
* or "", then overwrite them with items from <src>
*/
function recurse(tgt, src, depth) {
Object.entries(src).forEach(function ([
Expand Down
Loading

0 comments on commit b076bfa

Please sign in to comment.