@paakd/config 0.0.2

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.
Files changed (140) hide show
  1. package/dist/src/index.js +20 -0
  2. package/gen/go/addresses/Address.pkl.go +10 -0
  3. package/gen/go/addresses/Addresses.pkl.go +43 -0
  4. package/gen/go/addresses/BillingAddress.pkl.go +8 -0
  5. package/gen/go/addresses/Field.pkl.go +43 -0
  6. package/gen/go/addresses/addressgroup/AddressGroup.pkl.go +43 -0
  7. package/gen/go/addresses/fieldtype/FieldType.pkl.go +61 -0
  8. package/gen/go/addresses/init.pkl.go +11 -0
  9. package/gen/go/cloudflare/Cloudflare.pkl.go +37 -0
  10. package/gen/go/cloudflare/R2Bucket.pkl.go +22 -0
  11. package/gen/go/cloudflare/TerraformBackend.pkl.go +16 -0
  12. package/gen/go/cloudflare/Turnstile.pkl.go +8 -0
  13. package/gen/go/cloudflare/init.pkl.go +11 -0
  14. package/gen/go/db/DB.pkl.go +43 -0
  15. package/gen/go/db/DBConnection.pkl.go +12 -0
  16. package/gen/go/db/init.pkl.go +9 -0
  17. package/gen/go/dune/Dune.pkl.go +47 -0
  18. package/gen/go/dune/init.pkl.go +8 -0
  19. package/gen/go/enterprise/Enterprise.pkl.go +118 -0
  20. package/gen/go/enterprise/init.pkl.go +8 -0
  21. package/gen/go/enterprise/taxonomyversion/TaxonomyVersion.pkl.go +37 -0
  22. package/gen/go/redis/Redis.pkl.go +41 -0
  23. package/gen/go/redis/init.pkl.go +8 -0
  24. package/gen/go/shared/Build.pkl.go +46 -0
  25. package/gen/go/shared/Shared.pkl.go +35 -0
  26. package/gen/go/shared/init.pkl.go +9 -0
  27. package/gen/go/worker/Worker.pkl.go +55 -0
  28. package/gen/go/worker/WorkerConnect.pkl.go +6 -0
  29. package/gen/go/worker/init.pkl.go +9 -0
  30. package/gen/js/development/basket_eco_packages_config_addresses.pkl.ts +106 -0
  31. package/gen/js/development/basket_eco_packages_config_checkout.pkl.ts +73 -0
  32. package/gen/js/development/basket_eco_packages_config_cloudflare.pkl.ts +69 -0
  33. package/gen/js/development/basket_eco_packages_config_cms.pkl.ts +119 -0
  34. package/gen/js/development/basket_eco_packages_config_db.pkl.ts +47 -0
  35. package/gen/js/development/basket_eco_packages_config_dune.pkl.ts +36 -0
  36. package/gen/js/development/basket_eco_packages_config_enterprise.pkl.ts +290 -0
  37. package/gen/js/development/basket_eco_packages_config_feature.pkl.ts +58 -0
  38. package/gen/js/development/basket_eco_packages_config_redis.pkl.ts +30 -0
  39. package/gen/js/development/basket_eco_packages_config_renderer_development_cms.pkl.ts +28 -0
  40. package/gen/js/development/basket_eco_packages_config_shared.pkl.ts +73 -0
  41. package/gen/js/development/basket_eco_packages_config_worker.pkl.ts +53 -0
  42. package/gen/js/production/basket_eco_packages_config_addresses.pkl.ts +106 -0
  43. package/gen/js/production/basket_eco_packages_config_checkout.pkl.ts +73 -0
  44. package/gen/js/production/basket_eco_packages_config_cloudflare.pkl.ts +69 -0
  45. package/gen/js/production/basket_eco_packages_config_cms.pkl.ts +119 -0
  46. package/gen/js/production/basket_eco_packages_config_db.pkl.ts +47 -0
  47. package/gen/js/production/basket_eco_packages_config_dune.pkl.ts +36 -0
  48. package/gen/js/production/basket_eco_packages_config_enterprise.pkl.ts +290 -0
  49. package/gen/js/production/basket_eco_packages_config_feature.pkl.ts +58 -0
  50. package/gen/js/production/basket_eco_packages_config_kiosk_host.pkl.ts +72 -0
  51. package/gen/js/production/basket_eco_packages_config_redis.pkl.ts +30 -0
  52. package/gen/js/production/basket_eco_packages_config_renderer_production_cms.pkl.ts +28 -0
  53. package/gen/js/production/basket_eco_packages_config_renderer_production_dune_config.pkl.ts +29 -0
  54. package/gen/js/production/basket_eco_packages_config_renderer_production_workflow_config.pkl.ts +29 -0
  55. package/gen/js/production/basket_eco_packages_config_renderer_staging_dune_config.pkl.ts +29 -0
  56. package/gen/js/production/basket_eco_packages_config_shared.pkl.ts +73 -0
  57. package/gen/js/production/basket_eco_packages_config_worker.pkl.ts +49 -0
  58. package/gen/js/staging/basket_eco_packages_config_addresses.pkl.ts +106 -0
  59. package/gen/js/staging/basket_eco_packages_config_checkout.pkl.ts +77 -0
  60. package/gen/js/staging/basket_eco_packages_config_cloudflare.pkl.ts +74 -0
  61. package/gen/js/staging/basket_eco_packages_config_cms.pkl.ts +119 -0
  62. package/gen/js/staging/basket_eco_packages_config_db.pkl.ts +47 -0
  63. package/gen/js/staging/basket_eco_packages_config_dune.pkl.ts +40 -0
  64. package/gen/js/staging/basket_eco_packages_config_enterprise.pkl.ts +290 -0
  65. package/gen/js/staging/basket_eco_packages_config_feature.pkl.ts +58 -0
  66. package/gen/js/staging/basket_eco_packages_config_redis.pkl.ts +30 -0
  67. package/gen/js/staging/basket_eco_packages_config_renderer_staging_cms.pkl.ts +28 -0
  68. package/gen/js/staging/basket_eco_packages_config_renderer_staging_dune_config.pkl.ts +29 -0
  69. package/gen/js/staging/basket_eco_packages_config_renderer_staging_workflow_config.pkl.ts +29 -0
  70. package/gen/js/staging/basket_eco_packages_config_shared.pkl.ts +69 -0
  71. package/gen/js/staging/basket_eco_packages_config_worker.pkl.ts +53 -0
  72. package/package.json +66 -0
  73. package/src/addresses.ts +90 -0
  74. package/src/authorization/policy.conf +15 -0
  75. package/src/authorization/policy.csv +26 -0
  76. package/src/chk.spec.ts +61 -0
  77. package/src/chk.ts +88 -0
  78. package/src/cms.test.ts +52 -0
  79. package/src/cms.ts +65 -0
  80. package/src/index.ts +4 -0
  81. package/src/pkl/PklProject +21 -0
  82. package/src/pkl/development/Addresses.pkl +2114 -0
  83. package/src/pkl/development/CMS.pkl +37 -0
  84. package/src/pkl/development/Checkout.pkl +32 -0
  85. package/src/pkl/development/Cloudflare.pkl +20 -0
  86. package/src/pkl/development/Db.pkl +14 -0
  87. package/src/pkl/development/Dune.pkl +12 -0
  88. package/src/pkl/development/Enterprise.pkl +158 -0
  89. package/src/pkl/development/Feature.pkl +4 -0
  90. package/src/pkl/development/Redis.pkl +6 -0
  91. package/src/pkl/development/Shared.pkl +16 -0
  92. package/src/pkl/development/Worker.pkl +43 -0
  93. package/src/pkl/development/renderer/CMS.pkl +59 -0
  94. package/src/pkl/production/Addresses.pkl +2114 -0
  95. package/src/pkl/production/CMS.pkl +34 -0
  96. package/src/pkl/production/Checkout.pkl +32 -0
  97. package/src/pkl/production/Cloudflare.pkl +20 -0
  98. package/src/pkl/production/Db.pkl +14 -0
  99. package/src/pkl/production/Dune.pkl +12 -0
  100. package/src/pkl/production/Enterprise.pkl +158 -0
  101. package/src/pkl/production/Feature.pkl +8 -0
  102. package/src/pkl/production/KioskHost.pkl +5 -0
  103. package/src/pkl/production/Redis.pkl +6 -0
  104. package/src/pkl/production/Shared.pkl +15 -0
  105. package/src/pkl/production/Worker.pkl +43 -0
  106. package/src/pkl/production/renderer/CMS.pkl +59 -0
  107. package/src/pkl/production/renderer/Dune.pkl +52 -0
  108. package/src/pkl/production/renderer/Feature.pkl +51 -0
  109. package/src/pkl/production/renderer/Workflow.pkl +51 -0
  110. package/src/pkl/staging/Addresses.pkl +2114 -0
  111. package/src/pkl/staging/CMS.pkl +35 -0
  112. package/src/pkl/staging/Checkout.pkl +32 -0
  113. package/src/pkl/staging/Cloudflare.pkl +20 -0
  114. package/src/pkl/staging/Db.pkl +14 -0
  115. package/src/pkl/staging/Dune.pkl +12 -0
  116. package/src/pkl/staging/Enterprise.pkl +158 -0
  117. package/src/pkl/staging/Feature.pkl +8 -0
  118. package/src/pkl/staging/Redis.pkl +6 -0
  119. package/src/pkl/staging/Shared.pkl +16 -0
  120. package/src/pkl/staging/Worker.pkl +43 -0
  121. package/src/pkl/staging/renderer/CMS.pkl +59 -0
  122. package/src/pkl/staging/renderer/Dune.pkl +52 -0
  123. package/src/pkl/staging/renderer/Feature.pkl +51 -0
  124. package/src/pkl/staging/renderer/Workflow.pkl +51 -0
  125. package/src/pkl/tmpl/AddressesTmpl.pkl +44 -0
  126. package/src/pkl/tmpl/CMSTmpl.pkl +64 -0
  127. package/src/pkl/tmpl/CheckoutTmpl.pkl +34 -0
  128. package/src/pkl/tmpl/CloudflareTmpl.pkl +33 -0
  129. package/src/pkl/tmpl/DbTmpl.pkl +18 -0
  130. package/src/pkl/tmpl/DuneTmpl.pkl +124 -0
  131. package/src/pkl/tmpl/EnterpriseTmpl.pkl +105 -0
  132. package/src/pkl/tmpl/FeatureTmpl.pkl +90 -0
  133. package/src/pkl/tmpl/KioskHostTmpl.pkl +194 -0
  134. package/src/pkl/tmpl/RedisTmpl.pkl +9 -0
  135. package/src/pkl/tmpl/SharedTmpl.pkl +40 -0
  136. package/src/pkl/tmpl/WorkerTmpl.pkl +27 -0
  137. package/src/pkl-reader/main.go +167 -0
  138. package/src/shared.ts +65 -0
  139. package/src/vault.spec.ts +62 -0
  140. package/src/vault.ts +68 -0
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./addresses"), exports);
18
+ __exportStar(require("./chk"), exports);
19
+ __exportStar(require("./cms"), exports);
20
+ __exportStar(require("./shared"), exports);
@@ -0,0 +1,10 @@
1
+ // Code generated from Pkl module `paakd.com.packages.config.Addresses`. DO NOT EDIT.
2
+ package addresses
3
+
4
+ type Address struct {
5
+ MinimumAgeLimit uint16 `pkl:"minimumAgeLimit"`
6
+
7
+ ShippingFields []Field `pkl:"shippingFields"`
8
+
9
+ BillingFields BillingAddress `pkl:"billingFields"`
10
+ }
@@ -0,0 +1,43 @@
1
+ // Code generated from Pkl module `paakd.com.packages.config.Addresses`. DO NOT EDIT.
2
+ package addresses
3
+
4
+ import (
5
+ "context"
6
+
7
+ "github.com/apple/pkl-go/pkl"
8
+ )
9
+
10
+ type Addresses struct {
11
+ Ca Address `pkl:"ca"`
12
+
13
+ Nl Address `pkl:"nl"`
14
+
15
+ De Address `pkl:"de"`
16
+
17
+ Gb Address `pkl:"gb"`
18
+
19
+ Us Address `pkl:"us"`
20
+ }
21
+
22
+ // LoadFromPath loads the pkl module at the given path and evaluates it into a Addresses
23
+ func LoadFromPath(ctx context.Context, path string) (ret Addresses, err error) {
24
+ evaluator, err := pkl.NewEvaluator(ctx, pkl.PreconfiguredOptions)
25
+ if err != nil {
26
+ return ret, err
27
+ }
28
+ defer func() {
29
+ cerr := evaluator.Close()
30
+ if err == nil {
31
+ err = cerr
32
+ }
33
+ }()
34
+ ret, err = Load(ctx, evaluator, pkl.FileSource(path))
35
+ return ret, err
36
+ }
37
+
38
+ // Load loads the pkl module at the given source and evaluates it with the given evaluator into a Addresses
39
+ func Load(ctx context.Context, evaluator pkl.Evaluator, source *pkl.ModuleSource) (Addresses, error) {
40
+ var ret Addresses
41
+ err := evaluator.EvaluateModule(ctx, source, &ret)
42
+ return ret, err
43
+ }
@@ -0,0 +1,8 @@
1
+ // Code generated from Pkl module `paakd.com.packages.config.Addresses`. DO NOT EDIT.
2
+ package addresses
3
+
4
+ type BillingAddress struct {
5
+ Fields []Field `pkl:"fields"`
6
+
7
+ BillableCountries []string `pkl:"billableCountries"`
8
+ }
@@ -0,0 +1,43 @@
1
+ // Code generated from Pkl module `paakd.com.packages.config.Addresses`. DO NOT EDIT.
2
+ package addresses
3
+
4
+ import (
5
+ "paakd.com/packages/config/gen/go/addresses/addressgroup"
6
+ "paakd.com/packages/config/gen/go/addresses/fieldtype"
7
+ )
8
+
9
+ type Field struct {
10
+ Name string `pkl:"name"`
11
+
12
+ Type fieldtype.FieldType `pkl:"type"`
13
+
14
+ Label string `pkl:"label"`
15
+
16
+ ErrorKey *string `pkl:"errorKey"`
17
+
18
+ Placeholder *string `pkl:"placeholder"`
19
+
20
+ Required bool `pkl:"required"`
21
+
22
+ Options *map[string]string `pkl:"options"`
23
+
24
+ Group addressgroup.AddressGroup `pkl:"group"`
25
+
26
+ RegPattern *string `pkl:"regPattern"`
27
+
28
+ RegPatternFlags *string `pkl:"regPatternFlags"`
29
+
30
+ AutoCompleteName *string `pkl:"autoCompleteName"`
31
+
32
+ NoAutoCorrect bool `pkl:"noAutoCorrect"`
33
+
34
+ Caption *string `pkl:"caption"`
35
+
36
+ MaxLength *uint16 `pkl:"maxLength"`
37
+
38
+ IsFullWidth bool `pkl:"isFullWidth"`
39
+
40
+ Mask []string `pkl:"mask"`
41
+
42
+ MinLength *uint16 `pkl:"minLength"`
43
+ }
@@ -0,0 +1,43 @@
1
+ // Code generated from Pkl module `paakd.com.packages.config.Addresses`. DO NOT EDIT.
2
+ package addressgroup
3
+
4
+ import (
5
+ "encoding"
6
+ "fmt"
7
+ )
8
+
9
+ type AddressGroup string
10
+
11
+ const (
12
+ Address AddressGroup = "address"
13
+ Contact AddressGroup = "contact"
14
+ Company AddressGroup = "company"
15
+ Invoice AddressGroup = "invoice"
16
+ Other AddressGroup = "other"
17
+ )
18
+
19
+ // String returns the string representation of AddressGroup
20
+ func (rcv AddressGroup) String() string {
21
+ return string(rcv)
22
+ }
23
+
24
+ var _ encoding.BinaryUnmarshaler = new(AddressGroup)
25
+
26
+ // UnmarshalBinary implements encoding.BinaryUnmarshaler for AddressGroup.
27
+ func (rcv *AddressGroup) UnmarshalBinary(data []byte) error {
28
+ switch str := string(data); str {
29
+ case "address":
30
+ *rcv = Address
31
+ case "contact":
32
+ *rcv = Contact
33
+ case "company":
34
+ *rcv = Company
35
+ case "invoice":
36
+ *rcv = Invoice
37
+ case "other":
38
+ *rcv = Other
39
+ default:
40
+ return fmt.Errorf(`illegal: "%s" is not a valid AddressGroup`, str)
41
+ }
42
+ return nil
43
+ }
@@ -0,0 +1,61 @@
1
+ // Code generated from Pkl module `paakd.com.packages.config.Addresses`. DO NOT EDIT.
2
+ package fieldtype
3
+
4
+ import (
5
+ "encoding"
6
+ "fmt"
7
+ )
8
+
9
+ type FieldType string
10
+
11
+ const (
12
+ Text FieldType = "text"
13
+ Select FieldType = "select"
14
+ Email FieldType = "email"
15
+ Checkbox FieldType = "checkbox"
16
+ Radio FieldType = "radio"
17
+ Textarea FieldType = "textarea"
18
+ Date FieldType = "date"
19
+ Tel FieldType = "tel"
20
+ Hidden FieldType = "hidden"
21
+ Lookup FieldType = "lookup"
22
+ Display FieldType = "display"
23
+ )
24
+
25
+ // String returns the string representation of FieldType
26
+ func (rcv FieldType) String() string {
27
+ return string(rcv)
28
+ }
29
+
30
+ var _ encoding.BinaryUnmarshaler = new(FieldType)
31
+
32
+ // UnmarshalBinary implements encoding.BinaryUnmarshaler for FieldType.
33
+ func (rcv *FieldType) UnmarshalBinary(data []byte) error {
34
+ switch str := string(data); str {
35
+ case "text":
36
+ *rcv = Text
37
+ case "select":
38
+ *rcv = Select
39
+ case "email":
40
+ *rcv = Email
41
+ case "checkbox":
42
+ *rcv = Checkbox
43
+ case "radio":
44
+ *rcv = Radio
45
+ case "textarea":
46
+ *rcv = Textarea
47
+ case "date":
48
+ *rcv = Date
49
+ case "tel":
50
+ *rcv = Tel
51
+ case "hidden":
52
+ *rcv = Hidden
53
+ case "lookup":
54
+ *rcv = Lookup
55
+ case "display":
56
+ *rcv = Display
57
+ default:
58
+ return fmt.Errorf(`illegal: "%s" is not a valid FieldType`, str)
59
+ }
60
+ return nil
61
+ }
@@ -0,0 +1,11 @@
1
+ // Code generated from Pkl module `paakd.com.packages.config.Addresses`. DO NOT EDIT.
2
+ package addresses
3
+
4
+ import "github.com/apple/pkl-go/pkl"
5
+
6
+ func init() {
7
+ pkl.RegisterStrictMapping("paakd.com.packages.config.Addresses", Addresses{})
8
+ pkl.RegisterStrictMapping("paakd.com.packages.config.Addresses#Address", Address{})
9
+ pkl.RegisterStrictMapping("paakd.com.packages.config.Addresses#Field", Field{})
10
+ pkl.RegisterStrictMapping("paakd.com.packages.config.Addresses#BillingAddress", BillingAddress{})
11
+ }
@@ -0,0 +1,37 @@
1
+ // Code generated from Pkl module `paakd.com.packages.config.Cloudflare`. DO NOT EDIT.
2
+ package cloudflare
3
+
4
+ import (
5
+ "context"
6
+
7
+ "github.com/apple/pkl-go/pkl"
8
+ )
9
+
10
+ type Cloudflare struct {
11
+ ShopR2 R2Bucket `pkl:"shopR2"`
12
+
13
+ ShopTurnstile Turnstile `pkl:"shopTurnstile"`
14
+ }
15
+
16
+ // LoadFromPath loads the pkl module at the given path and evaluates it into a Cloudflare
17
+ func LoadFromPath(ctx context.Context, path string) (ret Cloudflare, err error) {
18
+ evaluator, err := pkl.NewEvaluator(ctx, pkl.PreconfiguredOptions)
19
+ if err != nil {
20
+ return ret, err
21
+ }
22
+ defer func() {
23
+ cerr := evaluator.Close()
24
+ if err == nil {
25
+ err = cerr
26
+ }
27
+ }()
28
+ ret, err = Load(ctx, evaluator, pkl.FileSource(path))
29
+ return ret, err
30
+ }
31
+
32
+ // Load loads the pkl module at the given source and evaluates it with the given evaluator into a Cloudflare
33
+ func Load(ctx context.Context, evaluator pkl.Evaluator, source *pkl.ModuleSource) (Cloudflare, error) {
34
+ var ret Cloudflare
35
+ err := evaluator.EvaluateModule(ctx, source, &ret)
36
+ return ret, err
37
+ }
@@ -0,0 +1,22 @@
1
+ // Code generated from Pkl module `paakd.com.packages.config.Cloudflare`. DO NOT EDIT.
2
+ package cloudflare
3
+
4
+ type R2Bucket struct {
5
+ Endpoint string `pkl:"endpoint"`
6
+
7
+ EndpointEU string `pkl:"endpointEU"`
8
+
9
+ ApiKey string `pkl:"apiKey"`
10
+
11
+ ApiSecret string `pkl:"apiSecret"`
12
+
13
+ Region string `pkl:"region"`
14
+
15
+ Token string `pkl:"token"`
16
+
17
+ ZoneId string `pkl:"zoneId"`
18
+
19
+ ShopBucketName string `pkl:"shopBucketName"`
20
+
21
+ TaxonomyBucketName string `pkl:"taxonomyBucketName"`
22
+ }
@@ -0,0 +1,16 @@
1
+ // Code generated from Pkl module `paakd.com.packages.config.Cloudflare`. DO NOT EDIT.
2
+ package cloudflare
3
+
4
+ type TerraformBackend struct {
5
+ AccessKey string `pkl:"accessKey"`
6
+
7
+ SecretKey string `pkl:"secretKey"`
8
+
9
+ Bucket string `pkl:"bucket"`
10
+
11
+ Path string `pkl:"path"`
12
+
13
+ Region string `pkl:"region"`
14
+
15
+ Endpoint string `pkl:"endpoint"`
16
+ }
@@ -0,0 +1,8 @@
1
+ // Code generated from Pkl module `paakd.com.packages.config.Cloudflare`. DO NOT EDIT.
2
+ package cloudflare
3
+
4
+ type Turnstile struct {
5
+ SiteKey string `pkl:"siteKey"`
6
+
7
+ SecretKey string `pkl:"secretKey"`
8
+ }
@@ -0,0 +1,11 @@
1
+ // Code generated from Pkl module `paakd.com.packages.config.Cloudflare`. DO NOT EDIT.
2
+ package cloudflare
3
+
4
+ import "github.com/apple/pkl-go/pkl"
5
+
6
+ func init() {
7
+ pkl.RegisterStrictMapping("paakd.com.packages.config.Cloudflare", Cloudflare{})
8
+ pkl.RegisterStrictMapping("paakd.com.packages.config.Cloudflare#R2Bucket", R2Bucket{})
9
+ pkl.RegisterStrictMapping("paakd.com.packages.config.Cloudflare#Turnstile", Turnstile{})
10
+ pkl.RegisterStrictMapping("paakd.com.packages.config.Cloudflare#TerraformBackend", TerraformBackend{})
11
+ }
@@ -0,0 +1,43 @@
1
+ // Code generated from Pkl module `paakd.com.packages.config.DB`. DO NOT EDIT.
2
+ package db
3
+
4
+ import (
5
+ "context"
6
+
7
+ "github.com/apple/pkl-go/pkl"
8
+ )
9
+
10
+ type DB struct {
11
+ Conn DBConnection `pkl:"conn"`
12
+
13
+ Cms string `pkl:"cms"`
14
+
15
+ Dune string `pkl:"dune"`
16
+
17
+ Enterprise string `pkl:"enterprise"`
18
+
19
+ Feature string `pkl:"feature"`
20
+ }
21
+
22
+ // LoadFromPath loads the pkl module at the given path and evaluates it into a DB
23
+ func LoadFromPath(ctx context.Context, path string) (ret DB, err error) {
24
+ evaluator, err := pkl.NewEvaluator(ctx, pkl.PreconfiguredOptions)
25
+ if err != nil {
26
+ return ret, err
27
+ }
28
+ defer func() {
29
+ cerr := evaluator.Close()
30
+ if err == nil {
31
+ err = cerr
32
+ }
33
+ }()
34
+ ret, err = Load(ctx, evaluator, pkl.FileSource(path))
35
+ return ret, err
36
+ }
37
+
38
+ // Load loads the pkl module at the given source and evaluates it with the given evaluator into a DB
39
+ func Load(ctx context.Context, evaluator pkl.Evaluator, source *pkl.ModuleSource) (DB, error) {
40
+ var ret DB
41
+ err := evaluator.EvaluateModule(ctx, source, &ret)
42
+ return ret, err
43
+ }
@@ -0,0 +1,12 @@
1
+ // Code generated from Pkl module `paakd.com.packages.config.DB`. DO NOT EDIT.
2
+ package db
3
+
4
+ type DBConnection struct {
5
+ Host string `pkl:"host"`
6
+
7
+ Port uint16 `pkl:"port"`
8
+
9
+ User string `pkl:"user"`
10
+
11
+ Password string `pkl:"password"`
12
+ }
@@ -0,0 +1,9 @@
1
+ // Code generated from Pkl module `paakd.com.packages.config.DB`. DO NOT EDIT.
2
+ package db
3
+
4
+ import "github.com/apple/pkl-go/pkl"
5
+
6
+ func init() {
7
+ pkl.RegisterStrictMapping("paakd.com.packages.config.DB", DB{})
8
+ pkl.RegisterStrictMapping("paakd.com.packages.config.DB#DBConnection", DBConnection{})
9
+ }
@@ -0,0 +1,47 @@
1
+ // Code generated from Pkl module `paakd.com.packages.config.Dune`. DO NOT EDIT.
2
+ package dune
3
+
4
+ import (
5
+ "context"
6
+
7
+ "github.com/apple/pkl-go/pkl"
8
+ )
9
+
10
+ type Dune struct {
11
+ DuneHost string `pkl:"duneHost"`
12
+
13
+ DunePort uint16 `pkl:"dunePort"`
14
+
15
+ ServerAPIKey string `pkl:"serverAPIKey"`
16
+
17
+ DataStore string `pkl:"dataStore"`
18
+
19
+ CacheStore string `pkl:"cacheStore"`
20
+
21
+ ConfigFile any `pkl:"configFile"`
22
+
23
+ Output any `pkl:"output"`
24
+ }
25
+
26
+ // LoadFromPath loads the pkl module at the given path and evaluates it into a Dune
27
+ func LoadFromPath(ctx context.Context, path string) (ret Dune, err error) {
28
+ evaluator, err := pkl.NewEvaluator(ctx, pkl.PreconfiguredOptions)
29
+ if err != nil {
30
+ return ret, err
31
+ }
32
+ defer func() {
33
+ cerr := evaluator.Close()
34
+ if err == nil {
35
+ err = cerr
36
+ }
37
+ }()
38
+ ret, err = Load(ctx, evaluator, pkl.FileSource(path))
39
+ return ret, err
40
+ }
41
+
42
+ // Load loads the pkl module at the given source and evaluates it with the given evaluator into a Dune
43
+ func Load(ctx context.Context, evaluator pkl.Evaluator, source *pkl.ModuleSource) (Dune, error) {
44
+ var ret Dune
45
+ err := evaluator.EvaluateModule(ctx, source, &ret)
46
+ return ret, err
47
+ }
@@ -0,0 +1,8 @@
1
+ // Code generated from Pkl module `paakd.com.packages.config.Dune`. DO NOT EDIT.
2
+ package dune
3
+
4
+ import "github.com/apple/pkl-go/pkl"
5
+
6
+ func init() {
7
+ pkl.RegisterStrictMapping("paakd.com.packages.config.Dune", Dune{})
8
+ }
@@ -0,0 +1,118 @@
1
+ // Code generated from Pkl module `paakd.com.packages.config.Enterprise`. DO NOT EDIT.
2
+ package enterprise
3
+
4
+ import (
5
+ "context"
6
+
7
+ "paakd.com/packages/config/gen/go/cloudflare"
8
+ "paakd.com/packages/config/gen/go/db"
9
+ "paakd.com/packages/config/gen/go/dune"
10
+ "paakd.com/packages/config/gen/go/enterprise/taxonomyversion"
11
+ "paakd.com/packages/config/gen/go/redis"
12
+ "paakd.com/packages/config/gen/go/shared"
13
+ "paakd.com/packages/config/gen/go/worker"
14
+ "github.com/apple/pkl-go/pkl"
15
+ )
16
+
17
+ type Enterprise struct {
18
+ TaxonomyVersion taxonomyversion.TaxonomyVersion `pkl:"taxonomyVersion"`
19
+
20
+ ProductTaxonomyPath string `pkl:"productTaxonomyPath"`
21
+
22
+ Host string `pkl:"host"`
23
+
24
+ Port uint16 `pkl:"port"`
25
+
26
+ DefaultRequestTimeout pkl.Duration `pkl:"defaultRequestTimeout"`
27
+
28
+ TestEmail string `pkl:"testEmail"`
29
+
30
+ JwtExpTime pkl.Duration `pkl:"jwtExpTime"`
31
+
32
+ RefreshTokenExpTime pkl.Duration `pkl:"refreshTokenExpTime"`
33
+
34
+ TenantAssetURL string `pkl:"tenantAssetURL"`
35
+
36
+ ShopBucketName string `pkl:"shopBucketName"`
37
+
38
+ BleveStorePath string `pkl:"bleveStorePath"`
39
+
40
+ RestateHost string `pkl:"restateHost"`
41
+
42
+ RestatePort uint16 `pkl:"restatePort"`
43
+
44
+ WorkerPort uint16 `pkl:"workerPort"`
45
+
46
+ WorkerHost string `pkl:"workerHost"`
47
+
48
+ BreezeBasicAuthHeader string `pkl:"breezeBasicAuthHeader"`
49
+
50
+ UserJWTSecret string `pkl:"userJWTSecret"`
51
+
52
+ CustomerJWTSecret string `pkl:"customerJWTSecret"`
53
+
54
+ CustomerJWTSecretExpTime pkl.Duration `pkl:"customerJWTSecretExpTime"`
55
+
56
+ UserJWTSecretExpTime pkl.Duration `pkl:"userJWTSecretExpTime"`
57
+
58
+ UserJwtPrivateKey string `pkl:"userJwtPrivateKey"`
59
+
60
+ UserJwtPublicKey string `pkl:"userJwtPublicKey"`
61
+
62
+ CustomerJwtPrivateKey string `pkl:"customerJwtPrivateKey"`
63
+
64
+ CustomerJwtPublicKey string `pkl:"customerJwtPublicKey"`
65
+
66
+ IsTest bool `pkl:"isTest"`
67
+
68
+ IsProduction bool `pkl:"isProduction"`
69
+
70
+ IsStaging bool `pkl:"isStaging"`
71
+
72
+ IsLocal bool `pkl:"isLocal"`
73
+
74
+ IsDocker bool `pkl:"isDocker"`
75
+
76
+ ProductTaxonomyIndexBucket string `pkl:"productTaxonomyIndexBucket"`
77
+
78
+ ResendAPIKey string `pkl:"resendAPIKey"`
79
+
80
+ Redis redis.Redis `pkl:"redis"`
81
+
82
+ Dune dune.Dune `pkl:"dune"`
83
+
84
+ Worker worker.Worker `pkl:"worker"`
85
+
86
+ Db db.DB `pkl:"db"`
87
+
88
+ Cloudflare cloudflare.Cloudflare `pkl:"cloudflare"`
89
+
90
+ Shared shared.Shared `pkl:"shared"`
91
+
92
+ WorkflowConfig any `pkl:"workflowConfig"`
93
+
94
+ Output any `pkl:"output"`
95
+ }
96
+
97
+ // LoadFromPath loads the pkl module at the given path and evaluates it into a Enterprise
98
+ func LoadFromPath(ctx context.Context, path string) (ret Enterprise, err error) {
99
+ evaluator, err := pkl.NewEvaluator(ctx, pkl.PreconfiguredOptions)
100
+ if err != nil {
101
+ return ret, err
102
+ }
103
+ defer func() {
104
+ cerr := evaluator.Close()
105
+ if err == nil {
106
+ err = cerr
107
+ }
108
+ }()
109
+ ret, err = Load(ctx, evaluator, pkl.FileSource(path))
110
+ return ret, err
111
+ }
112
+
113
+ // Load loads the pkl module at the given source and evaluates it with the given evaluator into a Enterprise
114
+ func Load(ctx context.Context, evaluator pkl.Evaluator, source *pkl.ModuleSource) (Enterprise, error) {
115
+ var ret Enterprise
116
+ err := evaluator.EvaluateModule(ctx, source, &ret)
117
+ return ret, err
118
+ }
@@ -0,0 +1,8 @@
1
+ // Code generated from Pkl module `paakd.com.packages.config.Enterprise`. DO NOT EDIT.
2
+ package enterprise
3
+
4
+ import "github.com/apple/pkl-go/pkl"
5
+
6
+ func init() {
7
+ pkl.RegisterStrictMapping("paakd.com.packages.config.Enterprise", Enterprise{})
8
+ }
@@ -0,0 +1,37 @@
1
+ // Code generated from Pkl module `paakd.com.packages.config.Enterprise`. DO NOT EDIT.
2
+ package taxonomyversion
3
+
4
+ import (
5
+ "encoding"
6
+ "fmt"
7
+ )
8
+
9
+ type TaxonomyVersion string
10
+
11
+ const (
12
+ N202506Unstable TaxonomyVersion = "2025-06-unstable"
13
+ Warn TaxonomyVersion = "warn"
14
+ Info TaxonomyVersion = "info"
15
+ )
16
+
17
+ // String returns the string representation of TaxonomyVersion
18
+ func (rcv TaxonomyVersion) String() string {
19
+ return string(rcv)
20
+ }
21
+
22
+ var _ encoding.BinaryUnmarshaler = new(TaxonomyVersion)
23
+
24
+ // UnmarshalBinary implements encoding.BinaryUnmarshaler for TaxonomyVersion.
25
+ func (rcv *TaxonomyVersion) UnmarshalBinary(data []byte) error {
26
+ switch str := string(data); str {
27
+ case "2025-06-unstable":
28
+ *rcv = N202506Unstable
29
+ case "warn":
30
+ *rcv = Warn
31
+ case "info":
32
+ *rcv = Info
33
+ default:
34
+ return fmt.Errorf(`illegal: "%s" is not a valid TaxonomyVersion`, str)
35
+ }
36
+ return nil
37
+ }
@@ -0,0 +1,41 @@
1
+ // Code generated from Pkl module `paakd.com.packages.config.Redis`. DO NOT EDIT.
2
+ package redis
3
+
4
+ import (
5
+ "context"
6
+
7
+ "github.com/apple/pkl-go/pkl"
8
+ )
9
+
10
+ type Redis struct {
11
+ User string `pkl:"user"`
12
+
13
+ Host string `pkl:"host"`
14
+
15
+ Password string `pkl:"password"`
16
+
17
+ Port uint16 `pkl:"port"`
18
+ }
19
+
20
+ // LoadFromPath loads the pkl module at the given path and evaluates it into a Redis
21
+ func LoadFromPath(ctx context.Context, path string) (ret Redis, err error) {
22
+ evaluator, err := pkl.NewEvaluator(ctx, pkl.PreconfiguredOptions)
23
+ if err != nil {
24
+ return ret, err
25
+ }
26
+ defer func() {
27
+ cerr := evaluator.Close()
28
+ if err == nil {
29
+ err = cerr
30
+ }
31
+ }()
32
+ ret, err = Load(ctx, evaluator, pkl.FileSource(path))
33
+ return ret, err
34
+ }
35
+
36
+ // Load loads the pkl module at the given source and evaluates it with the given evaluator into a Redis
37
+ func Load(ctx context.Context, evaluator pkl.Evaluator, source *pkl.ModuleSource) (Redis, error) {
38
+ var ret Redis
39
+ err := evaluator.EvaluateModule(ctx, source, &ret)
40
+ return ret, err
41
+ }