@pd4castr/cli 0.0.8 → 0.0.10
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/index.js +23 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -983,7 +983,7 @@ async function handleCreateModelFlow(options, app, spinner, ctx, authCtx) {
|
|
|
983
983
|
await runModelIOTests(dockerImage, options, app, ctx);
|
|
984
984
|
spinner.succeed("Model I/O test passed");
|
|
985
985
|
}
|
|
986
|
-
spinner.start("Publishing new model...");
|
|
986
|
+
spinner.start("Publishing new model data...");
|
|
987
987
|
const modelConfig = await getModelConfigFromProjectConfig(ctx);
|
|
988
988
|
const model = await createModel(modelConfig, authCtx);
|
|
989
989
|
await updateProjectConfig((config) => {
|
|
@@ -992,15 +992,20 @@ async function handleCreateModelFlow(options, app, spinner, ctx, authCtx) {
|
|
|
992
992
|
config.$$revision = model.revision;
|
|
993
993
|
config.$$dockerImage = model.dockerImage;
|
|
994
994
|
});
|
|
995
|
+
spinner.succeed("Model data published successfully");
|
|
996
|
+
spinner.start(
|
|
997
|
+
"Pushing model image to registry - this may take a few minutes..."
|
|
998
|
+
);
|
|
995
999
|
const pushCredentials = await getRegistryPushCredentials(model.id, authCtx);
|
|
996
1000
|
await loginToDockerRegistry(pushCredentials);
|
|
997
1001
|
await buildDockerImage(dockerImage, ctx);
|
|
998
|
-
await pushDockerImage(dockerImage,
|
|
1002
|
+
await pushDockerImage(dockerImage, model.dockerImage);
|
|
1003
|
+
spinner.succeed("Model image pushed to registry successfully");
|
|
999
1004
|
spinner.stopAndPersist({
|
|
1000
1005
|
symbol: "\u{1F680} ",
|
|
1001
1006
|
prefixText: "\n",
|
|
1002
1007
|
suffixText: "\n",
|
|
1003
|
-
text: chalk2.bold(
|
|
1008
|
+
text: chalk2.bold(`${model.name} r${model.revision} published successfully`)
|
|
1004
1009
|
});
|
|
1005
1010
|
}
|
|
1006
1011
|
|
|
@@ -1062,7 +1067,7 @@ async function handleModelRevisionCreateFlow(options, app, spinner, ctx, authCtx
|
|
|
1062
1067
|
await runModelIOTests(dockerImage, options, app, ctx);
|
|
1063
1068
|
spinner.succeed("Model I/O test passed");
|
|
1064
1069
|
}
|
|
1065
|
-
spinner.start("Publishing new model revision...");
|
|
1070
|
+
spinner.start("Publishing new model revision data...");
|
|
1066
1071
|
const modelConfig = await getModelConfigFromProjectConfig(ctx);
|
|
1067
1072
|
const model = await createModel(modelConfig, authCtx);
|
|
1068
1073
|
await updateProjectConfig((config) => {
|
|
@@ -1071,10 +1076,15 @@ async function handleModelRevisionCreateFlow(options, app, spinner, ctx, authCtx
|
|
|
1071
1076
|
config.$$revision = model.revision;
|
|
1072
1077
|
config.$$dockerImage = model.dockerImage;
|
|
1073
1078
|
});
|
|
1079
|
+
spinner.succeed("Model revision data published successfully");
|
|
1080
|
+
spinner.start(
|
|
1081
|
+
"Pushing new model revision image to registry - this may take a few minutes..."
|
|
1082
|
+
);
|
|
1074
1083
|
const pushCredentials = await getRegistryPushCredentials(model.id, authCtx);
|
|
1075
1084
|
await loginToDockerRegistry(pushCredentials);
|
|
1076
1085
|
await buildDockerImage(dockerImage, ctx);
|
|
1077
|
-
await pushDockerImage(dockerImage,
|
|
1086
|
+
await pushDockerImage(dockerImage, model.dockerImage);
|
|
1087
|
+
spinner.succeed("New model revision image pushed to registry successfully");
|
|
1078
1088
|
spinner.stopAndPersist({
|
|
1079
1089
|
symbol: "\u{1F680} ",
|
|
1080
1090
|
prefixText: "\n",
|
|
@@ -1120,7 +1130,7 @@ async function handleModelRevisionUpdateFlow(options, app, spinner, ctx, authCtx
|
|
|
1120
1130
|
await runModelIOTests(dockerImage, options, app, ctx);
|
|
1121
1131
|
spinner.succeed("Model I/O test passed");
|
|
1122
1132
|
}
|
|
1123
|
-
spinner.start("Updating model revision...");
|
|
1133
|
+
spinner.start("Updating model revision data...");
|
|
1124
1134
|
const modelConfig = await getModelConfigFromProjectConfig(ctx);
|
|
1125
1135
|
const model = await updateModel(modelConfig, authCtx);
|
|
1126
1136
|
await updateProjectConfig((config) => {
|
|
@@ -1129,10 +1139,15 @@ async function handleModelRevisionUpdateFlow(options, app, spinner, ctx, authCtx
|
|
|
1129
1139
|
config.$$revision = model.revision;
|
|
1130
1140
|
config.$$dockerImage = model.dockerImage;
|
|
1131
1141
|
});
|
|
1142
|
+
spinner.succeed("Model revision data updated successfully");
|
|
1143
|
+
spinner.start(
|
|
1144
|
+
"Pushing updated model image to registry - this may take a few minutes..."
|
|
1145
|
+
);
|
|
1132
1146
|
const pushCredentials = await getRegistryPushCredentials(model.id, authCtx);
|
|
1133
1147
|
await loginToDockerRegistry(pushCredentials);
|
|
1134
1148
|
await buildDockerImage(dockerImage, ctx);
|
|
1135
|
-
await pushDockerImage(dockerImage,
|
|
1149
|
+
await pushDockerImage(dockerImage, model.dockerImage);
|
|
1150
|
+
spinner.succeed("Updated model image pushed to registry successfully");
|
|
1136
1151
|
spinner.stopAndPersist({
|
|
1137
1152
|
symbol: "\u{1F680} ",
|
|
1138
1153
|
prefixText: "\n",
|
|
@@ -1318,7 +1333,7 @@ import { Command } from "commander";
|
|
|
1318
1333
|
// package.json
|
|
1319
1334
|
var package_default = {
|
|
1320
1335
|
name: "@pd4castr/cli",
|
|
1321
|
-
version: "0.0.
|
|
1336
|
+
version: "0.0.10",
|
|
1322
1337
|
description: "CLI tool for creating, testing, and publishing pd4castr models",
|
|
1323
1338
|
main: "dist/index.js",
|
|
1324
1339
|
type: "module",
|