This file contains hidden or 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
| export const NPM_SCOPE_REGEX = new RegExp(/^@{1}(\w)+\/{1}(?!\/)/); |
This file contains hidden or 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
| import { component$, useSignal, useStore } from '@builder.io/qwik'; | |
| import { Button } from '../button/button'; | |
| import { | |
| I18nMappings, | |
| PromptOption, | |
| } from '@nx-toolkit/shared/data-access/transformer'; | |
| type PromptCategories = 'generate' | 'improve' | 'feedback'; | |
| type MultiPromptBox = Record<PromptCategories, PromptOption[]>; |
This file contains hidden or 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
| import { exec } from 'child_process'; | |
| import * as path from 'path'; | |
| import * as yargsParser from 'yargs-parser'; | |
| import { env as appendLocalEnv } from 'npm-run-path'; | |
| import { ExecutorContext } from '@nrwl/devkit'; | |
| import * as chalk from 'chalk'; | |
| export const LARGE_BUFFER = 1024 * 1000000; | |
| async function loadEnvVars(path?: string) { |
This file contains hidden or 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
| const obs$ = of('my test value'); | |
| obs$.pipe(debug()).subscribe(); | |
| // OUTPUT | |
| // CONSOLE | |
| // my test value |
This file contains hidden or 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
| //We can add a label to the logs: | |
| const obs$ = of('my test value'); | |
| obs$.pipe(debug('Obserable A')).subscribe(); | |
| // OUTPUT: | |
| // Obserable A my test value | |
| // We can label it using the config object syntax: | |
| const obs$ = of('my test value'); |
This file contains hidden or 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
| // Examples | |
| // We can use it on it's own to simply log out values to the console | |
| const obs$ = of('my test value'); | |
| obs$.pipe(debug()).subscribe(); | |
| // OUTPUT: | |
| // my test value | |
| We can also set up our own notification handlers if we prefer: |
This file contains hidden or 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
| const mappedInv$ = | |
| // Gets all docs | |
| this.invService.getAll().pipe( | |
| // Stream each element of the array | |
| mergeMap((inventory) => from(inventory)), | |
| // Using each element of the array, do your next action | |
| mergeMap((inventoryItem: InventoryItem) => | |
| // This use case involved getting more details from a difference collection | |
| this.itemService.getAsync(inventoryItem.itemId).pipe( | |
| take(1), |
This file contains hidden or 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
| { | |
| // Use IntelliSense to learn about possible attributes. | |
| // Hover to view descriptions of existing attributes. | |
| // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
| "version": "0.2.0", | |
| "configurations": [ | |
| { | |
| "type": "chrome", | |
| "request": "launch", | |
| "name": "Launch Chrome against localhost", |