@platforma-sdk/package-builder-lib 1.4.1 → 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 +1 -2
- package/dist/core/docker.cjs.map +1 -1
- package/dist/core/docker.js +1 -2
- 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/conda/builder.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"artifacts.d.ts","names":[],"sources":["../../../src/core/schemas/artifacts.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"artifacts.d.ts","names":[],"sources":["../../../src/core/schemas/artifacts.ts"],"mappings":";;qBAKa;YAUD,uBAAuB;qBA+BtB,gBAAc,EAAA;;;;GAIzB,EAAA,KAAA;YACU,WAAW,EAAE,aAAa;qBA6EzB,aAAW,EAAA;;;;;;;;;;GAGb,EAAA,KAAA;YACC,YAAY,EAAE,aAAa;qBAE1B,mBAAiB,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2B5B,EAAA,KAAA;YAEU,kBAAkB,EAAE,aAAa;qBAEhC,cAAY,EAAA;;;;;;;;;;;;;;;;;GAEvB,EAAA,KAAA;YACU,aAAa,EAAE,aAAa;qBAE3B,YAAU,EAAA;;;;;;;;;;;GAGrB,EAAA,KAAA;YACU,WAAW,EAAE,aAAa;qBASzB,cAAY,EAAA;;;;;;;;;;;;;;;;;GAQrB,EAAA,KAAA;YACQ,aAAa,EAAE,aAAa;qBAE3B,SAAO,EAAA;;;;;;;;;;;GAGlB,EAAA,KAAA;YACU,QAAQ,EAAE,aAAa;qBAEtB,aAAW,EAAA;;;;;;;;;;;;;;;;;;;;;;GAmBpB,EAAA,KAAA;YACQ,YAAY,EAAE,aAAa;qBAE1B,cAAY,EAAA;;;;;;GAoCvB,EAAA,KAAA;YACU,aAAa,EAAE,aAAa;qBAE3B,mBAAiB,EAAA,uBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAS5B,EAAA,KAAA;YAEU,kBAAkB,EAAE,aAAa;YAKjC,SAAS,KAAK,QAAQ;EAAS,MAAM;;YACrC,OAAO,KAAK;EAAM"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BIN_REGISTRY_DOWNLOAD_URL, BIN_REGISTRY_NAME, CONDA_DATA_LOCATION, CONDA_MICROMAMBA_VERSION, CONDA_SOURCE_ENV_SPEC_FILE, DOCKER_DOCKERFILE, DOCKER_PLACEHOLDER_PKG, DOCKER_REGISTRY } from "../../defaults.js";
|
|
2
2
|
import { AllPlatforms } from "../util.js";
|
|
3
3
|
import { z } from "zod/v4";
|
|
4
|
-
|
|
4
|
+
// src/core/schemas/artifacts.ts
|
|
5
5
|
const artifactTypes = [
|
|
6
6
|
"asset",
|
|
7
7
|
"environment",
|
|
@@ -116,7 +116,6 @@ const anyArtifactSchema = z.discriminatedUnion("type", [
|
|
|
116
116
|
dockerSchema
|
|
117
117
|
]);
|
|
118
118
|
const artifactIndexSchema = z.record(z.string(), anyArtifactSchema);
|
|
119
|
-
//#endregion
|
|
120
119
|
export { anyArtifactSchema, archiveArtifactTypes, artifactIDSchema, artifactIndexSchema, artifactTypes, assetSchema, binarySchema, condaSchema, crossplatformTypes, dockerAutogenTypes, dockerSchema, environmentSchema, isBuildable, isCrossPlatform, javaSchema, pythonSchema, pythonToolsetSchema, rSchema, registryOrRef, registrySchema, runEnvironmentTypes };
|
|
121
120
|
|
|
122
121
|
//# sourceMappingURL=artifacts.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_util = require("../util.cjs");
|
|
2
2
|
const require_artifacts = require("./artifacts.cjs");
|
|
3
3
|
let zod_v4 = require("zod/v4");
|
|
4
|
-
|
|
4
|
+
// src/core/schemas/entrypoints.ts
|
|
5
5
|
const envVarsSchema = zod_v4.z.array(zod_v4.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 = zod_v4.z.string().regex(EnyrypointReferencePattern, "entrypoint reference must contain full package name and path to the file inside");
|
|
@@ -35,7 +35,6 @@ const entrypointSchema = zod_v4.z.strictObject({
|
|
|
35
35
|
path: ["reference | asset | binary | environment | docker"]
|
|
36
36
|
});
|
|
37
37
|
const entrypointListSchema = zod_v4.z.record(zod_v4.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
|
exports.EnyrypointReferencePattern = EnyrypointReferencePattern;
|
|
40
39
|
exports.entrypointListSchema = entrypointListSchema;
|
|
41
40
|
exports.entrypointSchema = entrypointSchema;
|
|
@@ -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;
|