@go-labs-sg/event-tech 0.1.0 → 0.2.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.
Files changed (2) hide show
  1. package/dist/index.js +10 -6
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -14947,7 +14947,7 @@ var logoutCliSession = async ({
14947
14947
  // package.json
14948
14948
  var package_default = {
14949
14949
  name: "@go-labs-sg/event-tech",
14950
- version: "0.1.0",
14950
+ version: "0.2.0",
14951
14951
  description: "Event Tech CLI for managing Event Tech resources through the Go Labs API.",
14952
14952
  type: "module",
14953
14953
  bin: {
@@ -14973,6 +14973,7 @@ var package_default = {
14973
14973
  },
14974
14974
  devDependencies: {
14975
14975
  "@go-labs/cli-auth": "workspace:*",
14976
+ "@go-labs/event-tech-api": "workspace:*",
14976
14977
  "@go-labs/typescript-config": "workspace:*",
14977
14978
  "@types/bun": "1.4.0",
14978
14979
  "@types/node": "catalog:",
@@ -14992,7 +14993,10 @@ var package_default = {
14992
14993
  };
14993
14994
 
14994
14995
  // src/api-client.ts
14995
- import { createTRPCProxyClient, httpBatchLink } from "@trpc/client";
14996
+ import {
14997
+ createTRPCProxyClient,
14998
+ httpBatchLink
14999
+ } from "@trpc/client";
14996
15000
  import SuperJSON from "superjson";
14997
15001
  var DEFAULT_EVENT_TECH_API_BASE_URL = "https://shared-events.getout.events";
14998
15002
 
@@ -15210,7 +15214,7 @@ var writeError = (runtime2, error51) => {
15210
15214
  const message = error51 instanceof Error ? sanitizeErrorMessage(error51.message) : "Unknown error.";
15211
15215
  runtime2.stderr.write(serialize({ ok: false, error: { code: errorCode(error51), message } }));
15212
15216
  };
15213
- var runCommand = async (parsed, runtime2, credentialStore, apiBaseUrl) => {
15217
+ var runCommand = async (parsed, runtime2, credentialStore, apiBaseUrl, configureAccessToken) => {
15214
15218
  const [group, action, subAction] = parsed.positionals;
15215
15219
  let accessToken;
15216
15220
  const ensureAuthentication = async () => {
@@ -15218,7 +15222,7 @@ var runCommand = async (parsed, runtime2, credentialStore, apiBaseUrl) => {
15218
15222
  apiBaseUrl,
15219
15223
  store: credentialStore
15220
15224
  });
15221
- configureEventTechAccessToken(accessToken);
15225
+ configureAccessToken(accessToken);
15222
15226
  };
15223
15227
  if (parsed.flags.has("help") || group === "help") {
15224
15228
  assertOnlyFlags(parsed, ["help"]);
@@ -15336,7 +15340,7 @@ Waiting for approval\u2026
15336
15340
  };
15337
15341
  var runCli = async (args, runtime2 = processRuntime, credentialStore = createBunCredentialStore({
15338
15342
  product: "event-tech"
15339
- })) => {
15343
+ }), configureAccessToken = configureEventTechAccessToken) => {
15340
15344
  try {
15341
15345
  const parsed = parseArguments(args);
15342
15346
  const apiUrl = getOptionalFlag(parsed, "api-url");
@@ -15344,7 +15348,7 @@ var runCli = async (args, runtime2 = processRuntime, credentialStore = createBun
15344
15348
  configureEventTechApiBaseUrl(apiUrl);
15345
15349
  else
15346
15350
  configureEventTechApiFromEnvironment();
15347
- await runCommand(parsed, runtime2, credentialStore, getEventTechApiBaseUrl());
15351
+ await runCommand(parsed, runtime2, credentialStore, getEventTechApiBaseUrl(), configureAccessToken);
15348
15352
  return 0;
15349
15353
  } catch (error51) {
15350
15354
  writeError(runtime2, error51);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@go-labs-sg/event-tech",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Event Tech CLI for managing Event Tech resources through the Go Labs API.",
5
5
  "type": "module",
6
6
  "bin": {