distopia 0.2.0 → 0.3.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/dist/index.cjs ADDED
@@ -0,0 +1,56 @@
1
+ /* @ts-self-types="./index.d.mts" */
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ let oxfmt = require("oxfmt");
4
+ let oxlint = require("oxlint");
5
+ //#region package.json
6
+ var version = "0.3.0";
7
+ //#endregion
8
+ //#region ../template/src/oxfmt.ts
9
+ const config = (0, oxfmt.defineConfig)({
10
+ printWidth: 100,
11
+ semi: true,
12
+ useTabs: false,
13
+ tabWidth: 2,
14
+ singleQuote: false,
15
+ trailingComma: "all",
16
+ sortImports: true,
17
+ ignorePatterns: ["*.auto.ts", "dist/**"]
18
+ });
19
+ //#endregion
20
+ //#region ../template/src/oxlint.ts
21
+ const config$1 = (0, oxlint.defineConfig)({
22
+ plugins: [
23
+ "typescript",
24
+ "unicorn",
25
+ "oxc"
26
+ ],
27
+ categories: { correctness: "error" },
28
+ rules: {},
29
+ env: { builtin: true },
30
+ ignorePatterns: ["*.auto.ts", "dist/**"]
31
+ });
32
+ //#endregion
33
+ //#region ../../src/infrastructure/http/src/safefetch.ts
34
+ async function safeFetch(input, init) {
35
+ return await fetch(input, init);
36
+ }
37
+ //#endregion
38
+ //#region ../../src/infrastructure/http/src/safeurl.ts
39
+ function safeUrl(strings, ...values) {
40
+ let result = "";
41
+ for (const [index, str] of strings.entries()) {
42
+ result += str;
43
+ const value = values[index];
44
+ if (value !== void 0) result += encodeURIComponent(value);
45
+ }
46
+ return result;
47
+ }
48
+ //#endregion
49
+ //#region src/index.ts
50
+ const DISTOPIA_VERSION = version;
51
+ //#endregion
52
+ exports.DISTOPIA_VERSION = DISTOPIA_VERSION;
53
+ exports.oxfmtCfg = config;
54
+ exports.oxlintCfg = config$1;
55
+ exports.safeFetch = safeFetch;
56
+ exports.safeUrl = safeUrl;
@@ -0,0 +1,40 @@
1
+
2
+ //#region ../template/src/oxfmt.d.ts
3
+ declare const config: {
4
+ printWidth: number;
5
+ semi: true;
6
+ useTabs: false;
7
+ tabWidth: number;
8
+ singleQuote: false;
9
+ trailingComma: "all";
10
+ sortImports: true;
11
+ ignorePatterns: string[];
12
+ };
13
+ //#endregion
14
+ //#region ../template/src/oxlint.d.ts
15
+ declare const config$1: {
16
+ plugins: ("unicorn" | "typescript" | "oxc")[];
17
+ categories: {
18
+ correctness: "error";
19
+ };
20
+ rules: {};
21
+ env: {
22
+ builtin: true;
23
+ };
24
+ ignorePatterns: string[];
25
+ };
26
+ //#endregion
27
+ //#region ../../src/infrastructure/http/src/safeurl.d.ts
28
+ type Branded<T, Brand> = T & {
29
+ readonly __brand: Brand;
30
+ };
31
+ type SafeUrl = Branded<string, "distopiaSafeUrl">;
32
+ declare function safeUrl(strings: TemplateStringsArray, ...values: (string | number)[]): SafeUrl;
33
+ //#endregion
34
+ //#region ../../src/infrastructure/http/src/safefetch.d.ts
35
+ declare function safeFetch(input: SafeUrl, init?: RequestInit): Promise<Response>;
36
+ //#endregion
37
+ //#region src/index.d.ts
38
+ declare const DISTOPIA_VERSION: string;
39
+ //#endregion
40
+ export { type Branded, DISTOPIA_VERSION, type SafeUrl, config as oxfmtCfg, config$1 as oxlintCfg, safeFetch, safeUrl };
@@ -0,0 +1,40 @@
1
+
2
+ //#region ../template/src/oxfmt.d.ts
3
+ declare const config: {
4
+ printWidth: number;
5
+ semi: true;
6
+ useTabs: false;
7
+ tabWidth: number;
8
+ singleQuote: false;
9
+ trailingComma: "all";
10
+ sortImports: true;
11
+ ignorePatterns: string[];
12
+ };
13
+ //#endregion
14
+ //#region ../template/src/oxlint.d.ts
15
+ declare const config$1: {
16
+ plugins: ("unicorn" | "typescript" | "oxc")[];
17
+ categories: {
18
+ correctness: "error";
19
+ };
20
+ rules: {};
21
+ env: {
22
+ builtin: true;
23
+ };
24
+ ignorePatterns: string[];
25
+ };
26
+ //#endregion
27
+ //#region ../../src/infrastructure/http/src/safeurl.d.ts
28
+ type Branded<T, Brand> = T & {
29
+ readonly __brand: Brand;
30
+ };
31
+ type SafeUrl = Branded<string, "distopiaSafeUrl">;
32
+ declare function safeUrl(strings: TemplateStringsArray, ...values: (string | number)[]): SafeUrl;
33
+ //#endregion
34
+ //#region ../../src/infrastructure/http/src/safefetch.d.ts
35
+ declare function safeFetch(input: SafeUrl, init?: RequestInit): Promise<Response>;
36
+ //#endregion
37
+ //#region src/index.d.ts
38
+ declare const DISTOPIA_VERSION: string;
39
+ //#endregion
40
+ export { type Branded, DISTOPIA_VERSION, type SafeUrl, config as oxfmtCfg, config$1 as oxlintCfg, safeFetch, safeUrl };
package/dist/index.mjs ADDED
@@ -0,0 +1,51 @@
1
+ /* @ts-self-types="./index.d.mts" */
2
+ import { defineConfig } from "oxfmt";
3
+ import { defineConfig as defineConfig$1 } from "oxlint";
4
+ //#region package.json
5
+ var version = "0.3.0";
6
+ //#endregion
7
+ //#region ../template/src/oxfmt.ts
8
+ const config = defineConfig({
9
+ printWidth: 100,
10
+ semi: true,
11
+ useTabs: false,
12
+ tabWidth: 2,
13
+ singleQuote: false,
14
+ trailingComma: "all",
15
+ sortImports: true,
16
+ ignorePatterns: ["*.auto.ts", "dist/**"]
17
+ });
18
+ //#endregion
19
+ //#region ../template/src/oxlint.ts
20
+ const config$1 = defineConfig$1({
21
+ plugins: [
22
+ "typescript",
23
+ "unicorn",
24
+ "oxc"
25
+ ],
26
+ categories: { correctness: "error" },
27
+ rules: {},
28
+ env: { builtin: true },
29
+ ignorePatterns: ["*.auto.ts", "dist/**"]
30
+ });
31
+ //#endregion
32
+ //#region ../../src/infrastructure/http/src/safefetch.ts
33
+ async function safeFetch(input, init) {
34
+ return await fetch(input, init);
35
+ }
36
+ //#endregion
37
+ //#region ../../src/infrastructure/http/src/safeurl.ts
38
+ function safeUrl(strings, ...values) {
39
+ let result = "";
40
+ for (const [index, str] of strings.entries()) {
41
+ result += str;
42
+ const value = values[index];
43
+ if (value !== void 0) result += encodeURIComponent(value);
44
+ }
45
+ return result;
46
+ }
47
+ //#endregion
48
+ //#region src/index.ts
49
+ const DISTOPIA_VERSION = version;
50
+ //#endregion
51
+ export { DISTOPIA_VERSION, config as oxfmtCfg, config$1 as oxlintCfg, safeFetch, safeUrl };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "distopia",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Library for Distopia.",
5
5
  "keywords": [
6
6
  "distopia",
@@ -38,9 +38,9 @@
38
38
  "prepublishOnly": "bun run build"
39
39
  },
40
40
  "dependencies": {
41
- "@types/node": "24",
41
+ "@types/node": "24.13.2",
42
42
  "jsr": "0.14.3",
43
- "oxfmt": "0.45.0",
43
+ "oxfmt": "0.54.0",
44
44
  "oxlint": "1.60.0",
45
45
  "tsdown": "0.22.2"
46
46
  },
@@ -48,6 +48,6 @@
48
48
  "bun": "1.3.13"
49
49
  },
50
50
  "peerDependencies": {
51
- "typescript": "6.0.2"
51
+ "typescript": "6.0.3"
52
52
  }
53
53
  }