-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
445 additions
and
458 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "node", | ||
"request": "launch", | ||
"name": "Debug node-example", | ||
"cwd": "${workspaceFolder}", | ||
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/nx", | ||
"runtimeArgs": [ | ||
"serve", | ||
"node-example", | ||
"--inspect" | ||
], | ||
"skipFiles": [ | ||
"<node_internals>/**", | ||
"${workspaceFolder}/node_modules/*" | ||
], | ||
"outFiles": [ | ||
"${workspaceFolder}/dist/**/*.js" | ||
] | ||
}, | ||
{ | ||
"name": "Debug Node App", | ||
"type": "node", | ||
"request": "attach", | ||
"port": 7777 | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
/* eslint-disable no-console */ | ||
import { createStep } from '@ts-pipeline/core' | ||
import { renderToConsole } from '@ts-pipeline/renderer-core' | ||
import { parallel } from '@ts-pipeline/runner-parallel' | ||
import { sequence, setupStep } from '@ts-pipeline/runner-sequence' | ||
|
||
import { simulateWork } from './utils/simulateWork' | ||
import { steps } from './utils/steps' | ||
|
||
const deployPath = createStep({ | ||
name: 'deploy-path', | ||
action: async (ui, props: { artifactPath: string; registry: 'yarn' | 'npm' }) => { | ||
ui.onData(`deploying ${props.artifactPath}`) | ||
await simulateWork(200, ui) | ||
|
||
return props.artifactPath | ||
}, | ||
}) | ||
|
||
const build = createStep({ | ||
name: 'build', | ||
action: async (ui, props: { platform: 'android' | 'ios' | 'web' }) => { | ||
ui.onData(`start building for platform ${props.platform}`) | ||
await simulateWork(10000 * props.platform.length, ui) | ||
|
||
return { | ||
platform: props.platform, | ||
buildPath: `some/path/to/my/build/${props.platform}.zip`, | ||
} | ||
}, | ||
}) | ||
|
||
const upload = createStep({ | ||
name: 'upload', | ||
action: async (ui, props: { buildPath: string; retryCount?: number }) => { | ||
ui.onData(`uploading ${props.buildPath}`) | ||
await simulateWork(1000 * props.buildPath.length, ui) | ||
|
||
return { | ||
url: `https://my-build-server.com/${props.buildPath}`, | ||
} | ||
}, | ||
}) | ||
|
||
export async function renderToConsoleApp() { | ||
const lint = steps.lint | ||
const tests = setupStep(steps.tests, { allowPercentage: 30 }) | ||
|
||
await renderToConsole( | ||
sequence( | ||
'deploy react-native application', | ||
|
||
parallel('lint and tests', lint, tests), | ||
|
||
parallel( | ||
'build for all platforms', | ||
|
||
sequence( | ||
'build and upload android app to server <3', | ||
setupStep(build, { platform: 'android' }), | ||
// android can hangup sometimes, so we retry 10 times | ||
setupStep(upload, { retryCount: 10 }), | ||
), | ||
|
||
sequence( | ||
'build and upload ios to server <3', | ||
setupStep(build, { platform: 'ios' }), | ||
upload, | ||
), | ||
|
||
sequence( | ||
'build and upload web to server <3', | ||
setupStep(build, { platform: 'web' }), | ||
upload, | ||
), | ||
), | ||
), | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
{ | ||
"presets": [["@nrwl/web/babel", { "useBuiltIns": "usage" }]] | ||
"presets": [ | ||
[ | ||
"@nrwl/js/babel", | ||
{ | ||
"useBuiltIns": "usage" | ||
} | ||
] | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
30 changes: 0 additions & 30 deletions
30
libs/core/src/internal/renderer/terminal/TerminalRenderStore.ts
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
libs/core/src/internal/renderer/terminal/TerminalRenderers.ts
This file was deleted.
Oops, something went wrong.
55 changes: 0 additions & 55 deletions
55
libs/core/src/internal/renderer/terminal/engine/FrameRenderEngine.ts
This file was deleted.
Oops, something went wrong.
32 changes: 0 additions & 32 deletions
32
libs/core/src/internal/renderer/terminal/engine/ReactionRenderEngine.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
{ | ||
"presets": [["@nrwl/web/babel", { "useBuiltIns": "usage" }]] | ||
"presets": [ | ||
[ | ||
"@nrwl/js/babel", | ||
{ | ||
"useBuiltIns": "usage" | ||
} | ||
] | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// @index(['./shared/**/*.(ts|tsx)', '!./**/*.d.(ts|tsx)'], f => `export * from '${f.path}'`) | ||
export * from './shared/entity/AppRender' | ||
export * from './shared/entity/Renderable' | ||
export * from './shared/renderToConsole' | ||
// @endindex |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* eslint-disable no-console */ | ||
import { Registry } from '@ts-pipeline/core' | ||
import { composeSubscribe, Unsubscriber } from '@ts-pipeline/ts-core' | ||
import { reaction } from 'mobx' | ||
|
||
import { AppRender } from '../entity/AppRender' | ||
|
||
import { TaskStringRenderable } from './TaskStringRenderable' | ||
|
||
export class PlainConsoleRender implements AppRender { | ||
render = (registry: Registry<any, any>): Unsubscriber => { | ||
console.log('PlainConsoleRender.render()') | ||
console.log(registry.name) | ||
const renderable = new TaskStringRenderable() | ||
|
||
const historyReactions = registry.nested.map(store => { | ||
console.log('registry.nested', store.name) | ||
renderable.render(store, 0) | ||
reaction( | ||
() => [store, store.history, store.name, store.args], | ||
() => { | ||
renderable.render(store, 0) | ||
}, | ||
{ fireImmediately: true }, | ||
) | ||
|
||
return () => { | ||
console.log('unsubscribe') | ||
} | ||
}) | ||
|
||
return composeSubscribe([ | ||
// | ||
...historyReactions, | ||
]) | ||
} | ||
} |
Oops, something went wrong.