@dragonmastery/tamer 0.1.0
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/LICENSE +75 -0
- package/README.md +50 -0
- package/dist/index.d.mts +80 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +1 -0
- package/package.json +48 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
TAMER EVALUATION LICENSE
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 DragonMastery. All rights reserved.
|
|
4
|
+
|
|
5
|
+
================================================================================
|
|
6
|
+
|
|
7
|
+
NOTICE: This software and associated documentation files (the "Software") are
|
|
8
|
+
proprietary to DragonMastery.
|
|
9
|
+
|
|
10
|
+
GRANT OF EVALUATION LICENSE:
|
|
11
|
+
|
|
12
|
+
DragonMastery grants you a limited, non-exclusive, non-transferable, revocable
|
|
13
|
+
license to:
|
|
14
|
+
|
|
15
|
+
1. EVALUATION USE: Download and use the Software for evaluation and testing
|
|
16
|
+
purposes in non-production environments only.
|
|
17
|
+
|
|
18
|
+
2. DEVELOPMENT USE: Use the Software in local development environments for
|
|
19
|
+
proof-of-concept and evaluation purposes only.
|
|
20
|
+
|
|
21
|
+
3. INSPECTION: View and study the source code for evaluation purposes only.
|
|
22
|
+
|
|
23
|
+
RESTRICTIONS:
|
|
24
|
+
|
|
25
|
+
Without a separate commercial license from DragonMastery, you may NOT:
|
|
26
|
+
|
|
27
|
+
1. Use the Software in any production environment or live application
|
|
28
|
+
2. Use the Software in any commercial capacity or revenue-generating service
|
|
29
|
+
3. Modify, adapt, or create derivative works based on the Software
|
|
30
|
+
4. Redistribute, sublicense, sell, rent, lease, or transfer the Software
|
|
31
|
+
5. Remove or alter any copyright, trademark, or proprietary notices
|
|
32
|
+
6. Use the Software to develop competing products or services
|
|
33
|
+
7. Provide access to the Software to third parties for their use
|
|
34
|
+
|
|
35
|
+
PRODUCTION & COMMERCIAL LICENSE:
|
|
36
|
+
|
|
37
|
+
To use this Software in production environments or for commercial purposes, you
|
|
38
|
+
MUST obtain a separate commercial license from DragonMastery.
|
|
39
|
+
|
|
40
|
+
Contact for licensing:
|
|
41
|
+
|
|
42
|
+
- Repository: https://github.com/DragonMastery/tamer
|
|
43
|
+
- Open a GitHub issue for licensing inquiries
|
|
44
|
+
|
|
45
|
+
TERMINATION:
|
|
46
|
+
|
|
47
|
+
This License is effective until terminated. Your rights under this License
|
|
48
|
+
terminate automatically without notice if you fail to comply with any term. Upon
|
|
49
|
+
termination, you must immediately cease all use and destroy all copies of the
|
|
50
|
+
Software.
|
|
51
|
+
|
|
52
|
+
DISCLAIMER OF WARRANTY:
|
|
53
|
+
|
|
54
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
55
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
56
|
+
FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT. DRAGONMASTERY MAKES NO WARRANTY
|
|
57
|
+
THAT THE SOFTWARE WILL BE ERROR-FREE OR UNINTERRUPTED.
|
|
58
|
+
|
|
59
|
+
LIMITATION OF LIABILITY:
|
|
60
|
+
|
|
61
|
+
IN NO EVENT SHALL DRAGONMASTERY BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
62
|
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
63
|
+
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
|
|
64
|
+
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
65
|
+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
|
66
|
+
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
|
67
|
+
OF SUCH DAMAGE.
|
|
68
|
+
|
|
69
|
+
ACKNOWLEDGMENT:
|
|
70
|
+
|
|
71
|
+
By downloading, installing, or using the Software, you acknowledge that you have
|
|
72
|
+
read this License, understand it, and agree to be bound by its terms and
|
|
73
|
+
conditions.
|
|
74
|
+
|
|
75
|
+
================================================================================
|
package/README.md
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# @dragonmastery/tamer
|
|
2
|
+
|
|
3
|
+
TypeScript types for Cloudflare Wrangler configuration. Generated from the official wrangler config schema. Supports Tamer and other CF CICD tooling.
|
|
4
|
+
|
|
5
|
+
> **Note:** This package provides types only. The full Tamer CLI (sync, apply, dev, deploy) is in development.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @dragonmastery/tamer
|
|
11
|
+
# or
|
|
12
|
+
bun add @dragonmastery/tamer
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Requires `wrangler` (peer dependency) and Node.js 22+.
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
import type {
|
|
21
|
+
WranglerConfig,
|
|
22
|
+
WranglerEnvironment,
|
|
23
|
+
WranglerD1Database,
|
|
24
|
+
WranglerR2Bucket,
|
|
25
|
+
WranglerKVNamespace,
|
|
26
|
+
} from "@dragonmastery/tamer";
|
|
27
|
+
|
|
28
|
+
const config: WranglerConfig = {
|
|
29
|
+
name: "my-worker",
|
|
30
|
+
main: "src/index.ts",
|
|
31
|
+
compatibility_date: "2025-01-01",
|
|
32
|
+
d1_databases: [
|
|
33
|
+
{ binding: "DB", database_id: "xxx" },
|
|
34
|
+
],
|
|
35
|
+
};
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Exports
|
|
39
|
+
|
|
40
|
+
| Type | Description |
|
|
41
|
+
| -------------------- | ------------------------------ |
|
|
42
|
+
| `WranglerConfig` | Full wrangler config (alias: `RawConfig`) |
|
|
43
|
+
| `WranglerEnvironment`| Environment block (alias: `RawEnvironment`) |
|
|
44
|
+
| `WranglerD1Database` | D1 binding entry |
|
|
45
|
+
| `WranglerR2Bucket` | R2 binding entry |
|
|
46
|
+
| `WranglerKVNamespace`| KV binding entry |
|
|
47
|
+
|
|
48
|
+
## License
|
|
49
|
+
|
|
50
|
+
TAMER EVALUATION LICENSE. See [LICENSE](LICENSE) for terms.
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
//#region src/generated/wrangler-types.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* TypeScript types for Cloudflare Wrangler configuration.
|
|
4
|
+
* Hand-written to match wrangler config-schema.json (workers-utils is no longer on npm).
|
|
5
|
+
*
|
|
6
|
+
* Generated from: node_modules/wrangler/config-schema.json
|
|
7
|
+
* See: https://developers.cloudflare.com/workers/wrangler/configuration/
|
|
8
|
+
*/
|
|
9
|
+
/** D1 database binding in wrangler config */
|
|
10
|
+
interface WranglerD1Database {
|
|
11
|
+
binding: string;
|
|
12
|
+
database_id?: string;
|
|
13
|
+
database_name?: string;
|
|
14
|
+
database_internal_env?: string;
|
|
15
|
+
migrations_dir?: string;
|
|
16
|
+
migrations_table?: string;
|
|
17
|
+
preview_database_id?: string;
|
|
18
|
+
}
|
|
19
|
+
/** R2 bucket binding in wrangler config */
|
|
20
|
+
interface WranglerR2Bucket {
|
|
21
|
+
binding: string;
|
|
22
|
+
bucket_name?: string;
|
|
23
|
+
jurisdiction?: string;
|
|
24
|
+
}
|
|
25
|
+
/** KV namespace binding in wrangler config */
|
|
26
|
+
interface WranglerKVNamespace {
|
|
27
|
+
binding: string;
|
|
28
|
+
id?: string;
|
|
29
|
+
preview_id?: string;
|
|
30
|
+
}
|
|
31
|
+
/** Raw environment block (default or named env in wrangler config) */
|
|
32
|
+
interface RawEnvironment {
|
|
33
|
+
name?: string;
|
|
34
|
+
account_id?: string;
|
|
35
|
+
compatibility_date?: string;
|
|
36
|
+
compatibility_flags?: string[];
|
|
37
|
+
d1_databases?: WranglerD1Database[];
|
|
38
|
+
r2_buckets?: WranglerR2Bucket[];
|
|
39
|
+
kv_namespaces?: WranglerKVNamespace[];
|
|
40
|
+
vars?: Record<string, string>;
|
|
41
|
+
routes?: Array<{
|
|
42
|
+
pattern: string;
|
|
43
|
+
zone_name?: string;
|
|
44
|
+
custom_domain?: boolean;
|
|
45
|
+
}>;
|
|
46
|
+
route?: string;
|
|
47
|
+
[key: string]: unknown;
|
|
48
|
+
}
|
|
49
|
+
/** Full wrangler config (root of wrangler.json / wrangler.toml) */
|
|
50
|
+
interface RawConfig {
|
|
51
|
+
$schema?: string;
|
|
52
|
+
name?: string;
|
|
53
|
+
main?: string;
|
|
54
|
+
account_id?: string;
|
|
55
|
+
compatibility_date?: string;
|
|
56
|
+
compatibility_flags?: string[];
|
|
57
|
+
d1_databases?: WranglerD1Database[];
|
|
58
|
+
r2_buckets?: WranglerR2Bucket[];
|
|
59
|
+
kv_namespaces?: WranglerKVNamespace[];
|
|
60
|
+
vars?: Record<string, string>;
|
|
61
|
+
env?: Record<string, RawEnvironment>;
|
|
62
|
+
routes?: Array<{
|
|
63
|
+
pattern: string;
|
|
64
|
+
zone_name?: string;
|
|
65
|
+
custom_domain?: boolean;
|
|
66
|
+
}>;
|
|
67
|
+
route?: string;
|
|
68
|
+
assets?: {
|
|
69
|
+
binding?: string;
|
|
70
|
+
directory: string;
|
|
71
|
+
};
|
|
72
|
+
[key: string]: unknown;
|
|
73
|
+
}
|
|
74
|
+
/** Alias for RawConfig (user-friendly name) */
|
|
75
|
+
type WranglerConfig = RawConfig;
|
|
76
|
+
/** Alias for RawEnvironment */
|
|
77
|
+
type WranglerEnvironment = RawEnvironment;
|
|
78
|
+
//#endregion
|
|
79
|
+
export { type RawConfig, type RawEnvironment, type WranglerConfig, type WranglerD1Database, type WranglerEnvironment, type WranglerKVNamespace, type WranglerR2Bucket };
|
|
80
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/generated/wrangler-types.ts"],"sourcesContent":[],"mappings":";;AASA;AAWA;AAOA;AAOA;;;;AAQS,UAjCQ,kBAAA,CAiCR;EACE,OAAA,EAAA,MAAA;EAAK,WAAA,CAAA,EAAA,MAAA;EAMC,aAAS,CAAA,EAAA,MAAA;EAOT,qBAAA,CAAA,EAAA,MAAA;EACF,cAAA,CAAA,EAAA,MAAA;EACG,gBAAA,CAAA,EAAA,MAAA;EACT,mBAAA,CAAA,EAAA,MAAA;;;AAEE,UAzCM,gBAAA,CAyCN;EAAK,OAAA,EAAA,MAAA;EAOJ,WAAA,CAAA,EAAA,MAAc;EAGd,YAAA,CAAA,EAAA,MAAA;;;UA5CK,mBAAA;;;;;;UAOA,cAAA;;;;;iBAKA;eACF;kBACG;SACT;WACE;;;;;;;;;UAMM,SAAA;;;;;;;iBAOA;eACF;kBACG;SACT;QACD,eAAe;WACZ;;;;;;;;;;;;;KAOC,cAAA,GAAiB;;KAGjB,mBAAA,GAAsB"}
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
package/package.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@dragonmastery/tamer",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Tamer — Cloudflare Workers CICD tool. TypeScript types for Wrangler config (types-only for now; full CLI coming).",
|
|
5
|
+
"author": "DragonMastery",
|
|
6
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"main": "./dist/index.mjs",
|
|
9
|
+
"types": "./dist/index.d.mts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"development": "./src/index.ts",
|
|
13
|
+
"types": "./dist/index.d.mts",
|
|
14
|
+
"import": "./dist/index.mjs",
|
|
15
|
+
"default": "./dist/index.mjs"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"files": ["dist", "README.md"],
|
|
19
|
+
"publishConfig": {
|
|
20
|
+
"access": "public"
|
|
21
|
+
},
|
|
22
|
+
"keywords": ["cloudflare", "wrangler", "workers", "typescript", "types"],
|
|
23
|
+
"scripts": {
|
|
24
|
+
"npm:build": "tsdown",
|
|
25
|
+
"build": "bun run npm:build",
|
|
26
|
+
"dev": "tsc --watch",
|
|
27
|
+
"test": "bun test tests/",
|
|
28
|
+
"typecheck": "tsc -p tsconfig.typecheck.json --noEmit",
|
|
29
|
+
"prepublishOnly": "bun run npm:build"
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"@types/bun": "1.3.10",
|
|
33
|
+
"tsdown": "0.18.1",
|
|
34
|
+
"typescript": "5.9.3",
|
|
35
|
+
"wrangler": "4.72.0",
|
|
36
|
+
"zod": "4.3.6"
|
|
37
|
+
},
|
|
38
|
+
"peerDependencies": {
|
|
39
|
+
"wrangler": ">=4.0.0"
|
|
40
|
+
},
|
|
41
|
+
"repository": {
|
|
42
|
+
"type": "git",
|
|
43
|
+
"url": "https://github.com/DragonMastery/tamer.git"
|
|
44
|
+
},
|
|
45
|
+
"engines": {
|
|
46
|
+
"node": ">=22"
|
|
47
|
+
}
|
|
48
|
+
}
|