kurotako 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/CHANGELOG.md +13 -0
- package/LICENSE +21 -0
- package/README.md +53 -0
- package/dist/bin/tako.d.ts +1 -0
- package/dist/bin/tako.js +13 -0
- package/dist/bin/tako.js.map +1 -0
- package/dist/index.cjs +35 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/package.json +57 -0
package/CHANGELOG.md
ADDED
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Marmotz
|
|
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,53 @@
|
|
|
1
|
+
# kurotako
|
|
2
|
+
|
|
3
|
+
One install for the [`tako`](https://kurotako.marmotz.dev/docs/reference/cli) CLI and the
|
|
4
|
+
`defineConfig` helper your `tako.config.ts` imports.
|
|
5
|
+
|
|
6
|
+
kurotako is a modular framework for synchronizing TypeScript schemas from the data model
|
|
7
|
+
down to frontend forms, through a validation layer: one `parser` input, N `generator`
|
|
8
|
+
outputs, wired by a dependency graph.
|
|
9
|
+
|
|
10
|
+
## Install
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm install -D kurotako
|
|
14
|
+
# bun add -d kurotako
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
`tako` needs **Node.js >= 24** and runs unmodified on Node and Bun.
|
|
18
|
+
|
|
19
|
+
## Quickstart
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npm install -D @kurotako/parser-prisma @kurotako/gen-zod @kurotako/gen-angular
|
|
23
|
+
npx tako init # writes a commented tako.config.ts
|
|
24
|
+
npx tako generate
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
```ts title="tako.config.ts"
|
|
28
|
+
import { defineConfig } from 'kurotako';
|
|
29
|
+
import { prismaParser } from '@kurotako/parser-prisma';
|
|
30
|
+
import { zodGenerator } from '@kurotako/gen-zod';
|
|
31
|
+
import { angularGenerator } from '@kurotako/gen-angular';
|
|
32
|
+
|
|
33
|
+
export default defineConfig({
|
|
34
|
+
sources: {
|
|
35
|
+
db: { use: prismaParser, options: { schema: './prisma/schema.prisma' } },
|
|
36
|
+
},
|
|
37
|
+
generators: [{ use: zodGenerator }, { use: angularGenerator }],
|
|
38
|
+
outputs: [{ dir: './generated/kurotako' }],
|
|
39
|
+
});
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
`kurotako` is an umbrella over `@kurotako/cli` (the binary) and `@kurotako/config`
|
|
43
|
+
(`defineConfig`); pick a parser and the generators you need on top.
|
|
44
|
+
|
|
45
|
+
## Documentation
|
|
46
|
+
|
|
47
|
+
Full guide, CLI and config reference: [https://kurotako.marmotz.dev/](https://kurotako.marmotz.dev/).
|
|
48
|
+
|
|
49
|
+
`0.x`: the public API may change between minor versions.
|
|
50
|
+
|
|
51
|
+
## License
|
|
52
|
+
|
|
53
|
+
[MIT](https://github.com/marmotz/kurotako/blob/develop/LICENSE)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
package/dist/bin/tako.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// src/bin/tako.ts
|
|
4
|
+
import { runCli } from "@kurotako/cli";
|
|
5
|
+
var argv = process.argv.slice(2);
|
|
6
|
+
if (argv[0] === "--version" || argv[0] === "-v") {
|
|
7
|
+
process.stdout.write(`${"0.1.0"}
|
|
8
|
+
`);
|
|
9
|
+
process.exitCode = 0;
|
|
10
|
+
} else {
|
|
11
|
+
await runCli(argv);
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=tako.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/bin/tako.ts"],"sourcesContent":["#!/usr/bin/env node\n/**\n * `kurotako`'s `tako` entry. Handles `--version` / `-v` itself (so it reports\n * the version the user installed, not `@kurotako/cli`'s), then delegates\n * everything else to the CLI.\n */\nimport { runCli } from '@kurotako/cli';\n\ndeclare const __TAKO_VERSION__: string;\n\nconst argv = process.argv.slice(2);\nif (argv[0] === '--version' || argv[0] === '-v') {\n process.stdout.write(`${__TAKO_VERSION__}\\n`);\n process.exitCode = 0;\n} else {\n await runCli(argv);\n}\n"],"mappings":";;;AAMA,SAAS,cAAc;AAIvB,IAAM,OAAO,QAAQ,KAAK,MAAM,CAAC;AACjC,IAAI,KAAK,CAAC,MAAM,eAAe,KAAK,CAAC,MAAM,MAAM;AAC/C,UAAQ,OAAO,MAAM,GAAG,OAAgB;AAAA,CAAI;AAC5C,UAAQ,WAAW;AACrB,OAAO;AACL,QAAM,OAAO,IAAI;AACnB;","names":[]}
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/index.ts
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
|
+
defineConfig: () => import_config.defineConfig,
|
|
24
|
+
defineGenerator: () => import_config.defineGenerator,
|
|
25
|
+
defineParser: () => import_config.defineParser
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(index_exports);
|
|
28
|
+
var import_config = require("@kurotako/config");
|
|
29
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
30
|
+
0 && (module.exports = {
|
|
31
|
+
defineConfig,
|
|
32
|
+
defineGenerator,
|
|
33
|
+
defineParser
|
|
34
|
+
});
|
|
35
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * `kurotako` — the umbrella package. Install this one name to get the `tako`\n * binary and the `defineConfig` helper your `tako.config.ts` imports.\n *\n * Re-exports the config authoring surface of `@kurotako/config`. The CLI's\n * programmatic API (`runCli`, reporters) stays in `@kurotako/cli`; loader\n * internals (`loadConfig`, `TakoConfigSchema`, error classes, `CONFIG_TEMPLATE`)\n * stay in `@kurotako/config` for consumers that depend on it directly.\n *\n * See `backlog/features/meta-package/technical.md`.\n */\n\nexport type * from '@kurotako/config';\nexport { defineConfig, defineGenerator, defineParser } from '@kurotako/config';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAaA,oBAA4D;","names":[]}
|
package/dist/index.d.cts
ADDED
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * `kurotako` — the umbrella package. Install this one name to get the `tako`\n * binary and the `defineConfig` helper your `tako.config.ts` imports.\n *\n * Re-exports the config authoring surface of `@kurotako/config`. The CLI's\n * programmatic API (`runCli`, reporters) stays in `@kurotako/cli`; loader\n * internals (`loadConfig`, `TakoConfigSchema`, error classes, `CONFIG_TEMPLATE`)\n * stay in `@kurotako/config` for consumers that depend on it directly.\n *\n * See `backlog/features/meta-package/technical.md`.\n */\n\nexport type * from '@kurotako/config';\nexport { defineConfig, defineGenerator, defineParser } from '@kurotako/config';\n"],"mappings":";AAaA,SAAS,cAAc,iBAAiB,oBAAoB;","names":[]}
|
package/package.json
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "kurotako",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "kurotako meta-package: installs the tako CLI and re-exports defineConfig under a single name.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"kurotako",
|
|
7
|
+
"codegen",
|
|
8
|
+
"typescript",
|
|
9
|
+
"cli",
|
|
10
|
+
"tako",
|
|
11
|
+
"schema"
|
|
12
|
+
],
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"author": "Marmotz",
|
|
15
|
+
"homepage": "https://kurotako.marmotz.dev/",
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "https://github.com/marmotz/kurotako.git",
|
|
19
|
+
"directory": "packages/kurotako"
|
|
20
|
+
},
|
|
21
|
+
"bugs": "https://github.com/marmotz/kurotako/issues",
|
|
22
|
+
"type": "module",
|
|
23
|
+
"exports": {
|
|
24
|
+
".": {
|
|
25
|
+
"types": "./dist/index.d.ts",
|
|
26
|
+
"import": "./dist/index.js",
|
|
27
|
+
"require": "./dist/index.cjs"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"main": "./dist/index.cjs",
|
|
31
|
+
"module": "./dist/index.js",
|
|
32
|
+
"types": "./dist/index.d.ts",
|
|
33
|
+
"sideEffects": false,
|
|
34
|
+
"files": [
|
|
35
|
+
"dist",
|
|
36
|
+
"CHANGELOG.md",
|
|
37
|
+
"LICENSE"
|
|
38
|
+
],
|
|
39
|
+
"engines": {
|
|
40
|
+
"node": ">=24"
|
|
41
|
+
},
|
|
42
|
+
"scripts": {
|
|
43
|
+
"build": "tsup",
|
|
44
|
+
"typecheck": "tsc -b",
|
|
45
|
+
"test": "vitest run"
|
|
46
|
+
},
|
|
47
|
+
"publishConfig": {
|
|
48
|
+
"access": "public"
|
|
49
|
+
},
|
|
50
|
+
"bin": {
|
|
51
|
+
"tako": "./dist/bin/tako.js"
|
|
52
|
+
},
|
|
53
|
+
"dependencies": {
|
|
54
|
+
"@kurotako/cli": "^0.1.0",
|
|
55
|
+
"@kurotako/config": "^0.1.0"
|
|
56
|
+
}
|
|
57
|
+
}
|