@digital-alchemy/symbols 26.6.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +41 -0
- package/LICENSE +21 -0
- package/README.md +47 -0
- package/dist/index.d.mts +47 -0
- package/dist/index.mjs +12 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +78 -0
package/CLAUDE.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# CLAUDE.md — @digital-alchemy/symbols
|
|
2
|
+
|
|
3
|
+
## 1. What this is
|
|
4
|
+
|
|
5
|
+
`@digital-alchemy/symbols` is the declaration-merge interface registry for
|
|
6
|
+
`@digital-alchemy/core`. It is **types-only** and **zero-dependency**: the entire
|
|
7
|
+
surface is `src/index.mts`, which exports a set of interfaces. Each interface is a
|
|
8
|
+
stable identity that downstream libraries augment via TypeScript declaration
|
|
9
|
+
merging. It is intentionally minimal.
|
|
10
|
+
|
|
11
|
+
The build emits `dist/index.d.mts` (the type surface consumers resolve) and
|
|
12
|
+
`dist/index.mjs` (an effectively empty runtime module).
|
|
13
|
+
|
|
14
|
+
## 2. Augment via core, not this package
|
|
15
|
+
|
|
16
|
+
Consumers augment these interfaces through `declare module "@digital-alchemy/core"`
|
|
17
|
+
— `core` re-exports the symbols so every merge lands on one shared identity:
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
declare module "@digital-alchemy/core" {
|
|
21
|
+
interface LoadedModules {
|
|
22
|
+
utils: typeof LIB_UTILS;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## 3. Tooling
|
|
28
|
+
|
|
29
|
+
House style matches `@digital-alchemy/core`: yarn 4.16.0 (`nodeLinker:
|
|
30
|
+
node-modules`), Node `>=20`, `tsc` with `module/moduleResolution` nodenext-class
|
|
31
|
+
(`ESNext` / `Bundler`), strict-ish compiler options, ESLint flat config, prettier
|
|
32
|
+
(`printWidth: 100`, double quotes, trailing commas), cspell. Versioning follows
|
|
33
|
+
core's CalVer auto-bump (`bump-version.yml`) on release.
|
|
34
|
+
|
|
35
|
+
- `yarn build` — `rm -rf dist/` then `tsc -p tsconfig.lib.json` (emits both
|
|
36
|
+
`.d.mts` and `.mjs`).
|
|
37
|
+
- `yarn lint` — `eslint src`.
|
|
38
|
+
- `yarn type-check` — `tsc -p tsconfig.json --noEmit`.
|
|
39
|
+
|
|
40
|
+
Each script appends `&& echo "✓ <scriptname> passed"` so silent tools print a
|
|
41
|
+
visible success line on exit 0.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021 zoe-codez
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
[](https://www.npmjs.com/package/@digital-alchemy/symbols)
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
<div align="center">
|
|
5
|
+
|
|
6
|
+

|
|
7
|
+
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
## Install
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
yarn add -D @digital-alchemy/symbols
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## What it is
|
|
17
|
+
|
|
18
|
+
`@digital-alchemy/symbols` is the declaration-merge interface registry for
|
|
19
|
+
[`@digital-alchemy/core`](https://github.com/Digital-Alchemy-TS/core). It is a
|
|
20
|
+
types-only, zero-dependency package that ships a set of TypeScript interfaces —
|
|
21
|
+
`LoadedModules`, `LoadedRollups`, `AsyncLogData`, `AsyncLocalData`, `IsIt`,
|
|
22
|
+
`DeclaredEnvironments`, `ConfigLoaderSource`, `ReplacementLogger`,
|
|
23
|
+
`AbstractConfig`, and `BaseConfig`. These are the stable identities that
|
|
24
|
+
downstream `@digital-alchemy` libraries augment to wire themselves into `core` at
|
|
25
|
+
the type level. It is intentionally minimal.
|
|
26
|
+
|
|
27
|
+
## Augment `@digital-alchemy/core`, not this package
|
|
28
|
+
|
|
29
|
+
You augment these interfaces through `@digital-alchemy/core`, which re-exports
|
|
30
|
+
them so every merge lands on a single shared identity:
|
|
31
|
+
|
|
32
|
+
```typescript
|
|
33
|
+
export const LIB_UTILS = CreateLibrary({
|
|
34
|
+
name: "utils",
|
|
35
|
+
services: { fetch: FetchUtils },
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
declare module "@digital-alchemy/core" {
|
|
39
|
+
interface LoadedModules {
|
|
40
|
+
utils: typeof LIB_UTILS;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Questions / Issues?
|
|
46
|
+
|
|
47
|
+
[](https://discord.gg/JkZ35Gv97Y)
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@digital-alchemy/symbols` — the declaration-merge interface registry for
|
|
3
|
+
* `@digital-alchemy/core`.
|
|
4
|
+
*
|
|
5
|
+
* Each export is a stable interface identity that downstream libraries augment
|
|
6
|
+
* via `declare module "@digital-alchemy/core"` (core re-exports these symbols, so
|
|
7
|
+
* the merges land on a single shared identity). It is intentionally minimal.
|
|
8
|
+
*
|
|
9
|
+
* @packageDocumentation
|
|
10
|
+
*/
|
|
11
|
+
/** Registry of modules loaded into a running application; augment via `@digital-alchemy/core`. */
|
|
12
|
+
export interface LoadedModules {
|
|
13
|
+
}
|
|
14
|
+
/** Registry of rollup groupings exposed by loaded modules; augment via `@digital-alchemy/core`. */
|
|
15
|
+
export interface LoadedRollups {
|
|
16
|
+
}
|
|
17
|
+
/** Per-context async log data merged into every log line; augment via `@digital-alchemy/core`. */
|
|
18
|
+
export interface AsyncLogData {
|
|
19
|
+
duration?: () => number;
|
|
20
|
+
}
|
|
21
|
+
/** Per-context async-local storage payload; augment via `@digital-alchemy/core`. */
|
|
22
|
+
export interface AsyncLocalData {
|
|
23
|
+
}
|
|
24
|
+
/** The type-guard / predicate surface (`is`); augment via `@digital-alchemy/core`. */
|
|
25
|
+
export interface IsIt {
|
|
26
|
+
}
|
|
27
|
+
/** Set of declared runtime environments; augment via `@digital-alchemy/core`. */
|
|
28
|
+
export interface DeclaredEnvironments {
|
|
29
|
+
prod: true;
|
|
30
|
+
test: true;
|
|
31
|
+
local: true;
|
|
32
|
+
}
|
|
33
|
+
/** Set of config-loader source channels; augment via `@digital-alchemy/core`. */
|
|
34
|
+
export interface ConfigLoaderSource {
|
|
35
|
+
argv: true;
|
|
36
|
+
env: true;
|
|
37
|
+
file: true;
|
|
38
|
+
}
|
|
39
|
+
/** The replacement-logger surface; augment via `@digital-alchemy/core`. */
|
|
40
|
+
export interface ReplacementLogger {
|
|
41
|
+
}
|
|
42
|
+
/** The global config hierarchy; augment via `@digital-alchemy/core`. */
|
|
43
|
+
export interface AbstractConfig {
|
|
44
|
+
}
|
|
45
|
+
/** The base config block shared by every module; augment via `@digital-alchemy/core`. */
|
|
46
|
+
export interface BaseConfig {
|
|
47
|
+
}
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@digital-alchemy/symbols` — the declaration-merge interface registry for
|
|
3
|
+
* `@digital-alchemy/core`.
|
|
4
|
+
*
|
|
5
|
+
* Each export is a stable interface identity that downstream libraries augment
|
|
6
|
+
* via `declare module "@digital-alchemy/core"` (core re-exports these symbols, so
|
|
7
|
+
* the merges land on a single shared identity). It is intentionally minimal.
|
|
8
|
+
*
|
|
9
|
+
* @packageDocumentation
|
|
10
|
+
*/
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/index.mts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG"}
|
package/package.json
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "module",
|
|
3
|
+
"name": "@digital-alchemy/symbols",
|
|
4
|
+
"description": "Declaration-merge interface registry for @digital-alchemy/core — types-only, zero-dependency",
|
|
5
|
+
"repository": {
|
|
6
|
+
"url": "git+https://github.com/Digital-Alchemy-TS/symbols"
|
|
7
|
+
},
|
|
8
|
+
"version": "26.6.20",
|
|
9
|
+
"author": {
|
|
10
|
+
"url": "https://github.com/zoe-codez",
|
|
11
|
+
"name": "Zoe Codez"
|
|
12
|
+
},
|
|
13
|
+
"types": "dist/index.d.mts",
|
|
14
|
+
"homepage": "https://docs.digital-alchemy.app",
|
|
15
|
+
"scripts": {
|
|
16
|
+
"build": "rm -rf dist/; tsc -p tsconfig.lib.json && echo \"✓ build passed\"",
|
|
17
|
+
"lint": "eslint src && echo \"✓ lint passed\"",
|
|
18
|
+
"type-check": "tsc -p tsconfig.json --noEmit && echo \"✓ type-check passed\""
|
|
19
|
+
},
|
|
20
|
+
"bugs": {
|
|
21
|
+
"email": "bugs@digital-alchemy.app",
|
|
22
|
+
"url": "https://github.com/Digital-Alchemy-TS/symbols/issues/new/choose"
|
|
23
|
+
},
|
|
24
|
+
"keywords": [
|
|
25
|
+
"nodejs",
|
|
26
|
+
"typescript",
|
|
27
|
+
"types",
|
|
28
|
+
"declaration-merging",
|
|
29
|
+
"digital-alchemy"
|
|
30
|
+
],
|
|
31
|
+
"funding": [
|
|
32
|
+
{
|
|
33
|
+
"url": "https://github.com/sponsors/zoe-codez",
|
|
34
|
+
"type": "GitHub"
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
"exports": {
|
|
38
|
+
".": {
|
|
39
|
+
"types": "./dist/index.d.mts",
|
|
40
|
+
"import": "./dist/index.mjs"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"files": [
|
|
44
|
+
"dist/**/*",
|
|
45
|
+
"CLAUDE.md"
|
|
46
|
+
],
|
|
47
|
+
"publishConfig": {
|
|
48
|
+
"access": "public"
|
|
49
|
+
},
|
|
50
|
+
"engines": {
|
|
51
|
+
"node": ">=20"
|
|
52
|
+
},
|
|
53
|
+
"devDependencies": {
|
|
54
|
+
"@cspell/eslint-plugin": "^10.0.1",
|
|
55
|
+
"@eslint/compat": "^2.1.0",
|
|
56
|
+
"@eslint/eslintrc": "^3.3.5",
|
|
57
|
+
"@eslint/js": "^10.0.1",
|
|
58
|
+
"@types/node": "^25.9.3",
|
|
59
|
+
"@typescript-eslint/eslint-plugin": "8.61.0",
|
|
60
|
+
"@typescript-eslint/parser": "8.61.0",
|
|
61
|
+
"eslint": "10.5.0",
|
|
62
|
+
"eslint-config-prettier": "10.1.8",
|
|
63
|
+
"eslint-plugin-import": "^2.32.0",
|
|
64
|
+
"eslint-plugin-jsonc": "^3.2.0",
|
|
65
|
+
"eslint-plugin-no-unsanitized": "^4.1.5",
|
|
66
|
+
"eslint-plugin-prettier": "^5.5.6",
|
|
67
|
+
"eslint-plugin-security": "^4.0.1",
|
|
68
|
+
"eslint-plugin-simple-import-sort": "^13.0.0",
|
|
69
|
+
"eslint-plugin-sonarjs": "^4.0.3",
|
|
70
|
+
"eslint-plugin-sort-keys-fix": "^1.1.2",
|
|
71
|
+
"eslint-plugin-unicorn": "^65.0.1",
|
|
72
|
+
"globals": "^17.6.0",
|
|
73
|
+
"prettier": "^3.8.4",
|
|
74
|
+
"tslib": "^2.8.1",
|
|
75
|
+
"typescript": "^6.0.3"
|
|
76
|
+
},
|
|
77
|
+
"packageManager": "yarn@4.16.0"
|
|
78
|
+
}
|