@builder-builder/builder 0.0.20 → 0.0.22
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/README.md +33 -24
- package/dist/bb.d.ts +10 -11
- package/dist/bb.js +25 -2
- package/dist/client/client.d.ts +7 -0
- package/dist/client/client.js +19 -0
- package/dist/client/index.d.ts +4 -0
- package/dist/client/index.js +2 -0
- package/dist/client/schema.d.ts +396 -0
- package/dist/client/schema.js +13 -0
- package/dist/entities/builder/bind.d.ts +1 -1
- package/dist/entities/builder/builder.js +1 -1
- package/dist/entities/collection/collection.d.ts +689 -1
- package/dist/entities/collection/collection.js +5 -2
- package/dist/entities/collection/config.d.ts +189 -0
- package/dist/entities/collection/config.js +12 -2
- package/dist/entities/collection/expectation.d.ts +1 -1
- package/dist/entities/collection/index.d.ts +2 -2
- package/dist/entities/collection/index.js +2 -2
- package/dist/entities/collection/when.d.ts +1 -1
- package/dist/entities/component/component.d.ts +61 -7
- package/dist/entities/component/component.js +5 -2
- package/dist/entities/component/config.d.ts +10 -0
- package/dist/entities/component/config.js +19 -2
- package/dist/entities/component/field.js +1 -1
- package/dist/entities/component/index.d.ts +2 -2
- package/dist/entities/component/index.js +2 -2
- package/dist/entities/component/when.d.ts +1 -1
- package/dist/entities/expectation.d.ts +4 -0
- package/dist/entities/expectation.js +3 -1
- package/dist/entities/index.d.ts +15 -13
- package/dist/entities/index.js +11 -10
- package/dist/entities/kind.d.ts +10 -7
- package/dist/entities/kind.js +39 -5
- package/dist/entities/model/bind.d.ts +1 -1
- package/dist/entities/model/methods.d.ts +4 -4
- package/dist/entities/model/model.js +1 -1
- package/dist/entities/option/index.d.ts +3 -3
- package/dist/entities/option/index.js +3 -3
- package/dist/entities/option/option.d.ts +85 -7
- package/dist/entities/option/option.js +5 -2
- package/dist/entities/option/select.d.ts +10 -0
- package/dist/entities/option/select.js +12 -1
- package/dist/entities/option/toggle.d.ts +7 -0
- package/dist/entities/option/toggle.js +12 -1
- package/dist/entities/option/when.d.ts +1 -1
- package/dist/{paths.d.ts → entities/paths.d.ts} +2 -0
- package/dist/{paths.js → entities/paths.js} +3 -0
- package/dist/entities/pricing/index.d.ts +1 -1
- package/dist/entities/pricing/index.js +1 -1
- package/dist/entities/pricing/pricing.js +1 -1
- package/dist/entities/pricing/rates.d.ts +5 -0
- package/dist/entities/pricing/rates.js +3 -1
- package/dist/entities/references.d.ts +723 -6
- package/dist/entities/references.js +7 -1
- package/dist/entities/serialise.d.ts +48 -42
- package/dist/entities/serialise.js +9 -3
- package/dist/entities/ui/describe.d.ts +15 -0
- package/dist/entities/ui/describe.js +11 -2
- package/dist/entities/ui/index.d.ts +4 -4
- package/dist/entities/ui/index.js +4 -4
- package/dist/entities/ui/input.d.ts +11 -1
- package/dist/entities/ui/input.js +4 -2
- package/dist/entities/ui/page.d.ts +15 -0
- package/dist/entities/ui/page.js +11 -2
- package/dist/entities/ui/pages.d.ts +132 -0
- package/dist/entities/ui/pages.js +12 -2
- package/dist/entities/ui/ui.d.ts +1 -1
- package/dist/entities/ui/ui.js +2 -2
- package/dist/entities/ui/uis.js +1 -1
- package/dist/entities/validated.d.ts +26 -18
- package/dist/entities/when.d.ts +4 -3
- package/dist/entities/when.js +22 -2
- package/dist/environment.d.ts +2 -2
- package/dist/{validate → errors}/errors.d.ts +57 -35
- package/dist/{validate → errors}/errors.js +40 -5
- package/dist/errors/exception.d.ts +5 -0
- package/dist/{exception.js → errors/exception.js} +0 -3
- package/dist/errors/index.d.ts +4 -0
- package/dist/errors/index.js +3 -0
- package/dist/index.d.ts +14 -14
- package/dist/index.js +3 -2
- package/dist/instance.d.ts +7 -7
- package/dist/instance.js +4 -4
- package/dist/mappers/instance.js +1 -1
- package/dist/mappers/order.d.ts +4 -4
- package/dist/mappers/order.js +1 -1
- package/dist/mappers/price.js +18 -18
- package/dist/mappers/render/render.js +1 -1
- package/dist/mappers/resolve.d.ts +1 -2
- package/dist/mappers/resolve.js +3 -20
- package/dist/mappers/variants/option-graph.d.ts +1 -2
- package/dist/mappers/variants/option-graph.js +2 -3
- package/dist/mappers/variants/variants.d.ts +2 -2
- package/dist/mappers/variants/variants.js +1 -1
- package/dist/private.d.ts +1 -2
- package/dist/private.js +1 -2
- package/dist/references.js +1 -1
- package/dist/validate/brand.js +1 -2
- package/dist/validate/builder.d.ts +2 -3
- package/dist/validate/builder.js +2 -3
- package/dist/validate/expectations.d.ts +1 -1
- package/dist/validate/index.d.ts +4 -2
- package/dist/validate/index.js +1 -0
- package/dist/validate/instance.d.ts +2 -3
- package/dist/validate/instance.js +1 -2
- package/dist/validate/model.d.ts +2 -3
- package/dist/validate/model.js +39 -44
- package/dist/validate/paths.d.ts +2 -3
- package/dist/validate/paths.js +1 -1
- package/dist/validate/pricing.d.ts +2 -3
- package/dist/validate/pricing.js +2 -3
- package/dist/validate/resolve.d.ts +1 -1
- package/dist/validate/resolve.js +1 -1
- package/dist/validate/ui.d.ts +2 -3
- package/dist/validate/ui.js +13 -4
- package/dist/validate/variants.d.ts +4 -5
- package/dist/validate/variants.js +4 -5
- package/package.json +17 -5
- package/dist/exception.d.ts +0 -13
- package/dist/validate/result.d.ts +0 -2
- package/dist/validate/result.js +0 -1
- /package/dist/{serialisable.d.ts → entities/serialisable.d.ts} +0 -0
- /package/dist/{serialisable.js → entities/serialisable.js} +0 -0
- /package/dist/{check.d.ts → errors/check.d.ts} +0 -0
- /package/dist/{check.js → errors/check.js} +0 -0
package/package.json
CHANGED
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@builder-builder/builder",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.22",
|
|
4
4
|
"type": "module",
|
|
5
|
+
"engines": {
|
|
6
|
+
"node": ">=24"
|
|
7
|
+
},
|
|
5
8
|
"exports": {
|
|
6
9
|
".": {
|
|
7
10
|
"types": "./dist/index.d.ts",
|
|
8
11
|
"default": "./dist/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./client": {
|
|
14
|
+
"types": "./dist/client/index.d.ts",
|
|
15
|
+
"default": "./dist/client/index.js"
|
|
9
16
|
}
|
|
10
17
|
},
|
|
11
18
|
"files": [
|
|
@@ -18,9 +25,9 @@
|
|
|
18
25
|
},
|
|
19
26
|
"scripts": {
|
|
20
27
|
"dev": "vite dev",
|
|
21
|
-
"predev": "npm run types:
|
|
28
|
+
"predev": "npm run db:types:local",
|
|
22
29
|
"dev:v": "NO_UPDATE_NOTIFIER=false VERCEL_ENV=development vercel dev",
|
|
23
|
-
"build": "vite build",
|
|
30
|
+
"build": "NODE_ENV=production vite build",
|
|
24
31
|
"package": "svelte-kit sync && svelte-package --input src/lib/builder",
|
|
25
32
|
"preview": "vite preview",
|
|
26
33
|
"prepare": "svelte-kit sync && npm run messages || echo ''",
|
|
@@ -32,9 +39,11 @@
|
|
|
32
39
|
"lint": "prettier --check . && eslint .",
|
|
33
40
|
"test": "npm run test:unit -- --run",
|
|
34
41
|
"test:unit": "npm run messages && vitest --project client --project server",
|
|
35
|
-
"test:integration": "npm run messages && vitest run --project integration",
|
|
42
|
+
"test:integration:local": "npm run messages && dotenv -e .env.development.local -- vitest run --project integration",
|
|
36
43
|
"verify": "npm run test && npm run check && npm run lint",
|
|
37
|
-
"types
|
|
44
|
+
"db:types": "dotenv -e .env -- sh -c 'supabase gen types typescript --project-id \"$SUPABASE_DEV_PROJECT_ID\" --schema public > ./src/lib/server/db/database.types.ts'",
|
|
45
|
+
"db:types:local": "supabase gen types typescript --local > ./src/lib/server/db/database.types.ts",
|
|
46
|
+
"db:reset": "rm -f supabase/migrations/*_initial.sql && supabase db diff --use-pg-delta -f initial && supabase db reset && npm run db:types:local"
|
|
38
47
|
},
|
|
39
48
|
"devDependencies": {
|
|
40
49
|
"@eslint/compat": "^1.2.5",
|
|
@@ -47,6 +56,7 @@
|
|
|
47
56
|
"@sveltejs/vite-plugin-svelte": "^5.0.0",
|
|
48
57
|
"@testing-library/jest-dom": "^6.6.3",
|
|
49
58
|
"@testing-library/svelte": "^5.2.4",
|
|
59
|
+
"@types/node": "^25.9.1",
|
|
50
60
|
"@vitest/coverage-v8": "^4.1.5",
|
|
51
61
|
"dotenv-cli": "^8.0.0",
|
|
52
62
|
"eslint": "^9.18.0",
|
|
@@ -63,12 +73,14 @@
|
|
|
63
73
|
"svelte": "^5.0.0",
|
|
64
74
|
"svelte-check": "^4.0.0",
|
|
65
75
|
"typescript-eslint": "^8.58.2",
|
|
76
|
+
"vercel": "^54.0.0",
|
|
66
77
|
"vite": "^6.2.6",
|
|
67
78
|
"vitest": "^4.1.5"
|
|
68
79
|
},
|
|
69
80
|
"dependencies": {
|
|
70
81
|
"@floating-ui/dom": "^1.7.2",
|
|
71
82
|
"@lucide/svelte": "^0.525.0",
|
|
83
|
+
"@sentry/sveltekit": "^10.53.1",
|
|
72
84
|
"@supabase/supabase-js": "^2.104.0",
|
|
73
85
|
"@upstash/ratelimit": "^2.0.5",
|
|
74
86
|
"@upstash/redis": "^1.35.0",
|
package/dist/exception.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { BuilderErrorDuplicateName, BuilderErrorInvalidCollection, BuilderErrorInvalidCollectionBounds, BuilderErrorInvalidDetail, BuilderErrorInvalidInput, BuilderErrorInvalidOption, BuilderErrorInvalidPath, BuilderErrorInvalidPricing, BuilderErrorInvalidSelectMapKey, BuilderErrorInvalidVariant, BuilderErrorMissingComponent, BuilderErrorMissingDetail, BuilderErrorMissingReference, BuilderErrorMissingVariant, BuilderErrorUnboundParameter, BuilderErrorUnexpectedComponent, BuilderErrorUnexpectedDetail, BuilderErrorUnmetExpectation, BuilderErrorUnvalidated } from './validate/index';
|
|
2
|
-
export type BuilderErrorLocation = ReadonlyArray<string | number>;
|
|
3
|
-
export declare function builderError<Kind extends string>(kind: Kind, location: BuilderErrorLocation): {
|
|
4
|
-
kind: Kind;
|
|
5
|
-
location: BuilderErrorLocation;
|
|
6
|
-
};
|
|
7
|
-
export type BuilderErrorBase = ReturnType<typeof builderError>;
|
|
8
|
-
export type BuilderError = BuilderErrorUnmetExpectation | BuilderErrorUnboundParameter | BuilderErrorMissingReference | BuilderErrorInvalidPath | BuilderErrorInvalidPricing | BuilderErrorInvalidSelectMapKey | BuilderErrorDuplicateName | BuilderErrorInvalidCollectionBounds | BuilderErrorInvalidOption | BuilderErrorInvalidCollection | BuilderErrorMissingComponent | BuilderErrorUnexpectedComponent | BuilderErrorMissingVariant | BuilderErrorInvalidVariant | BuilderErrorMissingDetail | BuilderErrorUnexpectedDetail | BuilderErrorInvalidDetail | BuilderErrorInvalidInput | BuilderErrorUnvalidated;
|
|
9
|
-
export type BuilderErrors = ReadonlyArray<BuilderError>;
|
|
10
|
-
export declare class BuilderException extends globalThis.Error {
|
|
11
|
-
readonly errors: BuilderErrors;
|
|
12
|
-
constructor(errors: BuilderErrors, message?: string);
|
|
13
|
-
}
|
package/dist/validate/result.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|