@intentic/constants 1.232.0 → 1.234.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
@@ -10,7 +10,7 @@ The ports, paths and image references the daemon, the CLIs and the desktop app a
10
10
  ## Key files
11
11
 
12
12
  - [src/index.ts](src/index.ts), the constants themselves: ports, the fixed directory layouts, legal and origin
13
- values. Isomorphic, imported by browser code, so nothing here may touch `node:fs`.
13
+ values, and the install-script table. Isomorphic, imported by browser code, so nothing here may touch `node:fs`.
14
14
  - [src/node.mjs](src/node.mjs): `repoRoot()` and `packageRoot()`, behind the `@intentic/constants/node`
15
15
  subpath. Node-only, and hand-written JavaScript rather than compiled TypeScript.
16
16
 
@@ -29,6 +29,12 @@ by nothing. Walking up to a marker has no such coupling, so a file can move anyw
29
29
 
30
30
  - If a constant is used by exactly one package, it belongs in that package. This is for the ones that cross a
31
31
  boundary.
32
+ - `INSTALL_SCRIPTS` is the vanity path → asset table for `intentic.dev/connect` and its siblings, and it crosses
33
+ the widest boundary in here: the **app** writes those URLs into the one-liners it hands out, the **site
34
+ worker** is what answers them, and the **site's own pages** link to them so a reader can check a script before
35
+ running it. Three hand-synced lists in three packages meant a renamed script served the site's 404 page into
36
+ somebody's `sh`. Use `installScriptUrl()` / `installScriptPath()` rather than joining the parts: two vanity
37
+ paths (`/rebuild`, `/update`) deliberately serve one script, so neither half is derivable from the other.
32
38
  - `src/node.mjs` is plain JavaScript with a hand-written `.d.mts` **on purpose**. Its earliest callers run before
33
39
  anything is built (the prepass is what performs the build, and the byte and path checks run ahead of it) so a
34
40
  helper importable only from `dist/` is one they cannot import at all, which is how a second copy of the walk
package/dist/index.d.ts CHANGED
@@ -11,6 +11,73 @@ export declare const LEGAL_ENTITY_ADDRESS = "";
11
11
  export declare const LEGAL_ENTITY_TAX_ID = "";
12
12
  export declare const PLATFORM_HOSTING_LOCATION = "";
13
13
  export declare const PLATFORM_WEB_ORIGIN = "https://app.intentic.dev";
14
+ export declare const PLATFORM_SITE_ORIGIN = "https://intentic.dev";
15
+ export declare const INSTALL_SCRIPTS_DIR = "_site/site/public/scripts";
16
+ export declare const INSTALL_SCRIPTS: {
17
+ readonly sh: {
18
+ readonly path: "/connect";
19
+ readonly file: "connect.sh";
20
+ };
21
+ readonly ps1: {
22
+ readonly path: "/connect.ps1";
23
+ readonly file: "connect.ps1";
24
+ };
25
+ readonly hostSh: {
26
+ readonly path: "/connect-host";
27
+ readonly file: "connect-host.sh";
28
+ };
29
+ readonly hostPs1: {
30
+ readonly path: "/connect-host.ps1";
31
+ readonly file: "connect-host.ps1";
32
+ };
33
+ readonly cleanupHost: {
34
+ readonly path: "/cleanup-host";
35
+ readonly file: "cleanup-host.sh";
36
+ };
37
+ readonly desktopSh: {
38
+ readonly path: "/sync";
39
+ readonly file: "sync.sh";
40
+ };
41
+ readonly desktopPs1: {
42
+ readonly path: "/sync.ps1";
43
+ readonly file: "sync.ps1";
44
+ };
45
+ readonly computerSh: {
46
+ readonly path: "/computer";
47
+ readonly file: "computer.sh";
48
+ };
49
+ readonly computerPs1: {
50
+ readonly path: "/computer.ps1";
51
+ readonly file: "computer.ps1";
52
+ };
53
+ readonly rebuild: {
54
+ readonly path: "/rebuild";
55
+ readonly file: "recreate.sh";
56
+ };
57
+ readonly rebuildPs1: {
58
+ readonly path: "/rebuild.ps1";
59
+ readonly file: "recreate.ps1";
60
+ };
61
+ readonly update: {
62
+ readonly path: "/update";
63
+ readonly file: "recreate.sh";
64
+ };
65
+ readonly updatePs1: {
66
+ readonly path: "/update.ps1";
67
+ readonly file: "recreate.ps1";
68
+ };
69
+ readonly cleanup: {
70
+ readonly path: "/cleanup";
71
+ readonly file: "cleanup.sh";
72
+ };
73
+ readonly cleanupPs1: {
74
+ readonly path: "/cleanup.ps1";
75
+ readonly file: "cleanup.ps1";
76
+ };
77
+ };
78
+ export type InstallScript = keyof typeof INSTALL_SCRIPTS;
79
+ export declare const installScriptUrl: (key: InstallScript) => string;
80
+ export declare const installScriptPath: (key: InstallScript) => string;
14
81
  export declare const DAEMON_PORT = 8787;
15
82
  export declare const PREVIEW_PORT = 5173;
16
83
  export declare const LOCAL_PORT = 8788;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,qBAAqB,CAAC;AAkBpC,eAAO,MAAM,cAAc,UAAU,CAAC;AAItC,eAAO,MAAM,YAAY,aAAa,CAAC;AAMvC,eAAO,MAAM,SAAS,cAAc,CAAC;AAIrC,eAAO,MAAM,eAAe,kBAAkB,CAAC;AAK/C,eAAO,MAAM,aAAa,eAAe,CAAC;AAC1C,eAAO,MAAM,mBAAmB,yBAAyB,CAAC;AAW1D,eAAO,MAAM,iBAAiB,uCAAuC,CAAC;AACtE,eAAO,MAAM,oBAAoB,WAAW,CAAC;AAC7C,eAAO,MAAM,oBAAoB,KAAK,CAAC;AACvC,eAAO,MAAM,mBAAmB,KAAK,CAAC;AAUtC,eAAO,MAAM,yBAAyB,KAAK,CAAC;AAe5C,eAAO,MAAM,mBAAmB,6BAA6B,CAAC;AAa9D,eAAO,MAAM,WAAW,OAAO,CAAC;AAChC,eAAO,MAAM,YAAY,OAAO,CAAC;AASjC,eAAO,MAAM,UAAU,OAAO,CAAC;AAO/B,eAAO,MAAM,eAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,qBAAqB,CAAC;AAkBpC,eAAO,MAAM,cAAc,UAAU,CAAC;AAItC,eAAO,MAAM,YAAY,aAAa,CAAC;AAMvC,eAAO,MAAM,SAAS,cAAc,CAAC;AAIrC,eAAO,MAAM,eAAe,kBAAkB,CAAC;AAK/C,eAAO,MAAM,aAAa,eAAe,CAAC;AAC1C,eAAO,MAAM,mBAAmB,yBAAyB,CAAC;AAW1D,eAAO,MAAM,iBAAiB,uCAAuC,CAAC;AACtE,eAAO,MAA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AGtH,eAAO,MAAM,iBAAiB,QAAS,aAAa,KAAG,MAA+D,CAAC;AAavH,eAAO,MAAM,WAAW,OAAO,CAAC;AAChC,eAAO,MAAM,YAAY,OAAO,CAAC;AASjC,eAAO,MAAM,UAAU,OAAO,CAAC;AAO/B,eAAO,MAAM,eAAe,OAAO,CAAC"}
package/dist/index.js CHANGED
@@ -11,6 +11,27 @@ export const LEGAL_ENTITY_ADDRESS = "";
11
11
  export const LEGAL_ENTITY_TAX_ID = "";
12
12
  export const PLATFORM_HOSTING_LOCATION = "";
13
13
  export const PLATFORM_WEB_ORIGIN = "https://app.intentic.dev";
14
+ export const PLATFORM_SITE_ORIGIN = "https://intentic.dev";
15
+ export const INSTALL_SCRIPTS_DIR = "_site/site/public/scripts";
16
+ export const INSTALL_SCRIPTS = {
17
+ sh: { path: "/connect", file: "connect.sh" },
18
+ ps1: { path: "/connect.ps1", file: "connect.ps1" },
19
+ hostSh: { path: "/connect-host", file: "connect-host.sh" },
20
+ hostPs1: { path: "/connect-host.ps1", file: "connect-host.ps1" },
21
+ cleanupHost: { path: "/cleanup-host", file: "cleanup-host.sh" },
22
+ desktopSh: { path: "/sync", file: "sync.sh" },
23
+ desktopPs1: { path: "/sync.ps1", file: "sync.ps1" },
24
+ computerSh: { path: "/computer", file: "computer.sh" },
25
+ computerPs1: { path: "/computer.ps1", file: "computer.ps1" },
26
+ rebuild: { path: "/rebuild", file: "recreate.sh" },
27
+ rebuildPs1: { path: "/rebuild.ps1", file: "recreate.ps1" },
28
+ update: { path: "/update", file: "recreate.sh" },
29
+ updatePs1: { path: "/update.ps1", file: "recreate.ps1" },
30
+ cleanup: { path: "/cleanup", file: "cleanup.sh" },
31
+ cleanupPs1: { path: "/cleanup.ps1", file: "cleanup.ps1" },
32
+ };
33
+ export const installScriptUrl = (key) => `${PLATFORM_SITE_ORIGIN}${INSTALL_SCRIPTS[key].path}`;
34
+ export const installScriptPath = (key) => `${INSTALL_SCRIPTS_DIR}/${INSTALL_SCRIPTS[key].file}`;
14
35
  export const DAEMON_PORT = 8787;
15
36
  export const PREVIEW_PORT = 5173;
16
37
  export const LOCAL_PORT = 8788;
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,qBAAqB,CAAC;AAkBpC,MAAM,CAAC,MAAM,cAAc,GAAG,OAAO,CAAC;AAItC,MAAM,CAAC,MAAM,YAAY,GAAG,UAAU,CAAC;AAMvC,MAAM,CAAC,MAAM,SAAS,GAAG,WAAW,CAAC;AAIrC,MAAM,CAAC,MAAM,eAAe,GAAG,eAAe,CAAC;AAK/C,MAAM,CAAC,MAAM,aAAa,GAAG,YAAY,CAAC;AAC1C,MAAM,CAAC,MAAM,mBAAmB,GAAG,sBAAsB,CAAC;AAW1D,MAAM,CAAC,MAAM,iBAAiB,GAAG,oCAAoC,CAAC;AACtE,MAAM,CAAC,MAAM,oBAAoB,GAAG,QAAQ,CAAC;AAC7C,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,CAAC;AACvC,MAAM,CAAC,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAUtC,MAAM,CAAC,MAAM,yBAAyB,GAAG,EAAE,CAAC;AAe5C,MAAM,CAAC,MAAM,mBAAmB,GAAG,0BAA0B,CAAC;AAa9D,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,CAAC;AAChC,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,CAAC;AASjC,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,CAAC;AAO/B,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,qBAAqB,CAAC;AAkBpC,MAAM,CAAC,MAAM,cAAc,GAAG,OAAO,CAAC;AAItC,MAAM,CAAC,MAAM,YAAY,GAAG,UAAU,CAAC;AAMvC,MAAM,CAAC,M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AE;IACtD,WAAW,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,cAAc,EAAE;IAC5D,OAAO,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,aAAa,EAAE;IAClD,UAAU,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,cAAc,EAAE;IAC1D,MAAM,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,aAAa,EAAE;IAChD,SAAS,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,cAAc,EAAE;IACxD,OAAO,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,YAAY,EAAE;IACjD,UAAU,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,EAAE;CACM,CAAC;AAKpE,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,GAAkB,EAAU,EAAE,CAAC,GAAG,oBAAoB,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;AAGtH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,GAAkB,EAAU,EAAE,CAAC,GAAG,mBAAmB,IAAI,eAAe,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;AAavH,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,CAAC;AAChC,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,CAAC;AASjC,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,CAAC;AAO/B,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intentic/constants",
3
- "version": "1.232.0",
3
+ "version": "1.234.0",
4
4
  "description": "Shared constants for the intentic packages, ports, paths, and image references the daemon, CLIs and desktop app all agree on",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -33,11 +33,11 @@
33
33
  }
34
34
  },
35
35
  "devDependencies": {
36
+ "@intentic/testing": "0.0.0",
37
+ "@intentic/tsconfig": "0.0.0",
36
38
  "@types/node": "24.13.2",
37
39
  "@typescript/native-preview": "7.0.0-dev.20260707.2",
38
- "vitest": "4.1.10",
39
- "@intentic/testing": "0.0.0",
40
- "@intentic/tsconfig": "0.0.0"
40
+ "vitest": "4.1.10"
41
41
  },
42
42
  "scripts": {
43
43
  "build": "tsgo",
package/src/node.mjs CHANGED
@@ -56,9 +56,13 @@ const startDir = (from) => {
56
56
  const walkUp = (dir, marker) => {
57
57
  let current = dir;
58
58
  for (;;) {
59
- if (existsSync(resolve(current, marker))) return current;
59
+ if (existsSync(resolve(current, marker))) {
60
+ return current;
61
+ }
60
62
  const parent = dirname(current);
61
- if (parent === current) return "";
63
+ if (parent === current) {
64
+ return "";
65
+ }
62
66
  current = parent;
63
67
  }
64
68
  };
@@ -71,7 +75,9 @@ const walkUp = (dir, marker) => {
71
75
  * wrong directory is how a config loader silently reads no .env and every credential arrives empty. */
72
76
  export const repoRoot = (from) => {
73
77
  const found = walkUp(startDir(from), REPO_MARKER);
74
- if (found === "") throw new Error(`repoRoot: no ${REPO_MARKER} above ${startDir(from)}, is this a complete checkout?`);
78
+ if (found === "") {
79
+ throw new Error(`repoRoot: no ${REPO_MARKER} above ${startDir(from)}, is this a complete checkout?`);
80
+ }
75
81
  return found;
76
82
  };
77
83
 
@@ -82,6 +88,8 @@ export const repoRoot = (from) => {
82
88
  * Stops at the FIRST package.json above the caller, so a package's own manifest always wins over the root's. */
83
89
  export const packageRoot = (from) => {
84
90
  const found = walkUp(startDir(from), "package.json");
85
- if (found === "") throw new Error(`packageRoot: no package.json above ${startDir(from)}`);
91
+ if (found === "") {
92
+ throw new Error(`packageRoot: no package.json above ${startDir(from)}`);
93
+ }
86
94
  return found;
87
95
  };