@objectstack/types 17.0.0-rc.1 → 17.0.0-rc.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,162 @@
1
1
  # @objectstack/types
2
2
 
3
+ ## 17.0.0-rc.2
4
+
5
+ ### Minor Changes
6
+
7
+ - b25a116: fix(verify): resolve the enterprise organizations package from the HOST APP (#4700)
8
+
9
+ `bootStack(app, { multiTenant: true })` — and therefore `objectstack verify
10
+ --multi-tenant` — could never load `@objectstack/organizations`. Node ESM
11
+ resolves a bare `import()` against the **importer's own realpath**, which for
12
+ `packages/verify` is inside the framework workspace, while the enterprise
13
+ package is cloud-private and only ever lives in the verified app's
14
+ `node_modules`. Every real host app fell into the catch and was told to
15
+ "Install/link it in this workspace" — about a package it had already installed.
16
+ Same defect class as cloud#1013, which fixed `objectstack serve`; #4699 fixed
17
+ that one call site and this issue tracked the two the sweep left behind.
18
+
19
+ **New: `@objectstack/types/node`.** The host-app resolver (`createHostRequire` /
20
+ `createHostImporter`) moved out of `packages/cli/src/utils/import-from-host.ts`
21
+ — where `@objectstack/verify` and the dogfood suite could not import it without
22
+ inverting the dependency direction — into a **node-only subpath export** of
23
+ `@objectstack/types`. One behaviour, one source; the CLI now consumes it and its
24
+ private copy is deleted.
25
+
26
+ It is a subpath and **not** the root export because `@objectstack/types` is a
27
+ dependency of `@objectstack/hono` ("edge-compatible REST API server for
28
+ Cloudflare Workers, Deno, Bun, and Node") and of the plugin layer a `LiteKernel`
29
+ boots on Workers. The root entry reaches zero `node:` builtins, and a Workers
30
+ bundle breaks on `node:module` even when nothing calls it. `tsup` emits the two
31
+ entries as separate self-contained bundles (`splitting: false`), and a test
32
+ walks the root's import graph and fails on the first reachable `node:`
33
+ specifier, so the isolation is enforced rather than merely intended. Same
34
+ arrangement `@objectstack/metadata` already ships for its `./node` subpath.
35
+
36
+ **New: `BootOptions.hostRoot`** (optional, defaults to `process.cwd()`) names
37
+ the app whose `node_modules` supplies those optional packages — for a harness
38
+ booting an app that is not the working directory.
39
+
40
+ **The dogfood multi-org gates had never run.** Two suites probed availability
41
+ with the same bare `import()` and so were **constant-false** — not "false
42
+ because absent" but false by construction, in every environment including the
43
+ cloud CI whose comment claimed it ran them. The #1994 cross-tenant RLS proof and
44
+ the attachments cross-tenant isolation block had therefore never executed while
45
+ the suite reported green (Prime Directive #10, test-suite edition). They now
46
+ resolve like the runtime does, and `OS_TEST_MULTI_ORG_ENABLED=1` declares that a
47
+ run is expected to ship the package — turning a silent skip into a loud failure,
48
+ so a run can no longer pass by quietly not running the gates it exists for.
49
+
50
+ ### Patch Changes
51
+
52
+ - Updated dependencies [430dcc2]
53
+ - Updated dependencies [e6ac4bd]
54
+ - Updated dependencies [80334c7]
55
+ - Updated dependencies [ce5242c]
56
+ - Updated dependencies [a7163ea]
57
+ - Updated dependencies [e6e9379]
58
+ - Updated dependencies [98877c9]
59
+ - Updated dependencies [98877c9]
60
+ - Updated dependencies [e6b1b69]
61
+ - Updated dependencies [ad047d2]
62
+ - Updated dependencies [2826d1e]
63
+ - Updated dependencies [5a84d41]
64
+ - Updated dependencies [20b1a9e]
65
+ - Updated dependencies [203a449]
66
+ - Updated dependencies [ac37fc6]
67
+ - Updated dependencies [4820f55]
68
+ - Updated dependencies [462d9c4]
69
+ - Updated dependencies [7d21581]
70
+ - Updated dependencies [f2445c9]
71
+ - Updated dependencies [23338c3]
72
+ - Updated dependencies [5b843fb]
73
+ - Updated dependencies [b4487aa]
74
+ - Updated dependencies [65ca83a]
75
+ - Updated dependencies [67bf2e2]
76
+ - Updated dependencies [c6d1cb4]
77
+ - Updated dependencies [36030ff]
78
+ - Updated dependencies [6117f7b]
79
+ - Updated dependencies [e533b0b]
80
+ - Updated dependencies [cdf4d9a]
81
+ - Updated dependencies [aee1806]
82
+ - Updated dependencies [c13350b]
83
+ - Updated dependencies [c13350b]
84
+ - Updated dependencies [9ca2d85]
85
+ - Updated dependencies [c13350b]
86
+ - Updated dependencies [891d345]
87
+ - Updated dependencies [a52e2ef]
88
+ - Updated dependencies [5293114]
89
+ - Updated dependencies [20bc357]
90
+ - Updated dependencies [5966c2a]
91
+ - Updated dependencies [2382580]
92
+ - Updated dependencies [d9fa683]
93
+ - Updated dependencies [3c7bcc0]
94
+ - Updated dependencies [4b6cac7]
95
+ - Updated dependencies [7631964]
96
+ - Updated dependencies [ac471a0]
97
+ - Updated dependencies [60ae58e]
98
+ - Updated dependencies [ce92674]
99
+ - Updated dependencies [9f601e8]
100
+ - Updated dependencies [51c5227]
101
+ - Updated dependencies [a4a85c8]
102
+ - Updated dependencies [07a4e26]
103
+ - Updated dependencies [ec975f1]
104
+ - Updated dependencies [eb4204b]
105
+ - Updated dependencies [4f13be2]
106
+ - Updated dependencies [61cc079]
107
+ - Updated dependencies [0e96e46]
108
+ - Updated dependencies [d52d4fe]
109
+ - Updated dependencies [742cebb]
110
+ - Updated dependencies [ce92674]
111
+ - Updated dependencies [cf2c9b7]
112
+ - Updated dependencies [0f9faa2]
113
+ - Updated dependencies [7cf42fe]
114
+ - Updated dependencies [5966c2a]
115
+ - Updated dependencies [f78dd83]
116
+ - Updated dependencies [a2cd18a]
117
+ - Updated dependencies [4638aaa]
118
+ - Updated dependencies [0222d3c]
119
+ - Updated dependencies [0a936ea]
120
+ - Updated dependencies [023c00b]
121
+ - Updated dependencies [155507e]
122
+ - Updated dependencies [7bba90b]
123
+ - Updated dependencies [7e05d8e]
124
+ - Updated dependencies [061406d]
125
+ - Updated dependencies [c1f344b]
126
+ - Updated dependencies [9c93465]
127
+ - Updated dependencies [ebb209c]
128
+ - Updated dependencies [63b33e6]
129
+ - Updated dependencies [2a44c1d]
130
+ - Updated dependencies [695cfbd]
131
+ - Updated dependencies [7445149]
132
+ - Updated dependencies [071d0dc]
133
+ - Updated dependencies [0848bea]
134
+ - Updated dependencies [d51bed2]
135
+ - Updated dependencies [b8b3c64]
136
+ - Updated dependencies [0c0fbd9]
137
+ - Updated dependencies [f3141d8]
138
+ - Updated dependencies [5a84d41]
139
+ - Updated dependencies [fd3013a]
140
+ - Updated dependencies [21676eb]
141
+ - Updated dependencies [e336549]
142
+ - Updated dependencies [d40f43a]
143
+ - Updated dependencies [e5e7ee0]
144
+ - Updated dependencies [a2ebea2]
145
+ - Updated dependencies [800bdb0]
146
+ - Updated dependencies [04f1182]
147
+ - Updated dependencies [5647006]
148
+ - Updated dependencies [38f7e4f]
149
+ - Updated dependencies [c57f3cf]
150
+ - Updated dependencies [97faca3]
151
+ - Updated dependencies [ad5fe25]
152
+ - Updated dependencies [ea90179]
153
+ - Updated dependencies [ce92674]
154
+ - Updated dependencies [5ef0b5b]
155
+ - Updated dependencies [48fbacb]
156
+ - Updated dependencies [355e951]
157
+ - Updated dependencies [dadb43f]
158
+ - @objectstack/spec@17.0.0-rc.2
159
+
3
160
  ## 17.0.0-rc.1
4
161
 
5
162
  ### Minor Changes
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Imports a package as the host app would see it.
3
+ *
4
+ * `any` is the module namespace of a package this repo does not compile against
5
+ * (it is not a dependency of the importing package at all) — every call site
6
+ * reads an export off it dynamically, exactly as the bare `import()` it replaces
7
+ * did.
8
+ */
9
+ type HostImporter = (pkg: string) => Promise<any>;
10
+ /**
11
+ * A `require` anchored at the **host app's** `package.json` — i.e. the project
12
+ * `objectstack serve` was invoked in, or the app `bootStack` is verifying, whose
13
+ * `node_modules` carries the packages it declares.
14
+ *
15
+ * @param hostRoot Directory holding the host app's `package.json` (default: the
16
+ * process CWD, which is where the CLI reads `objectstack.config.ts` from too).
17
+ */
18
+ declare function createHostRequire(hostRoot?: string): NodeRequire;
19
+ /**
20
+ * Build an importer that resolves from the host app first, then falls back to
21
+ * the importing package's own resolution.
22
+ *
23
+ * @param hostRequire Reuse an existing host `require` (callers usually also need
24
+ * it to read the host `package.json`); defaults to one anchored at the CWD.
25
+ */
26
+ declare function createHostImporter(hostRequire?: NodeRequire): HostImporter;
27
+
28
+ export { type HostImporter, createHostImporter, createHostRequire };
package/dist/node.d.ts ADDED
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Imports a package as the host app would see it.
3
+ *
4
+ * `any` is the module namespace of a package this repo does not compile against
5
+ * (it is not a dependency of the importing package at all) — every call site
6
+ * reads an export off it dynamically, exactly as the bare `import()` it replaces
7
+ * did.
8
+ */
9
+ type HostImporter = (pkg: string) => Promise<any>;
10
+ /**
11
+ * A `require` anchored at the **host app's** `package.json` — i.e. the project
12
+ * `objectstack serve` was invoked in, or the app `bootStack` is verifying, whose
13
+ * `node_modules` carries the packages it declares.
14
+ *
15
+ * @param hostRoot Directory holding the host app's `package.json` (default: the
16
+ * process CWD, which is where the CLI reads `objectstack.config.ts` from too).
17
+ */
18
+ declare function createHostRequire(hostRoot?: string): NodeRequire;
19
+ /**
20
+ * Build an importer that resolves from the host app first, then falls back to
21
+ * the importing package's own resolution.
22
+ *
23
+ * @param hostRequire Reuse an existing host `require` (callers usually also need
24
+ * it to read the host `package.json`); defaults to one anchored at the CWD.
25
+ */
26
+ declare function createHostImporter(hostRequire?: NodeRequire): HostImporter;
27
+
28
+ export { type HostImporter, createHostImporter, createHostRequire };
package/dist/node.js ADDED
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/node.ts
21
+ var node_exports = {};
22
+ __export(node_exports, {
23
+ createHostImporter: () => createHostImporter,
24
+ createHostRequire: () => createHostRequire
25
+ });
26
+ module.exports = __toCommonJS(node_exports);
27
+ var import_node_module = require("module");
28
+ var import_node_path = require("path");
29
+ var import_node_url = require("url");
30
+ function createHostRequire(hostRoot = process.cwd()) {
31
+ return (0, import_node_module.createRequire)((0, import_node_path.join)(hostRoot, "package.json"));
32
+ }
33
+ function createHostImporter(hostRequire = createHostRequire()) {
34
+ return async (pkg) => {
35
+ let resolved;
36
+ try {
37
+ resolved = hostRequire.resolve(pkg);
38
+ } catch {
39
+ return import(
40
+ /* webpackIgnore: true */
41
+ pkg
42
+ );
43
+ }
44
+ return import((0, import_node_url.pathToFileURL)(resolved).href);
45
+ };
46
+ }
47
+ // Annotate the CommonJS export names for ESM import in node:
48
+ 0 && (module.exports = {
49
+ createHostImporter,
50
+ createHostRequire
51
+ });
52
+ //# sourceMappingURL=node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/node.ts"],"sourcesContent":["// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license.\n\n/**\n * `@objectstack/types/node` — the **node-only** slice of the shared utilities.\n *\n * WHY A SUBPATH AND NOT THE ROOT EXPORT. `@objectstack/types` is a dependency of\n * `@objectstack/hono`, whose whole reason to exist is \"edge-compatible REST API\n * server for Cloudflare Workers, Deno, Bun, and Node\" — and of the plugin/service\n * layer a `LiteKernel` boots on Workers. The root entry (`src/index.ts`) reaches\n * **zero** `node:` builtins today, and that is a property those consumers depend\n * on: a Workers bundle that pulls in `node:module` fails to build (or dies at\n * first call) even when nothing ever invokes it. Everything here needs\n * `node:module` / `node:url` by definition — it exists to drive Node's own\n * resolver — so it lives behind its own entry point instead.\n *\n * The isolation is structural, not conventional: `tsup` builds `src/index.ts` and\n * `src/node.ts` as separate entries with `splitting: false`, so the root bundle\n * contains no reference to this file, and `node-isolation.test.ts` fails the\n * build if anything reachable from the root ever imports a `node:` builtin. Same\n * arrangement `@objectstack/metadata` already ships for `./node`.\n *\n * ── What lives here ──────────────────────────────────────────────────────────\n *\n * Resolving optional packages from the **host app**, not from the framework\n * package doing the importing.\n *\n * Node ESM resolves a bare `import('pkg')` against the **importer's own\n * realpath**. Framework packages (the CLI, `@objectstack/verify`,\n * `@objectstack/dogfood`) are reached through `link:`/workspace dependencies, so\n * their realpath is inside the *framework* workspace — a bare import from any of\n * them can only ever see packages installed in the framework's own\n * `node_modules`. Every package that lives OUTSIDE that workspace and is supplied\n * by the app being served, verified or tested — a cloud-private package such as\n * `@objectstack/organizations` or `@objectstack/service-ai-studio`, or anything a\n * customer installs into their own project — is therefore invisible to a bare\n * import, no matter what the host app declares in its `package.json`\n * (cloud#1013: `objectstack serve` could never load the enterprise multi-org\n * runtime, so every self-hosted walled-posture deployment hit the ADR-0093 D5\n * fail-fast and exited 1; framework#4700: `bootStack({ multiTenant: true })` told\n * apps to install a package they had already installed, and the dogfood\n * multi-org probes were constant-false).\n *\n * The fix is to resolve from the host app's root and import the resolved\n * absolute path. The importing package's own resolution stays as the fallback,\n * for the framework-owned packages it depends on and the host does not declare.\n *\n * Resolution failure is the ONLY thing that falls back. A package the host\n * resolves but that throws while it evaluates is a genuine crash and propagates\n * unchanged: re-importing it bare would replace the real cause with a\n * `MODULE_NOT_FOUND`, which every caller here classifies as \"not installed\" —\n * turning a broken package into a silent skip (or, on the organizations path,\n * into a fatal message telling the operator to install what is already there).\n */\n\nimport { createRequire } from 'node:module';\nimport { join } from 'node:path';\nimport { pathToFileURL } from 'node:url';\n\n/**\n * Imports a package as the host app would see it.\n *\n * `any` is the module namespace of a package this repo does not compile against\n * (it is not a dependency of the importing package at all) — every call site\n * reads an export off it dynamically, exactly as the bare `import()` it replaces\n * did.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type HostImporter = (pkg: string) => Promise<any>;\n\n/**\n * A `require` anchored at the **host app's** `package.json` — i.e. the project\n * `objectstack serve` was invoked in, or the app `bootStack` is verifying, whose\n * `node_modules` carries the packages it declares.\n *\n * @param hostRoot Directory holding the host app's `package.json` (default: the\n * process CWD, which is where the CLI reads `objectstack.config.ts` from too).\n */\nexport function createHostRequire(hostRoot: string = process.cwd()): NodeRequire {\n return createRequire(join(hostRoot, 'package.json'));\n}\n\n/**\n * Build an importer that resolves from the host app first, then falls back to\n * the importing package's own resolution.\n *\n * @param hostRequire Reuse an existing host `require` (callers usually also need\n * it to read the host `package.json`); defaults to one anchored at the CWD.\n */\nexport function createHostImporter(\n hostRequire: NodeRequire = createHostRequire(),\n): HostImporter {\n return async (pkg: string): Promise<any> => {\n let resolved: string;\n try {\n resolved = hostRequire.resolve(pkg);\n } catch {\n // Invisible to the host app — try the importing package's own\n // dependencies. A package neither can see throws MODULE_NOT_FOUND from\n // here, which is what the callers' \"missing vs crashed\" classification\n // expects.\n return import(/* webpackIgnore: true */ pkg);\n }\n return import(pathToFileURL(resolved).href);\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAsDA,yBAA8B;AAC9B,uBAAqB;AACrB,sBAA8B;AAqBvB,SAAS,kBAAkB,WAAmB,QAAQ,IAAI,GAAgB;AAC/E,aAAO,sCAAc,uBAAK,UAAU,cAAc,CAAC;AACrD;AASO,SAAS,mBACd,cAA2B,kBAAkB,GAC/B;AACd,SAAO,OAAO,QAA8B;AAC1C,QAAI;AACJ,QAAI;AACF,iBAAW,YAAY,QAAQ,GAAG;AAAA,IACpC,QAAQ;AAKN,aAAO;AAAA;AAAA,QAAiC;AAAA;AAAA,IAC1C;AACA,WAAO,WAAO,+BAAc,QAAQ,EAAE;AAAA,EACxC;AACF;","names":[]}
package/dist/node.mjs ADDED
@@ -0,0 +1,26 @@
1
+ // src/node.ts
2
+ import { createRequire } from "module";
3
+ import { join } from "path";
4
+ import { pathToFileURL } from "url";
5
+ function createHostRequire(hostRoot = process.cwd()) {
6
+ return createRequire(join(hostRoot, "package.json"));
7
+ }
8
+ function createHostImporter(hostRequire = createHostRequire()) {
9
+ return async (pkg) => {
10
+ let resolved;
11
+ try {
12
+ resolved = hostRequire.resolve(pkg);
13
+ } catch {
14
+ return import(
15
+ /* webpackIgnore: true */
16
+ pkg
17
+ );
18
+ }
19
+ return import(pathToFileURL(resolved).href);
20
+ };
21
+ }
22
+ export {
23
+ createHostImporter,
24
+ createHostRequire
25
+ };
26
+ //# sourceMappingURL=node.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/node.ts"],"sourcesContent":["// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license.\n\n/**\n * `@objectstack/types/node` — the **node-only** slice of the shared utilities.\n *\n * WHY A SUBPATH AND NOT THE ROOT EXPORT. `@objectstack/types` is a dependency of\n * `@objectstack/hono`, whose whole reason to exist is \"edge-compatible REST API\n * server for Cloudflare Workers, Deno, Bun, and Node\" — and of the plugin/service\n * layer a `LiteKernel` boots on Workers. The root entry (`src/index.ts`) reaches\n * **zero** `node:` builtins today, and that is a property those consumers depend\n * on: a Workers bundle that pulls in `node:module` fails to build (or dies at\n * first call) even when nothing ever invokes it. Everything here needs\n * `node:module` / `node:url` by definition — it exists to drive Node's own\n * resolver — so it lives behind its own entry point instead.\n *\n * The isolation is structural, not conventional: `tsup` builds `src/index.ts` and\n * `src/node.ts` as separate entries with `splitting: false`, so the root bundle\n * contains no reference to this file, and `node-isolation.test.ts` fails the\n * build if anything reachable from the root ever imports a `node:` builtin. Same\n * arrangement `@objectstack/metadata` already ships for `./node`.\n *\n * ── What lives here ──────────────────────────────────────────────────────────\n *\n * Resolving optional packages from the **host app**, not from the framework\n * package doing the importing.\n *\n * Node ESM resolves a bare `import('pkg')` against the **importer's own\n * realpath**. Framework packages (the CLI, `@objectstack/verify`,\n * `@objectstack/dogfood`) are reached through `link:`/workspace dependencies, so\n * their realpath is inside the *framework* workspace — a bare import from any of\n * them can only ever see packages installed in the framework's own\n * `node_modules`. Every package that lives OUTSIDE that workspace and is supplied\n * by the app being served, verified or tested — a cloud-private package such as\n * `@objectstack/organizations` or `@objectstack/service-ai-studio`, or anything a\n * customer installs into their own project — is therefore invisible to a bare\n * import, no matter what the host app declares in its `package.json`\n * (cloud#1013: `objectstack serve` could never load the enterprise multi-org\n * runtime, so every self-hosted walled-posture deployment hit the ADR-0093 D5\n * fail-fast and exited 1; framework#4700: `bootStack({ multiTenant: true })` told\n * apps to install a package they had already installed, and the dogfood\n * multi-org probes were constant-false).\n *\n * The fix is to resolve from the host app's root and import the resolved\n * absolute path. The importing package's own resolution stays as the fallback,\n * for the framework-owned packages it depends on and the host does not declare.\n *\n * Resolution failure is the ONLY thing that falls back. A package the host\n * resolves but that throws while it evaluates is a genuine crash and propagates\n * unchanged: re-importing it bare would replace the real cause with a\n * `MODULE_NOT_FOUND`, which every caller here classifies as \"not installed\" —\n * turning a broken package into a silent skip (or, on the organizations path,\n * into a fatal message telling the operator to install what is already there).\n */\n\nimport { createRequire } from 'node:module';\nimport { join } from 'node:path';\nimport { pathToFileURL } from 'node:url';\n\n/**\n * Imports a package as the host app would see it.\n *\n * `any` is the module namespace of a package this repo does not compile against\n * (it is not a dependency of the importing package at all) — every call site\n * reads an export off it dynamically, exactly as the bare `import()` it replaces\n * did.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type HostImporter = (pkg: string) => Promise<any>;\n\n/**\n * A `require` anchored at the **host app's** `package.json` — i.e. the project\n * `objectstack serve` was invoked in, or the app `bootStack` is verifying, whose\n * `node_modules` carries the packages it declares.\n *\n * @param hostRoot Directory holding the host app's `package.json` (default: the\n * process CWD, which is where the CLI reads `objectstack.config.ts` from too).\n */\nexport function createHostRequire(hostRoot: string = process.cwd()): NodeRequire {\n return createRequire(join(hostRoot, 'package.json'));\n}\n\n/**\n * Build an importer that resolves from the host app first, then falls back to\n * the importing package's own resolution.\n *\n * @param hostRequire Reuse an existing host `require` (callers usually also need\n * it to read the host `package.json`); defaults to one anchored at the CWD.\n */\nexport function createHostImporter(\n hostRequire: NodeRequire = createHostRequire(),\n): HostImporter {\n return async (pkg: string): Promise<any> => {\n let resolved: string;\n try {\n resolved = hostRequire.resolve(pkg);\n } catch {\n // Invisible to the host app — try the importing package's own\n // dependencies. A package neither can see throws MODULE_NOT_FOUND from\n // here, which is what the callers' \"missing vs crashed\" classification\n // expects.\n return import(/* webpackIgnore: true */ pkg);\n }\n return import(pathToFileURL(resolved).href);\n };\n}\n"],"mappings":";AAsDA,SAAS,qBAAqB;AAC9B,SAAS,YAAY;AACrB,SAAS,qBAAqB;AAqBvB,SAAS,kBAAkB,WAAmB,QAAQ,IAAI,GAAgB;AAC/E,SAAO,cAAc,KAAK,UAAU,cAAc,CAAC;AACrD;AASO,SAAS,mBACd,cAA2B,kBAAkB,GAC/B;AACd,SAAO,OAAO,QAA8B;AAC1C,QAAI;AACJ,QAAI;AACF,iBAAW,YAAY,QAAQ,GAAG;AAAA,IACpC,QAAQ;AAKN,aAAO;AAAA;AAAA,QAAiC;AAAA;AAAA,IAC1C;AACA,WAAO,OAAO,cAAc,QAAQ,EAAE;AAAA,EACxC;AACF;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@objectstack/types",
3
- "version": "17.0.0-rc.1",
3
+ "version": "17.0.0-rc.2",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Shared interfaces describing the ObjectStack Runtime environment",
6
6
  "main": "dist/index.js",
@@ -10,10 +10,15 @@
10
10
  "types": "./dist/index.d.ts",
11
11
  "import": "./dist/index.mjs",
12
12
  "require": "./dist/index.js"
13
+ },
14
+ "./node": {
15
+ "types": "./dist/node.d.ts",
16
+ "import": "./dist/node.mjs",
17
+ "require": "./dist/node.js"
13
18
  }
14
19
  },
15
20
  "dependencies": {
16
- "@objectstack/spec": "17.0.0-rc.1"
21
+ "@objectstack/spec": "17.0.0-rc.2"
17
22
  },
18
23
  "devDependencies": {
19
24
  "typescript": "^6.0.3",
@@ -45,7 +50,7 @@
45
50
  "node": ">=22.0.0"
46
51
  },
47
52
  "scripts": {
48
- "build": "tsup --config ../../tsup.config.ts",
53
+ "build": "tsup",
49
54
  "typecheck": "tsc --noEmit",
50
55
  "test": "vitest run"
51
56
  }