tyfigo 0.0.0-stage → 0.0.1-next.8d309b3.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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2021 Parbez <imranbarbhuiya.fsd@gmail.com>
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 CHANGED
@@ -1,3 +1,35 @@
1
- # Temporary Holding Version
1
+ <div align="center">
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ # tyfigo
4
+
5
+ **Import YAML, TOML, JSON5, INI and .env files into TypeScript with full type inference.**
6
+
7
+ [![GitHub](https://img.shields.io/github/license/imranbarbhuiya/tyfigo)](https://github.com/imranbarbhuiya/tyfigo/blob/main/LICENSE)
8
+ [![npm](https://img.shields.io/npm/v/tyfigo?color=crimson&logo=npm&style=flat-square)](https://www.npmjs.com/package/tyfigo)
9
+
10
+ </div>
11
+
12
+ > [!WARNING]
13
+ > tyfigo is in early development and not usable yet.
14
+
15
+ ## Install
16
+
17
+ ```bash
18
+ npm i tyfigo
19
+ ```
20
+
21
+ ## Buy me some doughnuts
22
+
23
+ If you want to support me by donating, you can do so by using any of the following methods. Thank you very much in advance!
24
+
25
+ <a href="https://github.com/sponsors/imranbarbhuiya" target="_blank"><img src="https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86" alt="Buy Me A Coffee" height="41" width="174"></a>
26
+ <a href="https://www.buymeacoffee.com/parbez" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-orange.png" alt="Buy Me A Coffee" height="41" width="174"></a>
27
+ <a href='https://ko-fi.com/Y8Y1CBIJH' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://cdn.ko-fi.com/cdn/kofi4.png?v=3' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>
28
+
29
+ ## Contributors ✨
30
+
31
+ Thanks goes to these wonderful people:
32
+
33
+ <a href="https://github.com/imranbarbhuiya/tyfigo/graphs/contributors">
34
+ <img src="https://contrib.rocks/image?repo=imranbarbhuiya/tyfigo" />
35
+ </a>
@@ -0,0 +1,13 @@
1
+ import { Effect } from "effect";
2
+ declare const EmptyNameError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
3
+ readonly _tag: "EmptyNameError";
4
+ } & Readonly<A>;
5
+ export declare class EmptyNameError extends EmptyNameError_base {}
6
+ /**
7
+ * Greets someone by name.
8
+ *
9
+ * Fails with {@link EmptyNameError} when the name is blank
10
+ */
11
+ export declare const greet: (name: string) => Effect.Effect<string, EmptyNameError, never>;
12
+ export {};
13
+ //# sourceMappingURL=effect.d.mts.map
@@ -0,0 +1,16 @@
1
+ import { Data, Effect } from "effect";
2
+ // src/effect.ts
3
+ var EmptyNameError = class extends Data.TaggedError("EmptyNameError") {};
4
+ /**
5
+ * Greets someone by name.
6
+ *
7
+ * Fails with {@link EmptyNameError} when the name is blank
8
+ */
9
+ const greet = Effect.fn("greet")(function* (name) {
10
+ const trimmed = name.trim();
11
+ if (trimmed === "") return yield* new EmptyNameError();
12
+ return `Hello, ${trimmed}!`;
13
+ });
14
+ export { EmptyNameError, greet };
15
+
16
+ //# sourceMappingURL=effect.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"effect.mjs","names":[],"sources":["../src/effect.ts"],"sourcesContent":["import { Data, Effect } from 'effect';\n\nexport class EmptyNameError extends Data.TaggedError('EmptyNameError') {}\n\n/**\n * Greets someone by name.\n *\n * Fails with {@link EmptyNameError} when the name is blank\n */\nexport const greet = Effect.fn('greet')(function* (name: string) {\n\tconst trimmed = name.trim();\n\tif (trimmed === '') return yield* new EmptyNameError();\n\treturn `Hello, ${trimmed}!`;\n});\n"],"mappings":";;AAEA,IAAa,iBAAb,cAAoC,KAAK,YAAY,gBAAgB,CAAC,CAAC,CAAC;;;;;;AAOxE,MAAa,QAAQ,OAAO,GAAG,OAAO,CAAC,CAAC,WAAW,MAAc;CAChE,MAAM,UAAU,KAAK,KAAK;CAC1B,IAAI,YAAY,IAAI,OAAO,OAAO,IAAI,eAAe;CACrD,OAAO,UAAU,QAAQ;AAC1B,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { EmptyNameError } from "./effect.mjs";
2
+ /**
3
+ * Greets someone by name.
4
+ *
5
+ * @param name - The name to greet
6
+ * @returns The greeting, or rejects with {@link EmptyNameError} when the name is blank
7
+ */
8
+ export declare const greet: (name: string) => Promise<string>;
9
+ export { EmptyNameError };
10
+ //# sourceMappingURL=index.d.mts.map
package/dist/index.mjs ADDED
@@ -0,0 +1,13 @@
1
+ import { EmptyNameError, greet as greet$1 } from "./effect.mjs";
2
+ import { Effect } from "effect";
3
+ // src/index.ts
4
+ /**
5
+ * Greets someone by name.
6
+ *
7
+ * @param name - The name to greet
8
+ * @returns The greeting, or rejects with {@link EmptyNameError} when the name is blank
9
+ */
10
+ const greet = (name) => Effect.runPromise(greet$1(name));
11
+ export { EmptyNameError, greet };
12
+
13
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":["Greeter.greet"],"sources":["../src/index.ts"],"sourcesContent":["import { Effect } from 'effect';\n\nimport * as Greeter from './effect.ts';\n\nexport { EmptyNameError } from './effect.ts';\n\n/**\n * Greets someone by name.\n *\n * @param name - The name to greet\n * @returns The greeting, or rejects with {@link EmptyNameError} when the name is blank\n */\nexport const greet = (name: string): Promise<string> => Effect.runPromise(Greeter.greet(name));\n"],"mappings":";;;;;;;;;AAYA,MAAa,SAAS,SAAkC,OAAO,WAAWA,QAAc,IAAI,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,98 @@
1
1
  {
2
- "name": "tyfigo",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
2
+ "name": "tyfigo",
3
+ "version": "0.0.1-next.8d309b3.0",
4
+ "description": "Import YAML, TOML, JSON5, INI and .env files into TypeScript with full type inference",
5
+ "keywords": [
6
+ "config",
7
+ "content-mapper",
8
+ "dotenv",
9
+ "effect",
10
+ "ini",
11
+ "json5",
12
+ "toml",
13
+ "typescript",
14
+ "yaml"
15
+ ],
16
+ "homepage": "https://github.com/imranbarbhuiya/tyfigo#readme",
17
+ "bugs": {
18
+ "url": "https://github.com/imranbarbhuiya/tyfigo/issues"
19
+ },
20
+ "license": "MIT",
21
+ "author": "Parbez <imranbarbhuiya.fsd@gmail.com>",
22
+ "repository": {
23
+ "type": "git",
24
+ "url": "git+https://github.com/imranbarbhuiya/tyfigo.git"
25
+ },
26
+ "files": [
27
+ "dist"
28
+ ],
29
+ "type": "module",
30
+ "sideEffects": false,
31
+ "exports": {
32
+ ".": {
33
+ "types": "./dist/index.d.mts",
34
+ "import": "./dist/index.mjs"
35
+ },
36
+ "./effect": {
37
+ "types": "./dist/effect.d.mts",
38
+ "import": "./dist/effect.mjs"
39
+ }
40
+ },
41
+ "publishConfig": {
42
+ "access": "public"
43
+ },
44
+ "scripts": {
45
+ "build": "tsdown",
46
+ "typecheck": "tsc -p tsconfig.json",
47
+ "lint": "oxlint --fix .",
48
+ "lint:check": "oxlint .",
49
+ "format": "oxfmt",
50
+ "format:check": "oxfmt --check",
51
+ "test": "vitest run",
52
+ "test:watch": "vitest",
53
+ "update": "bun update --interactive",
54
+ "bump": "cliff-jumper",
55
+ "check-update": "cliff-jumper --dry-run",
56
+ "prepack": "bun run build",
57
+ "prepare": "husky .github/husky && effect-tsgo patch --typescript --oxlint"
58
+ },
59
+ "dependencies": {
60
+ "effect": "^4.0.6"
61
+ },
62
+ "devDependencies": {
63
+ "@commitlint/cli": "^21.2.4",
64
+ "@commitlint/config-conventional": "^21.2.4",
65
+ "@effect/tsgo": "^0.59.0",
66
+ "@effect/vitest": "^4.0.6",
67
+ "@favware/cliff-jumper": "^6.1.0",
68
+ "@imranbarbhuiya/oxc-config": "^0.4.1",
69
+ "@types/node": "^26.6.5",
70
+ "cz-conventional-changelog": "^3.3.0",
71
+ "husky": "^9.1.7",
72
+ "lint-staged": "^17.6.0",
73
+ "oxfmt": "^0.75.0",
74
+ "oxlint": "1.89.0",
75
+ "oxlint-tsgolint": "^7.0.2005",
76
+ "tsdown": "^0.23.2",
77
+ "typescript": "7.1.0-beta",
78
+ "vitest": "^5.0.5"
79
+ },
80
+ "lint-staged": {
81
+ "*": "oxfmt --no-error-on-unmatched-pattern",
82
+ "*.{js,mjs,cjs,ts,mts,cts}": "oxlint --fix"
83
+ },
84
+ "commitlint": {
85
+ "extends": [
86
+ "@commitlint/config-conventional"
87
+ ]
88
+ },
89
+ "config": {
90
+ "commitizen": {
91
+ "path": "./node_modules/cz-conventional-changelog"
92
+ }
93
+ },
94
+ "engines": {
95
+ "node": ">=24"
96
+ },
97
+ "packageManager": "bun@1.4.4"
98
+ }