artifactpass 0.1.2-rc.1 → 0.1.2-rc.3

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/cli.mjs CHANGED
@@ -32287,6 +32287,7 @@ var deployArtifactShare = async (input, dependencies) => {
32287
32287
  const resourceIdentities = {};
32288
32288
  let approvedBindingDigest;
32289
32289
  let approvedRemoteLifecycle;
32290
+ dependencies.onProgress?.("Checking Cloudflare authorization");
32290
32291
  const verified = await dependencies.client.verifyToken();
32291
32292
  if (verified.status !== "active") throw new Error("Cloudflare API token is not active");
32292
32293
  if (input.dryRun) {
@@ -32331,9 +32332,11 @@ var deployArtifactShare = async (input, dependencies) => {
32331
32332
  approvedBindingDigest = createHash3("sha256").update(JSON.stringify(approved.binding)).digest("hex");
32332
32333
  approvedRemoteLifecycle = approved.binding.remote?.lifecycle;
32333
32334
  }
32335
+ dependencies.onProgress?.("Preparing Cloudflare resources");
32334
32336
  try {
32335
32337
  let privateAccess = input.privateAccess;
32336
32338
  if (privateAccess?.providerAction === "create-after-approval") {
32339
+ dependencies.onProgress?.("Configuring email sign-in");
32337
32340
  const createdProvider = await dependencies.client.request(
32338
32341
  `/accounts/${input.accountId}/access/identity_providers`,
32339
32342
  {
@@ -32357,6 +32360,7 @@ var deployArtifactShare = async (input, dependencies) => {
32357
32360
  resourceIdentities.identity_provider_id = createdProvider.id;
32358
32361
  changed.push("Email verification provider");
32359
32362
  }
32363
+ dependencies.onProgress?.("Checking domain and Worker settings");
32360
32364
  const workersSubdomain = await readWorkersSubdomain(input, dependencies);
32361
32365
  if (workersSubdomain === null) {
32362
32366
  if (input.productionExistingResources === true) {
@@ -32382,6 +32386,7 @@ var deployArtifactShare = async (input, dependencies) => {
32382
32386
  const collision = domains.find((domain2) => domain2.hostname === input.hostname && domain2.service !== serviceName);
32383
32387
  if (collision !== void 0) throw new Error(`Hostname is already attached to Worker ${collision.service}`);
32384
32388
  const databaseName = serviceName;
32389
+ dependencies.onProgress?.("Preparing D1 database");
32385
32390
  const databases = await dependencies.client.request(
32386
32391
  `/accounts/${input.accountId}/d1/database?name=${encodeURIComponent(databaseName)}`
32387
32392
  );
@@ -32396,6 +32401,7 @@ var deployArtifactShare = async (input, dependencies) => {
32396
32401
  changed.push("D1 database");
32397
32402
  }
32398
32403
  resourceIdentities.d1_database_id = database.uuid;
32404
+ dependencies.onProgress?.("Preparing R2 storage");
32399
32405
  const buckets = await dependencies.client.request(
32400
32406
  `/accounts/${input.accountId}/r2/buckets`
32401
32407
  );
@@ -32409,6 +32415,7 @@ var deployArtifactShare = async (input, dependencies) => {
32409
32415
  changed.push("R2 bucket");
32410
32416
  }
32411
32417
  resourceIdentities.r2_bucket_name = serviceName;
32418
+ dependencies.onProgress?.("Configuring publisher access");
32412
32419
  const applications = await dependencies.client.request(
32413
32420
  `/accounts/${input.accountId}/access/apps`
32414
32421
  );
@@ -32575,6 +32582,7 @@ var deployArtifactShare = async (input, dependencies) => {
32575
32582
  );
32576
32583
  }
32577
32584
  const commandEnvironment = { CLOUDFLARE_ACCOUNT_ID: input.accountId };
32585
+ dependencies.onProgress?.("Applying D1 migrations");
32578
32586
  await runner("wrangler", [
32579
32587
  "d1",
32580
32588
  "migrations",
@@ -32603,6 +32611,7 @@ var deployArtifactShare = async (input, dependencies) => {
32603
32611
  ], { env: commandEnvironment });
32604
32612
  changed.push("D1 ownership marker");
32605
32613
  }
32614
+ dependencies.onProgress?.("Applying R2 retention policy");
32606
32615
  await runner("wrangler", [
32607
32616
  "r2",
32608
32617
  "bucket",
@@ -32655,6 +32664,7 @@ var deployArtifactShare = async (input, dependencies) => {
32655
32664
  GITHUB_OAUTH_CLIENT_SECRET: input.publicAuth.githubClientSecret
32656
32665
  }), { mode: 384 });
32657
32666
  }
32667
+ dependencies.onProgress?.(`Deploying ArtifactPass to ${input.hostname}`);
32658
32668
  await runner("wrangler", [
32659
32669
  "deploy",
32660
32670
  "--config",
@@ -32670,6 +32680,7 @@ var deployArtifactShare = async (input, dependencies) => {
32670
32680
  const fetchImplementation = dependencies.fetch ?? fetchCloudflareDeploymentRoute;
32671
32681
  const sleep2 = dependencies.sleep ?? (async (milliseconds) => await new Promise((resolveSleep) => setTimeout(resolveSleep, milliseconds)));
32672
32682
  const readinessTimeoutMilliseconds = dependencies.readinessTimeoutMilliseconds ?? 1e4;
32683
+ dependencies.onProgress?.(`Waiting for ${input.hostname} to become ready`);
32673
32684
  await fetchAfterDeploymentPropagation(
32674
32685
  fetchImplementation,
32675
32686
  `${baseUrl}/health`,
@@ -32816,6 +32827,7 @@ var deployArtifactShare = async (input, dependencies) => {
32816
32827
  }
32817
32828
  };
32818
32829
  }
32830
+ dependencies.onProgress?.("Verifying private sign-in");
32819
32831
  const protectedUpload = await fetchAfterDeploymentPropagation(
32820
32832
  fetchImplementation,
32821
32833
  `${baseUrl}/upload`,
@@ -32942,7 +32954,8 @@ var runDeployCommand = async (input, dependencies) => {
32942
32954
  client,
32943
32955
  deploymentRoot: dependencies.deploymentRoot,
32944
32956
  ...dependencies.fetch === void 0 ? {} : { fetch: dependencies.fetch },
32945
- runner: credentialedRunner
32957
+ runner: credentialedRunner,
32958
+ ...dependencies.onProgress === void 0 ? {} : { onProgress: dependencies.onProgress }
32946
32959
  });
32947
32960
  } catch (error51) {
32948
32961
  if (error51 instanceof DeploymentMutationError) {
@@ -35856,7 +35869,19 @@ var createTerminalPrompt = async () => {
35856
35869
  })),
35857
35870
  intro: (message) => clack.intro(message, promptOptions),
35858
35871
  note: (message, title) => clack.note(message, title, promptOptions),
35859
- outro: (message) => clack.outro(message, promptOptions)
35872
+ outro: (message) => clack.outro(message, promptOptions),
35873
+ activity: (message) => {
35874
+ const activity = clack.spinner({
35875
+ indicator: "timer",
35876
+ output: process.stderr
35877
+ });
35878
+ activity.start(message);
35879
+ return {
35880
+ update: (nextMessage) => activity.message(nextMessage),
35881
+ succeed: (finalMessage) => activity.stop(finalMessage),
35882
+ fail: (finalMessage) => activity.error(finalMessage)
35883
+ };
35884
+ }
35860
35885
  };
35861
35886
  };
35862
35887
  var promptForText = async (prompt, message, placeholder) => prompt.text === void 0 ? prompt.question(`${message}
@@ -36141,7 +36166,7 @@ var runDoctor = async (deploymentRoot2, runner = runProcess) => {
36141
36166
  // package.json
36142
36167
  var package_default = {
36143
36168
  name: "artifactpass",
36144
- version: "0.1.2-rc.1",
36169
+ version: "0.1.2-rc.3",
36145
36170
  description: "Install and connect ArtifactPass for compatible AI agent systems.",
36146
36171
  repository: {
36147
36172
  type: "git",
@@ -37122,7 +37147,7 @@ var authorizeCloudflareOAuth = async (clientId, profile, dependencies) => {
37122
37147
 
37123
37148
  // src/cloudflare/oauth-client-config.ts
37124
37149
  var resolveCloudflareOAuthClientConfiguration = (environment = process.env) => {
37125
- const requestedEnvironment = environment.ARTIFACTPASS_CLOUDFLARE_OAUTH_ENVIRONMENT ?? (package_default.version.includes("-") ? "staging" : "production");
37150
+ const requestedEnvironment = environment.ARTIFACTPASS_CLOUDFLARE_OAUTH_ENVIRONMENT ?? "production";
37126
37151
  if (requestedEnvironment !== "staging" && requestedEnvironment !== "production") {
37127
37152
  throw new Error("ARTIFACTPASS_CLOUDFLARE_OAUTH_ENVIRONMENT must be staging or production");
37128
37153
  }
@@ -38358,13 +38383,16 @@ var runPrivateDeploymentApproval = async (initialState, dependencies) => {
38358
38383
  manifest_digest: manifestDigest
38359
38384
  }, "deploying", now());
38360
38385
  state = await persist(state, dependencies);
38386
+ const activity = dependencies.prompt.activity?.("Starting private deployment. This can take a few minutes");
38387
+ if (activity === void 0) dependencies.prompt.write("Starting private deployment. This can take a few minutes.\n");
38361
38388
  try {
38362
38389
  const result = await runDeploy(deploymentInputFromPrivateSpecification(specification, {
38363
38390
  dryRun: false,
38364
38391
  approveManifest: approvalPath
38365
38392
  }), {
38366
38393
  deploymentRoot: dependencies.deploymentRoot,
38367
- resolveToken: dependencies.authorization.resolveAccessToken
38394
+ resolveToken: dependencies.authorization.resolveAccessToken,
38395
+ onProgress: (message) => activity?.update(message)
38368
38396
  });
38369
38397
  const receipt = createPrivateDeploymentReceipt(specification, result, now());
38370
38398
  const receiptPath = await writePrivateDeploymentReceipt(dependencies.root, receipt);
@@ -38382,6 +38410,7 @@ var runPrivateDeploymentApproval = async (initialState, dependencies) => {
38382
38410
  verified_at: result.verification?.verifiedAt
38383
38411
  }, "complete", now());
38384
38412
  state = await persist(state, dependencies);
38413
+ activity?.succeed(`ArtifactPass is live at ${result.baseUrl}`);
38385
38414
  return {
38386
38415
  action: "complete",
38387
38416
  state,
@@ -38391,6 +38420,7 @@ var runPrivateDeploymentApproval = async (initialState, dependencies) => {
38391
38420
  message: `Private ArtifactPass is ready at ${result.baseUrl}.`
38392
38421
  };
38393
38422
  } catch (error51) {
38423
+ activity?.fail("Deployment stopped");
38394
38424
  const reason = safeFailure(error51);
38395
38425
  if (reason.includes("approval manifest no longer matches")) {
38396
38426
  state = invalidatePrivateDeploymentCheckpoints(
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "artifactpass",
3
- "version": "0.1.2-rc.1",
3
+ "version": "0.1.2-rc.3",
4
4
  "displayName": "ArtifactPass",
5
5
  "description": "Share local Markdown, HTML, and PDF artifacts through a private temporary link.",
6
6
  "author": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "artifactpass",
3
- "version": "0.1.2-rc.1",
3
+ "version": "0.1.2-rc.3",
4
4
  "description": "Share local Markdown, HTML, and PDF artifacts through a private temporary link.",
5
5
  "author": {
6
6
  "name": "Lorde Builds"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "artifactpass",
3
- "version": "0.1.2-rc.1",
3
+ "version": "0.1.2-rc.3",
4
4
  "displayName": "ArtifactPass",
5
5
  "description": "Share local Markdown, HTML, and PDF artifacts through a private temporary link.",
6
6
  "longDescription": "Publishes a file from an explicitly allowed workspace through ArtifactPass and reads supported shared artifacts in bounded chunks.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "artifactpass",
3
- "version": "0.1.2-rc.1",
3
+ "version": "0.1.2-rc.3",
4
4
  "description": "Install and connect ArtifactPass for compatible AI agent systems.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -30,8 +30,8 @@
30
30
  "typescript": "^7.0.2",
31
31
  "vitest": "^4.1.10",
32
32
  "artifact-protocol": "0.0.0",
33
- "agent-bridge": "0.0.0",
34
- "artifact-service": "0.0.0"
33
+ "artifact-service": "0.0.0",
34
+ "agent-bridge": "0.0.0"
35
35
  },
36
36
  "scripts": {
37
37
  "build": "pnpm --dir ../../apps/artifact-service build && node ../../scripts/build-setup-package.mjs",