@platforma-sdk/package-builder-lib 1.4.0 → 1.4.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.
- package/dist/_virtual/_rolldown/runtime.cjs +2 -3
- package/dist/_virtual/_rolldown/runtime.js +1 -2
- package/dist/core/archive.cjs +1 -2
- package/dist/core/archive.cjs.map +1 -1
- package/dist/core/archive.js +1 -2
- package/dist/core/conda/builder.cjs +1 -2
- package/dist/core/conda/builder.cjs.map +1 -1
- package/dist/core/conda/builder.js +1 -2
- package/dist/core/conda/builder.js.map +1 -1
- package/dist/core/conda/validate-spec.cjs +1 -2
- package/dist/core/conda/validate-spec.js +1 -2
- package/dist/core/core.cjs +11 -12
- package/dist/core/core.cjs.map +1 -1
- package/dist/core/core.d.ts +3 -5
- package/dist/core/core.d.ts.map +1 -1
- package/dist/core/core.js +13 -13
- package/dist/core/core.js.map +1 -1
- package/dist/core/docker-conda.cjs +1 -2
- package/dist/core/docker-conda.js +1 -2
- package/dist/core/docker-coverage.cjs +1 -2
- package/dist/core/docker-coverage.d.ts +1 -3
- package/dist/core/docker-coverage.d.ts.map +1 -1
- package/dist/core/docker-coverage.js +3 -3
- package/dist/core/docker-coverage.js.map +1 -1
- package/dist/core/docker-python.cjs +1 -2
- package/dist/core/docker-python.js +1 -2
- package/dist/core/docker.cjs +3 -5
- package/dist/core/docker.cjs.map +1 -1
- package/dist/core/docker.js +3 -5
- package/dist/core/docker.js.map +1 -1
- package/dist/core/envs.cjs +1 -2
- package/dist/core/envs.d.ts +0 -1
- package/dist/core/envs.js +1 -2
- package/dist/core/package-info.cjs +13 -12
- package/dist/core/package-info.cjs.map +1 -1
- package/dist/core/package-info.d.ts +4 -5
- package/dist/core/package-info.d.ts.map +1 -1
- package/dist/core/package-info.js +13 -12
- package/dist/core/package-info.js.map +1 -1
- package/dist/core/paths.cjs +1 -2
- package/dist/core/paths.cjs.map +1 -1
- package/dist/core/paths.js +1 -2
- package/dist/core/paths.js.map +1 -1
- package/dist/core/push-guard.cjs +1 -2
- package/dist/core/push-guard.cjs.map +1 -1
- package/dist/core/push-guard.d.ts +0 -2
- package/dist/core/push-guard.d.ts.map +1 -1
- package/dist/core/push-guard.js +1 -2
- package/dist/core/resolver.cjs +1 -2
- package/dist/core/resolver.js +1 -2
- package/dist/core/schemas/artifacts.cjs +1 -2
- package/dist/core/schemas/artifacts.d.ts +1 -169
- package/dist/core/schemas/artifacts.d.ts.map +1 -1
- package/dist/core/schemas/artifacts.js +1 -2
- package/dist/core/schemas/entrypoints.cjs +1 -2
- package/dist/core/schemas/entrypoints.d.ts +1 -352
- package/dist/core/schemas/entrypoints.d.ts.map +1 -1
- package/dist/core/schemas/entrypoints.js +1 -2
- package/dist/core/schemas/sw-json.cjs +1 -2
- package/dist/core/schemas/sw-json.js +1 -2
- package/dist/core/storage.cjs +1 -2
- package/dist/core/storage.js +1 -2
- package/dist/core/sw-json-render.cjs +1 -2
- package/dist/core/sw-json-render.js +1 -2
- package/dist/core/util.cjs +1 -2
- package/dist/core/util.cjs.map +1 -1
- package/dist/core/util.d.ts +0 -1
- package/dist/core/util.js +1 -2
- package/dist/defaults.cjs +1 -2
- package/dist/defaults.d.ts +0 -1
- package/dist/defaults.js +1 -2
- package/dist/index.cjs +1 -2
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -2
- package/package.json +20 -15
- package/src/core/__tests__/docker-build.test.ts +51 -0
- package/src/core/conda/builder.ts +1 -1
- package/src/core/docker.ts +2 -7
|
@@ -1,351 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { assetType, binaryType, condaType, dockerType, environmentType, javaType, pythonType, rType, withId } from "./artifacts.js";
|
|
2
2
|
import { z } from "zod/v4";
|
|
3
|
-
declare namespace entrypoints_d_exports {
|
|
4
|
-
export { AssetEntrypoint, Entrypoint, EntrypointType, EnvironmentEntrypoint, EnyrypointReferencePattern, PackageEntrypoint, ReferenceEntrypoint, SoftwareEntrypoint, entrypointListSchema, entrypointListType, entrypointSchema, entrypointType, environmentOptionsSchema, referenceSchema, softwareOptionsSchema, softwareOptionsType };
|
|
5
|
-
}
|
|
6
|
-
export declare const EnyrypointReferencePattern: RegExp;
|
|
7
|
-
export declare const referenceSchema: z.ZodString;
|
|
8
|
-
export declare const softwareOptionsSchema: z.ZodObject<{
|
|
9
|
-
cmd: z.ZodArray<z.ZodString>;
|
|
10
|
-
envVars: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
11
|
-
}, z.core.$strict>;
|
|
12
|
-
export type softwareOptionsType = z.infer<typeof softwareOptionsSchema>;
|
|
13
|
-
export declare const environmentOptionsSchema: z.ZodObject<{
|
|
14
|
-
artifact: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
15
|
-
registry: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
16
|
-
name: z.ZodString;
|
|
17
|
-
downloadURL: z.ZodOptional<z.ZodString>;
|
|
18
|
-
storageURL: z.ZodOptional<z.ZodString>;
|
|
19
|
-
}, z.core.$strict>]>>;
|
|
20
|
-
name: z.ZodOptional<z.ZodString>;
|
|
21
|
-
version: z.ZodOptional<z.ZodString>;
|
|
22
|
-
roots: z.ZodRecord<z.ZodEnum<{
|
|
23
|
-
"linux-aarch64": "linux-aarch64";
|
|
24
|
-
"linux-x64": "linux-x64";
|
|
25
|
-
"macosx-aarch64": "macosx-aarch64";
|
|
26
|
-
"macosx-x64": "macosx-x64";
|
|
27
|
-
"windows-aarch64": "windows-aarch64";
|
|
28
|
-
"windows-x64": "windows-x64";
|
|
29
|
-
}> & z.core.$partial, z.ZodString>;
|
|
30
|
-
runtime: z.ZodEnum<{
|
|
31
|
-
R: "R";
|
|
32
|
-
java: "java";
|
|
33
|
-
python: "python";
|
|
34
|
-
}>;
|
|
35
|
-
"r-version": z.ZodOptional<z.ZodString>;
|
|
36
|
-
"python-version": z.ZodOptional<z.ZodString>;
|
|
37
|
-
"java-version": z.ZodOptional<z.ZodString>;
|
|
38
|
-
envVars: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
39
|
-
binDir: z.ZodString;
|
|
40
|
-
}, z.core.$strip>]>;
|
|
41
|
-
envVars: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
42
|
-
}, z.core.$strict>;
|
|
43
|
-
export declare const entrypointSchema: z.ZodObject<{
|
|
44
|
-
reference: z.ZodOptional<z.ZodString>;
|
|
45
|
-
asset: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
46
|
-
registry: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
47
|
-
name: z.ZodString;
|
|
48
|
-
downloadURL: z.ZodOptional<z.ZodString>;
|
|
49
|
-
storageURL: z.ZodOptional<z.ZodString>;
|
|
50
|
-
}, z.core.$strict>]>>;
|
|
51
|
-
name: z.ZodOptional<z.ZodString>;
|
|
52
|
-
version: z.ZodOptional<z.ZodString>;
|
|
53
|
-
root: z.ZodString;
|
|
54
|
-
}, z.core.$strict>]>>;
|
|
55
|
-
environment: z.ZodOptional<z.ZodObject<{
|
|
56
|
-
artifact: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
57
|
-
registry: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
58
|
-
name: z.ZodString;
|
|
59
|
-
downloadURL: z.ZodOptional<z.ZodString>;
|
|
60
|
-
storageURL: z.ZodOptional<z.ZodString>;
|
|
61
|
-
}, z.core.$strict>]>>;
|
|
62
|
-
name: z.ZodOptional<z.ZodString>;
|
|
63
|
-
version: z.ZodOptional<z.ZodString>;
|
|
64
|
-
roots: z.ZodRecord<z.ZodEnum<{
|
|
65
|
-
"linux-aarch64": "linux-aarch64";
|
|
66
|
-
"linux-x64": "linux-x64";
|
|
67
|
-
"macosx-aarch64": "macosx-aarch64";
|
|
68
|
-
"macosx-x64": "macosx-x64";
|
|
69
|
-
"windows-aarch64": "windows-aarch64";
|
|
70
|
-
"windows-x64": "windows-x64";
|
|
71
|
-
}> & z.core.$partial, z.ZodString>;
|
|
72
|
-
runtime: z.ZodEnum<{
|
|
73
|
-
R: "R";
|
|
74
|
-
java: "java";
|
|
75
|
-
python: "python";
|
|
76
|
-
}>;
|
|
77
|
-
"r-version": z.ZodOptional<z.ZodString>;
|
|
78
|
-
"python-version": z.ZodOptional<z.ZodString>;
|
|
79
|
-
"java-version": z.ZodOptional<z.ZodString>;
|
|
80
|
-
envVars: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
81
|
-
binDir: z.ZodString;
|
|
82
|
-
}, z.core.$strip>]>;
|
|
83
|
-
envVars: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
84
|
-
}, z.core.$strict>>;
|
|
85
|
-
binary: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
86
|
-
cmd: z.ZodArray<z.ZodString>;
|
|
87
|
-
envVars: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
88
|
-
artifact: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
89
|
-
registry: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
90
|
-
name: z.ZodString;
|
|
91
|
-
downloadURL: z.ZodOptional<z.ZodString>;
|
|
92
|
-
storageURL: z.ZodOptional<z.ZodString>;
|
|
93
|
-
}, z.core.$strict>]>>;
|
|
94
|
-
name: z.ZodOptional<z.ZodString>;
|
|
95
|
-
version: z.ZodOptional<z.ZodString>;
|
|
96
|
-
roots: z.ZodRecord<z.ZodEnum<{
|
|
97
|
-
"linux-aarch64": "linux-aarch64";
|
|
98
|
-
"linux-x64": "linux-x64";
|
|
99
|
-
"macosx-aarch64": "macosx-aarch64";
|
|
100
|
-
"macosx-x64": "macosx-x64";
|
|
101
|
-
"windows-aarch64": "windows-aarch64";
|
|
102
|
-
"windows-x64": "windows-x64";
|
|
103
|
-
}> & z.core.$partial, z.ZodString>;
|
|
104
|
-
type: z.ZodLiteral<"binary">;
|
|
105
|
-
}, z.core.$strip>]>;
|
|
106
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
107
|
-
cmd: z.ZodArray<z.ZodString>;
|
|
108
|
-
envVars: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
109
|
-
artifact: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
110
|
-
registry: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
111
|
-
name: z.ZodString;
|
|
112
|
-
downloadURL: z.ZodOptional<z.ZodString>;
|
|
113
|
-
storageURL: z.ZodOptional<z.ZodString>;
|
|
114
|
-
}, z.core.$strict>]>>;
|
|
115
|
-
name: z.ZodOptional<z.ZodString>;
|
|
116
|
-
version: z.ZodOptional<z.ZodString>;
|
|
117
|
-
root: z.ZodString;
|
|
118
|
-
type: z.ZodLiteral<"java">;
|
|
119
|
-
environment: z.ZodString;
|
|
120
|
-
}, z.core.$strip>]>;
|
|
121
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
122
|
-
cmd: z.ZodArray<z.ZodString>;
|
|
123
|
-
envVars: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
124
|
-
artifact: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
125
|
-
registry: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
126
|
-
name: z.ZodString;
|
|
127
|
-
downloadURL: z.ZodOptional<z.ZodString>;
|
|
128
|
-
storageURL: z.ZodOptional<z.ZodString>;
|
|
129
|
-
}, z.core.$strict>]>>;
|
|
130
|
-
name: z.ZodOptional<z.ZodString>;
|
|
131
|
-
version: z.ZodOptional<z.ZodString>;
|
|
132
|
-
root: z.ZodString;
|
|
133
|
-
"docker-registry": z.ZodDefault<z.ZodString>;
|
|
134
|
-
pkg: z.ZodDefault<z.ZodString>;
|
|
135
|
-
type: z.ZodLiteral<"python">;
|
|
136
|
-
environment: z.ZodString;
|
|
137
|
-
dependencies: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
138
|
-
toolset: z.ZodLiteral<"pip">;
|
|
139
|
-
requirements: z.ZodString;
|
|
140
|
-
}, z.core.$strict>]>>;
|
|
141
|
-
}, z.core.$strip>]>;
|
|
142
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
143
|
-
cmd: z.ZodArray<z.ZodString>;
|
|
144
|
-
envVars: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
145
|
-
artifact: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
146
|
-
registry: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
147
|
-
name: z.ZodString;
|
|
148
|
-
downloadURL: z.ZodOptional<z.ZodString>;
|
|
149
|
-
storageURL: z.ZodOptional<z.ZodString>;
|
|
150
|
-
}, z.core.$strict>]>>;
|
|
151
|
-
name: z.ZodOptional<z.ZodString>;
|
|
152
|
-
version: z.ZodOptional<z.ZodString>;
|
|
153
|
-
root: z.ZodString;
|
|
154
|
-
type: z.ZodLiteral<"R">;
|
|
155
|
-
environment: z.ZodString;
|
|
156
|
-
}, z.core.$strip>]>;
|
|
157
|
-
}, z.core.$strict>]>>;
|
|
158
|
-
conda: z.ZodOptional<z.ZodObject<{
|
|
159
|
-
cmd: z.ZodArray<z.ZodString>;
|
|
160
|
-
envVars: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
161
|
-
artifact: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
162
|
-
registry: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
163
|
-
name: z.ZodString;
|
|
164
|
-
downloadURL: z.ZodOptional<z.ZodString>;
|
|
165
|
-
storageURL: z.ZodOptional<z.ZodString>;
|
|
166
|
-
}, z.core.$strict>]>>;
|
|
167
|
-
name: z.ZodOptional<z.ZodString>;
|
|
168
|
-
version: z.ZodOptional<z.ZodString>;
|
|
169
|
-
roots: z.ZodRecord<z.ZodEnum<{
|
|
170
|
-
"linux-aarch64": "linux-aarch64";
|
|
171
|
-
"linux-x64": "linux-x64";
|
|
172
|
-
"macosx-aarch64": "macosx-aarch64";
|
|
173
|
-
"macosx-x64": "macosx-x64";
|
|
174
|
-
"windows-aarch64": "windows-aarch64";
|
|
175
|
-
"windows-x64": "windows-x64";
|
|
176
|
-
}> & z.core.$partial, z.ZodString>;
|
|
177
|
-
"docker-registry": z.ZodDefault<z.ZodString>;
|
|
178
|
-
pkg: z.ZodDefault<z.ZodString>;
|
|
179
|
-
"micromamba-version": z.ZodDefault<z.ZodString>;
|
|
180
|
-
"conda-root-dir": z.ZodDefault<z.ZodString>;
|
|
181
|
-
spec: z.ZodDefault<z.ZodString>;
|
|
182
|
-
}, z.core.$strip>]>;
|
|
183
|
-
}, z.core.$strict>>;
|
|
184
|
-
docker: z.ZodOptional<z.ZodObject<{
|
|
185
|
-
cmd: z.ZodArray<z.ZodString>;
|
|
186
|
-
envVars: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
187
|
-
artifact: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
188
|
-
registry: z.ZodDefault<z.ZodString>;
|
|
189
|
-
context: z.ZodString;
|
|
190
|
-
dockerfile: z.ZodDefault<z.ZodString>;
|
|
191
|
-
pkg: z.ZodDefault<z.ZodString>;
|
|
192
|
-
}, z.core.$strip>]>;
|
|
193
|
-
}, z.core.$strict>>;
|
|
194
|
-
}, z.core.$strict>;
|
|
195
|
-
export type entrypointType = z.infer<typeof entrypointSchema>;
|
|
196
|
-
export declare const entrypointListSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
197
|
-
reference: z.ZodOptional<z.ZodString>;
|
|
198
|
-
asset: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
199
|
-
registry: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
200
|
-
name: z.ZodString;
|
|
201
|
-
downloadURL: z.ZodOptional<z.ZodString>;
|
|
202
|
-
storageURL: z.ZodOptional<z.ZodString>;
|
|
203
|
-
}, z.core.$strict>]>>;
|
|
204
|
-
name: z.ZodOptional<z.ZodString>;
|
|
205
|
-
version: z.ZodOptional<z.ZodString>;
|
|
206
|
-
root: z.ZodString;
|
|
207
|
-
}, z.core.$strict>]>>;
|
|
208
|
-
environment: z.ZodOptional<z.ZodObject<{
|
|
209
|
-
artifact: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
210
|
-
registry: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
211
|
-
name: z.ZodString;
|
|
212
|
-
downloadURL: z.ZodOptional<z.ZodString>;
|
|
213
|
-
storageURL: z.ZodOptional<z.ZodString>;
|
|
214
|
-
}, z.core.$strict>]>>;
|
|
215
|
-
name: z.ZodOptional<z.ZodString>;
|
|
216
|
-
version: z.ZodOptional<z.ZodString>;
|
|
217
|
-
roots: z.ZodRecord<z.ZodEnum<{
|
|
218
|
-
"linux-aarch64": "linux-aarch64";
|
|
219
|
-
"linux-x64": "linux-x64";
|
|
220
|
-
"macosx-aarch64": "macosx-aarch64";
|
|
221
|
-
"macosx-x64": "macosx-x64";
|
|
222
|
-
"windows-aarch64": "windows-aarch64";
|
|
223
|
-
"windows-x64": "windows-x64";
|
|
224
|
-
}> & z.core.$partial, z.ZodString>;
|
|
225
|
-
runtime: z.ZodEnum<{
|
|
226
|
-
R: "R";
|
|
227
|
-
java: "java";
|
|
228
|
-
python: "python";
|
|
229
|
-
}>;
|
|
230
|
-
"r-version": z.ZodOptional<z.ZodString>;
|
|
231
|
-
"python-version": z.ZodOptional<z.ZodString>;
|
|
232
|
-
"java-version": z.ZodOptional<z.ZodString>;
|
|
233
|
-
envVars: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
234
|
-
binDir: z.ZodString;
|
|
235
|
-
}, z.core.$strip>]>;
|
|
236
|
-
envVars: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
237
|
-
}, z.core.$strict>>;
|
|
238
|
-
binary: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
239
|
-
cmd: z.ZodArray<z.ZodString>;
|
|
240
|
-
envVars: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
241
|
-
artifact: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
242
|
-
registry: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
243
|
-
name: z.ZodString;
|
|
244
|
-
downloadURL: z.ZodOptional<z.ZodString>;
|
|
245
|
-
storageURL: z.ZodOptional<z.ZodString>;
|
|
246
|
-
}, z.core.$strict>]>>;
|
|
247
|
-
name: z.ZodOptional<z.ZodString>;
|
|
248
|
-
version: z.ZodOptional<z.ZodString>;
|
|
249
|
-
roots: z.ZodRecord<z.ZodEnum<{
|
|
250
|
-
"linux-aarch64": "linux-aarch64";
|
|
251
|
-
"linux-x64": "linux-x64";
|
|
252
|
-
"macosx-aarch64": "macosx-aarch64";
|
|
253
|
-
"macosx-x64": "macosx-x64";
|
|
254
|
-
"windows-aarch64": "windows-aarch64";
|
|
255
|
-
"windows-x64": "windows-x64";
|
|
256
|
-
}> & z.core.$partial, z.ZodString>;
|
|
257
|
-
type: z.ZodLiteral<"binary">;
|
|
258
|
-
}, z.core.$strip>]>;
|
|
259
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
260
|
-
cmd: z.ZodArray<z.ZodString>;
|
|
261
|
-
envVars: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
262
|
-
artifact: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
263
|
-
registry: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
264
|
-
name: z.ZodString;
|
|
265
|
-
downloadURL: z.ZodOptional<z.ZodString>;
|
|
266
|
-
storageURL: z.ZodOptional<z.ZodString>;
|
|
267
|
-
}, z.core.$strict>]>>;
|
|
268
|
-
name: z.ZodOptional<z.ZodString>;
|
|
269
|
-
version: z.ZodOptional<z.ZodString>;
|
|
270
|
-
root: z.ZodString;
|
|
271
|
-
type: z.ZodLiteral<"java">;
|
|
272
|
-
environment: z.ZodString;
|
|
273
|
-
}, z.core.$strip>]>;
|
|
274
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
275
|
-
cmd: z.ZodArray<z.ZodString>;
|
|
276
|
-
envVars: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
277
|
-
artifact: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
278
|
-
registry: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
279
|
-
name: z.ZodString;
|
|
280
|
-
downloadURL: z.ZodOptional<z.ZodString>;
|
|
281
|
-
storageURL: z.ZodOptional<z.ZodString>;
|
|
282
|
-
}, z.core.$strict>]>>;
|
|
283
|
-
name: z.ZodOptional<z.ZodString>;
|
|
284
|
-
version: z.ZodOptional<z.ZodString>;
|
|
285
|
-
root: z.ZodString;
|
|
286
|
-
"docker-registry": z.ZodDefault<z.ZodString>;
|
|
287
|
-
pkg: z.ZodDefault<z.ZodString>;
|
|
288
|
-
type: z.ZodLiteral<"python">;
|
|
289
|
-
environment: z.ZodString;
|
|
290
|
-
dependencies: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
291
|
-
toolset: z.ZodLiteral<"pip">;
|
|
292
|
-
requirements: z.ZodString;
|
|
293
|
-
}, z.core.$strict>]>>;
|
|
294
|
-
}, z.core.$strip>]>;
|
|
295
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
296
|
-
cmd: z.ZodArray<z.ZodString>;
|
|
297
|
-
envVars: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
298
|
-
artifact: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
299
|
-
registry: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
300
|
-
name: z.ZodString;
|
|
301
|
-
downloadURL: z.ZodOptional<z.ZodString>;
|
|
302
|
-
storageURL: z.ZodOptional<z.ZodString>;
|
|
303
|
-
}, z.core.$strict>]>>;
|
|
304
|
-
name: z.ZodOptional<z.ZodString>;
|
|
305
|
-
version: z.ZodOptional<z.ZodString>;
|
|
306
|
-
root: z.ZodString;
|
|
307
|
-
type: z.ZodLiteral<"R">;
|
|
308
|
-
environment: z.ZodString;
|
|
309
|
-
}, z.core.$strip>]>;
|
|
310
|
-
}, z.core.$strict>]>>;
|
|
311
|
-
conda: z.ZodOptional<z.ZodObject<{
|
|
312
|
-
cmd: z.ZodArray<z.ZodString>;
|
|
313
|
-
envVars: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
314
|
-
artifact: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
315
|
-
registry: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
316
|
-
name: z.ZodString;
|
|
317
|
-
downloadURL: z.ZodOptional<z.ZodString>;
|
|
318
|
-
storageURL: z.ZodOptional<z.ZodString>;
|
|
319
|
-
}, z.core.$strict>]>>;
|
|
320
|
-
name: z.ZodOptional<z.ZodString>;
|
|
321
|
-
version: z.ZodOptional<z.ZodString>;
|
|
322
|
-
roots: z.ZodRecord<z.ZodEnum<{
|
|
323
|
-
"linux-aarch64": "linux-aarch64";
|
|
324
|
-
"linux-x64": "linux-x64";
|
|
325
|
-
"macosx-aarch64": "macosx-aarch64";
|
|
326
|
-
"macosx-x64": "macosx-x64";
|
|
327
|
-
"windows-aarch64": "windows-aarch64";
|
|
328
|
-
"windows-x64": "windows-x64";
|
|
329
|
-
}> & z.core.$partial, z.ZodString>;
|
|
330
|
-
"docker-registry": z.ZodDefault<z.ZodString>;
|
|
331
|
-
pkg: z.ZodDefault<z.ZodString>;
|
|
332
|
-
"micromamba-version": z.ZodDefault<z.ZodString>;
|
|
333
|
-
"conda-root-dir": z.ZodDefault<z.ZodString>;
|
|
334
|
-
spec: z.ZodDefault<z.ZodString>;
|
|
335
|
-
}, z.core.$strip>]>;
|
|
336
|
-
}, z.core.$strict>>;
|
|
337
|
-
docker: z.ZodOptional<z.ZodObject<{
|
|
338
|
-
cmd: z.ZodArray<z.ZodString>;
|
|
339
|
-
envVars: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
340
|
-
artifact: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
341
|
-
registry: z.ZodDefault<z.ZodString>;
|
|
342
|
-
context: z.ZodString;
|
|
343
|
-
dockerfile: z.ZodDefault<z.ZodString>;
|
|
344
|
-
pkg: z.ZodDefault<z.ZodString>;
|
|
345
|
-
}, z.core.$strip>]>;
|
|
346
|
-
}, z.core.$strict>>;
|
|
347
|
-
}, z.core.$strict>>;
|
|
348
|
-
export type entrypointListType = z.infer<typeof entrypointListSchema>;
|
|
349
3
|
export interface ReferenceEntrypoint {
|
|
350
4
|
type: "reference";
|
|
351
5
|
name: string;
|
|
@@ -371,9 +25,4 @@ export interface EnvironmentEntrypoint {
|
|
|
371
25
|
}
|
|
372
26
|
export type PackageEntrypoint = AssetEntrypoint | SoftwareEntrypoint | EnvironmentEntrypoint;
|
|
373
27
|
export type Entrypoint = ReferenceEntrypoint | PackageEntrypoint;
|
|
374
|
-
export type EntrypointType = Extract<Entrypoint, {
|
|
375
|
-
type: string;
|
|
376
|
-
}>["type"];
|
|
377
|
-
//#endregion
|
|
378
|
-
export { entrypoints_d_exports };
|
|
379
28
|
//# sourceMappingURL=entrypoints.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entrypoints.d.ts","names":[],"sources":["../../../src/core/schemas/entrypoints.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"entrypoints.d.ts","names":["artifacts.assetType","artifacts.withId","artifacts.binaryType","artifacts.condaType","artifacts.javaType","artifacts.pythonType","artifacts.rType","artifacts.dockerType","artifacts.environmentType"],"sources":["../../../src/core/schemas/entrypoints.ts"],"mappings":";;iBAiHiB;EACf;EACA;EACA;;iBAGe;EACf;EACA;EACA,UAAUC,OAAiBD;;iBAGZ;EACf;EACA;EACA,UAAUC,OACNC,aACAC,YACAC,WACAC,aACAC,QACAC;EAEJ;EACA;;iBAGe;EACf;EACA;EACA,UAAUN,OAAiBO;EAC3B;;YAGU,oBAAoB,kBAAkB,qBAAqB;YAC3D,aAAa,sBAAsB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { toInt } from "../util.js";
|
|
2
2
|
import { assetSchema, binarySchema, condaSchema, dockerSchema, environmentSchema, javaSchema, pythonSchema, rSchema } from "./artifacts.js";
|
|
3
3
|
import { z } from "zod/v4";
|
|
4
|
-
|
|
4
|
+
// src/core/schemas/entrypoints.ts
|
|
5
5
|
const envVarsSchema = z.array(z.string().regex(/=/, "full environment variable specification is required: <var-name>=<var-value>, e.g.: IS_CI=yes"));
|
|
6
6
|
const EnyrypointReferencePattern = /^(?<fullName>(?:(?<scope>@[a-z0-9-.]+)\/)?(?<name>[a-z0-9-.]+))\/(?<path>.*)$/;
|
|
7
7
|
const referenceSchema = z.string().regex(EnyrypointReferencePattern, "entrypoint reference must contain full package name and path to the file inside");
|
|
@@ -35,7 +35,6 @@ const entrypointSchema = z.strictObject({
|
|
|
35
35
|
path: ["reference | asset | binary | environment | docker"]
|
|
36
36
|
});
|
|
37
37
|
const entrypointListSchema = z.record(z.string().regex(/[-_a-z0-9.]/).describe("name of entrypoint descriptor, client should import to use this entrypoint (assets.importSoftware)"), entrypointSchema);
|
|
38
|
-
//#endregion
|
|
39
38
|
export { EnyrypointReferencePattern, entrypointListSchema, entrypointSchema, environmentOptionsSchema, referenceSchema, softwareOptionsSchema };
|
|
40
39
|
|
|
41
40
|
//# sourceMappingURL=entrypoints.js.map
|
|
@@ -2,7 +2,7 @@ const require_defaults = require("../../defaults.cjs");
|
|
|
2
2
|
const require_util = require("../util.cjs");
|
|
3
3
|
const require_artifacts = require("./artifacts.cjs");
|
|
4
4
|
let zod_v4 = require("zod/v4");
|
|
5
|
-
|
|
5
|
+
// src/core/schemas/sw-json.ts
|
|
6
6
|
const remoteLocationSchema = zod_v4.z.object({
|
|
7
7
|
registry: zod_v4.z.string().describe("name of the registry to use for package download"),
|
|
8
8
|
package: zod_v4.z.string().describe("full package path in registry, e.g. 'common/jdk/21.0.2.13.1-{os}-{arch}.tgz")
|
|
@@ -104,7 +104,6 @@ const swJsonSchema = zod_v4.z.object({
|
|
|
104
104
|
message: "entrypoint cannot point to several packages at once: choose 'environment', 'binary', 'asset', 'conda' or 'local'",
|
|
105
105
|
path: ["environment | binary | asset | conda | local"]
|
|
106
106
|
});
|
|
107
|
-
//#endregion
|
|
108
107
|
exports.assetSchema = assetSchema;
|
|
109
108
|
exports.binaryPackageSchema = binaryPackageSchema;
|
|
110
109
|
exports.commonPackageSettingsSchema = commonPackageSettingsSchema;
|
|
@@ -2,7 +2,7 @@ import { CONDA_DATA_LOCATION, DOCKER_PLACEHOLDER_PKG } from "../../defaults.js";
|
|
|
2
2
|
import { toInt } from "../util.js";
|
|
3
3
|
import { runEnvironmentTypes } from "./artifacts.js";
|
|
4
4
|
import { z } from "zod/v4";
|
|
5
|
-
|
|
5
|
+
// src/core/schemas/sw-json.ts
|
|
6
6
|
const remoteLocationSchema = z.object({
|
|
7
7
|
registry: z.string().describe("name of the registry to use for package download"),
|
|
8
8
|
package: z.string().describe("full package path in registry, e.g. 'common/jdk/21.0.2.13.1-{os}-{arch}.tgz")
|
|
@@ -104,7 +104,6 @@ const swJsonSchema = z.object({
|
|
|
104
104
|
message: "entrypoint cannot point to several packages at once: choose 'environment', 'binary', 'asset', 'conda' or 'local'",
|
|
105
105
|
path: ["environment | binary | asset | conda | local"]
|
|
106
106
|
});
|
|
107
|
-
//#endregion
|
|
108
107
|
export { assetSchema, binaryPackageSchema, commonPackageSettingsSchema, condaPackageSchema, dockerSchema, javaPackageSettingsSchema, localLocationSchema, localSoftwareSchema, pythonPackageSettingsSchema, rPackageSettingsSchema, remoteLocationSchema, remoteSoftwareSchema, runDependencyJavaSchema, runDependencyPythonSchema, runDependencyRSchema, runEnvironmentSchema, swJsonSchema };
|
|
109
108
|
|
|
110
109
|
//# sourceMappingURL=sw-json.js.map
|
package/dist/core/storage.cjs
CHANGED
|
@@ -6,7 +6,7 @@ let node_path_posix = require("node:path/posix");
|
|
|
6
6
|
node_path_posix = require_runtime.__toESM(node_path_posix, 1);
|
|
7
7
|
let _aws_sdk_client_s3 = require("@aws-sdk/client-s3");
|
|
8
8
|
let _aws_sdk_lib_storage = require("@aws-sdk/lib-storage");
|
|
9
|
-
|
|
9
|
+
// src/core/storage.ts
|
|
10
10
|
async function objectExists(client, bucket, key) {
|
|
11
11
|
try {
|
|
12
12
|
await client.headObject({
|
|
@@ -83,7 +83,6 @@ async function initByUrl(address, pkgRoot) {
|
|
|
83
83
|
throw require_util.wrapErr(e, `failed to init storage driver from URL`);
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
|
-
//#endregion
|
|
87
86
|
exports.S3Storage = S3Storage;
|
|
88
87
|
exports.initByUrl = initByUrl;
|
|
89
88
|
|
package/dist/core/storage.js
CHANGED
|
@@ -3,7 +3,7 @@ import path from "node:path";
|
|
|
3
3
|
import pathPosix from "node:path/posix";
|
|
4
4
|
import { S3 } from "@aws-sdk/client-s3";
|
|
5
5
|
import { Upload } from "@aws-sdk/lib-storage";
|
|
6
|
-
|
|
6
|
+
// src/core/storage.ts
|
|
7
7
|
async function objectExists(client, bucket, key) {
|
|
8
8
|
try {
|
|
9
9
|
await client.headObject({
|
|
@@ -80,7 +80,6 @@ async function initByUrl(address, pkgRoot) {
|
|
|
80
80
|
throw wrapErr(e, `failed to init storage driver from URL`);
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
|
-
//#endregion
|
|
84
83
|
export { S3Storage, initByUrl };
|
|
85
84
|
|
|
86
85
|
//# sourceMappingURL=storage.js.map
|
|
@@ -9,7 +9,7 @@ let node_fs = require("node:fs");
|
|
|
9
9
|
node_fs = require_runtime.__toESM(node_fs, 1);
|
|
10
10
|
let node_path = require("node:path");
|
|
11
11
|
node_path = require_runtime.__toESM(node_path, 1);
|
|
12
|
-
|
|
12
|
+
// src/core/sw-json-render.ts
|
|
13
13
|
var SwJsonRenderer = class {
|
|
14
14
|
logger;
|
|
15
15
|
pkgInfo;
|
|
@@ -366,7 +366,6 @@ function requireArtifactType(pkg, type, errMsg) {
|
|
|
366
366
|
if (errMsg) errMsg = `${errMsg}: `;
|
|
367
367
|
throw require_util.CLIError(`${errMsg}artifact '${pkg.id}' ('${pkg.type}') is not '${type}'`);
|
|
368
368
|
}
|
|
369
|
-
//#endregion
|
|
370
369
|
exports.SwJsonRenderer = SwJsonRenderer;
|
|
371
370
|
exports.compiledAssetSuffix = compiledAssetSuffix;
|
|
372
371
|
exports.compiledSoftwareSuffix = compiledSoftwareSuffix;
|
|
@@ -6,7 +6,7 @@ import { descriptorFilePath, resolveRunEnvironment } from "./resolver.js";
|
|
|
6
6
|
import { descriptorHasNoDockerVariant } from "./docker-coverage.js";
|
|
7
7
|
import fs from "node:fs";
|
|
8
8
|
import path from "node:path";
|
|
9
|
-
|
|
9
|
+
// src/core/sw-json-render.ts
|
|
10
10
|
var SwJsonRenderer = class {
|
|
11
11
|
logger;
|
|
12
12
|
pkgInfo;
|
|
@@ -363,7 +363,6 @@ function requireArtifactType(pkg, type, errMsg) {
|
|
|
363
363
|
if (errMsg) errMsg = `${errMsg}: `;
|
|
364
364
|
throw CLIError(`${errMsg}artifact '${pkg.id}' ('${pkg.type}') is not '${type}'`);
|
|
365
365
|
}
|
|
366
|
-
//#endregion
|
|
367
366
|
export { SwJsonRenderer, compiledAssetSuffix, compiledSoftwareSuffix, readBuiltArtifactInfo, writeBuiltArtifactInfo };
|
|
368
367
|
|
|
369
368
|
//# sourceMappingURL=sw-json-render.js.map
|
package/dist/core/util.cjs
CHANGED
|
@@ -9,7 +9,7 @@ let node_os = require("node:os");
|
|
|
9
9
|
node_os = require_runtime.__toESM(node_os, 1);
|
|
10
10
|
let winston = require("winston");
|
|
11
11
|
winston = require_runtime.__toESM(winston, 1);
|
|
12
|
-
|
|
12
|
+
// src/core/util.ts
|
|
13
13
|
var util_exports = /* @__PURE__ */ require_runtime.__exportAll({
|
|
14
14
|
AllPlatforms: () => AllPlatforms,
|
|
15
15
|
AllSoftwareSources: () => AllSoftwareSources,
|
|
@@ -288,7 +288,6 @@ var CLIErrorClass = class extends Error {
|
|
|
288
288
|
function CLIError(msg) {
|
|
289
289
|
return new CLIErrorClass(msg);
|
|
290
290
|
}
|
|
291
|
-
//#endregion
|
|
292
291
|
exports.AllPlatforms = AllPlatforms;
|
|
293
292
|
exports.AllSoftwareSources = AllSoftwareSources;
|
|
294
293
|
exports.Arches = Arches;
|
package/dist/core/util.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.cjs","names":["fs","path","os"],"sources":["../../src/core/util.ts"],"sourcesContent":["import * as path from \"node:path\";\nimport * as os from \"node:os\";\nimport fs from \"node:fs\";\nimport type { Hash } from \"node:crypto\";\nimport { createHash } from \"node:crypto\";\nimport winston from \"winston\";\nimport type { z } from \"zod/v4\";\nimport * as envs from \"./envs\";\n\nexport const packageJsonName = \"package.json\";\nexport const softwareConfigName = \"package.json\";\n\nexport function assertNever(_a: never): never {\n throw new Error(`code logic error: assertNever() call for ${JSON.stringify(_a)}`);\n}\n\nexport function trimPrefix(str: string, prefix: string): string {\n if (str.startsWith(prefix)) {\n return str.slice(prefix.length);\n }\n return str;\n}\n\nexport function trimSuffix(str: string, suffix: string): string {\n if (str.endsWith(suffix)) {\n return str.slice(0, -suffix.length);\n }\n return str;\n}\n\nexport function hashDirMetaSync(folder: string, hasher?: Hash): Hash {\n const hash = hasher ? hasher : createHash(\"sha256\");\n const info = fs.readdirSync(folder, { withFileTypes: true });\n\n for (const item of info) {\n const fullPath = path.join(folder, item.name);\n\n if (item.isFile()) {\n const statInfo = fs.statSync(fullPath);\n const fileInfo = `${fullPath}:${statInfo.size}:${statInfo.mtimeMs}`;\n hash.update(fileInfo);\n } else if (item.isDirectory()) {\n hashDirMetaSync(fullPath, hash);\n }\n }\n\n return hash;\n}\n\nexport function hashDirSync(rootDir: string, hasher?: Hash, subdir?: string): Hash {\n const hash = hasher ? hasher : createHash(\"sha256\");\n const folder = path.join(rootDir, subdir ?? \".\");\n\n // Sort for a host-independent hash: readdir enumeration order is not guaranteed.\n const info = fs\n .readdirSync(folder, { withFileTypes: true })\n .sort((a, b) => (a.name < b.name ? -1 : a.name > b.name ? 1 : 0));\n\n for (const item of info) {\n const relPath = path.join(subdir ?? \".\", item.name);\n const fullPath = path.join(folder, item.name);\n\n hash.update(relPath);\n\n if (item.isFile()) {\n const fileDescriptor = fs.openSync(fullPath, \"r\");\n const buffer = Buffer.alloc(65536);\n let bytesRead: number;\n\n while ((bytesRead = fs.readSync(fileDescriptor, buffer, 0, buffer.length, null)) !== 0) {\n hash.update(buffer.subarray(0, bytesRead));\n }\n\n fs.closeSync(fileDescriptor);\n } else if (item.isDirectory()) {\n // Keep rootDir fixed and pass the accumulated relPath so nested entries hash under their\n // full path from the root — otherwise `dirA/` + `file` collides with `dirA/file`.\n hashDirSync(rootDir, hash, relPath);\n }\n }\n\n return hash;\n}\n\n//\n// Creates all intermediate directories down to given <dirPath>.\n//\nexport function ensureDirsExist(dirPath: string) {\n if (fs.existsSync(dirPath)) {\n return;\n }\n const parentDir = path.dirname(dirPath);\n ensureDirsExist(parentDir);\n fs.mkdirSync(dirPath);\n}\n\nexport function findPackageRoot(logger: winston.Logger, startPath?: string): string {\n if (!startPath) {\n startPath = process.cwd();\n }\n logger.debug(`Detecting package root...`);\n const pkgRoot = searchPathUp(startPath, startPath, packageJsonName);\n logger.debug(` package root found at '${pkgRoot}'`);\n\n return pkgRoot;\n}\n\nexport function findNodeModules(logger: winston.Logger, startPath?: string): string {\n if (!startPath) {\n startPath = process.cwd();\n }\n logger.debug(`Detecting 'node_modules' directory...`);\n const nodeModules = searchPathUp(startPath, startPath, \"node_modules\");\n logger.debug(` 'node_modules' found at '${nodeModules}'`);\n\n return path.join(nodeModules, \"node_modules\");\n}\n\nexport function findInstalledModule(\n logger: winston.Logger,\n packageName: string,\n startPath?: string,\n): string {\n const nodeModules = findNodeModules(logger, startPath);\n const packagePath = path.resolve(nodeModules, packageName);\n\n if (!fs.existsSync(packagePath)) {\n throw CLIError(\n `package '${packageName}' not found in '${nodeModules}'. Did you forget to add it as a dependency?`,\n );\n }\n\n return packagePath;\n}\n\nfunction searchPathUp(startPath: string, pathToCheck: string, itemToCheck: string): string {\n const itemPath = path.resolve(pathToCheck, itemToCheck);\n\n if (fs.existsSync(itemPath)) {\n return pathToCheck;\n }\n\n const parentDir = path.dirname(pathToCheck);\n if (parentDir === pathToCheck || pathToCheck === \"\") {\n throw CLIError(\n `failed to find '${itemToCheck}' file in any of parent directories starting from '${startPath}'`,\n );\n }\n\n return searchPathUp(startPath, parentDir, itemToCheck);\n}\n\nexport function createLogger(level: string = \"debug\"): winston.Logger {\n if (envs.isCI() && envs.isRunnerDebug()) {\n level = \"debug\";\n }\n\n return winston.createLogger({\n level: level,\n\n format: winston.format.printf(({ level, message }) => {\n const indent = \" \".repeat(level.length + 2); // For ': ' after the level\n if (typeof message !== \"string\") {\n const messageJson = JSON.stringify(message);\n throw new Error(`logger message ${messageJson} is not a string`);\n }\n const indentedMessage = message\n .split(\"\\n\")\n .map((line: string, index: number) => (index === 0 ? line : indent + line))\n .join(\"\\n\");\n\n const colorize = (l: string) => winston.format.colorize().colorize(l, l);\n\n return `${colorize(level)}: ${indentedMessage}`;\n }),\n\n transports: [\n new winston.transports.Console({\n stderrLevels: [\"error\", \"warn\", \"info\", \"debug\"],\n handleExceptions: true,\n }),\n ],\n });\n}\n\nexport function rSplit(input: string, delimiter: string, limit?: number): string[] {\n const parts = input.split(delimiter);\n if (!limit || parts.length <= limit) {\n return parts;\n }\n\n return [parts.slice(0, -limit + 1).join(delimiter), ...parts.slice(-limit + 1)];\n}\n\nconst replaceDuplicateSlashes = new RegExp(\"//+\", \"g\");\nexport function urlJoin(url: string, appendPath: string): string {\n const u = new URL(url, \"file:/nonexistent-9672674c/\");\n if (u.protocol === \"file:\" && u.pathname.startsWith(\"/nonexistent-9672674c/\")) {\n throw new Error(`string '${url}' is not valid URL`);\n }\n\n u.pathname = u.pathname + \"/\" + appendPath;\n u.pathname = u.pathname.replaceAll(replaceDuplicateSlashes, \"/\");\n return u.toString();\n}\n\nexport function wrapErr(e: any, msg: string): any {\n if (!(e instanceof Error)) {\n return e;\n }\n\n const wrappedError = new Error(`${msg}: ${e.message}`);\n wrappedError.name = e.name;\n wrappedError.stack = e.stack;\n // Copy any additional custom properties\n Object.assign(wrappedError, e);\n return wrappedError;\n}\n\n/**\n * Converts any value to integer number 1 if value is truthful and 0 otherwice.\n * Provides simple way to count values that are defined in an object:\n * toInt(options.a) + toInt(options.b) + toInt(options.c) === 1\n * @param input: any\n * @returns number - '1' or '0'\n */\nexport function toInt(input: any): number {\n return input ? 1 : 0;\n}\n\nexport const OSes = [\"linux\", \"macosx\", \"windows\"] as const;\nexport type OSType = (typeof OSes)[number];\n\nexport function currentOS(): OSType {\n const platform = os.platform();\n switch (platform) {\n case \"darwin\":\n return \"macosx\";\n case \"linux\":\n return \"linux\";\n case \"win32\":\n return \"windows\";\n default:\n throw CLIError(\n `operating system '${platform}' is not currently supported by Platforma ecosystem. The list of OSes supported: ` +\n JSON.stringify(OSes),\n );\n }\n}\n\nexport const Arches = [\"x64\", \"aarch64\"] as const;\nexport type ArchType = (typeof Arches)[number];\n\nexport function currentArch(): ArchType {\n const arch = os.arch();\n switch (arch) {\n case \"arm64\":\n return \"aarch64\";\n case \"x64\":\n return \"x64\";\n default:\n throw CLIError(\n `processor architecture '${arch}' is not currently supported by Platforma ecosystem. The list of architectures supported: ` +\n JSON.stringify(Arches),\n );\n }\n}\n\n// Combinartions of OS and architecture, Platforma supports.\nexport const AllPlatforms: `${OSType}-${ArchType}`[] = [\n \"linux-x64\",\n \"linux-aarch64\",\n \"macosx-x64\",\n \"macosx-aarch64\",\n \"windows-x64\",\n] as const;\nexport type PlatformType = (typeof AllPlatforms)[number];\n\nexport function splitPlatform(platform: PlatformType): { os: OSType; arch: ArchType } {\n const parts = platform.split(\"-\");\n\n return {\n os: parts[0] as OSType,\n arch: parts[1] as ArchType,\n };\n}\n\nexport function joinPlatform(os: OSType, arch: ArchType): PlatformType {\n return `${os}-${arch}`;\n}\n\nexport function isPlatformSupported(os: OSType, arch: ArchType): boolean {\n return AllPlatforms.includes(`${os}-${arch}`);\n}\n\nexport function currentPlatform(): PlatformType {\n return `${currentOS()}-${currentArch()}`;\n}\n\nexport const AllSoftwareSources = [\"archive\", \"docker\"] as const; // add 'image', '<whatever>' here when supported\nexport type SoftwareSource = (typeof AllSoftwareSources)[number];\n\nexport type BuildMode = \"dev-local\" | \"dev-remote\" | \"release\";\n\nexport function isDevMode(mode: BuildMode): mode is \"dev-local\" | \"dev-remote\" {\n return mode === \"dev-local\" || mode === \"dev-remote\";\n}\n\nexport function producesRegistryDescriptor(mode: BuildMode): mode is \"dev-remote\" | \"release\" {\n return mode === \"dev-remote\" || mode === \"release\";\n}\n\n// Resolve a `--do`/`--no-do` (or PL_*_/PL_*_NO_ env) tri-state: explicit disable wins, then enable,\n// else the default.\nexport function shouldDoAction(opts: {\n default: boolean;\n enable?: boolean;\n disable?: boolean;\n}): boolean {\n if (opts.disable) return false;\n if (opts.enable) return true;\n return opts.default;\n}\n\nexport type artifactID = {\n package: string;\n name: string;\n};\n\nexport function artifactIDFromString(s: string): artifactID {\n const parts = s.split(\":\", 2);\n if (parts.length < 2) {\n throw CLIError(\n `string '${s}' is not an artifact ID (artifact ID format is <packageName>:<artifactName>)`,\n );\n }\n return {\n package: parts[0],\n name: parts[1],\n };\n}\n\nexport function artifactIDToString(a: artifactID): string {\n return `${a.package}:${a.name}`;\n}\n\nexport function indentText(txt: string, indent: string | number, skipFirstLine: boolean = false) {\n indent = typeof indent === \"number\" ? \" \".repeat(indent) : indent;\n\n return txt\n .split(\"\\n\")\n .map((line, index) => (index === 0 && skipFirstLine ? line : `${indent}${line}`))\n .join(\"\\n\");\n}\n\nexport const formatZodIssues = (\n issues: z.core.$ZodIssue[],\n i: string = \"\",\n p: PropertyKey[] = [],\n): string => {\n const _errors: string[] = [];\n\n const formatSubpath = (path: PropertyKey[], prefix: string = \"\") => {\n let pp = path.join(\".\");\n if (pp != \"\" && p.length > 0) pp = `.${pp}`;\n if (pp != \"\") pp = `${prefix}${pp}`;\n return pp;\n };\n\n const addItem = (item: string) => _errors.push(indentText(item, i));\n\n for (const issue of issues) {\n if (issue.code === \"invalid_union\") {\n addItem(`✖ Expected one of several possible values`);\n const path = formatSubpath(issue.path, \"\");\n addItem(` → at '${path}':`);\n for (const errGrp of issue.errors) {\n _errors.push(formatZodIssues(errGrp, `${i} `, [...p, ...issue.path]));\n }\n } else if (issue.code === \"invalid_element\" || issue.code === \"invalid_key\") {\n addItem(`✖ ${issue.code.replaceAll(\"_\", \" \")}:`);\n _errors.push(formatZodIssues(issue.issues, `${i} `, [...p, ...issue.path]));\n } else if (issue.code === \"invalid_type\") {\n const path = formatSubpath(issue.path, \" \");\n const prefix = `✖ (${issue.expected})${path}: `;\n const msg = indentText(issue.message, Math.min(prefix.length, 20), true);\n addItem(`${prefix}${msg}`);\n } else {\n const path = formatSubpath(issue.path, \" \");\n const prefix = `✖ (${issue.code.replaceAll(\"_\", \" \")})${path}: `;\n const msg = indentText(issue.message, Math.min(prefix.length, 20), true);\n addItem(`${prefix}${msg}`);\n }\n }\n\n return _errors.join(\"\\n\");\n};\n\n// User-facing CLI error. The top-level handler (bin/run.mjs) prints its\n// message without a stack trace and exits non-zero.\nexport class CLIErrorClass extends Error {\n constructor(msg: string | Error) {\n super(typeof msg === \"string\" ? msg : msg.message);\n this.name = \"CLIError\";\n }\n}\n\nexport function CLIError(msg: string | Error): CLIErrorClass {\n return new CLIErrorClass(msg);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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E7D,QAAQ,GAAG,SADC,WAAW,MAAM,SAAS,KAAK,IAAI,OAAO,QAAQ,EAAE,GAAG,IAC7C,GAAG;CAC3B;CAGF,OAAO,QAAQ,KAAK,IAAI;AAC1B;AAIA,IAAa,gBAAb,cAAmC,MAAM;CACvC,YAAY,KAAqB;EAC/B,MAAM,OAAO,QAAQ,WAAW,MAAM,IAAI,OAAO;EACjD,KAAK,OAAO;CACd;AACF;AAEA,SAAgB,SAAS,KAAoC;CAC3D,OAAO,IAAI,cAAc,GAAG;AAC9B"}
|
|
1
|
+
{"version":3,"file":"util.cjs","names":["createHash","fs","path","os"],"sources":["../../src/core/util.ts"],"sourcesContent":["import * as path from \"node:path\";\nimport * as os from \"node:os\";\nimport fs from \"node:fs\";\nimport type { Hash } from \"node:crypto\";\nimport { createHash } from \"node:crypto\";\nimport winston from \"winston\";\nimport type { z } from \"zod/v4\";\nimport * as envs from \"./envs\";\n\nexport const packageJsonName = \"package.json\";\nexport const softwareConfigName = \"package.json\";\n\nexport function assertNever(_a: never): never {\n throw new Error(`code logic error: assertNever() call for ${JSON.stringify(_a)}`);\n}\n\nexport function trimPrefix(str: string, prefix: string): string {\n if (str.startsWith(prefix)) {\n return str.slice(prefix.length);\n }\n return str;\n}\n\nexport function trimSuffix(str: string, suffix: string): string {\n if (str.endsWith(suffix)) {\n return str.slice(0, -suffix.length);\n }\n return str;\n}\n\nexport function hashDirMetaSync(folder: string, hasher?: Hash): Hash {\n const hash = hasher ? hasher : createHash(\"sha256\");\n const info = fs.readdirSync(folder, { withFileTypes: true });\n\n for (const item of info) {\n const fullPath = path.join(folder, item.name);\n\n if (item.isFile()) {\n const statInfo = fs.statSync(fullPath);\n const fileInfo = `${fullPath}:${statInfo.size}:${statInfo.mtimeMs}`;\n hash.update(fileInfo);\n } else if (item.isDirectory()) {\n hashDirMetaSync(fullPath, hash);\n }\n }\n\n return hash;\n}\n\nexport function hashDirSync(rootDir: string, hasher?: Hash, subdir?: string): Hash {\n const hash = hasher ? hasher : createHash(\"sha256\");\n const folder = path.join(rootDir, subdir ?? \".\");\n\n // Sort for a host-independent hash: readdir enumeration order is not guaranteed.\n const info = fs\n .readdirSync(folder, { withFileTypes: true })\n .sort((a, b) => (a.name < b.name ? -1 : a.name > b.name ? 1 : 0));\n\n for (const item of info) {\n const relPath = path.join(subdir ?? \".\", item.name);\n const fullPath = path.join(folder, item.name);\n\n hash.update(relPath);\n\n if (item.isFile()) {\n const fileDescriptor = fs.openSync(fullPath, \"r\");\n const buffer = Buffer.alloc(65536);\n let bytesRead: number;\n\n while ((bytesRead = fs.readSync(fileDescriptor, buffer, 0, buffer.length, null)) !== 0) {\n hash.update(buffer.subarray(0, bytesRead));\n }\n\n fs.closeSync(fileDescriptor);\n } else if (item.isDirectory()) {\n // Keep rootDir fixed and pass the accumulated relPath so nested entries hash under their\n // full path from the root — otherwise `dirA/` + `file` collides with `dirA/file`.\n hashDirSync(rootDir, hash, relPath);\n }\n }\n\n return hash;\n}\n\n//\n// Creates all intermediate directories down to given <dirPath>.\n//\nexport function ensureDirsExist(dirPath: string) {\n if (fs.existsSync(dirPath)) {\n return;\n }\n const parentDir = path.dirname(dirPath);\n ensureDirsExist(parentDir);\n fs.mkdirSync(dirPath);\n}\n\nexport function findPackageRoot(logger: winston.Logger, startPath?: string): string {\n if (!startPath) {\n startPath = process.cwd();\n }\n logger.debug(`Detecting package root...`);\n const pkgRoot = searchPathUp(startPath, startPath, packageJsonName);\n logger.debug(` package root found at '${pkgRoot}'`);\n\n return pkgRoot;\n}\n\nexport function findNodeModules(logger: winston.Logger, startPath?: string): string {\n if (!startPath) {\n startPath = process.cwd();\n }\n logger.debug(`Detecting 'node_modules' directory...`);\n const nodeModules = searchPathUp(startPath, startPath, \"node_modules\");\n logger.debug(` 'node_modules' found at '${nodeModules}'`);\n\n return path.join(nodeModules, \"node_modules\");\n}\n\nexport function findInstalledModule(\n logger: winston.Logger,\n packageName: string,\n startPath?: string,\n): string {\n const nodeModules = findNodeModules(logger, startPath);\n const packagePath = path.resolve(nodeModules, packageName);\n\n if (!fs.existsSync(packagePath)) {\n throw CLIError(\n `package '${packageName}' not found in '${nodeModules}'. Did you forget to add it as a dependency?`,\n );\n }\n\n return packagePath;\n}\n\nfunction searchPathUp(startPath: string, pathToCheck: string, itemToCheck: string): string {\n const itemPath = path.resolve(pathToCheck, itemToCheck);\n\n if (fs.existsSync(itemPath)) {\n return pathToCheck;\n }\n\n const parentDir = path.dirname(pathToCheck);\n if (parentDir === pathToCheck || pathToCheck === \"\") {\n throw CLIError(\n `failed to find '${itemToCheck}' file in any of parent directories starting from '${startPath}'`,\n );\n }\n\n return searchPathUp(startPath, parentDir, itemToCheck);\n}\n\nexport function createLogger(level: string = \"debug\"): winston.Logger {\n if (envs.isCI() && envs.isRunnerDebug()) {\n level = \"debug\";\n }\n\n return winston.createLogger({\n level: level,\n\n format: winston.format.printf(({ level, message }) => {\n const indent = \" \".repeat(level.length + 2); // For ': ' after the level\n if (typeof message !== \"string\") {\n const messageJson = JSON.stringify(message);\n throw new Error(`logger message ${messageJson} is not a string`);\n }\n const indentedMessage = message\n .split(\"\\n\")\n .map((line: string, index: number) => (index === 0 ? line : indent + line))\n .join(\"\\n\");\n\n const colorize = (l: string) => winston.format.colorize().colorize(l, l);\n\n return `${colorize(level)}: ${indentedMessage}`;\n }),\n\n transports: [\n new winston.transports.Console({\n stderrLevels: [\"error\", \"warn\", \"info\", \"debug\"],\n handleExceptions: true,\n }),\n ],\n });\n}\n\nexport function rSplit(input: string, delimiter: string, limit?: number): string[] {\n const parts = input.split(delimiter);\n if (!limit || parts.length <= limit) {\n return parts;\n }\n\n return [parts.slice(0, -limit + 1).join(delimiter), ...parts.slice(-limit + 1)];\n}\n\nconst replaceDuplicateSlashes = new RegExp(\"//+\", \"g\");\nexport function urlJoin(url: string, appendPath: string): string {\n const u = new URL(url, \"file:/nonexistent-9672674c/\");\n if (u.protocol === \"file:\" && u.pathname.startsWith(\"/nonexistent-9672674c/\")) {\n throw new Error(`string '${url}' is not valid URL`);\n }\n\n u.pathname = u.pathname + \"/\" + appendPath;\n u.pathname = u.pathname.replaceAll(replaceDuplicateSlashes, \"/\");\n return u.toString();\n}\n\nexport function wrapErr(e: any, msg: string): any {\n if (!(e instanceof Error)) {\n return e;\n }\n\n const wrappedError = new Error(`${msg}: ${e.message}`);\n wrappedError.name = e.name;\n wrappedError.stack = e.stack;\n // Copy any additional custom properties\n Object.assign(wrappedError, e);\n return wrappedError;\n}\n\n/**\n * Converts any value to integer number 1 if value is truthful and 0 otherwice.\n * Provides simple way to count values that are defined in an object:\n * toInt(options.a) + toInt(options.b) + toInt(options.c) === 1\n * @param input: any\n * @returns number - '1' or '0'\n */\nexport function toInt(input: any): number {\n return input ? 1 : 0;\n}\n\nexport const OSes = [\"linux\", \"macosx\", \"windows\"] as const;\nexport type OSType = (typeof OSes)[number];\n\nexport function currentOS(): OSType {\n const platform = os.platform();\n switch (platform) {\n case \"darwin\":\n return \"macosx\";\n case \"linux\":\n return \"linux\";\n case \"win32\":\n return \"windows\";\n default:\n throw CLIError(\n `operating system '${platform}' is not currently supported by Platforma ecosystem. The list of OSes supported: ` +\n JSON.stringify(OSes),\n );\n }\n}\n\nexport const Arches = [\"x64\", \"aarch64\"] as const;\nexport type ArchType = (typeof Arches)[number];\n\nexport function currentArch(): ArchType {\n const arch = os.arch();\n switch (arch) {\n case \"arm64\":\n return \"aarch64\";\n case \"x64\":\n return \"x64\";\n default:\n throw CLIError(\n `processor architecture '${arch}' is not currently supported by Platforma ecosystem. The list of architectures supported: ` +\n JSON.stringify(Arches),\n );\n }\n}\n\n// Combinartions of OS and architecture, Platforma supports.\nexport const AllPlatforms: `${OSType}-${ArchType}`[] = [\n \"linux-x64\",\n \"linux-aarch64\",\n \"macosx-x64\",\n \"macosx-aarch64\",\n \"windows-x64\",\n] as const;\nexport type PlatformType = (typeof AllPlatforms)[number];\n\nexport function splitPlatform(platform: PlatformType): { os: OSType; arch: ArchType } {\n const parts = platform.split(\"-\");\n\n return {\n os: parts[0] as OSType,\n arch: parts[1] as ArchType,\n };\n}\n\nexport function joinPlatform(os: OSType, arch: ArchType): PlatformType {\n return `${os}-${arch}`;\n}\n\nexport function isPlatformSupported(os: OSType, arch: ArchType): boolean {\n return AllPlatforms.includes(`${os}-${arch}`);\n}\n\nexport function currentPlatform(): PlatformType {\n return `${currentOS()}-${currentArch()}`;\n}\n\nexport const AllSoftwareSources = [\"archive\", \"docker\"] as const; // add 'image', '<whatever>' here when supported\nexport type SoftwareSource = (typeof AllSoftwareSources)[number];\n\nexport type BuildMode = \"dev-local\" | \"dev-remote\" | \"release\";\n\nexport function isDevMode(mode: BuildMode): mode is \"dev-local\" | \"dev-remote\" {\n return mode === \"dev-local\" || mode === \"dev-remote\";\n}\n\nexport function producesRegistryDescriptor(mode: BuildMode): mode is \"dev-remote\" | \"release\" {\n return mode === \"dev-remote\" || mode === \"release\";\n}\n\n// Resolve a `--do`/`--no-do` (or PL_*_/PL_*_NO_ env) tri-state: explicit disable wins, then enable,\n// else the default.\nexport function shouldDoAction(opts: {\n default: boolean;\n enable?: boolean;\n disable?: boolean;\n}): boolean {\n if (opts.disable) return false;\n if (opts.enable) return true;\n return opts.default;\n}\n\nexport type artifactID = {\n package: string;\n name: string;\n};\n\nexport function artifactIDFromString(s: string): artifactID {\n const parts = s.split(\":\", 2);\n if (parts.length < 2) {\n throw CLIError(\n `string '${s}' is not an artifact ID (artifact ID format is <packageName>:<artifactName>)`,\n );\n }\n return {\n package: parts[0],\n name: parts[1],\n };\n}\n\nexport function artifactIDToString(a: artifactID): string {\n return `${a.package}:${a.name}`;\n}\n\nexport function indentText(txt: string, indent: string | number, skipFirstLine: boolean = false) {\n indent = typeof indent === \"number\" ? \" \".repeat(indent) : indent;\n\n return txt\n .split(\"\\n\")\n .map((line, index) => (index === 0 && skipFirstLine ? line : `${indent}${line}`))\n .join(\"\\n\");\n}\n\nexport const formatZodIssues = (\n issues: z.core.$ZodIssue[],\n i: string = \"\",\n p: PropertyKey[] = [],\n): string => {\n const _errors: string[] = [];\n\n const formatSubpath = (path: PropertyKey[], prefix: string = \"\") => {\n let pp = path.join(\".\");\n if (pp != \"\" && p.length > 0) pp = `.${pp}`;\n if (pp != \"\") pp = `${prefix}${pp}`;\n return pp;\n };\n\n const addItem = (item: string) => _errors.push(indentText(item, i));\n\n for (const issue of issues) {\n if (issue.code === \"invalid_union\") {\n addItem(`✖ Expected one of several possible values`);\n const path = formatSubpath(issue.path, \"\");\n addItem(` → at '${path}':`);\n for (const errGrp of issue.errors) {\n _errors.push(formatZodIssues(errGrp, `${i} `, [...p, ...issue.path]));\n }\n } else if (issue.code === \"invalid_element\" || issue.code === \"invalid_key\") {\n addItem(`✖ ${issue.code.replaceAll(\"_\", \" \")}:`);\n _errors.push(formatZodIssues(issue.issues, `${i} `, [...p, ...issue.path]));\n } else if (issue.code === \"invalid_type\") {\n const path = formatSubpath(issue.path, \" \");\n const prefix = `✖ (${issue.expected})${path}: `;\n const msg = indentText(issue.message, Math.min(prefix.length, 20), true);\n addItem(`${prefix}${msg}`);\n } else {\n const path = formatSubpath(issue.path, \" \");\n const prefix = `✖ (${issue.code.replaceAll(\"_\", \" \")})${path}: `;\n const msg = indentText(issue.message, Math.min(prefix.length, 20), true);\n addItem(`${prefix}${msg}`);\n }\n }\n\n return _errors.join(\"\\n\");\n};\n\n// User-facing CLI error. The top-level handler (bin/run.mjs) prints its\n// message without a stack trace and exits non-zero.\nexport class CLIErrorClass extends Error {\n constructor(msg: string | Error) {\n super(typeof msg === \"string\" ? msg : msg.message);\n this.name = \"CLIError\";\n }\n}\n\nexport function CLIError(msg: string | Error): CLIErrorClass {\n return new CLIErrorClass(msg);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,MAAa,kBAAkB;AAC/B,MAAa,qBAAqB;AAElC,SAAgB,YAAY,IAAkB;CAC5C,MAAM,IAAI,MAAM,4CAA4C,KAAK,UAAU,EAAE,G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AAI;AAC1B;AAIA,IAAa,gBAAb,cAAmC,MAAM;CACvC,YAAY,KAAqB;EAC/B,MAAM,OAAO,QAAQ,WAAW,MAAM,IAAI,OAAO;EACjD,KAAK,OAAO;CACd;AACF;AAEA,SAAgB,SAAS,KAAoC;CAC3D,OAAO,IAAI,cAAc,GAAG;AAC9B"}
|
package/dist/core/util.d.ts
CHANGED
package/dist/core/util.js
CHANGED
|
@@ -5,7 +5,7 @@ import * as path$1 from "node:path";
|
|
|
5
5
|
import { createHash } from "node:crypto";
|
|
6
6
|
import * as os from "node:os";
|
|
7
7
|
import winston from "winston";
|
|
8
|
-
|
|
8
|
+
// src/core/util.ts
|
|
9
9
|
var util_exports = /* @__PURE__ */ __exportAll({
|
|
10
10
|
AllPlatforms: () => AllPlatforms,
|
|
11
11
|
AllSoftwareSources: () => AllSoftwareSources,
|
|
@@ -284,7 +284,6 @@ var CLIErrorClass = class extends Error {
|
|
|
284
284
|
function CLIError(msg) {
|
|
285
285
|
return new CLIErrorClass(msg);
|
|
286
286
|
}
|
|
287
|
-
//#endregion
|
|
288
287
|
export { AllPlatforms, AllSoftwareSources, Arches, CLIError, CLIErrorClass, OSes, artifactIDFromString, artifactIDToString, assertNever, createLogger, currentArch, currentOS, currentPlatform, ensureDirsExist, findInstalledModule, findNodeModules, findPackageRoot, formatZodIssues, hashDirMetaSync, hashDirSync, indentText, isDevMode, isPlatformSupported, joinPlatform, packageJsonName, producesRegistryDescriptor, rSplit, shouldDoAction, softwareConfigName, splitPlatform, toInt, trimPrefix, trimSuffix, urlJoin, util_exports, wrapErr };
|
|
289
288
|
|
|
290
289
|
//# sourceMappingURL=util.js.map
|
package/dist/defaults.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/defaults.ts
|
|
2
2
|
var defaults_exports = /* @__PURE__ */ require("./_virtual/_rolldown/runtime.cjs").__exportAll({
|
|
3
3
|
AWS_DEV_PROFILE: () => AWS_DEV_PROFILE,
|
|
4
4
|
BIN_REGISTRY_DOWNLOAD_URL: () => BIN_REGISTRY_DOWNLOAD_URL,
|
|
@@ -41,7 +41,6 @@ const DEV_DOCKER_REGISTRY = "public.ecr.aws/miresearch/pl-containers";
|
|
|
41
41
|
const DEV_DOCKER_PUSH_TARGET = `ecr://${DEV_DOCKER_REGISTRY}`;
|
|
42
42
|
const AWS_DEV_PROFILE = "research-poweruser";
|
|
43
43
|
const DOCKER_BUILD_PLATFORM = "linux/amd64";
|
|
44
|
-
//#endregion
|
|
45
44
|
exports.AWS_DEV_PROFILE = AWS_DEV_PROFILE;
|
|
46
45
|
exports.BIN_REGISTRY_DOWNLOAD_URL = BIN_REGISTRY_DOWNLOAD_URL;
|
|
47
46
|
exports.BIN_REGISTRY_NAME = BIN_REGISTRY_NAME;
|