@amerged/ohmyhost-cli 0.1.57 → 0.1.58

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
@@ -1,6 +1,6 @@
1
1
  # @amerged/ohmyhost-cli
2
2
 
3
- ohmyho.st cli client, version 0.1.57.
3
+ ohmyho.st cli client, version 0.1.58.
4
4
 
5
5
  ```sh
6
6
  npm install --global @amerged/ohmyhost-cli
package/dist/bin.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import { createRequire as __ohmyhostCreateRequire } from "node:module"; const require = __ohmyhostCreateRequire(import.meta.url);
3
3
  import {
4
4
  runProductionCli
5
- } from "./chunk-GODV5QDC.js";
5
+ } from "./chunk-XFL3XJWI.js";
6
6
  import "./chunk-7D2RFLWM.js";
7
7
 
8
8
  // apps/product-cli/dist/bin.js
@@ -46389,7 +46389,7 @@ function exact4(v, keys) {
46389
46389
  // apps/product-cli/package.json
46390
46390
  var package_default = {
46391
46391
  name: "@ohmyhost/product-cli",
46392
- version: "0.1.57",
46392
+ version: "0.1.58",
46393
46393
  private: true,
46394
46394
  ohmyhost: {
46395
46395
  deployment: "production",
package/dist/index.js CHANGED
@@ -106,7 +106,7 @@ import {
106
106
  selectWorkspace,
107
107
  verifiedUserId,
108
108
  workspaceOf
109
- } from "./chunk-GODV5QDC.js";
109
+ } from "./chunk-XFL3XJWI.js";
110
110
  import {
111
111
  CredentialStoreIntegrityError,
112
112
  CredentialStoreUnavailableError,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amerged/ohmyhost-cli",
3
- "version": "0.1.57",
3
+ "version": "0.1.58",
4
4
  "type": "module",
5
5
  "engines": {
6
6
  "node": ">=22"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ohmyhost/product-cli",
3
- "version": "0.1.57",
3
+ "version": "0.1.58",
4
4
  "private": true,
5
5
  "ohmyhost": {
6
6
  "deployment": "production",
@@ -5,6 +5,11 @@
5
5
  "type": "module",
6
6
  "sideEffects": false,
7
7
  "exports": {
8
+ "./signup-attribution": {
9
+ "source": "./src/signup-attribution.ts",
10
+ "types": "./dist/signup-attribution.d.ts",
11
+ "import": "./dist/signup-attribution.js"
12
+ },
8
13
  "./native-auth": {
9
14
  "source": "./src/native-auth.ts",
10
15
  "types": "./dist/native-auth.d.ts",
@@ -0,0 +1,15 @@
1
+ /** Bounded, explicit campaign parameters carried through the first account signup. */
2
+ export function isSignupUtm(value: unknown): value is Record<string, string> {
3
+ if (value === null || typeof value !== "object" || Array.isArray(value)) return false;
4
+ const entries = Object.entries(value);
5
+ return (
6
+ entries.length <= 20 &&
7
+ entries.every(
8
+ ([key, item]) =>
9
+ /^utm_[a-z0-9_]{1,60}$/u.test(key) &&
10
+ typeof item === "string" &&
11
+ Array.from(item).length <= 256,
12
+ ) &&
13
+ new TextEncoder().encode(JSON.stringify(value)).byteLength <= 1024
14
+ );
15
+ }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ohmyhost/sdk-ts",
3
- "version": "0.1.57",
3
+ "version": "0.1.58",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "exports": {
@@ -1838,10 +1838,23 @@ export const getAccountProfile = <ThrowOnError extends boolean = true>(
1838
1838
  export const recordSignupSource = <ThrowOnError extends boolean = true>(
1839
1839
  parameters: {
1840
1840
  source: string | null;
1841
+ utm?: {
1842
+ [key: string]: string;
1843
+ };
1841
1844
  },
1842
1845
  options?: Options<never, ThrowOnError>,
1843
1846
  ): RequestResult<RecordSignupSourceResponses, RecordSignupSourceErrors, ThrowOnError, "data"> => {
1844
- const params = buildClientParams([parameters], [{ args: [{ in: "body", key: "source" }] }]);
1847
+ const params = buildClientParams(
1848
+ [parameters],
1849
+ [
1850
+ {
1851
+ args: [
1852
+ { in: "body", key: "source" },
1853
+ { in: "body", key: "utm" },
1854
+ ],
1855
+ },
1856
+ ],
1857
+ );
1845
1858
  return (options?.client ?? client).put<
1846
1859
  RecordSignupSourceResponses,
1847
1860
  RecordSignupSourceErrors,
@@ -4498,6 +4498,12 @@ export type GetAccountProfileResponse =
4498
4498
  export type RecordSignupSourceData = {
4499
4499
  body: {
4500
4500
  source: string | null;
4501
+ /**
4502
+ * Optional first campaign snapshot; empty freezes an empty snapshot. Up to 20 lowercase utm_ keys, values up to 256 Unicode characters, and at most 1024 UTF-8 bytes as JSON.
4503
+ */
4504
+ utm?: {
4505
+ [key: string]: string;
4506
+ };
4501
4507
  };
4502
4508
  path?: never;
4503
4509
  query?: never;