@vibedropio/publisher 0.24.0 → 0.24.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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "git-publisher",
|
|
3
3
|
"displayName": "Git Publisher",
|
|
4
|
-
"version": "0.24.
|
|
4
|
+
"version": "0.24.2",
|
|
5
5
|
"description": "Publish an app folder to the platform and keep it updated (\"publish my app\", \"update my app\", \"fetch the engineered version\").",
|
|
6
6
|
"author": { "name": "VibeDrop" },
|
|
7
7
|
"keywords": ["git", "publish", "deploy", "serverless"]
|
|
@@ -292,7 +292,7 @@ folder. Never `init` or `sync` an empty new folder in its place: that makes a se
|
|
|
292
292
|
In a sandbox (Claude Cowork, Claude Code on the web) a `NETWORK` error, or `CONNECT tunnel failed,
|
|
293
293
|
response 403`, usually means the sandbox's network does not allow the platform. Tell the person that
|
|
294
294
|
their Claude settings must allow the platform's domain and its storage (`*.s3.<region>.amazonaws.com`)
|
|
295
|
-
under Settings → Capabilities, or that their
|
|
295
|
+
under Settings → Capabilities, or that the owner of their Claude organization must, on a Team or Enterprise plan.
|
|
296
296
|
Do not retry until they say it is done.
|
|
297
297
|
|
|
298
298
|
## 6. Interrupted earlier?
|
package/dist/publisher.cjs
CHANGED
|
@@ -21945,6 +21945,10 @@ var ERROR_CODES = [
|
|
|
21945
21945
|
// code rather than FORBIDDEN: a caller can act on it (sign in again, choosing a workspace),
|
|
21946
21946
|
// and a test that could not tell it from "you may not" would prove nothing about the check.
|
|
21947
21947
|
"WORKSPACE_REQUIRED",
|
|
21948
|
+
// The person's credential names another workspace than the repository's: a terminal signed in to
|
|
21949
|
+
// another workspace (credentials ADR-0035, ADR-0043). Its own code, and not retryable: the person
|
|
21950
|
+
// signs in to the repository's workspace, and a retry would give the same answer.
|
|
21951
|
+
"WORKSPACE_MISMATCH",
|
|
21948
21952
|
// A repository is created only by the platform's application maker (the portal), for a person,
|
|
21949
21953
|
// after it has made the application the repository will belong to. Its own code: a terminal that
|
|
21950
21954
|
// meets it is an older client calling this route directly, and can say "upgrade" rather than
|
|
@@ -24201,12 +24205,25 @@ Waiting (it expires in ${Math.round(expiresInSeconds / 60)} minutes)...
|
|
|
24201
24205
|
`
|
|
24202
24206
|
);
|
|
24203
24207
|
}
|
|
24208
|
+
function givenToken(ctx, isEndpointStated) {
|
|
24209
|
+
const explicit = str2(ctx.flags["token"]);
|
|
24210
|
+
const given = explicit ?? process.env["GIT_PUBLISHER_TOKEN"];
|
|
24211
|
+
if (given && !isEndpointStated) {
|
|
24212
|
+
throw new PublisherError(
|
|
24213
|
+
"LOCAL_STATE",
|
|
24214
|
+
`a token was given (${explicit ? "--token" : "GIT_PUBLISHER_TOKEN"}) but no endpoint was stated: login does not send a given token to the endpoint that the portal names; pass --endpoint <url> or --profile <name>, or set GIT_PUBLISHER_ENDPOINT`,
|
|
24215
|
+
{ details: { next: { action: "bind-endpoint", ask: null, command: null, profiles: [] } } }
|
|
24216
|
+
);
|
|
24217
|
+
}
|
|
24218
|
+
return given;
|
|
24219
|
+
}
|
|
24204
24220
|
async function login(ctx) {
|
|
24205
24221
|
if (ctx.flags["continue"] === true) {
|
|
24206
24222
|
return continueLogin(ctx);
|
|
24207
24223
|
}
|
|
24208
24224
|
const clock = stopwatch();
|
|
24209
24225
|
const target = resolveLoginEndpoint(ctx.input);
|
|
24226
|
+
const given = givenToken(ctx, "endpoint" in target);
|
|
24210
24227
|
const endpoint = "endpoint" in target ? target.endpoint : await discoverEndpoint(portalBase(process.env, str2(ctx.flags["portal"])));
|
|
24211
24228
|
if (!endpoint) {
|
|
24212
24229
|
throw new PublisherError("INVALID_REQUEST", "login requires --endpoint (or --profile naming a stored one)");
|
|
@@ -24214,7 +24231,6 @@ async function login(ctx) {
|
|
|
24214
24231
|
clock.lap("discovery");
|
|
24215
24232
|
const profile2 = str2(ctx.flags["profile"]);
|
|
24216
24233
|
const setDefault = ctx.flags["set-default"] === true;
|
|
24217
|
-
const given = str2(ctx.flags["token"]) ?? process.env["GIT_PUBLISHER_TOKEN"];
|
|
24218
24234
|
if (given) {
|
|
24219
24235
|
return finish(ctx, { endpoint, token: given, signIn: null, profile: profile2, setDefault }, clock);
|
|
24220
24236
|
}
|
|
@@ -25217,6 +25233,7 @@ var EXIT_CODE = {
|
|
|
25217
25233
|
METHOD_NOT_ALLOWED: 1,
|
|
25218
25234
|
REF_FORBIDDEN: 1,
|
|
25219
25235
|
WORKSPACE_REQUIRED: 1,
|
|
25236
|
+
WORKSPACE_MISMATCH: 1,
|
|
25220
25237
|
OWNER_REQUIRED: 1,
|
|
25221
25238
|
REPOSITORY_NOT_FOUND: 1,
|
|
25222
25239
|
REPOSITORY_CONFLICT: 1,
|
|
@@ -25460,7 +25477,7 @@ Which endpoint a command uses, first hit wins:
|
|
|
25460
25477
|
With several profiles and no default, a command FAILS and lists them rather than guessing.
|
|
25461
25478
|
Tokens come from --token, GIT_PUBLISHER_TOKEN, or the credentials file. A token from --token or
|
|
25462
25479
|
GIT_PUBLISHER_TOKEN is used only with --endpoint, --profile, GIT_PUBLISHER_ENDPOINT or
|
|
25463
|
-
GIT_PUBLISHER_PROFILE, never with an endpoint the folder
|
|
25480
|
+
GIT_PUBLISHER_PROFILE, never with an endpoint the folder, a default profile or the portal supplied.
|
|
25464
25481
|
`;
|
|
25465
25482
|
|
|
25466
25483
|
// src/main.ts
|