@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,290 @@
1
+ /* This file was generated by `pkl-typescript` from Pkl module `paakd.com.packages.config.Enterprise`. */
2
+ /* DO NOT EDIT! */
3
+ /* istanbul ignore file */
4
+ /* eslint-disable */
5
+ import * as pklTypescript from '@pkl-community/pkl-typescript'
6
+
7
+ // Ref: Module root.
8
+ export interface Enterprise {
9
+ taxonomyVersion: TaxonomyVersion
10
+
11
+ productTaxonomyPath: string
12
+
13
+ host: string
14
+
15
+ port: number
16
+
17
+ defaultRequestTimeout: pklTypescript.Duration
18
+
19
+ testEmail: string
20
+
21
+ jwtExpTime: pklTypescript.Duration
22
+
23
+ refreshTokenExpTime: pklTypescript.Duration
24
+
25
+ tenantAssetURL: string
26
+
27
+ shopBucketName: string
28
+
29
+ bleveStorePath: string
30
+
31
+ restateHost: string
32
+
33
+ restatePort: number
34
+
35
+ workerPort: number
36
+
37
+ workerHost: string
38
+
39
+ breezeBasicAuthHeader: string
40
+
41
+ userJWTSecret: string
42
+
43
+ customerJWTSecret: string
44
+
45
+ customerJWTSecretExpTime: pklTypescript.Duration
46
+
47
+ userJWTSecretExpTime: pklTypescript.Duration
48
+
49
+ userJwtPrivateKey: string
50
+
51
+ userJwtPublicKey: string
52
+
53
+ customerJwtPrivateKey: string
54
+
55
+ customerJwtPublicKey: string
56
+
57
+ isTest: boolean
58
+
59
+ isProduction: boolean
60
+
61
+ isStaging: boolean
62
+
63
+ isLocal: boolean
64
+
65
+ isDocker: boolean
66
+
67
+ productTaxonomyIndexBucket: string
68
+
69
+ resendAPIKey: string
70
+
71
+ redis: Redis
72
+
73
+ dune: Dune
74
+
75
+ worker: Worker
76
+
77
+ db: DB
78
+
79
+ cloudflare: Cloudflare
80
+
81
+ shared: Shared
82
+
83
+ workflowConfig: pklTypescript.Any
84
+
85
+ output: pklTypescript.Any
86
+ }
87
+
88
+ // Ref: Module root.
89
+ export interface Redis {
90
+ user: string
91
+
92
+ host: string
93
+
94
+ password: string
95
+
96
+ port: number
97
+ }
98
+
99
+ // Ref: Module root.
100
+ export interface Dune {
101
+ duneHost: string
102
+
103
+ dunePort: number
104
+
105
+ serverAPIKey: string
106
+
107
+ dataStore: string
108
+
109
+ cacheStore: string
110
+
111
+ configFile: pklTypescript.Any
112
+
113
+ output: pklTypescript.Any
114
+ }
115
+
116
+ // Ref: Module root.
117
+ export interface Worker {
118
+ breeze: WorkerConnect
119
+
120
+ orchestrator: WorkerConnect
121
+
122
+ mesh: WorkerConnect
123
+
124
+ tfState: WorkerConnect
125
+
126
+ tfStateShopBackend: WorkerConnect
127
+
128
+ tfStateServiceBackend: WorkerConnect
129
+
130
+ tfStateHostsBackend: WorkerConnect
131
+
132
+ orchestratorAuth: string
133
+
134
+ shopBackendAuth: string
135
+
136
+ serviceBackendAuth: string
137
+
138
+ hostBackendAuth: string
139
+ }
140
+
141
+ // Ref: Pkl class `paakd.com.packages.config.Worker.WorkerConnect`.
142
+ export interface WorkerConnect {
143
+ endpoint: string
144
+ }
145
+
146
+ // Ref: Module root.
147
+ export interface DB {
148
+ conn: DBConnection
149
+
150
+ cms: string
151
+
152
+ dune: string
153
+
154
+ enterprise: string
155
+
156
+ feature: string
157
+ }
158
+
159
+ // Ref: Pkl class `paakd.com.packages.config.DB.DBConnection`.
160
+ export interface DBConnection {
161
+ host: string
162
+
163
+ port: number
164
+
165
+ user: string
166
+
167
+ password: string
168
+ }
169
+
170
+ // Ref: Module root.
171
+ export interface Cloudflare {
172
+ shopR2: R2Bucket
173
+
174
+ shopTurnstile: Turnstile
175
+ }
176
+
177
+ // Ref: Pkl class `paakd.com.packages.config.Cloudflare.R2Bucket`.
178
+ export interface R2Bucket {
179
+ endpoint: string
180
+
181
+ endpointEU: string
182
+
183
+ apiKey: string
184
+
185
+ apiSecret: string
186
+
187
+ region: string
188
+
189
+ token: string
190
+
191
+ zoneId: string
192
+
193
+ shopBucketName: string
194
+
195
+ taxonomyBucketName: string
196
+ }
197
+
198
+ // Ref: Pkl class `paakd.com.packages.config.Cloudflare.Turnstile`.
199
+ export interface Turnstile {
200
+ siteKey: string
201
+
202
+ secretKey: string
203
+ }
204
+
205
+ // Ref: Pkl class `paakd.com.packages.config.Cloudflare.TerraformBackend`.
206
+ export interface TerraformBackend {
207
+ accessKey: string
208
+
209
+ secretKey: string
210
+
211
+ bucket: string
212
+
213
+ path: string
214
+
215
+ region: string
216
+
217
+ endpoint: string
218
+ }
219
+
220
+ // Ref: Module root.
221
+ export interface Shared {
222
+ build: Build
223
+ }
224
+
225
+ // Ref: Pkl class `paakd.com.packages.config.Shared.Build`.
226
+ export interface Build {
227
+ enterpriseEnv: string
228
+
229
+ envPath: string
230
+
231
+ binUser: string
232
+
233
+ binUserGroup: string
234
+
235
+ binUserId: number
236
+
237
+ certPath: string
238
+
239
+ serviceDomainName: string
240
+
241
+ vaultUrl: string
242
+
243
+ goEnv: string
244
+
245
+ nodeEnv: string
246
+
247
+ shopId: string
248
+
249
+ tenant: string
250
+
251
+ envFilePath: string
252
+
253
+ shopBucketName: string
254
+
255
+ productTaxonomyIndexBucket: string
256
+
257
+ apiVersion: string
258
+
259
+ envFile: string
260
+
261
+ version: string
262
+
263
+ storefrontHost: string
264
+
265
+ storefrontPort: number
266
+
267
+ secureCookiePassword: string
268
+ }
269
+
270
+ // Ref: Pkl type `paakd.com.packages.config.Enterprise.TaxonomyVersion`.
271
+ type TaxonomyVersion = '2025-06-unstable' | 'warn' | 'info'
272
+
273
+ // LoadFromPath loads the pkl module at the given path and evaluates it into a Enterprise
274
+ export const loadFromPath = async (path: string): Promise<Enterprise> => {
275
+ const evaluator = await pklTypescript.newEvaluator(
276
+ pklTypescript.PreconfiguredOptions
277
+ )
278
+ try {
279
+ const result = await load(evaluator, pklTypescript.FileSource(path))
280
+ return result
281
+ } finally {
282
+ evaluator.close()
283
+ }
284
+ }
285
+
286
+ export const load = (
287
+ evaluator: pklTypescript.Evaluator,
288
+ source: pklTypescript.ModuleSource
289
+ ): Promise<Enterprise> =>
290
+ evaluator.evaluateModule(source) as Promise<Enterprise>
@@ -0,0 +1,58 @@
1
+ /* This file was generated by `pkl-typescript` from Pkl module `paakd.com.packages.config.Feature`. */
2
+ /* DO NOT EDIT! */
3
+ /* istanbul ignore file */
4
+ /* eslint-disable */
5
+ import * as pklTypescript from '@pkl-community/pkl-typescript'
6
+
7
+ // Ref: Module root.
8
+ export interface Feature {
9
+ db: DB
10
+
11
+ shopId: string
12
+
13
+ dbName: string
14
+
15
+ configFile: pklTypescript.Any
16
+ }
17
+
18
+ // Ref: Module root.
19
+ export interface DB {
20
+ conn: DBConnection
21
+
22
+ cms: string
23
+
24
+ dune: string
25
+
26
+ enterprise: string
27
+
28
+ feature: string
29
+ }
30
+
31
+ // Ref: Pkl class `paakd.com.packages.config.DB.DBConnection`.
32
+ export interface DBConnection {
33
+ host: string
34
+
35
+ port: number
36
+
37
+ user: string
38
+
39
+ password: string
40
+ }
41
+
42
+ // LoadFromPath loads the pkl module at the given path and evaluates it into a Feature
43
+ export const loadFromPath = async (path: string): Promise<Feature> => {
44
+ const evaluator = await pklTypescript.newEvaluator(
45
+ pklTypescript.PreconfiguredOptions
46
+ )
47
+ try {
48
+ const result = await load(evaluator, pklTypescript.FileSource(path))
49
+ return result
50
+ } finally {
51
+ evaluator.close()
52
+ }
53
+ }
54
+
55
+ export const load = (
56
+ evaluator: pklTypescript.Evaluator,
57
+ source: pklTypescript.ModuleSource
58
+ ): Promise<Feature> => evaluator.evaluateModule(source) as Promise<Feature>
@@ -0,0 +1,30 @@
1
+ /* This file was generated by `pkl-typescript` from Pkl module `paakd.com.packages.config.Redis`. */
2
+ /* DO NOT EDIT! */
3
+ /* istanbul ignore file */
4
+ /* eslint-disable */
5
+ import * as pklTypescript from "@pkl-community/pkl-typescript"
6
+
7
+ // Ref: Module root.
8
+ export interface Redis {
9
+ user: string
10
+
11
+ host: string
12
+
13
+ password: string
14
+
15
+ port: number
16
+ }
17
+
18
+ // LoadFromPath loads the pkl module at the given path and evaluates it into a Redis
19
+ export const loadFromPath = async (path: string): Promise<Redis> => {
20
+ const evaluator = await pklTypescript.newEvaluator(pklTypescript.PreconfiguredOptions);
21
+ try {
22
+ const result = await load(evaluator, pklTypescript.FileSource(path));
23
+ return result
24
+ } finally {
25
+ evaluator.close()
26
+ }
27
+ };
28
+
29
+ export const load = (evaluator: pklTypescript.Evaluator, source: pklTypescript.ModuleSource): Promise<Redis> =>
30
+ evaluator.evaluateModule(source) as Promise<Redis>;
@@ -0,0 +1,28 @@
1
+ /* This file was generated by `pkl-typescript` from Pkl module `paakd.com.packages.config.renderer.staging.CMS`. */
2
+ /* DO NOT EDIT! */
3
+ /* istanbul ignore file */
4
+ /* eslint-disable */
5
+ import * as pklTypescript from '@pkl-community/pkl-typescript'
6
+
7
+ // Ref: Module root.
8
+ export interface CMS {
9
+ output: pklTypescript.Any
10
+ }
11
+
12
+ // LoadFromPath loads the pkl module at the given path and evaluates it into a CMS
13
+ export const loadFromPath = async (path: string): Promise<CMS> => {
14
+ const evaluator = await pklTypescript.newEvaluator(
15
+ pklTypescript.PreconfiguredOptions
16
+ )
17
+ try {
18
+ const result = await load(evaluator, pklTypescript.FileSource(path))
19
+ return result
20
+ } finally {
21
+ evaluator.close()
22
+ }
23
+ }
24
+
25
+ export const load = (
26
+ evaluator: pklTypescript.Evaluator,
27
+ source: pklTypescript.ModuleSource
28
+ ): Promise<CMS> => evaluator.evaluateModule(source) as Promise<CMS>
@@ -0,0 +1,29 @@
1
+ /* This file was generated by `pkl-typescript` from Pkl module `paakd.com.packages.config.renderer.staging.DuneConfig`. */
2
+ /* DO NOT EDIT! */
3
+ /* istanbul ignore file */
4
+ /* eslint-disable */
5
+ import * as pklTypescript from '@pkl-community/pkl-typescript'
6
+
7
+ // Ref: Module root.
8
+ export interface DuneConfig {
9
+ output: pklTypescript.Any
10
+ }
11
+
12
+ // LoadFromPath loads the pkl module at the given path and evaluates it into a DuneConfig
13
+ export const loadFromPath = async (path: string): Promise<DuneConfig> => {
14
+ const evaluator = await pklTypescript.newEvaluator(
15
+ pklTypescript.PreconfiguredOptions
16
+ )
17
+ try {
18
+ const result = await load(evaluator, pklTypescript.FileSource(path))
19
+ return result
20
+ } finally {
21
+ evaluator.close()
22
+ }
23
+ }
24
+
25
+ export const load = (
26
+ evaluator: pklTypescript.Evaluator,
27
+ source: pklTypescript.ModuleSource
28
+ ): Promise<DuneConfig> =>
29
+ evaluator.evaluateModule(source) as Promise<DuneConfig>
@@ -0,0 +1,29 @@
1
+ /* This file was generated by `pkl-typescript` from Pkl module `paakd.com.packages.config.renderer.staging.workflowConfig`. */
2
+ /* DO NOT EDIT! */
3
+ /* istanbul ignore file */
4
+ /* eslint-disable */
5
+ import * as pklTypescript from '@pkl-community/pkl-typescript'
6
+
7
+ // Ref: Module root.
8
+ export interface WorkflowConfig {
9
+ output: pklTypescript.Any
10
+ }
11
+
12
+ // LoadFromPath loads the pkl module at the given path and evaluates it into a WorkflowConfig
13
+ export const loadFromPath = async (path: string): Promise<WorkflowConfig> => {
14
+ const evaluator = await pklTypescript.newEvaluator(
15
+ pklTypescript.PreconfiguredOptions
16
+ )
17
+ try {
18
+ const result = await load(evaluator, pklTypescript.FileSource(path))
19
+ return result
20
+ } finally {
21
+ evaluator.close()
22
+ }
23
+ }
24
+
25
+ export const load = (
26
+ evaluator: pklTypescript.Evaluator,
27
+ source: pklTypescript.ModuleSource
28
+ ): Promise<WorkflowConfig> =>
29
+ evaluator.evaluateModule(source) as Promise<WorkflowConfig>
@@ -0,0 +1,69 @@
1
+ /* This file was generated by `pkl-typescript` from Pkl module `paakd.com.packages.config.Shared`. */
2
+ /* DO NOT EDIT! */
3
+ /* istanbul ignore file */
4
+ /* eslint-disable */
5
+ import * as pklTypescript from "@pkl-community/pkl-typescript"
6
+
7
+ // Ref: Module root.
8
+ export interface Shared {
9
+ build: Build
10
+ }
11
+
12
+ // Ref: Pkl class `paakd.com.packages.config.Shared.Build`.
13
+ export interface Build {
14
+ enterpriseEnv: string
15
+
16
+ envPath: string
17
+
18
+ binUser: string
19
+
20
+ binUserGroup: string
21
+
22
+ binUserId: number
23
+
24
+ certPath: string
25
+
26
+ serviceDomainName: string
27
+
28
+ vaultUrl: string
29
+
30
+ goEnv: string
31
+
32
+ nodeEnv: string
33
+
34
+ shopId: string
35
+
36
+ tenant: string
37
+
38
+ envFilePath: string
39
+
40
+ shopBucketName: string
41
+
42
+ productTaxonomyIndexBucket: string
43
+
44
+ apiVersion: string
45
+
46
+ envFile: string
47
+
48
+ version: string
49
+
50
+ storefrontHost: string
51
+
52
+ storefrontPort: number
53
+
54
+ secureCookiePassword: string
55
+ }
56
+
57
+ // LoadFromPath loads the pkl module at the given path and evaluates it into a Shared
58
+ export const loadFromPath = async (path: string): Promise<Shared> => {
59
+ const evaluator = await pklTypescript.newEvaluator(pklTypescript.PreconfiguredOptions);
60
+ try {
61
+ const result = await load(evaluator, pklTypescript.FileSource(path));
62
+ return result
63
+ } finally {
64
+ evaluator.close()
65
+ }
66
+ };
67
+
68
+ export const load = (evaluator: pklTypescript.Evaluator, source: pklTypescript.ModuleSource): Promise<Shared> =>
69
+ evaluator.evaluateModule(source) as Promise<Shared>;
@@ -0,0 +1,53 @@
1
+ /* This file was generated by `pkl-typescript` from Pkl module `paakd.com.packages.config.Worker`. */
2
+ /* DO NOT EDIT! */
3
+ /* istanbul ignore file */
4
+ /* eslint-disable */
5
+ import * as pklTypescript from '@pkl-community/pkl-typescript'
6
+
7
+ // Ref: Module root.
8
+ export interface Worker {
9
+ breeze: WorkerConnect
10
+
11
+ orchestrator: WorkerConnect
12
+
13
+ mesh: WorkerConnect
14
+
15
+ tfState: WorkerConnect
16
+
17
+ tfStateShopBackend: WorkerConnect
18
+
19
+ tfStateServiceBackend: WorkerConnect
20
+
21
+ tfStateHostsBackend: WorkerConnect
22
+
23
+ orchestratorAuth: string
24
+
25
+ shopBackendAuth: string
26
+
27
+ serviceBackendAuth: string
28
+
29
+ hostBackendAuth: string
30
+ }
31
+
32
+ // Ref: Pkl class `paakd.com.packages.config.Worker.WorkerConnect`.
33
+ export interface WorkerConnect {
34
+ endpoint: string
35
+ }
36
+
37
+ // LoadFromPath loads the pkl module at the given path and evaluates it into a Worker
38
+ export const loadFromPath = async (path: string): Promise<Worker> => {
39
+ const evaluator = await pklTypescript.newEvaluator(
40
+ pklTypescript.PreconfiguredOptions
41
+ )
42
+ try {
43
+ const result = await load(evaluator, pklTypescript.FileSource(path))
44
+ return result
45
+ } finally {
46
+ evaluator.close()
47
+ }
48
+ }
49
+
50
+ export const load = (
51
+ evaluator: pklTypescript.Evaluator,
52
+ source: pklTypescript.ModuleSource
53
+ ): Promise<Worker> => evaluator.evaluateModule(source) as Promise<Worker>
package/package.json ADDED
@@ -0,0 +1,66 @@
1
+ {
2
+ "name": "@paakd/config",
3
+ "version": "0.0.2",
4
+ "private": false,
5
+ "license": "MIT",
6
+ "files": [
7
+ "src",
8
+ "gen",
9
+ "src/pkl"
10
+ ],
11
+ "exports": {
12
+ ".": "./dist/src/index.js"
13
+ },
14
+ "main": "dist/src/index.js",
15
+ "dependencies": {
16
+ "@pkl-community/pkl-typescript": "0.0.17",
17
+ "dotenv": "^17.2.0",
18
+ "@connectrpc/connect": "2.1.1"
19
+ },
20
+ "devDependencies": {
21
+ "@eslint/eslintrc": "^3.3.1",
22
+ "@eslint/js": "^9.26.0",
23
+ "@types/node": "20.19.25",
24
+ "@types/react": "19.2.5",
25
+ "@types/react-dom": "19.2.3",
26
+ "@typescript-eslint/eslint-plugin": "^8.46.4",
27
+ "@typescript-eslint/parser": "^8.46.4",
28
+ "@testing-library/jest-dom": "^6.6.3",
29
+ "@vitest/coverage-v8": "4.0.16",
30
+ "babel-eslint": "10.1.0",
31
+ "eslint": "^9.39.1",
32
+ "eslint-config-prettier": "^9.1.2",
33
+ "eslint-plugin-prettier": "^5.4.1",
34
+ "eslint-plugin-react": "7.37.3",
35
+ "eslint-plugin-testing-library": "^7.13.4",
36
+ "lint-staged": "16.1.2",
37
+ "prettier": "^3.5.3",
38
+ "typescript": "^5.8.3",
39
+ "vitest": "4.0.16",
40
+ "@paakd/eslint-config": "0.0.2",
41
+ "@paakd/typescript-config": "0.0.2"
42
+ },
43
+ "publishConfig": {
44
+ "access": "public"
45
+ },
46
+ "scripts": {
47
+ "build": "tsc",
48
+ "start:dev": "tsc --watch",
49
+ "dev:checkout": "tsc --watch",
50
+ "test": "vitest",
51
+ "test:ci": "vitest run --coverage",
52
+ "lint": "eslint ./src",
53
+ "check-types": "tsc --noEmit",
54
+ "generate": "pnpm run generate:prod && pnpm run generate:stg && pnpm run generate:dev",
55
+ "generate:prod": "npx pkl-gen-typescript src/pkl/production/**/*.pkl src/pkl/production/*.pkl -o ./gen/js/production/",
56
+ "generate:stg": "npx pkl-gen-typescript src/pkl/staging/**/*.pkl src/pkl/staging/*.pkl -o ./gen/js/staging/",
57
+ "generate:dev": "npx pkl-gen-typescript src/pkl/development/**/*.pkl src/pkl/development/*.pkl -o ./gen/js/development/",
58
+ "generate:env": "npx pkl-gen-typescript src/pkl/${BUILD_ENV:-development}/*.pkl -o ./gen/js/${BUILD_ENV:-development}/",
59
+ "generate:app-config": "pnpm run generate:app-config:prod && pnpm run generate:app-config:stg && pnpm run generate:app-config:dev",
60
+ "generate:app-config:prod": "pkl eval -m ../../ --external-resource-reader vault=bin/reader --format properties src/pkl/production/renderer/CMS.pkl",
61
+ "generate:app-config:stg": "pkl eval -m ../../ --external-resource-reader vault=bin/reader --format properties src/pkl/staging/renderer/CMS.pkl",
62
+ "generate:app-config:dev": "pkl eval -m ../../ --external-resource-reader vault=bin/reader --format properties src/pkl/development/renderer/CMS.pkl",
63
+ "generate:app-config:env": "pkl eval -m ../../ --external-resource-reader vault=bin/reader --format properties src/pkl/${BUILD_ENV:-development}/renderer/CMS.pkl",
64
+ "lint-staged": "lint-staged"
65
+ }
66
+ }