Skip to content

Commit

Permalink
@dr-js/core@0.4.3-dev.1
Browse files Browse the repository at this point in the history
notable change:
- deprecate: import Chip from `common/module/RunletChip` instead of ` `common/module/Runlet`
- fix: node: drop `request.destroyed` check in `node/server/Responder/Send`, error should fire for double-send, also check: nodejs/node#36617
- add: `createLockStepAsyncIter` to `common/data/Iter`
- add: node: `store.socket` to `node/server/Server`
- script sort
- package update
  • Loading branch information
dr-js committed Dec 24, 2020
1 parent a56d6db commit ac0e936
Show file tree
Hide file tree
Showing 19 changed files with 644 additions and 448 deletions.
8 changes: 2 additions & 6 deletions .github/ci-patch.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const { resolve } = require('path')
const { release, arch, homedir } = require('os')
const { run, describeRunOutcome } = require('@dr-js/core/library/node/system/Run')
const { run } = require('@dr-js/core/library/node/system/Run')

console.log(`[ci-patch] system: ${process.platform}-${release()}[${arch()}]`)
console.log(`[ci-patch] node: ${process.version}`)
Expand All @@ -13,11 +13,7 @@ const quickRun = async (argListOrString) => { // accept string list of very basi
const argList = Array.isArray(argListOrString) ? argListOrString : argListOrString.split(' ').filter(Boolean)
const command = argList.shift()
console.log(`[ci-patch] run: "${command} ${argList.join(' ')}"`)
const { promise } = run({ command, argList, option: { cwd: PATH_ROOT } })
await promise.catch(async (error) => {
console.error(await describeRunOutcome(error))
throw error
})
await run({ command, argList, option: { cwd: PATH_ROOT }, describeError: true }).promise
}

const main = async () => {
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:

- name: Patch & log CI info
run: |
npx @dr-js/core@^0.4.1 -eI .github/ci-patch.js
npx @dr-js/core@^0.4.3-dev.0 -eI .github/ci-patch.js
dr-dev -c .github/cache/config.js --cache-step setup
- name: Cache JS
Expand Down
12 changes: 10 additions & 2 deletions SPEC.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
+ 📄 [source/common/data/DataUri.js](source/common/data/DataUri.js)
- `decode`, `encode`
+ 📄 [source/common/data/Iter.js](source/common/data/Iter.js)
- `unwrap`, `wrapAsync`, `wrapSync`
- `createLockStepAsyncIter`, `unwrap`, `wrapAsync`, `wrapSync`
+ 📄 [source/common/data/LinkedList.js](source/common/data/LinkedList.js)
- `createDoublyLinkedList`, `createNode`
+ 📄 [source/common/data/ListMap.js](source/common/data/ListMap.js)
Expand Down Expand Up @@ -127,6 +127,8 @@
- `appendRouteMap`, `createRouteMap`, `findRouteFromMap`, `getRouteParam`, `getRouteParamAny`, `parseRouteToMap`, `parseRouteUrl`
+ 📄 [source/common/module/Runlet.js](source/common/module/Runlet.js)
- `ChipSyncBasic`, `END`, `KEY_PEND_INPUT`, `KEY_PEND_OUTPUT`, `KEY_POOL_IO`, `PoolIO`, `REDO`, `SKIP`, `TYPE_LOGICAL_PENDVIEW`, `TYPE_LOGICAL_PENDVIEWEE`, `clearPack`, `createArrayInputChip`, `createArrayOutputChip`, `createAsyncIteratorInputChip`, `createAsyncIteratorOutputChip`, `createCountPool`, `createENDRegulatorChip`, `createLogicalCountPool`, `createPack`, `createRunlet`, `describePack`, `quickConfigPend`, `toChipMap`, `toLinearChipList`, `toPoolMap`
+ 📄 [source/common/module/RunletChip.js](source/common/module/RunletChip.js)
- `createArrayInputChip`, `createArrayOutputChip`, `createAsyncIteratorInputChip`, `createAsyncIteratorOutputChip`, `createENDRegulatorChip`
+ 📄 [source/common/module/SemVer.js](source/common/module/SemVer.js)
- `compareSemVer`, `parseSemVer`
+ 📄 [source/common/module/TimedLookup.js](source/common/module/TimedLookup.js)
Expand Down Expand Up @@ -258,7 +260,7 @@
- **DataUri**
- `decode`, `encode`
- **Iter**
- `unwrap`, `wrapAsync`, `wrapSync`
- `createLockStepAsyncIter`, `unwrap`, `wrapAsync`, `wrapSync`
- **LinkedList**
- `createDoublyLinkedList`, `createNode`
- **ListMap**
Expand Down Expand Up @@ -327,6 +329,8 @@
- `appendRouteMap`, `createRouteMap`, `findRouteFromMap`, `getRouteParam`, `getRouteParamAny`, `parseRouteToMap`, `parseRouteUrl`
- **Runlet**
- `ChipSyncBasic`, `END`, `KEY_PEND_INPUT`, `KEY_PEND_OUTPUT`, `KEY_POOL_IO`, `PoolIO`, `REDO`, `SKIP`, `TYPE_LOGICAL_PENDVIEW`, `TYPE_LOGICAL_PENDVIEWEE`, `clearPack`, `createArrayInputChip`, `createArrayOutputChip`, `createAsyncIteratorInputChip`, `createAsyncIteratorOutputChip`, `createCountPool`, `createENDRegulatorChip`, `createLogicalCountPool`, `createPack`, `createRunlet`, `describePack`, `quickConfigPend`, `toChipMap`, `toLinearChipList`, `toPoolMap`
- **RunletChip**
- `createArrayInputChip`, `createArrayOutputChip`, `createAsyncIteratorInputChip`, `createAsyncIteratorOutputChip`, `createENDRegulatorChip`
- **SemVer**
- `compareSemVer`, `parseSemVer`
- **TimedLookup**
Expand Down Expand Up @@ -447,6 +451,8 @@
> show full help
> --version --v -v [OPTIONAL] [ARGUMENT=0-1]
> show version
> --note --N -N [OPTIONAL] [ARGUMENT=1+]
> noop, tag for ps/htop
> --quiet --q -q [OPTIONAL] [ARGUMENT=0-1]
> less log
> --input-file --I -I [OPTIONAL] [ARGUMENT=1]
Expand Down Expand Up @@ -517,6 +523,7 @@
> export DR_JS_CONFIG="[OPTIONAL] [ARGUMENT=1]"
> export DR_JS_HELP="[OPTIONAL] [ARGUMENT=0-1]"
> export DR_JS_VERSION="[OPTIONAL] [ARGUMENT=0-1]"
> export DR_JS_NOTE="[OPTIONAL] [ARGUMENT=1+]"
> export DR_JS_QUIET="[OPTIONAL] [ARGUMENT=0-1]"
> export DR_JS_INPUT_FILE="[OPTIONAL] [ARGUMENT=1]"
> export DR_JS_OUTPUT_FILE="[OPTIONAL] [ARGUMENT=1]"
Expand Down Expand Up @@ -555,6 +562,7 @@
> "config": [ "[OPTIONAL] [ARGUMENT=1]" ],
> "help": [ "[OPTIONAL] [ARGUMENT=0-1]" ],
> "version": [ "[OPTIONAL] [ARGUMENT=0-1]" ],
> "note": [ "[OPTIONAL] [ARGUMENT=1+]" ],
> "quiet": [ "[OPTIONAL] [ARGUMENT=0-1]" ],
> "inputFile": [ "[OPTIONAL] [ARGUMENT=1]" ],
> "outputFile": [ "[OPTIONAL] [ARGUMENT=1]" ],
Expand Down
4 changes: 1 addition & 3 deletions example/node/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ const main = async () => {

console.log('== exec ========================')
const [ command, ...argList ] = (process.platform === 'win32' ? 'CMD.exe /S /C dir' : 'ls -l').split(' ')
const { promise, stdoutPromise } = run({ command, argList, quiet: true })
console.log(await describeRunOutcome(await promise))
console.warn(String(await stdoutPromise))
console.log(await describeRunOutcome(await run({ command, argList, quiet: true }).promise))
}

main().catch(console.error)

0 comments on commit ac0e936

Please sign in to comment.