@ingram-cloud/pulumi 1.5.0 → 2.0.0

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/README.md CHANGED
@@ -151,7 +151,7 @@ export const pageUrl = page.pageUrl; // https://cloud.ingram.tech/hosted/dep_…
151
151
  // Your own server (raw URL).
152
152
  new ic.IcMcpServer("thornhill-mcp", {
153
153
  ...conn, serverName: "thornhill", url: `${APP_URL}/api/mcp`,
154
- authKind: "static", secret: mcpSecret,
154
+ authKind: "bearer", secret: mcpSecret,
155
155
  });
156
156
 
157
157
  // An `oauth`-kind server forwards each end-user's own stored token; its
package/dist/resources.js CHANGED
@@ -316,7 +316,7 @@ function inputsToSnapshot(i) {
316
316
  };
317
317
  }
318
318
  async function findAgentBySlug(baseUrl, token, slug) {
319
- const res = await icRequest(baseUrl, token, "GET", "/v1/agents");
319
+ const res = await icRequest(baseUrl, token, "GET", "/v1/agents?limit=200");
320
320
  return (res.data ?? []).find((b) => b.slug === slug) ?? null;
321
321
  }
322
322
  // Signature of the snapshot currently published as the active version, or null
@@ -324,7 +324,7 @@ async function findAgentBySlug(baseUrl, token, slug) {
324
324
  async function activeSnapshotSig(baseUrl, token, id, activeVersion) {
325
325
  if (!activeVersion)
326
326
  return null;
327
- const res = await icRequest(baseUrl, token, "GET", `/v1/agents/${id}/versions`);
327
+ const res = await icRequest(baseUrl, token, "GET", `/v1/agents/${id}/versions?limit=200`);
328
328
  const v = (res.data ?? []).find((x) => x.version === activeVersion);
329
329
  if (!v)
330
330
  return null;
@@ -505,7 +505,9 @@ function resolveVsFiles(files) {
505
505
  // JSON-encodes the body); uses global FormData/File (Node ≥18).
506
506
  async function uploadFile(baseUrl, token, bytes, filename) {
507
507
  const form = new FormData();
508
- form.set("file", new File([new Uint8Array(bytes)], filename, { type: "application/octet-stream" }));
508
+ form.set("file", new File([new Uint8Array(bytes)], filename, {
509
+ type: "application/octet-stream",
510
+ }));
509
511
  form.set("purpose", "assistants");
510
512
  const res = await fetch(`${baseUrl}/v1/files`, {
511
513
  method: "POST",
@@ -583,7 +585,12 @@ const vectorStoreProvider = {
583
585
  const fileState = await syncVsFiles(i, res.id, []);
584
586
  return {
585
587
  id: res.id,
586
- outs: { ...i, vectorStoreId: res.id, fileState, filesSig: vsFilesSig(i.files) },
588
+ outs: {
589
+ ...i,
590
+ vectorStoreId: res.id,
591
+ fileState,
592
+ filesSig: vsFilesSig(i.files),
593
+ },
587
594
  };
588
595
  },
589
596
  async update(id, olds, news) {
@@ -592,7 +599,12 @@ const vectorStoreProvider = {
592
599
  await icRequest(news.baseUrl, news.token, "POST", `/v1/vector_stores/${id}`, body);
593
600
  const fileState = await syncVsFiles(news, id, olds.fileState ?? []);
594
601
  return {
595
- outs: { ...news, vectorStoreId: id, fileState, filesSig: vsFilesSig(news.files) },
602
+ outs: {
603
+ ...news,
604
+ vectorStoreId: id,
605
+ fileState,
606
+ filesSig: vsFilesSig(news.files),
607
+ },
596
608
  };
597
609
  },
598
610
  async delete(id, props) {
@@ -601,7 +613,8 @@ const vectorStoreProvider = {
601
613
  async diff(_id, olds, news) {
602
614
  const scalarChanged = (olds.name ?? undefined) !== (news.name ?? undefined) ||
603
615
  (olds.description ?? undefined) !== (news.description ?? undefined);
604
- const metaChanged = JSON.stringify(olds.metadata ?? null) !== JSON.stringify(news.metadata ?? null);
616
+ const metaChanged = JSON.stringify(olds.metadata ?? null) !==
617
+ JSON.stringify(news.metadata ?? null);
605
618
  // Compare against the sig STORED at the last apply (not a re-resolve of olds):
606
619
  // a file-backed path edits the same bytes, so re-reading olds would hash the
607
620
  // new bytes and hide the change (same reasoning as the agent diff).
@@ -703,7 +716,7 @@ const mcpProvider = makePutResource({
703
716
  class IcMcpServer extends pulumi.dynamic.Resource {
704
717
  constructor(name, args, opts) {
705
718
  super(mcpProvider, name, {
706
- authKind: args.catalog ? undefined : "static",
719
+ authKind: args.catalog ? undefined : "bearer",
707
720
  url: undefined,
708
721
  catalog: undefined,
709
722
  authProvider: undefined,
@@ -891,7 +904,7 @@ const webhookProvider = {
891
904
  // Enables `pulumi import` of a webhook a script already created (id is the
892
905
  // import id). The signing secret is intentionally not recoverable.
893
906
  async read(id, props) {
894
- const list = await icRequest(props.baseUrl, props.token, "GET", "/v1/tenant/webhooks");
907
+ const list = await icRequest(props.baseUrl, props.token, "GET", "/v1/tenant/webhooks?limit=200");
895
908
  const hit = (list.data ?? []).find((w) => w.id === id);
896
909
  // Absent from the list → gone server-side; empty id lets refresh prune it.
897
910
  if (!hit)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ingram-cloud/pulumi",
3
- "version": "1.5.0",
3
+ "version": "2.0.0",
4
4
  "description": "Pulumi dynamic resources for the Ingram Cloud /v1 API — projects, project tokens, agents, MCP servers, channels, webhooks, model keys.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://cloud.ingram.tech",
@@ -29,10 +29,10 @@
29
29
  },
30
30
  "devDependencies": {
31
31
  "@ingram-tech/oxlint-config": "^0.2.2",
32
- "@pulumi/pulumi": "^3.251.0",
32
+ "@pulumi/pulumi": "^3.253.0",
33
33
  "@types/node": "^26.1.1",
34
- "oxfmt": "^0.58.0",
35
- "oxlint": "^1.73.0",
34
+ "oxfmt": "^0.59.0",
35
+ "oxlint": "^1.74.0",
36
36
  "typescript": "^7.0.2"
37
37
  }
38
38
  }