open-index/open-npm huggingface dataset:
npm package: @stack-tools/node-tools
Description: Tools for printing and parsing node errors and their stacks
Author: Conrad Buck
Latest version: 0.2.4

# @stack-tools/node-tools

`node-tools` provides utilites for printing and parsing node errors and their stacks.

`node-tools` is a shim on top of [v8-tools](https://github.com/stack-tools-js/stack-tools/tree/trunk/packages/stack-tools-v8) which expands the definition of `isInternalFrame` to include node internal modules like `fs`.

## Usage

```js
import getPackageName from 'get-package-name';
import {
  isInternalFrame as isNodeInternalFrame,
  parseErrors,
  cleanErrors,
  printErrors,
} from '@stack-tools/node-tools';

const internalPackages = new Set([
  'my-package',
  'test-runner',
]);

const isInternalFrame = (frame) => {
  return (
    isNodeInternalFrame(frame) ||
    (frame.site.type === 'path' &&
      internalPackages.has(getPackageName(frame.site.file)))
  );
};

try {
  doStuff();
} catch (e) {
  const errors = parseErrors(e);

  cleanErrors(errors, isInternalFrame);

  console.error(printErrors(errors));
}
```
npm package: @stack-tools/v8-tools
Description: Tools for printing and parsing v8 errors and their stacks
Author: Conrad Buck
Latest version: 0.2.4

# @stack-tools/v8-tools

`v8-tools` provides utilites for printing and parsing v8 errors and their stacks. If you're not sure if your code will always run in a v8 environment, you will need to know before you use this tool to parse errors. If you are not sure, you should instead use the [stack-tools](https://github.com/stack-tools-js/stack-tools/tree/trunk/packages/stack-tools) package. Errors that can be parsed by this package will look more or less like this:

```
Error: A message about the error
    at someFunction (foo.js:10:2)
    at index.js:1:1
```

## What uses v8?

v8 is used in many common browsers including including Chrome, Chromium, IE Edge, and Opera, as well as in [node](https://nodejs.org/). If you are using node however, you should actually use the [node-tools](https://github.com/stack-tools-js/stack-tools/tree/trunk/packages/stack-tools-node) package.

The most notable browsers not using v8 are Firefox (using Spidermonkey) and Safari (using JavaScriptCore).

## Usage

```js
import {
  parseErrors,
  cleanErrors,
  printErrors,
} from '@stack-tools/v8-tools';

try {
  doStuff();
} catch (e) {
  const errors = parseErrors(e);

  cleanErrors(errors);

  console.error(printErrors(errors));
}
```

## API

The api for `node-tools` extends from the [stack-tools API](https://github.com/stack-tools-js/stack-tools/tree/trunk/packages/stack-tools#API). It is capable of more robust parsing though, and can even parse error strings, i.e. `parseError(err.stack)`, which the base `stack-tools` cannot. Furthermore it provides the most detailed output it can, specifically offering a `FrameNode` describing content of each frame. When parsing `ErrorNode.frames` will be an `Array<FrameNode>`. For details of the AST structure please read [ast.d.ts](https://github.com/stack-tools-js/stack-tools/tree/trunk/packages/stack-tools-v8/lib/ast.d.ts).

`v8-tools` overrides the implementations of some methods from the `stack-tools` API to provide support for custom chaining prefixes. Custom prefixes are usually the result of user tampering with `error.stack`, such as is done by [nested-error-stacks](https://www.npmjs.com/package/nested-error-stacks).

- `printErrors(error)` returns `` `${printError(error)}\n${error.prefix}: ${printErrors(error.cause)}` ``

`v8-tools` also defines the following additional methods:

- `parseFrame(frame)` returns a `FrameNode`
- `isInternalFrame(frame)` returns `true` if frame represents a location internal to the v8 runtime.
- `cleanError(error, predicate = isInternalFrame)` mutates `error.stack`, filtering out internal frames. Returns `error`.
- `cleanErrors(errors, predicate = isInternalFrame)` for each error mutates `error.stack`, filtering out internal frames. Returns `errors`.
npm package: @stackable-ee/ai-spec
Description: Reference file for ai pre-prompting
Author: Erik Kaljumae
Latest version: 0.1.0

# ai-spec
Guidelines and logic to save project reference as a "pre-prompt" for artificial intelligence assistance chatbots to have a reference about given project, its aspects, technical base, its state and goals (without pasting the full codebase into ai to request input)

-- --
# Example file of project ai-spec specification
-- --

Last Update: 2023-03-27
Version: 1.2

# Project Name
Amazing Project

# Project Description
The Amazing Project is an innovative web application aimed at solving problem X by providing features A, B, and C.

# Technology Stack
- Frontend: React, Redux, TypeScript
- Backend: Node.js, Express, MongoDB
- CI/CD: Jenkins, Docker

# Repository URL
https://github.com/user/amazing-project

# Project Management Tool
Trello: https://trello.com/amazingproject

# Team Members
- Jane Doe (Project Manager) - jane@example.com
- John Smith (Frontend Developer) - john@example.com
- Alice Johnson (Backend Developer) - alice@example.com
- Bob Brown (QA Engineer) - bob@example.com

# Project Timeline and Milestones
- Start Date: 2023-01-01
- End Date: 2023-06-30

Milestones:
1. Initial Prototype (2023-02-15): Complete first working version of the application.
2. Feature A Implementation (2023-03-15): Implement and integrate feature A.
3. Feature B Implementation (2023-04-15): Implement and integrate feature B.
4. Feature C Implementation (2023-05-15): Implement and integrate feature C.
5. Testing & Bug Fixes (2023-06-01): Complete testing and fix any identified issues.
6. Launch (2023-06-30): Official release of the Amazing Project.
npm package: @stackables/bridge-graphql
Description: Bridge GraphQL adapter — wire bridges into a GraphQL schema
Latest version: 1.3.0

[![github](https://img.shields.io/badge/github-stackables/bridge-blue?logo=github)](https://github.com/stackables/bridge)

# The Bridge GraphQL adapter

The GraphQL adapter for [The Bridge](https://github.com/stackables/bridge) — takes your existing GraphQL schema and wires bridge logic into it. Your `.bridge` files become the resolvers. No boilerplate, no codegen.

# Installing

```bash
npm install @stackables/bridge-graphql @stackables/bridge-parser graphql @graphql-tools/utils
```

`graphql` (≥ 16) and `@graphql-tools/utils` (≥ 11) are peer dependencies.

## Quick Start

```ts
import { bridgeTransform } from "@stackables/bridge-graphql";
import { parseBridge } from "@stackables/bridge-parser";
import { createSchema, createYoga } from "graphql-yoga";
import { createServer } from "node:http";
import { readFileSync } from "node:fs";

const typeDefs = readFileSync("schema.graphql", "utf8");
const bridgeSource = readFileSync("logic.bridge", "utf8");

// Parse the bridge file and wire it into the schema
const schema = bridgeTransform(
  createSchema({ typeDefs }),
  parseBridge(bridgeSource),
);

// That's it — start serving
const yoga = createYoga({ schema });
createServer(yoga).listen(4000, () => {
  console.log("http://localhost:4000/graphql");
});
```

## Tracing

Enable tool-call tracing to see exactly what the engine did during a request:

```ts
const schema = bridgeTransform(createSchema({ typeDefs }), instructions, {
  trace: "basic", // "off" | "basic" | "full"
  logger: console, // plug in pino, winston, or anything with debug/info/warn/error
});
```

## Part of the Bridge Ecosystem

| Package                                                                                    | What it does                                                        |
| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------- |
| [`@stackables/bridge`](https://www.npmjs.com/package/@stackables/bridge)                   | **The All-in-One** — everything in a single install                 |
| [`@stackables/bridge-parser`](https://www.npmjs.com/package/@stackables/bridge-parser)     | **The Parser** — turns `.bridge` text into instructions             |
| [`@stackables/bridge-compiler`](https://www.npmjs.com/package/@stackables/bridge-compiler) | **The Compiler** — compiles BridgeDocument into optimized JavaScript |
| [`@stackables/bridge-core`](https://www.npmjs.com/package/@stackables/bridge-core)         | **The Engine** — also supports standalone execution without GraphQL |
| [`@stackables/bridge-stdlib`](https://www.npmjs.com/package/@stackables/bridge-stdlib)     | **The Standard Library** — httpCall, strings, arrays, and more      |
| [`@stackables/bridge-types`](https://www.npmjs.com/package/@stackables/bridge-types)       | **Shared Types** — `ToolCallFn`, `ToolMap`, `CacheStore`            |
npm package: @stackables/bridge-parser
Description: Bridge DSL parser — turns .bridge text into a BridgeDocument (AST)
Latest version: 1.5.0

[![github](https://img.shields.io/badge/github-stackables/bridge-blue?logo=github)](https://github.com/stackables/bridge)

# The Bridge Parser

The parser for [The Bridge](https://github.com/stackables/bridge) — turns `.bridge` source text into a `BridgeDocument` (AST).

## Installing

```bash
npm install @stackables/bridge-parser
```

## Parsing a Bridge File

The most common thing you'll do — read a `.bridge` file and get instructions the engine can run:

```ts
import { parseBridge } from "@stackables/bridge-parser";
import { readFileSync } from "node:fs";

const source = readFileSync("logic.bridge", "utf8");
const instructions = parseBridge(source);

// → Instruction[] — feed this to executeBridge() or bridgeTransform()
```

## Serializing Back to `.bridge`

Round-trip support — parse a bridge file, then serialize the AST back into clean `.bridge` text:

```ts
import {
  parseBridgeFormat,
  serializeBridge,
} from "@stackables/bridge-parser";

const ast = parseBridgeFormat(source);
const formatted = serializeBridge(ast);
```

## Part of the Bridge Ecosystem

| Package                                                                                  | What it does                                                   |
| ---------------------------------------------------------------------------------------- | -------------------------------------------------------------- |
| [`@stackables/bridge`](https://www.npmjs.com/package/@stackables/bridge)                 | **The All-in-One** — everything in a single install            |
| [`@stackables/bridge-core`](https://www.npmjs.com/package/@stackables/bridge-core)       | **The Engine** — runs the instructions this package produces   |
| [`@stackables/bridge-compiler`](https://www.npmjs.com/package/@stackables/bridge-compiler) | **The Compiler** — compiles BridgeDocument into optimized JavaScript |
| [`@stackables/bridge-graphql`](https://www.npmjs.com/package/@stackables/bridge-graphql) | **The Adapter** — wires bridges into a GraphQL schema          |
| [`@stackables/bridge-stdlib`](https://www.npmjs.com/package/@stackables/bridge-stdlib)   | **The Standard Library** — httpCall, strings, arrays, and more |
| [`@stackables/bridge-types`](https://www.npmjs.com/package/@stackables/bridge-types)     | **Shared Types** — `ToolCallFn`, `ToolMap`, `CacheStore`       |
npm package: @stackables/bridge-stdlib
Description: Bridge standard library — httpCall, string, array, and audit tools
Latest version: 1.5.3

[![github](https://img.shields.io/badge/github-stackables/bridge-blue?logo=github)](https://github.com/stackables/bridge)

# The Bridge standard library

The standard library for [The Bridge](https://github.com/stackables/bridge) — a collection of built-in tools: HTTP calls, string manipulation, array operations, audit logging, and input validation.

You usually won't install this directly. It comes bundled with both [`@stackables/bridge`](https://www.npmjs.com/package/@stackables/bridge) and [`@stackables/bridge-core`](https://www.npmjs.com/package/@stackables/bridge-core).

# Installing

You might need to install this separately if you want to use different versions of standard library in your `.bridge` files or customise the http client cache handling.

```bash
npm install @stackables/bridge-stdlib
```

## Customizing httpCall

The default `httpCall` uses `globalThis.fetch` and an in-memory LRU cache. If you need to swap in a custom fetch or plug in Redis for caching:

```ts
import { createHttpCall } from "@stackables/bridge-stdlib";

// Use a custom fetch and a Redis-backed cache store
const httpCall = createHttpCall(myCustomFetch, myRedisCacheStore);
```

Then pass it to the engine via the `tools` option.

## Part of the Bridge Ecosystem

| Package                                                                                    | What it does                                             |
| ------------------------------------------------------------------------------------------ | -------------------------------------------------------- |
| [`@stackables/bridge`](https://www.npmjs.com/package/@stackables/bridge)                   | **The All-in-One** — everything in a single install      |
| [`@stackables/bridge-core`](https://www.npmjs.com/package/@stackables/bridge-core)         | **The Engine** — runs pre-compiled bridge instructions   |
| [`@stackables/bridge-parser`](https://www.npmjs.com/package/@stackables/bridge-parser)     | **The Parser** — turns `.bridge` text into instructions  |
| [`@stackables/bridge-compiler`](https://www.npmjs.com/package/@stackables/bridge-compiler) | **The Compiler** — compiles BridgeDocument into optimized JavaScript |
| [`@stackables/bridge-graphql`](https://www.npmjs.com/package/@stackables/bridge-graphql)   | **The Adapter** — wires bridges into a GraphQL schema    |
| [`@stackables/bridge-types`](https://www.npmjs.com/package/@stackables/bridge-types)       | **Shared Types** — `ToolCallFn`, `ToolMap`, `CacheStore` |
npm package: @stackables/bridge-types
Description: Shared type definitions for the Bridge ecosystem
Latest version: 1.2.0

[![github](https://img.shields.io/badge/github-stackables/bridge-blue?logo=github)](https://github.com/stackables/bridge)

# The Bridge Types

Shared TypeScript interfaces for the [Bridge](https://github.com/stackables/bridge) ecosystem.

## Installing

You need this only if you are authoring tools and want up to date types for your tools context.

```bash
npm install @stackables/bridge-types
```

## Part of the Bridge Ecosystem

| Package                                                                                    | What it does                                                   |
| ------------------------------------------------------------------------------------------ | -------------------------------------------------------------- |
| [`@stackables/bridge`](https://www.npmjs.com/package/@stackables/bridge)                   | **The All-in-One** — everything in a single install            |
| [`@stackables/bridge-core`](https://www.npmjs.com/package/@stackables/bridge-core)         | **The Engine** — runs pre-compiled bridge instructions         |
| [`@stackables/bridge-parser`](https://www.npmjs.com/package/@stackables/bridge-parser)     | **The Parser** — turns `.bridge` text into instructions        |
| [`@stackables/bridge-compiler`](https://www.npmjs.com/package/@stackables/bridge-compiler) | **The Compiler** — compiles BridgeDocument into optimized JavaScript |
| [`@stackables/bridge-graphql`](https://www.npmjs.com/package/@stackables/bridge-graphql)   | **The Adapter** — wires bridges into a GraphQL schema          |
| [`@stackables/bridge-stdlib`](https://www.npmjs.com/package/@stackables/bridge-stdlib)     | **The Standard Library** — httpCall, strings, arrays, and more |
npm package: @stackads/core
Description: StackAds Core SDK
Latest version: 0.0.2

# @stackads/core

> Framework-agnostic core SDK for [StackAds](https://github.com/stackads/stackads-sdk) — decentralized advertising powered by the Stacks blockchain.

## Install

```bash
npm install @stackads/core
# or
pnpm add @stackads/core
# or
yarn add @stackads/core
```

## Usage

```ts
import { hello } from '@stackads/core';

console.log(hello()); // "Hello from StackAds Core"
```

## API

### `hello()`

Returns a greeting string. This is the initial hello-world export — full SDK methods are coming in the next release.

```ts
hello(): string
```

## Coming Soon

- `initialize(config)` — set up your StackAds integration
- `loadAd()` — fetch an ad from the decentralized network
- `trackImpression(adId)` — record an impression on-chain
- `trackClick(adId)` — record a click on-chain

## License

MIT